mirror of
https://github.com/open-goal/jak-project
synced 2026-05-26 23:47:57 -04:00
[Compiler] Add reset-here option to colored and constrained rlet vars (#169)
* add reset-here to clear coloring at entry to rlet * update doc
This commit is contained in:
@@ -25,12 +25,6 @@ bool Function::build_expression(LinkedObjectFile& file) {
|
||||
// or more complicated analysis to do as good as possible on outer begins.
|
||||
auto all_children = ir->get_all_ir(file);
|
||||
std::vector<IR_Begin*> all_begins;
|
||||
for (auto i = all_children.size(); i-- > 0;) {
|
||||
auto as_begin = dynamic_cast<IR_Begin*>(all_children.at(i).get());
|
||||
if (as_begin) {
|
||||
all_begins.push_back(as_begin);
|
||||
}
|
||||
}
|
||||
|
||||
// the top level may also be a begin
|
||||
auto as_begin = dynamic_cast<IR_Begin*>(ir.get());
|
||||
@@ -38,6 +32,13 @@ bool Function::build_expression(LinkedObjectFile& file) {
|
||||
all_begins.push_back(as_begin);
|
||||
}
|
||||
|
||||
for (auto& i : all_children) {
|
||||
auto child_as_begin = dynamic_cast<IR_Begin*>(i.get());
|
||||
if (child_as_begin) {
|
||||
all_begins.push_back(child_as_begin);
|
||||
}
|
||||
}
|
||||
|
||||
// turn each begin into an expression
|
||||
for (auto b : all_begins) {
|
||||
if (!expressionize_begin(b, file)) {
|
||||
|
||||
Reference in New Issue
Block a user