From b812ef21ce228143b909128ff5ee8ba03043a5fe Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 15 Sep 2014 05:23:30 +1000 Subject: Clean up some TODOs and comments. --- TODO | 7 ------- src/LuaSL/LuaSL_compile.c | 12 ++---------- src/love/love.c | 2 +- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/TODO b/TODO index 47c0a67..6e4f21e 100644 --- a/TODO +++ b/TODO @@ -3,11 +3,6 @@ FIXES - LuaSL crashes ------------- -In 00b7923f-dcd9-4d13-b850-ce3298943663_script.lsl and lots of similar -scripts, functions refer to globals that are declared AFTER. This -causes LuaSL to segie at output time. This is apparently legal in LSL, -at least in OpenSim's version. At least it's legal in Lua to. - Hmmm, empty functions get no end, that's NOT legal in Lua. Project paths @@ -52,8 +47,6 @@ Irrlicht is flickering like crazy. Hmm, might be Irrlicht's fault, mostly it flickers to black, but I've seen it flicker to the first frame of the GL demo. On the other hand, it shows the Elm background usually. -LuaSL grew a couple of bugs when I upgraded to LuaJIT 2.0.1 package. - GL viewport aspect ratio should remain stable through resizes. diff --git a/src/LuaSL/LuaSL_compile.c b/src/LuaSL/LuaSL_compile.c index f1e7db1..13ebe1e 100644 --- a/src/LuaSL/LuaSL_compile.c +++ b/src/LuaSL/LuaSL_compile.c @@ -1,9 +1,6 @@ #include "LuaSL.h" -/* TODO - problem de jour -*/ - static void outputBitOp(FILE *file, outputMode mode, LSL_Leaf *leaf); static void outputBlockToken(FILE *file, outputMode mode, LSL_Leaf *content); @@ -433,8 +430,6 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, lType = left->basicType; if (OT_undeclared == lType) { -// compiler->script.warningCount++; -// sendBack(compiler->compiler->client, compiler->compiler->SID, "compilerWarning(%d,%d,Undeclared identifier issue, deferring this until the second pass)", lval->line, lval->column); lval->basicType = OT_undeclared; return lval; } @@ -461,8 +456,6 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, rType = right->basicType; if (OT_undeclared == rType) { -// compiler->script.warningCount++; -// sendBack(compiler->compiler->client, compiler->compiler->SID, "compilerWarning(%d,%d,Undeclared identifier issue, deferring this until the second pass)", lval->line, lval->column); lval->basicType = OT_undeclared; return lval; } @@ -865,8 +858,9 @@ LSL_Leaf *collectArguments(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *c if (comma) eina_inarray_push(&(call->params), comma); } + // Only stashing the pointer in the inarray, so that other pointers to the actual data are still valid. + // Specifically for variable declarations in the second pass. eina_inarray_push(&(call->params), &arg); - // At this point, pointers to arg are not pointing to the one in call->params, AND arg is no longer needed. } } } @@ -2390,7 +2384,6 @@ void compileLSL(LuaCompiler *compiler) if (lcompiler->undeclared) { lcompiler->pass++; -// PW("A second pass is needed to check functions or variables that where used before they where declared. To avoid this second pass, don't do that."); if (eina_clist_count(&(lcompiler->danglingVars))) { struct _LSL_DanglingVar *dangleVar = NULL; @@ -2429,7 +2422,6 @@ void compileLSL(LuaCompiler *compiler) // TODO - Should clean up these clists. secondPass(lcompiler, lcompiler->ast); -// PD("Second pass completed."); } if (lcompiler->compiler->doConstants) diff --git a/src/love/love.c b/src/love/love.c index e7b8e40..e90278a 100644 --- a/src/love/love.c +++ b/src/love/love.c @@ -270,7 +270,7 @@ static Eina_Bool _dataLuaSL(void *data, int type, Ecore_Con_Event_Server_Data *e } else if (0 == strcmp(command, "compiled(false)")) { - PE("The compile of %s failed!", SID); +// PE("The compile of %s failed!", SID); if (me) { struct timeval now; -- cgit v1.1