Skip to content

Commit e8b26f5

Browse files
committed
Revert "LLVMCodeBuilder: Store variable pointer in LLVMVariablePtr"
This reverts commit b419577.
1 parent 3f4d19f commit e8b26f5

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/engine/internal/llvm/llvmcodebuilder.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,10 +1448,8 @@ CompilerValue *LLVMCodeBuilder::addVariableValue(Variable *variable)
14481448
auto ins = std::make_shared<LLVMInstruction>(LLVMInstruction::Type::ReadVariable, currentLoopScope(), m_loopCondition);
14491449
ins->workVariable = variable;
14501450

1451-
if (m_variablePtrs.find(variable) == m_variablePtrs.cend()) {
1451+
if (m_variablePtrs.find(variable) == m_variablePtrs.cend())
14521452
m_variablePtrs[variable] = LLVMVariablePtr();
1453-
m_variablePtrs[variable].var = variable;
1454-
}
14551453

14561454
auto ret = std::make_shared<LLVMRegister>(Compiler::StaticType::Unknown);
14571455
ret->isRawValue = false;
@@ -1733,10 +1731,8 @@ void LLVMCodeBuilder::createVariableWrite(Variable *variable, CompilerValue *val
17331731
ins.workVariable = variable;
17341732
createOp(ins, Compiler::StaticType::Void, Compiler::StaticType::Unknown, { value });
17351733

1736-
if (m_variablePtrs.find(variable) == m_variablePtrs.cend()) {
1734+
if (m_variablePtrs.find(variable) == m_variablePtrs.cend())
17371735
m_variablePtrs[variable] = LLVMVariablePtr();
1738-
m_variablePtrs[variable].var = variable;
1739-
}
17401736

17411737
if (m_loopScope >= 0) {
17421738
auto scope = m_loopScopes[m_loopScope];

src/engine/internal/llvm/llvmvariableptr.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class LLVMInstruction;
2020

2121
struct LLVMVariablePtr
2222
{
23-
Variable *var = nullptr;
2423
llvm::Value *stackPtr = nullptr;
2524
llvm::Value *heapPtr = nullptr;
2625
Compiler::StaticType type = Compiler::StaticType::Unknown;

0 commit comments

Comments
 (0)