context->formals = f->formalParameterList;
context->formalCount = f->formalParameterCount;
f->call(context);
- __qmljs_copy(result, &context->result);
+ if (result)
+ __qmljs_copy(result, &context->result);
} else {
Q_ASSERT(!"not a function");
}
(*args_it)->init(actual);
args_it = &(*args_it)->next;
}
- const unsigned t = _block->newTemp();
- _block->MOVE(_block->TEMP(t), _block->CALL(*base, args));
- _expr.code = _block->TEMP(t);
+ _expr.code = _block->CALL(*base, args);
return false;
}
String *id = identifier(*call->base->asName()->id);
amd64_mov_reg_reg(_codePtr, AMD64_RDI, AMD64_R15, 8);
- loadTempAddress(AMD64_RSI, result);
+ if (result)
+ loadTempAddress(AMD64_RSI, result);
+ else
+ amd64_alu_reg_reg(_codePtr, X86_XOR, AMD64_RSI, AMD64_RSI);
amd64_mov_reg_imm(_codePtr, AMD64_RDX, id);
amd64_call_code(_codePtr, __qmljs_call_activation_property);
amd64_mov_reg_reg(_codePtr, AMD64_RDI, AMD64_R15, 8);
amd64_call_code(_codePtr, __qmljs_dispose_context);
}
-void InstructionSelection::visitExp(IR::Exp *)
+void InstructionSelection::visitExp(IR::Exp *s)
{
-// Q_UNIMPLEMENTED();
-// assert(!"TODO");
+ if (IR::Call *c = s->expr->asCall()) {
+ callActivationProperty(c, 0);
+ return;
+ }
+ Q_UNIMPLEMENTED();
+ assert(!"TODO");
}
void InstructionSelection::visitEnter(IR::Enter *)