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

Side by Side Diff: test/codegen/expect/cascade.js

Issue 1093353004: fix list initializers (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: baselines Created 5 years, 8 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
« no previous file with comments | « test/codegen/expect/DeltaBlue.js ('k') | test/codegen/expect/html_input.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var cascade; 1 var cascade;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class A extends core.Object { 4 class A extends core.Object {
5 A() { 5 A() {
6 this.x = null; 6 this.x = null;
7 } 7 }
8 } 8 }
9 // Function test_closure_with_mutate: () → void 9 // Function test_closure_with_mutate: () → void
10 function test_closure_with_mutate() { 10 function test_closure_with_mutate() {
(...skipping 30 matching lines...) Expand all
41 function test_mutate_outside_cascade() { 41 function test_mutate_outside_cascade() {
42 let a = null, b = null; 42 let a = null, b = null;
43 a = new A(); 43 a = new A();
44 a.x = b = null; 44 a.x = b = null;
45 a.x = b = null; 45 a.x = b = null;
46 a = null; 46 a = null;
47 core.print(a); 47 core.print(a);
48 } 48 }
49 // Function test_VariableDeclaration_single: () → void 49 // Function test_VariableDeclaration_single: () → void
50 function test_VariableDeclaration_single() { 50 function test_VariableDeclaration_single() {
51 let a = new core.List.from([]); 51 let a = [];
52 a[core.$length] = 2; 52 a[core.$length] = 2;
53 a[core.$add](42); 53 a[core.$add](42);
54 core.print(a); 54 core.print(a);
55 } 55 }
56 // Function test_VariableDeclaration_last: () → void 56 // Function test_VariableDeclaration_last: () → void
57 function test_VariableDeclaration_last() { 57 function test_VariableDeclaration_last() {
58 let a = 42, b = (() => { 58 let a = 42, b = (() => {
59 let _ = new core.List.from([]); 59 let _ = [];
60 _[core.$length] = 2; 60 _[core.$length] = 2;
61 _[core.$add](a); 61 _[core.$add](a);
62 return _; 62 return _;
63 })(); 63 })();
64 core.print(b); 64 core.print(b);
65 } 65 }
66 // Function test_VariableDeclaration_first: () → void 66 // Function test_VariableDeclaration_first: () → void
67 function test_VariableDeclaration_first() { 67 function test_VariableDeclaration_first() {
68 let a = (() => { 68 let a = (() => {
69 let _ = new core.List.from([]); 69 let _ = [];
70 _[core.$length] = 2; 70 _[core.$length] = 2;
71 _[core.$add](3); 71 _[core.$add](3);
72 return _; 72 return _;
73 })(), b = 2; 73 })(), b = 2;
74 core.print(a); 74 core.print(a);
75 } 75 }
76 // Function test_increment: () → void 76 // Function test_increment: () → void
77 function test_increment() { 77 function test_increment() {
78 let a = new A(); 78 let a = new A();
79 let y = ((() => { 79 let y = ((() => {
80 a.x = dart.dsend(a.x, '+', 1); 80 a.x = dart.dsend(a.x, '+', 1);
81 a.x = dart.dsend(a.x, '-', 1); 81 a.x = dart.dsend(a.x, '-', 1);
82 return a; 82 return a;
83 })()); 83 })());
84 } 84 }
85 let Base$ = dart.generic(function(T) { 85 let Base$ = dart.generic(function(T) {
86 class Base extends core.Object { 86 class Base extends core.Object {
87 Base() { 87 Base() {
88 this.x = new core.List$(T).from([]); 88 this.x = dart.setType([], core.List$(T));
89 } 89 }
90 } 90 }
91 return Base; 91 return Base;
92 }); 92 });
93 let Base = Base$(); 93 let Base = Base$();
94 class Foo extends Base$(core.int) { 94 class Foo extends Base$(core.int) {
95 test_final_field_generic(t) { 95 test_final_field_generic(t) {
96 this.x[core.$add](1); 96 this.x[core.$add](1);
97 this.x[core.$add](2); 97 this.x[core.$add](2);
98 this.x[core.$add](3); 98 this.x[core.$add](3);
99 this.x[core.$add](4); 99 this.x[core.$add](4);
100 } 100 }
101 } 101 }
102 // Exports: 102 // Exports:
103 exports.A = A; 103 exports.A = A;
104 exports.test_closure_with_mutate = test_closure_with_mutate; 104 exports.test_closure_with_mutate = test_closure_with_mutate;
105 exports.test_closure_without_mutate = test_closure_without_mutate; 105 exports.test_closure_without_mutate = test_closure_without_mutate;
106 exports.test_mutate_inside_cascade = test_mutate_inside_cascade; 106 exports.test_mutate_inside_cascade = test_mutate_inside_cascade;
107 exports.test_mutate_outside_cascade = test_mutate_outside_cascade; 107 exports.test_mutate_outside_cascade = test_mutate_outside_cascade;
108 exports.test_VariableDeclaration_single = test_VariableDeclaration_single; 108 exports.test_VariableDeclaration_single = test_VariableDeclaration_single;
109 exports.test_VariableDeclaration_last = test_VariableDeclaration_last; 109 exports.test_VariableDeclaration_last = test_VariableDeclaration_last;
110 exports.test_VariableDeclaration_first = test_VariableDeclaration_first; 110 exports.test_VariableDeclaration_first = test_VariableDeclaration_first;
111 exports.test_increment = test_increment; 111 exports.test_increment = test_increment;
112 exports.Base$ = Base$; 112 exports.Base$ = Base$;
113 exports.Base = Base; 113 exports.Base = Base;
114 exports.Foo = Foo; 114 exports.Foo = Foo;
115 })(cascade || (cascade = {})); 115 })(cascade || (cascade = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/DeltaBlue.js ('k') | test/codegen/expect/html_input.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698