Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

we can get rid of a ton of opcodes, let's do it. make the vm faster #1551

@NullVoxPopuli

Description

@NullVoxPopuli

With every opcode, we introduce a fair amount of infra to support it.

What if remove the constraint that compiled components must be json?

We embed the compiled json in JavaScript anyway, so why bother with parsing a string as json?

We can emit components as JavaScript objects, use arrows for property access, direct invoke functions, etc.
Reducing all of the opcodes for value rendering. No Vm{Modifier,Primitive,PrimitiveReference,Helper,Property,Variable,DynamicHelper,DynamicModifier,Concat,Constant,etc}

This would probably also greatly simplify the error recovery work, as we'd primarily be deleting code from the vm, and changing what the compiler outputs.

This would then allow us to have a big perf boost at runtime, and allow us to re-do error recovery in a way that doesn't add 80kb and be 20% slower.

(On phone, brevity, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions