Skip to content

Commit

Permalink
Merge branch 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
bb010g committed Jan 13, 2025
2 parents 90411c7 + 847c04f commit 79a4638
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/.pre-commit-config.yaml
/deps/
/luaunit.lua
/.vscode/
/.vscode/*
!/.vscode/launch.json
/target/
Cargo.lock
Cargo.lock
29 changes: 29 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "lua-local",
"request": "launch",
"name": "Debug (LuaJIT): runtest.lua",
"program": {
"command": "luajit"
},
"verbose": true,
"args": [
"runtest.lua"
]
},
{
"type": "lua-local",
"request": "launch",
"name": "Debug (Luvit): runtest.lua",
"program": {
"command": "luvit"
},
"verbose": true,
"args": [
"runtest.lua"
]
}
]
}
29 changes: 21 additions & 8 deletions runtest.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
local jit_enabled = true
local lldebugger_enabled = os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1"
if lldebugger_enabled then
jit_enabled = false
end

if jit then
if jit_enabled then
jit.opt.start("maxtrace=10000")
jit.opt.start("maxmcode=4096")
jit.opt.start("recunroll=5")
jit.opt.start("loopunroll=60")
else
jit.off()
end
end

if lldebugger_enabled then
require("lldebugger").start(true)
end

--local endTime = os.time() + 3
--while os.time() < endTime do end

require "pretty-printer" -- has side-effect of loading global p()

if jit then
--jit.off()
jit.opt.start("maxtrace=10000")
jit.opt.start("maxmcode=4096")
jit.opt.start("recunroll=5")
jit.opt.start("loopunroll=60")
end

local startTime = os.clock()
local checkpointTime = startTime
local checkpointTime2 = startTime
Expand Down

0 comments on commit 79a4638

Please sign in to comment.