Ejemplo n.º 1
0
Atom Stubs::do_abc_getpropnsx(MethodFrame* f, const Multiname* name, Atom ns,
                              Atom index, Atom object) {
  Multiname tempname;
  initnamensx(env(f), name, ns, index, &tempname);
  Toplevel* t = toplevel(f);
  return t->getproperty(object, &tempname, toVTable(t, object));
}
Ejemplo n.º 2
0
 uint32_t ScriptObject::getLengthProperty()
 {
     Toplevel* toplevel = this->toplevel();
     AvmCore* core = toplevel->core();
     Multiname mname(core->getAnyPublicNamespace(), core->klength);
     Atom lenAtm = toplevel->getproperty(this->atom(), &mname, this->vtable);
     return AvmCore::toUInt32(lenAtm);
 }
Ejemplo n.º 3
0
Atom Stubs::do_abc_getpropx(MethodFrame* f, const Multiname* name, Atom index,
                            Atom object) {
  assert(!AvmCore::isNullOrUndefined(object));
  if (!AvmCore::isDictionaryLookup(index, object)) {
    Multiname tempname;
    initnamex(core(f), name, index, &tempname);
    Toplevel* t = toplevel(f);
    return t->getproperty(object, &tempname, toVTable(t, object));
  } else {
    // = dictionary[index]
    return AvmCore::atomToScriptObject(object)->getAtomProperty(index);
  }
}