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

Issue 1130733003: 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
CC:
v8-dev, Yang, Michael Starzinger, balazs.kilvady
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>;. BUG=v8:2700 LOG=N Committed: https://crrev.com/06a792b7cc2db33ffce7244c044a9c05afbb6116 Cr-Commit-Position: refs/heads/master@{#28263}

Patch Set 1 #

Patch Set 2 : Add mips/mips64. Fix expectation in nosnap deserialization test. Fix scratch regiser use on x64. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -120 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 1 3 chunks +7 lines, -5 lines 0 comments Download
M src/mips/lithium-codegen-mips.cc View 1 2 chunks +5 lines, -4 lines 0 comments Download
M src/mips64/full-codegen-mips64.cc View 1 3 chunks +7 lines, -5 lines 0 comments Download
M src/mips64/lithium-codegen-mips64.cc View 1 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 5 chunks +37 lines, -29 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 1 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 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

Messages

Total messages: 8 (2 generated)
wingo
This is a reapplication of https://codereview.chromium.org/1097283003. The first patch is just the rebased original patch. ...
5 years, 7 months ago (2015-05-06 13:13:34 UTC) #2
rossberg
lgtm
5 years, 7 months ago (2015-05-06 13:17:05 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1130733003/20001
5 years, 7 months ago (2015-05-06 13:34:46 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 7 months ago (2015-05-06 14:18:10 UTC) #6
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/06a792b7cc2db33ffce7244c044a9c05afbb6116 Cr-Commit-Position: refs/heads/master@{#28263}
5 years, 7 months ago (2015-05-06 14:18:23 UTC) #7
Michael Achenbach
5 years, 7 months ago (2015-05-07 07:20:13 UTC) #8
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.chromium.org/1129723003/ by machenbach@chromium.org.

The reason for reverting is: [Sheriff] Breaks jetstream benchmark with errors
like this:

>>> Running suite: JetStream/bigfib.cpp
>>> Stdout (#1):
undefined:93: ReferenceError: this is not defined
  this['Module'] = Module;
  ^
ReferenceError: this is not defined
    at eval (eval at __run (runner.js:13:3), <anonymous>:93:3)
    at eval (native)
    at __run (runner.js:13:3)
    at Object.runSimpleBenchmark (runner.js:44:31)
    at runner.js:97:13.

Powered by Google App Engine
This is Rietveld 408576698