aboutsummaryrefslogtreecommitdiffstats
path: root/insns.def
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-18 05:16:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-18 05:16:37 +0000
commitbf4a28729c5c66ea5a33630ae32face661e9c0ba (patch)
treeb79b1cf16be2af7b70c97f8ada98847cf5863bcc /insns.def
parente994503d851aa18c010dee6a1eb718c14a97276c (diff)
downloadruby-bf4a28729c5c66ea5a33630ae32face661e9c0ba.tar.gz
intern instruction
* insns.def (intern): new instruction to turn string into symbol. opt_call_c_function can not dump. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 1b069ce37d..bd47c2c0b0 100644
--- a/insns.def
+++ b/insns.def
@@ -400,6 +400,20 @@ toregexp
/**
@c put
+ @e intern str to Symbol and push it.
+ @j 文字列 str をシンボルに変換してスタックにプッシュする。
+ */
+DEFINE_INSN
+intern
+()
+(VALUE str)
+(VALUE sym)
+{
+ sym = rb_str_intern(str);
+}
+
+/**
+ @c put
@e put new array initialized with num values on the stack.
@j 新しい配列をスタック上の num 個の値で初期化して生成しプッシュする。
*/