scale.backend
Enum ResultMode

java.lang.Object
  extended by java.lang.Enum<ResultMode>
      extended by scale.backend.ResultMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ResultMode>

public enum ResultMode
extends java.lang.Enum<ResultMode>

This enum specifies where and what the result is from compiling an expression.

$Id$

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

See Also:
Generator

Enum Constant Summary
ADDRESS
          Indicates that the resultReg specifies the register that when added to the offset in resultRegAddressOffset is the address of the value.
ADDRESS_VALUE
          Indicates that the resultReg specifies the register that contains the base address.
NO_VALUE
          Indicates that the resultReg field contains no value.
NORMAL_VALUE
          Indicates that the resultReg field specifies the register that contains the value.
STRUCT_VALUE
          Indicates that the resultReg field specifies the register that contains the value which is a structure.
 
Method Summary
 java.lang.String toString()
           
static ResultMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ResultMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NO_VALUE

public static final ResultMode NO_VALUE
Indicates that the resultReg field contains no value. In this case resultRegAddressOffset is meaningless. In this case resultRegAddressAlignment is meaningless.


NORMAL_VALUE

public static final ResultMode NORMAL_VALUE
Indicates that the resultReg field specifies the register that contains the value. In this case resultRegAddressOffset is meaningless (i.e., 0). In this case resultRegAddressAlignment is meaningless.


STRUCT_VALUE

public static final ResultMode STRUCT_VALUE
Indicates that the resultReg field specifies the register that contains the value which is a structure. In this case resultRegAddressOffset is the offset to the specified field (for LoadFieldAddressExpr). In this case resultRegAddressAlignment is meaningless.


ADDRESS_VALUE

public static final ResultMode ADDRESS_VALUE
Indicates that the resultReg specifies the register that contains the base address. The address value is the sum of the register value and the offset in resultRegAddressOffset. This mode is used only when resultRegAddressOffset may be non-zero. In this case resultRegAddressAlignment is meaningless (for now).


ADDRESS

public static final ResultMode ADDRESS
Indicates that the resultReg specifies the register that when added to the offset in resultRegAddressOffset is the address of the value. In this case resultRegAddressAlignment specifies the alignment of the address provided in resultReg only.

Method Detail

values

public static ResultMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ResultMode c : ResultMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ResultMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<ResultMode>