Skip to content

Commit

Permalink
make format
Browse files Browse the repository at this point in the history
  • Loading branch information
levBagryansky committed Oct 29, 2023
1 parent 878522f commit aee6fdd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bench/codeman-wrapper.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "ChaiVM/utils/chai-file.hpp"
#include "ChaiVM/interpreter/executor.hpp"
#include "ChaiVM/utils/chai-file.hpp"
#include "ChaiVM/utils/instr2Raw.hpp"

using namespace chai::interpreter;
Expand Down
3 changes: 2 additions & 1 deletion include/ChaiVM/utils/chai-file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class ChaiFile {
return rawInstrs_.size() - 1;
}

chai::interpreter::Immidiate addConst(std::unique_ptr<Constant> &&constant) {
chai::interpreter::Immidiate
addConst(std::unique_ptr<Constant> &&constant) {
pool_.push_back(std::move(constant));
return pool_.size() - 1;
}
Expand Down
10 changes: 7 additions & 3 deletions include/ChaiVM/utils/constant.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "ChaiVM/interpreter/instruction.hpp"
#include "ChaiVM/interpreter/code-manager.hpp"
#include "ChaiVM/interpreter/instruction.hpp"
#include "ChaiVM/types.hpp"

struct Constant {
Expand All @@ -21,7 +21,9 @@ struct ConstI64 : public Constant {
void write(std::ofstream &ofs) override {
ofs.write(reinterpret_cast<const char *>(&data_), sizeof(int64_t));
}
int8_t getType() override { return chai::interpreter::CodeManager::CNST_I64; }
int8_t getType() override {
return chai::interpreter::CodeManager::CNST_I64;
}
~ConstI64() override = default;
};

Expand All @@ -31,6 +33,8 @@ struct ConstF64 : public Constant {
void write(std::ofstream &ofs) override {
ofs.write(reinterpret_cast<const char *>(&data_), sizeof(double));
}
int8_t getType() override { return chai::interpreter::CodeManager::CNST_F64; }
int8_t getType() override {
return chai::interpreter::CodeManager::CNST_F64;
}
~ConstF64() override = default;
};
2 changes: 1 addition & 1 deletion test/ChaiVM/interpreter/code-manager-test.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <gtest/gtest.h>

#include "ChaiVM/interpreter/code-manager.hpp"
#include "ChaiVM/utils/instr2Raw.hpp"
#include "ChaiVM/utils/chai-file.hpp"
#include "ChaiVM/utils/instr2Raw.hpp"

using namespace chai::interpreter;
using namespace chai::utils;
Expand Down
2 changes: 1 addition & 1 deletion test/ChaiVM/interpreter/executor_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#include <gtest/gtest.h>

#include "ChaiVM/interpreter/executor.hpp"
#include "ChaiVM/utils/instr2Raw.hpp"
#include "ChaiVM/utils/chai-file.hpp"
#include "ChaiVM/utils/constant.hpp"
#include "ChaiVM/utils/instr2Raw.hpp"

using namespace chai::interpreter;
using namespace chai::utils;
Expand Down

0 comments on commit aee6fdd

Please sign in to comment.