Archived
kill: purge old-paradigm dist/platform binaries from tree
El SDK Release / build-and-release (push) Failing after 13m0s
El SDK Release / build-and-release (push) Failing after 13m0s
The generated C, amalgams, vendored runtime pins, and compiled binaries from the Claude Code era are removed from the worktree. The El sources survive; this tree is now source-only for the first-principles rebuild. Per Principal direction 2026-08-19.
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
bash /tmp/thunk07.sh
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
== 1. does the literal string __thunk_noargs appear in any committed source, anywhere in the range? ==
|
||||
NONE — the literal never appears in any committed file in 5718943^..c04d68f
|
||||
|
||||
== 2. __thunk_noargs is a NAME THE COMPILER GENERATES, not source text. Where does it come from? ==
|
||||
bc2f26d:lang/el-compiler/src/codegen.el:3356: emit_line("static el_val_t __thunk_" + fn_name + "(void* __v) {")
|
||||
bc2f26d:lang/el-compiler/src/codegen.el:3365: emit_line(" el_val_t __r = el_seam_wrap(EL_STR(" + c_str_lit(fn_name) + "), __thunk_" + fn_name + ", &__env);")
|
||||
|
||||
== 3. in the C emitted at bc2f26d for a zero-param fn, is __thunk_noargs DECLARED before use? ==
|
||||
12:static el_val_t __thunk_noargs(void* __v) {
|
||||
19: el_val_t __r = el_seam_wrap(EL_STR("noargs"), __thunk_noargs, &__env);
|
||||
|
||||
-- compile that C standalone, strict C11, no GNU extensions --
|
||||
(no error mentioning thunk)
|
||||
3
|
||||
program exit=0 (printed value above)
|
||||
|
||||
-- and the same emitted C under -pedantic-errors, which rejects the GNU empty-struct extension --
|
||||
syntax-only rc above (empty output = clean)
|
||||
|
||||
== 4. does tests/integration/seam_caller.sh exist at ANY commit in the range? ==
|
||||
NONE — seam_caller.sh does not exist at any commit in 5718943^..c04d68f
|
||||
|
||||
integration harnesses present at bc2f26d:
|
||||
|
||||
== 5. does any committed file anywhere in the range assert 21 or 111 for the wrap seam? ==
|
||||
bc2f26d:tests/integration/seam_binding.sh:87:el_val_t thrice(el_val_t fn, el_val_t con, el_val_t (*b)(void*), void* e){
|
||||
--- grep for '21' / '111' as expected values in seam_binding.sh at bc2f26d ---
|
||||
NONE — no assertion on 21 or 111
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
commit bc2f26ddfc35119e242c0a38d09e2b0023136462
|
||||
tree clean
|
||||
captured_utc 2026-08-17T17:40:02Z
|
||||
exit 0
|
||||
ms 4653
|
||||
sha256_out d51b993fde6ea41076713611dd6a27a5adf6a7142d843871854312275b13c18e
|
||||
sha256_err e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
bash /tmp/thunk07b.sh
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
CWD: /tmp/rerun-v1-07 (must be the repo ROOT for these pathspecs)
|
||||
|
||||
== 4. does tests/integration/seam_caller.sh exist at ANY commit in 5718943^..c04d68f? ==
|
||||
NONE
|
||||
|
||||
-- and does it exist at any commit at all in this repo's history? --
|
||||
a0cc95e3 instrument build log: every failure, with the artifact
|
||||
docs/v2/experiments/evidence/cycles/07-the-caller-was-already-there/0031-30-CONTROL-seam_caller-harness-at-d9d1571.cmd
|
||||
docs/v2/experiments/evidence/cycles/07-the-caller-was-already-there/0031-30-CONTROL-seam_caller-harness-at-d9d1571.err
|
||||
docs/v2/experiments/evidence/cycles/07-the-caller-was-already-there/0031-30-CONTROL-seam_caller-harness-at-d9d1571.out
|
||||
docs/v2/experiments/evidence/cycles/07-the-caller-was-already-there/0031-30-CONTROL-seam_caller-harness-at-d9d1571.prov
|
||||
docs/v2/experiments/evidence/cycles/07-the-caller-was-already-there/0031-30-CONTROL-seam_caller-harness-at-d9d1571.rc
|
||||
99b12f85 native suite mutation result: P4 is FALSE
|
||||
docs/v2/experiments/evidence/cycles/08-PREDICTIONS/0009-harness-seam_caller.cmd
|
||||
docs/v2/experiments/evidence/cycles/08-PREDICTIONS/0009-harness-seam_caller.err
|
||||
docs/v2/experiments/evidence/cycles/08-PREDICTIONS/0009-harness-seam_caller.out
|
||||
docs/v2/experiments/evidence/cycles/08-PREDICTIONS/0009-harness-seam_caller.prov
|
||||
docs/v2/experiments/evidence/cycles/08-PREDICTIONS/0009-harness-seam_caller.rc
|
||||
d9d1571f a construct can see its caller, with no new emission point
|
||||
lang/tests/integration/seam_caller.sh
|
||||
(empty above = never existed)
|
||||
|
||||
== integration harnesses present at each commit in the range ==
|
||||
5718943f2
|
||||
60737b030
|
||||
4f7568b07
|
||||
2bed8483f
|
||||
7d01608a9
|
||||
1b324a071
|
||||
35b07bade
|
||||
82e998273
|
||||
886626a64
|
||||
28d19da7f
|
||||
8bbb750c2 lang/tests/integration/seam_binding.sh
|
||||
24f7fb514 lang/tests/integration/seam_binding.sh
|
||||
285166c25 lang/tests/integration/seam_binding.sh
|
||||
b40754f07 lang/tests/integration/seam_binding.sh
|
||||
bc2f26ddf lang/tests/integration/seam_binding.sh
|
||||
c04d68f9c lang/tests/integration/seam_binding.sh
|
||||
|
||||
== 5. where does 'thrice' appear at bc2f26d (repo-root scope)? ==
|
||||
bc2f26d:elp/src/vocabulary-ang.el:11003: let v = native_list_append(v, ["þreowa", "adv", "þreowa", "", "", "", "three times thrice"])
|
||||
bc2f26d:elp/src/vocabulary-enm.el:10969: let v = native_list_append(v, ["thrice", "adv", "thrice", "", "", "", "alternative form of"])
|
||||
bc2f26d:elp/src/vocabulary-goh.el:3420: let v = native_list_append(v, ["driror", "adv", "driror", "", "", "", "thrice"])
|
||||
bc2f26d:elp/src/vocabulary-grc.el:9609: let v = native_list_append(v, ["τρισάθλιος", "adj", "τρῐσᾱθλῐώτερος", "τρῐσᾱθλῐώτᾰτος", "τρῐσᾱθλῐ́ᾱ", "", "thrice unhappy"])
|
||||
bc2f26d:elp/src/vocabulary-grc.el:9624: let v = native_list_append(v, ["τρίσμακαρ", "adj", "τρίσμακαρ", "", "τρῐ́σμᾰκᾰρ", "", "thrice blessed"])
|
||||
bc2f26d:elp/src/vocabulary-grc.el:10209: let v = native_list_append(v, ["τρίς", "other", "τρίς", "", "", "", "thrice three times"])
|
||||
bc2f26d:elp/src/vocabulary-grc.el:10210: let v = native_list_append(v, ["τρι-", "other", "τρι-", "", "", "", "tri- three thrice"])
|
||||
bc2f26d:elp/src/vocabulary-sa.el:9444: let v = native_list_append(v, ["त्रिस्", "adv", "त्रिस्", "", "", "", "thrice"])
|
||||
bc2f26d:elp/src/vocabulary-uga.el:690: let v = native_list_append(v, ["𐎘𐎍𐎘𐎛𐎄", "adv", "𐎘𐎍𐎘𐎛𐎄", "", "", "", "thrice three times"])
|
||||
bc2f26d:lang/tests/integration/seam_binding.sh:87:el_val_t thrice(el_val_t fn, el_val_t con, el_val_t (*b)(void*), void* e){
|
||||
|
||||
== 5b. does seam_binding.sh at bc2f26d assert 21 or 111 anywhere? ==
|
||||
NONE — the strings 21 and 111 do not occur in the harness
|
||||
|
||||
== 5c. every check() expectation in seam_binding.sh at bc2f26d, in order ==
|
||||
60:check "unbound program is unaffected" \
|
||||
61- "7" "$(cd "$WORK" && ./prog 2>&1)"
|
||||
--
|
||||
64:check "a construct declared AFTER the build applies" \
|
||||
65- "SEEN work/audited
|
||||
--
|
||||
69:check "a construct declared after the build can REFUSE" \
|
||||
70- "42" "$(cd "$WORK" && EL_CONSTRUCTS=refuse.txt ./prog 2>&1)"
|
||||
--
|
||||
73:check "an unlinked target is skipped, not fatal" \
|
||||
74- "7" "$(cd "$WORK" && EL_CONSTRUCTS=ghost.txt ./prog 2>&1)"
|
||||
--
|
||||
77:check "a binding for a different fn does not fire" \
|
||||
78- "7" "$(cd "$WORK" && EL_CONSTRUCTS=other.txt ./prog 2>&1)"
|
||||
--
|
||||
81:check "two constructs compose on one crossing" \
|
||||
82- "SEEN work/a
|
||||
--
|
||||
92:check "an EXIT construct declared after the build replaces the result" \
|
||||
93- "14" "$(cd "$WORK" && EL_CONSTRUCTS=exit.txt ./prog 2>&1)"
|
||||
|
||||
== 5d. is the appended 'thrice' target ever compiled? (targets.c is cc'd BEFORE the append) ==
|
||||
29:cat > "$WORK/targets.c" <<'EOF'
|
||||
57:cc $CFLAGS -o "$WORK/prog" "$WORK/prog.c" "$WORK/targets.c" $SRCS $LDFLAGS 2>/dev/null \
|
||||
66:7" "$(cd "$WORK" && EL_CONSTRUCTS=observe.txt ./prog 2>&1)"
|
||||
70: "42" "$(cd "$WORK" && EL_CONSTRUCTS=refuse.txt ./prog 2>&1)"
|
||||
74: "7" "$(cd "$WORK" && EL_CONSTRUCTS=ghost.txt ./prog 2>&1)"
|
||||
78: "7" "$(cd "$WORK" && EL_CONSTRUCTS=other.txt ./prog 2>&1)"
|
||||
84:7" "$(cd "$WORK" && EL_CONSTRUCTS=two.txt ./prog 2>&1)"
|
||||
86:cat >> "$WORK/targets.c" <<'TGT'
|
||||
93: "14" "$(cd "$WORK" && EL_CONSTRUCTS=exit.txt ./prog 2>&1)"
|
||||
|
||||
== 5e. does any binding file in the harness use phase 'wrap'? ==
|
||||
NONE — no 'wrap' phase binding is ever written by the harness
|
||||
|
||||
== 6. treewide: any file at bc2f26d or c04d68f that binds phase 'wrap'? ==
|
||||
none in .sh/.txt
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
commit bc2f26ddfc35119e242c0a38d09e2b0023136462
|
||||
tree clean
|
||||
captured_utc 2026-08-17T17:40:29Z
|
||||
exit 0
|
||||
ms 425
|
||||
sha256_out f705426787699a1e41a5a1611c76a99045f9f3fa72be0382ecde18ff2d054c05
|
||||
sha256_err e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
bash -c SRCS=$(../scripts/el-runtime-sources.sh runtime); CF="-std=c11 -O2 -I runtime"; LF=""; for d in /opt/homebrew/opt/openssl@3 /usr/local/opt/openssl@3; do [ -d "$d" ] && CF="$CF -I $d/include" && LF="-L $d/lib"; done; LF="$LF -lcurl -lssl -lcrypto -lpthread -lm"; /tmp/elc07b --test tests/native/test_compiler.el > /tmp/t07b.c && cc $CF -o /tmp/t07bx /tmp/t07b.c $SRCS $LF && /tmp/t07bx | tail -5
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
runtime/el_runtime.c:14448:1: warning: '/*' within block comment [-Wcomment]
|
||||
14448 | /* ═══════════════════════════════════════════════════════════════════════════
|
||||
| ^
|
||||
1 warning generated.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
ok early-returns-route-through-the-exit-seam (0.094ms)
|
||||
ok every-fn-gets-a-closure (0.123ms)
|
||||
ok zero-param-fn-emits-valid-c (0.088ms)
|
||||
|
||||
100 tests, 100 passed, 0 failed, 241 assertions in 5.926ms
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
commit bc2f26ddfc35119e242c0a38d09e2b0023136462
|
||||
tree clean
|
||||
captured_utc 2026-08-17T17:40:45Z
|
||||
exit 0
|
||||
ms 4144
|
||||
sha256_out 1476cd0ce8382365e86d5cda728a86cafb1f3156e6bb0d7ea3a9babddc091c28
|
||||
sha256_err 15ee96301428d7dc3500fe5b6109a154a87a2f21119365e665575b3e634d662b
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
bash tests/integration/seam_binding.sh /tmp/elc07b /tmp/rerun-v1-07/lang
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
ok unbound program is unaffected
|
||||
ok a construct declared AFTER the build applies
|
||||
ok a construct declared after the build can REFUSE
|
||||
ok an unlinked target is skipped, not fatal
|
||||
ok a binding for a different fn does not fire
|
||||
ok two constructs compose on one crossing
|
||||
ok an EXIT construct declared after the build replaces the result
|
||||
|
||||
7 assertions, 7 passed, 0 failed
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
commit bc2f26ddfc35119e242c0a38d09e2b0023136462
|
||||
tree clean
|
||||
captured_utc 2026-08-17T17:40:48Z
|
||||
exit 0
|
||||
ms 3433
|
||||
sha256_out 03d3e2e45ceb69b512d12b292f32e5cf7d36d10925fc8abb8f5273e83e8b6287
|
||||
sha256_err e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
bash /tmp/parent07.sh
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
== verify the extracted tree really is bc2f26d^ ==
|
||||
git blob bc2f26d^:lang/el-compiler/src/codegen.el f6bc48623aca4e6fd7f88639f7cb25a75bd3027f15aee5b5d5047dfcd2bb663a
|
||||
/tmp/el07parent/lang/el-compiler/src/codegen.el f6bc48623aca4e6fd7f88639f7cb25a75bd3027f15aee5b5d5047dfcd2bb663a
|
||||
MATCH
|
||||
test_compiler.el blob 1e6cd04b7d0bb4c90d27d6a2f08c6bfdf78c3e1c1b12f73887c3b2fd60dc0384
|
||||
test_compiler.el file 1e6cd04b7d0bb4c90d27d6a2f08c6bfdf78c3e1c1b12f73887c3b2fd60dc0384
|
||||
MATCH
|
||||
|
||||
== native compiler tests at bc2f26d^ (built gen2, same procedure as the commit) ==
|
||||
ok exit-crossing-goes-through-the-seam (0.065ms)
|
||||
ok early-returns-route-through-the-exit-seam (0.097ms)
|
||||
|
||||
99 tests, 99 passed, 0 failed, 239 assertions in 5.827ms
|
||||
|
||||
== integration seam_binding.sh at bc2f26d^ ==
|
||||
ok two constructs compose on one crossing
|
||||
ok an EXIT construct declared after the build replaces the result
|
||||
|
||||
7 assertions, 6 passed, 0 failed
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
commit bc2f26ddfc35119e242c0a38d09e2b0023136462
|
||||
tree clean
|
||||
captured_utc 2026-08-17T17:41:20Z
|
||||
exit 0
|
||||
ms 7762
|
||||
sha256_out 61212505c09813a15042520d6a8a7dc6d24d3a6d0f31de4a6ab627f9a53a5d0e
|
||||
sha256_err e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
git diff bc2f26d^ bc2f26d -- lang/el-compiler/src/codegen.el
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
diff --git a/lang/el-compiler/src/codegen.el b/lang/el-compiler/src/codegen.el
|
||||
index bd90b266..eaaa4def 100644
|
||||
--- a/lang/el-compiler/src/codegen.el
|
||||
+++ b/lang/el-compiler/src/codegen.el
|
||||
@@ -3215,44 +3215,15 @@ fn cg_entry_seam(stmt: Map<String, Any>, fn_name: String) -> Void {
|
||||
// cg_exit_target / cg_exit_construct — the first construct on this fn that
|
||||
// injects at exit, or "" if none.
|
||||
|
||||
-fn cg_wrap_target(stmt: Map<String, Any>) -> String {
|
||||
- let wdl = stmt["decorators"]
|
||||
- let n_wdl: Int = native_list_len(wdl)
|
||||
- let wi = 0
|
||||
- let found: String = ""
|
||||
- while wi < n_wdl {
|
||||
- if str_eq(found, "") {
|
||||
- let wd = native_list_get(wdl, wi)
|
||||
- let wdn: String = wd["name"]
|
||||
- let wt: String = decorator_wrap(wdn)
|
||||
- if !str_eq(wt, "") { let found = wt }
|
||||
- }
|
||||
- let wi = wi + 1
|
||||
- }
|
||||
- found
|
||||
-}
|
||||
|
||||
-fn cg_wrap_construct(stmt: Map<String, Any>) -> String {
|
||||
- let wdl = stmt["decorators"]
|
||||
- let n_wdl: Int = native_list_len(wdl)
|
||||
- let wi = 0
|
||||
- let found: String = ""
|
||||
- while wi < n_wdl {
|
||||
- if str_eq(found, "") {
|
||||
- let wd = native_list_get(wdl, wi)
|
||||
- let wdn: String = wd["name"]
|
||||
- let wt: String = decorator_wrap(wdn)
|
||||
- if !str_eq(wt, "") { let found = wdn }
|
||||
- }
|
||||
- let wi = wi + 1
|
||||
- }
|
||||
- found
|
||||
-}
|
||||
|
||||
// params_to_env_fields / params_to_env_init / params_to_env_args — the captured
|
||||
// environment. This IS the closure: a struct of captured values, a function
|
||||
// pointer that takes it, and the pair handed to the wrap target.
|
||||
fn params_to_env_fields(params: [Any]) -> String {
|
||||
+ // A zero-param fn would emit `struct __env_f { };` -- an empty struct is a
|
||||
+ // GNU extension, not C99, and an empty initialiser is C23.
|
||||
+ if native_list_len(params) == 0 { return " char __e0;" }
|
||||
let out: String = ""
|
||||
let n: Int = native_list_len(params)
|
||||
let i = 0
|
||||
@@ -3266,6 +3237,7 @@ fn params_to_env_fields(params: [Any]) -> String {
|
||||
}
|
||||
|
||||
fn params_to_env_init(params: [Any]) -> String {
|
||||
+ if native_list_len(params) == 0 { return "0" }
|
||||
let out: String = ""
|
||||
let n: Int = native_list_len(params)
|
||||
let i = 0
|
||||
@@ -3296,19 +3268,6 @@ fn params_to_env_args(params: [Any]) -> String {
|
||||
|
||||
// params_to_call_args — "a, b, c" from the param list, for the wrapper's call
|
||||
// into the body helper.
|
||||
-fn params_to_call_args(params: [Any]) -> String {
|
||||
- let out: String = ""
|
||||
- let n: Int = native_list_len(params)
|
||||
- let i = 0
|
||||
- while i < n {
|
||||
- let p = native_list_get(params, i)
|
||||
- let pn: String = p["name"]
|
||||
- if i > 0 { let out = out + ", " }
|
||||
- let out = out + pn
|
||||
- let i = i + 1
|
||||
- }
|
||||
- out
|
||||
-}
|
||||
|
||||
fn cg_fn(stmt: Map<String, Any>) -> Void {
|
||||
let fn_name: String = stmt["name"]
|
||||
@@ -3358,11 +3317,7 @@ fn cg_fn(stmt: Map<String, Any>) -> Void {
|
||||
// silently miss every early return — which is precisely the class of
|
||||
// failure this seam exists to remove. Fns with no exit construct emit
|
||||
// exactly as before, byte for byte.
|
||||
- let wrap_target: String = cg_wrap_target(stmt)
|
||||
- let wrap_construct: String = cg_wrap_construct(stmt)
|
||||
- let has_wrap: Bool = !str_eq(wrap_target, "")
|
||||
- let has_exit: Bool = true
|
||||
- if has_exit {
|
||||
+ if true {
|
||||
emit_line("static el_val_t __el_body_" + fn_name + "(" + params_c + ") {")
|
||||
} else {
|
||||
emit_line("el_val_t " + fn_name + "(" + params_c + ") {")
|
||||
@@ -3393,27 +3348,21 @@ fn cg_fn(stmt: Map<String, Any>) -> Void {
|
||||
// The wrapper: guards, entry injection, the body call, then the exit
|
||||
// injection, which receives the result so it can observe what the fn
|
||||
// actually returned.
|
||||
- if has_wrap {
|
||||
- // Codegen defines the wrap calling convention, so codegen declares it.
|
||||
- // El has ONE type -- el_val_t = int64_t -- so El's own `extern fn` cannot
|
||||
- // describe a callable, and asking it to produces an int/pointer
|
||||
- // mismatch. The convention is not El-expressible; it is emitted.
|
||||
- emit_line("extern el_val_t " + wrap_target + "(el_val_t, el_val_t, el_val_t(*)(void*), void*);")
|
||||
+ if true {
|
||||
+ // EVERY fn gets an env struct and a thunk. Codegen cannot know which fns
|
||||
+ // a wrap construct will be bound to after the binary exists, and the
|
||||
+ // wrapper unconditionally calls through el_seam_wrap.
|
||||
emit_line("struct __env_" + fn_name + " { " + params_to_env_fields(params) + " };")
|
||||
emit_line("static el_val_t __thunk_" + fn_name + "(void* __v) {")
|
||||
emit_line(" struct __env_" + fn_name + "* __e = (struct __env_" + fn_name + "*)__v; (void)__e;")
|
||||
emit_line(" return __el_body_" + fn_name + "(" + params_to_env_args(params) + ");")
|
||||
emit_line("}")
|
||||
}
|
||||
- if has_exit {
|
||||
+ if true {
|
||||
emit_line("el_val_t " + fn_name + "(" + params_c + ") {")
|
||||
cg_entry_seam(stmt, fn_name)
|
||||
- if has_wrap {
|
||||
- emit_line(" struct __env_" + fn_name + " __env = { " + params_to_env_init(params) + " };")
|
||||
- emit_line(" el_val_t __r = " + wrap_target + "(EL_STR(" + c_str_lit(fn_name) + "), EL_STR(" + c_str_lit(wrap_construct) + "), __thunk_" + fn_name + ", &__env);")
|
||||
- } else {
|
||||
- emit_line(" el_val_t __r = __el_body_" + fn_name + "(" + params_to_call_args(params) + ");")
|
||||
- }
|
||||
+ emit_line(" struct __env_" + fn_name + " __env = { " + params_to_env_init(params) + " };")
|
||||
+ emit_line(" el_val_t __r = el_seam_wrap(EL_STR(" + c_str_lit(fn_name) + "), __thunk_" + fn_name + ", &__env);")
|
||||
emit_line(" __r = el_seam_run(EL_STR(" + c_str_lit(fn_name) + "), 1, __r);")
|
||||
emit_line(" return __r;")
|
||||
emit_line("}")
|
||||
@@ -4291,13 +4240,7 @@ fn program_has_routes(recs: [Map<String, Any>]) -> Bool {
|
||||
// only decide whether to repeat — no timeout, no rollback-and-retry, no
|
||||
// parallel, no memoize-on-arguments. It would also have crippled the JS backend,
|
||||
// which has closures natively, for a limit in the C one.
|
||||
-fn declare_wrap(name: String, wraps: String) -> Void {
|
||||
- state_set("__dec_wrap_" + name, wraps)
|
||||
-}
|
||||
|
||||
-fn decorator_wrap(name: String) -> String {
|
||||
- state_get("__dec_wrap_" + name)
|
||||
-}
|
||||
|
||||
// A PROHIBITION is the other half of a boundary: not what runs when something
|
||||
// crosses, but what may not cross at all.
|
||||
@@ -4340,8 +4283,6 @@ fn prohibiting_constructs() -> String {
|
||||
fn scan_declared_decorators(tokens: [Any]) -> Void {
|
||||
declare_prohibition("manager", "dharma_emit,dharma_field")
|
||||
let total: Int = native_list_len(tokens) / 2
|
||||
- let has_pending_w: Bool = false
|
||||
- let pending_wrap: String = ""
|
||||
let has_pending_p: Bool = false
|
||||
let pending_prohibit: String = ""
|
||||
let pos: Int = 0
|
||||
@@ -4382,10 +4323,6 @@ fn scan_declared_decorators(tokens: [Any]) -> Void {
|
||||
if str_eq(dname, "decorator") {
|
||||
if native_list_len(args) >= 2 {
|
||||
let dkind: String = native_list_get(args, 0)
|
||||
- if str_eq(dkind, "wraps_body") {
|
||||
- let has_pending_w = true
|
||||
- let pending_wrap = native_list_get(args, 1)
|
||||
- }
|
||||
if str_eq(dkind, "prohibits_outside") {
|
||||
let has_pending_p = true
|
||||
let pending_prohibit = native_list_get(args, 1)
|
||||
@@ -4396,10 +4333,6 @@ fn scan_declared_decorators(tokens: [Any]) -> Void {
|
||||
} else {
|
||||
if str_eq(k, "Fn") {
|
||||
let fname: String = tok_value(tokens, pos + 1)
|
||||
- if has_pending_w {
|
||||
- declare_wrap(fname, pending_wrap)
|
||||
- let has_pending_w = false
|
||||
- }
|
||||
if has_pending_p {
|
||||
declare_prohibition(fname, pending_prohibit)
|
||||
let has_pending_p = false
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
commit bc2f26ddfc35119e242c0a38d09e2b0023136462
|
||||
tree clean
|
||||
captured_utc 2026-08-17T17:41:33Z
|
||||
exit 0
|
||||
ms 12
|
||||
sha256_out 6fcd4b37cf2bb12288bbd7734ae8cdd8f67ef47107ea59ac5786e8c6e06bc4f1
|
||||
sha256_err e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
bash -c echo "== the single wraps_body occurrence in codegen.el at bc2f26d^ =="; git grep -n -- "wraps_body" "bc2f26d^" -- lang/el-compiler/src/codegen.el; echo; echo "== surrounding branch, bc2f26d^ codegen.el lines 4380-4410 =="; git show "bc2f26d^:lang/el-compiler/src/codegen.el" | sed -n "4380,4412p" | cat -n; echo; echo "== treewide wraps_body at bc2f26d^ =="; git grep -n -- "wraps_body" "bc2f26d^"
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
== the single wraps_body occurrence in codegen.el at bc2f26d^ ==
|
||||
bc2f26d^:lang/el-compiler/src/codegen.el:4385: if str_eq(dkind, "wraps_body") {
|
||||
|
||||
== surrounding branch, bc2f26d^ codegen.el lines 4380-4410 ==
|
||||
1 if str_eq(tok_kind(tokens, p), "RParen") { let p = p + 1 }
|
||||
2 }
|
||||
3 if str_eq(dname, "decorator") {
|
||||
4 if native_list_len(args) >= 2 {
|
||||
5 let dkind: String = native_list_get(args, 0)
|
||||
6 if str_eq(dkind, "wraps_body") {
|
||||
7 let has_pending_w = true
|
||||
8 let pending_wrap = native_list_get(args, 1)
|
||||
9 }
|
||||
10 if str_eq(dkind, "prohibits_outside") {
|
||||
11 let has_pending_p = true
|
||||
12 let pending_prohibit = native_list_get(args, 1)
|
||||
13 }
|
||||
14 }
|
||||
15 }
|
||||
16 let pos = p
|
||||
17 } else {
|
||||
18 if str_eq(k, "Fn") {
|
||||
19 let fname: String = tok_value(tokens, pos + 1)
|
||||
20 if has_pending_w {
|
||||
21 declare_wrap(fname, pending_wrap)
|
||||
22 let has_pending_w = false
|
||||
23 }
|
||||
24 if has_pending_p {
|
||||
25 declare_prohibition(fname, pending_prohibit)
|
||||
26 let has_pending_p = false
|
||||
27 }
|
||||
28 let pos = pos + 2
|
||||
29 } else {
|
||||
30 let pos = pos + 1
|
||||
31 }
|
||||
32 }
|
||||
33 }
|
||||
|
||||
== treewide wraps_body at bc2f26d^ ==
|
||||
bc2f26d^:lang/el-compiler/src/codegen.el:4385: if str_eq(dkind, "wraps_body") {
|
||||
bc2f26d^:lang/tests/native/test_compiler.el:809: let src: String = "@decorator(\"wraps_body\", \"with_timeout\")\nfn timed() {}\n@timed\nfn slow(k: Int) -> Int { return 9 }"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
commit bc2f26ddfc35119e242c0a38d09e2b0023136462
|
||||
tree clean
|
||||
captured_utc 2026-08-17T17:41:33Z
|
||||
exit 0
|
||||
ms 78
|
||||
sha256_out 02cc6917d77969bd62aea53c0732e255f75b8d9076ea795a74659573aa105363
|
||||
sha256_err e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
bash -c echo "== diff of the harness, bc2f26d^ -> bc2f26d =="; git diff bc2f26d^ bc2f26d -- lang/tests/integration/seam_binding.sh; echo; echo "== the summary line at every commit where the harness exists =="; for c in $(git rev-list --reverse 5718943^..c04d68f); do f=$(git show ${c}:lang/tests/integration/seam_binding.sh 2>/dev/null | grep -n "assertions, " | tr -d "\n"); n=$(git show ${c}:lang/tests/integration/seam_binding.sh 2>/dev/null | grep -c "^check \|^check\"" ); if [ -n "$f" ]; then printf " %s check-calls=%s %s\n" "$(git rev-parse --short=9 $c)" "$n" "$f"; fi; done
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
== diff of the harness, bc2f26d^ -> bc2f26d ==
|
||||
diff --git a/lang/tests/integration/seam_binding.sh b/lang/tests/integration/seam_binding.sh
|
||||
index 20e85046..58e28c61 100755
|
||||
--- a/lang/tests/integration/seam_binding.sh
|
||||
+++ b/lang/tests/integration/seam_binding.sh
|
||||
@@ -83,10 +83,15 @@ check "two constructs compose on one crossing" \
|
||||
SEEN work/b
|
||||
7" "$(cd "$WORK" && EL_CONSTRUCTS=two.txt ./prog 2>&1)"
|
||||
|
||||
+cat >> "$WORK/targets.c" <<'TGT'
|
||||
+el_val_t thrice(el_val_t fn, el_val_t con, el_val_t (*b)(void*), void* e){
|
||||
+ (void)fn; (void)con; return b(e) + b(e) + b(e); /* wrap: invoke N times */
|
||||
+}
|
||||
+TGT
|
||||
printf 'work doubler exit double_result\n' > "$WORK/exit.txt"
|
||||
check "an EXIT construct declared after the build replaces the result" \
|
||||
"14" "$(cd "$WORK" && EL_CONSTRUCTS=exit.txt ./prog 2>&1)"
|
||||
|
||||
echo
|
||||
-echo " 7 assertions, $((6-FAILS)) passed, $FAILS failed"
|
||||
+echo " 7 assertions, $((7-FAILS)) passed, $FAILS failed"
|
||||
exit $FAILS
|
||||
|
||||
== the summary line at every commit where the harness exists ==
|
||||
8bbb750c2 check-calls=6 84:echo " 6 assertions, $((6-FAILS)) passed, $FAILS failed"
|
||||
24f7fb514 check-calls=6 84:echo " 6 assertions, $((6-FAILS)) passed, $FAILS failed"
|
||||
285166c25 check-calls=7 91:echo " 7 assertions, $((6-FAILS)) passed, $FAILS failed"
|
||||
b40754f07 check-calls=7 91:echo " 7 assertions, $((6-FAILS)) passed, $FAILS failed"
|
||||
bc2f26ddf check-calls=7 96:echo " 7 assertions, $((7-FAILS)) passed, $FAILS failed"
|
||||
c04d68f9c check-calls=7 96:echo " 7 assertions, $((7-FAILS)) passed, $FAILS failed"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
commit bc2f26ddfc35119e242c0a38d09e2b0023136462
|
||||
tree clean
|
||||
captured_utc 2026-08-17T17:43:46Z
|
||||
exit 0
|
||||
ms 264
|
||||
sha256_out 23c299268a3bc1441fb485f5756072fb386394c72756698c8ea9e315fbc08ed1
|
||||
sha256_err e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1,257 @@
|
||||
# CLAIMS — cycle 07, invocation is not composable
|
||||
|
||||
Source doc: `docs/v1/experiments/cycles/07-invocation-is-not-composable.md`
|
||||
|
||||
## Pinned commits
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Cycle commit (the EXPERIMENT) | `bc2f26ddfc35119e242c0a38d09e2b0023136462` |
|
||||
| Committed | 2026-08-17 09:06:05 -0500 |
|
||||
| Subject | EXPERIMENT: invocation control resolves at runtime |
|
||||
| Parent (the "before" state the record describes) | `b40754f07b5eff3700a69681397e46949a5c4f41` — "land unconditional wrapper: exit crossings resolve at runtime", 2026-08-17 09:01:55 -0500 |
|
||||
| Land commit (second record block, no numeric claims) | `c04d68f9c…` — "land runtime invocation control: only prohibition remains compiled", 2026-08-17 09:06:16 -0500 |
|
||||
| Re-run method | detached worktree `/tmp/rerun-v1-07` at `bc2f26d`, tree clean |
|
||||
| Artifact provenance | every artifact pinned to `bc2f26ddfc35`, tree `clean` (see `MANIFEST.tsv`) |
|
||||
| Machine | Apple M4 Pro, Darwin 25.5.0 arm64, Apple clang 21.0.0, load avg ≈5–6 during timing |
|
||||
|
||||
**`c04d68f` is tree-identical to `bc2f26d`.** `git diff --stat bc2f26d c04d68f` is empty and
|
||||
`codegen.el` hashes identically at both (`0015`). The land commit changes no file; it only
|
||||
re-records the experiment as landed. Every measurement below therefore applies to both.
|
||||
|
||||
## Verdicts
|
||||
|
||||
| # | Claim (verbatim from the record) | Artifact | Commit | Verdict |
|
||||
|---|---|---|---|---|
|
||||
| 1 | "P1 wrap becomes runtime-bindable **TRUE** body x3 -> 21, never invoked -> 111" | `0016-P1-wrap-probe-reconstructed.out` (reconstructed probe), `0040-REDO-seam-caller-and-wrap-assertion-search.out` | `bc2f26d` | **REPRODUCED (behaviour) / DIVERGED (evidence)** — a reconstructed probe does observe `21` and `111`. But **no test or harness in the tree at `bc2f26d` asserts either number, and none ever exercises the wrap seam at all.** See divergence detail A. |
|
||||
| 2 | "P2 codegen shrinks **TRUE** 5042 -> 4977" | `0009-codegen-linecount-parent-and-commit.out`, `0011-codegen-linecount-every-commit-in-range.out` | `bc2f26d^`, `bc2f26d` | **DIVERGED** — observed `5043 -> 4976` (−67). Claimed `5042 -> 4977` (−65). Neither endpoint matches; no commit in `5718943^..c04d68f` has codegen.el at 5042 or 4977 lines. Direction of the claim (it shrinks) holds. See detail B. |
|
||||
| 3 | "P3 cost 5-10% from an indirect call on every fn **TRUE** 0.36s -> 0.39s, ~8%" | `0036-P3-timing-parent-vs-commit-gen3.out`, `0037-P3-timing-two-workloads-n21.out` | `bc2f26d^` vs `bc2f26d` | **DIVERGED** on the ratio; **NOT-REPRODUCIBLE** on the absolutes. Re-measured overhead is **+0.6 % to +2.3 %**, not ~8 %. No workload in the tree runs anywhere near 0.36 s. See detail C. |
|
||||
| 4 | "P4 zero-param fns break on the empty struct **TRUE** — empty struct is a GNU extension, empty init is C23. Fixed with a char field." | `0017-P4-zero-param-env-struct-emitted-c.out`, `0005/0041-native-compiler-tests*.out` | `bc2f26d` | **REPRODUCED** — emitted C contains `struct __env_noargs { char __e0; };` and `struct __env_noargs __env = { 0 };`; no empty struct, no empty initialiser; the emitted C passes `-std=c11 -pedantic-errors -fsyntax-only`. The `char __e0` return is at `codegen.el:3226` at `bc2f26d` and absent at the parent. Test `zero-param-fn-emits-valid-c` passes. |
|
||||
| 5 | "P5 fixpoint holds **TRUE**" | `0038-selfhost-fixpoint-gen2-gen3.out` (and `0008-REDO-…`) | `bc2f26d` | **REPRODUCED** — gen2 == gen3, identical sha256 `02c9b3e2…`, 14360 lines each. gen1 (from the committed `dist/platform/elc`) differs, which is expected because this commit changes codegen's output. See measurement defect 1. |
|
||||
| 6 | "PROCESS FAILURE … The build then failed with 'undeclared identifier __thunk_noargs'" | `0039-thunk-noargs-and-seam-caller-search.out` | range `5718943^..c04d68f` | **NOT-CAPTURED** — the state described was never committed. The literal `__thunk_noargs` appears in no committed file at any commit in the range; it is a name codegen *generates* (`codegen.el:3356`). In the C emitted at `bc2f26d` the thunk is declared at line 12 and used at line 19, and the file compiles and runs clean. The failure is a real-but-transient working-tree state with no artifact. |
|
||||
| 7 | "Removed: declare_wrap, decorator_wrap, cg_wrap_target, cg_wrap_construct, params_to_call_args, and the wraps_body scanner branch" | `0012-removed-symbols-parent-vs-commit.out`, `0013-params_to_call_args-orphan-comment.out`, `0045-wraps_body-scanner-branch-at-parent.out` | `bc2f26d^`, `bc2f26d` | **DIVERGED (one of six)** — five of six are gone from the whole tree. `params_to_call_args` loses its definition (parent codegen.el:3299) and its only call site (parent codegen.el:3415), but its **two-line doc comment survives at `bc2f26d` codegen.el:3269**, describing a function that no longer exists. See detail D. |
|
||||
| 8 | "prohibits_outside is now the ONLY construct kind left at compile time" | `0014-construct-kinds-parent-vs-commit.out` | `bc2f26d` | **REPRODUCED, with a scope note** — `prohibits_outside` is the only kind name with executable dispatch in codegen.el (`str_eq(dkind, "prohibits_outside")` at line 4326). `injects_at_entry`, `guards_at_entry`, `injects_at_exit` each survive at exactly one line, all of them `//` doc comments. `wraps_body` is gone tree-wide. Note the claim was already true of the other three at the **parent** — this commit's contribution is removing `wraps_body` only. |
|
||||
| 9 | (not stated in the doc) native compiler test result at `bc2f26d` | `0005-native-compiler-tests.out`, `0041-native-compiler-tests-gen2-binary.out` | `bc2f26d` | **REPRODUCED as fact, but the doc records nothing to check it against** — `100 tests, 100 passed, 0 failed, 241 assertions`. Parent: `99 tests, 99 passed, 0 failed, 239 assertions` (`0043`). The doc gives no test count for this commit; its absence is itself a gap, since the commit deletes a test (`declared-wrap-emits-closure-and-convention`) and adds two. |
|
||||
| 10 | (not stated in the doc) integration harness result at `bc2f26d` | `0007`, `0042`, `0043` | `bc2f26d` | **REPRODUCED as fact** — `seam_binding.sh`: `7 assertions, 7 passed, 0 failed`. At the parent the same harness reports `7 assertions, 6 passed, 0 failed` — an arithmetic bug (`$((6-FAILS))`) that this commit fixes. **The commit adds no assertion**; its only substantive harness change is appending a dead `thrice` target. |
|
||||
| 11 | "a construct bound after the build decides how and whether to invoke it" (ISHIKAWA) | `0016`, `0007`/`0042` | `bc2f26d` | **REPRODUCED** — via the reconstructed probe for the wrap phase, and directly by the shipped harness for the entry/exit/refuse phases. |
|
||||
| 12 | (not stated in the doc) `bc2f26d` silently fixes a harness pass-count bug | `0046-seam_binding-tally-history.out` | `bc2f26d` | **OBSERVED BUT UNCLAIMED** — see detail E. |
|
||||
|
||||
**Counts: 6 REPRODUCED · 4 DIVERGED · 1 NOT-CAPTURED · 1 OBSERVED-BUT-UNCLAIMED · (0 pure NOT-REPRODUCIBLE; claim 3 carries a NOT-REPRODUCIBLE component on its absolute figures).**
|
||||
|
||||
---
|
||||
|
||||
## Divergence detail A — P1's 21 and 111 have no evidence in the tree
|
||||
|
||||
This is the substantive finding for cycle 07.
|
||||
|
||||
The numbers are **behaviourally correct** — I observed `21` and `111`. What is not correct is
|
||||
the implication that the commit *demonstrated* them.
|
||||
|
||||
What `bc2f26d` actually did to `lang/tests/integration/seam_binding.sh` (the whole diff, from
|
||||
`git diff bc2f26d^ bc2f26d -- lang/tests/integration/`):
|
||||
|
||||
1. appended a `thrice` wrap target to `$WORK/targets.c`, and
|
||||
2. changed the summary line from `$((6-FAILS))` to `$((7-FAILS))`.
|
||||
|
||||
Both are inert with respect to P1:
|
||||
|
||||
- **`thrice` is never compiled.** `targets.c` is written at harness line 29 and passed to `cc`
|
||||
at line 57. The `cat >> "$WORK/targets.c"` that adds `thrice` is at **line 86** — twenty-nine
|
||||
lines *after* the binary was already linked. Nothing recompiles it (`0040` §5d).
|
||||
- **No `wrap`-phase binding is ever written.** `el_seam_load` at `bc2f26d` recognises three
|
||||
phases (`entry`, `exit`, `wrap`); the harness writes `entry` and `exit` binding files only.
|
||||
`0040` §5e: no `printf '… wrap …'` anywhere in the harness. §6: no `wrap` binding in any
|
||||
`.sh`/`.txt` in the tree.
|
||||
- **The strings `21` and `111` do not occur in the harness at all** (`0040` §5b). Its seven
|
||||
expectations are `7`, `SEEN work/audited\n7`, `42`, `7`, `7`, `SEEN work/a\nSEEN work/b\n7`,
|
||||
`14` (`0040` §5c).
|
||||
- The commit's own native test comments say the N-times behaviour "lives in
|
||||
`tests/integration/seam_binding.sh`" — it does not.
|
||||
- `tests/integration/seam_caller.sh` **does not exist at any commit in `5718943^..c04d68f`**
|
||||
(`0040` §4). It first appears at `d9d1571`, a v2-era commit, and is unrelated to this cycle.
|
||||
(The parent agent's hint to look for it is answered: not here.)
|
||||
|
||||
So the 7→7 pass count reported by the harness at `bc2f26d` is the *same seven assertions* the
|
||||
parent already ran; the commit fixed the arithmetic that had been under-reporting them as 6.
|
||||
|
||||
**The reconstruction (an INPUT, not evidence).** `evidence/.../probe07.sh`, output captured as
|
||||
`0016`. It is modelled line-for-line on `seam_binding.sh` at `bc2f26d`: the same `prog.el`
|
||||
(`fn work() -> Int { return 7 }`), the same `thrice` target *verbatim including its comment*,
|
||||
the same `EL_CONSTRUCTS` file format, and the phase name `wrap` read from `el_seam_load` in
|
||||
`el_runtime.c` at `bc2f26d`. The one thing not recoverable from the record is the
|
||||
"never invoked" target — the record names no symbol — so `never()` (returns 111 without
|
||||
calling the body) is invented to match the stated semantics. Observed:
|
||||
|
||||
```
|
||||
== baseline, no binding (work() returns 7) == 7
|
||||
== wrap binding -> thrice (expect 21) == 21
|
||||
== wrap binding -> never (expect 111) == 111
|
||||
```
|
||||
|
||||
`7 × 3 = 21` corroborates that the record's "body x3" was measured against this same
|
||||
`work() -> 7` fixture. `111` is only as faithful as the invented target.
|
||||
|
||||
## Divergence detail B — P2's line counts
|
||||
|
||||
| | claimed | observed (`wc -l`, blob straight out of git) |
|
||||
|---|---|---|
|
||||
| parent `bc2f26d^` | 5042 | **5043** |
|
||||
| commit `bc2f26d` | 4977 | **4976** |
|
||||
| delta | −65 | **−67** |
|
||||
|
||||
Both blobs end in a newline (`0009` checks the last byte), so `wc -l` is exact; there is no
|
||||
trailing-newline ambiguity to absorb the difference. `git diff --numstat` for codegen.el is
|
||||
`12 79` (+12 / −79 = −67), independently confirming the observed delta.
|
||||
|
||||
**No commit in `5718943^..c04d68f` ever has codegen.el at 5042 or 4977 lines** (`0011`,
|
||||
explicit search: `NONE`). The full sequence over the range is:
|
||||
|
||||
```
|
||||
5718943f2 4800 60737b030 4850 4f7568b07 4953 2bed8483f 5084
|
||||
7d01608a9 5084 1b324a071 5152 35b07bade 5156 82e998273 5152
|
||||
886626a64 5156 28d19da7f 5095 8bbb750c2 5095 24f7fb514 5095
|
||||
285166c25 5043 b40754f07 5043 bc2f26ddf 4976 c04d68f9c 4976
|
||||
```
|
||||
|
||||
Cross-checking the parent agent's note: **cycle 03** claims "5094 -> 5044" — observed
|
||||
`24f7fb5 = 5095` → `285166c = 5043`. **Cycle 06** claims "5157 -> 5096" — observed
|
||||
`35b07ba = 5156`, `28d19da = 5095`. So every one of these three records is off by one on
|
||||
every endpoint, but **not in a consistent direction**: cycle 06 is +1 on both ends, while
|
||||
cycles 03 and 07 are −1 on the parent and +1 on the commit. A single systematic counting
|
||||
convention (e.g. counting a missing final newline) would produce a uniform offset; this does
|
||||
not. The line numbers in these records were not produced by a reproducible instrument.
|
||||
|
||||
The qualitative claim — "codegen shrinks" — is unambiguously true, by 67 lines.
|
||||
|
||||
## Divergence detail C — P3's ~8 % cost
|
||||
|
||||
The record's absolute figures (`0.36s -> 0.39s`) are **NOT-REPRODUCIBLE**: the workload is not
|
||||
named, and nothing in the tree at `bc2f26d` takes anything like 0.36 s on this machine
|
||||
(`0037`, tail): `elc elc-cli.el` 0.067 s, `elc --test tests/native/test_compiler.el` 0.068 s,
|
||||
`elc --test tests/native/test_lexer_scaling.el` 0.030 s. The compiled native test binary runs
|
||||
in 5.9 ms. Whatever was timed, it is not identifiable from the record.
|
||||
|
||||
The **ratio** is the load-bearing part, so I re-measured it. Construction (`time07b.sh`, both
|
||||
scripts stored beside this file):
|
||||
|
||||
- The cost under test is paid by code **emitted** by the new codegen, so both binaries must be
|
||||
gen2 — self-emitted by their own commit's compiler. `/tmp/elc07pb` = elc self-emitted at
|
||||
`bc2f26d^` (wrapper calls the body **directly**; 0 occurrences of `el_seam_wrap` in its C);
|
||||
`/tmp/elc07b` = elc self-emitted at `bc2f26d` (254 occurrences of `el_seam_wrap`).
|
||||
- Both are handed the **same** input, in the same CWD (`bc2f26d`'s `lang/`), so the only
|
||||
difference is the calling convention compiled into the binary.
|
||||
- Runs are interleaved, warmed, n = 21 per arm, two workloads.
|
||||
|
||||
Observed (`0037`):
|
||||
|
||||
| workload | parent median | commit median | ratio (median) | ratio (min) | ratio (mean) |
|
||||
|---|---|---|---|---|---|
|
||||
| `elc elc-cli.el` | 0.06482 s | 0.06576 s | **+1.45 %** | +2.31 % | +1.92 % |
|
||||
| `elc --test tests/native/test_compiler.el` | 0.06758 s | 0.06821 s | **+0.93 %** | +0.62 % | +1.36 % |
|
||||
|
||||
An earlier, independent n = 11 run (`0036`) on the first workload gave **+0.64 % median /
|
||||
+0.16 % min**. The overhead is real and positive in every arm of every run, but it sits at
|
||||
**roughly 1 %, not ~8 %** — outside the predicted 5–10 % band, i.e. the prediction as scored
|
||||
would be FALSE on this machine, not TRUE.
|
||||
|
||||
Caveats stated plainly, not to rescue the claim: this is an Apple M4 Pro under load avg ≈5–6;
|
||||
`el_seam_wrap`'s fast path is `if (_el_seam_n == 0) return body(env);` and a wide
|
||||
out-of-order core hides that better than most; and the workload the record actually used is
|
||||
unknown, so I cannot rule out that some other program shows 8 %. No number here is rounded
|
||||
toward the claimed value.
|
||||
|
||||
## Divergence detail D — `params_to_call_args` is not fully removed
|
||||
|
||||
Of the six things the record says were removed, five vanish from the entire tree between
|
||||
`bc2f26d^` and `bc2f26d`: `declare_wrap`, `decorator_wrap`, `cg_wrap_target`,
|
||||
`cg_wrap_construct`, and the `wraps_body` scanner branch (`0012`; the branch itself is shown at
|
||||
`0045`, parent codegen.el:4385, together with the `declare_wrap(fname, pending_wrap)` call it
|
||||
guarded).
|
||||
|
||||
`params_to_call_args` does not. At the parent it has three occurrences — a doc comment (3297),
|
||||
the definition (3299), and one call site (3415). At `bc2f26d` the definition and the call site
|
||||
are gone but the comment remains:
|
||||
|
||||
```
|
||||
bc2f26d:lang/el-compiler/src/codegen.el:3269:// params_to_call_args — "a, b, c" from the param list, for the wrapper's call
|
||||
bc2f26d:lang/el-compiler/src/codegen.el:3270:// into the body helper.
|
||||
```
|
||||
|
||||
`git grep "^fn params_to_call_args"` at `bc2f26d` → no definition. It is an orphaned two-line
|
||||
comment sitting immediately above `fn cg_fn`, documenting a function that no longer exists, and
|
||||
it survives unchanged into `c04d68f`. Harmless, but the record's "Removed:" list overstates by
|
||||
one item, and the residue is exactly the kind of thing the commit message's own
|
||||
"the guard that would have caught it existed and I removed it" paragraph is about.
|
||||
|
||||
## Detail E — an undocumented fix: the harness pass tally
|
||||
|
||||
`bc2f26d` also fixes a bug its own record never mentions. Independently flagged by the cycle 08
|
||||
agent and confirmed here (`0046`):
|
||||
|
||||
```
|
||||
8bbb750c2 check-calls=6 echo " 6 assertions, $((6-FAILS)) passed, $FAILS failed"
|
||||
24f7fb514 check-calls=6 echo " 6 assertions, $((6-FAILS)) passed, $FAILS failed"
|
||||
285166c25 check-calls=7 echo " 7 assertions, $((6-FAILS)) passed, $FAILS failed" <- seventh check added, tally not bumped
|
||||
b40754f07 check-calls=7 echo " 7 assertions, $((6-FAILS)) passed, $FAILS failed"
|
||||
bc2f26ddf check-calls=7 echo " 7 assertions, $((7-FAILS)) passed, $FAILS failed" <- fixed here
|
||||
c04d68f9c check-calls=7 echo " 7 assertions, $((7-FAILS)) passed, $FAILS failed"
|
||||
```
|
||||
|
||||
`285166c` (cycle 03's experiment) added the seventh `check` and updated the header text to
|
||||
"7 assertions" but left the arithmetic at `$((6-FAILS))`, so a fully green run printed
|
||||
`7 assertions, 6 passed, 0 failed` — confirmed by running the harness at the parent (`0043`),
|
||||
which prints exactly that with zero failures. `bc2f26d` changes it to `$((7-FAILS))` and the
|
||||
run at this commit prints `7 assertions, 7 passed, 0 failed` (`0007`, `0042`).
|
||||
|
||||
Worth recording for two reasons. First, a commit doing something its record does not mention is
|
||||
a gap in the record regardless of whether the change is a fix. Second, it is the *only*
|
||||
substantive thing `bc2f26d` does to the harness that has any effect — the `thrice` target it
|
||||
also adds is dead code (detail A) — which sharpens the point that the record's headline P1
|
||||
result was never wired into the test suite. The harness self-report was under-counting a green
|
||||
run for two cycles before anyone noticed, which is the same class of silent-instrument defect
|
||||
the commit message's PROCESS FAILURE paragraph is about.
|
||||
|
||||
---
|
||||
|
||||
## Measurement defects in this re-run, recorded rather than removed
|
||||
|
||||
1. **`0006-selfhost-fixpoint.out` is defective and retained.** It ran the recipe's original
|
||||
fixpoint command, which compares **gen1 vs gen2** — gen1 being the output of the committed
|
||||
`dist/platform/elc`, which is stale at this commit and predates the seam entirely (0
|
||||
occurrences of `el_seam_wrap`). Since `bc2f26d` changes what codegen emits, gen1 ≠ gen2 is
|
||||
*expected*, and the artifact's `differ: char 12626, line 259` is not a finding. The correct
|
||||
check is gen2 == gen3, captured as `0038-selfhost-fixpoint-gen2-gen3.out` (and, under a
|
||||
confusing name that used 1-based generation numbering, `0008-REDO-selfhost-fixpoint-gen3-gen4.out`
|
||||
— same two files compared, `/tmp/g07b.c` vs `/tmp/g07c.c`). This was a recipe defect, not a
|
||||
tree defect; it is left in the manifest because deleting a failed measurement is the failure
|
||||
mode this record exists to control for. Do not cite `0006`.
|
||||
2. **`0039-thunk-noargs-and-seam-caller-search.out` sections 4 and 5 are defective and
|
||||
retained.** The script `cd`'d into `<worktree>/lang` for section 3 and never returned, so
|
||||
sections 4 and 5 ran with CWD = `lang/` and their pathspecs (`lang/tests/integration/`)
|
||||
resolved to `lang/lang/…` and matched nothing. The "NONE" printed by section 4 was an
|
||||
artifact of the CWD, not a result — this is precisely the cycle-01 defect repeating.
|
||||
Sections 1–3 of `0039` ran from the repo root and are sound. The corrected re-run is
|
||||
`0040-REDO-seam-caller-and-wrap-assertion-search.out`, which prints its own CWD as a guard.
|
||||
Do not cite `0039` §4–5.
|
||||
3. **Artifact index numbers are not contiguous** (0017 jumps to 0036). `capture.sh` derives the
|
||||
next index from `grep -c . MANIFEST.tsv`, and several of my commands were multi-line shell
|
||||
scripts passed to `bash -c`, so the command field written to the manifest contained embedded
|
||||
newlines and inflated the line count. No data is affected — `verify-manifest.sh` reports
|
||||
0 altered, 0 missing — but the numbering gap is an instrument artifact, not a lost artifact.
|
||||
Subsequent captures put multi-line scripts in files (`probe07.sh`, `thunk07b.sh`, …, stored
|
||||
alongside this file) and pass a single-line command.
|
||||
4. **The parent-commit context measurement (`0043`) is stamped with the wrong SHA.** The parent
|
||||
tree was materialised with `git archive bc2f26d^ | tar -x -C /tmp/el07parent` rather than a
|
||||
worktree (worktree creation is owned by the parent agent for this run), and `/tmp/el07parent`
|
||||
is not a git repo, so `capture.sh` was invoked from `/tmp/rerun-v1-07` and stamped `bc2f26d`.
|
||||
The **subject** of that measurement is `bc2f26d^`. The script defends against a bad extraction
|
||||
by hashing `codegen.el` and `test_compiler.el` against the `bc2f26d^` blobs before measuring
|
||||
(both MATCH, printed in the artifact). Read `0043`'s provenance as "taken during the bc2f26d
|
||||
run", not "measured at bc2f26d". The same applies to the parent arm of the timing artifacts
|
||||
`0036`/`0037`.
|
||||
|
||||
## Inputs stored alongside the evidence
|
||||
|
||||
`probe07.sh`, `time07.sh`, `time07b.sh`, `thunk07.sh`, `thunk07b.sh`, `parent07.sh` are the
|
||||
scripts whose captured *output* is the evidence. They are inputs, not artifacts, and are not in
|
||||
`MANIFEST.tsv`. `probe07.sh` in particular is a **reconstruction** — see divergence detail A.
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
# parent07.sh — native compiler test count at the PARENT commit bc2f26d^ (b40754f),
|
||||
# for context: the cycle doc records no native test count at all.
|
||||
#
|
||||
# PROVENANCE NOTE: the parent tree is an extraction, `git archive bc2f26d^ | tar -x`,
|
||||
# into /tmp/el07parent — NOT a git worktree (the parent agent owns worktree creation
|
||||
# for this run). capture.sh was therefore invoked from /tmp/rerun-v1-07, so the
|
||||
# artifact's stamped SHA is bc2f26d; the SUBJECT of the measurement is bc2f26d^.
|
||||
# The extraction is verified below by diffing it against the bc2f26d^ blob for
|
||||
# codegen.el.
|
||||
set -uo pipefail
|
||||
cd /tmp/rerun-v1-07 || exit 1
|
||||
echo "== verify the extracted tree really is bc2f26d^ =="
|
||||
a=$(git show 'bc2f26d^:lang/el-compiler/src/codegen.el' | shasum -a 256 | cut -d' ' -f1)
|
||||
b=$(shasum -a 256 /tmp/el07parent/lang/el-compiler/src/codegen.el | cut -d' ' -f1)
|
||||
echo " git blob bc2f26d^:lang/el-compiler/src/codegen.el $a"
|
||||
echo " /tmp/el07parent/lang/el-compiler/src/codegen.el $b"
|
||||
[ "$a" = "$b" ] && echo " MATCH" || { echo " MISMATCH — abort"; exit 1; }
|
||||
a=$(git show 'bc2f26d^:lang/tests/native/test_compiler.el' | shasum -a 256 | cut -d' ' -f1)
|
||||
b=$(shasum -a 256 /tmp/el07parent/lang/tests/native/test_compiler.el | cut -d' ' -f1)
|
||||
echo " test_compiler.el blob $a"
|
||||
echo " test_compiler.el file $b"
|
||||
[ "$a" = "$b" ] && echo " MATCH" || { echo " MISMATCH — abort"; exit 1; }
|
||||
|
||||
echo
|
||||
echo "== native compiler tests at bc2f26d^ (built gen2, same procedure as the commit) =="
|
||||
cd /tmp/el07parent/lang || exit 1
|
||||
SRCS=$(../scripts/el-runtime-sources.sh runtime)
|
||||
CF="-std=c11 -O2 -I runtime"; LF=""
|
||||
for d in /opt/homebrew/opt/openssl@3 /usr/local/opt/openssl@3; do
|
||||
[ -d "$d" ] && CF="$CF -I $d/include" && LF="-L $d/lib"
|
||||
done
|
||||
LF="$LF -lcurl -lssl -lcrypto -lpthread -lm"
|
||||
/tmp/elc07pb --test tests/native/test_compiler.el > /tmp/tp07.c || exit 1
|
||||
cc $CF -o /tmp/tp07 /tmp/tp07.c $SRCS $LF 2>/dev/null || exit 1
|
||||
/tmp/tp07 | tail -4
|
||||
|
||||
echo
|
||||
echo "== integration seam_binding.sh at bc2f26d^ =="
|
||||
bash tests/integration/seam_binding.sh /tmp/elc07pb "$PWD" | tail -4
|
||||
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env bash
|
||||
# probe07.sh — RECONSTRUCTED probe for cycle 07 P1 ("body x3 -> 21, never invoked -> 111").
|
||||
#
|
||||
# This file is an INPUT, not evidence. No probe asserting 21 or 111 exists in the
|
||||
# tree at bc2f26d. It is modelled line-for-line on lang/tests/integration/seam_binding.sh
|
||||
# as it stands at bc2f26d:
|
||||
# - same prog.el (fn work() -> Int { return 7 }; main prints work())
|
||||
# - same targets.c wrap target `thrice` (verbatim, incl. its comment)
|
||||
# - same EL_CONSTRUCTS binding-file format: "<fn> <construct> <phase> <target>"
|
||||
# - phase name "wrap" is read from el_runtime.c's el_seam_load at bc2f26d
|
||||
# The only thing NOT recoverable from the tree is the "never invoked" target; the
|
||||
# record names no such symbol. `never` below is invented to match the stated
|
||||
# semantics (return 111 without calling the body).
|
||||
#
|
||||
# usage: probe07.sh <elc-binary> <lang-dir>
|
||||
set -uo pipefail
|
||||
ELC="${1:?usage: probe07.sh <elc-binary> <lang-dir>}"
|
||||
LANG_DIR="${2:?usage: probe07.sh <elc-binary> <lang-dir>}"
|
||||
WORK="$(mktemp -d)"; trap 'rm -rf "$WORK"' EXIT
|
||||
|
||||
SRCS=$("$LANG_DIR/../scripts/el-runtime-sources.sh" "$LANG_DIR/runtime")
|
||||
CFLAGS="-std=c11 -O2 -rdynamic -I $LANG_DIR/runtime"
|
||||
for d in /opt/homebrew/opt/openssl@3 /usr/local/opt/openssl@3; do
|
||||
[ -d "$d" ] && CFLAGS="$CFLAGS -I $d/include" && LDFLAGS="-L $d/lib"
|
||||
done
|
||||
LDFLAGS="${LDFLAGS:-} -lcurl -lssl -lcrypto -lpthread -lm"
|
||||
|
||||
cat > "$WORK/targets.c" <<'EOF'
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
typedef int64_t el_val_t;
|
||||
/* verbatim from seam_binding.sh at bc2f26d */
|
||||
el_val_t thrice(el_val_t fn, el_val_t con, el_val_t (*b)(void*), void* e){
|
||||
(void)fn; (void)con; return b(e) + b(e) + b(e); /* wrap: invoke N times */
|
||||
}
|
||||
/* NOT in the tree — reconstructed to match "never invoked -> 111" */
|
||||
el_val_t never(el_val_t fn, el_val_t con, el_val_t (*b)(void*), void* e){
|
||||
(void)fn; (void)con; (void)b; (void)e; return 111;
|
||||
}
|
||||
EOF
|
||||
|
||||
# verbatim from seam_binding.sh at bc2f26d
|
||||
cat > "$WORK/prog.el" <<'EOF'
|
||||
fn work() -> Int {
|
||||
return 7
|
||||
}
|
||||
|
||||
fn main() {
|
||||
println(int_to_str(work()))
|
||||
}
|
||||
EOF
|
||||
|
||||
"$ELC" "$WORK/prog.el" > "$WORK/prog.c" 2>/dev/null
|
||||
cc $CFLAGS -o "$WORK/prog" "$WORK/prog.c" "$WORK/targets.c" $SRCS $LDFLAGS 2>/dev/null \
|
||||
|| { echo "PROBE DID NOT BUILD"; exit 1; }
|
||||
|
||||
echo "== baseline, no binding (work() returns 7) =="
|
||||
(cd "$WORK" && ./prog 2>&1)
|
||||
|
||||
echo "== wrap binding -> thrice (body invoked 3x; expect 21) =="
|
||||
printf 'work tripler wrap thrice\n' > "$WORK/x3.txt"
|
||||
(cd "$WORK" && EL_CONSTRUCTS=x3.txt ./prog 2>&1)
|
||||
|
||||
echo "== wrap binding -> never (body never invoked; expect 111) =="
|
||||
printf 'work skipper wrap never\n' > "$WORK/never.txt"
|
||||
(cd "$WORK" && EL_CONSTRUCTS=never.txt ./prog 2>&1)
|
||||
|
||||
echo "== binding file contents used =="
|
||||
echo "--- x3.txt"; cat "$WORK/x3.txt"
|
||||
echo "--- never.txt"; cat "$WORK/never.txt"
|
||||
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
# thunk07.sh — does the recorded PROCESS FAILURE ("build failed with 'undeclared
|
||||
# identifier __thunk_noargs'") correspond to any COMMITTED state?
|
||||
cd /tmp/rerun-v1-07 || exit 1
|
||||
echo "== 1. does the literal string __thunk_noargs appear in any committed source, anywhere in the range? =="
|
||||
found=0
|
||||
for c in $(git rev-list 5718943^..c04d68f); do
|
||||
if git grep -q -- "__thunk_noargs" "$c" 2>/dev/null; then
|
||||
echo " HIT $(git rev-parse --short=9 "$c")"; found=1
|
||||
fi
|
||||
done
|
||||
[ "$found" = 0 ] && echo " NONE — the literal never appears in any committed file in 5718943^..c04d68f"
|
||||
|
||||
echo
|
||||
echo "== 2. __thunk_noargs is a NAME THE COMPILER GENERATES, not source text. Where does it come from? =="
|
||||
git grep -n '"__thunk_" ' bc2f26d -- lang/el-compiler/src/codegen.el
|
||||
git grep -n '__thunk_' bc2f26d -- lang/el-compiler/src/codegen.el
|
||||
|
||||
echo
|
||||
echo "== 3. in the C emitted at bc2f26d for a zero-param fn, is __thunk_noargs DECLARED before use? =="
|
||||
W=$(mktemp -d)
|
||||
printf 'fn noargs() -> Int {\n return 3\n}\nfn main() {\n println(int_to_str(noargs()))\n}\n' > "$W/n07.el"
|
||||
/tmp/elc07b "$W/n07.el" > "$W/n07.c"
|
||||
grep -n "__thunk_noargs" "$W/n07.c"
|
||||
echo
|
||||
echo "-- compile that C standalone, strict C11, no GNU extensions --"
|
||||
cd /tmp/rerun-v1-07/lang || exit 1
|
||||
SRCS=$(../scripts/el-runtime-sources.sh runtime)
|
||||
CF="-std=c11 -O2 -I runtime"; LF=""
|
||||
for d in /opt/homebrew/opt/openssl@3 /usr/local/opt/openssl@3; do
|
||||
[ -d "$d" ] && CF="$CF -I $d/include" && LF="-L $d/lib"
|
||||
done
|
||||
LF="$LF -lcurl -lssl -lcrypto -lpthread -lm"
|
||||
cc $CF -o "$W/n07" "$W/n07.c" $SRCS $LF 2>&1 | grep -i "thunk\|error" || echo " (no error mentioning thunk)"
|
||||
"$W/n07"; echo " program exit=$? (printed value above)"
|
||||
echo
|
||||
echo "-- and the same emitted C under -pedantic-errors, which rejects the GNU empty-struct extension --"
|
||||
cc -pedantic-errors $CF -fsyntax-only "$W/n07.c" 2>&1 | head -20 || true
|
||||
echo " syntax-only rc above (empty output = clean)"
|
||||
rm -rf "$W"
|
||||
|
||||
echo
|
||||
echo "== 4. does tests/integration/seam_caller.sh exist at ANY commit in the range? =="
|
||||
found=0
|
||||
for c in $(git rev-list 5718943^..c04d68f); do
|
||||
if git ls-tree -r --name-only "$c" -- lang/tests/integration/ 2>/dev/null | grep -q seam_caller; then
|
||||
echo " HIT $(git rev-parse --short=9 "$c")"; found=1
|
||||
fi
|
||||
done
|
||||
[ "$found" = 0 ] && echo " NONE — seam_caller.sh does not exist at any commit in 5718943^..c04d68f"
|
||||
echo
|
||||
echo " integration harnesses present at bc2f26d:"
|
||||
git ls-tree -r --name-only bc2f26d -- lang/tests/integration/
|
||||
|
||||
echo
|
||||
echo "== 5. does any committed file anywhere in the range assert 21 or 111 for the wrap seam? =="
|
||||
git grep -n -- "thrice" bc2f26d || echo " (thrice appears nowhere at bc2f26d... )"
|
||||
echo " --- grep for '21' / '111' as expected values in seam_binding.sh at bc2f26d ---"
|
||||
git show bc2f26d:lang/tests/integration/seam_binding.sh | grep -n '"21"\|"111"\|21$\|111$' || echo " NONE — no assertion on 21 or 111"
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
# thunk07b.sh — REDO of sections 4 and 5 of thunk07.sh.
|
||||
# DEFECT BEING CORRECTED: thunk07.sh cd'd into <worktree>/lang for section 3 and
|
||||
# never cd'd back, so sections 4 and 5 ran with CWD=lang/ and their pathspecs
|
||||
# ("lang/tests/integration/") resolved to lang/lang/... and matched nothing. The
|
||||
# "NONE" in the original section 4 was an artifact of that, not a finding.
|
||||
cd /tmp/rerun-v1-07 || exit 1
|
||||
echo "CWD: $(pwd) (must be the repo ROOT for these pathspecs)"
|
||||
echo
|
||||
echo "== 4. does tests/integration/seam_caller.sh exist at ANY commit in 5718943^..c04d68f? =="
|
||||
found=0
|
||||
for c in $(git rev-list 5718943^..c04d68f); do
|
||||
if git ls-tree -r --name-only "$c" -- lang/tests/integration/ 2>/dev/null | grep -q seam_caller; then
|
||||
echo " HIT $(git rev-parse --short=9 "$c")"; found=1
|
||||
fi
|
||||
done
|
||||
[ "$found" = 0 ] && echo " NONE"
|
||||
echo
|
||||
echo " -- and does it exist at any commit at all in this repo's history? --"
|
||||
git log --all --oneline --name-only -- '*seam_caller*' | head -20 || true
|
||||
echo " (empty above = never existed)"
|
||||
echo
|
||||
echo "== integration harnesses present at each commit in the range =="
|
||||
for c in $(git rev-list --reverse 5718943^..c04d68f); do
|
||||
printf " %s %s\n" "$(git rev-parse --short=9 "$c")" "$(git ls-tree -r --name-only "$c" -- lang/tests/integration/ | tr '\n' ' ')"
|
||||
done
|
||||
echo
|
||||
echo "== 5. where does 'thrice' appear at bc2f26d (repo-root scope)? =="
|
||||
git grep -n -- "thrice" bc2f26d || echo " (nowhere)"
|
||||
echo
|
||||
echo "== 5b. does seam_binding.sh at bc2f26d assert 21 or 111 anywhere? =="
|
||||
git show bc2f26d:lang/tests/integration/seam_binding.sh | grep -n "21\|111" || echo " NONE — the strings 21 and 111 do not occur in the harness"
|
||||
echo
|
||||
echo "== 5c. every check() expectation in seam_binding.sh at bc2f26d, in order =="
|
||||
git show bc2f26d:lang/tests/integration/seam_binding.sh | grep -n 'check "' -A1
|
||||
echo
|
||||
echo "== 5d. is the appended 'thrice' target ever compiled? (targets.c is cc'd BEFORE the append) =="
|
||||
git show bc2f26d:lang/tests/integration/seam_binding.sh | grep -n 'cat > "\$WORK/targets.c"\|cat >> "\$WORK/targets.c"\|^cc \|cc \$CFLAGS\|EL_CONSTRUCTS='
|
||||
echo
|
||||
echo "== 5e. does any binding file in the harness use phase 'wrap'? =="
|
||||
git show bc2f26d:lang/tests/integration/seam_binding.sh | grep -n "printf '.* wrap " || echo " NONE — no 'wrap' phase binding is ever written by the harness"
|
||||
echo
|
||||
echo "== 6. treewide: any file at bc2f26d or c04d68f that binds phase 'wrap'? =="
|
||||
git grep -n " wrap " bc2f26d -- '*.sh' '*.txt' || echo " none in .sh/.txt"
|
||||
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
# time07.sh — re-measure cycle 07 P3 ("cost 5-10% from an indirect call on every fn").
|
||||
#
|
||||
# The thing under test is the cost paid by code EMITTED by the new codegen, so
|
||||
# both binaries must be gen3 (self-emitted by their own commit's compiler):
|
||||
# /tmp/elc07pb = elc self-emitted at bc2f26d^ (b40754f) — wrapper calls the body DIRECTLY
|
||||
# /tmp/elc07b = elc self-emitted at bc2f26d — wrapper calls through el_seam_wrap
|
||||
# Both are given the SAME input (bc2f26d's lang/elc-cli.el, CWD = bc2f26d worktree),
|
||||
# so the only difference is the emitted calling convention inside the binary.
|
||||
# Runs are interleaved to spread any drift in machine load across both arms.
|
||||
set -uo pipefail
|
||||
N="${1:-11}"
|
||||
cd /tmp/rerun-v1-07/lang || exit 1
|
||||
|
||||
run_one() { # $1 = binary ; prints elapsed seconds
|
||||
local s e
|
||||
s=$(python3 -c 'import time;print(time.perf_counter())')
|
||||
"$1" elc-cli.el > /dev/null 2>&1
|
||||
e=$(python3 -c 'import time;print(time.perf_counter())')
|
||||
python3 -c "print(f'{$e-$s:.4f}')"
|
||||
}
|
||||
|
||||
# warm the page cache for both
|
||||
run_one /tmp/elc07pb > /dev/null; run_one /tmp/elc07b > /dev/null
|
||||
|
||||
P=(); C=()
|
||||
for i in $(seq 1 "$N"); do
|
||||
P+=("$(run_one /tmp/elc07pb)")
|
||||
C+=("$(run_one /tmp/elc07b)")
|
||||
done
|
||||
|
||||
echo "parent bc2f26d^ (direct call) samples: ${P[*]}"
|
||||
echo "commit bc2f26d (el_seam_wrap) samples: ${C[*]}"
|
||||
echo
|
||||
python3 - "$N" "${P[@]}" "${C[@]}" <<'PY'
|
||||
import sys, statistics
|
||||
n=int(sys.argv[1]); v=[float(x) for x in sys.argv[2:]]
|
||||
p,c=v[:n],v[n:]
|
||||
def stats(x): return min(x), statistics.median(x), max(x)
|
||||
pm,pmd,pmx=stats(p); cm,cmd,cmx=stats(c)
|
||||
print(f"parent n={n} min={pm:.4f}s median={pmd:.4f}s max={pmx:.4f}s")
|
||||
print(f"commit n={n} min={cm:.4f}s median={cmd:.4f}s max={cmx:.4f}s")
|
||||
print()
|
||||
print(f"ratio on min : {cm/pm:.4f} ({(cm/pm-1)*100:+.2f}%)")
|
||||
print(f"ratio on median : {cmd/pmd:.4f} ({(cmd/pmd-1)*100:+.2f}%)")
|
||||
PY
|
||||
echo
|
||||
echo "== machine =="
|
||||
uname -a
|
||||
sysctl -n machdep.cpu.brand_string 2>/dev/null
|
||||
uptime
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
# time07b.sh — second, larger re-measurement of cycle 07 P3, two workloads.
|
||||
# Same construction as time07.sh: gen2-self-emitted binaries at bc2f26d^ and bc2f26d,
|
||||
# identical inputs, interleaved runs.
|
||||
set -uo pipefail
|
||||
N="${1:-21}"
|
||||
cd /tmp/rerun-v1-07/lang || exit 1
|
||||
|
||||
now() { python3 -c 'import time;print(time.perf_counter())'; }
|
||||
|
||||
bench() { # $1 = label ; $2.. = args passed to each binary
|
||||
local label="$1"; shift
|
||||
local P=() C=() i s e
|
||||
"$@" >/dev/null 2>&1 <<<"" || true
|
||||
/tmp/elc07pb "$@" >/dev/null 2>&1; /tmp/elc07b "$@" >/dev/null 2>&1 # warm
|
||||
for i in $(seq 1 "$N"); do
|
||||
s=$(now); /tmp/elc07pb "$@" >/dev/null 2>&1; e=$(now)
|
||||
P+=("$(python3 -c "print(f'{$e-$s:.5f}')")")
|
||||
s=$(now); /tmp/elc07b "$@" >/dev/null 2>&1; e=$(now)
|
||||
C+=("$(python3 -c "print(f'{$e-$s:.5f}')")")
|
||||
done
|
||||
echo "### workload: $label (args: $*)"
|
||||
echo "parent bc2f26d^ : ${P[*]}"
|
||||
echo "commit bc2f26d : ${C[*]}"
|
||||
python3 - "$N" "${P[@]}" "${C[@]}" <<'PY'
|
||||
import sys, statistics
|
||||
n=int(sys.argv[1]); v=[float(x) for x in sys.argv[2:]]
|
||||
p,c=v[:n],v[n:]
|
||||
print(f" parent n={n} min={min(p):.5f} median={statistics.median(p):.5f} mean={statistics.mean(p):.5f} stdev={statistics.stdev(p):.5f}")
|
||||
print(f" commit n={n} min={min(c):.5f} median={statistics.median(c):.5f} mean={statistics.mean(c):.5f} stdev={statistics.stdev(c):.5f}")
|
||||
print(f" RATIO min={min(c)/min(p):.4f} ({(min(c)/min(p)-1)*100:+.2f}%) median={statistics.median(c)/statistics.median(p):.4f} ({(statistics.median(c)/statistics.median(p)-1)*100:+.2f}%) mean={statistics.mean(c)/statistics.mean(p):.4f} ({(statistics.mean(c)/statistics.mean(p)-1)*100:+.2f}%)")
|
||||
PY
|
||||
echo
|
||||
}
|
||||
|
||||
bench "self-compile: elc elc-cli.el" elc-cli.el
|
||||
bench "compile test_compiler.el in --test mode" --test tests/native/test_compiler.el
|
||||
|
||||
echo "== machine =="; uname -a; sysctl -n machdep.cpu.brand_string 2>/dev/null; uptime
|
||||
echo
|
||||
echo "== NOTE: no workload in the tree at bc2f26d runs anywhere near the record's 0.36s/0.39s =="
|
||||
for w in "elc-cli.el" "--test tests/native/test_compiler.el" "--test tests/native/test_lexer_scaling.el"; do
|
||||
s=$(now); /tmp/elc07b $w >/dev/null 2>&1; e=$(now)
|
||||
python3 -c "print(f' {$e-$s:.4f}s elc $w')"
|
||||
done
|
||||
Reference in New Issue
Block a user