From c1a0fa993a3656976b65c68fd39af7f5cd76077b Mon Sep 17 00:00:00 2001 From: Brian Shirai Date: Tue, 21 Jan 2020 20:24:34 -0800 Subject: [PATCH] Added register for array-like object size. --- lib/rubinius/code/compiler/generator_methods.rb | 12 ++++++------ lib/rubinius/code/compiler/opcodes.rb | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/rubinius/code/compiler/generator_methods.rb b/lib/rubinius/code/compiler/generator_methods.rb index 4b92714..a304c4f 100644 --- a/lib/rubinius/code/compiler/generator_methods.rb +++ b/lib/rubinius/code/compiler/generator_methods.rb @@ -1914,15 +1914,15 @@ def n_dsign(arg1, arg2) @instruction = 271 end - def r_load_ref_addr(arg1, arg2) - @stream << 272 << arg1 << arg2 - @ip += 3 + def r_load_ref_addr(arg1, arg2, arg3) + @stream << 272 << arg1 << arg2 << arg3 + @ip += 4 @instruction = 272 end - def r_load_byte_addr(arg1, arg2) - @stream << 273 << arg1 << arg2 - @ip += 3 + def r_load_byte_addr(arg1, arg2, arg3) + @stream << 273 << arg1 << arg2 << arg3 + @ip += 4 @instruction = 273 end diff --git a/lib/rubinius/code/compiler/opcodes.rb b/lib/rubinius/code/compiler/opcodes.rb index a644988..11f0146 100644 --- a/lib/rubinius/code/compiler/opcodes.rb +++ b/lib/rubinius/code/compiler/opcodes.rb @@ -310,8 +310,8 @@ class InstructionSet opcode 270, :n_dclass, :stack => [0, 0], :args => [:r0, :r1], :control_flow => :next opcode 271, :n_dsign, :stack => [0, 0], :args => [:r0, :r1], :control_flow => :next - opcode 272, :r_load_ref_addr, :stack => [0, 0], :args => [:r0, :r1], :control_flow => :next - opcode 273, :r_load_byte_addr, :stack => [0, 0], :args => [:r0, :r1], :control_flow => :next + opcode 272, :r_load_ref_addr, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next + opcode 273, :r_load_byte_addr, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next opcode 274, :r_load_ref, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next opcode 275, :r_store_ref, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next opcode 276, :r_load_byte, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next