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

Side by Side Diff: test/mjsunit/immutable-context-slot-inlining.js

Issue 2679953003: Reland of Thread maybe-assigned through the bytecodes. (Closed)
Patch Set: Created 3 years, 10 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 2017 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 function h(g) {
8 return g();
9 }
10
11 function f() {
12 var g;
13 for (var i = 0; i < 10; i++) {
14 var y = i;
15 if (i === 5) {
16 g = function() {
17 return y;
18 };
19 assertEquals(5, h(g));
20 assertEquals(5, h(g));
21 %OptimizeFunctionOnNextCall(h);
22 assertEquals(5, h(g));
23 }
24 }
25 return g;
26 }
27
28 var myg = f();
29
30 assertEquals(9, h(myg));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698