docs(codemode): describe built-in frames instead of native host generators

This commit is contained in:
James Long
2026-11-04 22:01:37 +00:00
Unverified
parent a9d9cb7a8d
commit fce860cf9c
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ import {
} from "./objects.js"
import { describeValue } from "./references.js"
/** A native function body: a value, a thrown `PendingThrow`, or interpreter work producing a value. */
/** A native function body: a value, a thrown `PendingThrow`, or what the machine carries out as the call. */
export type Impl = NativeCall
export const native = (builtins: Builtins, options: NativeOptions): Native => new Native(builtins.Function, options)
+2 -2
View File
@@ -264,8 +264,8 @@ export class Machine {
// --- Jobs ---
// Starts a job on the root stack: parked frames resume with how their promise settled, an async-from-sync iterator
// closing its iterator runs as a frame, and a reaction or thenable that calls program code runs its work in a native
// frame. One that finishes at once leaves the stack empty.
// closing its iterator runs as a frame, and a reaction or thenable that calls program code runs as the frame its job
// kind makes. One that finishes at once leaves the stack empty.
private begin(job: Job): void {
if (job.kind === "thenable") return this.work(adoptThenable(this.ctx, job.promise, job.thenable, job.then))
const reaction = job.reaction
+1 -1
View File
@@ -25,7 +25,7 @@ export type Combination = {
/**
* A settled promise's reaction, as data. It runs as a job (see `react` in promises.ts) and either finishes at once or
* starts interpreter work. The kinds:
* starts a frame that calls program code. The kinds:
* - `await`: resume the frames parked on the promise, cut off the stack at an `await`.
* - `settle`: pass the outcome on to `target`.
* - `handler`: `then`/`catch` handlers; the handler's result settles `derived`.
+1 -1
View File
@@ -92,7 +92,7 @@ export class MachineTask {
return result
}
/** Calls `callable`: a program function pushes a frame; a built-in answers at once or runs as a native frame. */
/** Calls `callable`: a program function pushes a frame; a built-in answers at once or runs as frames. */
call(
callable: Value,
thisValue: Value,