Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Interpreter (computing)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Abstract syntax tree interpreters === {{main|Abstract syntax tree}} In the spectrum between interpreting and compiling, another approach is to transform the source code into an optimized abstract syntax tree (AST), then execute the program following this tree structure, or use it to generate native code [[Just-in-time compilation|just-in-time]].<ref>[http://lambda-the-ultimate.org/node/716 AST intermediate representations], Lambda the Ultimate forum</ref> In this approach, each sentence needs to be parsed just once. As an advantage over bytecode, the AST keeps the global program structure and relations between statements (which is lost in a bytecode representation), and when compressed provides a more compact representation.<ref name="KistlerFranz1999">{{cite journal |last1=Kistler |first1=Thomas |last2=Franz |first2=Michael |author-link2=Michael Franz |title=A Tree-Based Alternative to Java Byte-Codes |journal=International Journal of Parallel Programming |volume=27 |issue=1 |date=February 1999 |pages=21β33 |issn=0885-7458 |doi=10.1023/A:1018740018601 |s2cid=14330985 |citeseerx=10.1.1.87.2257 |url=http://oberon2005.oberoncore.ru/paper/mf1997a.pdf |access-date=2020-12-20 }}</ref> Thus, using AST has been proposed as a better intermediate format for just-in-time compilers than bytecode. Also, it allows the system to perform better analysis during runtime. However, for interpreters, an AST causes more overhead than a bytecode interpreter, because of nodes related to syntax performing no useful work, of a less sequential representation (requiring traversal of more pointers) and of overhead visiting the tree.<ref>[http://webkit.org/blog/189/announcing-squirrelfish/ Surfin' Safari - Blog Archive Β» Announcing SquirrelFish]. Webkit.org (2008-06-02). Retrieved on 2013-08-10.</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)