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

Unified Diff: tool/input_sdk/patch/core_patch.dart

Issue 1020043002: Replace dart_core.js with actual compiled SDK (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merge Created 5 years, 9 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 | « tool/input_sdk/lib/_internal/pub/asset/dart/utils.dart ('k') | tool/patch_sdk.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/patch/core_patch.dart
diff --git a/tool/input_sdk/patch/core_patch.dart b/tool/input_sdk/patch/core_patch.dart
index 29ee7787287406b79905d8f436547aa66d6ec302..c06fd8f82aace62f03d72ff43d32746b370f830d 100644
--- a/tool/input_sdk/patch/core_patch.dart
+++ b/tool/input_sdk/patch/core_patch.dart
@@ -14,6 +14,8 @@ import 'dart:_js_helper' show patch,
stringJoinUnchecked,
objectHashCode;
+import 'dart:_foreign_helper' show JS;
+
String _symbolToString(Symbol symbol) => _symbol_dev.Symbol.getName(symbol);
_symbolMapToStringMap(Map<Symbol, dynamic> map) {
@@ -55,11 +57,11 @@ class Object {
@patch
class Function {
@patch
- static apply(Function function,
+ static apply(Function f,
List positionalArguments,
[Map<Symbol, dynamic> namedArguments]) {
return Primitives.applyFunction(
- function, positionalArguments,
+ f, positionalArguments,
namedArguments == null ? null : _toMangledNames(namedArguments));
}
@@ -115,7 +117,9 @@ class int {
static int parse(String source,
{ int radix,
int onError(String source) }) {
- return Primitives.parseInt(source, radix, onError);
+ // TODO(jmesserly): fix this
+ return JS('int', 'Number(#)', source);
+ //return Primitives.parseInt(source, radix, onError);
}
@patch
@@ -232,7 +236,7 @@ class Stopwatch {
static int _now() => Primitives.timerTicks();
}
-class _ListConstructorSentinel extends JSInt {
+class _ListConstructorSentinel {
const _ListConstructorSentinel();
}
@@ -260,12 +264,16 @@ class List<E> {
@patch
factory List.from(Iterable elements, { bool growable: true }) {
+ // TODO(jmesserly): fix this. This is just to unblock initial SDK check in.
+ return null;
+ /*
List<E> list = new List<E>();
for (E e in elements) {
list.add(e);
}
if (growable) return list;
return makeListFixedLength(list);
+ */
}
}
« no previous file with comments | « tool/input_sdk/lib/_internal/pub/asset/dart/utils.dart ('k') | tool/patch_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698