Re: Basic Lisp Compiler: How to tell which functions to compile?

2010-08-10 Thread Nicolas Oury
On Tue, Aug 10, 2010 at 12:43 AM, Jules wrote: > It is impossible (undecidable) to tell precisely which functions a > function will call. Therefore you will need to consider not exactly > set of functions that a function will call, but some superset of that. > Why not take as your superset all fun

Re: Basic Lisp Compiler: How to tell which functions to compile?

2010-08-09 Thread Jules
It is impossible (undecidable) to tell precisely which functions a function will call. Therefore you will need to consider not exactly set of functions that a function will call, but some superset of that. Why not take as your superset all functions? That is, always compile all functions. On Aug 9

Re: Basic Lisp Compiler: How to tell which functions to compile?

2010-08-09 Thread Daniel Gagnon
As far as I know, the book "Lisp In Small Pieces" should be a tremendous help for anyone who builds a Lisp interpreter or compiler. You might want to check it out. On Mon, Aug 9, 2010 at 2:21 PM, CuppoJava wrote: > Thanks for the reply Jarkko. That helps quite a lot. I have some hacks > in place

Re: Basic Lisp Compiler: How to tell which functions to compile?

2010-08-09 Thread CuppoJava
Thanks for the reply Jarkko. That helps quite a lot. I have some hacks in place that works most of the time, but was stuck trying to figure out a general solution. Knowing that there isn't one puts my mind at ease. -Patrick On Aug 9, 1:56 pm, Jarkko Oranen wrote: > On Aug 9, 7:54 pm, CuppoJava

Re: Basic Lisp Compiler: How to tell which functions to compile?

2010-08-09 Thread Jarkko Oranen
On Aug 9, 7:54 pm, CuppoJava wrote: > Hello everyone, > Just for educational purposes, I'm writing a simple lisp compiler and > am stuck on a small problem. > > I'm trying to write a function called (compile-function), which will > take a function as input and compile it. > > If that function ca

Basic Lisp Compiler: How to tell which functions to compile?

2010-08-09 Thread CuppoJava
Hello everyone, Just for educational purposes, I'm writing a simple lisp compiler and am stuck on a small problem. I'm trying to write a function called (compile-function), which will take a function as input and compile it. If that function calls other functions, I would like (compile- function)