MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / methodSignature

Function methodSignature

test/dotnet-parser-tests.ts:220–228  ·  view source on GitHub ↗
(returnType: Buffer, parameters: Buffer[], genericParameterCount = 0)

Source from the content-addressed store, hash-verified

218}
219
220function methodSignature(returnType: Buffer, parameters: Buffer[], genericParameterCount = 0) {
221 return Buffer.concat([
222 bytes(genericParameterCount === 0 ? 0 : 0x10),
223 ...(genericParameterCount === 0 ? [] : [compressedUInt(genericParameterCount)]),
224 compressedUInt(parameters.length),
225 returnType,
226 ...parameters,
227 ]);
228}
229
230function typeDefOrRef(table: 'TypeDef' | 'TypeRef' | 'TypeSpec', row: number) {
231 return compressedUInt((row << 2) | (table === 'TypeDef' ? 0 : table === 'TypeRef' ? 1 : 2));

Callers 2

functionPointerFunction · 0.85
ecma335FixtureFunction · 0.85

Calls 2

bytesFunction · 0.85
compressedUIntFunction · 0.85

Tested by

no test coverage detected