mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-12 05:47:11 +03:00
Fixed test runnable/arrayop
This commit is contained in:
parent
f8bf67dc6e
commit
e48d0f6b79
2 changed files with 22 additions and 6 deletions
|
@ -424,13 +424,29 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
|
||||||
|
|
||||||
LLSmallVector<unsigned, 10> attrptr(n, 0);
|
LLSmallVector<unsigned, 10> attrptr(n, 0);
|
||||||
|
|
||||||
|
std::vector<DValue*> argvals;
|
||||||
|
if (dfnval && dfnval->func->isArrayOp) {
|
||||||
|
// slightly different approach for array operators
|
||||||
|
for (int i=n-1; i>=0; --i) {
|
||||||
|
Parameter* fnarg = Parameter::getNth(tf->parameters, i);
|
||||||
|
assert(fnarg);
|
||||||
|
DValue* argval = DtoArgument(fnarg, (Expression*)arguments->data[i]);
|
||||||
|
argvals.insert(argvals.begin(), argval);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (int i=0; i<n; ++i) {
|
||||||
|
Parameter* fnarg = Parameter::getNth(tf->parameters, i);
|
||||||
|
assert(fnarg);
|
||||||
|
DValue* argval = DtoArgument(fnarg, (Expression*)arguments->data[i]);
|
||||||
|
argvals.push_back(argval);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// do formal params
|
// do formal params
|
||||||
int beg = argiter-argbegin;
|
int beg = argiter-argbegin;
|
||||||
for (int i=0; i<n; i++)
|
for (int i=0; i<n; i++)
|
||||||
{
|
{
|
||||||
Parameter* fnarg = Parameter::getNth(tf->parameters, i);
|
DValue* argval = argvals.at(i);
|
||||||
assert(fnarg);
|
|
||||||
DValue* argval = DtoArgument(fnarg, (Expression*)arguments->data[i]);
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (Logger::enabled()) {
|
if (Logger::enabled()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue