Tag
v8
Published articles tagged v8.
From source code to machine code
An engine has to start running code within milliseconds and still end up with fast machine code for the functions that matter. This chapter follows a function through V8's parser, interpreter, and three compilers, shows how type feedback drives optimization, and explains why optimized code gets thrown away.
Hidden classes and inline caches
In the language, an object is a bag of named properties that can change at any time. Engines make property access fast anyway by giving objects hidden shapes and caching what each access site has seen. This chapter shows how shapes form, what breaks them, how arrays get the same treatment, and how to check it yourself.