Projects
Essentials
lightspark
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 114
View file
lightspark.spec
Changed
@@ -20,7 +20,7 @@ %bcond_without librtmp Name: lightspark -Version: 0.7.2.99+git20160821.1502 +Version: 0.7.2.99+git20160828.1727 Release: 0 Summary: Modern, free, open-source flash player implementation License: LGPL-3.0+
View file
lightspark.tar.xz/src/asobject.cpp
Changed
@@ -104,6 +104,12 @@ this->as<Class_base>()->borrowedVariables.dumpVariables(); } } +uint32_t ASObject::toStringId() +{ + if (stringId == UINT32_MAX) + stringId = getSystemState()->getUniqueStringId(toString()); + return stringId; +} tiny_string ASObject::toString() { check(); @@ -324,9 +330,9 @@ { multiname valueOfName(NULL); valueOfName.name_type=multiname::NAME_STRING; - valueOfName.name_s_id=getSystemState()->getUniqueStringId("valueOf"); - valueOfName.ns.emplace_back(getSystemState(),"",NAMESPACE); - valueOfName.ns.emplace_back(getSystemState(),AS3,NAMESPACE); + valueOfName.name_s_id=BUILTIN_STRINGS::STRING_VALUEOF; + valueOfName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); + valueOfName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::STRING_AS3NS,NAMESPACE); valueOfName.isAttribute = false; return hasPropertyByMultiname(valueOfName, true, true); } @@ -338,9 +344,9 @@ { multiname valueOfName(NULL); valueOfName.name_type=multiname::NAME_STRING; - valueOfName.name_s_id=getSystemState()->getUniqueStringId("valueOf"); - valueOfName.ns.emplace_back(getSystemState(),"",NAMESPACE); - valueOfName.ns.emplace_back(getSystemState(),AS3,NAMESPACE); + valueOfName.name_s_id=BUILTIN_STRINGS::STRING_VALUEOF; + valueOfName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); + valueOfName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::STRING_AS3NS,NAMESPACE); valueOfName.isAttribute = false; assert_and_throw(hasPropertyByMultiname(valueOfName, true, true)); @@ -358,9 +364,9 @@ { multiname toStringName(NULL); toStringName.name_type=multiname::NAME_STRING; - toStringName.name_s_id=getSystemState()->getUniqueStringId("toString"); - toStringName.ns.emplace_back(getSystemState(),"",NAMESPACE); - toStringName.ns.emplace_back(getSystemState(),AS3,NAMESPACE); + toStringName.name_s_id=BUILTIN_STRINGS::STRING_TOSTRING; + toStringName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); + toStringName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::STRING_AS3NS,NAMESPACE); toStringName.isAttribute = false; return ASObject::hasPropertyByMultiname(toStringName, true, true); } @@ -372,9 +378,9 @@ { multiname toStringName(NULL); toStringName.name_type=multiname::NAME_STRING; - toStringName.name_s_id=getSystemState()->getUniqueStringId("toString"); - toStringName.ns.emplace_back(getSystemState(),"",NAMESPACE); - toStringName.ns.emplace_back(getSystemState(),AS3,NAMESPACE); + toStringName.name_s_id=BUILTIN_STRINGS::STRING_TOSTRING; + toStringName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); + toStringName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::STRING_AS3NS,NAMESPACE); toStringName.isAttribute = false; assert(ASObject::hasPropertyByMultiname(toStringName, true, true)); @@ -394,8 +400,8 @@ multiname toJSONName(NULL); toJSONName.name_type=multiname::NAME_STRING; toJSONName.name_s_id=getSystemState()->getUniqueStringId("toJSON"); - toJSONName.ns.emplace_back(getSystemState(),"",NAMESPACE); - toJSONName.ns.emplace_back(getSystemState(),AS3,NAMESPACE); + toJSONName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); + toJSONName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::STRING_AS3NS,NAMESPACE); toJSONName.isAttribute = false; if (!ASObject::hasPropertyByMultiname(toJSONName, true, true)) return res; @@ -980,8 +986,8 @@ { multiname toStringName(NULL); toStringName.name_type=multiname::NAME_STRING; - toStringName.name_s_id=obj->getSystemState()->getUniqueStringId("toString"); - toStringName.ns.emplace_back(obj->getSystemState(),"",NAMESPACE); + toStringName.name_s_id=BUILTIN_STRINGS::STRING_TOSTRING; + toStringName.ns.emplace_back(obj->getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); toStringName.isAttribute = false; if (obj->hasPropertyByMultiname(toStringName, true, false)) { @@ -1001,8 +1007,8 @@ assert_and_throw(argslen==1); multiname name(NULL); name.name_type=multiname::NAME_STRING; - name.name_s_id=obj->getSystemState()->getUniqueStringId(args[0]->toString()); - name.ns.emplace_back(obj->getSystemState(),"",NAMESPACE); + name.name_s_id=args[0]->toStringId(); + name.ns.emplace_back(obj->getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); name.isAttribute=false; bool ret=obj->hasPropertyByMultiname(name, true, false); return abstract_b(obj->getSystemState(),ret); @@ -1041,8 +1047,8 @@ return abstract_b(obj->getSystemState(),false); multiname name(NULL); name.name_type=multiname::NAME_STRING; - name.name_s_id=obj->getSystemState()->getUniqueStringId(args[0]->toString()); - name.ns.emplace_back(obj->getSystemState(),"",NAMESPACE); + name.name_s_id=args[0]->toStringId(); + name.ns.emplace_back(obj->getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); name.isAttribute=false; if (obj->is<Array>()) // propertyIsEnumerable(index) isn't mentioned in the ECMA specs but is tested for { @@ -1067,8 +1073,8 @@ ARG_UNPACK(propname) (isEnum, true); multiname name(NULL); name.name_type=multiname::NAME_STRING; - name.name_s_id=obj->getSystemState()->getUniqueStringId(args[0]->toString()); - name.ns.emplace_back(obj->getSystemState(),"",NAMESPACE); + name.name_s_id=args[0]->toStringId(); + name.ns.emplace_back(obj->getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); name.isAttribute=false; obj->setIsEnumerable(name, isEnum); return NULL; @@ -1343,7 +1349,7 @@ } ASObject::ASObject(Class_base* c,SWFOBJECT_TYPE t,CLASS_SUBTYPE st):objfreelist(c && c->isReusable ? c->freelist : NULL),Variables((c)?c->memoryAccount:NULL),varcount(0),classdef(c),proxyMultiName(NULL),sys(c?c->sys:NULL), - type(t),subtype(st),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),implEnable(true) + stringId(UINT32_MAX),type(t),subtype(st),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),implEnable(true) { #ifndef NDEBUG //Stuff only used in debugging @@ -1352,7 +1358,7 @@ } ASObject::ASObject(const ASObject& o):objfreelist(o.classdef && o.classdef->isReusable ? o.classdef->freelist : NULL),Variables((o.classdef)?o.classdef->memoryAccount:NULL),varcount(0),classdef(NULL),proxyMultiName(NULL),sys(o.classdef? o.classdef->sys : NULL), - type(o.type),subtype(o.subtype),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),implEnable(true) + stringId(o.stringId),type(o.type),subtype(o.subtype),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),implEnable(true) { #ifndef NDEBUG //Stuff only used in debugging @@ -1375,6 +1381,7 @@ destroyContents(); if (proxyMultiName) delete proxyMultiName; + stringId = UINT32_MAX; proxyMultiName = NULL; traitsInitialized =false; constructIndicator = false; @@ -1588,7 +1595,7 @@ multiname writeExternalName(NULL); writeExternalName.name_type=multiname::NAME_STRING; writeExternalName.name_s_id=getSystemState()->getUniqueStringId("writeExternal"); - writeExternalName.ns.emplace_back(getSystemState(),"",NAMESPACE); + writeExternalName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); writeExternalName.isAttribute = false; _NR<ASObject> o=getVariableByMultiname(writeExternalName,SKIP_IMPL); @@ -1892,7 +1899,7 @@ multiname prototypeName(NULL); prototypeName.name_type=multiname::NAME_STRING; prototypeName.name_s_id=getSystemState()->getUniqueStringId("prototype"); - prototypeName.ns.emplace_back(getSystemState(),"",NAMESPACE); + prototypeName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); bool has_getter = false; variable* ret=findSettable(prototypeName,&has_getter); if(!ret && has_getter)
View file
lightspark.tar.xz/src/asobject.h
Changed
@@ -366,7 +366,7 @@ SystemState* sys; protected: ASObject(MemoryAccount* m):objfreelist(NULL),Variables(m),varcount(0),classdef(NULL),proxyMultiName(NULL),sys(NULL), - type(T_OBJECT),subtype(SUBTYPE_NOT_SET),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),implEnable(true) + stringId(UINT32_MAX),type(T_OBJECT),subtype(SUBTYPE_NOT_SET),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),implEnable(true) { #ifndef NDEBUG //Stuff only used in debugging @@ -379,6 +379,7 @@ { destroy(); } + uint32_t stringId; SWFOBJECT_TYPE type; CLASS_SUBTYPE subtype; @@ -554,6 +555,7 @@ /* Implements ECMA's 9.8 ToString operation, but returns the concrete value */ tiny_string toString(); tiny_string toLocaleString(); + uint32_t toStringId(); virtual int32_t toInt(); virtual uint32_t toUInt(); virtual int64_t toInt64();
View file
lightspark.tar.xz/src/backends/extscriptobject.cpp
Changed
@@ -280,7 +280,7 @@ // We are converting an array, so lets set indexes if(objValue->getType() == ExtObject::EO_ARRAY) { - asobj = Class<Array>::getInstanceS(getSys()); + asobj = Class<Array>::getInstanceSNoArgs(getSys()); objectsMap[objValue] = asobj; count = objValue->getLength();
View file
lightspark.tar.xz/src/scripting/abc.cpp
Changed
@@ -248,7 +248,7 @@ builtin->registerBuiltin("undefined","",_MR(m_sys->getUndefinedRef())); builtin->registerBuiltin("Math","",Class<Math>::getRef(m_sys)); builtin->registerBuiltin("Namespace","",Class<Namespace>::getRef(m_sys)); - builtin->registerBuiltin("AS3","",_MR(Class<Namespace>::getInstanceS(m_sys,AS3))); + builtin->registerBuiltin("AS3","",_MR(Class<Namespace>::getInstanceS(m_sys,BUILTIN_STRINGS::STRING_AS3NS))); builtin->registerBuiltin("Date","",Class<Date>::getRef(m_sys)); builtin->registerBuiltin("JSON","",Class<JSON>::getRef(m_sys)); builtin->registerBuiltin("RegExp","",Class<RegExp>::getRef(m_sys)); @@ -1879,6 +1879,10 @@ { return m_sys->getStringFromUniqueId(currentCallContext->defaultNamespaceUri); } +uint32_t ABCVm::getDefaultXMLNamespaceID() +{ + return currentCallContext->defaultNamespaceUri; +} uint32_t ABCContext::getString(unsigned int s) const { @@ -2011,7 +2015,7 @@ case 0x08: //Namespace { assert_and_throw(constant_pool.namespaces[index].name); - Namespace* ret = Class<Namespace>::getInstanceS(root->getSystemState(),root->getSystemState()->getStringFromUniqueId(getString(constant_pool.namespaces[index].name))); + Namespace* ret = Class<Namespace>::getInstanceS(root->getSystemState(),getString(constant_pool.namespaces[index].name)); if (constant_pool.namespaces[index].kind != 0) ret->nskind =(NS_KIND)(int)(constant_pool.namespaces[index].kind); return ret; @@ -2086,7 +2090,7 @@ ASObject* ret; - QName className(mname->name_s_id,mname->ns[0].getImpl(obj->getSystemState()).nameId); + QName className(mname->name_s_id,mname->ns[0].nsNameId); //check if this class has the 'interface' flag, i.e. it is an interface if((instances[t->classi].flags)&0x04) {
View file
lightspark.tar.xz/src/scripting/abc.h
Changed
@@ -591,6 +591,7 @@ uint32_t getAndIncreaseNamespaceBase(uint32_t nsNum); tiny_string getDefaultXMLNamespace(); + uint32_t getDefaultXMLNamespaceID(); void buildClassAndBindTag(const std::string& s, DictionaryTag* t); };
View file
lightspark.tar.xz/src/scripting/abc_opcodes.cpp
Changed
@@ -1999,7 +1999,7 @@ name.name_type=multiname::NAME_OBJECT; //Acquire the reference name.name_o=val1; - name.ns.emplace_back(val2->getSystemState(),"",NAMESPACE); + name.ns.emplace_back(val2->getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); bool ret=val2->hasPropertyByMultiname(name, true, true); name.name_o=NULL; val1->decRef(); @@ -2111,12 +2111,12 @@ //Duplicated keys overwrite the previous value multiname propertyName(NULL); propertyName.name_type=multiname::NAME_STRING; - propertyName.ns.emplace_back(th->context->root->getSystemState(),"",NAMESPACE); + propertyName.ns.emplace_back(th->context->root->getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); for(int i=0;i<n;i++) { ASObject* value=th->runtime_stack_pop(); ASObject* name=th->runtime_stack_pop(); - propertyName.name_s_id=ret->getSystemState()->getUniqueStringId(name->toString()); + propertyName.name_s_id=name->toStringId(); name->decRef(); ret->setVariableByMultiname(propertyName, value, ASObject::CONST_NOT_ALLOWED); } @@ -2135,24 +2135,24 @@ { XML* xmlObj=Class<XML>::cast(obj); targetobject = xmlObj->getChildrenlist(); - tiny_string ns_uri = ""; + uint32_t ns_uri = BUILTIN_STRINGS::EMPTY; if (name->ns.size() > 0) { - ns_uri = th->context->root->getSystemState()->getStringFromUniqueId(name->ns[0].getImpl(th->context->root->getSystemState()).nameId); - if (ns_uri.empty() && name->ns.size() == 1) - ns_uri="*"; + ns_uri = name->ns[0].nsNameId; + if (ns_uri == BUILTIN_STRINGS::EMPTY && name->ns.size() == 1) + ns_uri=BUILTIN_STRINGS::STRING_WILDCARD; } xmlObj->getDescendantsByQName(name->normalizedName(th->context->root->getSystemState()), ns_uri,name->isAttribute, ret); } else if(obj->getClass()==Class<XMLList>::getClass(th->context->root->getSystemState())) { XMLList* xmlObj=Class<XMLList>::cast(obj); - tiny_string ns_uri = ""; + uint32_t ns_uri = BUILTIN_STRINGS::EMPTY; if (name->ns.size() > 0) { - ns_uri = th->context->root->getSystemState()->getStringFromUniqueId(name->ns[0].getImpl(th->context->root->getSystemState()).nameId); - if (ns_uri.empty() && name->ns.size() == 1) - ns_uri="*"; + ns_uri = name->ns[0].nsNameId; + if (ns_uri == BUILTIN_STRINGS::EMPTY && name->ns.size() == 1) + ns_uri=BUILTIN_STRINGS::STRING_WILDCARD; } targetobject = xmlObj; xmlObj->getDescendantsByQName(name->normalizedName(th->context->root->getSystemState()), ns_uri,name->isAttribute, ret); @@ -2201,7 +2201,7 @@ obj->decRef(); throwError<TypeError>(kDescendentsError, objName); } - XMLList* retObj=Class<XMLList>::getInstanceS(th->context->root->getSystemState(),ret,targetobject,*name); + XMLList* retObj=XMLList::create(th->context->root->getSystemState(),ret,targetobject,*name); th->runtime_stack_push(retObj); obj->decRef(); } @@ -2306,7 +2306,7 @@ ASObject* baseClass=th->runtime_stack_pop(); assert_and_throw(mname->ns.size()==1); - QName className(mname->name_s_id,mname->ns[0].getImpl(th->context->root->getSystemState()).nameId); + QName className(mname->name_s_id,mname->ns[0].nsNameId); Class_inherit* ret = NULL; auto i = th->context->root->applicationDomain->classesBeingDefined.cbegin(); @@ -2700,7 +2700,7 @@ void ABCVm::newArray(call_context* th, int n) { LOG_CALL( _("newArray ") << n ); - Array* ret=Class<Array>::getInstanceS(th->context->root->getSystemState()); + Array* ret=Class<Array>::getInstanceSNoArgs(th->context->root->getSystemState()); ret->resize(n); for(int i=0;i<n;i++) ret->set(n-i-1,_MR(th->runtime_stack_pop())); @@ -2778,7 +2778,7 @@ const namespace_info& ns_info=th->context->constant_pool.namespaces[n]; assert(ns_info.kind == NAMESPACE); LOG_CALL( _("pushNamespace ") << th->context->root->getSystemState()->getStringFromUniqueId(th->context->getString(ns_info.name)) ); - return Class<Namespace>::getInstanceS(th->context->root->getSystemState(),th->context->root->getSystemState()->getStringFromUniqueId(th->context->getString(ns_info.name))); + return Class<Namespace>::getInstanceS(th->context->root->getSystemState(),th->context->getString(ns_info.name)); } /* @spec-checked avm2overview */ @@ -2796,6 +2796,6 @@ if(!th->mi->hasDXNS()) throw Class<VerifyError>::getInstanceS(th->context->root->getSystemState(),"dxnslate without SET_DXNS"); - th->defaultNamespaceUri = th->context->root->getSystemState()->getUniqueStringId(o->toString()); + th->defaultNamespaceUri = o->toStringId(); o->decRef(); }
View file
lightspark.tar.xz/src/scripting/flash/display/DisplayObject.cpp
Changed
@@ -98,7 +98,7 @@ DisplayObject::DisplayObject(Class_base* c):EventDispatcher(c),tx(0),ty(0),rotation(0), sx(1),sy(1),alpha(1.0),maskOf(),parent(),constructed(false),useLegacyMatrix(true),onStage(false), - visible(true),mask(),invalidateQueueNext(),loaderInfo(),filters(Class<Array>::getInstanceS(c->getSystemState())),cacheAsBitmap(false) + visible(true),mask(),invalidateQueueNext(),loaderInfo(),filters(Class<Array>::getInstanceSNoArgs(c->getSystemState())),cacheAsBitmap(false) { name = tiny_string("instance") + Integer::toString(ATOMIC_INCREMENT(instanceCount)); }
View file
lightspark.tar.xz/src/scripting/flash/display/flashdisplay.cpp
Changed
@@ -1028,7 +1028,7 @@ ASFUNCTIONBODY(Scene,_getLabels) { Scene* th=static_cast<Scene*>(obj); - Array* ret = Class<Array>::getInstanceS(obj->getSystemState()); + Array* ret = Class<Array>::getInstanceSNoArgs(obj->getSystemState()); ret->resize(th->labels.size()); for(size_t i=0; i<th->labels.size(); ++i) { @@ -1354,7 +1354,7 @@ ASFUNCTIONBODY(MovieClip,_getScenes) { MovieClip* th=static_cast<MovieClip*>(obj); - Array* ret = Class<Array>::getInstanceS(obj->getSystemState()); + Array* ret = Class<Array>::getInstanceSNoArgs(obj->getSystemState()); ret->resize(th->scenes.size()); uint32_t numFrames; for(size_t i=0; i<th->scenes.size(); ++i) @@ -1438,7 +1438,7 @@ MovieClip* th=static_cast<MovieClip*>(obj); Scene_data& sc = th->scenes[th->getCurrentScene()]; - Array* ret = Class<Array>::getInstanceS(obj->getSystemState()); + Array* ret = Class<Array>::getInstanceSNoArgs(obj->getSystemState()); ret->resize(sc.labels.size()); for(size_t i=0; i<sc.labels.size(); ++i) { @@ -1522,7 +1522,7 @@ multiname objName(NULL); objName.name_type=multiname::NAME_STRING; objName.name_s_id=getSystemState()->getUniqueStringId(obj->name); - objName.ns.emplace_back(getSystemState(),"",NAMESPACE); + objName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); setVariableByMultiname(objName,getSystemState()->getNullRef(), ASObject::CONST_NOT_ALLOWED); } @@ -1546,7 +1546,7 @@ multiname objName(NULL); objName.name_type=multiname::NAME_STRING; objName.name_s_id=getSystemState()->getUniqueStringId(obj->name); - objName.ns.emplace_back(getSystemState(),"",NAMESPACE); + objName.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); setVariableByMultiname(objName,obj,ASObject::CONST_NOT_ALLOWED); }
View file
lightspark.tar.xz/src/scripting/flash/net/flashnet.cpp
Changed
@@ -36,7 +36,7 @@ using namespace lightspark; URLRequest::URLRequest(Class_base* c):ASObject(c),method(GET),contentType("application/x-www-form-urlencoded"), - requestHeaders(Class<Array>::getInstanceS(c->getSystemState())) + requestHeaders(Class<Array>::getInstanceSNoArgs(c->getSystemState())) { } @@ -817,7 +817,7 @@ //This function is supposed to be passed a array for the rest //of the arguments. Since that is not supported for native methods //just create it here - _R<Array> rest=_MR(Class<Array>::getInstanceS(obj->getSystemState())); + _R<Array> rest=_MR(Class<Array>::getInstanceSNoArgs(obj->getSystemState())); for(uint32_t i=2;i<argslen;i++) { args[i]->incRef(); @@ -2164,7 +2164,7 @@ Array* arr=NULL; if(curValue->getObjectType()!=T_ARRAY) { - arr=Class<Array>::getInstanceS(getSystemState()); + arr=Class<Array>::getInstanceSNoArgs(getSystemState()); arr->push(curValue); setVariableByMultiname(propName,arr,ASObject::CONST_NOT_ALLOWED); }
View file
lightspark.tar.xz/src/scripting/flash/text/flashtext.cpp
Changed
@@ -74,7 +74,7 @@ if (enumerateDeviceFonts) LOG(LOG_NOT_IMPLEMENTED,"Font::enumerateFonts: flag enumerateDeviceFonts is not handled"); - Array* ret = Class<Array>::getInstanceS(getSys()); + Array* ret = Class<Array>::getInstanceSNoArgs(getSys()); std::vector<ASObject*>* fontlist = getFontList(); for(auto i = fontlist->begin(); i != fontlist->end(); ++i) { @@ -1307,7 +1307,7 @@ { StyleSheet* th=Class<StyleSheet>::cast(obj); assert_and_throw(argslen==0); - Array* ret=Class<Array>::getInstanceS(obj->getSystemState()); + Array* ret=Class<Array>::getInstanceSNoArgs(obj->getSystemState()); map<tiny_string, _R<ASObject>>::const_iterator it=th->styles.begin(); for(;it!=th->styles.end();++it) ret->push(_MR(abstract_s(obj->getSystemState(),it->first)));
View file
lightspark.tar.xz/src/scripting/flash/ui/ContextMenu.cpp
Changed
@@ -22,7 +22,7 @@ using namespace std; using namespace lightspark; -ContextMenu::ContextMenu(Class_base* c):EventDispatcher(c),customItems(Class<Array>::getInstanceS(c->getSystemState())),builtInItems(Class<ContextMenuBuiltInItems>::getInstanceS(c->getSystemState())) +ContextMenu::ContextMenu(Class_base* c):EventDispatcher(c),customItems(Class<Array>::getInstanceSNoArgs(c->getSystemState())),builtInItems(Class<ContextMenuBuiltInItems>::getInstanceS(c->getSystemState())) { }
View file
lightspark.tar.xz/src/scripting/flash/utils/Dictionary.cpp
Changed
@@ -99,7 +99,7 @@ return; case T_STRING: tmpname.name_type=multiname::NAME_STRING; - tmpname.name_s_id = getSystemState()->getUniqueStringId(name.name_o->toString()); + tmpname.name_s_id = name.name_o->toStringId(); ASObject::setVariableByMultiname(tmpname, o, allowConst); return; default: @@ -147,7 +147,7 @@ return ASObject::deleteVariableByMultiname(tmpname); case T_STRING: tmpname.name_type=multiname::NAME_STRING; - tmpname.name_s_id = getSystemState()->getUniqueStringId(name.name_o->toString()); + tmpname.name_s_id = name.name_o->toStringId(); return ASObject::deleteVariableByMultiname(tmpname); default: break; @@ -196,7 +196,7 @@ return ASObject::getVariableByMultiname(tmpname, opt); case T_STRING: tmpname.name_type=multiname::NAME_STRING; - tmpname.name_s_id = getSystemState()->getUniqueStringId(name.name_o->toString()); + tmpname.name_s_id = name.name_o->toStringId(); return ASObject::getVariableByMultiname(tmpname, opt); default: break; @@ -253,7 +253,7 @@ return ASObject::hasPropertyByMultiname(tmpname, considerDynamic, considerPrototype); case T_STRING: tmpname.name_type=multiname::NAME_STRING; - tmpname.name_s_id = getSystemState()->getUniqueStringId(name.name_o->toString()); + tmpname.name_s_id = name.name_o->toStringId(); return ASObject::hasPropertyByMultiname(tmpname, considerDynamic, considerPrototype); default: break;
View file
lightspark.tar.xz/src/scripting/flash/xml/flashxml.cpp
Changed
@@ -101,7 +101,7 @@ ASFUNCTIONBODY(XMLNode,childNodes) { XMLNode* th=Class<XMLNode>::cast(obj); - Array* ret = Class<Array>::getInstanceS(obj->getSystemState()); + Array* ret = Class<Array>::getInstanceSNoArgs(obj->getSystemState()); assert_and_throw(argslen==0); if(th->node.type()==pugi::node_null) return ret;
View file
lightspark.tar.xz/src/scripting/toplevel/ASString.cpp
Changed
@@ -29,23 +29,24 @@ using namespace std; using namespace lightspark; -ASString::ASString(Class_base* c):ASObject(c,T_STRING),hasId(true),datafilled(true),stringId(BUILTIN_STRINGS::EMPTY) +ASString::ASString(Class_base* c):ASObject(c,T_STRING),hasId(true),datafilled(true) { + stringId = BUILTIN_STRINGS::EMPTY; } -ASString::ASString(Class_base* c,const string& s) : ASObject(c,T_STRING),data(s),hasId(false),datafilled(true),stringId(BUILTIN_STRINGS::EMPTY) +ASString::ASString(Class_base* c,const string& s) : ASObject(c,T_STRING),data(s),hasId(false),datafilled(true) { } -ASString::ASString(Class_base* c,const tiny_string& s) : ASObject(c,T_STRING),data(s),hasId(false),datafilled(true),stringId(BUILTIN_STRINGS::EMPTY) +ASString::ASString(Class_base* c,const tiny_string& s) : ASObject(c,T_STRING),data(s),hasId(false),datafilled(true) { } -ASString::ASString(Class_base* c,const Glib::ustring& s) : ASObject(c,T_STRING),data(s),hasId(false),datafilled(true),stringId(BUILTIN_STRINGS::EMPTY) +ASString::ASString(Class_base* c,const Glib::ustring& s) : ASObject(c,T_STRING),data(s),hasId(false),datafilled(true) { } -ASString::ASString(Class_base* c,const char* s) : ASObject(c,T_STRING),data(s, /*copy:*/true),hasId(false),datafilled(true),stringId(BUILTIN_STRINGS::EMPTY) +ASString::ASString(Class_base* c,const char* s) : ASObject(c,T_STRING),data(s, /*copy:*/true),hasId(false),datafilled(true) { } @@ -53,7 +54,6 @@ { data = std::string(s,len); hasId = false; - stringId = BUILTIN_STRINGS::EMPTY; datafilled=true; } @@ -64,7 +64,7 @@ { th->data=args[0]->toString(); th->hasId = false; - th->stringId = BUILTIN_STRINGS::EMPTY; + th->stringId = UINT32_MAX; th->datafilled = true; } return NULL; @@ -220,7 +220,7 @@ if (re->global) { - Array *resarr = Class<Array>::getInstanceS(obj->getSystemState()); + Array *resarr = Class<Array>::getInstanceSNoArgs(obj->getSystemState()); int prevLastIndex = 0; re->lastIndex = 0; @@ -279,7 +279,7 @@ ASFUNCTIONBODY(ASString,split) { tiny_string data = obj->toString(); - Array* ret=Class<Array>::getInstanceS(obj->getSystemState()); + Array* ret=Class<Array>::getInstanceSNoArgs(obj->getSystemState()); uint32_t limit = 0x7fffffff; if(argslen == 0 ) {
View file
lightspark.tar.xz/src/scripting/toplevel/ASString.h
Changed
@@ -50,7 +50,6 @@ ASString(Class_base* c, const char* s, uint32_t len); bool hasId:1; bool datafilled:1; - uint32_t stringId; inline tiny_string& getData() { if (!datafilled) @@ -63,7 +62,7 @@ inline bool isEmpty() const { if (hasId) - return stringId == BUILTIN_STRINGS::EMPTY; + return stringId == BUILTIN_STRINGS::EMPTY || stringId == UINT32_MAX; return data.empty(); } @@ -108,10 +107,16 @@ { data.clear(); strlength.reset(); - hasId = true; - datafilled=true; - stringId = BUILTIN_STRINGS::EMPTY; - return ASObject::destruct(); + hasId = false; + datafilled=false; + if (!ASObject::destruct()) + { + stringId = BUILTIN_STRINGS::EMPTY; + hasId = true; + datafilled = true; + return false; + } + return true; } };
View file
lightspark.tar.xz/src/scripting/toplevel/Array.cpp
Changed
@@ -105,7 +105,7 @@ ASFUNCTIONBODY(Array,generator) { - Array* th=Class<Array>::getInstanceS(getSys()); + Array* th=Class<Array>::getInstanceSNoArgs(getSys()); th->constructorImpl(args, argslen); return th; } @@ -135,7 +135,7 @@ ASFUNCTIONBODY(Array,_concat) { Array* th=static_cast<Array*>(obj); - Array* ret=Class<Array>::getInstanceS(obj->getSystemState()); + Array* ret=Class<Array>::getInstanceSNoArgs(obj->getSystemState()); // copy values into new array ret->resize(th->size()); @@ -178,7 +178,7 @@ ASFUNCTIONBODY(Array,filter) { Array* th=static_cast<Array*>(obj); - Array* ret=Class<Array>::getInstanceS(obj->getSystemState()); + Array* ret=Class<Array>::getInstanceSNoArgs(obj->getSystemState()); _NR<IFunction> f; ARG_UNPACK(f); if (f.isNull()) @@ -530,7 +530,7 @@ startIndex=th->capIndex(startIndex); endIndex=th->capIndex(endIndex); - Array* ret=Class<Array>::getInstanceS(obj->getSystemState()); + Array* ret=Class<Array>::getInstanceSNoArgs(obj->getSystemState()); int j = 0; for(int i=startIndex; i<endIndex; i++) { @@ -557,7 +557,7 @@ ARG_UNPACK_MORE_ALLOWED(startIndex) (deleteCount, th->size()); int totalSize=th->size(); - Array* ret=Class<Array>::getInstanceS(obj->getSystemState()); + Array* ret=Class<Array>::getInstanceSNoArgs(obj->getSystemState()); startIndex=th->capIndex(startIndex); @@ -1109,7 +1109,7 @@ assert_and_throw(args[0]->getObjectType()==T_FUNCTION); func=static_cast<IFunction*>(args[0]); } - Array* arrayRet=Class<Array>::getInstanceS(obj->getSystemState()); + Array* arrayRet=Class<Array>::getInstanceSNoArgs(obj->getSystemState()); uint32_t s = th->size(); for (uint32_t i=0; i < s; i++ )
View file
lightspark.tar.xz/src/scripting/toplevel/Array.h
Changed
@@ -105,6 +105,7 @@ it->second.data->decRef(); } data.clear(); + currentsize=0; return ASObject::destruct(); }
View file
lightspark.tar.xz/src/scripting/toplevel/Date.cpp
Changed
@@ -779,8 +779,8 @@ multiname name(NULL); name.name_type=multiname::NAME_STRING; name.name_s_id=obj->getSystemState()->getUniqueStringId("value"); - name.ns.emplace_back(obj->getSystemState(),"",NAMESPACE); - name.ns.emplace_back(obj->getSystemState(),AS3,NAMESPACE); + name.ns.emplace_back(obj->getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); + name.ns.emplace_back(obj->getSystemState(),BUILTIN_STRINGS::STRING_AS3NS,NAMESPACE); name.isAttribute = true; obj->setVariableByMultiname(name,abstract_d(obj->getSystemState(),ms),CONST_NOT_ALLOWED); return abstract_d(obj->getSystemState(),ms);
View file
lightspark.tar.xz/src/scripting/toplevel/JSON.cpp
Changed
@@ -544,7 +544,7 @@ { int len = jsonstring.numChars(); pos++; // ignore '[' - ASObject* subobj = Class<Array>::getInstanceS(getSys()); + ASObject* subobj = Class<Array>::getInstanceSNoArgs(getSys()); if (*parent == NULL) *parent = subobj; else
View file
lightspark.tar.xz/src/scripting/toplevel/RegExp.cpp
Changed
@@ -198,7 +198,7 @@ pcre_free(pcreRE); return getSystemState()->getNullRef(); } - Array* a=Class<Array>::getInstanceS(getSystemState()); + Array* a=Class<Array>::getInstanceSNoArgs(getSystemState()); //Push the whole result and the captured strings for(int i=0;i<capturingGroups+1;i++) {
View file
lightspark.tar.xz/src/scripting/toplevel/XML.cpp
Changed
@@ -25,6 +25,7 @@ #include "scripting/argconv.h" #include "abc.h" #include "parsing/amf3_generator.h" +#include <unordered_set> using namespace std; using namespace lightspark; @@ -44,16 +45,16 @@ prettyPrinting = true; } -XML::XML(Class_base* c):ASObject(c,T_OBJECT,SUBTYPE_XML),parentNode(0),nodetype((pugi::xml_node_type)0),isAttribute(false),constructed(false) +XML::XML(Class_base* c):ASObject(c,T_OBJECT,SUBTYPE_XML),parentNode(0),nodetype((pugi::xml_node_type)0),isAttribute(false),nodenamespace_uri(BUILTIN_STRINGS::EMPTY),nodenamespace_prefix(BUILTIN_STRINGS::EMPTY),constructed(false) { } -XML::XML(Class_base* c, const std::string &str):ASObject(c,T_OBJECT,SUBTYPE_XML),parentNode(0),nodetype((pugi::xml_node_type)0),isAttribute(false),constructed(false) +XML::XML(Class_base* c, const std::string &str):ASObject(c,T_OBJECT,SUBTYPE_XML),parentNode(0),nodetype((pugi::xml_node_type)0),isAttribute(false),nodenamespace_uri(BUILTIN_STRINGS::EMPTY),nodenamespace_prefix(BUILTIN_STRINGS::EMPTY),constructed(false) { createTree(buildFromString(str, getParseMode()),false); } -XML::XML(Class_base* c, const pugi::xml_node& _n, XML* parent, bool fromXMLList):ASObject(c,T_OBJECT,SUBTYPE_XML),parentNode(0),nodetype((pugi::xml_node_type)0),isAttribute(false),constructed(false) +XML::XML(Class_base* c, const pugi::xml_node& _n, XML* parent, bool fromXMLList):ASObject(c,T_OBJECT,SUBTYPE_XML),parentNode(0),nodetype((pugi::xml_node_type)0),isAttribute(false),nodenamespace_uri(BUILTIN_STRINGS::EMPTY),nodenamespace_prefix(BUILTIN_STRINGS::EMPTY),constructed(false) { if (parent) { @@ -73,8 +74,8 @@ childrenlist.reset(); nodename.clear(); nodevalue.clear(); - nodenamespace_uri.clear(); - nodenamespace_prefix.clear(); + nodenamespace_uri=BUILTIN_STRINGS::EMPTY; + nodenamespace_prefix=BUILTIN_STRINGS::EMPTY; attributelist.reset(); procinstlist.reset(); namespacedefs.clear(); @@ -294,7 +295,7 @@ return obj->getSystemState()->getNullRef(); else { - ASQName* ret = Class<ASQName>::getInstanceS(obj->getSystemState()); + ASQName* ret = Class<ASQName>::getInstanceSNoArgs(obj->getSystemState()); ret->setByXML(th); return ret; } @@ -308,8 +309,8 @@ XMLVector ret; multiname mname(NULL); name->applyProxyProperty(mname); - th->getDescendantsByQName(name->toString(),mname.isQName() ? obj->getSystemState()->getStringFromUniqueId(mname.ns[0].getImpl(obj->getSystemState()).nameId) : "",mname.isAttribute,ret); - return Class<XMLList>::getInstanceS(obj->getSystemState(),ret,th->getChildrenlist(),multiname(NULL)); + th->getDescendantsByQName(name->toString(),mname.isQName() ? mname.ns[0].nsNameId : (uint32_t)BUILTIN_STRINGS::EMPTY,mname.isAttribute,ret); + return XMLList::create(obj->getSystemState(),ret,th->getChildrenlist(),multiname(NULL)); } ASFUNCTIONBODY(XML,_appendChild) @@ -372,16 +373,16 @@ tiny_string attrname; //see spec for QName handling ARG_UNPACK (attrname); - tiny_string tmpns; + uint32_t tmpns = BUILTIN_STRINGS::EMPTY; if(argslen > 0 && args[0]->is<ASQName>()) { - tmpns= obj->getSystemState()->getStringFromUniqueId(args[0]->as<ASQName>()->getURI()); + tmpns= args[0]->as<ASQName>()->getURI(); attrname = obj->getSystemState()->getStringFromUniqueId(args[0]->as<ASQName>()->getLocalName()); } XMLVector tmp; - XMLList* res = Class<XMLList>::getInstanceS(obj->getSystemState(),tmp,th->getChildrenlist(),multiname(NULL)); + XMLList* res = XMLList::create(obj->getSystemState(),tmp,th->getChildrenlist(),multiname(NULL)); if (!th->attributelist.isNull()) { for (XMLList::XMLListVector::const_iterator it = th->attributelist->nodes.begin(); it != th->attributelist->nodes.end(); it++) @@ -409,14 +410,14 @@ return attributelist.getPtr(); } -const tiny_string XML::toXMLString_internal(bool pretty, tiny_string defaultnsprefix, const char *indent,bool bfirst) +const tiny_string XML::toXMLString_internal(bool pretty, uint32_t defaultnsprefix, const char *indent,bool bfirst) { tiny_string res; - set<tiny_string> seen_prefix; + set<uint32_t> seen_prefix; if (bfirst) { - tiny_string defns = getVm(getSystemState())->getDefaultXMLNamespace(); + uint32_t defns = getVm(getSystemState())->getDefaultXMLNamespaceID(); XML* tmp = this; bool bfound = false; while(tmp) @@ -481,21 +482,21 @@ break; case pugi::node_element: { - tiny_string curprefix = this->nodenamespace_prefix; + uint32_t curprefix = this->nodenamespace_prefix; res += indent; res += "<"; - if (this->nodenamespace_prefix.empty()) + if (this->nodenamespace_prefix == BUILTIN_STRINGS::EMPTY) { - if (defaultnsprefix != "") + if (defaultnsprefix != BUILTIN_STRINGS::EMPTY) { - res += defaultnsprefix; + res += getSystemState()->getStringFromUniqueId(defaultnsprefix); res += ":"; curprefix = defaultnsprefix; } } else { - res += this->nodenamespace_prefix; + res += this->getSystemState()->getStringFromUniqueId(this->nodenamespace_prefix); res += ":"; } res +=this->nodename; @@ -503,24 +504,14 @@ { bool b; _R<Namespace> tmpns = this->namespacedefs[i]; - tiny_string tmpprefix = tmpns->getPrefix(b); - /* - if(tmpprefix == "") - { - seen_prefix.insert(tmpprefix); - res += " xmlns"; - res += "=\""; - res += tmpns->getURI(); - res += "\""; - } - */ - if(tmpprefix == "" || tmpprefix==this->nodenamespace_prefix || seen_prefix.find(tmpprefix)!=seen_prefix.end()) + uint32_t tmpprefix = tmpns->getPrefix(b); + if(tmpprefix == BUILTIN_STRINGS::EMPTY || tmpprefix==this->nodenamespace_prefix || seen_prefix.find(tmpprefix)!=seen_prefix.end()) continue; seen_prefix.insert(tmpprefix); res += " xmlns:"; - res += tmpprefix; + res += getSystemState()->getStringFromUniqueId(tmpprefix); res += "=\""; - res += tmpns->getURI(); + res += getSystemState()->getStringFromUniqueId(tmpns->getURI()); res += "\""; } if (this->parentNode) @@ -534,14 +525,14 @@ { bool b; _R<Namespace> tmpns = tmp->namespacedefs[i]; - tiny_string tmpprefix = tmpns->getPrefix(b); - if(tmpprefix != "" && seen_prefix.find(tmpprefix)==seen_prefix.end()) + uint32_t tmpprefix = tmpns->getPrefix(b); + if(tmpprefix != BUILTIN_STRINGS::EMPTY && seen_prefix.find(tmpprefix)==seen_prefix.end()) { seen_prefix.insert(tmpprefix); res += " xmlns:"; - res += tmpprefix; + res += getSystemState()->getStringFromUniqueId(tmpprefix); res += "=\""; - res += tmpns->getURI(); + res += getSystemState()->getStringFromUniqueId(tmpns->getURI()); res += "\""; } } @@ -551,7 +542,7 @@ break; } } - else if (!curprefix.empty()) + else if (curprefix != BUILTIN_STRINGS::EMPTY) { XML* tmp = this->parentNode.getPtr(); bool bfound = false; @@ -561,7 +552,7 @@ { bool b; _R<Namespace> tmpns = tmp->namespacedefs[i]; - tiny_string tmpprefix = tmpns->getPrefix(b); + uint32_t tmpprefix = tmpns->getPrefix(b); if(tmpprefix == curprefix) { seen_prefix.insert(tmpprefix); @@ -576,27 +567,27 @@ } } } - if (!this->nodenamespace_uri.empty() && - ((this->nodenamespace_prefix.empty() && defaultnsprefix == "") || - (!this->nodenamespace_prefix.empty() && seen_prefix.find(this->nodenamespace_prefix)==seen_prefix.end()))) + if (this->nodenamespace_uri != BUILTIN_STRINGS::EMPTY && + ((this->nodenamespace_prefix==BUILTIN_STRINGS::EMPTY && defaultnsprefix == BUILTIN_STRINGS::EMPTY) || + (this->nodenamespace_prefix!=BUILTIN_STRINGS::EMPTY && seen_prefix.find(this->nodenamespace_prefix)==seen_prefix.end())))
View file
lightspark.tar.xz/src/scripting/toplevel/XML.h
Changed
@@ -39,8 +39,8 @@ bool isAttribute; tiny_string nodename; tiny_string nodevalue; - tiny_string nodenamespace_uri; - tiny_string nodenamespace_prefix; + uint32_t nodenamespace_uri; + uint32_t nodenamespace_prefix; _NR<XMLList> attributelist; _NR<XMLList> procinstlist; NSVector namespacedefs; @@ -53,7 +53,7 @@ bool constructed; bool nodesEqual(XML *a, XML *b) const; XMLVector getAttributes(); - XMLVector getAttributesByMultiname(const multiname& name); + XMLVector getAttributesByMultiname(const multiname& name, const tiny_string &normalizedName) const; XMLVector getValuesByMultiname(_NR<XMLList> nodelist, const multiname& name); XMLList* getAllAttributes(); void getText(XMLVector& ret); @@ -63,9 +63,9 @@ */ void childrenImpl(XMLVector& ret, const tiny_string& name); void childrenImpl(XMLVector& ret, uint32_t index); - tiny_string getNamespacePrefixByURI(const tiny_string& uri, bool create=false); + uint32_t getNamespacePrefixByURI(uint32_t uri, bool create=false); void setLocalName(const tiny_string& localname); - void setNamespace(const tiny_string& ns_uri, const tiny_string& ns_prefix=""); + void setNamespace(uint32_t ns_uri, uint32_t ns_prefix=BUILTIN_STRINGS::EMPTY); // Append node or attribute to this. Concatenates adjacent // text nodes. void appendChild(_R<XML> child); @@ -148,11 +148,11 @@ static XML* createFromNode(const pugi::xml_node& _n, XML* parent=NULL, bool fromXMLList=false); const tiny_string getName() const { return nodename;} - const tiny_string getNamespaceURI() const { return nodenamespace_uri;} + uint32_t getNamespaceURI() const { return nodenamespace_uri;} XMLList* getChildrenlist() { return childrenlist ? childrenlist.getPtr() : NULL; } - void getDescendantsByQName(const tiny_string& name, const tiny_string& ns,bool bIsAttribute, XMLVector& ret); + void getDescendantsByQName(const tiny_string& name, uint32_t ns, bool bIsAttribute, XMLVector& ret) const; void getElementNodes(const tiny_string& name, XMLVector& foundElements); _NR<ASObject> getVariableByMultiname(const multiname& name, GET_VARIABLE_OPTION opt=NONE); bool hasPropertyByMultiname(const multiname& name, bool considerDynamic, bool considerPrototype); @@ -162,7 +162,7 @@ void setTextContent(const tiny_string& content); tiny_string toString(); - const tiny_string toXMLString_internal(bool pretty=true, tiny_string defaultnsprefix = "", const char* indent = "", bool bfirst = true); + const tiny_string toXMLString_internal(bool pretty=true, uint32_t defaultnsprefix = BUILTIN_STRINGS::EMPTY, const char* indent = "", bool bfirst = true); int32_t toInt(); int64_t toInt64(); number_t toNumber();
View file
lightspark.tar.xz/src/scripting/toplevel/XMLList.cpp
Changed
@@ -80,6 +80,24 @@ } } +XMLList* XMLList::create(SystemState* sys,const XML::XMLVector& r, XMLList *targetobject, const multiname &targetproperty) +{ + XMLList* res = Class<XMLList>::getInstanceSNoArgs(sys); + res->constructed = true; + res->nodes.assign(r.begin(),r.end()); + res->targetobject = targetobject; + if (res->targetobject) + res->targetobject->incRef(); + res->targetproperty.name_type = targetproperty.name_type; + res->targetproperty.isAttribute = targetproperty.isAttribute; + res->targetproperty.name_s_id = targetproperty.name_s_id; + for (auto it = targetproperty.ns.begin();it != targetproperty.ns.end(); it++) + { + res->targetproperty.ns.push_back(*it); + } + return res; +} + bool XMLList::destruct() { if (targetobject) @@ -354,8 +372,8 @@ XML::XMLVector ret; multiname mname(NULL); name->applyProxyProperty(mname); - th->getDescendantsByQName(name->toString(),"",mname.isAttribute,ret); - return Class<XMLList>::getInstanceS(obj->getSystemState(),ret,th->targetobject,multiname(NULL)); + th->getDescendantsByQName(name->toString(),BUILTIN_STRINGS::EMPTY,mname.isAttribute,ret); + return create(obj->getSystemState(),ret,th->targetobject,multiname(NULL)); } ASFUNCTIONBODY(XMLList,elements) @@ -370,7 +388,7 @@ { (*it)->getElementNodes(name, elems); } - return Class<XMLList>::getInstanceS(obj->getSystemState(),elems,th->targetobject,multiname(NULL)); + return create(obj->getSystemState(),elems,th->targetobject,multiname(NULL)); } ASFUNCTIONBODY(XMLList,parent) @@ -425,8 +443,7 @@ (*it)->childrenImpl(ret, arg0); } } - XMLList* retObj=Class<XMLList>::getInstanceS(obj->getSystemState(),ret,th->targetobject,multiname(NULL)); - return retObj; + return create(obj->getSystemState(),ret,th->targetobject,multiname(NULL)); } ASFUNCTIONBODY(XMLList,children) @@ -439,8 +456,7 @@ { (*it)->childrenImpl(ret, "*"); } - XMLList* retObj=Class<XMLList>::getInstanceS(obj->getSystemState(),ret,th->targetobject,multiname(NULL)); - return retObj; + return create(obj->getSystemState(),ret,th->targetobject,multiname(NULL)); } ASFUNCTIONBODY(XMLList,text) @@ -453,7 +469,7 @@ { (*it)->getText(ret); } - return Class<XMLList>::getInstanceS(obj->getSystemState(),ret,th->targetobject,multiname(NULL)); + return create(obj->getSystemState(),ret,th->targetobject,multiname(NULL)); } ASFUNCTIONBODY(XMLList,contains) @@ -499,7 +515,7 @@ multiname mname(NULL); mname.name_type=multiname::NAME_STRING; mname.name_s_id=obj->getSystemState()->getUniqueStringId(attrname); - mname.ns.emplace_back(obj->getSystemState(),"",NAMESPACE); + mname.ns.emplace_back(obj->getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); mname.isAttribute = true; _NR<ASObject> attr=th->getVariableByMultiname(mname, NONE); @@ -638,23 +654,22 @@ tiny_string normalizedName=name.normalizedName(getSystemState()); //Only the first namespace is used, is this right? - tiny_string namespace_uri; + uint32_t namespace_uri = BUILTIN_STRINGS::EMPTY; if(name.ns.size() > 0 && !name.ns[0].hasEmptyName()) { - nsNameAndKindImpl ns=name.ns[0].getImpl(getSystemState()); - if (ns.kind==NAMESPACE) - namespace_uri=getSystemState()->getStringFromUniqueId(ns.nameId); + if (name.ns[0].kind==NAMESPACE) + namespace_uri=name.ns[0].nsNameId; } // namespace set by "default xml namespace = ..." - if(namespace_uri.empty()) - namespace_uri=getVm(getSystemState())->getDefaultXMLNamespace(); + if(namespace_uri==BUILTIN_STRINGS::EMPTY) + namespace_uri=getVm(getSystemState())->getDefaultXMLNamespaceID(); for (uint32_t i = 0; i < nodes.size(); i++) { _R<XML> child= nodes[i]; bool nameMatches = (normalizedName=="" || normalizedName==child->nodename || normalizedName=="*"); - bool nsMatches = (namespace_uri=="" || + bool nsMatches = (namespace_uri==BUILTIN_STRINGS::EMPTY || (child->nodenamespace_uri == namespace_uri)); if(nameMatches && nsMatches) @@ -701,8 +716,7 @@ if(retnodes.size()==0 && (opt & XML_STRICT)!=0) return NullRef; - this->incRef(); - return _MNR(Class<XMLList>::getInstanceS(getSystemState(),retnodes,this,name)); + return _MNR(create(getSystemState(),retnodes,this,name)); } unsigned int index=0; if(XML::isValidMultiname(getSystemState(),name,index)) @@ -729,7 +743,7 @@ return NullRef; this->incRef(); - return _MNR(Class<XMLList>::getInstanceS(getSystemState(),retnodes,this,name)); + return _MNR(create(getSystemState(),retnodes,this,name)); } } @@ -874,7 +888,7 @@ return bdeleted; } -void XMLList::getDescendantsByQName(const tiny_string& name, const tiny_string& ns, bool bIsAttribute, XML::XMLVector& ret) +void XMLList::getDescendantsByQName(const tiny_string& name, uint32_t ns, bool bIsAttribute, XML::XMLVector& ret) { auto it=nodes.begin(); for(; it!=nodes.end(); ++it) @@ -987,7 +1001,7 @@ multiname m(NULL); m.name_type = multiname::NAME_INT; m.name_i = i; - m.ns.emplace_back(getSystemState(),"",NAMESPACE); + m.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); targetobject->setVariableByMultiname(m,o,allowConst); break; } @@ -1013,7 +1027,7 @@ multiname m(NULL); m.name_type = multiname::NAME_INT; m.name_i = idx; - m.ns.emplace_back(getSystemState(),"",NAMESPACE); + m.ns.emplace_back(getSystemState(),BUILTIN_STRINGS::EMPTY,NAMESPACE); targetobject->setVariableByMultiname(m,o,allowConst); } if (o->as<XML>()->getNodeKind() == pugi::node_pcdata) @@ -1024,8 +1038,8 @@ tmp->parentNode = nodes[idx]; tmp->nodetype = pugi::node_pcdata; tmp->nodename = "text"; - tmp->nodenamespace_uri = ""; - tmp->nodenamespace_prefix = ""; + tmp->nodenamespace_uri = BUILTIN_STRINGS::EMPTY; + tmp->nodenamespace_prefix = BUILTIN_STRINGS::EMPTY; tmp->nodevalue = o->toString(); tmp->constructed = true; nodes[idx]->childrenlist->append(tmp); @@ -1048,8 +1062,8 @@ tmp->parentNode = nodes[idx]; tmp->nodetype = pugi::node_pcdata; tmp->nodename = "text"; - tmp->nodenamespace_uri = ""; - tmp->nodenamespace_prefix = ""; + tmp->nodenamespace_uri = BUILTIN_STRINGS::EMPTY; + tmp->nodenamespace_prefix = BUILTIN_STRINGS::EMPTY; tmp->nodevalue = o->toString(); tmp->constructed = true; nodes[idx]->childrenlist->append(tmp);
View file
lightspark.tar.xz/src/scripting/toplevel/XMLList.h
Changed
@@ -54,6 +54,7 @@ static void buildTraits(ASObject* o){} static void sinit(Class_base* c); + static XMLList* create(SystemState *sys, const XML::XMLVector& r, XMLList *targetobject, const multiname &targetproperty); ASFUNCTION(_constructor); ASFUNCTION(_getLength); ASFUNCTION(attribute); @@ -97,7 +98,7 @@ void setVariableByMultiname(const multiname& name, ASObject* o, CONST_ALLOWED_FLAG allowConst); bool hasPropertyByMultiname(const multiname& name, bool considerDynamic, bool considerPrototype); bool deleteVariableByMultiname(const multiname& name); - void getDescendantsByQName(const tiny_string& name, const tiny_string& ns, bool bIsAttribute, XML::XMLVector& ret); + void getDescendantsByQName(const tiny_string& name, uint32_t ns, bool bIsAttribute, XML::XMLVector& ret); _NR<XML> convertToXML() const; bool hasSimpleContent() const; bool hasComplexContent() const;
View file
lightspark.tar.xz/src/scripting/toplevel/toplevel.cpp
Changed
@@ -356,7 +356,7 @@ { //The arguments does not contain default values of optional parameters, //i.e. f(a,b=3) called as f(7) gives arguments = { 7 } - argumentsArray=Class<Array>::getInstanceS(obj->getSystemState()); + argumentsArray=Class<Array>::getInstanceSNoArgs(obj->getSystemState()); argumentsArray->resize(numArgs); for(uint32_t j=0;j<numArgs;j++) { @@ -441,7 +441,7 @@ else if(mi->needsRest()|| passedToRest > 0) // it seems that Adobe allows additional parameters without setting "needsRest" { assert_and_throw(argumentsArray==NULL); - Array* rest=Class<Array>::getInstanceS(getSystemState()); + Array* rest=Class<Array>::getInstanceSNoArgs(getSystemState()); rest->resize(passedToRest); //Give the reference of the other args to an array for(uint32_t j=0;j<passedToRest;j++) @@ -770,9 +770,9 @@ if(!typeObject) { - if (mn->ns.size() >= 1 && mn->ns[0].getImpl(context->root->getSystemState()).nameId == BUILTIN_STRINGS::STRING_AS3VECTOR) + if (mn->ns.size() >= 1 && mn->ns[0].nsNameId == BUILTIN_STRINGS::STRING_AS3VECTOR) { - QName qname(mn->name_s_id,mn->ns[0].getImpl(context->root->getSystemState()).nameId); + QName qname(mn->name_s_id,mn->ns[0].nsNameId); typeObject = Template<Vector>::getTemplateInstance(context->root->getSystemState(),qname,context,context->root->applicationDomain).getPtr(); } } @@ -1280,7 +1280,7 @@ int kind=t.kind&0xf; multiname* mname=context->getMultiname(t.name,NULL); if (mname->name_type!=multiname::NAME_STRING || - (mname->ns.size()==1 && (!mname->ns[0].hasEmptyName() || mname->ns[0].getImpl(getSystemState()).kind == PRIVATE_NAMESPACE)) || + (mname->ns.size()==1 && (!mname->ns[0].hasEmptyName() || mname->ns[0].kind == PRIVATE_NAMESPACE)) || mname->ns.size() > 1) continue; @@ -1450,7 +1450,7 @@ { uri_is_null=false; local_name = getSystemState()->getUniqueStringId(node->getName()); - uri=getSystemState()->getUniqueStringId(node->getNamespaceURI()); + uri=node->getNamespaceURI(); } void ASQName::sinit(Class_base* c) @@ -1502,7 +1502,7 @@ else if(nameval->getObjectType()==T_UNDEFINED) th->local_name=BUILTIN_STRINGS::EMPTY; else - th->local_name=obj->getSystemState()->getUniqueStringId(nameval->toString()); + th->local_name=nameval->toStringId(); // Set uri th->uri_is_null=false; @@ -1532,7 +1532,7 @@ th->uri=q->uri; } else - th->uri=obj->getSystemState()->getUniqueStringId(namespaceval->toString()); + th->uri=namespaceval->toStringId(); } return NULL; @@ -1578,7 +1578,7 @@ else if(nameval->getObjectType()==T_UNDEFINED) th->local_name=BUILTIN_STRINGS::EMPTY; else - th->local_name=th->getSystemState()->getUniqueStringId(nameval->toString()); + th->local_name=nameval->toStringId(); // Set uri th->uri_is_null=false; @@ -1608,7 +1608,7 @@ th->uri=q->uri; } else - th->uri=th->getSystemState()->getUniqueStringId(namespaceval->toString()); + th->uri=namespaceval->toStringId(); } return th; } @@ -1710,7 +1710,7 @@ { } -Namespace::Namespace(Class_base* c, const tiny_string& _uri, const tiny_string& _prefix) +Namespace::Namespace(Class_base* c, uint32_t _uri, uint32_t _prefix) : ASObject(c,T_NAMESPACE),nskind(NAMESPACE),prefix_is_undefined(false),uri(_uri),prefix(_prefix) { } @@ -1754,8 +1754,9 @@ urival = args[1]; } th->prefix_is_undefined=false; - th->prefix = ""; - th->uri = ""; + th->prefix = BUILTIN_STRINGS::EMPTY; + th->uri = BUILTIN_STRINGS::EMPTY; +; if(!prefixval) { @@ -1770,15 +1771,15 @@ !(static_cast<ASQName*>(urival)->uri_is_null)) { ASQName* q=static_cast<ASQName*>(urival); - th->uri=q->getSystemState()->getStringFromUniqueId(q->uri); + th->uri=q->uri; } else { - th->uri=urival->toString(); - if(th->uri!="") + th->uri=urival->toStringId(); + if(th->uri!=BUILTIN_STRINGS::EMPTY) { th->prefix_is_undefined=true; - th->prefix=""; + th->prefix=BUILTIN_STRINGS::EMPTY; } } } @@ -1788,18 +1789,18 @@ !(static_cast<ASQName*>(urival)->uri_is_null)) { ASQName* q=static_cast<ASQName*>(urival); - th->uri=q->getSystemState()->getStringFromUniqueId(q->uri); + th->uri=q->uri; } else { - th->uri=urival->toString(); + th->uri=urival->toStringId(); } - if(th->uri=="") + if(th->uri==BUILTIN_STRINGS::EMPTY) { if(prefixval->getObjectType()==T_UNDEFINED || prefixval->toString()=="") - th->prefix=""; + th->prefix=BUILTIN_STRINGS::EMPTY; else throw Class<TypeError>::getInstanceS(obj->getSystemState(),"Namespace prefix for empty uri not allowed"); } @@ -1807,11 +1808,11 @@ !isXMLName(prefixval)) { th->prefix_is_undefined=true; - th->prefix=""; + th->prefix=BUILTIN_STRINGS::EMPTY; } else { - th->prefix=prefixval->toString(); + th->prefix=prefixval->toStringId(); } } @@ -1827,8 +1828,8 @@ if (argslen == 0) { th->prefix_is_undefined=false; - th->prefix = ""; - th->uri = ""; + th->prefix = BUILTIN_STRINGS::EMPTY; + th->uri = BUILTIN_STRINGS::EMPTY; return th; } else if (argslen == 1) @@ -1842,8 +1843,8 @@ urival = args[1]; } th->prefix_is_undefined=false; - th->prefix = ""; - th->uri = ""; + th->prefix = BUILTIN_STRINGS::EMPTY; + th->uri = BUILTIN_STRINGS::EMPTY; if(!prefixval) { @@ -1858,15 +1859,15 @@ !(static_cast<ASQName*>(urival)->uri_is_null)) { ASQName* q=static_cast<ASQName*>(urival); - th->uri=th->getSystemState()->getStringFromUniqueId(q->uri); + th->uri=q->uri; } else { - th->uri=urival->toString(); - if(th->uri!="") + th->uri=urival->toStringId(); + if(th->uri!=BUILTIN_STRINGS::EMPTY) { th->prefix_is_undefined=true; - th->prefix="";
View file
lightspark.tar.xz/src/scripting/toplevel/toplevel.h
Changed
@@ -712,11 +712,11 @@ private: NS_KIND nskind; bool prefix_is_undefined; - tiny_string uri; - tiny_string prefix; + uint32_t uri; + uint32_t prefix; public: Namespace(Class_base* c); - Namespace(Class_base* c, const tiny_string& _uri, const tiny_string& _prefix=""); + Namespace(Class_base* c, uint32_t _uri, uint32_t _prefix=BUILTIN_STRINGS::EMPTY); static void sinit(Class_base*); static void buildTraits(ASObject* o); ASFUNCTION(_constructor); @@ -730,8 +730,8 @@ ASFUNCTION(_valueOf); ASFUNCTION(_ECMA_valueOf); bool isEqual(ASObject* o); - tiny_string getURI() { return uri; } - tiny_string getPrefix(bool& is_undefined) { is_undefined=prefix_is_undefined; return prefix; } + uint32_t getURI() const { return uri; } + uint32_t getPrefix(bool& is_undefined) { is_undefined=prefix_is_undefined; return prefix; } uint32_t nextNameIndex(uint32_t cur_index); _R<ASObject> nextName(uint32_t index);
View file
lightspark.tar.xz/src/swf.cpp
Changed
@@ -175,7 +175,7 @@ } //See BUILTIN_STRINGS enum -static const char* builtinStrings[] = {"", "any", "void", "prototype", "Function", "__AS3__.vec","Class","*", "http://adobe.com/AS3/2006/builtin" }; +static const char* builtinStrings[] = {"", "any", "void", "prototype", "Function", "__AS3__.vec","Class","*", "http://adobe.com/AS3/2006/builtin","http://www.w3.org/XML/1998/namespace","xml","toString","valueOf" }; extern uint32_t asClassCount; @@ -200,11 +200,11 @@ nsNameAndKindImpl emptyNs(BUILTIN_STRINGS::EMPTY, NAMESPACE); uint32_t nsId; uint32_t baseId; - getUniqueNamespaceId(emptyNs, 0, nsId, baseId); + getUniqueNamespaceId(emptyNs, BUILTIN_NAMESPACES::EMPTY_NS, nsId, baseId); assert(nsId==0 && baseId==0); //Forge the AS3 namespace and make sure it gets id 1 nsNameAndKindImpl as3Ns(BUILTIN_STRINGS::STRING_AS3NS, NAMESPACE); - getUniqueNamespaceId(as3Ns, 1, nsId, baseId); + getUniqueNamespaceId(as3Ns, BUILTIN_NAMESPACES::AS3_NS, nsId, baseId); assert(nsId==1 && baseId==1); cookiesFileName = NULL; @@ -1727,6 +1727,7 @@ void SystemState::tick() { + if (showProfilingData) { SpinlockLocker l(profileDataSpinlock); list<ThreadProfile*>::iterator it=profilingData.begin();
View file
lightspark.tar.xz/src/swftypes.cpp
Changed
@@ -41,7 +41,7 @@ { assert_and_throw(ns.size()>=1); assert_and_throw(name_type==NAME_STRING); - const tiny_string nsName=sys->getStringFromUniqueId(ns[0].getImpl(sys).nameId); + const tiny_string nsName=sys->getStringFromUniqueId(ns[0].nsNameId); const tiny_string& name=sys->getStringFromUniqueId(name_s_id); if(nsName.empty()) return name; @@ -82,7 +82,10 @@ case multiname::NAME_INT: case multiname::NAME_NUMBER: case multiname::NAME_OBJECT: - return sys->getUniqueStringId(normalizedName(sys)); + if (name_s_id != UINT32_MAX) + return name_s_id; + else + return sys->getUniqueStringId(normalizedName(sys)); default: assert("Unexpected name kind" && false); //Should never reach this @@ -121,10 +124,12 @@ case T_INTEGER: name_i=n->as<Integer>()->val; name_type = NAME_INT; + name_s_id = UINT32_MAX; break; case T_UINTEGER: name_i=n->as<UInteger>()->val; name_type = NAME_INT; + name_s_id = UINT32_MAX; break; case T_NUMBER: if (n->as<Number>()->isfloat) @@ -146,6 +151,7 @@ name_type = NAME_INT; } } + name_s_id = UINT32_MAX; break; case T_QNAME: { @@ -157,7 +163,7 @@ case T_STRING: { ASString* o=static_cast<ASString*>(n); - name_s_id=o->hasId ? o->stringId : n->getSystemState()->getUniqueStringId(o->getData()); + name_s_id=o->hasId ? o->toStringId() : n->getSystemState()->getUniqueStringId(o->getData()); name_type = NAME_STRING; } break; @@ -165,6 +171,7 @@ n->incRef(); name_o=n; name_type = NAME_OBJECT; + name_s_id = UINT32_MAX; break; } } @@ -261,7 +268,7 @@ std::ostream& lightspark::operator<<(std::ostream& s, const nsNameAndKind& r) { const char* prefix; - switch(r.getImpl(getSys()).kind) + switch(r.kind) { case NAMESPACE: prefix="ns:"; @@ -290,7 +297,7 @@ prefix=""; break; } - s << prefix << getSys()->getStringFromUniqueId(r.getImpl(getSys()).nameId); + s << prefix << getSys()->getStringFromUniqueId(r.nsNameId); return s; } @@ -1359,12 +1366,17 @@ } ASString* lightspark::abstract_s(SystemState *sys) { - return Class<ASString>::getInstanceSNoArgs(sys); + ASString* ret= Class<ASString>::getInstanceSNoArgs(sys); + ret->stringId = BUILTIN_STRINGS::EMPTY; + ret->hasId = true; + ret->datafilled=true; + return ret; } ASString* lightspark::abstract_s(SystemState *sys, const char* s, uint32_t len) { ASString* ret= Class<ASString>::getInstanceSNoArgs(sys); ret->data = std::string(s,len); + ret->stringId = UINT32_MAX; ret->hasId = false; ret->datafilled=true; return ret; @@ -1373,6 +1385,7 @@ { ASString* ret= Class<ASString>::getInstanceSNoArgs(sys); ret->data = s; + ret->stringId = UINT32_MAX; ret->hasId = false; ret->datafilled=true; return ret; @@ -1381,6 +1394,7 @@ { ASString* ret= Class<ASString>::getInstanceSNoArgs(sys); ret->data = s; + ret->stringId = UINT32_MAX; ret->hasId = false; ret->datafilled=true; return ret; @@ -1508,20 +1522,26 @@ nsNameAndKind::nsNameAndKind(SystemState* sys,const tiny_string& _name, NS_KIND _kind) { - nsNameAndKindImpl tmp(sys->getUniqueStringId(_name), _kind); + nsNameId = sys->getUniqueStringId(_name); + nsNameAndKindImpl tmp(nsNameId, _kind); sys->getUniqueNamespaceId(tmp, nsRealId, nsId); + kind = _kind; } nsNameAndKind::nsNameAndKind(SystemState* sys,const char* _name, NS_KIND _kind) { - nsNameAndKindImpl tmp(sys->getUniqueStringId(_name), _kind); + nsNameId = sys->getUniqueStringId(_name); + nsNameAndKindImpl tmp(nsNameId, _kind); sys->getUniqueNamespaceId(tmp, nsRealId, nsId); + kind = _kind; } nsNameAndKind::nsNameAndKind(SystemState* sys,uint32_t _nameId, NS_KIND _kind) { nsNameAndKindImpl tmp(_nameId, _kind); sys->getUniqueNamespaceId(tmp, nsRealId, nsId); + nsNameId = _nameId; + kind = _kind; } nsNameAndKind::nsNameAndKind(SystemState* sys, uint32_t _nameId, uint32_t _baseId, NS_KIND _kind) { @@ -1531,18 +1551,21 @@ uint32_t tmpId; sys->getUniqueNamespaceId(tmp, nsRealId, tmpId); assert(tmpId==_baseId); + nsNameId = _nameId; + kind = _kind; } nsNameAndKind::nsNameAndKind(ABCContext* c, uint32_t nsContextIndex) { const namespace_info& ns=c->constant_pool.namespaces[nsContextIndex]; - uint32_t nsNameId=c->getString(ns.name); + nsNameId=c->getString(ns.name); nsNameAndKindImpl tmp(nsNameId, (NS_KIND)(int)ns.kind); //Give an id hint, in case the namespace is created in the map c->root->getSystemState()->getUniqueNamespaceId(tmp, c->namespaceBaseId+nsContextIndex, nsRealId, nsId); //Special handling for private namespaces, they are always compared by id if(ns.kind==PRIVATE_NAMESPACE) nsId=c->namespaceBaseId+nsContextIndex; + kind = (NS_KIND)(int)ns.kind; } const nsNameAndKindImpl& nsNameAndKind::getImpl(SystemState* sys) const
View file
lightspark.tar.xz/src/swftypes.h
Changed
@@ -40,8 +40,8 @@ namespace lightspark { -enum BUILTIN_STRINGS { EMPTY=0, ANY, VOID, PROTOTYPE, STRING_FUNCTION,STRING_AS3VECTOR,STRING_CLASS,STRING_WILDCARD,STRING_AS3NS,LAST_BUILTIN_STRING }; -enum BUILTIN_NAMESPACES { EMPTY_NS=0 }; +enum BUILTIN_STRINGS { EMPTY=0, ANY, VOID, PROTOTYPE, STRING_FUNCTION,STRING_AS3VECTOR,STRING_CLASS,STRING_WILDCARD,STRING_AS3NS,STRING_NAMESPACENS,STRING_XML,STRING_TOSTRING,STRING_VALUEOF,LAST_BUILTIN_STRING }; +enum BUILTIN_NAMESPACES { EMPTY_NS=0, AS3_NS }; enum SWFOBJECT_TYPE { T_OBJECT=0, T_INTEGER=1, T_NUMBER=2, T_FUNCTION=3, T_UNDEFINED=4, T_NULL=5, T_STRING=6, @@ -318,7 +318,9 @@ { uint32_t nsId; uint32_t nsRealId; - nsNameAndKind():nsId(0),nsRealId(0) {} + uint32_t nsNameId; + NS_KIND kind; + nsNameAndKind():nsId(0),nsRealId(0),nsNameId(BUILTIN_STRINGS::EMPTY),kind(NAMESPACE) {} nsNameAndKind(SystemState *sys, const tiny_string& _name, NS_KIND _kind); nsNameAndKind(SystemState* sys,const char* _name, NS_KIND _kind); nsNameAndKind(SystemState* sys,uint32_t _nameId, NS_KIND _kind); @@ -356,9 +358,9 @@ struct multiname: public memory_reporter { + uint32_t name_s_id; union { - uint32_t name_s_id; int32_t name_i; number_t name_d; ASObject* name_o; @@ -367,7 +369,7 @@ enum NAME_TYPE {NAME_STRING,NAME_INT,NAME_NUMBER,NAME_OBJECT}; NAME_TYPE name_type; bool isAttribute; - multiname(MemoryAccount* m):name_o(NULL),ns(reporter_allocator<nsNameAndKind>(m)),name_type(NAME_OBJECT),isAttribute(false) + multiname(MemoryAccount* m):name_s_id(UINT32_MAX),name_o(NULL),ns(reporter_allocator<nsNameAndKind>(m)),name_type(NAME_OBJECT),isAttribute(false) { }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.