Compiler: Fix label generation

This commit is contained in:
Simon Robertshaw 2013-02-14 09:40:15 +00:00
parent 4e1ea552f1
commit 224d646297
3 changed files with 2 additions and 3 deletions

View File

@ -46,7 +46,7 @@ class Tool;
class TPTScriptInterface; class TPTScriptInterface;
class LuaScriptInterface; class LuaScriptInterface;
typedef void (*NativeUpdateFunc)(int, int, int); typedef void (TPT_VM_CALLABLE *NativeUpdateFunc)(int, int, int);
class LuaScriptInterface: public CommandInterface class LuaScriptInterface: public CommandInterface
{ {
int luacon_mousex, luacon_mousey, luacon_mousebutton, luacon_brushx, luacon_brushy; int luacon_mousex, luacon_mousey, luacon_mousebutton, luacon_brushx, luacon_brushy;

View File

@ -305,7 +305,7 @@ namespace pim
std::stringstream label; std::stringstream label;
label << prefix; label << prefix;
label << "_"; label << "_";
label << labelCounter; label << labelCounter++;
label << "_"; label << "_";
return label.str(); return label.str();
} }

View File

@ -12,7 +12,6 @@ namespace pim
for(int i = 0; i < 8; i++) { emit("90"); } //nop, helps find the code in memory with a debugger for(int i = 0; i < 8; i++) { emit("90"); } //nop, helps find the code in memory with a debugger
//emit("BE"); //mov esi, machineStack //emit("BE"); //mov esi, machineStack
//emitConstantP((intptr_t)machineStack); //emitConstantP((intptr_t)machineStack);