Skip to content

MIR Backend - #94

Merged
muit merged 251 commits into
mainfrom
feature/mir-backend
Oct 23, 2026
Merged

muit merged 251 commits into
mainfrom
feature/mir-backend

Conversation

@muit

@muit muit commented Jan 31, 2024 •

Copy link
Copy Markdown
Member

Tracks the MIR backend work: AST features it needs (assignments, casts, for loops, generated names), the MIR/C codegen itself, and the editor/UI work built on top (node table layout, type chips, context menu improvements).

  • AST: assignment statements, cast system, for loops, unique generated names
  • MIR: statement pin names, scoped name stacks, readable loop index names, assignment rejection
  • EDITOR/UI: node table layout, type chips, searchable context menu, assignment nodes
  • CICD: newer compiler versions in CI

muit added 29 commits October 22, 2026 23:25
The selected row draws as if hovered (or active while pressed) with
ImGuiSelectableFlags_Highlight, using a clearly brighter version of its
own color for colored rows. Nav focus rectangles are hidden, including
the one around the search bar.
The view follows the selection only when it moves or the results change,
so manual scrolling is left alone. The scroll rect leaves a one-line
margin so the next items stay slightly visible, and holding shift moves
the selection five items at a time.
# Conflicts:
#	Libs/Editor/Src/Utils/FunctionGraphContextMenu.cpp
DrawChip paints a name over a rounded background of its color with an
optional icon and ellipsizes it to fit a maximum width. Chip places one
as a non-interactive item, so it takes layout space but has no id, and
SelectableRow draws a selectable row that can highlight like a hovered
item.
Type combo entries and the selected value are drawn as colored type
chips with the type icon, using the UI chip widgets. Entries report
their size to the layout so the dropdown grows to fit them, the closed
combo fills its column and ellipsizes long names, and types are listed
flat by default with an option to group them by category.
The variable editor gives types a wider column, and double clicking a
function opens its file, selects its node and centers the graph on it.
Adds CStmtAssign, which references the variable a statement assigns, and
ast::AddAssign to create it with its execution and value pins. The component is
serialized with the rest.
References, assignments and operators now share PropagateTypes: references and
assignments take the type of the variable they point to, and operators pass the
first type they receive to their output.
The backend has no model for variables yet, so assignments are reported instead
of being silently dropped.
Adds the node drawing with its unnamed value pins, and the context menu entry that
creates it from an execution pin or from the canvas.
Literal and getter nodes hold their contents in the title, colored with their type,
while the body of an assignment is that color darkened.
Covers the creation of the node, its statement links, the propagation of the
variable type, that execution pins are not typed as expressions, and serialization.
Chip takes ChipFlags: Background paints the colored chip, None draws flat
text. It is a non-interactive item, so containers grow with it. The
separate DrawChip, DrawChipText and CalcChipWidth helpers are gone.
TypeCombo takes TypeComboFlags to draw the selected type as a chip and to
group types by category. One type list is filtered per category with the
pipe ECS helpers, and entries and the selected value are chip items, so
the dropdown grows with them. GetTypeIcon takes a scope.
Double clicking a call or picking Show function in its context menu opens
the type that owns the function and selects it there once drawn, or
selects and centers it when it belongs to the open type. The elements
panel double click no longer reopens its own type.
The drag moved nodes by indexing a selection that can change mid drag,
reading past the snapshot of origins and moving nodes that were never
dragged. The snapshot now holds the node ids with their origins.
Entry labels and keywords are views into interned names instead of
copies, and the search is parsed only when its text changes. Matching
and scoring ignore case and match through separators in place, so no
lowercased copies are needed, and the cached keyword array stays inline.
Operator entries are created through a shared helper, and their label is
formatted when drawn.
Variables lead with the icon of their action and show their name as a chip of
their type, and Get/Set join their searchable text. Variables, casts and
constructors explain themselves with a delayed tooltip.

Bumps Pipe for the SetItemTooltip hover flags.
…e/improved-node-rendering

# Conflicts:
#	Libs/Editor/Src/Utils/FunctionGraph.cpp
[EDITOR] Context menu improvements and type chips
[EDITOR] Refactored nodes to follow a table structure
@muit
muit merged commit de3ed30 into main Oct 23, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant