Skip to content

CWEB 4.8 breaks MMIX. #38

@ascherer

Description

@ascherer

DEK uses the curious construct

function declaration with ARGS macro;@+@t}\6{@>
function definition without ARGS macro but K&R parameters

in MMIX modules mmixal.w, mmix-arith.w, mmix-config.w, mmix-io.w, mmix-mem.w, mmix-sim.w, and mmmix.w.

The new CWEB grammar for support of both K&R and ANSI functions indents the

function declaration with ARGS macro
    function definition together with the
    arguments;

Leaving out the @t}\6{@> as in mmotype.w is the natural solution.

Overall, the MMIX code is quite messy in this respect, intermingling function declarations and definitions and global (non-static!) variables.

A significantly better approach is used in mmix-pipe.w, separating @<Prototypes@> and @<Subroutines@> (internal and external).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions