Skip to content

Commit

Permalink
Also optimize when @get_prop or @get_prop_addr stores to a local or
Browse files Browse the repository at this point in the history
global variable.
  • Loading branch information
Andrew Plotkin authored and Andrew Plotkin committed May 27, 2024
1 parent c4ddb54 commit a2fe030
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions expressc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1779,7 +1779,7 @@ static void generate_code_from(int n, int void_flag)
check_warn_symbol_type(&ET[ET[below].right].value, PROPERTY_T, INDIVIDUAL_PROPERTY_T, "\".&\" expression");
if (runtime_error_checking_switch && (!veneer_mode))
AO = check_nonzero_at_runtime(AO, -1, PROP_ADD_RTE);
if ((!void_flag) && (Result.value == 0) && Result.type == VARIABLE_OT) {
if ((!void_flag) && Result.type == VARIABLE_OT) {
/* store directly to stack_pointer */
assemblez_2_to(get_prop_addr_zc, AO,
ET[ET[below].right].value, Result);
Expand Down Expand Up @@ -1817,7 +1817,7 @@ static void generate_code_from(int n, int void_flag)
if (!void_flag) write_result_z(Result, temp_var1);
}
else {
if ((!void_flag) && (Result.value == 0) && Result.type == VARIABLE_OT) {
if ((!void_flag) && Result.type == VARIABLE_OT) {
/* store directly to stack_pointer */
assemblez_2_to(get_prop_zc, ET[below].value,
ET[ET[below].right].value, Result);
Expand Down

0 comments on commit a2fe030

Please sign in to comment.