#include "HeapRootVisitor.h"
#include "JSCJSValue.h"
#include "JSObject.h"
-#include "Operations.h"
+#include "JSCInlines.h"
using std::min;
return;
}
- result.m_args = m_args - startIndex;
+ result.m_args = m_args + startIndex;
result.m_argCount = m_argCount - startIndex;
}
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;