summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def14
1 files changed, 14 insertions, 0 deletions
diff --git a/insns.def b/insns.def
index 6075d98..63a36b3 100644
--- a/insns.def
+++ b/insns.def
@@ -999,6 +999,20 @@ send
CALL_METHOD(ci);
}
+DEFINE_INSN
+opt_str_freeze
+(VALUE str)
+()
+(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);
+ }
+}
+
/**
@c optimize
@e Invoke method without block, splat