Title: [101604] trunk/Source/_javascript_Core
- Revision
- 101604
- Author
- [email protected]
- Date
- 2011-11-30 21:38:15 -0800 (Wed, 30 Nov 2011)
Log Message
Removed ArgList iterators.
Reviewed by Gavin Barraclough.
Another step toward reversing the argument order.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct): Switched from iterator to int.
* runtime/ArgList.h:
(JSC::ArgList::ArgList):
(JSC::ArgList::isEmpty): Removed iterators.
* runtime/JSArray.cpp:
(JSC::JSArray::finishCreation): Switched from iterator to int.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (101603 => 101604)
--- trunk/Source/_javascript_Core/ChangeLog 2011-12-01 05:24:42 UTC (rev 101603)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-12-01 05:38:15 UTC (rev 101604)
@@ -1,3 +1,22 @@
+2011-11-30 Geoffrey Garen <[email protected]>
+
+ Removed ArgList iterators.
+
+ Reviewed by Gavin Barraclough.
+
+ Another step toward reversing the argument order.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::executeCall):
+ (JSC::Interpreter::executeConstruct): Switched from iterator to int.
+
+ * runtime/ArgList.h:
+ (JSC::ArgList::ArgList):
+ (JSC::ArgList::isEmpty): Removed iterators.
+
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::finishCreation): Switched from iterator to int.
+
2011-11-30 Yuqiang Xian <[email protected]>
32 bit DFG should handle logicalNot slow case instead of simply bailing out
Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.cpp (101603 => 101604)
--- trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2011-12-01 05:24:42 UTC (rev 101603)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2011-12-01 05:38:15 UTC (rev 101604)
@@ -1036,9 +1036,8 @@
CallFrame* newCallFrame = CallFrame::create(oldEnd);
size_t dst = 0;
newCallFrame->uncheckedR(0) = thisValue;
- ArgList::const_iterator end = args.end();
- for (ArgList::const_iterator it = args.begin(); it != end; ++it)
- newCallFrame->uncheckedR(++dst) = *it;
+ for (size_t i = 0; i < args.size(); ++i)
+ newCallFrame->uncheckedR(++dst) = args.at(i);
if (callType == CallTypeJS) {
ScopeChainNode* callDataScopeChain = callData.js.scopeChain;
@@ -1134,9 +1133,8 @@
CallFrame* newCallFrame = CallFrame::create(oldEnd);
size_t dst = 0;
- ArgList::const_iterator end = args.end();
- for (ArgList::const_iterator it = args.begin(); it != end; ++it)
- newCallFrame->uncheckedR(++dst) = *it;
+ for (size_t i = 0; i < args.size(); ++i)
+ newCallFrame->uncheckedR(++dst) = args.at(i);
if (constructType == ConstructTypeJS) {
ScopeChainNode* constructDataScopeChain = constructData.js.scopeChain;
Modified: trunk/Source/_javascript_Core/runtime/ArgList.h (101603 => 101604)
--- trunk/Source/_javascript_Core/runtime/ArgList.h 2011-12-01 05:24:42 UTC (rev 101603)
+++ trunk/Source/_javascript_Core/runtime/ArgList.h 2011-12-01 05:38:15 UTC (rev 101604)
@@ -34,15 +34,15 @@
class MarkedArgumentBuffer {
WTF_MAKE_NONCOPYABLE(MarkedArgumentBuffer);
+ friend class JSGlobalData;
+ friend class ArgList;
+
private:
static const unsigned inlineCapacity = 8;
typedef Vector<Register, inlineCapacity> VectorType;
typedef HashSet<MarkedArgumentBuffer*> ListSet;
public:
- typedef VectorType::iterator iterator;
- typedef VectorType::const_iterator const_iterator;
-
// Constructor for a read-write list, to which you may append values.
// FIXME: Remove all clients of this API, then remove this API.
MarkedArgumentBuffer()
@@ -132,12 +132,6 @@
return m_buffer[m_size - 1].jsValue();
}
- iterator begin() { return m_buffer; }
- iterator end() { return m_buffer + m_size; }
-
- const_iterator begin() const { return m_buffer; }
- const_iterator end() const { return m_buffer + m_size; }
-
static void markLists(HeapRootVisitor&, ListSet&);
private:
@@ -155,8 +149,6 @@
private:
// Prohibits new / delete, which would break GC.
- friend class JSGlobalData;
-
void* operator new(size_t size)
{
return fastMalloc(size);
@@ -176,9 +168,6 @@
class ArgList {
friend class JIT;
public:
- typedef JSValue* iterator;
- typedef const JSValue* const_iterator;
-
ArgList()
: m_args(0)
, m_argCount(0)
@@ -192,7 +181,7 @@
}
ArgList(const MarkedArgumentBuffer& args)
- : m_args(reinterpret_cast<JSValue*>(const_cast<Register*>(args.begin())))
+ : m_args(reinterpret_cast<JSValue*>(args.m_buffer))
, m_argCount(args.size())
{
}
@@ -205,16 +194,10 @@
}
bool isEmpty() const { return !m_argCount; }
-
size_t size() const { return m_argCount; }
- iterator begin() { return m_args; }
- iterator end() { return m_args + m_argCount; }
-
- const_iterator begin() const { return m_args; }
- const_iterator end() const { return m_args + m_argCount; }
-
void getSlice(int startIndex, ArgList& result) const;
+
private:
JSValue* m_args;
size_t m_argCount;
Modified: trunk/Source/_javascript_Core/runtime/JSArray.cpp (101603 => 101604)
--- trunk/Source/_javascript_Core/runtime/JSArray.cpp 2011-12-01 05:24:42 UTC (rev 101603)
+++ trunk/Source/_javascript_Core/runtime/JSArray.cpp 2011-12-01 05:38:15 UTC (rev 101604)
@@ -225,9 +225,8 @@
size_t i = 0;
WriteBarrier<Unknown>* vector = m_storage->m_vector;
- ArgList::const_iterator end = list.end();
- for (ArgList::const_iterator it = list.begin(); it != end; ++it, ++i)
- vector[i].set(globalData, this, *it);
+ for (; i < list.size(); ++i)
+ vector[i].set(globalData, this, list.at(i));
for (; i < initialStorage; i++)
vector[i].clear();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes