summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-27 01:10:02 (GMT)
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-27 01:10:02 (GMT)
commit529af9c82123393c73f74040d974558b68212297 (patch)
treea2bb7c0c7940490d785228baaaa3c5f737b06326 /insns.def
parent22444ae9b1a20e39b7278193f85e4d805bd1d54d (diff)
refactor move logics out of insns.def
This is a pure refactoring. I see no difference in this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def14
1 files changed, 2 insertions, 12 deletions
diff --git a/insns.def b/insns.def
index 91ae456..d9a4935 100644
--- a/insns.def
+++ b/insns.def
@@ -730,12 +730,7 @@ opt_str_freeze
()
(VALUE val)
{
- if (BASIC_OP_UNREDEFINED_P(BOP_FREEZE, STRING_REDEFINED_OP_FLAG)) {
- val = str;
- }
- else {
- val = rb_funcall(rb_str_resurrect(str), idFreeze, 0);
- }
+ val = vm_opt_str_freeze(str, BOP_FREEZE, idFreeze);
}
DEFINE_INSN
@@ -744,12 +739,7 @@ opt_str_uminus
()
(VALUE val)
{
- if (BASIC_OP_UNREDEFINED_P(BOP_UMINUS, STRING_REDEFINED_OP_FLAG)) {
- val = str;
- }
- else {
- val = rb_funcall(rb_str_resurrect(str), idUMinus, 0);
- }
+ val = vm_opt_str_freeze(str, BOP_UMINUS, idUMinus);
}
DEFINE_INSN