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/dfg/DFGValueSource.h | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGValueSource.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGValueSource.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGValueSource.h b/Source/JavaScriptCore/dfg/DFGValueSource.h index 1b55797d5..1e56f654f 100644 --- a/Source/JavaScriptCore/dfg/DFGValueSource.h +++ b/Source/JavaScriptCore/dfg/DFGValueSource.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011, 2013-2015 Apple Inc. All rights reserved. + * Copyright (C) 2011, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,6 +26,8 @@ #ifndef DFGValueSource_h #define DFGValueSource_h +#include <wtf/Platform.h> + #if ENABLE(DFG_JIT) #include "DFGCommon.h" @@ -45,6 +47,7 @@ enum ValueSourceKind { CellInJSStack, BooleanInJSStack, DoubleInJSStack, + ArgumentsSource, SourceIsDead, HaveNode }; @@ -64,6 +67,8 @@ static inline ValueSourceKind dataFormatToValueSourceKind(DataFormat dataFormat) return CellInJSStack; case DataFormatDead: return SourceIsDead; + case DataFormatArguments: + return ArgumentsSource; default: RELEASE_ASSERT(dataFormat & DataFormatJS); return ValueInJSStack; @@ -85,6 +90,8 @@ static inline DataFormat valueSourceKindToDataFormat(ValueSourceKind kind) return DataFormatBoolean; case DoubleInJSStack: return DataFormatDouble; + case ArgumentsSource: + return DataFormatArguments; case SourceIsDead: return DataFormatDead; default: @@ -115,7 +122,7 @@ public: explicit ValueSource(ValueSourceKind valueSourceKind) : m_kind(valueSourceKind) { - ASSERT(kind() == SourceIsDead); + ASSERT(kind() == ArgumentsSource || kind() == SourceIsDead || kind() == ArgumentsSource); } explicit ValueSource(MinifiedID id) @@ -152,6 +159,8 @@ public: return ValueSource(CellInJSStack, where); case FlushedBoolean: return ValueSource(BooleanInJSStack, where); + case FlushedArguments: + return ValueSource(ArgumentsSource); } RELEASE_ASSERT_NOT_REACHED(); return ValueSource(); @@ -167,8 +176,6 @@ public: return kind() != SourceNotSet; } - bool operator!() const { return !isSet(); } - ValueSourceKind kind() const { return m_kind; @@ -189,6 +196,9 @@ public: case SourceIsDead: return ValueRecovery::constant(jsUndefined()); + case ArgumentsSource: + return ValueRecovery::argumentsThatWereNotCreated(); + default: return ValueRecovery::displacedInJSStack(virtualRegister(), dataFormat()); } @@ -207,7 +217,6 @@ public: } void dump(PrintStream&) const; - void dumpInContext(PrintStream&, DumpContext*) const; private: ValueSourceKind m_kind; |