diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-18 05:16:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-18 05:16:37 +0000 |
commit | 5d988300b2bf55d7617cf26df5762eae5e32eac8 (patch) | |
tree | b79b1cf16be2af7b70c97f8ada98847cf5863bcc /insns.def | |
parent | b2da3824c5cc03658c652ed810ee0e322bd62b80 (diff) |
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.def | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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 個の値で初期化して生成しプッシュする。 */ |