Compiling imperative code inside phrase or rule definitions. This is version 1.
-
-
What This Module Does - An overview of the imperative module's role and abilities.
-
-
Chapter 1: Configuration and Control
-
Imperative Module - Setting up the use of this module.
-
-
Managing the compilation of Inter functions.
-
Stack Frames - When Inform compiles imperative code, it does so in the context of a "stack frame". -
Local Variable Slates - The collection of Inter locals belonging to a stack frame. -
Local Variables - Local variables are used for call parameters, temporary values, and other ephemeral workspace. -
Local Parking - Like Free Parking in Monopoly, except that it is not free and has an overhead cost. -
Code Blocks - Blocks of code are used to give conditionals and loops greater scope, as in more traditional programming languages. -
Functions - To compile Inter functions. -
Phrase Requests - To store and later fill requests to compile To... phrases. -
Closures - To provide the names of phrases as first-class values. -
Compile Imperative Definitions - Compiling an Inter function from the body of an imperative definition.
-
-
Generating code to test or assert propositions from predicate calculus.
-
Compiling from Specifications - To compile specifications into Inform 6 values, conditions or void expressions. -
Emitting from Schemas - Here we emit code from an I6 schema. -
Compile Atoms - In this section, given an atom of a proposition we compile I6 code as required for any of three possible outcomes: (i) to test whether it is true, (ii) to make it henceforth true, or (iii) to make it henceforth false. -
Deciding to Defer - To decide whether a proposition can be compiled immediately, in the body of the current routine, or whether it must be deferred to a routine of its own, which is called from the current routine. -
Cinders and Deferrals - To compile terms, having carefully preserved any constants which might have been lost in the process of deferring a proposition (such tricky constants being called "cinders"). -
Compile Deferred Propositions - To compile the I6 routines needed to perform the tests or tasks deferred as being too difficult in their original contexts.
-
-
Generating code to perform invocations of individual phrases.
-
Compile Blocks and Lines - Compiling a code block of lines from an imperative definition. -
Compile Invocations - Here we generate Inform 6 code to execute the phrase(s) called for by an invocation list. -
Compile Invocations As Calls - Here we generate Inform 6 code to execute the phrase(s) called for by an invocation list. -
Compile Invocations Inline - Here we generate Inform 6 code to execute the phrase(s) called for by an invocation list. -
Compile Arithmetic - To compile code performing an arithmetic operation. -
Compile Solutions to Equations - To compile code to solve an equation involving numerical quantities.
-
Powered by Inweb.