diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/ftl/FTLFormattedValue.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/ftl/FTLFormattedValue.h')
-rw-r--r-- | Source/JavaScriptCore/ftl/FTLFormattedValue.h | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/Source/JavaScriptCore/ftl/FTLFormattedValue.h b/Source/JavaScriptCore/ftl/FTLFormattedValue.h index b7ab3616c..ee0a0701f 100644 --- a/Source/JavaScriptCore/ftl/FTLFormattedValue.h +++ b/Source/JavaScriptCore/ftl/FTLFormattedValue.h @@ -23,34 +23,28 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef FTLFormattedValue_h -#define FTLFormattedValue_h - -#include <wtf/Platform.h> +#pragma once #if ENABLE(FTL_JIT) -#include "FTLAbbreviations.h" -#include "FTLValueFormat.h" +#include "DataFormat.h" +#include "FTLAbbreviatedTypes.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 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. +// the type of the B3::Value* or the type of the DFG::Node). class FormattedValue { public: FormattedValue() - : m_format(InvalidValueFormat) + : m_format(DataFormatNone) , m_value(0) { } - FormattedValue(ValueFormat format, LValue value) + FormattedValue(DataFormat format, LValue value) : m_format(format) , m_value(value) { @@ -58,27 +52,24 @@ public: bool operator!() const { - ASSERT((m_format == InvalidValueFormat) == !m_value); - return m_format == InvalidValueFormat; + ASSERT((m_format == DataFormatNone) == !m_value); + return m_format == DataFormatNone; } - ValueFormat format() const { return m_format; } + DataFormat format() const { return m_format; } LValue value() const { return m_value; } private: - ValueFormat m_format; + DataFormat m_format; LValue m_value; }; static inline FormattedValue noValue() { return FormattedValue(); } -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); } +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); } } } // namespace JSC::FTL #endif // ENABLE(FTL_JIT) - -#endif // FTLFormattedValue_h - |