Alpha:
this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content
Helix Compiler
Search
K
Main Navigation
Guide
Getting started
Architecture
Packages
Helix - core compiler
Spool - conveniences
Twine - framework
Examples
Playground
API
Overview
helix
spool
twine
Appearance
Menu
Return to top
On this page
Loops
Loop
Compiles to
Fixed count, small body, no
return
or macro
Copies written in place (unrolled)
while
with no
.else()
A function that calls itself while
cond
holds
while
with
.else()
Pass + exit functions; needs
return run
Diagrams
Which form a loop compiles to
ctx.repeat(n) / ctx.while(cond)
yes
fixed count, small body,
no return or macro?
Unrolled
copies written in place
no
has .else()?
yes
Self-calling pass
execute if cond run function pass
Pass + exit
needs return run (not 1.20.1)