IE10 JavaScript enhancements detailed

Posted on Thursday, June 14 2012 @ 17:06 CEST by Thomas De Maesschalck
Microsoft's upcoming Internet Explorer 10 will feature a revised version of the Chakra JavaScript engine that was first launched with IE9. Details about the new features can be read at the IE Blog.
Chakra, though only one of the browser subsystems – is itself comprised of several components which work together to process and execute JavaScript code. When the browser downloads a JavaScript file it hands its content over to Chakra’s parser to verify its syntactical correctness. This is the only operation that applies to the entire file. Subsequent steps are performed individually on each function (including the global function). As a function is about to be executed (the global function is run immediately after parsing) Chakra’s parser builds an abstract syntax tree (AST) representation of the code, and hands it off to the bytecode generator, which produces an intermediate form (bytecode) suitable for execution by the interpreter (but not directly by the CPU). Both the AST and the function bytecode are preserved so they don’t need to be recreated on subsequent executions. The interpreter is then invoked to run the function. As the interpreter executes individual operations it collects information (a profile) about the types of inputs it encounters and keeps track of how many times the function was called.


About the Author

Thomas De Maesschalck

Thomas has been messing with computer since early childhood and firmly believes the Internet is the best thing since sliced bread. Enjoys playing with new tech, is fascinated by science, and passionate about financial markets. When not behind a computer, he can be found with running shoes on or lifting heavy weights in the weight room.



Loading Comments