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

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

Issue 1649583002: allow JS builtin to be typed as needed (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | lib/runtime/dart/_isolate_helper.js » ('j') | test/browser/language_tests.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_interceptors.js
diff --git a/lib/runtime/dart/_interceptors.js b/lib/runtime/dart/_interceptors.js
index 598599d6d17e5d87f5b3097de40749a18ac76611..0cc2c7193ca259f1ce7460e8c9a396ee9845c976 100644
--- a/lib/runtime/dart/_interceptors.js
+++ b/lib/runtime/dart/_interceptors.js
@@ -123,7 +123,7 @@ dart_library.library('dart/_interceptors', null, /* Imports */[
[dartx.removeLast]() {
this[dartx.checkGrowable]('removeLast');
if (this[dartx.length] == 0) dart.throw(new core.RangeError.value(-1));
- return dart.as(this.pop(), E);
+ return this.pop();
}
[dartx.remove](element) {
this[dartx.checkGrowable]('remove');
@@ -164,7 +164,7 @@ dart_library.library('dart/_interceptors', null, /* Imports */[
dart.as(f, dart.functionType(dart.void, [E]));
let length = this[dartx.length];
for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) {
- f(dart.as(this[i], E));
+ f(this[i]);
if (length != this[dartx.length]) {
dart.throw(new core.ConcurrentModificationError(this));
}
@@ -353,7 +353,7 @@ dart_library.library('dart/_interceptors', null, /* Imports */[
[dartx.get](index) {
if (!(typeof index == 'number')) dart.throw(new core.ArgumentError(index));
if (dart.notNull(index) >= dart.notNull(this[dartx.length]) || dart.notNull(index) < 0) dart.throw(new core.RangeError.value(index));
- return dart.as(this[index], E);
+ return this[index];
}
[dartx.set](index, value) {
dart.as(value, E);
@@ -975,10 +975,10 @@ dart_library.library('dart/_interceptors', null, /* Imports */[
[dartx.split](pattern) {
_js_helper.checkNull(pattern);
if (typeof pattern == 'string') {
- return dart.as(this.split(pattern), core.List$(core.String));
+ return this.split(pattern);
} else if (dart.is(pattern, _js_helper.JSSyntaxRegExp) && _js_helper.regExpCaptureCount(pattern) == 0) {
let re = _js_helper.regExpGetNative(pattern);
- return dart.as(this.split(re), core.List$(core.String));
+ return this.split(re);
} else {
return this[_defaultSplit](pattern);
}
« no previous file with comments | « no previous file | lib/runtime/dart/_isolate_helper.js » ('j') | test/browser/language_tests.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698