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

Unified Diff: lib/runtime/dart_runtime.js

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 | « lib/runtime/dart/typed_data.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart_runtime.js
diff --git a/lib/runtime/dart_runtime.js b/lib/runtime/dart_runtime.js
index f1c40aa3c1dc9d7240d10cadd9470c0c5fe05fd5..4033e89ccdc78f9e7d21f87f81ca5fe56b721cad 100644
--- a/lib/runtime/dart_runtime.js
+++ b/lib/runtime/dart_runtime.js
@@ -2,11 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// TODO(jmesserly, sigmund): remove these two lines:
-var math = Math;
-var core = core || {int: { parse: Number }, print: e => console.log(e) };
-
-var dart;
+var dart, _js_helper;
(function (dart) {
'use strict';
@@ -307,8 +303,8 @@ var dart;
var resultMap = new Map();
function makeGenericType(/*...arguments*/) {
- if (arguments.length != length) {
- throw 'requires ' + length + ' type arguments';
+ if (arguments.length != length && arguments.length != 0) {
+ throw 'requires ' + length + ' or 0 type arguments';
}
var value = resultMap;
@@ -338,7 +334,14 @@ var dart;
}
dart.generic = generic;
- // TODO(jmesserly): this is just a placeholder.
+ // TODO(jmesserly): right now this is a sentinel. It should be a type object
+ // of some sort, assuming we keep around `dynamic` at runtime.
dart.dynamic = Object.create(null);
+ dart.JsSymbol = Symbol;
+
+ // TODO(jmesserly): hack to bootstrap the SDK
+ _js_helper = _js_helper || {};
+ _js_helper.checkNum = notNull;
+
})(dart || (dart = {}));
« no previous file with comments | « lib/runtime/dart/typed_data.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698