From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id NAA16947 for caml-redistribution; Fri, 27 Sep 1996 13:47:57 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id NAA16645 for ; Fri, 27 Sep 1996 13:41:36 +0200 Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.7.6/8.7.1) with ESMTP id NAA06655; Fri, 27 Sep 1996 13:41:35 +0200 (MET DST) Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id NAA16641; Fri, 27 Sep 1996 13:41:35 +0200 From: Pierre Weis Message-Id: <199609271141.NAA16641@pauillac.inria.fr> Subject: Re: native code compiler and exceptions To: Jocelyn.Serot@lasmea.univ-bpclermont.fr (Jocelyn Serot) Date: Fri, 27 Sep 1996 13:41:34 +0200 (MET DST) Cc: caml-list@inria.fr In-Reply-To: <199609271119.NAA06433@concorde.inria.fr> from "Jocelyn Serot" at Sep 27, 96 01:21:30 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis Hello, > Is there a deep, "fundamental", reason why certain exceptions (in particular > those raised by array accesses out of bound) are not handled in same way > by the bytecode compiler and the native compiler, or is it a temporary [...] > I've written an image processing module in ocaml. Some functions in this > module (for example, convolutions, ...) relies heavily on bound-violation > exceptions for handling clipping effect at image boundaries. Wao! To ``rely heavily on array bounds violation'' is a very ugly style of programming. I could not imagine why you need to use this style. I would suggest that you just avoid these violations : this would rend your program clearer and fully compatible with the optimizing compiler. Then, you should gain the full benefit of a native code compilation. Moreover, if your code is really array bound clear, you could use the unsafe option of the compiler, that remove every array bound test. (Waiting for an automatic array bound check removing pass in the optimizing compiler...) Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis