std: io 와 fmt 를 Ferro 로 쓰고, 컴파일된 프로그램이 출력한다
io.Writer 는 핸들 하나짜리 enum 이다. 참조도 컨텍스트 포인터도 담지 않으므로 Copy 이고 자유롭게 오간다 (SPEC 5 R8). fmt 는 sink 를 소유하지 않는다 -- 호출자가 버퍼를 주고 앞에서 몇 바이트가 쓰였는지 돌려받는다. lowering 에 추가: enum 변이 상수, match, 정수 캐스트, 문자열 이스케이프. 프론트엔드 정밀도 하나: 항상 빠져나가는 분기의 상태를 병합하지 않는다. 그 분기가 소비한 값이 그 분기를 지나지 않은 경로에서도 소비된 것처럼 보였다. fmt_i32 가 이것 때문에 못 쓰였다. extern "c" 이름은 유닛 접두사를 붙이지 않는다. 링커가 이미 아는 이름이라는 것이 그 선언의 요점이다. run.py 199/199, exec.py 11/11.
This commit is contained in:
+2
-1
@@ -80,7 +80,8 @@ def run_case(fec: Path, path: Path) -> tuple[bool, str]:
|
||||
want = expectation(path)
|
||||
# The grammar fixtures are not all well-typed; stop after parsing.
|
||||
mode = "--dump-ast" if path.parent.name == "parse" else "--check"
|
||||
done = subprocess.run([str(fec), mode, str(path)],
|
||||
done = subprocess.run([str(fec), mode, str(path),
|
||||
f"--std={ROOT / 'fec'}"],
|
||||
capture_output=True, text=True, timeout=30)
|
||||
output = (done.stdout + done.stderr).strip()
|
||||
rejected = done.returncode != 0
|
||||
|
||||
Reference in New Issue
Block a user