-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #603 from pallene-lang/stack-trace-optimizations
Pallene Traceback Optimizations and Improvements
- Loading branch information
Showing
11 changed files
with
320 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-- Copyright (c) 2024, The Pallene Developers | ||
-- Pallene is licensed under the MIT license. | ||
-- Please refer to the LICENSE and AUTHORS files for details | ||
-- SPDX-License-Identifier: MIT | ||
|
||
local mod: module = {} | ||
|
||
function mod.call_anon_lua_fn(callback: () -> ()) | ||
callback() | ||
end | ||
|
||
return mod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- Copyright (c) 2024, The Pallene Developers | ||
-- Pallene is licensed under the MIT license. | ||
-- Please refer to the LICENSE and AUTHORS files for details | ||
-- SPDX-License-Identifier: MIT | ||
|
||
local anon = require "spec.traceback.anon_lua.anon_lua" | ||
|
||
local function wrapper() | ||
anon.call_anon_lua_fn(function() | ||
error "Error from an anonymous Lua fn!" | ||
end) | ||
end | ||
|
||
-- luacheck: globals pallene_tracer_debug_traceback | ||
xpcall(wrapper, pallene_tracer_debug_traceback) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-- Copyright (c) 2024, The Pallene Developers | ||
-- Pallene is licensed under the MIT license. | ||
-- Please refer to the LICENSE and AUTHORS files for details | ||
-- SPDX-License-Identifier: MIT | ||
|
||
local so = require "spec.traceback.stack_overflow.stack_overflow" | ||
|
||
-- luacheck: globals please_dont_overflow | ||
function please_dont_overflow() | ||
so.no_overflow(please_dont_overflow) | ||
end | ||
|
||
-- luacheck: globals wrapper | ||
function wrapper() | ||
please_dont_overflow() | ||
end | ||
|
||
-- luacheck: globals pallene_tracer_debug_traceback | ||
xpcall(wrapper, pallene_tracer_debug_traceback) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-- Copyright (c) 2024, The Pallene Developers | ||
-- Pallene is licensed under the MIT license. | ||
-- Please refer to the LICENSE and AUTHORS files for details | ||
-- SPDX-License-Identifier: MIT | ||
|
||
local mod: module = {} | ||
|
||
function mod.no_overflow(callback: () -> ()) | ||
callback() | ||
end | ||
|
||
return mod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.