-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
GH-115802: JIT "small" code for Windows #115964
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
Changes from all commits
52bb3da
81fe5ed
36de1cd
74860c1
aa53fab
462095c
c28b7de
dfa925c
f7cc2fd
ee1a3bd
6b2428d
677fb6e
98dea1b
774b5bb
978ec78
ab5a9a0
7282eb5
6c0db0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2755,7 +2755,7 @@ dummy_func( | |
GOTO_ERROR(error); | ||
} | ||
DECREF_INPUTS(); | ||
res = _PyObject_CallNoArgsTstate(tstate, enter); | ||
res = PyObject_CallNoArgs(enter); | ||
brandtbucher marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Py_DECREF(enter); | ||
if (res == NULL) { | ||
Py_DECREF(exit); | ||
|
@@ -2790,7 +2790,7 @@ dummy_func( | |
GOTO_ERROR(error); | ||
} | ||
DECREF_INPUTS(); | ||
res = _PyObject_CallNoArgsTstate(tstate, enter); | ||
res = PyObject_CallNoArgs(enter); | ||
Py_DECREF(enter); | ||
if (res == NULL) { | ||
Py_DECREF(exit); | ||
|
@@ -3822,9 +3822,9 @@ dummy_func( | |
} | ||
|
||
inst(CONVERT_VALUE, (value -- result)) { | ||
convertion_func_ptr conv_fn; | ||
conversion_func conv_fn; | ||
assert(oparg >= FVC_STR && oparg <= FVC_ASCII); | ||
conv_fn = CONVERSION_FUNCTIONS[oparg]; | ||
conv_fn = _PyEval_ConversionFuncs[oparg]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way to do that where a fifth generic version isn't generated too? Otherwise, it doesn't help, so we might as well stay with this? |
||
result = conv_fn(value); | ||
Py_DECREF(value); | ||
ERROR_IF(result == NULL, error); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Rather than exposing all these symbols, could we put the function pointers in a struct, and pass that to the JIT as an argument?
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 issue isn't finding symbols when jitting the code (
jit.c
is linked into the main executable and can find everything just fine).The purpose of adding
PyAPI_FUNC(...)
andPyAPI_DATA(...)
to the declarations is so they are declared with__declspec(dllimport)
when compiling the templates. This makes Clang emit indirect memory accesses on Windows (similar to position-independent code on other platforms).