-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added emition of the functions returning structure #366
base: feature
Are you sure you want to change the base?
Added emition of the functions returning structure #366
Conversation
…rget address) and added ability not to assign target(used in emit expression) Fixed function_definition now it correctly works with functions returning structures Fixed emit_expression now it can emit same type of functions Fixed emit return stmt to work with these functions
libs/compiler/mipsgen.c
Outdated
* @param arg_reg_count Pointer to the number of stored argument registers | ||
* | ||
*/ | ||
static void emit_function_arguments_loading(encoder *const enc, const node *const nd, lvalue prev_arg_displ[], size_t *const arg_reg_count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Размер массива красивый
libs/compiler/mipsgen.c
Outdated
@@ -2719,10 +2949,37 @@ static rvalue emit_expression(encoder *const enc, const node *const nd) | |||
return emit_literal_expression(enc, nd); | |||
|
|||
case EXPR_CALL: | |||
return emit_call_expression(enc, nd); | |||
if (type_is_structure(enc->sx, expression_get_type(nd))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В отдельную функцию emit_call_expression
libs/compiler/mipsgen.c
Outdated
|
||
case EXPR_MEMBER: | ||
return emit_member_expression(enc, nd); | ||
return emit_member_expression(enc, nd, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Подписать boolean-параметры
Добавлены несколько функций:
Изменены несколько функций: