| Index: lib/runtime/dart/_runtime.js
|
| diff --git a/lib/runtime/dart/_runtime.js b/lib/runtime/dart/_runtime.js
|
| index 506049d5e5d8deb63a95577feb2df4c2553fbf77..ed2f3cb73136de30d789e0c60502c949a18334de 100644
|
| --- a/lib/runtime/dart/_runtime.js
|
| +++ b/lib/runtime/dart/_runtime.js
|
| @@ -1,122 +1,40 @@
|
| -// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
| -// 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.
|
| -
|
| dart_library.library('dart/_runtime', null, /* Imports */[
|
| - 'dart/_utils',
|
| 'dart/_classes',
|
| - 'dart/_errors',
|
| 'dart/_generators',
|
| 'dart/_operations',
|
| - 'dart/_rtti',
|
| 'dart/_types',
|
| -], /* Lazy Imports */[
|
| - 'dart/_js_helper'
|
| -], function(exports, dart_utils, classes, errors, generators, operations, rtti, types,
|
| - _js_helper) {
|
| + 'dart/_rtti',
|
| + 'dart/_utils'
|
| +], /* Lazy imports */[
|
| +], function(exports, classes, _generators, _operations, _types, rtti, utils) {
|
| 'use strict';
|
| -
|
| - function _export(value) {
|
| - if (value) return value;
|
| - console.log("Re-exporting null field: " + name);
|
| - throw "Bad export";
|
| - }
|
| -
|
| - function exportFrom(value, names) {
|
| - for (let name of names) {
|
| - exports[name] = _export(value[name]);
|
| - }
|
| - }
|
| -
|
| - exports.global = typeof window == "undefined" ? global : window;
|
| - exports.JsSymbol = _export(Symbol);
|
| -
|
| - // TODO(vsm): This is referenced (as init.globalState) from
|
| - // isolate_helper.dart. Where should it go?
|
| - // See: https://github.com/dart-lang/dev_compiler/issues/164
|
| - exports.globalState = null;
|
| - _js_helper.checkNum = operations.notNull;
|
| -
|
| - // Re-exports
|
| -
|
| - // From classes
|
| - exportFrom(classes, [
|
| - 'bind',
|
| - 'classGetConstructorType',
|
| - 'dartx',
|
| - 'defineNamedConstructor',
|
| - 'defineExtensionNames',
|
| - 'defineExtensionMembers',
|
| - 'generic',
|
| - 'implements',
|
| - 'list',
|
| - 'metadata',
|
| - 'mixin',
|
| - 'registerExtension',
|
| - 'setBaseClass',
|
| - 'setSignature',
|
| - 'virtualField'
|
| - ]);
|
| -
|
| - exportFrom(generators, [
|
| - 'syncStar',
|
| - 'async',
|
| - 'asyncStar'
|
| - ]);
|
| -
|
| - // From dart_utils
|
| - exportFrom(dart_utils, ['copyProperties', 'export_']);
|
| - // Renames
|
| - exports.defineLazyClass = _export(dart_utils.defineLazy);
|
| - exports.defineLazyProperties = _export(dart_utils.defineLazy);
|
| - exports.defineLazyClassGeneric = _export(dart_utils.defineLazyProperty);
|
| -
|
| - // From operations
|
| - exportFrom(operations, [
|
| - 'JsIterator',
|
| - 'arity',
|
| - 'asInt',
|
| - 'assert',
|
| - 'const',
|
| - 'dcall',
|
| - 'dindex',
|
| - 'dload',
|
| - 'dput',
|
| - 'dsend',
|
| - 'dsetindex',
|
| - 'equals',
|
| - 'hashCode',
|
| - 'map',
|
| - 'noSuchMethod',
|
| - 'notNull',
|
| - 'nullSafe',
|
| - 'stackPrint',
|
| - 'stackTrace',
|
| - 'strongInstanceOf',
|
| - 'throw',
|
| - 'toString',
|
| - ])
|
| - // Renames
|
| - exports.as = _export(operations.cast);
|
| - exports.is = _export(operations.instanceOf);
|
| -
|
| - // From types
|
| - exportFrom(types, [
|
| - 'bottom',
|
| - 'definiteFunctionType',
|
| - 'dynamic',
|
| - 'functionType',
|
| - 'jsobject',
|
| - 'typedef',
|
| - 'typeName',
|
| - 'void',
|
| - ]);
|
| -
|
| - // From rtti
|
| - exportFrom(rtti, [
|
| - 'fn',
|
| - 'realRuntimeType',
|
| - 'runtimeType',
|
| - ]);
|
| -
|
| + utils.export(exports, classes, ['bind', 'classGetConstructorType', 'dartx', 'defineNamedConstructor', 'defineExtensionNames', 'defineExtensionMembers', 'generic', 'list', 'metadata', 'mixin', 'registerExtension', 'setBaseClass', 'setSignature', 'virtualField'], []);
|
| + utils.export(exports, classes, ['implements'], []);
|
| + utils.export(exports, _generators, ['syncStar', 'asyncStar'], []);
|
| + utils.export(exports, _generators, ['async'], []);
|
| + utils.export(exports, _operations, ['JsIterator', 'arity', 'asInt', 'dcall', 'dindex', 'dload', 'dput', 'dsend', 'dsetindex', 'equals', 'hashCode', 'map', 'noSuchMethod', 'notNull', 'nullSafe', 'stackPrint', 'stackTrace', 'strongInstanceOf', 'toString'], []);
|
| + utils.export(exports, _operations, ['assert'], []);
|
| + utils.export(exports, _operations, ['const'], []);
|
| + utils.export(exports, _operations, ['throw'], []);
|
| + utils.export(exports, _types, ['bottom', 'definiteFunctionType', 'functionType', 'jsobject', 'typedef', 'typeName'], []);
|
| + utils.export(exports, _types, ['dynamic'], []);
|
| + utils.export(exports, _types, ['void'], []);
|
| + utils.export(exports, rtti, ['fn', 'realRuntimeType', 'runtimeType'], []);
|
| + utils.export(exports, utils, ['copyProperties'], []);
|
| + utils.export(exports, utils, ['export'], []);
|
| + const defineLazyClass = utils.defineLazy;
|
| + const defineLazyProperties = utils.defineLazy;
|
| + const defineLazyClassGeneric = utils.defineLazyProperty;
|
| + const as = _operations.cast;
|
| + const is = _operations.instanceOf;
|
| + const global = typeof window == "undefined" ? global : window;
|
| + const JsSymbol = Symbol;
|
| + // Exports:
|
| + exports.defineLazyClass = defineLazyClass;
|
| + exports.defineLazyProperties = defineLazyProperties;
|
| + exports.defineLazyClassGeneric = defineLazyClassGeneric;
|
| + exports.as = as;
|
| + exports.is = is;
|
| + exports.global = global;
|
| + exports.JsSymbol = JsSymbol;
|
| });
|
|
|