diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2016-04-03 16:03:35 +0200 |
---|---|---|
committer | Arnaud Versini <arnaud.versini@libreoffice.org> | 2016-04-03 17:34:04 +0000 |
commit | 917e3656e920caed61f0ecfc156cd2f8e470087e (patch) | |
tree | d3ab2c1bb987e1684db79f761751da4f3f58c1d0 /basic/source/inc | |
parent | 9b0069c2833313ba9fab91f45edd354ba334f94b (diff) |
BASIC : Use a vector to store the go sub stack.
Change-Id: I80987f3f7c036279a8292a7fbbd2dcd232196226
Reviewed-on: https://gerrit.libreoffice.org/23753
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Diffstat (limited to 'basic/source/inc')
-rw-r--r-- | basic/source/inc/runtime.hxx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index ed4cf423558e..6d1a8a01f577 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -41,7 +41,7 @@ class SbiInstance; // active StarBASIC process class SbiRuntime; // active StarBASIC procedure instance struct SbiArgvStack; // Argv stack element -struct SbiGosubStack; // GOSUB stack element +struct SbiGosub; // GOSUB stack element class SbiImage; // Code-Image class SbiIoSystem; class SbiDdeControl; @@ -89,12 +89,6 @@ struct SbiForStack { // for/next stack: #define MAXRECURSION 500 -struct SbiGosubStack { // GOSUB-Stack: - SbiGosubStack* pNext; // Chain - const sal_uInt8* pCode; // Return-Pointer - sal_uInt16 nStartForLvl; // #118235: For Level in moment of gosub -}; - enum class SbAttributes { NONE = 0x0000, READONLY = 0x0001, @@ -237,10 +231,8 @@ class SbiRuntime SbxVariableRef xDummyVar; // substitute for variables that weren't found SbxVariable* mpExtCaller; // Caller ( external - e.g. button name, shape, range object etc. - only in vba mode ) SbiArgvStack* pArgvStk; // ARGV-Stack - SbiGosubStack* pGosubStk; // GOSUB stack SbiForStack* pForStk; // FOR/NEXT-Stack sal_uInt16 nExprLvl; // depth of the expr-stack - sal_uInt16 nGosubLvl; // to prevent dead-recursions sal_uInt16 nForLvl; // #118235: Maintain for level const sal_uInt8* pCode; // current Code-Pointer const sal_uInt8* pStmnt; // beginning of the last statement @@ -265,6 +257,8 @@ class SbiRuntime sal_uInt32 m_nLastTime; std::vector<SbxVariableRef> aRefSaved; // #74254 save temporary references + std::vector<SbiGosub> pGosubStk; // GOSUB stack + SbxVariable* FindElement ( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, SbError, bool bLocal, bool bStatic = false ); @@ -279,7 +273,6 @@ class SbiRuntime void PushGosub( const sal_uInt8* ); void PopGosub(); - void ClearGosubStack(); void PushArgv(); void PopArgv(); |