diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-10-02 23:52:22 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-10-02 23:55:03 +0200 |
commit | d03f4f4b0f770cdb16abf630179070c46031518d (patch) | |
tree | f6c746bdf64006acf0366d125b2deea5a14c2d1e /eval.c | |
parent | a57aa8262ead82aaf2e9eec3d11d473186e7a33a (diff) |
ast: store function declarations as opcode offsets
We cannot use direct pointers since the opcode array might be reallocated
resulting in potentially changed memory addresses.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1050,7 +1050,7 @@ ut_invoke(struct ut_state *state, uint32_t off, struct json_object *scope, return cfn ? cfn(state, off, argvals) : NULL; } - decl = tag->tag.data; + decl = ut_get_op(state, tag->tag.off); arg = ut_get_op(state, decl ? decl->tree.operand[1] : 0); s = scope ? scope : ut_addscope(state, ut_get_off(state, decl)); |