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

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

Issue 1214723010: dart2js: Make it more obvious how rti-only needed classes work. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comment. Created 5 years, 5 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/compiler/lib/src/js_emitter/code_emitter_task.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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 js.Name name = namer.className(element); 318 js.Name name = namer.className(element);
319 319
320 return new Class( 320 return new Class(
321 element, name, null, [], instanceFields, [], [], [], [], [], null, 321 element, name, null, [], instanceFields, [], [], [], [], [], null,
322 isDirectlyInstantiated: true, 322 isDirectlyInstantiated: true,
323 onlyForRti: false, 323 onlyForRti: false,
324 isNative: element.isNative); 324 isNative: element.isNative);
325 } 325 }
326 326
327 Class _buildClass(ClassElement element) { 327 Class _buildClass(ClassElement element) {
328 bool onlyForRti = _task.typeTestRegistry.rtiNeededClasses.contains(element); 328 bool onlyForRti = _task.classesOnlyNeededForRti.contains(element);
329 329
330 List<Method> methods = []; 330 List<Method> methods = [];
331 List<StubMethod> callStubs = <StubMethod>[]; 331 List<StubMethod> callStubs = <StubMethod>[];
332 332
333 ClassStubGenerator classStubGenerator = 333 ClassStubGenerator classStubGenerator =
334 new ClassStubGenerator(_compiler, namer, backend); 334 new ClassStubGenerator(_compiler, namer, backend);
335 RuntimeTypeGenerator runtimeTypeGenerator = 335 RuntimeTypeGenerator runtimeTypeGenerator =
336 new RuntimeTypeGenerator(_compiler, _task, namer); 336 new RuntimeTypeGenerator(_compiler, _task, namer);
337 337
338 void visitMember(ClassElement enclosing, Element member) { 338 void visitMember(ClassElement enclosing, Element member) {
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 _registry.registerConstant(outputUnit, constantValue); 762 _registry.registerConstant(outputUnit, constantValue);
763 assert(!_constants.containsKey(constantValue)); 763 assert(!_constants.containsKey(constantValue));
764 js.Name name = namer.constantName(constantValue); 764 js.Name name = namer.constantName(constantValue);
765 String constantObject = namer.globalObjectForConstant(constantValue); 765 String constantObject = namer.globalObjectForConstant(constantValue);
766 Holder holder = _registry.registerHolder(constantObject); 766 Holder holder = _registry.registerHolder(constantObject);
767 Constant constant = new Constant(name, holder, constantValue); 767 Constant constant = new Constant(name, holder, constantValue);
768 _constants[constantValue] = constant; 768 _constants[constantValue] = constant;
769 } 769 }
770 } 770 }
771 } 771 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/code_emitter_task.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698