PreviousUpNext

15.3.193  src/lib/compiler/back/low/treecode/treecode-eval.api

## treecode-evaluate.sig

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



# Utilites to evaluate and compare treecode expressions.



###               "You can't wait for inspiration.
###                You have to go after it with a club."
###
###                             -- Jack London



stipulate
    package lbl =  codelabel;                                                   # codelabel             is from   src/lib/compiler/back/low/code/codelabel.pkg
herein

    # This api is implemented in:
    #
    #     src/lib/compiler/back/low/treecode/treecode-eval-g.pkg
    #
    api Treecode_Eval {
        #
        package tcf:            Treecode_Form;                                  # Treecode_Form         is from   src/lib/compiler/back/low/treecode/treecode-form.api
        package lac:            Late_Constant;                                  # Late_Constant         is from   src/lib/compiler/back/low/code/late-constant.api
        sharing lac == tcf::lac;

        # Equality
        #
        same_void_expression:   (tcf::Void_Expression,          tcf::Void_Expression     ) -> Bool;
        same_int_expression:    (tcf::Int_Expression,           tcf::Int_Expression      ) -> Bool;
        same_float_expression:  (tcf::Float_Expression,         tcf::Float_Expression    ) -> Bool;
        same_flag_expression:   (tcf::Flag_Expression,          tcf::Flag_Expression     ) -> Bool;                     # flag expressions handle zero/parity/overflow/... flag stuff.
        ====      :             (tcf::Label_Expression,         tcf::Label_Expression    ) -> Bool;
        same_expressionlists:   (List(tcf::Expression),         List(tcf::Expression)    ) -> Bool;



        # Value

        exception NON_CONSTANT;

        make_evaluation_functions:  
          {
            late_constant_to_integer:  lac::Late_Constant -> multiword_int::Int,
            label_to_int:              lbl::Codelabel -> Int
          } 
          -> 
          { evaluate_int_expression:        tcf::Int_Expression  -> multiword_int::Int,
            evaluate_flag_expression:  tcf::Flag_Expression -> Bool
          };

        value_of:  tcf::Label_Expression -> Int;
    };
end;

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


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext