scale.frontend.fortran
Class SourceFortran

java.lang.Object
  extended by scale.frontend.SourceLanguage
      extended by scale.frontend.fortran.SourceFortran

public class SourceFortran
extends SourceLanguage

A class which defines source language characteristics for Fortran77.

$Id: SourceFortran.java,v 1.1 2006-12-05 21:02:10 burrill Exp $

Copyright 2006 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

The compiler uses these methods to generate valid code for Fortran programs.


Field Summary
 
Fields inherited from class scale.frontend.SourceLanguage
cColumnMajor, cGarbageCollected, cInsensitive, cRowMajor, cSensitive, cUserManaged
 
Constructor Summary
SourceFortran()
           
 
Method Summary
 int arrayIndexOrigin()
          Fortran arrays start at index value 1.
 boolean arrayOrdering()
          Fortran arrays are laid out in column major order.
 java.lang.String getLanguageId()
          Return the LanguageId associated with this source language.
 boolean isFortran()
          Return true if the source langauge is Fortran.
 boolean mainFunction()
          Fortran does not define the Main function to be the routine "main".
 boolean nameMangle()
          Fortran does not need to mangle names.
 ParameterMode parameterPassing(Type t)
          By default, Fortran passes arrays by reference except for arrays which are passed by address pass by value.
 
Methods inherited from class scale.frontend.SourceLanguage
classFieldOrderMatters, isCaseSensitive, isMemUserManaged, mathodOrderMatters, recordFieldOrdermatters, setClassFieldOrderRule, setIdentifierCase, setMemoryManagement, setMethodsRule, setRecordFieldOrderRule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceFortran

public SourceFortran()
Method Detail

arrayOrdering

public boolean arrayOrdering()
Fortran arrays are laid out in column major order.

Specified by:
arrayOrdering in class SourceLanguage
Returns:
cColumnMajor

arrayIndexOrigin

public int arrayIndexOrigin()
Fortran arrays start at index value 1.

Specified by:
arrayIndexOrigin in class SourceLanguage
Returns:
1

parameterPassing

public ParameterMode parameterPassing(Type t)
By default, Fortran passes arrays by reference except for arrays which are passed by address pass by value.

Specified by:
parameterPassing in class SourceLanguage
Parameters:
t - the type of the actual parameter.
Returns:
the parameter passing mode
See Also:
FormalDecl

nameMangle

public boolean nameMangle()
Fortran does not need to mangle names.

Specified by:
nameMangle in class SourceLanguage
Returns:
false

mainFunction

public boolean mainFunction()
Fortran does not define the Main function to be the routine "main".

Specified by:
mainFunction in class SourceLanguage
Returns:
false

getLanguageId

public java.lang.String getLanguageId()
Return the LanguageId associated with this source language.

Specified by:
getLanguageId in class SourceLanguage

isFortran

public final boolean isFortran()
Return true if the source langauge is Fortran.

Overrides:
isFortran in class SourceLanguage