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

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

Issue 12334070: Support runtime check of function types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor fix Created 7 years, 6 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 dart2js; 5 part of dart2js;
6 6
7 /** 7 /**
8 * The [ConstantHandler] keeps track of compile-time constants, 8 * The [ConstantHandler] keeps track of compile-time constants,
9 * initializations of global and static fields, and default values of 9 * initializations of global and static fields, and default values of
10 * optional parameters. 10 * optional parameters.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 registerInstantiatedType(interceptor.dispatchedType, elements); 56 registerInstantiatedType(interceptor.dispatchedType, elements);
57 } 57 }
58 compiledConstants.add(constant); 58 compiledConstants.add(constant);
59 } 59 }
60 60
61 void registerInstantiatedType(DartType type, TreeElements elements) { 61 void registerInstantiatedType(DartType type, TreeElements elements) {
62 if (isMetadata) return; 62 if (isMetadata) return;
63 compiler.enqueuer.codegen.registerInstantiatedType(type, elements); 63 compiler.enqueuer.codegen.registerInstantiatedType(type, elements);
64 if (type is InterfaceType && 64 if (type is InterfaceType &&
65 !type.isRaw && 65 !type.isRaw &&
66 compiler.backend.needsRti(type.element)) { 66 compiler.backend.classNeedsRti(type.element)) {
67 registerSetRuntimeTypeInfoFunction(); 67 registerSetRuntimeTypeInfoFunction();
68 } 68 }
69 } 69 }
70 70
71 void registerStaticUse(Element element) { 71 void registerStaticUse(Element element) {
72 if (isMetadata) return; 72 if (isMetadata) return;
73 compiler.analyzeElement(element.declaration); 73 compiler.analyzeElement(element.declaration);
74 compiler.enqueuer.codegen.registerStaticUse(element); 74 compiler.enqueuer.codegen.registerStaticUse(element);
75 } 75 }
76 76
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 if (fieldValue == null) { 908 if (fieldValue == null) {
909 // Use the default value. 909 // Use the default value.
910 fieldValue = handler.compileConstant(field); 910 fieldValue = handler.compileConstant(field);
911 } 911 }
912 jsNewArguments.add(fieldValue); 912 jsNewArguments.add(fieldValue);
913 }, 913 },
914 includeSuperAndInjectedMembers: true); 914 includeSuperAndInjectedMembers: true);
915 return jsNewArguments; 915 return jsNewArguments;
916 } 916 }
917 } 917 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698