[cleanup] Rename LoadObjectMap to LoadObjectFunctionInitialMap
Bug: v8:10763 Change-Id: I8e8f7924928175516e7ba2500f4660dc160158b2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2409278 Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#69871}
This commit is contained in:
parent
8a41a70638
commit
ab4fe69f4f
@ -601,7 +601,7 @@ TNode<HeapObject> ConstructorBuiltinsAssembler::CreateShallowObjectLiteral(
|
||||
TNode<JSObject> ConstructorBuiltinsAssembler::CreateEmptyObjectLiteral(
|
||||
TNode<Context> context) {
|
||||
TNode<NativeContext> native_context = LoadNativeContext(context);
|
||||
TNode<Map> map = LoadObjectMap(native_context);
|
||||
TNode<Map> map = LoadObjectFunctionInitialMap(native_context);
|
||||
// Ensure that slack tracking is disabled for the map.
|
||||
STATIC_ASSERT(Map::kNoSlackTracking == 0);
|
||||
CSA_ASSERT(this, IsClearWord32<Map::Bits3::ConstructionCounterBits>(
|
||||
|
@ -1031,7 +1031,7 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
|
||||
|
||||
TNode<Object> prototype = args.GetOptionalArgumentValue(kPrototypeArg);
|
||||
TNode<Object> properties = args.GetOptionalArgumentValue(kPropertiesArg);
|
||||
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
|
||||
TNode<NativeContext> native_context = CAST(Parameter(Descriptor::kContext));
|
||||
|
||||
Label call_runtime(this, Label::kDeferred), prototype_valid(this),
|
||||
no_properties(this);
|
||||
@ -1067,13 +1067,13 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
|
||||
{
|
||||
TVARIABLE(Map, map);
|
||||
TVARIABLE(HeapObject, properties);
|
||||
Label non_null_proto(this), instantiate_map(this), good(this);
|
||||
Label null_proto(this), non_null_proto(this), instantiate_map(this);
|
||||
|
||||
Branch(IsNull(prototype), &good, &non_null_proto);
|
||||
Branch(IsNull(prototype), &null_proto, &non_null_proto);
|
||||
|
||||
BIND(&good);
|
||||
BIND(&null_proto);
|
||||
{
|
||||
map = LoadObjectWithNullPrototypeMap(context);
|
||||
map = LoadSlowObjectWithNullPrototypeMap(native_context);
|
||||
properties = AllocateNameDictionary(NameDictionary::kInitialCapacity);
|
||||
Goto(&instantiate_map);
|
||||
}
|
||||
@ -1081,7 +1081,7 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
|
||||
BIND(&non_null_proto);
|
||||
{
|
||||
properties = EmptyFixedArrayConstant();
|
||||
map = LoadObjectMap(context);
|
||||
map = LoadObjectFunctionInitialMap(native_context);
|
||||
GotoIf(TaggedEqual(prototype, LoadMapPrototype(map.value())),
|
||||
&instantiate_map);
|
||||
// Try loading the prototype info.
|
||||
@ -1105,8 +1105,8 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
|
||||
|
||||
BIND(&call_runtime);
|
||||
{
|
||||
TNode<Object> result =
|
||||
CallRuntime(Runtime::kObjectCreate, context, prototype, properties);
|
||||
TNode<Object> result = CallRuntime(Runtime::kObjectCreate, native_context,
|
||||
prototype, properties);
|
||||
args.PopAndReturn(result);
|
||||
}
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ TNode<JSRegExpResult> RegExpBuiltinsAssembler::ConstructNewResultFromMatchInfo(
|
||||
|
||||
TNode<IntPtrT> num_properties = WordSar(names_length, 1);
|
||||
TNode<NativeContext> native_context = LoadNativeContext(context);
|
||||
TNode<Map> map = LoadObjectWithNullPrototypeMap(native_context);
|
||||
TNode<Map> map = LoadSlowObjectWithNullPrototypeMap(native_context);
|
||||
TNode<NameDictionary> properties =
|
||||
AllocateNameDictionary(num_properties, kAllowLargeObjectAllocation);
|
||||
|
||||
|
@ -2520,17 +2520,17 @@ TNode<Context> CodeStubAssembler::LoadModuleContext(
|
||||
return UncheckedCast<Context>(cur_context.value());
|
||||
}
|
||||
|
||||
TNode<Map> CodeStubAssembler::LoadObjectMap(TNode<Context> context) {
|
||||
TNode<HeapObject> object_function =
|
||||
CAST(LoadContextElement(context, Context::OBJECT_FUNCTION_INDEX));
|
||||
return LoadObjectField<Map>(object_function,
|
||||
JSFunction::kPrototypeOrInitialMapOffset);
|
||||
TNode<Map> CodeStubAssembler::LoadObjectFunctionInitialMap(
|
||||
TNode<NativeContext> native_context) {
|
||||
TNode<JSFunction> object_function =
|
||||
CAST(LoadContextElement(native_context, Context::OBJECT_FUNCTION_INDEX));
|
||||
return CAST(LoadJSFunctionPrototypeOrInitialMap(object_function));
|
||||
}
|
||||
|
||||
TNode<Map> CodeStubAssembler::LoadObjectWithNullPrototypeMap(
|
||||
TNode<Context> context) {
|
||||
TNode<Map> CodeStubAssembler::LoadSlowObjectWithNullPrototypeMap(
|
||||
TNode<NativeContext> native_context) {
|
||||
TNode<Map> map = CAST(LoadContextElement(
|
||||
context, Context::SLOW_OBJECT_WITH_NULL_PROTOTYPE_MAP));
|
||||
native_context, Context::SLOW_OBJECT_WITH_NULL_PROTOTYPE_MAP));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -1412,8 +1412,10 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
if_equal);
|
||||
}
|
||||
|
||||
TNode<Map> LoadObjectMap(TNode<Context> context);
|
||||
TNode<Map> LoadObjectWithNullPrototypeMap(TNode<Context> context);
|
||||
// Loads the initial map of the the Object constructor.
|
||||
TNode<Map> LoadObjectFunctionInitialMap(TNode<NativeContext> native_context);
|
||||
TNode<Map> LoadSlowObjectWithNullPrototypeMap(
|
||||
TNode<NativeContext> native_context);
|
||||
|
||||
TNode<Map> LoadJSArrayElementsMap(ElementsKind kind,
|
||||
SloppyTNode<NativeContext> native_context);
|
||||
|
@ -4066,7 +4066,7 @@ void AccessorAssembler::GenerateCloneObjectIC_Slow() {
|
||||
// used.
|
||||
|
||||
TNode<NativeContext> native_context = LoadNativeContext(context);
|
||||
TNode<Map> initial_map = LoadObjectMap(native_context);
|
||||
TNode<Map> initial_map = LoadObjectFunctionInitialMap(native_context);
|
||||
TNode<JSObject> result = AllocateJSObjectFromMap(initial_map);
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user