public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Tom Bousso <tombousso@gmail.com>
To: kawa@sourceware.org
Subject: gnu.bytecode GSoC Project using ObjectWeb ASM
Date: Tue, 23 May 2017 07:49:00 -0000	[thread overview]
Message-ID: <CAN9NfqMJjkPuhgvwjjHYmThsB5kW_upN9qZdtPdbitdFWCoB7A@mail.gmail.com> (raw)

Hi all,

I'm Tom and I'm working on implementing Kawa's gnu/bytecode library on
top of ObjectWeb ASM for this year's GSoC. gnu/bytecode is the JVM
bytecode generation library which Kawa uses
(https://www.gnu.org/software/kawa/api/gnu/bytecode/package-summary.html).

Currently, gnu/bytecode generates classfiles from scratch (i.e. it
creates classfiles byte by byte). ASM is a popular and well-maintained
bytecode manipulation/generation library. By using ASM in
gnu/bytecode, we will significantly reduce gnu/bytecode's complexity.
gnu/bytecode will no longer need to worry about the binary format of
classfiles, and instead it can focus on the abstractions which make it
a great library. It will be easier to add new features to the new
version of gnu/bytecode because much of the work will be handled by
ASM. For example, gnu/bytecode doesn't currently have an
emitInvokeDynamic method, and implementing this method is not trivial.
In the new version of gnu/bytecode, implementing an emitInvokeDynamic
method is very trivial because we can just call ASM's
visitInvokeDynamicInsn method. And if any new attributes are added to
the classfile specifications, we won't need to implement their binary
formats - we'll just call ASM.

There are a few downsides to using ASM in gnu/bytecode. For example,
gnu/bytecode has a few complex features which reorder bytecode, and
ASM's APIs don't support this, so we'll have to use gotos instead.
Also we still don't know how fast the new gnu/bytecode will run
compared to the old one.

Overall, I think that ASM has a lot to offer gnu/bytecode. If all goes
well, we can hope to see Kawa Scheme running with the new gnu/bytecode
by the end of the summer, and then the new gnu/bytecode can be merged
into Kawa. The new gnu/bytecode is being developed at
https://gitlab.com/tombousso/gnu-bytecode2.

All feedback is welcome.

-Tom Bousso

                 reply	other threads:[~2017-05-23  7:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=CAN9NfqMJjkPuhgvwjjHYmThsB5kW_upN9qZdtPdbitdFWCoB7A@mail.gmail.com \
    --to=tombousso@gmail.com \
    --cc=kawa@sourceware.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).