raz / commit a839cfee

commit
a839cfeec46f1849344a4203792424a91f528b3f
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
6ca8826b
compiler.md: what the compiler asks of the library, after Host

patch · log

1 file changed, +10 -9

doc/compiler.md (history) modified +10 -9

@@ -2450,10 +2450,10 @@
24502450 also found by name for `fail`, `exit` and the places, as the previous
24512451 section says, and `NEW(p, a)` needs `a` to be a `^Mem.Allocator` and
24522452 calls its `alloc` field, the one library type the compiler knows by
2453-name. Besides the library, `src/` makes two system calls itself,
2454-`stat` in `Parse.identity` (a file's device and inode, for the
2455-one-module-of-each-name check) and `memfd_create` and `execve` in
2456-`Raz.raz` (`raz run`), and reads `SYSTEM.ARGV`.
2453+name. Besides the library, only `Host` reaches the system: Linux's makes
2454+`memfd_create` and `execve` itself for `raz run`, and reads
2455+`SYSTEM.ARGV` for the program's arguments and environment; another
2456+host's `Host` replaces all of it.
24572457
24582458 `test/asks.sh` keeps this list true: it fails when `src/` uses a
24592459 library name that is not a row here, or a row names one that `src/`
@@ -2464,8 +2464,8 @@
24642464
24652465 | Name | What for |
24662466 |---|---|
2467-| `Sys.access` | `Raz.muslHere`: whether the dynamic loaders of glibc and musl are installed |
2468-| `Sys.chmod` | `Elf.writeElf`: makes the program's file executable (mode 755) |
2467+| `Sys.access` | `Host.cLibrary`: whether the dynamic loaders of glibc and musl are installed |
2468+| `Sys.chmod` | `Host.writeExecutable`: makes the program's file executable (mode 755) |
24692469 | `Sys.close` | `Scan` and `Parse`: closes a source or `RAZ-VERSION` file after reading |
24702470 | `Sys.closeDir`, `Sys.openDir`, `Sys.nextEntry`, `Sys.Dir` | `Parse`: the files of a directory, to find a module's other files for the one-module-of-each-name check |
24712471 | `Sys.env`, `Sys.envAt` | `Diag` (`NO_COLOR`) and `Raz.userLibraries` (`RAZ_PATH`, `HOME`; `envAt` tells unset from empty) |
@@ -2473,7 +2473,7 @@
24732473 | `Sys.info`, `Sys.Info` | `Scan` and `Parse`: whether a path is a file (`file`) and its length (`size`) |
24742474 | `Sys.isTerminal` | `Diag`: colour only when standard error is a terminal |
24752475 | `Sys.openRead`, `Sys.read` | `Scan`: reads a source file whole; `Parse`: the library's `RAZ-VERSION` |
2476-| `Sys.readLink` | `Raz`: `/proc/self/exe`, to find the library beside the compiler |
2476+| `Sys.readLink` | `Host.libraryDir`: `/proc/self/exe`, to find the library beside the compiler |
24772477 | `Sys.stderr`, `Sys.write` | `Diag`: its messages |
24782478 | `Sys.workDir` | `Diag`: shows a path relative to the working directory; `Elf`: the compilation directory of the line table |
24792479
@@ -2487,8 +2487,9 @@
24872487
24882488 | Name | What for |
24892489 |---|---|
2490-| `Files.arg` | `Raz`: the command line's words, and `ARGC()` for how many |
2491-| `Files.write` | `Elf.writeElf`: writes the executable |
2490+| `Files.arg` | `Raz` and `Host.libraryDir`: the command line's words |
2491+| `Files.argCount` | `Raz` and `Host.execute`: how many words the command line has |
2492+| `Files.write` | `Host.writeExecutable`: writes the executable |
24922493
24932494 The rest of the library, which `Diag`, `Sym`, `X64` and `Parse` use for
24942495 text and `Scan` for tables: