## late-constant.api --- constants unknown until late in the compilation process,
## used to specialize lowhalf and the code generators.
#
# "[The backend lowhalf] allows the client to inject into the
# instruction stream abstract constants that are resolved only
# at the end of the compilation phase. These constants can be
# used wherever an integer literal is expected. Typical usages
# are stack frame offsets for spill locations which are only
# known after register allocation, and garbage collection and
# exception maps which are resolved only when all address
# calculation has been performed.
#
# "The methods are:
# to_string a pretty printing function
# value_of returns the value of the constant
# hash returns the hash value of the constant
# ==== compare two constants for identity
#
# "The method to_string should be implemented in all cases.
# The method value_of is necessary only if machine code generation is used.
# The last two methods, hash and ==== are necessary only if SSA optimizations are used."
#
# -- http://www.cs.nyu.edu/leunga/MLRISC/Doc/html/constants.html
#
#
# "Constants are an abstraction for integer literals whose
# value is known after certain phases of code generation.
# Frame sizes and offsets are an example."
#
# -- http://www.cs.nyu.edu/leunga/MLRISC/Doc/html/mlrisc-ir-rep.html
#
# Also: http://www.cs.nyu.edu/leunga/MLRISC/Doc/html/cells.html
# Compiled by:
#
src/lib/compiler/back/low/lib/lowhalf.lib### "There is nothing in this world constant but inconstancy."
###
### -- Jonathan Swift
# This api is implemented in:
#
src/lib/compiler/back/low/main/nextcode/late-constant.pkgapi Late_Constant {
#
Late_Constant;
late_constant_to_string: Late_Constant -> String;
late_constant_to_int: Late_Constant -> Int;
late_constant_to_hashcode: Late_Constant -> Unt;
same_late_constant: (Late_Constant, Late_Constant) -> Bool;
};
## COPYRIGHT (c) 1996 AT&T Bell Laboratories.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.