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.
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
Single-pass native code generation for x86-64 using dynasm. #276
Single-pass native code generation for x86-64 using dynasm. #276
Changes from 1 commit
9649219
f735471
af19f5c
bbb27be
ffc1bde
2fbb5e3
4ebb22f
a69c5b4
43df3dd
7df7204
8d8db4a
1526d35
bb52a4e
5583e96
93d2713
61c8350
aaabbf1
6f97ebd
63b3f41
7c43993
08a2ec8
693c9fd
e9c0325
09cbd4a
b2f5f77
dbebdf9
2432a6c
da1a3fa
80812e3
78fd995
b18595f
5302949
9d8c5a5
3c3c5db
d50f1cc
ec9a8f0
b7ca5e4
adb309f
64142c4
e026adf
aa75994
2962fe2
fa61b66
bd7698e
5a97a25
27b2061
8d2e877
12c2137
258dea6
4c4743e
3efccbe
25034ec
c6dfbcd
c5ef0a9
683cb20
c3b0bd7
1fc7b31
557be77
a5bab8c
68181ac
d4ded2c
179bbf9
e5d67c9
d80ea47
c76887d
592c3fb
4d2b6a0
1104073
1b5ea9b
53a8fca
81af8cf
1f8c644
f8fe999
d8d39c3
7394df2
08f4526
fcfde73
337b2eb
99faa79
6c40ea1
e2a3887
4ca27b6
e48ff02
c5694ec
662a649
e1cb4fc
caa239a
75678b5
b94c046
af8f307
cd5c145
b06a49e
eb606a6
af24cfc
2ab2205
ebaf2dc
61abe70
a006a36
14da8ab
4256ccb
7ee364a
fd60631
f0e8f22
82b2034
8b85099
295efbf
01f18b2
395161a
cb3846f
a4ee873
26e4278
08ba696
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary for these to be public outside of the crate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These fields need to be public to be accessed from the codegen backend. Otherwise we have to access these fields by offsets which is not clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ctx has been designed to be usable without falling back on rust. Can you use either offsets or implement it in assembly so that it doesn't need to call rust to do call_indirect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dynasm provides a quite good feature that computes offset of a struct field automatically by name. Even only for this reason, it's good to keep these fields public.
Also, I prefer to implement cold or large code paths in Rust to improve cleanness and make it less error-prone. Currently the only two functions implemented in assembly are
CONSTRUCT_STACK_AND_CALL_NATIVE
andCALL_WASM
which both does some low-level stuff that converts calling conventions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Context is exposed to the user of the runtime, so it's not ideal for these internal fields to be public. I'd be okay with making an
InternalVmCtx
struct that has these fields public, and then is part of theVmctx
struct.