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 1386253002: Use Scope::function_kind_ to distinguish arrow function scopes (Closed)

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

Description

Use Scope::function_kind_ to distinguish arrow function scopes Previously, arrow function scopes had a separate ScopeType. However, Scope::DeserializeScopeChain() erroneously deserialized ARROW_SCOPE ScopeInfos as FUNCTION_SCOPE. This could lead to bugs such as the attached one, where "super" was disallowed where it should have been allowed. This patch utilizes the Scope's FunctionKind to distinguish arrow functions from others. Besides fixing the above bug, this also simplifies code in various places that had to deal with two different ScopeTypes both of which meant "function". BUG=v8:4466 LOG=n Committed: https://crrev.com/24565b859869f8867059b7120f27a25d785f2850 Cr-Commit-Position: refs/heads/master@{#31154}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -25 lines) Patch
M src/debug/debug-scopes.cc View 3 chunks +2 lines, -5 lines 0 comments Download
M src/globals.h View 1 chunk +1 line, -2 lines 0 comments Download
M src/parser.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/preparser.h View 2 chunks +2 lines, -4 lines 0 comments Download
M src/preparser.cc View 1 chunk +1 line, -2 lines 0 comments Download
M src/scopeinfo.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/scopes.h View 1 chunk +4 lines, -4 lines 0 comments Download
M src/scopes.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 chunk +2 lines, -2 lines 0 comments Download
A test/mjsunit/es6/regress/regress-4466.js View 1 chunk +26 lines, -0 lines 2 comments Download

Messages

Total messages: 11 (2 generated)
adamk
5 years, 2 months ago (2015-10-06 22:10:29 UTC) #1
adamk
+bmeurer for debug/OWNERS.
5 years, 2 months ago (2015-10-06 22:11:28 UTC) #3
Dan Ehrenberg
lgtm LGTM modulo testing. Which usage site was the one that wasn't working according to ...
5 years, 2 months ago (2015-10-07 00:25:41 UTC) #4
adamk
The broken usage site was in Scope::ReceiverScope (as mentioned in the bug). In particular, it's ...
5 years, 2 months ago (2015-10-07 00:34:31 UTC) #5
Dan Ehrenberg
lgtm
5 years, 2 months ago (2015-10-07 00:42:59 UTC) #6
Benedikt Meurer
LGTM on debug
5 years, 2 months ago (2015-10-07 03:39:06 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1386253002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1386253002/1
5 years, 2 months ago (2015-10-07 14:54:17 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 2 months ago (2015-10-07 14:55:50 UTC) #10
commit-bot: I haz the power
5 years, 2 months ago (2015-10-07 14:55:57 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/24565b859869f8867059b7120f27a25d785f2850
Cr-Commit-Position: refs/heads/master@{#31154}

Powered by Google App Engine
This is Rietveld 408576698