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

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

Issue 763123002: dart2js: Split TypeTestEmitter into a registry and an emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: full diff 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 ClassElement implementation = element.implementation; 263 ClassElement implementation = element.implementation;
264 264
265 // MixinApplications run through the members of their mixin. Here, we are 265 // MixinApplications run through the members of their mixin. Here, we are
266 // only interested in direct members. 266 // only interested in direct members.
267 if (!element.isMixinApplication) { 267 if (!element.isMixinApplication) {
268 implementation.forEachMember(visitMember, includeBackendMembers: true); 268 implementation.forEachMember(visitMember, includeBackendMembers: true);
269 } 269 }
270 String name = namer.getNameOfClass(element); 270 String name = namer.getNameOfClass(element);
271 String holderName = namer.globalObjectFor(element); 271 String holderName = namer.globalObjectFor(element);
272 Holder holder = _registry.registerHolder(holderName); 272 Holder holder = _registry.registerHolder(holderName);
273 bool onlyForRti = 273 bool onlyForRti = _task.typeTestRegistry.rtiNeededClasses.contains(element);
274 _task.typeTestEmitter.rtiNeededClasses.contains(element);
275 bool isInstantiated = 274 bool isInstantiated =
276 _compiler.codegenWorld.directlyInstantiatedClasses.contains(element); 275 _compiler.codegenWorld.directlyInstantiatedClasses.contains(element);
277 276
278 Class result; 277 Class result;
279 if (element.isMixinApplication) { 278 if (element.isMixinApplication) {
280 assert(methods.isEmpty); 279 assert(methods.isEmpty);
281 assert(fields.isEmpty); 280 assert(fields.isEmpty);
282 result = new MixinApplication(name, holder, 281 result = new MixinApplication(name, holder,
283 isDirectlyInstantiated: isInstantiated, 282 isDirectlyInstantiated: isInstantiated,
284 onlyForRti: onlyForRti); 283 onlyForRti: onlyForRti);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 for (ConstantValue constantValue in constantValues) { 417 for (ConstantValue constantValue in constantValues) {
419 assert(!_constants.containsKey(constantValue)); 418 assert(!_constants.containsKey(constantValue));
420 String name = namer.constantName(constantValue); 419 String name = namer.constantName(constantValue);
421 String constantObject = namer.globalObjectForConstant(constantValue); 420 String constantObject = namer.globalObjectForConstant(constantValue);
422 Holder holder = _registry.registerHolder(constantObject); 421 Holder holder = _registry.registerHolder(constantObject);
423 Constant constant = new Constant(name, holder, constantValue); 422 Constant constant = new Constant(name, holder, constantValue);
424 _constants[constantValue] = constant; 423 _constants[constantValue] = constant;
425 }; 424 };
426 } 425 }
427 } 426 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/old_emitter/type_test_emitter.dart ('k') | pkg/dart2js_incremental/lib/caching_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698