Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mkornaukhov03 committed Jan 16, 2023
1 parent 6f10f13 commit c60c065
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions compiler/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1256,11 +1256,9 @@ VertexAdaptor<op_match_proxy> GenTree::get_match() {
}

if (cur->type() == tok_default) {
// printf("%s: new default arm!\n", __FUNCTION__);
cases.emplace_back(get_match_default());
}
else {
// printf("%s: new ordinary arm!\n", __FUNCTION__);
cases.emplace_back(get_match_case());
}
kphp_assert_msg(cases.back(), "Invalid 'match' case!");
Expand Down
2 changes: 1 addition & 1 deletion compiler/pipes/collect-main-edges.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ void CollectMainEdgesPass::on_switch(VertexAdaptor<op_switch> switch_op) {
}
}
}
if (switch_op->kind == SwitchKind::IntSwitch) {
else if (switch_op->kind == SwitchKind::IntSwitch) {
// in case of int-only switch, condition var is discarded, so there is
// no real need in trying to insert an assignment node here
create_type_assign(as_lvalue(switch_op->condition_on_switch()), TypeData::get_type(tp_int));
Expand Down
1 change: 0 additions & 1 deletion compiler/pipes/gen-tree-postprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "compiler/pipes/gen-tree-postprocess.h"

#include "auto/compiler/vertex/vertex-types.h"
#include "common/algorithms/find.h"
#include "compiler/compiler-core.h"
#include "compiler/data/class-data.h"
Expand Down

0 comments on commit c60c065

Please sign in to comment.