1
0

変数の使えないダイレクトモードを実装

This commit is contained in:
otya128
2016-02-22 22:23:36 +09:00
parent 0deea64fc4
commit 76aea0c4e6
4 changed files with 185 additions and 159 deletions

View File

@@ -163,6 +163,7 @@ class Function
}
class Compiler
{
bool isDirectMode;
ValueType getType(wstring name)
{
wchar s = name[name.length - 1];
@@ -1050,8 +1051,15 @@ class Compiler
genCode(new EndVM());
return code;
}
void compileDirectMode(VM vm)
{
isDirectMode = true;
compileProgram();
vm.directSlot(code, globalIndex + 1, global, functions, globalScope.data, globalLabel, debugInfo);
}
VM compile()
{
isDirectMode = false;
compileProgram();
VM vm = new VM();
vm.loadSlot(0, code, globalIndex + 1, global, functions, globalScope.data, globalLabel, debugInfo);