Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

[COMMIT] IMCC changes

瀏覽次數:8 次
跳到第一則未讀訊息

Melvin Smith

未讀,
2003年11月15日 晚上11:51:192003/11/15
收件者:perl6-i...@perl.org
More IMCC rearchitecture and directive changes.

.pcc_sub is now deprecated (but supported for a while).
(All other .pcc_* directives are still enabled).
Use .sub for all subroutines from now on. Even though .sub is now a PCC sub,
this should not break existing code that uses the old stack passing
method (I'm not sure which compilers do this other than Cola).

The plan is to remove all .pcc specific directives and make them
generic. We are adding support for multiple calling conventions and
prototyping/non-prototyping to IMCC in an attempt to hide the implementation
behind generic IMCC instructions.

If done correctly, this will allow us to change internal guts without
breaking high level
compilers. Currently we expose to much of the specifics in IMCC.

Summary:

* .sub directive now deprecates .pcc_sub directive.
.sub now uses PCC convention by default.
* All other .pcc directives are still used but will
be eventually deprecated.
* Modularize calling conventions and add generic API.
sub.c is the generic API and wraps pcc.c and fastcall.c
* Add stubs for a 2nd FASTCALL convention which can be enabled by
compiler pragma. Currently fastcall does not work.
* Add .pragma directive to the lexer.
* Add check for 0 arguments in PCC subs to skip code generate for
proto/nonproto
argument checking if there are no args. (Leo check this if it is the right
thing to do?)
* Various comments and optional tracing added to existing code.

Cheers,

-Melvin


Leopold Toetsch

未讀,
2003年11月17日 清晨5:18:572003/11/17
收件者:Melvin Smith、perl6-i...@perl.org
Melvin Smith <mrjol...@mindspring.com> wrote:
> * Add check for 0 arguments in PCC subs to skip code generate for
> proto/nonproto
> argument checking if there are no args. (Leo check this if it is the right
> thing to do?)

Looks good, but might not be compliant with Dan's runtime check
philosophy. Or, its ok for the "we don't check" case and not for the
paranoid one.

> Cheers,

> -Melvin

leo

Dan Sugalski

未讀,
2003年11月17日 上午9:03:592003/11/17
收件者:Leopold Toetsch、Melvin Smith、perl6-i...@perl.org

Nope, it's fine -- while we need to provide the information to make the
checks, nobody's obligated to make them. (Though I would like there to be
a means for subs declared in IMCC to validate their parameters against
what they expect)

Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

0 則新訊息