From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: A Representation for Native Code Date: Fri, 10 Dec 2010 19:20:27 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1292026837 32208 80.91.229.12 (11 Dec 2010 00:20:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Dec 2010 00:20:37 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Dec 11 01:20:33 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PRDCT-0002LA-5G for guile-devel@m.gmane.org; Sat, 11 Dec 2010 01:20:33 +0100 Original-Received: from localhost ([127.0.0.1]:58480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PRDCS-0001LE-HA for guile-devel@m.gmane.org; Fri, 10 Dec 2010 19:20:32 -0500 Original-Received: from [140.186.70.92] (port=54756 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PRDCQ-0001L5-2D for guile-devel@gnu.org; Fri, 10 Dec 2010 19:20:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PRDCP-0006Gl-5k for guile-devel@gnu.org; Fri, 10 Dec 2010 19:20:29 -0500 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:52650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PRDCO-0006Gb-WE for guile-devel@gnu.org; Fri, 10 Dec 2010 19:20:29 -0500 Original-Received: by wyj26 with SMTP id 26so4261148wyj.0 for ; Fri, 10 Dec 2010 16:20:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=yysyz+C56oGpw3I8kbZ22uxwX/PUuiiOjLVAlhmluPw=; b=ZXi/ymJFeYCG5n9pUiUArMxSd4VmdkT/sFSRVxRw3NG5pZNv6uwqR/puek+08VrWDc vgvlDRWGPoeVjc0aAuhfNAzMcwDeuWp6gi/OCfybuPNlMleiY2Lk9fvzsOMAMgZra967 XK2AkmS1OtRUV6YTYVC73NLKcu7z43VkKoFqA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=LvJOjdY/lD0EMK7xfhz9nIS13f7RebKq2NGmlsTZz+myV9eFrU8Iw9o+igY1zTIWX9 OTJF0t6rVfI23KSCI3Nvt2RO1GIpbcyzP6EjCTFCdkfgjKwae0PbRqCjB9Xj+7JaB8sC iRG1ofyRydJN0ta4kQCv+jUZAJeuEb7zmn9ko= Original-Received: by 10.216.165.74 with SMTP id d52mr661545wel.36.1292026827093; Fri, 10 Dec 2010 16:20:27 -0800 (PST) Original-Received: by 10.216.156.65 with HTTP; Fri, 10 Dec 2010 16:20:27 -0800 (PST) X-Google-Sender-Auth: 4wgrDjKzUPKPE_jtD83C2xbg9NA X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11244 Archived-At: Hello, I was thinking about how to represent native code. I think I have a solution, but I'd like to check if it's a good idea before I implement it. Current an objcode object has four words: - The type tag and some flags - a struct scm_objcode C object - the parent of this objcode, if it is a slice, or #f if there is none - the file descriptor of the file this was mmaped from, or 0 if it was not mmaped If I understand what slices are correctly, the objcode for a native code trampoline will never be a slice, so it should be okay to take over the third word of the objcode object for that case. I'd make a new flag to keep track of what was happening. Also, am I correct in assuming that we'd want to keep the old objcode around even after we jitted something, just in case something tried to introspect on it? I think putting it in a procedure property would work. Noah