[ooo-build-commit] .: patches/test
Noel Power
noelp at kemper.freedesktop.org
Fri May 7 07:08:39 PDT 2010
patches/test/vba-directlocalvaraccess.diff | 283 ++++++-----------------------
1 file changed, 60 insertions(+), 223 deletions(-)
New commits:
commit a5d4f48bbf71873897af6e0cf889277f93a4339b
Author: Noel Power <noel.power at novell.com>
Date: Fri May 7 15:08:56 2010 +0100
add local static variables to fast cache
* patches/test/vba-directlocalvaraccess.diff:
diff --git a/patches/test/vba-directlocalvaraccess.diff b/patches/test/vba-directlocalvaraccess.diff
index 5220842..4a951d9 100644
--- a/patches/test/vba-directlocalvaraccess.diff
+++ b/patches/test/vba-directlocalvaraccess.diff
@@ -1,6 +1,6 @@
-diff -r a8d540977f0a basic/source/classes/image.cxx
---- a/basic/source/classes/image.cxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/classes/image.cxx Tue May 04 10:02:43 2010 +0100
+diff -r 869606102f87 basic/source/classes/image.cxx
+--- a/basic/source/classes/image.cxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/classes/image.cxx Fri May 07 15:08:07 2010 +0100
@@ -37,6 +37,47 @@
#include <string.h> // memset() etc
#include "image.hxx"
@@ -69,9 +69,9 @@ diff -r a8d540977f0a basic/source/classes/image.cxx
// Note: IDs start with 1
String SbiImage::GetString( short nId ) const
-diff -r a8d540977f0a basic/source/comp/codegen.cxx
---- a/basic/source/comp/codegen.cxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/comp/codegen.cxx Tue May 04 10:02:44 2010 +0100
+diff -r 869606102f87 basic/source/comp/codegen.cxx
+--- a/basic/source/comp/codegen.cxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/comp/codegen.cxx Fri May 07 15:08:07 2010 +0100
@@ -333,7 +333,8 @@
nCount = pParser->rEnumArray->Count();
for (i = 0; i < nCount; i++)
@@ -82,9 +82,9 @@ diff -r a8d540977f0a basic/source/comp/codegen.cxx
if( !p->IsError() )
rMod.pImage = p;
else
-diff -r a8d540977f0a basic/source/comp/dim.cxx
---- a/basic/source/comp/dim.cxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/comp/dim.cxx Tue May 04 10:02:44 2010 +0100
+diff -r 869606102f87 basic/source/comp/dim.cxx
+--- a/basic/source/comp/dim.cxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/comp/dim.cxx Fri May 07 15:08:07 2010 +0100
@@ -352,10 +352,14 @@
nGblChain = 0;
bGblDefs = bNewGblDefs = TRUE;
@@ -102,9 +102,9 @@ diff -r a8d540977f0a basic/source/comp/dim.cxx
sal::static_int_cast< UINT16 >( pDef->GetType() ) );
}
-diff -r a8d540977f0a basic/source/comp/exprgen.cxx
---- a/basic/source/comp/exprgen.cxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/comp/exprgen.cxx Tue May 04 10:02:44 2010 +0100
+diff -r 869606102f87 basic/source/comp/exprgen.cxx
+--- a/basic/source/comp/exprgen.cxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/comp/exprgen.cxx Fri May 07 15:08:07 2010 +0100
@@ -108,7 +108,9 @@
bTreatFunctionAsParam = false;
}
@@ -157,9 +157,9 @@ diff -r a8d540977f0a basic/source/comp/exprgen.cxx
if( aVar.pvMorePar )
{
-diff -r a8d540977f0a basic/source/comp/parser.cxx
---- a/basic/source/comp/parser.cxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/comp/parser.cxx Tue May 04 10:02:44 2010 +0100
+diff -r 869606102f87 basic/source/comp/parser.cxx
+--- a/basic/source/comp/parser.cxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/comp/parser.cxx Fri May 07 15:08:07 2010 +0100
@@ -123,6 +123,27 @@
// 'this' : used in base member initializer list
#pragma warning( disable: 4355 )
@@ -188,9 +188,9 @@ diff -r a8d540977f0a basic/source/comp/parser.cxx
SbiParser::SbiParser( StarBASIC* pb, SbModule* pm )
: SbiTokenizer( pm->GetSource32(), pb ),
-diff -r a8d540977f0a basic/source/comp/symtbl.cxx
---- a/basic/source/comp/symtbl.cxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/comp/symtbl.cxx Tue May 04 10:02:44 2010 +0100
+diff -r 869606102f87 basic/source/comp/symtbl.cxx
+--- a/basic/source/comp/symtbl.cxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/comp/symtbl.cxx Fri May 07 15:08:07 2010 +0100
@@ -309,6 +309,7 @@
pIn =
pPool = NULL;
@@ -208,9 +208,9 @@ diff -r a8d540977f0a basic/source/comp/symtbl.cxx
{
aParams.SetParent( &pParser->aPublics );
pPool = new SbiSymPool( pParser->aGblStrings, SbLOCAL ); // Locals
-diff -r a8d540977f0a basic/source/inc/image.hxx
---- a/basic/source/inc/image.hxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/inc/image.hxx Tue May 04 10:02:44 2010 +0100
+diff -r 869606102f87 basic/source/inc/image.hxx
+--- a/basic/source/inc/image.hxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/inc/image.hxx Fri May 07 15:08:07 2010 +0100
@@ -36,11 +36,32 @@
#include <rtl/ustring.hxx>
#endif
@@ -256,9 +256,9 @@ diff -r a8d540977f0a basic/source/inc/image.hxx
String aName; // Makroname
::rtl::OUString aOUSource; // Quellcode
String aComment; // Kommentar
-diff -r a8d540977f0a basic/source/inc/parser.hxx
---- a/basic/source/inc/parser.hxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/inc/parser.hxx Tue May 04 10:02:44 2010 +0100
+diff -r 869606102f87 basic/source/inc/parser.hxx
+--- a/basic/source/inc/parser.hxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/inc/parser.hxx Fri May 07 15:08:07 2010 +0100
@@ -37,14 +37,15 @@
@@ -287,10 +287,10 @@ diff -r a8d540977f0a basic/source/inc/parser.hxx
SbxArrayRef rTypeArray; // das Type-Array
SbxArrayRef rEnumArray; // Enum types
SbiStringPool aGblStrings; // der String-Pool
-diff -r a8d540977f0a basic/source/inc/runtime.hxx
---- a/basic/source/inc/runtime.hxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/inc/runtime.hxx Tue May 04 10:02:44 2010 +0100
-@@ -310,6 +310,7 @@
+diff -r 869606102f87 basic/source/inc/runtime.hxx
+--- a/basic/source/inc/runtime.hxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/inc/runtime.hxx Fri May 07 15:08:07 2010 +0100
+@@ -312,6 +312,7 @@
String aLibName; // Lib-Name fuer Declare-Call
SbxArrayRef refParams; // aktuelle Prozedur-Parameter
SbxArrayRef refLocals; // lokale Variable
@@ -298,9 +298,9 @@ diff -r a8d540977f0a basic/source/inc/runtime.hxx
SbxArrayRef refArgv; // aktueller Argv
// AB, 28.3.2000 #74254, Ein refSaveObj reicht nicht! Neu: pRefSaveList (s.u.)
//SbxVariableRef refSaveObj; // #56368 Bei StepElem Referenz sichern
-diff -r a8d540977f0a basic/source/inc/symtbl.hxx
---- a/basic/source/inc/symtbl.hxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/inc/symtbl.hxx Tue May 04 10:02:44 2010 +0100
+diff -r 869606102f87 basic/source/inc/symtbl.hxx
+--- a/basic/source/inc/symtbl.hxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/inc/symtbl.hxx Fri May 07 15:08:07 2010 +0100
@@ -137,6 +137,7 @@
BOOL bParamArray : 1; // TRUE: ParamArray parameter
USHORT nDefaultId; // Symbol number of default value
@@ -309,161 +309,10 @@ diff -r a8d540977f0a basic/source/inc/symtbl.hxx
SbiSymDef( const String& );
virtual ~SbiSymDef();
virtual SbiProcDef* GetProcDef();
-diff -r a8d540977f0a basic/source/runtime/runtime.cxx
---- a/basic/source/runtime/runtime.cxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/runtime/runtime.cxx Tue May 04 10:02:44 2010 +0100
-@@ -93,6 +93,150 @@
- short nArgc; // Argc
- };
-
-+char* aStep0Char[] = {
-+"SbiRuntime::StepNOP",
-+"SbiRuntime::StepEXP",
-+"SbiRuntime::StepMUL",
-+"SbiRuntime::StepDIV",
-+"SbiRuntime::StepMOD",
-+"SbiRuntime::StepPLUS",
-+"SbiRuntime::StepMINUS",
-+"SbiRuntime::StepNEG",
-+"SbiRuntime::StepEQ",
-+"SbiRuntime::StepNE",
-+"SbiRuntime::StepLT",
-+"SbiRuntime::StepGT",
-+"SbiRuntime::StepLE",
-+"SbiRuntime::StepGE",
-+"SbiRuntime::StepIDIV",
-+"SbiRuntime::StepAND",
-+"SbiRuntime::StepOR",
-+"SbiRuntime::StepXOR",
-+"SbiRuntime::StepEQV",
-+"SbiRuntime::StepIMP",
-+"SbiRuntime::StepNOT",
-+"SbiRuntime::StepCAT",
-+"SbiRuntime::StepLIKE",
-+"SbiRuntime::StepIS",
-+"SbiRuntime::StepARGC",
-+"SbiRuntime::StepARGV",
-+"SbiRuntime::StepINPUT",
-+"SbiRuntime::StepLINPUT",
-+"SbiRuntime::StepGET",
-+"SbiRuntime::StepSET",
-+"SbiRuntime::StepPUT",
-+"SbiRuntime::StepPUTC",
-+"SbiRuntime::StepDIM",
-+"SbiRuntime::StepREDIM",
-+"SbiRuntime::StepREDIMP",
-+"SbiRuntime::StepERASE",
-+"SbiRuntime::StepSTOP",
-+"SbiRuntime::StepINITFOR",
-+"SbiRuntime::StepNEXT",
-+"SbiRuntime::StepCASE",
-+"SbiRuntime::StepENDCASE",
-+"SbiRuntime::StepSTDERROR",
-+"SbiRuntime::StepNOERROR",
-+"SbiRuntime::StepLEAVE",
-+"SbiRuntime::StepCHANNEL",
-+"SbiRuntime::StepPRINT",
-+"SbiRuntime::StepPRINTF",
-+"SbiRuntime::StepWRITE",
-+"SbiRuntime::StepRENAME",
-+"SbiRuntime::StepPROMPT",
-+"SbiRuntime::StepRESTART",
-+"SbiRuntime::StepCHANNEL0",
-+"SbiRuntime::StepEMPTY",
-+"SbiRuntime::StepERROR",
-+"SbiRuntime::StepLSET",
-+"SbiRuntime::StepRSET",
-+"SbiRuntime::StepREDIMP_ERASE",
-+"SbiRuntime::StepINITFOREACH",
-+"SbiRuntime::SetVBASET",
-+"SbiRuntime::SetERASE_CLEAR",
-+};
-+
-+char* aStep1Char[] = {
-+"SbiRuntime::StepLOADNC",
-+"SbiRuntime::StepLOADSC",
-+"SbiRuntime::StepLOADI",
-+"SbiRuntime::StepARGN",
-+"SbiRuntime::StepPAD",
-+"SbiRuntime::StepJUMP",
-+"SbiRuntime::StepJUMPT",
-+"SbiRuntime::StepJUMPF",
-+"SbiRuntime::StepONJUMP",
-+"SbiRuntime::StepGOSUB",
-+"SbiRuntime::StepRETURN",
-+"SbiRuntime::StepTESTFOR",
-+"SbiRuntime::StepCASETO",
-+"SbiRuntime::StepERRHDL",
-+"SbiRuntime::StepRESUME",
-+"SbiRuntime::StepCLOSE",
-+"SbiRuntime::StepPRCHAR",
-+"SbiRuntime::StepSETCLASS",
-+"SbiRuntime::StepTESTCLASS",
-+"SbiRuntime::StepLIB",
-+"SbiRuntime::StepBASED",
-+"SbiRuntime::StepARGTYP",
-+};
-+char* aStep2Char[] = {
-+"SbiRuntime::StepRTL",
-+"SbiRuntime::StepFIND",
-+"SbiRuntime::StepELEM",
-+"SbiRuntime::StepPARAM",
-+"SbiRuntime::StepCALL",
-+"SbiRuntime::StepCALLC",
-+"SbiRuntime::StepCASEIS",
-+"SbiRuntime::StepSTMNT",
-+"SbiRuntime::StepOPEN",
-+"SbiRuntime::StepLOCAL",
-+"SbiRuntime::StepPUBLIC",
-+"SbiRuntime::StepGLOBAL",
-+"SbiRuntime::StepCREATE",
-+"SbiRuntime::StepSTATIC",
-+"SbiRuntime::StepTCREATE",
-+"SbiRuntime::StepDCREATE",
-+"SbiRuntime::StepGLOBAL_P",
-+"SbiRuntime::StepFIND_G",
-+"SbiRuntime::StepDCREATE_REDIMP",
-+"SbiRuntime::StepFIND_CM",
-+"SbiRuntime::StepPUBLIC_P",
-+"SbiRuntime::StepFIND_STATIC"
-+};
-+void SbiRuntime::DumpPCode()
-+{
-+ int numBytes = pImg->GetCodeSize();
-+ USHORT nOp1, nOp2;
-+ int i=0;
-+ BYTE* pCodeCopy = (BYTE*)pCode;
-+ for ( ; i< numBytes; i++ )
-+ {
-+ SbiOpcode eOp = (SbiOpcode ) ( *pCodeCopy++ );
-+ if( eOp <= SbOP0_END )
-+ {
-+ OSL_TRACE("Runtime::DumpPCode() aStep0[ %d ] %s",
-+ eOp, aStep0Char[ eOp ] );
-+ }
-+ else if( eOp >= SbOP1_START && eOp <= SbOP1_END )
-+ {
-+ nOp1 = *pCodeCopy++; nOp1 |= *pCodeCopy++ << 8; nOp1 |= *pCodeCopy++ << 16; nOp1 |= *pCodeCopy++ << 24;
-+ i+=2;
-+ OSL_TRACE("Runtime::DumpDumpPCode aStep1[ %d ] %s (%d)",
-+ eOp, aStep1Char[ eOp - SbOP1_START ], nOp1 );
-+ }
-+ else if( eOp >= SbOP2_START && eOp <= SbOP2_END )
-+ {
-+ nOp1 = *pCodeCopy++; nOp1 |= *pCodeCopy++ << 8; nOp1 |= *pCodeCopy++ << 16; nOp1 |= *pCodeCopy++ << 24;
-+ nOp2 = *pCodeCopy++; nOp2 |= *pCodeCopy++ << 8; nOp2 |= *pCodeCopy++ << 16; nOp2 |= *pCodeCopy++ << 24;
-+ i+=8;
-+ OSL_TRACE("Runtime::DumpPCode() aStep2[ %d ] %s (%d, %d)",
-+ eOp, aStep2Char[ eOp - SbOP2_START ], nOp1, nOp2 );
-+ }
-+
-+ }
-+ OSL_TRACE("Count = %d, reported size is %d",i, numBytes);
-+}
- SbiRuntime::pStep0 SbiRuntime::aStep0[] = { // Alle Opcodes ohne Operanden
- &SbiRuntime::StepNOP,
- &SbiRuntime::StepEXP,
-@@ -553,6 +697,7 @@
+diff -r 869606102f87 basic/source/runtime/runtime.cxx
+--- a/basic/source/runtime/runtime.cxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/runtime/runtime.cxx Fri May 07 15:08:07 2010 +0100
+@@ -584,6 +584,7 @@
#endif
pRefSaveList = NULL;
pItemStoreList = NULL;
@@ -471,7 +320,7 @@ diff -r a8d540977f0a basic/source/runtime/runtime.cxx
}
SbiRuntime::~SbiRuntime()
-@@ -568,6 +713,18 @@
+@@ -599,6 +600,18 @@
RefSaveItem* pToDeleteItem = pItemStoreList;
pItemStoreList = pToDeleteItem->pNext;
delete pToDeleteItem;
@@ -490,34 +339,20 @@ diff -r a8d540977f0a basic/source/runtime/runtime.cxx
}
}
-@@ -705,18 +862,23 @@
- UINT32 nOp1, nOp2;
- if( eOp <= SbOP0_END )
- {
-+ OSL_TRACE("Runtime::Step() calling aStep0[ %d ] %s",
-+ eOp, aStep0Char[ eOp ] );
- (this->*( aStep0[ eOp ] ) )();
- }
- else if( eOp >= SbOP1_START && eOp <= SbOP1_END )
- {
- nOp1 = *pCode++; nOp1 |= *pCode++ << 8; nOp1 |= *pCode++ << 16; nOp1 |= *pCode++ << 24;
--
-+ OSL_TRACE("Runtime::Step() calling aStep1[ %d ] %s (%d)",
-+ eOp, aStep1Char[ eOp - SbOP1_START ], nOp1 );
- (this->*( aStep1[ eOp - SbOP1_START ] ) )( nOp1 );
- }
- else if( eOp >= SbOP2_START && eOp <= SbOP2_END )
- {
- nOp1 = *pCode++; nOp1 |= *pCode++ << 8; nOp1 |= *pCode++ << 16; nOp1 |= *pCode++ << 24;
- nOp2 = *pCode++; nOp2 |= *pCode++ << 8; nOp2 |= *pCode++ << 16; nOp2 |= *pCode++ << 24;
-+ OSL_TRACE("Runtime::Step() calling aStep2[ %d ] %s (%d, %d)",
-+ eOp, aStep2Char[ eOp - SbOP2_START ], nOp1, nOp2 );
- (this->*( aStep2[ eOp - SbOP2_START ] ) )( nOp1, nOp2 );
- }
- else
-diff -r a8d540977f0a basic/source/runtime/step2.cxx
---- a/basic/source/runtime/step2.cxx Wed Apr 28 15:31:22 2010 +0100
-+++ b/basic/source/runtime/step2.cxx Tue May 04 10:02:44 2010 +0100
+diff -r 869606102f87 basic/source/runtime/stdobj.cxx
+--- a/basic/source/runtime/stdobj.cxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/runtime/stdobj.cxx Fri May 07 15:08:07 2010 +0100
+@@ -36,6 +36,7 @@
+ #include <basic/sbstdobj.hxx>
+ #include "rtlproto.hxx"
+ #include "sbintern.hxx"
++#include <hash_map>
+
+ // Das nArgs-Feld eines Tabelleneintrags ist wie folgt verschluesselt:
+ // Zur Zeit wird davon ausgegangen, dass Properties keine Parameter
+diff -r 869606102f87 basic/source/runtime/step2.cxx
+--- a/basic/source/runtime/step2.cxx Fri May 07 11:11:46 2010 +0100
++++ b/basic/source/runtime/step2.cxx Fri May 07 15:08:07 2010 +0100
@@ -55,6 +55,17 @@
using com::sun::star::uno::Reference;
@@ -553,7 +388,7 @@ diff -r a8d540977f0a basic/source/runtime/step2.cxx
SbxVariable* pElem = NULL;
if( !pObj )
{
-@@ -81,36 +86,66 @@
+@@ -81,36 +86,68 @@
{
BOOL bFatalError = FALSE;
SbxDataType t = (SbxDataType) nOp2;
@@ -574,7 +409,7 @@ diff -r a8d540977f0a basic/source/runtime/step2.cxx
- nOp1 = nOp1 | 0x8000; // indicate params are present
- aName = String::CreateFromAscii("Evaluate");
- }
-+ String aName;//( pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) ) );
++ String aName;
+
if( bLocal )
{
@@ -607,6 +442,8 @@ diff -r a8d540977f0a basic/source/runtime/step2.cxx
+ aName = pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) );
+ if ( bStatic && pMeth )
pElem = pMeth->GetStatics()->Find( aName, SbxCLASS_DONTCARE );
++ if ( pElem && bVBAEnabled )
++ ( *refLocalDefines )[ nOffSet & 0x7FFF ] = new SbxVariableRef( pElem );
}
+ }
@@ -642,7 +479,7 @@ diff -r a8d540977f0a basic/source/runtime/step2.cxx
// Die RTL brauchen wir nicht mehr zu durchsuchen!
BOOL bSave = rBasic.bNoRtl;
rBasic.bNoRtl = TRUE;
-@@ -171,7 +206,10 @@
+@@ -171,7 +208,10 @@
// deklarierten Vars automatisch global !
if ( bSetName )
pElem->SetName( aName );
@@ -654,7 +491,7 @@ diff -r a8d540977f0a basic/source/runtime/step2.cxx
}
}
-@@ -217,7 +255,10 @@
+@@ -217,7 +257,10 @@
if( t != SbxVARIANT )
pElem->SetFlag( SBX_FIXED );
pElem->SetName( aName );
@@ -666,7 +503,7 @@ diff -r a8d540977f0a basic/source/runtime/step2.cxx
}
}
}
-@@ -294,7 +335,21 @@
+@@ -294,7 +337,21 @@
return NULL;
// Lokal suchen
@@ -689,7 +526,7 @@ diff -r a8d540977f0a basic/source/runtime/step2.cxx
pElem = refLocals->Find( rName, SbxCLASS_DONTCARE );
// In Statics suchen
-@@ -304,7 +359,10 @@
+@@ -304,7 +361,10 @@
String aMethName = pMeth->GetName();
aMethName += ':';
aMethName += rName;
@@ -701,7 +538,7 @@ diff -r a8d540977f0a basic/source/runtime/step2.cxx
}
// In Parameter-Liste suchen
-@@ -608,8 +666,11 @@
+@@ -608,8 +668,11 @@
void
SbiRuntime::StepFIND_Impl( SbxObject* pObj, UINT32 nOp1, UINT32 nOp2, SbError nNotFound, BOOL bLocal, BOOL bStatic )
{
@@ -713,7 +550,7 @@ diff -r a8d540977f0a basic/source/runtime/step2.cxx
PushVar( FindElement( pObj, nOp1, nOp2, nNotFound, bLocal, bStatic ) );
}
// Laden einer lokalen/globalen Variablen (+StringID+Typ)
-@@ -1083,15 +1144,38 @@
+@@ -1083,15 +1146,38 @@
void SbiRuntime::StepLOCAL( UINT32 nOp1, UINT32 nOp2 )
{
More information about the ooo-build-commit
mailing list