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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart

Issue 2747513003: Inline source maps as part of each script. (Closed)
Patch Set: Inline source maps as part of each script. Created 3 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 unified diff | Download patch
« no previous file with comments | « pkg/dev_compiler/tool/build_sdk.sh ('k') | pkg/dev_compiler/web/stack_trace_mapper.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// This library defines the association between runtime objects and 5 /// This library defines the association between runtime objects and
6 /// runtime types. 6 /// runtime types.
7 part of dart._runtime; 7 part of dart._runtime;
8 8
9 /// Runtime type information. This module defines the mapping from 9 /// Runtime type information. This module defines the mapping from
10 /// runtime objects to their runtime type information. See the types 10 /// runtime objects to their runtime type information. See the types
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 void tagComputed(value, compute) { 201 void tagComputed(value, compute) {
202 JS('', '#(#, #, { get: # })', defineProperty, value, _runtimeType, compute); 202 JS('', '#(#, #, { get: # })', defineProperty, value, _runtimeType, compute);
203 } 203 }
204 204
205 void tagLazy(value, compute) { 205 void tagLazy(value, compute) {
206 JS('', '#(#, #, { get: # })', defineLazyProperty, value, _runtimeType, 206 JS('', '#(#, #, { get: # })', defineLazyProperty, value, _runtimeType,
207 compute); 207 compute);
208 } 208 }
209 209
210 var _loadedModules = JS('', 'new Map()'); 210 var _loadedModules = JS('', 'new Map()');
211 var _loadedSourceMaps = JS('', 'new Map()');
211 212
212 List getModuleNames() { 213 List getModuleNames() {
213 return JS('', 'Array.from(#.keys())', _loadedModules); 214 return JS('', 'Array.from(#.keys())', _loadedModules);
214 } 215 }
215 216
217 String getSourceMap(module) {
218 return JS('String', '#.get(#)', _loadedSourceMaps, module);
219 }
220
216 /// Return all library objects in the specified module. 221 /// Return all library objects in the specified module.
217 getModuleLibraries(String name) { 222 getModuleLibraries(String name) {
218 var module = JS('', '#.get(#)', _loadedModules, name); 223 var module = JS('', '#.get(#)', _loadedModules, name);
219 if (module == null) return null; 224 if (module == null) return null;
220 JS('', '#[#] = #', module, _moduleName, name); 225 JS('', '#[#] = #', module, _moduleName, name);
221 return module; 226 return module;
222 } 227 }
223 228
224 /// Track all libraries 229 /// Track all libraries
225 void trackLibraries(String moduleName, libraries) { 230 void trackLibraries(String moduleName, libraries, sourceMap) {
231 JS('', '#.set(#, #)', _loadedSourceMaps, moduleName, sourceMap);
226 JS('', '#.set(#, #)', _loadedModules, moduleName, libraries); 232 JS('', '#.set(#, #)', _loadedModules, moduleName, libraries);
227 } 233 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/tool/build_sdk.sh ('k') | pkg/dev_compiler/web/stack_trace_mapper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698