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) { |
Jennifer Messerly
2015/03/19 22:57:34
a previous change allows this to be called with 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 = {})); |