Skip to content

Commit

Permalink
working on issue #509
Browse files Browse the repository at this point in the history
  • Loading branch information
objeck committed Feb 5, 2025
1 parent e087aff commit 8a8fbec
Showing 1 changed file with 3 additions and 31 deletions.
34 changes: 3 additions & 31 deletions core/compiler/intermediate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5302,38 +5302,10 @@ void IntermediateEmitter::EmitMethodCallParameters(MethodCall* method_call)
// new array
if(method_call->GetCallType() == NEW_ARRAY_CALL) {
std::vector<Expression*> expressions = method_call->GetCallingParameters()->GetExpressions();

// array copy
#ifndef _SYSTEM
if(expressions.size() == 1 && expressions[0]->GetExpressionType() == VAR_EXPR && !static_cast<Variable*>(expressions[0])->GetIndices()) {
Variable* variable = static_cast<Variable*>(expressions[0]);
Type* eval_type = variable->GetEvalType();

switch(eval_type->GetType()) {
case frontend::BYTE_TYPE:
break;

case frontend::CHAR_TYPE:
break;

case frontend::INT_TYPE:
break;

default:
break;
}
}
else {
#endif
for(size_t i = 0; i < expressions.size(); ++i) {
Expression* expression = expressions[i];
EmitExpression(expression);
EmitClassCast(expression);
}
#ifndef _SYSTEM
for(size_t i = 0; i < expressions.size(); ++i) {
EmitExpression(expressions[i]);
EmitClassCast(expressions[i]);
}
#endif

is_new_inst = false;
}
// enum call
Expand Down

0 comments on commit 8a8fbec

Please sign in to comment.