Modified: trunk/Source/_javascript_Core/ChangeLog (166396 => 166397)
--- trunk/Source/_javascript_Core/ChangeLog 2014-03-28 04:06:58 UTC (rev 166396)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-03-28 05:28:39 UTC (rev 166397)
@@ -1,3 +1,18 @@
+2014-03-27 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r166376.
+ https://bugs.webkit.org/show_bug.cgi?id=130887
+
+ This was a misguided optimization. (Requested by kling on
+ #webkit).
+
+ Reverted changeset:
+
+ "Avoid fetching JSObject::structure() repeatedly in
+ putDirectInternal."
+ https://bugs.webkit.org/show_bug.cgi?id=130857
+ http://trac.webkit.org/changeset/166376
+
2014-03-27 Oliver Hunt <[email protected]>
Support spread operand in |new| expressions
Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (166396 => 166397)
--- trunk/Source/_javascript_Core/runtime/JSObject.h 2014-03-28 04:06:58 UTC (rev 166396)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h 2014-03-28 05:28:39 UTC (rev 166397)
@@ -1325,35 +1325,35 @@
DeferGC deferGC(vm.heap);
Butterfly* newButterfly = butterfly();
- if (structure->putWillGrowOutOfLineStorage())
- newButterfly = growOutOfLineStorage(vm, structure->outOfLineCapacity(), structure->suggestedNewOutOfLineStorageCapacity());
- offset = structure->addPropertyWithoutTransition(vm, propertyName, attributes, specificFunction);
- setStructureAndButterfly(vm, structure, newButterfly);
+ if (this->structure()->putWillGrowOutOfLineStorage())
+ newButterfly = growOutOfLineStorage(vm, this->structure()->outOfLineCapacity(), this->structure()->suggestedNewOutOfLineStorageCapacity());
+ offset = this->structure()->addPropertyWithoutTransition(vm, propertyName, attributes, specificFunction);
+ setStructureAndButterfly(vm, this->structure(), newButterfly);
validateOffset(offset);
- ASSERT(structure->isValidOffset(offset));
+ ASSERT(this->structure()->isValidOffset(offset));
putDirect(vm, offset, value);
// See comment on setNewProperty call below.
if (!specificFunction)
slot.setNewProperty(this, offset);
if (attributes & ReadOnly)
- structure->setContainsReadOnlyProperties();
+ this->structure()->setContainsReadOnlyProperties();
return true;
}
PropertyOffset offset;
- size_t currentCapacity = structure->outOfLineCapacity();
- if (Structure* newStructure = Structure::addPropertyTransitionToExistingStructure(structure, propertyName, attributes, specificFunction, offset)) {
+ size_t currentCapacity = this->structure()->outOfLineCapacity();
+ if (Structure* structure = Structure::addPropertyTransitionToExistingStructure(this->structure(), propertyName, attributes, specificFunction, offset)) {
DeferGC deferGC(vm.heap);
Butterfly* newButterfly = butterfly();
- if (currentCapacity != newStructure->outOfLineCapacity()) {
- ASSERT(newStructure != structure);
- newButterfly = growOutOfLineStorage(vm, currentCapacity, newStructure->outOfLineCapacity());
+ if (currentCapacity != structure->outOfLineCapacity()) {
+ ASSERT(structure != this->structure());
+ newButterfly = growOutOfLineStorage(vm, currentCapacity, structure->outOfLineCapacity());
}
validateOffset(offset);
- ASSERT(newStructure->isValidOffset(offset));
- setStructureAndButterfly(vm, newStructure, newButterfly);
+ ASSERT(structure->isValidOffset(offset));
+ setStructureAndButterfly(vm, structure, newButterfly);
putDirect(vm, offset, value);
// This is a new property; transitions with specific values are not currently cachable,
// so leave the slot in an uncachable state.