Lua: All usage of double converted to float (#4502)

* Lua: All usage of double converted to float. printf("%f") still uses promotion to double, (floating point va_args are always promoted to double)
Speed improvements:
 * reordering of rotable to put most used tables at the top
 * caching of last found global table
Use real pointer to rotable instead of misusing void* to pass integer value
Lua internal traces now turned on by TRACE_LUA_INTERNALS cmake option

* Replaced floating point division with multiplication (where possible), the hardware FPU is much faster at multiplication vs division.
stb_image: enabled STBI_NO_HDR and STBI_NO_LINEAR (removes code that we don't need)
This commit is contained in:
Damjan Adamic
2017-02-26 12:59:39 +01:00
committed by Bertrand Songis
parent 3b149a22d1
commit a1a58ad8f8
16 changed files with 129 additions and 107 deletions
+5
View File
@@ -38,6 +38,7 @@ option(SIMU_LUA_COMPILER "Pre-compile and save Lua scripts in simulator." ON)
option(FAS_PROTOTYPE "Support of old FAS prototypes (different resistors)" OFF)
option(TEMPLATES "Model templates menu" OFF)
option(TRACE_SIMPGMSPACE "Turn on traces in simpgmspace.cpp" ON)
option(TRACE_LUA_INTERNALS "Turn on traces for Lua internals" OFF)
# since we reset all default CMAKE compiler flags for firmware builds, provide an alternate way for user to specify additional flags.
set(FIRMWARE_C_FLAGS "" CACHE STRING "Additional flags for firmware target c compiler (note: all CMAKE_C_FLAGS[_*] are ignored for firmware/bootloader).")
@@ -320,6 +321,10 @@ if(TRACE_SIMPGMSPACE)
add_definitions(-DTRACE_SIMPGMSPACE)
endif()
if(TRACE_LUA_INTERNALS)
add_definitions(-DTRACE_LUA_INTERNALS_ENABLED)
endif()
if(EEPROM_VARIANT_NEEDED)
add_definitions(-DEEPROM_VARIANT=${EEPROM_VARIANT})
endif()