#include "node.h" #include "data.h" #include using namespace FlowGraph; // 4 byte for now Data FlowGraph::MakeConstantInt(int i) { std::vector value(size_t(4), uint8_t(0)); *(reinterpret_cast(value.data())) = boost::endian::native_to_little(static_cast(i)); return Data(DataType::Int, std::make_shared(value)); } Data FlowGraph::MakeLocalPointer(const std::string& name) { return Data(DataType::Pointer, std::make_shared(name)); } Data FlowGraph::MakeLocalSize(const std::string& name) { return Data(DataType::Size, std::make_shared(name)); } Data FlowGraph::MakeTemporaryInt(FlowGraph::LocalScope& scope) { return Data(DataType::Int, std::make_shared(scope)); }