[M3devel] Areas that may need attention in the frontend?

Antony Hosking hosking at cs.purdue.edu
Thu Sep 20 04:39:58 CEST 2012


On Sep 19, 2012, at 9:31 PM, Jay K <jay.krell at cornell.edu> wrote:

> Areas that may need attention in the frontend?
> 
> 
> TryFinStmt.m3:
> 
>       CG.Start_call_direct (p.handler.cg_proc, p.handler.level, CG.Type.Void);
>       (* Shouldn't we pass the activation parameter here?
>          What value do we pass? *)
>       CG.Call_direct (p.handler.cg_proc, CG.Type.Void);

The level let’s you compute that.

> I'm wondering this too...like..what is the interface
> to except/finally blocks?

?

> It appears they take two, or one, or zero parameters,
> depending on intepretation and context.
> 
> 
> two parameters:
>  _static_link
>  exception stuff
> 
>  
> one parameter:
>  _static_link
>  
> 
> zero parameters:
>  the above
> 
> 
> I think the right implmentation (assuming no significant
> change to nested functions, which Tony is thinking about:) )
> is one parameter:
> 
>   exception stuff
> 
> and the implied/popped static_link, always.
> 
> 
> For now, I think I'll not prototype these and use K&R definitions, yuck!

That works.

> Maybe generating C++ with overloads is a good idea??
> 
> 
> 
> values/Procedure.m3:
> 
>     ELSIF (cur.token = TK.tSEMI) THEN
>       t.body := NEW (Body, self := t);
>       ProcBody.Push (t.body);
>       (* try accepting the Modula-2 syntax *)
>       Error.ID (id, "expecting \'=\' before procedure body");
> 
>  
> Probably everything after the error should be removed?
> Or this is an example trying to recover from parse errors
> and doing best effort?

Yes.

> 
> 
>  - Jay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120919/ccbdf0d4/attachment-0002.html>


More information about the M3devel mailing list