| Index: src/asmjs/asm-types.h
|
| diff --git a/src/asmjs/asm-types.h b/src/asmjs/asm-types.h
|
| index 83d4d05e8e7fe916f27c897e86502989b6ec36a5..ad7ab969e12360a0900922ecb3a21027648988d0 100644
|
| --- a/src/asmjs/asm-types.h
|
| +++ b/src/asmjs/asm-types.h
|
| @@ -110,6 +110,9 @@ class AsmCallableType : public ZoneObject {
|
| virtual AsmType* ValidateCall(AsmType* return_type,
|
| const ZoneVector<AsmType*>& args) = 0;
|
|
|
| + virtual bool CanBeInvokedWith(AsmType* return_type,
|
| + const ZoneVector<AsmType*>& args) = 0;
|
| +
|
| #define DECLARE_CAST(CamelName) \
|
| virtual Asm##CamelName* As##CamelName() { return nullptr; }
|
| FOR_EACH_ASM_CALLABLE_TYPE_LIST(DECLARE_CAST)
|
| @@ -136,6 +139,8 @@ class AsmFunctionType : public AsmCallableType {
|
|
|
| AsmType* ValidateCall(AsmType* return_type,
|
| const ZoneVector<AsmType*>& args) override;
|
| + bool CanBeInvokedWith(AsmType* return_type,
|
| + const ZoneVector<AsmType*>& args) override;
|
|
|
| protected:
|
| AsmFunctionType(Zone* zone, AsmType* return_type)
|
| @@ -168,6 +173,8 @@ class AsmOverloadedFunctionType final : public AsmCallableType {
|
| std::string Name() override;
|
| AsmType* ValidateCall(AsmType* return_type,
|
| const ZoneVector<AsmType*>& args) override;
|
| + bool CanBeInvokedWith(AsmType* return_type,
|
| + const ZoneVector<AsmType*>& args) override;
|
|
|
| ZoneVector<AsmType*> overloads_;
|
|
|
| @@ -181,6 +188,8 @@ class AsmFFIType final : public AsmCallableType {
|
| std::string Name() override { return "Function"; }
|
| AsmType* ValidateCall(AsmType* return_type,
|
| const ZoneVector<AsmType*>& args) override;
|
| + bool CanBeInvokedWith(AsmType* return_type,
|
| + const ZoneVector<AsmType*>& args) override;
|
|
|
| private:
|
| friend AsmType;
|
| @@ -198,6 +207,8 @@ class AsmFunctionTableType : public AsmCallableType {
|
|
|
| AsmType* ValidateCall(AsmType* return_type,
|
| const ZoneVector<AsmType*>& args) override;
|
| + bool CanBeInvokedWith(AsmType* return_type,
|
| + const ZoneVector<AsmType*>& args) override;
|
|
|
| size_t length() const { return length_; }
|
| AsmType* signature() { return signature_; }
|
|
|