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

Side by Side Diff: test/mjsunit/compiler/osr-block-scope.js

Issue 921083004: [turbofan] Rename context stack as part of the environment for OSR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/compiler/osr.cc ('k') | test/mjsunit/compiler/osr-block-scope-func.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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 --use-osr --turbo-osr
6
7 "use strict";
8
9 function foo() {
10 var result;
11 {
12 let sum = 0;
13 for (var i = 0; i < 100; i++) {
14 if (i == 50) %OptimizeOsr();
15 sum += i;
16 }
17 result = sum;
18 }
19 return result;
20 }
21
22 assertEquals(4950, foo());
23 assertEquals(4950, foo());
24 assertEquals(4950, foo());
25
26 function bar() {
27 var result;
28 {
29 let sum = 0;
30 for (let i = 0; i < 90; i++) {
31 sum += i;
32 if (i == 45) %OptimizeOsr();
33 }
34 result = sum;
35 }
36 return result;
37 }
38
39 assertEquals(4005, bar());
40 assertEquals(4005, bar());
41 assertEquals(4005, bar());
OLDNEW
« no previous file with comments | « src/compiler/osr.cc ('k') | test/mjsunit/compiler/osr-block-scope-func.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698