-
Notifications
You must be signed in to change notification settings - Fork 19
jit-trace: name and remove builtin-inline blockers; x86 call/nursery results in the result register; w_class and __float__ exactness
#1414
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
base: main
Are you sure you want to change the base?
Changes from all commits
fea8510
e427fd9
10becc1
86431c8
05bf7ce
97b4e42
590060f
f8d932d
bb5874a
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 |
|---|---|---|
|
|
@@ -2213,6 +2213,10 @@ fn lower_unstructured_with_static_addrs_and_attrs( | |
| tail_forwarded_returns, | ||
| ) | ||
| .map_err(LowerError::Unsupported)?; | ||
| // Fold each raise site's `PyError` constructor into its | ||
| // materialisation call, so the transparent constructor — which has | ||
| // no host symbol and therefore no address — leaves this graph. | ||
| crate::front::result_exc::fuse_kind_ctor_raise(&mut lo.graph); | ||
|
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.
Remove this bespoke front-end fusion and express the opaque raise path in the interpreter source, or fix constructor lowering generically. This call makes the generated JIT recognize one exact AGENTS.md reference: AGENTS.md:L12-L15 Useful? React with 👍 / 👎.
Owner
Author
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. Taking this one seriously rather than waving it off, because one half of it is Accurate: Where I think the divergence claim does not hold: the helper is interpreter pub unsafe fn pyerror_type_error_to_exc_object(w_msg: *mut PyObject) -> *mut PyObject {
let msg = unsafe { w_str_get_wtf8(w_msg) }.to_owned();
PyError::type_error(msg).to_exc_object()
}There is no behaviour the generated JIT can observe here that the unfused pair On "formatted messages and other constructors silently bypass the fix": On "additional constructors": I measured this before writing the table rather On "fix constructor lowering generically" — this is the real point, and I So my honest summary: this is a mitigation with a measured ceiling (union — commented by Claude |
||
| if result_exc_ok_is_unit { | ||
| // Stamp `FUNC.RESULT = void`. The exception-link lowering | ||
| // already returns the unit `()` (the callee no longer | ||
|
|
||
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.
When an x86 dynasm trace uses a
CALL_ASSEMBLERresult as the predicate of a followingCOND_CALL_NorCOND_CALL_VALUE_*, this now leaves the value only inresult_loc. Both conditional-call emitters still ignore that predicate's regalloc location and callload_arg_to_rax, whoseresolve_oprefonly recognizes constants and frame slots; because the removed result spill also supplied the slot mapping, compiling this valid trace can now panic with “unmapped non-constant OpRef.” Pass the predicatearglocinto those emitters, or retain materialization until every legacy consumer uses regalloc locations.AGENTS.md reference: AGENTS.md:L184-L185
Useful? React with 👍 / 👎.