summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-09-10 10:23:28 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-09-10 10:23:28 +0900
commit28b5c30b964c9e6121a2ee04454905c81a3e2646 (patch)
tree8e63ca79d1404d32534dcb2a0022c064d6bfabc6 /include
parentb34713304a983a0a6e3259bd0b5f3215ac2ee14a (diff)
downloadmruby-28b5c30b964c9e6121a2ee04454905c81a3e2646.tar.gz
mruby-28b5c30b964c9e6121a2ee04454905c81a3e2646.zip
ops.h: add `OP_SYMBOL` instruction.
It generates a symbol by interning from the pool string.
Diffstat (limited to 'include')
-rw-r--r--include/mruby/ops.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mruby/ops.h b/include/mruby/ops.h
index fae6872cc..705247649 100644
--- a/include/mruby/ops.h
+++ b/include/mruby/ops.h
@@ -91,6 +91,7 @@ OPCODE(AREF, BBB) /* R(a) = R(b)[c] */
OPCODE(ASET, BBB) /* R(a)[c] = R(b) */
OPCODE(APOST, BBB) /* *R(a),R(a+1)..R(a+c) = R(a)[b..] */
OPCODE(INTERN, B) /* R(a) = intern(R(a)) */
+OPCODE(SYMBOL, BB) /* R(a) = intern(Pool(b)) */
OPCODE(STRING, BB) /* R(a) = str_dup(Pool(b)) */
OPCODE(STRCAT, B) /* str_cat(R(a),R(a+1)) */
OPCODE(HASH, BB) /* R(a) = hash_new(R(a),R(a+1)..R(a+b*2-1)) */