Commit 9abc7dae authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

Rename StubCallMode::kCallOnHeapBuiltin

The kCallOnHeapBuiltin name has gotten very confusing now
that builtins are actually off the heap (and the generated code will
directly call off-heap).

Bug: v8:7777
Change-Id: Ie14069eee2fc11ef9aec64868c50832f6138ae8f
Reviewed-on: https://chromium-review.googlesource.com/c/1379883Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58291}
parent d637ab91
......@@ -743,7 +743,7 @@ StubCallMode CodeGenerator::DetermineStubCallMode() const {
return (code_kind == Code::WASM_FUNCTION ||
code_kind == Code::WASM_TO_JS_FUNCTION)
? StubCallMode::kCallWasmRuntimeStub
: StubCallMode::kCallOnHeapBuiltin;
: StubCallMode::kCallCodeObject;
}
void CodeGenerator::AssembleGaps(Instruction* instr) {
......
......@@ -1187,7 +1187,7 @@ Node* CodeAssembler::CallStubN(StubCallMode call_mode,
const CallInterfaceDescriptor& descriptor,
size_t result_size, int input_count,
Node* const* inputs) {
DCHECK(call_mode == StubCallMode::kCallOnHeapBuiltin ||
DCHECK(call_mode == StubCallMode::kCallCodeObject ||
call_mode == StubCallMode::kCallBuiltinPointer);
// implicit nodes are target and optionally context.
......@@ -1237,7 +1237,7 @@ Node* CodeAssembler::CallStubRImpl(StubCallMode call_mode,
size_t result_size, Node* target,
SloppyTNode<Object> context,
std::initializer_list<Node*> args) {
DCHECK(call_mode == StubCallMode::kCallOnHeapBuiltin ||
DCHECK(call_mode == StubCallMode::kCallCodeObject ||
call_mode == StubCallMode::kCallBuiltinPointer);
constexpr size_t kMaxNumArgs = 10;
......
......@@ -1218,8 +1218,8 @@ class V8_EXPORT_PRIVATE CodeAssembler {
TNode<T> CallStub(const CallInterfaceDescriptor& descriptor,
SloppyTNode<Code> target, SloppyTNode<Object> context,
TArgs... args) {
return UncheckedCast<T>(CallStubR(StubCallMode::kCallOnHeapBuiltin,
descriptor, 1, target, context, args...));
return UncheckedCast<T>(CallStubR(StubCallMode::kCallCodeObject, descriptor,
1, target, context, args...));
}
template <class... TArgs>
......
......@@ -399,7 +399,7 @@ CallDescriptor* Linkage::GetStubCallDescriptor(
CallDescriptor::Kind kind;
MachineType target_type;
switch (stub_mode) {
case StubCallMode::kCallOnHeapBuiltin:
case StubCallMode::kCallCodeObject:
kind = CallDescriptor::kCallCodeObject;
target_type = MachineType::AnyTagged();
break;
......
......@@ -398,7 +398,7 @@ class V8_EXPORT_PRIVATE Linkage : public NON_EXPORTED_BASE(ZoneObject) {
Zone* zone, const CallInterfaceDescriptor& descriptor,
int stack_parameter_count, CallDescriptor::Flags flags,
Operator::Properties properties = Operator::kNoProperties,
StubCallMode stub_mode = StubCallMode::kCallOnHeapBuiltin);
StubCallMode stub_mode = StubCallMode::kCallCodeObject);
static CallDescriptor* GetBytecodeDispatchCallDescriptor(
Zone* zone, const CallInterfaceDescriptor& descriptor,
......
......@@ -4690,7 +4690,7 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
}
Node* BuildChangeBigIntToInt64(Node* input, Node* context) {
DCHECK_EQ(stub_mode_, StubCallMode::kCallOnHeapBuiltin);
DCHECK_EQ(stub_mode_, StubCallMode::kCallCodeObject);
BigIntToI64Descriptor interface_descriptor;
......@@ -4700,7 +4700,7 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
interface_descriptor.GetStackParameterCount(), // stack parameter count
CallDescriptor::kNoFlags, // flags
Operator::kNoProperties, // properties
StubCallMode::kCallOnHeapBuiltin); // stub call mode
StubCallMode::kCallCodeObject); // stub call mode
Node* target = jsgraph()->HeapConstant(BUILTIN_CODE(isolate_, BigIntToI64));
......@@ -5292,7 +5292,7 @@ MaybeHandle<Code> CompileJSToWasmWrapper(Isolate* isolate,
Node* effect = nullptr;
WasmWrapperGraphBuilder builder(&zone, &jsgraph, sig, nullptr,
StubCallMode::kCallOnHeapBuiltin);
StubCallMode::kCallCodeObject);
builder.set_control_ptr(&control);
builder.set_effect_ptr(&effect);
builder.BuildJSToWasmWrapper(is_import);
......@@ -5650,7 +5650,7 @@ MaybeHandle<Code> CompileCWasmEntry(Isolate* isolate, wasm::FunctionSig* sig) {
Node* effect = nullptr;
WasmWrapperGraphBuilder builder(&zone, &jsgraph, sig, nullptr,
StubCallMode::kCallOnHeapBuiltin);
StubCallMode::kCallCodeObject);
builder.set_control_ptr(&control);
builder.set_effect_ptr(&effect);
builder.BuildCWasmEntry();
......
......@@ -1710,14 +1710,14 @@ enum IcCheckType { ELEMENT, PROPERTY };
// Helper stubs can be called in different ways depending on where the target
// code is located and how the call sequence is expected to look like:
// - OnHeapBuiltin: Call on-heap {Code} object via {RelocInfo::CODE_TARGET}.
// - CodeObject: Call on-heap {Code} object via {RelocInfo::CODE_TARGET}.
// - WasmRuntimeStub: Call native {WasmCode} stub via
// {RelocInfo::WASM_STUB_CALL}.
// - BuiltinPointer: Call a builtin based on a builtin pointer with dynamic
// contents. If builtins are embedded, we call directly into off-heap code
// without going through the on-heap Code trampoline.
enum class StubCallMode {
kCallOnHeapBuiltin,
kCallCodeObject,
kCallWasmRuntimeStub,
kCallBuiltinPointer,
};
......
......@@ -1251,7 +1251,7 @@ Node* InterpreterAssembler::CallRuntimeN(Node* function_id, Node* context,
Load(MachineType::Pointer(), function,
IntPtrConstant(offsetof(Runtime::Function, entry)));
return CallStubR(StubCallMode::kCallOnHeapBuiltin, callable.descriptor(),
return CallStubR(StubCallMode::kCallCodeObject, callable.descriptor(),
result_size, code_target, context, args.reg_count(),
args.base_reg_location(), function_entry);
}
......
......@@ -183,8 +183,8 @@ Node* IntrinsicsGenerator::IntrinsicAsStubCall(
stub_args[index++] = __ LoadRegisterFromRegisterList(args, i);
}
stub_args[index++] = context;
return __ CallStubN(StubCallMode::kCallOnHeapBuiltin, callable.descriptor(),
1, input_count, stub_args);
return __ CallStubN(StubCallMode::kCallCodeObject, callable.descriptor(), 1,
input_count, stub_args);
}
Node* IntrinsicsGenerator::IntrinsicAsBuiltinCall(
......
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