Commit 5b5b02a
Capture the CPython function entrypoint on CinderX startup
Summary:
I'm experimenting with making the JIT do some compilation during
`jit::initialize()`. In order for that to function correctly, the function
entrypoint has to already be captured before the JIT starts updating any
function objects.
CinderX will now load `ast.parse()` and grab the entrypoint from there. This
function is chosen on a whim. The requirements we have from it are that it be
implemented in Python and it not cause too many other modules to be imported.
`ast` fills the bill as the CinderX package needs it anyway for the bytecode
compiler.
Reviewed By: DinoV
Differential Revision: D91380058
fbshipit-source-id: fcdfc145a6256051de10131850cafb228800e1cf1 parent adb8d9f commit 5b5b02a
1 file changed
Lines changed: 31 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
| 473 | + | |
| 474 | + | |
474 | 475 | | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
479 | 497 | | |
| 498 | + | |
| 499 | + | |
480 | 500 | | |
| 501 | + | |
| 502 | + | |
481 | 503 | | |
482 | 504 | | |
483 | 505 | | |
484 | 506 | | |
485 | 507 | | |
486 | | - | |
487 | | - | |
488 | 508 | | |
489 | 509 | | |
490 | 510 | | |
| |||
778 | 798 | | |
779 | 799 | | |
780 | 800 | | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | 801 | | |
785 | 802 | | |
786 | 803 | | |
| |||
1179 | 1196 | | |
1180 | 1197 | | |
1181 | 1198 | | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
1182 | 1203 | | |
1183 | 1204 | | |
1184 | 1205 | | |
| |||
0 commit comments