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

Unified Diff: lib/runtime/dart/_internal.js

Issue 1099333002: canonicalize const (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/runtime/dart/_interceptors.js ('k') | lib/runtime/dart/_js_helper.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_internal.js
diff --git a/lib/runtime/dart/_internal.js b/lib/runtime/dart/_internal.js
index 9e495e55c7baaf08db81b11baec4584694314a5c..7c4af2ab9a89546883434565a19a896e49a2e273 100644
--- a/lib/runtime/dart/_internal.js
+++ b/lib/runtime/dart/_internal.js
@@ -510,7 +510,7 @@ var _internal;
ExpandIterator(iterator, f) {
this[_iterator] = iterator;
this[_f] = f;
- this[_currentExpansion] = new (EmptyIterator$(T))();
+ this[_currentExpansion] = dart.const(new (EmptyIterator$(T))());
this[_current] = null;
}
[_nextExpansion]() {}
@@ -757,7 +757,7 @@ var _internal;
super.IterableBase();
}
get [core.$iterator]() {
- return new (EmptyIterator$(E))();
+ return dart.const(new (EmptyIterator$(E))());
}
[core.$forEach](action) {}
get [core.$isEmpty]() {
@@ -814,7 +814,7 @@ var _internal;
return this;
}
[core.$map](f) {
- return new EmptyIterable();
+ return dart.const(new EmptyIterable());
}
[core.$reduce](combine) {
throw IterableElementError.noElement();
@@ -1899,7 +1899,7 @@ var _internal;
return new core.RegExp(`^(?:${Symbol.operatorRE}$|${Symbol.identifierRE}(?:=?$|[.](?!$)))+?$`);
}
});
- let POWERS_OF_TEN = /* Unimplemented const */[1.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0, 10000000000.0, 100000000000.0, 1000000000000.0, 10000000000000.0, 100000000000000.0, 1000000000000000.0, 10000000000000000.0, 100000000000000000.0, 1000000000000000000.0, 10000000000000000000.0, 100000000000000000000.0, 1e+21, 1e+22];
+ let POWERS_OF_TEN = dart.const([1.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0, 10000000000.0, 100000000000.0, 1000000000000.0, 10000000000000.0, 100000000000000.0, 1000000000000000.0, 10000000000000000.0, 100000000000000000.0, 1000000000000000000.0, 10000000000000000000.0, 100000000000000000000.0, 1e+21, 1e+22]);
// Exports:
exports.EfficientLength = EfficientLength;
exports.ListIterable$ = ListIterable$;
« no previous file with comments | « lib/runtime/dart/_interceptors.js ('k') | lib/runtime/dart/_js_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698