extern env & ti
This commit is contained in:
parent
39f9060224
commit
f4ec365a3e
2
src/h.h
2
src/h.h
@ -408,7 +408,7 @@ typedef struct TypeInfo {
|
|||||||
bool isArr;
|
bool isArr;
|
||||||
bool arrD1; // is always an array with depth 1
|
bool arrD1; // is always an array with depth 1
|
||||||
} TypeInfo;
|
} TypeInfo;
|
||||||
TypeInfo ti[t_COUNT];
|
extern TypeInfo ti[t_COUNT];
|
||||||
#define TI(x) (ti[v(x)->type])
|
#define TI(x) (ti[v(x)->type])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,7 @@ FOR_PM1(F)
|
|||||||
#define F(N,X) B bi_##N;
|
#define F(N,X) B bi_##N;
|
||||||
FOR_PM2(F)
|
FOR_PM2(F)
|
||||||
#undef F
|
#undef F
|
||||||
|
TypeInfo ti[t_COUNT];
|
||||||
|
|
||||||
B rtPerf_wrap(B x); // consumes
|
B rtPerf_wrap(B x); // consumes
|
||||||
|
|
||||||
|
|||||||
4
src/vm.c
4
src/vm.c
@ -99,6 +99,10 @@ void printBC(i32* p) {
|
|||||||
B catchMessage;
|
B catchMessage;
|
||||||
u64 envPrevHeight;
|
u64 envPrevHeight;
|
||||||
|
|
||||||
|
Env* envCurr;
|
||||||
|
Env* envStart;
|
||||||
|
Env* envEnd;
|
||||||
|
|
||||||
B* gStack; // points to after end
|
B* gStack; // points to after end
|
||||||
B* gStackStart;
|
B* gStackStart;
|
||||||
B* gStackEnd;
|
B* gStackEnd;
|
||||||
|
|||||||
6
src/vm.h
6
src/vm.h
@ -63,9 +63,9 @@ B m_md2Block(Block* bl, Scope* psc);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Env* envCurr;
|
extern Env* envCurr;
|
||||||
Env* envStart;
|
extern Env* envStart;
|
||||||
Env* envEnd;
|
extern Env* envEnd;
|
||||||
|
|
||||||
static inline void pushEnv(Scope* sc, i32* bc) {
|
static inline void pushEnv(Scope* sc, i32* bc) {
|
||||||
if (envCurr==envEnd) thrM("Stack overflow");
|
if (envCurr==envEnd) thrM("Stack overflow");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user