bytecode2 #2

Merged
andre merged 20 commits from bytecode2 into master 2026-04-28 19:50:48 -05:00
2 changed files with 0 additions and 14 deletions
Showing only changes of commit be4ee63453 - Show all commits

View File

@@ -10,7 +10,6 @@ namespace tyche {
struct BytecodePrototype { struct BytecodePrototype {
using ConstantValue = std::variant<int32_t, float, std::string>; using ConstantValue = std::variant<int32_t, float, std::string>;
using Value = std::variant<int32_t, float>;
struct Function { struct Function {
uint16_t n_pars; uint16_t n_pars;

View File

@@ -10,18 +10,6 @@
using namespace tyche; using namespace tyche;
static void print(std::vector<uint8_t> const& data)
{
for (size_t i = 0; i < data.size(); ++i) {
if (i % 16 == 0)
printf("%04X : ", i);
printf("%02X ", data.at(i));
if (i % 16 == 15)
printf("\n");
}
printf("\n");
}
TEST(ByteArray, ByteArray) TEST(ByteArray, ByteArray)
{ {
auto test = [](std::function<void(ByteArray&)> const& f, std::vector<uint8_t> const& expected) { auto test = [](std::function<void(ByteArray&)> const& f, std::vector<uint8_t> const& expected) {
@@ -125,7 +113,6 @@ TEST(Bytecode, Code)
}; };
ByteArray ba = Bytecode::generate(bp); ByteArray ba = Bytecode::generate(bp);
// print(ba.data()); print(expected);
ASSERT_EQ(ba.data(), expected); ASSERT_EQ(ba.data(), expected);
} }