- JSValue test(ExecState*, const ArgList&);
- JSValue exec(ExecState*, const ArgList&);
+ void setLastIndex(ExecState* exec, size_t lastIndex)
+ {
+ m_lastIndex.setWithoutWriteBarrier(jsNumber(lastIndex));
+ if (LIKELY(m_lastIndexIsWritable))
+ m_lastIndex.setWithoutWriteBarrier(jsNumber(lastIndex));
+ else
+ throwTypeError(exec, StrictModeReadonlyPropertyWriteError);
+ }
+ void setLastIndex(ExecState* exec, JSValue lastIndex, bool shouldThrow)
+ {
+ if (LIKELY(m_lastIndexIsWritable))
+ m_lastIndex.set(exec->vm(), this, lastIndex);
+ else if (shouldThrow)
+ throwTypeError(exec, StrictModeReadonlyPropertyWriteError);
+ }
+ JSValue getLastIndex() const
+ {
+ return m_lastIndex.get();
+ }