Title: [128428] trunk/Source
Revision
128428
Author
[email protected]
Date
2012-09-13 01:43:33 -0700 (Thu, 13 Sep 2012)

Log Message

[Qt][Win] REGRESSION(r128400): It broke the build
https://bugs.webkit.org/show_bug.cgi?id=96617

Patch by Filip Pizlo <[email protected]> on 2012-09-13
Reviewed by Simon Hausmann.

Source/_javascript_Core:

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):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (128427 => 128428)


--- trunk/Source/_javascript_Core/ChangeLog	2012-09-13 08:41:26 UTC (rev 128427)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-09-13 08:43:33 UTC (rev 128428)
@@ -1,5 +1,44 @@
 2012-09-13  Filip Pizlo  <[email protected]>
 
+        [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  <[email protected]>
+
         Testing whether indexing type is ArrayWithArrayStorage should not compare against ArrayWithArrayStorage
         https://bugs.webkit.org/show_bug.cgi?id=96611
 

Modified: trunk/Source/_javascript_Core/runtime/IndexingType.h (128427 => 128428)


--- trunk/Source/_javascript_Core/runtime/IndexingType.h	2012-09-13 08:41:26 UTC (rev 128427)
+++ trunk/Source/_javascript_Core/runtime/IndexingType.h	2012-09-13 08:43:33 UTC (rev 128428)
@@ -41,7 +41,7 @@
 // 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.

Modified: trunk/Source/_javascript_Core/runtime/JSArray.cpp (128427 => 128428)


--- trunk/Source/_javascript_Core/runtime/JSArray.cpp	2012-09-13 08:41:26 UTC (rev 128427)
+++ trunk/Source/_javascript_Core/runtime/JSArray.cpp	2012-09-13 08:43:33 UTC (rev 128428)
@@ -402,7 +402,7 @@
     checkIndexingConsistency();
     
     switch (structure()->indexingType()) {
-    case Array:
+    case ArrayClass:
         return jsUndefined();
         
     case ArrayWithArrayStorage: {
@@ -460,7 +460,7 @@
     checkIndexingConsistency();
     
     switch (structure()->indexingType()) {
-    case Array: {
+    case ArrayClass: {
         putByIndexBeyondVectorLengthWithArrayStorage(exec, 0, value, true, createInitialArrayStorage(exec->globalData()));
         break;
     }
@@ -579,7 +579,7 @@
     ASSERT(!inSparseIndexingMode());
 
     switch (structure()->indexingType()) {
-    case Array:
+    case ArrayClass:
         return;
         
     case ArrayWithArrayStorage: {
@@ -625,7 +625,7 @@
     ASSERT(!inSparseIndexingMode());
     
     switch (structure()->indexingType()) {
-    case Array:
+    case ArrayClass:
         return;
         
     case ArrayWithArrayStorage: {
@@ -791,7 +791,7 @@
     ASSERT(!inSparseIndexingMode());
     
     switch (structure()->indexingType()) {
-    case Array:
+    case ArrayClass:
         return;
         
     case ArrayWithArrayStorage: {
@@ -913,7 +913,7 @@
 void JSArray::fillArgList(ExecState* exec, MarkedArgumentBuffer& args)
 {
     switch (structure()->indexingType()) {
-    case Array:
+    case ArrayClass:
         return;
     
     case ArrayWithArrayStorage: {
@@ -943,7 +943,7 @@
 {
     ASSERT(length == this->length());
     switch (structure()->indexingType()) {
-    case Array:
+    case ArrayClass:
         return;
         
     case ArrayWithArrayStorage: {
@@ -975,7 +975,7 @@
     checkIndexingConsistency();
     
     switch (structure()->indexingType()) {
-    case Array:
+    case ArrayClass:
         return 0;
 
     case ArrayWithArrayStorage: {

Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (128427 => 128428)


--- trunk/Source/_javascript_Core/runtime/JSObject.cpp	2012-09-13 08:41:26 UTC (rev 128427)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp	2012-09-13 08:43:33 UTC (rev 128428)
@@ -235,7 +235,7 @@
     
     switch (thisObject->structure()->indexingType()) {
     case NonArray:
-    case Array:
+    case ArrayClass:
         break;
         
     case NonArrayWithArrayStorage:
@@ -355,7 +355,7 @@
     
     switch (thisObject->structure()->indexingType()) {
     case NonArray:
-    case Array:
+    case ArrayClass:
         break;
         
     case NonArrayWithArrayStorage:
@@ -438,7 +438,7 @@
 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 @@
     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 @@
         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 @@
     // 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 @@
     
     switch (structure()->indexingType()) {
     case NonArray:
-    case Array: {
+    case ArrayClass: {
         if (indexingShouldBeSparse()) {
             putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, ensureArrayStorageExistsAndEnterDictionaryIndexingMode(globalData));
             break;
@@ -1299,7 +1299,7 @@
     
     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 @@
     
     switch (structure()->indexingType()) {
     case NonArray:
-    case Array:
+    case ArrayClass:
         vectorLength = 0;
         length = 0;
         break;
@@ -1479,7 +1479,7 @@
     
     switch (object->structure()->indexingType()) {
     case NonArray:
-    case Array:
+    case ArrayClass:
         return false;
         
     case NonArrayWithArrayStorage:

Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (128427 => 128428)


--- trunk/Source/_javascript_Core/runtime/JSObject.h	2012-09-13 08:41:26 UTC (rev 128427)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h	2012-09-13 08:43:33 UTC (rev 128428)
@@ -136,7 +136,7 @@
         {
             switch (structure()->indexingType()) {
             case NonArray:
-            case Array:
+            case ArrayClass:
                 return 0;
             case NonArrayWithArrayStorage:
             case ArrayWithArrayStorage:
@@ -151,7 +151,7 @@
         {
             switch (structure()->indexingType()) {
             case NonArray:
-            case Array:
+            case ArrayClass:
                 return 0;
             case NonArrayWithArrayStorage:
             case ArrayWithArrayStorage:
@@ -190,7 +190,7 @@
         {
             switch (structure()->indexingType()) {
             case NonArray:
-            case Array:
+            case ArrayClass:
                 return false;
             case NonArrayWithArrayStorage:
             case ArrayWithArrayStorage:
@@ -217,7 +217,7 @@
         {
             switch (structure()->indexingType()) {
             case NonArray:
-            case Array:
+            case ArrayClass:
                 return false;
             case NonArrayWithArrayStorage:
             case ArrayWithArrayStorage:
@@ -299,7 +299,7 @@
         {
             switch (structure()->indexingType()) {
             case NonArray:
-            case Array:
+            case ArrayClass:
                 return false;
             case NonArrayWithArrayStorage:
             case ArrayWithArrayStorage:
@@ -563,7 +563,7 @@
                 return m_butterfly->arrayStorage();
                 
             case NonArray:
-            case Array:
+            case ArrayClass:
                 return createInitialArrayStorage(globalData);
                 
             default:

Modified: trunk/Source/WebCore/ChangeLog (128427 => 128428)


--- trunk/Source/WebCore/ChangeLog	2012-09-13 08:41:26 UTC (rev 128427)
+++ trunk/Source/WebCore/ChangeLog	2012-09-13 08:43:33 UTC (rev 128428)
@@ -1,3 +1,13 @@
+2012-09-13  Filip Pizlo  <[email protected]>
+
+        [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  <[email protected]>
 
         Web Inspector: CSS domain sends events while it is not enabled

Modified: trunk/Source/WebCore/bridge/runtime_array.h (128427 => 128428)


--- trunk/Source/WebCore/bridge/runtime_array.h	2012-09-13 08:41:26 UTC (rev 128427)
+++ trunk/Source/WebCore/bridge/runtime_array.h	2012-09-13 08:43:33 UTC (rev 128428)
@@ -73,7 +73,7 @@
 
     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:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to