LibreOffice Module bridges (master) 1
gcc3_linux_sparc/uno2cpp.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <sal/config.h>
21
22#include <exception>
23#include <malloc.h>
24#include <typeinfo>
25
26#include <com/sun/star/uno/Exception.hpp>
27#include <com/sun/star/uno/RuntimeException.hpp>
28#include <com/sun/star/uno/genfunc.hxx>
30#include <uno/data.h>
31
32#include "bridge.hxx"
33#include "types.hxx"
34#include "unointerfaceproxy.hxx"
35#include "vtables.hxx"
36
37#include "share.hxx"
38
39using namespace com::sun::star::uno;
40
41namespace
42{
43// The call instruction within the asm section of callVirtualMethod may throw
44// exceptions. So that the compiler handles this correctly, it is important
45// that (a) callVirtualMethod might call dummy_can_throw_anything (although this
46// never happens at runtime), which in turn can throw exceptions, and (b)
47// callVirtualMethod is not inlined at its call site (so that any exceptions are
48// caught which are thrown from the instruction calling callVirtualMethod):
49
50void callVirtualMethod( void * pAdjustedThisPtr,
51 sal_Int32 nVtableIndex,
52 void * pRegisterReturn,
53 typelib_TypeClass eReturnType,
54 sal_Int32 * pStackLongs,
55 sal_Int32 nStackLongs ) __attribute__((noinline));
56
57void callVirtualMethod( void * pAdjustedThisPtr,
58 sal_Int32 /* nVtableIndex */,
59 void * pRegisterReturn,
60 typelib_TypeClass eReturnType,
61#if OSL_DEBUG_LEVEL > 0
62 sal_Int32 * pStackLongs,
63 sal_Int32 nStackLongs)
64#else
65 sal_Int32 * /*pStackLongs*/,
66 sal_Int32 /*nStackLongs*/)
67#endif
68{
69 // parameter list is mixed list of * and values
70 // reference parameters are pointers
71
72 assert(pStackLongs && pAdjustedThisPtr);
73 static_assert( (sizeof(void *) == 4) &&
74 (sizeof(sal_Int32) == 4), "### unexpected size of int!" );
75 assert(nStackLongs && pStackLongs && "### no stack in callVirtualMethod !");
76
77 // never called
78 if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
79
80 long o0, o1; // for register returns
81 double f0d;
82 float f0f;
83 volatile long long saveReg[7];
84
85 __asm__ (
86 // save registers
87 "std %%l0, [%4]\n\t"
88 "mov %4, %%l0\n\t"
89 "mov %%l0, %%l1\n\t"
90 "add %%l0, 8, %%l0\n\t"
91 "std %%l2, [%%l0]\n\t"
92 "add %%l0, 8, %%l0\n\t"
93 "std %%l4, [%%l0]\n\t"
94 "add %%l0, 8, %%l0\n\t"
95 "std %%o0, [%%l0]\n\t"
96 "add %%l0, 8, %%l0\n\t"
97 "std %%o2, [%%l0]\n\t"
98 "add %%l0, 8, %%l0\n\t"
99 "std %%o4, [%%l0]\n\t"
100 "add %%l0, 8, %%l0\n\t"
101 "std %%l6, [%%l0]\n\t"
102 "mov %%l1, %%l7\n\t"
103
104 // increase our own stackframe if necessary
105 "mov %%sp, %%l3\n\t" // save stack ptr for readjustment
106
107 "subcc %%i5, 7, %%l0\n\t"
108 "ble .LmoveOn\n\t"
109 "nop\n\t"
110
111 "sll %%l0, 2, %%l0\n\t"
112 "add %%l0, 96, %%l0\n\t"
113 "mov %%sp, %%l1\n\t" // old stack ptr
114 "sub %%sp, %%l0, %%l0\n\t" // future stack ptr
115 "andcc %%l0, 7, %%g0\n\t" // align stack to 8
116 "be .LisAligned\n\t"
117 "nop\n\t"
118 "sub %%l0, 4, %%l0\n"
119 ".LisAligned:\n\t"
120 "mov %%l0, %%o5\n\t" // save newly computed stack ptr
121 "add %%g0, 16, %%o4\n"
122
123 // now copy longs down to save register window
124 // and local variables
125 ".LcopyDown:\n\t"
126 "ld [%%l1], %%l2\n\t"
127 "st %%l2,[%%l0]\n\t"
128 "add %%l0, 4, %%l0\n\t"
129 "add %%l1, 4, %%l1\n\t"
130 "subcc %%o4, 1, %%o4\n\t"
131 "bne .LcopyDown\n\t"
132
133 "mov %%o5, %%sp\n\t" // move new stack ptr (hopefully) atomically
134 // while register window is valid in both spaces
135 // (scheduling might hit in copyDown loop)
136
137 "sub %%i5, 7, %%l0\n\t" // copy parameters past the sixth to stack
138 "add %%i4, 28, %%l1\n\t"
139 "add %%sp, 92, %%l2\n"
140 ".LcopyLong:\n\t"
141 "ld [%%l1], %%o0\n\t"
142 "st %%o0, [%%l2]\n\t"
143 "add %%l1, 4, %%l1\n\t"
144 "add %%l2, 4, %%l2\n\t"
145 "subcc %%l0, 1, %%l0\n\t"
146 "bne .LcopyLong\n\t"
147 "nop\n"
148
149 ".LmoveOn:\n\t"
150 "mov %%i5, %%l0\n\t" // prepare out registers
151 "mov %%i4, %%l1\n\t"
152
153 "ld [%%l1], %%o0\n\t" // prepare complex return ptr
154 "st %%o0, [%%sp+64]\n\t"
155 "sub %%l0, 1, %%l0\n\t"
156 "add %%l1, 4, %%l1\n\t"
157
158 "ld [%%l1], %%o0\n\t"
159 "subcc %%l0, 1, %%l0\n\t"
160 "be .LdoCall\n\t"
161 "nop\n\t"
162
163 "add %%l1, 4, %%l1\n\t"
164 "ld [%%l1], %%o1\n\t"
165 "subcc %%l0, 1, %%l0\n\t"
166 "be .LdoCall\n\t"
167 "nop\n\t"
168
169 "add %%l1, 4, %%l1\n\t"
170 "ld [%%l1], %%o2\n\t"
171 "subcc %%l0, 1, %%l0\n\t"
172 "be .LdoCall\n\t"
173 "nop\n\t"
174
175 "add %%l1, 4, %%l1\n\t"
176 "ld [%%l1], %%o3\n\t"
177 "subcc %%l0, 1, %%l0\n\t"
178 "be .LdoCall\n\t"
179 "nop\n\t"
180
181 "add %%l1, 4, %%l1\n\t"
182 "ld [%%l1], %%o4\n\t"
183 "subcc %%l0, 1, %%l0\n\t"
184 "be .LdoCall\n\t"
185 "nop\n\t"
186
187 "add %%l1, 4, %%l1\n\t"
188 "ld [%%l1], %%o5\n"
189
190 ".LdoCall:\n\t"
191 "ld [%%i0], %%l0\n\t" // get vtable ptr
192
193"sll %%i1, 2, %%l6\n\t"
194// "add %%l6, 8, %%l6\n\t"
195 "add %%l6, %%l0, %%l0\n\t"
196// // vtable has 8byte wide entries,
197// // upper half contains 2 half words, of which the first
198// // is the this ptr patch !
199// // first entry is (or __tf)
200
201// "ldsh [%%l0], %%l6\n\t" // load this ptr patch
202// "add %%l6, %%o0, %%o0\n\t" // patch this ptr
203
204// "add %%l0, 4, %%l0\n\t" // get virtual function ptr
205 "ld [%%l0], %%l0\n\t"
206
207 "ld [%%i4], %%l2\n\t"
208 "subcc %%l2, %%g0, %%l2\n\t"
209 "bne .LcomplexCall\n\t"
210 "nop\n\t"
211 "call %%l0\n\t"
212 "nop\n\t"
213 "ba .LcallReturned\n\t"
214 "nop\n"
215 ".LcomplexCall:\n\t"
216 "call %%l0\n\t"
217 "nop\n\t"
218 "unimp\n"
219
220 ".LcallReturned:\n\t"
221 "mov %%l3, %%sp\n\t" // readjust stack so that our locals are where they belong
222 "st %%o0, %0\n\t" // save possible return registers into our locals
223 "st %%o1, %1\n\t"
224 "std %%f0, %2\n\t"
225 "st %%f0, %3\n\t"
226
227 // restore registers
228 "ldd [%%l7], %%l0\n\t"
229 "add %%l7, 8, %%l7\n\t"
230 "ldd [%%l7], %%l2\n\t"
231 "add %%l7, 8, %%l7\n\t"
232 "ldd [%%l7], %%l4\n\t"
233 "add %%l7, 8, %%l7\n\t"
234 "ldd [%%l7], %%o0\n\t"
235 "add %%l7, 8, %%l7\n\t"
236 "ldd [%%l7], %%o2\n\t"
237 "add %%l7, 8, %%l7\n\t"
238 "ldd [%%l7], %%o4\n\t"
239 "add %%l7, 8, %%l7\n\t"
240 "ldd [%%l7], %%l6\n\t"
241 :
242 "=m"(o0),
243 "=m"(o1),
244 "=m"(f0d),
245 "=m"(f0f)
246 :
247 "r"(&saveReg[0])
248 :
249 "memory"
250 );
251 switch( eReturnType )
252 {
253 case typelib_TypeClass_HYPER:
254 case typelib_TypeClass_UNSIGNED_HYPER:
255 ((long*)pRegisterReturn)[1] = o1;
256 case typelib_TypeClass_LONG:
257 case typelib_TypeClass_UNSIGNED_LONG:
258 case typelib_TypeClass_ENUM:
259 ((long*)pRegisterReturn)[0] = o0;
260 break;
261 case typelib_TypeClass_CHAR:
262 case typelib_TypeClass_SHORT:
263 case typelib_TypeClass_UNSIGNED_SHORT:
264 *(unsigned short*)pRegisterReturn = (unsigned short)o0;
265 break;
266 case typelib_TypeClass_BOOLEAN:
267 case typelib_TypeClass_BYTE:
268 *(unsigned char*)pRegisterReturn = (unsigned char)o0;
269 break;
270 case typelib_TypeClass_FLOAT:
271 *(float*)pRegisterReturn = f0f;
272 break;
273 case typelib_TypeClass_DOUBLE:
274 *(double*)pRegisterReturn = f0d;
275 break;
276 default:
277 break;
278 }
279}
280
281static void cpp_call(
284 typelib_TypeDescriptionReference * pReturnTypeRef,
285 sal_Int32 nParams, typelib_MethodParameter * pParams,
286 void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
287{
288 // max space for: complex ret ptr, this, values|ptr ...
289 char * pCppStack =
290 (char *)alloca( (nParams+2) * sizeof(sal_Int64) );
291 char * pCppStackStart = pCppStack;
292
293 // return
294 typelib_TypeDescription * pReturnTypeDescr = 0;
295 TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
296 assert(pReturnTypeDescr);
297
298 void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
299
300 if (pReturnTypeDescr)
301 {
302 if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
303 {
304 pCppReturn = pUnoReturn; // direct way for simple types
305 *(void**)pCppStack = NULL;
306 }
307 else
308 {
309 // complex return via ptr
310 pCppReturn = *(void **)pCppStack = (bridges::cpp_uno::shared::relatesToInterfaceType(pReturnTypeDescr )
311 ? alloca( pReturnTypeDescr->nSize )
312 : pUnoReturn); // direct way
313 }
314 pCppStack += sizeof(void*);
315 }
316 // push this
317 void * pAdjustedThisPtr = reinterpret_cast< void ** >(pThis->getCppI())
318 + aVtableSlot.offset;
319 *(void**)pCppStack = pAdjustedThisPtr;
320 pCppStack += sizeof( void* );
321
322 // stack space
323 static_assert(sizeof(void *) == sizeof(sal_Int32), "### unexpected size!");
324 // args
325 void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
326 // indices of values this have to be converted (interface conversion cpp<=>uno)
327 sal_Int32 * pTempIndices = (sal_Int32 *)(pCppArgs + nParams);
328 // type descriptions for reconversions
329 typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
330
331 sal_Int32 nTempIndices = 0;
332
333 for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
334 {
335 const typelib_MethodParameter & rParam = pParams[nPos];
336 typelib_TypeDescription * pParamTypeDescr = 0;
337 TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
338 if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
339 {
340 pCppArgs[ nPos ] = CPPU_CURRENT_NAMESPACE::adjustPointer(pCppStack, pParamTypeDescr );
341
342 switch (pParamTypeDescr->eTypeClass)
343 {
344 case typelib_TypeClass_HYPER:
345 case typelib_TypeClass_UNSIGNED_HYPER:
346 case typelib_TypeClass_DOUBLE:
347 static_assert(sizeof (double) == sizeof (sal_Int64), "boo");
348 *reinterpret_cast< sal_Int32 * >(pCppStack) =
349 *reinterpret_cast< sal_Int32 const * >(pUnoArgs[ nPos ]);
350 pCppStack += sizeof (sal_Int32);
351 *reinterpret_cast< sal_Int32 * >(pCppStack) =
352 *(reinterpret_cast< sal_Int32 const * >(pUnoArgs[ nPos ] ) + 1);
353 break;
354 default:
356 pCppArgs[nPos], pUnoArgs[nPos], pParamTypeDescr,
357 pThis->getBridge()->getUno2Cpp() );
358 break;
359 }
360 // no longer needed
361 TYPELIB_DANGER_RELEASE( pParamTypeDescr );
362 }
363 else // ptr to complex value | ref
364 {
365 if (! rParam.bIn) // is pure out
366 {
367 // cpp out is constructed mem, uno out is not!
369 *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
370 pParamTypeDescr );
371 pTempIndices[nTempIndices] = nPos; // default constructed for cpp call
372 // will be released at reconversion
373 ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
374 }
375 // is in/inout
377 pParamTypeDescr ))
378 {
380 *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
381 pUnoArgs[nPos], pParamTypeDescr,
382 pThis->getBridge()->getUno2Cpp() );
383
384 pTempIndices[nTempIndices] = nPos; // has to be reconverted
385 // will be released at reconversion
386 ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
387 }
388 else // direct way
389 {
390 *(void **)pCppStack = pCppArgs[nPos] = pUnoArgs[nPos];
391 // no longer needed
392 TYPELIB_DANGER_RELEASE( pParamTypeDescr );
393 }
394 }
395 pCppStack += sizeof(sal_Int32); // standard parameter length
396 }
397
398 try
399 {
400 int nStackLongs = (pCppStack - pCppStackStart)/sizeof(sal_Int32);
401 assert( !( (pCppStack - pCppStackStart ) & 3) && "UNALIGNED STACK !!! (Please DO panic" );
402
403 if( nStackLongs & 1 )
404 // stack has to be 8 byte aligned
405 nStackLongs++;
406 try {
408 pAdjustedThisPtr,
409 aVtableSlot.index,
410 pCppReturn,
411 pReturnTypeDescr->eTypeClass,
412 (sal_Int32 *)pCppStackStart,
413 nStackLongs);
414 } catch (css::uno::Exception &) {
415 throw;
416 } catch (std::exception & e) {
417 throw css::uno::RuntimeException(
418 "C++ code threw " + o3tl::runtimeToOUString(typeid(e).name()) + ": "
419 + o3tl::runtimeToOUString(e.what()));
420 } catch (...) {
421 throw css::uno::RuntimeException("C++ code threw unknown exception");
422 }
423 // NO exception occurred...
424 *ppUnoExc = 0;
425
426 // reconvert temporary params
427 for ( ; nTempIndices--; )
428 {
429 sal_Int32 nIndex = pTempIndices[nTempIndices];
430 typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndices];
431
432 if (pParams[nIndex].bIn)
433 {
434 if (pParams[nIndex].bOut) // inout
435 {
436 uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
437 uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
438 pThis->getBridge()->getCpp2Uno() );
439 }
440 }
441 else // pure out
442 {
443 uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
444 pThis->getBridge()->getCpp2Uno() );
445 }
446 // destroy temp cpp param => cpp: every param was constructed
447 uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
448
449 TYPELIB_DANGER_RELEASE( pParamTypeDescr );
450 }
451 // return value
452 if (pCppReturn && pUnoReturn != pCppReturn)
453 {
454 uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
455 pThis->getBridge()->getCpp2Uno() );
456 uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
457 }
458 }
459 catch( ... )
460 {
461 // get exception
463
464 // temporary params
465 for ( ; nTempIndices--; )
466 {
467 sal_Int32 nIndex = pTempIndices[nTempIndices];
468 // destroy temp cpp param => cpp: every param was constructed
469 uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndices], cpp_release );
470 TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndices] );
471 }
472 // return type
473 if (pReturnTypeDescr)
474 TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
475 }
476}
477
478}
479
480namespace bridges::cpp_uno::shared {
481
483 uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
484 void * pReturn, void * pArgs[], uno_Any ** ppException )
485{
486#if defined BRIDGES_DEBUG
487 OString cstr( OUStringToOString( pMemberDescr->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
488 fprintf( stderr, "received dispatch( %s )\n", cstr.getStr() );
489#endif
490
491 // is my surrogate
493 = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
494// typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
495
496 switch (pMemberDescr->eTypeClass)
497 {
498 case typelib_TypeClass_INTERFACE_ATTRIBUTE:
499 {
500 VtableSlot aVtableSlot(
502 reinterpret_cast<
503 typelib_InterfaceAttributeTypeDescription const * >(
504 pMemberDescr)));
505 if (pReturn)
506 {
507 // dependent dispatch
508 cpp_call(
509 pThis, aVtableSlot,
510 ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
511 0, 0, // no params
512 pReturn, pArgs, ppException );
513 }
514 else
515 {
516 // is SET
517 typelib_MethodParameter aParam;
518 aParam.pTypeRef =
519 ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
520 aParam.bIn = sal_True;
521 aParam.bOut = sal_False;
522
523 typelib_TypeDescriptionReference * pReturnTypeRef = 0;
524 OUString aVoidName("void");
526 &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
527
528 // dependent dispatch
529 aVtableSlot.index += 1; // get, then set method
530 cpp_call(
531 pThis, aVtableSlot,
532 pReturnTypeRef,
533 1, &aParam,
534 pReturn, pArgs, ppException );
535
537 }
538
539 break;
540 }
541 case typelib_TypeClass_INTERFACE_METHOD:
542 {
543 VtableSlot aVtableSlot(
545 reinterpret_cast<
546 typelib_InterfaceMethodTypeDescription const * >(
547 pMemberDescr)));
548 switch (aVtableSlot.index)
549 {
550 // standard calls
551 case 1: // acquire uno interface
552 (*pUnoI->acquire)( pUnoI );
553 *ppException = 0;
554 break;
555 case 2: // release uno interface
556 (*pUnoI->release)( pUnoI );
557 *ppException = 0;
558 break;
559 case 0: // queryInterface() opt
560 {
561 typelib_TypeDescription * pTD = 0;
562 TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
563 if (pTD)
564 {
565 uno_Interface * pInterface = 0;
566 (*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
567 pThis->pBridge->getUnoEnv(),
568 (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
569
570 if (pInterface)
571 {
572 ::uno_any_construct(
573 reinterpret_cast< uno_Any * >( pReturn ),
574 &pInterface, pTD, 0 );
575 (*pInterface->release)( pInterface );
576 TYPELIB_DANGER_RELEASE( pTD );
577 *ppException = 0;
578 break;
579 }
580 TYPELIB_DANGER_RELEASE( pTD );
581 }
582 } // else perform queryInterface()
583 default:
584 // dependent dispatch
585 cpp_call(
586 pThis, aVtableSlot,
587 ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
588 ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
589 ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
590 pReturn, pArgs, ppException );
591 }
592 break;
593 }
594 default:
595 {
596 ::com::sun::star::uno::RuntimeException aExc(
597 "illegal member type description!",
599
600 Type const & rExcType = cppu::UnoType<decltype(aExc)>::get();
601 // binary identical null reference
602 ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
603 }
604 }
605}
606
607}
608
609/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
uno_Mapping * getUno2Cpp()
Definition: bridge.hxx:73
uno_ExtEnvironment * getUnoEnv()
Definition: bridge.hxx:70
uno_Mapping * getCpp2Uno()
Definition: bridge.hxx:72
A uno proxy wrapping a cpp interface.
com::sun::star::uno::XInterface * getCppI()
void SAL_CALL uno_destructData(void *pValue, typelib_TypeDescription *pTypeDescr, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
void SAL_CALL uno_constructData(void *pMem, typelib_TypeDescription *pTypeDescr) SAL_THROW_EXTERN_C()
void SAL_CALL uno_copyAndConvertData(void *pDest, void *pSource, typelib_TypeDescription *pTypeDescr, uno_Mapping *mapping) SAL_THROW_EXTERN_C()
char const * name
register sal_uInt32 r28 __asm__("%r28")
void callVirtualMethod(void *pThis, sal_uInt32 nVtableIndex, void *pRegisterReturn, typelib_TypeDescription *pReturnTypeDescr, bool bRegisterReturn, sal_uInt32 *pStack, sal_uInt32 nStack, sal_uInt32 *pGPR, double *pFPR) __attribute__((noinline))
static void cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy *pThis, bridges::cpp_uno::shared::VtableSlot aVtableSlot, typelib_TypeDescriptionReference *pReturnTypeRef, sal_Int32 nParams, typelib_MethodParameter *pParams, void *pUnoReturn, void *pUnoArgs[], uno_Any **ppUnoExc)
sal_Int32 nIndex
sal_uInt16 nPos
struct _typelib_TypeDescription typelib_TypeDescription
Definition: msvc/except.hxx:53
struct _uno_Any uno_Any
Definition: msvc/except.hxx:32
void dummy_can_throw_anything(char const *)
void fillUnoException(uno_Any *pUnoExc, uno_Mapping *pCpp2Uno)
char * adjustPointer(char *pIn, typelib_TypeDescription *pType)
void unoInterfaceProxyDispatch(uno_Interface *pUnoI, typelib_TypeDescription const *pMemberDescr, void *pReturn, void **pArgs, uno_Any **ppException)
VtableSlot getVtableSlot(typelib_InterfaceAttributeTypeDescription const *ifcMember)
Calculates the vtable slot associated with an interface attribute member.
Definition: vtables.cxx:132
bool isSimpleType(typelib_TypeClass typeClass)
Determines whether a type is a "simple" type (VOID, BOOLEAN, BYTE, SHORT, UNSIGNED SHORT,...
Definition: types.cxx:28
bool relatesToInterfaceType(typelib_TypeDescription const *type)
Determines whether a type relates to an interface type (is itself an interface type,...
Definition: types.cxx:41
Type
OUString runtimeToOUString(char const *runtimeString)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
Represents a vtable slot of a C++ class.
Definition: vtables.hxx:60
sal_Int32 index
The index within the vtable.
Definition: vtables.hxx:76
sal_Int32 offset
The offset of the vtable.
Definition: vtables.hxx:68
void SAL_CALL typelib_typedescriptionreference_new(typelib_TypeDescriptionReference **ppTDR, typelib_TypeClass eTypeClass, rtl_uString *pTypeName) SAL_THROW_EXTERN_C()
void SAL_CALL typelib_typedescriptionreference_release(typelib_TypeDescriptionReference *pRef) SAL_THROW_EXTERN_C()
#define sal_True
#define sal_False
unsigned _Unwind_Word __attribute__((__mode__(__word__)))
Definition: unwind-cxx.h:45