unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: wip-rtl, solstice edition
Date: Tue, 26 Jun 2012 11:42:15 +0200	[thread overview]
Message-ID: <87395ixvd4.fsf@pobox.com> (raw)
In-Reply-To: <87k3yvxgfk.fsf@gnu.org> ("Ludovic Courtès"'s message of "Mon, 25 Jun 2012 22:52:31 +0200")

On Mon 25 Jun 2012 22:52, ludo@gnu.org (Ludovic Courtès) writes:

>>  1) Convert the ELF parser and linker to use symbols instead of the raw
>>     ELF codes, as the DWARF parser does.  It's more convenient and not
>>     significantly different, performance-wise.
>
> Yes.  The one at
> <https://gitorious.org/guile-dlhacks/guile-dlhacks/blobs/master/dlhacks/elf.scm>
> could use more comments, docstrings, and tests, if you ask me.  :-)

It's the same one that's in master :)  Agreed, though.  I would note
that in wip-rtl it is tested by rtl.test, though not as a unit.

>>  2) Add enough debugging information so that procedure-name works, and
>>     that we can determine the bounds of procedures.  (Determining where
>>     a procedure ends is a precondition for being able to disassemble
>>     it!)
>>
>>  3) Create tests for all of the opcodes.  This task is somewhat
>>     decoupled from the previous tasks; if people want to help out, see
>>     libguile/vm-engine.c and test-suite/tests/rtl.test.
>
> I’m afraid that writing tests after code may either not happen, or may
> be unable to uncover bugs if it’s written by the same person, or may be
> difficult for someone without a clear picture of the API.
>
> WDYT?
>
> That said, I’ll look into all this as time permits, and see what I can
> contribute myself.

Yes I see what you are saying.  It was only recently that things came
together enough to be testable at all (to have the circle between
assembler, linker, and loader).  However, the instructions themselves
are fairly well documented; do see

  http://git.savannah.gnu.org/gitweb/?p=guile.git;a=blob;f=libguile/vm-engine.c;h=3f575880d5210a1ab5bd4a28b429a0807864be43;hb=refs/heads/wip-rtl#l941

So for this purpose, writing tests should be possible.  WDYT?

> Didn’t you once say “2.2 will have native compilation”?  ;-)

:)

> Seriously though, that seems like a good plan.  I wonder what Noah’s
> attempts at JITing the 2.0 bytecode would have achieved, though, if we
> think of both JIT and the new VM as an “interim solution” before AOT
> native compilation.

It would have been possible but not ideal.  Rewriting the VM to
e.g. have fixed-size stack frames, only two virtual registers, separate
debugging information, statically allocate constants, etc. would still
be necessary, and at that point a refactor to the VM would be more
difficult.

IMO anyway :)

Cheers,

Andy
-- 
http://wingolog.org/



  parent reply	other threads:[~2012-06-26  9:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 17:22 wip-rtl, solstice edition Andy Wingo
2012-06-23 14:03 ` Noah Lavine
2012-06-24 12:21   ` Andy Wingo
2012-06-25 20:52 ` Ludovic Courtès
2012-06-25 22:01   ` Noah Lavine
2012-06-29 12:02     ` Ludovic Courtès
2012-06-26  9:42   ` Andy Wingo [this message]
2012-06-29 11:59     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87395ixvd4.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).