aboutsummaryrefslogtreecommitdiff
path: root/lib/parsers/asm-parser-dotnet.ts
diff options
context:
space:
mode:
authorSteve <hez2010@outlook.com>2023-07-03 00:43:59 +0900
committerGitHub <noreply@github.com>2023-07-02 17:43:59 +0200
commit271d5ff788862cd4a30a6e68cd29a43b83d15a54 (patch)
tree39dbabcc307118278bf05c5d30a0768ccae37180 /lib/parsers/asm-parser-dotnet.ts
parentfd36f8f5ee19bb9d177def032c9c8e087edae0b8 (diff)
downloadcompiler-explorer-271d5ff788862cd4a30a6e68cd29a43b83d15a54.tar.gz
compiler-explorer-271d5ff788862cd4a30a6e68cd29a43b83d15a54.zip
AsmParser update for dotnet (#5227)gh-8041
Diffstat (limited to 'lib/parsers/asm-parser-dotnet.ts')
-rw-r--r--lib/parsers/asm-parser-dotnet.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/parsers/asm-parser-dotnet.ts b/lib/parsers/asm-parser-dotnet.ts
index d067a6d84..09ffeb7dc 100644
--- a/lib/parsers/asm-parser-dotnet.ts
+++ b/lib/parsers/asm-parser-dotnet.ts
@@ -47,7 +47,11 @@ export class DotNetAsmParser implements IAsmParser {
if (!trimmedLine || trimmedLine.startsWith(';')) continue;
if (trimmedLine.endsWith(':')) {
if (trimmedLine.includes('(')) {
- methodDef[line] = trimmedLine.substring(0, trimmedLine.length - 1);
+ let methodSignature = trimmedLine.substring(0, trimmedLine.length - 1);
+ if ((methodSignature.match(/\(/g) || []).length > 1) {
+ methodSignature = methodSignature.substring(0, methodSignature.lastIndexOf('(')).trimEnd();
+ }
+ methodDef[line] = methodSignature;
allAvailable.push(methodDef[line]);
} else {
labelDef[line] = {
@@ -114,8 +118,6 @@ export class DotNetAsmParser implements IAsmParser {
}
if (line.startsWith('Emitting R2R PE file')) continue;
- if (line.startsWith(';') && !line.startsWith('; Emitting')) continue;
-
cleanedAsm.push(line);
}