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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 12299006: Start tracking all registered elements in one big full function set (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Register fields. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index def1a12795722ab08aae5fcad59163b758535a9c..2a4f3be1b66bb5dd5b0caba1159f0b6b9225cd95 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -1580,28 +1580,16 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
}
- Selector getOptimizedSelectorFor(HInvokeDynamic node,
- Selector defaultSelector) {
+ Selector getOptimizedSelectorFor(HInvokeDynamic node, Selector selector) {
// If [JSInvocationMirror.invokeOn] has been called, we must not create a
// typed selector based on the receiver type.
if (node.element == null && // Invocation is not exact.
backend.compiler.enabledInvokeOn) {
- return defaultSelector;
+ return selector;
}
int receiverIndex = node.isInterceptorCall ? 1 : 0;
- HType receiverHType = types[node.inputs[receiverIndex]];
- DartType receiverType = receiverHType.computeType(compiler);
- if (receiverType != null && !receiverType.isMalformed) {
- if (receiverHType.isExact()) {
- return new TypedSelector.exact(receiverType, defaultSelector);
- } else if (receiverHType.isInterfaceType()) {
- return new TypedSelector.subtype(receiverType, defaultSelector);
- } else {
- return new TypedSelector.subclass(receiverType, defaultSelector);
- }
- } else {
- return defaultSelector;
- }
+ HType receiverType = types[node.inputs[receiverIndex]];
+ return receiverType.refine(selector, compiler);
}
void registerInvoke(HInvokeDynamic node) {

Powered by Google App Engine
This is Rietveld 408576698