Remove a useless memory allocation in column annotation. The compiler is now just 0.5% slower than before.
[COMPILER] * OPT: Remove a useless memory allocation in column annotation. The compiler is now just 0.5% slower than before.
This commit is contained in:
parent
9f2da35cbe
commit
7ea4fb4ca5
@ -888,7 +888,7 @@ static void trans_expression(bool check_statement)
|
||||
JOB->step = JOB_STEP_CODE;
|
||||
|
||||
FREE(&tree);
|
||||
FREE(&_tree_pos);
|
||||
_tree_pos = NULL;
|
||||
_tree_length = 0;
|
||||
|
||||
if (check_statement)
|
||||
|
@ -832,10 +832,7 @@ void TRANS_tree(bool check_statement, TRANS_TREE **result, int *count, int **res
|
||||
ALLOC(result, sizeof(PATTERN) * _tree_length);
|
||||
memcpy(*result, _tree, sizeof(PATTERN) * _tree_length);
|
||||
if (result_pos)
|
||||
{
|
||||
ALLOC(result_pos, sizeof(int) * _tree_length);
|
||||
memcpy(*result_pos, _tree_pos, sizeof(int) * _tree_length);
|
||||
}
|
||||
*result_pos = _tree_pos;
|
||||
*count = _tree_length - 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user