 Code::computeType = (r, o) ->
   return @computedType if @typeCached
   @typeCached = true
-  # Cache the stack-allocated variables and their offsets.
-  @spOffsets = spOffsets o.scope
   @frameSize = o.scope.frameSize
   # Arriving in this function means that all the parameters typechecked, since
   # this is called after the body has been processed. So we just need to

# `try..finally` block to account for possible throws. If the user indicated
# `gotta-go-fast`, we'll only emit stack pointer computations for explicit
# returns.
stackFence = (o, exprs, frameSize, spOffsets, isRoot) ->
  # The stack uses `U32`, so record it manually.
  U32(o)
  # Assign all the on-stack locals to their addresses.
  scope = o.scope
  for { name, offset, ty } in spOffsets
    exprs.unshift new Assign new Value(new Literal name), stackOffsetExpr(offset, ty)
  exprs.unshift new Assign SP, normalizePtr(SPREAL, U32.BYTES_PER_ELEMENT, 1)
  exprs.unshift new Assign SPREAL, new Value(new Literal frameSize), '-='
  restoreStack = new Assign SPREAL, new Value(new Literal frameSize), '+='

    # argument.
    exprs = @body.expressions
    for param in @params
      for arg in param.variables when arg.binding.onStack
        plh = new Value new Literal arg.name
        prh = new Value new Literal arg.name
        asn = new Assign plh, prh
        asn.computedType = plh.computedType = prh.computedType = arg.type
        plh.computedBinding = arg.binding
        exprs.unshift asn
    o.frameSize = frameSize
    stackFence o, exprs, frameSize
  return

# Add SP computation and pointer conversions to explicit returns.
