summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-06-05 21:00:36 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-06-09 22:42:38 +0900
commit7f593893e8b868026a61adfe64f602b6a5644511 (patch)
tree83f21a1dc378f0f37828bc98fe76d1a66bdf2b10 /include
parent5d5b1d1f3c9a72c2154a9416cd95500a1c17dd79 (diff)
downloadmruby-7f593893e8b868026a61adfe64f602b6a5644511.tar.gz
mruby-7f593893e8b868026a61adfe64f602b6a5644511.zip
Update `OP_HASH` generation to support big hash creation.
Diffstat (limited to 'include')
-rw-r--r--include/mruby/ops.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/mruby/ops.h b/include/mruby/ops.h
index c8990ae43..e85ee3133 100644
--- a/include/mruby/ops.h
+++ b/include/mruby/ops.h
@@ -92,8 +92,8 @@ OPCODE(APOST, BBB) /* *R(a),R(a+1)..R(a+c) = R(a)[b..] */
OPCODE(INTERN, B) /* R(a) = intern(R(a)) */
OPCODE(STRING, BB) /* R(a) = str_dup(Lit(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)) */
-OPCODE(HASHADD, BB) /* R(a) = hash_push(R(a),R(a+1)..R(a+b)) */
+OPCODE(HASH, BB) /* R(a) = hash_new(R(a),R(a+1)..R(a+b*2-1)) */
+OPCODE(HASHADD, BB) /* R(a) = hash_push(R(a),R(a+1)..R(a+b*2)) */
OPCODE(HASHCAT, B) /* R(a) = hash_cat(R(a),R(a+1)) */
OPCODE(LAMBDA, BB) /* R(a) = lambda(SEQ[b],L_LAMBDA) */
OPCODE(BLOCK, BB) /* R(a) = lambda(SEQ[b],L_BLOCK) */