MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / serializeFunctionType

Method serializeFunctionType

lib/Bytecode/Writer/BytecodeWriter.cpp:406–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404 }
405
406 LogicalResult
407 serializeFunctionType(FunctionType type, EncodingWriter &writer) {
408 // Write the function type with tag
409 writer.writeVarInt(Bytecode::TypeTag::FunctionType);
410 // Using VarInt for numParams per spec
411 uint64_t numInputs = type.getNumInputs();
412 writer.writeVarInt(numInputs);
413 // Serialize input types
414 for (Type input : type.getInputs())
415 if (failed(writeTypeIndex(input, writer)))
416 return failure();
417 // Using VarInt for numResults per spec
418 uint64_t numResults = type.getNumResults();
419 writer.writeVarInt(numResults);
420 // Serialize result types
421 for (Type result : type.getResults())
422 if (failed(writeTypeIndex(result, writer)))
423 return failure();
424 return success();
425 }
426
427 // Helper to recursively register dependent types before the main type.
428 void registerDependentTypes(Type type) {

Callers

nothing calls this directly

Calls 1

writeVarIntMethod · 0.80

Tested by

no test coverage detected