From 94a4b95b5d8e50851152265f3e7a7920c7fcb1a0 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 2 Dec 2024 15:23:06 +0900 Subject: [PATCH] test/lang.rb: update compiled code in comments - variable sized instructions - new instruction names - remove OP_ prefix as code dump does --- test/t/lang.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/t/lang.rb b/test/t/lang.rb index 1f83bafec..df889c9fc 100755 --- a/test/t/lang.rb +++ b/test/t/lang.rb @@ -12,15 +12,15 @@ # # compiles to the following byte code: # -# 1 000 OP_LOADI R1 0 ; R1:i -# 2 001 OP_MOVE R2 R1 ; R1:i -# 2 002 OP_LOADI R3 0 -# 2 003 OP_GT R2 :> 1 -# 2 004 OP_JMPNOT R2 008 -# 2 005 OP_MOVE R2 R1 ; R1:i -# 2 006 OP_LOADI R3 10 -# 2 007 OP_LT R2 :< 1 -# 2 008 OP_JMPNOT R2 (The address of end of then part) +# 1 000 LOADI_0 R1 (0) ; R1:i +# 2 002 MOVE R2 R1 ; R1:i +# 2 005 LOADI_0 R3 (0) +# 2 007 GT R2 R3 +# 2 009 JMPNOT R2 021 +# 2 013 MOVE R2 R1 ; R1:i +# 2 016 LOADI8 R3 10 +# 2 019 LT R2 R3 +# 2 021 JMPNOT R2 (The address of end of then part) # # When the instruction fusion the OP_GT and OP_JMPNOT you fell into the pitfalls. # The deleted intermediate boolean value is used in OP_JMPNOT (address 008).