1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
// Copyright (c) 1996 David Engberg All rights reserved
// $Id: IntermediateFunction.h,v 1.6 1997/11/10 00:48:06 geppetto Exp $
#ifndef _IntermediateFunction_h
#define _IntermediateFunction_h
#pragma interface
#include <deque>
#include "JavaMethodSignature.h"
#include "JavaAccessFlags.h"
#include "JavaFieldSignature.h"
#include "unicode_string.h"
#include "VariableDeclaration.h"
class CCompiler;
class CIntermediateClass;
class CCompoundStatement;
//
// Class name : CIntermediateFunction
// Description : This class is used during compilation as a half-baked
// representation of a java function. Since Java is not an L-attributed
// language (you can use some names before they are declared), I have to
// resort to this sort of messiness.
// It is basically just a protected structure used by CCompiler.
//
class CIntermediateFunction {
friend class CIntermediateClass;
friend class CCompiler;
public:
CIntermediateFunction(const CJavaMethodSignature& signature,
const CJavaAccessFlags& modifiers,
deque<unicode_string>* adoptThrows,
unsigned long startLineNumber,
bool deprecated = false);
~CIntermediateFunction();
unsigned short GetLocalVariableLocation(unsigned short from) const;
private:
CJavaMethodSignature fSignature;
CJavaAccessFlags fAccessFlags;
deque<unicode_string> fThrows;
unsigned long fMaxLocalVariables;
unsigned long fRealParametersSize;
unsigned long fSyntheticParametersSize;
CCompoundStatement* fBlock;
unsigned long fStartLineNumber;
unsigned long fEndLineNumber;
bool fDeprecated;
deque<CIntermediateClass*> fInnerClasses;
CJavaMethodInfo* fMethodInfoAlias;
};
#endif
|