This commit is contained in:
Jean-Philip Desjardins 2015-04-23 02:04:12 -04:00
parent d3044d3b75
commit aa23c31c88
2 changed files with 8 additions and 11 deletions

View File

@ -81,20 +81,20 @@ Jitter::CJitter::LABEL CMipsJitter::GetFinalBlockLabel()
void CMipsJitter::SetVariableAsConstant(size_t variableId, uint32 value)
{
VARIABLESTATUS status;
VARIABLESTATUS status;
status.operandType = Jitter::SYM_CONSTANT;
status.operandValue = value;
SetVariableStatus(variableId, status);
status.operandValue = value;
SetVariableStatus(variableId, status);
}
CMipsJitter::VARIABLESTATUS* CMipsJitter::GetVariableStatus(size_t variableId)
{
VariableStatusMap::iterator statusIterator(m_variableStatus.find(variableId));
return statusIterator == m_variableStatus.end() ? NULL : &statusIterator->second;
auto statusIterator(m_variableStatus.find(variableId));
return statusIterator == m_variableStatus.end() ? nullptr : &statusIterator->second;
}
void CMipsJitter::SetVariableStatus(size_t variableId, const VARIABLESTATUS& status)
{
assert(GetVariableStatus(variableId) == NULL);
m_variableStatus[variableId] = status;
assert(GetVariableStatus(variableId) == NULL);
m_variableStatus[variableId] = status;
}

View File

@ -1,5 +1,4 @@
#ifndef _MIPSJITTER_H_
#define _MIPSJITTER_H_
#pragma once
#include <map>
#include "Jitter.h"
@ -34,5 +33,3 @@ private:
VariableStatusMap m_variableStatus;
LABEL m_lastBlockLabel;
};
#endif