Error on bytecodes longer than 0xFFFF (fix #269)

This lets us use uint16_t for the program counter. JVM
languages have the same limit on method size so it is a
reasonable limit.
This commit is contained in:
David Tolnay committed 2015-07-26 16:19:20 -07:00
1 parent 8295baf284
commit 21309bc6d7
3 files changed
+13 -7

No files matched your search

+1 -1
View File
@@ -1088,7 +1088,7 @@ int jq_compile_args(jq_state *jq, const char* str, jv args) {
nerrors = builtins_bind(jq, &program);
if (nerrors == 0) {
nerrors = block_compile(program, &jq->bc);
nerrors = block_compile(program, &jq->bc, locations);
}
}
if (nerrors)