- size_t i = 0;
- size_t count = numParametersMinusThis;
- for ( ; i < count; ++i) {
- Register& r = registerArray[i];
- if (!r.marked())
- r.mark();
+inline bool JSActivation::symbolTablePut(ExecState* exec, PropertyName propertyName, JSValue value, bool shouldThrow)
+{
+ VM& vm = exec->vm();
+ ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this));
+
+ WriteBarrierBase<Unknown>* reg;
+ {
+ GCSafeConcurrentJITLocker locker(symbolTable()->m_lock, exec->vm().heap);
+ SymbolTable::Map::iterator iter = symbolTable()->find(locker, propertyName.uid());
+ if (iter == symbolTable()->end(locker))
+ return false;
+ ASSERT(!iter->value.isNull());
+ if (iter->value.isReadOnly()) {
+ if (shouldThrow)
+ throwTypeError(exec, StrictModeReadonlyPropertyWriteError);
+ return true;
+ }
+ // Defend against the inspector asking for a var after it has been optimized out.
+ if (isTornOff() && !isValid(iter->value))
+ return false;
+ if (VariableWatchpointSet* set = iter->value.watchpointSet())
+ set->invalidate(); // Don't mess around - if we had found this statically, we would have invcalidated it.
+ reg = ®isterAt(iter->value.getIndex());