clean up object module
This commit is contained in:
parent
e78885d452
commit
f8c82b7e29
68 changed files with 1223 additions and 1229 deletions
|
|
@ -2,52 +2,47 @@
|
|||
#pragma once
|
||||
|
||||
#include "interpreter/OperatoinCodes.hpp"
|
||||
|
||||
#include "core/Object.hpp"
|
||||
|
||||
#include "List.hpp"
|
||||
|
||||
namespace obj {
|
||||
namespace BCgen {
|
||||
namespace tp::obj {
|
||||
class ConstObject;
|
||||
|
||||
class ConstObject;
|
||||
class Instruction {
|
||||
public:
|
||||
|
||||
class Instruction {
|
||||
public:
|
||||
OpCode mOp = OpCode::NONE;
|
||||
|
||||
OpCode mOp = OpCode::NONE;
|
||||
enum class ArgType : ualni {
|
||||
NO_ARG,
|
||||
PARAM,
|
||||
CONST_ARG,
|
||||
} mArgType = ArgType::NO_ARG;
|
||||
|
||||
enum class ArgType : tp::ualni {
|
||||
NO_ARG,
|
||||
PARAM,
|
||||
CONST_ARG,
|
||||
} mArgType = ArgType::NO_ARG;
|
||||
enum class InstType : ualni {
|
||||
NONE,
|
||||
JUMP,
|
||||
JUMP_IF,
|
||||
JUMP_IF_NOT,
|
||||
EXEC,
|
||||
PURE_CONST,
|
||||
} mInstType = InstType::NONE;
|
||||
|
||||
enum class InstType : tp::ualni {
|
||||
NONE,
|
||||
JUMP,
|
||||
JUMP_IF,
|
||||
JUMP_IF_NOT,
|
||||
EXEC,
|
||||
PURE_CONST,
|
||||
} mInstType = InstType::NONE;
|
||||
alni mParam = 0;
|
||||
alni mParamBytes = 1;
|
||||
|
||||
tp::alni mParam = 0;
|
||||
tp::alni mParamBytes = 1;
|
||||
ConstObject* mConstData = nullptr;
|
||||
ConstObject* mConstData2 = nullptr;
|
||||
|
||||
ConstObject* mConstData = nullptr;
|
||||
ConstObject* mConstData2 = nullptr;
|
||||
alni mInstIdx = 0;
|
||||
Instruction* mInstTarget = nullptr;
|
||||
|
||||
tp::alni mInstIdx = 0;
|
||||
Instruction* mInstTarget = nullptr;
|
||||
|
||||
Instruction();
|
||||
Instruction(ConstObject* constData);
|
||||
Instruction(OpCode op);
|
||||
Instruction(OpCode op, ConstObject* constData);
|
||||
Instruction(OpCode op, ConstObject* constData, ConstObject* constData2);
|
||||
Instruction(OpCode op, tp::alni param, tp::alni nBytes);
|
||||
Instruction(Instruction* inst, InstType jump_type);
|
||||
};
|
||||
Instruction();
|
||||
Instruction(ConstObject* constData);
|
||||
Instruction(OpCode op);
|
||||
Instruction(OpCode op, ConstObject* constData);
|
||||
Instruction(OpCode op, ConstObject* constData, ConstObject* constData2);
|
||||
Instruction(OpCode op, alni param, alni nBytes);
|
||||
Instruction(Instruction* inst, InstType jump_type);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue