From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 1AFDBBB84 for ; Thu, 18 May 2006 08:32:23 +0200 (CEST) Received: from web32208.mail.mud.yahoo.com (web32208.mail.mud.yahoo.com [68.142.207.139]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id k4I6WMpe026167 for ; Thu, 18 May 2006 08:32:22 +0200 Received: (qmail 71420 invoked by uid 60001); 18 May 2006 06:32:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=jzG0Ul6xka5/mNBaQsiPEMf1klf0NBILY+qyBiDGX8fXniuUjxpPucKajxSqDBUtJ55dOdNvihDksSTm87I8mcZbNxFIlFy8qaRwp2lWWeVrFCm2wwuPxxcOp4ZJd6ntFuZkFx9cRtNPTwItUe+bcJN6el/3lFJ3BYtK0layQBY= ; Message-ID: <20060518063221.71418.qmail@web32208.mail.mud.yahoo.com> Received: from [128.111.54.206] by web32208.mail.mud.yahoo.com via HTTP; Wed, 17 May 2006 23:32:21 PDT Date: Wed, 17 May 2006 23:32:21 -0700 (PDT) From: Dan Koppel Subject: Re: Re: [Caml-list] compiler bug? To: caml-list@yquem.inria.fr MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1457165611-1147933941=:71415" Content-Transfer-Encoding: 8bit X-j-chkmail-Score: MSGID : 446C14F6.000 on nez-perce : j-chkmail score : XX : 0/20 2 X-Miltered: at nez-perce with ID 446C14F6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; compiler:01 bug:01 compiler:01 stack:01 stack:01 caml-list:01 avoiding:03 avoiding:03 problem:05 problem:05 variable:05 variable:05 seem:07 seem:07 theory:08 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: **** X-Spam-Status: No, score=4.1 required=5.0 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_WHOIS,FORGED_YAHOO_RCVD,FROM_ENDS_IN_NUMS,HTML_20_30, HTML_MESSAGE autolearn=disabled version=3.0.3 --0-1457165611-1147933941=:71415 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi John, Thanks for your answer. I'm running on a Power Mac. Why does the compiler store on the stack when there's a function call but not otherwise. I learned in basic compiler theory that when a function is called, you save all the registers before entering the function. So why would the compiler not simply use the register for the variable, knowing that when the time comes to call the function, the register will be saved at that point in time. That would seem a much better way to do things (thus avoiding the present problem). - Dan --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. --0-1457165611-1147933941=:71415 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi John,
  Thanks for your answer.  I'm running on a Power Mac.  Why does the compiler store on the stack when there's a function call but not otherwise.  I learned in basic compiler theory that when a function is called, you save all the registers before entering the function.  So why would the compiler not simply use the register for the variable, knowing that when the time comes to call the function, the register will be saved at that point in time.  That would seem a much better way to do things (thus avoiding the present problem).
 - Dan


Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. --0-1457165611-1147933941=:71415--