X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/93a3786624b2768d89bfa27e46598dc64e2fb70a..refs/heads/master:/runtime/ArgList.cpp diff --git a/runtime/ArgList.cpp b/runtime/ArgList.cpp index 7424041..5149815 100644 --- a/runtime/ArgList.cpp +++ b/runtime/ArgList.cpp @@ -24,7 +24,7 @@ #include "HeapRootVisitor.h" #include "JSCJSValue.h" #include "JSObject.h" -#include "Operations.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;