l0n0lc 0.9.5__py3-none-any.whl → 0.9.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
l0n0lc/jit.py CHANGED
@@ -377,9 +377,8 @@ class py2cpp编译器(ast.NodeVisitor):
377
377
  return c获取索引项目(对象, 切片)
378
378
 
379
379
  def visit_FunctionDef(self, node: ast.FunctionDef) -> Any:
380
- self.visit_核函数所有参数(node.args)
381
-
382
380
  with self.花括号:
381
+ self.visit_核函数所有参数(node.args)
383
382
  self.visit_核函数体(node.body)
384
383
 
385
384
  # 读取返回类型
@@ -9,6 +9,7 @@ class cpp编译器:
9
9
  self.库目录列表 = []
10
10
  self.链接库 = []
11
11
  self.编译选项 = []
12
+ self.输出编译指令 = False
12
13
 
13
14
  def 设置编译器(self, 编译器地址: str):
14
15
  self.编译器 = 编译器地址
@@ -49,6 +50,8 @@ class cpp编译器:
49
50
  编译指令.append(文件路径)
50
51
  编译指令.append('-o')
51
52
  编译指令.append(输出路径)
53
+ if self.输出编译指令:
54
+ print(编译指令)
52
55
  subprocess.run(编译指令)
53
56
 
54
57
  def 编译为动态库(self, 文件路径: Union[List[str], str], 输出路径: str):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: l0n0lc
3
- Version: 0.9.5
3
+ Version: 0.9.7
4
4
  Summary: 一个将python函数翻译为c++函数并运行的jit编译器
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Requires-Python: >=3.10
@@ -235,20 +235,20 @@ vv: 1
235
235
  ```bash
236
236
  ls -al ./l0n0lcoutput
237
237
  total 136
238
- drwxr-xr-x 2 root root 4096 Sep 27 02:07 .
239
- drwxrwxrwx 11 1000 1000 4096 Sep 27 02:07 ..
240
- -rw-r--r-- 1 root root 1811 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.cpp
241
- -rw-r--r-- 1 root root 167 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.h
242
- -rwxr-xr-x 1 root root 23584 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.so
243
- -rw-r--r-- 1 root root 1531 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.cpp
244
- -rw-r--r-- 1 root root 398 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.h
245
- -rwxr-xr-x 1 root root 40408 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.so
246
- -rw-r--r-- 1 root root 155 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.cpp
247
- -rw-r--r-- 1 root root 106 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.h
248
- -rwxr-xr-x 1 root root 15648 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.so
249
- -rw-r--r-- 1 root root 219 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.cpp
250
- -rw-r--r-- 1 root root 164 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.h
251
- -rwxr-xr-x 1 root root 15688 Sep 27 02:07 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.so
238
+ drwxr-xr-x 2 root root 4096 Sep 27 02:40 .
239
+ drwxrwxrwx 11 1000 1000 4096 Sep 27 02:40 ..
240
+ -rw-r--r-- 1 root root 1811 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.cpp
241
+ -rw-r--r-- 1 root root 167 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.h
242
+ -rwxr-xr-x 1 root root 23584 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.so
243
+ -rw-r--r-- 1 root root 1531 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.cpp
244
+ -rw-r--r-- 1 root root 398 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.h
245
+ -rwxr-xr-x 1 root root 40408 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.so
246
+ -rw-r--r-- 1 root root 155 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.cpp
247
+ -rw-r--r-- 1 root root 106 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.h
248
+ -rwxr-xr-x 1 root root 15648 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.so
249
+ -rw-r--r-- 1 root root 219 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.cpp
250
+ -rw-r--r-- 1 root root 164 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.h
251
+ -rwxr-xr-x 1 root root 15688 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.so
252
252
 
253
253
  ```
254
254
  ## 5. c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.cpp
@@ -0,0 +1,12 @@
1
+ l0n0lc/StdList.py,sha256=0NTIpaRrNHaCiLrRbEVob21pZHa8S8rfaBRALPT-tD0,889
2
+ l0n0lc/StdMap.py,sha256=997LCvP0ewNciabbmGHVL2eUgMakHBsR3c5HQmOwC_E,666
3
+ l0n0lc/__init__.py,sha256=fUC6TMeN_fEL7HDazrBEdoWOQkXi5uSGZb7LZj6juog,137
4
+ l0n0lc/c基础处理.py,sha256=GrCPZpLsyfQD8XZQhOCb5y8v9NCZ6bU4C_xfJGx-pvQ,5723
5
+ l0n0lc/jit.py,sha256=8buPqo2bKCcP9jFKX-mtKhlophPnKzW_U-hiskrcGzk,25949
6
+ l0n0lc/编译.py,sha256=A9FUV95cVD7Fz7vlKhbqE9CsjpixpdqWQxq1h8e4DBw,2262
7
+ l0n0lc/通用.py,sha256=RkqP9cMhKhl2h4YxOpAWFFftIPXLZTYMyOOD1PuB59M,4630
8
+ l0n0lc-0.9.7.dist-info/licenses/LICENSE,sha256=1L-MAjulZ3kpbYwsJtlXpDVITRxykna2Ecg_521YfkA,1093
9
+ l0n0lc-0.9.7.dist-info/METADATA,sha256=Wg5xIimdAbO32rfSeibpFFecLDPSRUhmux7RCCb_zj0,10994
10
+ l0n0lc-0.9.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ l0n0lc-0.9.7.dist-info/top_level.txt,sha256=Q21D_eEY_-xgRUPwATGp9YDKSBO4w_7MI2MYxQI1aT4,7
12
+ l0n0lc-0.9.7.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- l0n0lc/StdList.py,sha256=0NTIpaRrNHaCiLrRbEVob21pZHa8S8rfaBRALPT-tD0,889
2
- l0n0lc/StdMap.py,sha256=997LCvP0ewNciabbmGHVL2eUgMakHBsR3c5HQmOwC_E,666
3
- l0n0lc/__init__.py,sha256=fUC6TMeN_fEL7HDazrBEdoWOQkXi5uSGZb7LZj6juog,137
4
- l0n0lc/c基础处理.py,sha256=GrCPZpLsyfQD8XZQhOCb5y8v9NCZ6bU4C_xfJGx-pvQ,5723
5
- l0n0lc/jit.py,sha256=eYgc3XHSisZO4FUdyP3kXfJZRXdgaF0HVZut_ncm7_4,25946
6
- l0n0lc/编译.py,sha256=Ty4gPDHAB1jn8LgnE4w3R06bOAEeYr8iwqahYf6QeHI,2154
7
- l0n0lc/通用.py,sha256=RkqP9cMhKhl2h4YxOpAWFFftIPXLZTYMyOOD1PuB59M,4630
8
- l0n0lc-0.9.5.dist-info/licenses/LICENSE,sha256=1L-MAjulZ3kpbYwsJtlXpDVITRxykna2Ecg_521YfkA,1093
9
- l0n0lc-0.9.5.dist-info/METADATA,sha256=oavi7kZlYONyd1qEiGCSn08XgCQz4H5b8G_GxQQKsfg,10994
10
- l0n0lc-0.9.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- l0n0lc-0.9.5.dist-info/top_level.txt,sha256=Q21D_eEY_-xgRUPwATGp9YDKSBO4w_7MI2MYxQI1aT4,7
12
- l0n0lc-0.9.5.dist-info/RECORD,,
File without changes