Arc v0.0.2-alpha – Release Notes

VoidDev5 pts0 comments

Release v0.0.2-alpha · VxidDev/Arc · GitHub

//releases/show" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

//releases/show;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

VxidDev

Arc

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

v0.0.2-alpha

Pre-release

Pre-release

Compare

Choose a tag to compare

Sorry, something went wrong.

Filter

Loading

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

No results found

View all tags

VxidDev

released this

06 Jun 13:26

v0.0.2-alpha

b82ed3e

Release Notes - v0.0.2-alpha

Version Overview

Version: v0.0.2-alpha<br>Status: Alpha (Experimental)<br>License: GPL-3.0

This release focuses on stability, performance, and memory safety improvements. Several critical bugs have been fixed, the internal architecture has been refined, and the interpreter is now measurably faster across all benchmarks.

Bug Fixes

Stack Overflow in Parser : Fixed unbounded mutual recursion between exprParser, blockParser, andOrParser, and compExprParser that caused a segfault on files with many statements or deeply nested expressions. Introduced a per-statement depth reset and a depth guard.

Stack Overflow in Interpreter : Fixed unbounded recursion in visitNode that caused a segfault on deeply recursive Arc functions (e.g. countdown(5000)). Introduced a configurable call depth limit.

Double-Free in Function Calls : Fixed a double-free in initFunctionCall where calleeObj was freed both inside the function and by the caller.

Zero-Argument Function Call Crash : Fixed a crash when calling a function with no arguments caused by arenaAlloc returning NULL for a zero-size allocation.

Performance Improvements

Dispatch Table on ASTNode : Each AST node now carries a visit function pointer set at parse time, replacing the switch statement in visitNode. Internal visitors now call node->visit directly, eliminating redundant null checks and branch overhead on every node visit.

Smaller Token and Position Structs : Removed filename and filetext from Position, shrinking it from 40 to 24 bytes and Token from 88 to 56 bytes. Parser stack frames now use significantly less stack space, increasing the safe nesting depth before overflow.

Parser Token Locals Reduced : Replaced full Token locals used only for error reporting with Position pairs, further reducing parser frame sizes.

Memory Management

filename and filetext moved off Position : These are now stored on the Parser struct and on dispatch arguments, correctly scoped per-file and per-import rather than duplicated into every token.

--cleanup / -C flag : Added an explicit opt-in flag to free all arenas, pools, and tables before exit. By default, memory is reclaimed by the OS on exit for maximum performance. Use --cleanup when running under Valgrind or other leak checkers.

Arena block size pre-sizing : Token array initial capacity is now based on source file length, reducing arena realloc churn during lexing.

CLI

New flag : --cleanup (-C): Free all memory before exit. Useful for leak checkers.

Benchmarks

Measured on a typical input against CPython 3.x:

Benchmark<br>Python<br>Arc<br>Notes

fibonacci(30) recursive<br>95ms<br>1163ms<br>symbol table alloc per call, to be fixed

fibonacci(1000) iterative<br>0.06ms<br>0.22ms<br>3.6x slower

sum 1..1000000<br>51ms<br>133ms<br>2.6x slower

string concat x10000<br>0.58ms<br>39ms<br>O(n²), to be fixed

nested loops 1000x1000<br>42ms<br>124ms<br>3x slower

variable churn x100000<br>~42ms<br>25ms<br>1.7x faster than Python

Roadmap

Fix symbol table allocation per function call (major speedup for recursive code).

Fix O(n²) string concatenation.

Stop copying objects on every variable access (reference counting or static number interning).

Scoped environments for local variables.

Bytecode Virtual Machine (VM) for improved execution speed.

Expanded standard library (Networking, JSON support).

Enhanced REPL with history and auto-completion.

Arc is currently in alpha. Feedback and contributions are welcome as we move toward a stable 1.0 release.

Assets

Loading

Uh oh!

There was an error while loading. Please reload this page.

-->

All reactions

You can’t perform that action at this time.

alpha release fixed function token search

Related Articles