Skip to content
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

feat(ext/ffi): Implement FFI fast-call trampoline with Dynasmrt #15305

Merged
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
34 commits
Select commit Hold shift click to select a range
8be9d6e
Replace tinycc-based JIT trampoline with js recv-as-first-arg "pattern"
arnauorriols Jul 21, 2022
4ebd951
add assertFastCall in test_ffi to ensure fast-API-call optimization
arnauorriols Jul 22, 2022
9a0b543
Implement JIT compilation of FFI fast-call trampoline with Dynasmrt
arnauorriols Jul 25, 2022
fed0fd2
Comment on rationale behind integer/sse argument classification in ff…
arnauorriols Jul 25, 2022
5ede98d
Merge branch 'main' into refactor/ffi-trampoline-plain-asm
arnauorriols Jul 26, 2022
a4182fa
Apply nitpick suggestions
arnauorriols Jul 26, 2022
f1abc06
Implement 8 and 16 bit integer casting to 32 bit in arguments and ret…
arnauorriols Jul 28, 2022
c34f764
Update test_util/std submodule
arnauorriols Jul 28, 2022
eb7b529
Implement Aarch64-apple-darwin and win64
arnauorriols Aug 10, 2022
c1b4341
Correct spelling errors
arnauorriols Aug 16, 2022
b018240
Cleanup and extend documentation
arnauorriols Aug 16, 2022
144442b
Implement stack-allocation unit tests for sysv and aarch64. Pending w…
arnauorriols Aug 16, 2022
93f43dc
Add integer-casting test for win64
arnauorriols Aug 16, 2022
a0d5201
Merge branch 'main' into refactor/ffi-trampoline-plain-asm
arnauorriols Aug 17, 2022
9ddf3b4
Remove prelude.h file
arnauorriols Aug 19, 2022
d40515e
Encapsulate optimized testing in helper function
arnauorriols Aug 19, 2022
5d372a6
Merge branch 'main' into refactor/ffi-trampoline-plain-asm
arnauorriols Aug 19, 2022
618d471
Extract alignment expression into helper function
arnauorriols Aug 20, 2022
1b9c192
Add various debug assertions to ensure memory-related preconditions
arnauorriols Aug 21, 2022
b6976b4
optimize loading of ffi pointer in aarch64-apple
arnauorriols Aug 22, 2022
90b4fe2
Rename `Integer::TypedArray` => `Integer::Pointer`
arnauorriols Aug 22, 2022
7ecad49
Remove leftover commented code
arnauorriols Aug 23, 2022
924b2fb
Use `padding_to_align` to calculate padding of stack parameters in aa…
arnauorriols Aug 24, 2022
f323ddf
add small helper macros to improve density of assembly lines
arnauorriols Aug 24, 2022
9728da9
move helper macros
arnauorriols Aug 24, 2022
65863c9
Merge branch 'main' into refactor/ffi-trampoline-plain-asm
arnauorriols Aug 30, 2022
ba0047f
Merge branch 'main' into refactor/ffi-trampoline-plain-asm
ry Sep 5, 2022
73f05c7
fix
ry Sep 5, 2022
a4e8b9f
Workaround Aarch64Apple calling convention to match V8's incorrect one
arnauorriols Sep 6, 2022
1680832
Cleanup temporary TODO comments
arnauorriols Sep 7, 2022
3b9f726
Improve clarifying comment and apply explicitness suggestion
arnauorriols Sep 7, 2022
d900b2b
format
littledivy Sep 7, 2022
7edffb1
Merge branch 'main' into refactor/ffi-trampoline-plain-asm
littledivy Sep 7, 2022
4000c7b
Merge branch 'main' into refactor/ffi-trampoline-plain-asm
littledivy Sep 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 9,4 @@
[submodule "test_util/wpt"]
path = test_util/wpt
url = https://github.com/web-platform-tests/wpt.git
[submodule "ext/ffi/tinycc"]
path = ext/ffi/tinycc
url = https://github.com/TinyCC/tinycc

37 changes: 37 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ext/ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 16,7 @@ path = "lib.rs"
[dependencies]
deno_core = { version = "0.144.0", path = "../../core" }
dlopen = "0.1.8"
dynasmrt = "1.2.3"
libffi = "3.0.0"
serde = { version = "1.0.129", features = ["derive"] }
tokio = { version = "1.17", features = ["full"] }
Expand Down
70 changes: 0 additions & 70 deletions ext/ffi/build.rs

This file was deleted.

Loading