PreviousUpNext

15.3.120  src/lib/compiler/back/low/main/main/heap-tags.api

## heap-tags.api

# Compiled by:
#     src/lib/compiler/core.sublib



# Abstract interface to the encoding of heapchunk tagwords.
#
# This is a Mythryl-level version of
#
#     src/c/h/heap-tags.h

api Heap_Tags {
    #
    Btag;

    tag_width:      Int;        #  number of bits to hold a tag 
    pow_tag_width:  Int;        #  2 ^ tagWidth 
    max_length:     Int;        #  one greater than max length value 

    # B-tag values:
    # 
    pairs_and_records_btag:                     Btag;
    ro_vector_header_btag:                      Btag;
    rw_vector_header_btag:                      Btag;
    rw_vector_data_btag:                        Btag;
    four_byte_aligned_nonpointer_data_btag:     Btag;
    eight_byte_aligned_nonpointer_data_btag:    Btag;
    weak_pointer_or_suspension_btag:            Btag;
    #
    ro_vector_data_btag:                        Btag;           # Synonym for pairs_and_records_btag.
    refcell_btag:                               Btag;           # Synonym for rw_vector_data_btag.

    # Build a tagword from a tag and length:
    #
    make_tagword:  (Int, Btag) -> large_unt::Unt;

    # Fixed descriptors:
    #
    pair_tagword:                        large_unt::Unt;
    refcell_tagword:                     large_unt::Unt;
    float64_tagword:                     large_unt::Unt;
    typeagnostic_ro_vector_tagword:      large_unt::Unt;
    typeagnostic_rw_vector_tagword:      large_unt::Unt;
    weak_pointer_or_suspension_tagword:  large_unt::Unt;        #  with 0 length 

    # Special descriptors stored in 'length' slots -- see  src/c/h/heap-tags.h
    #
    evaluated_lazy_suspension_ctag:    Int;
    unevaluated_lazy_suspension_ctag:  Int;
    weak_pointer_ctag:                 Int;
    nulled_weak_pointer_ctag:          Int;
};




## COPYRIGHT (c) 1998 Bell Labs, Lucent Technologies.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext