| Index: src/compiler/linkage.h
|
| diff --git a/src/compiler/linkage.h b/src/compiler/linkage.h
|
| index fa34adb7c2e0926f9579eecaac86a22efe2f76ff..aa680689d7ab7d9871740b2daab881f9e7710c12 100644
|
| --- a/src/compiler/linkage.h
|
| +++ b/src/compiler/linkage.h
|
| @@ -27,11 +27,23 @@ class LinkageLocation {
|
| public:
|
| explicit LinkageLocation(int location) : location_(location) {}
|
|
|
| + bool is_register() const {
|
| + return 0 <= location_ && location_ <= ANY_REGISTER;
|
| + }
|
| +
|
| static const int16_t ANY_REGISTER = 1023;
|
| static const int16_t MAX_STACK_SLOT = 32767;
|
|
|
| static LinkageLocation AnyRegister() { return LinkageLocation(ANY_REGISTER); }
|
|
|
| + bool operator==(const LinkageLocation& other) const {
|
| + return location_ == other.location_;
|
| + }
|
| +
|
| + bool operator!=(const LinkageLocation& other) const {
|
| + return !(*this == other);
|
| + }
|
| +
|
| private:
|
| friend class CallDescriptor;
|
| friend class OperandGenerator;
|
| @@ -61,6 +73,7 @@ class CallDescriptor final : public ZoneObject {
|
| kPatchableCallSite = 1u << 1,
|
| kNeedsNopAfterCall = 1u << 2,
|
| kHasExceptionHandler = 1u << 3,
|
| + kSupportsTailCalls = 1u << 4,
|
| kPatchableCallSiteWithNop = kPatchableCallSite | kNeedsNopAfterCall
|
| };
|
| typedef base::Flags<Flag> Flags;
|
| @@ -108,6 +121,7 @@ class CallDescriptor final : public ZoneObject {
|
| Flags flags() const { return flags_; }
|
|
|
| bool NeedsFrameState() const { return flags() & kNeedsFrameState; }
|
| + bool SupportsTailCalls() const { return flags() & kSupportsTailCalls; }
|
|
|
| LinkageLocation GetReturnLocation(size_t index) const {
|
| return location_sig_->GetReturn(index);
|
| @@ -137,6 +151,10 @@ class CallDescriptor final : public ZoneObject {
|
|
|
| const char* debug_name() const { return debug_name_; }
|
|
|
| + bool UsesOnlyRegisters() const;
|
| +
|
| + bool HasSameReturnLocationsAs(const CallDescriptor* other) const;
|
| +
|
| private:
|
| friend class Linkage;
|
|
|
|
|