/*
- * 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
FlushedCell,
FlushedBoolean,
FlushedJSValue,
- FlushedArguments,
ConflictingFlush
};
case FlushedJSValue:
case FlushedCell:
case ConflictingFlush:
- case FlushedArguments:
return NodeResultJS;
case FlushedInt32:
return NodeResultInt32;
case DeadFlush:
case FlushedJSValue:
case ConflictingFlush:
- case FlushedArguments:
return UntypedUse;
case FlushedCell:
return CellUse;
return UntypedUse;
}
+inline SpeculatedType typeFilterFor(FlushFormat format)
+{
+ return typeFilterFor(useKindFor(format));
+}
+
inline DataFormat dataFormatFor(FlushFormat format)
{
switch (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 {