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

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

Issue 1580593006: dart2js: fix type annotation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | 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 7 import '../js_emitter.dart' show
8 ClassStubGenerator, 8 ClassStubGenerator,
9 CodeEmitterTask, 9 CodeEmitterTask,
10 computeMixinClass, 10 computeMixinClass,
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // the holder-instance. 305 // the holder-instance.
306 return new StaticField(element, 306 return new StaticField(element,
307 name, _registerStaticStateHolder(), code, 307 name, _registerStaticStateHolder(), code,
308 isFinal, isLazy); 308 isFinal, isLazy);
309 } 309 }
310 310
311 List<StaticField> _buildStaticLazilyInitializedFields( 311 List<StaticField> _buildStaticLazilyInitializedFields(
312 LibrariesMap librariesMap) { 312 LibrariesMap librariesMap) {
313 JavaScriptConstantCompiler handler = backend.constants; 313 JavaScriptConstantCompiler handler = backend.constants;
314 DeferredLoadTask loadTask = _compiler.deferredLoadTask; 314 DeferredLoadTask loadTask = _compiler.deferredLoadTask;
315 List<VariableElement> lazyFields = handler 315 Iterable<VariableElement> lazyFields = handler
316 .getLazilyInitializedFieldsForEmission() 316 .getLazilyInitializedFieldsForEmission()
317 .where((element) => 317 .where((element) =>
318 loadTask.outputUnitForElement(element) == librariesMap.outputUnit); 318 loadTask.outputUnitForElement(element) == librariesMap.outputUnit);
319 return Elements.sortedByPosition(lazyFields) 319 return Elements.sortedByPosition(lazyFields)
320 .map(_buildLazyField) 320 .map(_buildLazyField)
321 .where((field) => field != null) // Happens when the field was unused. 321 .where((field) => field != null) // Happens when the field was unused.
322 .toList(growable: false); 322 .toList(growable: false);
323 } 323 }
324 324
325 StaticField _buildLazyField(Element element) { 325 StaticField _buildLazyField(Element element) {
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 Constant constant = new Constant(name, holder, constantValue); 1011 Constant constant = new Constant(name, holder, constantValue);
1012 _constants[constantValue] = constant; 1012 _constants[constantValue] = constant;
1013 } 1013 }
1014 } 1014 }
1015 1015
1016 Holder _registerStaticStateHolder() { 1016 Holder _registerStaticStateHolder() {
1017 return _registry.registerHolder( 1017 return _registry.registerHolder(
1018 namer.staticStateHolder, isStaticStateHolder: true); 1018 namer.staticStateHolder, isStaticStateHolder: true);
1019 } 1019 }
1020 } 1020 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698