On Mon, Feb 15, 2016 at 1:57 PM, <[email protected]> wrote: > Hi all! > > I'm trying to understand the full-codegen compiler in v8. > > Ok, I've taken the full-codegen code for x64 architecture. > > As I can see in code, it does following things: > Build x64 frame > Allocate locals > And then allocate context <- this is magic for me > > The code's: > > // Possibly allocate a local context. > > if (info->scope()->num_heap_slots() > 0) { > > Comment cmnt(masm_, "[ Allocate context"); > > bool need_write_barrier = true; > > int slots = info->scope()->num_heap_slots() - > Context::MIN_CONTEXT_SLOTS; > > // Argument to NewContext is the function, which is still in rdi. > > ... > > > What does the full-codegen does here?
The context it allocates is the storage for a function's free variables. V8's garbage collector is generational; the write barrier is for tracking object references from the old space to the new space. -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
