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

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

Issue 11543017: Revert r16032: it revealed a bug in our bailout environment computation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 16033)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -2702,7 +2702,13 @@
Operator op = node.selector;
if (const SourceString("[]") == op.source) {
- visitDynamicSend(node);
+ HStatic target = new HStatic(interceptors.getIndexInterceptor());
+ add(target);
+ visit(node.receiver);
+ HInstruction receiver = pop();
+ visit(node.argumentsNode);
+ HInstruction index = pop();
+ push(new HIndex(target, receiver, index));
} else if (const SourceString("&&") == op.source ||
const SourceString("||") == op.source) {
visitLogicalAndOr(node, op);
@@ -3586,19 +3592,6 @@
}
}
- HInvokeDynamicMethod buildInvokeDynamicWithOneArgument(
- Node node, Selector selector, HInstruction receiver, HInstruction arg0) {
- Set<ClassElement> interceptedClasses =
- getInterceptedClassesOn(node, selector);
- List<HInstruction> inputs = <HInstruction>[];
- if (interceptedClasses != null) {
- inputs.add(invokeInterceptor(interceptedClasses, receiver, node));
- }
- inputs.add(receiver);
- inputs.add(arg0);
- return new HInvokeDynamicMethod(selector, inputs);
- }
-
visitSendSet(SendSet node) {
Element element = elements[node];
if (!Elements.isUnresolved(element) && element.impliesType()) {
@@ -3650,9 +3643,9 @@
index = pop();
value = graph.addConstantInt(1, constantSystem);
}
-
- HInvokeDynamicMethod left = buildInvokeDynamicWithOneArgument(
- node, new Selector.index(), receiver, index);
+ HStatic indexMethod = new HStatic(interceptors.getIndexInterceptor());
+ add(indexMethod);
+ HInstruction left = new HIndex(indexMethod, receiver, index);
add(left);
Element opElement = elements[op];
visitBinary(left, op, value);
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/bailout.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698