Exemplo n.º 1
0
 Stringp ClassClosure::implToString() const
 {
     AvmCore* core = this->core();
     Traits* t = this->traits()->itraits;
     Stringp s = core->concatStrings(core->newConstantStringLatin1("[class "), t->name());
     return core->concatStrings(s, core->newConstantStringLatin1("]"));
 }
Exemplo n.º 2
0
 Stringp ScriptObject::implToString() const
 {
     AvmCore* core = this->core();
     Traits* t = this->traits();
     Stringp s = core->concatStrings(core->newConstantStringLatin1("[object "), t->name());
     return core->concatStrings(s, core->newConstantStringLatin1("]"));
 }
Exemplo n.º 3
0
    /**
     * Object.prototype.toString()
     */
    Stringp ObjectClass::_toString(Atom thisAtom)
    {
        AvmCore* core = this->core();

        if (AvmCore::isObject(thisAtom))
        {
            return AvmCore::atomToScriptObject(thisAtom)->implToString();
        }
        else
        {
            Traits*     t = toplevel()->toTraits(thisAtom);
            Stringp s = core->concatStrings(core->newConstantStringLatin1("[object "), t->name());
            return core->concatStrings(s, core->newConstantStringLatin1("]"));
        }
    }