Add js.sx bootstrapper docs page with G0 bug discovery writeup

Documents the self-hosting process for js.sx including the G0 bug
where Python's `if fn_expr` treated 0/False/"" as falsy, emitting
NIL instead of the correct value. Adds live verification page,
translation differences table, and nav entry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 01:44:02 +00:00
parent e6ca1a5f44
commit cad65bcdf1
6 changed files with 182 additions and 9 deletions

View File

@@ -872,7 +872,7 @@ class JSEmitter:
body = fn_expr[2:]
loop_body = self._emit_loop_body(name, body)
return f"var {self._mangle(name)} = function() {{ while(true) {{ {loop_body} }} }};"
val = self.emit(fn_expr) if fn_expr else "NIL"
val = self.emit(fn_expr) if fn_expr is not None else "NIL"
return f"var {self._mangle(name)} = {val};"
def _is_self_tail_recursive(self, name: str, body: list) -> bool: