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

Issue 1226123010: Represent implicit 'this' binding by 'super' in AST. (Closed)

Created:
5 years, 5 months ago by Michael Starzinger
Modified:
5 years, 5 months ago
Reviewers:
rossberg, adamk
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Represent implicit 'this' binding by 'super' in AST. This makes the implicit initializing assignment to 'this' performed after a super constructor call explicit in the AST. It removes the need to handle the special case where a CallExpression behaves like a AssignmentExpression from various AstVisitor implementations. R=rossberg@chromium.org Committed: https://crrev.com/07dc66dcd5d9bc266915d67142425dd92e1373ad Cr-Commit-Position: refs/heads/master@{#29705}

Patch Set 1 #

Patch Set 2 : Fix strong mode. #

Total comments: 2

Patch Set 3 : Addressed comments. #

Patch Set 4 : Ported to all architectures. #

Patch Set 5 : Added test coverage. #

Total comments: 2

Patch Set 6 : Addressed comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -212 lines) Patch
M src/arm/full-codegen-arm.cc View 1 2 3 7 chunks +17 lines, -23 lines 0 comments Download
M src/arm64/full-codegen-arm64.cc View 1 2 3 7 chunks +16 lines, -22 lines 0 comments Download
M src/ast.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M src/ast.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 4 chunks +3 lines, -9 lines 0 comments Download
M src/compiler/ast-loop-assignment-analyzer.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M src/full-codegen.h View 1 chunk +0 lines, -3 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 7 chunks +16 lines, -23 lines 0 comments Download
M src/mips/full-codegen-mips.cc View 1 2 3 7 chunks +17 lines, -23 lines 0 comments Download
M src/mips64/full-codegen-mips64.cc View 1 2 3 7 chunks +17 lines, -23 lines 0 comments Download
M src/ppc/full-codegen-ppc.cc View 1 2 3 7 chunks +17 lines, -23 lines 0 comments Download
M src/preparser.h View 1 6 chunks +33 lines, -6 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 3 7 chunks +16 lines, -22 lines 0 comments Download
M src/x87/full-codegen-x87.cc View 1 2 3 7 chunks +16 lines, -23 lines 0 comments Download
M test/mjsunit/harmony/super.js View 1 2 3 4 5 7 chunks +14 lines, -7 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 13 (3 generated)
Michael Starzinger
Andreas: PTAL. Adam: FYI.
5 years, 5 months ago (2015-07-16 10:55:29 UTC) #2
rossberg
lgtm https://codereview.chromium.org/1226123010/diff/20001/src/ast.cc File src/ast.cc (right): https://codereview.chromium.org/1226123010/diff/20001/src/ast.cc#newcode62 src/ast.cc:62: bool Expression::IsVariableProxyOrProperty() const { I have a slight ...
5 years, 5 months ago (2015-07-16 11:50:48 UTC) #3
rossberg
Actually, it seems like we have zero test coverage for checking the return value of ...
5 years, 5 months ago (2015-07-16 11:58:17 UTC) #4
Michael Starzinger
https://codereview.chromium.org/1226123010/diff/20001/src/ast.cc File src/ast.cc (right): https://codereview.chromium.org/1226123010/diff/20001/src/ast.cc#newcode62 src/ast.cc:62: bool Expression::IsVariableProxyOrProperty() const { On 2015/07/16 11:50:48, rossberg wrote: ...
5 years, 5 months ago (2015-07-16 12:46:19 UTC) #5
Michael Starzinger
Ported to all architectures and added test coverage.
5 years, 5 months ago (2015-07-16 13:28:55 UTC) #6
rossberg
lgtm https://codereview.chromium.org/1226123010/diff/80001/test/mjsunit/harmony/super.js File test/mjsunit/harmony/super.js (right): https://codereview.chromium.org/1226123010/diff/80001/test/mjsunit/harmony/super.js#newcode1983 test/mjsunit/harmony/super.js:1983: derivedCalled++; Nit: any reason to separate the computation ...
5 years, 5 months ago (2015-07-16 13:30:59 UTC) #7
Michael Starzinger
https://codereview.chromium.org/1226123010/diff/80001/test/mjsunit/harmony/super.js File test/mjsunit/harmony/super.js (right): https://codereview.chromium.org/1226123010/diff/80001/test/mjsunit/harmony/super.js#newcode1983 test/mjsunit/harmony/super.js:1983: derivedCalled++; On 2015/07/16 13:30:58, rossberg wrote: > Nit: any ...
5 years, 5 months ago (2015-07-16 13:40:15 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1226123010/100001
5 years, 5 months ago (2015-07-16 13:44:12 UTC) #11
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 5 months ago (2015-07-16 14:26:26 UTC) #12
commit-bot: I haz the power
5 years, 5 months ago (2015-07-16 14:26:40 UTC) #13
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/07dc66dcd5d9bc266915d67142425dd92e1373ad
Cr-Commit-Position: refs/heads/master@{#29705}

Powered by Google App Engine
This is Rietveld 408576698