FTLExitTimeObjectMaterialization.cpp [plain text]
#include "config.h"
#include "FTLExitTimeObjectMaterialization.h"
#if ENABLE(FTL_JIT)
#include "DFGGraph.h"
namespace JSC { namespace FTL {
using namespace JSC::DFG;
ExitTimeObjectMaterialization::ExitTimeObjectMaterialization(NodeType type, CodeOrigin codeOrigin)
: m_type(type)
, m_origin(codeOrigin)
{
}
ExitTimeObjectMaterialization::~ExitTimeObjectMaterialization()
{
}
void ExitTimeObjectMaterialization::add(
PromotedLocationDescriptor location, const ExitValue& value)
{
m_properties.append(ExitPropertyValue(location, value));
}
ExitValue ExitTimeObjectMaterialization::get(PromotedLocationDescriptor location) const
{
for (ExitPropertyValue value : m_properties) {
if (value.location() == location)
return value.value();
}
return ExitValue();
}
void ExitTimeObjectMaterialization::accountForLocalsOffset(int offset)
{
for (ExitPropertyValue& property : m_properties)
property = property.withLocalsOffset(offset);
}
void ExitTimeObjectMaterialization::dump(PrintStream& out) const
{
out.print(RawPointer(this), ":", Graph::opName(m_type), "(", listDump(m_properties), ")");
}
void ExitTimeObjectMaterialization::validateReferences(const TrackedReferences& trackedReferences) const
{
for (ExitPropertyValue value : m_properties)
value.validateReferences(trackedReferences);
}
} }
#endif // ENABLE(FTL_JIT)