Non-functional: spellings of "destinaton" and "addPairConversion"

This commit is contained in:
johnkslang 2020-08-11 02:27:44 -06:00
parent d8daeb4323
commit b58f308ba4
2 changed files with 7 additions and 7 deletions

View File

@ -177,7 +177,7 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
return nullptr; return nullptr;
// Try converting the children's base types to compatible types. // Try converting the children's base types to compatible types.
auto children = addConversion(op, left, right); auto children = addPairConversion(op, left, right);
left = std::get<0>(children); left = std::get<0>(children);
right = std::get<1>(children); right = std::get<1>(children);
@ -887,7 +887,7 @@ TIntermTyped* TIntermediate::addConversion(TBasicType convertTo, TIntermTyped* n
// Returns the converted pair of nodes. // Returns the converted pair of nodes.
// Returns <nullptr, nullptr> when there is no conversion. // Returns <nullptr, nullptr> when there is no conversion.
std::tuple<TIntermTyped*, TIntermTyped*> std::tuple<TIntermTyped*, TIntermTyped*>
TIntermediate::addConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1) TIntermediate::addPairConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1)
{ {
if (!isConversionAllowed(op, node0) || !isConversionAllowed(op, node1)) if (!isConversionAllowed(op, node0) || !isConversionAllowed(op, node1))
return std::make_tuple(nullptr, nullptr); return std::make_tuple(nullptr, nullptr);
@ -940,7 +940,7 @@ TIntermediate::addConversion(TOperator op, TIntermTyped* node0, TIntermTyped* no
if (node0->getBasicType() == node1->getBasicType()) if (node0->getBasicType() == node1->getBasicType())
return std::make_tuple(node0, node1); return std::make_tuple(node0, node1);
promoteTo = getConversionDestinatonType(node0->getBasicType(), node1->getBasicType(), op); promoteTo = getConversionDestinationType(node0->getBasicType(), node1->getBasicType(), op);
if (std::get<0>(promoteTo) == EbtNumTypes || std::get<1>(promoteTo) == EbtNumTypes) if (std::get<0>(promoteTo) == EbtNumTypes || std::get<1>(promoteTo) == EbtNumTypes)
return std::make_tuple(nullptr, nullptr); return std::make_tuple(nullptr, nullptr);
@ -1951,7 +1951,7 @@ static TBasicType getCorrespondingUnsignedType(TBasicType type)
// integer type corresponding to the type of the operand with signed // integer type corresponding to the type of the operand with signed
// integer type. // integer type.
std::tuple<TBasicType, TBasicType> TIntermediate::getConversionDestinatonType(TBasicType type0, TBasicType type1, TOperator op) const std::tuple<TBasicType, TBasicType> TIntermediate::getConversionDestinationType(TBasicType type0, TBasicType type1, TOperator op) const
{ {
TBasicType res0 = EbtNumTypes; TBasicType res0 = EbtNumTypes;
TBasicType res1 = EbtNumTypes; TBasicType res1 = EbtNumTypes;
@ -2490,7 +2490,7 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true
// //
// Get compatible types. // Get compatible types.
// //
auto children = addConversion(EOpSequence, trueBlock, falseBlock); auto children = addPairConversion(EOpSequence, trueBlock, falseBlock);
trueBlock = std::get<0>(children); trueBlock = std::get<0>(children);
falseBlock = std::get<1>(children); falseBlock = std::get<1>(children);

View File

@ -425,7 +425,7 @@ public:
TIntermSymbol* addSymbol(const TType&, const TSourceLoc&); TIntermSymbol* addSymbol(const TType&, const TSourceLoc&);
TIntermSymbol* addSymbol(const TIntermSymbol&); TIntermSymbol* addSymbol(const TIntermSymbol&);
TIntermTyped* addConversion(TOperator, const TType&, TIntermTyped*); TIntermTyped* addConversion(TOperator, const TType&, TIntermTyped*);
std::tuple<TIntermTyped*, TIntermTyped*> addConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1); std::tuple<TIntermTyped*, TIntermTyped*> addPairConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1);
TIntermTyped* addUniShapeConversion(TOperator, const TType&, TIntermTyped*); TIntermTyped* addUniShapeConversion(TOperator, const TType&, TIntermTyped*);
TIntermTyped* addConversion(TBasicType convertTo, TIntermTyped* node) const; TIntermTyped* addConversion(TBasicType convertTo, TIntermTyped* node) const;
void addBiShapeConversion(TOperator, TIntermTyped*& lhsNode, TIntermTyped*& rhsNode); void addBiShapeConversion(TOperator, TIntermTyped*& lhsNode, TIntermTyped*& rhsNode);
@ -914,7 +914,7 @@ protected:
bool specConstantPropagates(const TIntermTyped&, const TIntermTyped&); bool specConstantPropagates(const TIntermTyped&, const TIntermTyped&);
void performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root); void performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root);
bool isConversionAllowed(TOperator op, TIntermTyped* node) const; bool isConversionAllowed(TOperator op, TIntermTyped* node) const;
std::tuple<TBasicType, TBasicType> getConversionDestinatonType(TBasicType type0, TBasicType type1, TOperator op) const; std::tuple<TBasicType, TBasicType> getConversionDestinationType(TBasicType type0, TBasicType type1, TOperator op) const;
// JohnK: I think this function should go away. // JohnK: I think this function should go away.
// This data structure is just a log to pass on to back ends. // This data structure is just a log to pass on to back ends.