l0n0lc 0.9.4__tar.gz → 0.9.6__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: l0n0lc
3
- Version: 0.9.4
3
+ Version: 0.9.6
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 19 00:58 .
239
- drwxrwxrwx 11 1000 1000 4096 Sep 19 00:58 ..
240
- -rw-r--r-- 1 root root 1811 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.cpp
241
- -rw-r--r-- 1 root root 167 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.h
242
- -rwxr-xr-x 1 root root 23584 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.so
243
- -rw-r--r-- 1 root root 1531 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.cpp
244
- -rw-r--r-- 1 root root 398 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.h
245
- -rwxr-xr-x 1 root root 40408 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.so
246
- -rw-r--r-- 1 root root 155 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.cpp
247
- -rw-r--r-- 1 root root 106 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.h
248
- -rwxr-xr-x 1 root root 15648 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.so
249
- -rw-r--r-- 1 root root 219 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.cpp
250
- -rw-r--r-- 1 root root 164 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.h
251
- -rwxr-xr-x 1 root root 15688 Sep 19 00:58 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
@@ -225,20 +225,20 @@ vv: 1
225
225
  ```bash
226
226
  ls -al ./l0n0lcoutput
227
227
  total 136
228
- drwxr-xr-x 2 root root 4096 Sep 19 00:58 .
229
- drwxrwxrwx 11 1000 1000 4096 Sep 19 00:58 ..
230
- -rw-r--r-- 1 root root 1811 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.cpp
231
- -rw-r--r-- 1 root root 167 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.h
232
- -rwxr-xr-x 1 root root 23584 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.so
233
- -rw-r--r-- 1 root root 1531 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.cpp
234
- -rw-r--r-- 1 root root 398 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.h
235
- -rwxr-xr-x 1 root root 40408 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.so
236
- -rw-r--r-- 1 root root 155 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.cpp
237
- -rw-r--r-- 1 root root 106 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.h
238
- -rwxr-xr-x 1 root root 15648 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.so
239
- -rw-r--r-- 1 root root 219 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.cpp
240
- -rw-r--r-- 1 root root 164 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.h
241
- -rwxr-xr-x 1 root root 15688 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.so
228
+ drwxr-xr-x 2 root root 4096 Sep 27 02:40 .
229
+ drwxrwxrwx 11 1000 1000 4096 Sep 27 02:40 ..
230
+ -rw-r--r-- 1 root root 1811 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.cpp
231
+ -rw-r--r-- 1 root root 167 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.h
232
+ -rwxr-xr-x 1 root root 23584 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.so
233
+ -rw-r--r-- 1 root root 1531 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.cpp
234
+ -rw-r--r-- 1 root root 398 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.h
235
+ -rwxr-xr-x 1 root root 40408 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.so
236
+ -rw-r--r-- 1 root root 155 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.cpp
237
+ -rw-r--r-- 1 root root 106 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.h
238
+ -rwxr-xr-x 1 root root 15648 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.so
239
+ -rw-r--r-- 1 root root 219 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.cpp
240
+ -rw-r--r-- 1 root root 164 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.h
241
+ -rwxr-xr-x 1 root root 15688 Sep 27 02:40 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.so
242
242
 
243
243
  ```
244
244
  ## 5. c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.cpp
@@ -103,7 +103,7 @@ class py2cpp编译器(ast.NodeVisitor):
103
103
  self.花括号 = 花括号(self)
104
104
  self.正在调用直接函数 = False
105
105
  self.正在构建参数 = False
106
- self.include目录 = set(['<cstdint>', '<string>'])
106
+ self.include列表 = set(['<cstdint>', '<string>'])
107
107
  self.链接库列表 = set()
108
108
  self.库目录 = set()
109
109
 
@@ -124,11 +124,10 @@ class py2cpp编译器(ast.NodeVisitor):
124
124
  # 读取依赖函数
125
125
  cpps = set([f'{通用信息.工作文件夹地址}/{self.获取cpp文件名()}'])
126
126
  for b in self.依赖函数:
127
- self.include目录.add(f'"{b.获取h文件名()}"')
127
+ self.include列表.add(f'"{b.获取h文件名()}"')
128
128
  cpps.add(f'{通用信息.工作文件夹地址}/{b.获取cpp文件名()}')
129
129
 
130
130
  self.将代码保存到文件()
131
- self.c编译器.include目录列表 = list(self.include目录)
132
131
  self.c编译器.库目录列表 = list(self.库目录)
133
132
  self.c编译器.链接库 = list(self.链接库列表)
134
133
  输出路径 = f'{通用信息.工作文件夹地址}/{self.获取库文件名()}'
@@ -316,7 +315,7 @@ class py2cpp编译器(ast.NodeVisitor):
316
315
  c类型 = 通用信息.类型映射表.get(fn)
317
316
  if c类型 is not None:
318
317
  for include目录 in c类型.include目录:
319
- self.include目录.add(include目录)
318
+ self.include列表.add(include目录)
320
319
  for 链接库 in c类型.库列表:
321
320
  self.链接库列表.add(链接库)
322
321
  for 库目录 in c类型.库目录:
@@ -335,7 +334,7 @@ class py2cpp编译器(ast.NodeVisitor):
335
334
  if 映射函数 is not None:
336
335
  参数列表 = [self.获取值(arg) for arg in node.args]
337
336
  for include目录 in 映射函数.include目录:
338
- self.include目录.add(include目录)
337
+ self.include列表.add(include目录)
339
338
  for 链接库 in 映射函数.库列表:
340
339
  self.链接库列表.add(链接库)
341
340
  for 库目录 in 映射函数.库目录:
@@ -378,9 +377,8 @@ class py2cpp编译器(ast.NodeVisitor):
378
377
  return c获取索引项目(对象, 切片)
379
378
 
380
379
  def visit_FunctionDef(self, node: ast.FunctionDef) -> Any:
381
- self.visit_核函数所有参数(node.args)
382
-
383
380
  with self.花括号:
381
+ self.visit_核函数所有参数(node.args)
384
382
  self.visit_核函数体(node.body)
385
383
 
386
384
  # 读取返回类型
@@ -532,11 +530,11 @@ class py2cpp编译器(ast.NodeVisitor):
532
530
  if isinstance(target, ast.Name):
533
531
  if isinstance(值, dict初始化列表):
534
532
  目标 = StdUnorderedMap(值, target.id, False)
535
- self.include目录.add('<unordered_map>')
533
+ self.include列表.add('<unordered_map>')
536
534
  elif isinstance(值, list初始化列表):
537
535
  目标 = StdList(值, target.id, False)
538
536
  if 值.类型 == cpp类型.ANY:
539
- self.include目录.add('<any>')
537
+ self.include列表.add('<any>')
540
538
  else:
541
539
  目标 = c变量('auto', target.id, False)
542
540
  self.添加c代码(目标.初始化(值, c强转类型))
@@ -579,7 +577,7 @@ class py2cpp编译器(ast.NodeVisitor):
579
577
  return f'extern "C" {self.返回类型} /*{self.函数名}*/ {self.c函数名} ({参数定义文本})'
580
578
 
581
579
  def 获取includes(self):
582
- include代码列表 = [f'#include {目录}' for 目录 in sorted(self.include目录)]
580
+ include代码列表 = [f'#include {目录}' for 目录 in sorted(self.include列表)]
583
581
  return '\n'.join(include代码列表)
584
582
 
585
583
  def 获取h代码(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: l0n0lc
3
- Version: 0.9.4
3
+ Version: 0.9.6
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 19 00:58 .
239
- drwxrwxrwx 11 1000 1000 4096 Sep 19 00:58 ..
240
- -rw-r--r-- 1 root root 1811 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.cpp
241
- -rw-r--r-- 1 root root 167 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.h
242
- -rwxr-xr-x 1 root root 23584 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_jit_all_ops_@7801528c3d61baf7.so
243
- -rw-r--r-- 1 root root 1531 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.cpp
244
- -rw-r--r-- 1 root root 398 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.h
245
- -rwxr-xr-x 1 root root 40408 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_add_@469de6acaaabc570.so
246
- -rw-r--r-- 1 root root 155 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.cpp
247
- -rw-r--r-- 1 root root 106 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.h
248
- -rwxr-xr-x 1 root root 15648 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test_other_fn_@75fdd928ab58a8e3.so
249
- -rw-r--r-- 1 root root 219 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.cpp
250
- -rw-r--r-- 1 root root 164 Sep 19 00:58 c31f68e99ed4ce3c_hello_world.py_test编译的函数_@3bf4501e0408a243.h
251
- -rwxr-xr-x 1 root root 15688 Sep 19 00:58 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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "l0n0lc"
3
- version = "0.9.4"
3
+ version = "0.9.6"
4
4
  description = "一个将python函数翻译为c++函数并运行的jit编译器"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
File without changes
File without changes
File without changes
File without changes
File without changes