MarkedArgumentBuffer()
: m_size(0)
, m_capacity(inlineCapacity)
- , m_buffer(&m_inlineBuffer[m_capacity - 1])
+ , m_buffer(m_inlineBuffer)
, m_markSet(0)
{
}
EncodedJSValue& slotFor(int item) const
{
- return m_buffer[-item];
+ return m_buffer[item];
}
EncodedJSValue* mallocBase()
{
if (m_capacity == static_cast<int>(inlineCapacity))
return 0;
- return &slotFor(m_capacity - 1);
+ return &slotFor(0);
}
int m_size;
};
class ArgList {
+ friend class Interpreter;
friend class JIT;
public:
ArgList()
{
if (i >= m_argCount)
return jsUndefined();
- return m_args[-i];
+ return m_args[i];
}
bool isEmpty() const { return !m_argCount; }
JS_EXPORT_PRIVATE void getSlice(int startIndex, ArgList& result) const;
private:
+ JSValue* data() const { return m_args; }
+
JSValue* m_args;
int m_argCount;
};