Everything on the heap is a heap object ;-) I guess the term "bytecode" is slightly overloaded. If you mean "the bytecode of a function", i.e. the entire bytecode representation of that function, then yes, that is indeed stored as an object on the heap (where/how else would it be stored?); and "Bytecode" is the C++ class that describes the layout of that object.
If you mean "each bytecode" in the sense of "each bytecode instruction, e.g. LdaSmi", then no: they are not individual objects. They are raw numbers encoding the respective bytecode instruction. In short: 1 function -> 1 AST (with many AST nodes in it) -> 1 bytecode object (with many bytecode instructions in it). Note that heap objects are not objects of the respective class in the usual C++ sense -- again this is the same for Bytecode and all other heap objects. On Thu, Nov 15, 2018 at 11:27 AM TLim <heuichan....@gmail.com> wrote: > I'm trying to get the idea of how ignition generates the bytecode from the > AST and handles it straight. > > My understanding is that when the Ignition walks through the AST from the > parser, it generates bytecodes. > Then, how it generates is that each bytecode is actually an object of > bytecode class. > > Probably how it gets generated and handled is way more complicated, but I > simply want to get the idea straight first that the bytecode is actually a > class object. > > Thank you! > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.