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

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

Issue 1143953004: Fixes for sunflower (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rediff against https://codereview.chromium.org/1154213008/ Created 5 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
« no previous file with comments | « no previous file | lib/runtime/dart_runtime.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_js_helper.js
diff --git a/lib/runtime/dart/_js_helper.js b/lib/runtime/dart/_js_helper.js
index ec660ff06b55022c87bf61f76c2490063497e223..3fb411a0d2d91793dd9bca8c837836d7660b7519 100644
--- a/lib/runtime/dart/_js_helper.js
+++ b/lib/runtime/dart/_js_helper.js
@@ -1893,7 +1893,7 @@ var _isolate_helper = dart.lazyImport(_isolate_helper);
}
static parseInt(source, radix, handleError) {
if (handleError == null)
- handleError = dart.as(Primitives._throwFormatException, __CastType0);
+ handleError = dart.fn(s => dart.as(Primitives._throwFormatException(dart.as(s, core.String)), core.int), core.int, [core.Object]);
vsm 2015/05/28 15:49:57 It's interesting we need the cast to String here.
Leaf 2015/05/28 15:53:20 Yes, this is on my to do list. It requires better
checkString(source);
let match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source);
let digitsIndex = 1;
@@ -1945,7 +1945,7 @@ var _isolate_helper = dart.lazyImport(_isolate_helper);
static parseDouble(source, handleError) {
checkString(source);
if (handleError == null)
- handleError = dart.as(Primitives._throwFormatException, __CastType2);
+ handleError = dart.fn(s => dart.as(Primitives._throwFormatException(dart.as(s, core.String)), core.double), core.double, [core.Object]);
if (!/^\s*[+-]?(?:Infinity|NaN|(?:\.\d+|\d+(?:\.\d*)?)(?:[eE][+-]?\d+)?)\s*$/.test(source)) {
return handleError(source);
}
@@ -4154,8 +4154,6 @@ var _isolate_helper = dart.lazyImport(_isolate_helper);
throw new MainError("'main' expects too many parameters.");
}
dart.fn(mainHasTooManyParameters, dart.void, []);
- let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.int, [core.String]));
- let __CastType2 = dart.typedef('__CastType2', () => dart.functionType(core.double, [core.String]));
// Exports:
exports.NoSideEffects = NoSideEffects;
exports.NoThrows = NoThrows;
« no previous file with comments | « no previous file | lib/runtime/dart_runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698