Skip to content

Commit

Permalink
JIT support for raise and deopt
Browse files Browse the repository at this point in the history
Summary:
For deopt this is mostly just updating frame reification to target `_PyInterpreterFrame` rather than `PyFrameObject`. For raising we need to adapt to 3.12 only using a single value to represent an exception rather than: value, type, and traceback.

The deopt tests also execute turning `_PyInterpreterFrame`s into `PyFrameObject`s to make use of the public interpreter API and this seems to work too.

Reviewed By: alexmalyshev

Differential Revision: D61318124

fbshipit-source-id: 11c44f1ec079dd5023eb363a572904d94a59cd01
  • Loading branch information
jbower-fb authored and facebook-github-bot committed Aug 21, 2024
1 parent f1ac5ba commit ade16bb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions Include/cinder/exports.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@ CiAPI_FUNC(PyObject *)
PyTypeObject *type, PyObject *self,
PyObject *name, int call_no_args,
int *meth_found);
CiAPI_FUNC(int)
Cix_do_raise(PyThreadState *tstate, PyObject *exc, PyObject *cause);
CiAPI_FUNC(void) Cix_format_exc_check_arg(PyThreadState *, PyObject *,
const char *, PyObject *);
CiAPI_FUNC(PyObject *)
Expand Down
5 changes: 0 additions & 5 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -6483,11 +6483,6 @@ Cix_SuperLookupMethodOrAttr(PyThreadState *tstate,
tstate, global_super, type, self, name, call_no_args, meth_found);
}

int
Cix_do_raise(PyThreadState *tstate, PyObject *exc, PyObject *cause) {
return do_raise(tstate, exc, cause);
}

int
Cix_eval_frame_handle_pending(PyThreadState *tstate) {
return eval_frame_handle_pending(tstate);
Expand Down

0 comments on commit ade16bb

Please sign in to comment.