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

Issue 2504553003: [es6] Perform the IsConstructor test in GetSuperConstructor. (Closed)

Created:
4 years, 1 month ago by Henrique Ferreiro
Modified:
4 years ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[es6] Perform the IsConstructor test in GetSuperConstructor. This is so that a NotSuperConstructor error is thrown before evaluating the arguments to the super constructor. Besides updating the runtime function, a new bytecode GetSuperConstructor is introduced. BUG=v8:5336 Review-Url: https://codereview.chromium.org/2504553003 Cr-Commit-Position: refs/heads/master@{#41788} Committed: https://chromium.googlesource.com/v8/v8/+/815f91c0ed7bd602246feeb0edcdf01633dbd914

Patch Set 1 #

Patch Set 2 : Convert GetSuperConstructor to a new interpreter bytecode #

Total comments: 30

Patch Set 3 : address comments #

Total comments: 11

Patch Set 4 : fix runtime function argument type #

Total comments: 5

Patch Set 5 : Fix assembler and add unittest #

Total comments: 4

Patch Set 6 : nits #

Patch Set 7 : rebased #

Patch Set 8 : update bytecode_expectations #

Patch Set 9 : Fix IsNull call #

Total comments: 2

Patch Set 10 : fix failing tests #

Patch Set 11 : fix bytecode_expectations #

Patch Set 12 : rebase and git cl format #

Total comments: 1

Patch Set 13 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -40 lines) Patch
M src/builtins/builtins.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M src/builtins/builtins-object.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +12 lines, -0 lines 0 comments Download
M src/code-factory.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M src/code-factory.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M src/code-stub-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -0 lines 0 comments Download
M src/code-stub-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +37 lines, -0 lines 0 comments Download
M src/compiler/bytecode-graph-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -0 lines 0 comments Download
M src/compiler/js-generic-lowering.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -0 lines 0 comments Download
M src/compiler/js-operator.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/js-operator.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/linkage.cc View 1 2 2 chunks +0 lines, -2 lines 0 comments Download
M src/compiler/opcodes.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/operator-properties.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/typer.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/verifier.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-array-builder.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -5 lines 0 comments Download
M src/interpreter/bytecodes.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M src/interpreter/interpreter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +13 lines, -0 lines 0 comments Download
M src/messages.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime/runtime-classes.cc View 1 2 3 4 5 6 7 8 9 3 chunks +49 lines, -3 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden View 1 2 3 4 5 6 8 9 2 chunks +6 lines, -6 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ForOf.golden View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/Generators.golden View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +6 lines, -6 lines 0 comments Download
M test/test262/test262.status View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -3 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-builder-unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M test/webkit/class-syntax-call.js View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M test/webkit/class-syntax-call-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M test/webkit/class-syntax-extends.js View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M test/webkit/class-syntax-extends-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M test/webkit/class-syntax-super.js View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M test/webkit/class-syntax-super-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 63 (38 generated)
Henrique Ferreiro
4 years, 1 month ago (2016-11-15 09:54:27 UTC) #2
Henrique Ferreiro
I converted GetSuperConstructor to a bytecode, as discussed in the bug report. I did by ...
4 years, 1 month ago (2016-11-21 13:29:37 UTC) #4
caitp
https://codereview.chromium.org/2504553003/diff/20001/src/code-stub-assembler.cc File src/code-stub-assembler.cc (right): https://codereview.chromium.org/2504553003/diff/20001/src/code-stub-assembler.cc#newcode7821 src/code-stub-assembler.cc:7821: Node* map = LoadMap(active_function); I would add a CSA_ASSERT() ...
4 years, 1 month ago (2016-11-21 13:52:54 UTC) #5
caitp
https://codereview.chromium.org/2504553003/diff/20001/src/builtins/builtins-object.cc File src/builtins/builtins-object.cc (right): https://codereview.chromium.org/2504553003/diff/20001/src/builtins/builtins-object.cc#newcode1025 src/builtins/builtins-object.cc:1025: Node* object = assembler->Parameter(Descriptor::kObject); if `object` is an Smi, ...
4 years ago (2016-11-22 23:30:34 UTC) #6
caitp
https://codereview.chromium.org/2504553003/diff/20001/src/builtins/builtins-object.cc File src/builtins/builtins-object.cc (right): https://codereview.chromium.org/2504553003/diff/20001/src/builtins/builtins-object.cc#newcode1021 src/builtins/builtins-object.cc:1021: void Builtins::Generate_GetSuperConstructor(CodeStubAssembler* assembler) { It looks like this should ...
4 years ago (2016-11-22 23:42:04 UTC) #7
Benedikt Meurer
Very nice. First round of comments. Adding Ross for the interpreter review (Ross, please check ...
4 years ago (2016-11-23 04:51:01 UTC) #11
rmcilroy
Interpreter looks good overall. Couple of suggestions. https://codereview.chromium.org/2504553003/diff/20001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/2504553003/diff/20001/src/interpreter/bytecode-array-builder.cc#newcode209 src/interpreter/bytecode-array-builder.cc:209: Output(Bytecode::kGetSuperConstructor); This ...
4 years ago (2016-11-23 21:55:38 UTC) #12
Henrique Ferreiro
https://codereview.chromium.org/2504553003/diff/20001/src/builtins/builtins-object.cc File src/builtins/builtins-object.cc (right): https://codereview.chromium.org/2504553003/diff/20001/src/builtins/builtins-object.cc#newcode1025 src/builtins/builtins-object.cc:1025: Node* object = assembler->Parameter(Descriptor::kObject); On 2016/11/22 at 23:30:34, caitp ...
4 years ago (2016-12-01 12:22:23 UTC) #13
Benedikt Meurer
https://codereview.chromium.org/2504553003/diff/20001/src/builtins/builtins-object.cc File src/builtins/builtins-object.cc (right): https://codereview.chromium.org/2504553003/diff/20001/src/builtins/builtins-object.cc#newcode1025 src/builtins/builtins-object.cc:1025: Node* object = assembler->Parameter(Descriptor::kObject); Yep. https://codereview.chromium.org/2504553003/diff/20001/src/builtins/builtins.h File src/builtins/builtins.h (right): ...
4 years ago (2016-12-01 13:11:51 UTC) #14
Henrique Ferreiro
I think I have addressed all comments. Can/should I remove the runtime function? I noticed ...
4 years ago (2016-12-08 13:18:01 UTC) #15
Benedikt Meurer
Nice, thanks for the hard work! Looking good. https://codereview.chromium.org/2504553003/diff/40001/src/code-stub-assembler.cc File src/code-stub-assembler.cc (right): https://codereview.chromium.org/2504553003/diff/40001/src/code-stub-assembler.cc#newcode5304 src/code-stub-assembler.cc:5304: GotoUnless(IsConstructorMap(callable_map), ...
4 years ago (2016-12-08 18:42:24 UTC) #16
Henrique Ferreiro
I had to cope with the constructor passed to the runtime function being an Oddball ...
4 years ago (2016-12-09 13:24:28 UTC) #17
Benedikt Meurer
Thanks a lot. Next round of comments. https://codereview.chromium.org/2504553003/diff/40001/src/code-stub-assembler.cc File src/code-stub-assembler.cc (right): https://codereview.chromium.org/2504553003/diff/40001/src/code-stub-assembler.cc#newcode5304 src/code-stub-assembler.cc:5304: GotoUnless(IsConstructorMap(callable_map), &return_runtime); ...
4 years ago (2016-12-09 18:30:28 UTC) #18
Henrique Ferreiro
Uploaded a new revision. Added code to AllBytecodesGenerated unittest that was failing.
4 years ago (2016-12-12 12:12:28 UTC) #19
Benedikt Meurer
Awesome, thank you for iterating this! LGTM once comments are addressed. https://codereview.chromium.org/2504553003/diff/80001/src/code-stub-assembler.cc File src/code-stub-assembler.cc (right): ...
4 years ago (2016-12-12 18:18:19 UTC) #20
rmcilroy
Interpreter LGTM with a nit. https://codereview.chromium.org/2504553003/diff/80001/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc (right): https://codereview.chromium.org/2504553003/diff/80001/src/interpreter/interpreter.cc#newcode1700 src/interpreter/interpreter.cc:1700: // GetSuperConstructor nit - ...
4 years ago (2016-12-12 19:43:19 UTC) #21
Henrique Ferreiro
I'm getting this from mjsunit/es6/classes-lazy-parsing: # Fatal error in ../../src/compiler/verifier.cc, line 84 # TypeError: node ...
4 years ago (2016-12-14 12:39:04 UTC) #36
Benedikt Meurer
On 2016/12/14 12:39:04, hferreiro wrote: > I'm getting this from mjsunit/es6/classes-lazy-parsing: > > # Fatal ...
4 years ago (2016-12-14 18:27:16 UTC) #37
Henrique Ferreiro
https://codereview.chromium.org/2504553003/diff/160001/src/messages.h File src/messages.h (right): https://codereview.chromium.org/2504553003/diff/160001/src/messages.h#newcode345 src/messages.h:345: T(NotSuperConstructor, "Super constructor % of % is not a ...
4 years ago (2016-12-16 10:47:58 UTC) #38
Benedikt Meurer
https://codereview.chromium.org/2504553003/diff/160001/src/messages.h File src/messages.h (right): https://codereview.chromium.org/2504553003/diff/160001/src/messages.h#newcode345 src/messages.h:345: T(NotSuperConstructor, "Super constructor % of % is not a ...
4 years ago (2016-12-16 10:48:38 UTC) #41
Henrique Ferreiro
https://codereview.chromium.org/2504553003/diff/220001/src/builtins/builtins.h File src/builtins/builtins.h (right): https://codereview.chromium.org/2504553003/diff/220001/src/builtins/builtins.h#newcode714 src/builtins/builtins.h:714: TFJ(TypedArrayPrototypeValues, 0) This change was made by git cl ...
4 years ago (2016-12-16 11:47:25 UTC) #48
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/2504553003/220001
4 years ago (2016-12-16 13:22:45 UTC) #55
commit-bot: I haz the power
Failed to apply patch for src/builtins/builtins.h: While running git apply --index -p1; error: patch failed: ...
4 years ago (2016-12-16 13:26:36 UTC) #57
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/2504553003/240001
4 years ago (2016-12-19 09:41:32 UTC) #60
commit-bot: I haz the power
4 years ago (2016-12-19 10:12:29 UTC) #63
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://chromium.googlesource.com/v8/v8/+/815f91c0ed7bd602246feeb0edcdf01633d...

Powered by Google App Engine
This is Rietveld 408576698