diff options
Diffstat (limited to 'src/compiler.c')
-rw-r--r-- | src/compiler.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler.c b/src/compiler.c index 9b6a458..98a5e7b 100644 --- a/src/compiler.c +++ b/src/compiler.c | |||
@@ -907,6 +907,16 @@ chunk_alloc(Chunk *parent) { | |||
907 | 907 | ||
908 | CompResult | 908 | CompResult |
909 | compile_function(Chunk *chunk, Node *node) { | 909 | compile_function(Chunk *chunk, Node *node) { |
910 | // The current activation record procedure for the VM is as follows: | ||
911 | // | ||
912 | // [caller][callee ] | ||
913 | // [ .... ][ RET VAL ][ PARAMS ][ LOCALS ][ REGISTERS ][ RET META ] | ||
914 | // ^ | ||
915 | // frame pointer | ||
916 | // | ||
917 | // The caller is responsible for allocating the return memory and the | ||
918 | // parameter memory and filling the param data before OP_CALL. | ||
919 | // | ||
910 | Chunk *func = chunk_alloc(chunk); | 920 | Chunk *func = chunk_alloc(chunk); |
911 | func->name = node->unique_name; | 921 | func->name = node->unique_name; |
912 | Function fun = (Function){ | 922 | Function fun = (Function){ |