diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/ftl/FTLFormattedValue.h | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/ftl/FTLFormattedValue.h')
-rw-r--r-- | Source/JavaScriptCore/ftl/FTLFormattedValue.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/Source/JavaScriptCore/ftl/FTLFormattedValue.h b/Source/JavaScriptCore/ftl/FTLFormattedValue.h index a4d01ea79..b7ab3616c 100644 --- a/Source/JavaScriptCore/ftl/FTLFormattedValue.h +++ b/Source/JavaScriptCore/ftl/FTLFormattedValue.h @@ -26,26 +26,31 @@ #ifndef FTLFormattedValue_h #define FTLFormattedValue_h +#include <wtf/Platform.h> + #if ENABLE(FTL_JIT) -#include "DataFormat.h" -#include "FTLAbbreviatedTypes.h" +#include "FTLAbbreviations.h" +#include "FTLValueFormat.h" namespace JSC { namespace FTL { // This class is mostly used for OSR; it's a way of specifying how a value is formatted // in cases where it wouldn't have been obvious from looking at other indicators (like -// the type of the B3::Value* or the type of the DFG::Node). +// the type of the LLVMValueRef or the type of the DFG::Node). Typically this arises +// because LLVMValueRef doesn't give us the granularity we need to begin with, and we +// use this in situations where there is no good way to say what node the value came +// from. class FormattedValue { public: FormattedValue() - : m_format(DataFormatNone) + : m_format(InvalidValueFormat) , m_value(0) { } - FormattedValue(DataFormat format, LValue value) + FormattedValue(ValueFormat format, LValue value) : m_format(format) , m_value(value) { @@ -53,23 +58,23 @@ public: bool operator!() const { - ASSERT((m_format == DataFormatNone) == !m_value); - return m_format == DataFormatNone; + ASSERT((m_format == InvalidValueFormat) == !m_value); + return m_format == InvalidValueFormat; } - DataFormat format() const { return m_format; } + ValueFormat format() const { return m_format; } LValue value() const { return m_value; } private: - DataFormat m_format; + ValueFormat m_format; LValue m_value; }; static inline FormattedValue noValue() { return FormattedValue(); } -static inline FormattedValue int32Value(LValue value) { return FormattedValue(DataFormatInt32, value); } -static inline FormattedValue booleanValue(LValue value) { return FormattedValue(DataFormatBoolean, value); } -static inline FormattedValue jsValueValue(LValue value) { return FormattedValue(DataFormatJS, value); } -static inline FormattedValue doubleValue(LValue value) { return FormattedValue(DataFormatDouble, value); } +static inline FormattedValue int32Value(LValue value) { return FormattedValue(ValueFormatInt32, value); } +static inline FormattedValue booleanValue(LValue value) { return FormattedValue(ValueFormatBoolean, value); } +static inline FormattedValue jsValueValue(LValue value) { return FormattedValue(ValueFormatJSValue, value); } +static inline FormattedValue doubleValue(LValue value) { return FormattedValue(ValueFormatDouble, value); } } } // namespace JSC::FTL |