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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart

Issue 180843012: Make deferred loading and meta-data play better. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 /** 7 /**
8 * Generates the code for all used classes in the program. Static fields (even 8 * Generates the code for all used classes in the program. Static fields (even
9 * in classes) are ignored, since they can be treated as non-class elements. 9 * in classes) are ignored, since they can be treated as non-class elements.
10 * 10 *
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 1240
1241 jsAst.ObjectInitializer initializers = 1241 jsAst.ObjectInitializer initializers =
1242 descriptor.toObjectInitializer(); 1242 descriptor.toObjectInitializer();
1243 CodeBuffer outputBuffer = 1243 CodeBuffer outputBuffer =
1244 outputBuffers.putIfAbsent(outputUnit, () => new CodeBuffer()); 1244 outputBuffers.putIfAbsent(outputUnit, () => new CodeBuffer());
1245 int sizeBefore = outputBuffer.length; 1245 int sizeBefore = outputBuffer.length;
1246 outputBuffers[outputUnit] 1246 outputBuffers[outputUnit]
1247 ..write('["${library.getLibraryName()}",$_') 1247 ..write('["${library.getLibraryName()}",$_')
1248 ..write('"${uri}",$_') 1248 ..write('"${uri}",$_')
1249 ..write(metadata == null ? "" : jsAst.prettyPrint(metadata, compiler)) 1249 ..write(metadata == null ? "" : jsAst.prettyPrint(metadata, compiler))
1250 ..write(isDeferred ? '[]' : '')
1251 ..write(',$_') 1250 ..write(',$_')
1252 ..write(namer.globalObjectFor(library)) 1251 ..write(namer.globalObjectFor(library))
1253 ..write(',$_') 1252 ..write(',$_')
1254 ..write(jsAst.prettyPrint(initializers, compiler)) 1253 ..write(jsAst.prettyPrint(initializers, compiler))
1255 ..write(library == compiler.mainApp ? ',${n}1' : "") 1254 ..write(library == compiler.mainApp ? ',${n}1' : "")
1256 ..write('],$n'); 1255 ..write('],$n');
1257 int sizeAfter = outputBuffer.length; 1256 int sizeAfter = outputBuffer.length;
1258 compiler.dumpInfoTask.codeSizeCounter 1257 compiler.dumpInfoTask.codeSizeCounter
1259 .countCode(library, sizeAfter - sizeBefore); 1258 .countCode(library, sizeAfter - sizeBefore);
1260 } 1259 }
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 String sourceMap = buildSourceMap(mainBuffer, compiledFile); 1643 String sourceMap = buildSourceMap(mainBuffer, compiledFile);
1645 compiler.outputProvider(name, 'js.map') 1644 compiler.outputProvider(name, 'js.map')
1646 ..add(sourceMap) 1645 ..add(sourceMap)
1647 ..close(); 1646 ..close();
1648 } 1647 }
1649 1648
1650 void registerReadTypeVariable(TypeVariableElement element) { 1649 void registerReadTypeVariable(TypeVariableElement element) {
1651 readTypeVariables.add(element); 1650 readTypeVariables.add(element);
1652 } 1651 }
1653 } 1652 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/deferred_load.dart ('k') | tests/lib/mirrors/deferred_mirrors_metadata_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698