diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-06-03 22:38:32 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-06-03 22:38:32 +0900 |
| commit | 059da2ad56f4aae0015c1420c30740dd09cafe02 (patch) | |
| tree | 53e1aa6431dcd4dc6ff458da842892e2b280c7a6 | |
| parent | 2f635f56cb701293c59cc2e4f41b653cae2cb3af (diff) | |
| parent | b721d449e6c9ad905e62a7632037ceb9900f812f (diff) | |
| download | mruby-059da2ad56f4aae0015c1420c30740dd09cafe02.tar.gz mruby-059da2ad56f4aae0015c1420c30740dd09cafe02.zip | |
Merge pull request #2821 from cremno/push-only-after-op_getconst-in-val-mode
push only after OP_GETCONST in VAL mode
| -rw-r--r-- | mrbgems/mruby-compiler/core/codegen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index 16233347c..d2eeef203 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -1942,7 +1942,9 @@ codegen(codegen_scope *s, node *tree, int val) int sym = new_sym(s, sym(tree)); genop(s, MKOP_ABx(OP_GETCONST, cursp(), sym)); - push(); + if (val) { + push(); + } } break; |
