1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

bugfix for backtracking over RET insns, and a truly evil testcase

This commit is contained in:
Stephen Dolan
2012-08-22 19:05:53 +01:00
parent 79d81f4bee
commit 2086e59ab1
10 changed files with 83 additions and 53 deletions

View File

@@ -65,7 +65,7 @@ block gen_noop() {
}
block gen_op_simple(opcode op) {
assert(!(opcode_describe(op)->flags & OP_HAS_IMMEDIATE));
assert(opcode_describe(op)->length == 1);
return inst_block(inst_new(op));
}
@@ -364,8 +364,8 @@ static void compile(struct bytecode* bc, block b) {
}
}
assert(found);
} else if (opflags & OP_HAS_IMMEDIATE) {
code[pos++] = curr->imm.intval;
} else if (op->length > 1) {
assert(0 && "codegen not implemented for this operation");
}
}
bc->constants = constant_pool;