radianceRadiance self-hosting compiler home log refs
master
  • master
  • agent/cell-permissions
  • cloudhead/master-next
  • agent/master-fixes
  • agent/lexical-regions-kernel-t2
  • agent/kernel-t2
  • kernel
  • cloudhead/memory-safety
  • cloudhead/generic-core-types
  • radiance-generics
  • ai/ril-safety
e5b52896 mem: Export typed layout queries Alexis Sellier 4 days ago
Clone
.githooks/ compiler/ kernel/ lib/ scripts/ seed/ sublime/ test/ boot/ bootstrap/ compiler/ cycles/ dispatch/ format/ input/ basic.rad 380 B escapes.rad 44 B regions.rad 430 B output/ host/ integration/ kernel/ loader/ manifests/ mmio/ native/ packages/ runtime/ scheduling/ shared/ slots/ smp/ std/ sync/ termination/ tests/ trap/ verify/ Makefile 9.2 KiB kernel.rad 776 B runner.rad 11.6 KiB vim/ .gitignore 333 B .gitsigners 224 B AGENTS.md 8.3 KiB CONTRIBUTING 2.1 KiB LICENSE 1.1 KiB Makefile 2.5 KiB README 3.4 KiB STYLE 3.2 KiB std.lib 2.1 KiB std.lib.test 1.1 KiB
test/format/input/basic.rad 380 B raw
1
fn f(a:u32,b:u32)->u32{let total=compute(first,second,third,fourth,fifth,sixth,
2
seventh,eighth,ninth);if total>limit and total<maximum or overridden{return
3
total+offset*scale;}return 0;}
4
5
static   POOL:Heap = heap::new(64);
6
export static BIG:heap::Heap = heap::new(1<<20);
7
fn g(){static   LOCAL:Scratch= scratch::new(  128  );}
8
9
@intrinsic export constant fn new(size:u32)->Heap;