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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 444883006: Initial shot at deoptimizing JSCallFunction in Turbofan. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove debug print Created 6 years, 4 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 | « src/compiler/arm64/linkage-arm64.cc ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index ac5070869f41eee26104ef4d15452e4846432d42..4f469e2d2ee3cc1f17edbb058539094360d1eb4a 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -732,8 +732,13 @@ void AstGraphBuilder::VisitForInStatement(ForInStatement* stmt) {
environment()->Push(value);
// result is either the string key or Smi(0) indicating the property
// is gone.
+ // TODO(jarin) Insert lazy deoptimization support here - the call
+ // actually
+ // can deoptimize.
Node* res = ProcessArguments(
- javascript()->Call(3, NO_CALL_FUNCTION_FLAGS), 3);
+ javascript()->Call(3, NO_CALL_FUNCTION_FLAGS,
+ CallDescriptor::kCannotDeoptimize),
+ 3);
Node* property_missing = NewNode(javascript()->StrictEqual(), res,
jsgraph()->ZeroConstant());
{
@@ -1256,9 +1261,12 @@ void AstGraphBuilder::VisitCall(Call* expr) {
}
// Create node to perform the function call.
- Operator* call = javascript()->Call(args->length() + 2, flags);
+ Operator* call = javascript()->Call(args->length() + 2, flags,
+ CallDescriptor::kCanDeoptimize);
Node* value = ProcessArguments(call, args->length() + 2);
ast_context()->ProduceValue(value);
+
+ BuildLazyBailout(value, expr->id());
}
@@ -1293,9 +1301,12 @@ void AstGraphBuilder::VisitCallJSRuntime(CallRuntime* expr) {
VisitForValues(args);
// Create node to perform the JS runtime call.
- Operator* call = javascript()->Call(args->length() + 2, flags);
+ Operator* call = javascript()->Call(args->length() + 2, flags,
+ CallDescriptor::kCanDeoptimize);
Node* value = ProcessArguments(call, args->length() + 2);
ast_context()->ProduceValue(value);
+
+ BuildLazyBailout(value, expr->id());
}
« no previous file with comments | « src/compiler/arm64/linkage-arm64.cc ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698