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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/program_builder.dart

Issue 889643002: dart2js: emit metadata in new emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Metadata must be emitted after constants. Created 5 years, 10 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
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library dart2js.js_emitter.program_builder; 5 library dart2js.js_emitter.program_builder;
6 6
7 import 'js_emitter.dart' show computeMixinClass; 7 import 'js_emitter.dart' show computeMixinClass;
8 import 'model.dart'; 8 import 'model.dart';
9 9
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 _markEagerClasses(); 113 _markEagerClasses();
114 114
115 bool containsNativeClasses = 115 bool containsNativeClasses =
116 nativeClasses.length != _unneededNativeClasses.length; 116 nativeClasses.length != _unneededNativeClasses.length;
117 117
118 return new Program( 118 return new Program(
119 outputs, 119 outputs,
120 _buildLoadMap(), 120 _buildLoadMap(),
121 _buildTypeToInterceptorMap(), 121 _buildTypeToInterceptorMap(),
122 _task.metadataCollector,
122 outputContainsNativeClasses: containsNativeClasses, 123 outputContainsNativeClasses: containsNativeClasses,
123 outputContainsConstantList: _task.outputContainsConstantList); 124 outputContainsConstantList: _task.outputContainsConstantList);
124 } 125 }
125 126
126 void _markEagerClasses() { 127 void _markEagerClasses() {
127 _markEagerInterceptorClasses(); 128 _markEagerInterceptorClasses();
128 } 129 }
129 130
130 /// Builds a map from loadId to outputs-to-load. 131 /// Builds a map from loadId to outputs-to-load.
131 Map<String, List<Fragment>> _buildLoadMap() { 132 Map<String, List<Fragment>> _buildLoadMap() {
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 _registry.registerConstant(outputUnit, constantValue); 590 _registry.registerConstant(outputUnit, constantValue);
590 assert(!_constants.containsKey(constantValue)); 591 assert(!_constants.containsKey(constantValue));
591 String name = namer.constantName(constantValue); 592 String name = namer.constantName(constantValue);
592 String constantObject = namer.globalObjectForConstant(constantValue); 593 String constantObject = namer.globalObjectForConstant(constantValue);
593 Holder holder = _registry.registerHolder(constantObject); 594 Holder holder = _registry.registerHolder(constantObject);
594 Constant constant = new Constant(name, holder, constantValue); 595 Constant constant = new Constant(name, holder, constantValue);
595 _constants[constantValue] = constant; 596 _constants[constantValue] = constant;
596 } 597 }
597 } 598 }
598 } 599 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698