X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/6fe7ccc865dc7d7541b93c5bcaf6368d2c98a174..refs/heads/master:/runtime/ArgList.cpp diff --git a/runtime/ArgList.cpp b/runtime/ArgList.cpp index 873ddc2..5149815 100644 --- a/runtime/ArgList.cpp +++ b/runtime/ArgList.cpp @@ -22,9 +22,9 @@ #include "ArgList.h" #include "HeapRootVisitor.h" -#include "JSValue.h" +#include "JSCJSValue.h" #include "JSObject.h" -#include "ScopeChain.h" +#include "JSCInlines.h" using std::min; @@ -37,7 +37,7 @@ void ArgList::getSlice(int startIndex, ArgList& result) const return; } - result.m_args = m_args - startIndex; + result.m_args = m_args + startIndex; result.m_argCount = m_argCount - startIndex; } @@ -54,9 +54,9 @@ void MarkedArgumentBuffer::markLists(HeapRootVisitor& heapRootVisitor, ListSet& void MarkedArgumentBuffer::slowAppend(JSValue v) { int newCapacity = m_capacity * 4; - EncodedJSValue* newBuffer = &(new EncodedJSValue[newCapacity])[newCapacity - 1]; + EncodedJSValue* newBuffer = new EncodedJSValue[newCapacity]; for (int i = 0; i < m_capacity; ++i) - newBuffer[-i] = m_buffer[-i]; + newBuffer[i] = m_buffer[i]; if (EncodedJSValue* base = mallocBase()) delete [] base;