-
Notifications
You must be signed in to change notification settings - Fork 129
Bring project up to date with latest .NET and Python #237
base: master
Are you sure you want to change the base?
Conversation
@tonybaloney I have made this a draft PR for now. Once it's no longer a WIP and you would like someone to have a look just let us know. |
@brettcannon The frame eval hardcoded to the default implementation in the interpreter state. Am I correct in thinking the only way to change it to an external library is to modify the source and recompile CPython? interp->eval_frame = _PyEval_EvalFrameDefault; |
Yeah. We did that because we weren't sure what another library that set the frame eval function would do, so to minimize "this doesn't work with coverage.py" we hard-coded it. |
This change to CPython 3.8 broke the way that the PoC worked There are some new APIs instead _PyInterpreterState_SetEvalFrameFunc being one |
…ead of corrupting the IL. Create a settings map for the CEE class and enable some debug flags. Implement more of the ilgen methods to describe class methods and static methods.
…er class, fix some POP code
Added
There are two roadblocks I've hit
I can't progress any further, which seems a shame because I got it so far! @brettcannon if you could have a look at this and any ideas about those points. There are a few more opcodes left to go, but without solving the POP_BLOCK issue its very hard to reproduce them. |
@DinoV up for helping out? |
Raised issue on the runtime project dotnet/runtime#42925 |
… and remove virtual implementations of methods that no longer exist in the signature
…SETUP_EXCEPT that used to exist in the old codebase
@brettcannon the .NET team kindly helped reproduce issue (2) and gave a pointer as to the cause. That has now been fixed, so the JIT runs, compiles, unwinds and almost executes, but it fails with some assertions around the frame block positions. I'm convinced its the same issue as (1). Think this is pretty close to working now! |
Bypass the stack probe on Linux/macOS
…rame and cause an overflow exception
….9 doesn't come with the _testinternalcapi module and some of the tests fail. See https://bugs.python.org/issue40754
@brettcannon ready for review. test suite passing on all platforms now. |
@AndyAyersMS do you know much about the binary structure of the CIL? I've written a disassembler in Python so that you can printout the CIL instructions inside Python. For small functions it seems really simple and follows the ECMA specification, but for larger functions the binary data is totally different. I think it's either padded or in another format. I read about the Fat format, but can't find any good examples, I think the larger functions are that format. Line 527 in be8d595
Lines 9 to 92 in be8d595
|
This is CIL you're generating, or CIL we've created that you just want to parse? As you likely know the fat format is described in Ecma-335 II.25.4.3. If you prefer code, check out and the various decoder helper classes, eg |
Redirection of microsoft#237
Merged code will be redirected into tonybaloney#4 and live in this fork |
IExecutionEngine
/CExecutionEngine
shim classes as they're removed from .NET and no longer needed for initOpcodes to implement
Unsupported