Skip to content

Commit

Permalink
Compiled new rev, Migrating to C++, Rust, Python in progress this wil…
Browse files Browse the repository at this point in the history
…l be the last python built revision
  • Loading branch information
Ze7111 committed Mar 24, 2024
1 parent a661cf9 commit 11b6bed
Show file tree
Hide file tree
Showing 12 changed files with 12,797 additions and 39 deletions.
16 changes: 5 additions & 11 deletions .helix/cache/build_cache/cappy_hlx.hir
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# GENERATED FILE
# --------------------------------------------------------------------------------
# Filename: cappy.hlx
# Generation Date: 2024-03-17 18:52:09
# Generation Date: 2024-03-24 19:54:53
# Generator: Helix Transpiler
# --------------------------------------------------------------------------------
# WARNING: This file is AUTO-GENERATED by the Helix Transpiler. Any modifications
Expand All @@ -17,7 +17,7 @@
#
# By using this file, you agree to the Terms and Conditions of the License.
# --------------------------------------------------------------------------------
# Helix Version: 0.1.0-alpha.a
# Helix Version: 0.10.0-alpha.a
# Repository: https://github.com/kneorain/helix
# Documentation: https://kneorain.github.io/helix/
# For further assistance, contact the development team or refer to project documentation.
Expand All @@ -29,8 +29,8 @@ from beartype import beartype, BeartypeConf # type: ignore
import os # type: ignore
import sys # type: ignore
import types # type: ignore
sys.path.append(os.path.dirname(os.path.realpath("z:\\devolopment\\helix\\helix-lang\\helix.py")) + os.sep + ".helix") # type: ignore
sys.path.append(os.path.dirname(os.path.realpath("z:\\devolopment\\helix\\helix-lang\\helix.py"))) # type: ignore
sys.path.append(os.path.dirname(os.path.realpath("helix.py")) + os.sep + ".helix") # type: ignore
sys.path.append(os.path.dirname(os.path.realpath("helix.py"))) # type: ignore
sys.path.append(os.path.dirname(os.path.realpath(os.getcwd()))) # type: ignore
# trunk-ignore(ruff/F401)
from include.core import ABC, Any, BuiltinFunctionType, C_For, Callable, DEFAULT_VALUE, DispatchError, Enum, FastMap, FunctionType, Infix, Iterator, Literal, NoReturn, NoneType, Optional, Self, T, Thread, Type, TypeVar, UnionType, __import_c__, __import_cpp__, __import_py__, __import_rs__, annotations, array, auto, beartype, class_type_check_decorator, dataclass, double, getcontext, hx__abstract_method, hx__async, hx__multi_method, hx_array, hx_bool, hx_bytes, hx_char, hx_double, hx_float, hx_int, hx_list, hx_map, hx_set, hx_string, hx_tuple, hx_unknown, hx_void, inspect, multimeta, panic, partial, printf, ref, replace_primitives, scanf, sleep, std, string, subtype, unknown, void, wraps # type: ignore
Expand All @@ -49,7 +49,6 @@ def exception_handler(exception_type: type[BaseException] | threading.ExceptHook
import os
from include.core import _H_tokenize_line__
from beartype.roar import BeartypeException

print()
thread_name = None
if thread_error and exception_type is not None:
Expand All @@ -70,9 +69,8 @@ def exception_handler(exception_type: type[BaseException] | threading.ExceptHook
line_no = frame.lineno
if "_hlx" in os.path.basename(filename):
filename = __file__
line_no = int(open(frame.filename + ".lines", "r").readlines()[line_no-1]) # type: ignore
try:
pass
line_no = int(open(frame.filename + ".lines", "r").readlines()[line_no-1]) # type: ignore
except IndexError:
print("TODO: approximate corresponding line number in .hlx file")
panic(
Expand All @@ -97,22 +95,18 @@ def exception_handler(exception_type: type[BaseException] | threading.ExceptHook
no_lines=True,
lang="py"
)

if line_no == -1:
continue
if line_no == -1:
continue

if ";#\"\"\"REMOVE-STACK\"\"\"#" in linecache.getline(filename, line_no).strip():
continue

if (
linecache.getline(filename, line_no-1).strip() == "def hx_internal_multi_method_decorator(*args, **kwargs):" # type: ignore
and
linecache.getline(filename, line_no-3).strip() == "def hx__multi_method(func: Callable) -> Callable:" # type: ignore
):
continue

relevant_frames.append((index, frame))
index += 1
if len(relevant_frames) > 1:
Expand Down
1 change: 0 additions & 1 deletion .helix/cache/build_cache/cappy_hlx.hir.lines
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@
-1
-1
-1
-1
1
1
1
Expand Down
Binary file modified .helix/cache/build_cache/test_hlx.hir
Binary file not shown.
Binary file added build/helix-0.1.6.win-amd64-3.12.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions build_rev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
0.0.2-alpha.p
2365
0.10.0-alpha.a
2376
Binary file added helix.exe
Binary file not shown.
12 changes: 2 additions & 10 deletions helix.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import annotations

PRODUCTION_BUILD = True
import gc
gc.disable() # disable garbage collection for performance

Expand All @@ -22,7 +22,6 @@
CONFIG,
Hashing,
Callable,
FileMode,
Optional,
Namespace,
FrameType,
Expand All @@ -35,13 +34,12 @@
py_compile,
inject_core,
HelixLanguage,
format_file_contents,
color_print as print,
perf_counter_ns as time,
Processed_Line, Token_List,
)

__version__: str = "0.1.0-alpha.a"
__version__: str = "0.10.0-alpha.a"
bar_thread = Event()

class DisabledKeyboardInterrupt(framework.DisabledKeyboardInterrupt):
Expand Down Expand Up @@ -477,11 +475,6 @@ def generate_source_code(
)

self.timer.start("format_source")
if format_source:
# TODO: Handle InvalidInput
transpiled_code = format_file_contents(
transpiled_code, fast=True, mode=FileMode()
)

self.timer.end("format_source")
self.timer.end("generate_source_code")
Expand Down Expand Up @@ -616,5 +609,4 @@ def exit_func(*args: Any) -> None:
#Helix.__hook_import__("syntax/test.hlx")
# from test_hlx import subtract
# subtract(5, 3)
# Helix.REPL()

Loading

0 comments on commit 11b6bed

Please sign in to comment.