in lib/spirv/lib/src/transpiler.dart [329:494]
void parseInstruction() {
final int word = readWord();
currentOp = word & 0xFFFF;
nextPosition = position + (word >> 16) - 1;
switch (currentOp) {
case _opExtInstImport:
opExtInstImport();
break;
case _opExtInst:
opExtInst();
break;
case _opMemoryModel:
opMemoryModel();
break;
case _opEntryPoint:
opEntryPoint();
break;
case _opExecutionMode:
opExecutionMode();
break;
case _opCapability:
opCapability();
break;
case _opConvertSToF:
typeCast();
break;
case _opTypeVoid:
opTypeVoid();
break;
case _opTypeBool:
opTypeBool();
break;
case _opTypeInt:
opTypeInt();
break;
case _opTypeFloat:
opTypeFloat();
break;
case _opTypeVector:
opTypeVector();
break;
case _opTypeMatrix:
opTypeMatrix();
break;
case _opTypeImage:
opTypeImage();
break;
case _opTypeSampledImage:
opTypeSampledImage();
break;
case _opTypePointer:
opTypePointer();
break;
case _opTypeFunction:
opTypeFunction();
break;
case _opConstantTrue:
opConstantTrue();
break;
case _opConstantFalse:
opConstantFalse();
break;
case _opConstant:
opConstant();
break;
case _opConstantComposite:
opConstantComposite();
break;
case _opConvertFToS:
typeCast();
break;
case _opFunction:
opFunction();
break;
case _opFunctionParameter:
opFunctionParameter();
break;
case _opFunctionEnd:
opFunctionEnd();
break;
case _opFunctionCall:
opFunctionCall();
break;
case _opVariable:
opVariable();
break;
case _opLoad:
opLoad();
break;
case _opSelect:
opSelect();
break;
case _opStore:
opStore();
break;
case _opAccessChain:
opAccessChain();
break;
case _opDecorate:
opDecorate();
break;
case _opVectorShuffle:
opVectorShuffle();
break;
case _opCompositeConstruct:
opCompositeConstruct();
break;
case _opCompositeExtract:
opCompositeExtract();
break;
case _opImageSampleImplicitLod:
opImageSampleImplicitLod();
break;
case _opFNegate:
opFNegate();
break;
case _opFAdd:
parseOperatorInst('+');
break;
case _opFSub:
parseOperatorInst('-');
break;
case _opFMul:
parseOperatorInst('*');
break;
case _opFDiv:
parseOperatorInst('/');
break;
case _opFMod:
parseBuiltinFunction('mod');
break;
case _opFUnordNotEqual:
parseOperatorInst('!=');
break;
case _opVectorTimesScalar:
case _opMatrixTimesScalar:
case _opVectorTimesMatrix:
case _opMatrixTimesVector:
case _opMatrixTimesMatrix:
parseOperatorInst('*');
break;
case _opDot:
parseBuiltinFunction('dot');
break;
case _opLabel:
opLabel();
break;
case _opReturn:
opReturn();
break;
case _opReturnValue:
opReturnValue();
break;
// Unsupported ops with no semantic meaning.
case _opSource:
case _opSourceExtension:
case _opName:
case _opMemberName:
case _opString:
case _opLine:
break;
default:
throw failure('Not a supported op.');
}
position = nextPosition;
}