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

Side by Side Diff: compiler/javatests/com/google/dart/compiler/backend/js/testUnaryDecIncExprOpt.dart

Issue 9479013: Remove backends. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More clean up Created 8 years, 9 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) 2011, 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 class Main {
6 static void main(int _marker_3) {
7 int _marker_0 = 0;
8
9 // Ensure that ++_marker_0 remains ++_marker_0 on simple assignment
10 int i = ++_marker_0;
11
12 // Ensure that _marker_1++ remains _marker_1++ when used in a for loop
13 for (int _marker_1 = 0; _marker_1 < 10; _marker_1++) {
14 }
15
16 // Ensure that --_marker_0 remains --_marker_0 on simple assignment
17 int j = --_marker_0;
18
19 // Ensure that _marker_2-- remains _marker_2-- when used in a for loop
20 for (int _marker_2 = 10; _marker_2 >= 0; _marker_2--) {
21 }
22
23 // Ensure that parameter _marker_3 remains as _marker_3++
24 _marker_3++;
25
26 // Ensure that parameter _marker_3 remains as --_marker_3
27 --_marker_3;
28
29 // Ensure binary op is inlined (variable).
30 int _marker_4;
31 i = ~_marker_4;
32
33 // Ensure binary op is inlined (parameter).
34 i = ~_marker_3;
35
36 // Ensure binary op is inlined (field).
37 A a = new A();
38 i = ~a.field_0;
39
40 // Ensure untyped operand is not inlined
41 var foo;
42 int _marker_5;
43 _marker_5 = ~foo;
44
45 // Ensure binary op is not inlined (abstract field).
46 A aa = new B();
47 i = ++aa.field_1;
48
49 // Ensure binary op is not inlined (abstract field).
50 A aaa = new B();
51 i = ++aaa.field_2;
52 }
53 }
54
55 class A {
56 A() { }
57 int field_0;
58 int field_1;
59 int field_2;
60 }
61
62 class B extends A {
63 B() : super() { }
64 int get field_1() { }
65 set field_2(x) { }
66 }
67
68 main() {
69 Main.main(0);
70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698