• sgjesse@chromium.org's avatar
    Analyze functions for assignment to this properties. · 4e03645d
    sgjesse@chromium.org authored
    During parsing functions are analyzed for statements of the form this.x = ...;. These assignments are categorized in two types: simple and non simple. The simple ones are where the right hand side is known to be either a constant or an argument to the function. If a function only contains statements of this type the property names are collected and for the simple assignments the index of the argument or the constant value assigned are stored as well.
    
    When the initial map for a function is created and the function consists of only this type of assignemnts the initial map is created with a descriptor array describing these properties which will be known to always exist in an object created from the function.
    
    The information on this property assignments is not collected during pre-parsing so if compiling using pre-parse data these optimization hints are not available.
    
    Next step will be to use the information collected for the simple assignments to generate constructor code which will create and initialize the object from this information without calling the code for the function.
    Review URL: http://codereview.chromium.org/172088
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    4e03645d
Name
Last commit
Last update
benchmarks Loading commit data...
include Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
ChangeLog Loading commit data...
LICENSE Loading commit data...
SConstruct Loading commit data...