rubyomr-preview / ruby

The Ruby+OMR Preview
Other
68 stars 9 forks source link

Implement missing YARV bytecodes #11

Open mgaudet opened 7 years ago

mgaudet commented 7 years ago

Currently, a number of YARV bytecodes remain unimplemented in the Ruby JIT.

The list (as of dd6dae0) is:

mgaudet commented 7 years ago

Just updated the list above to be the complete list (along with a reference revision)

mgaudet commented 7 years ago

For reference, from optcarrot, here are the aborts:

magaudet@ubuntu1604VM:~/open/optcarrot (master)$ OMR_JIT_OPTIONS=-Xjit:count=0,staticDebugCounters={*unsupported*} LD_LIBRARY_PATH=~/open/ruby_24/ ~/open/ruby_24/ruby --disable-gems  -v -Ilib -r./tools/shim bin/optcarrot --headless --print-fps --print-video-checksum --frames 180  examples/Lan_Master.nes
<snip> 

== Static debug counters ==
  1: compilation_abort/unsupported_instruction                   |          142 |    100.00% |  __   1 __
  2: compilation_abort/unsupported_instruction/defineclass       |           16 |     11.27% |    11.27% |  __   2 __
  3: compilation_abort/unsupported_instruction/getinlinecache    |          122 |     85.92% |    85.92% |  __   3 __
  4: compilation_abort/unsupported_instruction/opt_case_dispatch |            3 |      2.11% |     2.11% |  __   4 __
  5: compilation_abort/unsupported_instruction/opt_newarray_min  |            1 |      0.70% |     0.70% |  __   5 __
mgaudet commented 7 years ago

I have a preliminary implementation of the reverse opcode, however, until #42 is resolved, I probably won't commit it -- I have essentially no evidence it works, because I don't currently know how to get it generated.

That implementation, for reference though, is here.