1 (* Copyright (C) 2009,2017 Matthew Fluet.
2 * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
3 * Jagannathan, and Stephen Weeks.
4 * Copyright (C) 1997-2000 NEC Research Institute.
6 * MLton is released under a BSD-style license.
7 * See the file MLton-LICENSE for details.
10 signature ALLOCATE_REGISTERS_STRUCTS =
13 structure Machine: MACHINE
14 sharing Rssa.Runtime = Machine.Runtime
15 sharing Rssa.Type = Machine.Type
18 signature ALLOCATE_REGISTERS =
20 include ALLOCATE_REGISTERS_STRUCTS
23 {formalsStackOffsets: (Rssa.Var.t * Rssa.Type.t) vector -> Machine.StackOffset.t vector,
24 function: Rssa.Function.t,
25 varInfo: Rssa.Var.t -> {
26 (* If (isSome operand) then a stack slot or
27 * register needs to be allocated for the
30 operand: Machine.Operand.t option ref option,
34 -> {(* If handlers are used, handlerLinkOffset gives the stack offsets
35 * where the handler and link (old exnStack) should be stored.
37 handlerLinkOffset: {handler: Bytes.t,
38 link: Bytes.t} option,
40 Rssa.Label.t -> {(* Live operands at the beginning of the block. *)
41 live: Machine.Operand.t vector,
42 (* Live operands at the beginning of the block,
43 * excepting its formals.
45 liveNoFormals: Machine.Operand.t vector,
46 (* Size of frame including return address. *)