|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.frontend.SourceLanguage
public abstract class SourceLanguage
An abstract class for supporting multiple source languages.
$Id: SourceLanguage.java,v 1.1 2006-12-05 21:02:07 burrill Exp $
Copyright 2006 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
This class contains methods which define certain characteristics about the source language. The compile needs to know about specific source language details to generate valid code.
Field Summary | |
---|---|
static boolean |
cColumnMajor
Array ordering is column major |
static boolean |
cGarbageCollected
Java is an example of a garbage-collected memory management language. |
static boolean |
cInsensitive
The language is case-insensitive. |
static boolean |
cRowMajor
Array ordering is row major. |
static boolean |
cSensitive
Implemenations of the generation interface are required to handle both case sensitive and insensitive identifiers. |
static boolean |
cUserManaged
These attributes specify how dynamic memory is managed by the source language. |
Constructor Summary | |
---|---|
SourceLanguage()
|
Method Summary | |
---|---|
abstract int |
arrayIndexOrigin()
Return the array index origin for the source language. |
abstract boolean |
arrayOrdering()
Specifies the way that arrays are laid out. |
boolean |
classFieldOrderMatters()
Return true if the order of class fields in memory matters. |
abstract java.lang.String |
getLanguageId()
Return the string associated with this source language. |
boolean |
isCaseSensitive()
Return true if identifiers are case sensitive. |
boolean |
isFortran()
Return true if the source langauge is Fortran. |
boolean |
isMemUserManaged()
Return true if the lanuage relies on user-written memory management. |
abstract boolean |
mainFunction()
Returns true if the source language defines "main" (e.g, C). |
boolean |
mathodOrderMatters()
Return true if the order of class methods in the virtual table matters. |
abstract boolean |
nameMangle()
Returns true if names need to be mangled (Function Name Encoding). |
abstract ParameterMode |
parameterPassing(Type t)
Specifies the parameter passing mode used by default. |
boolean |
recordFieldOrdermatters()
Return true if the order of record fields in memory matters. |
void |
setClassFieldOrderRule(boolean orderMatters)
Specify if the order of class fields in memory matters. |
void |
setIdentifierCase(boolean cs)
Specify if the language is case sensitive. |
void |
setMemoryManagement(boolean mm)
Specify the memory management used by the language. |
void |
setMethodsRule(boolean methodsMatter)
Specify if the order of class methods in the virtual table matters. |
void |
setRecordFieldOrderRule(boolean orderMatters)
Specify if the order of record fields in memory matters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean cRowMajor
public static final boolean cColumnMajor
public static final boolean cSensitive
The language is case-sensitive.
public static final boolean cInsensitive
public static final boolean cUserManaged
C++ is an example of a user-managed memory management language.
public static final boolean cGarbageCollected
Constructor Detail |
---|
public SourceLanguage()
Method Detail |
---|
public abstract boolean arrayOrdering()
public abstract int arrayIndexOrigin()
public abstract ParameterMode parameterPassing(Type t)
t
- the type of the actual parameter
FormalDecl
public abstract boolean nameMangle()
public abstract boolean mainFunction()
public abstract java.lang.String getLanguageId()
public boolean isCaseSensitive()
public void setIdentifierCase(boolean cs)
public boolean isMemUserManaged()
public void setMemoryManagement(boolean mm)
mm
- is true if the language relies on user-written memory
management. C++ is an example of a user-managed memory
management language.public void setRecordFieldOrderRule(boolean orderMatters)
public boolean recordFieldOrdermatters()
public void setClassFieldOrderRule(boolean orderMatters)
public boolean classFieldOrderMatters()
public void setMethodsRule(boolean methodsMatter)
public boolean mathodOrderMatters()
public boolean isFortran()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |