sisshiki1969 / monoruby

Ruby implementation with yet another JIT compiler.
Apache License 2.0
112 stars 4 forks source link

Support safe navigation operator. #39

Closed sisshiki1969 closed 9 months ago

sisshiki1969 commented 9 months ago

test code

nil&.nil?

bytecode

+:00000 [01] init_method reg:2 arg:0 req:0 opt:0 rest:false stack_offset:5
 :00001 [02] %1 = nil
 :00002 [02] nilbr %1 =>:00006
+:00003 [02] %1 = %1.nil?()                       [-]
 :00005 [02] br =>:00007
+:00006 [02] %1 = nil
+:00007 [01] ret %1