Adding support for windows and fixing some errors

This commit is contained in:
Ilusha 2024-01-15 16:35:16 -08:00 committed by IlyaShurupov
parent 2722a25036
commit 34a8d4eafd
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 {

View file

@ -1,5 +1,5 @@
#pragma once
#include "NewPlacement.hpp"
#include "compiler/statement.h"
#include "compiler/expression.h"
@ -192,4 +192,4 @@ namespace obj {
BCgen::StatementScope* parseScope(bool aPushToScopeStack);
};
};
};