diff options
Diffstat (limited to 'deps/v8/src/compiler/linkage.cc')
-rw-r--r-- | deps/v8/src/compiler/linkage.cc | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/deps/v8/src/compiler/linkage.cc b/deps/v8/src/compiler/linkage.cc index 72b7dafe98..2f22d9a6be 100644 --- a/deps/v8/src/compiler/linkage.cc +++ b/deps/v8/src/compiler/linkage.cc @@ -34,7 +34,17 @@ std::ostream& operator<<(std::ostream& os, const CallDescriptor& d) { // TODO(svenpanne) Output properties etc. and be less cryptic. return os << d.kind() << ":" << d.debug_name() << ":r" << d.ReturnCount() << "j" << d.JSParameterCount() << "i" << d.InputCount() << "f" - << d.FrameStateCount(); + << d.FrameStateCount() << "t" << d.SupportsTailCalls(); +} + + +bool CallDescriptor::HasSameReturnLocationsAs( + const CallDescriptor* other) const { + if (ReturnCount() != other->ReturnCount()) return false; + for (size_t i = 0; i < ReturnCount(); ++i) { + if (GetReturnLocation(i) != other->GetReturnLocation(i)) return false; + } + return true; } @@ -96,15 +106,11 @@ FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame, // static bool Linkage::NeedsFrameState(Runtime::FunctionId function) { - if (!FLAG_turbo_deoptimization) { - return false; - } - // Most runtime functions need a FrameState. A few chosen ones that we know // not to call into arbitrary JavaScript, not to throw, and not to deoptimize // are blacklisted here and can be called without a FrameState. switch (function) { - case Runtime::kDeclareGlobals: // TODO(jarin): Is it safe? + case Runtime::kAllocateInTargetSpace: case Runtime::kDefineClassMethod: // TODO(jarin): Is it safe? case Runtime::kDefineGetterPropertyUnchecked: // TODO(jarin): Is it safe? case Runtime::kDefineSetterPropertyUnchecked: // TODO(jarin): Is it safe? @@ -124,7 +130,6 @@ bool Linkage::NeedsFrameState(Runtime::FunctionId function) { case Runtime::kToFastProperties: // TODO(jarin): Is it safe? case Runtime::kTraceEnter: case Runtime::kTraceExit: - case Runtime::kTypeof: return false; case Runtime::kInlineArguments: case Runtime::kInlineCallFunction: @@ -146,6 +151,17 @@ bool Linkage::NeedsFrameState(Runtime::FunctionId function) { } +bool CallDescriptor::UsesOnlyRegisters() const { + for (size_t i = 0; i < InputCount(); ++i) { + if (!GetInputLocation(i).is_register()) return false; + } + for (size_t i = 0; i < ReturnCount(); ++i) { + if (!GetReturnLocation(i).is_register()) return false; + } + return true; +} + + //============================================================================== // Provide unimplemented methods on unsupported architectures, to at least link. //============================================================================== |