diff options
author | David Walter Seikel | 2014-09-15 05:23:30 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-09-15 05:23:30 +1000 |
commit | b812ef21ce228143b909128ff5ee8ba03043a5fe (patch) | |
tree | fa260555946672f4ffd1e7c909444e538e936dd0 /src | |
parent | Shut up die spam. (diff) | |
download | SledjHamr-b812ef21ce228143b909128ff5ee8ba03043a5fe.zip SledjHamr-b812ef21ce228143b909128ff5ee8ba03043a5fe.tar.gz SledjHamr-b812ef21ce228143b909128ff5ee8ba03043a5fe.tar.bz2 SledjHamr-b812ef21ce228143b909128ff5ee8ba03043a5fe.tar.xz |
Clean up some TODOs and comments.
Diffstat (limited to 'src')
-rw-r--r-- | src/LuaSL/LuaSL_compile.c | 12 | ||||
-rw-r--r-- | src/love/love.c | 2 |
2 files changed, 3 insertions, 11 deletions
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 @@ | |||
1 | 1 | ||
2 | #include "LuaSL.h" | 2 | #include "LuaSL.h" |
3 | 3 | ||
4 | /* TODO - problem de jour | ||
5 | */ | ||
6 | |||
7 | 4 | ||
8 | static void outputBitOp(FILE *file, outputMode mode, LSL_Leaf *leaf); | 5 | static void outputBitOp(FILE *file, outputMode mode, LSL_Leaf *leaf); |
9 | static void outputBlockToken(FILE *file, outputMode mode, LSL_Leaf *content); | 6 | 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, | |||
433 | lType = left->basicType; | 430 | lType = left->basicType; |
434 | if (OT_undeclared == lType) | 431 | if (OT_undeclared == lType) |
435 | { | 432 | { |
436 | // compiler->script.warningCount++; | ||
437 | // sendBack(compiler->compiler->client, compiler->compiler->SID, "compilerWarning(%d,%d,Undeclared identifier issue, deferring this until the second pass)", lval->line, lval->column); | ||
438 | lval->basicType = OT_undeclared; | 433 | lval->basicType = OT_undeclared; |
439 | return lval; | 434 | return lval; |
440 | } | 435 | } |
@@ -461,8 +456,6 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, | |||
461 | rType = right->basicType; | 456 | rType = right->basicType; |
462 | if (OT_undeclared == rType) | 457 | if (OT_undeclared == rType) |
463 | { | 458 | { |
464 | // compiler->script.warningCount++; | ||
465 | // sendBack(compiler->compiler->client, compiler->compiler->SID, "compilerWarning(%d,%d,Undeclared identifier issue, deferring this until the second pass)", lval->line, lval->column); | ||
466 | lval->basicType = OT_undeclared; | 459 | lval->basicType = OT_undeclared; |
467 | return lval; | 460 | return lval; |
468 | } | 461 | } |
@@ -865,8 +858,9 @@ LSL_Leaf *collectArguments(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *c | |||
865 | if (comma) | 858 | if (comma) |
866 | eina_inarray_push(&(call->params), comma); | 859 | eina_inarray_push(&(call->params), comma); |
867 | } | 860 | } |
861 | // Only stashing the pointer in the inarray, so that other pointers to the actual data are still valid. | ||
862 | // Specifically for variable declarations in the second pass. | ||
868 | eina_inarray_push(&(call->params), &arg); | 863 | eina_inarray_push(&(call->params), &arg); |
869 | // At this point, pointers to arg are not pointing to the one in call->params, AND arg is no longer needed. | ||
870 | } | 864 | } |
871 | } | 865 | } |
872 | } | 866 | } |
@@ -2390,7 +2384,6 @@ void compileLSL(LuaCompiler *compiler) | |||
2390 | if (lcompiler->undeclared) | 2384 | if (lcompiler->undeclared) |
2391 | { | 2385 | { |
2392 | lcompiler->pass++; | 2386 | lcompiler->pass++; |
2393 | // 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."); | ||
2394 | if (eina_clist_count(&(lcompiler->danglingVars))) | 2387 | if (eina_clist_count(&(lcompiler->danglingVars))) |
2395 | { | 2388 | { |
2396 | struct _LSL_DanglingVar *dangleVar = NULL; | 2389 | struct _LSL_DanglingVar *dangleVar = NULL; |
@@ -2429,7 +2422,6 @@ void compileLSL(LuaCompiler *compiler) | |||
2429 | // TODO - Should clean up these clists. | 2422 | // TODO - Should clean up these clists. |
2430 | 2423 | ||
2431 | secondPass(lcompiler, lcompiler->ast); | 2424 | secondPass(lcompiler, lcompiler->ast); |
2432 | // PD("Second pass completed."); | ||
2433 | } | 2425 | } |
2434 | 2426 | ||
2435 | if (lcompiler->compiler->doConstants) | 2427 | 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 | |||
270 | } | 270 | } |
271 | else if (0 == strcmp(command, "compiled(false)")) | 271 | else if (0 == strcmp(command, "compiled(false)")) |
272 | { | 272 | { |
273 | PE("The compile of %s failed!", SID); | 273 | // PE("The compile of %s failed!", SID); |
274 | if (me) | 274 | if (me) |
275 | { | 275 | { |
276 | struct timeval now; | 276 | struct timeval now; |