summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-ir-generics-lowering-context.cpp2
-rw-r--r--source/slang/slang-ir-lower-existential.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/source/slang/slang-ir-generics-lowering-context.cpp b/source/slang/slang-ir-generics-lowering-context.cpp
index 317532e8c..7e78bcfbd 100644
--- a/source/slang/slang-ir-generics-lowering-context.cpp
+++ b/source/slang/slang-ir-generics-lowering-context.cpp
@@ -164,7 +164,7 @@ namespace Slang
auto anyValueType = builder->getAnyValueType(anyValueSize);
auto witnessTableType = builder->getWitnessTableType((IRType*)paramType);
auto rttiType = builder->getPtrType(builder->getRTTIType());
- auto tupleType = builder->getTupleType(anyValueType, witnessTableType, rttiType);
+ auto tupleType = builder->getTupleType(rttiType, witnessTableType, anyValueType);
return tupleType;
}
case kIROp_lookup_interface_method:
diff --git a/source/slang/slang-ir-lower-existential.cpp b/source/slang/slang-ir-lower-existential.cpp
index 4078ad884..a6db2b781 100644
--- a/source/slang/slang-ir-lower-existential.cpp
+++ b/source/slang/slang-ir-lower-existential.cpp
@@ -25,7 +25,7 @@ namespace Slang
auto anyValueSize = sharedContext->getInterfaceAnyValueSize(interfaceType, inst->sourceLoc);
auto anyValueType = builder->getAnyValueType(anyValueSize);
auto rttiType = builder->getPtrType(builder->getRTTIType());
- auto tupleType = builder->getTupleType(anyValueType, witnessTableType, rttiType);
+ auto tupleType = builder->getTupleType(rttiType, witnessTableType, anyValueType);
IRInst* rttiObject = inst->getRTTI();
if (auto type = as<IRType>(rttiObject))
@@ -36,7 +36,7 @@ namespace Slang
IRInst* packedValue = value;
if (valueType->op != kIROp_AnyValueType)
packedValue = builder->emitPackAnyValue(anyValueType, value);
- IRInst* tupleArgs[] = { packedValue, inst->getWitnessTable(), rttiObject };
+ IRInst* tupleArgs[] = {rttiObject, inst->getWitnessTable(), packedValue};
auto tuple = builder->emitMakeTuple(tupleType, 3, tupleArgs);
inst->replaceUsesWith(tuple);
inst->removeAndDeallocate();
@@ -66,7 +66,7 @@ namespace Slang
void processExtractExistentialValue(IRExtractExistentialValue* inst)
{
- processExtractExistentialElement(inst, 0);
+ processExtractExistentialElement(inst, 2);
}
void processExtractExistentialWitnessTable(IRExtractExistentialWitnessTable* inst)
@@ -76,7 +76,7 @@ namespace Slang
void processExtractExistentialType(IRExtractExistentialType* inst)
{
- processExtractExistentialElement(inst, 2);
+ processExtractExistentialElement(inst, 0);
}
void processInst(IRInst* inst)