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

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

Issue 23258002: Load builtin helper libraries on demand. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 // TODO(ahe): This is a little hacky, but I'll have to rewrite this when 1424 // TODO(ahe): This is a little hacky, but I'll have to rewrite this when
1425 // implementing @MirrorsUsed anyways. 1425 // implementing @MirrorsUsed anyways.
1426 compiler.constantHandler.compiledConstants.addAll( 1426 compiler.constantHandler.compiledConstants.addAll(
1427 compiler.metadataHandler.compiledConstants); 1427 compiler.metadataHandler.compiledConstants);
1428 compiler.metadataHandler.compiledConstants.clear(); 1428 compiler.metadataHandler.compiledConstants.clear();
1429 } 1429 }
1430 if (mustRetainMetadata) hasRetainedMetadata = true; 1430 if (mustRetainMetadata) hasRetainedMetadata = true;
1431 return mustRetainMetadata; 1431 return mustRetainMetadata;
1432 } 1432 }
1433 1433
1434 void onLibraryScanned(LibraryElement library, Uri uri) { 1434 void onLibraryLoaded(LibraryElement library, Uri uri) {
1435 if (uri == Uri.parse('dart:_js_mirrors')) { 1435 if (uri == Uri.parse('dart:_js_mirrors')) {
1436 disableTreeShakingMarker = 1436 disableTreeShakingMarker =
1437 library.find(const SourceString('disableTreeShaking')); 1437 library.find(const SourceString('disableTreeShaking'));
1438 preserveMetadataMarker = 1438 preserveMetadataMarker =
1439 library.find(const SourceString('preserveMetadata')); 1439 library.find(const SourceString('preserveMetadata'));
1440 } else if (uri == Uri.parse('dart:_js_names')) { 1440 } else if (uri == Uri.parse('dart:_js_names')) {
1441 preserveNamesMarker = 1441 preserveNamesMarker =
1442 library.find(const SourceString('preserveNames')); 1442 library.find(const SourceString('preserveNames'));
1443 } 1443 }
1444 } 1444 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 } 1517 }
1518 } 1518 }
1519 1519
1520 /// Records that [type] is used by [user.element]. 1520 /// Records that [type] is used by [user.element].
1521 class Dependency { 1521 class Dependency {
1522 final DartType type; 1522 final DartType type;
1523 final TreeElements user; 1523 final TreeElements user;
1524 1524
1525 const Dependency(this.type, this.user); 1525 const Dependency(this.type, this.user);
1526 } 1526 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698