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

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

Issue 2301953003: Rerun formatter on dartjs except kernel and shared_messages (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.program_builder; 5 part of dart2js.js_emitter.program_builder;
6 6
7 /** 7 /**
8 * Generates the code for all used classes in the program. Static fields (even 8 * Generates the code for all used classes in the program. Static fields (even
9 * in classes) are ignored, since they can be treated as non-class elements. 9 * in classes) are ignored, since they can be treated as non-class elements.
10 * 10 *
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 if (needsAccessor && backend.isAccessibleByReflection(member)) { 136 if (needsAccessor && backend.isAccessibleByReflection(member)) {
137 backend.retainMetadataOf(member); 137 backend.retainMetadataOf(member);
138 } 138 }
139 }); 139 });
140 } 140 }
141 } 141 }
142 typedefsNeededForReflection.forEach(backend.retainMetadataOf); 142 typedefsNeededForReflection.forEach(backend.retainMetadataOf);
143 } 143 }
144 144
145 JavaScriptConstantCompiler handler = backend.constants; 145 JavaScriptConstantCompiler handler = backend.constants;
146 List<ConstantValue> constants = handler.getConstantsForEmission(compiler 146 List<ConstantValue> constants = handler.getConstantsForEmission(
147 .options.hasIncrementalSupport ? null : emitter.compareConstants); 147 compiler.options.hasIncrementalSupport
148 ? null
149 : emitter.compareConstants);
148 for (ConstantValue constant in constants) { 150 for (ConstantValue constant in constants) {
149 if (emitter.isConstantInlinedOrAlreadyEmitted(constant)) continue; 151 if (emitter.isConstantInlinedOrAlreadyEmitted(constant)) continue;
150 152
151 if (constant.isList) outputContainsConstantList = true; 153 if (constant.isList) outputContainsConstantList = true;
152 154
153 OutputUnit constantUnit = 155 OutputUnit constantUnit =
154 compiler.deferredLoadTask.outputUnitForConstant(constant); 156 compiler.deferredLoadTask.outputUnitForConstant(constant);
155 if (constantUnit == null) { 157 if (constantUnit == null) {
156 // The back-end introduces some constants, like "InterceptorConstant" or 158 // The back-end introduces some constants, like "InterceptorConstant" or
157 // some list constants. They are emitted in the main output-unit. 159 // some list constants. They are emitted in the main output-unit.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 315 }
314 316
315 void collect() { 317 void collect() {
316 computeNeededDeclarations(); 318 computeNeededDeclarations();
317 computeNeededConstants(); 319 computeNeededConstants();
318 computeNeededStatics(); 320 computeNeededStatics();
319 computeNeededStaticNonFinalFields(); 321 computeNeededStaticNonFinalFields();
320 computeNeededLibraries(); 322 computeNeededLibraries();
321 } 323 }
322 } 324 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698