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

Side by Side Diff: lib/runtime/dart_runtime.js

Issue 1413683006: Move runtime js files down to lib/runtime/dart (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « lib/runtime/dart/typed_data.js ('k') | lib/runtime/dart_utils.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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/dart', null, /* Imports */[
6 'dart_runtime/_classes',
7 'dart_runtime/_errors',
8 'dart_runtime/_generators',
9 'dart_runtime/_operations',
10 'dart_runtime/_rtti',
11 'dart_runtime/_types',
12 ], /* Lazy Imports */[
13 'dart/_js_helper'
14 ], function(exports, classes, errors, generators, operations, rtti, types,
15 _js_helper) {
16 'use strict';
17
18 function _export(value) {
19 if (value) return value;
20 console.log("Re-exporting null field: " + name);
21 throw "Bad export";
22 }
23
24 function exportFrom(value, names) {
25 for (let name of names) {
26 exports[name] = _export(value[name]);
27 }
28 }
29
30 exports.global = typeof window == "undefined" ? global : window;
31 exports.JsSymbol = _export(Symbol);
32
33 // TODO(vsm): This is referenced (as init.globalState) from
34 // isolate_helper.dart. Where should it go?
35 // See: https://github.com/dart-lang/dev_compiler/issues/164
36 exports.globalState = null;
37 _js_helper.checkNum = operations.notNull;
38
39 // Re-exports
40
41 // From classes
42 exportFrom(classes, [
43 'bind',
44 'classGetConstructorType',
45 'dartx',
46 'defineNamedConstructor',
47 'defineExtensionNames',
48 'defineExtensionMembers',
49 'generic',
50 'implements',
51 'list',
52 'metadata',
53 'mixin',
54 'registerExtension',
55 'setBaseClass',
56 'setSignature',
57 'virtualField'
58 ]);
59
60 exportFrom(generators, [
61 'syncStar',
62 'async',
63 'asyncStar'
64 ]);
65
66 // From dart_utils
67 exportFrom(dart_utils, ['copyProperties', 'export']);
68 // Renames
69 exports.defineLazyClass = _export(dart_utils.defineLazy);
70 exports.defineLazyProperties = _export(dart_utils.defineLazy);
71 exports.defineLazyClassGeneric = _export(dart_utils.defineLazyProperty);
72
73 // From operations
74 exportFrom(operations, [
75 'JsIterator',
76 'arity',
77 'asInt',
78 'assert',
79 'const',
80 'dcall',
81 'dindex',
82 'dload',
83 'dput',
84 'dsend',
85 'dsetindex',
86 'equals',
87 'hashCode',
88 'map',
89 'noSuchMethod',
90 'notNull',
91 'nullSafe',
92 'stackPrint',
93 'stackTrace',
94 'strongInstanceOf',
95 'throw',
96 'toString',
97 ])
98 // Renames
99 exports.as = _export(operations.cast);
100 exports.is = _export(operations.instanceOf);
101
102 // From types
103 exportFrom(types, [
104 'bottom',
105 'definiteFunctionType',
106 'dynamic',
107 'functionType',
108 'jsobject',
109 'typedef',
110 'typeName',
111 'void',
112 ]);
113
114 // From rtti
115 exportFrom(rtti, [
116 'fn',
117 'realRuntimeType',
118 'runtimeType',
119 ]);
120
121 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/typed_data.js ('k') | lib/runtime/dart_utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698