PreviousUpNext

15.3.105  src/lib/compiler/back/low/heapcleaner-safety/per-codetemp-heapcleaner-info-template.api

## per-codetemp-heapcleaner-info-template.api
#
# Here we define info to be attached to codetemps
# for the benefit of the heapcleaner.
#
# This appears to be another project started but never finished;
# activation is controlled by the always-FALSE
#
#     lowhalf_track_heapcleaner_type_info
#
# flag in
#
#     src/lib/compiler/back/low/main/main/translate-nextcode-to-treecode-g.pkg
#
# The other relevant files are:
#
#     src/lib/compiler/back/low/main/nextcode/per-codetemp-heapcleaner-info.api
#     src/lib/compiler/back/low/main/nextcode/per-codetemp-heapcleaner-info.pkg
#     src/lib/compiler/back/low/heapcleaner-safety/codetemps-with-heapcleaner-info.api
#     src/lib/compiler/back/low/heapcleaner-safety/codetemps-with-heapcleaner-info-g.pkg

# Compiled by:
#     src/lib/compiler/back/low/lib/lowhalf.lib

# Abstract interface for heapcleaner ("garbage collector)" types.

stipulate
    package nt  =  note;                                                # note                  is from   src/lib/src/note.pkg
herein

    # This api is used (only) to define
    # one generic package argument in
    #
    #     src/lib/compiler/back/low/heapcleaner-safety/codetemps-with-heapcleaner-info-g.pkg
    #
    # This template api gets concretely instantiated as
    #
    #     src/lib/compiler/back/low/main/nextcode/per-codetemp-heapcleaner-info.api
    #     src/lib/compiler/back/low/main/nextcode/per-codetemp-heapcleaner-info.pkg
    #
    api Per_Codetemp_Heapcleaner_Info_Template {
        #
        Heapcleaner_Info;

        Type = Int;                                                                             # width of addressing mode 

        const:   multiword_int::Int -> Heapcleaner_Info;                                        # integer constant

        int_type:       Heapcleaner_Info;                                                       # machine integer 
        f32_type:       Heapcleaner_Info;                                                       # machine float 
        f64_type:       Heapcleaner_Info;                                                       # machine float 
        ptr_type:       Heapcleaner_Info;                                                       # heapchunk pointers 

        add:    (Type, Heapcleaner_Info, Heapcleaner_Info) -> Heapcleaner_Info;                 # Address arithmetic 
        sub:    (Type, Heapcleaner_Info, Heapcleaner_Info) -> Heapcleaner_Info;                 # Address arithmetic 
        bot:    Heapcleaner_Info;
        top:    Heapcleaner_Info;

        ====    : (Heapcleaner_Info, Heapcleaner_Info) -> Bool;
        join:    (Heapcleaner_Info, Heapcleaner_Info) -> Heapcleaner_Info;
        meet:    (Heapcleaner_Info, Heapcleaner_Info) -> Heapcleaner_Info;

        to_string:  Heapcleaner_Info -> String;


        # Annotations for heapcleaner type

        exception HCTYPE  Heapcleaner_Info;

        cleaner_type:  nt::Notekind(  Heapcleaner_Info );
    };
end;


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext