fix(IR): use register operands instead of variable for local variables
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include "furc/ast/visitor.hpp"
|
||||
#include "furlang/ir/module.hpp"
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
namespace furc {
|
||||
namespace front {
|
||||
|
||||
@@ -39,6 +41,8 @@ private:
|
||||
std::unique_ptr<furlang::ir::function> m_currentFunction;
|
||||
std::shared_ptr<furlang::ir::block> m_currentBlock;
|
||||
ir_register m_registerCounter = 0;
|
||||
|
||||
std::unordered_map<std::string_view, ir_register> m_variables;
|
||||
};
|
||||
|
||||
} // namespace front
|
||||
|
||||
Reference in New Issue
Block a user