From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45301 invoked by alias); 23 May 2017 07:49:27 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 45286 invoked by uid 89); 23 May 2017 07:49:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=years, year's, GSoC, gsoc X-HELO: mail-wm0-f52.google.com Received: from mail-wm0-f52.google.com (HELO mail-wm0-f52.google.com) (74.125.82.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 May 2017 07:49:24 +0000 Received: by mail-wm0-f52.google.com with SMTP id d127so15808804wmf.0 for ; Tue, 23 May 2017 00:49:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0NOTLENTU5KGu8ooIK+keHHTOraN+JHZuPLwmli6aj8=; b=KyJLqId2UxSnPGTtzlA1Abd2DFuyAq1WRi7jhP0+ooCozxzQfN6Sd/lsIeEXT96+// NXIfvlfhXmiWRXPtncEf8QYRenm1c6HkMSuGShP2O8fgFEGjqIIsrJl7DlzKqocqgkYE 0WnR4YrP1otZQqQ3UEG5kjwDt1KLXrJF71wQkQ9vzECl2lHasN+9kOujMTVIvTZyhL5X RTFaocgd0isO4ryLQSTTcpyEvyWn52+im3PVXd4+9zHXLhd5sZWN2PrxugSGtfz3UuGs i9vwDVXlYcMot5G9Cj+fOPD7y6AeaYvwqHYoXw+WNzwdfNahcm7UEz0XCxcDSgW0u8K0 yWLQ== X-Gm-Message-State: AODbwcATrYfsc568tWKqvfJwArKxLBHklPdVCBJyA4d5hTo8nOR7rs/A y62Oh7CkVFlq7PNQbeNnVVnNka7NCkV3 X-Received: by 10.80.163.70 with SMTP id 64mr20195052edn.78.1495525766344; Tue, 23 May 2017 00:49:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.176.129 with HTTP; Tue, 23 May 2017 00:49:06 -0700 (PDT) From: Tom Bousso Date: Tue, 23 May 2017 07:49:00 -0000 Message-ID: Subject: gnu.bytecode GSoC Project using ObjectWeb ASM To: kawa@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-q2/txt/msg00080.txt.bz2 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