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

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

Issue 16035026: Fix 2 host-checked error with the enqueuer: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/codegen.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (revision 23840)
+++ sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (working copy)
@@ -1530,10 +1530,19 @@
}
Selector getOptimizedSelectorFor(HInvokeDynamic node, Selector selector) {
+ if (node.element != null) {
+ // Create an artificial type mask to make sure only
+ // [node.element] will be enqueued. We're not using the receiver
+ // type because our optimizations might end up in a state where the
+ // invoke dynamic knows more than the receiver.
+ HType receiverType = new HType.fromMask(
+ new TypeMask.nonNullExact(node.element.getEnclosingClass().rawType),
+ compiler);
+ return receiverType.refine(selector, compiler);
+ }
// If [JSInvocationMirror._invokeOn] has been called, we must not create a
// typed selector based on the receiver type.
- if (node.element == null && // Invocation is not exact.
- backend.compiler.enabledInvokeOn) {
+ if (backend.compiler.enabledInvokeOn) {
return selector.asUntyped;
}
HType receiverType = node.getDartReceiver(compiler).instructionType;
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698