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

Issue 220473014: Make stray 'return' an early error (Closed)

Created:
6 years, 8 months ago by rossberg
Modified:
6 years, 8 months ago
Reviewers:
marja
CC:
v8-dev
Visibility:
Public.

Description

Make stray 'return' an early error As required by the spec, and implemented by other browsers. (Plus minor clean-up for redeclaration TypeErrors.) R=marja@chromium.org BUG= LOG=Y Committed: https://code.google.com/p/v8/source/detail?r=20434

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -73 lines) Patch
M src/messages.js View 1 chunk +2 lines, -1 line 0 comments Download
M src/parser.h View 1 chunk +1 line, -2 lines 0 comments Download
M src/parser.cc View 7 chunks +24 lines, -37 lines 0 comments Download
M src/preparser.h View 1 chunk +1 line, -1 line 0 comments Download
M src/preparser.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.cc View 4 chunks +8 lines, -13 lines 2 comments Download
M test/cctest/test-parsing.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M test/mjsunit/debug-stepout-scope-part2.js View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/debug-stepout-scope-part3.js View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/debug-stepout-scope-part4.js View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/debug-stepout-scope-part5.js View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/debug-stepout-scope-part6.js View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/delay-syntax-error.js View 1 chunk +2 lines, -9 lines 0 comments Download
M test/webkit/fast/js/arguments-expected.txt View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
rossberg
6 years, 8 months ago (2014-04-02 12:23:38 UTC) #1
marja
lgtm https://codereview.chromium.org/220473014/diff/1/src/runtime.cc File src/runtime.cc (left): https://codereview.chromium.org/220473014/diff/1/src/runtime.cc#oldcode2205 src/runtime.cc:2205: return ThrowRedeclarationError(isolate, "function", name); Why don't we differentiate ...
6 years, 8 months ago (2014-04-02 12:29:57 UTC) #2
rossberg
https://codereview.chromium.org/220473014/diff/1/src/runtime.cc File src/runtime.cc (left): https://codereview.chromium.org/220473014/diff/1/src/runtime.cc#oldcode2205 src/runtime.cc:2205: return ThrowRedeclarationError(isolate, "function", name); On 2014/04/02 12:29:57, marja wrote: ...
6 years, 8 months ago (2014-04-02 12:34:43 UTC) #3
rossberg
6 years, 8 months ago (2014-04-02 12:38:14 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 manually as r20434 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698