Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/ic/keyed-store-generic.cc')
-rw-r--r--deps/v8/src/ic/keyed-store-generic.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/deps/v8/src/ic/keyed-store-generic.cc b/deps/v8/src/ic/keyed-store-generic.cc
index 88a66e17607..bc752e0e93e 100644
--- a/deps/v8/src/ic/keyed-store-generic.cc
+++ b/deps/v8/src/ic/keyed-store-generic.cc
@@ -80,9 +80,9 @@ class KeyedStoreGenericAssembler : public AccessorAssembler {
Nothing<LanguageMode>());
}
- void BranchIfPrototypesHaveNonFastElements(TNode<Map> receiver_map,
- Label* non_fast_elements,
- Label* only_fast_elements);
+ void BranchIfPrototypesMayHaveReadOnlyElements(
+ TNode<Map> receiver_map, Label* maybe_read_only_elements,
+ Label* only_fast_writable_elements);
void TryRewriteElements(TNode<JSObject> receiver, TNode<Map> receiver_map,
TNode<FixedArrayBase> elements,
@@ -176,9 +176,9 @@ void KeyedStoreGenericGenerator::SetPropertyInLiteral(
assembler.SetProperty(context, receiver, key, value, LanguageMode::kStrict);
}
-void KeyedStoreGenericAssembler::BranchIfPrototypesHaveNonFastElements(
- TNode<Map> receiver_map, Label* non_fast_elements,
- Label* only_fast_elements) {
+void KeyedStoreGenericAssembler::BranchIfPrototypesMayHaveReadOnlyElements(
+ TNode<Map> receiver_map, Label* maybe_read_only_elements,
+ Label* only_fast_writable_elements) {
TVARIABLE(Map, var_map);
var_map = receiver_map;
Label loop_body(this, &var_map);
@@ -188,16 +188,17 @@ void KeyedStoreGenericAssembler::BranchIfPrototypesHaveNonFastElements(
{
TNode<Map> map = var_map.value();
TNode<HeapObject> prototype = LoadMapPrototype(map);
- GotoIf(IsNull(prototype), only_fast_elements);
+ GotoIf(IsNull(prototype), only_fast_writable_elements);
TNode<Map> prototype_map = LoadMap(prototype);
var_map = prototype_map;
TNode<Uint16T> instance_type = LoadMapInstanceType(prototype_map);
GotoIf(IsCustomElementsReceiverInstanceType(instance_type),
- non_fast_elements);
+ maybe_read_only_elements);
TNode<Int32T> elements_kind = LoadMapElementsKind(prototype_map);
- GotoIf(IsFastElementsKind(elements_kind), &loop_body);
+ GotoIf(IsFastOrNonExtensibleOrSealedElementsKind(elements_kind),
+ &loop_body);
GotoIf(Word32Equal(elements_kind, Int32Constant(NO_ELEMENTS)), &loop_body);
- Goto(non_fast_elements);
+ Goto(maybe_read_only_elements);
}
}
@@ -350,8 +351,8 @@ void KeyedStoreGenericAssembler::StoreElementWithCapacity(
CAST(Load(MachineType::AnyTagged(), elements, offset));
GotoIf(IsNotTheHole(element), &hole_check_passed);
}
- BranchIfPrototypesHaveNonFastElements(receiver_map, slow,
- &hole_check_passed);
+ BranchIfPrototypesMayHaveReadOnlyElements(receiver_map, slow,
+ &hole_check_passed);
BIND(&hole_check_passed);
}
}
@@ -443,7 +444,6 @@ void KeyedStoreGenericAssembler::StoreElementWithCapacity(
ElementOffsetFromIndex(index, PACKED_DOUBLE_ELEMENTS, kHeaderSize);
if (!IsStoreInLiteral()) {
// Check if we're about to overwrite the hole. We can safely do that
- // Check if we're about to overwrite the hole. We can safely do that
// only if there can be no setters on the prototype chain.
{
Label hole_check_passed(this);
@@ -456,8 +456,8 @@ void KeyedStoreGenericAssembler::StoreElementWithCapacity(
Goto(&hole_check_passed);
BIND(&found_hole);
}
- BranchIfPrototypesHaveNonFastElements(receiver_map, slow,
- &hole_check_passed);
+ BranchIfPrototypesMayHaveReadOnlyElements(receiver_map, slow,
+ &hole_check_passed);
BIND(&hole_check_passed);
}
}