Skip to content

Implement part 1 of 2 of the empty bodies in specs/vm/jit_semantics.t27 (8 functions) #3938

Description

@gHashTag

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:

  1. line 73 - pub fn initCompiler(allocator_id: u16) -> JitCompiler
  2. line 79 - pub fn deinitCompiler(compiler: &JitCompiler)
  3. line 85 - pub fn resetCompiler(compiler: &JitCompiler)
  4. line 92 - pub fn compileOperation(compiler: &JitCompiler, op: VsaOperation, dimension: usize) -> usize
  5. line 99 - pub fn finalizeCompiler(compiler: &JitCompiler) -> ?JitVsaFn
  6. line 105 - pub fn codeSize(compiler: &JitCompiler) -> usize
  7. line 115 - pub fn initCache(allocator_id: u16) -> JitCache
  8. line 121 - pub fn deinitCache(cache: &JitCache)

Add a test block for each function you implement.

Acceptance criteria

    1. /Users/playom/t27/target/release/t27c gen specs/vm/jit_semantics.t27 2>&1 | grep -c 'not yet implemented' prints 4 (on arrival: 12)
    1. 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
    1. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions