diff options
Diffstat (limited to 'interpret.h')
-rw-r--r-- | interpret.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/interpret.h b/interpret.h index ca67e966..ef087951 100644 --- a/interpret.h +++ b/interpret.h @@ -742,6 +742,26 @@ mod: } break; + case Op_clear_var: + /* + * Clear variable to the undefined value + * that is equal to 0 and "" represented by + * the global Nnull_string. + * This is used by @let to initialize + * locals, which may re-use previously + * initialized frame locations. + */ + lhs = get_lhs(pc->memory, false); + + /* + * If it's already clear, nothing to do + */ + if (*lhs != Nnull_string) { + unref(*lhs); + *lhs = dupnode(Nnull_string); + } + break; + case Op_store_field: { /* field assignment optimization, |