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

Unified Diff: src/asmjs/asm-types.h

Issue 2134333003: V8. ASM-2-WASM. Migrates asm-wasm-builder to the new asm-typer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addresses comments. Created 4 years, 5 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/asmjs/asm-typer.cc ('k') | src/asmjs/asm-types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_; }
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | src/asmjs/asm-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698