CSA, Torque & builtins

Introduction & Rational Imagine you were implementing the V8 engine. Your main target is to be able to run the ECMAScript specification for Javascript. This requires reading through the comprehensive specification and implement the required behavior. V8’s optimizing compiler Turbofan uses a combination of techniques to make long-running code faster with help of type information and optimizations. However, you would still require a good baseline performance for all the functions that ECMAScript defines....

November 14, 2020 · 8 min · Pranay Garg

Exploring V8 Engine - II (Control Flow & Memory Structures)

In this post, we will start our exploration of V8 engine and look under the hood at call sequences that are made to execute a simple 'hello' + 'world' command. This post is a follow up to our Exploring V8 Engine - I post. Setting up release.sample build (monolithic with debug) To test out the V8 embedding, you need a compile your sample hello-world.cc file with the V8 source code. Doing this for each sample would be tedious....

October 15, 2020 · 5 min · Pranay Garg

Exploring the V8 engine - I

Exploring the V8 engine - I This post starts our exploration into the V8 sourcecode. We use the hello-world.cc and the embedding process as our starting point and go exploring from there. Introduction V8’s codebase is no small beast. It keeps getting updated all the time with faster and often changes which refine a huge chunk of internal structures. Our motivation in this post is to understand the basics about the staple objects in V8’s execution context alongside the basic control flow....

September 23, 2020 · 6 min · Pranay Garg