PreviousUpNext

15.4.597  src/lib/compiler/front/typer-stuff/basics/inlining-information.pkg

## inlining-information.pkg
## (C) 2001 Lucent Technologies, Bell Labs

# Compiled by:
#     src/lib/compiler/front/typer-stuff/typecheckdata.sublib



# Framework for passing inlining information around during typechecking.
# (Uses the "exception as universal extensible type"
# hack to avoid being even more backend tophalf specific.)

# Client packages include:
#
#     src/lib/compiler/front/typer-stuff/deep-syntax/variables-and-constructors.pkg
#     src/lib/compiler/front/typer-stuff/modules/module-junk.pkg
#     src/lib/compiler/front/typer-stuff/modules/module-level-declarations.pkg
#     src/lib/compiler/front/typer/main/type-api.pkg
#     src/lib/compiler/front/typer/main/type-core-language.pkg
#     src/lib/compiler/front/typer/main/type-package-language-g.pkg
#     src/lib/compiler/front/typer/modules/api-match-g.pkg
#     src/lib/compiler/front/typer/modules/generics-expansion-junk-g.pkg
#     src/lib/compiler/front/typer/types/unify-and-generalize-types-g.pkg
#     src/lib/compiler/front/semantic/basics/inlining-junk.pkg
#     src/lib/compiler/debugging-and-profiling/profiling/tdp-instrument.pkg
#     src/lib/compiler/debugging-and-profiling/profiling/add-per-fun-call-counters-to-deep-syntax.pkg
#
package inlining_information {
    #
    Inlining_Information
      = INFO  Exception                 # The "exception hack" allows any desired information to be stored.
      | LIST  List( Inlining_Information )
      | NULL
      ;

    stipulate
        fun bug message
            =
            error_message::impossible ("inlining_information: " + message);
    herein
        fun is_simple (INFO _) =>   TRUE;
            is_simple _        =>   FALSE;
        end;

        fun select (LIST l, i) =>   (list::nth (l, i)     except (SUBSCRIPT|INDEX_OUT_OF_BOUNDS) =  bug "Wrong field in inlining_information::LIST !");
            select (NULL,   _) =>   NULL;
            select (INFO _, i) =>   bug "Unexpected selection from inlining_information::INFO !";
        end;
    end;
};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext