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 A63ADBB81 for ; Mon, 24 Oct 2005 07:38:21 +0200 (CEST) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.206]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9O5cKSp009073 for ; Mon, 24 Oct 2005 07:38:21 +0200 Received: by qproxy.gmail.com with SMTP id z8so103909qbc for ; Sun, 23 Oct 2005 22:38:20 -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=cwtZwvQPbS2fLvVK+ix2sLoG4ysdZ/q/lM5AyF92ax07IEFwZYlpuuYfS9k+xFEMFjZ62KJHkxcdSdRy5B0HNjIlVW8rtxxy4jlrVkqVE7I6sFG4ux+iEtYMmECis8t/6x1XcS6JTMkwZNVx8mGcmTpEms29j30iPXtPC3nJhpE= Received: by 10.65.73.12 with SMTP id a12mr2669058qbl; Sun, 23 Oct 2005 22:38:20 -0700 (PDT) Received: by 10.65.35.7 with HTTP; Sun, 23 Oct 2005 22:38:20 -0700 (PDT) Message-ID: Date: Mon, 24 Oct 2005 18:38:20 +1300 From: Jonathan Roewen To: Gerd Stolpmann Subject: Re: [Caml-list] The Bytecode Interpreter... Cc: caml-list@yquem.inria.fr In-Reply-To: <1130062899.27787.126.camel@localhost.localdomain> 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> <1130062899.27787.126.camel@localhost.localdomain> X-Miltered: at nez-perce with ID 435C734C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 bytecode:01 toploop:01 toploop:01 compiler:01 cmi:01 bytecode:01 toplevel:01 dlopen:01 dynlink:01 ...:98 modules:01 types:02 scope:03 module:03 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 > When one #loads within a toploop, more or less the same happens. > However, the toploop is a full compiler, and does not only have the > symbol table, but also the current environment, i.e. the set of > currently visible types and values with the still-needed parts of their > definitions. As far as I know, #load does not modify the environment > (because nothing changes - the loaded modules are already in scope when > the .cmi file is in the search path). Yes, but the bytecode itself is not in the environment, or at least not initialised, hence why you need the #load right? Try using Str module for instance. Symbols in memory, but that's it. Anyways, my next question is: does the toplevel need dlopen & friends? I know dynlink module would, as you stated, it performs relocation and all that other stuff. Jonathan