diff options
author | erwincoumans <erwin.coumans@gmail.com> | 2013-08-08 12:24:09 -0700 |
---|---|---|
committer | erwincoumans <erwin.coumans@gmail.com> | 2013-08-08 12:24:09 -0700 |
commit | 3bf003ace13c0f11d9d1b1195d042bb74960d33f (patch) | |
tree | 3038257ba032f459ee7aa8cf38ed480599d0e143 /build3/lcpp.lua | |
parent | 46a08e328284808e33c2a33e8c1be3808084f847 (diff) | |
download | bullet3-3bf003ace13c0f11d9d1b1195d042bb74960d33f.tar.gz |
change lcpp Lua preprocessor, to keep #defines and comments, remove empty lines
remove duplicate data in b3Contact4 (now in btContact4Data shared between CPU/C++ and OpenCL)
OpenCL kernels use #include "Bullet3Collision/NarrowPhaseCollision/shared/b3Contact4Data.h"
Increase number of batches back to 250 (from 50), need to fix this hard coded number (see https://github.com/erwincoumans/bullet3/issues/12)
Work towards GJK/EPA, in addition to SAT/clipping (early on)
Diffstat (limited to 'build3/lcpp.lua')
-rw-r--r-- | build3/lcpp.lua | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/build3/lcpp.lua b/build3/lcpp.lua index c42f52888..1c66e3699 100644 --- a/build3/lcpp.lua +++ b/build3/lcpp.lua @@ -98,7 +98,7 @@ lcpp.LCPP_LUA = false -- whether to use lcpp to preprocess Lua code (l lcpp.LCPP_FFI = true -- whether to use lcpp as LuaJIT ffi PreProcessor (if used in luaJIT) lcpp.LCPP_TEST = false -- whether to run lcpp unit tests when loading lcpp module lcpp.ENV = {} -- static predefines (env-like) -lcpp.FAST = false -- perf. tweaks when enabled. con: breaks minor stuff like __LINE__ macros +lcpp.FAST = true -- perf. tweaks when enabled. con: breaks minor stuff like __LINE__ macros lcpp.DEBUG = false -- PREDEFINES @@ -438,7 +438,7 @@ local function processLine(state, line) --[[ APPLY MACROS ]]-- - line = state:apply(line); + --line = state:apply(line); return line end @@ -470,7 +470,7 @@ local function processLine2(state, line) if elseif_ then state:elseBlock(state:parseExpr(elseif_)) end if else_ then state:elseBlock(true) end if endif then state:closeBlock() end - return -- remove structural directives + return line end end end @@ -520,7 +520,7 @@ local function processLine2(state, line) state:define(macroname, replacement) end - return + return line end -- ignore, because we dont have any pragma directives yet @@ -537,7 +537,7 @@ local function processLine2(state, line) --[[ APPLY MACROS ]]-- - line = state:apply(line); + --line = state:apply(line); return line end @@ -551,8 +551,11 @@ local function doWork(state) local input = state:getLine() if not input then break end local output = processLine(state, input) - if not lcpp.FAST and not output then output = "" end -- output empty skipped lines + if not lcpp.FAST and not output then + output = "" end -- output empty skipped lines + if lcpp.DEBUG then output = output.." -- "..input end -- input as comment when DEBUG + if output then coroutine.yield(output) end end if (oldIndent ~= state:getIndent()) then error("indentation level must be balanced within a file. was:"..oldIndent.." is:"..state:getIndent()) end |