Bug 130755 - Repatch should inline trivial getters into the stub by doing pattern recognition to realize that it will behave trivially
Summary: Repatch should inline trivial getters into the stub by doing pattern recognit...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks: 129588
  Show dependency treegraph
 
Reported: 2014-03-25 16:26 PDT by Filip Pizlo
Modified: 2014-03-25 16:26 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2014-03-25 16:26:13 PDT
If you have a getter like:

    function() { return this._f; }

Then inside the getter stub we know the structure of 'this' - because we just checked it - so we can inspect what _f is and if it's a simple field then we can prove that the outcome of executing this function is exactly equivalent to just loading the field from 'this'.

The only hard parts are:

- Proving that the getter is what you thought it was.  The structure doesn't tell you that so this will be an extra check.

- Inspecting the getter to recognize this pattern.  This should hopefully be relatively easy.