#pragma once
#if ENABLE(B3_JIT)
#include "B3Value.h"
namespace JSC { namespace B3 {
class JS_EXPORT_PRIVATE Const32Value : public Value {
public:
static bool accepts(Kind kind) { return kind == Const32; }
~Const32Value();
int32_t value() const { return m_value; }
Value* negConstant(Procedure&) const override;
Value* addConstant(Procedure&, int32_t other) const override;
Value* addConstant(Procedure&, const Value* other) const override;
Value* subConstant(Procedure&, const Value* other) const override;
Value* mulConstant(Procedure&, const Value* other) const override;
Value* checkAddConstant(Procedure&, const Value* other) const override;
Value* checkSubConstant(Procedure&, const Value* other) const override;
Value* checkMulConstant(Procedure&, const Value* other) const override;
Value* checkNegConstant(Procedure&) const override;
Value* divConstant(Procedure&, const Value* other) const override;
Value* uDivConstant(Procedure&, const Value* other) const override;
Value* modConstant(Procedure&, const Value* other) const override;
Value* uModConstant(Procedure&, const Value* other) const override;
Value* bitAndConstant(Procedure&, const Value* other) const override;
Value* bitOrConstant(Procedure&, const Value* other) const override;
Value* bitXorConstant(Procedure&, const Value* other) const override;
Value* shlConstant(Procedure&, const Value* other) const override;
Value* sShrConstant(Procedure&, const Value* other) const override;
Value* zShrConstant(Procedure&, const Value* other) const override;
Value* rotRConstant(Procedure&, const Value* other) const override;
Value* rotLConstant(Procedure&, const Value* other) const override;
Value* bitwiseCastConstant(Procedure&) const override;
Value* iToDConstant(Procedure&) const override;
Value* iToFConstant(Procedure&) const override;
TriState equalConstant(const Value* other) const override;
TriState notEqualConstant(const Value* other) const override;
TriState lessThanConstant(const Value* other) const override;
TriState greaterThanConstant(const Value* other) const override;
TriState lessEqualConstant(const Value* other) const override;
TriState greaterEqualConstant(const Value* other) const override;
TriState aboveConstant(const Value* other) const override;
TriState belowConstant(const Value* other) const override;
TriState aboveEqualConstant(const Value* other) const override;
TriState belowEqualConstant(const Value* other) const override;
protected:
void dumpMeta(CommaPrinter&, PrintStream&) const override;
Value* cloneImpl() const override;
friend class Procedure;
Const32Value(Origin origin, int32_t value)
: Value(CheckedOpcode, Const32, Int32, origin)
, m_value(value)
{
}
private:
int32_t m_value;
};
} }
#endif // ENABLE(B3_JIT)