Make CallInterfaceDescriptor isolate-independent
Currently each isolate stores its own array of {CallInterfaceDescriptorData}. This array has size 173, and each entry has 40 bytes. That's already 7kB per isolate. Additionally, each {CallInterfaceDescriptorData} allocates two heap-allocated arrays, which probably add up to more than the static size of the {CallInterfaceDescriptorData}. Note that all the {CallInterfaceDescriptorData} instances are initialized eagerly on isolate creation. Since {CallInterfaceDescriptor} is totally isolate independent itself, this CL refactors the current design to avoid a copy of them per isolate, and instead shares them process-wide. Still, we need to free the allocated heap arrays when the last isolate dies to avoid leaks. This can probably be refactored later by statically initializing more and avoiding the heap allocations all together. This refactoring will also allow us to use {CallInterfaceDescriptor}s from wasm background compilation threads, which are not bound to any isolate. R=mstarzinger@chromium.org, titzer@chromium.org Bug: v8:6600 Change-Id: If8625b89951eec8fa8986b49a5c166e874a72494 Reviewed-on: https://chromium-review.googlesource.com/1100879 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#53803}
This commit is contained in:
parent
467eb1497e
commit
3cb376dc83
@ -4066,9 +4066,8 @@ void ArrayBuiltinsAssembler::TailCallArrayConstructorStub(
|
|||||||
// pops the current frame but leaves all the incoming JS arguments on the
|
// pops the current frame but leaves all the incoming JS arguments on the
|
||||||
// expression stack so that the target builtin can still find them where it
|
// expression stack so that the target builtin can still find them where it
|
||||||
// expects.
|
// expects.
|
||||||
ArrayNArgumentsConstructorDescriptor descriptor(isolate());
|
TailCallStub(ArrayNArgumentsConstructorDescriptor{}, code, context, target,
|
||||||
TailCallStub(descriptor, code, context, target, allocation_site_or_undefined,
|
allocation_site_or_undefined, argc);
|
||||||
argc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArrayBuiltinsAssembler::CreateArrayDispatchNoArgument(
|
void ArrayBuiltinsAssembler::CreateArrayDispatchNoArgument(
|
||||||
|
@ -33,7 +33,7 @@ TF_BUILTIN(WasmArgumentsAdaptor, CodeStubAssembler) {
|
|||||||
MachineType::TaggedPointer(), roots,
|
MachineType::TaggedPointer(), roots,
|
||||||
IntPtrConstant(Heap::roots_to_builtins_offset() +
|
IntPtrConstant(Heap::roots_to_builtins_offset() +
|
||||||
Builtins::kArgumentsAdaptorTrampoline * kPointerSize)));
|
Builtins::kArgumentsAdaptorTrampoline * kPointerSize)));
|
||||||
TailCallStub(ArgumentAdaptorDescriptor(isolate()), target, context, function,
|
TailCallStub(ArgumentAdaptorDescriptor{}, target, context, function,
|
||||||
new_target, argc1, argc2);
|
new_target, argc1, argc2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,8 +54,7 @@ TF_BUILTIN(WasmCallJavaScript, CodeStubAssembler) {
|
|||||||
Load(MachineType::TaggedPointer(), roots,
|
Load(MachineType::TaggedPointer(), roots,
|
||||||
IntPtrConstant(Heap::roots_to_builtins_offset() +
|
IntPtrConstant(Heap::roots_to_builtins_offset() +
|
||||||
Builtins::kCall_ReceiverIsAny * kPointerSize)));
|
Builtins::kCall_ReceiverIsAny * kPointerSize)));
|
||||||
TailCallStub(CallTrampolineDescriptor(isolate()), target, context, function,
|
TailCallStub(CallTrampolineDescriptor{}, target, context, function, argc);
|
||||||
argc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TF_BUILTIN(WasmStackGuard, CodeStubAssembler) {
|
TF_BUILTIN(WasmStackGuard, CodeStubAssembler) {
|
||||||
|
@ -159,11 +159,11 @@ Callable Builtins::CallableFor(Isolate* isolate, Name name) {
|
|||||||
default:
|
default:
|
||||||
Builtins::Kind kind = Builtins::KindOf(name);
|
Builtins::Kind kind = Builtins::KindOf(name);
|
||||||
if (kind == TFJ || kind == CPP) {
|
if (kind == TFJ || kind == CPP) {
|
||||||
return Callable(code, BuiltinDescriptor(isolate));
|
return Callable(code, BuiltinDescriptor{});
|
||||||
}
|
}
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
CallInterfaceDescriptor descriptor(isolate, key);
|
CallInterfaceDescriptor descriptor(key);
|
||||||
return Callable(code, descriptor);
|
return Callable(code, descriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ Code* BuildWithCodeStubAssemblerCS(Isolate* isolate, int32_t builtin_index,
|
|||||||
Zone zone(isolate->allocator(), ZONE_NAME, segment_size);
|
Zone zone(isolate->allocator(), ZONE_NAME, segment_size);
|
||||||
// The interface descriptor with given key must be initialized at this point
|
// The interface descriptor with given key must be initialized at this point
|
||||||
// and this construction just queries the details from the descriptors table.
|
// and this construction just queries the details from the descriptors table.
|
||||||
CallInterfaceDescriptor descriptor(isolate, interface_descriptor);
|
CallInterfaceDescriptor descriptor(interface_descriptor);
|
||||||
// Ensure descriptor is already initialized.
|
// Ensure descriptor is already initialized.
|
||||||
DCHECK_LE(0, descriptor.GetRegisterParameterCount());
|
DCHECK_LE(0, descriptor.GetRegisterParameterCount());
|
||||||
compiler::CodeAssemblerState state(
|
compiler::CodeAssemblerState state(
|
||||||
@ -233,7 +233,6 @@ void SetupIsolateDelegate::SetupBuiltinsInternal(Isolate* isolate) {
|
|||||||
isolate, index, &Builtins::Generate_##Name, Argc, #Name); \
|
isolate, index, &Builtins::Generate_##Name, Argc, #Name); \
|
||||||
AddBuiltin(builtins, index++, code);
|
AddBuiltin(builtins, index++, code);
|
||||||
#define BUILD_TFC(Name, InterfaceDescriptor, result_size) \
|
#define BUILD_TFC(Name, InterfaceDescriptor, result_size) \
|
||||||
{ InterfaceDescriptor##Descriptor descriptor(isolate); } \
|
|
||||||
code = BuildWithCodeStubAssemblerCS( \
|
code = BuildWithCodeStubAssemblerCS( \
|
||||||
isolate, index, &Builtins::Generate_##Name, \
|
isolate, index, &Builtins::Generate_##Name, \
|
||||||
CallDescriptors::InterfaceDescriptor, #Name, result_size); \
|
CallDescriptors::InterfaceDescriptor, #Name, result_size); \
|
||||||
@ -245,7 +244,6 @@ void SetupIsolateDelegate::SetupBuiltinsInternal(Isolate* isolate) {
|
|||||||
CallDescriptors::Name, #Name, 1); \
|
CallDescriptors::Name, #Name, 1); \
|
||||||
AddBuiltin(builtins, index++, code);
|
AddBuiltin(builtins, index++, code);
|
||||||
#define BUILD_TFH(Name, InterfaceDescriptor) \
|
#define BUILD_TFH(Name, InterfaceDescriptor) \
|
||||||
{ InterfaceDescriptor##Descriptor descriptor(isolate); } \
|
|
||||||
/* Return size for IC builtins/handlers is always 1. */ \
|
/* Return size for IC builtins/handlers is always 1. */ \
|
||||||
code = BuildWithCodeStubAssemblerCS( \
|
code = BuildWithCodeStubAssemblerCS( \
|
||||||
isolate, index, &Builtins::Generate_##Name, \
|
isolate, index, &Builtins::Generate_##Name, \
|
||||||
|
@ -18,7 +18,7 @@ namespace {
|
|||||||
template <typename Stub>
|
template <typename Stub>
|
||||||
Callable make_callable(Stub& stub) {
|
Callable make_callable(Stub& stub) {
|
||||||
typedef typename Stub::Descriptor Descriptor;
|
typedef typename Stub::Descriptor Descriptor;
|
||||||
return Callable(stub.GetCode(), Descriptor(stub.isolate()));
|
return Callable(stub.GetCode(), Descriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
@ -70,8 +70,7 @@ Handle<Code> CodeFactory::CEntry(Isolate* isolate, int result_size,
|
|||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::ApiGetter(Isolate* isolate) {
|
Callable CodeFactory::ApiGetter(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, CallApiGetter),
|
return Callable(BUILTIN_CODE(isolate, CallApiGetter), ApiGetterDescriptor{});
|
||||||
ApiGetterDescriptor(isolate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@ -79,10 +78,10 @@ Callable CodeFactory::CallApiCallback(Isolate* isolate, int argc) {
|
|||||||
switch (argc) {
|
switch (argc) {
|
||||||
case 0:
|
case 0:
|
||||||
return Callable(BUILTIN_CODE(isolate, CallApiCallback_Argc0),
|
return Callable(BUILTIN_CODE(isolate, CallApiCallback_Argc0),
|
||||||
ApiCallbackDescriptor(isolate));
|
ApiCallbackDescriptor{});
|
||||||
case 1:
|
case 1:
|
||||||
return Callable(BUILTIN_CODE(isolate, CallApiCallback_Argc1),
|
return Callable(BUILTIN_CODE(isolate, CallApiCallback_Argc1),
|
||||||
ApiCallbackDescriptor(isolate));
|
ApiCallbackDescriptor{});
|
||||||
default: {
|
default: {
|
||||||
CallApiCallbackStub stub(isolate, argc);
|
CallApiCallbackStub stub(isolate, argc);
|
||||||
return make_callable(stub);
|
return make_callable(stub);
|
||||||
@ -97,7 +96,7 @@ Callable CodeFactory::LoadGlobalIC(Isolate* isolate, TypeofMode typeof_mode) {
|
|||||||
typeof_mode == NOT_INSIDE_TYPEOF
|
typeof_mode == NOT_INSIDE_TYPEOF
|
||||||
? BUILTIN_CODE(isolate, LoadGlobalICTrampoline)
|
? BUILTIN_CODE(isolate, LoadGlobalICTrampoline)
|
||||||
: BUILTIN_CODE(isolate, LoadGlobalICInsideTypeofTrampoline),
|
: BUILTIN_CODE(isolate, LoadGlobalICInsideTypeofTrampoline),
|
||||||
LoadGlobalDescriptor(isolate));
|
LoadGlobalDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@ -106,21 +105,19 @@ Callable CodeFactory::LoadGlobalICInOptimizedCode(Isolate* isolate,
|
|||||||
return Callable(typeof_mode == NOT_INSIDE_TYPEOF
|
return Callable(typeof_mode == NOT_INSIDE_TYPEOF
|
||||||
? BUILTIN_CODE(isolate, LoadGlobalIC)
|
? BUILTIN_CODE(isolate, LoadGlobalIC)
|
||||||
: BUILTIN_CODE(isolate, LoadGlobalICInsideTypeof),
|
: BUILTIN_CODE(isolate, LoadGlobalICInsideTypeof),
|
||||||
LoadGlobalWithVectorDescriptor(isolate));
|
LoadGlobalWithVectorDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
Callable CodeFactory::StoreOwnIC(Isolate* isolate) {
|
Callable CodeFactory::StoreOwnIC(Isolate* isolate) {
|
||||||
// TODO(ishell): Currently we use StoreOwnIC only for storing properties that
|
// TODO(ishell): Currently we use StoreOwnIC only for storing properties that
|
||||||
// already exist in the boilerplate therefore we can use StoreIC.
|
// already exist in the boilerplate therefore we can use StoreIC.
|
||||||
return Callable(BUILTIN_CODE(isolate, StoreICTrampoline),
|
return Callable(BUILTIN_CODE(isolate, StoreICTrampoline), StoreDescriptor{});
|
||||||
StoreDescriptor(isolate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Callable CodeFactory::StoreOwnICInOptimizedCode(Isolate* isolate) {
|
Callable CodeFactory::StoreOwnICInOptimizedCode(Isolate* isolate) {
|
||||||
// TODO(ishell): Currently we use StoreOwnIC only for storing properties that
|
// TODO(ishell): Currently we use StoreOwnIC only for storing properties that
|
||||||
// already exist in the boilerplate therefore we can use StoreIC.
|
// already exist in the boilerplate therefore we can use StoreIC.
|
||||||
return Callable(BUILTIN_CODE(isolate, StoreIC),
|
return Callable(BUILTIN_CODE(isolate, StoreIC), StoreWithVectorDescriptor{});
|
||||||
StoreWithVectorDescriptor(isolate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@ -158,14 +155,14 @@ Callable CodeFactory::BinaryOperation(Isolate* isolate, Operation op) {
|
|||||||
Callable CodeFactory::NonPrimitiveToPrimitive(Isolate* isolate,
|
Callable CodeFactory::NonPrimitiveToPrimitive(Isolate* isolate,
|
||||||
ToPrimitiveHint hint) {
|
ToPrimitiveHint hint) {
|
||||||
return Callable(isolate->builtins()->NonPrimitiveToPrimitive(hint),
|
return Callable(isolate->builtins()->NonPrimitiveToPrimitive(hint),
|
||||||
TypeConversionDescriptor(isolate));
|
TypeConversionDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::OrdinaryToPrimitive(Isolate* isolate,
|
Callable CodeFactory::OrdinaryToPrimitive(Isolate* isolate,
|
||||||
OrdinaryToPrimitiveHint hint) {
|
OrdinaryToPrimitiveHint hint) {
|
||||||
return Callable(isolate->builtins()->OrdinaryToPrimitive(hint),
|
return Callable(isolate->builtins()->OrdinaryToPrimitive(hint),
|
||||||
TypeConversionDescriptor(isolate));
|
TypeConversionDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@ -196,110 +193,107 @@ Callable CodeFactory::StringAdd(Isolate* isolate, StringAddFlags flags,
|
|||||||
// static
|
// static
|
||||||
Callable CodeFactory::ResumeGenerator(Isolate* isolate) {
|
Callable CodeFactory::ResumeGenerator(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, ResumeGeneratorTrampoline),
|
return Callable(BUILTIN_CODE(isolate, ResumeGeneratorTrampoline),
|
||||||
ResumeGeneratorDescriptor(isolate));
|
ResumeGeneratorDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::FrameDropperTrampoline(Isolate* isolate) {
|
Callable CodeFactory::FrameDropperTrampoline(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, FrameDropperTrampoline),
|
return Callable(BUILTIN_CODE(isolate, FrameDropperTrampoline),
|
||||||
FrameDropperTrampolineDescriptor(isolate));
|
FrameDropperTrampolineDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::HandleDebuggerStatement(Isolate* isolate) {
|
Callable CodeFactory::HandleDebuggerStatement(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, HandleDebuggerStatement),
|
return Callable(BUILTIN_CODE(isolate, HandleDebuggerStatement),
|
||||||
ContextOnlyDescriptor(isolate));
|
ContextOnlyDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::FastNewFunctionContext(Isolate* isolate,
|
Callable CodeFactory::FastNewFunctionContext(Isolate* isolate,
|
||||||
ScopeType scope_type) {
|
ScopeType scope_type) {
|
||||||
return Callable(isolate->builtins()->NewFunctionContext(scope_type),
|
return Callable(isolate->builtins()->NewFunctionContext(scope_type),
|
||||||
FastNewFunctionContextDescriptor(isolate));
|
FastNewFunctionContextDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::ArgumentAdaptor(Isolate* isolate) {
|
Callable CodeFactory::ArgumentAdaptor(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, ArgumentsAdaptorTrampoline),
|
return Callable(BUILTIN_CODE(isolate, ArgumentsAdaptorTrampoline),
|
||||||
ArgumentAdaptorDescriptor(isolate));
|
ArgumentAdaptorDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::Call(Isolate* isolate, ConvertReceiverMode mode) {
|
Callable CodeFactory::Call(Isolate* isolate, ConvertReceiverMode mode) {
|
||||||
return Callable(isolate->builtins()->Call(mode),
|
return Callable(isolate->builtins()->Call(mode), CallTrampolineDescriptor{});
|
||||||
CallTrampolineDescriptor(isolate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::CallWithArrayLike(Isolate* isolate) {
|
Callable CodeFactory::CallWithArrayLike(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, CallWithArrayLike),
|
return Callable(BUILTIN_CODE(isolate, CallWithArrayLike),
|
||||||
CallWithArrayLikeDescriptor(isolate));
|
CallWithArrayLikeDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::CallWithSpread(Isolate* isolate) {
|
Callable CodeFactory::CallWithSpread(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, CallWithSpread),
|
return Callable(BUILTIN_CODE(isolate, CallWithSpread),
|
||||||
CallWithSpreadDescriptor(isolate));
|
CallWithSpreadDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::CallFunction(Isolate* isolate, ConvertReceiverMode mode) {
|
Callable CodeFactory::CallFunction(Isolate* isolate, ConvertReceiverMode mode) {
|
||||||
return Callable(isolate->builtins()->CallFunction(mode),
|
return Callable(isolate->builtins()->CallFunction(mode),
|
||||||
CallTrampolineDescriptor(isolate));
|
CallTrampolineDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::CallVarargs(Isolate* isolate) {
|
Callable CodeFactory::CallVarargs(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, CallVarargs),
|
return Callable(BUILTIN_CODE(isolate, CallVarargs), CallVarargsDescriptor{});
|
||||||
CallVarargsDescriptor(isolate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::CallForwardVarargs(Isolate* isolate) {
|
Callable CodeFactory::CallForwardVarargs(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, CallForwardVarargs),
|
return Callable(BUILTIN_CODE(isolate, CallForwardVarargs),
|
||||||
CallForwardVarargsDescriptor(isolate));
|
CallForwardVarargsDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::CallFunctionForwardVarargs(Isolate* isolate) {
|
Callable CodeFactory::CallFunctionForwardVarargs(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, CallFunctionForwardVarargs),
|
return Callable(BUILTIN_CODE(isolate, CallFunctionForwardVarargs),
|
||||||
CallForwardVarargsDescriptor(isolate));
|
CallForwardVarargsDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::Construct(Isolate* isolate) {
|
Callable CodeFactory::Construct(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, Construct),
|
return Callable(BUILTIN_CODE(isolate, Construct), JSTrampolineDescriptor{});
|
||||||
JSTrampolineDescriptor(isolate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::ConstructWithSpread(Isolate* isolate) {
|
Callable CodeFactory::ConstructWithSpread(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, ConstructWithSpread),
|
return Callable(BUILTIN_CODE(isolate, ConstructWithSpread),
|
||||||
ConstructWithSpreadDescriptor(isolate));
|
ConstructWithSpreadDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::ConstructFunction(Isolate* isolate) {
|
Callable CodeFactory::ConstructFunction(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, ConstructFunction),
|
return Callable(BUILTIN_CODE(isolate, ConstructFunction),
|
||||||
JSTrampolineDescriptor(isolate));
|
JSTrampolineDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::ConstructVarargs(Isolate* isolate) {
|
Callable CodeFactory::ConstructVarargs(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, ConstructVarargs),
|
return Callable(BUILTIN_CODE(isolate, ConstructVarargs),
|
||||||
ConstructVarargsDescriptor(isolate));
|
ConstructVarargsDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::ConstructForwardVarargs(Isolate* isolate) {
|
Callable CodeFactory::ConstructForwardVarargs(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, ConstructForwardVarargs),
|
return Callable(BUILTIN_CODE(isolate, ConstructForwardVarargs),
|
||||||
ConstructForwardVarargsDescriptor(isolate));
|
ConstructForwardVarargsDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::ConstructFunctionForwardVarargs(Isolate* isolate) {
|
Callable CodeFactory::ConstructFunctionForwardVarargs(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, ConstructFunctionForwardVarargs),
|
return Callable(BUILTIN_CODE(isolate, ConstructFunctionForwardVarargs),
|
||||||
ConstructForwardVarargsDescriptor(isolate));
|
ConstructForwardVarargsDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@ -308,14 +302,14 @@ Callable CodeFactory::InterpreterPushArgsThenCall(
|
|||||||
InterpreterPushArgsMode mode) {
|
InterpreterPushArgsMode mode) {
|
||||||
return Callable(
|
return Callable(
|
||||||
isolate->builtins()->InterpreterPushArgsThenCall(receiver_mode, mode),
|
isolate->builtins()->InterpreterPushArgsThenCall(receiver_mode, mode),
|
||||||
InterpreterPushArgsThenCallDescriptor(isolate));
|
InterpreterPushArgsThenCallDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::InterpreterPushArgsThenConstruct(
|
Callable CodeFactory::InterpreterPushArgsThenConstruct(
|
||||||
Isolate* isolate, InterpreterPushArgsMode mode) {
|
Isolate* isolate, InterpreterPushArgsMode mode) {
|
||||||
return Callable(isolate->builtins()->InterpreterPushArgsThenConstruct(mode),
|
return Callable(isolate->builtins()->InterpreterPushArgsThenConstruct(mode),
|
||||||
InterpreterPushArgsThenConstructDescriptor(isolate));
|
InterpreterPushArgsThenConstructDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@ -324,13 +318,13 @@ Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) {
|
|||||||
// save fpregs too.
|
// save fpregs too.
|
||||||
Handle<Code> code = CodeFactory::CEntry(isolate, result_size, kDontSaveFPRegs,
|
Handle<Code> code = CodeFactory::CEntry(isolate, result_size, kDontSaveFPRegs,
|
||||||
kArgvInRegister);
|
kArgvInRegister);
|
||||||
return Callable(code, InterpreterCEntryDescriptor(isolate));
|
return Callable(code, InterpreterCEntryDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::InterpreterOnStackReplacement(Isolate* isolate) {
|
Callable CodeFactory::InterpreterOnStackReplacement(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, InterpreterOnStackReplacement),
|
return Callable(BUILTIN_CODE(isolate, InterpreterOnStackReplacement),
|
||||||
ContextOnlyDescriptor(isolate));
|
ContextOnlyDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@ -342,7 +336,7 @@ Callable CodeFactory::ArrayNoArgumentConstructor(
|
|||||||
return Callable( \
|
return Callable( \
|
||||||
BUILTIN_CODE(isolate, \
|
BUILTIN_CODE(isolate, \
|
||||||
ArrayNoArgumentConstructor_##kind_camel##_##mode_camel), \
|
ArrayNoArgumentConstructor_##kind_camel##_##mode_camel), \
|
||||||
ArrayNoArgumentConstructorDescriptor(isolate))
|
ArrayNoArgumentConstructorDescriptor{})
|
||||||
if (override_mode == DONT_OVERRIDE && AllocationSite::ShouldTrack(kind)) {
|
if (override_mode == DONT_OVERRIDE && AllocationSite::ShouldTrack(kind)) {
|
||||||
DCHECK(IsSmiElementsKind(kind));
|
DCHECK(IsSmiElementsKind(kind));
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
@ -378,7 +372,7 @@ Callable CodeFactory::ArraySingleArgumentConstructor(
|
|||||||
BUILTIN_CODE( \
|
BUILTIN_CODE( \
|
||||||
isolate, \
|
isolate, \
|
||||||
ArraySingleArgumentConstructor_##kind_camel##_##mode_camel), \
|
ArraySingleArgumentConstructor_##kind_camel##_##mode_camel), \
|
||||||
ArraySingleArgumentConstructorDescriptor(isolate))
|
ArraySingleArgumentConstructorDescriptor{})
|
||||||
if (override_mode == DONT_OVERRIDE && AllocationSite::ShouldTrack(kind)) {
|
if (override_mode == DONT_OVERRIDE && AllocationSite::ShouldTrack(kind)) {
|
||||||
DCHECK(IsSmiElementsKind(kind));
|
DCHECK(IsSmiElementsKind(kind));
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
@ -411,11 +405,11 @@ Callable CodeFactory::InternalArrayNoArgumentConstructor(Isolate* isolate,
|
|||||||
case PACKED_ELEMENTS:
|
case PACKED_ELEMENTS:
|
||||||
return Callable(
|
return Callable(
|
||||||
BUILTIN_CODE(isolate, InternalArrayNoArgumentConstructor_Packed),
|
BUILTIN_CODE(isolate, InternalArrayNoArgumentConstructor_Packed),
|
||||||
ArrayNoArgumentConstructorDescriptor(isolate));
|
ArrayNoArgumentConstructorDescriptor{});
|
||||||
case HOLEY_ELEMENTS:
|
case HOLEY_ELEMENTS:
|
||||||
return Callable(
|
return Callable(
|
||||||
BUILTIN_CODE(isolate, InternalArrayNoArgumentConstructor_Holey),
|
BUILTIN_CODE(isolate, InternalArrayNoArgumentConstructor_Holey),
|
||||||
ArrayNoArgumentConstructorDescriptor(isolate));
|
ArrayNoArgumentConstructorDescriptor{});
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
@ -428,11 +422,11 @@ Callable CodeFactory::InternalArraySingleArgumentConstructor(
|
|||||||
case PACKED_ELEMENTS:
|
case PACKED_ELEMENTS:
|
||||||
return Callable(
|
return Callable(
|
||||||
BUILTIN_CODE(isolate, InternalArraySingleArgumentConstructor_Packed),
|
BUILTIN_CODE(isolate, InternalArraySingleArgumentConstructor_Packed),
|
||||||
ArraySingleArgumentConstructorDescriptor(isolate));
|
ArraySingleArgumentConstructorDescriptor{});
|
||||||
case HOLEY_ELEMENTS:
|
case HOLEY_ELEMENTS:
|
||||||
return Callable(
|
return Callable(
|
||||||
BUILTIN_CODE(isolate, InternalArraySingleArgumentConstructor_Holey),
|
BUILTIN_CODE(isolate, InternalArraySingleArgumentConstructor_Holey),
|
||||||
ArraySingleArgumentConstructorDescriptor(isolate));
|
ArraySingleArgumentConstructorDescriptor{});
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
@ -440,36 +434,35 @@ Callable CodeFactory::InternalArraySingleArgumentConstructor(
|
|||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::ArrayPop(Isolate* isolate) {
|
Callable CodeFactory::ArrayPop(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, ArrayPop), BuiltinDescriptor(isolate));
|
return Callable(BUILTIN_CODE(isolate, ArrayPop), BuiltinDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::ArrayShift(Isolate* isolate) {
|
Callable CodeFactory::ArrayShift(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, ArrayShift),
|
return Callable(BUILTIN_CODE(isolate, ArrayShift), BuiltinDescriptor{});
|
||||||
BuiltinDescriptor(isolate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::ExtractFastJSArray(Isolate* isolate) {
|
Callable CodeFactory::ExtractFastJSArray(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, ExtractFastJSArray),
|
return Callable(BUILTIN_CODE(isolate, ExtractFastJSArray),
|
||||||
ExtractFastJSArrayDescriptor(isolate));
|
ExtractFastJSArrayDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::CloneFastJSArray(Isolate* isolate) {
|
Callable CodeFactory::CloneFastJSArray(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, CloneFastJSArray),
|
return Callable(BUILTIN_CODE(isolate, CloneFastJSArray),
|
||||||
CloneFastJSArrayDescriptor(isolate));
|
CloneFastJSArrayDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::ArrayPush(Isolate* isolate) {
|
Callable CodeFactory::ArrayPush(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, ArrayPush), BuiltinDescriptor(isolate));
|
return Callable(BUILTIN_CODE(isolate, ArrayPush), BuiltinDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Callable CodeFactory::FunctionPrototypeBind(Isolate* isolate) {
|
Callable CodeFactory::FunctionPrototypeBind(Isolate* isolate) {
|
||||||
return Callable(BUILTIN_CODE(isolate, FunctionPrototypeBind),
|
return Callable(BUILTIN_CODE(isolate, FunctionPrototypeBind),
|
||||||
BuiltinDescriptor(isolate));
|
BuiltinDescriptor{});
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
@ -11240,7 +11240,7 @@ Node* CodeStubAssembler::InstanceOf(Node* object, Node* callable,
|
|||||||
//
|
//
|
||||||
// Call to Function.prototype[@@hasInstance] directly.
|
// Call to Function.prototype[@@hasInstance] directly.
|
||||||
Callable builtin(BUILTIN_CODE(isolate(), FunctionPrototypeHasInstance),
|
Callable builtin(BUILTIN_CODE(isolate(), FunctionPrototypeHasInstance),
|
||||||
CallTrampolineDescriptor(isolate()));
|
CallTrampolineDescriptor{});
|
||||||
Node* result = CallJS(builtin, context, inst_of_handler, callable, object);
|
Node* result = CallJS(builtin, context, inst_of_handler, callable, object);
|
||||||
var_result.Bind(result);
|
var_result.Bind(result);
|
||||||
Goto(&return_result);
|
Goto(&return_result);
|
||||||
|
@ -241,7 +241,7 @@ class CodeStub : public ZoneObject {
|
|||||||
public: \
|
public: \
|
||||||
typedef NAME##Descriptor Descriptor; \
|
typedef NAME##Descriptor Descriptor; \
|
||||||
CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { \
|
CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { \
|
||||||
return Descriptor(isolate()); \
|
return Descriptor(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
// There are some code stubs we just can't describe right now with a
|
// There are some code stubs we just can't describe right now with a
|
||||||
|
@ -50,7 +50,7 @@ CodeAssemblerState::CodeAssemblerState(
|
|||||||
: CodeAssemblerState(
|
: CodeAssemblerState(
|
||||||
isolate, zone,
|
isolate, zone,
|
||||||
Linkage::GetStubCallDescriptor(
|
Linkage::GetStubCallDescriptor(
|
||||||
isolate, zone, descriptor, descriptor.GetStackParameterCount(),
|
zone, descriptor, descriptor.GetStackParameterCount(),
|
||||||
CallDescriptor::kNoFlags, Operator::kNoProperties,
|
CallDescriptor::kNoFlags, Operator::kNoProperties,
|
||||||
MachineType::AnyTagged(), result_size),
|
MachineType::AnyTagged(), result_size),
|
||||||
kind, name, poisoning_level, stub_key, builtin_index) {}
|
kind, name, poisoning_level, stub_key, builtin_index) {}
|
||||||
@ -1140,9 +1140,8 @@ Node* CodeAssembler::CallStubN(const CallInterfaceDescriptor& descriptor,
|
|||||||
int stack_parameter_count = argc - descriptor.GetRegisterParameterCount();
|
int stack_parameter_count = argc - descriptor.GetRegisterParameterCount();
|
||||||
DCHECK_LE(descriptor.GetStackParameterCount(), stack_parameter_count);
|
DCHECK_LE(descriptor.GetStackParameterCount(), stack_parameter_count);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), descriptor, stack_parameter_count,
|
zone(), descriptor, stack_parameter_count, CallDescriptor::kNoFlags,
|
||||||
CallDescriptor::kNoFlags, Operator::kNoProperties,
|
Operator::kNoProperties, MachineType::AnyTagged(), result_size,
|
||||||
MachineType::AnyTagged(), result_size,
|
|
||||||
pass_context ? Linkage::kPassContext : Linkage::kNoContext);
|
pass_context ? Linkage::kPassContext : Linkage::kNoContext);
|
||||||
|
|
||||||
CallPrologue();
|
CallPrologue();
|
||||||
@ -1160,7 +1159,7 @@ void CodeAssembler::TailCallStubImpl(const CallInterfaceDescriptor& descriptor,
|
|||||||
DCHECK_EQ(descriptor.GetParameterCount(), args.size());
|
DCHECK_EQ(descriptor.GetParameterCount(), args.size());
|
||||||
size_t result_size = 1;
|
size_t result_size = 1;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), descriptor, descriptor.GetStackParameterCount(),
|
zone(), descriptor, descriptor.GetStackParameterCount(),
|
||||||
CallDescriptor::kNoFlags, Operator::kNoProperties,
|
CallDescriptor::kNoFlags, Operator::kNoProperties,
|
||||||
MachineType::AnyTagged(), result_size);
|
MachineType::AnyTagged(), result_size);
|
||||||
|
|
||||||
@ -1200,9 +1199,8 @@ Node* CodeAssembler::TailCallStubThenBytecodeDispatchImpl(
|
|||||||
int stack_parameter_count = argc - descriptor.GetRegisterParameterCount();
|
int stack_parameter_count = argc - descriptor.GetRegisterParameterCount();
|
||||||
DCHECK_LE(descriptor.GetStackParameterCount(), stack_parameter_count);
|
DCHECK_LE(descriptor.GetStackParameterCount(), stack_parameter_count);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), descriptor, stack_parameter_count,
|
zone(), descriptor, stack_parameter_count, CallDescriptor::kNoFlags,
|
||||||
CallDescriptor::kNoFlags, Operator::kNoProperties,
|
Operator::kNoProperties, MachineType::AnyTagged(), 0);
|
||||||
MachineType::AnyTagged(), 0);
|
|
||||||
|
|
||||||
NodeArray<kMaxNumArgs + 2> inputs;
|
NodeArray<kMaxNumArgs + 2> inputs;
|
||||||
inputs.Add(target);
|
inputs.Add(target);
|
||||||
@ -1218,7 +1216,7 @@ Node* CodeAssembler::TailCallBytecodeDispatch(
|
|||||||
const CallInterfaceDescriptor& descriptor, Node* target, TArgs... args) {
|
const CallInterfaceDescriptor& descriptor, Node* target, TArgs... args) {
|
||||||
DCHECK_EQ(descriptor.GetParameterCount(), sizeof...(args));
|
DCHECK_EQ(descriptor.GetParameterCount(), sizeof...(args));
|
||||||
auto call_descriptor = Linkage::GetBytecodeDispatchCallDescriptor(
|
auto call_descriptor = Linkage::GetBytecodeDispatchCallDescriptor(
|
||||||
isolate(), zone(), descriptor, descriptor.GetStackParameterCount());
|
zone(), descriptor, descriptor.GetStackParameterCount());
|
||||||
|
|
||||||
Node* nodes[] = {target, args...};
|
Node* nodes[] = {target, args...};
|
||||||
CHECK_EQ(descriptor.GetParameterCount() + 1, arraysize(nodes));
|
CHECK_EQ(descriptor.GetParameterCount() + 1, arraysize(nodes));
|
||||||
@ -1236,10 +1234,10 @@ TNode<Object> CodeAssembler::TailCallJSCode(TNode<Code> code,
|
|||||||
TNode<JSFunction> function,
|
TNode<JSFunction> function,
|
||||||
TNode<Object> new_target,
|
TNode<Object> new_target,
|
||||||
TNode<Int32T> arg_count) {
|
TNode<Int32T> arg_count) {
|
||||||
JSTrampolineDescriptor descriptor(isolate());
|
JSTrampolineDescriptor descriptor;
|
||||||
size_t result_size = 1;
|
size_t result_size = 1;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), descriptor, descriptor.GetStackParameterCount(),
|
zone(), descriptor, descriptor.GetStackParameterCount(),
|
||||||
CallDescriptor::kFixedTargetRegister, Operator::kNoProperties,
|
CallDescriptor::kFixedTargetRegister, Operator::kNoProperties,
|
||||||
MachineType::AnyTagged(), result_size);
|
MachineType::AnyTagged(), result_size);
|
||||||
|
|
||||||
|
@ -2042,7 +2042,7 @@ Node* EffectControlLinearizer::LowerNumberToString(Node* node) {
|
|||||||
Operator::Properties properties = Operator::kEliminatable;
|
Operator::Properties properties = Operator::kEliminatable;
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), argument,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), argument,
|
||||||
__ NoContextConstant());
|
__ NoContextConstant());
|
||||||
}
|
}
|
||||||
@ -2498,7 +2498,7 @@ Node* EffectControlLinearizer::LowerTypeOf(Node* node) {
|
|||||||
Operator::Properties const properties = Operator::kEliminatable;
|
Operator::Properties const properties = Operator::kEliminatable;
|
||||||
CallDescriptor::Flags const flags = CallDescriptor::kNoAllocate;
|
CallDescriptor::Flags const flags = CallDescriptor::kNoAllocate;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), obj,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), obj,
|
||||||
__ NoContextConstant());
|
__ NoContextConstant());
|
||||||
}
|
}
|
||||||
@ -2510,7 +2510,7 @@ Node* EffectControlLinearizer::LowerToBoolean(Node* node) {
|
|||||||
Operator::Properties const properties = Operator::kEliminatable;
|
Operator::Properties const properties = Operator::kEliminatable;
|
||||||
CallDescriptor::Flags const flags = CallDescriptor::kNoAllocate;
|
CallDescriptor::Flags const flags = CallDescriptor::kNoAllocate;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), obj,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), obj,
|
||||||
__ NoContextConstant());
|
__ NoContextConstant());
|
||||||
}
|
}
|
||||||
@ -2698,7 +2698,7 @@ Node* EffectControlLinearizer::LowerNewArgumentsElements(Node* node) {
|
|||||||
Operator::Properties const properties = node->op()->properties();
|
Operator::Properties const properties = node->op()->properties();
|
||||||
CallDescriptor::Flags const flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags const flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), frame,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), frame,
|
||||||
length, __ SmiConstant(mapped_count), __ NoContextConstant());
|
length, __ SmiConstant(mapped_count), __ NoContextConstant());
|
||||||
}
|
}
|
||||||
@ -2771,7 +2771,7 @@ Node* EffectControlLinearizer::LowerSameValue(Node* node) {
|
|||||||
Operator::Properties properties = Operator::kEliminatable;
|
Operator::Properties properties = Operator::kEliminatable;
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), lhs, rhs,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), lhs, rhs,
|
||||||
__ NoContextConstant());
|
__ NoContextConstant());
|
||||||
}
|
}
|
||||||
@ -2793,7 +2793,7 @@ Node* EffectControlLinearizer::LowerStringToNumber(Node* node) {
|
|||||||
Operator::Properties properties = Operator::kEliminatable;
|
Operator::Properties properties = Operator::kEliminatable;
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), string,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), string,
|
||||||
__ NoContextConstant());
|
__ NoContextConstant());
|
||||||
}
|
}
|
||||||
@ -2951,7 +2951,7 @@ Node* EffectControlLinearizer::LowerStringCodePointAt(
|
|||||||
Operator::Properties properties = Operator::kNoThrow | Operator::kNoWrite;
|
Operator::Properties properties = Operator::kNoThrow | Operator::kNoWrite;
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties,
|
graph()->zone(), callable.descriptor(), 0, flags, properties,
|
||||||
MachineType::TaggedSigned());
|
MachineType::TaggedSigned());
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), receiver,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), receiver,
|
||||||
position, __ NoContextConstant());
|
position, __ NoContextConstant());
|
||||||
@ -3061,7 +3061,7 @@ Node* EffectControlLinearizer::LowerStringToLowerCaseIntl(Node* node) {
|
|||||||
Operator::Properties properties = Operator::kNoDeopt | Operator::kNoThrow;
|
Operator::Properties properties = Operator::kNoDeopt | Operator::kNoThrow;
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), receiver,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), receiver,
|
||||||
__ NoContextConstant());
|
__ NoContextConstant());
|
||||||
}
|
}
|
||||||
@ -3230,7 +3230,7 @@ Node* EffectControlLinearizer::LowerStringIndexOf(Node* node) {
|
|||||||
Operator::Properties properties = Operator::kEliminatable;
|
Operator::Properties properties = Operator::kEliminatable;
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), subject,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), subject,
|
||||||
search_string, position, __ NoContextConstant());
|
search_string, position, __ NoContextConstant());
|
||||||
}
|
}
|
||||||
@ -3249,7 +3249,7 @@ Node* EffectControlLinearizer::LowerStringComparison(Callable const& callable,
|
|||||||
Operator::Properties properties = Operator::kEliminatable;
|
Operator::Properties properties = Operator::kEliminatable;
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), lhs, rhs,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), lhs, rhs,
|
||||||
__ NoContextConstant());
|
__ NoContextConstant());
|
||||||
}
|
}
|
||||||
@ -3264,7 +3264,7 @@ Node* EffectControlLinearizer::LowerStringSubstring(Node* node) {
|
|||||||
Operator::Properties properties = Operator::kEliminatable;
|
Operator::Properties properties = Operator::kEliminatable;
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), receiver,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), receiver,
|
||||||
start, end, __ NoContextConstant());
|
start, end, __ NoContextConstant());
|
||||||
}
|
}
|
||||||
@ -3551,7 +3551,7 @@ Node* EffectControlLinearizer::LowerEnsureWritableFastElements(Node* node) {
|
|||||||
Builtins::CallableFor(isolate(), Builtins::kCopyFastSmiOrObjectElements);
|
Builtins::CallableFor(isolate(), Builtins::kCopyFastSmiOrObjectElements);
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
Node* result = __ Call(call_descriptor, __ HeapConstant(callable.code()),
|
Node* result = __ Call(call_descriptor, __ HeapConstant(callable.code()),
|
||||||
object, __ NoContextConstant());
|
object, __ NoContextConstant());
|
||||||
__ Goto(&done, result);
|
__ Goto(&done, result);
|
||||||
@ -3587,8 +3587,7 @@ Node* EffectControlLinearizer::LowerMaybeGrowFastElements(Node* node,
|
|||||||
Builtins::kGrowFastSmiOrObjectElements);
|
Builtins::kGrowFastSmiOrObjectElements);
|
||||||
CallDescriptor::Flags call_flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags call_flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, call_flags,
|
graph()->zone(), callable.descriptor(), 0, call_flags, properties);
|
||||||
properties);
|
|
||||||
Node* new_elements =
|
Node* new_elements =
|
||||||
__ Call(call_descriptor, __ HeapConstant(callable.code()), object,
|
__ Call(call_descriptor, __ HeapConstant(callable.code()), object,
|
||||||
ChangeInt32ToSmi(index), __ NoContextConstant());
|
ChangeInt32ToSmi(index), __ NoContextConstant());
|
||||||
@ -4193,8 +4192,7 @@ Node* EffectControlLinearizer::LowerConvertReceiver(Node* node) {
|
|||||||
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
|
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags,
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
properties);
|
|
||||||
Node* native_context = __ LoadField(
|
Node* native_context = __ LoadField(
|
||||||
AccessBuilder::ForJSGlobalProxyNativeContext(), global_proxy);
|
AccessBuilder::ForJSGlobalProxyNativeContext(), global_proxy);
|
||||||
Node* result = __ Call(call_descriptor, __ HeapConstant(callable.code()),
|
Node* result = __ Call(call_descriptor, __ HeapConstant(callable.code()),
|
||||||
@ -4229,8 +4227,7 @@ Node* EffectControlLinearizer::LowerConvertReceiver(Node* node) {
|
|||||||
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
|
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags,
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
properties);
|
|
||||||
Node* native_context = __ LoadField(
|
Node* native_context = __ LoadField(
|
||||||
AccessBuilder::ForJSGlobalProxyNativeContext(), global_proxy);
|
AccessBuilder::ForJSGlobalProxyNativeContext(), global_proxy);
|
||||||
Node* result = __ Call(call_descriptor, __ HeapConstant(callable.code()),
|
Node* result = __ Call(call_descriptor, __ HeapConstant(callable.code()),
|
||||||
@ -4591,8 +4588,7 @@ Node* EffectControlLinearizer::LowerFindOrderedHashMapEntry(Node* node) {
|
|||||||
Operator::Properties const properties = node->op()->properties();
|
Operator::Properties const properties = node->op()->properties();
|
||||||
CallDescriptor::Flags const flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags const flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags,
|
graph()->zone(), callable.descriptor(), 0, flags, properties);
|
||||||
properties);
|
|
||||||
return __ Call(call_descriptor, __ HeapConstant(callable.code()), table,
|
return __ Call(call_descriptor, __ HeapConstant(callable.code()), table,
|
||||||
key, __ NoContextConstant());
|
key, __ NoContextConstant());
|
||||||
}
|
}
|
||||||
|
@ -247,9 +247,9 @@ Operator const* GraphAssembler::ToNumberOperator() {
|
|||||||
Callable callable =
|
Callable callable =
|
||||||
Builtins::CallableFor(jsgraph()->isolate(), Builtins::kToNumber);
|
Builtins::CallableFor(jsgraph()->isolate(), Builtins::kToNumber);
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor =
|
||||||
jsgraph()->isolate(), graph()->zone(), callable.descriptor(), 0, flags,
|
Linkage::GetStubCallDescriptor(graph()->zone(), callable.descriptor(),
|
||||||
Operator::kEliminatable);
|
0, flags, Operator::kEliminatable);
|
||||||
to_number_operator_.set(common()->Call(call_descriptor));
|
to_number_operator_.set(common()->Call(call_descriptor));
|
||||||
}
|
}
|
||||||
return to_number_operator_.get();
|
return to_number_operator_.get();
|
||||||
|
@ -862,7 +862,7 @@ Reduction JSCallReducer::ReduceReflectGet(Node* node) {
|
|||||||
Callable callable =
|
Callable callable =
|
||||||
Builtins::CallableFor(isolate(), Builtins::kGetProperty);
|
Builtins::CallableFor(isolate(), Builtins::kGetProperty);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0,
|
graph()->zone(), callable.descriptor(), 0,
|
||||||
CallDescriptor::kNeedsFrameState, Operator::kNoProperties,
|
CallDescriptor::kNeedsFrameState, Operator::kNoProperties,
|
||||||
MachineType::AnyTagged(), 1);
|
MachineType::AnyTagged(), 1);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
@ -2554,8 +2554,8 @@ Reduction JSCallReducer::ReduceArrayIndexOfIncludes(
|
|||||||
: GetCallableForArrayIncludes(receiver_map->elements_kind(),
|
: GetCallableForArrayIncludes(receiver_map->elements_kind(),
|
||||||
isolate());
|
isolate());
|
||||||
CallDescriptor const* const desc = Linkage::GetStubCallDescriptor(
|
CallDescriptor const* const desc = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0,
|
graph()->zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags,
|
||||||
CallDescriptor::kNoFlags, Operator::kEliminatable);
|
Operator::kEliminatable);
|
||||||
// The stub expects the following arguments: the receiver array, its elements,
|
// The stub expects the following arguments: the receiver array, its elements,
|
||||||
// the search_element, the array length, and the index to start searching
|
// the search_element, the array length, and the index to start searching
|
||||||
// from.
|
// from.
|
||||||
@ -2909,7 +2909,7 @@ Reduction JSCallReducer::ReduceCallApiFunction(
|
|||||||
Callable call_api_callback = CodeFactory::CallApiCallback(isolate(), argc);
|
Callable call_api_callback = CodeFactory::CallApiCallback(isolate(), argc);
|
||||||
CallInterfaceDescriptor cid = call_api_callback.descriptor();
|
CallInterfaceDescriptor cid = call_api_callback.descriptor();
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), cid,
|
graph()->zone(), cid,
|
||||||
cid.GetStackParameterCount() + argc + 1 /* implicit receiver */,
|
cid.GetStackParameterCount() + argc + 1 /* implicit receiver */,
|
||||||
CallDescriptor::kNeedsFrameState, Operator::kNoProperties,
|
CallDescriptor::kNeedsFrameState, Operator::kNoProperties,
|
||||||
MachineType::AnyTagged(), 1, Linkage::kNoContext);
|
MachineType::AnyTagged(), 1, Linkage::kNoContext);
|
||||||
@ -5286,10 +5286,10 @@ Reduction JSCallReducer::ReduceStringPrototypeConcat(
|
|||||||
|
|
||||||
Callable const callable =
|
Callable const callable =
|
||||||
CodeFactory::StringAdd(isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED);
|
CodeFactory::StringAdd(isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor =
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0,
|
Linkage::GetStubCallDescriptor(graph()->zone(), callable.descriptor(), 0,
|
||||||
CallDescriptor::kNeedsFrameState,
|
CallDescriptor::kNeedsFrameState,
|
||||||
Operator::kNoDeopt | Operator::kNoWrite);
|
Operator::kNoDeopt | Operator::kNoWrite);
|
||||||
|
|
||||||
// TODO(turbofan): Massage the FrameState of the {node} here once we
|
// TODO(turbofan): Massage the FrameState of the {node} here once we
|
||||||
// have an artificial builtin frame type, so that it looks like the
|
// have an artificial builtin frame type, so that it looks like the
|
||||||
@ -6420,8 +6420,8 @@ Reduction JSCallReducer::ReduceCollectionIteratorPrototypeNext(
|
|||||||
Callable const callable =
|
Callable const callable =
|
||||||
Builtins::CallableFor(isolate(), Builtins::kOrderedHashTableHealIndex);
|
Builtins::CallableFor(isolate(), Builtins::kOrderedHashTableHealIndex);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0,
|
graph()->zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags,
|
||||||
CallDescriptor::kNoFlags, Operator::kEliminatable);
|
Operator::kEliminatable);
|
||||||
index = effect =
|
index = effect =
|
||||||
graph()->NewNode(common()->Call(call_descriptor),
|
graph()->NewNode(common()->Call(call_descriptor),
|
||||||
jsgraph()->HeapConstant(callable.code()), table, index,
|
jsgraph()->HeapConstant(callable.code()), table, index,
|
||||||
|
@ -730,7 +730,7 @@ Reduction JSCreateLowering::ReduceNewArrayToStubCall(
|
|||||||
Callable callable = CodeFactory::ArrayNoArgumentConstructor(
|
Callable callable = CodeFactory::ArrayNoArgumentConstructor(
|
||||||
isolate(), elements_kind, override_mode);
|
isolate(), elements_kind, override_mode);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), arity + 1,
|
graph()->zone(), callable.descriptor(), arity + 1,
|
||||||
CallDescriptor::kNeedsFrameState, properties);
|
CallDescriptor::kNeedsFrameState, properties);
|
||||||
node->ReplaceInput(0, jsgraph()->HeapConstant(callable.code()));
|
node->ReplaceInput(0, jsgraph()->HeapConstant(callable.code()));
|
||||||
node->InsertInput(graph()->zone(), 2, type_info);
|
node->InsertInput(graph()->zone(), 2, type_info);
|
||||||
@ -742,7 +742,7 @@ Reduction JSCreateLowering::ReduceNewArrayToStubCall(
|
|||||||
Callable callable = CodeFactory::ArraySingleArgumentConstructor(
|
Callable callable = CodeFactory::ArraySingleArgumentConstructor(
|
||||||
isolate(), GetHoleyElementsKind(elements_kind), override_mode);
|
isolate(), GetHoleyElementsKind(elements_kind), override_mode);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), arity + 1,
|
graph()->zone(), callable.descriptor(), arity + 1,
|
||||||
CallDescriptor::kNeedsFrameState, properties);
|
CallDescriptor::kNeedsFrameState, properties);
|
||||||
node->ReplaceInput(0, jsgraph()->HeapConstant(callable.code()));
|
node->ReplaceInput(0, jsgraph()->HeapConstant(callable.code()));
|
||||||
node->InsertInput(graph()->zone(), 2, type_info);
|
node->InsertInput(graph()->zone(), 2, type_info);
|
||||||
@ -753,8 +753,7 @@ Reduction JSCreateLowering::ReduceNewArrayToStubCall(
|
|||||||
DCHECK_GT(arity, 1);
|
DCHECK_GT(arity, 1);
|
||||||
Handle<Code> code = BUILTIN_CODE(isolate(), ArrayNArgumentsConstructor);
|
Handle<Code> code = BUILTIN_CODE(isolate(), ArrayNArgumentsConstructor);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(),
|
graph()->zone(), ArrayNArgumentsConstructorDescriptor{}, arity + 1,
|
||||||
ArrayNArgumentsConstructorDescriptor(isolate()), arity + 1,
|
|
||||||
CallDescriptor::kNeedsFrameState);
|
CallDescriptor::kNeedsFrameState);
|
||||||
node->ReplaceInput(0, jsgraph()->HeapConstant(code));
|
node->ReplaceInput(0, jsgraph()->HeapConstant(code));
|
||||||
node->InsertInput(graph()->zone(), 2, type_info);
|
node->InsertInput(graph()->zone(), 2, type_info);
|
||||||
|
@ -105,7 +105,7 @@ void JSGenericLowering::ReplaceWithStubCall(Node* node, Callable callable,
|
|||||||
int result_size) {
|
int result_size) {
|
||||||
const CallInterfaceDescriptor& descriptor = callable.descriptor();
|
const CallInterfaceDescriptor& descriptor = callable.descriptor();
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), flags,
|
zone(), descriptor, descriptor.GetStackParameterCount(), flags,
|
||||||
properties, MachineType::AnyTagged(), result_size);
|
properties, MachineType::AnyTagged(), result_size);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
node->InsertInput(zone(), 0, stub_code);
|
node->InsertInput(zone(), 0, stub_code);
|
||||||
@ -360,9 +360,8 @@ void JSGenericLowering::LowerJSCreateArray(Node* node) {
|
|||||||
CreateArrayParameters const& p = CreateArrayParametersOf(node->op());
|
CreateArrayParameters const& p = CreateArrayParametersOf(node->op());
|
||||||
int const arity = static_cast<int>(p.arity());
|
int const arity = static_cast<int>(p.arity());
|
||||||
Handle<AllocationSite> const site = p.site();
|
Handle<AllocationSite> const site = p.site();
|
||||||
ArrayConstructorDescriptor descriptor(isolate());
|
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), descriptor, arity + 1,
|
zone(), ArrayConstructorDescriptor{}, arity + 1,
|
||||||
CallDescriptor::kNeedsFrameState, node->op()->properties(),
|
CallDescriptor::kNeedsFrameState, node->op()->properties(),
|
||||||
MachineType::AnyTagged());
|
MachineType::AnyTagged());
|
||||||
Node* stub_code = jsgraph()->ArrayConstructorStubConstant();
|
Node* stub_code = jsgraph()->ArrayConstructorStubConstant();
|
||||||
@ -573,7 +572,7 @@ void JSGenericLowering::LowerJSConstructForwardVarargs(Node* node) {
|
|||||||
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
||||||
Callable callable = CodeFactory::ConstructForwardVarargs(isolate());
|
Callable callable = CodeFactory::ConstructForwardVarargs(isolate());
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), callable.descriptor(), arg_count + 1, flags);
|
zone(), callable.descriptor(), arg_count + 1, flags);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
Node* stub_arity = jsgraph()->Int32Constant(arg_count);
|
Node* stub_arity = jsgraph()->Int32Constant(arg_count);
|
||||||
Node* start_index = jsgraph()->Uint32Constant(p.start_index());
|
Node* start_index = jsgraph()->Uint32Constant(p.start_index());
|
||||||
@ -594,7 +593,7 @@ void JSGenericLowering::LowerJSConstruct(Node* node) {
|
|||||||
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
||||||
Callable callable = CodeFactory::Construct(isolate());
|
Callable callable = CodeFactory::Construct(isolate());
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), callable.descriptor(), arg_count + 1, flags);
|
zone(), callable.descriptor(), arg_count + 1, flags);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
Node* stub_arity = jsgraph()->Int32Constant(arg_count);
|
Node* stub_arity = jsgraph()->Int32Constant(arg_count);
|
||||||
Node* new_target = node->InputAt(arg_count + 1);
|
Node* new_target = node->InputAt(arg_count + 1);
|
||||||
@ -611,8 +610,8 @@ void JSGenericLowering::LowerJSConstructWithArrayLike(Node* node) {
|
|||||||
Callable callable =
|
Callable callable =
|
||||||
Builtins::CallableFor(isolate(), Builtins::kConstructWithArrayLike);
|
Builtins::CallableFor(isolate(), Builtins::kConstructWithArrayLike);
|
||||||
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor =
|
||||||
isolate(), zone(), callable.descriptor(), 1, flags);
|
Linkage::GetStubCallDescriptor(zone(), callable.descriptor(), 1, flags);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
Node* receiver = jsgraph()->UndefinedConstant();
|
Node* receiver = jsgraph()->UndefinedConstant();
|
||||||
Node* arguments_list = node->InputAt(1);
|
Node* arguments_list = node->InputAt(1);
|
||||||
@ -632,7 +631,7 @@ void JSGenericLowering::LowerJSConstructWithSpread(Node* node) {
|
|||||||
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
||||||
Callable callable = CodeFactory::ConstructWithSpread(isolate());
|
Callable callable = CodeFactory::ConstructWithSpread(isolate());
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), callable.descriptor(), arg_count, flags);
|
zone(), callable.descriptor(), arg_count, flags);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
Node* stack_arg_count = jsgraph()->Int32Constant(arg_count - 1);
|
Node* stack_arg_count = jsgraph()->Int32Constant(arg_count - 1);
|
||||||
Node* new_target = node->InputAt(new_target_index);
|
Node* new_target = node->InputAt(new_target_index);
|
||||||
@ -656,7 +655,7 @@ void JSGenericLowering::LowerJSCallForwardVarargs(Node* node) {
|
|||||||
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
||||||
Callable callable = CodeFactory::CallForwardVarargs(isolate());
|
Callable callable = CodeFactory::CallForwardVarargs(isolate());
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), callable.descriptor(), arg_count + 1, flags);
|
zone(), callable.descriptor(), arg_count + 1, flags);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
Node* stub_arity = jsgraph()->Int32Constant(arg_count);
|
Node* stub_arity = jsgraph()->Int32Constant(arg_count);
|
||||||
Node* start_index = jsgraph()->Uint32Constant(p.start_index());
|
Node* start_index = jsgraph()->Uint32Constant(p.start_index());
|
||||||
@ -673,7 +672,7 @@ void JSGenericLowering::LowerJSCall(Node* node) {
|
|||||||
Callable callable = CodeFactory::Call(isolate(), mode);
|
Callable callable = CodeFactory::Call(isolate(), mode);
|
||||||
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), callable.descriptor(), arg_count + 1, flags);
|
zone(), callable.descriptor(), arg_count + 1, flags);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
Node* stub_arity = jsgraph()->Int32Constant(arg_count);
|
Node* stub_arity = jsgraph()->Int32Constant(arg_count);
|
||||||
node->InsertInput(zone(), 0, stub_code);
|
node->InsertInput(zone(), 0, stub_code);
|
||||||
@ -684,8 +683,8 @@ void JSGenericLowering::LowerJSCall(Node* node) {
|
|||||||
void JSGenericLowering::LowerJSCallWithArrayLike(Node* node) {
|
void JSGenericLowering::LowerJSCallWithArrayLike(Node* node) {
|
||||||
Callable callable = CodeFactory::CallWithArrayLike(isolate());
|
Callable callable = CodeFactory::CallWithArrayLike(isolate());
|
||||||
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor =
|
||||||
isolate(), zone(), callable.descriptor(), 1, flags);
|
Linkage::GetStubCallDescriptor(zone(), callable.descriptor(), 1, flags);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
Node* receiver = node->InputAt(1);
|
Node* receiver = node->InputAt(1);
|
||||||
Node* arguments_list = node->InputAt(2);
|
Node* arguments_list = node->InputAt(2);
|
||||||
@ -702,7 +701,7 @@ void JSGenericLowering::LowerJSCallWithSpread(Node* node) {
|
|||||||
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
|
||||||
Callable callable = CodeFactory::CallWithSpread(isolate());
|
Callable callable = CodeFactory::CallWithSpread(isolate());
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), callable.descriptor(), arg_count, flags);
|
zone(), callable.descriptor(), arg_count, flags);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
// We pass the spread in a register, not on the stack.
|
// We pass the spread in a register, not on the stack.
|
||||||
Node* stack_arg_count = jsgraph()->Int32Constant(arg_count - 1);
|
Node* stack_arg_count = jsgraph()->Int32Constant(arg_count - 1);
|
||||||
|
@ -420,7 +420,7 @@ Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a,
|
|||||||
Reduction JSIntrinsicLowering::Change(Node* node, Callable const& callable,
|
Reduction JSIntrinsicLowering::Change(Node* node, Callable const& callable,
|
||||||
int stack_parameter_count) {
|
int stack_parameter_count) {
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), stack_parameter_count,
|
graph()->zone(), callable.descriptor(), stack_parameter_count,
|
||||||
CallDescriptor::kNeedsFrameState, node->op()->properties());
|
CallDescriptor::kNeedsFrameState, node->op()->properties());
|
||||||
node->InsertInput(graph()->zone(), 0,
|
node->InsertInput(graph()->zone(), 0,
|
||||||
jsgraph()->HeapConstant(callable.code()));
|
jsgraph()->HeapConstant(callable.code()));
|
||||||
|
@ -1745,7 +1745,7 @@ Node* JSNativeContextSpecialization::InlineApiCall(
|
|||||||
CallInterfaceDescriptor call_interface_descriptor =
|
CallInterfaceDescriptor call_interface_descriptor =
|
||||||
call_api_callback.descriptor();
|
call_api_callback.descriptor();
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), call_interface_descriptor,
|
graph()->zone(), call_interface_descriptor,
|
||||||
call_interface_descriptor.GetStackParameterCount() + argc +
|
call_interface_descriptor.GetStackParameterCount() + argc +
|
||||||
1 /* implicit receiver */,
|
1 /* implicit receiver */,
|
||||||
CallDescriptor::kNeedsFrameState, Operator::kNoProperties,
|
CallDescriptor::kNeedsFrameState, Operator::kNoProperties,
|
||||||
|
@ -583,7 +583,7 @@ Reduction JSTypedLowering::ReduceJSAdd(Node* node) {
|
|||||||
Callable const callable =
|
Callable const callable =
|
||||||
CodeFactory::StringAdd(isolate(), flags, NOT_TENURED);
|
CodeFactory::StringAdd(isolate(), flags, NOT_TENURED);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0,
|
graph()->zone(), callable.descriptor(), 0,
|
||||||
CallDescriptor::kNeedsFrameState, properties);
|
CallDescriptor::kNeedsFrameState, properties);
|
||||||
DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node->op()));
|
DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node->op()));
|
||||||
node->InsertInput(graph()->zone(), 0,
|
node->InsertInput(graph()->zone(), 0,
|
||||||
@ -1104,7 +1104,7 @@ Reduction JSTypedLowering::ReduceJSToObject(Node* node) {
|
|||||||
// Convert {receiver} using the ToObjectStub.
|
// Convert {receiver} using the ToObjectStub.
|
||||||
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
|
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0,
|
graph()->zone(), callable.descriptor(), 0,
|
||||||
CallDescriptor::kNeedsFrameState, node->op()->properties());
|
CallDescriptor::kNeedsFrameState, node->op()->properties());
|
||||||
rfalse = efalse = if_false =
|
rfalse = efalse = if_false =
|
||||||
graph()->NewNode(common()->Call(call_descriptor),
|
graph()->NewNode(common()->Call(call_descriptor),
|
||||||
@ -1547,7 +1547,7 @@ Reduction JSTypedLowering::ReduceJSConstructForwardVarargs(Node* node) {
|
|||||||
node->InsertInput(graph()->zone(), 5, jsgraph()->UndefinedConstant());
|
node->InsertInput(graph()->zone(), 5, jsgraph()->UndefinedConstant());
|
||||||
NodeProperties::ChangeOp(
|
NodeProperties::ChangeOp(
|
||||||
node, common()->Call(Linkage::GetStubCallDescriptor(
|
node, common()->Call(Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), arity + 1,
|
graph()->zone(), callable.descriptor(), arity + 1,
|
||||||
CallDescriptor::kNeedsFrameState)));
|
CallDescriptor::kNeedsFrameState)));
|
||||||
return Changed(node);
|
return Changed(node);
|
||||||
}
|
}
|
||||||
@ -1590,9 +1590,9 @@ Reduction JSTypedLowering::ReduceJSConstruct(Node* node) {
|
|||||||
node->InsertInput(graph()->zone(), 4, jsgraph()->UndefinedConstant());
|
node->InsertInput(graph()->zone(), 4, jsgraph()->UndefinedConstant());
|
||||||
node->InsertInput(graph()->zone(), 5, jsgraph()->UndefinedConstant());
|
node->InsertInput(graph()->zone(), 5, jsgraph()->UndefinedConstant());
|
||||||
NodeProperties::ChangeOp(
|
NodeProperties::ChangeOp(
|
||||||
node, common()->Call(Linkage::GetStubCallDescriptor(
|
node,
|
||||||
isolate(), graph()->zone(),
|
common()->Call(Linkage::GetStubCallDescriptor(
|
||||||
ConstructStubDescriptor(isolate()), 1 + arity, flags)));
|
graph()->zone(), ConstructStubDescriptor{}, 1 + arity, flags)));
|
||||||
|
|
||||||
return Changed(node);
|
return Changed(node);
|
||||||
}
|
}
|
||||||
@ -1621,8 +1621,7 @@ Reduction JSTypedLowering::ReduceJSCallForwardVarargs(Node* node) {
|
|||||||
node->InsertInput(graph()->zone(), 3, jsgraph()->Constant(start_index));
|
node->InsertInput(graph()->zone(), 3, jsgraph()->Constant(start_index));
|
||||||
NodeProperties::ChangeOp(
|
NodeProperties::ChangeOp(
|
||||||
node, common()->Call(Linkage::GetStubCallDescriptor(
|
node, common()->Call(Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), arity + 1,
|
graph()->zone(), callable.descriptor(), arity + 1, flags)));
|
||||||
flags)));
|
|
||||||
return Changed(node);
|
return Changed(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1701,8 +1700,7 @@ Reduction JSTypedLowering::ReduceJSCall(Node* node) {
|
|||||||
jsgraph()->Constant(shared->internal_formal_parameter_count()));
|
jsgraph()->Constant(shared->internal_formal_parameter_count()));
|
||||||
NodeProperties::ChangeOp(
|
NodeProperties::ChangeOp(
|
||||||
node, common()->Call(Linkage::GetStubCallDescriptor(
|
node, common()->Call(Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(),
|
graph()->zone(), callable.descriptor(), 1 + arity, flags)));
|
||||||
1 + arity, flags)));
|
|
||||||
} else if (shared->HasBuiltinId() &&
|
} else if (shared->HasBuiltinId() &&
|
||||||
Builtins::HasCppImplementation(shared->builtin_id())) {
|
Builtins::HasCppImplementation(shared->builtin_id())) {
|
||||||
// Patch {node} to a direct CEntry call.
|
// Patch {node} to a direct CEntry call.
|
||||||
@ -1717,7 +1715,7 @@ Reduction JSTypedLowering::ReduceJSCall(Node* node) {
|
|||||||
|
|
||||||
const CallInterfaceDescriptor& descriptor = callable.descriptor();
|
const CallInterfaceDescriptor& descriptor = callable.descriptor();
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), descriptor, 1 + arity, flags);
|
graph()->zone(), descriptor, 1 + arity, flags);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
node->InsertInput(graph()->zone(), 0, stub_code); // Code object.
|
node->InsertInput(graph()->zone(), 0, stub_code); // Code object.
|
||||||
node->InsertInput(graph()->zone(), 2, new_target);
|
node->InsertInput(graph()->zone(), 2, new_target);
|
||||||
@ -1745,8 +1743,7 @@ Reduction JSTypedLowering::ReduceJSCall(Node* node) {
|
|||||||
node->InsertInput(graph()->zone(), 2, jsgraph()->Constant(arity));
|
node->InsertInput(graph()->zone(), 2, jsgraph()->Constant(arity));
|
||||||
NodeProperties::ChangeOp(
|
NodeProperties::ChangeOp(
|
||||||
node, common()->Call(Linkage::GetStubCallDescriptor(
|
node, common()->Call(Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 1 + arity,
|
graph()->zone(), callable.descriptor(), 1 + arity, flags)));
|
||||||
flags)));
|
|
||||||
return Changed(node);
|
return Changed(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1835,7 +1832,7 @@ Reduction JSTypedLowering::ReduceJSForInNext(Node* node) {
|
|||||||
Callable const callable =
|
Callable const callable =
|
||||||
Builtins::CallableFor(isolate(), Builtins::kForInFilter);
|
Builtins::CallableFor(isolate(), Builtins::kForInFilter);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0,
|
graph()->zone(), callable.descriptor(), 0,
|
||||||
CallDescriptor::kNeedsFrameState);
|
CallDescriptor::kNeedsFrameState);
|
||||||
vfalse = efalse = if_false =
|
vfalse = efalse = if_false =
|
||||||
graph()->NewNode(common()->Call(call_descriptor),
|
graph()->NewNode(common()->Call(call_descriptor),
|
||||||
|
@ -344,7 +344,7 @@ CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr,
|
|||||||
// CallInterfaceDescriptor.
|
// CallInterfaceDescriptor.
|
||||||
// TODO(turbofan): cache call descriptors for code stub calls.
|
// TODO(turbofan): cache call descriptors for code stub calls.
|
||||||
CallDescriptor* Linkage::GetStubCallDescriptor(
|
CallDescriptor* Linkage::GetStubCallDescriptor(
|
||||||
Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor,
|
Zone* zone, const CallInterfaceDescriptor& descriptor,
|
||||||
int stack_parameter_count, CallDescriptor::Flags flags,
|
int stack_parameter_count, CallDescriptor::Flags flags,
|
||||||
Operator::Properties properties, MachineType return_type,
|
Operator::Properties properties, MachineType return_type,
|
||||||
size_t return_count, Linkage::ContextSpecification context_spec,
|
size_t return_count, Linkage::ContextSpecification context_spec,
|
||||||
@ -396,23 +396,23 @@ CallDescriptor* Linkage::GetStubCallDescriptor(
|
|||||||
? MachineType::Pointer()
|
? MachineType::Pointer()
|
||||||
: MachineType::AnyTagged();
|
: MachineType::AnyTagged();
|
||||||
LinkageLocation target_loc = LinkageLocation::ForAnyRegister(target_type);
|
LinkageLocation target_loc = LinkageLocation::ForAnyRegister(target_type);
|
||||||
return new (zone) CallDescriptor( // --
|
return new (zone) CallDescriptor( // --
|
||||||
kind, // kind
|
kind, // kind
|
||||||
target_type, // target MachineType
|
target_type, // target MachineType
|
||||||
target_loc, // target location
|
target_loc, // target location
|
||||||
locations.Build(), // location_sig
|
locations.Build(), // location_sig
|
||||||
stack_parameter_count, // stack_parameter_count
|
stack_parameter_count, // stack_parameter_count
|
||||||
properties, // properties
|
properties, // properties
|
||||||
kNoCalleeSaved, // callee-saved registers
|
kNoCalleeSaved, // callee-saved registers
|
||||||
kNoCalleeSaved, // callee-saved fp
|
kNoCalleeSaved, // callee-saved fp
|
||||||
CallDescriptor::kCanUseRoots | // flags
|
CallDescriptor::kCanUseRoots | flags, // flags
|
||||||
flags, // flags
|
descriptor.DebugName(), // debug name
|
||||||
descriptor.DebugName(isolate), descriptor.allocatable_registers());
|
descriptor.allocatable_registers());
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
CallDescriptor* Linkage::GetBytecodeDispatchCallDescriptor(
|
CallDescriptor* Linkage::GetBytecodeDispatchCallDescriptor(
|
||||||
Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor,
|
Zone* zone, const CallInterfaceDescriptor& descriptor,
|
||||||
int stack_parameter_count) {
|
int stack_parameter_count) {
|
||||||
const int register_parameter_count = descriptor.GetRegisterParameterCount();
|
const int register_parameter_count = descriptor.GetRegisterParameterCount();
|
||||||
const int parameter_count = register_parameter_count + stack_parameter_count;
|
const int parameter_count = register_parameter_count + stack_parameter_count;
|
||||||
@ -449,7 +449,7 @@ CallDescriptor* Linkage::GetBytecodeDispatchCallDescriptor(
|
|||||||
kNoCalleeSaved, // callee-saved registers
|
kNoCalleeSaved, // callee-saved registers
|
||||||
kNoCalleeSaved, // callee-saved fp
|
kNoCalleeSaved, // callee-saved fp
|
||||||
kFlags, // flags
|
kFlags, // flags
|
||||||
descriptor.DebugName(isolate));
|
descriptor.DebugName());
|
||||||
}
|
}
|
||||||
|
|
||||||
LinkageLocation Linkage::GetOsrValueLocation(int index) const {
|
LinkageLocation Linkage::GetOsrValueLocation(int index) const {
|
||||||
|
@ -390,7 +390,7 @@ class V8_EXPORT_PRIVATE Linkage : public NON_EXPORTED_BASE(ZoneObject) {
|
|||||||
CallDescriptor::Flags flags);
|
CallDescriptor::Flags flags);
|
||||||
|
|
||||||
static CallDescriptor* GetStubCallDescriptor(
|
static CallDescriptor* GetStubCallDescriptor(
|
||||||
Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor,
|
Zone* zone, const CallInterfaceDescriptor& descriptor,
|
||||||
int stack_parameter_count, CallDescriptor::Flags flags,
|
int stack_parameter_count, CallDescriptor::Flags flags,
|
||||||
Operator::Properties properties = Operator::kNoProperties,
|
Operator::Properties properties = Operator::kNoProperties,
|
||||||
MachineType return_type = MachineType::AnyTagged(),
|
MachineType return_type = MachineType::AnyTagged(),
|
||||||
@ -398,7 +398,7 @@ class V8_EXPORT_PRIVATE Linkage : public NON_EXPORTED_BASE(ZoneObject) {
|
|||||||
StubCallMode stub_mode = StubCallMode::kCallOnHeapBuiltin);
|
StubCallMode stub_mode = StubCallMode::kCallOnHeapBuiltin);
|
||||||
|
|
||||||
static CallDescriptor* GetBytecodeDispatchCallDescriptor(
|
static CallDescriptor* GetBytecodeDispatchCallDescriptor(
|
||||||
Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor,
|
Zone* zone, const CallInterfaceDescriptor& descriptor,
|
||||||
int stack_parameter_count);
|
int stack_parameter_count);
|
||||||
|
|
||||||
// Creates a call descriptor for simplified C calls that is appropriate
|
// Creates a call descriptor for simplified C calls that is appropriate
|
||||||
|
@ -237,7 +237,7 @@ void MemoryOptimizer::VisitAllocateRaw(Node* node,
|
|||||||
AllocateInOldSpaceStubConstant();
|
AllocateInOldSpaceStubConstant();
|
||||||
if (!allocate_operator_.is_set()) {
|
if (!allocate_operator_.is_set()) {
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), AllocateDescriptor(isolate()), 0,
|
graph()->zone(), AllocateDescriptor{}, 0,
|
||||||
CallDescriptor::kCanUseRoots, Operator::kNoThrow,
|
CallDescriptor::kCanUseRoots, Operator::kNoThrow,
|
||||||
MachineType::AnyTagged(), 1, Linkage::kNoContext);
|
MachineType::AnyTagged(), 1, Linkage::kNoContext);
|
||||||
allocate_operator_.set(common()->Call(call_descriptor));
|
allocate_operator_.set(common()->Call(call_descriptor));
|
||||||
@ -294,7 +294,7 @@ void MemoryOptimizer::VisitAllocateRaw(Node* node,
|
|||||||
AllocateInOldSpaceStubConstant();
|
AllocateInOldSpaceStubConstant();
|
||||||
if (!allocate_operator_.is_set()) {
|
if (!allocate_operator_.is_set()) {
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), graph()->zone(), AllocateDescriptor(isolate()), 0,
|
graph()->zone(), AllocateDescriptor{}, 0,
|
||||||
CallDescriptor::kCanUseRoots, Operator::kNoThrow,
|
CallDescriptor::kCanUseRoots, Operator::kNoThrow,
|
||||||
MachineType::AnyTagged(), 1, Linkage::kNoContext);
|
MachineType::AnyTagged(), 1, Linkage::kNoContext);
|
||||||
allocate_operator_.set(common()->Call(call_descriptor));
|
allocate_operator_.set(common()->Call(call_descriptor));
|
||||||
|
@ -3910,9 +3910,9 @@ Operator const* SimplifiedLowering::ToNumberOperator() {
|
|||||||
if (!to_number_operator_.is_set()) {
|
if (!to_number_operator_.is_set()) {
|
||||||
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToNumber);
|
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToNumber);
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNeedsFrameState;
|
CallDescriptor::Flags flags = CallDescriptor::kNeedsFrameState;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor =
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags,
|
Linkage::GetStubCallDescriptor(graph()->zone(), callable.descriptor(),
|
||||||
Operator::kNoProperties);
|
0, flags, Operator::kNoProperties);
|
||||||
to_number_operator_.set(common()->Call(call_descriptor));
|
to_number_operator_.set(common()->Call(call_descriptor));
|
||||||
}
|
}
|
||||||
return to_number_operator_.get();
|
return to_number_operator_.get();
|
||||||
@ -3922,9 +3922,9 @@ Operator const* SimplifiedLowering::ToNumericOperator() {
|
|||||||
if (!to_numeric_operator_.is_set()) {
|
if (!to_numeric_operator_.is_set()) {
|
||||||
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToNumeric);
|
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToNumeric);
|
||||||
CallDescriptor::Flags flags = CallDescriptor::kNeedsFrameState;
|
CallDescriptor::Flags flags = CallDescriptor::kNeedsFrameState;
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor =
|
||||||
isolate(), graph()->zone(), callable.descriptor(), 0, flags,
|
Linkage::GetStubCallDescriptor(graph()->zone(), callable.descriptor(),
|
||||||
Operator::kNoProperties);
|
0, flags, Operator::kNoProperties);
|
||||||
to_numeric_operator_.set(common()->Call(call_descriptor));
|
to_numeric_operator_.set(common()->Call(call_descriptor));
|
||||||
}
|
}
|
||||||
return to_numeric_operator_.get();
|
return to_numeric_operator_.get();
|
||||||
|
@ -4020,9 +4020,8 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
|
|||||||
Node* target = jsgraph()->HeapConstant(callable.code());
|
Node* target = jsgraph()->HeapConstant(callable.code());
|
||||||
if (!allocate_heap_number_operator_.is_set()) {
|
if (!allocate_heap_number_operator_.is_set()) {
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate_, mcgraph()->zone(), callable.descriptor(), 0,
|
mcgraph()->zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags,
|
||||||
CallDescriptor::kNoFlags, Operator::kNoThrow,
|
Operator::kNoThrow, MachineType::AnyTagged(), 1, Linkage::kNoContext);
|
||||||
MachineType::AnyTagged(), 1, Linkage::kNoContext);
|
|
||||||
allocate_heap_number_operator_.set(common->Call(call_descriptor));
|
allocate_heap_number_operator_.set(common->Call(call_descriptor));
|
||||||
}
|
}
|
||||||
Node* heap_number = graph()->NewNode(allocate_heap_number_operator_.get(),
|
Node* heap_number = graph()->NewNode(allocate_heap_number_operator_.get(),
|
||||||
@ -4183,8 +4182,8 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
|
|||||||
Node* BuildJavaScriptToNumber(Node* node, Node* js_context) {
|
Node* BuildJavaScriptToNumber(Node* node, Node* js_context) {
|
||||||
Callable callable = Builtins::CallableFor(isolate_, Builtins::kToNumber);
|
Callable callable = Builtins::CallableFor(isolate_, Builtins::kToNumber);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate_, mcgraph()->zone(), callable.descriptor(), 0,
|
mcgraph()->zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags,
|
||||||
CallDescriptor::kNoFlags, Operator::kNoProperties);
|
Operator::kNoProperties);
|
||||||
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
Node* stub_code = jsgraph()->HeapConstant(callable.code());
|
||||||
|
|
||||||
Node* result =
|
Node* result =
|
||||||
@ -4498,8 +4497,8 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
call_descriptor = Linkage::GetStubCallDescriptor(
|
call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate_, mcgraph()->zone(), ArgumentAdaptorDescriptor(isolate_),
|
mcgraph()->zone(), ArgumentAdaptorDescriptor{}, 1 + wasm_count,
|
||||||
1 + wasm_count, CallDescriptor::kNoFlags, Operator::kNoProperties,
|
CallDescriptor::kNoFlags, Operator::kNoProperties,
|
||||||
MachineType::AnyTagged(), 1, Linkage::kPassContext,
|
MachineType::AnyTagged(), 1, Linkage::kPassContext,
|
||||||
StubCallMode::kCallWasmRuntimeStub);
|
StubCallMode::kCallWasmRuntimeStub);
|
||||||
|
|
||||||
@ -4524,8 +4523,8 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
|
|||||||
args[pos++] = undefined_node; // receiver
|
args[pos++] = undefined_node; // receiver
|
||||||
|
|
||||||
call_descriptor = Linkage::GetStubCallDescriptor(
|
call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate_, graph()->zone(), CallTrampolineDescriptor(isolate_),
|
graph()->zone(), CallTrampolineDescriptor{}, wasm_count + 1,
|
||||||
wasm_count + 1, CallDescriptor::kNoFlags, Operator::kNoProperties,
|
CallDescriptor::kNoFlags, Operator::kNoProperties,
|
||||||
MachineType::AnyTagged(), 1, Linkage::kPassContext,
|
MachineType::AnyTagged(), 1, Linkage::kPassContext,
|
||||||
StubCallMode::kCallWasmRuntimeStub);
|
StubCallMode::kCallWasmRuntimeStub);
|
||||||
|
|
||||||
|
@ -202,8 +202,7 @@ void AccessorAssembler::HandleLoadICHandlerCase(
|
|||||||
|
|
||||||
BIND(&call_handler);
|
BIND(&call_handler);
|
||||||
{
|
{
|
||||||
typedef LoadWithVectorDescriptor Descriptor;
|
exit_point->ReturnCallStub(LoadWithVectorDescriptor{}, handler, p->context,
|
||||||
exit_point->ReturnCallStub(Descriptor(isolate()), handler, p->context,
|
|
||||||
p->receiver, p->name, p->slot, p->vector);
|
p->receiver, p->name, p->slot, p->vector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -885,9 +884,9 @@ void AccessorAssembler::HandleStoreICHandlerCase(
|
|||||||
// |handler| is a heap object. Must be code, call it.
|
// |handler| is a heap object. Must be code, call it.
|
||||||
BIND(&call_handler);
|
BIND(&call_handler);
|
||||||
{
|
{
|
||||||
StoreWithVectorDescriptor descriptor(isolate());
|
TailCallStub(StoreWithVectorDescriptor{}, CAST(strong_handler),
|
||||||
TailCallStub(descriptor, CAST(strong_handler), CAST(p->context),
|
CAST(p->context), p->receiver, p->name, p->value, p->slot,
|
||||||
p->receiver, p->name, p->value, p->slot, p->vector);
|
p->vector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1225,9 +1224,8 @@ void AccessorAssembler::HandleStoreICProtoHandler(
|
|||||||
&if_transitioning_element_store);
|
&if_transitioning_element_store);
|
||||||
BIND(&if_element_store);
|
BIND(&if_element_store);
|
||||||
{
|
{
|
||||||
StoreWithVectorDescriptor descriptor(isolate());
|
TailCallStub(StoreWithVectorDescriptor{}, code_handler, p->context,
|
||||||
TailCallStub(descriptor, code_handler, p->context, p->receiver, p->name,
|
p->receiver, p->name, p->value, p->slot, p->vector);
|
||||||
p->value, p->slot, p->vector);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BIND(&if_transitioning_element_store);
|
BIND(&if_transitioning_element_store);
|
||||||
@ -1239,9 +1237,9 @@ void AccessorAssembler::HandleStoreICProtoHandler(
|
|||||||
|
|
||||||
GotoIf(IsDeprecatedMap(transition_map), miss);
|
GotoIf(IsDeprecatedMap(transition_map), miss);
|
||||||
|
|
||||||
StoreTransitionDescriptor descriptor(isolate());
|
TailCallStub(StoreTransitionDescriptor{}, code_handler, p->context,
|
||||||
TailCallStub(descriptor, code_handler, p->context, p->receiver, p->name,
|
p->receiver, p->name, transition_map, p->value, p->slot,
|
||||||
transition_map, p->value, p->slot, p->vector);
|
p->vector);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -3076,9 +3074,8 @@ void AccessorAssembler::StoreInArrayLiteralIC(const StoreICParameters* p) {
|
|||||||
TNode<HeapObject> handler = CAST(var_handler.value());
|
TNode<HeapObject> handler = CAST(var_handler.value());
|
||||||
Label if_transitioning_element_store(this);
|
Label if_transitioning_element_store(this);
|
||||||
GotoIfNot(IsCode(handler), &if_transitioning_element_store);
|
GotoIfNot(IsCode(handler), &if_transitioning_element_store);
|
||||||
StoreWithVectorDescriptor descriptor(isolate());
|
TailCallStub(StoreWithVectorDescriptor{}, CAST(handler), CAST(p->context),
|
||||||
TailCallStub(descriptor, CAST(handler), CAST(p->context), p->receiver,
|
p->receiver, p->name, p->value, p->slot, p->vector);
|
||||||
p->name, p->value, p->slot, p->vector);
|
|
||||||
|
|
||||||
BIND(&if_transitioning_element_store);
|
BIND(&if_transitioning_element_store);
|
||||||
{
|
{
|
||||||
@ -3089,9 +3086,8 @@ void AccessorAssembler::StoreInArrayLiteralIC(const StoreICParameters* p) {
|
|||||||
GotoIf(IsDeprecatedMap(transition_map), &miss);
|
GotoIf(IsDeprecatedMap(transition_map), &miss);
|
||||||
Node* code = LoadObjectField(handler, StoreHandler::kSmiHandlerOffset);
|
Node* code = LoadObjectField(handler, StoreHandler::kSmiHandlerOffset);
|
||||||
CSA_ASSERT(this, IsCode(code));
|
CSA_ASSERT(this, IsCode(code));
|
||||||
StoreTransitionDescriptor descriptor(isolate());
|
TailCallStub(StoreTransitionDescriptor{}, code, p->context, p->receiver,
|
||||||
TailCallStub(descriptor, code, p->context, p->receiver, p->name,
|
p->name, transition_map, p->value, p->slot, p->vector);
|
||||||
transition_map, p->value, p->slot, p->vector);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ void CallInterfaceDescriptorData::InitializePlatformSpecific(
|
|||||||
register_param_count_ = register_parameter_count;
|
register_param_count_ = register_parameter_count;
|
||||||
|
|
||||||
// InterfaceDescriptor owns a copy of the registers array.
|
// InterfaceDescriptor owns a copy of the registers array.
|
||||||
register_params_.reset(NewArray<Register>(register_parameter_count, no_reg));
|
register_params_ = NewArray<Register>(register_parameter_count, no_reg);
|
||||||
for (int i = 0; i < register_parameter_count; i++) {
|
for (int i = 0; i < register_parameter_count; i++) {
|
||||||
register_params_[i] = registers[i];
|
register_params_[i] = registers[i];
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@ void CallInterfaceDescriptorData::InitializePlatformIndependent(
|
|||||||
// InterfaceDescriptor owns a copy of the MachineType array.
|
// InterfaceDescriptor owns a copy of the MachineType array.
|
||||||
// We only care about parameters, not receiver and result.
|
// We only care about parameters, not receiver and result.
|
||||||
param_count_ = parameter_count + extra_parameter_count;
|
param_count_ = parameter_count + extra_parameter_count;
|
||||||
machine_types_.reset(NewArray<MachineType>(param_count_));
|
machine_types_ = NewArray<MachineType>(param_count_);
|
||||||
for (int i = 0; i < param_count_; i++) {
|
for (int i = 0; i < param_count_; i++) {
|
||||||
if (machine_types == nullptr || i >= parameter_count) {
|
if (machine_types == nullptr || i >= parameter_count) {
|
||||||
machine_types_[i] = MachineType::AnyTagged();
|
machine_types_[i] = MachineType::AnyTagged();
|
||||||
@ -37,6 +37,30 @@ void CallInterfaceDescriptorData::InitializePlatformIndependent(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CallInterfaceDescriptorData::Reset() {
|
||||||
|
delete[] machine_types_;
|
||||||
|
machine_types_ = nullptr;
|
||||||
|
delete[] register_params_;
|
||||||
|
register_params_ = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
CallInterfaceDescriptorData
|
||||||
|
CallDescriptors::call_descriptor_data_[NUMBER_OF_DESCRIPTORS];
|
||||||
|
|
||||||
|
void CallDescriptors::InitializeOncePerProcess() {
|
||||||
|
#define INTERFACE_DESCRIPTOR(name, ...) \
|
||||||
|
name##Descriptor().Initialize(&call_descriptor_data_[CallDescriptors::name]);
|
||||||
|
INTERFACE_DESCRIPTOR_LIST(INTERFACE_DESCRIPTOR)
|
||||||
|
#undef INTERFACE_DESCRIPTOR
|
||||||
|
}
|
||||||
|
|
||||||
|
void CallDescriptors::TearDown() {
|
||||||
|
for (CallInterfaceDescriptorData& data : call_descriptor_data_) {
|
||||||
|
data.Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CallInterfaceDescriptor::JSDefaultInitializePlatformSpecific(
|
void CallInterfaceDescriptor::JSDefaultInitializePlatformSpecific(
|
||||||
CallInterfaceDescriptorData* data, int non_js_register_parameter_count) {
|
CallInterfaceDescriptorData* data, int non_js_register_parameter_count) {
|
||||||
DCHECK_LE(static_cast<unsigned>(non_js_register_parameter_count), 1);
|
DCHECK_LE(static_cast<unsigned>(non_js_register_parameter_count), 1);
|
||||||
@ -58,15 +82,12 @@ void CallInterfaceDescriptor::JSDefaultInitializePlatformSpecific(
|
|||||||
default_js_stub_registers);
|
default_js_stub_registers);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* CallInterfaceDescriptor::DebugName(Isolate* isolate) const {
|
const char* CallInterfaceDescriptor::DebugName() const {
|
||||||
CallInterfaceDescriptorData* start = isolate->call_descriptor_data(0);
|
CallDescriptors::Key key = CallDescriptors::GetKey(data_);
|
||||||
size_t index = data_ - start;
|
|
||||||
DCHECK(index < CallDescriptors::NUMBER_OF_DESCRIPTORS);
|
|
||||||
CallDescriptors::Key key = static_cast<CallDescriptors::Key>(index);
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
#define DEF_CASE(NAME, ...) \
|
#define DEF_CASE(name, ...) \
|
||||||
case CallDescriptors::NAME: \
|
case CallDescriptors::name: \
|
||||||
return #NAME " Descriptor";
|
return #name " Descriptor";
|
||||||
INTERFACE_DESCRIPTOR_LIST(DEF_CASE)
|
INTERFACE_DESCRIPTOR_LIST(DEF_CASE)
|
||||||
#undef DEF_CASE
|
#undef DEF_CASE
|
||||||
case CallDescriptors::NUMBER_OF_DESCRIPTORS:
|
case CallDescriptors::NUMBER_OF_DESCRIPTORS:
|
||||||
|
@ -76,10 +76,7 @@ class PlatformInterfaceDescriptor;
|
|||||||
|
|
||||||
class V8_EXPORT_PRIVATE CallInterfaceDescriptorData {
|
class V8_EXPORT_PRIVATE CallInterfaceDescriptorData {
|
||||||
public:
|
public:
|
||||||
CallInterfaceDescriptorData()
|
CallInterfaceDescriptorData() = default;
|
||||||
: register_param_count_(-1),
|
|
||||||
param_count_(-1),
|
|
||||||
allocatable_registers_(0) {}
|
|
||||||
|
|
||||||
// A copy of the passed in registers and param_representations is made
|
// A copy of the passed in registers and param_representations is made
|
||||||
// and owned by the CallInterfaceDescriptorData.
|
// and owned by the CallInterfaceDescriptorData.
|
||||||
@ -99,6 +96,8 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptorData {
|
|||||||
int extra_parameter_count,
|
int extra_parameter_count,
|
||||||
const MachineType* machine_types);
|
const MachineType* machine_types);
|
||||||
|
|
||||||
|
void Reset();
|
||||||
|
|
||||||
bool IsInitialized() const {
|
bool IsInitialized() const {
|
||||||
return register_param_count_ >= 0 && param_count_ >= 0;
|
return register_param_count_ >= 0 && param_count_ >= 0;
|
||||||
}
|
}
|
||||||
@ -106,7 +105,7 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptorData {
|
|||||||
int param_count() const { return param_count_; }
|
int param_count() const { return param_count_; }
|
||||||
int register_param_count() const { return register_param_count_; }
|
int register_param_count() const { return register_param_count_; }
|
||||||
Register register_param(int index) const { return register_params_[index]; }
|
Register register_param(int index) const { return register_params_[index]; }
|
||||||
Register* register_params() const { return register_params_.get(); }
|
Register* register_params() const { return register_params_; }
|
||||||
MachineType param_type(int index) const { return machine_types_[index]; }
|
MachineType param_type(int index) const { return machine_types_[index]; }
|
||||||
PlatformInterfaceDescriptor* platform_specific_descriptor() const {
|
PlatformInterfaceDescriptor* platform_specific_descriptor() const {
|
||||||
return platform_specific_descriptor_;
|
return platform_specific_descriptor_;
|
||||||
@ -123,27 +122,26 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptorData {
|
|||||||
RegList allocatable_registers() const { return allocatable_registers_; }
|
RegList allocatable_registers() const { return allocatable_registers_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int register_param_count_;
|
int register_param_count_ = -1;
|
||||||
int param_count_;
|
int param_count_ = -1;
|
||||||
|
|
||||||
// Specifying the set of registers that could be used by the register
|
// Specifying the set of registers that could be used by the register
|
||||||
// allocator. Currently, it's only used by RecordWrite code stub.
|
// allocator. Currently, it's only used by RecordWrite code stub.
|
||||||
RegList allocatable_registers_;
|
RegList allocatable_registers_ = 0;
|
||||||
|
|
||||||
// The Register params are allocated dynamically by the
|
// The Register params are allocated dynamically by the
|
||||||
// InterfaceDescriptor, and freed on destruction. This is because static
|
// InterfaceDescriptor, and freed on destruction. This is because static
|
||||||
// arrays of Registers cause creation of runtime static initializers
|
// arrays of Registers cause creation of runtime static initializers
|
||||||
// which we don't want.
|
// which we don't want.
|
||||||
std::unique_ptr<Register[]> register_params_;
|
Register* register_params_ = nullptr;
|
||||||
std::unique_ptr<MachineType[]> machine_types_;
|
MachineType* machine_types_ = nullptr;
|
||||||
|
|
||||||
PlatformInterfaceDescriptor* platform_specific_descriptor_;
|
PlatformInterfaceDescriptor* platform_specific_descriptor_ = nullptr;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(CallInterfaceDescriptorData);
|
DISALLOW_COPY_AND_ASSIGN(CallInterfaceDescriptorData);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class V8_EXPORT_PRIVATE CallDescriptors : public AllStatic {
|
||||||
class CallDescriptors {
|
|
||||||
public:
|
public:
|
||||||
enum Key {
|
enum Key {
|
||||||
#define DEF_ENUM(name, ...) name,
|
#define DEF_ENUM(name, ...) name,
|
||||||
@ -151,6 +149,25 @@ class CallDescriptors {
|
|||||||
#undef DEF_ENUM
|
#undef DEF_ENUM
|
||||||
NUMBER_OF_DESCRIPTORS
|
NUMBER_OF_DESCRIPTORS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void InitializeOncePerProcess();
|
||||||
|
static void TearDown();
|
||||||
|
|
||||||
|
static CallInterfaceDescriptorData* call_descriptor_data(
|
||||||
|
CallDescriptors::Key key) {
|
||||||
|
return &call_descriptor_data_[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
static Key GetKey(const CallInterfaceDescriptorData* data) {
|
||||||
|
ptrdiff_t index = data - call_descriptor_data_;
|
||||||
|
DCHECK_LE(0, index);
|
||||||
|
DCHECK_LT(index, CallDescriptors::NUMBER_OF_DESCRIPTORS);
|
||||||
|
return static_cast<CallDescriptors::Key>(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
static CallInterfaceDescriptorData
|
||||||
|
call_descriptor_data_[NUMBER_OF_DESCRIPTORS];
|
||||||
};
|
};
|
||||||
|
|
||||||
class V8_EXPORT_PRIVATE CallInterfaceDescriptor {
|
class V8_EXPORT_PRIVATE CallInterfaceDescriptor {
|
||||||
@ -158,8 +175,8 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptor {
|
|||||||
CallInterfaceDescriptor() : data_(nullptr) {}
|
CallInterfaceDescriptor() : data_(nullptr) {}
|
||||||
virtual ~CallInterfaceDescriptor() {}
|
virtual ~CallInterfaceDescriptor() {}
|
||||||
|
|
||||||
CallInterfaceDescriptor(Isolate* isolate, CallDescriptors::Key key)
|
CallInterfaceDescriptor(CallDescriptors::Key key)
|
||||||
: data_(isolate->call_descriptor_data(key)) {}
|
: data_(CallDescriptors::call_descriptor_data(key)) {}
|
||||||
|
|
||||||
int GetParameterCount() const { return data()->param_count(); }
|
int GetParameterCount() const { return data()->param_count(); }
|
||||||
|
|
||||||
@ -191,7 +208,7 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptor {
|
|||||||
|
|
||||||
static const Register ContextRegister();
|
static const Register ContextRegister();
|
||||||
|
|
||||||
const char* DebugName(Isolate* isolate) const;
|
const char* DebugName() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const CallInterfaceDescriptorData* data() const { return data_; }
|
const CallInterfaceDescriptorData* data() const { return data_; }
|
||||||
@ -206,17 +223,6 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptor {
|
|||||||
nullptr);
|
nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize(Isolate* isolate, CallDescriptors::Key key) {
|
|
||||||
if (!data()->IsInitialized()) {
|
|
||||||
// We should only initialize descriptors on the isolate's main thread.
|
|
||||||
DCHECK(ThreadId::Current().Equals(isolate->thread_id()));
|
|
||||||
CallInterfaceDescriptorData* d = isolate->call_descriptor_data(key);
|
|
||||||
DCHECK(d == data()); // d should be a modifiable pointer to data().
|
|
||||||
InitializePlatformSpecific(d);
|
|
||||||
InitializePlatformIndependent(d);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initializes |data| using the platform dependent default set of registers.
|
// Initializes |data| using the platform dependent default set of registers.
|
||||||
// It is intended to be used for TurboFan stubs when particular set of
|
// It is intended to be used for TurboFan stubs when particular set of
|
||||||
// registers does not matter.
|
// registers does not matter.
|
||||||
@ -231,14 +237,24 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptor {
|
|||||||
CallInterfaceDescriptorData* data, int non_js_register_parameter_count);
|
CallInterfaceDescriptorData* data, int non_js_register_parameter_count);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// {CallDescriptors} is allowed to call the private {Initialize} method.
|
||||||
|
friend class CallDescriptors;
|
||||||
|
|
||||||
const CallInterfaceDescriptorData* data_;
|
const CallInterfaceDescriptorData* data_;
|
||||||
|
|
||||||
|
void Initialize(CallInterfaceDescriptorData* data) {
|
||||||
|
// The passed pointer should be a modifiable pointer to our own data.
|
||||||
|
DCHECK_EQ(data, data_);
|
||||||
|
DCHECK(!data->IsInitialized());
|
||||||
|
InitializePlatformSpecific(data);
|
||||||
|
InitializePlatformIndependent(data);
|
||||||
|
DCHECK(data->IsInitialized());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DECLARE_DESCRIPTOR_WITH_BASE(name, base) \
|
#define DECLARE_DESCRIPTOR_WITH_BASE(name, base) \
|
||||||
public: \
|
public: \
|
||||||
explicit name(Isolate* isolate) : base(isolate, key()) { \
|
explicit name() : base(key()) {} \
|
||||||
Initialize(isolate, key()); \
|
|
||||||
} \
|
|
||||||
static inline CallDescriptors::Key key();
|
static inline CallDescriptors::Key key();
|
||||||
|
|
||||||
constexpr int kMaxBuiltinRegisterParams = 5;
|
constexpr int kMaxBuiltinRegisterParams = 5;
|
||||||
@ -259,7 +275,7 @@ constexpr int kMaxBuiltinRegisterParams = 5;
|
|||||||
data->InitializePlatformIndependent(kRegisterParams, kStackParams, \
|
data->InitializePlatformIndependent(kRegisterParams, kStackParams, \
|
||||||
nullptr); \
|
nullptr); \
|
||||||
} \
|
} \
|
||||||
name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \
|
name(CallDescriptors::Key key) : base(key) {} \
|
||||||
\
|
\
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -271,7 +287,7 @@ constexpr int kMaxBuiltinRegisterParams = 5;
|
|||||||
override { \
|
override { \
|
||||||
JSDefaultInitializePlatformSpecific(data, non_js_reg_parameters_count); \
|
JSDefaultInitializePlatformSpecific(data, non_js_reg_parameters_count); \
|
||||||
} \
|
} \
|
||||||
name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \
|
name(CallDescriptors::Key key) : base(key) {} \
|
||||||
\
|
\
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -293,7 +309,7 @@ constexpr int kMaxBuiltinRegisterParams = 5;
|
|||||||
DECLARE_DESCRIPTOR_WITH_BASE(name, base) \
|
DECLARE_DESCRIPTOR_WITH_BASE(name, base) \
|
||||||
protected: \
|
protected: \
|
||||||
void InitializePlatformSpecific(CallInterfaceDescriptorData* data) override; \
|
void InitializePlatformSpecific(CallInterfaceDescriptorData* data) override; \
|
||||||
name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \
|
name(CallDescriptors::Key key) : base(key) {} \
|
||||||
\
|
\
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -1423,12 +1423,12 @@ Node* InterpreterAssembler::DispatchToBytecodeHandler(Node* handler,
|
|||||||
|
|
||||||
Node* InterpreterAssembler::DispatchToBytecodeHandlerEntry(
|
Node* InterpreterAssembler::DispatchToBytecodeHandlerEntry(
|
||||||
Node* handler_entry, Node* bytecode_offset, Node* target_bytecode) {
|
Node* handler_entry, Node* bytecode_offset, Node* target_bytecode) {
|
||||||
InterpreterDispatchDescriptor descriptor(isolate());
|
|
||||||
// Propagate speculation poisoning.
|
// Propagate speculation poisoning.
|
||||||
Node* poisoned_handler_entry = WordPoisonOnSpeculation(handler_entry);
|
Node* poisoned_handler_entry = WordPoisonOnSpeculation(handler_entry);
|
||||||
return TailCallBytecodeDispatch(
|
return TailCallBytecodeDispatch(
|
||||||
descriptor, poisoned_handler_entry, GetAccumulatorUnchecked(),
|
InterpreterDispatchDescriptor{}, poisoned_handler_entry,
|
||||||
bytecode_offset, BytecodeArrayTaggedPointer(), DispatchTableRawPointer());
|
GetAccumulatorUnchecked(), bytecode_offset, BytecodeArrayTaggedPointer(),
|
||||||
|
DispatchTableRawPointer());
|
||||||
}
|
}
|
||||||
|
|
||||||
void InterpreterAssembler::DispatchWide(OperandScale operand_scale) {
|
void InterpreterAssembler::DispatchWide(OperandScale operand_scale) {
|
||||||
|
@ -3107,9 +3107,8 @@ IGNITION_HANDLER(ResumeGenerator, InterpreterAssembler) {
|
|||||||
Handle<Code> GenerateBytecodeHandler(Isolate* isolate, Bytecode bytecode,
|
Handle<Code> GenerateBytecodeHandler(Isolate* isolate, Bytecode bytecode,
|
||||||
OperandScale operand_scale) {
|
OperandScale operand_scale) {
|
||||||
Zone zone(isolate->allocator(), ZONE_NAME);
|
Zone zone(isolate->allocator(), ZONE_NAME);
|
||||||
InterpreterDispatchDescriptor descriptor(isolate);
|
|
||||||
compiler::CodeAssemblerState state(
|
compiler::CodeAssemblerState state(
|
||||||
isolate, &zone, descriptor, Code::BYTECODE_HANDLER,
|
isolate, &zone, InterpreterDispatchDescriptor{}, Code::BYTECODE_HANDLER,
|
||||||
Bytecodes::ToString(bytecode),
|
Bytecodes::ToString(bytecode),
|
||||||
FLAG_untrusted_code_mitigations
|
FLAG_untrusted_code_mitigations
|
||||||
? PoisoningMitigationLevel::kPoisonCriticalOnly
|
? PoisoningMitigationLevel::kPoisonCriticalOnly
|
||||||
@ -3183,9 +3182,9 @@ Handle<Code> GenerateDeserializeLazyHandler(Isolate* isolate,
|
|||||||
debug_name = debug_name.append(Bytecodes::ToString(prefix_bytecode));
|
debug_name = debug_name.append(Bytecodes::ToString(prefix_bytecode));
|
||||||
}
|
}
|
||||||
|
|
||||||
InterpreterDispatchDescriptor descriptor(isolate);
|
|
||||||
compiler::CodeAssemblerState state(
|
compiler::CodeAssemblerState state(
|
||||||
isolate, &zone, descriptor, Code::BYTECODE_HANDLER, debug_name.c_str(),
|
isolate, &zone, InterpreterDispatchDescriptor{}, Code::BYTECODE_HANDLER,
|
||||||
|
debug_name.c_str(),
|
||||||
FLAG_untrusted_code_mitigations
|
FLAG_untrusted_code_mitigations
|
||||||
? PoisoningMitigationLevel::kPoisonCriticalOnly
|
? PoisoningMitigationLevel::kPoisonCriticalOnly
|
||||||
: PoisoningMitigationLevel::kDontPoison,
|
: PoisoningMitigationLevel::kDontPoison,
|
||||||
|
@ -2508,7 +2508,6 @@ Isolate::Isolate()
|
|||||||
setup_delegate_(nullptr),
|
setup_delegate_(nullptr),
|
||||||
regexp_stack_(nullptr),
|
regexp_stack_(nullptr),
|
||||||
date_cache_(nullptr),
|
date_cache_(nullptr),
|
||||||
call_descriptor_data_(nullptr),
|
|
||||||
// TODO(bmeurer) Initialized lazily because it depends on flags; can
|
// TODO(bmeurer) Initialized lazily because it depends on flags; can
|
||||||
// be fixed once the default isolate cleanup is done.
|
// be fixed once the default isolate cleanup is done.
|
||||||
random_number_generator_(nullptr),
|
random_number_generator_(nullptr),
|
||||||
@ -2727,9 +2726,6 @@ Isolate::~Isolate() {
|
|||||||
delete date_cache_;
|
delete date_cache_;
|
||||||
date_cache_ = nullptr;
|
date_cache_ = nullptr;
|
||||||
|
|
||||||
delete[] call_descriptor_data_;
|
|
||||||
call_descriptor_data_ = nullptr;
|
|
||||||
|
|
||||||
delete regexp_stack_;
|
delete regexp_stack_;
|
||||||
regexp_stack_ = nullptr;
|
regexp_stack_ = nullptr;
|
||||||
|
|
||||||
@ -2961,8 +2957,6 @@ bool Isolate::Init(StartupDeserializer* des) {
|
|||||||
regexp_stack_ = new RegExpStack();
|
regexp_stack_ = new RegExpStack();
|
||||||
regexp_stack_->isolate_ = this;
|
regexp_stack_->isolate_ = this;
|
||||||
date_cache_ = new DateCache();
|
date_cache_ = new DateCache();
|
||||||
call_descriptor_data_ =
|
|
||||||
new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS];
|
|
||||||
heap_profiler_ = new HeapProfiler(heap());
|
heap_profiler_ = new HeapProfiler(heap());
|
||||||
interpreter_ = new interpreter::Interpreter(this);
|
interpreter_ = new interpreter::Interpreter(this);
|
||||||
compiler_dispatcher_ =
|
compiler_dispatcher_ =
|
||||||
@ -3006,12 +3000,6 @@ bool Isolate::Init(StartupDeserializer* des) {
|
|||||||
wasm_engine_->code_manager()->SetModuleCodeSizeHistogram(
|
wasm_engine_->code_manager()->SetModuleCodeSizeHistogram(
|
||||||
counters()->wasm_module_code_size_mb());
|
counters()->wasm_module_code_size_mb());
|
||||||
|
|
||||||
// Initialize the interface descriptors ahead of time.
|
|
||||||
#define INTERFACE_DESCRIPTOR(Name, ...) \
|
|
||||||
{ Name##Descriptor(this); }
|
|
||||||
INTERFACE_DESCRIPTOR_LIST(INTERFACE_DESCRIPTOR)
|
|
||||||
#undef INTERFACE_DESCRIPTOR
|
|
||||||
|
|
||||||
deoptimizer_data_ = new DeoptimizerData(heap());
|
deoptimizer_data_ = new DeoptimizerData(heap());
|
||||||
|
|
||||||
const bool create_heap_objects = (des == nullptr);
|
const bool create_heap_objects = (des == nullptr);
|
||||||
@ -3604,12 +3592,6 @@ bool Isolate::IsAnyInitialArrayPrototype(Handle<JSArray> array) {
|
|||||||
return IsInAnyContext(*array, Context::INITIAL_ARRAY_PROTOTYPE_INDEX);
|
return IsInAnyContext(*array, Context::INITIAL_ARRAY_PROTOTYPE_INDEX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CallInterfaceDescriptorData* Isolate::call_descriptor_data(int index) {
|
|
||||||
DCHECK(0 <= index && index < CallDescriptors::NUMBER_OF_DESCRIPTORS);
|
|
||||||
return &call_descriptor_data_[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
static base::RandomNumberGenerator* ensure_rng_exists(
|
static base::RandomNumberGenerator* ensure_rng_exists(
|
||||||
base::RandomNumberGenerator** rng, int seed) {
|
base::RandomNumberGenerator** rng, int seed) {
|
||||||
if (*rng == nullptr) {
|
if (*rng == nullptr) {
|
||||||
|
@ -54,7 +54,6 @@ class AstStringConstants;
|
|||||||
class BasicBlockProfiler;
|
class BasicBlockProfiler;
|
||||||
class Bootstrapper;
|
class Bootstrapper;
|
||||||
class BuiltinsConstantsTableBuilder;
|
class BuiltinsConstantsTableBuilder;
|
||||||
class CallInterfaceDescriptorData;
|
|
||||||
class CancelableTaskManager;
|
class CancelableTaskManager;
|
||||||
class CodeEventDispatcher;
|
class CodeEventDispatcher;
|
||||||
class ExternalCodeEventListener;
|
class ExternalCodeEventListener;
|
||||||
@ -1144,9 +1143,6 @@ class Isolate : private HiddenFactory {
|
|||||||
// Returns true if array is the initial array prototype in any native context.
|
// Returns true if array is the initial array prototype in any native context.
|
||||||
bool IsAnyInitialArrayPrototype(Handle<JSArray> array);
|
bool IsAnyInitialArrayPrototype(Handle<JSArray> array);
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE CallInterfaceDescriptorData* call_descriptor_data(
|
|
||||||
int index);
|
|
||||||
|
|
||||||
void IterateDeferredHandles(RootVisitor* visitor);
|
void IterateDeferredHandles(RootVisitor* visitor);
|
||||||
void LinkDeferredHandles(DeferredHandles* deferred_handles);
|
void LinkDeferredHandles(DeferredHandles* deferred_handles);
|
||||||
void UnlinkDeferredHandles(DeferredHandles* deferred_handles);
|
void UnlinkDeferredHandles(DeferredHandles* deferred_handles);
|
||||||
@ -1562,7 +1558,6 @@ class Isolate : private HiddenFactory {
|
|||||||
RegExpStack* regexp_stack_;
|
RegExpStack* regexp_stack_;
|
||||||
std::vector<int> regexp_indices_;
|
std::vector<int> regexp_indices_;
|
||||||
DateCache* date_cache_;
|
DateCache* date_cache_;
|
||||||
CallInterfaceDescriptorData* call_descriptor_data_;
|
|
||||||
base::RandomNumberGenerator* random_number_generator_;
|
base::RandomNumberGenerator* random_number_generator_;
|
||||||
base::RandomNumberGenerator* fuzzer_rng_;
|
base::RandomNumberGenerator* fuzzer_rng_;
|
||||||
base::AtomicValue<RAILMode> rail_mode_;
|
base::AtomicValue<RAILMode> rail_mode_;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "src/deoptimizer.h"
|
#include "src/deoptimizer.h"
|
||||||
#include "src/elements.h"
|
#include "src/elements.h"
|
||||||
#include "src/frames.h"
|
#include "src/frames.h"
|
||||||
|
#include "src/interface-descriptors.h"
|
||||||
#include "src/isolate.h"
|
#include "src/isolate.h"
|
||||||
#include "src/libsampler/sampler.h"
|
#include "src/libsampler/sampler.h"
|
||||||
#include "src/objects-inl.h"
|
#include "src/objects-inl.h"
|
||||||
@ -46,6 +47,7 @@ void V8::TearDown() {
|
|||||||
#if defined(USE_SIMULATOR)
|
#if defined(USE_SIMULATOR)
|
||||||
Simulator::GlobalTearDown();
|
Simulator::GlobalTearDown();
|
||||||
#endif
|
#endif
|
||||||
|
CallDescriptors::TearDown();
|
||||||
Bootstrapper::TearDownExtensions();
|
Bootstrapper::TearDownExtensions();
|
||||||
ElementsAccessor::TearDown();
|
ElementsAccessor::TearDown();
|
||||||
RegisteredExtension::UnregisterAll();
|
RegisteredExtension::UnregisterAll();
|
||||||
@ -81,6 +83,7 @@ void V8::InitializeOncePerProcessImpl() {
|
|||||||
CpuFeatures::Probe(false);
|
CpuFeatures::Probe(false);
|
||||||
ElementsAccessor::InitializeOncePerProcess();
|
ElementsAccessor::InitializeOncePerProcess();
|
||||||
Bootstrapper::InitializeOncePerProcess();
|
Bootstrapper::InitializeOncePerProcess();
|
||||||
|
CallDescriptors::InitializeOncePerProcess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class CodeAssemblerTester {
|
|||||||
explicit CodeAssemblerTester(Isolate* isolate, const char* name = "test")
|
explicit CodeAssemblerTester(Isolate* isolate, const char* name = "test")
|
||||||
: zone_(isolate->allocator(), ZONE_NAME),
|
: zone_(isolate->allocator(), ZONE_NAME),
|
||||||
scope_(isolate),
|
scope_(isolate),
|
||||||
state_(isolate, &zone_, VoidDescriptor(isolate), Code::STUB, name,
|
state_(isolate, &zone_, VoidDescriptor{}, Code::STUB, name,
|
||||||
PoisoningMitigationLevel::kDontPoison) {}
|
PoisoningMitigationLevel::kDontPoison) {}
|
||||||
|
|
||||||
// Test generating code for a JS function (e.g. builtins).
|
// Test generating code for a JS function (e.g. builtins).
|
||||||
|
@ -108,7 +108,7 @@ TEST(TestLinkageStubCall) {
|
|||||||
Callable callable = Builtins::CallableFor(isolate, Builtins::kToNumber);
|
Callable callable = Builtins::CallableFor(isolate, Builtins::kToNumber);
|
||||||
OptimizedCompilationInfo info(ArrayVector("test"), &zone, Code::STUB);
|
OptimizedCompilationInfo info(ArrayVector("test"), &zone, Code::STUB);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate, &zone, callable.descriptor(), 0, CallDescriptor::kNoFlags,
|
&zone, callable.descriptor(), 0, CallDescriptor::kNoFlags,
|
||||||
Operator::kNoProperties);
|
Operator::kNoProperties);
|
||||||
CHECK(call_descriptor);
|
CHECK(call_descriptor);
|
||||||
CHECK_EQ(0, static_cast<int>(call_descriptor->StackParameterCount()));
|
CHECK_EQ(0, static_cast<int>(call_descriptor->StackParameterCount()));
|
||||||
|
@ -27,9 +27,8 @@ class StubTester {
|
|||||||
info_(ArrayVector("test"), zone, Code::STUB),
|
info_(ArrayVector("test"), zone, Code::STUB),
|
||||||
interface_descriptor_(stub->GetCallInterfaceDescriptor()),
|
interface_descriptor_(stub->GetCallInterfaceDescriptor()),
|
||||||
descriptor_(Linkage::GetStubCallDescriptor(
|
descriptor_(Linkage::GetStubCallDescriptor(
|
||||||
isolate, zone, interface_descriptor_,
|
zone, interface_descriptor_, stub->GetStackParameterCount(),
|
||||||
stub->GetStackParameterCount(), CallDescriptor::kNoFlags,
|
CallDescriptor::kNoFlags, Operator::kNoProperties)),
|
||||||
Operator::kNoProperties)),
|
|
||||||
graph_(zone_),
|
graph_(zone_),
|
||||||
common_(zone_),
|
common_(zone_),
|
||||||
tester_(InitializeFunctionTester(stub->GetCode()),
|
tester_(InitializeFunctionTester(stub->GetCode()),
|
||||||
@ -41,7 +40,7 @@ class StubTester {
|
|||||||
interface_descriptor_(
|
interface_descriptor_(
|
||||||
Builtins::CallableFor(isolate, name).descriptor()),
|
Builtins::CallableFor(isolate, name).descriptor()),
|
||||||
descriptor_(Linkage::GetStubCallDescriptor(
|
descriptor_(Linkage::GetStubCallDescriptor(
|
||||||
isolate, zone, interface_descriptor_,
|
zone, interface_descriptor_,
|
||||||
interface_descriptor_.GetStackParameterCount(),
|
interface_descriptor_.GetStackParameterCount(),
|
||||||
CallDescriptor::kNoFlags, Operator::kNoProperties)),
|
CallDescriptor::kNoFlags, Operator::kNoProperties)),
|
||||||
graph_(zone_),
|
graph_(zone_),
|
||||||
|
@ -31,8 +31,8 @@ namespace internal {
|
|||||||
CodeStubAssemblerTestState::CodeStubAssemblerTestState(
|
CodeStubAssemblerTestState::CodeStubAssemblerTestState(
|
||||||
CodeStubAssemblerTest* test)
|
CodeStubAssemblerTest* test)
|
||||||
: compiler::CodeAssemblerState(
|
: compiler::CodeAssemblerState(
|
||||||
test->isolate(), test->zone(), VoidDescriptor(test->isolate()),
|
test->isolate(), test->zone(), VoidDescriptor{}, Code::STUB, "test",
|
||||||
Code::STUB, "test", PoisoningMitigationLevel::kPoisonCriticalOnly) {}
|
PoisoningMitigationLevel::kPoisonCriticalOnly) {}
|
||||||
|
|
||||||
TARGET_TEST_F(CodeStubAssemblerTest, SmiTag) {
|
TARGET_TEST_F(CodeStubAssemblerTest, SmiTag) {
|
||||||
CodeStubAssemblerTestState state(this);
|
CodeStubAssemblerTestState state(this);
|
||||||
|
@ -19,8 +19,8 @@ namespace internal {
|
|||||||
namespace compiler {
|
namespace compiler {
|
||||||
|
|
||||||
CodeAssemblerTestState::CodeAssemblerTestState(CodeAssemblerTest* test)
|
CodeAssemblerTestState::CodeAssemblerTestState(CodeAssemblerTest* test)
|
||||||
: CodeAssemblerState(test->isolate(), test->zone(),
|
: CodeAssemblerState(test->isolate(), test->zone(), VoidDescriptor{},
|
||||||
VoidDescriptor(test->isolate()), Code::STUB, "test",
|
Code::STUB, "test",
|
||||||
PoisoningMitigationLevel::kPoisonCriticalOnly) {}
|
PoisoningMitigationLevel::kPoisonCriticalOnly) {}
|
||||||
|
|
||||||
TARGET_TEST_F(CodeAssemblerTest, IntPtrAdd) {
|
TARGET_TEST_F(CodeAssemblerTest, IntPtrAdd) {
|
||||||
|
@ -422,8 +422,8 @@ TARGET_TEST_F(InstructionSelectorTest, CallStubWithDeopt) {
|
|||||||
|
|
||||||
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
|
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), callable.descriptor(), 1,
|
zone(), callable.descriptor(), 1, CallDescriptor::kNeedsFrameState,
|
||||||
CallDescriptor::kNeedsFrameState, Operator::kNoProperties);
|
Operator::kNoProperties);
|
||||||
|
|
||||||
// Build frame state for the state before the call.
|
// Build frame state for the state before the call.
|
||||||
Node* parameters = m.AddNode(
|
Node* parameters = m.AddNode(
|
||||||
@ -517,8 +517,8 @@ TARGET_TEST_F(InstructionSelectorTest, CallStubWithDeoptRecursiveFrameState) {
|
|||||||
|
|
||||||
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
|
Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
|
||||||
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
auto call_descriptor = Linkage::GetStubCallDescriptor(
|
||||||
isolate(), zone(), callable.descriptor(), 1,
|
zone(), callable.descriptor(), 1, CallDescriptor::kNeedsFrameState,
|
||||||
CallDescriptor::kNeedsFrameState, Operator::kNoProperties);
|
Operator::kNoProperties);
|
||||||
|
|
||||||
// Build frame state for the state before the call.
|
// Build frame state for the state before the call.
|
||||||
Node* parameters = m.AddNode(
|
Node* parameters = m.AddNode(
|
||||||
|
@ -25,8 +25,7 @@ namespace interpreter_assembler_unittest {
|
|||||||
InterpreterAssemblerTestState::InterpreterAssemblerTestState(
|
InterpreterAssemblerTestState::InterpreterAssemblerTestState(
|
||||||
InterpreterAssemblerTest* test, Bytecode bytecode)
|
InterpreterAssemblerTest* test, Bytecode bytecode)
|
||||||
: compiler::CodeAssemblerState(
|
: compiler::CodeAssemblerState(
|
||||||
test->isolate(), test->zone(),
|
test->isolate(), test->zone(), InterpreterDispatchDescriptor{},
|
||||||
InterpreterDispatchDescriptor(test->isolate()),
|
|
||||||
Code::BYTECODE_HANDLER, Bytecodes::ToString(bytecode),
|
Code::BYTECODE_HANDLER, Bytecodes::ToString(bytecode),
|
||||||
PoisoningMitigationLevel::kPoisonCriticalOnly,
|
PoisoningMitigationLevel::kPoisonCriticalOnly,
|
||||||
Bytecodes::ReturnCount(bytecode)) {}
|
Bytecodes::ReturnCount(bytecode)) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user