<!-- https://tinyscript.tinyactors.dev/compare/psychoscript/support/ -->
# Psychoscript language and library map · Compare

Kind: reference. For: [Embedder](https://tinyscript.tinyactors.dev/audiences/embedder.xml), [Agent builder](https://tinyscript.tinyactors.dev/audiences/agent-builder.xml), [Script author](https://tinyscript.tinyactors.dev/audiences/script-author.xml).
Voice: [Reference](https://tinyscript.tinyactors.dev/voices/reference.xml).

> Every syntax node, global, built-in member, Rust-only typed array, test262 exclusion and open checklist item in Psychoscript v0.13.0, beside tinyscript's specification.

Every syntax node, global, built-in member and exclusion in Psychoscript v0.13.0 (5428a8ae), beside tinyscript's current status. Skip psychoscript.com's satirical matrix, which lags behind the repository.

[Back to the comparison](https://tinyscript.tinyactors.dev/compare/psychoscript/index.md) · [Psychoscript's checklist](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/interpreter-support.md)

<a id="builtins"></a>

## Built-ins beside tinyscript

Psychoscript exposes 52 globals in TypeScript and 11 more typed arrays in Rust. Across 34 built-ins and intrinsic prototypes, it defines 20 constants, 129 statics, 44 accessors and 368 prototype methods.

| Built-in | tinyscript | Constants and statics | Accessors and prototype |
|---|---|---|---|
| [`Object`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/object.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | assign, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, groupBy, hasOwn, is, isExtensible, isFrozen, isSealed, keys, preventExtensions, seal, values | hasOwnProperty, isPrototypeOf, propertyIsEnumerable, toLocaleString, toString, valueOf |
| [`Function`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/runtime/globals.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | — | arguments, caller, apply, bind, call, toString |
| [`Array`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/array.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | from, fromAsync, isArray, of | at, concat, copyWithin, entries, every, fill, filter, find, findIndex, findLast, findLastIndex, flat, flatMap, forEach, includes, indexOf, join, keys, lastIndexOf, map, pop, push, reduce, reduceRight, reverse, shift, slice, some, sort, splice, toLocaleString, toReversed, toSorted, toSpliced, toString, unshift, values, with |
| [`String`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/string.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | fromCharCode, fromCodePoint, raw | at, charAt, charCodeAt, codePointAt, concat, endsWith, includes, indexOf, isWellFormed, lastIndexOf, localeCompare, match, matchAll, normalize, padEnd, padStart, repeat, replace, replaceAll, search, slice, split, startsWith, substr, substring, toLocaleLowerCase, toLocaleUpperCase, toLowerCase, toString, toUpperCase, toWellFormed, trim, trimEnd, trimLeft, trimRight, trimStart, valueOf |
| [`Number`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/number.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | EPSILON, MAX_SAFE_INTEGER, MAX_VALUE, MIN_SAFE_INTEGER, MIN_VALUE, NEGATIVE_INFINITY, NaN, POSITIVE_INFINITY, isFinite, isInteger, isNaN, isSafeInteger, parseFloat, parseInt | toExponential, toFixed, toLocaleString, toPrecision, toString, valueOf |
| [`BigInt`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/number.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | asIntN, asUintN | toLocaleString, toString, valueOf |
| [`Boolean`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/number.ts) | [implemented](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | — | toString, valueOf |
| [`Symbol`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/runtime/globals.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | asyncIterator, iterator, toPrimitive, toStringTag | description, toString, valueOf |
| [`Math`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/math.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | E, LN10, LN2, LOG10E, LOG2E, PI, SQRT1_2, SQRT2, abs, acos, acosh, asin, asinh, atan, atan2, atanh, cbrt, ceil, clz32, cos, cosh, exp, expm1, f16round, floor, fround, hypot, imul, log, log10, log1p, log2, max, min, pow, random, round, sign, sin, sinh, sqrt, sumPrecise, tan, tanh, trunc | — |
| [`JSON`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/json.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | parse, stringify | — |
| [`Date`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/date.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | UTC, now, parse | getDate, getDay, getFullYear, getHours, getMilliseconds, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getUTCDate, getUTCDay, getUTCFullYear, getUTCHours, getUTCMilliseconds, getUTCMinutes, getUTCMonth, getUTCSeconds, setDate, setFullYear, setHours, setMilliseconds, setMinutes, setMonth, setSeconds, setTime, setUTCDate, setUTCFullYear, setUTCHours, setUTCMilliseconds, setUTCMinutes, setUTCMonth, setUTCSeconds, toDateString, toGMTString, toISOString, toJSON, toLocaleDateString, toLocaleString, toLocaleTimeString, toString, toTimeString, toUTCString, valueOf |
| [`RegExp`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/regexp.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | escape | dotAll, flags, global, hasIndices, ignoreCase, lastIndex, multiline, source, sticky, unicode, unicodeSets, exec, test, toString |
| [`Map`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/collections.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | groupBy | size, clear, delete, entries, forEach, get, getOrInsert, getOrInsertComputed, has, keys, set, values |
| [`Set`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/collections.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | — | size, add, clear, delete, difference, entries, forEach, has, intersection, isDisjointFrom, isSubsetOf, isSupersetOf, keys, symmetricDifference, union, values |
| [`WeakMap`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/collections.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | — | delete, get, getOrInsert, getOrInsertComputed, has, set |
| [`WeakSet`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/collections.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | — | add, delete, has |
| [`Promise`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/runtime/promises.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | all, allSettled, any, race, reject, resolve, try, withResolvers | catch, finally, then |
| [`Iterator`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/iterator.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | from | drop, every, filter, find, flatMap, forEach, map, next, reduce, some, take, toArray |
| [`Generator`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/runtime/generators.ts) | [planned](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | — | next, return, throw |
| [`AsyncGenerator`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/runtime/generators.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | — | next, return, throw |
| [`IteratorHelper`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/runtime/generators.ts) | not in spec | — | next, return |
| [`AsyncFromSyncIterator`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/runtime/generators.ts) | not in spec | — | next, return, throw |
| [`Error`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/runtime/errors.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | isError | toString |
| [`ArrayBuffer`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/typed-array.ts) | [planned](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | isView | byteLength, detached, maxByteLength, resizable, slice |
| [`DataView`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/typed-array.ts) | [planned](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | — | buffer, byteLength, byteOffset, getBigInt64, getBigUint64, getFloat16, getFloat32, getFloat64, getInt16, getInt32, getInt8, getUint16, getUint32, getUint8, setBigInt64, setBigUint64, setFloat16, setFloat32, setFloat64, setInt16, setInt32, setInt8, setUint16, setUint32, setUint8 |
| [`Uint8Array`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/bytes.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | from, fromBase64, fromHex, of | buffer, byteLength, byteOffset, length, at, copyWithin, entries, every, fill, filter, find, findIndex, findLast, findLastIndex, forEach, includes, indexOf, join, keys, lastIndexOf, map, reduce, reduceRight, reverse, set, setFromBase64, setFromHex, slice, some, sort, subarray, toBase64, toHex, toReversed, toSorted, toString, values, with |
| [`Buffer`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/buffer.ts) | not in spec | alloc, allocUnsafe, allocUnsafeSlow, byteLength, compare, concat, copyBytesFrom, from, isBuffer, isEncoding, of, poolSize | compare, copy, equals, fill, includes, indexOf, lastIndexOf, readBigInt64BE, readBigInt64LE, readBigUInt64BE, readBigUInt64LE, readBigUint64BE, readBigUint64LE, readDoubleBE, readDoubleLE, readFloatBE, readFloatLE, readInt16BE, readInt16LE, readInt32BE, readInt32LE, readInt8, readIntBE, readIntLE, readUInt16BE, readUInt16LE, readUInt32BE, readUInt32LE, readUInt8, readUIntBE, readUIntLE, readUint16BE, readUint16LE, readUint32BE, readUint32LE, readUint8, readUintBE, readUintLE, slice, subarray, swap16, swap32, swap64, toJSON, toString, write, writeBigInt64BE, writeBigInt64LE, writeBigUInt64BE, writeBigUInt64LE, writeBigUint64BE, writeBigUint64LE, writeDoubleBE, writeDoubleLE, writeFloatBE, writeFloatLE, writeInt16BE, writeInt16LE, writeInt32BE, writeInt32LE, writeInt8, writeIntBE, writeIntLE, writeUInt16BE, writeUInt16LE, writeUInt32BE, writeUInt32LE, writeUInt8, writeUIntBE, writeUIntLE, writeUint16BE, writeUint16LE, writeUint32BE, writeUint32LE, writeUint8, writeUintBE, writeUintLE |
| [`URL`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/url.ts) | [planned](https://tinyscript.tinyactors.dev/reference/web-platform/index.md) | canParse, parse | hash, host, hostname, href, origin, password, pathname, port, protocol, search, searchParams, username, toJSON, toString |
| [`URLSearchParams`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/url.ts) | [planned](https://tinyscript.tinyactors.dev/reference/web-platform/index.md) | — | size, append, delete, entries, forEach, get, getAll, has, keys, set, sort, toString, values |
| [`Headers`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/headers.ts) | [planned](https://tinyscript.tinyactors.dev/reference/web-platform/index.md) | — | append, delete, entries, forEach, get, getSetCookie, has, keys, set, values |
| [`TextEncoder`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/bytes.ts) | [implemented](https://tinyscript.tinyactors.dev/reference/web-platform/index.md) | — | encoding, encode, encodeInto |
| [`TextDecoder`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/bytes.ts) | [partial](https://tinyscript.tinyactors.dev/reference/web-platform/index.md) | — | encoding, fatal, ignoreBOM, decode |
| [`crypto`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/web.ts) | not in spec | getRandomValues, randomUUID | — |
| [`console`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/stdlib/console.ts) | [partial](https://tinyscript.tinyactors.dev/reference/built-in/index.md) | assert, count, countReset, debug, dir, error, group, groupCollapsed, groupEnd, info, log, table, time, timeEnd, timeLog, trace, warn | — |

Psychoscript v0.13.0 ([`5428a8ae`](https://github.com/anomalyco/psychoscript/tree/5428a8ae365dae9b81a05fb683a963bcdb17ae7d)) built-in APIs beside tinyscript commit [`e0af6be6`](https://github.com/tinyactors-dev/tinyactors/tree/e0af6be68f233fbd647c7ff4dca83323ee784c77/tinyscript). 50 methods come from [`src/prelude/source.ts`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/prelude/source.ts).

- **Standalone globals (15)**: `require, undefined, NaN, Infinity, parseInt, parseFloat, isFinite, isNaN, encodeURI, encodeURIComponent, decodeURI, decodeURIComponent, atob, btoa, structuredClone` (from [`src/runtime/globals.ts`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/runtime/globals.ts); `Buffer` is exposed only when the host provides it).
- **Error types (8)**: `Error, TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError, AggregateError` (from [`src/runtime/intrinsics.ts`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/runtime/intrinsics.ts)).
- **Rust-only typed arrays (11)**: `Uint16Array, Uint32Array, Int32Array, Float32Array, Float64Array, Int8Array, Uint8ClampedArray, Int16Array, Float16Array, BigInt64Array, BigUint64Array` (from [`rust/crates/psychoscript/src/host.rs`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/rust/crates/psychoscript/src/host.rs); absent in the TypeScript VM).
- **In tinyscript's spec, absent in Psychoscript (24)**: `AbortController, AbortSignal, AbstractModuleSource, AsyncDisposableStack, Atomics, DOMException, DisposableStack, FinalizationRegistry, InternalError, Intl, Proxy, Reflect, Request, Response, SharedArrayBuffer, SuppressedError, Temporal, TypedArray, WeakRef, WebAssembly, escape, eval, globalThis, unescape`. See [Built-in objects](https://tinyscript.tinyactors.dev/reference/built-in/index.md) and [Web platform APIs](https://tinyscript.tinyactors.dev/reference/web-platform/index.md) for tinyscript's current status on each.

<a id="syntax"></a>

## Syntax Psychoscript compiles

Psychoscript compiles 20 statement nodes, 24 expression nodes and 5 pattern nodes in [`src/compiler/compile.ts`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/compiler/compile.ts). It rejects `with`, `debugger`, `export`, `new.target`, `import.meta`, private members (`#x`), static blocks, decorators and TypeScript syntax.

| Category | Count | AST nodes |
|---|---|---|
| Statements | 20 | BlockStatement, BreakStatement, ClassDeclaration, ContinueStatement, DoWhileStatement, EmptyStatement, ExpressionStatement, ForInStatement, ForOfStatement, ForStatement, FunctionDeclaration, IfStatement, ImportDeclaration, LabeledStatement, ReturnStatement, SwitchStatement, ThrowStatement, TryStatement, VariableDeclaration, WhileStatement |
| Expressions | 24 | ArrayExpression, ArrowFunctionExpression, AssignmentExpression, AwaitExpression, BinaryExpression, CallExpression, ChainExpression, ClassExpression, ConditionalExpression, FunctionExpression, Identifier, ImportExpression, Literal, LogicalExpression, MemberExpression, NewExpression, ObjectExpression, SequenceExpression, TaggedTemplateExpression, TemplateLiteral, ThisExpression, UnaryExpression, UpdateExpression, YieldExpression |
| Patterns | 5 | ArrayPattern, AssignmentPattern, Identifier, MemberExpression, ObjectPattern |

ESTree node dispatch tables in [`src/compiler/compile.ts`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/src/compiler/compile.ts).

<a id="exclusions"></a>

## Test262 exclusions and boundaries

Psychoscript filters test262 (revision `250f204f`) with [`manifest.json`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/test/test262/manifest.json) and skips 2670 files in [`skipped.txt`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/test/test262/skipped.txt). It excludes 3 flags, 12 regex boundaries and 76 feature flags.

| Boundary | Pattern |
|---|---|
| $262 host API | \$262 |
| Reflect and Proxy | \b(Reflect\|Proxy)\b |
| Symbol | \bSymbol\b(?!\.(iterator\|asyncIterator)\b) |
| boxed primitives | \b(new\s+(String\|Number\|Boolean)\b\|Object\s*\(\s*(true\|false\|-?\d\|['"])) |
| eval | \b(eval\|Function)\b |
| globalThis | \bglobalThis\b |
| legacy accessors | \b__(define\|lookup)(Getter\|Setter)__\b |
| new.target | \bnew\.target\b |
| prototype mutation | Object\.setPrototypeOf\b |
| sloppy mode | \bwith\s*\( |
| typed arrays and buffers | \b(SharedArrayBuffer\|Int8Array\|Uint8ClampedArray\|Int16Array\|Uint16Array\|Int32Array\|Uint32Array\|Float16Array\|Float32Array\|Float64Array\|BigInt64Array\|BigUint64Array)\b |
| weak collections | \b(WeakRef\|FinalizationRegistry)\b |

Regex boundaries excluded in [`test/test262/manifest.json`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/test/test262/manifest.json).

- **Excluded flags (3)**: `module, raw, noStrict`.
- **Excluded test262 features (76)**: `Proxy, proxy-missing-checks, Reflect, Reflect.construct, Reflect.set, Reflect.setPrototypeOf, Symbol, Symbol.hasInstance, Symbol.isConcatSpreadable, Symbol.match, Symbol.matchAll, Symbol.prototype.description, Symbol.replace, Symbol.search, Symbol.species, Symbol.split, Symbol.toPrimitive, Symbol.toStringTag, Symbol.unscopables, symbols-as-weakmap-keys, class-fields-private, class-fields-private-in, class-methods-private, class-static-block, class-static-fields-private, class-static-methods-private, new.target, decorators, TypedArray, TypedArray.prototype.at, SharedArrayBuffer, Atomics, Atomics.pause, Atomics.waitAsync, resizable-arraybuffer, arraybuffer-transfer, immutable-arraybuffer, Float16Array, Float32Array, Float64Array, Int8Array, Int16Array, Int32Array, Uint8Array, Uint8ClampedArray, Uint16Array, Uint32Array, uint8array-base64, WeakRef, FinalizationRegistry, Intl-enumeration, Temporal, ShadowRealm, cross-realm, dynamic-import, import.meta, import-attributes, import-defer, export-defer, source-phase-imports, source-phase-imports-module-source, import-text, import-bytes, json-modules, top-level-await, explicit-resource-management, tail-call-optimization, caller, IsHTMLDDA, host-gc-required, legacy-regexp, __proto__, __getter__, __setter__, iterator-sequencing, joint-iteration`.

<a id="gaps"></a>

## Open items in Psychoscript's checklist

Psychoscript's [`interpreter-support.md`](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/interpreter-support.md) tracks 281 supported items and 19 open gaps across 23 sections.

- **Values and literals (10 done, 3 open)**: Arbitrary Symbol primitive values and symbol-keyed properties. Four well-known symbols exist: `Symbol.iterator` and `Symbol.asyncIterator` for the iterator protocols, `Symbol.toPrimitive` (consulted by every ToPrimitive that runs program code, before `valueOf`/`toString`), and `Symbol.toStringTag` (read by `Object.prototype.toString`). They have `description` (`"Symbol.iterator"`), `toString` (`"Symbol(Symbol.iterator)"`), `valueOf`, and `Symbol.prototype`. `__defineGetter__` and friends. Built-ins that read program getters ahead (`Array.from` on an array-like, `apply`, `structuredClone`, `String.raw`, `Buffer.from`, `TextDecoder` options, `Headers`/`URLSearchParams` records, `new Error`'s `cause`, `defineProperties`, host arguments) call each getter once per receiver and key per call, in rounds: a value reached twice in one call reuses the first read, and the order across rounds can differ from JS's interleaving. `Array.from` on an iterable reads a `[Symbol.iterator]` getter twice.
- **Statements and control flow (12 done, 1 open)**: `for...in` skipping keys deleted during the loop.
- **Functions and callbacks (31 done, 3 open)**: Array methods on `arguments` and other array-likes (`Array.prototype.slice.call(arguments, 1)`); use `[...arguments]` or a rest parameter meanwhile. Private members (`#x`) and static blocks: both are syntax errors with a hint. `new` on plain functions: only classes (and host functions marked `constructible`) can be constructed.
- **Expressions and operators (19 done, 2 open)**: Coercing a function, promise, generator, or host reference itself: `fn + ""`, `-fn`, `fn++`, and `fn == 1` throw `TypeError: Binary operators require data values.` (or the unary/update form) where JavaScript would use the source text or `NaN`. ToPrimitive elsewhere: `Error.prototype.toString` on an object `message` and numeric arguments of the Array and Uint8Array methods (`at`, `indexOf` start, `slice`) still use the built-in form (`NaN`, `"[object Object]"`) and ignore own methods.
- **Objects and properties (16 done, 1 open)**: Array elements share one set of attributes, so `defineProperty` on an index takes only the array's own attributes (new elements must say `writable`, `enumerable` and `configurable` true), never an accessor, and an array's `length` can't be made read-only on its own (use `Object.freeze`).
- **BigInt (4 done, 1 open)**: Boxed BigInts (`Object(1n)`) and `BigInt64Array`/`BigUint64Array`.
- **Iterator (4 done, 1 open)**: `Iterator.concat`, `Iterator.zip`, and `Iterator.zipKeyed` (stage 3 proposals).
- **ArrayBuffer, DataView and Uint8Array (10 done, 2 open)**: Resizable buffers (`maxByteLength` in the options is a `TypeError`), `resize`, `transfer` and `transferToFixedLength` (no buffer is ever detached), `SharedArrayBuffer`, and `Atomics`. The other typed arrays.
- **Web platform helpers (8 done, 2 open)**: `Request`, `Response`, and `Blob`. `crypto.subtle` and non-UTF-8 `TextDecoder` encodings.
- **Host functions (8 done, 2 open)**: Program functions as arguments to host code (callbacks such as `forEach`). Host classes. Stateful host objects are expressed as closures; a declared method table would be the next step if `new X()` in a program is ever needed.
- **Errors and diagnostics (14 done, 1 open)**: `Error.captureStackTrace`, `Error.stackTraceLimit`, and async frames through `then` handlers and combinators (V8's `at async Promise.all (index 0)`).

[Back to the comparison](https://tinyscript.tinyactors.dev/compare/psychoscript/index.md) · [Read interpreter-support.md](https://github.com/anomalyco/psychoscript/blob/5428a8ae365dae9b81a05fb683a963bcdb17ae7d/interpreter-support.md)
