mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
make find[Field|Method]InClass non-inline functions
It seems that GCC 4.6.1 gets confused at LTO time when we take the address of inline functions, so I'm switching them to non-inline linkage to make it happy.
This commit is contained in:
parent
031852daec
commit
2ee3771125
@ -2416,6 +2416,38 @@ isInitializing(Thread* t, object c)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object
|
||||||
|
findInTable(Thread* t, object table, object name, object spec,
|
||||||
|
object& (*getName)(Thread*, object),
|
||||||
|
object& (*getSpec)(Thread*, object))
|
||||||
|
{
|
||||||
|
if (table) {
|
||||||
|
for (unsigned i = 0; i < arrayLength(t, table); ++i) {
|
||||||
|
object o = arrayBody(t, table, i);
|
||||||
|
if (vm::strcmp(&byteArrayBody(t, getName(t, o), 0),
|
||||||
|
&byteArrayBody(t, name, 0)) == 0 and
|
||||||
|
vm::strcmp(&byteArrayBody(t, getSpec(t, o), 0),
|
||||||
|
&byteArrayBody(t, spec, 0)) == 0)
|
||||||
|
{
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// fprintf(stderr, "%s %s not in\n",
|
||||||
|
// &byteArrayBody(t, name, 0),
|
||||||
|
// &byteArrayBody(t, spec, 0));
|
||||||
|
|
||||||
|
// for (unsigned i = 0; i < arrayLength(t, table); ++i) {
|
||||||
|
// object o = arrayBody(t, table, i);
|
||||||
|
// fprintf(stderr, "\t%s %s\n",
|
||||||
|
// &byteArrayBody(t, getName(t, o), 0),
|
||||||
|
// &byteArrayBody(t, getSpec(t, o), 0));
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace vm {
|
namespace vm {
|
||||||
@ -3884,35 +3916,17 @@ makeObjectArray(Thread* t, object elementClass, unsigned count)
|
|||||||
}
|
}
|
||||||
|
|
||||||
object
|
object
|
||||||
findInTable(Thread* t, object table, object name, object spec,
|
findFieldInClass(Thread* t, object class_, object name, object spec)
|
||||||
object& (*getName)(Thread*, object),
|
|
||||||
object& (*getSpec)(Thread*, object))
|
|
||||||
{
|
{
|
||||||
if (table) {
|
return findInTable
|
||||||
for (unsigned i = 0; i < arrayLength(t, table); ++i) {
|
(t, classFieldTable(t, class_), name, spec, fieldName, fieldSpec);
|
||||||
object o = arrayBody(t, table, i);
|
}
|
||||||
if (vm::strcmp(&byteArrayBody(t, getName(t, o), 0),
|
|
||||||
&byteArrayBody(t, name, 0)) == 0 and
|
|
||||||
vm::strcmp(&byteArrayBody(t, getSpec(t, o), 0),
|
|
||||||
&byteArrayBody(t, spec, 0)) == 0)
|
|
||||||
{
|
|
||||||
return o;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// fprintf(stderr, "%s %s not in\n",
|
object
|
||||||
// &byteArrayBody(t, name, 0),
|
findMethodInClass(Thread* t, object class_, object name, object spec)
|
||||||
// &byteArrayBody(t, spec, 0));
|
{
|
||||||
|
return findInTable
|
||||||
// for (unsigned i = 0; i < arrayLength(t, table); ++i) {
|
(t, classMethodTable(t, class_), name, spec, methodName, methodSpec);
|
||||||
// object o = arrayBody(t, table, i);
|
|
||||||
// fprintf(stderr, "\t%s %s\n",
|
|
||||||
// &byteArrayBody(t, getName(t, o), 0),
|
|
||||||
// &byteArrayBody(t, getSpec(t, o), 0));
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
object
|
object
|
||||||
|
@ -2595,16 +2595,7 @@ makeObjectArray(Thread* t, unsigned count)
|
|||||||
}
|
}
|
||||||
|
|
||||||
object
|
object
|
||||||
findInTable(Thread* t, object table, object name, object spec,
|
findFieldInClass(Thread* t, object class_, object name, object spec);
|
||||||
object& (*getName)(Thread*, object),
|
|
||||||
object& (*getSpec)(Thread*, object));
|
|
||||||
|
|
||||||
inline object
|
|
||||||
findFieldInClass(Thread* t, object class_, object name, object spec)
|
|
||||||
{
|
|
||||||
return findInTable
|
|
||||||
(t, classFieldTable(t, class_), name, spec, fieldName, fieldSpec);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline object
|
inline object
|
||||||
findFieldInClass2(Thread* t, object class_, const char* name, const char* spec)
|
findFieldInClass2(Thread* t, object class_, const char* name, const char* spec)
|
||||||
@ -2616,12 +2607,8 @@ findFieldInClass2(Thread* t, object class_, const char* name, const char* spec)
|
|||||||
return findFieldInClass(t, class_, n, s);
|
return findFieldInClass(t, class_, n, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline object
|
object
|
||||||
findMethodInClass(Thread* t, object class_, object name, object spec)
|
findMethodInClass(Thread* t, object class_, object name, object spec);
|
||||||
{
|
|
||||||
return findInTable
|
|
||||||
(t, classMethodTable(t, class_), name, spec, methodName, methodSpec);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline object
|
inline object
|
||||||
makeThrowable
|
makeThrowable
|
||||||
|
Loading…
Reference in New Issue
Block a user