Skip to content

Implement part 2 of 2 of the empty bodies in specs/vm/jit_semantics.t27 (4 functions) #3939

Description

@gHashTag

Implement part 2 of 2 of the empty bodies in specs/vm/jit_semantics.t27 (4 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
$ t27c gen specs/vm/jit_semantics.t27 2>&1 | grep -c 'not yet implemented'
4      # if it is not 4, this part is not yours yet - stop

What to write

Keep every signature exactly as it is. Quoted verbatim:

  1. line 127 - pub fn getOrCompile(cache: &JitCache, op: VsaOperation, dimension: usize) -> ?JitVsaFn
  2. line 137 - pub fn jitBind(cache: &JitCache, a: &HybridBigInt, b: &HybridBigInt)
  3. line 143 - pub fn jitBundle(cache: &JitCache, a: &HybridBigInt, b: &HybridBigInt)
  4. line 150 - pub fn jitDotProduct(cache: &JitCache, a: &HybridBigInt, b: &HybridBigInt) -> f64

Add a test block for each function you implement.

Acceptance criteria

    1. t27c gen specs/vm/jit_semantics.t27 > /tmp/t27-gen.zig && grep -c 'not yet implemented' /tmp/t27-gen.zig prints 0 (on arrival: 4)
    1. t27c spec-status specs/vm/jit_semantics.t27 does not print NOPARSE - the file still parses. (This replaces a parse-metrics criterion. The compiler in the container prints no such metrics, so the command printed nothing and no work could ever satisfy it.)
    1. with criterion 1 satisfied, all 4 names above still exist: grep -cE '^\s*(pub )?fn (getOrCompile|jitBind|jitBundle|jitDotProduct)\(' specs/vm/jit_semantics.t27 prints 4

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