Fixed issue #630 by fixing a minor typo in the previous commit

(as well as a non critical minor code optimization)
This commit is contained in:
Udi Finkelstein 2018-09-25 00:32:57 +03:00
parent c693f595c5
commit 80a07652f2
1 changed files with 2 additions and 2 deletions

View File

@ -3028,8 +3028,8 @@ bool AstNode::mem2reg_as_needed_pass2(pool<AstNode*> &mem2reg_set, AstNode *mod,
AstNode *newNode = clone(); AstNode *newNode = clone();
newNode->type = AST_ASSIGN_EQ; newNode->type = AST_ASSIGN_EQ;
newNode->children[0]->was_checked = true;
async_block->children[0]->children.push_back(newNode); async_block->children[0]->children.push_back(newNode);
async_block->children[0]->children.back()->children[0]->was_checked = true;
newNode = new AstNode(AST_NONE); newNode = new AstNode(AST_NONE);
newNode->cloneInto(this); newNode->cloneInto(this);
@ -3074,7 +3074,7 @@ bool AstNode::mem2reg_as_needed_pass2(pool<AstNode*> &mem2reg_set, AstNode *mod,
AstNode *assign_addr = new AstNode(AST_ASSIGN_EQ, new AstNode(AST_IDENTIFIER), children[0]->children[0]->children[0]->clone()); AstNode *assign_addr = new AstNode(AST_ASSIGN_EQ, new AstNode(AST_IDENTIFIER), children[0]->children[0]->children[0]->clone());
assign_addr->children[0]->str = id_addr; assign_addr->children[0]->str = id_addr;
assign_addr->children[0]->str = was_checked; assign_addr->children[0]->was_checked = true;
block->children.insert(block->children.begin()+assign_idx+1, assign_addr); block->children.insert(block->children.begin()+assign_idx+1, assign_addr);
AstNode *case_node = new AstNode(AST_CASE, new AstNode(AST_IDENTIFIER)); AstNode *case_node = new AstNode(AST_CASE, new AstNode(AST_IDENTIFIER));