forked from allegory-software/allegory-sdk-luajit
-
Notifications
You must be signed in to change notification settings - Fork 0
V3.0 openresty #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Brugarolas
wants to merge
405
commits into
v3.0-simple
Choose a base branch
from
v3.0-openresty
base: v3.0-simple
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
V3.0 openresty #55
Conversation
This file contains hidden or 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
… in current stack upon trace exiting. thanks Mike Pall." This reverts commit aa8fc2e.
The Lua API can be used like below: local exdata = require "thread.exdata" exdata(0xdeadbeefLL) -- set the exdata of the current Lua thread local ptr = exdata() -- fetch the exdata of the current Lua thread The exdata value on the Lua land is represented as a cdata object of the ctype "void*". Right now the reading API, i.e., `exdata()` calls without any arguments, can be JIT compiled. Also exposed the following public C API functions for manipulating exdata on the C land: void lua_setexdata(lua_State *L, void *exdata); void *lua_getexdata(lua_State *L); The exdata pointer is initialized to NULL when the main thread is created. Any child Lua threads created will inherit the parent's exdata but still have their own exdata storage. So child Lua threads can always override the inherited parent exdata pointer values. This API is used internally by the OpenResty core so never ever mess with it yourself in the context of OpenResty. Thanks Zexuan Luo for preparing the final version of the patch. Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
…d LUAJIT_ENABLE_GC64 are both supplied. The !LJ_64 branch is unable to handle pointer address > 2G. There is not Valgrind error report when running the test cases under lua-nginx-module and lua-resty-core after this modification.
…ow for large Lua programs, leading to segfaults; enlarged them to 32-bit.
…d overflow for large Lua programs, leading to segfaults; enlarged them to 32-bit." This reverts commit 520d53a.
…ertion `nslots <= 250' failed" found by stressing our edgelang compiler.
This Lua API can be JIT compiled.
Returns true when the table contains non-nil array elements or non-nil
key-value pairs.
Usage:
```lua
local isempty = require "table.isempty"
print(isempty({})) -- true
print(isempty({nil, dog = nil})) -- true
print(isempty({"a", "b"})) -- false
print(isempty({nil, 3})) -- false
print(isempty({cat = 3})) -- false
```
Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
…eturns true for purely array-like Lua tables and false otherwise.
Empty Lua tables are treated as arrays.
Use it like this:
isarr = require "table.isarray"
print(isarr{"a", true, 3.14}) -- true
print(isarr{"dog" = 3}) -- false
print(isarr{}) -- true
Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
This Lua builtin returns the number of elements in a Lua table, i.e.,
the number of non-nil array elements plus the number of non-nil key-value
pairs in a single Lua table.
It can be used like this:
local nkeys = require "table.nkeys"
print(nkeys({})) -- 0
print(nkeys({ "a", nil, "b" })) -- 2
print(nkeys({ dog = 3, cat = 4, bird = nil })) -- 2
print(nkeys({ "a", dog = 3, cat = 4 })) -- 3
This Lua API can be JIT compiled.
Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
…a stack traversal code. thanks Thibault Charbonnier for the report in #40.
…se-after-free issues and memory corruptions. Fix #42.
doc: also mentioned our own bugfixes in LuaJIT's JIT compiler and VM. Fix #39.
The unsinking code was not using the correct layout for GC64 IR constants (value in adjacent slot) for this case. This patch is a derivative of raptorjit/raptorjit#246 ported for LuaJIT itself. Fixed after an intense debugging session with @lukego. Co-authored-by: Luke Gorrie <lukego@gmail.com>
…ua proto object as well.
This is a followup fix for commit 2d33927.
… patch. The test covering this bug was submitted to the openresty/luajit2-test-suite repo as commit ce2c916d55.
These instructions are useful to support Intel Control-flow Enforcement Technology (CET), when JIT code is called through idirect jump. See `man gcc` "-fcf-protection" and https://www.felixcloutier.com/x86/endbr64
Add support for ENDBR instructions
v2.1 Update
Support for UTF-8
Import OpenXRay changes
Better support for Android & iOS
Support for PSP Vita
Android Build SH's
Small steviegt6 patches
Specialize to the global environment
Update v3.0
…on and relevant code changes.
Imun/ffi sandwich
v2.1 update
Openresty v3.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.