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

Issue 2445333002: Ensure slow properties for simple {__proto__:null} literals. (Closed)

Created:
4 years, 1 month ago by Camillo Bruni
Modified:
3 years, 7 months ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

[runtime] Ensure slow properties for simple {__proto__:null} literals. With this CL we reduce the difference between directly using a null prototype in a literal or using Object.create(null). - The EmitFastCloneShallowObject builtin now supports cloning slow object boilerplates. - Unified behavior to find the matching Map and instantiating it for Object.create(null) and literals with a null prototype. - Cleanup of literal type parameter of CompileTimeValue, now in sync with ObjectLiteral flags. Review-Url: https://codereview.chromium.org/2445333002 Cr-Commit-Position: refs/heads/master@{#44941} Committed: https://chromium.googlesource.com/v8/v8/+/3f73fecb132457ba66b1cfbd04a025b33ffef3b7

Patch Set 1 #

Total comments: 6

Patch Set 2 : cleanup and addressing nits #

Patch Set 3 : case matters #

Patch Set 4 : enabling the feature I implement might help pass the test, yes. #

Patch Set 5 : updating bytecode expectations #

Patch Set 6 : rebasing #

Patch Set 7 : rebase #

Patch Set 8 : unify Object.create and __proto__:null literals #

Patch Set 9 : updated bytecode expectations #

Total comments: 3

Patch Set 10 : addressing nits #

Total comments: 18

Patch Set 11 : addressing nits adding inital slow map with Object.prototype #

Patch Set 12 : improve tests #

Patch Set 13 : proper null-proto check with computed property names present #

Patch Set 14 : cleanup InitDepthAndFlags and remove unused kHasRestProperty flag #

Patch Set 15 : flag change => update bytecode expectations #

Patch Set 16 : rebase #

Patch Set 17 : do not use in-object properties for initial dict-mode maps #

Patch Set 18 : fixing typo #

Total comments: 7

Patch Set 19 : merge with master #

Patch Set 20 : supporting dict-mode literals for up to 6 properties #

Patch Set 21 : use fast clone stub #

Patch Set 22 : typos #

Patch Set 23 : Merge branch 'master' into 2016-10-25_object_literal_null_proto_dict_mode_2445333002 #

Patch Set 24 : addressing comments #

Patch Set 25 : Merge branch 'master' into 2016-10-25_object_literal_null_proto_dict_mode_2445333002 #

Patch Set 26 : fix merge artifacts #

Patch Set 27 : minor cleanup #

Total comments: 6

Patch Set 28 : addressing comments #

Total comments: 1

Patch Set 29 : addressing comments #

Patch Set 30 : fixing compilation issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1564 lines, -331 lines) Patch
M src/ast/ast.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 9 chunks +40 lines, -17 lines 0 comments Download
M src/ast/ast.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 7 chunks +32 lines, -26 lines 0 comments Download
M src/ast/compile-time-value.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +8 lines, -7 lines 0 comments Download
M src/ast/compile-time-value.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +8 lines, -12 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 2 chunks +21 lines, -14 lines 0 comments Download
M src/builtins/builtins-constructor-gen.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +28 lines, -7 lines 0 comments Download
M src/code-stub-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +1 line, -0 lines 0 comments Download
M src/code-stub-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +15 lines, -0 lines 0 comments Download
M src/contexts.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +2 lines, -0 lines 0 comments Download
M src/factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +6 lines, -3 lines 0 comments Download
M src/factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 3 chunks +26 lines, -15 lines 0 comments Download
M src/interpreter/bytecode-flags.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +2 lines, -2 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +5 lines, -1 line 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 2 chunks +7 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 2 chunks +16 lines, -3 lines 0 comments Download
M src/parsing/parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -1 line 0 comments Download
M src/parsing/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -1 line 0 comments Download
M src/runtime/runtime-literals.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 6 chunks +50 lines, -66 lines 0 comments Download
M src/runtime/runtime-object.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +5 lines, -11 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CallAndSpread.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +5 lines, -5 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CallRuntime.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CountOperators.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ForIn.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ForOf.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +3 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/Generators.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/NewAndSpread.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +5 lines, -5 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 5 chunks +9 lines, -13 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -2 lines 0 comments Download
M test/mjsunit/object-literal.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +1250 lines, -101 lines 0 comments Download

Messages

Total messages: 96 (79 generated)
Camillo Bruni
PTAL First attempt: I hope this is not too hacky.
4 years, 1 month ago (2016-10-25 09:57:36 UTC) #2
Toon Verwaest
What about %HaveSameMap({__proto__:null}, Object.create(null)) ?
4 years, 1 month ago (2016-10-25 11:10:10 UTC) #4
adamk
https://codereview.chromium.org/2445333002/diff/1/src/ast/ast.h File src/ast/ast.h (right): https://codereview.chromium.org/2445333002/diff/1/src/ast/ast.h#newcode1425 src/ast/ast.h:1425: if (is_simple() || properties_count() != 0) return false; I ...
4 years, 1 month ago (2016-10-25 11:14:24 UTC) #5
Camillo Bruni
PTAL again. I revived this and fixed missing parts. https://codereview.chromium.org/2445333002/diff/1/src/ast/ast.h File src/ast/ast.h (right): https://codereview.chromium.org/2445333002/diff/1/src/ast/ast.h#newcode1425 src/ast/ast.h:1425: ...
3 years, 9 months ago (2017-03-13 17:21:44 UTC) #30
adamk
AST stuff looks good to me, but Toon will be a better reviewer for the ...
3 years, 9 months ago (2017-03-13 18:10:44 UTC) #33
Toon Verwaest
https://codereview.chromium.org/2445333002/diff/180001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/2445333002/diff/180001/src/bootstrapper.cc#newcode608 src/bootstrapper.cc:608: *slow_object_with_null_prototype_map); This already exists? https://codereview.chromium.org/2445333002/diff/180001/src/builtins/builtins-constructor.cc File src/builtins/builtins-constructor.cc (right): https://codereview.chromium.org/2445333002/diff/180001/src/builtins/builtins-constructor.cc#newcode743 ...
3 years, 9 months ago (2017-03-14 13:27:48 UTC) #35
Camillo Bruni
PTAL again https://codereview.chromium.org/2445333002/diff/160001/src/ast/ast.h File src/ast/ast.h (right): https://codereview.chromium.org/2445333002/diff/160001/src/ast/ast.h#newcode1358 src/ast/ast.h:1358: return value()->IsNullLiteral(); On 2017/03/13 at 18:10:44, adamk ...
3 years, 9 months ago (2017-03-17 16:40:55 UTC) #50
Toon Verwaest
https://codereview.chromium.org/2445333002/diff/340001/src/ast/ast.cc File src/ast/ast.cc (right): https://codereview.chromium.org/2445333002/diff/340001/src/ast/ast.cc#newcode555 src/ast/ast.cc:555: if (!IsBoilerplateProperty(property)) { This is actually just property->IsPrototype(). The ...
3 years, 9 months ago (2017-03-20 14:47:11 UTC) #53
Camillo Bruni
PTAL again https://codereview.chromium.org/2445333002/diff/340001/src/ast/ast.cc File src/ast/ast.cc (right): https://codereview.chromium.org/2445333002/diff/340001/src/ast/ast.cc#newcode555 src/ast/ast.cc:555: if (!IsBoilerplateProperty(property)) { On 2017/03/20 at 14:47:11, ...
3 years, 8 months ago (2017-04-26 11:54:46 UTC) #68
Toon Verwaest
lgtm https://codereview.chromium.org/2445333002/diff/520001/src/factory.cc File src/factory.cc (right): https://codereview.chromium.org/2445333002/diff/520001/src/factory.cc#newcode2681 src/factory.cc:2681: // Ignoring number_of_properties for force dictionary map with ...
3 years, 8 months ago (2017-04-26 12:28:15 UTC) #69
adamk
I'm mostly deferring to Toon on the code, so this lgtm from my point of ...
3 years, 8 months ago (2017-04-26 18:48:15 UTC) #72
Camillo Bruni
https://codereview.chromium.org/2445333002/diff/520001/src/ast/compile-time-value.h File src/ast/compile-time-value.h (right): https://codereview.chromium.org/2445333002/diff/520001/src/ast/compile-time-value.h#newcode20 src/ast/compile-time-value.h:20: static const int kArrayLiteralFlag = -1; On 2017/04/26 at ...
3 years, 7 months ago (2017-04-27 09:39:41 UTC) #76
Toon Verwaest
https://codereview.chromium.org/2445333002/diff/540001/src/runtime/runtime-literals.cc File src/runtime/runtime-literals.cc (right): https://codereview.chromium.org/2445333002/diff/540001/src/runtime/runtime-literals.cc#newcode37 src/runtime/runtime-literals.cc:37: handle(native_context->slow_object_with_null_prototype_map(), isolate); map = isolate->slow_object_with_null_prototype_map() should work or just: ...
3 years, 7 months ago (2017-04-27 10:27:17 UTC) #79
Camillo Bruni
3 years, 7 months ago (2017-04-27 12:08:38 UTC) #81
mythria
lgtm on interpreter
3 years, 7 months ago (2017-04-27 12:36:04 UTC) #88
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/2445333002/580001
3 years, 7 months ago (2017-04-27 14:44:17 UTC) #93
commit-bot: I haz the power
3 years, 7 months ago (2017-04-27 14:48:43 UTC) #96
Message was sent while issue was closed.
Committed patchset #30 (id:580001) as
https://chromium.googlesource.com/v8/v8/+/3f73fecb132457ba66b1cfbd04a025b33ff...

Powered by Google App Engine
This is Rietveld 408576698