Title: [100412] trunk/Source/_javascript_Core
Revision
100412
Author
[email protected]
Date
2011-11-15 23:23:17 -0800 (Tue, 15 Nov 2011)

Log Message

Unreviewed, rolling out r100375 and r100385.
http://trac.webkit.org/changeset/100375
http://trac.webkit.org/changeset/100385
https://bugs.webkit.org/show_bug.cgi?id=72465

They broke 32 bit builds on Qt (Requested by ossy on #webkit).

Patch by Sheriff Bot <[email protected]> on 2011-11-15

* dfg/DFGOperations.cpp:
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/ArgList.cpp:
(JSC::ArgList::getSlice):
* runtime/ArgList.h:
(JSC::ArgList::ArgList):
* runtime/JSArray.cpp:
* runtime/JSArray.h:
* runtime/JSGlobalObject.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (100411 => 100412)


--- trunk/Source/_javascript_Core/ChangeLog	2011-11-16 07:19:24 UTC (rev 100411)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-11-16 07:23:17 UTC (rev 100412)
@@ -1,3 +1,23 @@
+2011-11-15  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r100375 and r100385.
+        http://trac.webkit.org/changeset/100375
+        http://trac.webkit.org/changeset/100385
+        https://bugs.webkit.org/show_bug.cgi?id=72465
+
+        They broke 32 bit builds on Qt (Requested by ossy on #webkit).
+
+        * dfg/DFGOperations.cpp:
+        * jit/JITStubs.cpp:
+        (JSC::DEFINE_STUB_FUNCTION):
+        * runtime/ArgList.cpp:
+        (JSC::ArgList::getSlice):
+        * runtime/ArgList.h:
+        (JSC::ArgList::ArgList):
+        * runtime/JSArray.cpp:
+        * runtime/JSArray.h:
+        * runtime/JSGlobalObject.h:
+
 2011-11-15  George Staikos  <[email protected]>
 
         Remove the guard page from the addressable stack region on QNX.

Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (100411 => 100412)


--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp	2011-11-16 07:19:24 UTC (rev 100411)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp	2011-11-16 07:23:17 UTC (rev 100412)
@@ -773,12 +773,14 @@
 
 EncodedJSValue DFG_OPERATION operationNewArray(ExecState* exec, void* start, size_t size)
 {
-    return JSValue::encode(constructArray(exec, static_cast<JSValue*>(start), size));
+    ArgList argList(static_cast<Register*>(start), size);
+    return JSValue::encode(constructArray(exec, argList));
 }
 
 EncodedJSValue DFG_OPERATION operationNewArrayBuffer(ExecState* exec, size_t start, size_t size)
 {
-    return constructArray(exec, exec->codeBlock()->constantBuffer(start), size);
+    ArgList argList(exec->codeBlock()->constantBuffer(start), size);
+    return JSValue::encode(constructArray(exec, argList));
 }
 
 EncodedJSValue DFG_OPERATION operationNewRegexp(ExecState* exec, void* regexpPtr)

Modified: trunk/Source/_javascript_Core/jit/JITStubs.cpp (100411 => 100412)


--- trunk/Source/_javascript_Core/jit/JITStubs.cpp	2011-11-16 07:19:24 UTC (rev 100411)
+++ trunk/Source/_javascript_Core/jit/JITStubs.cpp	2011-11-16 07:23:17 UTC (rev 100412)
@@ -2432,14 +2432,16 @@
 {
     STUB_INIT_STACK_FRAME(stackFrame);
 
-    return constructArray(stackFrame.callFrame, reinterpret_cast<JSValue*>(&stackFrame.callFrame->registers()[stackFrame.args[0].int32()]), stackFrame.args[1].int32());
+    ArgList argList(&stackFrame.callFrame->registers()[stackFrame.args[0].int32()], stackFrame.args[1].int32());
+    return constructArray(stackFrame.callFrame, argList);
 }
 
 DEFINE_STUB_FUNCTION(JSObject*, op_new_array_buffer)
 {
     STUB_INIT_STACK_FRAME(stackFrame);
     
-    return constructArray(stackFrame.callFrame, stackFrame.callFrame->codeBlock()->constantBuffer(stackFrame.args[0].int32()), stackFrame.args[1].int32());
+    ArgList argList(stackFrame.callFrame->codeBlock()->constantBuffer(stackFrame.args[0].int32()), stackFrame.args[1].int32());
+    return constructArray(stackFrame.callFrame, argList);
 }
 
 DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve)

Modified: trunk/Source/_javascript_Core/runtime/ArgList.cpp (100411 => 100412)


--- trunk/Source/_javascript_Core/runtime/ArgList.cpp	2011-11-16 07:19:24 UTC (rev 100411)
+++ trunk/Source/_javascript_Core/runtime/ArgList.cpp	2011-11-16 07:23:17 UTC (rev 100412)
@@ -33,12 +33,10 @@
 void ArgList::getSlice(int startIndex, ArgList& result) const
 {
     if (startIndex <= 0 || static_cast<unsigned>(startIndex) >= m_argCount) {
-        result = ArgList();
+        result = ArgList(m_args, 0);
         return;
     }
-
-    result.m_args = m_args + startIndex;
-    result.m_argCount =  m_argCount - startIndex;
+    result = ArgList(m_args + startIndex, m_argCount - startIndex);
 }
 
 void MarkedArgumentBuffer::markLists(HeapRootVisitor& heapRootVisitor, ListSet& markSet)

Modified: trunk/Source/_javascript_Core/runtime/ArgList.h (100411 => 100412)


--- trunk/Source/_javascript_Core/runtime/ArgList.h	2011-11-16 07:19:24 UTC (rev 100411)
+++ trunk/Source/_javascript_Core/runtime/ArgList.h	2011-11-16 07:23:17 UTC (rev 100412)
@@ -191,6 +191,19 @@
         {
         }
         
+        ArgList(JSValue* args, unsigned argCount)
+            : m_args(args)
+            , m_argCount(argCount)
+        {
+        }
+        
+        ArgList(Register* args, int argCount)
+            : m_args(reinterpret_cast<JSValue*>(args))
+            , m_argCount(argCount)
+        {
+            ASSERT(argCount >= 0);
+        }
+
         ArgList(const MarkedArgumentBuffer& args)
             : m_args(reinterpret_cast<JSValue*>(const_cast<Register*>(args.begin())))
             , m_argCount(args.size())

Modified: trunk/Source/_javascript_Core/runtime/JSArray.cpp (100411 => 100412)


--- trunk/Source/_javascript_Core/runtime/JSArray.cpp	2011-11-16 07:19:24 UTC (rev 100411)
+++ trunk/Source/_javascript_Core/runtime/JSArray.cpp	2011-11-16 07:23:17 UTC (rev 100412)
@@ -236,46 +236,6 @@
     Heap::heap(this)->reportExtraMemoryCost(storageSize(initialStorage));
 }
 
-void JSArray::finishCreation(JSGlobalData& globalData, const JSValue* values, size_t length)
-{
-    Base::finishCreation(globalData);
-    ASSERT(inherits(&s_info));
-
-    unsigned initialCapacity = length;
-    unsigned initialStorage;
-    
-    // If the ArgList is empty, allocate space for 3 entries.  This value empirically
-    // works well for benchmarks.
-    if (!initialCapacity)
-        initialStorage = 3;
-    else
-        initialStorage = initialCapacity;
-    
-    m_storage = static_cast<ArrayStorage*>(fastMalloc(storageSize(initialStorage)));
-    m_storage->m_allocBase = m_storage;
-    m_indexBias = 0;
-    m_storage->m_length = initialCapacity;
-    m_vectorLength = initialStorage;
-    m_storage->m_numValuesInVector = initialCapacity;
-    m_storage->m_sparseValueMap = 0;
-    m_storage->subclassData = 0;
-    m_storage->reportedMapCapacity = 0;
-#if CHECK_ARRAY_CONSISTENCY
-    m_storage->m_inCompactInitialization = false;
-#endif
-
-    size_t i = 0;
-    WriteBarrier<Unknown>* vector = m_storage->m_vector;
-    for ( ; i != length; ++i)
-        vector[i].set(globalData, this, values[i]);
-    for (; i < initialStorage; i++)
-        vector[i].clear();
-
-    checkConsistency();
-
-    Heap::heap(this)->reportExtraMemoryCost(storageSize(initialStorage));
-}
-
 JSArray::~JSArray()
 {
     ASSERT(vptr() == JSGlobalData::jsArrayVPtr);

Modified: trunk/Source/_javascript_Core/runtime/JSArray.h (100411 => 100412)


--- trunk/Source/_javascript_Core/runtime/JSArray.h	2011-11-16 07:19:24 UTC (rev 100411)
+++ trunk/Source/_javascript_Core/runtime/JSArray.h	2011-11-16 07:23:17 UTC (rev 100412)
@@ -66,7 +66,6 @@
         void finishCreation(JSGlobalData&);
         void finishCreation(JSGlobalData&, unsigned initialLength, ArrayCreationMode);
         void finishCreation(JSGlobalData&, const ArgList&);
-        void finishCreation(JSGlobalData&, const JSValue*, size_t length);
     
     public:
         typedef JSNonFinalObject Base;
@@ -95,13 +94,6 @@
             return array;
         }
 
-        static JSArray* create(JSGlobalData& globalData, Structure* structure, const JSValue* values, size_t length)
-        {
-            JSArray* array = new (allocateCell<JSArray>(globalData.heap)) JSArray(globalData, structure);
-            array->finishCreation(globalData, values, length);
-            return array;
-        }
-
         static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier& propertyName, PropertySlot&);
         static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&);
         static bool getOwnPropertyDescriptor(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&);

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.h (100411 => 100412)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.h	2011-11-16 07:19:24 UTC (rev 100411)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.h	2011-11-16 07:23:17 UTC (rev 100412)
@@ -473,11 +473,6 @@
         return constructArray(exec, exec->lexicalGlobalObject(), values);
     }
 
-    inline JSArray* constructArray(ExecState* exec, const JSValue* values, size_t length)
-    {
-        return JSArray::create(exec->globalData(), exec->lexicalGlobalObject()->arrayStructure(), values, length);
-    }
-
     class DynamicGlobalObjectScope {
         WTF_MAKE_NONCOPYABLE(DynamicGlobalObjectScope);
     public:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to