overflow

Stephen Weeks sweeks@intertrust.com
Wed, 20 Sep 2000 09:33:57 -0700 (PDT)


> Sounds good.  Did you add in two types of arithmetic primitives (e.g. an
> overflowing Int_add and a non-overflowing Int_add) or will every
> arithmetic primitive have an overflow check? 

There are two types.

> Also, should the backend every see None for an arithmetic primitive?

Yes.  It will only ever see Overflow on a prim such that Prim.mayOverflow,
i.e. on Int_{add,mul,sub}Check.

> I.e., is the label only for the cases when we know the handler to jump to
> and the other cases use the default mechanism?

Nope.  If you see Overflow, you generate a jo.  Otherwise you do nothing.