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

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

Issue 779593002: Move elementAccess() from namer to emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 6 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 | Annotate | Revision Log
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 .map((OutputUnit unit) => _outputs[unit]) 109 .map((OutputUnit unit) => _outputs[unit])
110 .toList(growable: false); 110 .toList(growable: false);
111 }); 111 });
112 return loadMap; 112 return loadMap;
113 } 113 }
114 114
115 MainOutput _buildMainOutput(Fragment fragment) { 115 MainOutput _buildMainOutput(Fragment fragment) {
116 // Construct the main output from the libraries and the registered holders. 116 // Construct the main output from the libraries and the registered holders.
117 MainOutput result = new MainOutput( 117 MainOutput result = new MainOutput(
118 "", // The empty string is the name for the main output file. 118 "", // The empty string is the name for the main output file.
119 namer.elementAccess(_compiler.mainFunction), 119 backend.emitter.staticFunctionAccess(_compiler.mainFunction),
120 _buildLibraries(fragment), 120 _buildLibraries(fragment),
121 _buildStaticNonFinalFields(fragment), 121 _buildStaticNonFinalFields(fragment),
122 _buildStaticLazilyInitializedFields(fragment), 122 _buildStaticLazilyInitializedFields(fragment),
123 _buildConstants(fragment), 123 _buildConstants(fragment),
124 _registry.holders.toList(growable: false)); 124 _registry.holders.toList(growable: false));
125 _outputs[fragment.outputUnit] = result; 125 _outputs[fragment.outputUnit] = result;
126 return result; 126 return result;
127 } 127 }
128 128
129 /// Returns a name composed of the main output file name and [name]. 129 /// Returns a name composed of the main output file name and [name].
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 for (ConstantValue constantValue in constantValues) { 417 for (ConstantValue constantValue in constantValues) {
418 assert(!_constants.containsKey(constantValue)); 418 assert(!_constants.containsKey(constantValue));
419 String name = namer.constantName(constantValue); 419 String name = namer.constantName(constantValue);
420 String constantObject = namer.globalObjectForConstant(constantValue); 420 String constantObject = namer.globalObjectForConstant(constantValue);
421 Holder holder = _registry.registerHolder(constantObject); 421 Holder holder = _registry.registerHolder(constantObject);
422 Constant constant = new Constant(name, holder, constantValue); 422 Constant constant = new Constant(name, holder, constantValue);
423 _constants[constantValue] = constant; 423 _constants[constantValue] = constant;
424 }; 424 };
425 } 425 }
426 } 426 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/old_emitter/type_test_emitter.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698