Refactor function argument passing into what it always should have been.

Most visible change is that error messages when a function is called
with the wrong number of arguments are much better.
This commit is contained in:
Stephen Dolan committed 2012-12-04 00:39:21 +00:00
1 parent a88d53d2fd
commit 616e8f9924
8 files changed
+103 -105

No files matched your search

+3 -3
View File
@@ -6,11 +6,11 @@
#include "opcode.h"
static int bytecode_operation_length(uint16_t* codeptr) {
int length = opcode_describe(*codeptr)->length;
if (*codeptr == CALL_JQ) {
return 4 + codeptr[1] * 2;
} else {
return opcode_length(*codeptr);
length += codeptr[1] * 2;
}
return length;
}
void dump_disassembly(int indent, struct bytecode* bc) {