|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.quercus.program.FunctionGenerator
public abstract class FunctionGenerator
Represents a function
| Constructor Summary | |
|---|---|
protected |
FunctionGenerator()
|
protected |
FunctionGenerator(Location location)
|
| Method Summary | |
|---|---|
void |
analyze(QuercusProgram program)
Analyzes the function. |
void |
analyzeArguments(Expr[] args,
AnalyzeInfo info)
Analyzes the arguments for read-only and reference. |
boolean |
canGenerateCall(Expr[] args)
Returns true if the function can generate the call directly. |
void |
generate(PhpWriter out)
Generates the code for the class component. |
abstract void |
generate(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
Generates code to calluate the expression. |
void |
generateBoolean(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
Generates code to calluate as a boolean expression. |
void |
generateCopy(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
Generates code to calluate as a double expression. |
void |
generateDouble(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
Generates code to calluate as a double expression. |
void |
generateInit(PhpWriter out)
Generates the code for the initialization component. |
void |
generateLong(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
Generates code to calluate as a long expression. |
void |
generateRef(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
Generates code to calluate the expression. |
void |
generateString(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
Generates code to calluate as a string expression. |
void |
generateTop(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
Generates code to calluate as a top-level expression. |
Arg[] |
getArgs()
Returns the args. |
Location |
getLocation()
|
java.lang.String |
getName()
|
boolean |
isAbstract()
Returns true for an abstract function. |
boolean |
isBoolean()
Returns true for a boolean function. |
boolean |
isCallReplacesSymbolTable()
Returns true if the function uses/modifies the local symbol table |
boolean |
isCallUsesSymbolTable()
Returns true if the function uses/modifies the local symbol table |
boolean |
isCallUsesVariableArgs()
Returns true if the function uses variable args. |
boolean |
isDouble()
Returns true for a double function. |
boolean |
isGlobal()
Returns true for a global function. |
boolean |
isLong()
Returns true for a long function. |
boolean |
isReturnsReference()
True for a returns reference. |
boolean |
isString()
Returns true for a string function. |
boolean |
isVoidReturn()
True if the return type is void. |
void |
setGlobal(boolean isGlobal)
Returns true for a global function. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected FunctionGenerator()
protected FunctionGenerator(Location location)
| Method Detail |
|---|
public java.lang.String getName()
public final boolean isGlobal()
public boolean isAbstract()
public final Location getLocation()
public final void setGlobal(boolean isGlobal)
public boolean isBoolean()
public boolean isString()
public boolean isLong()
public boolean isDouble()
public boolean isCallUsesVariableArgs()
public boolean isCallUsesSymbolTable()
public boolean isCallReplacesSymbolTable()
public boolean isReturnsReference()
public boolean isVoidReturn()
public Arg[] getArgs()
public void analyze(QuercusProgram program)
public void analyzeArguments(Expr[] args,
AnalyzeInfo info)
public boolean canGenerateCall(Expr[] args)
public abstract void generate(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
throws java.io.IOException
out - the writer to the Java source code.
java.io.IOException
public void generateRef(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
throws java.io.IOException
out - the writer to the Java source code.
java.io.IOException
public void generateTop(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
throws java.io.IOException
out - the writer to the Java source code.
java.io.IOException
public void generateBoolean(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
throws java.io.IOException
out - the writer to the Java source code.
java.io.IOException
public void generateString(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
throws java.io.IOException
out - the writer to the Java source code.
java.io.IOException
public void generateLong(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
throws java.io.IOException
out - the writer to the Java source code.
java.io.IOException
public void generateDouble(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
throws java.io.IOException
out - the writer to the Java source code.
java.io.IOException
public void generateCopy(PhpWriter out,
ExprGenerator funExpr,
Expr[] args)
throws java.io.IOException
out - the writer to the Java source code.
java.io.IOException
public void generate(PhpWriter out)
throws java.io.IOException
out - the writer to the output stream.
java.io.IOException
public void generateInit(PhpWriter out)
throws java.io.IOException
out - the writer to the output stream.
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||