mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user