The Recital Compiler

From Recital Documentation Wiki
Jump to: navigation, search

The Recital Compiler

How does it work

When you run a script, Recital compiles your script into a series of instructions for the Recital Virtual Machine. Unlike PHP, Recital only compiles a script once unless it detects that the source file is newer than the object file that it produces.

The code generated by the Recital compiler is position independent.

There is no need to manually compile scripts unless you need to do so to package up and deploy the object code only of your application.

The Recital Runtime System

The Recital Runtime System (RTS) executes the object code generated by the Recital compiler. Object files are read from disk and loaded dynamically into shared memory segments. The advantage of this is that when an application has been loaded and is being run by one user, further users share the same object code in memory. This results in performance gains and also provides a high degree of scalability for Recital applications.

Memory Management

The Recital Runtime System takes care of dynamic memory allocation and uses reference counting to decide when memory should be freed. This occurs when variables go out of scope and have no further references.

You do not have to concern yourself about garbage collection as the Recital Runtime System will do all the hard work for you.