Implement part 1 of 2 of the empty bodies in specs/vm/jit_semantics.t27 (8 functions)
Context
specs/vm/jit_semantics.t27 holds 12 functions declared with a body that contains no statement. It is split into 2 issues because one turn cannot carry them all.
All 2 parts name the same file, so they share one boundary and cannot run at the same time - the swarm holds the file for whoever has it. They must be done in order, and the check below stops you if you arrived out of turn.
.t27 is the hand-authored source language. t27c compiles it out to C, Rust, Verilog and Zig. You are writing source, not compiler output, and not prose about an implementation.
Before you start
$ cd /Users/playom/t27
$ /Users/playom/t27/target/release/t27c gen specs/vm/jit_semantics.t27 2>&1 | grep -c 'not yet implemented'
12 # if it is not 12, this part is not yours yet - stop
What to write
Keep every signature exactly as it is. Quoted verbatim:
- line 73 -
pub fn initCompiler(allocator_id: u16) -> JitCompiler
- line 79 -
pub fn deinitCompiler(compiler: &JitCompiler)
- line 85 -
pub fn resetCompiler(compiler: &JitCompiler)
- line 92 -
pub fn compileOperation(compiler: &JitCompiler, op: VsaOperation, dimension: usize) -> usize
- line 99 -
pub fn finalizeCompiler(compiler: &JitCompiler) -> ?JitVsaFn
- line 105 -
pub fn codeSize(compiler: &JitCompiler) -> usize
- line 115 -
pub fn initCache(allocator_id: u16) -> JitCache
- line 121 -
pub fn deinitCache(cache: &JitCache)
Add a test block for each function you implement.
Acceptance criteria
-
/Users/playom/t27/target/release/t27c gen specs/vm/jit_semantics.t27 2>&1 | grep -c 'not yet implemented' prints 4 (on arrival: 12)
-
- with criterion 1 satisfied,
/Users/playom/t27/target/release/t27c parse specs/vm/jit_semantics.t27 2>&1 | grep -E '^(recovery-events|declarations-swallowed|lexer-discarded-chars):' reports 0, 0 and 0
-
- with criterion 1 satisfied, all 8 names above still exist:
grep -cE '^\s*(pub )?fn (initCompiler|deinitCompiler|resetCompiler|compileOperation|finalizeCompiler|codeSize|initCache|deinitCache)\(' specs/vm/jit_semantics.t27 prints 8
Boundary
specs/vm/jit_semantics.t27
Implement part 1 of 2 of the empty bodies in specs/vm/jit_semantics.t27 (8 functions)
Context
specs/vm/jit_semantics.t27holds 12 functions declared with a body that contains no statement. It is split into 2 issues because one turn cannot carry them all.All 2 parts name the same file, so they share one boundary and cannot run at the same time - the swarm holds the file for whoever has it. They must be done in order, and the check below stops you if you arrived out of turn.
.t27is the hand-authored source language.t27ccompiles it out to C, Rust, Verilog and Zig. You are writing source, not compiler output, and not prose about an implementation.Before you start
What to write
Keep every signature exactly as it is. Quoted verbatim:
pub fn initCompiler(allocator_id: u16) -> JitCompilerpub fn deinitCompiler(compiler: &JitCompiler)pub fn resetCompiler(compiler: &JitCompiler)pub fn compileOperation(compiler: &JitCompiler, op: VsaOperation, dimension: usize) -> usizepub fn finalizeCompiler(compiler: &JitCompiler) -> ?JitVsaFnpub fn codeSize(compiler: &JitCompiler) -> usizepub fn initCache(allocator_id: u16) -> JitCachepub fn deinitCache(cache: &JitCache)Add a
testblock for each function you implement.Acceptance criteria
/Users/playom/t27/target/release/t27c gen specs/vm/jit_semantics.t27 2>&1 | grep -c 'not yet implemented'prints4(on arrival: 12)/Users/playom/t27/target/release/t27c parse specs/vm/jit_semantics.t27 2>&1 | grep -E '^(recovery-events|declarations-swallowed|lexer-discarded-chars):'reports 0, 0 and 0grep -cE '^\s*(pub )?fn (initCompiler|deinitCompiler|resetCompiler|compileOperation|finalizeCompiler|codeSize|initCache|deinitCache)\(' specs/vm/jit_semantics.t27prints8Boundary
specs/vm/jit_semantics.t27