void Stubs::do_abc_setpropnsx(MethodFrame* f, const Multiname* name, Atom ns, Atom index, Atom object, Atom value) { Multiname tempname; initnamensx(env(f), name, ns, index, &tempname); Toplevel* t = toplevel(f); t->setproperty(object, &tempname, value, toVTable(t, object)); }
void ScriptObject::setLengthProperty(uint32_t newLen) { Toplevel* toplevel = this->toplevel(); AvmCore* core = toplevel->core(); Multiname mname(core->getAnyPublicNamespace(), core->klength); Atom lenAtm = core->uintToAtom(newLen); toplevel->setproperty(this->atom(), &mname, lenAtm, this->vtable); }
void Stubs::do_abc_setpropx(MethodFrame* f, const Multiname* name, Atom index, Atom object, Atom value) { if (!AvmCore::isDictionaryLookup(index, object)) { Multiname tempname; initnamex(core(f), name, index, &tempname); Toplevel* t = toplevel(f); t->setproperty(object, &tempname, value, toVTable(t, object)); } else { // dictionary[index] = value AvmCore::atomToScriptObject(object)->setAtomProperty(index, value); } }
void Stubs::do_abc_setprop(MethodFrame* f, const Multiname* name, Atom object, Atom value) { Toplevel* t = toplevel(f); t->setproperty(object, name, value, toVTable(t, object)); }