[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Request-processing program consists of instructions. There are seven basic instruction types:
grad_instr_conditional_t
grad_instr_call_t
grad_instr_action_t
grad_instr_proxy_t
grad_instr_forward_t
grad_instr_reply_t
Consequently, an instruction is defined as a union of the above node types:
enum grad_instr_type { grad_instr_conditional, grad_instr_call, grad_instr_return, grad_instr_action, grad_instr_reply, grad_instr_proxy, grad_instr_forward }; typedef struct grad_instr grad_instr_t; struct grad_instr { enum grad_instr_type type; grad_instr_t *next; union { grad_instr_conditional_t cond; grad_instr_call_t call; grad_instr_action_t action; grad_instr_reply_t reply; grad_instr_proxy_t proxy; grad_instr_forward_t forward; } v; }; |
Type
member contains type of the instruction. The evaluator
uses type
to determine which part of union v
, holds
instruction-specific data.
Next
points to the next instruction. The evaluator will
go to this instruction unless the present one changes the control
flow.
Finally, v
contains instruction-specific data. These will
be discussed in the following subsections.