Commit 4d867c7a authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Use standard way of defining builtins

No need to have a separately defined CallDescriptor.

R=titzer@chromium.org

Change-Id: Ic7c0ee87d458fa8e55bef4d750aa7f61a763237f
Reviewed-on: https://chromium-review.googlesource.com/1098927Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53699}
parent b9b4b879
......@@ -1192,15 +1192,15 @@ namespace internal {
\
/* Wasm */ \
ASM(WasmCompileLazy) \
TFC(WasmStackGuard, WasmRuntimeCall, 1) \
TFC(ThrowWasmTrapUnreachable, WasmRuntimeCall, 1) \
TFC(ThrowWasmTrapMemOutOfBounds, WasmRuntimeCall, 1) \
TFC(ThrowWasmTrapDivByZero, WasmRuntimeCall, 1) \
TFC(ThrowWasmTrapDivUnrepresentable, WasmRuntimeCall, 1) \
TFC(ThrowWasmTrapRemByZero, WasmRuntimeCall, 1) \
TFC(ThrowWasmTrapFloatUnrepresentable, WasmRuntimeCall, 1) \
TFC(ThrowWasmTrapFuncInvalid, WasmRuntimeCall, 1) \
TFC(ThrowWasmTrapFuncSigMismatch, WasmRuntimeCall, 1) \
TFS(WasmStackGuard) \
TFS(ThrowWasmTrapUnreachable) \
TFS(ThrowWasmTrapMemOutOfBounds) \
TFS(ThrowWasmTrapDivByZero) \
TFS(ThrowWasmTrapDivUnrepresentable) \
TFS(ThrowWasmTrapRemByZero) \
TFS(ThrowWasmTrapFloatUnrepresentable) \
TFS(ThrowWasmTrapFuncInvalid) \
TFS(ThrowWasmTrapFuncSigMismatch) \
\
/* WeakMap */ \
TFJ(WeakMapConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
......
......@@ -70,7 +70,6 @@ class PlatformInterfaceDescriptor;
V(InterpreterCEntry) \
V(ResumeGenerator) \
V(FrameDropperTrampoline) \
V(WasmRuntimeCall) \
V(RunMicrotasks) \
BUILTIN_LIST_TFS(V)
......@@ -286,18 +285,13 @@ static const int kMaxBuiltinRegisterParams = 5;
\
public:
#define DEFINE_EMPTY_PARAMETERS() \
enum ParameterIndices { \
kParameterCount, \
kContext = kParameterCount /* implicit parameter */ \
};
#define DEFINE_PARAMETERS(...) \
enum ParameterIndices { \
__VA_ARGS__, \
\
kParameterCount, \
kContext = kParameterCount /* implicit parameter */ \
#define DEFINE_PARAMETERS(...) \
enum ParameterIndices { \
__dummy = -1, /* to be able to pass zero arguments */ \
##__VA_ARGS__, \
\
kParameterCount, \
kContext = kParameterCount /* implicit parameter */ \
};
#define DECLARE_BUILTIN_DESCRIPTOR(name) \
......@@ -629,7 +623,7 @@ class AbortJSDescriptor : public CallInterfaceDescriptor {
class AllocateHeapNumberDescriptor : public CallInterfaceDescriptor {
public:
DEFINE_EMPTY_PARAMETERS()
DEFINE_PARAMETERS()
DECLARE_DESCRIPTOR(AllocateHeapNumberDescriptor, CallInterfaceDescriptor)
};
......@@ -802,16 +796,9 @@ class FrameDropperTrampolineDescriptor final : public CallInterfaceDescriptor {
CallInterfaceDescriptor)
};
class WasmRuntimeCallDescriptor final : public CallInterfaceDescriptor {
public:
DEFINE_EMPTY_PARAMETERS()
DECLARE_DEFAULT_DESCRIPTOR(WasmRuntimeCallDescriptor, CallInterfaceDescriptor,
0)
};
class RunMicrotasksDescriptor final : public CallInterfaceDescriptor {
public:
DEFINE_EMPTY_PARAMETERS()
DEFINE_PARAMETERS()
DECLARE_DEFAULT_DESCRIPTOR(RunMicrotasksDescriptor, CallInterfaceDescriptor,
0)
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment