Type

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.

Read More

Tagged Float

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 32 bit but tags integers. On 64 bit Chakra tags both floats and integers. First let us see our object representation, it’s size and the need for tagged floats.

Read More

Hello open source

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 will populate the list as I have more content. If you are particularly interested in a topic do let me know.

  • [Tagged float] (http://abchatra.github.io/TaggedFloat)
  • [Type] (http://abchatra.github.io/Type)

Thank you!

Read More