Diff
Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (294916 => 294917)
--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2022-05-27 00:56:40 UTC (rev 294917)
@@ -417,7 +417,7 @@
if (structure->hasPolyProto()) {
JSObject* prototype = allocationProfile->prototype();
ASSERT(prototype == jsCast<JSFunction*>(constructor)->prototypeForConstruction(vm, globalObject));
- result->putDirect(vm, knownPolyProtoOffset, prototype);
+ result->putDirectOffset(vm, knownPolyProtoOffset, prototype);
prototype->didBecomePrototype();
ASSERT_WITH_MESSAGE(!hasIndexedProperties(result->indexingType()), "We rely on JSFinalObject not starting out with an indexing type otherwise we would potentially need to convert to slow put storage");
}
Modified: trunk/Source/_javascript_Core/ftl/FTLOperations.cpp (294916 => 294917)
--- trunk/Source/_javascript_Core/ftl/FTLOperations.cpp 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/ftl/FTLOperations.cpp 2022-05-27 00:56:40 UTC (rev 294917)
@@ -88,7 +88,7 @@
if (codeBlock->identifier(property.location().info()).impl() != entry.key())
continue;
- object->putDirect(vm, entry.offset(), JSValue::decode(values[i]));
+ object->putDirectOffset(vm, entry.offset(), JSValue::decode(values[i]));
}
}
break;
@@ -225,7 +225,7 @@
// We use a random-ish number instead of a sensible value like
// undefined to make possible bugs easier to track.
for (const PropertyTableEntry& entry : structure->getPropertiesConcurrently())
- result->putDirect(vm, entry.offset(), jsNumber(19723));
+ result->putDirectOffset(vm, entry.offset(), jsNumber(19723));
return result;
}
Modified: trunk/Source/_javascript_Core/runtime/ClonedArguments.cpp (294916 => 294917)
--- trunk/Source/_javascript_Core/runtime/ClonedArguments.cpp 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/runtime/ClonedArguments.cpp 2022-05-27 00:56:40 UTC (rev 294917)
@@ -69,7 +69,7 @@
result->finishCreation(vm);
result->m_callee.set(vm, result, callee);
- result->putDirect(vm, clonedArgumentsLengthPropertyOffset, jsNumber(length));
+ result->putDirectOffset(vm, clonedArgumentsLengthPropertyOffset, jsNumber(length));
return result;
}
Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp (294916 => 294917)
--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp 2022-05-27 00:56:40 UTC (rev 294917)
@@ -241,7 +241,7 @@
if (structure->hasPolyProto()) {
JSObject* prototype = allocationProfile->prototype();
ASSERT(prototype == constructor->prototypeForConstruction(vm, globalObject));
- result->putDirect(vm, knownPolyProtoOffset, prototype);
+ result->putDirectOffset(vm, knownPolyProtoOffset, prototype);
prototype->didBecomePrototype();
ASSERT_WITH_MESSAGE(!hasIndexedProperties(result->indexingType()), "We rely on JSFinalObject not starting out with an indexing type otherwise we would potentially need to convert to slow put storage");
}
Modified: trunk/Source/_javascript_Core/runtime/IteratorOperations.cpp (294916 => 294917)
--- trunk/Source/_javascript_Core/runtime/IteratorOperations.cpp 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/runtime/IteratorOperations.cpp 2022-05-27 00:56:40 UTC (rev 294917)
@@ -145,8 +145,8 @@
{
VM& vm = globalObject->vm();
JSObject* resultObject = constructEmptyObject(vm, globalObject->iteratorResultObjectStructure());
- resultObject->putDirect(vm, valuePropertyOffset, value);
- resultObject->putDirect(vm, donePropertyOffset, jsBoolean(done));
+ resultObject->putDirectOffset(vm, valuePropertyOffset, value);
+ resultObject->putDirectOffset(vm, donePropertyOffset, jsBoolean(done));
return resultObject;
}
Modified: trunk/Source/_javascript_Core/runtime/JSONObject.cpp (294916 => 294917)
--- trunk/Source/_javascript_Core/runtime/JSONObject.cpp 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/runtime/JSONObject.cpp 2022-05-27 00:56:40 UTC (rev 294917)
@@ -793,9 +793,10 @@
else {
unsigned attributes;
PropertyOffset offset = object->getDirectOffset(vm, prop, attributes);
- if (LIKELY(offset != invalidOffset && attributes == static_cast<unsigned>(PropertyAttribute::None)))
- object->putDirect(vm, offset, filteredValue);
- else {
+ if (LIKELY(offset != invalidOffset && attributes == static_cast<unsigned>(PropertyAttribute::None))) {
+ object->putDirectOffset(vm, offset, filteredValue);
+ object->structure()->didReplaceProperty(offset);
+ } else {
bool shouldThrow = false;
object->createDataProperty(m_globalObject, prop, filteredValue, shouldThrow);
}
Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (294916 => 294917)
--- trunk/Source/_javascript_Core/runtime/JSObject.cpp 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp 2022-05-27 00:56:40 UTC (rev 294917)
@@ -1885,7 +1885,7 @@
Structure* newStructure = Structure::changePrototypeTransition(vm, structure(), prototype, deferred);
setStructure(vm, newStructure);
} else
- putDirect(vm, knownPolyProtoOffset, prototype);
+ putDirectOffset(vm, knownPolyProtoOffset, prototype);
if (!anyObjectInChainMayInterceptIndexedAccesses())
return;
@@ -2035,7 +2035,7 @@
StructureID structureID = this->structureID();
Structure* structure = structureID.decode();
PropertyOffset offset = prepareToPutDirectWithoutTransition(vm, propertyName, attributes, structureID, structure);
- putDirect(vm, offset, value);
+ putDirectOffset(vm, offset, value);
if (attributes & PropertyAttribute::ReadOnly)
structure->setContainsReadOnlyProperties();
@@ -2062,7 +2062,7 @@
StructureID structureID = this->structureID();
Structure* structure = structureID.decode();
PropertyOffset offset = prepareToPutDirectWithoutTransition(vm, propertyName, attributes, structureID, structure);
- putDirect(vm, offset, accessor);
+ putDirectOffset(vm, offset, accessor);
if (attributes & PropertyAttribute::ReadOnly)
structure->setContainsReadOnlyProperties();
Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (294916 => 294917)
--- trunk/Source/_javascript_Core/runtime/JSObject.h 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h 2022-05-27 00:56:40 UTC (rev 294917)
@@ -838,9 +838,8 @@
ALWAYS_INLINE JSValue getDirect(PropertyOffset offset) const { return locationForOffset(offset)->get(); }
JSValue getDirect(Concurrency, Structure* expectedStructure, PropertyOffset) const;
JSValue getDirectConcurrently(Structure* expectedStructure, PropertyOffset) const;
- void putDirect(VM& vm, PropertyOffset offset, JSValue value) { locationForOffset(offset)->set(vm, this, value); }
+ void putDirectOffset(VM& vm, PropertyOffset offset, JSValue value) { locationForOffset(offset)->set(vm, this, value); }
void putDirectWithoutBarrier(PropertyOffset offset, JSValue value) { locationForOffset(offset)->setWithoutWriteBarrier(value); }
- void putDirectUndefined(PropertyOffset offset) { locationForOffset(offset)->setUndefined(); }
JS_EXPORT_PRIVATE bool putDirectNativeIntrinsicGetter(VM&, JSGlobalObject*, Identifier, NativeFunction, Intrinsic, unsigned attributes);
JS_EXPORT_PRIVATE void putDirectNativeIntrinsicGetterWithoutTransition(VM&, JSGlobalObject*, Identifier, NativeFunction, Intrinsic, unsigned attributes);
Modified: trunk/Source/_javascript_Core/runtime/JSObjectInlines.h (294916 => 294917)
--- trunk/Source/_javascript_Core/runtime/JSObjectInlines.h 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/runtime/JSObjectInlines.h 2022-05-27 00:56:40 UTC (rev 294917)
@@ -218,7 +218,7 @@
StructureID structureID = this->structureID();
Structure* structure = structureID.decode();
PropertyOffset offset = prepareToPutDirectWithoutTransition(vm, propertyName, attributes, structureID, structure);
- putDirect(vm, offset, value);
+ putDirectOffset(vm, offset, value);
if (attributes & PropertyAttribute::ReadOnly)
structure->setContainsReadOnlyProperties();
}
@@ -334,7 +334,7 @@
if ((mode == PutModePut || mode == PutModeDefineOwnProperty) && currentAttributes & PropertyAttribute::ReadOnlyOrAccessorOrCustomAccessor)
return ReadonlyPropertyChangeError;
- putDirect(vm, offset, value);
+ putDirectOffset(vm, offset, value);
structure->didReplaceProperty(offset);
// FIXME: Check attributes against PropertyAttribute::CustomAccessorOrValue. Changing GetterSetter should work w/o transition.
@@ -354,7 +354,7 @@
offset = prepareToPutDirectWithoutTransition(vm, propertyName, attributes, structureID, structure);
validateOffset(offset);
- putDirect(vm, offset, value);
+ putDirectOffset(vm, offset, value);
slot.setNewProperty(this, offset);
if (attributes & PropertyAttribute::ReadOnly)
this->structure()->setContainsReadOnlyProperties();
@@ -379,7 +379,7 @@
// This assertion verifies that the concurrent GC won't read garbage if the concurrentGC
// is running at the same time we put without transitioning.
ASSERT(!getDirect(offset) || !JSValue::encode(getDirect(offset)));
- putDirect(vm, offset, value);
+ putDirectOffset(vm, offset, value);
setStructure(vm, newStructure);
slot.setNewProperty(this, offset);
return { };
@@ -392,7 +392,7 @@
return ReadonlyPropertyChangeError;
structure->didReplaceProperty(offset);
- putDirect(vm, offset, value);
+ putDirectOffset(vm, offset, value);
// FIXME: Check attributes against PropertyAttribute::CustomAccessorOrValue. Changing GetterSetter should work w/o transition.
// https://bugs.webkit.org/show_bug.cgi?id=214342
@@ -430,7 +430,7 @@
// This assertion verifies that the concurrent GC won't read garbage if the concurrentGC
// is running at the same time we put without transitioning.
ASSERT(!getDirect(offset) || !JSValue::encode(getDirect(offset)));
- putDirect(vm, offset, value);
+ putDirectOffset(vm, offset, value);
setStructure(vm, newStructure);
slot.setNewProperty(this, offset);
if (attributes & PropertyAttribute::ReadOnly)
Modified: trunk/Source/_javascript_Core/runtime/ObjectConstructor.h (294916 => 294917)
--- trunk/Source/_javascript_Core/runtime/ObjectConstructor.h 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/runtime/ObjectConstructor.h 2022-05-27 00:56:40 UTC (rev 294917)
@@ -138,19 +138,19 @@
if (descriptor.enumerablePresent() && descriptor.configurablePresent()) {
if (descriptor.value() && descriptor.writablePresent()) {
JSObject* result = constructEmptyObject(vm, globalObject->dataPropertyDescriptorObjectStructure());
- result->putDirect(vm, dataPropertyDescriptorValuePropertyOffset, descriptor.value());
- result->putDirect(vm, dataPropertyDescriptorWritablePropertyOffset, jsBoolean(descriptor.writable()));
- result->putDirect(vm, dataPropertyDescriptorEnumerablePropertyOffset, jsBoolean(descriptor.enumerable()));
- result->putDirect(vm, dataPropertyDescriptorConfigurablePropertyOffset, jsBoolean(descriptor.configurable()));
+ result->putDirectOffset(vm, dataPropertyDescriptorValuePropertyOffset, descriptor.value());
+ result->putDirectOffset(vm, dataPropertyDescriptorWritablePropertyOffset, jsBoolean(descriptor.writable()));
+ result->putDirectOffset(vm, dataPropertyDescriptorEnumerablePropertyOffset, jsBoolean(descriptor.enumerable()));
+ result->putDirectOffset(vm, dataPropertyDescriptorConfigurablePropertyOffset, jsBoolean(descriptor.configurable()));
return result;
}
if (descriptor.getterPresent() && descriptor.setterPresent()) {
JSObject* result = constructEmptyObject(vm, globalObject->accessorPropertyDescriptorObjectStructure());
- result->putDirect(vm, accessorPropertyDescriptorGetPropertyOffset, descriptor.getter());
- result->putDirect(vm, accessorPropertyDescriptorSetPropertyOffset, descriptor.setter());
- result->putDirect(vm, accessorPropertyDescriptorEnumerablePropertyOffset, jsBoolean(descriptor.enumerable()));
- result->putDirect(vm, accessorPropertyDescriptorConfigurablePropertyOffset, jsBoolean(descriptor.configurable()));
+ result->putDirectOffset(vm, accessorPropertyDescriptorGetPropertyOffset, descriptor.getter());
+ result->putDirectOffset(vm, accessorPropertyDescriptorSetPropertyOffset, descriptor.setter());
+ result->putDirectOffset(vm, accessorPropertyDescriptorEnumerablePropertyOffset, jsBoolean(descriptor.enumerable()));
+ result->putDirectOffset(vm, accessorPropertyDescriptorConfigurablePropertyOffset, jsBoolean(descriptor.configurable()));
return result;
}
}
Modified: trunk/Source/_javascript_Core/runtime/RegExpMatchesArray.h (294916 => 294917)
--- trunk/Source/_javascript_Core/runtime/RegExpMatchesArray.h 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/runtime/RegExpMatchesArray.h 2022-05-27 00:56:40 UTC (rev 294917)
@@ -92,9 +92,9 @@
JSObject* indicesGroups = createIndices && hasNamedCaptures ? constructEmptyObject(vm, globalObject->nullPrototypeObjectStructure()) : nullptr;
auto setProperties = [&] () {
- array->putDirect(vm, RegExpMatchesArrayIndexPropertyOffset, jsNumber(result.start));
- array->putDirect(vm, RegExpMatchesArrayInputPropertyOffset, input);
- array->putDirect(vm, RegExpMatchesArrayGroupsPropertyOffset, hasNamedCaptures ? groups : jsUndefined());
+ array->putDirectOffset(vm, RegExpMatchesArrayIndexPropertyOffset, jsNumber(result.start));
+ array->putDirectOffset(vm, RegExpMatchesArrayInputPropertyOffset, input);
+ array->putDirectOffset(vm, RegExpMatchesArrayGroupsPropertyOffset, hasNamedCaptures ? groups : jsUndefined());
ASSERT(!array->butterfly()->indexingHeader()->preCapacity(matchStructure));
auto capacity = matchStructure->outOfLineCapacity();
@@ -102,11 +102,11 @@
gcSafeZeroMemory(static_cast<JSValue*>(array->butterfly()->base(0, capacity)), (capacity - size) * sizeof(JSValue));
if (createIndices) {
- array->putDirect(vm, RegExpMatchesArrayIndicesPropertyOffset, indicesArray);
+ array->putDirectOffset(vm, RegExpMatchesArrayIndicesPropertyOffset, indicesArray);
Structure* indicesStructure = globalObject->regExpMatchesIndicesArrayStructure();
- indicesArray->putDirect(vm, RegExpMatchesIndicesGroupsPropertyOffset, indicesGroups ? indicesGroups : jsUndefined());
+ indicesArray->putDirectOffset(vm, RegExpMatchesIndicesGroupsPropertyOffset, indicesGroups ? indicesGroups : jsUndefined());
ASSERT(!indicesArray->butterfly()->indexingHeader()->preCapacity(indicesStructure));
auto indicesCapacity = indicesStructure->outOfLineCapacity();
Modified: trunk/Source/_javascript_Core/runtime/Structure.cpp (294916 => 294917)
--- trunk/Source/_javascript_Core/runtime/Structure.cpp 2022-05-27 00:50:02 UTC (rev 294916)
+++ trunk/Source/_javascript_Core/runtime/Structure.cpp 2022-05-27 00:56:40 UTC (rev 294917)
@@ -929,7 +929,7 @@
// Copies in our values to their compacted locations.
for (unsigned i = 0; i < propertyCount; i++)
- object->putDirect(vm, offsetForPropertyNumber(i, m_inlineCapacity), values[i]);
+ object->putDirectOffset(vm, offsetForPropertyNumber(i, m_inlineCapacity), values[i]);
// We need to zero our unused property space; otherwise the GC might see a
// stale pointer when we add properties in the future.