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

Issue 1358423002: [es6] Introduce spec compliant IsConstructor. (Closed)

Created:
5 years, 3 months ago by Benedikt Meurer
Modified:
5 years, 3 months ago
Reviewers:
Jarin, rossberg, paul.l...
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[es6] Introduce spec compliant IsConstructor. There was already a bit on the Map named "function with prototype", which basically meant that the Map was a map for a JSFunction that could be used as a constructor. Now this CL generalizes that bit to IsConstructor, which says that whatever (Heap)Object you are looking at can be used as a constructor (i.e. the bit is also set for bound functions that can be used as constructors and proxies that have a [[Construct]] internal method). This way we have a single chokepoint for IsConstructor checking, which allows us to get rid of the various ways in which we tried to guess whether something could be used as a constructor or not. Drive-by-fix: Renamed IsConstructor on FunctionKind to IsClassConstructor to resolve the weird name clash, and the IsClassConstructor name also matches the spec. CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg R=jarin@chromium.org, rossberg@chromium.org BUG=v8:4413, v8:4430 LOG=n Committed: https://crrev.com/8de4d9351df4cf66c8a128d561a6e331d196be54 Cr-Commit-Position: refs/heads/master@{#30900} Committed: https://crrev.com/8fe3ac07014ce5891be0a1cbd8019e9f3b02ff0b Cr-Commit-Position: refs/heads/master@{#30902}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address comment #

Total comments: 1

Patch Set 3 : Fix stupid fuzzer failure (constructor bit set on sloppy/strict arguments). Fix MIPS/MIPS64 typos, … #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -225 lines) Patch
M src/accessors.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/api-natives.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/arm/builtins-arm.cc View 1 2 2 chunks +39 lines, -24 lines 0 comments Download
M src/arm64/builtins-arm64.cc View 1 2 2 chunks +38 lines, -23 lines 0 comments Download
M src/bootstrapper.cc View 1 2 5 chunks +3 lines, -5 lines 0 comments Download
M src/builtins.h View 2 chunks +3 lines, -0 lines 0 comments Download
M src/contexts.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/factory.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M src/globals.h View 1 chunk +1 line, -1 line 0 comments Download
M src/hydrogen.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 1 2 2 chunks +38 lines, -23 lines 0 comments Download
M src/ic/ic.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/mips/builtins-mips.cc View 1 2 2 chunks +41 lines, -26 lines 0 comments Download
M src/mips64/builtins-mips64.cc View 1 2 2 chunks +41 lines, -26 lines 0 comments Download
M src/objects.h View 1 2 6 chunks +10 lines, -8 lines 0 comments Download
M src/objects.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/objects-debug.cc View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M src/objects-inl.h View 4 chunks +15 lines, -9 lines 0 comments Download
M src/objects-printer.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/parser.cc View 1 2 5 chunks +6 lines, -7 lines 0 comments Download
M src/preparser.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/preparser.cc View 4 chunks +5 lines, -6 lines 0 comments Download
M src/runtime/runtime-classes.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/runtime/runtime-function.cc View 3 chunks +9 lines, -25 lines 0 comments Download
M src/runtime/runtime-object.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M src/scopes.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/scopes.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/x64/builtins-x64.cc View 1 2 2 chunks +39 lines, -24 lines 0 comments Download

Messages

Total messages: 33 (10 generated)
Benedikt Meurer
5 years, 3 months ago (2015-09-23 07:40:27 UTC) #1
Benedikt Meurer
Andreas: Please check language aspects. Jaro: Please check builtins. Thanks, Benedikt
5 years, 3 months ago (2015-09-23 07:41:21 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1358423002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1358423002/1
5 years, 3 months ago (2015-09-23 07:41:36 UTC) #4
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 3 months ago (2015-09-23 07:41:38 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1358423002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1358423002/1
5 years, 3 months ago (2015-09-23 07:42:56 UTC) #8
Jarin
lgtm. awesome!
5 years, 3 months ago (2015-09-23 08:00:18 UTC) #9
rossberg
LGTM modulo nits https://codereview.chromium.org/1358423002/diff/1/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1358423002/diff/1/src/bootstrapper.cc#newcode490 src/bootstrapper.cc:490: map->set_is_constructor(IsFunctionModeWithPrototype(function_mode)); Should IsFunctionModeWithPrototype also be renamed? ...
5 years, 3 months ago (2015-09-23 08:56:11 UTC) #10
Benedikt Meurer
https://codereview.chromium.org/1358423002/diff/1/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1358423002/diff/1/src/bootstrapper.cc#newcode490 src/bootstrapper.cc:490: map->set_is_constructor(IsFunctionModeWithPrototype(function_mode)); Maybe, but I'd do that in a separate ...
5 years, 3 months ago (2015-09-23 09:38:15 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1358423002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1358423002/20001
5 years, 3 months ago (2015-09-23 09:38:33 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_layout_dbg on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_layout_dbg/builds/1669)
5 years, 3 months ago (2015-09-23 11:41:29 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1358423002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1358423002/20001
5 years, 3 months ago (2015-09-24 03:59:01 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 3 months ago (2015-09-24 04:00:30 UTC) #19
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/8de4d9351df4cf66c8a128d561a6e331d196be54 Cr-Commit-Position: refs/heads/master@{#30900}
5 years, 3 months ago (2015-09-24 04:00:48 UTC) #20
Benedikt Meurer
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/1360403002/ by bmeurer@chromium.org. ...
5 years, 3 months ago (2015-09-24 05:26:19 UTC) #21
paul.l...
https://codereview.chromium.org/1358423002/diff/20001/src/mips/builtins-mips.cc File src/mips/builtins-mips.cc (right): https://codereview.chromium.org/1358423002/diff/20001/src/mips/builtins-mips.cc#newcode1688 src/mips/builtins-mips.cc:1688: __ lw(t1, FieldMemOperand(t1, HeapObject::kMapOffset)); Benedikt - looks like this ...
5 years, 3 months ago (2015-09-24 05:28:21 UTC) #23
Benedikt Meurer
On 2015/09/24 05:28:21, paul.l... wrote: > https://codereview.chromium.org/1358423002/diff/20001/src/mips/builtins-mips.cc > File src/mips/builtins-mips.cc (right): > > https://codereview.chromium.org/1358423002/diff/20001/src/mips/builtins-mips.cc#newcode1688 > ...
5 years, 3 months ago (2015-09-24 05:29:03 UTC) #24
paul.l...
On 2015/09/24 05:29:03, Benedikt Meurer wrote: > Aye, will fix that, thanks. Already found the ...
5 years, 3 months ago (2015-09-24 05:31:34 UTC) #25
Benedikt Meurer
On 2015/09/24 05:31:34, paul.l... wrote: > On 2015/09/24 05:29:03, Benedikt Meurer wrote: > > Aye, ...
5 years, 3 months ago (2015-09-24 05:31:57 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1358423002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1358423002/40001
5 years, 3 months ago (2015-09-24 05:34:52 UTC) #29
paul.l...
The fix passes check. As you will see soon enough :-)
5 years, 3 months ago (2015-09-24 05:44:03 UTC) #30
Benedikt Meurer
On 2015/09/24 05:44:03, paul.l... wrote: > The fix passes check. As you will see soon ...
5 years, 3 months ago (2015-09-24 05:54:29 UTC) #31
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 3 months ago (2015-09-24 06:50:11 UTC) #32
commit-bot: I haz the power
5 years, 3 months ago (2015-09-24 06:50:26 UTC) #33
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/8fe3ac07014ce5891be0a1cbd8019e9f3b02ff0b
Cr-Commit-Position: refs/heads/master@{#30902}

Powered by Google App Engine
This is Rietveld 408576698