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

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

Issue 23819039: Create type masks lazily. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 // statement context or an expression context, so we register both 871 // statement context or an expression context, so we register both
872 // here, even though we may not need the throwExpression helper. 872 // here, even though we may not need the throwExpression helper.
873 enqueueInResolution(getWrapExceptionHelper(), elements); 873 enqueueInResolution(getWrapExceptionHelper(), elements);
874 enqueueInResolution(getThrowExpressionHelper(), elements); 874 enqueueInResolution(getThrowExpressionHelper(), elements);
875 } 875 }
876 876
877 void registerLazyField(TreeElements elements) { 877 void registerLazyField(TreeElements elements) {
878 enqueueInResolution(getCyclicThrowHelper(), elements); 878 enqueueInResolution(getCyclicThrowHelper(), elements);
879 } 879 }
880 880
881 void registerTypeLiteral(Element element, TreeElements elements) { 881 void registerTypeLiteral(Element element,
882 Enqueuer enqueuer,
883 TreeElements elements) {
884 enqueuer.registerInstantiatedClass(typeImplementation, elements);
882 enqueueInResolution(getCreateRuntimeType(), elements); 885 enqueueInResolution(getCreateRuntimeType(), elements);
883 // TODO(ahe): Might want to register [element] as an instantiated class 886 // TODO(ahe): Might want to register [element] as an instantiated class
884 // when reflection is used. However, as long as we disable tree-shaking 887 // when reflection is used. However, as long as we disable tree-shaking
885 // eagerly it doesn't matter. 888 // eagerly it doesn't matter.
886 if (element.isTypedef()) { 889 if (element.isTypedef()) {
887 typedefTypeLiterals.add(element); 890 typedefTypeLiterals.add(element);
888 } 891 }
889 } 892 }
890 893
891 void registerStackTraceInCatch(TreeElements elements) { 894 void registerStackTraceInCatch(TreeElements elements) {
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1779 copy(constant.values); 1782 copy(constant.values);
1780 copy(constant.protoValue); 1783 copy(constant.protoValue);
1781 copy(constant); 1784 copy(constant);
1782 } 1785 }
1783 1786
1784 void visitConstructed(ConstructedConstant constant) { 1787 void visitConstructed(ConstructedConstant constant) {
1785 copy(constant.fields); 1788 copy(constant.fields);
1786 copy(constant); 1789 copy(constant);
1787 } 1790 }
1788 } 1791 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698