Skip to content

we can know from this repo that how can a piece of javascript code is execute in engine.

Notifications You must be signed in to change notification settings

AbulBashar38/js-execution-context

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

How to execute javascript in browser

overviewPic āĻ†āĻŽāĻ°āĻž āĻ¯āĻ–āĻ¨ js code āĻ˛āĻŋāĻ–āĻŋ āĻ¤āĻž āĻŦā§āĻ°āĻžāĻ‰āĻœāĻžāĻ°ā§‡ āĻĨāĻžāĻ•āĻž āĻŦāĻŋāĻ­āĻŋāĻ¨ā§āĻ¨ compailer āĻ compiled āĻšā§Ÿā§‡ machine code āĻ āĻ°ā§āĻĒāĻžāĻ¨ā§āĻ¤āĻ° āĻšā§Ÿ āĻ¤āĻ–āĻ¨ āĻ†āĻŽāĻžāĻĻā§‡āĻ° āĻ•āĻŽā§āĻĒāĻŋāĻ‰āĻŸāĻžāĻ° āĻāĻ‡ code āĻŦā§āĻāĻ¤ā§‡ āĻĒāĻžāĻ°ā§‡ āĻāĻŦāĻ‚ āĻ†āĻŽāĻžāĻĻā§‡āĻ° output āĻĻā§‡āĻ–āĻžā§ŸāĨ¤ āĻāĻ‡āĻŸāĻž āĻšāĻšā§āĻ›ā§‡ āĻ¸āĻžāĻ§āĻžāĻ°āĻ¨ āĻ­āĻžāĻŦā§‡ āĻ•āĻŋāĻ­āĻžāĻŦā§‡ js code āĻŦā§āĻ°āĻžāĻ‰āĻœāĻžāĻ°ā§‡ āĻĻā§‡āĻ–āĻžā§Ÿ āĻ¤āĻžāĨ¤ āĻ•āĻŋāĻ¨ā§āĻ¤ā§ āĻāĻ‡ āĻ•ā§‹āĻĄ āĻŦā§āĻ°āĻžāĻ‰āĻœāĻžāĻ°ā§‡āĻ° āĻ‡āĻžā§āĻœāĻŋāĻ¨ā§‡ āĻ•āĻŋāĻ­āĻžāĻŦā§‡ compiled āĻšā§Ÿ āĻ¤āĻž āĻ†āĻŽāĻ°āĻž āĻāĻ–āĻ¨ āĻĻā§‡āĻ–āĻŦā§‹āĨ¤ executionWay javascript code āĻļā§āĻ°ā§āĻ¤ā§‡ interpretaion āĻ āĻ•āĻžāĻœ āĻ•āĻ°āĻ¤ā§‹āĨ¤ intrepretation āĻšāĻ˛ā§‹ āĻĒā§āĻ°āĻ¤āĻŋ āĻ˛āĻžāĻ‡āĻ¨ āĻŦāĻžāĻ‡ āĻ˛āĻžāĻ‡āĻ¨ āĻ•ā§‹āĻĄāĻ•ā§‡ machine code āĻ āĻ•āĻ¨āĻ­āĻžāĻ°ā§āĻŸ āĻ•āĻ°āĻžāĨ¤ āĻ•āĻŋāĻ¨ā§āĻ¤ā§ āĻāĻ‡ process āĻ exection āĻ•āĻ°āĻ˛ā§‡ āĻ…āĻ¨ā§‡āĻ• slow āĻ•āĻžāĻœ āĻ•āĻ°ā§‡āĨ¤ āĻ†āĻ° compilatin process āĻ āĻ¸āĻŦ āĻ•ā§‹āĻĄ āĻ—ā§āĻ˛āĻž āĻāĻ•āĻŦāĻžāĻ°ā§‡ āĻ¨āĻŋā§Ÿā§‡ machine code āĻ āĻ•ā§‹āĻ¨āĻ­āĻžāĻ°ā§āĻŸ āĻ•āĻ°ā§‡ āĻĢā§‡āĻ˛ā§‡āĨ¤ āĻāĻŦāĻ‚ āĻāĻ•āĻ¸āĻžāĻĨā§‡ āĻ¸āĻŦ run āĻ•āĻ°ā§‡ āĻĻā§‡ā§ŸāĨ¤ āĻāĻ¤ā§‡ āĻ…āĻ¨ā§‡āĻ• āĻ¤āĻžāĻ°āĻžāĻ¤āĻžāĻ°āĻŋ compiled āĻšāĻ˛ā§‡āĻ“ debag āĻ•āĻ°āĻž āĻ–ā§āĻŦ āĻ•āĻ āĻŋāĻ¨ āĻšā§Ÿā§‡ āĻ¯āĻžā§ŸāĨ¤ āĻ¤āĻ–āĻ¨ āĻ—ā§āĻ—āĻ˛ā§‡āĻ° āĻŦā§āĻ°āĻžāĻ‰āĻœāĻžāĻ° v8 engine āĻ¤ā§ˆāĻ°āĻŋ āĻ•āĻ°ā§‡ āĻāĻ‡ āĻĻā§āĻ‡ āĻĒāĻĻā§āĻ§āĻ¤āĻŋ āĻ•ā§‡ āĻāĻ•āĻ¸āĻžāĻĨā§‡ āĻ•āĻ°ā§‡āĨ¤ āĻāĻ•ā§‡ JIT-compiler āĻŦāĻ˛āĻž āĻšā§ŸāĨ¤ executionWay āĻ†āĻŽāĻ°āĻž āĻ¯āĻ–āĻ¨ āĻ•ā§‹āĻ¨ā§‹ function call āĻ•āĻ°āĻŋ āĻ¤āĻ–āĻ¨ JIT-compiler āĻāĻ‡ āĻĒā§āĻ°ā§‹ function āĻ•ā§‡ just in time compiled āĻ•āĻ°ā§‡ run āĻ•āĻ°ā§‡ āĻĻā§‡ā§ŸāĨ¤ js code exection āĻ•āĻ°āĻžāĻ° āĻ¸āĻŽā§Ÿ āĻĒā§āĻ°āĻž āĻ•ā§‹āĻĄāĻ•ā§‡ āĻĒāĻžāĻ°ā§āĻŸ āĻŦāĻžāĻ‡ āĻĒāĻžāĻ°ā§āĻŸ āĻ­ā§‡āĻ™ā§āĻ—ā§‡ āĻ¤āĻžāĻ°āĻĒāĻ° compile āĻ•āĻ°āĻž āĻšā§ŸāĨ¤ āĻāĻ‡ āĻ›ā§‹āĻŸ āĻ›ā§‹āĻŸ āĻĒāĻžāĻ°ā§āĻŸāĻ•ā§‡āĻ‡ execution context āĻŦāĻ˛ā§‡āĨ¤ executionWay js Execution āĻšā§Ÿ āĻĻā§āĻ‡ āĻ­āĻžāĻŦā§‡ āĻĒā§āĻ°āĻĨāĻŽā§‡ global execution contex āĻ¤āĻžāĻ°āĻĒāĻ° function execution context. golbal execution context āĻ āĻĻā§āĻ‡āĻŸāĻŋ phase āĻĨāĻžāĻ•ā§‡āĨ¤ āĻāĻ•āĻŸāĻŋ loading/creating state āĻ†āĻ° āĻ…āĻ¨ā§āĻ¯āĻŸāĻŋ executing state. Loading/creating execution phase āĻ āĻāĻ•āĻŸāĻŋ global object āĻĨāĻžāĻ•ā§‡ āĻāĻ•āĻŸāĻŋ this object āĻĨāĻžāĻ•ā§‡ āĻāĻ•āĻŸāĻŋ variable object āĻ“ āĻāĻ•āĻŸāĻŋ scope chain āĻĨāĻžāĻ•ā§‡āĨ¤ executionWay āĻāĻ‡ global loading phase āĻ āĻĒā§āĻ°āĻĨāĻŽā§‡ āĻ¸āĻŦ variable āĻ—ā§āĻ˛ā§‹āĻ•ā§‡ variable object āĻāĻ° āĻŽāĻ§ā§āĻ¯ā§‡ undefined āĻšāĻŋāĻ¸āĻžāĻŦā§‡ āĻ°āĻžāĻ–āĻž āĻšā§ŸāĨ¤ āĻ†āĻ° function āĻāĻ° body āĻ—ā§āĻ˛āĻž āĻ°āĻžāĻ–āĻž āĻšā§ŸāĨ¤ executionWay āĻ¤āĻžāĻ°āĻĒāĻ° execution phase āĻ variable āĻ—ā§āĻ˛ā§‹āĻ° value assign āĻ•āĻ°ā§‡ āĻĻā§‡ā§Ÿ āĻāĻŦāĻ‚ function āĻ¯āĻĻāĻŋ āĻĨāĻžāĻ•ā§‡ āĻ¤āĻžāĻšāĻ˛ā§‡ āĻ¸ā§‡āĻ‡ function āĻ¯āĻĻāĻŋ call āĻšā§Ÿ āĻ¤āĻŦā§‡ function execution context āĻļā§āĻ°ā§ āĻšā§ŸāĨ¤ executionWay function execution āĻ āĻ“ āĻāĻ•āĻ‡ āĻĻā§āĻ‡āĻŸāĻŋ phase āĻĨāĻžāĻ•ā§‡āĨ¤ loading/creation state and exectioun state. function āĻāĻ° loading state āĻ global objec āĻāĻ° āĻŦāĻĻāĻ˛ā§‡ arguments āĻ¨āĻžāĻŽā§‡āĻ° āĻāĻ•āĻŸāĻž object āĻĨāĻžāĻ•ā§‡āĨ¤ āĻāĻ‡āĻ–āĻžāĻ¨ā§‡ āĻ¸āĻŦ arguments and peramitar āĻ—ā§āĻ˛āĻž āĻĨāĻžāĻ•ā§‡āĨ¤ āĻ†āĻ° āĻŦāĻžāĻ•āĻŋ āĻ¸āĻŦ global execution āĻāĻ° āĻŽāĻ¤āĻ‡ same āĻšā§ŸāĨ¤ executionWay function āĻ¯āĻ–āĻ¨ execute āĻšā§Ÿ āĻ¤āĻ–āĻ¨ variable āĻ—ā§āĻ˛āĻžāĻ° āĻŽāĻžāĻ¨ assigne āĻšā§Ÿ āĻāĻŦāĻ‚ āĻ•ā§‹āĻ¨ā§‹ āĻ…āĻĒāĻžāĻ°ā§‡āĻļāĻ¨ āĻĨāĻžāĻ•āĻ˛ā§‡ āĻ¤āĻž āĻ“ āĻšā§ŸāĨ¤ executionWay āĻāĻ–āĻ¨ āĻ†āĻŽāĻ°āĻž āĻāĻ•āĻŸāĻž āĻŦā§œ āĻ•ā§‹āĻĄ āĻĻā§‡āĻ–āĻŦā§‹ āĻ¯ā§‡ āĻāĻ‡āĻŸāĻž āĻ•āĻŋāĻ­āĻžāĻŦā§‡ execute āĻšāĻšā§āĻ›ā§‡āĨ¤ āĻļā§āĻ°ā§āĻ¤ā§‡āĻ‡ āĻāĻ•āĻŸāĻž global execution context āĻ¤ā§ˆāĻ°āĻŋ āĻšā§ŸāĨ¤ āĻāĻŦāĻ‚ āĻāĻ‡āĻŸāĻž execution stuck āĻāĻ° āĻ¸āĻŦāĻšā§‡ā§Ÿā§‡ āĻ¨āĻŋāĻšā§‡ āĻœāĻŽāĻž āĻšā§ŸāĨ¤ āĻ¤āĻžāĻ°āĻĒāĻ° āĻ¯āĻ–āĻ¨ loading phase āĻ āĻĨāĻžāĻ•ā§‡ āĻ¤āĻ–āĻ¨ variable a āĻŸāĻž undefined set āĻšā§ŸāĨ¤ āĻāĻŦāĻ‚ function āĻāĻ° body āĻšāĻŋāĻ¸āĻžāĻŦā§‡ one function āĻŸāĻž āĻ“ set āĻšā§ŸāĨ¤ executionWay āĻ¯āĻ–āĻ¨ execution phase āĻ āĻ¯āĻžā§Ÿ āĻ¤āĻ–āĻ¨ āĻĻā§‡āĻ–ā§‡ āĻ¯ā§‡ one() function āĻŸāĻž call āĻšāĻšā§āĻ›ā§‡āĨ¤ āĻ¤āĻ–āĻ¨ āĻ¸ā§‡ one function āĻāĻ° execution āĻļā§āĻ°ā§ āĻšā§Ÿ āĻāĻŦāĻ‚ function execution context stuck āĻ āĻœāĻŽāĻž āĻšā§ŸāĨ¤ āĻāĻ‡āĻ­āĻžāĻŦā§‡ āĻāĻ•āĻŸāĻž āĻāĻ•āĻŸāĻž āĻ•āĻ°ā§‡ execution āĻšāĻ¤ā§‡ āĻĨāĻžāĻ•ā§‡ āĻ†āĻ° stuck āĻ āĻœāĻŽāĻž āĻšā§ŸāĨ¤ āĻ¯āĻ–āĻ¨ āĻ‡ āĻ•ā§‹āĻ¨ā§‹ function āĻ•āĻŋāĻ›ā§ return āĻ•āĻ°ā§‡ āĻ¤āĻ–āĻ¨ execution āĻŦāĻ¨ā§āĻ§ā§‹ āĻšā§Ÿā§‡ āĻœāĻžā§ŸāĨ¤ executionWay executionWay

About

we can know from this repo that how can a piece of javascript code is execute in engine.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published