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
High-level programming language
(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!
== Execution modes == {{refimprove section|find=Execution modes|date=October 2018}} There are three general modes of execution for modern high-level languages: ; Interpreted: When code written in a language is [[Interpreted language|interpreted]], its syntax is read and then executed directly, with no compilation stage. A program called an ''interpreter'' reads each program statement, following the program flow, then decides what to do, and does it. A hybrid of an interpreter and a compiler will compile the statement into machine code and execute that; the machine code is then discarded, to be interpreted anew if the line is executed again. Interpreters are commonly the simplest implementations of the behavior of a language, compared to the other two variants listed here. ; Compiled: When code written in a language is [[Compiled language|compiled]], its syntax is transformed into an executable form before running. There are two types of compilation: :; Machine code generation: Some compilers compile source code directly into [[machine code]]. This is the original mode of compilation, and languages that are directly and completely transformed to machine-native code in this way may be called ''truly compiled'' languages. See [[assembly language]]. :; Intermediate representations: When code written in a language is compiled to an [[intermediate representation]], that representation can be optimized or saved for later execution without the need to re-read the source file. When the intermediate representation is saved, it may be in a form such as [[bytecode]]. The intermediate representation must then be interpreted or further compiled to execute it. [[Virtual machine]]s that execute bytecode directly or transform it further into machine code have blurred the once clear distinction between intermediate representations and truly compiled languages. ; Source-to-source translated or transcompiled: Code written in a language may be translated into terms of a lower-level language for which native code compilers are already common. [[JavaScript]] and the language [[C (programming language)|C]] are common targets for such translators. See [[CoffeeScript]], [[Chicken (Scheme implementation)|Chicken]] Scheme, and [[Eiffel (programming language)|Eiffel]] as examples. Specifically, the generated C and C++ code can be seen (as generated from the Eiffel language when using the [[EiffelStudio]] IDE) in the EIFGENs directory of any compiled Eiffel project. In Eiffel, the ''translated'' process is referred to as transcompiling or transcompiled, and the Eiffel compiler as a transcompiler or [[source-to-source compiler]]. Note that languages are not strictly ''interpreted'' languages or ''compiled'' languages. Rather, implementations of language behavior use interpreting or compiling. For example, [[ALGOL 60]] and [[Fortran]] have both been interpreted (even though they were more typically compiled). Similarly, Java shows the difficulty of trying to apply these labels to languages, rather than to implementations; Java is compiled to bytecode which is then executed by either interpreting (in a [[Java virtual machine]] (JVM)) or compiling (typically with a just-in-time compiler such as [[HotSpot (virtual machine)|HotSpot]], again in a JVM). Moreover, compiling, transcompiling, and interpreting is not strictly limited to only a description of the compiler artifact (binary executable or IL assembly). === High-level language computer architecture === Alternatively, it is possible for a high-level language to be directly implemented by a computer β the computer directly executes the HLL code. This is known as a ''[[high-level language computer architecture]]'' β the [[computer architecture]] itself is designed to be targeted by a specific high-level language. The [[Burroughs large systems]] were target machines for [[ALGOL 60]], for example.<ref>{{Citation|last=Chu|first=Yaohan|chapter=Concepts of High-Level Language Computer Architecture|date=1975|pages=1β14|publisher=Elsevier|isbn=9780121741501|doi=10.1016/b978-0-12-174150-1.50007-0|title=High-Level Language Computer Architecture}}</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)