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

Side by Side Diff: tests/language/vm/optimized_unique_selector_test.dart

Issue 2498073004: AOT: Fix bug in receiver type propagation after unique selector calls. (Closed)
Patch Set: add test file Created 4 years, 1 month 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 (c) 2013, 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
5 import "package:expect/expect.dart";
6
7 class A {
8 _uniqueSelector() { }
9 final uniqueField = 10;
10 }
11
12 foofoo(obj) {
13 var res = 0;
Vyacheslav Egorov (Google) 2016/11/16 12:55:06 incorrect indentation
Florian Schneider 2016/11/16 17:55:18 Done.
14 for (var i = 0; i < 2; i++) {
15 obj._uniqueSelector();
16 res += obj.uniqueField; // This load must not be hoisted out of the loop.
17 }
18 return res;
19 }
20
21 var foofoo_ = foofoo;
22
23 main () {
24 Expect.equals(20, foofoo_(new A()));
25 Expect.throws(() => foofoo_(0));
26 }
OLDNEW
« runtime/vm/aot_optimizer.cc ('K') | « runtime/vm/flow_graph_range_analysis.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698