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/dfg/DFGFlushFormat.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGFlushFormat.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGFlushFormat.h | 64 |
1 files changed, 48 insertions, 16 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGFlushFormat.h b/Source/JavaScriptCore/dfg/DFGFlushFormat.h index 9083a107e..f7084fb4d 100644 --- a/Source/JavaScriptCore/dfg/DFGFlushFormat.h +++ b/Source/JavaScriptCore/dfg/DFGFlushFormat.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Apple Inc. All rights reserved. + * Copyright (C) 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 DFGFlushFormat_h -#define DFGFlushFormat_h - -#include <wtf/Platform.h> +#pragma once #if ENABLE(DFG_JIT) @@ -46,7 +43,6 @@ enum FlushFormat { FlushedCell, FlushedBoolean, FlushedJSValue, - FlushedArguments, ConflictingFlush }; @@ -57,14 +53,13 @@ inline NodeFlags resultFor(FlushFormat format) case FlushedJSValue: case FlushedCell: case ConflictingFlush: - case FlushedArguments: return NodeResultJS; case FlushedInt32: return NodeResultInt32; case FlushedInt52: return NodeResultInt52; case FlushedDouble: - return NodeResultNumber; + return NodeResultDouble; case FlushedBoolean: return NodeResultBoolean; } @@ -78,16 +73,15 @@ inline UseKind useKindFor(FlushFormat format) case DeadFlush: case FlushedJSValue: case ConflictingFlush: - case FlushedArguments: return UntypedUse; case FlushedCell: return CellUse; case FlushedInt32: return Int32Use; case FlushedInt52: - return MachineIntUse; + return Int52RepUse; case FlushedDouble: - return NumberUse; + return DoubleRepUse; case FlushedBoolean: return BooleanUse; } @@ -95,6 +89,33 @@ inline UseKind useKindFor(FlushFormat format) return UntypedUse; } +inline UseKind uncheckedUseKindFor(FlushFormat format) +{ + switch (format) { + case DeadFlush: + case FlushedJSValue: + case ConflictingFlush: + return UntypedUse; + case FlushedCell: + return KnownCellUse; + case FlushedInt32: + return KnownInt32Use; + case FlushedInt52: + return Int52RepUse; + case FlushedDouble: + return DoubleRepUse; + case FlushedBoolean: + return KnownBooleanUse; + } + RELEASE_ASSERT_NOT_REACHED(); + return UntypedUse; +} + +inline SpeculatedType typeFilterFor(FlushFormat format) +{ + return typeFilterFor(useKindFor(format)); +} + inline DataFormat dataFormatFor(FlushFormat format) { switch (format) { @@ -113,13 +134,27 @@ inline DataFormat dataFormatFor(FlushFormat format) return DataFormatCell; case FlushedBoolean: return DataFormatBoolean; - case FlushedArguments: - return DataFormatArguments; } RELEASE_ASSERT_NOT_REACHED(); return DataFormatDead; } +inline FlushFormat merge(FlushFormat a, FlushFormat b) +{ + if (a == DeadFlush) + return b; + if (b == DeadFlush) + return a; + if (a == b) + return a; + return ConflictingFlush; +} + +inline bool isConcrete(FlushFormat format) +{ + return format != DeadFlush && format != ConflictingFlush; +} + } } // namespace JSC::DFG namespace WTF { @@ -134,6 +169,3 @@ inline JSC::DFG::FlushFormat inContext(JSC::DFG::FlushFormat format, JSC::DumpCo } // namespace WTF #endif // ENABLE(DFG_JIT) - -#endif // DFGFlushFormat_h - |