Goose  Artifact [c544442363]

Artifact c54444236304a97336befdce406d18a00066d24f352ba21ce6ccdeb742c7e673:

  • File bs/llr/call.h — part of check-in [d2c4e27b15] at 2019-03-02 12:33:24 on branch trunk — llr: added predicates to quickly test if an llr element is suitable for compilation time execution, or for eager evaluation. (user: achavasse size: 611)

#ifndef EMPATHY_LLR_CALL_H
#define EMPATHY_LLR_CALL_H

namespace empathy::llr
{
    class Call
    {
        public:
            template< typename F, typename A >
            Call( F&& func, A&& args ) :
                m_func( forward< F >( func ) ),
                m_args( forward< A >( args ) )
            {}

            const auto& func() const { return m_func; }
            const auto& args() const { return m_args; }

            bool canBeExecuted() const;
            bool canBeEagerlyEvaluated() const;

        private:
            ir::Value m_func;
            ir::Term m_args;
    };
}

#endif