glimmerjs / glimmer-vm

MIT License
1.13k stars 191 forks source link

Question about opcodes #409

Closed tomasznapieralski closed 7 years ago

tomasznapieralski commented 7 years ago

Hello,

Before i will ask question i would like to say that you have done awesome work in Glimmer project and i cannot wait to see what will you do next :)

Could you point me to code which is responsible render/re-render templates from opcodes and explain more how does it work?

If i compare Ember component from Glimmer 1 output and from Glimmer 2 output, i can see that in Glimmer 1 output there are many javascript instructions that are operating on DOM, like createElement, append and so on, while in Glimmer 2 output there are not, instead there are opcodes.

GavinJoyce commented 7 years ago

Hey @tomasznapieralski, have you seen the following two videos? They both go into details about opcodes and the VMs:

I also gave a talk a few months ago where I step through the append opcodes and describe (as best I can) what's happening:

locks commented 7 years ago

Closing the issue as Gavin provided resources to dive deeper. You can carry out the exploration in the #dev-glimmer channel of the Ember slack!

tomasznapieralski commented 7 years ago

Thank you @GavinJoyce, these videos answers my questions, especially your talk :) If i will have more questions i will ask on Slack.