frostney / frostney/GocciaScript

Move bootstrap shims off the interpreter

Open
#873 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

engine
Dominant language
Pascal
Stars
20
Forks
3
Avg merge
3d 4h
Merged PRs (30d)
45

Description

Summary

Move bootstrap shim loading off the tree-walk interpreter so the engine no longer constructs one.

Why

The engine always builds a TGocciaInterpreter to run bootstrap shims, even in bytecode mode (Goccia.Engine.pas:591; Goccia.Shims.pas takes a TGocciaInterpreter). That keeps the interpreter in every binary's link graph.

Current behavior

ExecuteShims runs the JS-source shims through the interpreter during engine init in both modes.

Expected behavior

  • Shims load without an interpreter (e.g. compiled to bytecode like ordinary source), and the engine stops constructing TGocciaInterpreter.

Scope notes

  • One of the couplings (with #872 and #874) to sever before deletion (#875). Parent #825.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the engine initialization around Goccia.Engine.pas:591 and inspect how Goccia.Shims.pas receives and uses TGocciaInterpreter. Trace ExecuteShims in both interpreter and bytecode modes; done means shims load without constructing a TGocciaInterpreter and the engine no longer retains that coupling.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.