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 { ...@@ -1192,15 +1192,15 @@ namespace internal {
\ \
/* Wasm */ \ /* Wasm */ \
ASM(WasmCompileLazy) \ ASM(WasmCompileLazy) \
TFC(WasmStackGuard, WasmRuntimeCall, 1) \ TFS(WasmStackGuard) \
TFC(ThrowWasmTrapUnreachable, WasmRuntimeCall, 1) \ TFS(ThrowWasmTrapUnreachable) \
TFC(ThrowWasmTrapMemOutOfBounds, WasmRuntimeCall, 1) \ TFS(ThrowWasmTrapMemOutOfBounds) \
TFC(ThrowWasmTrapDivByZero, WasmRuntimeCall, 1) \ TFS(ThrowWasmTrapDivByZero) \
TFC(ThrowWasmTrapDivUnrepresentable, WasmRuntimeCall, 1) \ TFS(ThrowWasmTrapDivUnrepresentable) \
TFC(ThrowWasmTrapRemByZero, WasmRuntimeCall, 1) \ TFS(ThrowWasmTrapRemByZero) \
TFC(ThrowWasmTrapFloatUnrepresentable, WasmRuntimeCall, 1) \ TFS(ThrowWasmTrapFloatUnrepresentable) \
TFC(ThrowWasmTrapFuncInvalid, WasmRuntimeCall, 1) \ TFS(ThrowWasmTrapFuncInvalid) \
TFC(ThrowWasmTrapFuncSigMismatch, WasmRuntimeCall, 1) \ TFS(ThrowWasmTrapFuncSigMismatch) \
\ \
/* WeakMap */ \ /* WeakMap */ \
TFJ(WeakMapConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ TFJ(WeakMapConstructor, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
......
...@@ -70,7 +70,6 @@ class PlatformInterfaceDescriptor; ...@@ -70,7 +70,6 @@ class PlatformInterfaceDescriptor;
V(InterpreterCEntry) \ V(InterpreterCEntry) \
V(ResumeGenerator) \ V(ResumeGenerator) \
V(FrameDropperTrampoline) \ V(FrameDropperTrampoline) \
V(WasmRuntimeCall) \
V(RunMicrotasks) \ V(RunMicrotasks) \
BUILTIN_LIST_TFS(V) BUILTIN_LIST_TFS(V)
...@@ -286,15 +285,10 @@ static const int kMaxBuiltinRegisterParams = 5; ...@@ -286,15 +285,10 @@ static const int kMaxBuiltinRegisterParams = 5;
\ \
public: public:
#define DEFINE_EMPTY_PARAMETERS() \
enum ParameterIndices { \
kParameterCount, \
kContext = kParameterCount /* implicit parameter */ \
};
#define DEFINE_PARAMETERS(...) \ #define DEFINE_PARAMETERS(...) \
enum ParameterIndices { \ enum ParameterIndices { \
__VA_ARGS__, \ __dummy = -1, /* to be able to pass zero arguments */ \
##__VA_ARGS__, \
\ \
kParameterCount, \ kParameterCount, \
kContext = kParameterCount /* implicit parameter */ \ kContext = kParameterCount /* implicit parameter */ \
...@@ -629,7 +623,7 @@ class AbortJSDescriptor : public CallInterfaceDescriptor { ...@@ -629,7 +623,7 @@ class AbortJSDescriptor : public CallInterfaceDescriptor {
class AllocateHeapNumberDescriptor : public CallInterfaceDescriptor { class AllocateHeapNumberDescriptor : public CallInterfaceDescriptor {
public: public:
DEFINE_EMPTY_PARAMETERS() DEFINE_PARAMETERS()
DECLARE_DESCRIPTOR(AllocateHeapNumberDescriptor, CallInterfaceDescriptor) DECLARE_DESCRIPTOR(AllocateHeapNumberDescriptor, CallInterfaceDescriptor)
}; };
...@@ -802,16 +796,9 @@ class FrameDropperTrampolineDescriptor final : public CallInterfaceDescriptor { ...@@ -802,16 +796,9 @@ class FrameDropperTrampolineDescriptor final : public CallInterfaceDescriptor {
CallInterfaceDescriptor) CallInterfaceDescriptor)
}; };
class WasmRuntimeCallDescriptor final : public CallInterfaceDescriptor {
public:
DEFINE_EMPTY_PARAMETERS()
DECLARE_DEFAULT_DESCRIPTOR(WasmRuntimeCallDescriptor, CallInterfaceDescriptor,
0)
};
class RunMicrotasksDescriptor final : public CallInterfaceDescriptor { class RunMicrotasksDescriptor final : public CallInterfaceDescriptor {
public: public:
DEFINE_EMPTY_PARAMETERS() DEFINE_PARAMETERS()
DECLARE_DEFAULT_DESCRIPTOR(RunMicrotasksDescriptor, CallInterfaceDescriptor, DECLARE_DEFAULT_DESCRIPTOR(RunMicrotasksDescriptor, CallInterfaceDescriptor,
0) 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