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

Side by Side Diff: test/mjsunit/regress/regress-599068-func-bindings.js

Issue 1845223006: [Interpreter] Handles legacy constants in strict mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed compound assignments in hydrogen. Updated test as suggested by mstarzinger@ offline. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --allow-natives-syntax
6
7 // Tests function bindings are correctly handled in ignition.
8 (function f() {
Michael Starzinger 2016/04/04 12:02:24 nit: Indentation within this function is off.
mythria 2016/04/11 10:10:05 Done.
9 function assignSloppy() {
10 f = 0;
11 }
12 assertDoesNotThrow(assignSloppy);
13 function assignStrict() {
14 'use strict';
15 f = 0;
16 }
17 assertThrows(assignStrict, TypeError);
18 })();
19
20 // Tests for compound assignments which are handled differently
21 // in crankshaft.
22 (function f() {
23 function assignSloppy() {
24 f += "x";
25 }
26 assertDoesNotThrow(assignSloppy);
27 assertDoesNotThrow(assignSloppy);
28 %OptimizeFunctionOnNextCall(assignSloppy);
29 assertDoesNotThrow(assignSloppy);
30 function assignStrict() {
31 'use strict';
32 f += "x";
33 }
34 assertThrows(assignStrict, TypeError);
35 assertThrows(assignStrict, TypeError);
36 %OptimizeFunctionOnNextCall(assignStrict);
37 assertThrows(assignStrict, TypeError);
38 })();
OLDNEW
« src/interpreter/bytecode-generator.cc ('K') | « src/interpreter/bytecode-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698