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

Unified Diff: src/compiler/linkage-impl.h

Issue 526953004: Lazy deoptimization for comparisons in Turbofan. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 6 years, 3 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/linkage.cc ('k') | src/compiler/operator-properties-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/linkage-impl.h
diff --git a/src/compiler/linkage-impl.h b/src/compiler/linkage-impl.h
index 88cf125540fae3101b5388e26f904966ced4f3fd..c4a8007bb8a3820608bcd84e8fc2e667e72b3d02 100644
--- a/src/compiler/linkage-impl.h
+++ b/src/compiler/linkage-impl.h
@@ -71,7 +71,7 @@ class LinkageHelper {
template <typename LinkageTraits>
static CallDescriptor* GetRuntimeCallDescriptor(
Zone* zone, Runtime::FunctionId function_id, int parameter_count,
- Operator::Property properties, CallDescriptor::Flags flags) {
+ Operator::Property properties) {
const int code_count = 1;
const int function_count = 1;
const int num_args_count = 1;
@@ -109,6 +109,10 @@ class LinkageHelper {
WordRegisterLocation(LinkageTraits::RuntimeCallArgCountReg());
locations[index++] = TaggedRegisterLocation(LinkageTraits::ContextReg());
+ CallDescriptor::Flags flags = Linkage::NeedsFrameState(function_id)
+ ? CallDescriptor::kNeedsFrameState
+ : CallDescriptor::kNoFlags;
+
// TODO(titzer): refactor TurboFan graph to consider context a value input.
return new (zone) CallDescriptor(CallDescriptor::kCallCodeObject, // kind
return_count, // return_count
@@ -196,6 +200,25 @@ class LinkageHelper {
}
};
+
+bool Linkage::NeedsFrameState(Runtime::FunctionId function) {
+ if (!FLAG_turbo_deoptimization) {
+ return false;
+ }
+ // TODO(jarin) At the moment, we only add frame state for
+ // few chosen runtime functions.
+ switch (function) {
+ case Runtime::kDebugBreak:
+ case Runtime::kDeoptimizeFunction:
+ case Runtime::kSetScriptBreakPoint:
+ case Runtime::kDebugGetLoadedScripts:
+ case Runtime::kStackGuard:
+ return true;
+ default:
+ return false;
+ }
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/compiler/operator-properties-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698