From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 6E4BFBB9A for ; Sun, 23 Oct 2005 03:03:05 +0200 (CEST) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.195]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9N133Yd027632 for ; Sun, 23 Oct 2005 03:03:04 +0200 Received: by qproxy.gmail.com with SMTP id z8so743311qbc for ; Sat, 22 Oct 2005 18:03:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Jt00HGADds4Xo905ksiKP4YatNwzUGjT1/fL9Cad238npVC1ot5GD2uAPpDVdspiOVpmYvG2Yj8cFqlnYDu2lTFYo8I3D1YO9uVwX2YZRl1+NuxmZYliKlgFOiXSIjhiAwm5D8qicsJsTGbdX2db3Hq8lM3hYo+IJAHu8y146ls= Received: by 10.65.72.9 with SMTP id z9mr571384qbk; Sat, 22 Oct 2005 18:03:03 -0700 (PDT) Received: by 10.65.35.7 with HTTP; Sat, 22 Oct 2005 18:03:03 -0700 (PDT) Message-ID: Date: Sun, 23 Oct 2005 14:03:03 +1300 From: Jonathan Roewen To: David MENTRE Subject: Re: [Caml-list] The Bytecode Interpreter... Cc: caml-list@yquem.inria.fr In-Reply-To: <3d13dcfc0510210427g5ea98df7s@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <3d13dcfc0510210427g5ea98df7s@mail.gmail.com> X-Miltered: at nez-perce with ID 435AE147.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 bytecode:01 toplevel:01 bytecode:01 toplevel:01 ocaml:01 cmi:01 cmi:01 dynlink:01 lastly:01 dynlink:01 cmo:01 ...:98 expression:01 defined:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 > No difference. Toplevel expression are compiled as bytecode and then > executed by bytecode interpreter. I think I'm starting to understand some of how the toplevel & bytecode interpreter work. Some of it, I don't understand why, so will continue from there ;-) In the toplevel, you can #load in an ocaml library, but you still need all the .cmi files in order to open/use them. Why is that? Shouldn't it be in the library? Also, I presume loading libraries on the fly, and having access to -all- symbols defined in .cmi files available does -not- use the Dynlink module. Is this correct? How can a bytecode program do the same things as the toplevel in terms of #load-ing libraries and accessing any given value as specifed in the compiled interface files? Lastly, why is the Dynlink module unable to provide the ability to access any given value in a compiled interface file when loading a bytecode object? Or can it? The comments for the Dynlink module specify that this -isn't- possible. However, it -can- access values from the program the loads the .cmo -- is that correct? Jonathan