mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 06:12:27 +00:00
Implement tree-shaking for Python sources
This commit is contained in:
parent
81287b7ec0
commit
44c87b83ff
110 changed files with 899 additions and 1922 deletions
13
third_party/python/Include/yoink.h
vendored
13
third_party/python/Include/yoink.h
vendored
|
@ -1,10 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_YOINK_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_YOINK_H_
|
||||
#include "libc/dce.h"
|
||||
|
||||
#define PYTHON_YOINK(s) \
|
||||
__asm__(".section .yoink\n\t" \
|
||||
"nopl\t\"py:" s "\"\n\t" \
|
||||
#define PYTHON_YOINK(s) \
|
||||
__asm__(".section .yoink\n\t" \
|
||||
"nopl\t\"pyc:" s "\"\n\t" \
|
||||
".previous")
|
||||
|
||||
#define PYTHON_PROVIDE(s) \
|
||||
__asm__(".section .yoink\n" \
|
||||
"\"pyc:" s "\":\n\t" \
|
||||
".globl\t\"pyc:" s "\"\n\t" \
|
||||
".previous")
|
||||
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_YOINK_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue