Beispiel #1
0
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));
}
Beispiel #2
0
 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);
 }
Beispiel #3
0
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);
  }
}
Beispiel #4
0
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));
}