Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
27014f48
Kaydet (Commit)
27014f48
authored
Ock 09, 2014
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
native code generator: Use groups for constructors too.
Change-Id: I42570b4b7b68e36cab1286948d03df0c2f0d4103
üst
b85d7b38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
19 deletions
+57
-19
native-code.py
solenv/bin/native-code.py
+57
-19
No files found.
solenv/bin/native-code.py
Dosyayı görüntüle @
27014f48
...
@@ -13,11 +13,8 @@ from optparse import OptionParser
...
@@ -13,11 +13,8 @@ from optparse import OptionParser
# relevant function sections will be referenced in lo_get_factory_map().
# relevant function sections will be referenced in lo_get_factory_map().
# That prevents garbage collector to ignore them as unused.
# That prevents garbage collector to ignore them as unused.
# We need the same groups for new constructor functions, started in
# The same groups are used for constructor based implementations
# ae3a0c8da50b36db395984637f5ad74d3b4887bc
# referenced in lo_get_constructor_map().
# For now, there are only constructor functions for implementations in 'core'
# group, so no need for other groups, core_constructor_list is enough.
# (These functions are referenced in lo_get_constructor_map().)
core_factory_list
=
[
core_factory_list
=
[
(
"libembobj.a"
,
"embobj_component_getFactory"
),
(
"libembobj.a"
,
"embobj_component_getFactory"
),
...
@@ -60,6 +57,16 @@ core_factory_list = [
...
@@ -60,6 +57,16 @@ core_factory_list = [
(
"libxstor.a"
,
"xstor_component_getFactory"
),
(
"libxstor.a"
,
"xstor_component_getFactory"
),
]
]
core_constructor_list
=
[
# sax/source/expatwrap/expwrap.component
"com_sun_star_comp_extensions_xml_sax_ParserExpat"
,
"com_sun_star_comp_extensions_xml_sax_FastParser"
,
# svtools/util/svt.component
"com_sun_star_comp_graphic_GraphicProvider_get_implementation"
,
# svx/util/svx.component
"com_sun_star_drawing_EnhancedCustomShapeEngine_implementation_getFactory"
,
]
extended_core_factory_list
=
core_factory_list
+
[
extended_core_factory_list
=
core_factory_list
+
[
(
"libanimcorelo.a"
,
"animcore_component_getFactory"
),
(
"libanimcorelo.a"
,
"animcore_component_getFactory"
),
(
"libavmedialo.a"
,
"avmedia_component_getFactory"
),
(
"libavmedialo.a"
,
"avmedia_component_getFactory"
),
...
@@ -77,23 +84,35 @@ extended_core_factory_list = core_factory_list + [
...
@@ -77,23 +84,35 @@ extended_core_factory_list = core_factory_list + [
(
"libxmlfdlo.a"
,
"xmlfd_component_getFactory"
),
(
"libxmlfdlo.a"
,
"xmlfd_component_getFactory"
),
]
]
extended_core_constructor_list
=
core_constructor_list
+
[
]
base_core_factory_list
=
[
base_core_factory_list
=
[
(
"libdbalo.a"
,
"dba_component_getFactory"
),
(
"libdbalo.a"
,
"dba_component_getFactory"
),
(
"libdbaxmllo.a"
,
"dbaxml_component_getFactory"
),
(
"libdbaxmllo.a"
,
"dbaxml_component_getFactory"
),
]
]
base_core_constructor_list
=
[
]
calc_core_factory_list
=
[
calc_core_factory_list
=
[
(
"libscdlo.a"
,
"scd_component_getFactory"
),
(
"libscdlo.a"
,
"scd_component_getFactory"
),
(
"libscfiltlo.a"
,
"scfilt_component_getFactory"
),
(
"libscfiltlo.a"
,
"scfilt_component_getFactory"
),
(
"libsclo.a"
,
"sc_component_getFactory"
),
(
"libsclo.a"
,
"sc_component_getFactory"
),
]
]
calc_core_constructor_list
=
[
]
calc_factory_list
=
calc_core_factory_list
+
[
calc_factory_list
=
calc_core_factory_list
+
[
(
"libanalysislo.a"
,
"analysis_component_getFactory"
),
(
"libanalysislo.a"
,
"analysis_component_getFactory"
),
(
"libdatelo.a"
,
"date_component_getFactory"
),
(
"libdatelo.a"
,
"date_component_getFactory"
),
(
"libpricinglo.a"
,
"pricing_component_getFactory"
),
(
"libpricinglo.a"
,
"pricing_component_getFactory"
),
]
]
calc_constructor_list
=
calc_core_constructor_list
+
[
]
draw_core_factory_list
=
[
draw_core_factory_list
=
[
(
"libsddlo.a"
,
"sdd_component_getFactory"
),
(
"libsddlo.a"
,
"sdd_component_getFactory"
),
(
"libsdlo.a"
,
"sd_component_getFactory"
),
(
"libsdlo.a"
,
"sd_component_getFactory"
),
...
@@ -101,23 +120,35 @@ draw_core_factory_list = [
...
@@ -101,23 +120,35 @@ draw_core_factory_list = [
(
"libwpftdrawlo.a"
,
"wpftdraw_component_getFactory"
),
(
"libwpftdrawlo.a"
,
"wpftdraw_component_getFactory"
),
]
]
draw_core_constructor_list
=
[
]
math_factory_list
=
[
math_factory_list
=
[
(
"libsmdlo.a"
,
"smd_component_getFactory"
),
(
"libsmdlo.a"
,
"smd_component_getFactory"
),
(
"libsmlo.a"
,
"sm_component_getFactory"
),
(
"libsmlo.a"
,
"sm_component_getFactory"
),
]
]
math_constructor_list
=
[
]
writer_core_factory_list
=
[
writer_core_factory_list
=
[
(
"libswdlo.a"
,
"swd_component_getFactory"
),
(
"libswdlo.a"
,
"swd_component_getFactory"
),
(
"libswlo.a"
,
"sw_component_getFactory"
),
(
"libswlo.a"
,
"sw_component_getFactory"
),
(
"libwriterfilterlo.a"
,
"writerfilter_component_getFactory"
),
(
"libwriterfilterlo.a"
,
"writerfilter_component_getFactory"
),
]
]
writer_core_constructor_list
=
[
]
writer_factory_list
=
writer_core_factory_list
+
[
writer_factory_list
=
writer_core_factory_list
+
[
(
"libhwplo.a"
,
"hwp_component_getFactory"
),
(
"libhwplo.a"
,
"hwp_component_getFactory"
),
(
"libt602filterlo.a"
,
"t602filter_component_getFactory"
),
(
"libt602filterlo.a"
,
"t602filter_component_getFactory"
),
(
"libwpftwriterlo.a"
,
"wpftwriter_component_getFactory"
),
(
"libwpftwriterlo.a"
,
"wpftwriter_component_getFactory"
),
]
]
writer_constructor_list
=
writer_core_constructor_list
+
[
]
factory_map
=
{
factory_map
=
{
'core'
:
core_factory_list
,
'core'
:
core_factory_list
,
'extended_core'
:
extended_core_factory_list
,
'extended_core'
:
extended_core_factory_list
,
...
@@ -130,15 +161,17 @@ factory_map = {
...
@@ -130,15 +161,17 @@ factory_map = {
'writer'
:
writer_factory_list
,
'writer'
:
writer_factory_list
,
}
}
core_constructor_list
=
[
constructor_map
=
{
# sax/source/expatwrap/expwrap.component
'core'
:
core_constructor_list
,
"com_sun_star_comp_extensions_xml_sax_ParserExpat"
,
'extended_core'
:
extended_core_constructor_list
,
"com_sun_star_comp_extensions_xml_sax_FastParser"
,
'base_core'
:
base_core_constructor_list
,
# svtools/util/svt.component
'calc_core'
:
calc_core_constructor_list
,
"com_sun_star_comp_graphic_GraphicProvider_get_implementation"
,
'calc'
:
calc_constructor_list
,
# svx/util/svx.component
'draw_core'
:
draw_core_constructor_list
,
"com_sun_star_drawing_EnhancedCustomShapeEngine_implementation_getFactory"
,
'math'
:
math_constructor_list
,
]
'writer_core'
:
writer_core_constructor_list
,
'writer'
:
writer_constructor_list
,
}
opts
=
OptionParser
()
opts
=
OptionParser
()
opts
.
add_option
(
"-j"
,
"--java-guard"
,
action
=
"store_true"
,
help
=
"include external java functions"
,
dest
=
"java"
,
default
=
False
)
opts
.
add_option
(
"-j"
,
"--java-guard"
,
action
=
"store_true"
,
help
=
"include external java functions"
,
dest
=
"java"
,
default
=
False
)
...
@@ -148,7 +181,7 @@ opts.add_option("-g", "--group", action="append", help="group of implementations
...
@@ -148,7 +181,7 @@ opts.add_option("-g", "--group", action="append", help="group of implementations
print
(
"""/*
print
(
"""/*
* This is a generated file. Do not edit.
* This is a generated file. Do not edit.
* file generated by solen
c
/bin/native-code.py
* file generated by solen
v
/bin/native-code.py
*/
*/
#include <osl/detail/component-mapping.h>
#include <osl/detail/component-mapping.h>
...
@@ -162,8 +195,10 @@ if options.groups:
...
@@ -162,8 +195,10 @@ if options.groups:
print
(
'void * '
+
factory_function
+
'( const char* , void* , void* );'
)
print
(
'void * '
+
factory_function
+
'( const char* , void* , void* );'
)
print
(
''
)
print
(
''
)
for
constructor
in
core_constructor_list
:
if
options
.
groups
:
print
(
'void * '
+
constructor
+
'( void *, void * );'
)
for
constructor_group
in
options
.
groups
:
for
constructor
in
constructor_map
[
constructor_group
]:
print
(
'void * '
+
constructor
+
'( void *, void * );'
)
print
(
"""
print
(
"""
const lib_to_factory_mapping *
const lib_to_factory_mapping *
...
@@ -199,8 +234,11 @@ const lib_to_constructor_mapping *
...
@@ -199,8 +234,11 @@ const lib_to_constructor_mapping *
lo_get_constructor_map(void)
lo_get_constructor_map(void)
{
{
static lib_to_constructor_mapping map[] = {"""
)
static lib_to_constructor_mapping map[] = {"""
)
for
constructor
in
core_constructor_list
:
print
(
' { "'
+
constructor
+
'", '
+
constructor
+
' },'
)
if
options
.
groups
:
for
constructor_group
in
options
.
groups
:
for
constructor
in
constructor_map
[
constructor_group
]:
print
(
' { "'
+
constructor
+
'", '
+
constructor
+
' },'
)
print
(
"""
print
(
"""
{ 0, 0 }
{ 0, 0 }
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment