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

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

Issue 98643009: Short curcuit the inlining when code in the middle of an expression is aborting. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/from_ir_builder.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/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 31184)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -1317,7 +1317,11 @@
function, selector, providedArguments, currentNode);
enterInlinedMethod(function, currentNode, compiledArguments);
inlinedFrom(function, () {
- doInline(function);
+ if (!isReachable) {
+ emitReturn(graph.addConstantNull(compiler), null);
+ } else {
+ doInline(function);
+ }
});
leaveInlinedMethod();
}
@@ -1330,6 +1334,8 @@
return false;
}
+ void emitReturn(HInstruction value, N node);
+
void doInline(FunctionElement function);
inlinedFrom(Element element, f()) {
@@ -3989,6 +3995,11 @@
typeInfoSetterElement,
<HInstruction>[newObject, typeInfo],
backend.dynamicType);
+
+ // The new object will now be referenced through the
+ // `setRuntimeTypeInfo` call. We therefore set the type of that
+ // instruction to be of the object's type.
+ assert(stack.last is HInvokeStatic || stack.last == newObject);
stack.last.instructionType = newObject.instructionType;
return pop();
}
@@ -4864,8 +4875,6 @@
emitReturn(value, node);
}
- void emitReturn(HInstruction value, Node node);
-
visitThrow(Throw node) {
visitThrowExpression(node.expression);
if (isReachable) {
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/from_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698