From 355d7978ed15555f28d15f88fb7617cff4ff7779 Mon Sep 17 00:00:00 2001 From: dzaima Date: Tue, 23 Aug 2022 17:11:15 +0300 Subject: [PATCH] =?UTF-8?q?include=20=E2=80=A2file.Parent=20in=20system=20?= =?UTF-8?q?value=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/system.md | 4 ++-- src/vm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/system.md b/docs/system.md index bea1632c..53b63c1a 100644 --- a/docs/system.md +++ b/docs/system.md @@ -15,7 +15,7 @@ See [the BQN specification](https://mlochbaum.github.io/BQN/spec/system.html) fo | `•name` | | | `•wdpath` | | | `•Exit` | | -| `•file` | Fields: `path`, `At`, `List`, `Bytes`, `Chars`, `Lines`, `Type`, `Exists`, `Name`, `MapBytes`, `CreateDir`, `Rename`, `Remove` | +| `•file` | Fields: `path`, `At`, `List`, `Bytes`, `Chars`, `Lines`, `Type`, `Exists`, `Name`, `Parent`, `MapBytes`, `CreateDir`, `Rename`, `Remove` | | `•FChars` | | | `•FBytes` | | | `•FLines` | | @@ -37,7 +37,7 @@ See [the BQN specification](https://mlochbaum.github.io/BQN/spec/system.html) fo | `•rand` | seeds with system time (can be hard-coded by setting the C macro `RANDSEED`), same algorithm as `•MakeRand` | | `•bit` | Fields: `_cast`; casting an sNaN bit pattern to a float is undefined behavior | -# CBQN-specific system functions and extensions +# CBQN-specific system values and extensions ## `•term` diff --git a/src/vm.c b/src/vm.c index c531907d..e6d99377 100644 --- a/src/vm.c +++ b/src/vm.c @@ -689,7 +689,7 @@ B evalBC(Body* b, Scope* sc, Block* bl) { // doesn't consume u32* bc = b->bc; pushEnv(sc, bc); gsReserve(b->maxStack); - Scope* pscs[b->maxPSC]; + Scope* pscs[b->maxPSC]; // -fsanitize=undefined complains when this is 0. ¯\_(ツ)_/¯ if (b->maxPSC) { pscs[0] = sc; for (i32 i = 1; i < b->maxPSC; i++) pscs[i] = pscs[i-1]->psc;