Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Issue 172088: Analyze functions for assignment to this properties (Closed)

Created:
11 years, 4 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Analyze functions for assignment to this properties. 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. Committed: http://code.google.com/p/v8/source/detail?r=2710

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 34

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+547 lines, -40 lines) Patch
M src/ast.h View 1 2 5 chunks +20 lines, -0 lines 0 comments Download
M src/codegen.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/heap.cc View 1 2 6 chunks +40 lines, -13 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M src/objects.h View 1 2 6 chunks +50 lines, -2 lines 0 comments Download
M src/objects.cc View 1 2 2 chunks +44 lines, -0 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 chunks +10 lines, -3 lines 0 comments Download
M src/objects-inl.h View 1 2 6 chunks +33 lines, -1 line 0 comments Download
M src/parser.cc View 1 2 11 chunks +252 lines, -19 lines 0 comments Download
M src/runtime.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/v8-counters.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/x64/builtins-x64.cc View 1 2 2 chunks +6 lines, -1 line 0 comments Download
A test/mjsunit/simple-constructor.js View 1 chunk +78 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Søren Thygesen Gjesse
11 years, 4 months ago (2009-08-18 11:36:32 UTC) #1
Mads Ager (chromium)
LGTM http://codereview.chromium.org/172088/diff/1003/42 File src/ast.h (right): http://codereview.chromium.org/172088/diff/1003/42#newcode1243 Line 1243: has_only_simple_this_property_assignments_( Shouldn't you initialize |has_only_this_property_assignments| as well? ...
11 years, 4 months ago (2009-08-18 12:36:23 UTC) #2
Søren Thygesen Gjesse
Sorry for all the spelling mistakes. http://codereview.chromium.org/172088/diff/1003/42 File src/ast.h (right): http://codereview.chromium.org/172088/diff/1003/42#newcode1243 Line 1243: has_only_simple_this_property_assignments_( On ...
11 years, 4 months ago (2009-08-19 07:26:50 UTC) #3
Søren Thygesen Gjesse
11 years, 4 months ago (2009-08-19 07:28:08 UTC) #4
Sorry about all the spelling mistakes.

Powered by Google App Engine
This is Rietveld 408576698