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

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

Issue 1965213003: simplify constructors, fixes #564 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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/misc.js ('k') | test/codegen/expect/opassign.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 dart_library.library('notnull', null, /* Imports */[ 1 dart_library.library('notnull', null, /* Imports */[
2 'dart_sdk' 2 'dart_sdk'
3 ], function(exports, dart_sdk) { 3 ], function(exports, dart_sdk) {
4 'use strict'; 4 'use strict';
5 const core = dart_sdk.core; 5 const core = dart_sdk.core;
6 const dart = dart_sdk.dart; 6 const dart = dart_sdk.dart;
7 const dartx = dart_sdk.dartx; 7 const dartx = dart_sdk.dartx;
8 const notnull = Object.create(null); 8 const notnull = Object.create(null);
9 notnull.intAssignments = function() { 9 notnull.intAssignments = function() {
10 let i = 0; 10 let i = 0;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 x = y; 143 x = y;
144 y = z; 144 y = z;
145 z = x; 145 z = x;
146 core.print(x + y + z); 146 core.print(x + y + z);
147 let s = 1; 147 let s = 1;
148 s = s; 148 s = s;
149 core.print(s + 1); 149 core.print(s + 1);
150 }; 150 };
151 dart.fn(notnull.nonNullableCycle, dart.void, []); 151 dart.fn(notnull.nonNullableCycle, dart.void, []);
152 notnull.Foo = class Foo extends core.Object { 152 notnull.Foo = class Foo extends core.Object {
153 Foo() { 153 new() {
154 this.intField = null; 154 this.intField = null;
155 this.varField = null; 155 this.varField = null;
156 } 156 }
157 f(o) { 157 f(o) {
158 core.print(1 + dart.notNull(dart.as(this.varField, core.num)) + 2); 158 core.print(1 + dart.notNull(dart.as(this.varField, core.num)) + 2);
159 while (dart.test(dart.dsend(this.varField, '<', 10))) { 159 while (dart.test(dart.dsend(this.varField, '<', 10))) {
160 this.varField = dart.dsend(this.varField, '+', 1); 160 this.varField = dart.dsend(this.varField, '+', 1);
161 } 161 }
162 while (dart.test(dart.dsend(this.varField, '<', 10))) 162 while (dart.test(dart.dsend(this.varField, '<', 10)))
163 this.varField = dart.dsend(this.varField, '+', 1); 163 this.varField = dart.dsend(this.varField, '+', 1);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 notnull.localEscapes(); 254 notnull.localEscapes();
255 notnull.controlFlow(); 255 notnull.controlFlow();
256 notnull.cascadesOnNull(); 256 notnull.cascadesOnNull();
257 notnull.nullableCycle(); 257 notnull.nullableCycle();
258 notnull.nonNullableCycle(); 258 notnull.nonNullableCycle();
259 }; 259 };
260 dart.fn(notnull.main); 260 dart.fn(notnull.main);
261 // Exports: 261 // Exports:
262 exports.notnull = notnull; 262 exports.notnull = notnull;
263 }); 263 });
OLDNEW
« no previous file with comments | « test/codegen/expect/misc.js ('k') | test/codegen/expect/opassign.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698