From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128108 invoked by alias); 11 Feb 2016 08:51:08 -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 128089 invoked by uid 89); 11 Feb 2016 08:51:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=cons, chicken, portions, CASE X-HELO: mail-vk0-f42.google.com Received: from mail-vk0-f42.google.com (HELO mail-vk0-f42.google.com) (209.85.213.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 11 Feb 2016 08:51:05 +0000 Received: by mail-vk0-f42.google.com with SMTP id c3so31690175vkb.3 for ; Thu, 11 Feb 2016 00:51:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to:content-type; bh=V+AkfG2MoPTNSNUnaBBzsldvde4E3l4uOxaaPr0QAL0=; b=MlTX3XpNccjs48QBn7zJ+PHu4oNtXHgJ8AlTw+6hWPLbFPpYLgMXveWZNltQn2Um3a BZYdmsRtGYcCmwkM623O4uOiBUdwhI87csNu1Op4/SSO6SDIuqAOZVYFbBx7lfXpG0V5 3WNB8LLHMaozglX4QQwrzFUx1Jd0fSmGAVSloqo6xxjPJSDQW5UVfcHfGSCHXD9zaB+1 2zfAXjIAimdLZPpvTf+xBaaubmcc+rAHTnHgJmlhc+Y68V1TnU9WyqmkfMxzOqgnI98g cN95HmNNJrzAIL3egI8mcO+zEhruUjWdd/qjuDR1moNOkiY62wtImHgXXzgBKrzXdqX0 YcZw== X-Gm-Message-State: AG10YOQ/ua7QipSVReU1igBqgyRna9FBBnlK4835fUJL0G64Aa3k+0RiFRGLjKUrV0s9d7sFlDjK890uO5SuGw== MIME-Version: 1.0 X-Received: by 10.31.141.2 with SMTP id p2mr34278617vkd.37.1455180663208; Thu, 11 Feb 2016 00:51:03 -0800 (PST) Received: by 10.31.184.133 with HTTP; Thu, 11 Feb 2016 00:51:03 -0800 (PST) Date: Thu, 11 Feb 2016 08:51:00 -0000 Message-ID: Subject: How do i debug --no-inline or --full-tailcalls options? From: OKUMURA Yuki To: kawa@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-q1/txt/msg00008.txt.bz2 Hi list, I'm currently porting my own R7RS library into Kawa 2.1 but I'm struggling to understand Kawa's compiler behaviour. Some portions of my library require --no-inline or --full-tailcalls options to compile correctly but I think these should not be required on my code, at least reading on the reference manual. EXAMPLE1: --full-tailcalls (https://github.com/okuoku/yuni/issues/33) Following program requires --full-tailcalls to run with "java kawa.repl -r7rs prog.sps". Otherwise, Kawa gives java.lang.VerifyError. (import (scheme base)) (define (ssplit-parse-byte0-ORIG byte) (case byte ((NONE) (values 'NONE #f)) (else (values 'OTHERS #f)))) Why do we need --full-tailcalls here? Removing CASE should compile fine so I guess there's something different around (scheme base) exported VALUES procedure here.. EXAMPLE2: --no-inline (https://github.com/okuoku/yuni/issues/35) Following program behaves differently with/without --no-inline option: (import (scheme base) (scheme write) (scheme eval)) (let ((c (eval 'cons2 (environment '(rename (scheme base) (cons cons2)))))) (write c)(newline)) With --no-inline option, EVAL will fail to bind renamed identifier so it will fail to execute: $ java kawa.repl --no-inline -r7rs check.sps unbound location: cons2 Oddly, it is fine without --no-inline option: $ java kawa.repl -r7rs check.sps # AFAIK, other R7RSs Gauche, Chibi-scheme, Sagittarius and Chicken behaves same as the latter(without --no-inline) case. I expect Kawa also behaves same; why --no-inline changes program behaviour here? The reference manual suggests mutating procedures would affect inliner behaviour but I believe RENAME in R7RS should not the case. Sorry for vague/newbie questions but I'm totally getting lost..