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

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

Issue 756983004: dart2js: add comments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/type_test_emitter.dart » ('j') | 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) 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 const USE_NEW_EMITTER = const bool.fromEnvironment("dart2js.use.new.emitter"); 7 const USE_NEW_EMITTER = const bool.fromEnvironment("dart2js.use.new.emitter");
8 8
9 /** 9 /**
10 * Generates the code for all used classes in the program. Static fields (even 10 * Generates the code for all used classes in the program. Static fields (even
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 243
244 // 4. Find all classes needed for rti. 244 // 4. Find all classes needed for rti.
245 // It is important that this is the penultimate step, at this point, 245 // It is important that this is the penultimate step, at this point,
246 // neededClasses must only contain classes that have been resolved and 246 // neededClasses must only contain classes that have been resolved and
247 // codegen'd. The rtiNeededClasses may contain additional classes, but 247 // codegen'd. The rtiNeededClasses may contain additional classes, but
248 // these are thought to not have been instantiated, so we neeed to be able 248 // these are thought to not have been instantiated, so we neeed to be able
249 // to identify them later and make sure we only emit "empty shells" without 249 // to identify them later and make sure we only emit "empty shells" without
250 // fields, etc. 250 // fields, etc.
251 typeTestEmitter.computeRtiNeededClasses(); 251 typeTestEmitter.computeRtiNeededClasses();
252
253 // TODO(floitsch): either change the name, or get the rti-classes
254 // differently.
252 typeTestEmitter.rtiNeededClasses.removeAll(neededClasses); 255 typeTestEmitter.rtiNeededClasses.removeAll(neededClasses);
253 // rtiNeededClasses now contains only the "empty shells". 256 // rtiNeededClasses now contains only the "empty shells".
254 neededClasses.addAll(typeTestEmitter.rtiNeededClasses); 257 neededClasses.addAll(typeTestEmitter.rtiNeededClasses);
255 258
256 // TODO(18175, floitsch): remove once issue 18175 is fixed. 259 // TODO(18175, floitsch): remove once issue 18175 is fixed.
257 if (neededClasses.contains(backend.jsIntClass)) { 260 if (neededClasses.contains(backend.jsIntClass)) {
258 neededClasses.add(compiler.intClass); 261 neededClasses.add(compiler.intClass);
259 } 262 }
260 if (neededClasses.contains(backend.jsDoubleClass)) { 263 if (neededClasses.contains(backend.jsDoubleClass)) {
261 neededClasses.add(compiler.doubleClass); 264 neededClasses.add(compiler.doubleClass);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 void emitProgram(Program program); 353 void emitProgram(Program program);
351 354
352 jsAst.Expression generateEmbeddedGlobalAccess(String global); 355 jsAst.Expression generateEmbeddedGlobalAccess(String global);
353 jsAst.Expression constantReference(ConstantValue value); 356 jsAst.Expression constantReference(ConstantValue value);
354 357
355 int compareConstants(ConstantValue a, ConstantValue b); 358 int compareConstants(ConstantValue a, ConstantValue b);
356 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant); 359 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant);
357 360
358 void invalidateCaches(); 361 void invalidateCaches();
359 } 362 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/type_test_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698