Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

This question already has an answer here:

When I started studying C++ a couple of years ago, a lot of the books and texts I read did a very thorough job of explaining, how the code written would translate into concrete operations in the hardware (like dynamically memory allocation, pointer arithmetics etc.). I found those explanations extremely helpful in order to fully understand the language.

Now I am studying JavaScript and learning about the whole functional programming paradigm, with functions as first class objects and so on. I have read a lot of texts and books about how to use JavaScript, but I have yet to come across a source, that explains the low-level inner workings of the language (like how a function is represented in memory, what excactly happens when a function is called with .apply() and a new context is provided etc.).

I guess you could say, that what I am looking for is the knowledge needed to write a JS compiler/VM..? How the runtime environments handle the different aspects of the language at a low level.

Does anyone know where to find books or text, that goes into the very low level details of the language?

share|improve this question

marked as duplicate by gnat, Martijn Pieters, jmo21, thorsten müller, MichaelT Apr 9 '13 at 15:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 4 down vote accepted

Memory representation etc is implementation details specific for each js compiler. There is no right or wrong way to do it, as long as your implementation works as expected.

But what you are looking for is probably the ECMAScript specification, which is detailed enough.

If you're interested in implementation details, I suggest you check out the various projects, such as Chromes' V8 engine. It comes with code as well :)

There are no books about JavaScript Engines as far as I know.

share|improve this answer
Thank you very much for answering Martin, I will look into the links you have provided. –  acrmuui Apr 9 '13 at 8:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.