X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/dfg/DFGFlushFormat.h diff --git a/dfg/DFGFlushFormat.h b/dfg/DFGFlushFormat.h index 10e3c00..480944b 100644 --- a/dfg/DFGFlushFormat.h +++ b/dfg/DFGFlushFormat.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013, 2014 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 @@ -44,7 +44,6 @@ enum FlushFormat { FlushedCell, FlushedBoolean, FlushedJSValue, - FlushedArguments, ConflictingFlush }; @@ -55,7 +54,6 @@ inline NodeFlags resultFor(FlushFormat format) case FlushedJSValue: case FlushedCell: case ConflictingFlush: - case FlushedArguments: return NodeResultJS; case FlushedInt32: return NodeResultInt32; @@ -76,7 +74,6 @@ inline UseKind useKindFor(FlushFormat format) case DeadFlush: case FlushedJSValue: case ConflictingFlush: - case FlushedArguments: return UntypedUse; case FlushedCell: return CellUse; @@ -93,6 +90,11 @@ inline UseKind useKindFor(FlushFormat format) return UntypedUse; } +inline SpeculatedType typeFilterFor(FlushFormat format) +{ + return typeFilterFor(useKindFor(format)); +} + inline DataFormat dataFormatFor(FlushFormat format) { switch (format) { @@ -111,13 +113,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 {