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

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

Issue 11879047: Add a new class InvokeDynamicSpecializer and subclasses that know what input types are beneficial f… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 17124)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -2900,16 +2900,11 @@
}
List<HInstruction> inputs = <HInstruction>[];
- Set<ClassElement> interceptedClasses =
- getInterceptedClassesOn(node, selector);
- if (interceptedClasses != null) {
- inputs.add(invokeInterceptor(interceptedClasses, receiver, node));
- }
- inputs.add(receiver);
-
addDynamicSendArgumentsToList(node, inputs);
- pushWithPosition(new HInvokeDynamicMethod(selector, inputs), node);
+ HInvokeDynamicMethod invoke = buildInvokeDynamic(
+ node, selector, receiver, inputs);
+ pushWithPosition(invoke, node);
if (isNotEquals) {
HNot not = new HNot(popBoolified());
@@ -3645,12 +3640,14 @@
Set<ClassElement> interceptedClasses =
getInterceptedClassesOn(node, selector);
List<HInstruction> inputs = <HInstruction>[];
- if (interceptedClasses != null) {
+ bool isIntercepted = interceptedClasses != null;
+ if (isIntercepted) {
+ assert(!interceptedClasses.isEmpty);
inputs.add(invokeInterceptor(interceptedClasses, receiver, node));
}
inputs.add(receiver);
inputs.addAll(arguments);
- return new HInvokeDynamicMethod(selector, inputs);
+ return new HInvokeDynamicMethod(selector, inputs, isIntercepted);
}
visitSendSet(SendSet node) {
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698