Adding support for windows and fixing some errors

This commit is contained in:
Ilusha 2024-01-15 16:35:16 -08:00 committed by Ilya Shurupov
parent 7660d58f26
commit 420bb37039
84 changed files with 168 additions and 255 deletions

View file

@ -7,7 +7,8 @@
namespace obj {
namespace BCgen {
struct ConstObject {
class ConstObject {
public:
obj::Object* mObj = NULL;
tp::alni mConstIdx = 0;
@ -16,7 +17,8 @@ namespace obj {
};
struct ConstObjectsPool {
class ConstObjectsPool {
public:
tp::Map<tp::String, ConstObject*> mMethods;
tp::Map<tp::String, ConstObject*> mStrings;
tp::Map<tp::alni, ConstObject*> mIntegers;
@ -36,6 +38,7 @@ namespace obj {
ConstObject* registerObject(obj::Object* obj);
void save(tp::Buffer<ConstData>& out);
ConstObjectsPool() = default;
~ConstObjectsPool();
};
};

View file

@ -18,7 +18,7 @@ namespace obj {
NONE,
NEW,
LOCAL,
CONST,
CONST_EXPR,
CHILD,
CALL,
ARIPHM,

View file

@ -10,16 +10,17 @@
namespace obj {
namespace BCgen {
struct ConstObject;
class ConstObject;
struct Instruction {
class Instruction {
public:
OpCode mOp = OpCode::NONE;
enum class ArgType : tp::ualni {
NO_ARG,
PARAM,
CONST,
CONST_ARG,
} mArgType = ArgType::NO_ARG;
enum class InstType : tp::ualni {