What kind of JS virtual machine is glimmer-vm?

The underlying engine of

Ember.js, which works very differently from the virtual DOM of React or Vue. According to its own description, it is a stack-based virtual machine and can generate bytecode.

this is what it says in the document:

At a high level, Glimmer is made up of two parts:

* The compiler, which turns templates into optimized binary bytecode.

* The runtime, which evaluates that bytecode and translates its instructions into things like creating DOM elements or instantiating JavaScript component classes.

so how does this virtual machine work with Ember based on the stack? How do you generate bytecode in a browser environment? How to handle the event response and how to update the Dom node?

Github address: https://github.com/glimmerjs/.

Some discussions on

hack news: https://news.ycombinator.com/.

Jan.16,2022
Menu