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

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

Issue 1074923003: rename dart_runtime.js helpers (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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/BenchmarkBase.js ('k') | test/codegen/expect/methods.js » ('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() {
11 let a = new A(); 11 let a = new A();
12 a.x = () => { 12 a.x = () => {
13 core.print("hi"); 13 core.print("hi");
14 a = null; 14 a = null;
15 }; 15 };
16 let _ = a; 16 let _ = a;
17 dart.dinvoke(_, 'x'); 17 dart.dsend(_, 'x');
18 dart.dinvoke(_, 'x'); 18 dart.dsend(_, 'x');
19 core.print(a); 19 core.print(a);
20 } 20 }
21 // Function test_closure_without_mutate: () → void 21 // Function test_closure_without_mutate: () → void
22 function test_closure_without_mutate() { 22 function test_closure_without_mutate() {
23 let a = new A(); 23 let a = new A();
24 a.x = () => { 24 a.x = () => {
25 core.print(a); 25 core.print(a);
26 }; 26 };
27 dart.dinvoke(a, 'x'); 27 dart.dsend(a, 'x');
28 dart.dinvoke(a, 'x'); 28 dart.dsend(a, 'x');
29 core.print(a); 29 core.print(a);
30 } 30 }
31 // Function test_mutate_inside_cascade: () → void 31 // Function test_mutate_inside_cascade: () → void
32 function test_mutate_inside_cascade() { 32 function test_mutate_inside_cascade() {
33 let a = null; 33 let a = null;
34 let _ = new A(); 34 let _ = new A();
35 _.x = a = null; 35 _.x = a = null;
36 _.x = a = null; 36 _.x = a = null;
37 a = _; 37 a = _;
38 core.print(a); 38 core.print(a);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.dbinary(a.x, '+', 1); 80 a.x = dart.dsend(a.x, '+', 1);
81 a.x = dart.dbinary(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 = new core.List$(T).from([]);
89 } 89 }
90 } 90 }
91 return Base; 91 return Base;
(...skipping 14 matching lines...) Expand all
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/BenchmarkBase.js ('k') | test/codegen/expect/methods.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698