Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Bring project up to date with latest .NET and Python #237

Open
wants to merge 287 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
287 commits
Select commit Hold shift + click to select a range
c531455
Remove some more unreachable code
tonybaloney Sep 29, 2020
2e25c07
Undo some removed code.
tonybaloney Sep 29, 2020
df6676a
Update the list of opcodes and gracefully handle missing opcodes inst…
tonybaloney Sep 30, 2020
e5cbab6
Implement LOAD_METHOD
tonybaloney Sep 30, 2020
4fad593
Implement CALL_METHOD and IS_OP
tonybaloney Sep 30, 2020
30df372
Implement ROT_FOUR
tonybaloney Sep 30, 2020
f1b83d3
Update IS_OP
tonybaloney Sep 30, 2020
a41d20b
Update IS_OP
tonybaloney Sep 30, 2020
e200b9c
Allow JIT compile of REPL expressions
tonybaloney Sep 30, 2020
a2a72ab
Add more tracing and debug tools. Fix the JitConfig map in the compil…
tonybaloney Sep 30, 2020
ba70d19
Annotate some of the compiler warnings
tonybaloney Oct 1, 2020
17a05e7
Big cleanup of the ICorJitInfo implementation methods to use override…
tonybaloney Oct 1, 2020
4d25c8c
Updated more of the interface bindings
tonybaloney Oct 1, 2020
a532f55
Fixup some of the interface changes
tonybaloney Oct 1, 2020
0e11324
Implement freeMem, allocGCInfo and allocMem
tonybaloney Oct 1, 2020
ec4432b
Additional output during debug
tonybaloney Oct 1, 2020
d940e32
Windows support in progress
tonybaloney Oct 1, 2020
ebf8466
Merge branch 'master' of https://github.com/tonybaloney/pyjion
tonybaloney Oct 1, 2020
c490efd
Start WITH_EXCEPT_START implementation, guess it would be similar to …
tonybaloney Oct 1, 2020
0388f53
Windows C++20 compat
tonybaloney Oct 1, 2020
50c72c0
Merge branch 'master' of https://github.com/tonybaloney/pyjion
tonybaloney Oct 1, 2020
30d8423
Use a better string lookup type.
tonybaloney Oct 1, 2020
0b2f515
Big linting and code cleanup to try and squash bugs
tonybaloney Oct 1, 2020
0b6d5b0
Disable dumping for now because its broken
tonybaloney Oct 1, 2020
0e6a493
Fix a bug where logical opcodes would fall through to a failed compil…
tonybaloney Oct 1, 2020
92b3144
Cleanup the code model interfaces and remove more dead code
tonybaloney Oct 2, 2020
9aebfc2
Fix an issue on the memory allocator causing a crash of the JIT
tonybaloney Oct 2, 2020
55a554d
Return the memory location of the .NET CLR helper function to help th…
tonybaloney Oct 2, 2020
1a09ff1
Capture code address correctly.
tonybaloney Oct 2, 2020
c273931
Use the _VirtualAlloc API to allocate writable and executable memory.
tonybaloney Oct 2, 2020
e94c7b7
Use mmap for POSIX and VirtualAlloc for Windows. the CLR does provide…
tonybaloney Oct 2, 2020
479ec20
Fix the helper function and use the MAP_JIT memory mapper for OSX (if…
tonybaloney Oct 2, 2020
abeb8fd
Fix a bug in Jit_Helper trying to get a function result with a const …
tonybaloney Oct 2, 2020
bda56eb
Toggle out some verbose debugging
tonybaloney Oct 2, 2020
f030b48
Get the test suite running from cmake
tonybaloney Oct 2, 2020
c6f33f7
Add LIST_EXTEND and DICT_UPDATE pop/push logic and the logic for DICT…
tonybaloney Oct 2, 2020
97a13de
Implement SET_UPDATE opcode.
tonybaloney Oct 3, 2020
8b04abd
Implement LIST_TO_TUPLE opcode
tonybaloney Oct 3, 2020
5528108
Fully implement IS_OP and CONTAINS_OP. Make a list of new/changed opc…
tonybaloney Oct 3, 2020
f45fe6a
Update the todo list
tonybaloney Oct 3, 2020
a323a3e
Fix all the Catch2 tests to assert the correct stack position (the OP…
tonybaloney Oct 4, 2020
1e30cb4
Refactor the legacy tests into Catch
tonybaloney Oct 4, 2020
dac5d96
Add stack effect assertions to both stages.
tonybaloney Oct 5, 2020
73d3883
Fix the CONTAINS_OP opcode
tonybaloney Oct 5, 2020
c4c848c
Fix the sequence of objects in the stack for LIST_EXTEND
tonybaloney Oct 6, 2020
b1ee641
Improve robustness of PyJit_ExtendList
tonybaloney Oct 6, 2020
edeff93
Improve error handling in testing
tonybaloney Oct 7, 2020
c86958f
Work on append to list
tonybaloney Oct 7, 2020
7d060aa
rename github actions
tonybaloney Oct 7, 2020
0b90469
Start new method call implementation.
tonybaloney Oct 7, 2020
ee90b58
Add some assertions to catch the failing BUILD_CONST_KEY_MAP
tonybaloney Oct 7, 2020
8566350
Example const key map output
tonybaloney Oct 7, 2020
1e5b97e
Add a custom disassembler to help figure out the IL stack underflows
tonybaloney Oct 7, 2020
97c8777
Fix SET_UPDATE
tonybaloney Oct 7, 2020
617a3e1
Refactor the old tests into catch2.
tonybaloney Oct 7, 2020
dddd0d1
Merge branch 'masterup'
tonybaloney Oct 7, 2020
e126b99
Specific .NET version
tonybaloney Oct 7, 2020
9aa7250
Merge branch 'master' into udpates
tonybaloney Oct 7, 2020
2e4e648
Recursive checkout
tonybaloney Oct 7, 2020
b2669a4
Merge branch 'master' into udpates
tonybaloney Oct 7, 2020
83856c5
Use deadsnakes PPA for Linux
tonybaloney Oct 7, 2020
8e1b915
Fix the action YAML
tonybaloney Oct 7, 2020
451101c
Use the setup-python action
tonybaloney Oct 7, 2020
5c83ddf
Use setup-python for linux as well
tonybaloney Oct 7, 2020
6ace655
Adjust padding
tonybaloney Oct 7, 2020
196c2cb
Compile CoreCLR first (this needs to change!!!)
tonybaloney Oct 7, 2020
7cfe879
Update CLR requirements for Linux
tonybaloney Oct 7, 2020
df6bbdf
bypass cstrings for windows
tonybaloney Oct 8, 2020
1696c6d
Start hunting CEE stack underflow bugs
tonybaloney Oct 8, 2020
c67f9ff
Update build process
tonybaloney Oct 8, 2020
ca8d84c
Finally got to the bottom of a bug impacting 5 different opcodes and …
tonybaloney Oct 8, 2020
909f9f5
Fixes to the LIST_APPEND opcode. Remove defunct code
tonybaloney Oct 8, 2020
9a8187a
Implement the redesigned COMPARE_OP operator.
tonybaloney Oct 8, 2020
09fb517
Remove a lot of the optimization code that is causing havoc and makes…
tonybaloney Oct 8, 2020
243975b
Remove more optimization code. Add traces for jump positions and labe…
tonybaloney Oct 9, 2020
a645da4
Work through existing failed tests
tonybaloney Oct 9, 2020
03279ae
Updates to LOAD_METHOD and CALL_METHOD. CALL_METHOD still isn't quite…
tonybaloney Oct 9, 2020
6383429
Implement API for LOAD_METHOD and CALL_METHOD opcode pairing. The sta…
tonybaloney Oct 9, 2020
31a3b6c
tweaks for windows builds
tonybaloney Oct 9, 2020
0d66e55
Fixed a compilation issue
tonybaloney Oct 9, 2020
e5a7a06
Implement the rest of CALL_METHOD/LOAD_METHOD
tonybaloney Oct 9, 2020
d2b4718
Remove more optimization code and unlock inplace operations, unary op…
tonybaloney Oct 10, 2020
d76bb6e
Verify call methods and handle null method (valid path) from load_met…
tonybaloney Oct 10, 2020
2e10ef0
Implement bound methods and non-bound method calls.
tonybaloney Oct 11, 2020
740c960
Start to rebuild the const key value map opcode
tonybaloney Oct 11, 2020
5ea8a7c
Implement the rest of BUILD_CONST_KEY_MAP and get the test passing
tonybaloney Oct 11, 2020
b6e2f86
Fix more tests. Implement DICT_MERGE
tonybaloney Oct 11, 2020
ab54dbf
Simplify GET_ITER
tonybaloney Oct 12, 2020
96304c7
Remove more optimization code that causes unverified null references …
tonybaloney Oct 12, 2020
9a4d068
Fix a bug in UnpackSequenceEx trying to use the tuple len macro.
tonybaloney Oct 12, 2020
8cd099d
Move more of the debugging messages to DEBUG_TRACES only
tonybaloney Oct 12, 2020
007e252
Fix the POP_TOP stack bug and start migrating the CALL_METHOD to PEP5…
tonybaloney Oct 12, 2020
089439d
Implement PEP590 (vector call protocol) and removed lots of code for …
tonybaloney Oct 12, 2020
24ecac5
Remove legacy optcall/fastcall functions and fix CALL_FUNCTION(0)
tonybaloney Oct 13, 2020
049bbd7
Fix FOR_ITER stack underflow bug
tonybaloney Oct 13, 2020
409e3a7
Fix SETUP_FINALLY not pushing enough values onto the stack (new model…
tonybaloney Oct 13, 2020
c760161
Implement ROT_FOUR compilation. Simplify previous interpreter cycles.
tonybaloney Oct 13, 2020
e2532b4
Create reraise branch
tonybaloney Oct 13, 2020
ed981e4
Compare exceptions with emit_compare_exceptions_int for JUMP_IF_NOT_E…
tonybaloney Oct 13, 2020
38515f3
Implement the logic for JUMP_IF_NOT_EXC_MATCH.
tonybaloney Oct 13, 2020
670b024
Updates for Windows build process
tonybaloney Oct 13, 2020
21e6185
Update a test assertion to the correct type
tonybaloney Oct 13, 2020
f670c6e
Use a CMake glob to find the dotnet package so its no longer required…
tonybaloney Oct 13, 2020
1efc38d
Allow for DOTNET_PATH environment variable on build
tonybaloney Oct 13, 2020
31b68e3
Update build process for the SDK path on GitHub
tonybaloney Oct 13, 2020
6d6386a
Raise the struct def to keep the Linux C++ compiler happy
tonybaloney Oct 13, 2020
3b796dd
Restructure absint.h to meet STL requirements for incomplete definiti…
tonybaloney Oct 13, 2020
bff8a72
Use PIC for Linux
tonybaloney Oct 13, 2020
7abf0f9
Add PIC to library properties in Linux. Change Windows test target
tonybaloney Oct 13, 2020
af4501f
Cleanup dead code and better solidify SETUP_FINALLY.
tonybaloney Oct 14, 2020
eff0033
Start to split POP_BLOCK/POP_EXCEPT as they do totally different thin…
tonybaloney Oct 15, 2020
160ca64
More work on rewriting the exception handlers
tonybaloney Oct 15, 2020
db0495b
Fail tests if the JIT actually failed to run.
tonybaloney Oct 15, 2020
7ffeb91
Refactor exception handling into a separate class, with better assert…
tonybaloney Oct 16, 2020
d48c521
Refactor stacks out of the abstract interpreter
tonybaloney Oct 16, 2020
bad2941
Start to implement a method call (N).
tonybaloney Oct 16, 2020
be95694
Fixed a critical bug in the dict mapper which was causing importlib t…
tonybaloney Oct 17, 2020
f1adef6
Support SET_ADD(2) and MAP_ADD(2). Still problematic operations
tonybaloney Oct 17, 2020
1e36376
Implement stack reshuffle for SET_ADD, MAP_ADD, LIST_APPEND, DICT_MER…
tonybaloney Oct 17, 2020
e391013
Fix the POP_EXCEPT assertion on preprocess
tonybaloney Oct 17, 2020
cb995c1
Remove loads of old and defunct code. Cleanup unimplemented methods, …
tonybaloney Oct 18, 2020
52ec0cd
Remove more code and add tests for wrapper functions
tonybaloney Oct 18, 2020
2b90f47
More cleanup
tonybaloney Oct 18, 2020
62c48db
Deleting more dead code
tonybaloney Oct 19, 2020
96ef526
Add clang-tidy to the build
tonybaloney Oct 19, 2020
333a3a2
Implement basic vector/array emissions in the CIL instead of building…
tonybaloney Oct 22, 2020
01c81b5
Remove the dump and disasm module now that the JIT is correctly dumpi…
tonybaloney Oct 22, 2020
d318f3a
Fix some of the wrapper testing
tonybaloney Oct 22, 2020
f2a75fd
Add more debugging helpers
tonybaloney Oct 22, 2020
81767bf
Update clang-tidy script
tonybaloney Oct 22, 2020
e35a20a
Remove __unused flags
tonybaloney Oct 22, 2020
0189853
Fix the POP_EXCEPT logic.
tonybaloney Oct 23, 2020
23debff
Fixes for MSVC errors
tonybaloney Oct 23, 2020
337e33c
More cleanup and start to rebuild the exception handling to Python 3.…
tonybaloney Oct 23, 2020
5e83f6a
Merge remote-tracking branch 'origin/udpates' into udpates
tonybaloney Oct 23, 2020
37b9905
More work piecing the RERAISE operation back together
tonybaloney Oct 23, 2020
c16c963
Fix the preprocess in certain scenarios so that all the tests execute…
tonybaloney Oct 23, 2020
f9dc600
Fix MapAdd sequence order and fix the assertions on BINARY_MULT opera…
tonybaloney Oct 23, 2020
7d42972
Implement SETUP_ANNOTATIONS
tonybaloney Oct 23, 2020
cbc23ae
Remove setMethodAttribs output= on run
tonybaloney Oct 23, 2020
4e28069
Identify a memory crash on GC and re-enable GC/decref
tonybaloney Oct 24, 2020
6eb6446
Add DELETE_GLOBAL as supported opcode so that the frame doesn't get d…
tonybaloney Oct 24, 2020
bf84ab9
Work on squashing the double decref bug
tonybaloney Oct 24, 2020
f42bbaf
Found 2 bugs which were causing a crash/segfault/ Both double decref'…
tonybaloney Oct 24, 2020
d47289f
Clear values in builddictfromtuples.
tonybaloney Oct 24, 2020
68ea478
Cleanup header guards. Remove some dead MSVC++ code.
tonybaloney Oct 24, 2020
bcb6ff5
More work on reraise.
tonybaloney Oct 24, 2020
f666888
Fixes to Dockerfile
tonybaloney Oct 24, 2020
dfde0d7
Rewrote RETURN_VALUE to match the current 3.9 flow. Should be a fast-…
tonybaloney Oct 24, 2020
bac3596
Try and force PIC for linux. use a generic STL exception type to keep…
tonybaloney Oct 24, 2020
b67bbaf
More work on RERAISE branching.
tonybaloney Oct 24, 2020
3bf5cb7
Trying PIC again
tonybaloney Oct 24, 2020
a2502b2
Fix CMake variable names
tonybaloney Oct 25, 2020
1712323
Jump up to RC2 and build the release binaries for Windows because pyt…
tonybaloney Oct 25, 2020
0ea0dba
Require C++ 17
tonybaloney Oct 25, 2020
249c51e
Force C++17 flags
tonybaloney Oct 25, 2020
eed7986
Force C++17 flags in unit tests
tonybaloney Oct 25, 2020
ba4cc85
Try clang on nix
tonybaloney Oct 25, 2020
5a91321
SKip tests on Linux for now. just get it compiling
tonybaloney Oct 25, 2020
e1b5444
Update dockerfile for build release
tonybaloney Oct 25, 2020
7bd77c7
Start a package wrapper using scikit-build CMake support
tonybaloney Oct 25, 2020
d8e542f
Rename once
tonybaloney Oct 25, 2020
7cff92d
Rename twice
tonybaloney Oct 25, 2020
fc7f0fa
Force lower case project names
tonybaloney Oct 25, 2020
90e3707
Get the Python package working
tonybaloney Oct 25, 2020
b2e3b71
Update the testing process for Windows. Tweaks to the Dockerfile
tonybaloney Oct 25, 2020
5de01cd
Update the docs with newer instructions
tonybaloney Oct 25, 2020
ade4329
Create an explicit copy operator for both stack types. Fix a silly bu…
tonybaloney Oct 25, 2020
f696020
Further work on exception handlers. Recover prev and current exceptio…
tonybaloney Oct 26, 2020
da40f35
Get most basic exception case working
tonybaloney Oct 26, 2020
6bc531f
Attach IL to code objects and write a simple IL disassembler in Pytho…
tonybaloney Oct 27, 2020
0abcd12
Use bytearrays for the dump_il method and include the method tokens i…
tonybaloney Oct 27, 2020
a91cbab
Pad out the IL dump a bit better and keep an accurate PC
tonybaloney Oct 27, 2020
b5b77f6
Further simplify the exception handling and get single nesting implic…
tonybaloney Oct 28, 2020
0878fe7
Make exception handler labels more explicit. Still have an issue with…
tonybaloney Oct 28, 2020
b743e3f
Build tests for Windows as well
tonybaloney Oct 28, 2020
35528af
windows build process fixes
tonybaloney Oct 28, 2020
ea4be72
Merge branch 'udpates' of https://github.com/tonybaloney/pyjion into …
tonybaloney Oct 28, 2020
130f0dd
Add a smoke test step to Linux CI/CD.
tonybaloney Oct 28, 2020
f8a0ae6
Well that was a silly idea
tonybaloney Oct 28, 2020
c8d8361
Change the run location for smoke tests.
tonybaloney Oct 28, 2020
da767db
Output search path when loading module
tonybaloney Oct 28, 2020
c98085f
Simplify the exception classes
tonybaloney Oct 28, 2020
d3fbcc0
Fix the path scan strategy for the module import loading the .NET lib…
tonybaloney Oct 28, 2020
ffd5ac3
Relative paths.
tonybaloney Oct 28, 2020
2bfb362
Fix Windows path discovery for CLRJIT libraries and smoke test on CICD
tonybaloney Oct 28, 2020
ca00b60
Run smoke tests on mac too.
tonybaloney Oct 28, 2020
b0c083c
Keep track of exception variables on the stack, pop them off when bre…
tonybaloney Oct 29, 2020
e2c148d
Merge remote-tracking branch 'origin/udpates' into udpates
tonybaloney Oct 29, 2020
a13da4d
Cleanup raise and free code as its no longer used. Will tackle anothe…
tonybaloney Oct 29, 2020
fc1cfdc
Run the GC after every test so we can keep track of cause/effect with…
tonybaloney Oct 29, 2020
43e7b65
Fix a double decref and create a mechanism for better controlling lea…
tonybaloney Oct 29, 2020
cb815c6
Extended free on method call N
tonybaloney Oct 30, 2020
3036274
Optimized method calls
tonybaloney Oct 30, 2020
6dcb707
Fix the Decr logic and fix the stack effect of method-load-n
tonybaloney Oct 30, 2020
f7b551f
Update the windows build steps
tonybaloney Oct 30, 2020
7027ef6
build deps
tonybaloney Oct 30, 2020
dd735c6
Force ninja on windows
tonybaloney Oct 30, 2020
62379ef
Try and recover some of the raise/free logic
tonybaloney Oct 30, 2020
eecb6fa
Move all the exception handling tests into a separate module.
tonybaloney Oct 31, 2020
fbc4e7b
Inline the current handler and tidy up the unary not operator
tonybaloney Oct 31, 2020
2dba55b
Start rewriting the FOR_ITER logic. Now that CONTINUE_LOOP, SETUP_LOO…
tonybaloney Oct 31, 2020
70b5713
Continue rewriting the FOR_ITER logic, simplify block transition
tonybaloney Nov 1, 2020
eaaf851
Finish FOR_ITER rewrite
tonybaloney Nov 2, 2020
c0e5b2a
Delete the old iterator code.
tonybaloney Nov 2, 2020
cbe3cb2
Reorder some of the tests
tonybaloney Nov 2, 2020
0c53458
Add a native code dump and disassembler function using distorm3.
tonybaloney Nov 2, 2020
a5641d6
Clean up defunct code
tonybaloney Nov 3, 2020
5cedda4
Mark the exception tests as broken for now.
tonybaloney Nov 3, 2020
303bc42
Mark the exception tests as broken for now.
tonybaloney Nov 3, 2020
c6d705d
Run the tests in sequence
tonybaloney Nov 3, 2020
66a01f7
Update the test list. Wrap the PyTuple_New function with a logger to …
tonybaloney Nov 3, 2020
ecb524e
Add more tests to make sure that all inplace operators are being hit …
tonybaloney Nov 3, 2020
0bacf9f
Set single process thread on smoke tests.
tonybaloney Nov 3, 2020
3cc94e8
Add guard to IterNext
tonybaloney Nov 3, 2020
5f1c3bc
More tests for iterators
tonybaloney Nov 3, 2020
b314507
Implement dynamic loading of clrjit.dll for windows
tonybaloney Nov 3, 2020
208219a
Merge branch 'udpates' of https://github.com/tonybaloney/pyjion into …
tonybaloney Nov 3, 2020
815ae3d
Try a simpler discovery process for windows MSVC
tonybaloney Nov 3, 2020
4fe79ff
Specify MSVC 2017 (15.2)
tonybaloney Nov 3, 2020
6592655
The memory addresses of the cell vars are null values (allocated), bu…
tonybaloney Nov 4, 2020
638a45e
Reintroduce skip lasti update on special opcodes.
tonybaloney Nov 4, 2020
7fc5e69
Tests for nonlocal and global scopes
tonybaloney Nov 5, 2020
24a94a5
Run unit tests on Windows (probably wont work as the clrjit DLL isn't…
tonybaloney Nov 5, 2020
d530419
Try the forked scikit-build for 2019
tonybaloney Nov 5, 2020
a30c761
Use the VS2019 generator on the install as well
tonybaloney Nov 5, 2020
45da70c
Correct escape sequence for Windows shells
tonybaloney Nov 5, 2020
324f635
Correct escape sequence for Windows shells
tonybaloney Nov 5, 2020
b4a123a
Set a guard on the module loader if the CLRJIT isn't found/loaded on …
tonybaloney Nov 5, 2020
33fcbe2
Set a guard on the module loader if the CLRJIT isn't found/loaded on …
tonybaloney Nov 5, 2020
67d0eac
Change the test runners to enable frame evaluation through Pyjion whe…
tonybaloney Nov 5, 2020
bb10e93
Create a series of functions to fix PEEK(n) style opcodes, which need…
tonybaloney Nov 6, 2020
aff5686
Fixup type check for PyJit_BuildDictFromTuples
tonybaloney Nov 6, 2020
3d244ae
Add tests to call functions twice. Dump consts to see what the frames…
tonybaloney Nov 7, 2020
86c54a1
Dont decref the keys tuple on build as it seems to corrupt co_consts …
tonybaloney Nov 7, 2020
3c2ff23
Get CI to run the full test suite to see what happens
tonybaloney Nov 7, 2020
e17bfd7
Stage the clrjit.dll during build.
tonybaloney Nov 8, 2020
b3d461e
Merge branch 'udpates' of https://github.com/tonybaloney/pyjion into …
tonybaloney Nov 8, 2020
e4443bd
Try using heap allocators for windows
tonybaloney Nov 9, 2020
7f9be1f
Add simple helper function in assembly/masm for windows
tonybaloney Nov 10, 2020
e5e5a59
Use indirection for helper functions on Windows
tonybaloney Nov 10, 2020
e5632b9
Keep a pass/fail count.
tonybaloney Nov 10, 2020
0c57c85
Set the OS page size so that the EE doesnt' request a massive stack f…
tonybaloney Nov 11, 2020
d9e3f67
Run a subset of tests on Windows because the GitHub Actions CPython 3…
tonybaloney Nov 11, 2020
1049088
Merge remote-tracking branch 'origin/udpates' into udpates
tonybaloney Nov 11, 2020
60bc0a4
Remove unused interface methods
tonybaloney Nov 11, 2020
04d097b
Move to .NET 5 GA
tonybaloney Nov 11, 2020
30452d6
Merge branch 'udpates' of https://github.com/tonybaloney/pyjion into …
tonybaloney Nov 11, 2020
cf5d89f
Create a MANIFEST.in for smaller generated packages
tonybaloney Nov 11, 2020
be8d595
Pad page size to reduce probing
tonybaloney Nov 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pyjion/helpers.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.code
PAGE_SIZE equ 1000h
JIT_StackProbe PROC

; On entry:
Expand All @@ -11,11 +12,11 @@ JIT_StackProbe PROC
; NOTE: this helper will probe at least one page below the one pointed by rsp.

mov rax, rsp ; rax points to some byte on the last probed page
and rax, -1000h ; rax points to the **lowest address** on the last probed page
and rax, -PAGE_SIZE ; rax points to the **lowest address** on the last probed page
; This is done to make the following loop end condition simpler.

ProbeLoop:
sub rax, 1000h ; rax points to the lowest address of the **next page** to probe
sub rax, PAGE_SIZE ; rax points to the lowest address of the **next page** to probe
test dword ptr [rax], eax ; rax points to the lowest address on the **last probed** page
cmp rax, r11
jg ProbeLoop ; If (rax > r11), then we need to probe at least one more page.
Expand Down
1 change: 1 addition & 0 deletions pyjion/jitinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,7 @@ class CorJitInfo : public ICorJitInfo, public JittedCode {
memset(pEEInfoOut, 0, sizeof(CORINFO_EE_INFO));
pEEInfoOut->inlinedCallFrameInfo.size = 4;
#ifdef WINDOWS
pEEInfoOut->osPageSize = 1000; // Set to the windows default
tonybaloney marked this conversation as resolved.
Show resolved Hide resolved
pEEInfoOut->osType = CORINFO_WINNT;
#else
pEEInfoOut->osType = CORINFO_UNIX;
Expand Down