Re: How do I associate methods with a compiler?

2006-11-15 Thread Allison Randal
Patrick R. Michaud wrote: We might want to resurrect the 'compile' opcode as an indirect syntax for making the 'compile' method call. Maybe, but I can't see that this is worthy of a special opcode (and presumably a vtable slot?). There's just not a lot of difference between: $P0 =

Re: How do I associate methods with a compiler?

2006-11-15 Thread Leopold Toetsch
Am Mittwoch, 15. November 2006 05:52 schrieb Allison Randal: We might want to resurrect the 'compile' opcode as an indirect syntax for making the 'compile' method call. Please don't. Opcodes are very limited re calling conventions. Mehthods are by far more flexible when it comes to pass

Re: How do I associate methods with a compiler?

2006-11-15 Thread Allison Randal
Leopold Toetsch wrote: Please don't. Opcodes are very limited re calling conventions. Mehthods are by far more flexible when it comes to pass arguments to compilers. I believe we've been through this conversation before. I don't mean coding a completely different opcode, I just mean using

Re: How do I associate methods with a compiler?

2006-11-15 Thread Leopold Toetsch
Am Mittwoch, 15. November 2006 22:38 schrieb Allison Randal: Leopold Toetsch wrote: Please don't. Opcodes are very limited re calling conventions. Mehthods are by far more flexible when it comes to pass arguments to compilers. I believe we've been through this conversation before. I don't

Re: How do I associate methods with a compiler?

2006-11-15 Thread Allison Randal
Leopold Toetsch wrote: And, I do think making the PASM and PIR compilers capable of being used as standard compiler objects is a superior solution. We currently can't pass any arguments to PASM/PIR compilers. You can't change trace or debug options for eval. This is a serious limitation,

Re: How do I associate methods with a compiler?

2006-11-14 Thread Allison Randal
Patrick R. Michaud wrote: Or, in claiming that compilers have an API, should we instead say that the canonical compilation sequence is to use compreg to obtain a compiler object (not an invokable sub), and then compile the source via a 'compile' method on the compiler object? For example:

Re: How do I associate methods with a compiler?

2006-11-14 Thread Patrick R. Michaud
On 11/9/06, Patrick R. Michaud [EMAIL PROTECTED] wrote: Opinions welcome. Personally I think I favor the a compiler is an object with a 'compile' method model, and that Ccompreg gives us back a compiler object as opposed to a subroutine-like thing. For the record, it was decided (Allison++)

Re: How do I associate methods with a compiler?

2006-11-14 Thread Patrick R. Michaud
On Tue, Nov 14, 2006 at 08:52:47PM -0800, Allison Randal wrote: Also for the record from the weekly meeting (which was actually today, just a very long today): Yes, compilers are objects and compilation is a method call. The compiler for TGE tree grammars is implemented this way, and it's

Re: How do I associate methods with a compiler?

2006-11-09 Thread Adriano Rodrigues
On 11/9/06, Patrick R. Michaud [EMAIL PROTECTED] wrote: Opinions welcome. Personally I think I favor the a compiler is an object with a 'compile' method model, and that Ccompreg gives us back a compiler object as opposed to a subroutine-like thing. Would it not be possible to support both? A

Re: How do I associate methods with a compiler?

2006-11-09 Thread Patrick R. Michaud
On Thu, Nov 09, 2006 at 09:55:05AM -0200, Adriano Rodrigues wrote: On 11/9/06, Patrick R. Michaud [EMAIL PROTECTED] wrote: Opinions welcome. Personally I think I favor the a compiler is an object with a 'compile' method model, and that Ccompreg gives us back a compiler object as opposed to a

How do I associate methods with a compiler?

2006-11-08 Thread Patrick R. Michaud
Historically Parrot has considered a compiler to be an invokable subroutine, such that the canonical sequence for compiling something is: .local string perl6_source .local pmc perl6_compiler perl6_compiler = compreg 'Perl6' $P0 = perl6_compiler(perl6_source) However,