Re: [COMMIT] IMCC changes
Melvin Smith [EMAIL PROTECTED] 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
[COMMIT] IMCC changes
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