Some minor clean-ups to binary.{h,cpp}.

Removed spvBinaryDecodeOpcode and spvBinaryDecodeOperand from the public
interface since they were only ever used in binary.cpp.

Replaced the usage of spv_operand_table_t and it's ilk with the
AssemblyGrammar to reduce the number of passed parameters.

Fixed typo in comment.
This commit is contained in:
Andrew Woloszyn
2015-10-16 10:23:42 -04:00
committed by David Neto
parent 6483bd7132
commit ccc210b4cc
4 changed files with 72 additions and 67 deletions
+12
View File
@@ -238,6 +238,12 @@ spv_result_t AssemblyGrammar::lookupOperand(spv_operand_type_t type,
return spvOperandTableNameLookup(operandTable_, type, name, name_len, desc);
}
spv_result_t AssemblyGrammar::lookupOperand(spv_operand_type_t type,
uint32_t operand,
spv_operand_desc *desc) const {
return spvOperandTableValueLookup(operandTable_, type, operand, desc);
}
spv_result_t AssemblyGrammar::parseMaskOperand(const spv_operand_type_t type,
const char *textValue,
uint32_t *pValue) const {
@@ -249,6 +255,12 @@ spv_result_t AssemblyGrammar::lookupExtInst(spv_ext_inst_type_t type,
return spvExtInstTableNameLookup(extInstTable_, type, textValue, extInst);
}
spv_result_t AssemblyGrammar::lookupExtInst(spv_ext_inst_type_t type,
uint32_t firstWord,
spv_ext_inst_desc *extInst) const {
return spvExtInstTableValueLookup(extInstTable_, type, firstWord, extInst);
}
void AssemblyGrammar::prependOperandTypesForMask(
const spv_operand_type_t type, const uint32_t mask,
spv_operand_pattern_t *pattern) const {