TCO to the max!

Close #446.

    Currently tested by disassembling and tracing various recursive jq
    programs by hand under valgrind.  An improved test framework that
    can test for errors and specific bytecode patterns is in
    development.
This commit is contained in:
Nicolas Williams committed 2014-06-30 23:41:20 -05:00
1 parent e1c5a2f575
commit 436941d48b
4 files changed
+81 -18

No files matched your search

+1 -1
View File
@@ -36,7 +36,7 @@ const struct opcode_description* opcode_describe(opcode op) {
}
static int bytecode_operation_length(uint16_t* codeptr) {
int bytecode_operation_length(uint16_t* codeptr) {
int length = opcode_describe(*codeptr)->length;
if (*codeptr == CALL_JQ) {
length += codeptr[1] * 2;