mozilla / pluotsorbet

[ARCHIVED] PluotSorbet is a J2ME-compatible virtual machine written in JavaScript.
GNU General Public License v2.0
237 stars 46 forks source link

Inline simple getters. #1222

Open brendandahl opened 9 years ago

brendandahl commented 9 years ago

Inline simple getters such as:

int foo() {
  return this.bar;
}

I have a WIP patch for this in https://github.com/brendandahl/j2me.js/tree/inline-getter

I'm putting this off for a bit until I try out building a class hierarchy on startup so we can determine if more things are statically bound. It's also currently hard to do analysis in the AOT because we don't load overrides(more issues to come on this).

brendandahl commented 9 years ago

I did more work on general purpose inlining. On desktop I saw no startup time changes and on device startup time was worse. A SHA256 bench did show a speedup from 850ms to 450ms though.

https://github.com/brendandahl/j2me.js/tree/inline