return result;
}
public InstructionList reduce_typedVariableDeclWithConstantInitializer(IASNode iNode, Name var_name, Binding var_type, Object constant_var_initializer, Vector<InstructionList> chained_decls)
{
BaseVariableNode var_node = (BaseVariableNode)iNode;
PooledValue transformed_constant_initializer =
currentScope.getMethodBodySemanticChecker().checkInitialValue(var_node, var_type, new PooledValue(constant_var_initializer));
// if this definition isn't a const, then just use the normal variable initialization, as
// we only initialize the const slots and not var slots
if (!SemanticUtils.isConst(iNode, currentScope.getProject()))
{
InstructionList var_initializer = transform_pooled_value(iNode, transformed_constant_initializer);
return reduce_typedVariableDeclWithInitializer(iNode, var_name, var_type, var_initializer, chained_decls);
}
currentScope.getMethodBodySemanticChecker().checkVariableDeclaration(iNode);
InstructionList result = createInstructionList(iNode);
Binding var = currentScope.resolveName((IdentifierNode)var_node.getNameExpressionNode());
currentScope.makeVariable(var, var_type.getName(), ((BaseDefinitionNode)iNode).getMetaInfos(), transformed_constant_initializer.getValue());
// If the variable is in a local, then it needs to be initialized at the start of the method.
if ( var.isLocal() )
{