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("]")); }
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("]")); }
/** * 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("]")); } }