[Next] [Previous] [Top]

How to Use the Vortex Compiler

4 Using the Cecil Evaluator

The Cecil evaluator functions like a Lisp read-eval-print loop. You can type Cecil code to be evaluated at the Cecil>, debug>, or Eval> prompts (the evaluator does not currently support some language features; see below for a list of non-supported features). The Cecil code is evaluated and any results are displayed. New variables can be declared, and new methods can be added and existing methods can be replaced by entering method declarations to the evaluator. Expressions and declarations can span multiple lines, as long as open brackets, parentheses, or braces remain unmatched at line boundaries. For speed, the evaluator invokes precompiled code wherever possible, and (slowly) interprets expressions otherwise.

Currently all kinds of declarations are supported by the evaluator, except object and field declarations. Top-level let declarations made in the evaluator create global variables available to the evaluator and runtime extension methods (but not the pre-compiled code) in the same run of the program. (As with regular Cecil programs, module declarations are parsed but ignored.)

The evaluator is extremely useful for debugging programs. The ability to redeclare methods is especially helpful when debugging, since a corrected method can simply be loaded into the program and tested without having to wait for the program to be recompiled.

4.1 - Runtime extension methods

How to Use the Vortex Compiler - 20 JAN 97
[Next] [Previous] [Top]