- Deleted compiler/src/generators/wasm.ts (472 lines) - Deleted compiler/src/runtime/wasm-host.ts (165 lines) - Deleted compiler/__tests__/e2e-wasm.test.ts (203 lines) - Removed WASM import and generation call from compiler/src/index.ts - Removed WASMGenerated from TS generator state enum literals - Removed WASM codegen tests from parser.test.ts - All 37 tests passing The WASM generator was architecturally wrong: every Map/Set operation crossed the WASM→JS boundary, creating 45-55% overhead for a module that doesn't compute anything. WASM will be a byproduct of the Rust backend via wasm-pack instead (M2.1). Closes #19
22 lines
398 B
Text
22 lines
398 B
Text
speck PreconditionTest {
|
|
|
|
state: {
|
|
balance: Integer
|
|
active: Boolean
|
|
}
|
|
|
|
action SetBalance(newBalance: Integer) {
|
|
precondition: newBalance >= 0
|
|
postcondition: this.balance == newBalance
|
|
require newBalance >= 0
|
|
this.balance := newBalance
|
|
}
|
|
|
|
action Deactivate() {
|
|
precondition: this.balance == 0
|
|
or this.active == false
|
|
postcondition: this.active == false
|
|
this.active := false
|
|
}
|
|
|
|
}
|