summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-27 06:12:37 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-27 06:12:37 +0000
commit669a55dfed5cc6e32afee69694b95e8b4c187f54 (patch)
treeae62eee552e736a3ad32367af21c12eee0b24b7d /vm_core.h
parent833e42d120f9b347badae4d04479266f2781d6eb (diff)
fix redefinition optimization for -"literal string" (UMinus)
Unfortunately this enlarges insns.def by yet another instruction. However, it is much prettier than opt_str_freeze in use, and maybe we can avoid having so many instructions in the future. [ruby-core:80368] * insns.def (DEFINE_INSN): new instruction: opt_str_uminus (maybe temporary) * compile.c (iseq_compile_each0): split instructions * test/ruby/test_optimization.rb (test_string_uminus): new test * vm.c (vm_init_redefined_flag): set redefinintion flag for uminus * vm_core.h (enum ruby_basic_operators): add BOP_UMINUS git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 5b930a8aa7..437c4d9c2d 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -454,6 +454,7 @@ enum ruby_basic_operators {
BOP_NEQ,
BOP_MATCH,
BOP_FREEZE,
+ BOP_UMINUS,
BOP_MAX,
BOP_MIN,