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

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

Issue 123423002: Fix checkedInstructionOrNonGenerateAtUseSite. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't try to improve var-allocator. Created 6 years, 8 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/interceptor_simplifier.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart b/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart
index ecfd632a94ade143e068422c5a19c17c3362ae84..103c8d67e988dc88dab2f4c5ef38905fb4d286ef 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart
@@ -256,7 +256,16 @@ class SsaSimplifyInterceptors extends HBaseVisitor
}
bool rewriteToUseSelfAsInterceptor(HInterceptor node, HInstruction receiver) {
- node.block.rewrite(node, receiver);
+ for (HInstruction user in node.usedBy.toList()) {
+ if (user is HIs) {
+ user.changeUse(node, receiver);
+ } else {
+ // Use the potentially self-argument as new receiver. Note that the
+ // self-argument could potentially have a tighter type than the
+ // receiver which was the input to the interceptor.
sra1 2014/05/08 03:34:35 Please add a test/guard against 'use' being an arg
floitsch 2014/05/08 18:21:56 Done.
+ user.changeUse(node, user.inputs[1]);
+ }
+ }
return false;
}

Powered by Google App Engine
This is Rietveld 408576698