public final class VarScope extends Object
Constructor and Description |
---|
VarScope(StaticContext sc)
Constructor for a top-level module.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanUp(Scope expr)
Deletes all unused variables from this scope and assigns stack slots.
|
VarScope |
copy(QueryContext qc,
IntObjMap<Var> vs)
Copies this VarScope.
|
int |
enter(QueryContext qc)
Enters this scope.
|
static void |
exit(QueryContext qc,
int fp)
Exits this scope.
|
Var |
newCopyOf(QueryContext qc,
Var var)
Creates a new copy of the given variable in this scope.
|
Var |
newLocal(QueryContext qc,
QNm name,
SeqType typ,
boolean param)
Creates a new local variable in this scope.
|
int |
stackSize()
Stack-frame size needed for this scope.
|
String |
toString() |
public VarScope(StaticContext sc)
sc
- static contextpublic Var newLocal(QueryContext qc, QNm name, SeqType typ, boolean param)
qc
- query contextname
- variable nametyp
- type of the variableparam
- function parameter flagpublic Var newCopyOf(QueryContext qc, Var var)
qc
- query contextvar
- variable to copypublic int enter(QueryContext qc)
qc
- query contextpublic static void exit(QueryContext qc, int fp)
qc
- query contextfp
- frame pointerpublic void cleanUp(Scope expr)
expr
- the scopepublic int stackSize()
public VarScope copy(QueryContext qc, IntObjMap<Var> vs)
qc
- query contextvs
- variable mappingCopyright © 2005–2015 BaseX Team. All rights reserved.