c
This commit is contained in:
@@ -11,7 +11,7 @@ import std.conv;
|
|||||||
import std.stdio;
|
import std.stdio;
|
||||||
struct VMVariable
|
struct VMVariable
|
||||||
{
|
{
|
||||||
sizediff_t index;
|
int index;
|
||||||
ValueType type;
|
ValueType type;
|
||||||
this(int index, ValueType type)
|
this(int index, ValueType type)
|
||||||
{
|
{
|
||||||
@@ -65,7 +65,7 @@ class VM
|
|||||||
currentSlot = slots[slot];
|
currentSlot = slots[slot];
|
||||||
this.slot = slot;
|
this.slot = slot;
|
||||||
}
|
}
|
||||||
void directSlot(int start, Code[] code, sizediff_t len, VMVariable[wstring] globalTable, Function[wstring] functions, DataTable gdt/*GNU Debugging Tools*/,
|
void directSlot(int start, Code[] code, int len, VMVariable[wstring] globalTable, Function[wstring] functions, DataTable gdt/*GNU Debugging Tools*/,
|
||||||
int[wstring] globalLabel, DebugInfo dinfo)
|
int[wstring] globalLabel, DebugInfo dinfo)
|
||||||
{
|
{
|
||||||
this.pc = start;
|
this.pc = start;
|
||||||
@@ -82,7 +82,7 @@ class VM
|
|||||||
c.global[v.index] = Value(v.type);
|
c.global[v.index] = Value(v.type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void loadSlot(int slot, Code[] code, sizediff_t len, VMVariable[wstring] globalTable, Function[wstring] functions, DataTable gdt/*GNU Debugging Tools*/,
|
void loadSlot(int slot, Code[] code, int len, VMVariable[wstring] globalTable, Function[wstring] functions, DataTable gdt/*GNU Debugging Tools*/,
|
||||||
int[wstring] globalLabel, DebugInfo dinfo)
|
int[wstring] globalLabel, DebugInfo dinfo)
|
||||||
{
|
{
|
||||||
auto s = this.slots[slot];
|
auto s = this.slots[slot];
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ class Compiler
|
|||||||
VMVariable[wstring] global;
|
VMVariable[wstring] global;
|
||||||
int[wstring] globalLabel;
|
int[wstring] globalLabel;
|
||||||
Function[wstring] functions;
|
Function[wstring] functions;
|
||||||
sizediff_t globalIndex = 0;
|
int globalIndex = 0;
|
||||||
void genCode(Code c)
|
void genCode(Code c)
|
||||||
{
|
{
|
||||||
code ~= c;
|
code ~= c;
|
||||||
@@ -1062,7 +1062,7 @@ class Compiler
|
|||||||
global = vm.currentSlot.globalTable;
|
global = vm.currentSlot.globalTable;
|
||||||
auto start = vm.currentSlot.code.length;
|
auto start = vm.currentSlot.code.length;
|
||||||
this.code = vm.currentSlot.code;
|
this.code = vm.currentSlot.code;
|
||||||
globalIndex = vm.currentSlot.global.length;
|
globalIndex = cast(int)vm.currentSlot.global.length;
|
||||||
functions = vm.currentSlot.functions;
|
functions = vm.currentSlot.functions;
|
||||||
compileProgram();
|
compileProgram();
|
||||||
vm.directSlot(start, code, globalIndex + 1, global, functions, globalScope.data, globalLabel, debugInfo);
|
vm.directSlot(start, code, globalIndex + 1, global, functions, globalScope.data, globalLabel, debugInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user