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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 17759007: First pass at asynchronous input loading in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 7 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 | Annotate | Revision Log
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 js_backend; 5 part of js_backend;
6 6
7 class JavaScriptItemCompilationContext extends ItemCompilationContext { 7 class JavaScriptItemCompilationContext extends ItemCompilationContext {
8 final Set<HInstruction> boundsChecked; 8 final Set<HInstruction> boundsChecked;
9 9
10 JavaScriptItemCompilationContext() 10 JavaScriptItemCompilationContext()
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 if (mustRetainMetadata && isNeededForReflection(element)) { 1482 if (mustRetainMetadata && isNeededForReflection(element)) {
1483 for (MetadataAnnotation metadata in element.metadata) { 1483 for (MetadataAnnotation metadata in element.metadata) {
1484 metadata.ensureResolved(compiler) 1484 metadata.ensureResolved(compiler)
1485 .value.accept(new ConstantCopier(compiler.constantHandler)); 1485 .value.accept(new ConstantCopier(compiler.constantHandler));
1486 } 1486 }
1487 return true; 1487 return true;
1488 } 1488 }
1489 return false; 1489 return false;
1490 } 1490 }
1491 1491
1492 void onLibraryLoaded(LibraryElement library, Uri uri) { 1492 Future onLibraryLoaded(LibraryElement library, Uri uri) {
1493 if (uri == Uri.parse('dart:_js_mirrors')) { 1493 if (uri == Uri.parse('dart:_js_mirrors')) {
1494 disableTreeShakingMarker = 1494 disableTreeShakingMarker =
1495 library.find(const SourceString('disableTreeShaking')); 1495 library.find(const SourceString('disableTreeShaking'));
1496 preserveMetadataMarker = 1496 preserveMetadataMarker =
1497 library.find(const SourceString('preserveMetadata')); 1497 library.find(const SourceString('preserveMetadata'));
1498 } else if (uri == Uri.parse('dart:_js_names')) { 1498 } else if (uri == Uri.parse('dart:_js_names')) {
1499 preserveNamesMarker = 1499 preserveNamesMarker =
1500 library.find(const SourceString('preserveNames')); 1500 library.find(const SourceString('preserveNames'));
1501 } 1501 }
1502 return new Future.value();
1502 } 1503 }
1503 1504
1504 void registerMetadataInstantiatedType(DartType type, TreeElements elements) { 1505 void registerMetadataInstantiatedType(DartType type, TreeElements elements) {
1505 if (mustRetainMetadata) { 1506 if (mustRetainMetadata) {
1506 compiler.constantHandler.registerInstantiatedType(type, elements); 1507 compiler.constantHandler.registerInstantiatedType(type, elements);
1507 } else { 1508 } else {
1508 metadataInstantiatedTypes.add(new Dependency(type, elements)); 1509 metadataInstantiatedTypes.add(new Dependency(type, elements));
1509 } 1510 }
1510 } 1511 }
1511 1512
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 copy(constant.values); 1684 copy(constant.values);
1684 copy(constant.protoValue); 1685 copy(constant.protoValue);
1685 copy(constant); 1686 copy(constant);
1686 } 1687 }
1687 1688
1688 void visitConstructed(ConstructedConstant constant) { 1689 void visitConstructed(ConstructedConstant constant) {
1689 copy(constant.fields); 1690 copy(constant.fields);
1690 copy(constant); 1691 copy(constant);
1691 } 1692 }
1692 } 1693 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698