void ScriptObject::setUintProperty(uint32_t i, Atom value) { AvmCore* core = this->core(); if (!(i&MAX_INTEGER_MASK)) { Atom name = core->uintToAtom (i); if (traits()->needsHashtable()) { MMGC_MEM_TYPE(this); getTable()->add(name, value); MMGC_MEM_TYPE(NULL); } else { throwWriteSealedError(core->internUint32(i)->atom()); } } else { setAtomProperty(core->internUint32(i)->atom(), value); } }
bool ScriptObject::hasUintProperty(uint32_t i) const { AvmCore* core = this->core(); if (!(i&MAX_INTEGER_MASK)) { Atom name = core->uintToAtom (i); if (traits()->needsHashtable()) { return getTable()->contains(name); } else { // ISSUE should this walk the proto chain? return false; } } else { return hasAtomProperty(core->internUint32(i)->atom()); } }
bool ScriptObject::delUintProperty(uint32_t i) { AvmCore* core = this->core(); if (!(i&MAX_INTEGER_MASK)) { Atom name = core->uintToAtom (i); if (traits()->needsHashtable()) { getTable()->remove(name); return true; } else { return false; } } else { return deleteAtomProperty(core->internUint32(i)->atom()); } }