[Libreoffice-commits] core.git: bridges/source

2015-08-17 Thread Caolán McNamara
 bridges/source/cpp_uno/shared/vtablefactory.cxx |4 ++--
 bridges/source/jni_uno/jni_base.h   |   10 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit f51994efcd08af992fd9836b700a0c651b120813
Author: Caolán McNamara 
Date:   Mon Aug 17 14:20:43 2015 +0100

cppcheck: noExplicitConstructor

Change-Id: I4bdbcd9debdf6a385d3b6f199b71b09d7e27b0fa
Reviewed-on: https://gerrit.libreoffice.org/17810
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx 
b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 474dfcd..c81bcae 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -122,7 +122,7 @@ class VtableFactory::GuardedBlocks:
 public std::vector, private boost::noncopyable
 {
 public:
-GuardedBlocks(VtableFactory const & factory):
+explicit GuardedBlocks(VtableFactory const & factory):
 m_factory(factory), m_guarded(true) {}
 
 ~GuardedBlocks();
@@ -144,7 +144,7 @@ VtableFactory::GuardedBlocks::~GuardedBlocks() {
 
 class VtableFactory::BaseOffset {
 public:
-BaseOffset(typelib_InterfaceTypeDescription * type) { calculate(type, 0); }
+explicit BaseOffset(typelib_InterfaceTypeDescription * type) { 
calculate(type, 0); }
 
 sal_Int32 getFunctionOffset(OUString const & name) const
 { return m_map.find(name)->second; }
diff --git a/bridges/source/jni_uno/jni_base.h 
b/bridges/source/jni_uno/jni_base.h
index 4fd90ea..62474ea 100644
--- a/bridges/source/jni_uno/jni_base.h
+++ b/bridges/source/jni_uno/jni_base.h
@@ -46,7 +46,7 @@ struct BridgeRuntimeError
 {
 OUString m_message;
 
-inline BridgeRuntimeError( OUString const & message )
+explicit BridgeRuntimeError( OUString const & message )
 : m_message( message )
 {}
 };
@@ -142,20 +142,20 @@ class JLocalAutoRef
 jobject m_jo;
 
 public:
-inline JLocalAutoRef( JNI_context const & jni )
+explicit JLocalAutoRef( JNI_context const & jni )
 : m_jni( jni ),
   m_jo( 0 )
 {}
-inline explicit JLocalAutoRef( JNI_context const & jni, jobject jo )
+explicit JLocalAutoRef( JNI_context const & jni, jobject jo )
 : m_jni( jni ),
   m_jo( jo )
 {}
 inline JLocalAutoRef( JLocalAutoRef & auto_ref );
 inline ~JLocalAutoRef();
 
-inline jobject get() const
+jobject get() const
 { return m_jo; }
-inline bool is() const
+bool is() const
 { return (0 != m_jo); }
 inline jobject release();
 inline void reset( jobject jo );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-08-17 Thread Caolán McNamara
 bridges/source/cpp_uno/msvc_win32_intel/except.cxx |   27 ++---
 1 file changed, 18 insertions(+), 9 deletions(-)

New commits:
commit 31344e41de6f526ace6f660dfe0cbd82a5083baf
Author: Caolán McNamara 
Date:   Mon Aug 17 14:18:44 2015 +0100

cppcheck: various msvc_win32_intel fixes

Change-Id: Iaa9e6e255596bbc47224688a465c31de3c88f78f
Reviewed-on: https://gerrit.libreoffice.org/17808
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index d4b7570..48e5383 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -139,11 +139,11 @@ type_info * RTTInfos::getRTTI( OUString const & rUNOname 
) throw ()
 _allRTTI.insert( t_string2PtrMap::value_type( rUNOname, pRTTI ) ) 
);
 assert(insertion.second && "### rtti insertion failed?!");
 
-return (type_info *)pRTTI;
+return reinterpret_cast(pRTTI);
 }
 else
 {
-return (type_info *)iFind->second;
+return reinterpret_cast(iFind->second);
 }
 }
 
@@ -159,7 +159,7 @@ RTTInfos::~RTTInfos() throw ()
 for ( t_string2PtrMap::const_iterator iPos( _allRTTI.begin() );
   iPos != _allRTTI.end(); ++iPos )
 {
-__type_info * pType = (__type_info *)iPos->second;
+__type_info * pType = reinterpret_cast<__type_info*>(iPos->second);
 pType->~__type_info(); // obsolete, but good style...
 ::rtl_freeMemory( pType );
 }
@@ -274,7 +274,7 @@ struct ExceptionType
 ObjectFunction *_pCopyCtor;
 sal_Int32   _n5;
 
-inline ExceptionType( typelib_TypeDescription * pTypeDescr ) throw ()
+explicit ExceptionType( typelib_TypeDescription * pTypeDescr ) throw ()
 : _n0( 0 )
 , _n1( 0 )
 , _n2( -1 )
@@ -282,9 +282,18 @@ struct ExceptionType
 , _n4( pTypeDescr->nSize )
 , _pCopyCtor( new ObjectFunction( pTypeDescr, copyConstruct ) )
 , _n5( 0 )
-{ _pTypeInfo = msci_getRTTI( pTypeDescr->pTypeName ); }
-inline ~ExceptionType() throw ()
-{ delete _pCopyCtor; }
+{
+_pTypeInfo = msci_getRTTI( pTypeDescr->pTypeName );
+}
+
+~ExceptionType() throw ()
+{
+delete _pCopyCtor;
+}
+
+// Copy assignment is forbidden and not implemented.
+ExceptionType (const ExceptionType &) SAL_DELETED_FUNCTION;
+ExceptionType & operator= (const ExceptionType &) SAL_DELETED_FUNCTION;
 };
 
 struct RaiseInfo
@@ -295,7 +304,7 @@ struct RaiseInfo
 void *  _types;
 sal_Int32   _n3, _n4;
 
-RaiseInfo( typelib_TypeDescription * pTypeDescr ) throw ();
+explicit RaiseInfo( typelib_TypeDescription * pTypeDescr ) throw ();
 ~RaiseInfo() throw ();
 };
 
@@ -369,7 +378,7 @@ ExceptionInfos::~ExceptionInfos() throw ()
 for ( t_string2PtrMap::const_iterator iPos( _allRaiseInfos.begin() );
   iPos != _allRaiseInfos.end(); ++iPos )
 {
-delete (RaiseInfo *)iPos->second;
+delete reinterpret_cast(iPos->second);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-07-13 Thread Heiher
 bridges/source/cpp_uno/gcc3_linux_mips64/cpp2uno.cxx |2 +-
 bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1f99f4a9c816cc106bfbdf229e4ec2bffb343847
Author: Heiher 
Date:   Tue Jul 14 01:24:52 2015 +0800

bridges: mips64: Fix build failure in new codes.

Change-Id: I17fe0fb0ce9341a638b2687e7690777a8de7fa01
Reviewed-on: https://gerrit.libreoffice.org/16980
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/bridges/source/cpp_uno/gcc3_linux_mips64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_mips64/cpp2uno.cxx
index 068bc55..8f510c8 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips64/cpp2uno.cxx
@@ -544,7 +544,7 @@ namespace
 
   unsigned char *  codeSnippet( unsigned char * code,
   sal_Int32 functionIndex, sal_Int32 vtableOffset,
-  bool bHasHiddenParam) SAL_THROW(())
+  bool bHasHiddenParam )
   {
 #ifdef BRDEBUG
  fprintf(stderr,"in codeSnippet functionIndex is %d\n", functionIndex);
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx
index e7cd63f..859ffe5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx
@@ -141,7 +141,7 @@ namespace
   sal_uInt32 nREG)
   {
 // Should not happen, but...
-static_assert( MAX_GP_REGS == MAX_FP_REGS );
+static_assert(MAX_GP_REGS == MAX_FP_REGS, "must be the same size");
 if ( nREG > MAX_GP_REGS )
 nREG = MAX_GP_REGS;
 
@@ -266,7 +266,7 @@ namespace
 // return
 typelib_TypeDescription * pReturnTypeDescr = 0;
 TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-assert( pReturnTypeDescr, "### expected return type description!" );
+assert(pReturnTypeDescr);
 
 void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-07-11 Thread Heiher
 bridges/source/cpp_uno/gcc3_linux_mips64/call.s |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 291e760b7f1e128537cd81ae2c6674e590d4953f
Author: Heiher 
Date:   Fri Jul 10 23:48:23 2015 +0800

bridges: mips64: Update call frame information.

Change-Id: I00bf0eaa69b3276b1baf18f4fa191ceaf1bc2f18
Reviewed-on: https://gerrit.libreoffice.org/16944
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/bridges/source/cpp_uno/gcc3_linux_mips64/call.s 
b/bridges/source/cpp_uno/gcc3_linux_mips64/call.s
index 5787725..8f73a05 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips64/call.s
+++ b/bridges/source/cpp_uno/gcc3_linux_mips64/call.s
@@ -82,8 +82,10 @@ privateSnippetExecutor:
 
 .Lfinish:
 ld $ra,152($sp)
+.cfi_restore 31
 jr $ra
 daddiu $sp,$sp,160
+.cfi_def_cfa_offset 0
 
 .set   reorder
 .end   privateSnippetExecutor
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source testtools/com testtools/source

2015-07-10 Thread Caolan McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |6 ++
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |   16 ++--
 testtools/com/sun/star/comp/bridge/TestComponent.java   |4 
 testtools/source/bridgetest/bridgetest.cxx  |4 
 testtools/source/bridgetest/cli/cli_cs_testobj.cs   |5 +
 testtools/source/bridgetest/cppobj.cxx  |2 ++
 testtools/source/bridgetest/idl/bridgetest.idl  |6 ++
 7 files changed, 37 insertions(+), 6 deletions(-)

New commits:
commit e8ac3b5bd973054c6fd74db017bb448721e2c3e2
Author: Caolan McNamara 
Date:   Fri Jul 10 16:36:41 2015 +0100

ppc64: using a fp register also consumes a gp register slot

Change-Id: Idf6f40081f4598c0fa9d1e10bdc208eae49e4cd1
Reviewed-on: https://gerrit.libreoffice.org/16936
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index 6b58246..6ac003b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -133,6 +133,12 @@ static typelib_TypeClass cpp2uno_call(
 }
 pCppArgs[nPos] = pUnoArgs[nPos] = fpreg++;
 nf++;
+
+if (ng < ppc64::MAX_GPR_REGS)
+{
+ng++;
+gpreg++;
+}
 }
 else
 {
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index 81d3d5c..28dfaf8 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -229,16 +229,20 @@ static void callVirtualMethod(void * pThis, sal_uInt32 
nVtableIndex,
 
 // The value in %xmm register is already prepared to be retrieved as a float,
 // thus we treat float and double the same
-#define INSERT_FLOAT( pSV, nr, pFPR, pDS, bOverflow ) \
-if ( nr < ppc64::MAX_SSE_REGS ) \
+#define INSERT_FLOAT( pSV, nr, pFPR, nGPR, pDS, bOverflow ) \
+if ( nGPR < ppc64::MAX_GPR_REGS ) \
+++nGPR;   \
+if ( nr < ppc64::MAX_SSE_REGS )   \
 pFPR[nr++] = *reinterpret_cast( pSV ); \
 else \
 bOverflow = true; \
 if (bOverflow) \
 *pDS++ = *reinterpret_cast( pSV ); // verbatim!
 
-#define INSERT_DOUBLE( pSV, nr, pFPR, pDS, bOverflow ) \
-if ( nr < ppc64::MAX_SSE_REGS ) \
+#define INSERT_DOUBLE( pSV, nr, pFPR, nGPR, pDS, bOverflow ) \
+if ( nGPR < ppc64::MAX_GPR_REGS ) \
+++nGPR;   \
+if ( nr < ppc64::MAX_SSE_REGS )   \
 pFPR[nr++] = *reinterpret_cast( pSV ); \
 else \
 bOverflow = true; \
@@ -390,10 +394,10 @@ static void cpp_call(
 INSERT_INT8( pCppArgs[nPos], nGPR, pGPR, 
pStack, bOverflow );
 break;
 case typelib_TypeClass_FLOAT:
-INSERT_FLOAT( pCppArgs[nPos], nFPR, pFPR, 
pStack, bOverflow );
+INSERT_FLOAT( pCppArgs[nPos], nFPR, pFPR, 
nGPR, pStack, bOverflow );
 break;
 case typelib_TypeClass_DOUBLE:
-INSERT_DOUBLE( pCppArgs[nPos], nFPR, pFPR, 
pStack, bOverflow );
+INSERT_DOUBLE( pCppArgs[nPos], nFPR, pFPR, 
nGPR, pStack, bOverflow );
 break;
 default:
 break;
diff --git a/testtools/com/sun/star/comp/bridge/TestComponent.java 
b/testtools/com/sun/star/comp/bridge/TestComponent.java
index a6966eb..f8b50f2 100644
--- a/testtools/com/sun/star/comp/bridge/TestComponent.java
+++ b/testtools/com/sun/star/comp/bridge/TestComponent.java
@@ -498,6 +498,10 @@ public class TestComponent {
 return i2;
 }
 
+public int testPPC64Alignment( double d1, double d2, double d3, int i1 
) throws com.sun.star.uno.RuntimeException {
+return i1;
+}
+
 public double testTenDoubles( double d1, double d2, double d3, double 
d4, double d5, double d6, double d7, double d8, double d9, double d10 ) {
 return d1 + d2 + d3 + d4 + d5 + d6 + d7 + d8 + d9 + d10;
 }
diff --git a/testtools/source/bridgetest/bridgetest.cxx 
b/testtools/source/bridgetest/bridgetest.cxx
index 52e337f..d17900f 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -529,6 +529,10 @@ static bool performTest(
 bRet &= check(i2 == 0xBEAF, "ppc-style alignmen

[Libreoffice-commits] core.git: bridges/source

2015-07-10 Thread Caolan McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |   61 ++--
 1 file changed, 24 insertions(+), 37 deletions(-)

New commits:
commit fe14c55f000b9a31d885b411655232e0691e1cd4
Author: Caolan McNamara 
Date:   Fri Jul 10 16:00:22 2015 +0100

ppc64: simplify this a little

Change-Id: I8166f65625d389a604750852d6d5a4fee25a88fa
Reviewed-on: https://gerrit.libreoffice.org/16935
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index 4013076..81d3d5c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -124,6 +124,8 @@ void MapReturn(long r3, long r4, double dret, 
typelib_TypeDescriptionReference*
 if (pReturnType->pType->nSize > 8)
 pRegisters[1] = r4;
 }
+#else
+(void)r4;
 #endif
 default:
 break;
@@ -185,45 +187,29 @@ static void callVirtualMethod(void * pThis, sal_uInt32 
nVtableIndex,
 
 //  fill registers
 __asm__ __volatile__ (
-"ld   3,  0(%0)\n\t"
-"ld   4,  8(%0)\n\t"
-"ld   5, 16(%0)\n\t"
-"ld   6, 24(%0)\n\t"
-"ld   7, 32(%0)\n\t"
-"ld   8, 40(%0)\n\t"
-"ld   9, 48(%0)\n\t"
-"ld  10, 56(%0)\n\t"
-"lfd  1,  0(%1)\n\t"
-"lfd  2,  8(%1)\n\t"
-"lfd  3, 16(%1)\n\t"
-"lfd  4, 24(%1)\n\t"
-"lfd  5, 32(%1)\n\t"
-"lfd  6, 40(%1)\n\t"
-"lfd  7, 48(%1)\n\t"
-"lfd  8, 56(%1)\n\t"
-"lfd  9, 64(%1)\n\t"
-"lfd 10, 72(%1)\n\t"
-"lfd 11, 80(%1)\n\t"
-"lfd 12, 88(%1)\n\t"
-"lfd 13, 96(%1)\n\t"
-: : "r" (pGPR), "r" (pFPR)
-  : "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",
-  "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", "fr8", 
"fr9",
-  "fr10", "fr11", "fr12", "fr13"
+"lfd  1,  0(%0)\n\t"
+"lfd  2,  8(%0)\n\t"
+"lfd  3, 16(%0)\n\t"
+"lfd  4, 24(%0)\n\t"
+"lfd  5, 32(%0)\n\t"
+"lfd  6, 40(%0)\n\t"
+"lfd  7, 48(%0)\n\t"
+"lfd  8, 56(%0)\n\t"
+"lfd  9, 64(%0)\n\t"
+"lfd 10, 72(%0)\n\t"
+"lfd 11, 80(%0)\n\t"
+"lfd 12, 88(%0)\n\t"
+"lfd 13, 96(%0)\n\t"
+: : "r" (pFPR)
+  : "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", "fr8", "fr9",
+"fr10", "fr11", "fr12", "fr13"
 );
 
 // tell gcc that r3 to r11 are not available to it for doing the TOC and 
exception munge on the func call
 register sal_uInt64 r3 asm("r3");
 register sal_uInt64 r4 asm("r4");
-register sal_uInt64 r5 asm("r5");
-register sal_uInt64 r6 asm("r6");
-register sal_uInt64 r7 asm("r7");
-register sal_uInt64 r8 asm("r8");
-register sal_uInt64 r9 asm("r9");
-register sal_uInt64 r10 asm("r10");
-register sal_uInt64 r11 asm("r11");
 
-(*pFunc)(r3, r4, r5, r6, r7, r8, r9, r10);
+(*pFunc)(pGPR[0], pGPR[1], pGPR[2], pGPR[3], pGPR[4], pGPR[5], pGPR[6], 
pGPR[7]);
 
 // get return value
 __asm__ __volatile__ (
@@ -375,7 +361,6 @@ static void cpp_call(
 
 if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( 
pParamTypeDescr ))
 {
-//  uno_copyAndConvertData( pCppArgs[nPos] = alloca( 8 ), 
pUnoArgs[nPos], pParamTypeDescr,
 uno_copyAndConvertData( pCppArgs[nPos] = pStack, pUnoArgs[nPos], 
pParamTypeDescr,
 pThis->getBridge()->getUno2Cpp() );
 switch (pParamTypeDescr->eTypeClass)
@@ -383,7 +368,7 @@ static void cpp_call(
 case typelib_TypeClass_HYPER:
 case typelib_TypeClass_UNSIGNED_HYPER:
 #if OSL_DEBUG_LEVEL > 2
-fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]);
+fprintf(stderr, "hyper is %lx\n", 
pCppArgs[nPos]);
 #endif
 INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, 
pStack, bOverflow );
 break;
@@ -391,7 +376,7 @@ static void cpp_call(
 case typelib_TypeClass_UNSIGNED_LONG:
 case typelib_TypeClass_ENUM:
 #if OSL_DEBUG_LEVEL > 2
-fprintf(stderr, "long is %x\n", pCppArgs[nPos]);
+fprintf(stderr, "long is %x\n", 
pCppArgs[nPos]);
 #endif
 INSERT_INT32( pCppArgs[nPos], nGPR, pGPR, 
pStack, bOverflow );
 break;
@@ -406,10 +391,12 

[Libreoffice-commits] core.git: bridges/source include/ucbhelper io/source pyuno/inc

2015-07-02 Thread Noel Grandin
 bridges/source/jni_uno/jni_base.h|8 
 include/ucbhelper/interactionrequest.hxx |   17 -
 include/ucbhelper/propertyvalueset.hxx   |   25 -
 include/ucbhelper/resultsethelper.hxx|   12 
 io/source/stm/streamhelper.cxx   |   11 ---
 io/source/stm/streamhelper.hxx   |3 ---
 pyuno/inc/pyuno/pyuno.hxx|8 
 7 files changed, 84 deletions(-)

New commits:
commit 1a7e0cfd86c03607f9009aec40dbfa5d43de0c8e
Author: Noel Grandin 
Date:   Thu Jul 2 09:40:48 2015 +0200

loplugin:unusedmethods bridges,ucbhelper,io,pyuno

Change-Id: I483deb33b9d861af679d4a36e13585345401e10d
Reviewed-on: https://gerrit.libreoffice.org/16681
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/bridges/source/jni_uno/jni_base.h 
b/bridges/source/jni_uno/jni_base.h
index af93d6a..4fd90ea 100644
--- a/bridges/source/jni_uno/jni_base.h
+++ b/bridges/source/jni_uno/jni_base.h
@@ -158,7 +158,6 @@ public:
 inline bool is() const
 { return (0 != m_jo); }
 inline jobject release();
-inline void reset();
 inline void reset( jobject jo );
 inline JLocalAutoRef & operator = ( JLocalAutoRef & auto_ref );
 };
@@ -183,13 +182,6 @@ inline jobject JLocalAutoRef::release()
 return jo;
 }
 
-inline void JLocalAutoRef::reset()
-{
-if (0 != m_jo)
-m_jni->DeleteLocalRef( m_jo );
-m_jo = 0;
-}
-
 inline void JLocalAutoRef::reset( jobject jo )
 {
 if (jo != m_jo)
diff --git a/include/ucbhelper/interactionrequest.hxx 
b/include/ucbhelper/interactionrequest.hxx
index d0996d7..2cba1ca 100644
--- a/include/ucbhelper/interactionrequest.hxx
+++ b/include/ucbhelper/interactionrequest.hxx
@@ -529,14 +529,6 @@ public:
 const OUString & getPassword() const { return m_aPassword; }
 
 /**
-  * This method returns the account that was supplied by the interaction
-  * handler.
-  *
-  * @return the account.
-  */
-const OUString & getAccount()  const { return m_aAccount; }
-
-/**
   * This method returns the authentication remember-mode for the password
   * that was supplied by the interaction handler.
   *
@@ -545,15 +537,6 @@ public:
 const com::sun::star::ucb::RememberAuthentication &
 getRememberPasswordMode() const { return m_eRememberPasswordMode; }
 
-/**
-  * This method returns the authentication remember-mode for the account
-  * that was supplied by the interaction handler.
-  *
-  * @return the remember-mode for the account.
-  */
-const com::sun::star::ucb::RememberAuthentication &
-getRememberAccountMode() const { return m_eRememberAccountMode; }
-
 bool getUseSystemCredentials() const { return m_bUseSystemCredentials; }
 };
 
diff --git a/include/ucbhelper/propertyvalueset.hxx 
b/include/ucbhelper/propertyvalueset.hxx
index c557373..09f5564 100644
--- a/include/ucbhelper/propertyvalueset.hxx
+++ b/include/ucbhelper/propertyvalueset.hxx
@@ -193,62 +193,37 @@ public:
 
 // Non-interface methods
 
-
 void appendString( const OUString& rPropName, const OUString& rValue );
-void appendString( const sal_Char* pAsciiPropName, const OUString& rValue )
-{
-appendString( OUString::createFromAscii( pAsciiPropName ), rValue );
-}
 void appendString( const ::com::sun::star::beans::Property& rProp, const 
OUString& rValue )
 {
 appendString( rProp.Name, rValue );
 }
 
 void appendBoolean( const OUString& rPropName, bool bValue );
-void appendBoolean( const sal_Char* pAsciiPropName, bool bValue )
-{
-appendBoolean( OUString::createFromAscii( pAsciiPropName ), bValue );
-}
 void appendBoolean( const ::com::sun::star::beans::Property& rProp, bool 
bValue )
 {
 appendBoolean( rProp.Name, bValue );
 }
 
 void appendLong( const OUString& rPropName, sal_Int64 nValue );
-void appendLong( const sal_Char* pAsciiPropName, sal_Int64 nValue )
-{
-appendLong( OUString::createFromAscii( pAsciiPropName ), nValue );
-}
 void appendLong( const ::com::sun::star::beans::Property& rProp, sal_Int64 
nValue )
 {
 appendLong( rProp.Name, nValue );
 }
 
 void appendTimestamp( const OUString& rPropName, const 
::com::sun::star::util::DateTime& rValue );
-void appendTimestamp( const sal_Char* pAsciiPropName, const 
::com::sun::star::util::DateTime& rValue )
-{
-appendTimestamp( OUString::createFromAscii( pAsciiPropName ), rValue );
-}
 void appendTimestamp( const ::com::sun::star::beans::Property& rProp, 
const ::com::sun::star::util::DateTime& rValue )
 {
 appendTimestamp( rProp.Name, rValue );
 }
 
 void appendObject( const OUString& rPropName, const 
::com::sun::star::uno::Any& rValue );
-void appendObject( const sal_Char* pAsciiPropName, const 
::com::sun::star::uno::Any& rValue )
-{
-appendObject

[Libreoffice-commits] core.git: bridges/source

2015-06-26 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx |5 +++--
 bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx  |5 -
 2 files changed, 3 insertions(+), 7 deletions(-)

New commits:
commit c1e12b15e55a82f062960f40921e0c97afda2078
Author: Stephan Bergmann 
Date:   Fri Jun 26 17:35:41 2015 +0200

Use declarations from cxxabi.h

Change-Id: Ie9bf973e87bf571e19ba036dac3a41054eaed568
Reviewed-on: https://gerrit.libreoffice.org/16520
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index fb579a2..ab601dd 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 #include "com/sun/star/uno/RuntimeException.hpp"
@@ -290,7 +291,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
 OUString::unacquired( &pUnoExc->pType->pTypeName ) );
 }
 
-pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
+pCppExc = __cxxabiv1::__cxa_allocate_exception( pTypeDescr->nSize );
 ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
 
 // destruct uno exception
@@ -321,7 +322,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
 }
 }
 
-__cxa_throw( pCppExc, rtti, deleteException );
+__cxxabiv1::__cxa_throw( pCppExc, rtti, deleteException );
 }
 
 void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, 
uno_Mapping * pCpp2Uno )
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
index 0c7bbbf..5d9ca46 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
@@ -133,11 +133,6 @@ extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals 
*__cxa_get_globals () throw(
 namespace CPPU_CURRENT_NAMESPACE
 {
 
-extern "C" void *__cxa_allocate_exception(
-std::size_t thrown_size ) throw();
-extern "C" void __cxa_throw (
-void *thrown_exception, void *tinfo, void (*dest) (void *) ) 
__attribute__((noreturn));
-
 void raiseException(
 uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source include/formula include/o3tl sw/inc

2015-06-26 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx |2 
 bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx   |8 
 bridges/source/cpp_uno/mingw_intel/share.hxx  |   13 -
 bridges/source/cpp_uno/mingw_x86-64/share.hxx |   13 -
 include/formula/tokenarray.hxx|4 
 include/o3tl/typed_flags_set.hxx  |  115 --
 include/o3tl/underlying_type.hxx  |   32 --
 sw/inc/ring.hxx   |6 
 8 files changed, 57 insertions(+), 136 deletions(-)

New commits:
commit 3a68a7dcf49f7be95086b747c8426aa310307e49
Author: Stephan Bergmann 
Date:   Fri Jun 26 17:28:43 2015 +0200

Remove workarounds for no longer supported GCC 4.6

In bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx, the #if also covered
Clang, which actually needs these declarations (for now; the right fix will
probably be to #include ).

Change-Id: I1eebd59e2371f3498d740ab78244927358c4f23f

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx 
b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
index 15b357b..af20806 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
@@ -58,7 +58,7 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 // unexpected size of int
 assert(nStackLongs && pStackLongs); // no stack
 
-#if defined __clang__ || __GNUC__ == 4 && __GNUC_MINOR__ <= 6
+#if defined __clang__
 if (! pAdjustedThisPtr) 
CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
 #endif
 
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
index 0185a2c..0c7bbbf 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
@@ -133,18 +133,10 @@ extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals 
*__cxa_get_globals () throw(
 namespace CPPU_CURRENT_NAMESPACE
 {
 
-// The following are in cxxabi.h since GCC 4.7 (they are wrapped in
-// CPPU_CURRENT_NAMESPACE here as different GCC versions have slightly 
different
-// declarations for them, e.g., with or without throw() specification, so would
-// complain about redeclarations of these somewhat implicitly declared
-// functions):
-#if __GNUC__ == 4 && __GNUC_MINOR__ <= 6
 extern "C" void *__cxa_allocate_exception(
 std::size_t thrown_size ) throw();
 extern "C" void __cxa_throw (
 void *thrown_exception, void *tinfo, void (*dest) (void *) ) 
__attribute__((noreturn));
-#endif
-
 
 void raiseException(
 uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
diff --git a/bridges/source/cpp_uno/mingw_intel/share.hxx 
b/bridges/source/cpp_uno/mingw_intel/share.hxx
index b39ed6b..0ce7423 100644
--- a/bridges/source/cpp_uno/mingw_intel/share.hxx
+++ b/bridges/source/cpp_uno/mingw_intel/share.hxx
@@ -84,19 +84,6 @@ extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals 
*__cxa_get_globals () throw(
 namespace CPPU_CURRENT_NAMESPACE
 {
 
-// The following are in cxxabi.h since GCC 4.7 (they are wrapped in
-// CPPU_CURRENT_NAMESPACE here as different GCC versions have slightly 
different
-// declarations for them, e.g., with or without throw() specification, so would
-// complain about redeclarations of these somewhat implicitly declared
-// functions):
-#if __GNUC__ == 4 && __GNUC_MINOR__ <= 6
-extern "C" void *__cxa_allocate_exception(
-std::size_t thrown_size ) throw();
-extern "C" void __cxa_throw (
-void *thrown_exception, void *tinfo, void (*dest) (void *) ) 
__attribute__((noreturn));
-#endif
-
-
 void raiseException(
 uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
 
diff --git a/bridges/source/cpp_uno/mingw_x86-64/share.hxx 
b/bridges/source/cpp_uno/mingw_x86-64/share.hxx
index 61d278d..8093820 100644
--- a/bridges/source/cpp_uno/mingw_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/mingw_x86-64/share.hxx
@@ -79,19 +79,6 @@ extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals 
*__cxa_get_globals () throw(
 namespace CPPU_CURRENT_NAMESPACE
 {
 
-// The following are in cxxabi.h since GCC 4.7 (they are wrapped in
-// CPPU_CURRENT_NAMESPACE here as different GCC versions have slightly 
different
-// declarations for them, e.g., with or without throw() specification, so would
-// complain about redeclarations of these somewhat implicitly declared
-// functions):
-#if __GNUC__ == 4 && __GNUC_MINOR__ <= 6
-extern "C" void *__cxa_allocate_exception(
-std::size_t thrown_size ) throw();
-extern "C" void __cxa_throw (
-void *thrown_exception, void *tinfo, void (*dest) (void *) ) 
__attribute__((noreturn));
-#endif
-
-
 void raiseException(
 uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
 
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 58bb092..6d577ea 100644
--- a/i

[Libreoffice-commits] core.git: bridges/source

2015-06-22 Thread Stephan Bergmann
 bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 04834f4ad1682e7853536ffcdd9b19a9848c4c70
Author: Stephan Bergmann 
Date:   Mon Jun 22 16:47:39 2015 +0200

MSVC 64-bit: In queryInterface optimization, copy hidden ret val addr

...to location where privateSnippetExecutor will pick it up to return it 
from
RAX.

Change-Id: I59b8db1a12177a3c4da4c810770bee4ace295115

diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx 
b/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx
index d7f534d..4f1905c 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx
@@ -332,6 +332,7 @@ extern "C" typelib_TypeClass cpp_vtable_call(
 pInterface->release();
 TYPELIB_DANGER_RELEASE( pTD );
 
+pStack[0] = pStack[3];
 eRet = typelib_TypeClass_ANY;
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-06-15 Thread Stephan Bergmann
 bridges/source/jni_uno/jni_data.cxx |   57 
 1 file changed, 32 insertions(+), 25 deletions(-)

New commits:
commit dfba745437324b8e1a352ab5280c665c543fc37f
Author: Stephan Bergmann 
Date:   Mon Jun 15 16:58:21 2015 +0200

Work around change in JNI func sigs between Java 6 and 7

Change-Id: I8f6a988ef8bd3642fe6997170dfb50935e6bf3b6

diff --git a/bridges/source/jni_uno/jni_data.cxx 
b/bridges/source/jni_uno/jni_data.cxx
index d1f36ed..3e3ed84 100644
--- a/bridges/source/jni_uno/jni_data.cxx
+++ b/bridges/source/jni_uno/jni_data.cxx
@@ -1160,6 +1160,13 @@ void Bridge::map_to_java(
 bool in_param, bool out_param,
 bool special_wrapped_integral_types ) const
 {
+// 4th param of Set*ArrayRegion changed from pointer to non-const to 
pointer
+// to const between  and ; work around that
+// difference in a way that doesn't trigger loplugin:redundantcast:
+void * data = const_cast(uno_data);
+
 switch (type->eTypeClass)
 {
 case typelib_TypeClass_CHAR:
@@ -1172,7 +1179,7 @@ void Bridge::map_to_java(
 if (in_param)
 {
 jni->SetCharArrayRegion(
-static_cast(jo_ar.get()), 0, 1, 
static_cast(uno_data) );
+static_cast(jo_ar.get()), 0, 1, 
static_cast(data) );
 jni.ensure_no_exception();
 }
 java_data->l = jo_ar.release();
@@ -1182,7 +1189,7 @@ void Bridge::map_to_java(
 if (in_param)
 {
 jni->SetCharArrayRegion(
-static_cast(java_data->l), 0, 1, 
static_cast(uno_data) );
+static_cast(java_data->l), 0, 1, 
static_cast(data) );
 jni.ensure_no_exception();
 }
 }
@@ -1212,7 +1219,7 @@ void Bridge::map_to_java(
 {
 jni->SetBooleanArrayRegion(
 static_cast(jo_ar.get()),
-0, 1, static_cast(uno_data) );
+0, 1, static_cast(data) );
 jni.ensure_no_exception();
 }
 java_data->l = jo_ar.release();
@@ -1223,7 +1230,7 @@ void Bridge::map_to_java(
 {
 jni->SetBooleanArrayRegion(
 static_cast(java_data->l),
-0, 1, static_cast(uno_data) );
+0, 1, static_cast(data) );
 jni.ensure_no_exception();
 }
 }
@@ -1252,7 +1259,7 @@ void Bridge::map_to_java(
 if (in_param)
 {
 jni->SetByteArrayRegion(
-static_cast(jo_ar.get()), 0, 1, 
static_cast(uno_data) );
+static_cast(jo_ar.get()), 0, 1, 
static_cast(data) );
 jni.ensure_no_exception();
 }
 java_data->l = jo_ar.release();
@@ -1262,7 +1269,7 @@ void Bridge::map_to_java(
 if (in_param)
 {
 jni->SetByteArrayRegion(
-static_cast(java_data->l), 0, 1, 
static_cast(uno_data) );
+static_cast(java_data->l), 0, 1, 
static_cast(data) );
 jni.ensure_no_exception();
 }
 }
@@ -1292,7 +1299,7 @@ void Bridge::map_to_java(
 if (in_param)
 {
 jni->SetShortArrayRegion(
-static_cast(jo_ar.get()), 0, 1, 
static_cast(uno_data) );
+static_cast(jo_ar.get()), 0, 1, 
static_cast(data) );
 jni.ensure_no_exception();
 }
 java_data->l = jo_ar.release();
@@ -1302,7 +1309,7 @@ void Bridge::map_to_java(
 if (in_param)
 {
 jni->SetShortArrayRegion(
-static_cast(java_data->l), 0, 1, 
static_cast(uno_data) );
+static_cast(java_data->l), 0, 1, 
static_cast(data) );
 jni.ensure_no_exception();
 }
 }
@@ -1332,7 +1339,7 @@ void Bridge::map_to_java(
 if (in_param)
 {
 jni->SetIntArrayRegion(
-static_cast(jo_ar.get()), 0, 1, 
static_cast(uno_data) );
+static_cast(jo_ar.get()), 0, 1, 
static_cast(data) );
 jni.ensure_no_exception();
 }
 java_data->l = jo_ar.release();
@@ -1342,7 +1349,7 @@ void Bridge::map_to_java(
 if (in_param)
 {
 jni->SetIntArrayRegion(
-

[Libreoffice-commits] core.git: bridges/source

2015-04-27 Thread David Tardon
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |   65 +++-
 1 file changed, 29 insertions(+), 36 deletions(-)

New commits:
commit fe7fa0baffe2cbc282eb3108be53762b919396c1
Author: David Tardon 
Date:   Mon Apr 27 11:37:07 2015 -0400

ppc64: do not use asm block to retrieve args

Some versions of gcc clobber one of the registries that are used to pass
arguments in the function's prologue, like:

Dump of assembler code for function (anonymous 
namespace)::privateSnippetExecutor():
510 {
   0x3fffaffe8454 <+0>: mflrr0
   0x3fffaffe8458 <+4>: std r0,16(r1)
   0x3fffaffe845c <+8>: std r29,-24(r1)
   0x3fffaffe8460 <+12>:std r30,-16(r1)
   0x3fffaffe8464 <+16>:std r31,-8(r1)
   0x3fffaffe8468 <+20>:stdur1,-352(r1)
   0x3fffaffe846c <+24>:mr  r31,r1
=> 0x3fffaffe8470 <+28>:ld  r8,-28688(r13)
   0x3fffaffe8474 <+32>:std r8,312(r31)
   0x3fffaffe8478 <+36>:li  r8,0

Reading the registries through variables makes gcc aware that they are
used, so it does not touch them. It has got no negative effect on
performance, as it produces the same object code as the current asm
block.

Change-Id: I3b99b0aa9944f9f33de9a42508e9d4dd23cec5e0

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index 0748d24..6b58246 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -510,49 +510,42 @@ static typelib_TypeClass cpp_mediate(
 extern "C" void privateSnippetExecutor( ... )
 {
 sal_uInt64 gpreg[ppc64::MAX_GPR_REGS];
+
+register long r3 asm("r3"); gpreg[0] = r3;
+register long r4 asm("r4"); gpreg[1] = r4;
+register long r5 asm("r5"); gpreg[2] = r5;
+register long r6 asm("r6"); gpreg[3] = r6;
+register long r7 asm("r7"); gpreg[4] = r7;
+register long r8 asm("r8"); gpreg[5] = r8;
+register long r9 asm("r9"); gpreg[6] = r9;
+register long r10 asm("r10"); gpreg[7] = r10;
+
 double fpreg[ppc64::MAX_SSE_REGS];
 
 __asm__ __volatile__ (
-"std 3,   0(%0)\t\n"
-"std 4,   8(%0)\t\n"
-"std 5,  16(%0)\t\n"
-"std 6,  24(%0)\t\n"
-"std 7,  32(%0)\t\n"
-"std 8,  40(%0)\t\n"
-"std 9,  48(%0)\t\n"
-"std 10, 56(%0)\t\n"
-"stfd 1,   0(%1)\t\n"
-"stfd 2,   8(%1)\t\n"
-"stfd 3,  16(%1)\t\n"
-"stfd 4,  24(%1)\t\n"
-"stfd 5,  32(%1)\t\n"
-"stfd 6,  40(%1)\t\n"
-"stfd 7,  48(%1)\t\n"
-"stfd 8,  56(%1)\t\n"
-"stfd 9,  64(%1)\t\n"
-"stfd 10, 72(%1)\t\n"
-"stfd 11, 80(%1)\t\n"
-"stfd 12, 88(%1)\t\n"
-"stfd 13, 96(%1)\t\n"
-: : "r" (gpreg), "r" (fpreg)
-: "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11",
-  "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", "fr8", "fr9",
+"stfd 1,   0(%0)\t\n"
+"stfd 2,   8(%0)\t\n"
+"stfd 3,  16(%0)\t\n"
+"stfd 4,  24(%0)\t\n"
+"stfd 5,  32(%0)\t\n"
+"stfd 6,  40(%0)\t\n"
+"stfd 7,  48(%0)\t\n"
+"stfd 8,  56(%0)\t\n"
+"stfd 9,  64(%0)\t\n"
+"stfd 10, 72(%0)\t\n"
+"stfd 11, 80(%0)\t\n"
+"stfd 12, 88(%0)\t\n"
+"stfd 13, 96(%0)\t\n"
+: : "r" (fpreg)
+: "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", "fr8", "fr9",
   "fr10", "fr11", "fr12", "fr13"
 );
 
-volatile long nOffsetAndIndex;
-
-//mr %r3, %r11# move into arg1 the 64bit value passed from OOo
-__asm__ __volatile__ (
-"mr %0,11\n\t"
-: "=r" (nOffsetAndIndex) : );
-
-volatile long sp;
+register long r11 asm("r11");
+const long nOffsetAndIndex = r11;
 
-//stack pointer
-__asm__ __volatile__ (
-"mr %0,1\n\t"
-: "=r" (sp) : );
+register long r1 asm("r1");
+const long sp = r1;
 
 #if defined(_CALL_ELF) && _CALL_ELF == 2
 volatile long nRegReturn[2];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-04-07 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx |   16 
 bridges/source/cpp_uno/gcc3_linux_intel/except.cxx  |4 ++--
 bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx |   12 ++--
 3 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 93b4ec39e23aa0662fd4638074af74bda3934f91
Author: Stephan Bergmann 
Date:   Tue Apr 7 10:46:18 2015 +0200

loplugin:cstylecast, loplugin:redundantcast

Change-Id: If5d839b05c1babecc84b76d2bcdf47009d0f713c

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
index 39455a9..88fc904 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
@@ -45,7 +45,7 @@ void cpp2uno_call(
 void * pReturnValue )
 {
 // pCallStack: ret, [return ptr], this, params
-char * pCppStack = (char *)(pCallStack +1);
+char * pCppStack = reinterpret_cast(pCallStack +1);
 
 // return
 typelib_TypeDescription * pReturnTypeDescr = 0;
@@ -78,12 +78,12 @@ void cpp2uno_call(
 // stack space
 static_assert(sizeof(void *) == sizeof(sal_Int32), "### unexpected size!");
 // parameters
-void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
+void ** pUnoArgs = static_cast(alloca( 4 * sizeof(void *) * 
nParams ));
 void ** pCppArgs = pUnoArgs + nParams;
 // indices of values this have to be converted (interface conversion 
cpp<=>uno)
-sal_Int32 * pTempIndices = (sal_Int32 *)(pUnoArgs + (2 * nParams));
+sal_Int32 * pTempIndices = reinterpret_cast(pUnoArgs + (2 * 
nParams));
 // type descriptions for reconversions
-typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription 
**)(pUnoArgs + (3 * nParams));
+typelib_TypeDescription ** ppTempParamTypeDescr = 
reinterpret_cast(pUnoArgs + (3 * nParams));
 
 sal_Int32 nTempIndices   = 0;
 
@@ -248,7 +248,7 @@ extern "C" void cpp_vtable_call(
 ("illegal " + OUString::unacquired(&pTypeDescr->aBase.pTypeName)
  + " vtable index " + OUString::number(nFunctionIndex) + "/"
  + OUString::number(pTypeDescr->nMapFunctionIndexToMemberIndex)),
-(XInterface *)pThis);
+static_cast(pThis));
 }
 
 // determine called method
@@ -301,7 +301,7 @@ extern "C" void cpp_vtable_call(
 case 0: // queryInterface() opt
 {
 typelib_TypeDescription * pTD = 0;
-TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( 
pCallStack[3] )->getTypeLibType() );
+TYPELIB_DANGER_GET( &pTD, static_cast< Type * >( pCallStack[3] 
)->getTypeLibType() );
 if (pTD)
 {
 XInterface * pInterface = 0;
@@ -313,7 +313,7 @@ extern "C" void cpp_vtable_call(
 if (pInterface)
 {
 ::uno_any_construct(
-reinterpret_cast< uno_Any * >( pCallStack[1] ),
+static_cast< uno_Any * >( pCallStack[1] ),
 &pInterface, pTD, cpp_acquire );
 pInterface->release();
 TYPELIB_DANGER_RELEASE( pTD );
@@ -335,7 +335,7 @@ extern "C" void cpp_vtable_call(
 }
 default:
 {
-throw RuntimeException( "no member description found!", (XInterface 
*)pThis );
+throw RuntimeException( "no member description found!", 
static_cast(pThis) );
 }
 }
 }
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx 
b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
index ba6fb5e..f26e4ea 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
@@ -142,7 +142,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription 
*pTypeDescr )
 #if defined(FREEBSD) && __FreeBSD_version < 702104 /* #i22253# */
 rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
 #else
-rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
+rtti = static_cast(dlsym( m_hApp, symName.getStr() ));
 #endif
 
 if (rtti)
@@ -200,7 +200,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription 
*pTypeDescr )
 extern "C" {
 static void _GLIBCXX_CDTOR_CALLABI deleteException( void * pExc )
 {
-__cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
+__cxa_exception const * header = static_cast<__cxa_exception const 
*>(pExc) - 1;
 typelib_TypeDescription * pTD = 0;
 OUString unoName( toUNOname( header->exceptionType->name() ) );
 ::typelib_typedescription_getByName( &pTD, unoName.pData );
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
index 9191bb2..351bac1 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
@@ -46,7 +46,7 @@ static void cpp_call(
 {
   // max sp

[Libreoffice-commits] core.git: bridges/source

2015-04-02 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx   |2 
 bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx |   10 -
 bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx   |4 
 bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx   |   80 
+-
 4 files changed, 55 insertions(+), 41 deletions(-)

New commits:
commit f4796210b4955019a4f51b29549646fa067e9ae8
Author: Stephan Bergmann 
Date:   Thu Apr 2 19:20:26 2015 +0200

loplugin:redundantcast

Change-Id: I43264a975febf0d62271ab4e7d8cc96246956124

diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx
index bdcc818..36de6da 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx
@@ -306,7 +306,7 @@ void x86_64::fill_struct( typelib_TypeDescriptionReference 
*pTypeRef, const sal_
 
 n = classify_argument( pTypeRef, classes, 0 );
 
-sal_uInt64 *pStructAlign = reinterpret_cast( pStruct );
+sal_uInt64 *pStructAlign = static_cast( pStruct );
 for ( n--; n >= 0; n-- )
 switch ( classes[n] )
 {
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
index 86a81dc..edae16e 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
@@ -133,25 +133,25 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 {
 case typelib_TypeClass_HYPER:
 case typelib_TypeClass_UNSIGNED_HYPER:
-*reinterpret_cast( pRegisterReturn ) = data.rax;
+*static_cast( pRegisterReturn ) = data.rax;
 break;
 case typelib_TypeClass_LONG:
 case typelib_TypeClass_UNSIGNED_LONG:
 case typelib_TypeClass_ENUM:
-*reinterpret_cast( pRegisterReturn ) = 
*reinterpret_cast( &data.rax );
+*static_cast( pRegisterReturn ) = 
*reinterpret_cast( &data.rax );
 break;
 case typelib_TypeClass_CHAR:
 case typelib_TypeClass_SHORT:
 case typelib_TypeClass_UNSIGNED_SHORT:
-*reinterpret_cast( pRegisterReturn ) = 
*reinterpret_cast( &data.rax );
+*static_cast( pRegisterReturn ) = 
*reinterpret_cast( &data.rax );
 break;
 case typelib_TypeClass_BOOLEAN:
 case typelib_TypeClass_BYTE:
-*reinterpret_cast( pRegisterReturn ) = 
*reinterpret_cast( &data.rax );
+*static_cast( pRegisterReturn ) = 
*reinterpret_cast( &data.rax );
 break;
 case typelib_TypeClass_FLOAT:
 case typelib_TypeClass_DOUBLE:
-*reinterpret_cast( pRegisterReturn ) = data.xmm0;
+*static_cast( pRegisterReturn ) = data.xmm0;
 break;
 default:
 {
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
index ae877ac..22e38bc 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
@@ -340,7 +340,7 @@ typelib_TypeClass cpp_vtable_call(
 case 0: // queryInterface() opt
 {
 typelib_TypeDescription * pTD = 0;
-TYPELIB_DANGER_GET( &pTD, reinterpret_cast( 
gpreg[2] )->getTypeLibType() );
+TYPELIB_DANGER_GET( &pTD, static_cast( gpreg[2] 
)->getTypeLibType() );
 if ( pTD )
 {
 XInterface * pInterface = 0;
@@ -352,7 +352,7 @@ typelib_TypeClass cpp_vtable_call(
 
 if ( pInterface )
 {
-::uno_any_construct( reinterpret_cast( 
gpreg[0] ),
+::uno_any_construct( static_cast( 
gpreg[0] ),
  &pInterface, pTD, cpp_acquire 
);
 
 pInterface->release();
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
index 8b7ac55..6516fcd 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
@@ -40,7 +40,9 @@
 
 using namespace ::com::sun::star::uno;
 
-// Macros for easier insertion of values to registers or stack
+namespace {
+
+// Functions for easier insertion of values to registers or stack
 // pSV - pointer to the source
 // nr - order of the value [will be increased if stored to register]
 // pFPR, pGPR - pointer to the registers
@@ -48,38 +50,50 @@ using namespace ::com::sun::star::uno;
 
 // The value in %xmm register is already prepared to be retrieved as a float,
 // thus we treat float and double the same
-#define INSERT_FLOAT_DOUBLE( pSV, nr, pFPR, pDS ) \
-if ( nr < x86_64::MAX_SSE_REGS ) \
-pFPR[nr++] = *reinterpret_cast( pSV ); \
-else \
-*pDS++ = *reinterpret_cast( pSV ); /

[Libreoffice-commits] core.git: bridges/source

2015-03-31 Thread Michael Stahl
 bridges/source/cpp_uno/msvc_win32_intel/except.cxx  |2 +-
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9f2e07aadbf721488aadf19b4891829b7ebedb97
Author: Michael Stahl 
Date:   Tue Mar 31 20:43:58 2015 +0200

bridges: acquire is not a member of rtl::OUString

Change-Id: Ie95f74966ff951b2b3161efeb073f0648c09ff3b

diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index 8c24c0d..6c4596e 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -396,7 +396,7 @@ void * ExceptionInfos::getRaiseInfo( 
typelib_TypeDescription * pTypeDescr ) thro
 
 void * pRaiseInfo;
 
-OUString const & rTypeName = OUString::acquire( &pTypeDescr->pTypeName );
+OUString const & rTypeName = OUString::unacquired( &pTypeDescr->pTypeName 
);
 MutexGuard aGuard( s_pInfos->_aMutex );
 t_string2PtrMap::const_iterator const iFind(
 s_pInfos->_allRaiseInfos.find( rTypeName ) );
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index 6c23788..a11e9c92 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -755,7 +755,7 @@ RaiseInfo * ExceptionInfos::getRaiseInfo( 
typelib_TypeDescription * pTD ) throw
 
 RaiseInfo * pRaiseInfo;
 
-OUString const & rTypeName = OUString::acquire( &pTD->pTypeName );
+OUString const & rTypeName = OUString::unacquired( &pTD->pTypeName );
 MutexGuard aGuard( s_pInfos->_aMutex );
 t_string2PtrMap::const_iterator const iFind(
 s_pInfos->_allRaiseInfos.find( rTypeName ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-03-30 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx |   76 +++
 1 file changed, 45 insertions(+), 31 deletions(-)

New commits:
commit 72927f810ac2e6343a2fe78c39c286104ef80d9e
Author: Stephan Bergmann 
Date:   Mon Mar 30 16:47:25 2015 +0200

Turn macros into functions

Change-Id: I390fc815c32fa0eeeabf4d80a17bc4deedad2d2c

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index 205d776..d5cf312 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -40,7 +40,9 @@
 
 using namespace ::com::sun::star::uno;
 
-// Macros for easier insertion of values to registers or stack
+namespace {
+
+// Functions for easier insertion of values to registers or stack
 // pSV - pointer to the source
 // nr - order of the value [will be increased if stored to register]
 // pFPR, pGPR - pointer to the registers
@@ -48,38 +50,50 @@ using namespace ::com::sun::star::uno;
 
 // The value in %xmm register is already prepared to be retrieved as a float,
 // thus we treat float and double the same
-#define INSERT_FLOAT_DOUBLE( pSV, nr, pFPR, pDS ) \
-if ( nr < x86_64::MAX_SSE_REGS ) \
-pFPR[nr++] = *reinterpret_cast( pSV ); \
-else \
-*pDS++ = *reinterpret_cast( pSV ); // verbatim!
-
-#define INSERT_INT64( pSV, nr, pGPR, pDS ) \
-if ( nr < x86_64::MAX_GPR_REGS ) \
-pGPR[nr++] = *reinterpret_cast( pSV ); \
-else \
-*pDS++ = *reinterpret_cast( pSV );
-
-#define INSERT_INT32( pSV, nr, pGPR, pDS ) \
-if ( nr < x86_64::MAX_GPR_REGS ) \
-pGPR[nr++] = *reinterpret_cast( pSV ); \
-else \
-*pDS++ = *reinterpret_cast( pSV );
-
-#define INSERT_INT16( pSV, nr, pGPR, pDS ) \
-if ( nr < x86_64::MAX_GPR_REGS ) \
-pGPR[nr++] = *reinterpret_cast( pSV ); \
-else \
-*pDS++ = *reinterpret_cast( pSV );
-
-#define INSERT_INT8( pSV, nr, pGPR, pDS ) \
-if ( nr < x86_64::MAX_GPR_REGS ) \
-pGPR[nr++] = *reinterpret_cast( pSV ); \
-else \
-*pDS++ = *reinterpret_cast( pSV );
+void INSERT_FLOAT_DOUBLE(
+void const * pSV, sal_uInt32 & nr, double * pFPR, sal_uInt64 *& pDS)
+{
+if ( nr < x86_64::MAX_SSE_REGS )
+pFPR[nr++] = *static_cast( pSV );
+else
+*pDS++ = *static_cast( pSV ); // verbatim!
+}
 
+void INSERT_INT64(
+void const * pSV, sal_uInt32 & nr, sal_uInt64 * pGPR, sal_uInt64 *& pDS)
+{
+if ( nr < x86_64::MAX_GPR_REGS )
+pGPR[nr++] = *static_cast( pSV );
+else
+*pDS++ = *static_cast( pSV );
+}
 
-namespace {
+void INSERT_INT32(
+void const * pSV, sal_uInt32 & nr, sal_uInt64 * pGPR, sal_uInt64 *& pDS)
+{
+if ( nr < x86_64::MAX_GPR_REGS )
+pGPR[nr++] = *static_cast( pSV );
+else
+*pDS++ = *static_cast( pSV );
+}
+
+void INSERT_INT16(
+void const * pSV, sal_uInt32 & nr, sal_uInt64 * pGPR, sal_uInt64 *& pDS)
+{
+if ( nr < x86_64::MAX_GPR_REGS )
+pGPR[nr++] = *static_cast( pSV );
+else
+*pDS++ = *static_cast( pSV );
+}
+
+void INSERT_INT8(
+void const * pSV, sal_uInt32 & nr, sal_uInt64 * pGPR, sal_uInt64 *& pDS)
+{
+if ( nr < x86_64::MAX_GPR_REGS )
+pGPR[nr++] = *static_cast( pSV );
+else
+*pDS++ = *static_cast( pSV );
+}
 
 void appendCString(OUStringBuffer & buffer, char const * text) {
 if (text != 0) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-03-29 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx |4 ++--
 bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx   |6 +++---
 bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx|4 ++--
 bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx   |8 
 4 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 66f0c17d244cdc8d5a96ca3fe97aef68b45ad0cc
Author: Stephan Bergmann 
Date:   Sun Mar 29 14:48:05 2015 +0200

loplugin:cstylecast

Change-Id: I7fd4ec85eac0693ae6a61ba0b854dd6091bdc6ef

diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
index 7b49e23..86a81dc 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
@@ -75,7 +75,7 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 data.nFPR = nFPR;
 
 // Get pointer to method
-sal_uInt64 pMethod = *((sal_uInt64 *)pThis);
+sal_uInt64 pMethod = *static_cast(pThis);
 pMethod += 8 * nVtableIndex;
 data.pMethod = *reinterpret_cast(pMethod);
 
@@ -84,7 +84,7 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 {
 // 16-bytes aligned
 sal_uInt32 nStackBytes = ( ( nStack + 1 ) >> 1 ) * 16;
-sal_uInt64 *pCallStack = (sal_uInt64 *) __builtin_alloca( nStackBytes 
);
+sal_uInt64 *pCallStack = static_cast(__builtin_alloca( 
nStackBytes ));
 std::memcpy( pCallStack, pStack, nStackBytes );
 }
 
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
index 259aff7..ae877ac 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
@@ -94,12 +94,12 @@ static typelib_TypeClass cpp2uno_call(
 
 // stack space
 // parameters
-void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
+void ** pUnoArgs = static_cast(alloca( 4 * sizeof(void *) * 
nParams ));
 void ** pCppArgs = pUnoArgs + nParams;
 // indices of values this have to be converted (interface conversion 
cpp<=>uno)
-sal_Int32 * pTempIndices = (sal_Int32 *)(pUnoArgs + (2 * nParams));
+sal_Int32 * pTempIndices = reinterpret_cast(pUnoArgs + (2 * 
nParams));
 // type descriptions for reconversions
-typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription 
**)(pUnoArgs + (3 * nParams));
+typelib_TypeDescription ** ppTempParamTypeDescr = 
reinterpret_cast(pUnoArgs + (3 * nParams));
 
 sal_Int32 nTempIndices = 0;
 
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index 7132c46..34ab8fe 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -193,7 +193,7 @@ std::type_info * RTTI::getRTTI( 
typelib_CompoundTypeDescription *pTypeDescr )
 buf.append( 'E' );
 
 OString symName( buf.makeStringAndClear() );
-rtti = (std::type_info *)dlsym( m_hApp, symName.getStr() );
+rtti = static_cast(dlsym( m_hApp, symName.getStr() 
));
 
 if (rtti)
 {
@@ -254,7 +254,7 @@ std::type_info * RTTI::getRTTI( 
typelib_CompoundTypeDescription *pTypeDescr )
 
 static void deleteException( void * pExc )
 {
-__cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
+__cxa_exception const * header = static_cast<__cxa_exception const 
*>(pExc) - 1;
 typelib_TypeDescription * pTD = 0;
 OUString unoName( toUNOname( header->exceptionType->name() ) );
 ::typelib_typedescription_getByName( &pTD, unoName.pData );
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
index a90d030..1e3e118 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx
@@ -100,7 +100,7 @@ static void cpp_call(
 {
 // Maxium space for [complex ret ptr], values | ptr ...
 // (but will be used less - some of the values will be in pGPR and pFPR)
-  sal_uInt64 *pStack = (sal_uInt64 *)__builtin_alloca( (nParams + 3) * 
sizeof(sal_uInt64) );
+  sal_uInt64 *pStack = static_cast(__builtin_alloca( 
(nParams + 3) * sizeof(sal_uInt64) ));
   sal_uInt64 *pStackStart = pStack;
 
 sal_uInt64 pGPR[x86_64::MAX_GPR_REGS];
@@ -138,11 +138,11 @@ static void cpp_call(
 INSERT_INT64( &pAdjustedThisPtr, nGPR, pGPR, pStack );
 
 // Args
-void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
+void ** pCppArgs = static_cast(alloca( 3 * sizeof(void *) * 
nParams ));
 // Indices of values this have to be converted (interface conversion 
cpp<=>uno)
-sal_Int32 * pTempIndices = (sal_Int32 *)(pCppArgs + nParams);
+sal_Int32 * pTempIndices = reinterp

[Libreoffice-commits] core.git: bridges/source codemaker/source comphelper/inc comphelper/source connectivity/source cppu/source include/basebmp include/oox sal/cppunittester sal/rtl sal/textenc sc/in

2015-02-05 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_ios_arm/except.cxx |5 --
 bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx   |1 
 bridges/source/jni_uno/jni_bridge.cxx  |   25 
--
 codemaker/source/javamaker/classfile.cxx   |5 --
 comphelper/inc/pch/precompiled_comphelper.hxx  |1 
 comphelper/source/xml/xmltools.cxx |3 -
 connectivity/source/drivers/odbc/OPreparedStatement.cxx|7 --
 connectivity/source/parse/sqlnode.cxx  |2 
 cppu/source/uno/data.cxx   |   11 +---
 include/basebmp/packedpixeliterator.hxx|9 +--
 include/oox/helper/helper.hxx  |4 -
 sal/cppunittester/cppunittester.cxx|3 -
 sal/rtl/strtmpl.cxx|5 --
 sal/textenc/tables.cxx |8 +--
 sc/inc/global.hxx  |5 --
 sc/inc/pch/precompiled_sc.hxx  |1 
 sc/source/core/data/docpool.cxx|5 --
 stoc/source/javaloader/javaloader.cxx  |6 --
 store/source/storbase.hxx  |3 -
 store/source/storbios.cxx  |4 -
 store/source/storcach.cxx  |5 --
 store/source/stordata.hxx  |7 +-
 store/source/stortree.hxx  |3 -
 svtools/inc/pch/precompiled_svt.hxx|1 
 svtools/source/misc/langtab.cxx|2 
 svx/source/dialog/langbox.cxx  |4 -
 sw/inc/pch/precompiled_msword.hxx  |1 
 sw/source/filter/ww8/ww8par2.cxx   |3 -
 sw/source/filter/ww8/ww8struc.hxx  |   11 ++--
 tools/inc/pch/precompiled_tl.hxx   |1 
 tools/source/stream/stream.cxx |2 
 unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx |3 -
 vcl/generic/glyphs/gcach_layout.cxx|2 
 vcl/inc/pch/precompiled_vcl.hxx|1 
 vcl/source/filter/sgvtext.cxx  |7 --
 35 files changed, 58 insertions(+), 108 deletions(-)

New commits:
commit 4d6a509efe6bd56613b5554556d3a4f7f4cfd0d5
Author: Caolán McNamara 
Date:   Thu Feb 5 20:54:12 2015 +

convert all remaining BOOST_STATIC_ASSERT to static_assert

and we can include a few less headers

Change-Id: Id742849ff4c1c37a2b861aa3d6ab823f00ea87f8

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
index 8085445..9af0e32 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
@@ -21,7 +21,6 @@
 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -48,8 +47,8 @@ struct Fake_type_info {
 char const * name;
 };
 
-BOOST_STATIC_ASSERT(
-sizeof (Fake_type_info) == sizeof (std::type_info));
+static_assert(
+sizeof (Fake_type_info) == sizeof (std::type_info), "must be the same 
size");
 
 struct Fake_class_type_info: Fake_type_info {};
 
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index 8055a8b..7132c46 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -27,7 +27,6 @@
 
 #include 
 
-#include "boost/static_assert.hpp"
 #include "com/sun/star/uno/RuntimeException.hpp"
 #include "com/sun/star/uno/genfunc.hxx"
 #include 
diff --git a/bridges/source/jni_uno/jni_bridge.cxx 
b/bridges/source/jni_uno/jni_bridge.cxx
index 0d37b58..03f0868 100644
--- a/bridges/source/jni_uno/jni_bridge.cxx
+++ b/bridges/source/jni_uno/jni_bridge.cxx
@@ -25,7 +25,6 @@
 #include "jni_bridge.h"
 #include "jniunoenvironmentdata.hxx"
 
-#include 
 #include "jvmaccess/unovirtualmachine.hxx"
 #include "rtl/ref.hxx"
 #include "rtl/strbuf.hxx"
@@ -64,7 +63,7 @@ void SAL_CALL Mapping_map_to_uno(
 uno_Interface ** ppUnoI = (uno_Interface **)ppOut;
 jobject javaI = (jobject) pIn;
 
-BOOST_STATIC_ASSERT( sizeof (void *) == sizeof (jobject) );
+static_assert(sizeof (void *) == sizeof (jobject), "must be the same 
size");
 assert(ppUnoI != 0);
 assert(td != 0);
 
@@ -123,7 +122,7 @@ void SAL_CALL Mapping_map_to_java(
 jobject * ppJavaI = (jobject *) ppOut;
 uno_Interface *

[Libreoffice-commits] core.git: bridges/source

2015-02-02 Thread Andras Timar
 bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b154f4cf2e7462f04f96eb01f859cd46925c715e
Author: Andras Timar 
Date:   Mon Feb 2 05:37:27 2015 -0800

add back typedef (regression from fe480d8136b204c8dc6c68916cce7e816f8b9c48)

Change-Id: Ia367fcd3b204b9dd96f5fa6d3a52d0895bd9c0c9

diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx 
b/bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx
index 74fcfd9..297afba 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx
@@ -36,7 +36,7 @@ namespace CPPU_CURRENT_NAMESPACE
 const DWORD MSVC_ExceptionCode = 0xe06d7363;
 const long MSVC_magic_number = 0x19930520L;
 
-
+typedef enum { REGPARAM_INT, REGPARAM_FLT } RegParamKind;
 
 type_info * mscx_getRTTI( OUString const & rUNOname );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-01-28 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 51f82a58a7c057d649ce5e2b3627e7ccf267fe84
Author: Caolán McNamara 
Date:   Wed Jan 28 20:27:41 2015 +

fix enable-assert-always-abort build

Change-Id: Icbab4d030877f978babfc51f984fb4793b60f681

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index ef6cdec..3903cda 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -110,14 +110,11 @@ static typelib_TypeClass cpp2uno_call(
 
 int nUsedGPR = 0;
 int nUsedSSE = 0;
-#if OSL_DEBUG_LEVEL > 0
-bool bFitsRegisters =
-#endif
-x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, 
nUsedSSE );
+bool bFitsRegisters = x86_64::examine_argument( rParam.pTypeRef, 
false, nUsedGPR, nUsedSSE );
 if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( 
rParam.pTypeRef ) ) // value
 {
 // Simple types must fit exactly one register on x86_64
-assert( bFitsRegisters && ( ( nUsedSSE == 1 && nUsedGPR == 0 ) || 
( nUsedSSE == 0 && nUsedGPR == 1 ) ) );
+assert( bFitsRegisters && ( ( nUsedSSE == 1 && nUsedGPR == 0 ) || 
( nUsedSSE == 0 && nUsedGPR == 1 ) ) ); (void)bFitsRegisters;
 
 if ( nUsedSSE == 1 )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-01-21 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7cb5b2117429c6c5b12cd2ee4925e0eea18375be
Author: Stephan Bergmann 
Date:   Wed Jan 21 12:29:36 2015 +0100

loplugin:cstylecast

Change-Id: Ib8575109cfe0339f2d8b56741d3ad2a538ecf164

diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
index 971ca8a..7b49e23 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
@@ -77,7 +77,7 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 // Get pointer to method
 sal_uInt64 pMethod = *((sal_uInt64 *)pThis);
 pMethod += 8 * nVtableIndex;
-data.pMethod = *((sal_uInt64 *)pMethod);
+data.pMethod = *reinterpret_cast(pMethod);
 
 // Load parameters to stack, if necessary
 if ( nStack )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-01-16 Thread Stephan Bergmann
 bridges/source/cpp_uno/shared/vtablefactory.cxx |   13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 8b9968a26265facaf5e761485d750ce9cedab3ab
Author: Stephan Bergmann 
Date:   Fri Jan 16 13:24:52 2015 +0100

fdo#72755: Only use double mmap as fallback

...when write+exec mmap fails (due to SELinux deny_execmem).  This avoids 
the
tmp file creation in environments that don't need it and which in turn have
problems of their own with that tmp file business.

An alternative would be to first check whether SELinux deny_execmem is 
enforced
and only then try double mmap first.  An advantage could be that it might 
avoid
false SELinux alerts in that case.  The disadvantage would be the overhead 
of
introducing a conditional dependency on libselinux here.  And given that 
for one
deny_execmem typically appears to be off by default (as at least both
contemporary GNOME desktop and OpenJDK malfunction when it is enabled), and 
for
another I guess deny_execmem could still change its value between the time 
of
checking for it and the time of requesting a write+exec mmap, that just 
does not
seem worth it.

Change-Id: I3560803139b630557b6219d3db52945c7e0cdcd2

diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx 
b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index ca77aea..226a994 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -229,9 +229,14 @@ bool VtableFactory::createBlock(Block &block, sal_Int32 
slotCount) const
 sal_Size size = getBlockSize(slotCount);
 sal_Size pagesize = sysconf(_SC_PAGESIZE);
 block.size = (size + (pagesize - 1)) & ~(pagesize - 1);
-block.start = block.exec = NULL;
 block.fd = -1;
 
+// Try non-doublemmaped allocation first:
+block.start = block.exec = rtl_arena_alloc(m_arena, &block.size);
+if (block.start != nullptr) {
+return true;
+}
+
 osl::Security aSecurity;
 OUString strDirectory;
 OUString strURLDirectory;
@@ -290,12 +295,6 @@ bool VtableFactory::createBlock(Block &block, sal_Int32 
slotCount) const
 
 strDirectory.clear();
 }
-if (!block.start || !block.exec || block.fd == -1)
-{
-   //Fall back to non-doublemmaped allocation
-   block.fd = -1;
-   block.start = block.exec = rtl_arena_alloc(m_arena, &block.size);
-}
 return (block.start != 0 && block.exec != 0);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-01-08 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_intel/except.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c85e36bc856f52f7992ef120cb12d02f52ca0419
Author: Stephan Bergmann 
Date:   Thu Jan 8 14:19:16 2015 +0100

loplugin:cstylecast,stringconstant

Change-Id: Iffc8cbf108310099318e37378c4b3033ea087cee

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx 
b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
index a6543c5..faabee7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
@@ -170,7 +170,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription 
*pTypeDescr )
 type_info * base_rtti = getRTTI(
 (typelib_CompoundTypeDescription 
*)pTypeDescr->pBaseTypeDescription );
 rtti = new __si_class_type_info(
-strdup( rttiName ), (__class_type_info *)base_rtti );
+strdup( rttiName ), static_cast<__class_type_info 
*>(base_rtti) );
 }
 else
 {
@@ -233,7 +233,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
 if (! pTypeDescr)
 {
 throw RuntimeException(
-OUString("cannot get typedescription for type ") +
+"cannot get typedescription for type " +
 *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName 
) );
 }
 
@@ -263,7 +263,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
 if (! rtti)
 {
 throw RuntimeException(
-OUString("no rtti for type ") +
+"no rtti for type " +
 *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName 
) );
 }
 }
@@ -291,7 +291,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * 
pUnoExc, uno_Mapping
 typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
 if (0 == pExcTypeDescr)
 {
-RuntimeException aRE( OUString("exception type not found: ") + unoName 
);
+RuntimeException aRE( "exception type not found: " + unoName );
 Type const & rType = ::getCppuType( &aRE );
 uno_type_any_constructAndConvert( pUnoExc, &aRE, 
rType.getTypeLibType(), pCpp2Uno );
 SAL_WARN("bridges", aRE.Message);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2015-01-05 Thread Tor Lillqvist
 bridges/source/jni_uno/jni_info.h |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ee75c0d0aabc934d1cad95cd4bf41a80500f546a
Author: Tor Lillqvist 
Date:   Mon Jan 5 16:08:07 2015 +0200

Fix build error with libstdc++ 4.7 and Clang

Using std::unordered_map causes a complex multi-line error message, call to
implicitly-deleted copy constructor of 'jni_uno::JNI_type_info_holder' etc.

Revert ce7f442bd0b600c0acc74d4757e894a2ba382c53 for one source file.

Change-Id: I24453498d3fcaadf900f2bb56a2812f8bce55dd4

diff --git a/bridges/source/jni_uno/jni_info.h 
b/bridges/source/jni_uno/jni_info.h
index 1e5b4e8..e38c4b3 100644
--- a/bridges/source/jni_uno/jni_info.h
+++ b/bridges/source/jni_uno/jni_info.h
@@ -23,7 +23,7 @@
 #include 
 
 #include 
-#include 
+#include 
 
 #include "jni_base.h"
 
@@ -114,7 +114,7 @@ struct JNI_type_info_holder: private boost::noncopyable
 {}
 };
 
-typedef std::unordered_map<
+typedef ::boost::unordered_map<
 OUString, JNI_type_info_holder, OUStringHash > t_str2type;
 
 class JNI_info: private boost::noncopyable
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source connectivity/source embedserv/source extensions/source scripting/source sfx2/inc sfx2/source stoc/source ucb/source

2015-01-04 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx   |3 -
 bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx  |5 +
 connectivity/source/commontools/TSkipDeletedSet.cxx|1 
 connectivity/source/drivers/mork/MColumnAlias.hxx  |4 -
 connectivity/source/drivers/mork/MQueryHelper.hxx  |6 --
 connectivity/source/drivers/mozab/MColumnAlias.hxx |4 -
 connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx |5 -
 connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx  |4 -
 connectivity/source/drivers/postgresql/pq_connection.hxx   |7 +-
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |2 
 connectivity/source/drivers/postgresql/pq_statics.hxx  |6 --
 connectivity/source/drivers/postgresql/pq_tools.hxx|2 
 connectivity/source/drivers/postgresql/pq_xcontainer.hxx   |8 +--
 connectivity/source/inc/TSkipDeletedSet.hxx|2 
 embedserv/source/inc/embeddoc.hxx  |6 +-
 extensions/source/bibliography/framectr.cxx|4 -
 extensions/source/ole/oleobjw.cxx  |8 +--
 extensions/source/ole/oleobjw.hxx  |6 +-
 extensions/source/ole/unoconversionutilities.hxx   |   26 
+-
 extensions/source/ole/unoobjw.cxx  |6 +-
 extensions/source/ole/unoobjw.hxx  |6 +-
 extensions/source/propctrlr/browserlistbox.hxx |2 
 extensions/source/propctrlr/eventhandler.cxx   |2 
 extensions/source/propctrlr/eventhandler.hxx   |2 
 extensions/source/propctrlr/pcrcommontypes.hxx |4 -
 extensions/source/propctrlr/propcontroller.hxx |   10 +--
 scripting/source/dlgprov/dlgevtatt.hxx |   11 +---
 scripting/source/provider/ActiveMSPList.hxx|   22 
+++-
 scripting/source/provider/BrowseNodeFactoryImpl.cxx|8 +--
 scripting/source/provider/ProviderCache.hxx|5 +
 scripting/source/stringresource/stringresource.hxx |6 +-
 scripting/source/vbaevents/eventhelper.cxx |6 +-
 sfx2/inc/pch/precompiled_sfx.hxx   |2 
 sfx2/source/appl/imagemgr.cxx  |4 -
 sfx2/source/appl/newhelp.cxx   |4 -
 sfx2/source/appl/workwin.cxx   |4 -
 sfx2/source/control/bindings.cxx   |4 -
 sfx2/source/doc/Metadatable.cxx|   18 
+++---
 sfx2/source/toolbox/imgmgr.cxx |7 +-
 sfx2/source/view/sfxbasecontroller.cxx |7 +-
 stoc/source/corereflection/base.hxx|6 +-
 stoc/source/corereflection/lrucache.hxx|4 -
 stoc/source/inspect/introspection.cxx  |6 +-
 stoc/source/invocation_adapterfactory/iafactory.cxx|   11 +---
 stoc/source/namingservice/namingservice.cxx|5 +
 stoc/source/security/file_policy.cxx   |6 +-
 stoc/source/security/lru_cache.h   |4 -
 stoc/source/servicemanager/servicemanager.cxx  |   13 ++---
 ucb/source/core/ucbstore.cxx   |   16 
--
 ucb/source/ucp/file/filnot.hxx |5 -
 ucb/source/ucp/file/filtask.hxx|7 +-
 ucb/source/ucp/file/shell.hxx  |   12 ++--
 ucb/source/ucp/hierarchy/hierarchyprovider.hxx |8 ---
 ucb/source/ucp/package/pkgprovider.cxx |   14 -
 ucb/source/ucp/webdav-neon/ContentProperties.hxx   |   11 
 ucb/source/ucp/webdav-neon/NeonSession.cxx |4 -
 ucb/source/ucp/webdav-neon/PropertyMap.hxx |4 -
 ucb/source/ucp/webdav/ContentProperties.hxx|   11 
 ucb/source/ucp/webdav/PropertyMap.hxx  |6 --
 ucb/source/ucp/webdav/webdavresponseparser.cxx |7 --
 60 files changed, 174 insertions(+), 235 deletions(-)

New commits:
commit ca8787a98171070c771dc167b43d5bdb98c52ce4
Author: Caolán McNamara 
Date:   Sun Jan 4 11:10:45 2015 +

boost::unordered_map->std::unordered_map

Change-Id: I5d458f43616edc395faa8c27edaddc7d515166db

diff --git a/brid

[Libreoffice-commits] core.git: bridges/source

2014-12-25 Thread Mark Williams
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |  238 +++-
 1 file changed, 185 insertions(+), 53 deletions(-)

New commits:
commit e1043eca4b4c64c3c23affa97aeaeb09fb1f7cfb
Author: Mark Williams 
Date:   Thu Dec 25 19:12:19 2014 +0100

Uno bridge msvc-x86_64: Fix EH memory and addressing issues

Rewrite of 32-Bit-Code to work under 64 Bit:
To use the 32 Bit offset values in the ExceptionType we have to
allocate a single allocation block and use it for all code and data.
All offsets inside this area are guaranteed to be in 32 bit address
range. So we have to calc total memory allocation size for D-tor,
C-Tors, ExceptionType and type_info. ExceptionType is allocated via
placement new operator to locate everything inside our mem block.

There is one caveat: Struct type_info is kept in a map and was
referenced from class ExceptionType. Therefore type_info now is also
member of ExceptionType and can be referenced via 32 bit offset.

Change-Id: I6b524e36975a66fb64ca0cfb014c207053acec90
Reviewed-on: https://gerrit.libreoffice.org/13653
Reviewed-by: David Ostrovsky 
Tested-by: David Ostrovsky 

diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index 5ea44f2..d3e1e48 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -259,6 +259,8 @@ using namespace ::osl;
 
 namespace CPPU_CURRENT_NAMESPACE
 {
+int mscx_getRTTI_len(OUString const & rUNOname);
+
 
 static inline OUString toUNOname(
 OUString const & rRTTIname )
@@ -301,6 +303,7 @@ static inline OUString toRTTIname(
 //RTTI simulation
 
 typedef boost::unordered_map< OUString, void *, OUStringHash, equal_to< 
OUString > > t_string2PtrMap;
+class __type_info_descriptor;
 
 class RTTInfos
 {
@@ -310,11 +313,12 @@ class RTTInfos
 static OUString toRawName( OUString const & rUNOname ) throw ();
 public:
 type_info * getRTTI( OUString const & rUNOname ) throw ();
+int getRTTI_len(OUString const & rUNOname) throw ();
+__type_info_descriptor * insert_new_type_info_descriptor(OUString const & 
rUNOname);
 
 RTTInfos();
 ~RTTInfos();
 };
-
 class __type_info
 {
 friend type_info * RTTInfos::getRTTI( OUString const & ) throw ();
@@ -337,6 +341,44 @@ __type_info::~__type_info() throw ()
 {
 }
 
+class __type_info_descriptor
+{
+private:
+int type_info_size;
+__type_info info;
+
+public:
+
+inline __type_info_descriptor(void * m_data, const char * m_d_name) throw 
()
+: info(m_data, m_d_name)
+{
+type_info_size = sizeof(__type_info) + strlen(m_d_name);
+}
+
+type_info * get_type_info()
+{
+return (type_info *)&info;
+}
+int get_type_info_size()
+{
+return type_info_size;
+}
+};
+
+__type_info_descriptor * RTTInfos::insert_new_type_info_descriptor(OUString 
const & rUNOname) {
+
+// insert new type_info
+OString aRawName(OUStringToOString(toRTTIname(rUNOname), 
RTL_TEXTENCODING_ASCII_US));
+__type_info_descriptor * pRTTI = 
new(::rtl_allocateMemory(sizeof(__type_info_descriptor) + aRawName.getLength()))
+__type_info_descriptor(NULL, aRawName.getStr());
+
+// put into map
+pair< t_string2PtrMap::iterator, bool > insertion(
+_allRTTI.insert(t_string2PtrMap::value_type(rUNOname, pRTTI)));
+assert(insertion.second && "### rtti insertion failed?!");
+
+return pRTTI;
+}
 type_info * RTTInfos::getRTTI( OUString const & rUNOname ) throw ()
 {
 // a must be
@@ -348,21 +390,32 @@ type_info * RTTInfos::getRTTI( OUString const & rUNOname 
) throw ()
 // check if type is already available
 if (iFind == _allRTTI.end())
 {
-// insert new type_info
-OString aRawName( OUStringToOString( toRTTIname( rUNOname ), 
RTL_TEXTENCODING_ASCII_US ) );
-__type_info * pRTTI = new( ::rtl_allocateMemory( sizeof(__type_info) + 
aRawName.getLength() ) )
-__type_info( NULL, aRawName.getStr() );
+// Wrap new __type_info in __type_info_descriptor to preserve length 
info
+__type_info_descriptor * pRTTI = 
insert_new_type_info_descriptor(rUNOname);
+return pRTTI->get_type_info();
+}
+else
+{
+return ((__type_info_descriptor *)iFind->second)->get_type_info();
+}
+}
 
-// put into map
-pair< t_string2PtrMap::iterator, bool > insertion(
-_allRTTI.insert( t_string2PtrMap::value_type( rUNOname, pRTTI ) ) 
);
-assert(insertion.second && "### rtti insertion failed?!");
+int RTTInfos::getRTTI_len(OUString const & rUNOname) throw ()
+{
+MutexGuard aGuard(_aMutex);
+t_string2PtrMap::const_iterator const iFind(_allRTTI.find(rUNOname));
 
-return (type_info *)pRTTI;
+// Wrap new __type_info in __type_info_descriptor to preserve length info
+// check if type is already available
+   

[Libreoffice-commits] core.git: bridges/source

2014-12-18 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit dc8835de2a09ec9cc2a14cd0e78d0a298ca6bc4c
Author: Stephan Bergmann 
Date:   Thu Dec 18 14:56:47 2014 +0100

bridges: Use appropriate OUString functions on string constants

Change-Id: I72e0df381bd9525ea4fff1f4bbd57ffe84ce241f

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
index 7c0de0f..fc439a9 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
@@ -114,7 +114,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
 if (! pTypeDescr)
 {
 throw RuntimeException(
-OUString("cannot get typedescription for type ") +
+"cannot get typedescription for type " +
 *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName 
) );
 }
 
@@ -130,7 +130,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
 if (! rtti)
 {
 throw RuntimeException(
-OUString("no rtti for type ") +
+"no rtti for type " +
 *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName 
) );
 }
 }
@@ -158,7 +158,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * 
pUnoExc, uno_Mapping
 typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
 if (0 == pExcTypeDescr)
 {
-RuntimeException aRE( OUString("exception type not found: ") + unoName 
);
+RuntimeException aRE( "exception type not found: " + unoName );
 Type const & rType = ::getCppuType( &aRE );
 uno_type_any_constructAndConvert( pUnoExc, &aRE, 
rType.getTypeLibType(), pCpp2Uno );
 SAL_WARN("bridges", aRE.Message);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-12-11 Thread Miklos Vajna
 bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7a4a9d3d425908f81db7736964d0c13c8b8ee3bc
Author: Miklos Vajna 
Date:   Thu Dec 11 11:16:45 2014 +0100

bridges: fix gcc3_linux_arm build

Change-Id: I3bfaeab9dd9f2d8cd603c655ec3aa7c4f508c673

diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index 0a25f48..8dfb88d 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -408,7 +408,7 @@ static void cpp_call(
 
 if (pReturnTypeDescr)
 {
-bool bSimpleReturn = !arm::return_in_hidden_param( pReturnTypeRef )
+bool bSimpleReturn = !arm::return_in_hidden_param( pReturnTypeRef );
 
 if (bSimpleReturn)
 pCppReturn = pUnoReturn; // direct way for simple types
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source canvas/source canvas/workben

2014-12-10 Thread Michael Weghorn
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx |4 +---
 bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx   |4 +---
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |4 +---
 bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx  |8 
 canvas/source/cairo/cairo_canvashelper.cxx  |3 +--
 canvas/source/directx/dx_canvasbitmap.cxx   |3 +--
 canvas/source/directx/dx_surfacegraphics.cxx|3 +--
 canvas/workben/canvasdemo.cxx   |3 +--
 8 files changed, 11 insertions(+), 21 deletions(-)

New commits:
commit 0e55feea6a6bb516c4198960b14192f363f08601
Author: Michael Weghorn 
Date:   Sat Dec 6 19:51:04 2014 +0100

reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I1122494e295af756ef3cc32717fe204505aeb9e3
Reviewed-on: https://gerrit.libreoffice.org/13335
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
index 9060584..a8f27b6 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
@@ -357,11 +357,9 @@ static void cpp_call(
 
 void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
 
-bool bSimpleReturn = true;
 if (pReturnTypeDescr)
 {
-if (arm::return_in_hidden_param( pReturnTypeRef ) )
-bSimpleReturn = false;
+bool bSimpleReturn = !arm::return_in_hidden_param( pReturnTypeRef );
 
 if (bSimpleReturn)
 pCppReturn = pUnoReturn; // direct way for simple types
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index 752137f..0a25f48 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -406,11 +406,9 @@ static void cpp_call(
 
 void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
 
-bool bSimpleReturn = true;
 if (pReturnTypeDescr)
 {
-if (arm::return_in_hidden_param( pReturnTypeRef ) )
-bSimpleReturn = false;
+bool bSimpleReturn = !arm::return_in_hidden_param( pReturnTypeRef )
 
 if (bSimpleReturn)
 pCppReturn = pUnoReturn; // direct way for simple types
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index 01bb74a..342ab9c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -316,15 +316,13 @@ static void cpp_call(
 void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
 
 bool bOverflow = false;
-bool bSimpleReturn = true;
 
 if (pReturnTypeDescr)
 {
 #if OSL_DEBUG_LEVEL > 2
 fprintf(stderr, "return type is %d\n", pReturnTypeDescr->eTypeClass);
 #endif
-if (ppc64::return_in_hidden_param(pReturnTypeRef))
-bSimpleReturn = false;
+bool bSimpleReturn =!ppc64::return_in_hidden_param(pReturnTypeRef);
 
 if (bSimpleReturn)
 {
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
index ed0e6cf..c1815b4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
@@ -42,10 +42,11 @@ static sal_Int32
 invoke_count_words(char * pPT)
 {
  sal_Int32 overflow = 0, gpr = 0, fpr = 0;
- int c;// character of parameter type being decoded
 
  while (*pPT != 'X') {
-   c = *pPT;
+   // character of parameter type being decoded
+   const int c = *pPT;
+
switch (c) {
case 'D':   /* type is double */
 if (fpr < 2) fpr++; else overflow+=2;
@@ -84,10 +85,9 @@ invoke_copy_to_stack(sal_Int32 * pStackLongs, char * pPT, 
sal_Int32* d_ov, sal_I
 sal_Int32 *d_gpr = d_ov + overflow;
 sal_Int64 *d_fpr = (sal_Int64 *)(d_gpr + 5);
 sal_Int32 gpr = 0, fpr = 0;
-char c;
 
  while (*pPT != 'X') {
-   c = *pPT;
+   const char c = *pPT;
switch (c) {
case 'D':   /* type is double */
 if (fpr < 2)
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx 
b/canvas/source/cairo/cairo_canvashelper.cxx
index c501d57..68e05fe 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -670,7 +670,6 @@ namespace cairocanvas
 
 static void addColorStops( Pattern* pPattern, const uno::Sequence< 
uno::Sequence< double > >& rColors, const uno::Sequence< double >& rStops, bool 
bReverseStops = false )
 {
-float stop;
 int i;
 
 OSL_ASSERT( rColors.getLength() == rStops.getLength() );
@@ -678,7 +677,7 @@ namesp

[Libreoffice-commits] core.git: bridges/source

2014-12-09 Thread Julien Nabet
 bridges/source/cpp_uno/gcc3_ios_arm/unwind-cxx.h|4 ++--
 bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f73e6a968e54f7d7b0669c0b002d8704ab9fbfe7
Author: Julien Nabet 
Date:   Wed Dec 10 00:05:54 2014 +0100

Typo: nuber=>number

Change-Id: Idc87ab05f817a21e491537a1fa4c014c5a313bf6

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/unwind-cxx.h 
b/bridges/source/cpp_uno/gcc3_ios_arm/unwind-cxx.h
index d9edcb0..dfd42ed 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/unwind-cxx.h
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/unwind-cxx.h
@@ -91,7 +91,7 @@ struct __cxa_exception
   // Stack of exceptions in cleanups.
   __cxa_exception* nextPropagatingException;
 
-  // The nuber of active cleanup handlers for this exception.
+  // The number of active cleanup handlers for this exception.
   int propagationCount;
 #else
   // Cache parsed handler data from the personality routine Phase 1
@@ -139,7 +139,7 @@ struct __cxa_dependent_exception
   // Stack of exceptions in cleanups.
   __cxa_exception* nextPropagatingException;
 
-  // The nuber of active cleanup handlers for this exception.
+  // The number of active cleanup handlers for this exception.
   int propagationCount;
 #else
   // Cache parsed handler data from the personality routine Phase 1
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
index aaf83a2..0185a2c 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
@@ -94,7 +94,7 @@ struct __cxa_exception
   // Stack of exceptions in cleanups.
   __cxa_exception* nextPropagatingException;
 
-  // The nuber of active cleanup handlers for this exception.
+  // The number of active cleanup handlers for this exception.
   int propagationCount;
 #else
   // Cache parsed handler data from the personality routine Phase 1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-12-09 Thread Stephan Bergmann
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |   45 ++--
 1 file changed, 33 insertions(+), 12 deletions(-)

New commits:
commit 8ad2b6f9d8169b46a71b82198ff1f73482a602e8
Author: Stephan Bergmann 
Date:   Tue Dec 9 16:10:17 2014 +0100

Fix base+offset pointer calculations when synthesizing exception data

...but the code does not yet work:  Care must be taken to allocate the 
various
data structures close enough together so that the offset calculations at the
four places now marked with

assert(...); //TODO

actually succeed.

Change-Id: I1fedf7d2d3cdde5035842b4ad5eca9ad9ccf2d44

diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index 70a6637..5ea44f2 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -466,9 +466,20 @@ struct ExceptionType
 // As _n0 is always initialized to zero, that means the
 // hasvirtbase flag (see the ONTL catchabletype struct) is
 // off, and thus the copyctor is of the ctor_ptr kind.
-_pTypeInfo = (sal_uInt32) ((sal_uInt64) mscx_getRTTI( 
pTD->pTypeName ) - pCodeBase);
+type_info * ti = mscx_getRTTI(pTD->pTypeName);
+assert(
+pCodeBase <= reinterpret_cast(ti)
+&& reinterpret_cast(ti) - pCodeBase < 0x1);
+//TODO
+_pTypeInfo = static_cast(
+reinterpret_cast(ti) - pCodeBase);
 GenerateConstructorTrampoline( pCode, pTD );
-_pCopyCtor = (sal_uInt32) ((sal_uInt64) pCode - pCodeBase);
+assert(
+pCodeBase <= reinterpret_cast(pCode)
+&& (reinterpret_cast(pCode) - pCodeBase
+< 0x1)); //TODO
+_pCopyCtor = static_cast(
+reinterpret_cast(pCode) - pCodeBase);
 }
 inline ~ExceptionType() throw ()
 {
@@ -533,7 +544,8 @@ RaiseInfo::RaiseInfo( typelib_TypeDescription * pTD )throw 
()
 
 unsigned char * pCode = _code = (unsigned char *)::rtl_allocateMemory( 
codeSize );
 
-_codeBase = (sal_uInt64)pCode & ~(ExceptionInfos::allocationGranularity-1);
+_codeBase = reinterpret_cast(pCode)
+& ~static_cast(ExceptionInfos::allocationGranularity - 1);
 
 DWORD old_protect;
 #if OSL_DEBUG_LEVEL > 0
@@ -549,19 +561,28 @@ RaiseInfo::RaiseInfo( typelib_TypeDescription * pTD 
)throw ()
 pCode += codeSnippetSize;
 
 // Info count accompanied by type info ptrs: type, base type, base base 
type, ...
-_types = (sal_Int32)((sal_uInt64)::rtl_allocateMemory( 4 + 4* nLen) - 
_codeBase);
-*(sal_Int32 *)_types = nLen;
-
-ExceptionType ** ppTypes = (ExceptionType **)((sal_Int32 *)_types + 1);
-
-int nPos = 0;
+DWORD * types = static_cast(rtl_allocateMemory(4 + 4 * nLen));
+assert(
+_codeBase <= reinterpret_cast(types)
+&& reinterpret_cast(types) - _codeBase < 0x1);
+//TODO
+_types = static_cast(
+reinterpret_cast(types) - _codeBase);
+types[0] = nLen;
+
+int nPos = 1;
 for ( pCompTD = (typelib_CompoundTypeDescription*)pTD;
   pCompTD; pCompTD = pCompTD->pBaseTypeDescription )
 {
-ppTypes[nPos++] =
-new ExceptionType( pCode, _codeBase,
-   (typelib_TypeDescription *)pCompTD );
+ExceptionType * et = new ExceptionType(
+pCode, _codeBase, (typelib_TypeDescription *)pCompTD);
 pCode += codeSnippetSize;
+assert(
+_codeBase <= reinterpret_cast(et)
+&& reinterpret_cast(et) - _codeBase < 0x1);
+//TODO
+types[nPos++]
+= static_cast(reinterpret_cast(et) - _codeBase);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-12-09 Thread Stephan Bergmann
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |   25 ++--
 1 file changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 4c951ee83f8a554f1d3f94c46b9447d7d1c3bafa
Author: Stephan Bergmann 
Date:   Tue Dec 9 15:06:50 2014 +0100

Fix mscx_filterCppException base+offset pointer calculations

Change-Id: I9fbe8d7eba181cbfcab704761e6feebd78120644

diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index b6727ea..70a6637 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -750,22 +750,23 @@ int mscx_filterCppException(
 
 // [3] is the image base address which is added the 32-bit
 // rva_t fields in throwinfo to get actual 64-bit addresses
-
-void * types =
-(void *) (pRecord->ExceptionInformation[3] +
-  ((RaiseInfo *)pRecord->ExceptionInformation[2])->_types);
-
-if (types != 0 && *(DWORD *)types > 0)
+ULONG_PTR base = pRecord->ExceptionInformation[3];
+DWORD * types = reinterpret_cast(
+base
++ (reinterpret_cast(pRecord->ExceptionInformation[2])
+   ->_types));
+if (types != nullptr && types[0] != 0)
 {
-DWORD pType = *((DWORD *)types + 1);
-if (pType != 0 &&
-((ExceptionType 
*)(pRecord->ExceptionInformation[3]+pType))->_pTypeInfo != 0)
+DWORD pType = types[1];
+ExceptionType * et
+= reinterpret_cast(base + pType);
+if (pType != 0 && et->_pTypeInfo != 0)
 {
 OUString aRTTIname(
 OStringToOUString(
-reinterpret_cast< __type_info * >(
-((ExceptionType 
*)(pRecord->ExceptionInformation[3]+pType))->_pTypeInfo )->_m_d_name,
-RTL_TEXTENCODING_ASCII_US ) );
+(reinterpret_cast<__type_info *>(base + et->_pTypeInfo)
+ ->_m_d_name),
+RTL_TEXTENCODING_ASCII_US));
 OUString aUNOname( toUNOname( aRTTIname ) );
 
 typelib_TypeDescription * pExcTD = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source cppuhelper/source jurt/com

2014-12-09 Thread Stephan Bergmann
 bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java |   24 
+
 bridges/source/jni_uno/jni_base.h   |3 
 bridges/source/jni_uno/jni_bridge.cxx   |  123 
+++---
 bridges/source/jni_uno/jni_bridge.h |   11 
 bridges/source/jni_uno/jni_info.cxx |3 
 bridges/source/jni_uno/jni_java2uno.cxx |   16 
-
 bridges/source/jni_uno/jni_uno2java.cxx |   10 
 cppuhelper/source/component_context.cxx |   16 
+
 jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java |   15 
-
 jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java   |   12 
 jurt/com/sun/star/lib/util/AsynchronousFinalizer.java   |   71 
+++--
 11 files changed, 217 insertions(+), 87 deletions(-)

New commits:
commit 6ddde10b4006ece33bc358a391a13e108a35f6fa
Author: Stephan Bergmann 
Date:   Tue Dec 9 12:51:40 2014 +0100

rhbz#1036877: Join Java AsynchronousFinalizer thread well before exit

AsynchronousFinalizer was originally added as
870a4401c05beec3d31c1f6055a64591edd0a9d9 "INTEGRATION: CWS mtg1: #i57753# 
Avoid
long-running finalize methods" referring to
 " Fix JNI-UNO bridge 
so
that the JVM doesn't run out of memory when a destructor locks the 
SolarMutex."

It is unclear to me how relevant "If JVMs are getting more mature and 
should no
longer have problems with long-running finalize methods, this class could be
removed again" really is in practice.  After all, advice on 
hotspot-gc-devel is
to avoid finalize() if possible

(
"Re: History of finalizer execution and gc progress?").  So stick with this
approach of home-grown draining for now (where a home-grown approach using
PhantomReferencens would need a dedicated draining thread, too, so would not
have much benefit over the existing code in practice).

Timely termination of AsynchronousFinalizer threads is achieved by using a
dedicated thread per bridge and joining it in the remote bridge's dispose()
resp. the JNI environment's new java_env_dispose.

Change-Id: Idcef2dbf361a1de22f60db73828f59e85711aea7

diff --git 
a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java 
b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
index 732d30b..12817e5 100644
--- a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
+++ b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
@@ -63,7 +63,7 @@ public final class JNI_proxy implements 
java.lang.reflect.InvocationHandler
 private final Type m_type;
 private final String m_oid;
 private final Class m_class;
-
+private final AsynchronousFinalizer m_finalizer;
 
 public static String get_stack_trace( Throwable throwable )
 throws Throwable
@@ -98,16 +98,19 @@ public final class JNI_proxy implements 
java.lang.reflect.InvocationHandler
 @Override
 protected void finalize()
 {
-AsynchronousFinalizer.add(new AsynchronousFinalizer.Job() {
-public void run() throws Throwable {
-JNI_proxy.this.finalize( m_bridge_handle );
-}
-});
+if (m_finalizer != null) {
+m_finalizer.add(new AsynchronousFinalizer.Job() {
+public void run() throws Throwable {
+JNI_proxy.this.finalize( m_bridge_handle );
+}
+});
+}
 }
 
 private JNI_proxy(
 long bridge_handle, IEnvironment java_env,
-long receiver_handle, long td_handle, Type type, String oid )
+long receiver_handle, long td_handle, Type type, String oid,
+AsynchronousFinalizer finalizer)
 {
 m_bridge_handle = bridge_handle;
 m_java_env = java_env;
@@ -116,16 +119,19 @@ public final class JNI_proxy implements 
java.lang.reflect.InvocationHandler
 m_type = type;
 m_oid = oid;
 m_class = m_type.getZClass();
+m_finalizer = finalizer;
 }
 
 public static Object create(
 long bridge_handle, IEnvironment java_env,
 long receiver_handle, long td_handle, Type type, String oid,
-java.lang.reflect.Constructor proxy_ctor )
+java.lang.reflect.Constructor proxy_ctor,
+AsynchronousFinalizer finalizer)
 throws Throwable
 {
 JNI_proxy handler = new JNI_proxy(
-bridge_handle, java_env, receiver_handle, td_handle, type, oid );
+bridge_handle, java_env, receiver_handle, td_handle, type, oid,
+finalizer);
 Object proxy = proxy_ctor.n

[Libreoffice-commits] core.git: bridges/source

2014-12-08 Thread Stephan Bergmann
 bridges/source/jni_uno/jni_info.h |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 2ecec9d08cdb61494ca7d6b72e9342a3a01171f7
Author: Stephan Bergmann 
Date:   Mon Dec 8 09:16:43 2014 +0100

Mark classes as noncopyable

Change-Id: I4262fb56d681c70a089638b876dc07b1f472f583

diff --git a/bridges/source/jni_uno/jni_info.h 
b/bridges/source/jni_uno/jni_info.h
index 2f10191..e030602 100644
--- a/bridges/source/jni_uno/jni_info.h
+++ b/bridges/source/jni_uno/jni_info.h
@@ -20,6 +20,9 @@
 #ifndef INCLUDED_BRIDGES_SOURCE_JNI_UNO_JNI_INFO_H
 #define INCLUDED_BRIDGES_SOURCE_JNI_UNO_JNI_INFO_H
 
+#include 
+
+#include 
 #include 
 
 #include "jni_base.h"
@@ -58,7 +61,7 @@ inline bool is_XInterface( typelib_TypeDescriptionReference * 
type )
 OUString::unacquired( &type->pTypeName ) == 
"com.sun.star.uno.XInterface");
 }
 
-struct JNI_type_info
+struct JNI_type_info: private boost::noncopyable
 {
 ::com::sun::star::uno::TypeDescription  m_td;
 jclass  m_class;
@@ -103,7 +106,7 @@ private:
 virtual ~JNI_compound_type_info() {}
 };
 
-struct JNI_type_info_holder
+struct JNI_type_info_holder: private boost::noncopyable
 {
 JNI_type_info * m_info;
 inline JNI_type_info_holder()
@@ -114,7 +117,7 @@ struct JNI_type_info_holder
 typedef ::boost::unordered_map<
 OUString, JNI_type_info_holder, OUStringHash > t_str2type;
 
-class JNI_info
+class JNI_info: private boost::noncopyable
 {
 mutable ::osl::Mutexm_mutex;
 mutable t_str2type  m_type_map;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-12-02 Thread David Ostrovsky
 bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 9776af8215093f3d67cbfe58c87c8decd54b01d8
Author: David Ostrovsky 
Date:   Sun Nov 30 12:30:05 2014 +0100

except.cxx: Fix pTypeDescr is unknown in this context error

Change-Id: Ic47f69b01cf17a55901e9e3541419d9f477d9585
Reviewed-on: https://gerrit.libreoffice.org/13210
Tested-by: David Ostrovsky 
Reviewed-by: Stephan Bergmann 

diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx 
b/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx
index abea68d..1cd29f7 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx
@@ -243,13 +243,13 @@ extern "C" typelib_TypeClass cpp_vtable_call(
 {
 SAL_WARN(
 "bridges",
-"illegal " << OUString::unacquired(&pTypeDescr->aBase.pTypeName)
+"illegal " << OUString::unacquired(&pTD->aBase.pTypeName)
 << " vtable index " << nFunctionIndex << "/"
-<< pTypeDescr->nMapFunctionIndexToMemberIndex);
+<< pTD->nMapFunctionIndexToMemberIndex);
 throw RuntimeException(
-("illegal " + OUString::unacquired(&pTypeDescr->aBase.pTypeName)
+("illegal " + OUString::unacquired(&pTD->aBase.pTypeName)
  + " vtable index " + OUString::number(nFunctionIndex) + "/"
- + OUString::number(pTypeDescr->nMapFunctionIndexToMemberIndex)),
+ + OUString::number(pTD->nMapFunctionIndexToMemberIndex)),
 reinterpret_cast( pCppI ) );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-12-02 Thread David Ostrovsky
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 684facf115df0f06bc3cf405b4429f97b0891370
Author: David Ostrovsky 
Date:   Sun Nov 30 12:35:37 2014 +0100

MSVC 2013: Compute uno bridge exception offset for X64

Change-Id: I34b308db422d861098fdf93cff8fea63128ba47a
Reviewed-on: https://gerrit.libreoffice.org/13211
Tested-by: David Ostrovsky 
Reviewed-by: Stephan Bergmann 

diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index a1c27c6..b6727ea 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -722,7 +722,9 @@ int mscx_filterCppException(
 // MSVS9/crt/src/mtdll.h:
 // offsetof (_tiddata, _curexception) -
 // offsetof (_tiddata, _tpxcptinfoptrs):
-#if _MSC_VER < 1600
+#if _MSC_VER <= 1800 // VC 2013
+//
+// See dev-tools/uno/uno_exception_offset
 0x48 // msvcr90.dll
 #else
 error, please find value for this compiler version
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-11-23 Thread Rene Engelhard
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 43c59ee45f4a8303021d8ae22ea42a7238170f47
Author: Rene Engelhard 
Date:   Sun Nov 23 19:29:09 2014 +0100

gcc3_linux_powerpc64 bridges: assert -> static_assert to fix build

Change-Id: I9cd345de6895b38fc766b0fe16e218a146bfb7b9

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index f982a93..f2e5174 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -92,7 +92,7 @@ static typelib_TypeClass cpp2uno_call(
 ng++;
 
 // stack space
-assert(sizeof(void *) == sizeof(sal_Int64), "### unexpected size!");
+static_assert(sizeof(void *) == sizeof(sal_Int64), "### unexpected size!");
 // parameters
 void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
 void ** pCppArgs = pUnoArgs + nParams;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-11-23 Thread Rene Engelhard
 bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit ec1cb10982decac402a2121e3d64e45d353f1758
Author: Rene Engelhard 
Date:   Sun Nov 23 19:12:56 2014 +0100

aarch63 bridges: add missing #include 

Change-Id: Ie422682f38752a5f92336106d40c79d2bf9006c7

diff --git a/bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx 
b/bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
index b6d8cb6..cdfaea2 100644
--- a/bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
@@ -41,6 +41,8 @@
 
 #include 
 
+#include 
+
 namespace {
 
 OUString toUnoName(char const * name) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-11-21 Thread Michael Stahl
 bridges/source/cpp_uno/gcc3_linux_arm/except.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 04a7e55b486d4da83434ce6c81036b3fcf7be469
Author: Michael Stahl 
Date:   Fri Nov 21 18:38:38 2014 +0100

bridges: oops some semicolons got lost

Change-Id: I5c2f9286067237ec1a9df6a47009e25e82ea7f63

diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
index 675187c..23ebca5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
@@ -309,7 +309,7 @@ namespace CPPU_CURRENT_NAMESPACE
 RuntimeException aRE( "no exception header!" );
 Type const & rType = ::getCppuType( &aRE );
 uno_type_any_constructAndConvert( pUnoExc, &aRE, 
rType.getTypeLibType(), pCpp2Uno );
-SAL_WARN("bridges", aRE.Message)
+SAL_WARN("bridges", aRE.Message);
 return;
 }
 
@@ -325,7 +325,7 @@ namespace CPPU_CURRENT_NAMESPACE
 RuntimeException aRE( OUString("exception type not found: ") + 
unoName );
 Type const & rType = ::getCppuType( &aRE );
 uno_type_any_constructAndConvert( pUnoExc, &aRE, 
rType.getTypeLibType(), pCpp2Uno );
-SAL_WARN("bridges", aRE.Message)
+SAL_WARN("bridges", aRE.Message);
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-11-21 Thread Michael Stahl
 bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx|2 +-
 bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx   |4 ++--
 bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx   |2 +-
 bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx |2 +-
 bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx |2 +-
 bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx |2 +-
 bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx|2 +-
 bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx   |2 +-
 bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx   |2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit f085b0ab07edbf812a179a5679487386834fe38a
Author: Michael Stahl 
Date:   Fri Nov 21 17:50:33 2014 +0100

bridges: oops, static_assert requires 2nd string parameter

Change-Id: I09b461473f514f2b7c4f256aedbe129372bae9e3

diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
index 343d155..4922278 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
@@ -543,7 +543,7 @@ unsigned char* codeSnippet( unsigned char * code, sal_Int16 
nFunctionIndex, sal_
 if (! simple_ret_type)
 nOffsetAndIndex |= 0x8000;
 
-static_assert( sizeof (long) == 4 );
+static_assert(sizeof (long) == 4, "boo");
 
  /* generate this code */
  // lr  %r0,%r13
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
index 53d71f9..fb475cf 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
@@ -96,7 +96,7 @@ static typelib_TypeClass cpp2uno_call(
 {
 if ((reinterpret_cast< long >(pCppStack) & 7) != 0)
   {
-   static_assert(sizeof (double) == sizeof (sal_Int64));
+   static_assert(sizeof (double) == sizeof (sal_Int64), "boo");
void * pDest = alloca( sizeof (sal_Int64) );
*reinterpret_cast< sal_Int32 * >(pDest) =
*reinterpret_cast< sal_Int32 const * >(pCppStack);
@@ -442,7 +442,7 @@ unsigned char * codeSnippet(
 index |= 0x8000;
 }
 unsigned int * p = reinterpret_cast< unsigned int * >(code);
-static_assert(sizeof (unsigned int) == 4);
+static_assert(sizeof (unsigned int) == 4, "boo");
 // st %o0, [%sp+68]:
 *p++ = 0xD023A044;
 // st %o1, [%sp+72]:
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
index 0ac80dc..f3e4796 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
@@ -336,7 +336,7 @@ static void cpp_call(
 case typelib_TypeClass_HYPER:
 case typelib_TypeClass_UNSIGNED_HYPER:
 case typelib_TypeClass_DOUBLE:
-static_assert(sizeof (double) == sizeof (sal_Int64));
+static_assert(sizeof (double) == sizeof (sal_Int64), 
"boo");
   *reinterpret_cast< sal_Int32 * >(pCppStack) =
   *reinterpret_cast< sal_Int32 const * >(pUnoArgs[ 
nPos ]);
   pCppStack += sizeof (sal_Int32);
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
index 4ad28d2..5ef0fdc 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
@@ -407,7 +407,7 @@ unsigned char * codeSnippet(
 functionIndex |= 0x8000;
 }
 unsigned char * p = code;
-static_assert(sizeof (sal_Int32) == 4);
+static_assert(sizeof (sal_Int32) == 4, "boo");
 // mov function_index, %eax:
 *p++ = 0xB8;
 *reinterpret_cast< sal_Int32 * >(p) = functionIndex;
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
index ce76c24..f5fe6e7 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
@@ -97,7 +97,7 @@ static typelib_TypeClass cpp2uno_call(
 {
 if ((reinterpret_cast< long >(pCppStack) & 7) != 0)
   {
-   static_assert(sizeof (double) == sizeof (sal_Int64));
+   static_assert(sizeof (double) == sizeof (sal_Int64), "boo");
void * pDest = alloca( sizeof (sal_Int64) );
*reinterpret_cast< sal_Int32 * >(pDest) =
*reinterpret_cast< sal_Int32 const * >(pCppStack);
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx
inde

[Libreoffice-commits] core.git: bridges/source

2014-11-21 Thread Michael Stahl
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx   |2 --
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx   |2 --
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx |2 --
 3 files changed, 6 deletions(-)

New commits:
commit 42ff131336b79ffb5d6a498227bc4dbcfb7bcbee
Author: Michael Stahl 
Date:   Fri Nov 21 17:38:06 2014 +0100

bridges: forgot to remove some include diagnose.h

Change-Id: Ia4fb18a36769a3eecc20f92a6f5719b841964765

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
index 0a6390d..a5757ae 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
@@ -34,8 +34,6 @@
 // file as close to ../gcc3_linux_arm/cpp2uno.cxx as possible, to make
 // future unification easier.
 
-#include 
-
 #include 
 #include 
 #include 
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
index ea95642..9060584 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
@@ -28,8 +28,6 @@
 // place to keep this file as close to ../gcc3_linux_arm/uno2cpp.cxx
 // as possible, to make future unification easier.
 
-#include 
-
 #include 
 
 #include "bridges/cpp_uno/shared/bridge.hxx"
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
index 8473b61..fbe00fc 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
@@ -19,8 +19,6 @@
 
 #ifdef __arm64
 
-#include 
-
 #include 
 
 #include "bridges/cpp_uno/shared/bridge.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-11-20 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx   |2 ++
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx   |2 ++
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx |2 ++
 3 files changed, 6 insertions(+)

New commits:
commit 2b5b04e1e62914bf0902dfd7943cdc44499c47a6
Author: Tor Lillqvist 
Date:   Thu Nov 20 17:40:01 2014 +0200

Include 

Change-Id: I67cb459b1e9ab5638a5b405430d3e0a42fc6bfc3

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
index 2c02610..49d41a4 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
@@ -34,6 +34,8 @@
 // file as close to ../gcc3_linux_arm/cpp2uno.cxx as possible, to make
 // future unification easier.
 
+#include 
+
 #include 
 #include 
 #include 
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
index ed2d33f..1268608 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
@@ -28,6 +28,8 @@
 // place to keep this file as close to ../gcc3_linux_arm/uno2cpp.cxx
 // as possible, to make future unification easier.
 
+#include 
+
 #include 
 
 #include "bridges/cpp_uno/shared/bridge.hxx"
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
index 6639814..e2210c5 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
@@ -19,6 +19,8 @@
 
 #ifdef __arm64
 
+#include 
+
 #include 
 
 #include "bridges/cpp_uno/shared/bridge.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-11-17 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit d388ef0b3b4eeca17580e19014cc148cd98de61f
Author: Tor Lillqvist 
Date:   Mon Nov 17 17:50:07 2014 +0200

Blind fix attempt: include 

Change-Id: Ic734b56852212d4cee352fc3669dbb16838be8ae

diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
index 1b54647..0d6a754 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include "com/sun/star/uno/RuntimeException.hpp"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-11-17 Thread Matúš Kukan
 bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit d743004ac41c36cdbdcc31bf87b0736f0b468341
Author: Matúš Kukan 
Date:   Mon Nov 17 15:40:38 2014 +0100

missing include

Change-Id: Iac01fc756a74cbaeebd1d9a01ddea74bbaf18f4b

diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index 3a16543..8789e97 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -22,6 +22,7 @@
 
 #include 
 #include "com/sun/star/uno/RuntimeException.hpp"
+#include 
 #include 
 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-11-17 Thread Michael Stahl
 bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx |1 +
 bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit 8b50d6b176e53c11762bbcdd767060550acd1bc1
Author: Michael Stahl 
Date:   Mon Nov 17 12:49:21 2014 +0100

bridges: get at least the x86 bridge to build

Change-Id: Idd2f223e0c83e0a6a19e70bd677058b6899bf766

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
index bdb3093..70452c7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
@@ -20,6 +20,7 @@
 
 #include 
 #include "com/sun/star/uno/RuntimeException.hpp"
+#include 
 #include 
 #include 
 
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
index 3a31d08..fabcbc8 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
@@ -19,6 +19,7 @@
 
 
 #include 
+#include 
 
 #include 
 #include "com/sun/star/uno/RuntimeException.hpp"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source bridges/test jurt/test odk/examples

2014-11-12 Thread Noel Grandin
 bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java 
|3 ++-
 bridges/test/java_remote/Bug108825_Test.java  
|3 ++-
 jurt/test/com/sun/star/uno/WeakReference_Test.java
|3 ++-
 odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java
|2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit b95dcb97de986a1e7dd7f7fda258e559f8d60b1c
Author: Noel Grandin 
Date:   Tue Nov 11 15:35:08 2014 +0200

java: last statement in finalize() method should be call to super.finalize()

Change-Id: I1785c6cef1fe7c1990207a76c263cff388cbb7e1
Reviewed-on: https://gerrit.libreoffice.org/12375
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git 
a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java 
b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java
index 1c2b691..e129f10 100644
--- 
a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java
+++ 
b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java
@@ -51,9 +51,10 @@ public final class JNI_info_holder
 private native void finalize( long jni_info_handle );
 
 @Override
-protected void finalize()
+protected void finalize() throws Throwable
 {
 finalize( s_jni_info_handle );
+super.finalize();
 }
 }
 
diff --git a/bridges/test/java_remote/Bug108825_Test.java 
b/bridges/test/java_remote/Bug108825_Test.java
index e4343c5..182ae35 100644
--- a/bridges/test/java_remote/Bug108825_Test.java
+++ b/bridges/test/java_remote/Bug108825_Test.java
@@ -88,10 +88,11 @@ public final class Bug108825_Test extends ComplexTestCase {
 
 private final class Dummy implements XDummy {
 @Override
-protected void finalize() {
+protected void finalize() throws Throwable {
 synchronized (lock) {
 ++finalizedCount;
 }
+super.finalize();
 }
 }
 
diff --git a/jurt/test/com/sun/star/uno/WeakReference_Test.java 
b/jurt/test/com/sun/star/uno/WeakReference_Test.java
index a990f44..73a847d 100644
--- a/jurt/test/com/sun/star/uno/WeakReference_Test.java
+++ b/jurt/test/com/sun/star/uno/WeakReference_Test.java
@@ -44,8 +44,9 @@ public final class WeakReference_Test {
 }
 
 @Override
-protected void finalize() {
+protected void finalize() throws Throwable {
 adapter.dispose();
+super.finalize();
 }
 
 private static final class Adapter implements XAdapter {
diff --git a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java 
b/odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java
index 1d73270..080504c 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java
+++ b/odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java
@@ -37,8 +37,8 @@ class MyUnoObject implements com.sun.star.uno.XInterface
 
 @Override
 protected void finalize() throws Throwable {
-super.finalize();
 System.out.println( "finalizer called" );
+super.finalize();
 }
 
 public static void main( String args[] ) throws InterruptedException
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-11-10 Thread Stephan Bergmann
 bridges/source/cpp_uno/shared/vtablefactory.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 269b0b40814defe0241e8c79c1834e488ea13bc5
Author: Stephan Bergmann 
Date:   Tue Nov 11 08:28:52 2014 +0100

Avoid -fsanitize=signed-integer-overflow

Change-Id: Icec67e6eb57605102cabf494d3e2bb6249d785c7

diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx 
b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 2daf76b..2af1b62 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -348,7 +348,7 @@ sal_Int32 VtableFactory::createVtables(
 code = addLocalFunctions(
 &slots, code,
 #ifdef USE_DOUBLE_MMAP
-sal_IntPtr(block.exec) - sal_IntPtr(block.start),
+sal_uIntPtr(block.exec) - sal_uIntPtr(block.start),
 #endif
 type2,
 baseOffset.getFunctionOffset(type2->aBase.pTypeName),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-11-03 Thread Noel Grandin
 bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eb8530cc90ff12fa79ac24fd9703422a7e8c8415
Author: Noel Grandin 
Date:   Mon Nov 3 11:59:36 2014 +0200

fix sparc build

after my commit e7bc3cab019fbf040f9fb8b53ae2cf3f977d200b
"remove boilerplate in UNO Exception constructor calls"

Change-Id: Iccf79e3c41c860e15078b791fed551a9526aa453

diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx 
b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
index 4cad13e..51ad964 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
@@ -257,7 +257,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
 {
 throw RuntimeException(
 OUString("no rtti for type ") +
-*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName 
),
+*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName )
  );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-09-29 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx |   12 ++--
 bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx |   12 ++--
 bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx   |   13 ++---
 bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx  |   13 ++---
 bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx  |   12 ++--
 bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx |   12 ++--
 bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx  |   13 ++---
 bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx  |   12 ++--
 bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx   |   12 ++--
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |   12 ++--
 bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx  |   12 ++--
 bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx |   12 ++--
 bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx |   13 ++---
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx|   13 ++---
 bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx|   12 ++--
 bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx   |   13 ++---
 bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx   |   12 ++--
 bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx   |   13 ++---
 bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx  |   12 ++--
 bridges/source/cpp_uno/mingw_x86-64/cpp2uno.cxx |   13 ++---
 bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx |   14 ++
 bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx|   15 ---
 22 files changed, 222 insertions(+), 55 deletions(-)

New commits:
commit 67a9ae4dd80cefe04225d4fe5f7b5ff3ce3bcca8
Author: Stephan Bergmann 
Date:   Mon Sep 29 23:18:26 2014 +0200

Improve debug output

Change-Id: Iba0c35a5bc07ac7b67186c3eeae1a2c926a6bc69

diff --git a/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx
index 33bb5fa..5bae75f 100644
--- a/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx
@@ -334,10 +334,18 @@ static typelib_TypeClass cpp_mediate(
 
 typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
 
-OSL_ENSURE( nFunctionIndex < 
pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
 if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
 {
-throw RuntimeException( "illegal vtable index!", (XInterface 
*)pThis );
+SAL_WARN(
+"bridges",
+"illegal " << 
OUString::unacquired(&pTypeDescr->aBase.pTypeName)
+<< " vtable index " << nFunctionIndex << "/"
+<< pTypeDescr->nMapFunctionIndexToMemberIndex);
+throw RuntimeException(
+("illegal " + 
OUString::unacquired(&pTypeDescr->aBase.pTypeName)
+ + " vtable index " + OUString::number(nFunctionIndex) + "/"
+ + 
OUString::number(pTypeDescr->nMapFunctionIndexToMemberIndex)),
+(XInterface *)pThis);
 }
 
 // determine called method
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx
index c784d01..f47f369 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx
@@ -380,10 +380,18 @@ static typelib_TypeClass cpp_mediate(
 typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
 
 
-OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, 
"### illegal vtable index!" );
 if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
 {
-throw RuntimeException( "illegal vtable index!", (XInterface *)pCppI );
+SAL_WARN(
+"bridges",
+"illegal " << OUString::unacquired(&pTypeDescr->aBase.pTypeName)
+<< " vtable index " << nFunctionIndex << "/"
+<< pTypeDescr->nMapFunctionIndexToMemberIndex);
+throw RuntimeException(
+("illegal " + OUString::unacquired(&pTypeDescr->aBase.pTypeName)
+ + " vtable index " + OUString::number(nFunctionIndex) + "/"
+ + OUString::number(pTypeDescr->nMapFunctionIndexToMemberIndex)),
+(XInterface *)pCppI);
 }
 
 // determine called method
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
index b717a4f..ca300a0 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
@@ -311,11 +311,18 @@ namespace
 
 typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
 
-OSL_ENSURE( nFunctionIndex < 
pTypeDe

[Libreoffice-commits] core.git: bridges/source

2014-09-26 Thread Stephan Bergmann
 bridges/source/cpp_uno/shared/vtablefactory.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 22730b9f485fe23266d6d5e789dbc00c4f4cc5e4
Author: Stephan Bergmann 
Date:   Fri Sep 26 10:19:58 2014 +0200

The unused source_arena arg to alloc/freeExec can just be null

Change-Id: I16f8a9e8f421215fe5d392ba3f1f304618d70174

diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx 
b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 325f9e3..2daf76b 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -179,7 +179,7 @@ VtableFactory::VtableFactory(): m_arena(
 rtl_arena_create(
 "bridges::cpp_uno::shared::VtableFactory",
 sizeof (void *), // to satisfy alignment requirements
-0, reinterpret_cast< rtl_arena_type * >(-1), allocExec, freeExec, 0))
+0, nullptr, allocExec, freeExec, 0))
 {
 if (m_arena == 0) {
 throw std::bad_alloc();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-09-16 Thread Robert Antoni Buj i Gelonch
 bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java 
|2 +-
 bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java   
|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ec2d5ac3718981b4d225ac831232ae4a8a7e498f
Author: Robert Antoni Buj i Gelonch 
Date:   Tue Sep 16 13:21:40 2014 +0200

jni_uno: string comparison

Change-Id: If093afb43f6ad8d4fcf6c0ec426eb48a6061ef3e
Reviewed-on: https://gerrit.libreoffice.org/11470
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git 
a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java 
b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java
index 99fd9bc..1c2b691 100644
--- 
a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java
+++ 
b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_info_holder.java
@@ -24,7 +24,7 @@ import com.sun.star.lib.util.NativeLibraryLoader;
 public final class JNI_info_holder
 {
 static {
-if (System.getProperty("java.vendor") == "The Android Project") {
+if ("The Android Project".equals(System.getProperty("java.vendor"))) {
 // See corresponding code in
 // javaunohelper/com/sun/star/comp/helper/Bootstrap.java for more
 // comments.
diff --git 
a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java 
b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
index 8a60bee..af8f4a9 100644
--- a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
+++ b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
@@ -31,7 +31,7 @@ import com.sun.star.uno.IQueryInterface;
 public final class JNI_proxy implements java.lang.reflect.InvocationHandler
 {
 static {
-if (System.getProperty("java.vendor") == "The Android Project") {
+if ("The Android Project".equals(System.getProperty("java.vendor"))) {
 // See corresponding code in
 // javaunohelper/com/sun/star/comp/helper/Bootstrap.java for more
 // comments.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-29 Thread Julien Nabet
 bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 35e260c4a3e886c4177b232871f9f2775cd5c5f5
Author: Julien Nabet 
Date:   Fri Aug 29 21:38:37 2014 +0200

cppcheck: va_end_missing

Change-Id: I316830b56aba7874cff4a164925520a7b6c6131d

diff --git a/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx
index 8f5a032..7f23e1ef 100644
--- a/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx
@@ -357,6 +357,7 @@ extern "C" void vtableSlotCall(
 "ldp d2, d3, [%[fpr_], #16]\n\t"
 :: [gpr_]"r" (gpr), [fpr_]"r" (fpr)
 : "r0", "r1", "v0", "v1", "v2", "v3");
+va_end(ap);
 }
 #pragma GCC diagnostic pop
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-29 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7da6716e98f22d6cb968c3218b5f4936f868a977
Author: Caolán McNamara 
Date:   Fri Aug 29 11:29:36 2014 +0100

sigh, simply forgot to include the endian header

so the ppc64 bridge was broken

Change-Id: Ib60274ed25531f500bcd97f5ea9b04091ce01825

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index 430999f..ee95c9c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -21,7 +21,7 @@
 #include 
 #include 
 #include 
-
+#include 
 #include "bridges/cpp_uno/shared/bridge.hxx"
 #include "bridges/cpp_uno/shared/cppinterfaceproxy.hxx"
 #include "bridges/cpp_uno/shared/types.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-28 Thread David Tardon
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ef8b94ab0e689851871f9783d4b1f3724177cf3a
Author: David Tardon 
Date:   Thu Aug 28 16:10:11 2014 +0200

cast arg to the right type

According to desc., typelib_TypeDescription can be safely used where
typelib_TypeDescriptionReference is expected.

Change-Id: Ibc3effd7e2894ba6ff738503e747f5157c146454

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index 5836d8b..b41cee6 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -233,7 +233,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 
nVtableIndex,
 "fmr%0, 1\n\t"
 : "=f" (dret), "=r" (r3), "=r" (r4) : );
 
-MapReturn(r3, r4, dret, pReturnTypeDescr, pRegisterReturn);
+MapReturn(r3, r4, dret, reinterpret_cast(pReturnTypeDescr), pRegisterReturn);
 }
 
 // Macros for easier insertion of values to registers or stack
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-28 Thread David Tardon
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b38de1f8f3712f0a632ff9b6fa10df2cf3ce268f
Author: David Tardon 
Date:   Thu Aug 28 13:44:13 2014 +0200

fix variable name

Change-Id: I170f0390f8f510591d444f44c20434b15077e687

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index cfe720d..5836d8b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -233,7 +233,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 
nVtableIndex,
 "fmr%0, 1\n\t"
 : "=f" (dret), "=r" (r3), "=r" (r4) : );
 
-MapReturn(r3, r4, dret, pReturnTypeRef, pRegisterReturn);
+MapReturn(r3, r4, dret, pReturnTypeDescr, pRegisterReturn);
 }
 
 // Macros for easier insertion of values to registers or stack
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-22 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |   10 +-
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |8 
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit af73a28e8538f5b2df6bbfd592d8987511520d4d
Author: Caolán McNamara 
Date:   Fri Aug 22 21:08:47 2014 +0100

if _CALL_ELF -> if defined(_CALL_ELF) && _CALL_ELF == 2

Change-Id: I34e9a98586b795a3fa31ae775aee7898b36e65d4

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index 35cc16f..430999f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -326,7 +326,7 @@ static typelib_TypeClass cpp2uno_call(
 }
 }
 
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
 #  define PARAMSAVE 32
 #else
 #  define PARAMSAVE 48
@@ -545,7 +545,7 @@ extern "C" void privateSnippetExecutor( ... )
 "mr %0,1\n\t"
 : "=r" (sp) : );
 
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
 volatile long nRegReturn[2];
 #else
 volatile long nRegReturn[1];
@@ -592,7 +592,7 @@ extern "C" void privateSnippetExecutor( ... )
 default:
 __asm__( "ld 3,%0\n\t"
 : : "m" (nRegReturn[0]) );
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
 __asm__( "ld 4,%0\n\t"
 : : "m" (nRegReturn[1]) );
 #endif
@@ -600,7 +600,7 @@ extern "C" void privateSnippetExecutor( ... )
 }
 }
 
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
 const int codeSnippetSize = 32;
 #else
 const int codeSnippetSize = 24;
@@ -618,7 +618,7 @@ unsigned char *  codeSnippet( unsigned char * code, 
sal_Int32 nFunctionIndex, sa
 
 if ( bHasHiddenParam )
 nOffsetAndIndex |= 0x8000;
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
 unsigned int *raw = (unsigned int *)&code[0];
 
 raw[0] = 0xe96c0018;/* 0:   ld  11,2f-0b(12)*/
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index 391ef219..cfe720d 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -39,7 +39,7 @@ using namespace ::com::sun::star::uno;
 
 namespace ppc64
 {
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
 bool is_complex_struct(const typelib_TypeDescription * type)
 {
 const typelib_CompoundTypeDescription * p
@@ -70,7 +70,7 @@ namespace ppc64
 {
 if (bridges::cpp_uno::shared::isSimpleType(pTypeRef))
 return false;
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
 else if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || 
pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION)
 {
 typelib_TypeDescription * pTypeDescr = 0;
@@ -115,7 +115,7 @@ void MapReturn(long r3, long r4, double dret, 
typelib_TypeDescriptionReference*
 case typelib_TypeClass_DOUBLE:
 *reinterpret_cast( pRegisterReturn ) = dret;
 break;
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
 case typelib_TypeClass_STRUCT:
 case typelib_TypeClass_EXCEPTION:
 if (!ppc64::return_in_hidden_param(pReturnType))
@@ -175,7 +175,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 
nVtableIndex,
 pMethod += 8 * nVtableIndex;
 pMethod = *((sal_uInt64 *)pMethod);
 
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
 typedef void (* FunctionCall )(...);
 #else
 typedef void (* FunctionCall )( sal_uInt64, sal_uInt64, sal_uInt64, 
sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64 );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-22 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b3213401a29c8b4a2b69ee6684531f6d323370b6
Author: Caolán McNamara 
Date:   Fri Aug 22 15:16:10 2014 +0100

pasted in reverse

Change-Id: I6a3f8c9bffd2dbac90c73e472f99dd97b9977127

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index 507d3b1..35cc16f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -546,9 +546,9 @@ extern "C" void privateSnippetExecutor( ... )
 : "=r" (sp) : );
 
 #if _CALL_ELF == 2
-volatile long nRegReturn[1];
-#else
 volatile long nRegReturn[2];
+#else
+volatile long nRegReturn[1];
 #endif
 
 typelib_TypeClass aType =
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-22 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |8 +++
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |   17 +---
 2 files changed, 22 insertions(+), 3 deletions(-)

New commits:
commit 6ab1951ea2e31f47bc9f211dd9b2681c794b8e7f
Author: Caolán McNamara 
Date:   Fri Aug 22 15:06:53 2014 +0100

Resolves: rhbz#1125588 ppc64le passes testtools

*bzzt*, , it's alive!

Change-Id: I0b42f4e2603e6d76200d63ab2e26bbb856ae1173

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index dbdef1b..507d3b1 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -545,7 +545,11 @@ extern "C" void privateSnippetExecutor( ... )
 "mr %0,1\n\t"
 : "=r" (sp) : );
 
+#if _CALL_ELF == 2
 volatile long nRegReturn[1];
+#else
+volatile long nRegReturn[2];
+#endif
 
 typelib_TypeClass aType =
 cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, sp, 
(sal_Int64*)nRegReturn);
@@ -588,6 +592,10 @@ extern "C" void privateSnippetExecutor( ... )
 default:
 __asm__( "ld 3,%0\n\t"
 : : "m" (nRegReturn[0]) );
+#if _CALL_ELF == 2
+__asm__( "ld 4,%0\n\t"
+: : "m" (nRegReturn[1]) );
+#endif
 break;
 }
 }
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index aa054d7..391ef219 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -87,9 +87,9 @@ namespace ppc64
 }
 }
 
-void MapReturn(long r3, double dret, typelib_TypeClass eTypeClass, void 
*pRegisterReturn)
+void MapReturn(long r3, long r4, double dret, 
typelib_TypeDescriptionReference* pReturnType, void *pRegisterReturn)
 {
-switch (eTypeClass)
+switch (pReturnType->eTypeClass)
 {
 case typelib_TypeClass_HYPER:
 case typelib_TypeClass_UNSIGNED_HYPER:
@@ -115,6 +115,17 @@ void MapReturn(long r3, double dret, typelib_TypeClass 
eTypeClass, void *pRegist
 case typelib_TypeClass_DOUBLE:
 *reinterpret_cast( pRegisterReturn ) = dret;
 break;
+#if _CALL_ELF == 2
+case typelib_TypeClass_STRUCT:
+case typelib_TypeClass_EXCEPTION:
+if (!ppc64::return_in_hidden_param(pReturnType))
+{
+sal_uInt64 *pRegisters = 
reinterpret_cast(pRegisterReturn);
+pRegisters[0] = r3;
+if (pReturnType->pType->nSize > 8)
+pRegisters[1] = r4;
+}
+#endif
 default:
 break;
 }
@@ -222,7 +233,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 
nVtableIndex,
 "fmr%0, 1\n\t"
 : "=f" (dret), "=r" (r3), "=r" (r4) : );
 
-MapReturn(r3, dret, pReturnTypeDescr->eTypeClass, pRegisterReturn);
+MapReturn(r3, r4, dret, pReturnTypeRef, pRegisterReturn);
 }
 
 // Macros for easier insertion of values to registers or stack
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-22 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit ee6fcdd18b1a839d7d60617d4fda622f6e6e7e66
Author: Caolán McNamara 
Date:   Fri Aug 22 13:52:53 2014 +0100

Related: rhbz#1125588 ppc64le fix simple struct returning

Change-Id: I1e253922fdb606648eff9865f1125a24e35b0d9a

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index 55a5308..aa054d7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -305,14 +305,18 @@ static void cpp_call(
 
 void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
 
-bool bOverflow = false;
+bool bOverflow = false;
+bool bSimpleReturn = true;
 
 if (pReturnTypeDescr)
 {
 #if OSL_DEBUG_LEVEL > 2
 fprintf(stderr, "return type is %d\n", pReturnTypeDescr->eTypeClass);
 #endif
-if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
+if (ppc64::return_in_hidden_param(pReturnTypeRef))
+bSimpleReturn = false;
+
+if (bSimpleReturn)
 {
 pCppReturn = pUnoReturn; // direct way for simple types
 #if OSL_DEBUG_LEVEL > 2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-22 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |   15 ++--
 bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx   |1 
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |   50 
 3 files changed, 58 insertions(+), 8 deletions(-)

New commits:
commit 970ad502e3ea2cc992c6cc1c7583231aec5bf5da
Author: Caolán McNamara 
Date:   Fri Aug 22 13:31:03 2014 +0100

Related: rhbz#1125588 ppc64le has new struct passing rules

http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01145.html
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01147.html

now we just fail instead of crash

Change-Id: I329c676337885bcf4fdfdcdb5912d75424862126

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index c0ca97f..dbdef1b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -72,7 +72,7 @@ static typelib_TypeClass cpp2uno_call(
 
 if (pReturnTypeDescr)
 {
-if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
+if (!ppc64::return_in_hidden_param(pReturnTypeRef))
 {
 pUnoReturn = pRegisterReturn; // direct way for simple types
 }
@@ -599,7 +599,7 @@ const int codeSnippetSize = 24;
 #endif
 
 unsigned char *  codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, 
sal_Int32 nVtableOffset,
-  bool simpleRetType)
+  bool bHasHiddenParam)
 {
 #if OSL_DEBUG_LEVEL > 2
 fprintf(stderr,"in codeSnippet functionIndex is %x\n", nFunctionIndex);
@@ -608,9 +608,8 @@ unsigned char *  codeSnippet( unsigned char * code, 
sal_Int32 nFunctionIndex, sa
 
 sal_uInt64 nOffsetAndIndex = ( ( (sal_uInt64) nVtableOffset ) << 32 ) | ( 
(sal_uInt64) nFunctionIndex );
 
-if ( !simpleRetType )
+if ( bHasHiddenParam )
 nOffsetAndIndex |= 0x8000;
-
 #if _CALL_ELF == 2
 unsigned int *raw = (unsigned int *)&code[0];
 
@@ -629,7 +628,7 @@ unsigned char *  codeSnippet( unsigned char * code, 
sal_Int32 nFunctionIndex, sa
 #endif
 #if OSL_DEBUG_LEVEL > 2
 fprintf(stderr, "in: offset/index is %x %x %d, %lx\n",
-nFunctionIndex, nVtableOffset, !simpleRetType, raw[2]);
+nFunctionIndex, nVtableOffset, bHasHiddenParam, raw[2]);
 #endif
 return (code + codeSnippetSize);
 }
@@ -696,7 +695,7 @@ unsigned char * 
bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
 (s++)->fn = code + writetoexecdiff;
 code = codeSnippet(
 code, functionOffset++, vtableOffset,
-bridges::cpp_uno::shared::isSimpleType(
+ppc64::return_in_hidden_param(
 reinterpret_cast<
 typelib_InterfaceAttributeTypeDescription * >(
 member)->pAttributeTypeRef));
@@ -707,7 +706,7 @@ unsigned char * 
bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
 member)->bReadOnly)
 {
 (s++)->fn = code + writetoexecdiff;
-code = codeSnippet(code, functionOffset++, vtableOffset, true);
+code = codeSnippet(code, functionOffset++, vtableOffset, 
false);
 }
 break;
 
@@ -715,7 +714,7 @@ unsigned char * 
bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
 (s++)->fn = code + writetoexecdiff;
 code = codeSnippet(
 code, functionOffset++, vtableOffset,
-bridges::cpp_uno::shared::isSimpleType(
+ppc64::return_in_hidden_param(
 reinterpret_cast<
 typelib_InterfaceMethodTypeDescription * >(
 member)->pReturnTypeRef));
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx
index 87303b6..b5f609a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx
@@ -85,6 +85,7 @@ void fillUnoException(
 namespace ppc64
 {
 enum ppclimits { MAX_GPR_REGS = 8, MAX_SSE_REGS = 13 };
+bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef );
 }
 
 #endif
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index 33131ea..55a5308 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -37,6 +37,56 @@
 using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 
+namespace ppc64
+{
+#if _CALL_ELF == 2
+bool is_complex_struct(const typelib_TypeDescription * type)
+{
+const typelib_CompoundTypeDescription * p
+= reinterpret_cast< const typelib_CompoundTypeDescription * 
>(type);
+for (sal_Int32 i = 0; i < p->nMembers; ++i)
+{
+ 

[Libreoffice-commits] core.git: bridges/source

2014-08-22 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 6396e18f4d49c24283b170310a1892db40c128d3
Author: Caolán McNamara 
Date:   Fri Aug 22 12:07:33 2014 +0100

Related: rhbz#1125588 force existence of argument save area

ELFv2 ABI on ppc64 optimises stack allocation
(http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01149.html
so we're getting no argument save area

This now appears to pass the simple cases and onwards
to the tricky ones

Change-Id: Ie56d148ebea7fcfc023cb7183bc97f09186e66b4

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index c047ebf..33131ea 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -114,7 +114,11 @@ static void callVirtualMethod(void * pThis, sal_uInt32 
nVtableIndex,
 pMethod += 8 * nVtableIndex;
 pMethod = *((sal_uInt64 *)pMethod);
 
+#if _CALL_ELF == 2
+typedef void (* FunctionCall )(...);
+#else
 typedef void (* FunctionCall )( sal_uInt64, sal_uInt64, sal_uInt64, 
sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64 );
+#endif
 FunctionCall pFunc = (FunctionCall)pMethod;
 
 volatile double dret;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-21 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit d8fcd8ca9af087e98a2f6d9cbcf6eb42cddd0c74
Author: Caolán McNamara 
Date:   Thu Aug 21 16:33:47 2014 +0100

Related: rhbz#1125588 get to the end of cpp_mediate on ppc64le

Change-Id: Id3928ef5ac68ea13a7aa8723bc8b068ecf8075a0

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index 479444a..c0ca97f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -326,7 +326,11 @@ static typelib_TypeClass cpp2uno_call(
 }
 }
 
-
+#if _CALL_ELF == 2
+#  define PARAMSAVE 32
+#else
+#  define PARAMSAVE 48
+#endif
 
 static typelib_TypeClass cpp_mediate(
 sal_uInt64 nOffsetAndIndex,
@@ -339,7 +343,7 @@ static typelib_TypeClass cpp_mediate(
 sal_Int32 nFunctionIndex = (nOffsetAndIndex & 0x);
 
 long sf = *(long*)sp;
-void ** ovrflw = (void**)(sf + 112);
+void ** ovrflw = (void**)(sf + PARAMSAVE + 64);
 
 // gpreg:  [ret *], this, [other gpr params]
 // fpreg:  [fpr params]
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-21 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |   17 
 1 file changed, 17 insertions(+)

New commits:
commit 4c5bbbf059924f3aa24620a4cbbc35816978a606
Author: Caolán McNamara 
Date:   Thu Aug 21 15:44:03 2014 +0100

Related: rhbz#1125588 get as far as privateSnippetExecutor

Change-Id: Icc386083ecd9faefbedebbb9d2496a4eddfa0b2b

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index 1190507..479444a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -588,7 +588,11 @@ extern "C" void privateSnippetExecutor( ... )
 }
 }
 
+#if _CALL_ELF == 2
+const int codeSnippetSize = 32;
+#else
 const int codeSnippetSize = 24;
+#endif
 
 unsigned char *  codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, 
sal_Int32 nVtableOffset,
   bool simpleRetType)
@@ -603,9 +607,22 @@ unsigned char *  codeSnippet( unsigned char * code, 
sal_Int32 nFunctionIndex, sa
 if ( !simpleRetType )
 nOffsetAndIndex |= 0x8000;
 
+#if _CALL_ELF == 2
+unsigned int *raw = (unsigned int *)&code[0];
+
+raw[0] = 0xe96c0018;/* 0:   ld  11,2f-0b(12)*/
+raw[1] = 0xe98c0010;/*  ld  12,1f-0b(12)*/
+raw[2] = 0x7d8903a6;/*  mtctr   12  */
+raw[3] = 0x4e800420;/*  bctr*/
+/* 1:   .quad   function_addr   */
+/* 2:   .quad   context */
+*(void **)&raw[4] = (void *)privateSnippetExecutor;
+*(void **)&raw[6] = (void*)nOffsetAndIndex;
+#else
 void ** raw = (void **)&code[0];
 memcpy(raw, (char*) privateSnippetExecutor, 16);
 raw[2] = (void*) nOffsetAndIndex;
+#endif
 #if OSL_DEBUG_LEVEL > 2
 fprintf(stderr, "in: offset/index is %x %x %d, %lx\n",
 nFunctionIndex, nVtableOffset, !simpleRetType, raw[2]);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source configure.ac desktop/source jvmfwk/plugins

2014-08-21 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |   17 ++--
 configure.ac|7 ++
 desktop/source/deployment/misc/dp_platform.cxx  |3 ++
 jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx|6 -
 4 files changed, 26 insertions(+), 7 deletions(-)

New commits:
commit 170109708e6a082252efba3d2f1726bbd82b6452
Author: Caolán McNamara 
Date:   Thu Aug 21 08:52:16 2014 +0100

Related: rhbz#1125588 first steps for ppc64le

almost certainly won't get us too far, but a start

Change-Id: Ic20b97a97b6d506c32322173bd8332d15c3a4555

diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index a4a08c5..1190507 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -31,6 +31,11 @@
 #include 
 #include 
 
+#ifdef OSL_BIGENDIAN
+#define IS_BIG_ENDIAN 1
+#else
+#define IS_BIG_ENDIAN 0
+#endif
 
 using namespace ::com::sun::star::uno;
 
@@ -139,13 +144,13 @@ static typelib_TypeClass cpp2uno_call(
 case typelib_TypeClass_BOOLEAN:
 if (ng < ppc64::MAX_GPR_REGS)
 {
-pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + 
(sizeof(void*)-1));
+pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + 
7*IS_BIG_ENDIAN);
 ng++;
 gpreg++;
 }
 else
 {
-pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + 
(sizeof(void*)-1));
+pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + 
7*IS_BIG_ENDIAN);
 bOverflowUsed = true;
 }
 if (bOverflowUsed) ovrflw++;
@@ -155,13 +160,13 @@ static typelib_TypeClass cpp2uno_call(
 case typelib_TypeClass_UNSIGNED_SHORT:
 if (ng < ppc64::MAX_GPR_REGS)
 {
-pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + 
(sizeof(void*)-2));
+pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + 
6*IS_BIG_ENDIAN);
 ng++;
 gpreg++;
 }
 else
 {
-pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + 
(sizeof(void*)-2));
+pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + 
6*IS_BIG_ENDIAN);
 bOverflowUsed = true;
 }
 if (bOverflowUsed) ovrflw++;
@@ -171,13 +176,13 @@ static typelib_TypeClass cpp2uno_call(
 case typelib_TypeClass_UNSIGNED_LONG:
 if (ng < ppc64::MAX_GPR_REGS)
 {
-pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + 
(sizeof(void*)-4));
+pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + 
4*IS_BIG_ENDIAN);
 ng++;
 gpreg++;
 }
 else
 {
-pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + 
(sizeof(void*)-4));
+pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + 
4*IS_BIG_ENDIAN);
 bOverflowUsed = true;
 }
 if (bOverflowUsed) ovrflw++;
diff --git a/configure.ac b/configure.ac
index bc823c7..ac3051d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4380,6 +4380,13 @@ linux-gnu*)
 PLATFORMID=linux_powerpc64
 OUTPATH=unxlngppc64
 ;;
+powerpc64le)
+CPUNAME=POWERPC64
+RTL_ARCH=PowerPC_64_LE
+LIB64="lib64"
+PLATFORMID=linux_powerpc64le
+OUTPATH=unxlngppc64
+;;
 sparc)
 CPUNAME=SPARC
 RTL_ARCH=SPARC
diff --git a/desktop/source/deployment/misc/dp_platform.cxx 
b/desktop/source/deployment/misc/dp_platform.cxx
index 6b5215a..6e69359 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -35,6 +35,7 @@
 #define PLATFORM_LINUX_SPARC"linux_sparc"
 #define PLATFORM_LINUX_POWERPC  "linux_powerpc"
 #define PLATFORM_LINUX_POWERPC64"linux_powerpc64"
+#define PLATFORM_LINUX_POWERPC64_LE "linux_powerpc64_le"
 #define PLATFORM_LINUX_ARM_EABI "linux_arm_eabi"
 #define PLATFORM_LINUX_ARM_OABI "linux_arm_oabi"
 #define PLATFORM_LINUX_MIPS_EL  "linux_mips_el"
@@ -129,6 +130,8 @@ namespace
 ret = checkOSandCPU("Linux", "PowerPC");
 else if (token == PLATFORM_LINUX_POWERPC64)
 ret = checkOSandCPU("Linux", "PowerPC_64");
+else if (token == PLATFORM_LINUX_POWERPC64_LE)
+ret = checkOSandCPU(

[Libreoffice-commits] core.git: bridges/source

2014-08-07 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit bbf2ba56505b92c9efeb21a9aeacba491a0301a1
Author: Caolán McNamara 
Date:   Thu Aug 7 18:51:37 2014 +0100

WaE: -Werror=unused-parameter

Change-Id: I064c738b371999bb73726bde3669c710742fae80

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index dd6537d..b8a6363 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -457,6 +457,7 @@ bridges::cpp_uno::shared::VtableFactory::initializeBlock(
 slots[-2].fn = reinterpret_cast(-(vtableNumber * sizeof (void *)));
 #if ENABLE_RUNTIME_OPTIMIZATIONS
 slots[-1].fn = 0;
+(void)type;
 #else
 slots[-1].fn = x86_64::getRtti(type->aBase);
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-08-07 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx |  201 ++
 bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.hxx |   37 
 2 files changed, 238 insertions(+)

New commits:
commit 26ed25538fab12c4b1e3ff2516487a29897ba122
Author: Stephan Bergmann 
Date:   Thu Aug 7 18:46:21 2014 +0200

New files missing from prev commit

Change-Id: I9889e97a7f9e70d8b2d82e26d9e0f971a943d007

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
new file mode 100644
index 000..b0f300d
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
@@ -0,0 +1,201 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+namespace {
+
+class RTTI
+{
+typedef boost::unordered_map< OUString, std::type_info *, OUStringHash > 
t_rtti_map;
+
+osl::Mutex m_mutex;
+t_rtti_map m_rttis;
+t_rtti_map m_generatedRttis;
+
+void * m_hApp;
+
+public:
+RTTI();
+~RTTI();
+
+std::type_info * getRTTI(typelib_TypeDescription const &);
+};
+
+RTTI::RTTI()
+#if defined(FREEBSD) && __FreeBSD_version < 702104
+: m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) )
+#else
+: m_hApp( dlopen( 0, RTLD_LAZY ) )
+#endif
+{
+}
+
+RTTI::~RTTI()
+{
+dlclose( m_hApp );
+}
+
+std::type_info * RTTI::getRTTI(typelib_TypeDescription const & pTypeDescr)
+{
+std::type_info * rtti;
+
+OUString const & unoName = *(OUString const *)&pTypeDescr.pTypeName;
+
+osl::MutexGuard guard( m_mutex );
+t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) );
+if (iFind == m_rttis.end())
+{
+// RTTI symbol
+OStringBuffer buf( 64 );
+buf.append( "_ZTIN" );
+sal_Int32 index = 0;
+do
+{
+OUString token( unoName.getToken( 0, '.', index ) );
+buf.append( token.getLength() );
+OString c_token( OUStringToOString( token, 
RTL_TEXTENCODING_ASCII_US ) );
+buf.append( c_token );
+}
+while (index >= 0);
+buf.append( 'E' );
+
+OString symName( buf.makeStringAndClear() );
+#if defined(FREEBSD) && __FreeBSD_version < 702104 /* #i22253# */
+rtti = (std::type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
+#else
+rtti = (std::type_info *)dlsym( m_hApp, symName.getStr() );
+#endif
+
+if (rtti)
+{
+std::pair< t_rtti_map::iterator, bool > insertion (
+m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
+SAL_WARN_IF( !insertion.second, "bridges", "key " << unoName << " 
already in rtti map" );
+}
+else
+{
+// try to lookup the symbol in the generated rtti map
+t_rtti_map::const_iterator iFind2( m_generatedRttis.find( unoName 
) );
+if (iFind2 == m_generatedRttis.end())
+{
+// we must generate it !
+// symbol and rtti-name is nearly identical,
+// the symbol is prefixed with _ZTI
+char const * rttiName = symName.getStr() +4;
+#if OSL_DEBUG_LEVEL > 1
+fprintf( stderr,"generated rtti for %s\n", rttiName );
+#endif
+switch (pTypeDescr.eTypeClass) {
+case typelib_TypeClass_EXCEPTION:
+{
+typelib_CompoundTypeDescription const & ctd
+= reinterpret_cast<
+typelib_CompoundTypeDescription const &>(
+pTypeDescr);
+if (ctd.pBaseTypeDescription)
+{
+// ensure availability of base
+std::type_info * base_rtti = getRTTI(
+ctd.pBaseTypeDescription->aBase);
+rtti = new __cxxabiv1::__si_class_type_info(
+strdup( rttiName ), 
(__cxxabiv1::__cl

[Libreoffice-commits] core.git: bridges/source

2014-08-05 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_intel/call.hxx|   31 
 bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx |1 
 2 files changed, 32 insertions(+)

New commits:
commit 6526881a0ce4b086a3e5ef23190ae77f7441da0b
Author: Stephan Bergmann 
Date:   Tue Aug 5 17:01:36 2014 +0200

loplugin:unreffun

Change-Id: Ie5608777b0bee002437117709d2c96062a39ff55

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/call.hxx 
b/bridges/source/cpp_uno/gcc3_linux_intel/call.hxx
new file mode 100644
index 000..986d210
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/call.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_INTEL_CALL_HXX
+#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_INTEL_CALL_HXX
+
+#include 
+
+extern "C" void cpp_vtable_call(
+int nFunctionIndex, int nVtableOffset, void ** pCallStack,
+void * pRegisterReturn);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
index 7bfa312..defe5aa 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
@@ -28,6 +28,7 @@
 #include "bridges/cpp_uno/shared/types.hxx"
 #include "bridges/cpp_uno/shared/vtablefactory.hxx"
 
+#include "call.hxx"
 #include "share.hxx"
 
 using namespace ::com::sun::star::uno;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-07-29 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 36c18abb7b04520a7ae71b87fd71d31410620db8
Author: Stephan Bergmann 
Date:   Tue Jul 29 20:46:33 2014 +0200

loplugin:unreffun

Change-Id: Iad6a0e5e04dd899827f7dc5dcdbde360ce34716d

diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
index 885e25c..aaf83a2 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
@@ -128,8 +128,6 @@ struct __cxa_eh_globals
 
 }
 
-extern "C" void privateSnippetExecutor();
-
 extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals *__cxa_get_globals () 
throw();
 
 namespace CPPU_CURRENT_NAMESPACE
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-07-07 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/share.hxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit ff26976702079a353c5039843bfcc911bc46d0cd
Author: Tor Lillqvist 
Date:   Tue Jul 8 01:09:15 2014 +0300

No need for that #else #error, breaks compilation for the simulator

Change-Id: I5703b269380bbaefd503780b8d396552e6517ddc

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx
index d4a11be..fec1f35 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx
@@ -61,8 +61,6 @@ namespace arm
 MAX_FPR_REGS = 8
 };
 bool return_in_x8( typelib_TypeDescriptionReference *pTypeRef );
-#else
-#error wtf
 #endif
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-06-11 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e19670ac3cbef9f0e83edda7576b6462e21e62b5
Author: Caolán McNamara 
Date:   Wed Jun 11 09:51:24 2014 +0100

fix build

Change-Id: Ic301459b751585a91aa4d6667fbe512d13bbb458

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
index 624d543..f2e7340 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
@@ -127,7 +127,7 @@ extern "C" void __cxa_throw(
 __attribute__((noreturn));
 }
 #endif
-}
+
 #endif
 
 namespace CPPU_CURRENT_NAMESPACE
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-06-11 Thread Baptiste Daroussin
 bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx   |   32 +++
 bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx |7 
 2 files changed, 39 insertions(+)

New commits:
commit d2725abf5d8f1e33dfd061f899101afc970292fb
Author: Baptiste Daroussin 
Date:   Tue Jun 10 18:35:36 2014 +0200

Fix build on FreeBSD with libc++

Change-Id: Ib51b05eb3f7c5d1288bee0f9f738ab1f37251c3e
Reviewed-on: https://gerrit.libreoffice.org/9722
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
index e476119..624d543 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
@@ -31,6 +31,32 @@
 #include "config_gcc.h"
 #include "uno/mapping.h"
 
+#ifdef _LIBCPP_VERSION
+
+namespace __cxxabiv1
+{
+struct __class_type_info : public std::type_info
+{
+explicit __class_type_info( const char *__n ) : type_info( __n ) { }
+virtual ~__class_type_info();
+};
+
+struct __si_class_type_info : public __class_type_info
+{
+explicit __si_class_type_info( const char *__n, const 
__class_type_info *__b ) :
+__class_type_info( __n ), __base_type( __b ) { }
+virtual ~__si_class_type_info();
+const __class_type_info *__base_type;
+};
+
+extern "C" void *__cxa_allocate_exception( std::size_t thrown_size ) _NOEXCEPT;
+
+extern "C" _LIBCPP_NORETURN void __cxa_throw(
+void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) );
+}
+
+#else
+
 namespace CPPU_CURRENT_NAMESPACE
 {
 
@@ -101,6 +127,8 @@ extern "C" void __cxa_throw(
 __attribute__((noreturn));
 }
 #endif
+}
+#endif
 
 namespace CPPU_CURRENT_NAMESPACE
 {
@@ -109,7 +137,11 @@ void raiseException(
 uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
 
 void fillUnoException(
+#ifdef _LIBCPP_VERSION
+__cxxabiv1::__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
+#else
 __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
+#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index b520054..f4c70a1 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -285,10 +285,17 @@ static void cpp_call(
  catch (...)
  {
  // fill uno exception
+#ifdef _LIBCPP_VERSION
+ CPPU_CURRENT_NAMESPACE::fillUnoException(
+ reinterpret_cast< __cxxabiv1::__cxa_eh_globals * >(
+ __cxxabiv1::__cxa_get_globals())->caughtExceptions,
+ *ppUnoExc, pThis->getBridge()->getCpp2Uno());
+#else
  fillUnoException(
  reinterpret_cast< CPPU_CURRENT_NAMESPACE::__cxa_eh_globals * >(
  __cxxabiv1::__cxa_get_globals())->caughtExceptions,
  *ppUnoExc, pThis->getBridge()->getCpp2Uno());
+#endif
 
 // temporary params
 for ( ; nTempIndices--; )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source winaccessibility/source

2014-05-18 Thread Thomas Arnhold
 bridges/source/jni_uno/jni_bridge.h |4 ++--
 winaccessibility/source/UAccCOM/acccommon.h |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a7eae9c280d860ca12b6300539404bec16700a7b
Author: Thomas Arnhold 
Date:   Sun May 18 13:44:01 2014 +0200

fix some header guards

Change-Id: Id2c15eba3f70cd8f1ae8869bc0838aef13cd96ee

diff --git a/bridges/source/jni_uno/jni_bridge.h 
b/bridges/source/jni_uno/jni_bridge.h
index 049f1e5..5779ae7 100644
--- a/bridges/source/jni_uno/jni_bridge.h
+++ b/bridges/source/jni_uno/jni_bridge.h
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_JNI_BRIDGE_H
-#define INCLUDED_JNI_BRIDGE_H
+#ifndef INCLUDED_BRIDGES_SOURCE_JNI_UNO_JNI_BRIDGE_H
+#define INCLUDED_BRIDGES_SOURCE_JNI_UNO_JNI_BRIDGE_H
 
 #include "jni_base.h"
 #include "jni_info.h"
diff --git a/winaccessibility/source/UAccCOM/acccommon.h 
b/winaccessibility/source/UAccCOM/acccommon.h
index 2f6b5d6..b3458d0 100644
--- a/winaccessibility/source/UAccCOM/acccommon.h
+++ b/winaccessibility/source/UAccCOM/acccommon.h
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef __ACCCOMMON_H_
-#define __ACCCOMMON_H_
+#ifndef INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ACCCOMMON_H
+#define INCLUDED_WINACCESSIBILITY_SOURCE_UACCCOM_ACCCOMMON_H
 
 //for MAccessible.cxx
 struct ltComp
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-05-15 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx |   65 
+-
 1 file changed, 38 insertions(+), 27 deletions(-)

New commits:
commit 08947735f9cc4b7bd69676c9dd4d1700e8e3b15b
Author: Stephan Bergmann 
Date:   Thu May 15 15:13:54 2014 +0200

Work around Clang -fsanitize=address inline asm error

Change-Id: Ia37b21af217af9b24522da28e817b4cb6ca2f8c9

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
index 47b8f13..084d5e5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
@@ -57,10 +57,27 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 if ( nGPR > x86_64::MAX_GPR_REGS )
 nGPR = x86_64::MAX_GPR_REGS;
 
+// Work around Clang -fsanitize=address "inline assembly requires more
+// registers than available" error:
+struct Data {
+sal_uInt64 pMethod;
+sal_uInt64 * pGPR;
+double * pFPR;
+sal_uInt64 nFPR;
+// Return values:
+sal_uInt64 rax;
+sal_uInt64 rdx;
+double xmm0;
+double xmm1;
+} data;
+data.pGPR = pGPR;
+data.pFPR = pFPR;
+data.nFPR = nFPR;
+
 // Get pointer to method
 sal_uInt64 pMethod = *((sal_uInt64 *)pThis);
 pMethod += 8 * nVtableIndex;
-pMethod = *((sal_uInt64 *)pMethod);
+data.pMethod = *((sal_uInt64 *)pMethod);
 
 // Load parameters to stack, if necessary
 sal_uInt64* pCallStack = NULL;
@@ -72,16 +89,10 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 std::memcpy( pCallStack, pStack, nStackBytes );
 }
 
-// Return values
-sal_uInt64 rax;
-sal_uInt64 rdx;
-double xmm0;
-double xmm1;
-
 asm volatile (
 
 // Fill the xmm registers
-"movq %6, %%rax\n\t"
+"movq 16%0, %%rax\n\t"
 
 "movsd   (%%rax), %%xmm0\n\t"
 "movsd  8(%%rax), %%xmm1\n\t"
@@ -93,7 +104,7 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 "movsd 56(%%rax), %%xmm7\n\t"
 
 // Fill the general purpose registers
-"movq %5, %%rax\n\t"
+"movq 8%0, %%rax\n\t"
 
 "movq(%%rax), %%rdi\n\t"
 "movq   8(%%rax), %%rsi\n\t"
@@ -103,46 +114,46 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 "movq  40(%%rax), %%r9\n\t"
 
 // Perform the call
-"movq %4, %%r11\n\t"
-"movq %7, %%rax\n\t"
+"movq 0%0, %%r11\n\t"
+"movq 24%0, %%rax\n\t"
 "call *%%r11\n\t"
 
 // Fill the return values
-"movq   %%rax, %0\n\t"
-"movq   %%rdx, %1\n\t"
-"movsd %%xmm0, %2\n\t"
-"movsd %%xmm1, %3\n\t"
-: "=m" ( rax ), "=m" ( rdx ), "=m" ( xmm0 ), "=m" ( xmm1 )
-: "m" ( pMethod ), "m" ( pGPR ), "m" ( pFPR ), "m" ( nFPR ),
+"movq   %%rax, 32%0\n\t"
+"movq   %%rdx, 40%0\n\t"
+"movsd %%xmm0, 48%0\n\t"
+"movsd %%xmm1, 56%0\n\t"
+:: "o" (data),
   "m" ( pCallStack ) // dummy input to prevent the compiler from 
optimizing the alloca out
 : "rax", "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r10", "r11",
   "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7",
-  "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"
+  "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15",
+  "memory"
 );
 
 switch (pReturnTypeRef->eTypeClass)
 {
 case typelib_TypeClass_HYPER:
 case typelib_TypeClass_UNSIGNED_HYPER:
-*reinterpret_cast( pRegisterReturn ) = rax;
+*reinterpret_cast( pRegisterReturn ) = data.rax;
 break;
 case typelib_TypeClass_LONG:
 case typelib_TypeClass_UNSIGNED_LONG:
 case typelib_TypeClass_ENUM:
-*reinterpret_cast( pRegisterReturn ) = 
*reinterpret_cast( &rax );
+*reinterpret_cast( pRegisterReturn ) = 
*reinterpret_cast( &data.rax );
 break;
 case typelib_TypeClass_CHAR:
 case typelib_TypeClass_SHORT:
 case typelib_TypeClass_UNSIGNED_SHORT:
-*reinterpret_cast( pRegisterReturn ) = 
*reinterpret_cast( &rax );
+*reinterpret_cast( pRegisterReturn ) = 
*reinterpret_cast( &data.rax );
 break;
 case typelib_TypeClass_BOOLEAN:
 case typelib_TypeClass_BYTE:
-*reinterpret_cast( pRegisterReturn ) = 
*reinterpret_cast( &rax );
+*reinterpret_cast( pRegisterReturn ) = 
*reinterpret_cast( &data.rax );
 break;
 case typelib_TypeClass_FLOAT:
 case typelib_TypeClass_DOUBLE:
-*reinterpret_cast( pRegisterReturn ) = xmm0;
+*reinterpret_cast( pRegisterReturn ) = data.xmm0;
 break;
 default:
 {
@@ -150,12 +161,12 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 if (bSimpleReturn && nRetSize <= 16 && nRetSize > 0)
 {
 sal_uInt64 longs[2];
-longs[

[Libreoffice-commits] core.git: bridges/source

2014-05-12 Thread Stephan Bergmann
 bridges/source/jni_uno/jni_info.h |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 43fba707c11c853875168d6255333d6c510f131f
Author: Stephan Bergmann 
Date:   Mon May 12 15:00:39 2014 +0200

Coverity 441351, 441352: JNI_type_info's real dtor is "destroy"

...as it needs a JNIEnv passed in, so cannot use the dtor directly.  Maybe 
this
code clarification helps silence Coverity's false resource leak reports.

Change-Id: I32e043e3fa9097263302a6c639e6815512410f4e

diff --git a/bridges/source/jni_uno/jni_info.h 
b/bridges/source/jni_uno/jni_info.h
index c92cd33..10263b2 100644
--- a/bridges/source/jni_uno/jni_info.h
+++ b/bridges/source/jni_uno/jni_info.h
@@ -82,6 +82,9 @@ struct JNI_interface_type_info : public JNI_type_info
 virtual void destroy( JNIEnv * jni_env ) SAL_OVERRIDE;
 explicit JNI_interface_type_info(
 JNI_context const & jni, typelib_TypeDescription * td );
+
+private:
+virtual ~JNI_interface_type_info() {}
 };
 
 struct JNI_compound_type_info : public JNI_type_info
@@ -95,6 +98,9 @@ struct JNI_compound_type_info : public JNI_type_info
 virtual void destroy( JNIEnv * jni_env ) SAL_OVERRIDE;
 explicit JNI_compound_type_info(
 JNI_context const & jni, typelib_TypeDescription * td );
+
+private:
+virtual ~JNI_compound_type_info() {}
 };
 
 struct JNI_type_info_holder
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-04-10 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_macosx_x86-64/call.cxx|7 ++-
 bridges/source/cpp_uno/gcc3_macosx_x86-64/call.hxx|   37 ++
 bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx |4 -
 bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx  |   14 +-
 4 files changed, 56 insertions(+), 6 deletions(-)

New commits:
commit abc1c428e028e081a94527b7cb5dc5199147fcfb
Author: Stephan Bergmann 
Date:   Thu Apr 10 15:45:58 2014 +0200

Clean up function declarations

Change-Id: I1f4a18e7aa6288e147c7f4c3f17bb99f1f0df5c5

diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/call.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/call.cxx
index 96834da..16f5e78 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/call.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/call.cxx
@@ -18,8 +18,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-extern "C" void
-privateSnippetExecutor()
+#include 
+
+#include 
+
+void privateSnippetExecutor()
 {
 asm volatile
 (
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/call.hxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/call.hxx
new file mode 100644
index 000..6738970
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/call.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_MACOSX_X86_64_CALL_HXX
+#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_MACOSX_X86_64_CALL_HXX
+
+#include 
+
+#include 
+#include 
+
+extern "C" typelib_TypeClass cpp_vtable_call(
+sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
+void ** gpreg, void ** fpreg, void ** ovrflw,
+sal_uInt64 * pRegisterReturn /* space for register return */ );
+
+extern "C" void privateSnippetExecutor();
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
index 67d2f88..86089c3 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx
@@ -36,6 +36,7 @@
 #include "bridges/cpp_uno/shared/vtablefactory.hxx"
 
 #include "abi.hxx"
+#include "call.hxx"
 #include "share.hxx"
 
 using namespace ::osl;
@@ -250,8 +251,7 @@ static typelib_TypeClass cpp2uno_call(
 }
 }
 
-
-extern "C" typelib_TypeClass cpp_vtable_call(
+typelib_TypeClass cpp_vtable_call(
 sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
 void ** gpreg, void ** fpreg, void ** ovrflw,
 sal_uInt64 * pRegisterReturn /* space for register return */ )
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index 6988dcb..664a5c0 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -55,11 +55,13 @@ namespace CPPU_CURRENT_NAMESPACE {
 namespace {
 
 struct Fake_type_info {
-virtual ~Fake_type_info() {}
+virtual ~Fake_type_info() SAL_DELETED_FUNCTION;
 char const * name;
 };
 
-struct Fake_class_type_info: Fake_type_info {};
+struct Fake_class_type_info: Fake_type_info {
+virtual ~Fake_class_type_info() SAL_DELETED_FUNCTION;
+};
 
 #if MACOSX_SDK_VERSION < 1070
 BOOST_STATIC_ASSERT(
@@ -67,6 +69,7 @@ BOOST_STATIC_ASSERT(
 #endif
 
 struct Fake_si_class_type_info: Fake_class_type_info {
+virtual ~Fake_si_class_type_info() SAL_DELETED_FUNCTION;
 void const * base;
 };
 
@@ -117,9 +120,16 @@ std::type_info * createFake_si_class_type_info(
 
 }
 
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
 void dummy_can_throw_anything( char const * )
 {
 }
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
+#pragma GCC diagnostic pop
+#endif
 
 static OUString toUNOname( char const * p ) SAL_THROW(())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org

[Libreoffice-commits] core.git: bridges/source

2014-04-08 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_x86-64/call.hxx|   34 +++
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx |3 +
 bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx  |4 +-
 bridges/source/cpp_uno/shared/vtablefactory.cxx  |8 ++--
 4 files changed, 42 insertions(+), 7 deletions(-)

New commits:
commit f598a018f153d005887bc994f93719e2da37c9cf
Author: Stephan Bergmann 
Date:   Tue Apr 8 10:35:57 2014 +0200

Clean up function declarations

Change-Id: I5d3ed0a266f327dbc8d506090221c43ef89fbcc0

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.hxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.hxx
new file mode 100644
index 000..3e5d316
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_X86_64_CALL_HXX
+#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_X86_64_CALL_HXX
+
+#include 
+
+#include 
+
+extern "C" typelib_TypeClass cpp_vtable_call(
+sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
+void ** gpreg, void ** fpreg, void ** ovrflw,
+sal_uInt64 * pRegisterReturn /* space for register return */ );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index 1756977..2373769 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -36,6 +36,7 @@
 #include "bridges/cpp_uno/shared/vtablefactory.hxx"
 
 #include "abi.hxx"
+#include "call.hxx"
 #include "share.hxx"
 
 using namespace ::osl;
@@ -252,7 +253,7 @@ static typelib_TypeClass cpp2uno_call(
 }
 
 
-extern "C" typelib_TypeClass cpp_vtable_call(
+typelib_TypeClass cpp_vtable_call(
 sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
 void ** gpreg, void ** fpreg, void ** ovrflw,
 sal_uInt64 * pRegisterReturn /* space for register return */ )
diff --git a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx 
b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
index e511627..4488e74 100644
--- a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
@@ -39,8 +39,8 @@
 static bridges::cpp_uno::shared::VtableFactory * pInstance;
 
 #if defined(__GNUG__) && !defined(__MINGW32__)
-void dso_init(void) __attribute__((constructor));
-void dso_exit(void) __attribute__((destructor));
+extern "C" void dso_init(void) __attribute__((constructor));
+extern "C" void dso_exit(void) __attribute__((destructor));
 #endif
 
 void dso_init(void) {
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx 
b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 43a5c81..f6e9e7c 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -35,6 +35,7 @@
 #include "sal/types.h"
 #include "typelib/typedescription.hxx"
 
+#include 
 #include 
 #include 
 #include 
@@ -120,7 +121,9 @@ extern "C" void SAL_CALL freeExec(
 
 }
 
-class VtableFactory::GuardedBlocks: public std::vector< Block > {
+class VtableFactory::GuardedBlocks:
+public std::vector, private boost::noncopyable
+{
 public:
 GuardedBlocks(VtableFactory const & factory):
 m_factory(factory), m_guarded(true) {}
@@ -130,9 +133,6 @@ public:
 void unguard() { m_guarded = false; }
 
 private:
-GuardedBlocks(GuardedBlocks &); // not implemented
-void operator =(GuardedBlocks); // not implemented
-
 VtableFactory const & m_factory;
 bool m_guarded;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-04-01 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx |   14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

New commits:
commit f470434b364ae223934cc4436cdc07eb03710c49
Author: Tor Lillqvist 
Date:   Tue Apr 1 20:17:30 2014 +0300

WaE: unused parameter 'nGPR' and 'nFPR'

Change-Id: If1de390588d9f73f1dd47a622e3b183062386043

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
index 49e0191..788b98e 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
@@ -125,9 +125,7 @@ void callVirtualMethod(
 sal_uInt64 *pStack,
 int nStack,
 sal_uInt64 *pGPR,
-int nGPR,
-double *pFPR,
-int nFPR)
+double *pFPR)
 {
 // never called
 if (! pThis)
@@ -141,9 +139,6 @@ void callVirtualMethod(
 memcpy( stack, pStack, nStackBytes );
 }
 
-assert( nGPR <= arm::MAX_GPR_REGS );
-assert( nFPR <= arm::MAX_FPR_REGS );
-
 sal_uInt64 pMethod = *((sal_uInt64*)pThis);
 pMethod += 8 * nVtableIndex;
 pMethod = *((sal_uInt64 *)pMethod);
@@ -348,6 +343,9 @@ static void cpp_call(
 }
 }
 
+assert( nGPR <= arm::MAX_GPR_REGS );
+assert( nFPR <= arm::MAX_FPR_REGS );
+
 try
 {
 callVirtualMethod(
@@ -355,8 +353,8 @@ static void cpp_call(
 pCppReturn, pReturnTypeRef,
 pStackStart,
 (pStack - pStackStart),
-pGPR, nGPR,
-pFPR, nFPR);
+pGPR,
+pFPR);
 
 // NO exception occurred...
 *ppUnoExc = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-03-12 Thread Jason Gerlowski
 bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx |3 +++
 bridges/source/cpp_uno/gcc3_ios_arm/share.hxx |3 +++
 bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx |3 +++
 bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx  |3 +++
 bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx  |3 +++
 bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx  |3 +++
 bridges/source/cpp_uno/gcc3_linux_mips/share.hxx  |3 +++
 bridges/source/cpp_uno/gcc3_linux_powerpc/share.hxx   |3 +++
 bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx |3 +++
 bridges/source/cpp_uno/gcc3_linux_s390/share.hxx  |3 +++
 bridges/source/cpp_uno/gcc3_linux_s390x/share.hxx |3 +++
 bridges/source/cpp_uno/gcc3_linux_sparc/share.hxx |4 
 bridges/source/cpp_uno/gcc3_macosx_intel/share.hxx|3 +++
 bridges/source/cpp_uno/gcc3_macosx_powerpc/share.hxx  |3 +++
 bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx   |3 +++
 bridges/source/cpp_uno/gcc3_solaris_intel/share.hxx   |3 +++
 bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx   |4 
 bridges/source/cpp_uno/mingw_intel/share.hxx  |3 +++
 bridges/source/cpp_uno/mingw_intel/smallstruct.hxx|3 +++
 bridges/source/cpp_uno/mingw_x86-64/share.hxx |3 +++
 bridges/source/cpp_uno/msvc_win32_intel/msci.hxx  |3 +++
 bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx |3 +++
 22 files changed, 68 insertions(+)

New commits:
commit a8a195c9e722861dac5d9fce282edd9558c797a7
Author: Jason Gerlowski 
Date:   Fri Mar 7 14:09:57 2014 -0500

fdo#68849 Add header guards to bridges/* files.

Change-Id: I8599908ccf1aba9a0843eb41dc16c21455acc5ba
Signed-off-by: Stephan Bergmann 

diff --git a/bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx 
b/bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx
index e4bf518..65d7f64 100644
--- a/bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx
@@ -16,6 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
+#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_AIX_POWERPC_SHARE_HXX
+#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_AIX_POWERPC_SHARE_HXX
 
 #include "uno/mapping.h"
 
@@ -85,4 +87,5 @@ namespace ppc
 enum ppclimits { MAX_GPR_REGS = 8, MAX_SSE_REGS = 13 };
 }
 
+#endif
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx
index 0a0a4fb..d4a11be 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx
@@ -16,6 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
+#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_IOS_ARM_SHARE_HXX
+#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_IOS_ARM_SHARE_HXX
 
 #include "uno/mapping.h"
 
@@ -64,4 +66,5 @@ namespace arm
 #endif
 }
 
+#endif
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx 
b/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx
index bce5cfe..c12f148 100644
--- a/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx
@@ -16,6 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
+#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_ALPHA_SHARE_HXX
+#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_ALPHA_SHARE_HXX
 
 #include "uno/mapping.h"
 
@@ -84,4 +86,5 @@ namespace axp
 enum axplimits { MAX_WORDS_IN_REGS = 6, MAX_GPR_REGS = 6, MAX_SSE_REGS = 6 
};
 }
 
+#endif
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx 
b/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx
index 0e1e658..5d868e5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx
@@ -16,6 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
+#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_HPPA_SHARE_HXX
+#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_HPPA_SHARE_HXX
 
 #include "uno/mapping.h"
 
@@ -88,4 +90,5 @@ namespace hppa
 bool isRegisterReturn( typelib_TypeDescriptionReference *pTypeRef );
 }
 
+#endif
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx 
b/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx
index 3f77f71..a24dd40 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx
@@ -16,6 +16,8 @@
  *   except in compliance with the L

[Libreoffice-commits] core.git: bridges/source

2014-02-24 Thread Rene Engelhard
 bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0bcaa9f9f7efe87f49473eefb467455dfb563138
Author: Rene Engelhard 
Date:   Mon Feb 24 17:59:08 2014 +0100

fix "fix gcc inline assembler operands usage"

Change-Id: I192c30bed60a657e9360bbe1d6dd217c75ed8da6

diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
index 063b8eb..def4e8d 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx
@@ -235,7 +235,7 @@ void callVirtualMethod( void * pAdjustedThisPtr,
 "=m"(o0),
 "=m"(o1),
 "=m"(f0d),
-"=m"(f0f),
+"=m"(f0f)
 :
 "r"(&saveReg[0])
 :
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-02-21 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a14f55e0785664d04ec74aa060e6a1bcd661f183
Author: Stephan Bergmann 
Date:   Fri Feb 21 21:56:02 2014 +0100

loplugin:implicitboolconversion, loplugin:literaltoboolconversion

Change-Id: I69bf7b3cace97dc7e1e5c362321b43d38dd36536

diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx
index 06e33de..facdcdd 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx
@@ -245,7 +245,7 @@ classify_argument( typelib_TypeDescriptionReference 
*pTypeRef, enum x86_64_reg_c
 #if OSL_DEBUG_LEVEL > 1
 OSL_TRACE( "Unhandled case: pType->eTypeClass == %d", 
pTypeRef->eTypeClass );
 #endif
-OSL_ASSERT(0);
+OSL_ASSERT(false);
 }
 return 0; /* Never reached.  */
 }
@@ -288,7 +288,7 @@ bool x86_64::examine_argument( 
typelib_TypeDescriptionReference *pTypeRef, bool
 #if OSL_DEBUG_LEVEL > 1
 OSL_TRACE( "Unhandled case: classes[n] == %d", classes[n] );
 #endif
-OSL_ASSERT(0);
+OSL_ASSERT(false);
 }
 return true;
 }
@@ -297,7 +297,7 @@ bool x86_64::return_in_hidden_param( 
typelib_TypeDescriptionReference *pTypeRef
 {
 int g, s;
 
-return examine_argument( pTypeRef, true, g, s ) == 0;
+return !examine_argument( pTypeRef, true, g, s );
 }
 
 void x86_64::fill_struct( typelib_TypeDescriptionReference *pTypeRef, const 
sal_uInt64 *pGPR, const double *pSSE, void *pStruct ) throw ()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-02-14 Thread Herbert Dürr
 bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx |   17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 1e3e7b077f708aefd2e866eca85abc822ae4cd02
Author: Herbert Dürr 
Date:   Thu Feb 13 13:21:50 2014 +

Resolves: #i124086# preserve 16byte stack alignment...

in gcc3-solaris-intel's uno2cpp bridge

Patch-by: Apostolos Syropoulos 
Review-by: Herbert Dürr 
(cherry picked from commit 95eeed58af27c63977a43c4d688b1467ef3cf047)

Conflicts:
bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx

Change-Id: I92a151c5d65f685a6249954b84da31471501ff9b

diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
index 2999fff..3d7ef69 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
@@ -39,7 +39,15 @@ namespace
 {
 
 
//==
-static void callVirtualMethod(
+void callVirtualMethod(
+void * pAdjustedThisPtr,
+sal_Int32 nVtableIndex,
+void * pRegisterReturn,
+typelib_TypeClass eReturnType,
+sal_Int32 * pStackLongs,
+sal_Int32 nStackLongs ) __attribute__((noinline));
+
+void callVirtualMethod(
 void * pAdjustedThisPtr,
 sal_Int32 nVtableIndex,
 void * pRegisterReturn,
@@ -61,6 +69,13 @@ static void callVirtualMethod(
 void * stackptr;
 asm volatile (
 "mov   %%esp, %2\n\t"
+   // preserve potential 128bit stack alignment
+"and   $0xfff0, %%esp\n\t"
+"mov   %3, %%eax\n\t"
+"lea   -4(,%%eax,4), %%eax\n\t"
+"and   $0xf, %%eax\n\t"
+"sub   $0xc, %%eax\n\t"
+"add   %%eax, %%esp\n\t"
 // copy values
 "mov   %3, %%eax\n\t"
 "mov   %%eax, %%edx\n\t"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2014-02-05 Thread Stephan Bergmann
 bridges/source/jni_uno/jni_bridge.cxx |   79 ++
 1 file changed, 34 insertions(+), 45 deletions(-)

New commits:
commit 970df64bc975a0a8aaae19bf46157c27f34f9a35
Author: Stephan Bergmann 
Date:   Wed Feb 5 11:11:39 2014 +0100

static assert is enough

Change-Id: I51be076119b23611f006fb4ebefd8f4bb727ded8

diff --git a/bridges/source/jni_uno/jni_bridge.cxx 
b/bridges/source/jni_uno/jni_bridge.cxx
index 056e269..7de0a7e 100644
--- a/bridges/source/jni_uno/jni_bridge.cxx
+++ b/bridges/source/jni_uno/jni_bridge.cxx
@@ -478,58 +478,47 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL uno_ext_getMapping(
 BOOST_STATIC_ASSERT( sizeof (jshort) == sizeof (sal_Int16) );
 BOOST_STATIC_ASSERT( sizeof (jint) == sizeof (sal_Int32) );
 BOOST_STATIC_ASSERT( sizeof (jlong) == sizeof (sal_Int64) );
-if ((JNI_FALSE == sal_False) &&
-(JNI_TRUE == sal_True) &&
-(sizeof (jboolean) == sizeof (sal_Bool)) &&
-(sizeof (jchar) == sizeof (sal_Unicode)) &&
-(sizeof (jdouble) == sizeof (double)) &&
-(sizeof (jfloat) == sizeof (float)) &&
-(sizeof (jbyte) == sizeof (sal_Int8)) &&
-(sizeof (jshort) == sizeof (sal_Int16)) &&
-(sizeof (jint) == sizeof (sal_Int32)) &&
-(sizeof (jlong) == sizeof (sal_Int64)))
-{
-OUString const & from_env_typename =
-OUString::unacquired( &pFrom->pTypeName );
-OUString const & to_env_typename =
-OUString::unacquired( &pTo->pTypeName );
 
-uno_Mapping * mapping = 0;
+OUString const & from_env_typename =
+OUString::unacquired( &pFrom->pTypeName );
+OUString const & to_env_typename =
+OUString::unacquired( &pTo->pTypeName );
 
-try
+uno_Mapping * mapping = 0;
+
+try
+{
+if ( from_env_typename == UNO_LB_JAVA && to_env_typename == UNO_LB_UNO 
)
 {
-if ( from_env_typename == UNO_LB_JAVA && to_env_typename == 
UNO_LB_UNO )
-{
-Bridge * bridge =
-new Bridge( pFrom, pTo->pExtEnv, true ); // ref count = 1
-mapping = &bridge->m_java2uno;
-uno_registerMapping(
-&mapping, Bridge_free,
-pFrom, (uno_Environment *)pTo->pExtEnv, 0 );
-}
-else if ( from_env_typename == UNO_LB_UNO && to_env_typename == 
UNO_LB_JAVA )
-{
-Bridge * bridge =
-new Bridge( pTo, pFrom->pExtEnv, false ); // ref count = 1
-mapping = &bridge->m_uno2java;
-uno_registerMapping(
-&mapping, Bridge_free,
-(uno_Environment *)pFrom->pExtEnv, pTo, 0 );
-}
+Bridge * bridge =
+new Bridge( pFrom, pTo->pExtEnv, true ); // ref count = 1
+mapping = &bridge->m_java2uno;
+uno_registerMapping(
+&mapping, Bridge_free,
+pFrom, (uno_Environment *)pTo->pExtEnv, 0 );
 }
-catch (const BridgeRuntimeError & err)
+else if ( from_env_typename == UNO_LB_UNO && to_env_typename == 
UNO_LB_JAVA )
 {
-SAL_WARN(
-"bridges",
-"ingoring BridgeRuntimeError \"" << err.m_message << "\"");
-}
-catch (const 
::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
-{
-SAL_WARN("bridges", "attaching current thread to java failed");
+Bridge * bridge =
+new Bridge( pTo, pFrom->pExtEnv, false ); // ref count = 1
+mapping = &bridge->m_uno2java;
+uno_registerMapping(
+&mapping, Bridge_free,
+(uno_Environment *)pFrom->pExtEnv, pTo, 0 );
 }
-
-*ppMapping = mapping;
 }
+catch (const BridgeRuntimeError & err)
+{
+SAL_WARN(
+"bridges",
+"ingoring BridgeRuntimeError \"" << err.m_message << "\"");
+}
+catch (const ::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
+{
+SAL_WARN("bridges", "attaching current thread to java failed");
+}
+
+*ppMapping = mapping;
 }
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source ucbhelper/source

2013-12-27 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/except.cxx   |   16 ++---
 ucbhelper/source/provider/cancelcommandexecution.cxx |   23 ---
 2 files changed, 13 insertions(+), 26 deletions(-)

New commits:
commit 17f1b0f551dbacc24fe5e2c90d5f00e5578ab9e7
Author: Tor Lillqvist 
Date:   Fri Dec 27 14:00:51 2013 +0200

Using pre-cached type_infos provided by the typeid operator seems to work 
now

Apparently there was no problem in this after all. The reason it
seemed not to work earlier was because of the unwinding failure due to
the missing .cfi_startproc and .cfi_endproc thingies in helper.s

The hack in ucbhelper is now not needed after all.

Change-Id: If9fec5c502d4c9d0c44709ad9c2729f812e882e2

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
index 22026cc..2f1df7a 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -171,12 +172,21 @@ public:
 RTTI::RTTI() SAL_THROW(())
 : m_hApp( dlopen( 0, RTLD_LAZY ) )
 {
-#if 0
 // Insert commonly needed type_infos to avoid dlsym() calls
-// Ideally we should insert all needed ones
+// Ideally we should insert all needed ones, and we actually must,
+// for arm64, as the dynamically generated type_infos don't seem
+// to work correctly. Luckily it seems that quite few types of
+// exceptions are thrown through the C++/UNO bridge at least in
+// the TiledLibreOffice test app.
+
+// (As no Java, Basic or Python is supported in LO code on iOS, we
+// can know the set of types of exceptions throws a priori, so
+// keeping this list complete should be possible.)
+
 m_rttis.insert( t_rtti_map::value_type( 
"com.sun.star.ucb.InteractiveAugmentedIOException",
 (std::type_info*) &typeid( 
com::sun::star::ucb::InteractiveAugmentedIOException ) ) );
-#endif
+m_rttis.insert( t_rtti_map::value_type( 
"com.sun.star.ucb.NameClashException",
+(std::type_info*) &typeid( 
com::sun::star::ucb::NameClashException ) ) );
 }
 
 RTTI::~RTTI() SAL_THROW(())
diff --git a/ucbhelper/source/provider/cancelcommandexecution.cxx 
b/ucbhelper/source/provider/cancelcommandexecution.cxx
index 617c96c..2f4e42e 100644
--- a/ucbhelper/source/provider/cancelcommandexecution.cxx
+++ b/ucbhelper/source/provider/cancelcommandexecution.cxx
@@ -74,22 +74,6 @@ void cancelCommandExecution( const uno::Any & rException,
 }
 }
 
-#if defined IOS && defined __arm64
-// No Java, Basic, or Python on iOS, so try to throw the exception
-// directly. Much simpler. Especially as I haven't managed yet to
-// get the C++/UNO bridge to work for arm64, and this
-// cppu::throwException thing seems to be the only use for it, at
-// least in the test apps...
-
-ucb::NameClashException aNCE;
-if ( rException >>= aNCE )
-throw aNCE;
-
-lang::IllegalArgumentException aIAE;
-if ( rException >>= aIAE )
-throw aIAE;
-#endif
-
 cppu::throwException( rException );
 OSL_FAIL( "Return from cppu::throwException call!!!" );
 throw uno::RuntimeException();
@@ -127,13 +111,6 @@ void cancelCommandExecution( const ucb::IOErrorCode eError,
 }
 }
 
-#if defined IOS && defined __arm64
-// See comment above.
-ucb::InteractiveAugmentedIOException aExc;
-if ( xRequest->getRequest() >>= aExc )
-throw aExc;
-#endif
-
 cppu::throwException( xRequest->getRequest() );
 
 OSL_FAIL( "Return from cppu::throwException call!!!" );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2013-12-26 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/helper.s |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 480c7c2ef45e9c84a9bbffbfa95df673583c546e
Author: Tor Lillqvist 
Date:   Fri Dec 27 03:34:44 2013 +0200

Add .cfi_startproc and endproc markers

Helps a bit... Now, if I revert the hackish arm64 change to ucbhelper,
instead of "terminating with uncaught exception" I get "terminating
with unexpected exception";) But, at least with the stack correctly
unwound to BaseContent::execute(), I think. Actually of course I don't
really understand much of this.

Change-Id: Iacb4342414cb84f9db31f9a40c7a136cc5d191a6

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/helper.s 
b/bridges/source/cpp_uno/gcc3_ios_arm/helper.s
index 6c0cd5e..8f4c61b 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/helper.s
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/helper.s
@@ -49,6 +49,7 @@ _privateSnippetExecutor:
 
 _privateSnippetExecutor:
 
+.cfi_startproc
 // _privateSnippetExecutor is jumped to from each of the
 // codeSnippet_*  generated by generate-snippets.pl
 
@@ -76,6 +77,7 @@ _privateSnippetExecutor:
 ldp x8, lr, [sp, #0]
 add sp, sp, #144
 ret lr
+.cfi_endproc
 
 #else
 // i386 code, for the simulator
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source include/sal

2013-12-23 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx |   30 +++
 include/sal/log-areas.dox|7 +++-
 2 files changed, 24 insertions(+), 13 deletions(-)

New commits:
commit 86a372ade0b7d416d4ff97a94ea350f56610da61
Author: Tor Lillqvist 
Date:   Mon Dec 23 21:12:05 2013 +0200

More informative logging in codeSnippet()

Change-Id: I6909ed60b39a65e6a6464427b2f839aa2bff3863

diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx
index 4fe5377..52911af 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx
@@ -361,6 +361,8 @@ extern "C" typedef void (*PrivateSnippetExecutor)();
 int const codeSnippetSize = 16;
 
 unsigned char * codeSnippet(
+const typelib_InterfaceTypeDescription *type,
+const typelib_TypeDescription *member,
 unsigned char * code, sal_Int32 functionIndex, sal_Int32 vtableOffset,
 typelib_TypeDescriptionReference * pReturnTypeRef)
 {
@@ -427,18 +429,19 @@ unsigned char * codeSnippet(
 = ((unsigned char *) exec) - p - sizeof (sal_Int32);
 p += sizeof (sal_Int32);
 OSL_ASSERT(p - code <= codeSnippetSize);
-#if OSL_DEBUG_LEVEL > 1
-fprintf(stderr,
-"==> codeSnippet to %s, functionIndex=%lu%s, 
vtableOffset=%"SAL_PRIdINT32"\n",
-(exec == privateSnippetExecutorGeneral ? "General" :
- (exec == privateSnippetExecutorVoid ? "Void" :
-  (exec == privateSnippetExecutorHyper ? "Hyper" :
-   (exec == privateSnippetExecutorFloat ? "Float" :
-(exec == privateSnippetExecutorDouble ? "Double" :
- (exec == privateSnippetExecutorClass ? "Class" :
-  "???")),
-(functionIndex & ~0x8000), (functionIndex & 0x8000) ? 
"|0x8000":"", vtableOffset);
-#endif
+
+SAL_INFO( "bridges.osx", "codeSnippet("
+  << OUString(type->aBase.pTypeName) << "::" << 
OUString(member->pTypeName) << "): ["
+  << (functionIndex & ~0x8000) << ((functionIndex & 
0x8000) ? "|0x8000":"") << "," << vtableOffset << ","
+  << (exec == privateSnippetExecutorGeneral ? "General" :
+  (exec == privateSnippetExecutorVoid ? "Void" :
+   (exec == privateSnippetExecutorHyper ? "Hyper" :
+(exec == privateSnippetExecutorFloat ? "Float" :
+ (exec == privateSnippetExecutorDouble ? "Double" :
+  (exec == privateSnippetExecutorClass ? "Class" :
+   "???"))
+  << "]=" << (void *)(code + codeSnippetSize) );
+
 return code + codeSnippetSize;
 }
 
@@ -484,6 +487,7 @@ unsigned char * 
bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
 // Getter:
 (s++)->fn = code;
 code = codeSnippet(
+type, member,
 code, functionOffset++, vtableOffset,
 reinterpret_cast< typelib_InterfaceAttributeTypeDescription * 
>(
 member)->pAttributeTypeRef);
@@ -494,6 +498,7 @@ unsigned char * 
bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
 {
 (s++)->fn = code;
 code = codeSnippet(
+type, member,
 code, functionOffset++, vtableOffset,
 0 /* indicates VOID */);
 }
@@ -502,6 +507,7 @@ unsigned char * 
bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
 case typelib_TypeClass_INTERFACE_METHOD:
 (s++)->fn = code;
 code = codeSnippet(
+type, member,
 code, functionOffset++, vtableOffset,
 reinterpret_cast< typelib_InterfaceMethodTypeDescription * >(
 member)->pReturnTypeRef);
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 5168e81..a53727b 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -40,6 +40,12 @@ certain functionality.
 @li @c basic
 @li @c basic.sbx
 
+@section bridges
+
+@li @c bridges
+@li @c bridges.ios
+@li @c bridges.osx
+
 @section canvas
 
 @li @c canvas
@@ -426,7 +432,6 @@ certain functionality.
 @li @c avmedia
 @li @c basebmp
 @li @c binaryurp
-@li @c bridges
 @li @c configmgr
 @li @c cppcanvas
 @li @c cppcanvas.emf
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2013-12-21 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit b0a9c3c71d39291f47d7154c42aee3c9b3ccea22
Author: Tor Lillqvist 
Date:   Sun Dec 22 02:18:03 2013 +0200

Log a bit more information in codeSnippet()

Change-Id: Ifecfd55ed7f6a48f1cfea8182a40e8568dfc4780

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
index b873dac..5de27f8 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
@@ -484,10 +484,7 @@ namespace
 int index = functionIndex*nVtableOffsets*2 + vtableOffset*2 + 
bHasHiddenParam;
 unsigned char *result = ((unsigned char *) &codeSnippets) + 
codeSnippets[index];
 
-SAL_INFO( "bridges.ios",
-  "codeSnippet: [" <<
-  functionIndex << "," << vtableOffset << "," << 
bHasHiddenParam << "]=" <<
-  (void *) result);
+SAL_INFO( "bridges.ios", "codeSnippet: [" << functionIndex << "," << 
vtableOffset << "," << (int)bHasHiddenParam << "]=" << (void *) result << " (" 
<< std::hex << ((int*)result)[0] << "," << ((int*)result)[1] << "," << 
((int*)result)[2] << "," << ((int*)result)[3] << ")");
 
 return result;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2013-12-21 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx|   69 +-
 bridges/source/cpp_uno/gcc3_ios_arm/except.cxx   |1 
 bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl |8 
 bridges/source/cpp_uno/gcc3_ios_arm/helper.s |   19 
 bridges/source/cpp_uno/gcc3_ios_arm/share.hxx|   14 
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx|  354 +--
 6 files changed, 193 insertions(+), 272 deletions(-)

New commits:
commit 928c8c800e2d6c17a768ea8fe2767a2ea68fba20
Author: Tor Lillqvist 
Date:   Fri Dec 20 23:57:06 2013 +0200

iOS arm64 C++/UNO bridge WIP

Change-Id: I5eb994e4a48b043f463940d1c34ad7a9459b83cd

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
index 54441b8..1b68c1e 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
@@ -20,9 +20,7 @@
 #ifdef __arm64
 
 // For iOS devices (64-bit ARM). Originally a copy of
-// ../gcc3_linux_arm/cpp2uno.cxx with some cleanups and necessary
-// changes: No dynamic code generation as that is prohibited for apps
-// in the App Store. Instead we use a set of pre-generated snippets.
+// ../gcc3_linux_arm/cpp2uno.cxx.
 
 // No attempts at factoring out the large amounts of more or less
 // common code in this, cpp2uno-arm.cxx and cpp2uno-i386.cxx have been
@@ -49,23 +47,19 @@ using namespace ::com::sun::star::uno;
 
 namespace
 {
-
 static typelib_TypeClass cpp2uno_call(
 bridges::cpp_uno::shared::CppInterfaceProxy* pThis,
 const typelib_TypeDescription * pMemberTypeDescr,
 typelib_TypeDescriptionReference * pReturnTypeRef,
-sal_Int32 nParams, typelib_MethodParameter * pParams,
+sal_Int32 nParams,
+typelib_MethodParameter * pParams,
 void ** pCallStack,
 sal_Int64 * pRegisterReturn /* space for register return */ )
 {
-// pCallStack: ret, [return ptr], this, params
+// pCallStack: x8, ret, [return ptr], this, params
 char * pTopStack = (char *)(pCallStack + 0);
 char * pCppStack = pTopStack;
 
-#ifdef __ARM_PCS_VFP
-int dc = 0;
-char * pFloatArgs = (char *)(pCppStack - 64);
-#endif
 // return
 typelib_TypeDescription * pReturnTypeDescr = 0;
 if (pReturnTypeRef)
@@ -77,7 +71,7 @@ namespace
 
 if (pReturnTypeDescr)
 {
-if (!arm::return_in_hidden_param(pReturnTypeRef))
+if (!arm::return_in_x8(pReturnTypeRef))
 pUnoReturn = pRegisterReturn; // direct way for simple types
 else // complex return via ptr (pCppReturn)
 {
@@ -99,14 +93,14 @@ namespace
 
 // Indices of values this have to be converted (interface conversion
 // cpp<=>uno)
-sal_Int32 * pTempIndices = (sal_Int32 *)alloca( sizeof(sal_Int32) * 
nParams);
+int * pTempIndices = (sal_Int32 *)alloca( sizeof(int) * nParams);
 
 // Type descriptions for reconversions
 typelib_TypeDescription ** ppTempParamTypeDescr = 
(typelib_TypeDescription **)alloca( sizeof(typelib_TypeDescription *) * 
nParams);
 
-sal_Int32 nTempIndices   = 0;
+int nTempIndices = 0;
 
-for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
+for ( int nPos = 0; nPos < nParams; ++nPos )
 {
 const typelib_MethodParameter & rParam = pParams[nPos];
 typelib_TypeDescription * pParamTypeDescr = 0;
@@ -221,7 +215,7 @@ namespace
 // destruct temporary in/inout params
 for ( ; nTempIndices--; )
 {
-sal_Int32 nIndex = pTempIndices[nTempIndices];
+int nIndex = pTempIndices[nTempIndices];
 
 if (pParams[nIndex].bIn) // is in/inout => was constructed
 uno_destructData( pUnoArgs[nIndex],
@@ -241,7 +235,7 @@ namespace
 // temporary params
 for ( ; nTempIndices--; )
 {
-sal_Int32 nIndex = pTempIndices[nTempIndices];
+int nIndex = pTempIndices[nTempIndices];
 typelib_TypeDescription * pParamTypeDescr =
 ppTempParamTypeDescr[nTempIndices];
 
@@ -285,25 +279,15 @@ namespace
 
 
 //=
-static typelib_TypeClass cpp_mediate(
-sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
-void ** pCallStack,
-sal_Int64 * pRegisterReturn /* space for register return */ )
+static typelib_TypeClass cpp_mediate( sal_Int32 nFunctionIndex,
+  sal_Int32 nVtableOffset,
+  void ** pCallStack,
+  sal_Int64 * pRegisterReturn )
 {
-OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
-
-// pCal

[Libreoffice-commits] core.git: bridges/source

2013-12-03 Thread Stephan Bergmann
 bridges/source/jni_uno/jni_uno2java.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b40dcdf4f5a03b71fe9e45f8f24fcaf25fd2febf
Author: Stephan Bergmann 
Date:   Tue Dec 3 18:04:20 2013 +0100

-Werror=unused-parameter

Change-Id: I4dfa96b8ea2684969d9eeecfd88136742ce2d4a1

diff --git a/bridges/source/jni_uno/jni_uno2java.cxx 
b/bridges/source/jni_uno/jni_uno2java.cxx
index 6ca7741..2465df3 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -527,7 +527,7 @@ void SAL_CALL UNO_proxy_free( uno_ExtEnvironment * env, 
void * proxy )
 UNO_proxy const * that = reinterpret_cast< UNO_proxy const * >( proxy );
 Bridge const * bridge = that->m_bridge;
 
-assert(env == bridge->m_uno_env);
+assert(env == bridge->m_uno_env); (void) env;
 SAL_INFO("bridges", "freeing binary uno proxy: " << that->m_oid);
 
 try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2013-12-03 Thread Stephan Bergmann
 bridges/source/jni_uno/jni_data.cxx |   26 --
 1 file changed, 26 deletions(-)

New commits:
commit ddbeaada1c7abb0fee88e709f3d6d824f06b39e0
Author: Stephan Bergmann 
Date:   Tue Dec 3 14:36:18 2013 +0100

BRIDGES_JNI_UNO_FORCE_BOXED_ANY is undefined

...ever since its inception in 4afcc7135e0bef66e7a218141bc93a6aa6128fd8
"MWS_SRX644: migrate branch mws_srx644 -> HEAD."

Change-Id: I82d3158b813fec89567fd94ed9ccc05944228161

diff --git a/bridges/source/jni_uno/jni_data.cxx 
b/bridges/source/jni_uno/jni_data.cxx
index 2a24f58..cece43a 100644
--- a/bridges/source/jni_uno/jni_data.cxx
+++ b/bridges/source/jni_uno/jni_data.cxx
@@ -1618,31 +1618,6 @@ void Bridge::map_to_java(
 if (in_param)
 {
 uno_Any const * pAny = (uno_Any const *)uno_data;
-
-#if defined BRIDGES_JNI_UNO_FORCE_BOXED_ANY
-if (typelib_TypeClass_VOID == pAny->pType->eTypeClass)
-{
-jo_any.reset(
-jni->NewLocalRef( m_jni_info->m_object_Any_VOID ) );
-}
-else
-{
-jvalue args[ 2 ];
-map_to_java(
-jni, &args[ 1 ], pAny->pData, pAny->pType, 0,
-true /* in */, false /* no out */,
-true /* create integral wrappers */ );
-jo_any.reset( args[ 1 ].l );
-// build up com.sun.star.uno.Any
-JLocalAutoRef jo_type( jni, create_type( jni, pAny->pType ) );
-args[ 0 ].l = jo_type.get();
-jo_any.reset(
-jni->NewObjectA(
-m_jni_info->m_class_Any,
-m_jni_info->m_ctor_Any_with_Type_Object, args ) );
-jni.ensure_no_exception();
-}
-#else
 switch (pAny->pType->eTypeClass)
 {
 case typelib_TypeClass_VOID:
@@ -1832,7 +1807,6 @@ void Bridge::map_to_java(
 break;
 }
 }
-#endif
 }
 
 if (out_param)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2013-11-11 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx  |7 ++-
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx  |9 +
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx |4 
 3 files changed, 19 insertions(+), 1 deletion(-)

New commits:
commit d52bfc915f6513256b64aa0ed088783150a041c3
Author: Tor Lillqvist 
Date:   Tue Nov 12 00:00:35 2013 +0200

Add some more comments

Change-Id: I267cb424deee4d329a0860cf9c87f295fb8fc5bf

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
index 301efd1..6abdad9 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
@@ -19,7 +19,7 @@
 
 #if defined(__arm) || defined(__arm64)
 
-// For iOS devices (ARM). Basically a copy of n
+// For iOS devices (ARM). Basically a copy of
 // ../gcc3_linux_arm/cpp2uno.cxx with some cleanups and necessary
 // changes: No dynamic code generation as that is prohibited for apps
 // in the App Store. Instead we use a set of pre-generated snippets.
@@ -29,6 +29,11 @@
 // sad. But then the whole bridges/source/cpp_uno is full of
 // copy/paste. So I continue in that tradition...
 
+// Note that for iOS, neither __ARM_EABI__ or __ARM_PCS_VFP are
+// defined.  The ifdefs for those have been left in place to keep this
+// file as close to ../gcc3_linux_arm/cpp2uno.cxx as possible, to make
+// future unification easier.
+
 #include 
 #include 
 #include 
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
index c9d917a..8467772 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
@@ -19,6 +19,15 @@
 
 #if defined(__arm) || defined(__arm64)
 
+// For iOS devices (ARM). Basically a copy of
+// ../gcc3_linux_arm/cpp2uno.cxx with some cleanups and necessary
+// changes.
+
+// Note that for iOS, none of __ARM_EABI__, __ARM_ARCH_4T__ or
+// __ARM_PCS_VFP are defined.  The ifdefs for those have been left in
+// place to keep this file as close to ../gcc3_linux_arm/uno2cpp.cxx
+// as possible, to make future unification easier.
+
 #include 
 
 #include "bridges/cpp_uno/shared/bridge.hxx"
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx
index 65f32e7..27cc9d8 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx
@@ -19,6 +19,10 @@
 
 #ifdef __i386
 
+// For the iOS emulator (i386). Basically a copy of
+// ../gcc3_macosx_intel/uno2cpp.cxx with some cleanups and necessary
+// changes.
+
 #include 
 
 #include "bridges/cpp_uno/shared/bridge.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2013-10-04 Thread Thomas Arnhold
 bridges/source/cpp_uno/gcc3_linux_intel/except.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e31a3abfc7c5f30442ec5288e2d698af01d4f831
Author: Thomas Arnhold 
Date:   Fri Oct 4 16:43:52 2013 +0200

WaE: -Wunused-variable

Change-Id: I31bdce7f31185faebaf8a8a2162669b185def0c9

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx 
b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
index 3eaceb4..a49bd95 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
@@ -158,7 +158,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription 
*pTypeDescr ) SAL_THR
 {
 pair< t_rtti_map::iterator, bool > insertion(
 m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
-OSL_ENSURE( insertion.second, "### inserting new rtti failed?!" );
+SAL_WARN_IF( !insertion.second, "bridges", "### inserting new rtti 
failed?!" );
 }
 else
 {
@@ -189,7 +189,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription 
*pTypeDescr ) SAL_THR
 
 pair< t_rtti_map::iterator, bool > insertion(
 m_generatedRttis.insert( t_rtti_map::value_type( unoName, 
rtti ) ) );
-OSL_ENSURE( insertion.second, "### inserting new generated 
rtti failed?!" );
+SAL_WARN_IF( !insertion.second, "bridges", "### inserting new 
generated rtti failed?!" );
 }
 else // taking already generated rtti
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source

2013-08-30 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx |  194 ---
 1 file changed, 91 insertions(+), 103 deletions(-)

New commits:
commit ff050190aa9bc362501bc1ecadfbf2a8cb5ecf70
Author: Tor Lillqvist 
Date:   Fri Aug 30 17:28:51 2013 +0300

The except.cxx for gcc3_macosx_x86-64 can be the same as for 
gcc3_macosx_intel

Change-Id: I567a20dc70b2b9e13965550333f4ed89205c4333

diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index 62b0cb1..0c31eed 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -17,95 +17,109 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include "sal/config.h"
 
+#include 
+#include 
 #include 
 #include 
+#include 
+
 #include 
 
+// MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h defined
+// __cxxabiv1::__class_type_info and __cxxabiv1::__si_class_type_info but
+// MacOSX10.7.sdk/usr/include/cxxabi.h no longer does:
+#if MACOSX_SDK_VERSION < 1070
 #include 
-#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
-#define _GLIBCXX_CDTOR_CALLABI
 #endif
 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
+#include "boost/static_assert.hpp"
+#include "boost/unordered_map.hpp"
 #include "com/sun/star/uno/RuntimeException.hpp"
-#include 
-#include 
+#include "com/sun/star/uno/genfunc.hxx"
+#include "osl/diagnose.h"
+#include "osl/mutex.hxx"
+#include "rtl/strbuf.hxx"
+#include "rtl/ustrbuf.hxx"
+#include "typelib/typedescription.h"
+#include "uno/any2.h"
 
 #include "share.hxx"
 
-
-using namespace ::std;
 using namespace ::osl;
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
-using namespace ::__cxxabiv1;
 
+namespace CPPU_CURRENT_NAMESPACE {
 
-namespace CPPU_CURRENT_NAMESPACE
-{
+namespace {
 
-#ifndef _LIBCPP_VERSION
+struct Fake_type_info {
+virtual ~Fake_type_info() {}
+char const * name;
+};
 
-#if MACOSX_SDK_VERSION >= 1070
+struct Fake_class_type_info: Fake_type_info {};
 
-// MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h defined
-// __cxxabiv1::__class_type_info and __cxxabiv1::__si_class_type_info but
-// MacOSX10.7.sdk/usr/include/cxxabi.h no longer does, so instances of those
-// classes need to be created manually:
+#if MACOSX_SDK_VERSION < 1070
+BOOST_STATIC_ASSERT(
+sizeof (Fake_class_type_info) == sizeof (__cxxabiv1::__class_type_info));
+#endif
 
-// std::type_info defined in  offers a protected ctor:
-struct FAKE_type_info: public std::type_info {
-FAKE_type_info(char const * name): type_info(name) {}
+struct Fake_si_class_type_info: Fake_class_type_info {
+void const * base;
 };
 
-// Modeled after __cxxabiv1::__si_class_type_info defined in
-// MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h (i.e.,
-// abi::__si_class_type_info documented at
-// ):
-struct FAKE_si_class_type_info: public FAKE_type_info {
-FAKE_si_class_type_info(char const * name, std::type_info const * theBase):
-FAKE_type_info(name), base(theBase) {}
-
-std::type_info const * base;
-// actually a __cxxabiv1::__class_type_info pointer
-};
+#if MACOSX_SDK_VERSION < 1070
+BOOST_STATIC_ASSERT(
+sizeof (Fake_si_class_type_info)
+== sizeof (__cxxabiv1::__si_class_type_info));
+#endif
 
 struct Base {};
 struct Derived: Base {};
 
-std::type_info * create_FAKE_class_type_info(char const * name) {
-std::type_info * p = new FAKE_type_info(name);
-// cxxabiv1::__class_type_info has no data members in addition to
-// std::type_info
-*reinterpret_cast< void ** >(p) = *reinterpret_cast< void * const * >(
+std::type_info * createFake_class_type_info(char const * name) {
+char * buf = new char[sizeof (Fake_class_type_info)];
+#if MACOSX_SDK_VERSION < 1070
+assert(
+dynamic_cast<__cxxabiv1::__class_type_info const *>(&typeid(Base))
+!= 0);
+#endif
+*reinterpret_cast(buf) = *reinterpret_cast(
 &typeid(Base));
-// copy correct __cxxabiv1::__class_type_info vtable into place
-return p;
+// copy __cxxabiv1::__class_type_info vtable into place
+Fake_class_type_info * fake = reinterpret_cast(buf);
+fake->name = name;
+return reinterpret_cast(
+static_cast(fake));
 }
 
-std::type_info * create_FAKE_si_class_type_info(
+std::type_info * createFake_si_class_type_info(
 char const * name, std::type_info const * base)
 {
-std::type_info * p = new FAKE_si_class_type_info(name, base);
-*reinterpret_cast< void ** >(p) = *reinterpret_cast< void * const * >(
+char * buf = new char[sizeof (Fake_si_class_type_info)];
+#if MACOSX_SDK_VERSION < 1070
+assert(
+dynamic_cast<__cxxabiv1::__si_class_type_info const 
*>(&typeid(Derived))
+!= 0);
+#endif
+*reinterpret_cast(buf) = *reinterpret_cast(
 &typeid(Derived));
-

[Libreoffice-commits] core.git: bridges/source

2013-08-29 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx |  166 ++--
 1 file changed, 83 insertions(+), 83 deletions(-)

New commits:
commit 5272f275d02344922b22a43b7c5cd2bb72a47e63
Author: Stephan Bergmann 
Date:   Fri Aug 30 07:56:27 2013 +0200

Make RTTI creation work for libc++

Unlike libstdc++.dylib, libc++abi.dylib no longer exports the type info for
std::type_info, but the layout of the __cxxabiv1::__*_type_info classes is
controlled by the Generic C++ ABI anyway, so consolidate to a single 
approach
that works across all versions.

Change-Id: Ic68f2386261bae4a4349ad646590cc15c768f04e

diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
index f51cb75..0c31eed 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
@@ -17,92 +17,105 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include "sal/config.h"
 
+#include 
+#include 
 #include 
+#include 
+#include 
+
 #include 
+
+// MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h defined
+// __cxxabiv1::__class_type_info and __cxxabiv1::__si_class_type_info but
+// MacOSX10.7.sdk/usr/include/cxxabi.h no longer does:
 #if MACOSX_SDK_VERSION < 1070
 #include 
-#else
-#include 
 #endif
-#include 
-
-#include 
-#include 
-#include 
-#include 
 
-#include 
+#include "boost/static_assert.hpp"
+#include "boost/unordered_map.hpp"
 #include "com/sun/star/uno/RuntimeException.hpp"
-#include 
-#include 
+#include "com/sun/star/uno/genfunc.hxx"
+#include "osl/diagnose.h"
+#include "osl/mutex.hxx"
+#include "rtl/strbuf.hxx"
+#include "rtl/ustrbuf.hxx"
+#include "typelib/typedescription.h"
+#include "uno/any2.h"
 
 #include "share.hxx"
 
-
-using namespace ::std;
 using namespace ::osl;
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
-#if MACOSX_SDK_VERSION < 1070
-using namespace ::__cxxabiv1;
-#endif
-
-namespace CPPU_CURRENT_NAMESPACE
-{
 
-#ifndef _LIBCPP_VERSION
+namespace CPPU_CURRENT_NAMESPACE {
 
-#if MACOSX_SDK_VERSION >= 1070
-
-// MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h defined
-// __cxxabiv1::__class_type_info and __cxxabiv1::__si_class_type_info but
-// MacOSX10.7.sdk/usr/include/cxxabi.h no longer does, so instances of those
-// classes need to be created manually:
+namespace {
 
-// std::type_info defined in  offers a protected ctor:
-struct FAKE_type_info: public std::type_info {
-FAKE_type_info(char const * name): type_info(name) {}
+struct Fake_type_info {
+virtual ~Fake_type_info() {}
+char const * name;
 };
 
-// Modeled after __cxxabiv1::__si_class_type_info defined in
-// MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h (i.e.,
-// abi::__si_class_type_info documented at
-// ):
-struct FAKE_si_class_type_info: public FAKE_type_info {
-FAKE_si_class_type_info(char const * name, std::type_info const * theBase):
-FAKE_type_info(name), base(theBase) {}
+struct Fake_class_type_info: Fake_type_info {};
 
-std::type_info const * base;
-// actually a __cxxabiv1::__class_type_info pointer
+#if MACOSX_SDK_VERSION < 1070
+BOOST_STATIC_ASSERT(
+sizeof (Fake_class_type_info) == sizeof (__cxxabiv1::__class_type_info));
+#endif
+
+struct Fake_si_class_type_info: Fake_class_type_info {
+void const * base;
 };
 
+#if MACOSX_SDK_VERSION < 1070
+BOOST_STATIC_ASSERT(
+sizeof (Fake_si_class_type_info)
+== sizeof (__cxxabiv1::__si_class_type_info));
+#endif
+
 struct Base {};
 struct Derived: Base {};
 
-std::type_info * create_FAKE_class_type_info(char const * name) {
-std::type_info * p = new FAKE_type_info(name);
-// cxxabiv1::__class_type_info has no data members in addition to
-// std::type_info
-*reinterpret_cast< void ** >(p) = *reinterpret_cast< void * const * >(
+std::type_info * createFake_class_type_info(char const * name) {
+char * buf = new char[sizeof (Fake_class_type_info)];
+#if MACOSX_SDK_VERSION < 1070
+assert(
+dynamic_cast<__cxxabiv1::__class_type_info const *>(&typeid(Base))
+!= 0);
+#endif
+*reinterpret_cast(buf) = *reinterpret_cast(
 &typeid(Base));
-// copy correct __cxxabiv1::__class_type_info vtable into place
-return p;
+// copy __cxxabiv1::__class_type_info vtable into place
+Fake_class_type_info * fake = reinterpret_cast(buf);
+fake->name = name;
+return reinterpret_cast(
+static_cast(fake));
 }
 
-std::type_info * create_FAKE_si_class_type_info(
+std::type_info * createFake_si_class_type_info(
 char const * name, std::type_info const * base)
 {
-std::type_info * p = new FAKE_si_class_type_info(name, base);
-*reinterpret_cast< void ** >(p) = *reinterpret_cast< void * const * >(
+char * buf = new char[sizeof (Fake_si_class_type_info)];
+#if MACOSX_SDK_VERSION < 1070
+assert(
+dynamic_

[Libreoffice-commits] core.git: bridges/source

2013-06-22 Thread David Tardon
 bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 0291994f133644683e5d4fdea91c61471531bc93
Author: David Tardon 
Date:   Sat Jun 22 11:02:42 2013 -0400

fix debug build on s390x

Change-Id: Ic1d5e98f371727f0c452495d5f9cb40ec73ffe9d

diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
index c2bfe5e..8242ed1 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx
@@ -375,7 +375,6 @@ static typelib_TypeClass cpp_mediate(
 }
 
 // determine called method
-OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### 
illegal vtable index!" );
 sal_Int32 nMemberPos = 
pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
 OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member 
index!" );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source config_host/config_gcc.h.in configure.ac

2013-06-20 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx |4 +-
 bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx  |   33 ++--
 config_host/config_gcc.h.in |2 +
 configure.ac|   22 +
 4 files changed, 44 insertions(+), 17 deletions(-)

New commits:
commit c17f01753ce94e9f57d6e4a2763152240fbcd50a
Author: Stephan Bergmann 
Date:   Thu Jun 20 15:58:58 2013 +0200

...and similarly for __cxa_allocate_exception and __cxa_throw

Change-Id: I87ae299aac97180f0587c553d85b051decca155c

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
index 8229ce8..18a6eff 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
@@ -250,7 +250,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
 Reference< XInterface >() );
 }
 
-pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
+pCppExc = __cxxabiv1::__cxa_allocate_exception( pTypeDescr->nSize );
 ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
 
 // destruct uno exception
@@ -269,7 +269,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
 }
 }
 
-__cxa_throw( pCppExc, rtti, deleteException );
+__cxxabiv1::__cxa_throw( pCppExc, rtti, deleteException );
 }
 
 
//==
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
index f3f43e5..61702b7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
@@ -80,27 +80,30 @@ struct __cxa_eh_globals
 // Therefore, provide a declaration here for old GCC (libstdc++, really) 
version
 // that returns a void pointer, and in the code calling it always cast to the
 // above fake definition of CPPU_CURRENT_NAMESPACE::__cxa_eh_globals (which
-// hopefully keeps matching the real definition in libstdc++):
+// hopefully keeps matching the real definition in libstdc++); similarly for
+// __cxa_allocate_exception and __cxa_throw, though they do not have the
+// additional problem of an incompletely declared return type:
+
 #if !HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS
-namespace __cxxabiv1 { extern "C" void * __cxa_get_globals () throw(); }
+namespace __cxxabiv1 { extern "C" void * __cxa_get_globals() throw(); }
 #endif
 
-namespace CPPU_CURRENT_NAMESPACE
-{
+#if !HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION
+namespace __cxxabiv1 {
+extern "C" void * __cxa_allocate_exception(std::size_t thrown_size) throw();
+}
+#endif
 
-// The following are in cxxabi.h since GCC 4.7 (they are wrapped in
-// CPPU_CURRENT_NAMESPACE here as different GCC versions have slightly 
different
-// declarations for them, e.g., with or without throw() specification, so would
-// complain about redeclarations of these somewhat implicitly declared
-// functions):
-#if __GNUC__ == 4 && __GNUC_MINOR__ <= 6
-extern "C" void *__cxa_allocate_exception(
-std::size_t thrown_size ) throw();
-extern "C" void __cxa_throw (
-void *thrown_exception, void *tinfo, void (*dest) (void *) ) 
__attribute__((noreturn));
+#if !HAVE_GCC_CXXABI_H_CXA_THROW
+namespace __cxxabiv1 {
+extern "C" void __cxa_throw(
+void * thrown_exception, void * tinfo, void (* dest)(void *))
+__attribute__((noreturn));
+}
 #endif
 
-// -
+namespace CPPU_CURRENT_NAMESPACE
+{
 
 
//==
 void raiseException(
diff --git a/config_host/config_gcc.h.in b/config_host/config_gcc.h.in
index 4376877..c957179 100644
--- a/config_host/config_gcc.h.in
+++ b/config_host/config_gcc.h.in
@@ -10,7 +10,9 @@
 #ifndef CONFIG_GCC_H
 #define CONFIG_GCC_H
 
+#define HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION 0
 #define HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS 0
+#define HAVE_GCC_CXXABI_H_CXA_THROW 0
 
 #endif
 
diff --git a/configure.ac b/configure.ac
index 9998743..465e7fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5572,6 +5572,17 @@ if test "$GCC" = "yes"; then
 ], [AC_MSG_RESULT([no])])
 CFLAGS=$save_CFLAGS
 
+AC_MSG_CHECKING([whether $CXX declares __cxa_allocate_exception in 
cxxabi.h])
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#include 
+void * f() { return __cxxabiv1::__cxa_allocate_exception(0); }
+])], [
+AC_DEFINE([HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION],[1])
+AC_MSG_RESULT([yes])
+], [AC_MSG_RESULT([no])])
+AC_LANG_POP([C++])
+
 AC_MSG_CHECKING([whether $CXX declares __cxa_get_globals in cxxabi.h])
 AC_LANG_PUSH([C++])
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
@@ -5582,6 +5593,17 @@ if test "$GCC" = "yes"; then
 AC_MSG_RESULT([yes])

[Libreoffice-commits] core.git: bridges/source config_host/config_gcc.h.in configure.ac

2013-06-20 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx  |5 
 bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx   |   22 +--
 bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx |7 --
 config_host/config_gcc.h.in  |   17 ++
 configure.ac |   12 ++
 5 files changed, 54 insertions(+), 9 deletions(-)

New commits:
commit 5ba3d1740b03efa394b2d2bf34fb8a8d3db2331d
Author: Stephan Bergmann 
Date:   Thu Jun 20 13:57:45 2013 +0200

Clean up declaration of __cxa_get_globals

At least Clang trunk towards 3.4 now rejects incompatible declarations of 
the
same extern "C" function in different namespaces, so that trick of getting 
at
the function that is exported by libstdc++ but only rudimentarily if at all
exposed in cxxabi.h no longer worked.

TODO: This change should be reflected in any other bridges where it is 
relevant,
too.

Change-Id: Ie3ccbdb7d75cc98636d02c0435958532620724f2

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
index ea38f29..8229ce8 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
@@ -22,11 +22,6 @@
 #include 
 #include 
 
-#include 
-#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
-#define _GLIBCXX_CDTOR_CALLABI
-#endif
-
 #include 
 
 #include 
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
index c305197..f3f43e5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
@@ -17,12 +17,20 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "uno/mapping.h"
+#include "sal/config.h"
 
 #include 
 #include 
 #include 
 
+#include 
+#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
+#define _GLIBCXX_CDTOR_CALLABI
+#endif
+
+#include "config_gcc.h"
+#include "uno/mapping.h"
+
 namespace CPPU_CURRENT_NAMESPACE
 {
 
@@ -65,7 +73,17 @@ struct __cxa_eh_globals
 
 }
 
-extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals *__cxa_get_globals () 
throw();
+// __cxa_get_globals is exported from libstdc++ since GCC 3.4.0 (CXXABI_1.3),
+// but it is only declared in cxxabi.h (in namespace __cxxabiv1) since
+// GCC 4.7.0.  It returns a pointer to a struct __cxa_eh_globals, but that
+// struct is only incompletely declared even in the GCC 4.7.0 cxxabi.h.
+// Therefore, provide a declaration here for old GCC (libstdc++, really) 
version
+// that returns a void pointer, and in the code calling it always cast to the
+// above fake definition of CPPU_CURRENT_NAMESPACE::__cxa_eh_globals (which
+// hopefully keeps matching the real definition in libstdc++):
+#if !HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS
+namespace __cxxabiv1 { extern "C" void * __cxa_get_globals () throw(); }
+#endif
 
 namespace CPPU_CURRENT_NAMESPACE
 {
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index cbf45bb..08c797c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -289,8 +289,11 @@ static void cpp_call(
 }
  catch (...)
  {
-  // fill uno exception
-fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, 
pThis->getBridge()->getCpp2Uno() );
+ // fill uno exception
+ fillUnoException(
+ reinterpret_cast< CPPU_CURRENT_NAMESPACE::__cxa_eh_globals * >(
+ __cxxabiv1::__cxa_get_globals())->caughtExceptions,
+ *ppUnoExc, pThis->getBridge()->getCpp2Uno());
 
 // temporary params
 for ( ; nTempIndizes--; )
diff --git a/config_host/config_gcc.h.in b/config_host/config_gcc.h.in
new file mode 100644
index 000..4376877
--- /dev/null
+++ b/config_host/config_gcc.h.in
@@ -0,0 +1,17 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef CONFIG_GCC_H
+#define CONFIG_GCC_H
+
+#define HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS 0
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configure.ac b/configure.ac
index 97293ad..9998743 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5571,6 +5571,17 @@ if test "$GCC" = "yes"; then
 AC_MSG_RESULT([yes])
 ], [AC_MSG_RESULT([no])])
 CFLAGS=$save_CFLAGS
+
+AC_MSG_CHECKING([whether $CXX declares __cxa_get_globals in cxxabi.h])
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#include 
+void * f() { re

[Libreoffice-commits] core.git: bridges/source

2013-06-15 Thread root
 bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit e17ab68dbdc7cae8488b39407908d2d218011a2f
Author: root 
Date:   Fri Jun 14 04:21:18 2013 -0400

fix debug build on s390

... by removing obsolete OSL_ENSURE. nVtableCall was renamed to
nFunctionIndex and the same check is done a couple of lines above.

Change-Id: Id52b69adceb337049c50a599aefc718498d688c0

diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
index 5e97cdd..2240df0 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
@@ -354,7 +354,6 @@ static typelib_TypeClass cpp_mediate(
 }
 
 // determine called method
-OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### 
illegal vtable index!" );
 sal_Int32 nMemberPos = 
pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
 OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member 
index!" );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source sw/source

2013-06-08 Thread Herbert Dürr
 bridges/source/cpp_uno/msvc_win32_intel/except.cxx |1 -
 sw/source/core/text/portxt.hxx |6 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

New commits:
commit ec2512209d8fbf640749ab9f18b2232ac9cbf060
Author: Herbert Dürr 
Date:   Tue Mar 5 09:37:22 2013 +

the header file new.h is obsolete on our platforms

(cherry picked from commit 94e277e997d396ae44e4c13c806fa0f461dafd83)

Conflicts:
sw/source/core/text/portxt.hxx

Change-Id: Ia785878f2b96704fcf858599afba2535b53d6b6f

diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index c6345e2..b2c97ba 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx
index 97d4ff4..d201c74 100644
--- a/sw/source/core/text/portxt.hxx
+++ b/sw/source/core/text/portxt.hxx
@@ -18,11 +18,7 @@
  */
 #ifndef _PORTXT_HXX
 #define _PORTXT_HXX
-#ifdef __GNUC__
-#include 
-#else
-#include // for size_t, FIXEDMEM from tools
-#endif
+
 #include 
 
 #include "porlin.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/source include/wntgcci

2013-06-05 Thread Luboš Luňák
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx  |   25 
 bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx |   25 
 bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx   |   19 +++---
 bridges/source/cpp_uno/gcc3_macosx_intel/uno2cpp.cxx  |   29 --
 bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx |   23 +++
 bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx |   18 +++---
 bridges/source/cpp_uno/mingw_intel/callvirtualmethod.cxx  |   23 +++
 include/wntgcci/sehandler.hxx |2 
 8 files changed, 82 insertions(+), 82 deletions(-)

New commits:
commit 6b8393474974d2af7a2cb3c47b3d5c081b550bdb
Author: Luboš Luňák 
Date:   Tue Jun 4 13:24:59 2013 +0200

fix gcc inline assembler operands usage

Apparently whoever did these didn't get the gcc docs and specified
every operand only as input, and then added volatile, explicit
initialization and what not until it worked. Specify output operands
correctly instead.
I couldn't verify all assembler variants, as I don't know them,
but the ones I don't know had at least some proper usage of output
operands, so I'll assume those are all correct.

Change-Id: I2910308b5e00cce8db756496df50ed26cfe35bb6

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx
index 45e51a9..5846f5d 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx
@@ -67,11 +67,11 @@ void callVirtualMethod(
 // never called
 if (! pAdjustedThisPtr) 
CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
 
-volatile long edx = 0, eax = 0; // for register returns
-void * stackptr = 0;
+long edx, eax; // for register returns
+void * stackptr;
 asm volatile (
-"mov   %%esp, %6\n\t"
-"mov   %0, %%eax\n\t"
+"mov   %%esp, %2\n\t"
+"mov   %3, %%eax\n\t"
 "mov   %%eax, %%edx\n\t"
 // stack padding to keep stack aligned:
 "shl   $2, %%eax\n\t"
@@ -83,28 +83,27 @@ void callVirtualMethod(
 "mov   %%edx, %%eax\n\t"
 "dec   %%edx\n\t"
 "shl   $2, %%edx\n\t"
-"add   %1, %%edx\n"
+"add   %4, %%edx\n"
 "Lcopy:\n\t"
 "pushl 0(%%edx)\n\t"
 "sub   $4, %%edx\n\t"
 "dec   %%eax\n\t"
 "jne   Lcopy\n\t"
 // do the actual call
-"mov   %2, %%edx\n\t"
+"mov   %5, %%edx\n\t"
 "mov   0(%%edx), %%edx\n\t"
-"mov   %3, %%eax\n\t"
+"mov   %6, %%eax\n\t"
 "shl   $2, %%eax\n\t"
 "add   %%eax, %%edx\n\t"
 "mov   0(%%edx), %%edx\n\t"
 "call  *%%edx\n\t"
 // save return registers
- "mov   %%eax, %4\n\t"
- "mov   %%edx, %5\n\t"
+ "mov   %%eax, %0\n\t"
+ "mov   %%edx, %1\n\t"
 // cleanup stack
-"mov   %6, %%esp\n\t"
-:
-: "m"(nStackLongs), "m"(pStackLongs), "m"(pAdjustedThisPtr),
-  "m"(nVtableIndex), "m"(eax), "m"(edx), "m"(stackptr)
+"mov   %2, %%esp\n\t"
+: "=m"(eax), "=m"(edx), "=m"(stackptr)
+: "m"(nStackLongs), "m"(pStackLongs), "m"(pAdjustedThisPtr), 
"m"(nVtableIndex)
 : "eax", "edx" );
 switch( pReturnTypeDescr->eTypeClass )
 {
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx 
b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
index af060de..15b357b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
@@ -62,44 +62,43 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 if (! pAdjustedThisPtr) 
CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
 #endif
 
-volatile long edx = 0, eax = 0; // for register returns
+long edx, eax; // for register returns
 void * stackptr;
 asm volatile (
-"mov   %%esp, %6\n\t"
+"mov   %%esp, %2\n\t"
 // preserve potential 128bit stack alignment
 "and   $0xfff0, %%esp\n\t"
-"mov   %0, %%eax\n\t"
+"mov   %3, %%eax\n\t"
 "lea   -4(,%%eax,4), %%eax\n\t"
 "and   $0xf, %%eax\n\t"
 "sub   $0xc, %%eax\n\t"
 "add   %%eax, %%esp\n\t"
 // copy values
-"mov   %0, %%eax\n\t"
+"mov   %3, %%eax\n\t"
 "mov   %%eax, %%edx\n\t"
 "dec   %%edx\n\t"
 "shl   $2, %%edx\n\t"
-"add   %1, %%edx\n"
+"add   %4, %%edx\n"
 "Lcopy:\n\t"
 "pushl 0(%%edx)\n\t"
 "sub   $4, %%edx\n\t"
 "dec   %%eax\n\t"
 "jne   Lcopy\n\t"
 // do the actual call
-"mov   %2, %%edx\n\t"
+"mov   %5, %%edx\n\t"
 "mov   0(%%edx), %%edx\n\t"
-"mov   %3, %%eax\n\t"
+ 

[Libreoffice-commits] core.git: bridges/source

2013-05-09 Thread Herbert Dürr
 bridges/source/cpp_uno/gcc3_linux_x86-64/call.s |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d77d01b84a60da829b4ee9d6e7136f686d7a2326
Author: Herbert Dürr 
Date:   Tue Apr 23 12:12:50 2013 +

add some documentation links to the assembler needed for the UNO bridges

ceterum censeo: good old C-linkage interoperability would be much more 
robust,
reliable and easier to maintain compared to the current UNO-bridges approach
of emulating the behaviour of the individual compiler, linker, dylib, 
unwind, etc.
environments and thus being extremely platform specific. What an incredible 
waste
of energy for little (if any) gain. SCNR.
(cherry picked from commit c9fe5d026f2081d493a198a33cf3b1d558166965)

Conflicts:
bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s

Change-Id: I728bce449e8e56572f31b50fb1452d1c2f9d7fea

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
index 4953805..57d0c9f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
@@ -73,6 +73,9 @@ privateSnippetExecutor:
ret
 .LFE3:
.size   privateSnippetExecutor, .-privateSnippetExecutor
+   # see 
http://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
+   # for details of the .eh_frame, the "Common Information Entry" and 
"Frame Description Entry" formats
+   # and http://mentorembedded.github.io/cxx-abi/exceptions.pdf for more 
info
.section.eh_frame,"a",@progbits
 .Lframe1:
.long   .LECIE1-.LSCIE1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


<    1   2   3   4   >