- Use `const` where it is possible.
- Move regexes into variables and give them a name.
- Eliminate `lineNumber` variable and use the length of the asm array.
- Use `updateDecorations()` function to decorate label usages.
- Update and fix test cases.
Parsing the labels on the server-side is more general, more flexible
and it can be easily tested.
- Store label definitions in a map. The key will be the label name and
the value will be the line number where the label definition can be
found.
- For each line get the labels which are used in the given line and
remove labels which do not have a definition.
- Modify the return value of the `processBinaryAsm` and `process`
function to return with the label definition too.
- Demangle the label usages and the label definitions too.
K1 MPPA uses ;; as a bundle separator (same syntax as IA64,
if it gets added to CE someday...).
The bundle separator must be alone on the line, see for example:
```
ld $r6 = 16[$r20]
addx8d $r9 = $r2, $r5
addw $r10 = $r2, -1
;;
addd $r0 = $r6, $r9
addd $r17 = $r10, 1
cb.wlez $r2? .L3
;;
copyd $r15 = $r0
;;
maddd $r15 = $r17, -8
;;
```
Single ; or ;; followed by any non whitespace before eol still
considered a comment.
E.g. for such directive
.file 1 "/home/user" "example.c"
now will be constructed valid path:
'/home/user/example.c'
instead of this broken path:
'/home/user/ "example.c"'
This commit adds support for hosting on windows, as well as better
support for the Visual C++ compiler. Specific interesting changes are:
- switch from /FAsc to /FA
- order functions in file order
- support demangling win32-style identifiers with undname
- clang++ and vc++ on win32 host are both supported