public class StubHeader
extends java.lang.Object
StubHeader
writes a C client header to a language
writer output stream. The constructor takes a language writer stream
and method generateCode
writes the C client header code
for the specified symbol to the output stream. The language writer
output stream is not closed by this object.Modifier and Type | Field and Description |
---|---|
static int |
DUMP_STATS
Indices associated with the special, stub-only built-in methods.
|
static int |
MAX_RARRAY_INLINE
Maximum number of rarray arguments allowed in an inlined method.
|
static java.lang.String |
s_epv |
static java.lang.String |
s_self |
static java.lang.String |
s_sepv_func |
static int |
SET_CONTRACTS |
static int |
SET_HOOKS |
Constructor and Description |
---|
StubHeader(LanguageWriterForC writer,
Context context)
Create a
StubHeader object that will write symbol
information to the provided output language writer stream. |
Modifier and Type | Method and Description |
---|---|
static void |
generateBuiltinSignature(LanguageWriterForC lw,
int type,
SymbolID id,
boolean doStatic,
java.lang.String terminator)
Generate the specified stub-only built-in method signature.
|
void |
generateCode(Symbol symbol)
Write C client header information for the provided symbol to the
language writer output stream provided in the constructor.
|
static void |
generateCode(Symbol symbol,
LanguageWriterForC writer,
Context context)
This is a convenience utility function that writes the C client
header information into the provided language writer output stream.
|
static java.lang.String |
getBuiltinArgList(int type)
Return the comma-separated list of arguments associated with the
specified built-in method.
|
static java.lang.String |
getBuiltinComment(int type,
boolean doStatic)
Return the comment description associated with the specified
built-in stub.
|
static java.lang.String |
getDerefFunctionPtr(java.lang.String baseName,
boolean doStatic)
Return a string that dereferences the specified IOR function pointer.
|
static boolean |
stubInlineMethod(Method m) |
public static final java.lang.String s_epv
public static final java.lang.String s_self
public static final java.lang.String s_sepv_func
public static final int DUMP_STATS
public static final int SET_CONTRACTS
public static final int SET_HOOKS
public static final int MAX_RARRAY_INLINE
public StubHeader(LanguageWriterForC writer, Context context)
StubHeader
object that will write symbol
information to the provided output language writer stream.writer
- the output writer to which the header will
be written. This will not be closed.public static void generateCode(Symbol symbol, LanguageWriterForC writer, Context context) throws CodeGenerationException
symbol
- the symbol for which a C client header will
be written.writer
- the output writer to which the header will
be written. This will not be closed.gov.llnl.backend.CodeGenerationException
- this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.CodeGenerationException
public void generateCode(Symbol symbol) throws CodeGenerationException
symbol
- the Symbol
whose header will be
written.CodeGenerationException
- this is a catch all exception. It can be caused by I/O trouble
or violations of the data type invariants.public static boolean stubInlineMethod(Method m)
public static java.lang.String getBuiltinComment(int type, boolean doStatic)
public static void generateBuiltinSignature(LanguageWriterForC lw, int type, SymbolID id, boolean doStatic, java.lang.String terminator)
public static java.lang.String getBuiltinArgList(int type)
public static java.lang.String getDerefFunctionPtr(java.lang.String baseName, boolean doStatic)