jaclang 0.7.32__py3-none-any.whl → 0.7.33__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.
Potentially problematic release.
This version of jaclang might be problematic. Click here for more details.
- jaclang/__init__.py +2 -9
- jaclang/compiler/passes/main/pyast_gen_pass.py +9 -1
- jaclang/runtimelib/context.py +1 -8
- {jaclang-0.7.32.dist-info → jaclang-0.7.33.dist-info}/METADATA +1 -1
- {jaclang-0.7.32.dist-info → jaclang-0.7.33.dist-info}/RECORD +7 -7
- {jaclang-0.7.32.dist-info → jaclang-0.7.33.dist-info}/WHEEL +0 -0
- {jaclang-0.7.32.dist-info → jaclang-0.7.33.dist-info}/entry_points.txt +0 -0
jaclang/__init__.py
CHANGED
|
@@ -416,13 +416,6 @@ def field(
|
|
|
416
416
|
jac_test = Jac.create_test
|
|
417
417
|
static = ClassVar
|
|
418
418
|
|
|
419
|
-
root = cast(Root, Jac.get_root())
|
|
420
419
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
def _update_root() -> None:
|
|
424
|
-
global root
|
|
425
|
-
root = cast(Root, ExecutionContext.get_root())
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
ExecutionContext.on_ctx_change.append(lambda ctx: _update_root())
|
|
420
|
+
def root() -> Root:
|
|
421
|
+
return cast(Root, ExecutionContext.get_root())
|
|
@@ -2937,7 +2937,15 @@ class PyastGenPass(Pass):
|
|
|
2937
2937
|
)
|
|
2938
2938
|
]
|
|
2939
2939
|
elif node.name == Tok.KW_ROOT:
|
|
2940
|
-
node.gen.py_ast = [
|
|
2940
|
+
node.gen.py_ast = [
|
|
2941
|
+
self.sync(
|
|
2942
|
+
ast3.Call(
|
|
2943
|
+
func=self.jaclib_obj("root"),
|
|
2944
|
+
args=[],
|
|
2945
|
+
keywords=[],
|
|
2946
|
+
)
|
|
2947
|
+
)
|
|
2948
|
+
]
|
|
2941
2949
|
|
|
2942
2950
|
else:
|
|
2943
2951
|
node.gen.py_ast = [
|
jaclang/runtimelib/context.py
CHANGED
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import unittest
|
|
6
6
|
from contextvars import ContextVar
|
|
7
7
|
from dataclasses import MISSING
|
|
8
|
-
from typing import Any, Callable,
|
|
8
|
+
from typing import Any, Callable, Optional, cast
|
|
9
9
|
from uuid import UUID
|
|
10
10
|
|
|
11
11
|
from .architype import NodeAnchor, Root
|
|
@@ -26,9 +26,6 @@ class ExecutionContext:
|
|
|
26
26
|
root: NodeAnchor
|
|
27
27
|
entry_node: NodeAnchor
|
|
28
28
|
|
|
29
|
-
# A context change event subscription list, those who want to listen ctx change will register here.
|
|
30
|
-
on_ctx_change: ClassVar[list[Callable[[ExecutionContext | None], None]]] = []
|
|
31
|
-
|
|
32
29
|
def init_anchor(
|
|
33
30
|
self,
|
|
34
31
|
anchor_id: str | None,
|
|
@@ -49,8 +46,6 @@ class ExecutionContext:
|
|
|
49
46
|
"""Close current ExecutionContext."""
|
|
50
47
|
self.mem.close()
|
|
51
48
|
EXECUTION_CONTEXT.set(None)
|
|
52
|
-
for func in ExecutionContext.on_ctx_change:
|
|
53
|
-
func(EXECUTION_CONTEXT.get(None))
|
|
54
49
|
|
|
55
50
|
@staticmethod
|
|
56
51
|
def create(
|
|
@@ -80,8 +75,6 @@ class ExecutionContext:
|
|
|
80
75
|
old_ctx.close()
|
|
81
76
|
|
|
82
77
|
EXECUTION_CONTEXT.set(ctx)
|
|
83
|
-
for func in ExecutionContext.on_ctx_change:
|
|
84
|
-
func(EXECUTION_CONTEXT.get(None))
|
|
85
78
|
|
|
86
79
|
return ctx
|
|
87
80
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: jaclang
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.33
|
|
4
4
|
Summary: Jac is a unique and powerful programming language that runs on top of Python, offering an unprecedented level of intelligence and intuitive understanding.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: jac,jaclang,jaseci,python,programming-language,machine-learning,artificial-intelligence
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
jaclang/__init__.py,sha256=
|
|
1
|
+
jaclang/__init__.py,sha256=Pvw9Tyx_ypvbmWu05c-BEsIcyhX---8r5wkZLLs4SC0,12919
|
|
2
2
|
jaclang/cli/.gitignore,sha256=NYuons2lzuCpCdefMnztZxeSMgtPVJF6R6zSgVDOV20,27
|
|
3
3
|
jaclang/cli/__init__.py,sha256=7aaPgYddIAHBvkdv36ngbfwsimMnfGaTDcaHYMg_vf4,23
|
|
4
4
|
jaclang/cli/cli.md,sha256=4BPJGdcyvs_rXgd_DPEGjkKSGe5ureXXYaQsf-_z_LU,5939
|
|
@@ -22,7 +22,7 @@ jaclang/compiler/passes/main/fuse_typeinfo_pass.py,sha256=bjxeE_90AFy9jN9VomOsoy
|
|
|
22
22
|
jaclang/compiler/passes/main/import_pass.py,sha256=ouOuVzA_wloNG_t3Ec9gTEu6JuPZtwXiL6Kgtoan6gc,23090
|
|
23
23
|
jaclang/compiler/passes/main/inheritance_pass.py,sha256=IDzfMSezJmNdBwN_dwguu1qYL8YzwBuNPFrk6HEkTco,5586
|
|
24
24
|
jaclang/compiler/passes/main/py_collect_dep_pass.py,sha256=TE4h6HLYRE5YdHZK9gtbPPaBJBLOg0g0xSlT_oPzwzY,2874
|
|
25
|
-
jaclang/compiler/passes/main/pyast_gen_pass.py,sha256=
|
|
25
|
+
jaclang/compiler/passes/main/pyast_gen_pass.py,sha256=kHH-arzVWiAYbRXxd2Cd1FViCRwBMV6Cc2yy0QjFMQo,133269
|
|
26
26
|
jaclang/compiler/passes/main/pyast_load_pass.py,sha256=VmlR1j0iY60nFF9DrWVwWrvpUDZpXamkfoyF7miqysA,94697
|
|
27
27
|
jaclang/compiler/passes/main/pybc_gen_pass.py,sha256=CjA9AqyMO3Pv_b5Hh0YI6JmCqIru2ASonO6rhrkau-M,1336
|
|
28
28
|
jaclang/compiler/passes/main/pyjac_ast_link_pass.py,sha256=snbqUIPtPcD9ZKsItOlKGVnujoMGFwF8XNP0GvxS9AI,8628
|
|
@@ -188,7 +188,7 @@ jaclang/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
188
188
|
jaclang/runtimelib/__init__.py,sha256=jDDYBCV82qPhmcDVk3NIvHbhng0ebSrXD3xrojg0-eo,34
|
|
189
189
|
jaclang/runtimelib/architype.py,sha256=rcxXe34Vtoz-tNQPqPHmmnh2-G_iJJCjfdXDO5k9kQc,8474
|
|
190
190
|
jaclang/runtimelib/constructs.py,sha256=1ARnsPrDi1UvyaFRhGRhO0kj0fnIZ2HbHF7O3itB-ZQ,796
|
|
191
|
-
jaclang/runtimelib/context.py,sha256=
|
|
191
|
+
jaclang/runtimelib/context.py,sha256=rO-eqBcT4tVWPcraa17IKyMkyY8NDk6cvPBQVK-0Sdg,5910
|
|
192
192
|
jaclang/runtimelib/importer.py,sha256=A2YIoPTPaRYvIrj3JZL7bDOyxFpU25Ld-V_fWQMsTbE,15650
|
|
193
193
|
jaclang/runtimelib/machine.py,sha256=JvJiuh_QSFmqHIwWsOXb1pRPdAmM7sadUzWkNpb6jJc,11571
|
|
194
194
|
jaclang/runtimelib/memory.py,sha256=LrVTo6Cac0q-YG1wug-Fgc8O2Tue9zRHnxSulDw3ZQ4,5656
|
|
@@ -1556,7 +1556,7 @@ jaclang/vendor/typing_extensions-4.12.2.dist-info/METADATA,sha256=BeUQIa8cnYbrjW
|
|
|
1556
1556
|
jaclang/vendor/typing_extensions-4.12.2.dist-info/RECORD,sha256=XS4fBVrPI7kaNZ56Ggl2RGa76jySWLqTzcrUpZIQTVM,418
|
|
1557
1557
|
jaclang/vendor/typing_extensions-4.12.2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
|
1558
1558
|
jaclang/vendor/typing_extensions.py,sha256=gwekpyG9DVG3lxWKX4ni8u7nk3We5slG98mA9F3DJQw,134451
|
|
1559
|
-
jaclang-0.7.
|
|
1560
|
-
jaclang-0.7.
|
|
1561
|
-
jaclang-0.7.
|
|
1562
|
-
jaclang-0.7.
|
|
1559
|
+
jaclang-0.7.33.dist-info/METADATA,sha256=jCYDLfLsV-h7wxSDRbtxT-zdQMJ1d6cZVJnpWgROpUg,4977
|
|
1560
|
+
jaclang-0.7.33.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
1561
|
+
jaclang-0.7.33.dist-info/entry_points.txt,sha256=8sMi4Tvi9f8tQDN2QAXsSA2icO27zQ4GgEdph6bNEZM,49
|
|
1562
|
+
jaclang-0.7.33.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|