Commit 4ef04bfb authored by loislo@chromium.org's avatar loislo@chromium.org

[Qt][Win] REGRESSION(r128400): It broke the build

https://bugs.webkit.org/show_bug.cgi?id=96617

Patch by Filip Pizlo <fpizlo@apple.com> on 2012-09-13
Reviewed by Simon Hausmann.

Source/JavaScriptCore:

Changed "JSC::Array" to "JSC::ArrayClass" because it's not used often enough
for the brevity to be beneficial, and because "Array" causes too much namespace
pollution.

* runtime/IndexingType.h:
(JSC):
* runtime/JSArray.cpp:
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::sortNumeric):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToArguments):
(JSC::JSArray::compactForSorting):
* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertySlotByIndex):
(JSC::JSObject::putByIndex):
(JSC::JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode):
(JSC::JSObject::deletePropertyByIndex):
(JSC::JSObject::getOwnPropertyNames):
(JSC::JSObject::putByIndexBeyondVectorLength):
(JSC::JSObject::putDirectIndexBeyondVectorLength):
(JSC::JSObject::getNewVectorLength):
(JSC::JSObject::getOwnPropertyDescriptor):
* runtime/JSObject.h:
(JSC::JSObject::getArrayLength):
(JSC::JSObject::getVectorLength):
(JSC::JSObject::canGetIndexQuickly):
(JSC::JSObject::canSetIndexQuickly):
(JSC::JSObject::inSparseIndexingMode):
(JSC::JSObject::ensureArrayStorage):

Source/WebCore:

* bridge/runtime_array.h:
(JSC::RuntimeArray::createStructure):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d63acd80
2012-09-13 Filip Pizlo <fpizlo@apple.com>
[Qt][Win] REGRESSION(r128400): It broke the build
https://bugs.webkit.org/show_bug.cgi?id=96617
Reviewed by Simon Hausmann.
Changed "JSC::Array" to "JSC::ArrayClass" because it's not used often enough
for the brevity to be beneficial, and because "Array" causes too much namespace
pollution.
* runtime/IndexingType.h:
(JSC):
* runtime/JSArray.cpp:
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::sortNumeric):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToArguments):
(JSC::JSArray::compactForSorting):
* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertySlotByIndex):
(JSC::JSObject::putByIndex):
(JSC::JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode):
(JSC::JSObject::deletePropertyByIndex):
(JSC::JSObject::getOwnPropertyNames):
(JSC::JSObject::putByIndexBeyondVectorLength):
(JSC::JSObject::putDirectIndexBeyondVectorLength):
(JSC::JSObject::getNewVectorLength):
(JSC::JSObject::getOwnPropertyDescriptor):
* runtime/JSObject.h:
(JSC::JSObject::getArrayLength):
(JSC::JSObject::getVectorLength):
(JSC::JSObject::canGetIndexQuickly):
(JSC::JSObject::canSetIndexQuickly):
(JSC::JSObject::inSparseIndexingMode):
(JSC::JSObject::ensureArrayStorage):
2012-09-13 Filip Pizlo <fpizlo@apple.com>
Testing whether indexing type is ArrayWithArrayStorage should not compare against ArrayWithArrayStorage
......
......@@ -41,7 +41,7 @@ static const IndexingType HadArrayStorage = 16; // Means that this obje
// List of acceptable array types.
static const IndexingType NonArray = 0;
static const IndexingType NonArrayWithArrayStorage = HasArrayStorage;
static const IndexingType Array = IsArray;
static const IndexingType ArrayClass = IsArray; // I'd want to call this "Array" but this would lead to disastrous namespace pollution.
static const IndexingType ArrayWithArrayStorage = IsArray | HasArrayStorage;
// Mask of all possible types.
......
......@@ -402,7 +402,7 @@ JSValue JSArray::pop(ExecState* exec)
checkIndexingConsistency();
switch (structure()->indexingType()) {
case Array:
case ArrayClass:
return jsUndefined();
case ArrayWithArrayStorage: {
......@@ -460,7 +460,7 @@ void JSArray::push(ExecState* exec, JSValue value)
checkIndexingConsistency();
switch (structure()->indexingType()) {
case Array: {
case ArrayClass: {
putByIndexBeyondVectorLengthWithArrayStorage(exec, 0, value, true, createInitialArrayStorage(exec->globalData()));
break;
}
......@@ -579,7 +579,7 @@ void JSArray::sortNumeric(ExecState* exec, JSValue compareFunction, CallType cal
ASSERT(!inSparseIndexingMode());
switch (structure()->indexingType()) {
case Array:
case ArrayClass:
return;
case ArrayWithArrayStorage: {
......@@ -625,7 +625,7 @@ void JSArray::sort(ExecState* exec)
ASSERT(!inSparseIndexingMode());
switch (structure()->indexingType()) {
case Array:
case ArrayClass:
return;
case ArrayWithArrayStorage: {
......@@ -791,7 +791,7 @@ void JSArray::sort(ExecState* exec, JSValue compareFunction, CallType callType,
ASSERT(!inSparseIndexingMode());
switch (structure()->indexingType()) {
case Array:
case ArrayClass:
return;
case ArrayWithArrayStorage: {
......@@ -913,7 +913,7 @@ void JSArray::sort(ExecState* exec, JSValue compareFunction, CallType callType,
void JSArray::fillArgList(ExecState* exec, MarkedArgumentBuffer& args)
{
switch (structure()->indexingType()) {
case Array:
case ArrayClass:
return;
case ArrayWithArrayStorage: {
......@@ -943,7 +943,7 @@ void JSArray::copyToArguments(ExecState* exec, CallFrame* callFrame, uint32_t le
{
ASSERT(length == this->length());
switch (structure()->indexingType()) {
case Array:
case ArrayClass:
return;
case ArrayWithArrayStorage: {
......@@ -975,7 +975,7 @@ unsigned JSArray::compactForSorting(JSGlobalData& globalData)
checkIndexingConsistency();
switch (structure()->indexingType()) {
case Array:
case ArrayClass:
return 0;
case ArrayWithArrayStorage: {
......
......@@ -235,7 +235,7 @@ bool JSObject::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned
switch (thisObject->structure()->indexingType()) {
case NonArray:
case Array:
case ArrayClass:
break;
case NonArrayWithArrayStorage:
......@@ -355,7 +355,7 @@ void JSObject::putByIndex(JSCell* cell, ExecState* exec, unsigned propertyName,
switch (thisObject->structure()->indexingType()) {
case NonArray:
case Array:
case ArrayClass:
break;
case NonArrayWithArrayStorage:
......@@ -438,7 +438,7 @@ void JSObject::enterDictionaryIndexingMode(JSGlobalData& globalData)
ArrayStorage* JSObject::createArrayStorage(JSGlobalData& globalData, unsigned length, unsigned vectorLength)
{
IndexingType oldType = structure()->indexingType();
ASSERT_UNUSED(oldType, oldType == NonArray || oldType == Array);
ASSERT_UNUSED(oldType, oldType == NonArray || oldType == ArrayClass);
Butterfly* newButterfly = m_butterfly->growArrayRight(
globalData, structure(), structure()->outOfLineCapacity(), false, 0,
ArrayStorage::sizeFor(vectorLength));
......@@ -471,7 +471,7 @@ ArrayStorage* JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode(J
case NonArrayWithArrayStorage:
return enterDictionaryIndexingModeWhenArrayStorageAlreadyExists(globalData, m_butterfly->arrayStorage());
case Array:
case ArrayClass:
case NonArray: {
createArrayStorage(globalData, 0, 0);
SparseArrayValueMap* map = allocateSparseIndexMap(globalData);
......@@ -597,7 +597,7 @@ bool JSObject::deletePropertyByIndex(JSCell* cell, ExecState* exec, unsigned i)
return thisObject->methodTable()->deleteProperty(thisObject, exec, Identifier::from(exec, i));
switch (thisObject->structure()->indexingType()) {
case Array:
case ArrayClass:
case NonArray:
return true;
......@@ -763,7 +763,7 @@ void JSObject::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNa
// which almost certainly means a different structure for PropertyNameArray.
switch (object->structure()->indexingType()) {
case NonArray:
case Array:
case ArrayClass:
break;
case NonArrayWithArrayStorage:
......@@ -1190,7 +1190,7 @@ void JSObject::putByIndexBeyondVectorLength(ExecState* exec, unsigned i, JSValue
switch (structure()->indexingType()) {
case NonArray:
case Array: {
case ArrayClass: {
if (indexingShouldBeSparse()) {
putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, ensureArrayStorageExistsAndEnterDictionaryIndexingMode(globalData));
break;
......@@ -1299,7 +1299,7 @@ bool JSObject::putDirectIndexBeyondVectorLength(ExecState* exec, unsigned i, JSV
switch (structure()->indexingType()) {
case NonArray:
case Array: {
case ArrayClass: {
if (indexingShouldBeSparse() || attributes)
return putDirectIndexBeyondVectorLengthWithArrayStorage(exec, i, value, attributes, mode, ensureArrayStorageExistsAndEnterDictionaryIndexingMode(globalData));
if (!isDenseEnoughForVector(i, 0) || i >= MAX_STORAGE_VECTOR_LENGTH)
......@@ -1355,7 +1355,7 @@ ALWAYS_INLINE unsigned JSObject::getNewVectorLength(unsigned desiredLength)
switch (structure()->indexingType()) {
case NonArray:
case Array:
case ArrayClass:
vectorLength = 0;
length = 0;
break;
......@@ -1479,7 +1479,7 @@ bool JSObject::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, Prope
switch (object->structure()->indexingType()) {
case NonArray:
case Array:
case ArrayClass:
return false;
case NonArrayWithArrayStorage:
......
......@@ -136,7 +136,7 @@ namespace JSC {
{
switch (structure()->indexingType()) {
case NonArray:
case Array:
case ArrayClass:
return 0;
case NonArrayWithArrayStorage:
case ArrayWithArrayStorage:
......@@ -151,7 +151,7 @@ namespace JSC {
{
switch (structure()->indexingType()) {
case NonArray:
case Array:
case ArrayClass:
return 0;
case NonArrayWithArrayStorage:
case ArrayWithArrayStorage:
......@@ -190,7 +190,7 @@ namespace JSC {
{
switch (structure()->indexingType()) {
case NonArray:
case Array:
case ArrayClass:
return false;
case NonArrayWithArrayStorage:
case ArrayWithArrayStorage:
......@@ -217,7 +217,7 @@ namespace JSC {
{
switch (structure()->indexingType()) {
case NonArray:
case Array:
case ArrayClass:
return false;
case NonArrayWithArrayStorage:
case ArrayWithArrayStorage:
......@@ -299,7 +299,7 @@ namespace JSC {
{
switch (structure()->indexingType()) {
case NonArray:
case Array:
case ArrayClass:
return false;
case NonArrayWithArrayStorage:
case ArrayWithArrayStorage:
......@@ -563,7 +563,7 @@ namespace JSC {
return m_butterfly->arrayStorage();
case NonArray:
case Array:
case ArrayClass:
return createInitialArrayStorage(globalData);
default:
......
2012-09-13 Filip Pizlo <fpizlo@apple.com>
[Qt][Win] REGRESSION(r128400): It broke the build
https://bugs.webkit.org/show_bug.cgi?id=96617
Reviewed by Simon Hausmann.
* bridge/runtime_array.h:
(JSC::RuntimeArray::createStructure):
2012-09-13 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: CSS domain sends events while it is not enabled
......@@ -73,7 +73,7 @@ public:
static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(globalData, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info, Array);
return Structure::create(globalData, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info, ArrayClass);
}
protected:
......
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