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

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

Issue 19575004: Implement accessing lazily initialized static fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/js_backend/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 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 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 /// Called when [:new Symbol(...):] is seen. 1422 /// Called when [:new Symbol(...):] is seen.
1423 void registerNewSymbol(TreeElements elements) { 1423 void registerNewSymbol(TreeElements elements) {
1424 } 1424 }
1425 1425
1426 bool retainGetter(Element element) => isTreeShakingDisabled; 1426 bool retainGetter(Element element) => isTreeShakingDisabled;
1427 1427
1428 bool retainSetter(Element element) => isTreeShakingDisabled; 1428 bool retainSetter(Element element) => isTreeShakingDisabled;
1429 1429
1430 bool retainName(SourceString name) => mustPreserveNames; 1430 bool retainName(SourceString name) => mustPreserveNames;
1431 1431
1432 bool get rememberLazies => isTreeShakingDisabled;
1433
1432 bool retainMetadataOf(Element element) { 1434 bool retainMetadataOf(Element element) {
1433 if (mustRetainMetadata) { 1435 if (mustRetainMetadata) {
1434 // TODO(ahe): This is a little hacky, but I'll have to rewrite this when 1436 // TODO(ahe): This is a little hacky, but I'll have to rewrite this when
1435 // implementing @MirrorsUsed anyways. 1437 // implementing @MirrorsUsed anyways.
1436 compiler.constantHandler.compiledConstants.addAll( 1438 compiler.constantHandler.compiledConstants.addAll(
1437 compiler.metadataHandler.compiledConstants); 1439 compiler.metadataHandler.compiledConstants);
1438 compiler.metadataHandler.compiledConstants.clear(); 1440 compiler.metadataHandler.compiledConstants.clear();
1439 } 1441 }
1440 if (mustRetainMetadata) hasRetainedMetadata = true; 1442 if (mustRetainMetadata) hasRetainedMetadata = true;
1441 return mustRetainMetadata; 1443 return mustRetainMetadata;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 } 1480 }
1479 } 1481 }
1480 1482
1481 /// Records that [type] is used by [user.element]. 1483 /// Records that [type] is used by [user.element].
1482 class Dependency { 1484 class Dependency {
1483 final DartType type; 1485 final DartType type;
1484 final TreeElements user; 1486 final TreeElements user;
1485 1487
1486 const Dependency(this.type, this.user); 1488 const Dependency(this.type, this.user);
1487 } 1489 }
OLDNEW
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698