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

Side by Side Diff: test/mjsunit/deopt-with-outer-context.js

Issue 1604923002: [Interpreter] Always store current context in the frames context slot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_fix_block_context_scope
Patch Set: Rebase Created 4 years, 11 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 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
6
7 function outer(y) {
8 function inner() {
9 var x = 10;
10 (function() {
11 // Access x from inner function to force it to be context allocated.
12 x = 20;
13 %DeoptimizeFunction(inner);
14 })();
15 // Variable y should be read from the outer context.
16 return y;
17 };
18 %OptimizeFunctionOnNextCall(inner);
19 return inner();
20 }
21
22 assertEquals(30, outer(30));
OLDNEW
« no previous file with comments | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | test/unittests/compiler/interpreter-assembler-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698