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

Unified Diff: test/codegen/expect/notnull.js

Issue 1964263002: fuse some null checks with type checks, introduce a special bool variant (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 side-by-side diff with in-line comments
Download patch
Index: test/codegen/expect/notnull.js
diff --git a/test/codegen/expect/notnull.js b/test/codegen/expect/notnull.js
index 2bdaa49f4288ee4579c35c8810b4f2f01abf1891..2da1bc134d66f258bfbf26bc63a2394f63773ec3 100644
--- a/test/codegen/expect/notnull.js
+++ b/test/codegen/expect/notnull.js
@@ -155,11 +155,11 @@ dart_library.library('notnull', null, /* Imports */[
this.varField = null;
}
f(o) {
- core.print(1 + dart.notNull(dart.as(this.varField, core.num)) + 2);
- while (dart.notNull(dart.as(dart.dsend(this.varField, '<', 10), core.bool))) {
+ core.print(1 + dart.asNotNull(this.varField, core.num) + 2);
Jennifer Messerly 2016/05/10 23:42:12 `num` and `String` are a couple of other ones I wa
+ while (dart.test(dart.dsend(this.varField, '<', 10))) {
this.varField = dart.dsend(this.varField, '+', 1);
}
- while (dart.notNull(dart.as(dart.dsend(this.varField, '<', 10), core.bool)))
+ while (dart.test(dart.dsend(this.varField, '<', 10)))
this.varField = dart.dsend(this.varField, '+', 1);
core.print(1 + dart.notNull(this.intField) + 2);
while (dart.notNull(this.intField) < 10) {

Powered by Google App Engine
This is Rietveld 408576698