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

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
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 17058)
+++ 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);
kasperl 2013/01/16 07:26:03 That's a lot of indentation.
ngeoffray 2013/01/16 09:02:54 Done.
+ pushWithPosition(invoke, node);
if (isNotEquals) {
HNot not = new HNot(popBoolified());
@@ -3645,12 +3640,13 @@
Set<ClassElement> interceptedClasses =
getInterceptedClassesOn(node, selector);
List<HInstruction> inputs = <HInstruction>[];
- if (interceptedClasses != null) {
+ bool isIntercepted = interceptedClasses != null;
kasperl 2013/01/16 07:26:03 I guess the set cannot be empty?
ngeoffray 2013/01/16 09:02:54 Indeed, it cannot be empty, I added an assert.
+ if (isIntercepted) {
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) {

Powered by Google App Engine
This is Rietveld 408576698