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

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

Issue 10832351: Reuse static getter function when invoking non-function statics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index 8c6ca6badb54cc3e253a0b5e177c147af88e1d42..68d6d505819092e2fb2af2fb1b1b75ff63312b2b 100644
--- a/lib/compiler/implementation/ssa/builder.dart
+++ b/lib/compiler/implementation/ssa/builder.dart
@@ -2352,12 +2352,11 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
stack.add(graph.addConstantNull());
return;
}
- compiler.ensure(element.kind !== ElementKind.GENERATIVE_CONSTRUCTOR);
- HInstruction target = new HStatic(element);
- add(target);
- var inputs = <HInstruction>[];
- inputs.add(target);
- if (element.kind == ElementKind.FUNCTION) {
+ compiler.ensure(!element.isGenerativeConstructor());
+ if (element.isFunction()) {
+ HInstruction target = new HStatic(element);
+ add(target);
+ var inputs = <HInstruction>[target];
bool succeeded = addStaticSendArgumentsToList(selector, node.arguments,
element, inputs);
if (!succeeded) {
@@ -2367,11 +2366,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
}
pushWithPosition(new HInvokeStatic(inputs), node);
} else {
- if (element.kind == ElementKind.GETTER) {
- target = new HInvokeStatic(inputs);
- add(target);
- inputs = <HInstruction>[target];
- }
+ generateGetter(node, element);
+ List<HInstruction> inputs = <HInstruction>[pop()];
addDynamicSendArgumentsToList(node, inputs);
pushWithPosition(new HInvokeClosure(selector, inputs), node);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698