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

Side by Side Diff: test/mjsunit/compiler/osr-block-scope-func.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 | « test/mjsunit/compiler/osr-block-scope.js ('k') | test/mjsunit/compiler/osr-block-scope-id.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 = ret;
18 function ret() {
19 return sum;
20 }
21 }
22 return result;
23 }
24
25 assertEquals(4950, foo()());
26 assertEquals(4950, foo()());
27 assertEquals(4950, foo()());
28
29 function bar() {
30 var result;
31 {
32 let sum = 0;
33 for (let i = 0; i < 90; i++) {
34 sum += i;
35 if (i == 45) %OptimizeOsr();
36 }
37 result = ret;
38 function ret() {
39 return sum;
40 }
41 }
42 return result;
43 }
44
45 assertEquals(4005, bar()());
46 assertEquals(4005, bar()());
47 assertEquals(4005, bar()());
OLDNEW
« no previous file with comments | « test/mjsunit/compiler/osr-block-scope.js ('k') | test/mjsunit/compiler/osr-block-scope-id.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698