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

Side by Side Diff: tests/language/deopt_inlined_function_test.dart

Issue 10963027: Use the inner deoptimization frame when setting incoming arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Names Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 // Test deoptimization caused by running code that did not collect type
5 // feedback before.
6
7 class A {
8 deopt_here() => 1;
9 }
10
11 class B {
12 deopt_here() => 2;
13 }
14
15 var obj = new A();
16
17 bar(x) {
18 x = 42;
19 obj.deopt_here();
20 return x;
21 }
22
23 foo(x) {
24 x = bar(x);
25 return x;
26 }
27
28 main() {
29 Expect.equals(42, foo(1));
30 for (var i = 0; i < 2000; i++) foo(7);
31 Expect.equals(42, foo(2));
32 obj = new B();
33 Expect.equals(42, foo(3));
34 }
OLDNEW
« runtime/vm/flow_graph_compiler.cc ('K') | « runtime/vm/flow_graph_compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698