Adding support for windows and fixing some errors
This commit is contained in:
parent
7660d58f26
commit
420bb37039
84 changed files with 168 additions and 255 deletions
|
|
@ -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();
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace obj {
|
|||
NONE,
|
||||
NEW,
|
||||
LOCAL,
|
||||
CONST,
|
||||
CONST_EXPR,
|
||||
CHILD,
|
||||
CALL,
|
||||
ARIPHM,
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue