|
Noble Ape
The Central Directories of the Noble Ape Simulation.
|
This handles the interpretation end of ApeScript (i.e. after parsing). Unlike the parsing code that should be run only once in general use, the interpretation code is run multiple times in a simulation cycle. Thus slightly more care must be taken in optimizing the interpret code. More...
#include "noble.h"Go to the source code of this file.
Functions | |
| void | interpret_individual (n_individual_interpret *individual) |
| void | interpret_cleanup (n_interpret **to_clean) |
| n_int | interpret_cycle (n_interpret *code, n_individual_interpret *individual, n_int exit_offset, void *structure, void *data, script_external *start, script_external *end) |
This handles the interpretation end of ApeScript (i.e. after parsing). Unlike the parsing code that should be run only once in general use, the interpretation code is run multiple times in a simulation cycle. Thus slightly more care must be taken in optimizing the interpret code.
Definition in file interpret.c.
| void interpret_cleanup | ( | n_interpret ** | to_clean | ) |
Makes sure all the data associated with the interpreter is freed etc.
| to_clean | The pointer to the n_interpret struct that is being expunged. |
Definition at line 602 of file interpret.c.
| n_int interpret_cycle | ( | n_interpret * | code, |
| n_individual_interpret * | individual, | ||
| n_int | exit_offset, | ||
| void * | structure, | ||
| void * | data, | ||
| script_external * | start, | ||
| script_external * | end | ||
| ) |
This processes a single cycle of the ApeScript interpreter.
| code | the ApeScript code to be executed. |
| exit_offset | if greater than minus one, the value entry to indicate exiting interpreter. |
| structure | the structure to be passed into the start and end functions. |
| start | the function to be run at the start of the ApeScript cycle. |
| end | the function to be run at the end of the ApeScript cycle. |
Definition at line 627 of file interpret.c.
| void interpret_individual | ( | n_individual_interpret * | individual | ) |
Definition at line 591 of file interpret.c.
1.8.1.1