✓
Passing This code compiles and runs correctly.
Code
// Test 430_008: Pipeline Profiling - Time Frontend Pass
//
// Override the elaborate pass to add timing using std/time.
import std/compiler
import std/time
import std/io
// ============================================================================
// TIMED FRONTEND (using stdlib!)
// ============================================================================
std/compiler:elaborate = std/time:now(): start |> std/compiler:elaborate.default(ctx): c |> std/time:report(start, label: "elaborate") -> c
// The actual program
std/io:print.ln("Compiled with timed elaborate!")
Actual
Compiled with timed elaborate!
Expected output
Compiled with timed elaborate!
Flows
subflow ~elaborate click a branch to expand · @labels scroll to their anchor
now
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "Compiled with timed elaborate!")
Test Configuration
MUST_RUN
Post-validation Script:
#!/bin/bash
# Post-validation: Verify elaborate timing output
set -e
if [ ! -f "backend.err" ]; then
echo "❌ FAIL: No backend.err file found"
exit 1
fi
# Check for elaborate timing
if ! grep -q "⏱️ elaborate:" backend.err; then
echo "❌ FAIL: No elaborate timing found"
exit 1
fi
# Extract and display the timing
TIMING=$(grep "⏱️ elaborate:" backend.err)
echo "✅ Elaborate timing found: $TIMING"
exit 0