diff options
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGValueSource.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGValueSource.h | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGValueSource.h b/Source/JavaScriptCore/dfg/DFGValueSource.h index 1e56f654f..6aa75a44b 100644 --- a/Source/JavaScriptCore/dfg/DFGValueSource.h +++ b/Source/JavaScriptCore/dfg/DFGValueSource.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011, 2013 Apple Inc. All rights reserved. + * Copyright (C) 2011, 2013-2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,10 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DFGValueSource_h -#define DFGValueSource_h - -#include <wtf/Platform.h> +#pragma once #if ENABLE(DFG_JIT) @@ -47,7 +44,6 @@ enum ValueSourceKind { CellInJSStack, BooleanInJSStack, DoubleInJSStack, - ArgumentsSource, SourceIsDead, HaveNode }; @@ -67,8 +63,6 @@ static inline ValueSourceKind dataFormatToValueSourceKind(DataFormat dataFormat) return CellInJSStack; case DataFormatDead: return SourceIsDead; - case DataFormatArguments: - return ArgumentsSource; default: RELEASE_ASSERT(dataFormat & DataFormatJS); return ValueInJSStack; @@ -90,8 +84,6 @@ static inline DataFormat valueSourceKindToDataFormat(ValueSourceKind kind) return DataFormatBoolean; case DoubleInJSStack: return DataFormatDouble; - case ArgumentsSource: - return DataFormatArguments; case SourceIsDead: return DataFormatDead; default: @@ -122,7 +114,7 @@ public: explicit ValueSource(ValueSourceKind valueSourceKind) : m_kind(valueSourceKind) { - ASSERT(kind() == ArgumentsSource || kind() == SourceIsDead || kind() == ArgumentsSource); + ASSERT(kind() == SourceIsDead); } explicit ValueSource(MinifiedID id) @@ -159,8 +151,6 @@ public: return ValueSource(CellInJSStack, where); case FlushedBoolean: return ValueSource(BooleanInJSStack, where); - case FlushedArguments: - return ValueSource(ArgumentsSource); } RELEASE_ASSERT_NOT_REACHED(); return ValueSource(); @@ -176,6 +166,8 @@ public: return kind() != SourceNotSet; } + bool operator!() const { return !isSet(); } + ValueSourceKind kind() const { return m_kind; @@ -196,9 +188,6 @@ public: case SourceIsDead: return ValueRecovery::constant(jsUndefined()); - case ArgumentsSource: - return ValueRecovery::argumentsThatWereNotCreated(); - default: return ValueRecovery::displacedInJSStack(virtualRegister(), dataFormat()); } @@ -217,6 +206,7 @@ public: } void dump(PrintStream&) const; + void dumpInContext(PrintStream&, DumpContext*) const; private: ValueSourceKind m_kind; @@ -226,6 +216,3 @@ private: } } // namespace JSC::DFG #endif // ENABLE(DFG_JIT) - -#endif // DFGValueSource_h - |