coolray.org FAQ Contact Us
CoolRay Banner
CoolRay / Documentation
Main Page   Class Hierarchy   Compound List   Compound Members   Related Pages  

BlockAction Class Reference

A Block action is used during a compound statement to customize the CompoundStatement actions. More...

#include <Parser.h>

List of all members.

Public Methods

virtual ~BlockAction ()
virtual void enterBlock (SymbolTable< SymbolBase > &symbols,Assembler &assembler)=0
 The method enterBlock is called right after the new scope is entered. More...

virtual void leaveBlock (SymbolTable< SymbolBase > &symbols,Assembler &assembler)=0
 The method leaveBlock is called just before the scope is left. More...

virtual long getContextSize ()=0
 The context size determines how many bytes on the stack are needed for context saving while generating the stack frame (e.g. More...

virtual long getLocalCount ()=0
 The number of all 'special' local variables that need reservation of space on the stack.

virtual void buildStackFrame (Assembler &assembler,long localcount)=0
 Generates the stack frame.

virtual void removeStackFrame (Assembler &assembler)=0
 Revokes the stack frame.

virtual bool forceStackFrame ()=0
 In same cases a stack frame may be omitted if it isn't needed to save code and stack space. More...

virtual void entryCode (Assembler &assembler)=0
 entryCode gets executed right after the stack frame of the compound statement is created. More...

virtual void exitCode (Assembler &assembler)=0
 exitCode gets executed right before leaving the compound statement.


Detailed Description

A Block action is used during a compound statement to customize the CompoundStatement actions.


Member Function Documentation

void BlockAction::enterBlock ( SymbolTable< SymbolBase > & symbols,
Assembler & assembler ) [pure virtual]
 

The method enterBlock is called right after the new scope is entered.

Here local symbols may be added to the symbol table. This might be parameters or 'special' local variables. The user defined local variables are automatically handled from the caller.

void BlockAction::entryCode ( Assembler & assembler ) [pure virtual]
 

entryCode gets executed right after the stack frame of the compound statement is created.

It can be used to place code for one time initialization.

bool BlockAction::forceStackFrame ( ) [pure virtual]
 

In same cases a stack frame may be omitted if it isn't needed to save code and stack space.

This function is called if this case arises to check if it is aceptable to omit the stack frame.

long BlockAction::getContextSize ( ) [pure virtual]
 

The context size determines how many bytes on the stack are needed for context saving while generating the stack frame (e.g.

saving of A14 as base register to local variables).

void BlockAction::leaveBlock ( SymbolTable< SymbolBase > & symbols,
Assembler & assembler ) [pure virtual]
 

The method leaveBlock is called just before the scope is left.

Each call to enterBlock is matched by a call to leaveBlock.


The documentation for this class was generated from the following file:
  • Parser.h
You are visitor No.

counter

Copyright (c) 2001 Stefan Michel, All Rights Reserved.
Last modified: