Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/MLRISC/Doc/labelexp.html
ViewVC logotype

View of /sml/trunk/src/MLRISC/Doc/labelexp.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 499 - (download) (as text) (annotate)
Tue Dec 7 15:44:50 1999 UTC (20 years, 4 months ago) by monnier
File size: 1509 byte(s)
This commit was generated by cvs2svn to compensate for changes in r498,
which included commits to RCS files with non-trunk default branches.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.07 [en] (X11; I; Linux 2.2.7 i686) [Netscape]">
</HEAD>
<BODY bgcolor="#FFFFFF">

<CENTER>
<H1>
<FONT COLOR="#aa0000">Label Expressions</FONT></H1></CENTER>

A <font color="#ff0000"> label expression </font> is a constant
expression defined in terms of labels.  MLRISC uses the type
<tt>labexp</tt> to represent label expressions.  Label expressions
are defined in the structure 
<a href="../instructions/labelExp.sml" target=code> LabelExp </a>.
<pp>
The datatype <tt>labexp</tt> has the following definition:
<pre>
  datatype labexp = 
      LABEL of Label.label
    | CONST of int
    | PLUS of labexp * labexp
    | MINUS of labexp * labexp
    | MULT of labexp * labexp
    | DIV of labexp * labexp
    | LSHIFT of labexp * word
    | RSHIFT of labexp * word
    | AND of labexp * word
    | OR of labexp * word
</pre>

In addition, the following functions are defined in <tt>labexp</tt>:
<ul>
  <li> <tt>valueOf : labexp -> int</tt>  -- Returns the value associated with
a label expression
  <li> <tt>toString : labexp -> string</tt> -- Return the pretty printed representation of an expression
  <li> <tt>hash    : labexp -> word</tt> -- Returns the hash value of an expression
  <li> <tt>==      : labexp * labexp -> bool</tt> -- Tests whether two label expression are lexically identical
</ul>


<HR>

</BODY>
</HTML>

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0