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

Side by Side Diff: lib/runtime/dart/_runtime.js

Issue 1530563003: Generate all runtime files from dart. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Reverted to new .dart files in input_sdk: please compare them against previous patchset Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 dart_library.library('dart/_runtime', null, /* Imports */[ 1 dart_library.library('dart/_runtime', null, /* Imports */[
6 'dart/_utils',
7 'dart/_classes', 2 'dart/_classes',
8 'dart/_errors',
9 'dart/_generators', 3 'dart/_generators',
10 'dart/_operations', 4 'dart/_operations',
5 'dart/_types',
11 'dart/_rtti', 6 'dart/_rtti',
12 'dart/_types', 7 'dart/_utils'
13 ], /* Lazy Imports */[ 8 ], /* Lazy imports */[
14 'dart/_js_helper' 9 ], function(exports, classes, _generators, _operations, _types, rtti, utils) {
15 ], function(exports, dart_utils, classes, errors, generators, operations, rtti, types,
16 _js_helper) {
17 'use strict'; 10 'use strict';
18 11 utils.export(exports, classes, ['bind', 'classGetConstructorType', 'dartx', 'd efineNamedConstructor', 'defineExtensionNames', 'defineExtensionMembers', 'gener ic', 'list', 'metadata', 'mixin', 'registerExtension', 'setBaseClass', 'setSigna ture', 'virtualField'], []);
19 function _export(value) { 12 utils.export(exports, classes, ['implements'], []);
20 if (value) return value; 13 utils.export(exports, _generators, ['syncStar', 'asyncStar'], []);
21 console.log("Re-exporting null field: " + name); 14 utils.export(exports, _generators, ['async'], []);
22 throw "Bad export"; 15 utils.export(exports, _operations, ['JsIterator', 'arity', 'asInt', 'dcall', ' dindex', 'dload', 'dput', 'dsend', 'dsetindex', 'equals', 'hashCode', 'map', 'no SuchMethod', 'notNull', 'nullSafe', 'stackPrint', 'stackTrace', 'strongInstanceO f', 'toString'], []);
23 } 16 utils.export(exports, _operations, ['assert'], []);
24 17 utils.export(exports, _operations, ['const'], []);
25 function exportFrom(value, names) { 18 utils.export(exports, _operations, ['throw'], []);
26 for (let name of names) { 19 utils.export(exports, _types, ['bottom', 'definiteFunctionType', 'functionType ', 'jsobject', 'typedef', 'typeName'], []);
27 exports[name] = _export(value[name]); 20 utils.export(exports, _types, ['dynamic'], []);
28 } 21 utils.export(exports, _types, ['void'], []);
29 } 22 utils.export(exports, rtti, ['fn', 'realRuntimeType', 'runtimeType'], []);
30 23 utils.export(exports, utils, ['copyProperties'], []);
31 exports.global = typeof window == "undefined" ? global : window; 24 utils.export(exports, utils, ['export'], []);
32 exports.JsSymbol = _export(Symbol); 25 const defineLazyClass = utils.defineLazy;
33 26 const defineLazyProperties = utils.defineLazy;
34 // TODO(vsm): This is referenced (as init.globalState) from 27 const defineLazyClassGeneric = utils.defineLazyProperty;
35 // isolate_helper.dart. Where should it go? 28 const as = _operations.cast;
36 // See: https://github.com/dart-lang/dev_compiler/issues/164 29 const is = _operations.instanceOf;
37 exports.globalState = null; 30 const global = typeof window == "undefined" ? global : window;
38 _js_helper.checkNum = operations.notNull; 31 const JsSymbol = Symbol;
39 32 // Exports:
40 // Re-exports 33 exports.defineLazyClass = defineLazyClass;
41 34 exports.defineLazyProperties = defineLazyProperties;
42 // From classes 35 exports.defineLazyClassGeneric = defineLazyClassGeneric;
43 exportFrom(classes, [ 36 exports.as = as;
44 'bind', 37 exports.is = is;
45 'classGetConstructorType', 38 exports.global = global;
46 'dartx', 39 exports.JsSymbol = JsSymbol;
47 'defineNamedConstructor',
48 'defineExtensionNames',
49 'defineExtensionMembers',
50 'generic',
51 'implements',
52 'list',
53 'metadata',
54 'mixin',
55 'registerExtension',
56 'setBaseClass',
57 'setSignature',
58 'virtualField'
59 ]);
60
61 exportFrom(generators, [
62 'syncStar',
63 'async',
64 'asyncStar'
65 ]);
66
67 // From dart_utils
68 exportFrom(dart_utils, ['copyProperties', 'export_']);
69 // Renames
70 exports.defineLazyClass = _export(dart_utils.defineLazy);
71 exports.defineLazyProperties = _export(dart_utils.defineLazy);
72 exports.defineLazyClassGeneric = _export(dart_utils.defineLazyProperty);
73
74 // From operations
75 exportFrom(operations, [
76 'JsIterator',
77 'arity',
78 'asInt',
79 'assert',
80 'const',
81 'dcall',
82 'dindex',
83 'dload',
84 'dput',
85 'dsend',
86 'dsetindex',
87 'equals',
88 'hashCode',
89 'map',
90 'noSuchMethod',
91 'notNull',
92 'nullSafe',
93 'stackPrint',
94 'stackTrace',
95 'strongInstanceOf',
96 'throw',
97 'toString',
98 ])
99 // Renames
100 exports.as = _export(operations.cast);
101 exports.is = _export(operations.instanceOf);
102
103 // From types
104 exportFrom(types, [
105 'bottom',
106 'definiteFunctionType',
107 'dynamic',
108 'functionType',
109 'jsobject',
110 'typedef',
111 'typeName',
112 'void',
113 ]);
114
115 // From rtti
116 exportFrom(rtti, [
117 'fn',
118 'realRuntimeType',
119 'runtimeType',
120 ]);
121
122 }); 40 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698