mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Rename SemIR::Node to SemIR::Inst (#3355)
And generally replace "node" by "inst" in the code and "instruction" in comments. --------- Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This commit is contained in:
co-authored by
Chandler Carruth
parent
35c2142392
commit
7edfd8e02a
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "toolchain/check/context.h"
|
||||
#include "toolchain/check/convert.h"
|
||||
#include "toolchain/sem_ir/node.h"
|
||||
#include "toolchain/sem_ir/inst.h"
|
||||
|
||||
namespace Carbon::Check {
|
||||
|
||||
@@ -26,8 +26,8 @@ auto HandleIfCondition(Context& context, Parse::Node parse_node) -> bool {
|
||||
auto else_block_id = context.AddDominatedBlockAndBranch(parse_node);
|
||||
|
||||
// Start emitting the `then` block.
|
||||
context.node_block_stack().Pop();
|
||||
context.node_block_stack().Push(then_block_id);
|
||||
context.inst_block_stack().Pop();
|
||||
context.inst_block_stack().Push(then_block_id);
|
||||
context.AddCurrentCodeBlockToFunction();
|
||||
|
||||
context.node_stack().Push(parse_node, else_block_id);
|
||||
@@ -38,7 +38,7 @@ auto HandleIfStatementElse(Context& context, Parse::Node parse_node) -> bool {
|
||||
auto else_block_id = context.node_stack().Pop<Parse::NodeKind::IfCondition>();
|
||||
|
||||
// Switch to emitting the `else` block.
|
||||
context.node_block_stack().Push(else_block_id);
|
||||
context.inst_block_stack().Push(else_block_id);
|
||||
context.AddCurrentCodeBlockToFunction();
|
||||
|
||||
context.node_stack().Push(parse_node);
|
||||
@@ -53,9 +53,9 @@ auto HandleIfStatement(Context& context, Parse::Node parse_node) -> bool {
|
||||
// block.
|
||||
auto else_block_id =
|
||||
context.node_stack().Pop<Parse::NodeKind::IfCondition>();
|
||||
context.AddNode(SemIR::Branch{parse_node, else_block_id});
|
||||
context.node_block_stack().Pop();
|
||||
context.node_block_stack().Push(else_block_id);
|
||||
context.AddInst(SemIR::Branch{parse_node, else_block_id});
|
||||
context.inst_block_stack().Pop();
|
||||
context.inst_block_stack().Push(else_block_id);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user