Eric Streit eric

eric pushed to master at eric/Wirth-AT-grammars

  • 10fa1e1414 vraious grammars for Wirth languages en atg format

1 day ago

eric created new branch master at eric/Wirth-AT-grammars

1 day ago

eric pushed tag v-TP3-ARGORDER to eric/TP3

2 days ago

eric pushed to master at eric/TP3

  • edd057f5ce TP3-ARGORDER: push each argument as it is parsed, and read the frame from BP+4 backwards A call read its whole argument list before pushing any of it, so a value that existed only in AX (kind 2) did not survive the parse of the argument after it. PSRC8 cproc/cprlp1/cprlp2 does the opposite: CALL exprsave then CALL epushax for each argument AS IT IS READ, and only then the CALL. Three parsers deferred the pushes - ParseCallArgs (a call as a statement), ParseCall (a function inside an expression) and IoCall (write/writeln/read) - and the callee was inverted in the other half: parameter offsets were handed out in declaration order from BP+4, while an argument pushed first ends up farthest from BP. A one-argument call cannot tell the two apart, which is all Runtime.mod has, so nothing outside a fixture had ever seen it. Fix, three sites plus one: * ParseCallArgs / ParseCall: LoadAtom + EmPushAx right after each ParseExpr; the deferred args[] loop is gone. * IoCall: the parse loop and the emit loop are one loop, so an argument is pushed (or its runtime call made) before the next argument is read. This also closes IoCall's second loss - it used to push an argument after the call made for an inline string literal in between. * ProcFunc: once the parameter list has been read, remap [nestMark, symTop) with `off := parmOff + 2 - off`, which sends 4 + 2*(k-1) to 4 + 2*(n-k): the last declared parameter lands at BP+4, where the first-pushed argument is. That range is exactly the parameters - the parameter's own NewSym is the only symbol created inside the loop. New fixture t36_argclobber (eight hand-derived lines) covers all four. It was compiled and run BEFORE this change, and both oracles came back red for the same lines: want 5 3 7 / 0 8 / 8 0 / 8 0 14 / 12 0 / TRUE FALSE / 19 / FALSE 1 got 5 3 7 / 0 8 / 0 0 / 0 0 14 / 0 0 / FALSE FALSE / 10 / TRUE 544 The two plain-name lines were already green and stay green; they are the rows that would catch a fix flipping only one of the two halves, and they were seen green before the fix rather than only after it. No expectation row was re-baselined. t36's row was written while the compiler was still broken and its numbers held, because the reorder emits the same bytes in a different order. t28's row held because the remap hands the same displacements to different names: its two disp16 reads are still +128/+142 (now p8/p1 where they were p63/p70), and its printed sum still comes from the slots the sixteen pushed arguments land in (p55 + p70 = 1 + 16). The t28 source, its comment and check_framedisp's rule were updated to the TP3 frame rule instead. Gates: tests/run_all.sh rc=0, OVERALL: ALL PASS (all fifteen checks); tests/nonvacuity.sh rc=0, "non-vacuity: 62 ok, 0 failed" with Compiler.mod restored byte for byte. t36's in-suite mutation cases do not exist yet - its proof is the pre-fix run above - and SUMMARY.md says so in both the Non-vacuity section and Next steps rather than letting the 62 imply coverage it has not.

2 days ago

eric pushed tag symtab-wip-04 to eric/TurboModula2

2 days ago

eric pushed tag symtab-wip-03 to eric/TurboModula2

2 days ago

eric pushed tag symtab-wip-02 to eric/TurboModula2

2 days ago

eric pushed to master at eric/TurboModula2

  • 41ad3832d3 feat(express): compile groundwork — DEF pair, leak-rule imports, comment syntax EXPRESS.DEF (new, best-guess 22 exports incl. Desc type) + PASS1.DEF stub (CondInsert/InsertEntry, BOOLEAN use proven from MCD frames). MOD: Desc type moved to DEF (duplicate-type signature clash), SYSTEM import trimmed to ADR/MOVE (leak rule proven: ADDRESS/WORD/ RecordPtr visible from DEF), {/* */} markers -> (*{}*) (29x). Still NOT compiling (body type errors remain); NOT verified.
  • 8683ec9c2e docs(summary): SYMTAB prefix 7/14, ImportAll verdict
  • 6d25ab3cb8 feat(symtab): direct-VAR arms, FindExport out, local merges, prefix 7/14
  • e8630bea8e feat(symtab): nesting per call-graph, record views, prefix 7/14
  • 04df0c70b0 feat(symtab): nesting + record views, prefix 7/14 exact
  • View comparison for these 8 commits »

2 days ago

eric pushed tag v1.20.0 to eric/m2-GTK4

2 days ago

eric pushed tag v1.19.0 to eric/m2-GTK4

2 days ago

eric pushed to master at eric/m2-GTK4

  • 2605deaeb3 feat(demos): demo batch 3 - choosers and canvas Port 8 more gtk-demo demos: - DemosChooser: combobox, entry_completion, entry_undo, dialog - DemosCanvas: drawingarea, gestures, mask, snapping Also add the GtkWidget.queue_draw binding (needed by the interactive drawing demos) and register the new demos. Deprecated model-based widgets (GtkComboBox/GtkCellRenderer/GtkTreeModel) and GtkDialog are not bound; those demos use their modern equivalents (GtkDropDown, AdwMessageDialog) as noted in the module headers. Test suite: 45 passed.
  • d6bb082f8f refactor(demos): use the new bindings in four demos - password_entry now uses GtkPasswordEntry instead of a hidden GtkEntry - sizegroup now creates a GtkSizeGroup and adds the label widgets to it - tabs now builds tab stops with PangoTabArray + gtk_text_view_set_tabs - headerbar uses gtk_button_new_from_icon_name for its icon buttons
  • 9d8d05c2dd feat: bind GtkSizeGroup, GtkPasswordEntry and PangoTabArray Add three modules and two helpers used by upcoming demo ports: - GtkSizeGroup (+ GtkSizeGroupMode constants) - GtkPasswordEntry (implements GtkEditable) - PangoTabArray (boxed tab-stop array, with PangoTabAlign constants) - GtkButton.gtk_button_new_from_icon_name - GtkTextView.gtk_text_view_set_tabs / get_tabs
  • 78640055dc feat(demos): demo batch 2 - layout, text, windows and input Port 16 more gtk-demo demos into category modules: - DemosLayout: sizegroup, fixed2, layoutmanager - DemosText: read_more, rotated_text, textmask, textscroll, textundo - DemosWindows: headerbar, infobar, tabs, assistant - DemosInput: password_entry, search_entry, tagged_entry, shortcut_triggers Registered in GtkDemo (19 demos ported so far). Where a C facility is not yet bound (GtkSizeGroup, GtkInfoBar, GtkPasswordEntry, PangoTabArray, gtk_button_new_from_icon_name, widget subclassing/Pango attributes, ...) the port keeps the demo's layout and behaviour using bound equivalents, as noted in the module headers. Test suite: 45 passed.
  • View comparison for these 4 commits »

2 days ago

eric pushed to master at eric/TP3

  • 4ba05b34bd tests: one definition of the .COM image layout, and a sweep region that is measured check_framedisp built its sweep region from RT_SZ = 391, a runtime size that had drifted 61 bytes from the runtime it described, and reported PASS over a region that began inside the runtime, part way through an instruction. It could not see where its own region began: the byte patterns it searches for are in the image wherever they happen to be, and a decode that starts mid-instruction reached the same operands anyway. The region is now two independent readings of the file - where the entry jump says execution starts, where the program header says the runtime ends - measured, required to agree, and refused rather than guessed when they do not. The layout itself moved into tests/comimage.py (ENT_SZ, HDR_SZ, LOAD_BIAS, HEAD, both header words, find_header, entry_target, and an assert tying HEAD's displacements to the header words). comtest.py, the independent checker inside run_com_tests.sh, check_framedisp.py and check_8086.py now import it instead of keeping their own copy; check_8086 also cross-checks the probe size it is given against find_header rather than trusting its caller. tests/check_comimage.py asserts that this stays true: one definition of each part, imported by every reader, no second find_header anywhere in tests/. Its scope is written down in its own docstring, because a check that hand-rolls the layout from inline numbers defines none of those names - the readers catch that a different way, each stating the layout twice from two sources and refusing to proceed when the two disagree. run_all.sh runs the audit as its own check. nonvacuity.sh gains seven cases that turn the readers red one at a time (the restated region, the unlocatable header as reported by two different checks, a copied find_header, a copied constant, the definition deleted, a caller reaching the helper through another consumer) plus three restored greens, one per reader; the harness now restores comimage.py and comtest.py through its exit trap as well, since neither is recoverable from git once a mutation has been staged over them. SUMMARY.md documents the milestone and drops the restated-RT_SZ next step.
  • 842dcff3a8 TP3-CMDRUN: the R key runs the image in-process, with a second oracle CmdRun (the R menu key) is implemented: compile, Clear86, poke LinkSize() bytes at 0100h, Run86, report the guest's AH=4Ch exit code and step count, then wait for ESC. No file is written, so R behaves identically with Destination = Memory and Destination = .COM. Exec86 is that machine: a flat 8086 over a 64 KB array, CS=DS=ES=SS=0, IP=0100h, SP=0FFFEh, three entry points. The 86 suffix on Clear86, Poke86 and Run86 is forced by ISO Modula-2, which has no import renaming, because the flat namespace already holds TextBuf.Clear and Editor.Run. INT 21h AH=02/08/09 are handled directly with a whole-address-space guard; PF/AF, string instructions and non-zero segment registers fault rather than guess, and Exec86.mod's header states the measured instruction set it implements and refuses to answer for anything outside it. Two bugs, both found by writing fixtures for operators nothing had ever executed: 34. A computed left operand was destroyed while the right one was being parsed. SaveLeft and LoadPair fix the binary-operator path. The call path has the same hole - f (a > b, x) - and is documented as a known gap, not fixed. 35. `not` was lowered the same way for booleans and integers, so every boolean negation came out wrong. ParseNeg now dispatches on the operand's class, reproducing TPSRC9's neglevel split. New gates. tests/run_exec86.py runs every image through the interpreter as well as through qemu and requires byte-for-byte agreement; it has no --rebless, so the .out files stay hand-derived and agreeing with qemu is a third opinion rather than a second vote. tests/runtest.py drives R through a pty and asserts eight things, including that no file appeared on disk. Both are registered in run_all.sh, which now runs 14 checks and prints OVERALL: ALL PASS. nonvacuity.sh reaches 52 ok, 0 failed, with every new assertion proven red before it was written down. Named scratch and build logs now go to TP3-comp/tmp/ instead of /tmp, in every test that writes one. SUMMARY.md carries the whole account: the milestone row, the interpreter section, the two new checks, the two new bug narratives, and the gaps that were deliberately left open.
  • View comparison for these 2 commits »

2 days ago

eric pushed tag v1.18.0 to eric/m2-GTK4

2 days ago

eric pushed tag v1.17.0 to eric/m2-GTK4

2 days ago

eric pushed to master at eric/m2-GTK4

  • 2f79f76b03 feat(demos): port Spinner, Paned Widgets and Interactive Overlay First demo batch of the gtk-demo parity port, into demos/DemosBasic: - spinner (spinner.c): two spinners (one sensitive, one disabled) with Play/Stop buttons. - panes (panes.c): nested horizontal/vertical GtkPaned in a frame. - overlay (overlay.c): a 5x5 button grid with a decorative markup label and an interactive entry overlaid. Also add the GtkWidget.set_can_target binding, register the three demos in GtkDemo, and extend test_demos to build/tear them down. Test suite: 45 passed.
  • a8038bedcb feat(demos): full gtk-demo catalogue, name-based registry and browser Lay the foundation for a gtk4-demo-parity port: - tools/extract_demos.py reads the GTK C demo sources and generates demos/DemoCatalog.def/.mod: the metadata (name, title, keywords, description) of all 146 demos. - GtkDemo is now a name-based registry of *ported* demos (NameOf, BuildByName, IsPorted), so demos can be added incrementally. - m2gtkdemo is a gtk-demo-style browser: a searchable sidebar listing every catalogue entry, a search filter over title/keywords, an info pane (title, description, ported/not-ported status) and Run; activating a row opens the demo window. - Makefile/run_tests.sh build DemoCatalog alongside DemoImpl/GtkDemo; test_demos updated to the new API. The browser currently registers the 5 demos ported so far; the remaining 141 are listed and shown as "not ported yet". Subsequent commits port them in batches. Test suite: 45 passed.
  • View comparison for these 2 commits »

2 days ago

eric pushed tag v1.16.0 to eric/m2-GTK4

2 days ago

eric pushed tag v1.15.0 to eric/m2-GTK4

2 days ago

eric pushed to master at eric/m2-GTK4

  • 77f7ed7f98 refactor: hand-curate the Gdk and Gsk bindings Replace all 100 generator-derived Gdk/Gsk modules with hand-curated bindings in the project's house style (prose module headers, C-prototype comments, typed returns instead of ignorable ones, real value records where appropriate). Highlights: - GdkRectangle is now a real RECORD (x, y, width, height) passed by VAR. - Enum-typed accessors/mutators use CARDINAL throughout (e.g. gdk_device_get_direction, gdk_scroll_event_get_direction, gdk_seat_get_capabilities, gdk_toplevel_get_state, gsk_transform_get_category, gsk_texture_scale_node_get_filter). - Pointer returns are the owning type (new/ref/copy) or ADDRESS. - Removed the last variadic and placeholder-parameter artifacts and the "Generated by" provenance lines. - Fixed a couple of generator bugs (gdk_event_get_axes out-parameter, gdk_event_get_history return type). The full generator output remains available under gen/ for breadth; the Gdk/Gsk modules in src/ are now hand-written like the rest of the library. (The remaining libpanel modules are still generator-derived.) Test suite: 45 passed. gir-verify: 0 unexpected.
  • 6b58592c30 feat: full Gdk/Gsk coverage; bind libspelling and libpanel Complete the GTK platform stack and add the two remaining GNOME platform libraries. Gdk-4.0 / Gsk-4.0 (full coverage): - 52 new Gdk modules and 48 new Gsk modules, covering every class, interface and record of Gdk 4.0 and Gsk 4.0 plus their namespace functions and enums: displays/devices/seats, events, surfaces (toplevel/popup), cursors, drag-and-drop, clips, content formats and (de)serialization, textures and Cairo/GL/Vulkan draw contexts, frame clocks; and the Gsk render-node family, renderers, transforms, rounded/clip/path/shadow helpers and GL shaders. - These modules are produced by tools/gir2def.py (the same generator the verifier exercises) and are validated against the installed libraries. Variadic functions are omitted; the hand-written Gdk.def keeps the canonical GdkRGBA record. libspelling 0.4 / libpanel 1.10 (hand-written): - Spelling: SpellingChecker, SpellingDictionary, SpellingLanguage, SpellingProvider, SpellingTextBufferAdapter, SpellingFunctions. - Panel: Application/Workbench/Workspace/DocumentWorkspace, Frame (+ Header/HeaderBar/TabBar/Switcher), Grid/GridColumn/Paned/Statusbar/ OmniBar/Dock/ToggleButton, Widget/Session/SessionItem/SaveDelegate/ SaveDialog/ChangesDialog, Settings/LayeredSettings/GSettingsActionGroup/ ActionMuxer/MenuManager/ThemeSelector/Inhibitor, PanelEnums/Functions. Tooling: - gir_verify.py + Makefile: verify Gdk-4.0, Gsk-4.0, Spelling-1 and Panel-1 too (allowlisting Panel's internal marshallers/macro). Also: - tests/test_platform.mod: Gdk display, Gsk transform, libpanel, spelling - examples/spelling.mod: GtkSourceView 5 + libspelling - Makefile/run_tests.sh: optional libspelling/libpanel detection - README updated Test suite: 45 passed. gir-verify: 0 unexpected (10256 identifiers).
  • View comparison for these 2 commits »

2 days ago

eric pushed to master at eric/Theia-Modula-2

  • 715d8b3d4d Remove superseded 0.31.0 Electron distributables

2 days ago

eric pushed to master at eric/Theia-Modula-2

  • eb99a26e82 Electron: ship all three language plugins in packaged app

2 days ago