B3ConstFloatValue.h [plain text]
#pragma once
#if ENABLE(B3_JIT)
#include "B3Value.h"
namespace JSC { namespace B3 {
class JS_EXPORT_PRIVATE ConstFloatValue : public Value {
public:
static bool accepts(Kind kind) { return kind == ConstFloat; }
~ConstFloatValue();
float 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* divConstant(Procedure&, const Value* other) const override;
Value* mulConstant(Procedure&, const Value* other) const override;
Value* bitAndConstant(Procedure&, const Value* other) const override;
Value* bitwiseCastConstant(Procedure&) const override;
Value* floatToDoubleConstant(Procedure&) const override;
Value* absConstant(Procedure&) const override;
Value* ceilConstant(Procedure&) const override;
Value* floorConstant(Procedure&) const override;
Value* sqrtConstant(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;
protected:
void dumpMeta(CommaPrinter&, PrintStream&) const override;
Value* cloneImpl() const override;
private:
friend class Procedure;
ConstFloatValue(Origin origin, float value)
: Value(CheckedOpcode, ConstFloat, Float, origin)
, m_value(value)
{
}
float m_value;
};
} }
#endif // ENABLE(B3_JIT)