Projects
Essentials
lightspark
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 111
View file
lightspark.spec
Changed
@@ -20,7 +20,7 @@ %bcond_without librtmp Name: lightspark -Version: 0.7.2.99+git20160612.1717 +Version: 0.7.2.99+git20160710.1738 Release: 0 Summary: Modern, free, open-source flash player implementation License: LGPL-3.0+
View file
lightspark.tar.xz/CMakeLists.txt
Changed
@@ -458,7 +458,7 @@ IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") IF(MINGW) SET(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -mms-bitfields -mthreads -fexceptions -Wall -Wnon-virtual-dtor -Woverloaded-virtual -pipe -std=c++0x -Wdisabled-optimization -Wextra -Wno-unused-parameter -Wno-invalid-offsetof") + "${CMAKE_CXX_FLAGS} -mms-bitfields -mthreads -fexceptions -Wall -Wnon-virtual-dtor -Woverloaded-virtual -pipe -std=c++11 -Wdisabled-optimization -Wextra -Wno-unused-parameter -Wno-invalid-offsetof") ELSE() SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wnon-virtual-dtor -Woverloaded-virtual -pipe -fvisibility=hidden -fvisibility-inlines-hidden -std=c++11 -Wdisabled-optimization -Wextra -Wno-unused-parameter -Wno-invalid-offsetof")
View file
lightspark.tar.xz/README.win32
Changed
@@ -11,7 +11,7 @@ 1. git clone -b master https://github.com/mxe/mxe.git 2. cd mxe 3. Apply the patch from below to src/curl.mk - 4. make gcc llvm glibmm gtk2 ffmpeg cairo pango boost libxml++ glew freetype curl librtmp + 4. make gcc llvm glibmm gtk2 ffmpeg cairo pango boost glew freetype curl librtmp Note: You may want to add e.g. '-j4' to build four packages in parallel, or e.g. JOBS=3 to use three cpus per package. Note: This may ask you to install additional packages. Do so using the package manager of your distribution. For Ubuntu (oneiric), use 'apt-get install libtool yasm scons flex unzip wget')
View file
lightspark.tar.xz/conf/FindLLVM.cmake
Changed
@@ -14,7 +14,7 @@ # LLVM_LIBS_JIT_OBJECTS : objects you need to add to your source when using LLVM JIT if(WIN32) - find_path(LLVM_INCLUDE_DIR NAMES llvm/LLVMContext.h) + find_path(LLVM_INCLUDE_DIR NAMES llvm/Linker.h) message(STATUS "Found LLVM include directory: ${LLVM_INCLUDE_DIR}") find_library(LLVM_SOMELIB NAMES LLVMCore) GET_FILENAME_COMPONENT(LLVM_LIB_DIR ${LLVM_SOMELIB} PATH CACHE) @@ -23,8 +23,9 @@ #Starting from 3.0, that file exists find_path(LLVM_3_0 NAMES llvm/Support/TargetSelect.h) if(LLVM_3_0) - set(LLVM_STRING_VERSION "3.0") - set(LLVM_LIBS_CORE LLVMLinker LLVMArchive LLVMBitWriter LLVMBitReader LLVMInstrumentation LLVMipo LLVMInstCombine) + # mxe currently uses llvm 3.4 + set(LLVM_STRING_VERSION "3.4") + set(LLVM_LIBS_CORE LLVMLinker LLVMBitWriter LLVMBitReader LLVMInstrumentation LLVMipo LLVMInstCombine LLVMVectorize LLVMObject LLVMIRReader) set(LLVM_LIBS_JIT LLVMX86AsmParser LLVMX86AsmPrinter LLVMX86CodeGen LLVMX86Desc LLVMSelectionDAG LLVMAsmPrinter LLVMX86Utils LLVMX86Info LLVMJIT LLVMExecutionEngine LLVMCodeGen LLVMScalarOpts LLVMTransformUtils LLVMipa LLVMAnalysis LLVMTarget LLVMMC LLVMCore LLVMSupport) else() set(LLVM_STRING_VERSION "2.8") @@ -155,7 +156,40 @@ #MESSAGE(STATUS "LLVM lib dir: " ${LLVM_LIB_DIR}) exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --includedir OUTPUT_VARIABLE LLVM_INCLUDE_DIR ) #MESSAGE(STATUS "LLVM include dir: " ${LLVM_INCLUDE_DIR}) - + exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE LLVM_COMPILE_FLAGS ) + MESSAGE(STATUS "LLVM CXX flags: " ${LLVM_COMPILE_FLAGS}) + exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --ldflags OUTPUT_VARIABLE LLVM_LDFLAGS ) + MESSAGE(STATUS "LLVM LD flags: " ${LLVM_LDFLAGS}) + exec_program( ${LLVM_CONFIG_EXECUTABLE} ARGS --system-libs OUTPUT_VARIABLE LLVM_SYSTEM_LIBS RETURN_VALUE LLVM_SYSTEM_LIBS_FAILED) + if(LLVM_SYSTEM_LIBS_FAILED) + SET(LLVM_SYSTEM_LIBS "") + endif(LLVM_SYSTEM_LIBS_FAILED) + IF(${LLVM_STRING_VERSION} VERSION_GREATER 3.7) + FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "core ipo instrumentation bitreader bitwriter linker" LLVM_LIBS_CORE_ONLY LLVM_LIBS_CORE_OBJECTS ) + ELSE(${LLVM_STRING_VERSION} VERSION_GREATER 3.7) + FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "core ipa ipo instrumentation bitreader bitwriter linker" LLVM_LIBS_CORE_ONLY LLVM_LIBS_CORE_OBJECTS ) + ENDIF(${LLVM_STRING_VERSION} VERSION_GREATER 3.7) + SET(LLVM_LIBS_CORE ${LLVM_LIBS_CORE_ONLY} ${LLVM_SYSTEM_LIBS}) + UNSET(LLVM_LIBS_CORE_ONLY) + UNSET(LLVM_SYSTEM_LIBS_FAILED) + MESSAGE(STATUS "LLVM core libs: " ${LLVM_LIBS_CORE}) + IF(${LLVM_STRING_VERSION} VERSION_GREATER 3.5) + IF(APPLE AND UNIVERSAL) + FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "engine native x86 PowerPC ARM" LLVM_LIBS_JIT LLVM_LIBS_JIT_OBJECTS ) + ELSE(APPLE AND UNIVERSAL) + FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "engine native" LLVM_LIBS_JIT LLVM_LIBS_JIT_OBJECTS ) + ENDIF(APPLE AND UNIVERSAL) + ELSE(${LLVM_STRING_VERSION} VERSION_GREATER 3.5) + IF(APPLE AND UNIVERSAL) + FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "jit native x86 PowerPC ARM" LLVM_LIBS_JIT LLVM_LIBS_JIT_OBJECTS ) + ELSE(APPLE AND UNIVERSAL) + FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "jit native" LLVM_LIBS_JIT LLVM_LIBS_JIT_OBJECTS ) + ENDIF(APPLE AND UNIVERSAL) + ENDIF(${LLVM_STRING_VERSION} VERSION_GREATER 3.5) + MESSAGE(STATUS "LLVM JIT libs: " ${LLVM_LIBS_JIT}) + MESSAGE(STATUS "LLVM JIT objs: " ${LLVM_LIBS_JIT_OBJECTS}) +endif (LLVM_INCLUDE_DIR) + INCLUDE(CheckIncludeFileCXX) set(CMAKE_REQUIRED_INCLUDES ${LLVM_INCLUDE_DIR}) check_include_file_cxx("llvm/Support/TargetSelect.h" HAVE_SUPPORT_TARGETSELECT_H) @@ -197,38 +231,6 @@ ADD_DEFINITIONS(-DHAVE_PASSMANAGER_H) ENDIF(HAVE_PASSMANAGER_H) - exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE LLVM_COMPILE_FLAGS ) - MESSAGE(STATUS "LLVM CXX flags: " ${LLVM_COMPILE_FLAGS}) - exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --ldflags OUTPUT_VARIABLE LLVM_LDFLAGS ) - MESSAGE(STATUS "LLVM LD flags: " ${LLVM_LDFLAGS}) - exec_program( ${LLVM_CONFIG_EXECUTABLE} ARGS --system-libs OUTPUT_VARIABLE LLVM_SYSTEM_LIBS RETURN_VALUE LLVM_SYSTEM_LIBS_FAILED) - if(LLVM_SYSTEM_LIBS_FAILED) - SET(LLVM_SYSTEM_LIBS "") - endif(LLVM_SYSTEM_LIBS_FAILED) - IF(${LLVM_STRING_VERSION} VERSION_GREATER 3.7) - FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "core ipo instrumentation bitreader bitwriter linker" LLVM_LIBS_CORE_ONLY LLVM_LIBS_CORE_OBJECTS ) - ELSE(${LLVM_STRING_VERSION} VERSION_GREATER 3.7) - FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "core ipa ipo instrumentation bitreader bitwriter linker" LLVM_LIBS_CORE_ONLY LLVM_LIBS_CORE_OBJECTS ) - ENDIF(${LLVM_STRING_VERSION} VERSION_GREATER 3.7) - SET(LLVM_LIBS_CORE ${LLVM_LIBS_CORE_ONLY} ${LLVM_SYSTEM_LIBS}) - UNSET(LLVM_LIBS_CORE_ONLY) - UNSET(LLVM_SYSTEM_LIBS_FAILED) - MESSAGE(STATUS "LLVM core libs: " ${LLVM_LIBS_CORE}) - IF(${LLVM_STRING_VERSION} VERSION_GREATER 3.5) - IF(APPLE AND UNIVERSAL) - FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "engine native x86 PowerPC ARM" LLVM_LIBS_JIT LLVM_LIBS_JIT_OBJECTS ) - ELSE(APPLE AND UNIVERSAL) - FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "engine native" LLVM_LIBS_JIT LLVM_LIBS_JIT_OBJECTS ) - ENDIF(APPLE AND UNIVERSAL) - ELSE(${LLVM_STRING_VERSION} VERSION_GREATER 3.5) - IF(APPLE AND UNIVERSAL) - FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "jit native x86 PowerPC ARM" LLVM_LIBS_JIT LLVM_LIBS_JIT_OBJECTS ) - ELSE(APPLE AND UNIVERSAL) - FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "jit native" LLVM_LIBS_JIT LLVM_LIBS_JIT_OBJECTS ) - ENDIF(APPLE AND UNIVERSAL) - ENDIF(${LLVM_STRING_VERSION} VERSION_GREATER 3.5) - MESSAGE(STATUS "LLVM JIT libs: " ${LLVM_LIBS_JIT}) - MESSAGE(STATUS "LLVM JIT objs: " ${LLVM_LIBS_JIT_OBJECTS}) if(LLVM_INCLUDE_DIR) set(LLVM_FOUND TRUE) @@ -242,6 +244,5 @@ endif(LLVM_FIND_REQUIRED) endif(LLVM_FOUND) -endif (LLVM_INCLUDE_DIR)
View file
lightspark.tar.xz/src/asobject.cpp
Changed
@@ -467,7 +467,7 @@ if(considerDynamic) validTraits|=DYNAMIC_TRAIT; - if(Variables.findObjVar(getSystemState(),name, validTraits)!=NULL) + if(varcount && Variables.findObjVar(getSystemState(),name, validTraits)!=NULL) return true; if(classdef && classdef->borrowedVariables.findObjVar(getSystemState(),name, DECLARED_TRAIT)!=NULL) @@ -528,7 +528,10 @@ o->setConstant(); } else + { obj=Variables.findObjVar(nameId,ns,DECLARED_TRAIT, DECLARED_TRAIT); + ++varcount; + } switch(type) { case NORMAL_METHOD: @@ -556,7 +559,7 @@ bool ASObject::deleteVariableByMultiname(const multiname& name) { - variable* obj=Variables.findObjVar(getSystemState(),name,NO_CREATE_TRAIT,DYNAMIC_TRAIT|DECLARED_TRAIT); + variable* obj=varcount ? Variables.findObjVar(getSystemState(),name,NO_CREATE_TRAIT,DYNAMIC_TRAIT|DECLARED_TRAIT) : NULL; if(obj==NULL) { @@ -580,6 +583,7 @@ //Now kill the variable Variables.killObjVar(getSystemState(),name); + --varcount; return true; } @@ -671,6 +675,7 @@ //Create a new dynamic variable obj=Variables.findObjVar(getSystemState(),name,DYNAMIC_TRAIT,DYNAMIC_TRAIT); + ++varcount; } if(obj->setter) @@ -709,6 +714,7 @@ assert_and_throw(Variables.findObjVar(nameId,ns,NO_CREATE_TRAIT,traitKind)==NULL); variable* obj=Variables.findObjVar(nameId,ns,traitKind,traitKind); obj->setVar(o); + ++varcount; } void ASObject::initializeVariableByMultiname(const multiname& name, ASObject* o, multiname* typemname, @@ -728,6 +734,7 @@ } } Variables.initializeVar(name, o, typemname, context, traitKind,this); + ++varcount; } variable::variable(TRAIT_KIND _k, ASObject* _v, multiname* _t, const Type* _type) @@ -1131,7 +1138,7 @@ assert(!cls || classdef->isSubClass(cls)); uint32_t nsRealId; - const variable* obj=Variables.findObjVar(getSystemState(),name,DECLARED_TRAIT|DYNAMIC_TRAIT,&nsRealId); + const variable* obj=varcount ? Variables.findObjVar(getSystemState(),name,DECLARED_TRAIT|DYNAMIC_TRAIT,&nsRealId):NULL; if(obj) { //It seems valid for a class to redefine only the setter, so if we can't find @@ -1337,8 +1344,8 @@ } } -ASObject::ASObject(Class_base* c,SWFOBJECT_TYPE t):Variables((c)?c->memoryAccount:NULL),classdef(c),proxyMultiName(NULL),sys(c?c->sys:NULL), - type(t),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),reusableListNumber(0),implEnable(true) +ASObject::ASObject(Class_base* c,SWFOBJECT_TYPE t):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),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),implEnable(true) { #ifndef NDEBUG //Stuff only used in debugging @@ -1346,8 +1353,8 @@ #endif } -ASObject::ASObject(const ASObject& o):Variables((o.classdef)?o.classdef->memoryAccount:NULL),classdef(NULL),proxyMultiName(NULL),sys(o.classdef? o.classdef->sys : NULL), - type(o.type),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),reusableListNumber(0),implEnable(true) +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),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),implEnable(true) { #ifndef NDEBUG //Stuff only used in debugging @@ -1367,8 +1374,7 @@ bool ASObject::destruct() { - if (Variables.size()) - Variables.destroyContents(); + destroyContents(); if (proxyMultiName) delete proxyMultiName; proxyMultiName = NULL; @@ -1381,9 +1387,9 @@ initialized=false; #endif bool dodestruct = true; - if (classdef && classdef->isReusable) + if (objfreelist) { - dodestruct = !classdef->pushObjectToFreeList(this); + dodestruct = !objfreelist->pushObjectToFreeList(this); } if (dodestruct) { @@ -1487,7 +1493,7 @@ unsigned int ASObject::numVariables() const { - return Variables.size(); + return varcount; } void ASObject::serializeDynamicProperties(ByteArray* out, std::map<tiny_string, uint32_t>& stringMap, @@ -1896,7 +1902,10 @@ prototypeName.normalizedNameUnresolved(getSystemState()), classdef ? classdef->as<Class_base>()->getQualifiedClassName() : ""); if(!ret) + { ret = Variables.findObjVar(getSystemState(),prototypeName,DYNAMIC_TRAIT,DECLARED_TRAIT|DYNAMIC_TRAIT); + ++varcount; + } if(ret->setter) { this->incRef();
View file
lightspark.tar.xz/src/asobject.h
Changed
@@ -182,6 +182,7 @@ class Type; class ABCContext; class SystemState; +struct asfreelist; extern SystemState* getSys(); enum TRAIT_KIND { NO_CREATE_TRAIT=0, DECLARED_TRAIT=1, DYNAMIC_TRAIT=2, INSTANCE_TRAIT=5, CONSTANT_TRAIT=9 /* constants are also declared traits */ }; @@ -328,7 +329,7 @@ //for toPrimitive enum TP_HINT { NO_HINT, NUMBER_HINT, STRING_HINT }; -class ASObject: public memory_reporter, public boost::intrusive::list_base_hook<>, public RefCountable +class ASObject: public memory_reporter, public RefCountable { friend class ABCVm; friend class ABCContext; @@ -336,12 +337,16 @@ friend class Class_inherit; friend void lookupAndLink(Class_base* c, const tiny_string& name, const tiny_string& interfaceNs); friend class IFunction; //Needed for clone +friend struct asfreelist; +public: + asfreelist* objfreelist; private: variables_map Variables; + unsigned int varcount; Class_base* classdef; inline const variable* findGettable(const multiname& name, uint32_t* nsRealId = NULL) const DLL_LOCAL { - const variable* ret=Variables.findObjVar(getSystemState(),name,DECLARED_TRAIT|DYNAMIC_TRAIT,nsRealId); + const variable* ret=varcount ? Variables.findObjVar(getSystemState(),name,DECLARED_TRAIT|DYNAMIC_TRAIT,nsRealId):NULL; if(ret) { //It seems valid for a class to redefine only the setter, so if we can't find @@ -356,8 +361,8 @@ multiname* proxyMultiName; SystemState* sys; protected: - ASObject(MemoryAccount* m):Variables(m),classdef(NULL),proxyMultiName(NULL),sys(NULL), - type(T_OBJECT),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),reusableListNumber(0),implEnable(true) + ASObject(MemoryAccount* m):objfreelist(NULL),Variables(m),varcount(0),classdef(NULL),proxyMultiName(NULL),sys(NULL), + type(T_OBJECT),traitsInitialized(false),constructIndicator(false),constructorCallComplete(false),implEnable(true) { #ifndef NDEBUG //Stuff only used in debugging @@ -374,9 +379,6 @@ bool traitsInitialized:1; bool constructIndicator:1; bool constructorCallComplete:1; // indicates that the constructor including all super constructors has been called - // indicates which reusable list to use for classes with several subclasses - // currently only used for IFunction (Function/SyntheticFunction) - int reusableListNumber; void serializeDynamicProperties(ByteArray* out, std::map<tiny_string, uint32_t>& stringMap, std::map<const ASObject*, uint32_t>& objMap, std::map<const Class_base*, uint32_t> traitsMap) const; @@ -633,7 +635,11 @@ void setIsEnumerable(const multiname& name, bool isEnum); inline void destroyContents() { - Variables.destroyContents(); + if (varcount) + { + Variables.destroyContents(); + varcount=0; + } } };
View file
lightspark.tar.xz/src/backends/decoder.cpp
Changed
@@ -733,7 +733,7 @@ int FFMpegAudioDecoder::resampleFrameToS16(FrameSamples& curTail) { int sample_rate = getSys()->audioManager->forcedSampleRate() == -1 ? codecContext->sample_rate : getSys()->audioManager->forcedSampleRate(); - uint channel_layout = getSys()->audioManager->forcedChannelLayout() == -1 ? frameIn->channel_layout : getSys()->audioManager->forcedChannelLayout(); + unsigned int channel_layout = getSys()->audioManager->forcedChannelLayout() == -1 ? frameIn->channel_layout : getSys()->audioManager->forcedChannelLayout(); if(frameIn->format == AV_SAMPLE_FMT_S16 && sample_rate == codecContext->sample_rate && channel_layout == frameIn->channel_layout) { //This is suboptimal but equivalent to what libavcodec
View file
lightspark.tar.xz/src/compat.cpp
Changed
@@ -134,7 +134,7 @@ RUNDLLMAIN(glib); //RUNDLLMAIN(cairo); //taken care of by patches from mxe RUNDLLMAIN(atk); - RUNDLLMAIN(pango); + //RUNDLLMAIN(pango); //taken care of by patches from mxe RUNDLLMAIN(gdk); RUNDLLMAIN(gtk); return TRUE;
View file
lightspark.tar.xz/src/parsing/streams.h
Changed
@@ -99,68 +99,85 @@ { private: const char* const code; - unsigned int len; - unsigned int pos; + const char* lastcodepos; + const char* codepos; + lightspark::method_body_info_cache* cachepos; public: lightspark::method_body_info_cache* codecache; // Create a stream from a buffer b. // // The buffer is not copied, so b must continue to exists for // the life-time of this memorystream instance. - memorystream(const char* const b, unsigned int l,lightspark::method_body_info_cache* cc): code(b), len(l), pos(0),codecache(cc) {}; + memorystream(const char* const b, unsigned int l,lightspark::method_body_info_cache* cc): code(b), lastcodepos(code+l), codepos(code),cachepos(cc),codecache(cc) {}; static void handleError(const char *msg); inline unsigned int size() const { - return len; + return lastcodepos-code; } inline unsigned int tellg() const { - return pos; + return codepos-code; } inline void seekg(unsigned int offset) { - if (offset > len) - pos = len; + if (offset >= lastcodepos-code) + codepos = lastcodepos; else - pos = offset; + codepos = code+offset; + cachepos = codecache+ (codepos-code); } - + + inline lightspark::method_body_info_cache* tellcachepos() const + { + return cachepos; + } + inline const char* tellpos() const + { + return codepos; + } + inline void seekpos(const char* newpos) + { + codepos = newpos; + cachepos = codecache+ (codepos-code); + } + inline void read(char *out, unsigned int nbytes) { - if (pos+nbytes > len) + if (codepos+nbytes >= lastcodepos) { - memcpy(out, code+pos, len-pos); - pos = len; + memcpy(out, codepos, lastcodepos-codepos); + codepos = lastcodepos; } else { - memcpy(out, code+pos, nbytes); - pos += nbytes; + memcpy(out, codepos, nbytes); + codepos += nbytes; } + cachepos = codecache+ (codepos-code); } inline uint8_t readbyte() { - if (pos < len) + if (codepos < lastcodepos) { - pos++; - return code[pos-1]; + ++cachepos; + return *codepos++; } else { - pos = len; return 0; } } inline uint32_t readu30() { - unsigned int currpos = pos; - if (codecache[currpos].type == lightspark::method_body_info_cache::CACHE_TYPE_UINTEGER) + lightspark::method_body_info_cache* currpos = cachepos; + if (cachepos->type == lightspark::method_body_info_cache::CACHE_TYPE_UINTEGER) { - pos = codecache[currpos].nextpos; - return codecache[currpos].uvalue; + codepos = cachepos->nextcodepos; + cachepos = codecache+ (codepos-code); + return currpos->uvalue; } uint32_t val = readu32(); if(val&0xc0000000) @@ -169,7 +186,7 @@ } inline uint32_t readu32() { - unsigned int currpos = pos; + lightspark::method_body_info_cache* currpos = cachepos; int i=0; uint32_t val=0; @@ -193,25 +210,26 @@ } } while(t&0x80); - codecache[currpos].type = lightspark::method_body_info_cache::CACHE_TYPE_UINTEGER; - codecache[currpos].uvalue = val; - codecache[currpos].nextpos = pos; + currpos->type = lightspark::method_body_info_cache::CACHE_TYPE_UINTEGER; + currpos->uvalue = val; + currpos->nextcodepos = codepos; return val; } inline int32_t reads24() { - unsigned int currpos = pos; - if (codecache[currpos].type == lightspark::method_body_info_cache::CACHE_TYPE_INTEGER) + lightspark::method_body_info_cache* currpos = cachepos; + if (cachepos->type == lightspark::method_body_info_cache::CACHE_TYPE_INTEGER) { - pos = codecache[currpos].nextpos; - return codecache[currpos].ivalue; + codepos = cachepos->nextcodepos; + cachepos = codecache+ (codepos-code); + return currpos->ivalue; } uint32_t val=0; read((char*)&val,3); int32_t ret = LittleEndianToSignedHost24(val); - codecache[currpos].type = lightspark::method_body_info_cache::CACHE_TYPE_INTEGER; - codecache[currpos].ivalue = ret; - codecache[currpos].nextpos = pos; + currpos->type = lightspark::method_body_info_cache::CACHE_TYPE_INTEGER; + currpos->ivalue = ret; + currpos->nextcodepos = codepos; return ret; } };
View file
lightspark.tar.xz/src/parsing/tags.cpp
Changed
@@ -756,7 +756,7 @@ else { bool found = false; - for (uint i = 0; i < CodeTable.size(); i++) + for (unsigned int i = 0; i < CodeTable.size(); i++) { if (CodeTable[i] == *it) {
View file
lightspark.tar.xz/src/scripting/abc.cpp
Changed
@@ -1432,10 +1432,10 @@ } } - for(uint32_t i=0;i<locals_size;i++) + for(uint32_t i=locals_size;--i;) { - if(locals[i]) - locals[i]->decRef(); + if(locals[i-1]) + locals[i-1]->decRef(); } while (curr_scope_stack) {
View file
lightspark.tar.xz/src/scripting/abc_interpreter.cpp
Changed
@@ -464,8 +464,8 @@ { //nextname ASObject* v1=context->runtime_stack_pop(); - ASObject* v2=context->runtime_stack_pop(); - context->runtime_stack_push(nextName(v1,v2)); + ASObject** pval=context->runtime_stack_pointer(); + *pval=nextName(v1,*pval); break; } case 0x20: @@ -490,44 +490,45 @@ } case 0x24: { - uint32_t pos = code.tellg(); - if (code.codecache[pos].type == method_body_info_cache::CACHE_TYPE_OBJECT) + //pushbyte + lightspark::method_body_info_cache* cachepos = code.tellcachepos(); + if (cachepos->type == method_body_info_cache::CACHE_TYPE_OBJECT) { - context->runtime_stack_push(code.codecache[pos].obj); - code.seekg(code.codecache[pos].nextpos); + context->runtime_stack_push(cachepos->obj); + code.seekpos(cachepos->nextcodepos); break; } int8_t t = code.readbyte(); - code.codecache[pos].nextpos = pos+1; + cachepos->nextcodepos = code.tellpos(); pushByte(t); ASObject* d= abstract_i(function->getSystemState(),t); d->setConstant(); - code.codecache[pos].type =method_body_info_cache::CACHE_TYPE_OBJECT; - code.codecache[pos].obj = d; + cachepos->type =method_body_info_cache::CACHE_TYPE_OBJECT; + cachepos->obj = d; context->runtime_stack_push(d); break; } case 0x25: { //pushshort - uint32_t pos = code.tellg(); - if (code.codecache[pos].type == method_body_info_cache::CACHE_TYPE_OBJECT) + lightspark::method_body_info_cache* cachepos = code.tellcachepos(); + if (cachepos->type == method_body_info_cache::CACHE_TYPE_OBJECT) { - context->runtime_stack_push(code.codecache[pos].obj); - code.seekg(code.codecache[pos].nextpos); + context->runtime_stack_push(cachepos->obj); + code.seekpos(cachepos->nextcodepos); break; } // specs say pushshort is a u30, but it's really a u32 // see https://bugs.adobe.com/jira/browse/ASC-4181 uint32_t t = code.readu32(); - code.codecache[pos].nextpos = code.tellg(); + cachepos->nextcodepos = code.tellpos(); ASObject* i= abstract_i(function->getSystemState(),t); i->setConstant(); - code.codecache[pos].type =method_body_info_cache::CACHE_TYPE_OBJECT; - code.codecache[pos].obj = i; + cachepos->type =method_body_info_cache::CACHE_TYPE_OBJECT; + cachepos->obj = i; context->runtime_stack_push(i); pushShort(t); @@ -590,11 +591,11 @@ case 0x2d: { //pushint - uint32_t pos = code.tellg(); - if (code.codecache[pos].type == method_body_info_cache::CACHE_TYPE_OBJECT) + lightspark::method_body_info_cache* cachepos = code.tellcachepos(); + if (cachepos->type == method_body_info_cache::CACHE_TYPE_OBJECT) { - context->runtime_stack_push(code.codecache[pos].obj); - code.seekg(code.codecache[pos].nextpos); + context->runtime_stack_push(cachepos->obj); + code.seekpos(cachepos->nextcodepos); break; } @@ -604,19 +605,19 @@ ASObject* i=abstract_i(function->getSystemState(),val); i->setConstant(); - code.codecache[pos].type =method_body_info_cache::CACHE_TYPE_OBJECT; - code.codecache[pos].obj = i; + cachepos->type =method_body_info_cache::CACHE_TYPE_OBJECT; + cachepos->obj = i; context->runtime_stack_push(i); break; } case 0x2e: { //pushuint - uint32_t pos = code.tellg(); - if (code.codecache[pos].type == method_body_info_cache::CACHE_TYPE_OBJECT) + lightspark::method_body_info_cache* cachepos = code.tellcachepos(); + if (cachepos->type == method_body_info_cache::CACHE_TYPE_OBJECT) { - context->runtime_stack_push(code.codecache[pos].obj); - code.seekg(code.codecache[pos].nextpos); + context->runtime_stack_push(cachepos->obj); + code.seekpos(cachepos->nextcodepos); break; } @@ -626,19 +627,19 @@ ASObject* i=abstract_ui(function->getSystemState(),val); i->setConstant(); - code.codecache[pos].type =method_body_info_cache::CACHE_TYPE_OBJECT; - code.codecache[pos].obj = i; + cachepos->type =method_body_info_cache::CACHE_TYPE_OBJECT; + cachepos->obj = i; context->runtime_stack_push(i); break; } case 0x2f: { //pushdouble - uint32_t pos = code.tellg(); - if (code.codecache[pos].type == method_body_info_cache::CACHE_TYPE_OBJECT) + lightspark::method_body_info_cache* cachepos = code.tellcachepos(); + if (cachepos->type == method_body_info_cache::CACHE_TYPE_OBJECT) { - context->runtime_stack_push(code.codecache[pos].obj); - code.seekg(code.codecache[pos].nextpos); + context->runtime_stack_push(cachepos->obj); + code.seekpos(cachepos->nextcodepos); break; } uint32_t t = code.readu30(); @@ -647,8 +648,8 @@ ASObject* d= abstract_d(function->getSystemState(),val); d->setConstant(); - code.codecache[pos].type =method_body_info_cache::CACHE_TYPE_OBJECT; - code.codecache[pos].obj = d; + cachepos->type =method_body_info_cache::CACHE_TYPE_OBJECT; + cachepos->obj = d; context->runtime_stack_push(d); break; }
View file
lightspark.tar.xz/src/scripting/abc_opcodes.cpp
Changed
@@ -1028,7 +1028,7 @@ ASObject* res = NULL; // if both values are Integers or int Numbers the result is also an int Number if( (val1->is<Integer>() || val1->is<UInteger>() || (val1->is<Number>() && !val1->as<Number>()->isfloat)) && - (val2->is<Integer>() || val1->is<UInteger>() || (val2->is<Number>() && !val2->as<Number>()->isfloat))) + (val2->is<Integer>() || val2->is<UInteger>() || (val2->is<Number>() && !val2->as<Number>()->isfloat))) { int64_t num1=val1->toInt64(); int64_t num2=val2->toInt64();
View file
lightspark.tar.xz/src/scripting/abctypes.h
Changed
@@ -267,7 +267,7 @@ int32_t ivalue; ASObject* obj; }; - uint32_t nextpos; + const char* nextcodepos; }; struct method_body_info
View file
lightspark.tar.xz/src/scripting/class.h
Changed
@@ -127,7 +127,7 @@ { if(realClass==NULL) realClass=this; - T* ret = realClass->getObjectFromFreeList()->as<T>(); + T* ret = realClass->freelist[0].getObjectFromFreeList()->as<T>(); if (!ret) ret=new (realClass->memoryAccount) T(realClass); if(construct) @@ -163,7 +163,7 @@ Class<T>* c=static_cast<Class<T>*>(sys->builtinClasses[ClassName<T>::id]); if (!c) c = getClass(sys); - T* ret = c->getObjectFromFreeList()->as<T>(); + T* ret = c->freelist[0].getObjectFromFreeList()->as<T>(); if (!ret) { ret=new (c->memoryAccount) T(c); @@ -298,7 +298,7 @@ static ASObject* getInstanceS(SystemState* sys) { Class<ASObject>* c=Class<ASObject>::getClass(sys); - ASObject* ret = c->getObjectFromFreeList(); + ASObject* ret = c->freelist[0].getObjectFromFreeList(); if (!ret) ret=new (c->memoryAccount) ASObject(c); c->setupDeclaredTraits(ret);
View file
lightspark.tar.xz/src/scripting/flash/display/BitmapData.cpp
Changed
@@ -854,9 +854,9 @@ ASFUNCTIONBODY(BitmapData,noise) { int randomSeed; - uint low; - uint high; - uint channelOptions; + unsigned int low; + unsigned int high; + unsigned int channelOptions; bool grayScale; ARG_UNPACK(randomSeed)(low, 0) (high, 255) (channelOptions, 7) (grayScale, false); LOG(LOG_NOT_IMPLEMENTED,"BitmapData.noise not implemented");
View file
lightspark.tar.xz/src/scripting/flash/media/flashmedia.cpp
Changed
@@ -26,6 +26,7 @@ #include "backends/rendering.h" #include "backends/streamcache.h" #include "scripting/argconv.h" +#include <unistd.h> using namespace lightspark; using namespace std;
View file
lightspark.tar.xz/src/scripting/flash/net/XMLSocket.cpp
Changed
@@ -27,7 +27,9 @@ #include "flash/errors/flasherrors.h" #include <sys/types.h> #ifdef _WIN32 +#ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0501 +#endif # include <winsock2.h> # include <ws2tcpip.h> # include <fcntl.h>
View file
lightspark.tar.xz/src/scripting/flash/text/flashtextengine.h
Changed
@@ -50,7 +50,7 @@ ASPROPERTY_GETTER_SETTER(number_t,alpha); ASPROPERTY_GETTER_SETTER(number_t,baselineShift); ASPROPERTY_GETTER_SETTER(tiny_string,breakOpportunity); - ASPROPERTY_GETTER_SETTER(uint,color); + ASPROPERTY_GETTER_SETTER(unsigned int,color); ASPROPERTY_GETTER_SETTER(tiny_string,digitCase); ASPROPERTY_GETTER_SETTER(tiny_string,digitWidth); ASPROPERTY_GETTER_SETTER(tiny_string,dominantBaseline);
View file
lightspark.tar.xz/src/scripting/flash/utils/ByteArray.cpp
Changed
@@ -1509,7 +1509,7 @@ uint32_t value = (len << 1) | 1; out->writeU29(value); // TODO faster implementation - for (uint i = 0; i < len; i++) + for (unsigned int i = 0; i < len; i++) out->writeByte(this->bytes[i]); } }
View file
lightspark.tar.xz/src/scripting/toplevel/Vector.cpp
Changed
@@ -1096,7 +1096,7 @@ res += "["; bool bfirst = true; tiny_string newline = (spaces.empty() ? "" : "\n"); - for (uint i =0; i < vec.size(); i++) + for (unsigned int i =0; i < vec.size(); i++) { tiny_string subres; ASObject* o = vec[i];
View file
lightspark.tar.xz/src/scripting/toplevel/toplevel.cpp
Changed
@@ -272,7 +272,8 @@ { if(mi) length = mi->numArgs(); - reusableListNumber = 1; + // use second freelist, first is used by Function class + objfreelist = &c->freelist[1]; } /** @@ -459,9 +460,10 @@ //obtain a local reference to this function, as it may delete itself this->incRef(); - cur_recursion++; //increment current recursion depth + ++cur_recursion; //increment current recursion depth +#ifndef NDEBUG Log::calls_indent++; - +#endif getVm(getSystemState())->stacktrace.push_back(std::pair<uint32_t,ASObject*>(this->functionname,obj)); while (true) { @@ -515,8 +517,10 @@ } if (no_handler) { - cur_recursion--; //decrement current recursion depth + --cur_recursion; //decrement current recursion depth +#ifndef NDEBUG Log::calls_indent--; +#endif getVm(getSystemState())->stacktrace.pop_back(); getVm(getSystemState())->currentCallContext = saved_cc; throw; @@ -525,9 +529,11 @@ } break; } - cur_recursion--; //decrement current recursion depth + --cur_recursion; //decrement current recursion depth getVm(getSystemState())->stacktrace.pop_back(); +#ifndef NDEBUG Log::calls_indent--; +#endif getVm(getSystemState())->currentCallContext = saved_cc; this->decRef(); //free local ref @@ -774,14 +780,14 @@ } Class_base::Class_base(const QName& name, MemoryAccount* m):ASObject(Class_object::getClass(getSys()),T_CLASS),protected_ns(getSys(),"",NAMESPACE),constructor(NULL), - freelistsize(0),freelistsize2(0),borrowedVariables(m), + borrowedVariables(m), context(NULL),class_name(name),memoryAccount(m),length(1),class_index(-1),isFinal(false),isSealed(false),isInterface(false),isReusable(false),isProxy(false),use_protected(false) { setConstant(); } Class_base::Class_base(const Class_object*):ASObject((MemoryAccount*)NULL),protected_ns(getSys(),BUILTIN_STRINGS::EMPTY,NAMESPACE),constructor(NULL), - freelistsize(0),freelistsize2(0),borrowedVariables(NULL), + borrowedVariables(NULL), context(NULL),class_name(BUILTIN_STRINGS::STRING_CLASS,BUILTIN_STRINGS::EMPTY),memoryAccount(NULL),length(1),class_index(-1),isFinal(false),isSealed(false),isInterface(false),isReusable(false),isProxy(false),use_protected(false) { setConstant(); @@ -902,8 +908,6 @@ Class_base::~Class_base() { - if(!referencedObjects.empty()) - LOG(LOG_ERROR,_("Class destroyed without cleanUp called")); } ASObject* Class_base::_getter_constructorprop(ASObject* obj, ASObject* const* args, const unsigned int argslen) @@ -993,47 +997,9 @@ } } -void Class_base::acquireObject(ASObject* ob) -{ - SpinlockLocker l(referencedObjectsMutex); - assert_and_throw(!ob->is_linked()); - referencedObjects.push_back(*ob); -} - -void Class_base::abandonObject(ASObject* ob) -{ - SpinlockLocker l(referencedObjectsMutex); - assert_and_throw(ob->is_linked()); -#ifdef EXPENSIVE_DEBUG - //Check that the object is really referenced by this class - int count=0; - for (auto it=referencedObjects.cbegin(); it!=referencedObjects.cend(); ++it) - { - if ((&*it) == ob) - count++; - } - assert_and_throw(count==1); -#endif - - referencedObjects.erase(referencedObjects.iterator_to(*ob)); -} - -void Class_base::finalizeObjects() -{ - while(!referencedObjects.empty()) - { - ASObject *tmp=&referencedObjects.front(); - tmp->incRef(); - //Finalizing the object does also release the classdef and call abandonObject - tmp->finalize(); - tmp->decRef(); - } -} void Class_base::destroy() { - finalizeObjects(); - if(constructor) { constructor->decRef(); @@ -1056,13 +1022,6 @@ isInterface = false; isProxy = false; use_protected = false; - - for (int i = 0; i < freelistsize; i++) - delete freelist[i]; - freelistsize = 0; - for (int i = 0; i < freelistsize2; i++) - delete freelist2[i]; - freelistsize2 = 0; } Template_base::Template_base(QName name) : ASObject((Class_base*)(NULL)),template_name(name)
View file
lightspark.tar.xz/src/scripting/toplevel/toplevel.h
Changed
@@ -139,61 +139,26 @@ class ObjectConstructor; #define FREELIST_SIZE 16 -class Class_base: public ASObject, public Type +struct asfreelist { -friend class ABCVm; -friend class ABCContext; -template<class T> friend class Template; -private: - mutable std::vector<multiname> interfaces; - mutable std::vector<Class_base*> interfaces_added; - nsNameAndKind protected_ns; - void initializeProtectedNamespace(uint32_t nameId, const namespace_info& ns); - IFunction* constructor; - void describeTraits(pugi::xml_node &root, std::vector<traits_info>& traits) const; - void describeMetadata(pugi::xml_node &node, const traits_info& trait) const; - void describeVariables(pugi::xml_node &root, const Class_base* c, std::map<tiny_string, pugi::xml_node *> &instanceNodes, const variables_map& map) const; - //Naive garbage collection until reference cycles are detected - Mutex referencedObjectsMutex; - boost::intrusive::list<ASObject, boost::intrusive::constant_time_size<false> > referencedObjects; - void finalizeObjects(); ASObject* freelist[FREELIST_SIZE]; int freelistsize; - ASObject* freelist2[FREELIST_SIZE]; - int freelistsize2; -protected: - void copyBorrowedTraitsFromSuper(); - ASFUNCTION(_toString); - void initStandardProps(); - void destroy(); -public: - inline ASObject* getObjectFromFreeList() + asfreelist():freelistsize(0) {} + ~asfreelist() { -#ifndef NDEBUG - // all ASObjects must be created in the VM thread - assert_and_throw(isVmThread()); -#endif - ASObject* ret = NULL; - if (freelistsize) - { - ret=freelist[--freelistsize]; - } - return ret; + for (int i = 0; i < freelistsize; i++) + delete freelist[i]; + freelistsize = 0; } - inline ASObject* getObjectFromFreeList2() + + inline ASObject* getObjectFromFreeList() { #ifndef NDEBUG // all ASObjects must be created in the VM thread assert_and_throw(isVmThread()); #endif - ASObject* ret = NULL; - if (freelistsize2) - { - ret=freelist2[--freelistsize2]; - } - return ret; + return freelistsize ? freelist[--freelistsize] :NULL; } - inline bool pushObjectToFreeList(ASObject *obj) { #ifndef NDEBUG @@ -201,25 +166,36 @@ assert_and_throw(isVmThread()); #endif assert(obj->getRefCount() == 1); - if (obj->reusableListNumber == 0) - { - if (freelistsize < FREELIST_SIZE) - { - freelist[freelistsize++]=obj; - return true; - } - return false; - } - else + if (freelistsize < FREELIST_SIZE) { - if (freelistsize2 < FREELIST_SIZE) - { - freelist2[freelistsize2++]=obj; - return true; - } - return false; + freelist[freelistsize++]=obj; + return true; } + return false; } +}; + +class Class_base: public ASObject, public Type +{ +friend class ABCVm; +friend class ABCContext; +template<class T> friend class Template; +private: + mutable std::vector<multiname> interfaces; + mutable std::vector<Class_base*> interfaces_added; + nsNameAndKind protected_ns; + void initializeProtectedNamespace(uint32_t nameId, const namespace_info& ns); + IFunction* constructor; + void describeTraits(pugi::xml_node &root, std::vector<traits_info>& traits) const; + void describeMetadata(pugi::xml_node &node, const traits_info& trait) const; + void describeVariables(pugi::xml_node &root, const Class_base* c, std::map<tiny_string, pugi::xml_node *> &instanceNodes, const variables_map& map) const; +protected: + void copyBorrowedTraitsFromSuper(); + ASFUNCTION(_toString); + void initStandardProps(); + void destroy(); +public: + asfreelist freelist[2]; variables_map borrowedVariables; ASPROPERTY_GETTER(_NR<Prototype>,prototype); ASPROPERTY_GETTER(_NR<ObjectConstructor>,constructorprop); @@ -274,9 +250,6 @@ ASObject *describeType() const; void describeInstance(pugi::xml_node &root) const; virtual const Template_base* getTemplate() const { return NULL; } - //DEPRECATED: naive garbage collector - void abandonObject(ASObject* ob) DLL_PUBLIC; - void acquireObject(ASObject* ob) DLL_PUBLIC; /* * Converts the given object to an object of this Class_base's type. * It consumes one reference of 'o'. @@ -494,7 +467,7 @@ Function(Class_base* c, as_function v=NULL):IFunction(c),val(v){} Function* clone() { - Function* ret = getClass()->getObjectFromFreeList()->as<Function>(); + Function* ret = objfreelist->getObjectFromFreeList()->as<Function>(); if (!ret) ret=new (getClass()->memoryAccount) Function(*this); else @@ -546,7 +519,7 @@ SyntheticFunction* clone() { - SyntheticFunction* ret = getClass()->getObjectFromFreeList2()->as<SyntheticFunction>(); + SyntheticFunction* ret = objfreelist->getObjectFromFreeList()->as<SyntheticFunction>(); if (!ret) { ret=new (getClass()->memoryAccount) SyntheticFunction(*this); @@ -561,7 +534,7 @@ ret->func_scope = func_scope; ret->functionname = functionname; } - ret->reusableListNumber=1; + ret->objfreelist = &getClass()->freelist[1]; return ret; } method_info* getMethodInfo() const { return mi; } @@ -623,7 +596,7 @@ static Function* getFunction(SystemState* sys,Function::as_function v) { Class<IFunction>* c=Class<IFunction>::getClass(sys); - Function* ret = c->getObjectFromFreeList()->as<Function>(); + Function* ret = c->freelist[0].getObjectFromFreeList()->as<Function>(); if (!ret) ret=new (c->memoryAccount) Function(c, v); else @@ -635,7 +608,7 @@ static Function* getFunction(SystemState* sys,Function::as_function v, int len) { Class<IFunction>* c=Class<IFunction>::getClass(sys); - Function* ret = c->getObjectFromFreeList()->as<Function>(); + Function* ret = c->freelist[0].getObjectFromFreeList()->as<Function>(); if (!ret) ret=new (c->memoryAccount) Function(c, v); else @@ -649,7 +622,7 @@ { Class<IFunction>* c=Class<IFunction>::getClass(sys); SyntheticFunction* ret; - ret= c->getObjectFromFreeList2()->as<SyntheticFunction>(); + ret= c->freelist[1].getObjectFromFreeList()->as<SyntheticFunction>(); if (!ret) { ret=new (c->memoryAccount) SyntheticFunction(c, m); @@ -657,7 +630,7 @@ else { ret->mi = m; - ret->reusableListNumber=1; + ret->objfreelist = &c->freelist[1]; } ret->constructIndicator = true;
View file
lightspark.tar.xz/src/smartrefs.h
Changed
@@ -39,7 +39,7 @@ #ifndef NDEBUG int getRefCount() const { return ref_count; } #endif - inline bool isLastRef() const { return ref_count == 1; } + inline bool isLastRef() const { return !isConstant && ref_count == 1; } inline void setConstant() { RELEASE_WRITE(isConstant,true); @@ -48,8 +48,7 @@ inline void incRef() { if (!isConstant) - ATOMIC_INCREMENT(ref_count); - assert(ref_count>0); + ++ref_count; } inline void decRef() { @@ -66,14 +65,9 @@ } } else - ATOMIC_DECREMENT(ref_count); + --ref_count; } } - inline void fake_decRef() - { - if (!isConstant) - ATOMIC_DECREMENT(ref_count); - } virtual bool destruct() { return true;
View file
lightspark.tar.xz/src/tiny_string.cpp
Changed
@@ -409,7 +409,7 @@ isASCII = true; hasNull = false; unsigned char utfpos=0; - for (uint i = 0; i < stringSize-1; i++) + for (unsigned int i = 0; i < stringSize-1; i++) { if (buf[i] & 0x80) { @@ -518,7 +518,7 @@ tiny_string delimiterstring = tiny_string::fromChar(delimiter); pos = 0; - uint len = numChars(); + unsigned int len = numChars(); while (pos < len) { end = find(delimiterstring, pos);
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
.