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

Issue 1136073002: Resolve references to "this" the same way as normal variables (Closed)

Created:
5 years, 7 months ago by wingo
Modified:
5 years, 7 months ago
Reviewers:
rossberg
CC:
v8-dev, Yang, arv (Not doing code reviews), Dmitry Lomov (no reviews)
Base URL:
https://chromium.googlesource.com/v8/v8@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Resolve references to "this" the same way as normal variables Make the parser handle references to "this" as unresolved variables, so the same logic as for the rest of function parameters is used for the receiver. Minor additions to the code generation handle copying the receiver to the context, along with the rest of the function parameters. Based on work by Adrian Perez de Castro <aperez@igalia.com>;. This is a reapplication of https://codereview.chromium.org/1130733003. R=rossberg@chromium.org BUG=v8:2700 LOG=N Committed: https://crrev.com/bd56d279b612f92d2d1d25f92d32fe7f42a455ca Cr-Commit-Position: refs/heads/master@{#28340}

Patch Set 1 #

Patch Set 2 : "this" should never be looked up dynamically #

Unified diffs Side-by-side diffs Delta from patch set Stats (+324 lines, -128 lines) Patch
M src/arm/full-codegen-arm.cc View 3 chunks +7 lines, -5 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M src/arm64/full-codegen-arm64.cc View 3 chunks +7 lines, -5 lines 0 comments Download
M src/arm64/lithium-codegen-arm64.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M src/compiler/ast-graph-builder.h View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/ast-graph-builder.cc View 3 chunks +44 lines, -11 lines 0 comments Download
M src/contexts.cc View 1 chunk +7 lines, -2 lines 0 comments Download
M src/heap/heap.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M src/mips/full-codegen-mips.cc View 3 chunks +7 lines, -5 lines 0 comments Download
M src/mips/lithium-codegen-mips.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M src/mips64/full-codegen-mips64.cc View 3 chunks +7 lines, -5 lines 0 comments Download
M src/mips64/lithium-codegen-mips64.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M src/parser.cc View 6 chunks +14 lines, -9 lines 0 comments Download
M src/runtime/runtime-debug.cc View 1 chunk +13 lines, -8 lines 0 comments Download
M src/runtime/runtime-scopes.cc View 3 chunks +17 lines, -3 lines 0 comments Download
M src/scopeinfo.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/scopes.h View 3 chunks +20 lines, -3 lines 0 comments Download
M src/scopes.cc View 1 6 chunks +42 lines, -30 lines 0 comments Download
M src/variables.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 3 chunks +7 lines, -5 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M test/cctest/test-serialize.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/debug-scopes.js View 1 chunk +4 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/arrow-functions-this.js View 1 chunk +81 lines, -0 lines 0 comments Download
M test/mjsunit/testcfg.py View 1 2 chunks +2 lines, -1 line 0 comments Download
A + test/mjsunit/this-dynamic-lookup.js View 1 1 chunk +4 lines, -6 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
wingo
PTAL. Patchset 1 is the original "this" scoping patch as previously applied. Patchset 2 fixes ...
5 years, 7 months ago (2015-05-11 10:22:59 UTC) #1
rossberg
lgtm
5 years, 7 months ago (2015-05-11 10:44:56 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1136073002/20001
5 years, 7 months ago (2015-05-11 11:25:26 UTC) #4
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 7 months ago (2015-05-11 11:49:54 UTC) #5
commit-bot: I haz the power
5 years, 7 months ago (2015-05-11 11:50:08 UTC) #6
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/bd56d279b612f92d2d1d25f92d32fe7f42a455ca
Cr-Commit-Position: refs/heads/master@{#28340}

Powered by Google App Engine
This is Rietveld 408576698