IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Here we don't want to depend on the JIT runFunction, because of its limitations,
when it comes to return value handling. There it is not clear who provides the
storage and who cleans it up in a platform independent way.
Depending on the type we need to synthesize a call to cling:
0) void : do nothing;
1) enum, integral, float, double, referece, pointer types :
call to cling::internal::setValueNoAlloc(...);
2) object type (alloc on the stack) :
cling::internal::setValueWithAlloc
2.1) constant arrays:
call to cling::runtime::internal::copyArray(...)
We need to synthesize later (see RuntimeUniverse.h)
Wrapper has signature: void w(cling::StoredValueRef SVR)
case 1):
setValueNoAlloc(gCling, &SVR, lastExprTy, lastExpr())
case 2):
new (setValueWithAlloc(gCling, &SVR, lastExprTy)) (lastExpr)
case 2.1):
copyArray(src, placement, N)
The underlying issue is that the caller need to provide argument setup
and cleanup, which for 32bit is different than in 64, for example.
The approach we propose should be independent on the concrete platform
implementation, because we pass in the storage and depending on the
return result, we let cling runtime to deside whether and how to alloc
storage.
When there are class specializations, and a concrete specialization is deleted
find will give back the less concrete one and the check will fail, signaling
a wrong behavior, which is incorrect.