From 28b5c30b964c9e6121a2ee04454905c81a3e2646 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 10 Sep 2021 10:23:28 +0900 Subject: ops.h: add `OP_SYMBOL` instruction. It generates a symbol by interning from the pool string. --- include/mruby/ops.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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)) */ -- cgit v1.2.3