Goose  Artifact [f74b589bcd]

Artifact f74b589bcdf84e332850640197b0e10f833c9767d45b7cb610c004e60a0fad2e:

  • File bs/llr/binaryop.h — part of check-in [5ec364bc88] at 2019-07-31 23:27:53 on branch trunk — llr, execute, codegen: implemented the Xor instruction. (user: achavasse size: 621)

#ifndef EMPATHY_LLR_BINARYINSTR_H
#define EMPATHY_LLR_BINARYINSTR_H

namespace empathy::llr
{
    class BinaryOp
    {
        public:
            template< typename L, typename R >
            BinaryOp(L&& lhs, R&& rhs ) :
                m_lhs( forward< L >( lhs ) ),
                m_rhs( forward< L >( lhs ) )
            {}

            const auto& lhs() const { return m_lhs; }
            const auto& rhs() const { return m_rhs; }

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

        private:
            ir::Value m_lhs;
            ir::Value m_rhs;
    };
}

#endif