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

Issue 2632503003: [runtime] Allocate space for computed property names (Closed)

Created:
3 years, 11 months ago by Franzi
Modified:
3 years, 11 months ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[runtime] Allocate space for computed property names. Allocate space in the backing store for computed property names. The property backing store was pre-allocated for the constant properties up to the first non-constant (computed name) property. To use lowering for storing data properties in literals with computed property names effectively, a fast store is needed, i.e., available space in the property backing store for properties with computed names. backing_store_size is the number of all properties (including computed names, but without __proto__) that is calculated in the ast and passed to the runtime function that allocates the property backing store. backing_store_size and constant_properties constitute a BoilerplateDescription. backing_store_size might be slightly too high because computed names can evaluate to the same name, but that should be a rare case so over-allocating is OK. If a property is __proto__, we don't store it as a regular property, because the map changes. Keep track of has_seen_proto in the parser to calculate the backing store size correctly. BUG=v8:5625 Review-Url: https://codereview.chromium.org/2632503003 Cr-Commit-Position: refs/heads/master@{#42576} Committed: https://chromium.googlesource.com/v8/v8/+/399f36b5185deafa263def840d8f98bb61ff3ab4

Patch Set 1 #

Patch Set 2 : Allow Uninitialized keys. #

Patch Set 3 : Count total number of properties. #

Patch Set 4 : Fix evaluation order warning. #

Patch Set 5 : Hide last slot with number in ConstantProperties class. #

Patch Set 6 : Delete comments. #

Patch Set 7 : Rebase. #

Patch Set 8 : Fix some variable names. #

Total comments: 16

Patch Set 9 : Address review comments. #

Patch Set 10 : Rebase. #

Patch Set 11 : Fix typo. #

Total comments: 1

Patch Set 12 : Do not store size if it can be computed. #

Patch Set 13 : Comments and reorder. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -45 lines) Patch
M src/ast/ast.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +12 lines, -5 lines 0 comments Download
M src/ast/ast.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -3 lines 0 comments Download
M src/compiler/access-info.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/js-native-context-specialization.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M src/factory.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -0 lines 0 comments Download
M src/factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +25 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +24 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +39 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +10 lines, -4 lines 0 comments Download
M src/parsing/preparser.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime/runtime-literals.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +36 lines, -29 lines 0 comments Download

Messages

Total messages: 76 (60 generated)
Franzi
Hi Toon, Could you have a look? I'm not super happy with that hack of ...
3 years, 11 months ago (2017-01-16 16:56:48 UTC) #21
gsathya
https://codereview.chromium.org/2632503003/diff/140001/src/ast/ast.cc File src/ast/ast.cc (right): https://codereview.chromium.org/2632503003/diff/140001/src/ast/ast.cc#newcode627 src/ast/ast.cc:627: isolate->factory()->NewNumberFromInt(total_properties_); total_properties_ can be calculated using the above for ...
3 years, 11 months ago (2017-01-17 18:31:39 UTC) #27
Franzi
https://codereview.chromium.org/2632503003/diff/140001/src/ast/ast.cc File src/ast/ast.cc (right): https://codereview.chromium.org/2632503003/diff/140001/src/ast/ast.cc#newcode627 src/ast/ast.cc:627: isolate->factory()->NewNumberFromInt(total_properties_); On 2017/01/17 18:31:39, gsathya wrote: > total_properties_ can ...
3 years, 11 months ago (2017-01-17 19:08:45 UTC) #28
gsathya
On 2017/01/17 19:08:45, Franzi wrote: > https://codereview.chromium.org/2632503003/diff/140001/src/ast/ast.cc > File src/ast/ast.cc (right): > > https://codereview.chromium.org/2632503003/diff/140001/src/ast/ast.cc#newcode627 > ...
3 years, 11 months ago (2017-01-17 19:25:57 UTC) #29
Toon Verwaest
I actually do like that it's passed in like that, given that it's nicely abstracted ...
3 years, 11 months ago (2017-01-18 08:49:53 UTC) #30
Toon Verwaest
So yes, what sathya says :)
3 years, 11 months ago (2017-01-18 09:50:54 UTC) #31
Franzi
https://codereview.chromium.org/2632503003/diff/140001/src/ast/ast.cc File src/ast/ast.cc (right): https://codereview.chromium.org/2632503003/diff/140001/src/ast/ast.cc#newcode587 src/ast/ast.cc:587: Handle<FixedArray> constant_properties = isolate->factory()->NewFixedArray( On 2017/01/18 08:49:53, Toon Verwaest ...
3 years, 11 months ago (2017-01-18 14:23:11 UTC) #41
gsathya
nice! https://codereview.chromium.org/2632503003/diff/220001/src/runtime/runtime-literals.cc File src/runtime/runtime-literals.cc (right): https://codereview.chromium.org/2632503003/diff/220001/src/runtime/runtime-literals.cc#newcode21 src/runtime/runtime-literals.cc:21: int number_of_properties = Just something to keep in ...
3 years, 11 months ago (2017-01-18 17:48:18 UTC) #44
Franzi
Hi Toon, I changed the BoilerplateDescription. Now it doesn't contain the backing store size, if ...
3 years, 11 months ago (2017-01-19 22:52:49 UTC) #56
marja
ast/* & parsing/* LGTM, but you'll still need owners for the other parts
3 years, 11 months ago (2017-01-20 14:38:44 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2632503003/280001
3 years, 11 months ago (2017-01-20 14:48:53 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/32989)
3 years, 11 months ago (2017-01-20 14:52:24 UTC) #67
Franzi
Hi Michael, Can you review the compiler changes in this CL for me? Thanks, Franzi
3 years, 11 months ago (2017-01-20 14:56:18 UTC) #69
Benedikt Meurer
LGTM on compiler.
3 years, 11 months ago (2017-01-20 18:12:53 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2632503003/280001
3 years, 11 months ago (2017-01-20 18:39:15 UTC) #73
commit-bot: I haz the power
3 years, 11 months ago (2017-01-20 18:48:03 UTC) #76
Message was sent while issue was closed.
Committed patchset #13 (id:280001) as
https://chromium.googlesource.com/v8/v8/+/399f36b5185deafa263def840d8f98bb61f...

Powered by Google App Engine
This is Rietveld 408576698