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

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

Issue 10702167: Fix bug in recompilation handling. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 5 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
« no previous file with comments | « lib/compiler/implementation/ssa/optimize.dart ('k') | no next file » | 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 (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
5 // Dart test program to test type-based optimization on fields.
6
7 class A {
8 int a = 0;
9 int b = 0;
10 foo() {
11 var c = b + 27;
12 for (var i = 0; i < 1 ; i++) {
13 for (var j = 0; j < 1; j++) {
14 Expect.equals(50, c + 23);
15 }
16 }
17 return a > 0.2;
18 }
19 setA(value) { a = value; }
20 setB(value) { b = value; }
21 operator >(other) => other === 0.2;
22 }
23
24 main() {
25 var a = new A();
26 Expect.isFalse(a.foo());
27 a.setA(new A());
28 a.setB(0);
29 Expect.isTrue(a.foo());
30 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/optimize.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698