Repository navigation
Conversation
…ar locals; docblock shape key-set disagreements warn in user programs
…into one release class (Fixes #373)
…e iterates a copy and writes it back
…oins an owned array without an ownflow mismatch
…MP_FN prints a function's MIR on a verify failure
… array; name the function in an emit failure
…aults see them; gate curl prelude on its constants
…undeclared property read rides a cell
…pace cannot collide
…act (protected __construct over Exception::__construct)
… clone hid the builtin and ran a linear scan (array_key_exists) in the compiler itself
…component's scratch once consumed
…-sized one; narrow-after-full and emit-failure diagnostics
… properties instead of the whole module; time the pre-scan, walk and post-walk phases
…atch keys to parameter names in spread expansion (#462)
…ot the per-name inline chain
…rampolines only, hint-aware element reads
… level runs at its require, not at startup
…() on its result holds
…; stop the erased __invoke arm recursing without bound
…an empty array is falsy
…herit the method, not a same-named unrelated method
…of an erased-receiver method call
3 of 6 tasks
… the pre-evaluated receiver and arguments had no owner, so Laravel stranded its Request per request
… producers the ownership predicates read as borrows, leaking every container-built object and one Response count per middleware
…llable invoke as a cell: collect()->map() chains and $c::$m() results had no owner
…tion constants exist, and an array-callable callee is released: Eloquent paid a full stack and 200 KB per request
…06 past 300 files, which failed the changes job and blocked every Linux shard
…: every column of a PDO::FETCH_OBJ row stayed alive
…s it: %s over a number and $c ? $c.'@' : '' each kept a string per call
…reused one buffer, so every $o->$k wrote the same key
…erence's fresh box an owner Both leaked one block per call at -O0 and were hidden at -O2 only because LLVM deleted the unread malloc; the small-object pool exposes them.
…he key kind as a constant (-14% instructions on hashed lookups)
…ns per request); MANTICORE_POOL=0 opts out
…led and the offload threads never touch it
…y new span faulted a 2 MiB page, so RSS and peak grew in 2 MiB steps (libsuperglobal smoke +4 MB on CI)
…ak RSS keeps a pooled allocator's per-class high-water, which only a leak raises again; report both batches on failure
…nonymous maps and Rss/AnonHugePages (glibc-only growth on CI runners does not reproduce in Docker)
…ping from /proc/self/smaps
… per phase (the gate shows only the log tail)
…e-heap figure: VmHWM is a peak that also counts code pages, which a CI kernel kept faulting in over a hot loop (libsuperglobal smoke read +4.5 MB with RssAnon flat)
…s the file and shmem pages mapped now): VmHWM counted code pages a CI kernel kept mapping in, so ~25 leak tests read +5 MB with RssAnon flat
This was referenced Nov 8, 2026
blacktrs
added a commit
that referenced
this pull request
Nov 9, 2026
…ain reference, drop the legacy-interpolation site
blacktrs
added a commit
that referenced
this pull request
Nov 10, 2026
) #564 runs an entry app's own src files at their require, wrapped in __mc_unit_N; its top-level variables became function locals, so `global $x` / $GLOBALS read nothing (an object global segfaults) and a store never read in the unit was dropped as dead. Inject the global slots into unit bodies as for __main. The lazy_units smoke gains a global-scope fixture, a php oracle (expected.out), manifest paths relative to the manifest, and runs in the gate.
blacktrs
added a commit
that referenced
this pull request
Nov 10, 2026
…ain reference, drop the legacy-interpolation site
blacktrs
added a commit
that referenced
this pull request
Nov 15, 2026
… hover, definition, references, rename, symbols, completion) (#695) * Document stdlib .sig coverage for the semantic core * Make Analyze\Index incremental with a reverse hierarchy map * Keep declarer order on replaceFile and tighten Index tests * Extract Analyzer::runFile for per-document analysis * Add NameIndex with uncertain dynamic sites * Match class part of callable strings, anchor literal regex, harden NameIndex tests * Add SourceType and hint/docblock parser * Limit SourceTypeParser nesting depth and reject null-only unions * Cache prelude and stdlib symbols for the analyzer * Add Semantic\Workspace analyzer library API * Document semantic core and record latency * Restore legacy declaration precedence in Analyzer::run (library over user, last user file wins) * Resolve global fallback, use imports and per-kind spans in definition and references * Keep callable return unions parenthesized and accept a nullable callable return * Reserve the lib: label scheme for library files and keep no AST for files that do not parse * Gate the semantic tests, harden bench and calibrate tooling, tighten semantic tests and design doc * Give analyzer diagnostics end ranges * Record skipped class members as ErrorMember in tolerant parse * Record declaration names and use roles in the tolerant name table * Analyze files with syntax errors without flooding dependents * Resolve definition and references through declaration names * Record enum cases and class constants as member declarations, match constants case-sensitively * Index global constants for definition and reference lookup * Anchor declaration-level diagnostics on the name * Narrow trait use, implements and repeated catch ranges to their own name * Give interpolation parts their own source ranges in tolerant parse * Constant declarations: quote-less define range, skip integer-like names, share constKey * Record P2b parity and latency; add --broken mode to the semantic bench * Avoid ternary over borrowed/owned spans in Index::addConst (miscompiled by the current compiler) * Add crash repro for a ??= value block whose type froze before its value was erased (#502) * Add wrong-answer repro: define() in a function or branch leaves the constant undefined (#503) * Flag the remaining value blocks typed from a captured node (assign-as-value temp, dynamic static-prop chain); add regression cases * Analyzer: attributed broken headers suppress, sticky entries lose to live declarers, drop unused Anon, hoist constKeyOf * Update CLI goldens for dump-ast --decl-names * Give legacy ${name} interpolation parts exact ranges; rebase goldens on main's lexer and anon names * Promote the #502 and #503 repros: both fixed on main * name_roles: strict parse names an anonymous class by file and position (main's scheme) * Add LineIndex and ExprAt position lookup to Workspace * Emit member-use and variable-declaration name entries in tolerant mode * Emit simple-interpolation member uses and promoted-property declarations; gate static member notes * Index member records with owner, visibility and memoized lookup * Owner by class containment, implicit enum members, O(1) memo clear and binary-searched member positions * Add source-type expression typer for the editor * Qualify docblock type names at index time, guard const evaluation, and fix nullsafe chains, first-class callables, ?? and templates in the expression typer * Fix ExprAt partial-overlap chain, packed position key and LineIndex out-of-range offsets * Add flow-sensitive narrowing and closure scopes over source types * Make Flow loop widening a fixpoint, model unset, by-ref and aliasing effects * Resolve member use sites through receiver types for definition, references, hover and rename blockers * Rename safety: override families for methods, props and consts, promoted properties, named arguments, required heredoc text * Include trait-provided members in override families and flag trait adaptations as uncertain * Add variable bindings for definition, references and rename * Scope nested declarations, property hooks and arrow writes in VarIndex; add parse-error-region blocker * Scope closures in defaults, constants and attributes; flag explicit set-hook parameters * Make VarIndex scope lookup a binary search; cold referencesTo no longer quadratic * Add bench --queries and broken-file query probes; record P2c numbers and update semantic core design * Make every uncertain site a rename blocker; list callable strings, A::$$n and legacy ${n} literals * Keep reference-aliased names untyped; goto labels, include and variable-variables clobber the scope in Flow * Index readonly-only promoted params; split static and instance property sites; definitionsOf for unions; hide anonymous class names in hover * Gate the member-use role check and promoted-param branch on name collection in the parser * Run tests/semantic natively in one compiled binary and in the gate, skip the PCRE backtrack-limit probe where unsupported * Type a fused array_map result from the input's key kind before Monomorphize (Fixes #512) * Add transport-agnostic JSON-RPC dispatcher for the LSP * Make JSON-RPC dispatcher never throw on encoding and reject non-scalar ids * Add LSP stdio framing and read loop * Semantic tests follow main's anonymous-class names (file + position, hex crc) * Bound and validate Content-Length, handle short writes in LSP framing * Map LSP UTF-16 positions and file URIs to the core's byte columns * Add manticore lsp: lifecycle and full text sync Dispatcher gains guard() for lifecycle state checks. Spike: bin/manticore lsp finds the prelude from another cwd and via a symlink to bin/manticore; a bare copy of the binary (no sibling prelude/ or lib/) prints the empty-prelude error and exits 1. Installed-layout packaging not changed here. * Publish diagnostics and index the workspace folder on startup * Update CLI goldens for the lsp command * Answer hover and definition requests * Answer references requests * List member references from closed workspace files and harden navigation params * Add prepareRename and rename with uncertain-site warnings * Keep property sigils per edit site and refuse incomplete member renames * Add document symbols to the semantic core and LSP * Add member, variable and symbol completion * Document manticore lsp and record latency * Trim speculative note in semantic-core remains * Rename edits only the last name segment, verifies site text and refuses incomplete or stale indexes * Document rename ceilings: stale closed files and implicit method callers * Rank completion items with sortText: own members, inherited, global names * Return uncertain rename sites as annotated edits needing confirmation * Index class names in docblock type tags as class occurrences: navigation, references, hover and rename * Resolve docblock names per namespace block, skip heredocs and inline HTML, add PCRE fallback; match qualified class strings by last segment; drop stale version on versionless didChange * Limit the docblock PCRE fallback to single-namespace files; ignore function/const group use clauses * LSP hover: docblock-merged declared types, array detail block, variable and function hovers, array shapes in SourceType * LSP hover review fixes: int-like shape keys, param-only declaration hover, destructuring and foreach targets, annotation label, markdown escaping * LSP hover: nested and foreach destructuring targets, exact 64-bit int-key rule, key length cap * Docs: VS Code client lives outside this repo * Rename inside "${x}" edits the name, not the brace * Semantic: $$n and ${expr} are VarVar nodes since #564; "${n}" is a plain reference, drop the legacy-interpolation site * LSP docblock names: read namespace/use from lexer tokens, drop prose after article-like @return; Fixes #526 * LSP completion: use-aware class insertion, parent::__construct, multi-line chains, static via ->, keywords. Fixes #523 * LSP navigation: open prelude definitions as cached readable files. Fixes #525 (part 1) * LSP sync: incremental didChange, cancellable requests, didChangeWatchedFiles; Fixes #524 * LSP rename and diagnostics: import aliases from use tokens, per-kind member case rule, echo client URI spelling; Fixes #527 * Document LSP member-query memory peak and sync changes; Fixes #528 * LSP hover: class constant @var, variadic element type, union destructuring, quoted shape keys ending in ?. Fixes #525 * LSP member queries open closed files one at a time instead of all at once; Fixes #528 * Fix native stream_select: poll the real fd of FILE*-backed streams, treat memory streams as ready; give __mc_iopoll_poll an int return so poll bindings agree * Split chained property assignment in completion import handling (native SIGSEGV) * LSP stdio: read whole frames from an unbuffered stdin so a native server answers while the pipe stays open; real stream_set_read_buffer(0); record native RSS for #528 * e2e: initialize advertises incremental sync (change = 2) * tests/semantic: declare src/Runtime as the runtime library so the stdlib:false semtest app passes the embed check * Semantic: $$n and ${expr} are VarVar nodes since #564; "${n}" is a plain reference, drop the legacy-interpolation site (cherry picked from commit 5052d09) * docs(lsp): editor setup — VS Code client repo and Neovim 0.11 config * docs(lsp): Zed extension setup
blacktrs
added a commit
that referenced
this pull request
Nov 15, 2026
…emplate, class-string<T>, conditional returns (#696) * Document stdlib .sig coverage for the semantic core * Make Analyze\Index incremental with a reverse hierarchy map * Keep declarer order on replaceFile and tighten Index tests * Extract Analyzer::runFile for per-document analysis * Add NameIndex with uncertain dynamic sites * Match class part of callable strings, anchor literal regex, harden NameIndex tests * Add SourceType and hint/docblock parser * Limit SourceTypeParser nesting depth and reject null-only unions * Cache prelude and stdlib symbols for the analyzer * Add Semantic\Workspace analyzer library API * Document semantic core and record latency * Restore legacy declaration precedence in Analyzer::run (library over user, last user file wins) * Resolve global fallback, use imports and per-kind spans in definition and references * Keep callable return unions parenthesized and accept a nullable callable return * Reserve the lib: label scheme for library files and keep no AST for files that do not parse * Gate the semantic tests, harden bench and calibrate tooling, tighten semantic tests and design doc * Give analyzer diagnostics end ranges * Record skipped class members as ErrorMember in tolerant parse * Record declaration names and use roles in the tolerant name table * Analyze files with syntax errors without flooding dependents * Resolve definition and references through declaration names * Record enum cases and class constants as member declarations, match constants case-sensitively * Index global constants for definition and reference lookup * Anchor declaration-level diagnostics on the name * Narrow trait use, implements and repeated catch ranges to their own name * Give interpolation parts their own source ranges in tolerant parse * Constant declarations: quote-less define range, skip integer-like names, share constKey * Record P2b parity and latency; add --broken mode to the semantic bench * Avoid ternary over borrowed/owned spans in Index::addConst (miscompiled by the current compiler) * Add crash repro for a ??= value block whose type froze before its value was erased (#502) * Add wrong-answer repro: define() in a function or branch leaves the constant undefined (#503) * Flag the remaining value blocks typed from a captured node (assign-as-value temp, dynamic static-prop chain); add regression cases * Analyzer: attributed broken headers suppress, sticky entries lose to live declarers, drop unused Anon, hoist constKeyOf * Update CLI goldens for dump-ast --decl-names * Give legacy ${name} interpolation parts exact ranges; rebase goldens on main's lexer and anon names * Promote the #502 and #503 repros: both fixed on main * name_roles: strict parse names an anonymous class by file and position (main's scheme) * Add LineIndex and ExprAt position lookup to Workspace * Emit member-use and variable-declaration name entries in tolerant mode * Emit simple-interpolation member uses and promoted-property declarations; gate static member notes * Index member records with owner, visibility and memoized lookup * Owner by class containment, implicit enum members, O(1) memo clear and binary-searched member positions * Add source-type expression typer for the editor * Qualify docblock type names at index time, guard const evaluation, and fix nullsafe chains, first-class callables, ?? and templates in the expression typer * Fix ExprAt partial-overlap chain, packed position key and LineIndex out-of-range offsets * Add flow-sensitive narrowing and closure scopes over source types * Make Flow loop widening a fixpoint, model unset, by-ref and aliasing effects * Resolve member use sites through receiver types for definition, references, hover and rename blockers * Rename safety: override families for methods, props and consts, promoted properties, named arguments, required heredoc text * Include trait-provided members in override families and flag trait adaptations as uncertain * Add variable bindings for definition, references and rename * Scope nested declarations, property hooks and arrow writes in VarIndex; add parse-error-region blocker * Scope closures in defaults, constants and attributes; flag explicit set-hook parameters * Make VarIndex scope lookup a binary search; cold referencesTo no longer quadratic * Add bench --queries and broken-file query probes; record P2c numbers and update semantic core design * Make every uncertain site a rename blocker; list callable strings, A::$$n and legacy ${n} literals * Keep reference-aliased names untyped; goto labels, include and variable-variables clobber the scope in Flow * Index readonly-only promoted params; split static and instance property sites; definitionsOf for unions; hide anonymous class names in hover * Gate the member-use role check and promoted-param branch on name collection in the parser * Run tests/semantic natively in one compiled binary and in the gate, skip the PCRE backtrack-limit probe where unsupported * Type a fused array_map result from the input's key kind before Monomorphize (Fixes #512) * Add transport-agnostic JSON-RPC dispatcher for the LSP * Make JSON-RPC dispatcher never throw on encoding and reject non-scalar ids * Add LSP stdio framing and read loop * Semantic tests follow main's anonymous-class names (file + position, hex crc) * Bound and validate Content-Length, handle short writes in LSP framing * Map LSP UTF-16 positions and file URIs to the core's byte columns * Add manticore lsp: lifecycle and full text sync Dispatcher gains guard() for lifecycle state checks. Spike: bin/manticore lsp finds the prelude from another cwd and via a symlink to bin/manticore; a bare copy of the binary (no sibling prelude/ or lib/) prints the empty-prelude error and exits 1. Installed-layout packaging not changed here. * Publish diagnostics and index the workspace folder on startup * Update CLI goldens for the lsp command * Answer hover and definition requests * Answer references requests * List member references from closed workspace files and harden navigation params * Add prepareRename and rename with uncertain-site warnings * Keep property sigils per edit site and refuse incomplete member renames * Add document symbols to the semantic core and LSP * Add member, variable and symbol completion * Document manticore lsp and record latency * Trim speculative note in semantic-core remains * Rename edits only the last name segment, verifies site text and refuses incomplete or stale indexes * Document rename ceilings: stale closed files and implicit method callers * Rank completion items with sortText: own members, inherited, global names * Return uncertain rename sites as annotated edits needing confirmation * Index class names in docblock type tags as class occurrences: navigation, references, hover and rename * Resolve docblock names per namespace block, skip heredocs and inline HTML, add PCRE fallback; match qualified class strings by last segment; drop stale version on versionless didChange * Limit the docblock PCRE fallback to single-namespace files; ignore function/const group use clauses * LSP hover: docblock-merged declared types, array detail block, variable and function hovers, array shapes in SourceType * LSP hover review fixes: int-like shape keys, param-only declaration hover, destructuring and foreach targets, annotation label, markdown escaping * LSP hover: nested and foreach destructuring targets, exact 64-bit int-key rule, key length cap * Docs: VS Code client lives outside this repo * Rename inside "${x}" edits the name, not the brace * Semantic: $$n and ${expr} are VarVar nodes since #564; "${n}" is a plain reference, drop the legacy-interpolation site * LSP docblock names: read namespace/use from lexer tokens, drop prose after article-like @return; Fixes #526 * LSP completion: use-aware class insertion, parent::__construct, multi-line chains, static via ->, keywords. Fixes #523 * LSP navigation: open prelude definitions as cached readable files. Fixes #525 (part 1) * LSP sync: incremental didChange, cancellable requests, didChangeWatchedFiles; Fixes #524 * LSP rename and diagnostics: import aliases from use tokens, per-kind member case rule, echo client URI spelling; Fixes #527 * Document LSP member-query memory peak and sync changes; Fixes #528 * LSP hover: class constant @var, variadic element type, union destructuring, quoted shape keys ending in ?. Fixes #525 * LSP member queries open closed files one at a time instead of all at once; Fixes #528 * Fix native stream_select: poll the real fd of FILE*-backed streams, treat memory streams as ready; give __mc_iopoll_poll an int return so poll bindings agree * Split chained property assignment in completion import handling (native SIGSEGV) * LSP stdio: read whole frames from an unbuffered stdin so a native server answers while the pipe stays open; real stream_set_read_buffer(0); record native RSS for #528 * e2e: initialize advertises incremental sync (change = 2) * tests/semantic: declare src/Runtime as the runtime library so the stdlib:false semtest app passes the embed check * Compile reads docblock tags through Analyze\DocType: one scanner, and `@param T &$x` now types the param like `@param T $x` * SourceTypeParser: accept the compiler's hint grammar (hyphenated pseudo-types, class-constant refs, unsealed shapes, \Closure signatures); add typehint corpus tool * Add lowerSource(SourceType) beside lowerTypeHint, with MANTICORE_TYPEHINT_CHECK shadow comparison * Docblock tags inside a backtick code span or glued to a word are not tags (prose `@var T` typed Type::$interned as junk) * Semantic: $$n and ${expr} are VarVar nodes since #564; "${n}" is a plain reference, drop the legacy-interpolation site (cherry picked from commit 5052d09) * Lower type hints through SourceTypeParser (per-string parse cache) and delete the string ladder lowerTypeHint parses each distinct hint string once into an immutable Semantic\SourceType (class context applied at lowering) and lowers it with lowerSource; an unparseable hint is unknown. Removes lowerTypeHintText, lowerArrayShape, nullableUnionArm, isArrayUnion, isNumericUnion, topLevelUnionArms, splitTopLevel, topLevelColon, lowerElemHint, lowerCallableSignature and the MANTICORE_TYPEHINT_CHECK shadow mode. Parser: accepts non-empty-array{...} / non-empty-list{...}; an unkeyed shape entry after an int key takes key+1 (array{1: int, string} keys the string 2); ?T|null parses as T|null. Behaviour changes on forms seen in no corpus: null|callable(): T now lowers like callable(): T|null (closure, was cell); Generator<array<int,string>> lowers its args instead of splitting on the nested comma. * Semantic: bind function/method @template from class-string<T> and T args, key-of/value-of, class-string literal diagnostic * Compiler: type a call binding @template T from a class-string<T> literal as obj<T>, guarded by instanceof + TypeError (#686 step 4b) * Compiler: bind class-string<T> templates declared on interfaces and abstract/parent methods, inherited by undocumented overrides (#686) * Semantic + compiler: conditional return types ($p is T ? A : B) and string|class-string<T> params bind @template at the call (#686) * docs(lsp): editor setup — VS Code client repo and Neovim 0.11 config * docs(lsp): Zed extension setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes a Laravel application compile into one native binary and serve requests:
examples/laravel-app(web and JSON routes, Eloquent over SQLite, sessions, Blade, Carbon, Monolog). The README in that directory has the build steps and the list of what differs from a stock skeleton.The branch is the compiler work that application needed, 95 commits in these groups:
enum, strings nested in{$…},$$var,??binding tighter than the ternary,new static::$map[$k](…), named arguments after a spread).__call/ArrayAccess/Countablethrough interfaces, docblock array/callable claims, virtual-dispatch thunks keyed by the written arguments, dynamic static calls.srcdirectories and run a file's top level at itsrequire; large dispatch helpers are emitted once; escape summaries andInferTypesre-inference touch only what changed (Laravel front end 790 s to about 230 s).php://inputper request,DateTimefactories andgetLastErrors(),ReflectionFunction::getClosureUsedVariables(),ReflectionMethod/ReflectionProperty::setAccessible(), syslog constants.include.unresolvedchecks both arms of a ternaryrequiretarget.MANTICORE_ASAN=1(heap AddressSanitizer),MANTICORE_REF_QUARANTINE=1andMANTICORE_POOL_POISON=1(poisoned freed blocks),MANTICORE_DUMP_MIR/MANTICORE_DUMP_FN.AGENTS.mdsays when to reach for them.The worker crash
The first request used to kill a worker with
memory corruption of free block. Two causes, both fixed here:ifwas built after its top-level child. The child copied no inherited slots, was allocated header-only, and the parent constructor wrote past the object (Carbon'sLazyTranslator, Symfony'sTranslator). The hoisted ancestors are now built first. Test:hoisted_parent_class_layout.requireof a data file handed out the include slot's value without a count, so the caller's release spent the slot's only reference. Test:require_data_file_owned.AddressSanitizer pointed at the first one (a read of an uninitialized property).
Test plan
tests/analyzeinclude_unresolved./up,/api/ping,/api/notes,/api/db/count,/hello,/counter, a 404, andPOST /api/noteswith and without a body; no crash, expected status codes.ae4552b7(pool on by default; Linuxmemory_get_usage/memory_get_peak_usagereport anonymous memory only — VmHWM counted file pages a CI kernel kept mapping in).Follow-ups
hasReturnType()is true for an internal tentative return type.lazydirectory has to be listed in the manifest by hand; the analyzer now warns about the shape.Fixes #373, #499, #515
Added since the first description
Async\Mutex); Laravel's per-request state lives in shared objects, and two requests interleaving at an I/O wait double-freed an array. Concurrency comes fromWORKERS.class_uses()resolves names through a crc32 tree (/api/notes6 to 17 rps at-O 0);new $class(...$pack)and the dynamic-method spread fallbacks go through shared tables and per-name helpers (fromperf/dyninl-helpers); an-O 1build of the example dropped from 59 to ~23 min, and-O 2builds (~25 min) where it did not finish before.-O 0frame stepped over the 16 KiB guard page and wrote into the heap below it. Every emitted function now probes its stack, so an overflow stops withfiber stack overflow (raise MANTICORE_FIBER_STACK);-O 2builds fit in the default 1 MiB. The example README says how to raise it for-O 0.hasReturnType()on tentative return types),new $classwith the name of a class that does not exist returns null instead of throwing Error #565 (new $unknownreturns null).Performance and memory per request
Measured as instructions per request on one worker (
/usr/bin/time -l, minus a zero-request run),-O 2, macOS arm64./api/ping/api/notes/helloinstanceof,new $class,$o->$m(),[$c, $m]callables,method_exists/property_exists/is_asearch sorted tables or a balanced tree of comparisons instead of scanning every class per call. Each of these was 10–78% of a request.strcmpfamily is one runtime loop; class tables compare with ASCII folding; UTF-8 walks (mb_substr,mb_strlen, the scrub) skip ASCII a word at a time (2.3× fewer instructions on ASCII text).MANTICORE_POOL=0opts out).__mir_array_index_findis inlined into its callers (−14% on hashed lookups)./api/notes, from 13 KB to ~1.2 KB on/api/pingand from 19 KB to ~3 KB on/hello. Fixed owners: fresh method-call temps when a candidate readsfunc_get_args,new $classand$o->$m(...$xs)results, fresh receivers on magic-call paths,debug_backtraceframes (it now honours its limit), fresh cells stored into dynamic properties,sprintfarguments,(array) new X(), andunset()of an element reference.$o->$kin a loop wrote one key (an arena key buffer was reused),elem_encodestamped the shared empty array, a static local's arena initialiser was reclaimed, and allocas of the staged preamble became dynamic (SIGBUS on arm64 macOS).changesjob lists PR files through the paginated API;gh pr diffanswers 406 past 300 files, which had skipped every Linux shard on this PR.Still open, for separate PRs: freeing a dead buffered object at once instead of at the next cycle collection (RSS is 200–230 MB vs Zend's ~47 MB), the remaining ~1.2 KB per
/api/ping, #590 and #592.