Re: [Libreoffice] [GSoC][performance] patches for prefixing
I'm sorry, forgot to send also to devlist. On 25 June 2011 11:41, Matúš Kukan wrote: > On 24 June 2011 16:08, Michael Meeks wrote: >> Fun - perhaps there is a mapfile problem - whereby we are punching a >> hole through the map file for the old component_getFactory name, and not >> for the new foo_component_getFactory; at least I added a unit test to >> cppuhelper and struggled with this for a bit myself ;-) >> > I really don't know what kind of problem there is. > It seems to be alright, also we can call comphelp_component_ function. > The only thing caused by diff in comphelper is that at the end of make check, > soffice.bin does not end. It's running somewhere inside vcl. And > CPPUNIT_ASSERT(desktop->terminate()); fails. > I have no idea how that's related and how I could find the problem. > > I'm also sending cleaning diff for comphelper, maybe we could push that. > >> Anyhow - I've merged your core patches, reverted the ABI break in >> cppuhelper and done that another way (with a polymorphic impl. instead >> of a default argument type). I attach a 'redo.diff' - this doesn't >> really solve the problem I think, we need to add a 'prefix' parameter to >> this framework macro so we can specify that as being different for each >> component I think - can you hack that up ? >> > Sure, it was not good, so attached new diff for framework. (Maybe I > could add parameter also to LOG_REGISTRATION_GETFACTORY ?) > And also small change to dllcomponentloader in stoc is needed. > And then if it's not too slow to call loadSharedLibComponentFactory > through active() in factory.cxx we could also change that. > > Regards, > Matus > diff --git a/comphelper/inc/comphelper/componentmodule.hxx b/comphelper/inc/comphelper/componentmodule.hxx index 1cab942..f09d3b7 100644 --- a/comphelper/inc/comphelper/componentmodule.hxx +++ b/comphelper/inc/comphelper/componentmodule.hxx @@ -355,12 +355,12 @@ namespace comphelper //= implementing the API of a component library (component_*) #define IMPLEMENT_COMPONENT_LIBRARY_API( module_class, initializer_function ) \ -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(\ +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL comphelp_component_getImplementationEnvironment( \ const sal_Char **ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) \ { \ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;\ } \ -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( \ +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL comphelp_component_getFactory( \ const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey ) \ { \ initializer_function(); \ diff --git a/comphelper/util/comphelp.component b/comphelper/util/comphelp.component index 10d23d4..d29468b 100644 --- a/comphelper/util/comphelp.component +++ b/comphelper/util/comphelp.component @@ -26,7 +26,7 @@ * **--> -http://openoffice.org/2010/uno-components";> diff --git a/comphelper/inc/comphelper/servicedecl.hxx b/comphelper/inc/comphelper/servicedecl.hxx index b0c0d71..3dfe80c 100644 --- a/comphelper/inc/comphelper/servicedecl.hxx +++ b/comphelper/inc/comphelper/servicedecl.hxx @@ -29,16 +29,10 @@ #define COMPHELPER_SERVICEDECL_HXX_INCLUDED #include -#include #include #include -#include -#include #include #include -#include -#include -#include namespace comphelper { namespace service_decl { @@ -149,277 +143,9 @@ private: char const m_cDelim; }; -/** To specify whether the implementation class expects arguments -(uno::Sequence). -*/ -template struct with_args; - -/// @internal -namespace detail { -template -class OwnServiceImpl -: public ImplT, - private ::boost::noncopyable -{ -typedef ImplT BaseT; - -public: -OwnServiceImpl( -ServiceDecl const& rServiceDecl, -css::uno::Sequence const& args, -css::uno::Reference const& xContext ) -:BaseT(args, xContext), m_rServiceDecl(rServiceDecl) {} -OwnServiceImpl( -ServiceDecl const& rServiceDecl, -css::uno::Reference const& xContext ) -: BaseT(xContext), m_rServiceDecl(rServiceDecl) {} - -// XServiceInfo -virtual ::rtl::OUString SAL_CALL getImplementationName() -throw (css::uno::RuntimeException) { -return m_rServiceDecl.getImplementationName(); -} -virtual sal_Bool SAL_CALL supportsService( ::rtl::OUString const& name ) -throw (css::uno::RuntimeException) { -return m_rServiceDecl.supportsService(name); -} -virtual css::uno::Sequence< ::rtl::OUString> -SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) { -return m_rServiceDecl.getSupportedServiceNames(); -} - -private: -ServiceDecl const& m_rServiceDecl; -}; - -template -class ServiceImpl : public O
Re: [Libreoffice] [GSoC][performance] patches for prefixing
Hi Matus, On Wed, 2011-06-22 at 09:57 +0200, Matúš Kukan wrote: > I'm sending some patches to allow prefixes for components and also > I've done prefixing for some components. It hope it will work also for > others. I've done make from clean. But when I tried to add prefix > for comphelper's component, make check was unsuccessful. Fun - perhaps there is a mapfile problem - whereby we are punching a hole through the map file for the old component_getFactory name, and not for the new foo_component_getFactory; at least I added a unit test to cppuhelper and struggled with this for a bit myself ;-) Anyhow - I've merged your core patches, reverted the ABI break in cppuhelper and done that another way (with a polymorphic impl. instead of a default argument type). I attach a 'redo.diff' - this doesn't really solve the problem I think, we need to add a 'prefix' parameter to this framework macro so we can specify that as being different for each component I think - can you hack that up ? It looks good to me, though 'make check' no longer passes - but then, perhaps it didn't beforehand (hard to say without a far-too-substantial wait). I'm running some more smoketests before pushing all the new prefix updates around the place. > And about merging libraries. Maybe we should do this in new branch. > Not in master. Right - I think perhaps we'll need to do some preparatory work to get more gnumake usage out there. Also, of course we need to tweak all the libraries that we plan to merge into one to have prefixed component factories :-) HTH, Michael. -- michael.me...@novell.com <><, Pseudo Engineer, itinerant idiot diff --git a/framework/util/fwk.component b/framework/util/fwk.component index c460ecb..139dd06 100755 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -26,7 +26,7 @@ * **--> -http://openoffice.org/2010/uno-components";> diff --git a/framework/util/fwl.component b/framework/util/fwl.component index 99c5ca7..5708efa 100755 --- a/framework/util/fwl.component +++ b/framework/util/fwl.component @@ -26,7 +26,7 @@ * **--> -http://openoffice.org/2010/uno-components";> diff --git a/framework/util/fwm.component b/framework/util/fwm.component index 624249f..58ddc91 100755 --- a/framework/util/fwm.component +++ b/framework/util/fwm.component @@ -26,7 +26,7 @@ * **--> -http://openoffice.org/2010/uno-components";> diff --git a/framework/inc/macros/debug/registration.hxx b/framework/inc/macros/debug/registration.hxx index bbb328e..a199fcf 100644 --- a/framework/inc/macros/debug/registration.hxx +++ b/framework/inc/macros/debug/registration.hxx @@ -57,7 +57,7 @@ #define LOG_REGISTRATION_GETFACTORY( SINFOTEXT ) \ {\ ::rtl::OStringBuffer sOut( 1024 ); \ -sOut.append( "component_getFactory():" ); \ +sOut.append( "fw_component_getFactory():" ); \ sOut.append( SINFOTEXT ); \ WRITE_LOGFILE( LOGFILE_REGISTRATION, sOut.makeStringAndClear() ) \ } diff --git a/framework/inc/macros/registration.hxx b/framework/inc/macros/registration.hxx index f5510af..0de6a2e 100644 --- a/framework/inc/macros/registration.hxx +++ b/framework/inc/macros/registration.hxx @@ -57,8 +57,8 @@ Please use follow public macros only! IFFACTORY( CLASS ) => use it as parameter for COMPONENT_GETFACTORY( IFFACTORIES ) -COMPONENTGETIMPLEMENTATIONENVIRONMENT => use it to define exported function component_getImplementationEnvironment() -COMPONENTGETFACTORY( IFFACTORIES ) => use it to define exported function component_getFactory() +COMPONENTGETIMPLEMENTATIONENVIRONMENT => use it to define exported function fw_component_getImplementationEnvironment() +COMPONENTGETFACTORY( IFFACTORIES ) => use it to define exported function fw_component_getFactory() _*/ @@ -82,7 +82,7 @@ // define helper to get information about service environment //* #define COMPONENTGETIMPLEMENTATIONENVIRONMENT \ -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvironmentTypeName ,\ +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL fw_component_getImplementationEnvironment( const sal_Char
Re: [Libreoffice] [GSoC][performance] patches for prefixing
Hi Matus, On Wed, 2011-06-22 at 09:57 +0200, Matúš Kukan wrote: > I'm sending some patches to allow prefixes for components and also > I've done prefixing for some components. Awesome :-) This should also be really useful for Tor's drive to cross-compile to iOS - where we have to statically link ~everything :-) clearly having non-conflicting symbols will help there. > It hope it will work also for others. I've done make from clean. > But when I tried to add prefix for comphelper's component, make check > was unsuccessful. Oh fun :-) > I don't know why and hope the others are alright. This is great. > And about merging libraries. Maybe we should do this in new branch. > Not in master. But it's not really necessary if we will take care > with pushing. Yes - that makes sense. I think we really need to spend the time identifying which we want to merge; and then post a list of libraries we intend to glup together here first for discussion. In fact - it'd be great to get you to the TSC meeting tomorrow to present what you're up to if you're ok for that ? 14:00 UTC if you're around (should be a free-phone number). Regards, Michael. -- michael.me...@novell.com <><, Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice