make nojit the default build

pull/81/head
Dibyendu Majumdar 9 years ago
parent ee3e07ceaa
commit 5e48e3dc3d

@ -10,7 +10,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
# By default LLVM JIT is ON, and GCC JIT is OFF
# Only one can be ON, and at last one of them must be ON
option(LLVM_JIT "Controls whether LLVM JIT compilation will be enabled" ON)
option(LLVM_JIT "Controls whether LLVM JIT compilation will be enabled" OFF)
option(GCC_JIT "Controls whether GCC JIT compilation will be enabled" OFF)
# We cannot link to both LLVM and GCC JIT
@ -39,6 +39,10 @@ if (GCC_JIT)
add_definitions(-DUSE_GCCJIT)
endif ()
if (NOT LLVM_JIT AND NOT GCC_JIT)
message(WARNING "Neither LLVM nor gccjit will be enabled; specify -DLLVM_JIT or -DGCC_JIT to enable")
endif()
if (MSVC)
set(CMAKE_C_FLAGS_DEBUG "/Od /D_DEBUG /MDd /Zi /RTC1 /EHsc")
set(CMAKE_C_FLAGS_RELEASE "/DNDEBUG /O2 /MD /EHsc")

@ -74,7 +74,7 @@ The array types (``number[]`` and ``integer[]``) are specializations of Lua tabl
* Array types are not compatible with declared table variables, i.e. following is not allowed::
local t: table = {}
local t2: number = t
local t2: number[] = t -- error!
* Indices >= 1 should be used (note that Ravi arrays (and slices) have a hidden slot at index 0 for performance reasons, but this is not visible under ``pairs()`` or ``ipairs()``, or when initializing an array using a literal initializer; only direct access via the ``[]`` operator can see this slot)
* Arrays must always be initialized::
@ -106,12 +106,12 @@ A declared table (as shown below) has some nuances::
* Array types are not compatible with declared table variables, i.e. following is not allowed::
local t: table = {}
local t2: number = t
local t2: number[] = t -- error!
* When short string literals are used to access a table element, specialized bytecodes are generated that are more efficiently JIT compiled::
local t: table = { name='dibyendu'}
print(t.name) -- The GETTABLE opcode is specialized in this cases
print(t.name) -- The GETTABLE opcode is specialized in this case
* As with array types, specialized bytecodes are generated when integer keys are used

Loading…
Cancel
Save