Commit 9f02d08f authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[cleanup] Tnodifiy builtins-handler-gen.cc

Also tnodifies TransitionElementsKind, StoreMap and
LoadStringLengthAsSmi in code-stub-assembler.cc.

Bug: v8:9810, v8:6949
Change-Id: If7214f0a9645adc9d478fd4f7cb1257c0e01608c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1897888Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64770}
parent 6be9ac9d
This diff is collapsed.
......@@ -1915,8 +1915,7 @@ TNode<Uint32T> CodeStubAssembler::LoadNameHash(SloppyTNode<Name> name,
return Unsigned(Word32Shr(hash_field, Int32Constant(Name::kHashShift)));
}
TNode<Smi> CodeStubAssembler::LoadStringLengthAsSmi(
SloppyTNode<String> string) {
TNode<Smi> CodeStubAssembler::LoadStringLengthAsSmi(TNode<String> string) {
return SmiFromIntPtr(LoadStringLengthAsWord(string));
}
......@@ -2896,8 +2895,8 @@ void CodeStubAssembler::StoreObjectFieldNoWriteBarrier(
IntPtrSub(offset, IntPtrConstant(kHeapObjectTag)), value);
}
void CodeStubAssembler::StoreMap(Node* object, Node* map) {
OptimizedStoreMap(UncheckedCast<HeapObject>(object), CAST(map));
void CodeStubAssembler::StoreMap(TNode<HeapObject> object, TNode<Map> map) {
OptimizedStoreMap(object, map);
}
void CodeStubAssembler::StoreMapNoWriteBarrier(Node* object,
......@@ -10343,7 +10342,8 @@ Node* CodeStubAssembler::CopyElementsOnWrite(Node* object, Node* elements,
return new_elements_var.value();
}
void CodeStubAssembler::TransitionElementsKind(Node* object, Node* map,
void CodeStubAssembler::TransitionElementsKind(TNode<JSObject> object,
TNode<Map> map,
ElementsKind from_kind,
ElementsKind to_kind,
Label* bailout) {
......@@ -10367,7 +10367,7 @@ void CodeStubAssembler::TransitionElementsKind(Node* object, Node* map,
IsJSArray(object),
[=]() {
CSA_ASSERT(this, IsFastElementsKind(LoadElementsKind(object)));
return SmiUntag(LoadFastJSArrayLength(object));
return SmiUntag(LoadFastJSArrayLength(CAST(object)));
},
[=]() { return elements_length; },
MachineType::PointerRepresentation());
......
......@@ -1203,7 +1203,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
Label* if_hash_not_computed = nullptr);
// Load length field of a String object as Smi value.
TNode<Smi> LoadStringLengthAsSmi(SloppyTNode<String> string);
TNode<Smi> LoadStringLengthAsSmi(TNode<String> string);
// Load length field of a String object as intptr_t value.
TNode<IntPtrT> LoadStringLengthAsWord(SloppyTNode<String> string);
// Load length field of a String object as uint32_t value.
......@@ -1524,7 +1524,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
}
// Store the Map of an HeapObject.
void StoreMap(Node* object, Node* map);
void StoreMap(TNode<HeapObject> object, TNode<Map> map);
void StoreMapNoWriteBarrier(Node* object, RootIndex map_root_index);
void StoreMapNoWriteBarrier(Node* object, Node* map);
void StoreObjectFieldRoot(Node* object, int offset, RootIndex root);
......@@ -3249,8 +3249,9 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
Node* CopyElementsOnWrite(Node* object, Node* elements, ElementsKind kind,
Node* length, ParameterMode mode, Label* bailout);
void TransitionElementsKind(Node* object, Node* map, ElementsKind from_kind,
ElementsKind to_kind, Label* bailout);
void TransitionElementsKind(TNode<JSObject> object, TNode<Map> map,
ElementsKind from_kind, ElementsKind to_kind,
Label* bailout);
void TrapAllocationMemento(Node* object, Label* memento_found);
......
......@@ -254,8 +254,8 @@ void KeyedStoreGenericAssembler::TryChangeToHoleyMapHelper(
if (AllocationSite::ShouldTrack(packed_kind, holey_kind)) {
TrapAllocationMemento(receiver, bailout);
}
TNode<Object> holey_map =
LoadContextElement(native_context, Context::ArrayMapIndex(holey_kind));
TNode<Map> holey_map = CAST(
LoadContextElement(native_context, Context::ArrayMapIndex(holey_kind)));
StoreMap(receiver, holey_map);
Goto(done);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment