Skip to main content

Call Stackwhere code executed via EC, to track execution order

EC

Environ to run JS, to contain VEST (Variable Environment, Scope Chain & this keyword), to fill task pipline in Call Stack

Call Stack stores Primitives but not Objects

JavaScript code runs inside an EC in the Call Stack

Stack OverFlow

References

  1. **Event Loop** ↔ (mechanism) to orchestrate Non-Blocking Concurrency Model by manageCallback Functions between Callback Queue& Call Stack, to await execute

  2. Execution ↔ (process) to run Machine Code immediately in Call Stack

  3. JS EngineProgram to execute JS Source Code, consists of Call Stack, Heap, Callback Queue & Event Loop

  4. EC ↔ Environ to run JS, to contain VEST (Variable Environment, Scope Chain & this keyword), to fill task pipline in Call Stack

  5. InternalErrorException when exceed Call Stack size in JS Engine - when something too large || Infinite Loop

  6. Asynchronous CodeNon-Blocking Code to defer execute, wait in Callback Queue & move to Call Stack once background task Settled

  7. MicrotaskCallback to defer fn after parent EC popped off Call Stack

  8. Microtasks Queue ↔ used to queue async promises, to defer execute until Call Stack empty