Compiler internals question

From: Michael Sperber [Mr. Preprocessor] (sperber@informatik.uni-tuebingen.de)
Date: Thu Jul 02 1998 - 10:55:30 MET DST


To: caml-list@inria.fr
Subject: Compiler internals question
From: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor])
Date: 02 Jul 1998 10:55:30 +0200

[ Many thanks, Xavier, for your previous answer to my byterun
question! ]

Consider the following O'Caml fragment:

type bla = A of int | B of int * int | C of int * int * int

match f 5 with B(_, _) -> 17

The latter line is compiled into Lambda intermediate code as:

(catch
  (let (match/51 (apply (global f/49g) 5))
    (catch
      (switch match/51
       case tag 1:
        (let (match/52 (field 0 match/51) match/53 (field 1 match/51)) 17))=

     with exit))
 with (raise (makeblock 0 (global Match_failure/12g) [0: "" 0 28])))

Does the inner "catch" serve any purpose or is it redundant?

-- =

Cheers =8-} Mike
Friede, V=F6lkerverst=E4ndigung und =FCberhaupt blabla



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:15 MET