Execution context and activation object in details
Table of Contents
There are many interesting articles both in Russian and English.
You can start with this one — http://dmitrysoshnikov.com/ecmascript/javascript-the-core/#execution-context-stack. In Russian — http://dmitrysoshnikov.com/ecmascript/ru-javascript-the-core/#stek-kontekstov-ispolneniya
The short summary
Javascript runtime is synchronous and processes Execution Context Stack
. It’s bottom Execution Context
is global object as everything starts with this.
When some function
or eval is being called
, runtime places it’s Execution Context on top of the stack.
Each Execution context consists of Variable Object
, Scope chain
and this value
.
Variable Object
is a global object for global execution context. It consists of function declarations
and variables
which are declared in global context.
For functions Variable Object
is called Activation Object
and consists of function declarations
and variables
declared inside a function, and it also contains all function arguments
and arguments map
, like this:
Similar Posts
LEAVE A COMMENT
Для отправки комментария вам необходимо авторизоваться.