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

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

Issue 48243002: When doing SSA type propagation, refine the receiver after a call. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (revision 29343)
+++ sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (working copy)
@@ -80,9 +80,9 @@
js.Expression generateMethod(CodegenWorkItem work, HGraph graph) {
return measure(() {
- compiler.tracer.traceGraph("codegen", graph);
SsaCodeGenerator codegen = new SsaCodeGenerator(backend, work);
codegen.visitGraph(graph);
+ compiler.tracer.traceGraph("codegen", graph);
FunctionElement element = work.element;
return buildJavaScriptFunction(element, codegen.parameters, codegen.body);
});
@@ -282,6 +282,7 @@
endGraph(HGraph graph);
void preGenerateMethod(HGraph graph) {
+ new SsaTypeKnownRemover().visitGraph(graph);
new SsaInstructionMerger(generateAtUseSite, compiler).visitGraph(graph);
new SsaConditionMerger(
generateAtUseSite, controlFlowOperators).visitGraph(graph);
@@ -1545,11 +1546,7 @@
}
// If [JSInvocationMirror._invokeOn] has been called, we must not create a
// typed selector based on the receiver type.
- if (backend.compiler.enabledInvokeOn) {
- return selector.asUntyped;
- }
- HType receiverType = node.getDartReceiver(compiler).instructionType;
- return receiverType.refine(selector, compiler);
+ return backend.compiler.enabledInvokeOn ? selector.asUntyped : selector;
}
void registerMethodInvoke(HInvokeDynamic node) {
@@ -2577,7 +2574,8 @@
}
void visitTypeKnown(HTypeKnown node) {
- use(node.checkedInput);
+ // [HTypeKnown] instructions are removed before generating code.
+ assert(false);
}
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698