v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
asm-types.h File Reference
#include <string>
#include "src/base/compiler-specific.h"
#include "src/base/macros.h"
#include "src/zone/zone-containers.h"
#include "src/zone/zone.h"
Include dependency graph for asm-types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  v8::internal::wasm::AsmValueType
 
class  v8::internal::wasm::AsmCallableType
 
class  v8::internal::wasm::AsmFunctionType
 
class  v8::internal::wasm::AsmOverloadedFunctionType
 
class  v8::internal::wasm::AsmType
 

Namespaces

namespace  v8
 
namespace  v8::internal
 
namespace  v8::internal::wasm
 

Macros

#define FOR_EACH_ASM_VALUE_TYPE_LIST(V)
 
#define FOR_EACH_ASM_CALLABLE_TYPE_LIST(V)
 
#define DEFINE_TAG(CamelName, string_name, number, parent_types)
 
#define DECLARE_CAST(CamelName)
 
#define DEFINE_CONSTRUCTOR(CamelName, string_name, number, parent_types)
 
#define DEFINE_CAST(CamelCase)
 

Macro Definition Documentation

◆ DECLARE_CAST

#define DECLARE_CAST ( CamelName)
Value:
virtual Asm##CamelName* As##CamelName() { return nullptr; }

Definition at line 111 of file asm-types.h.

◆ DEFINE_CAST

#define DEFINE_CAST ( CamelCase)
Value:
Asm##CamelCase* As##CamelCase() { \
if (AsValueType() != nullptr) { \
return nullptr; \
} \
return reinterpret_cast<AsmCallableType*>(this)->As##CamelCase(); \
}

Definition at line 187 of file asm-types.h.

◆ DEFINE_CONSTRUCTOR

#define DEFINE_CONSTRUCTOR ( CamelName,
string_name,
number,
parent_types )
Value:
static AsmType* CamelName() { \
return AsmValueType::New(AsmValueType::kAsm##CamelName); \
}
friend AsmType
Definition asm-types.cc:160

Definition at line 180 of file asm-types.h.

◆ DEFINE_TAG

#define DEFINE_TAG ( CamelName,
string_name,
number,
parent_types )
Value:
kAsm##CamelName = ((1u << (number)) | (parent_types)),

Definition at line 65 of file asm-types.h.

◆ FOR_EACH_ASM_CALLABLE_TYPE_LIST

#define FOR_EACH_ASM_CALLABLE_TYPE_LIST ( V)
Value:
V(FunctionType) \
V(OverloadedFunctionType)
#define V(Name)

Definition at line 56 of file asm-types.h.

◆ FOR_EACH_ASM_VALUE_TYPE_LIST

#define FOR_EACH_ASM_VALUE_TYPE_LIST ( V)
Value:
/* These tags are not types that are expressable in the asm source. They */ \
/* are used to express semantic information about the types they tag. */ \
V(Heap, "[]", 1, 0) \
V(FloatishDoubleQ, "floatish|double?", 2, 0) \
V(FloatQDoubleQ, "float?|double?", 3, 0) \
/* The following are actual types that appear in the asm source. */ \
V(Void, "void", 4, 0) \
V(Extern, "extern", 5, 0) \
V(DoubleQ, "double?", 6, kAsmFloatishDoubleQ | kAsmFloatQDoubleQ) \
V(Double, "double", 7, kAsmDoubleQ | kAsmExtern) \
V(Intish, "intish", 8, 0) \
V(Int, "int", 9, kAsmIntish) \
V(Signed, "signed", 10, kAsmInt | kAsmExtern) \
V(Unsigned, "unsigned", 11, kAsmInt) \
V(FixNum, "fixnum", 12, kAsmSigned | kAsmUnsigned) \
V(Floatish, "floatish", 13, kAsmFloatishDoubleQ) \
V(FloatQ, "float?", 14, kAsmFloatQDoubleQ | kAsmFloatish) \
V(Float, "float", 15, kAsmFloatQ) \
/* Types used for expressing the Heap accesses. */ \
V(Uint8Array, "Uint8Array", 16, kAsmHeap) \
V(Int8Array, "Int8Array", 17, kAsmHeap) \
V(Uint16Array, "Uint16Array", 18, kAsmHeap) \
V(Int16Array, "Int16Array", 19, kAsmHeap) \
V(Uint32Array, "Uint32Array", 20, kAsmHeap) \
V(Int32Array, "Int32Array", 21, kAsmHeap) \
V(Float32Array, "Float32Array", 22, kAsmHeap) \
V(Float64Array, "Float64Array", 23, kAsmHeap) \
/* None is used to represent errors in the type checker. */ \
V(None, "<none>", 31, 0)

Definition at line 24 of file asm-types.h.