In this post, we are going to understand the inline cache with respect to Chakra. We will briefly look at the need for inline cache as well. If you haven’t heard of inline cache at all, this wiki page and the type blog are necessary to read before we deep dive. To quote from wiki: The concept of inline caching is based on the empirical observation that the objects that occur at a particular call site are often of the same type. In those cases, performance can be increased greatly by storing...| Abhijith Chatra
Javascript is an untyped language. Type in the context of this blog refers to a data structure in the Chakra runtime, which holds additional information about an object. Type is also popularly known as hidden class. Type shares data about a class of objects. The sole purpose of a type in the runtime is to enhance the performance of the user script code. If you are building your own javascript runtime and didn’t care about performance or the memory, you don’t need type.| Abhijith Chatra
A [tagged pointer] (https://en.wikipedia.org/wiki/Tagged_pointer) is a well know concept which every virtual machine (VM) tries to exploit. Unlike some other VM’s Chakra doesn’t tag a pointer. Instead, Chakra tag’s the non-pointer a.k.a a float or an int. For the purpose of this blog, I will illustrate the implementation of tagged float in 64 bit. In the context of this blog float means double-precision 64-bit format IEEE 754-2008 as specified by ECMA262. Chakra doesn’t tag floats in ...| Abhijith Chatra
I joined Chakra team back in 2009. I have hacked a bunch of code in Chakra engine. Eventhough I have spent a great deal of time in this codebase, I still have lot to learn. (I am not an expert in any sense). Intention of this blog is to help new developers to make sense of basic building blocks in Chakra. Over the course I intend to cover all parts of the engine such as type system, jit, runtime etc. If you see any inaccuracy in my blog please point out. Following is the list of articles. I w...| abchatra.github.io