Commit Graph
42 Commits
Author SHA1 Message Date
Ofek 2df8d32758 Tsify #6 (#6941)
Another tsification batch. 347 to go and I'm running out of easy fixes
:(
2024-10-22 21:41:44 +03:00
Ofek f715dc2932 More tsification (#6877)
About half way through. Only 708 tsification errors to go..
2024-09-28 10:32:36 +03:00
Ofek 9ef46fbafe Binge of (mostly) mindless tsification (#6838)
Turned on `noImplicitAny` in tsconfig, then went around fixing some
random easy stuff.
Hopefully tsification-PRs with more real content coming up.
2024-09-07 14:36:43 +03:00
Ofek 42c10cf9b3 Fix #6083: rewrite demangleLabels (#6701)
This code had some problems:

https://github.com/compiler-explorer/compiler-explorer/blob/07d5c3312fce98d2742fa7ed738d4084f3a6975f/lib/demangler/base.ts#L200-L203
There

`PrefixTree.replaceAll` replaces mangled to demangled names 'blindly',
with no notion of labels. Later `demangleLabels` runs separate logic to
update the column-range of each label in hope of mimicking the
`replaceAll` action. This fails in some cases:
(1) the `demangleLables` code handles only a single occurrence of each
label in a line,
(2) It also diverges from `replaceAll` in case that a string which is a
label-name appears in the line *not* as part of a label (this does
happen!).

This fix makes `replaceAll` return detailed account of its actions, and
then use these to properly adjust the label ranges.

This fix might not address all the root issues, but it does make some
`label` decisions consistent where they weren't.
2024-07-13 17:38:32 +03:00
narpfel 7974f78e08 Also demangle quoted identifiers in LLVM IR (#6560)
This fixes one of the two problems reported in #6558.
2024-06-07 20:49:45 -05:00
Patrick Quist 904410b993 Fix #5657 2024-04-20 16:16:34 +02:00
Patrick Quist b8325cf0c6 eslint root setting and fixes (#6307) 2024-04-16 21:26:53 +02:00
Jeremy RifkinandPatrick Quist 15271c9090 Fix missed demangles (#6350)
This PR fixes missed demangle cases pointed out in #6348, namely of the
form `mov eax, OFFSET FLAT:_Z...` and `jmp qword ptr [rip + _Z...]`.

Closes #6348.

---------

Co-authored-by: Patrick Quist <partouf@gmail.com>
2024-04-13 13:54:49 -05:00
Ofek 8dd09d1c1f Replace the deprecated substr with substring (#6236)
Just some minor homekeeping.
2024-03-10 10:04:29 +02:00
Matt Godbolt fd3dd917f5 Vitest (#6219)
Port to vitest. Port everything to typescript. Remove chai, mocha and
chai-as-promised. Adds some docs.
2024-03-08 22:25:09 -06:00
J. Ryan Stinnett c3e1b04c31 Rename opt pipeline without LLVM prefix (#5828)
This prepares for future work that will reuse the opt pipeline view
outside of the LLVM ecosystem by renaming related components to remove
the LLVM prefix.

The pass dumper keep its LLVM prefix, as it is assumed this part is
likely to be customised for each compiler ecosystem.

The historical component name has been preserved in the component list
as an alias to keep old links working.
2023-12-03 11:33:42 -05:00
Patrick Quist 7975602953 Dont attempt to demangle (llvm-ir) if we cant (#5666) 2023-10-28 16:32:19 +02:00
Jeremy Rifkin 4814293ee1 Some quick llvm ir fixes (#5153)
Fixes three issues
- Newlines at start of an ir dump
- Annotations like `!llvm.loop !21`
- Demangling not working
2023-06-17 10:52:51 -04:00
Jeremy Rifkin 10851a1dda LLVM IR pane improvements (#5078)
This PR will add filtering and other output options to the LLVM IR pane


![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/ffc865ea-b3fa-441f-b501-4ec4b68e261f)

![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/936be326-b55e-40cd-ba47-22b121c1acfb)


Closes #5062
Related to #5045
2023-06-11 17:00:53 -04:00
Jeremy Overesch 445eff5649 Add minimal TI-C2000 compiler support (#4625)
This adds the ability to use TI's C2000 compiler with basic directive filtering and assembly code parsing.
2023-04-05 11:24:47 -05:00
zebrapurringandzebrapurring 34bbde880c Support configuring extra arguments for the demangler, objdumper and execution wrapper (#4883)
Some toolchains require passing non-standard, mandatory arguments to the
CLI tools in order to execute them (configuring licenses, selecting CPU
targets, etc.). This PR allows configuring extra command-line arguments
for the demangler, object dumper and the execution wrapper. The version
flag argument has been refactored into an array, so that more than one
argument can be passed, if necessary.

The changes are fully backwards compatible.

Co-authored-by: zebrapurring <>
2023-04-01 23:49:22 +02:00
Mats Jun LarsenandMatt Godbolt 633eb82d18 Transition to ECMAScript Modules (#4780)
Makes the Compiler Explorer app, and all the tooling ESM compatible.
Things that have been done:

1. The package.json has `type: module` now
2. All relative imports have a .js ending
3. All directory imports are now directory/index.js to comply with ESM
standards
4. Dependency node-graceful is now imported into tree, because the
package is broken under esm
5. Dependency p-queue has been bumped to 7.x with ESM support
6. Dependency profanities has been bumped to 3.x with ESM support
7. Webpack config is now both ESM and CommonJS compatible
8. Non-ESM compatible imports have been rewritten
9. ESLint configuration has been tweaked to not fail on .js imports
10. Mocha is now hacked together and ran with ts-node-esm
11. Webpack is now hacked together and ran with ts-node-esm
12. Webpack config is now ESM compatible, so that it can be used in the
dev server
13. Cypress code still runs commonjs, and has been excluded from the
tsconfig
14. All sinon mock tests have been commented out, because sinon module
mocks do not work with ESModules (because ESModules are immutable)

A lot of tests are now giving warnings/errors to stdout, yet still pass.
Docenizer codegenerator scripts have been updated, but I did not re-run
them, and instead just changed their code.

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-02-27 18:06:38 -06:00
Jeremy Rifkin 384c297906 Fix trailing comma issue (#4775)
Make trailing commas more consistent throughout the project, fixes
config conflict between eslint and prettier. Resolves an oversight in
#4766.
2023-02-26 12:21:35 -05:00
Jeremy Rifkin 2b06c69111 Turn some auto-fixable eslint rules back on (#4766)
This PR turns comma-dangle and indent eslint rules on for lib/. These
are rules inherited from the eslint config for static/, this PR just
makes things more consistent. Also turned
@typescript-eslint/no-var-requires back on while I was here.
2023-02-23 17:16:17 -05:00
Jeremy Rifkin 68aa631366 Tsify lib/demanglers (#4607) 2023-01-17 12:28:56 -05:00
Matt Godbolt 749319f791 Slightly more controversial bumpings (#4503)
- latest sentry, tar-stream, which, some yamljs versions
- latest eslint-* stuff
- latest webpack manifest
- Applies all the automatic fixes for newer lint rules
- Bump the webpack version

applies new tslint stuff
2022-12-28 11:42:14 -06:00
Tobias Hieta 96aa4bea0f Add support for clang-cl and llvm-undname (#4371)
* Added llvm demangler code

* Added clang-cl compiler class
2022-12-18 21:10:04 +01:00
Paul Taylor df36579a20 Add nvc++ as a C++ compiler (#4204)
* add nvhpc-sdk C++ compilers

* return await more promise-returning functions

* add nvc++-specific demangler
2022-10-31 22:39:34 -05:00
Jeremy Rifkin 15007d3244 Refactored the LLVM Optimization Pipeline to provide better diagnostics, added timeout indication to exec.js (#4016) 2022-09-03 01:15:21 +02:00
Jeremy Rifkin ed1a4e6b27 LLVM Optimization Pass Viewer (#3769) 2022-07-01 01:53:02 +02:00
Ben Barsdell bb0f4dc31d Fix demangling in CUDA PTX output (#3714)
- Demangling was previously very incomplete and in fact appears to
  have worked only through luck by relying on "// .globl" being parsed
  using the jumpDef regex (which failed completely when comment
  filtering was enabled).
- This commit adds explicit regexes to robustly detect PTX function
  and variable declarations, which enables full demangling.
2022-05-25 07:35:56 -05:00
partouf 69fb396cd7 better logging for when objdump or c++filt is missing 2022-05-14 18:49:35 +02:00
Matt Godbolt f2c1e0bd31 The Grand Reformat (#3643)
* The Grand Reformat

- everything made prettier...literally
- some tweaks to include a few more files, including documentation
- minor changes to format style
- some tiny `// prettier-ignore` changes to keep a few things the way we like them
- a couple of super minor tweaks to embedded document types to ensure they format correctly
2022-05-09 23:13:50 -05:00
RabsRincon 40fe769459 Set comma-dangle to always in server code and es5 in client code 2022-04-26 05:26:48 +02:00
Matt Godbolt 21b764f392 Unify comma configuration; and apply format to some files. (#3559) 2022-04-25 18:22:11 -05:00
Rubén Rincón Blanco 48eee26d2c Group some files to their own folders (#3384)
* Group some files to their own folders

In etc/scripts/, added disasms/, docenizers/, and util/ folders
In lib/, added mapfiles/, and parsers/ folders (+moved google.js to
shortener)
In static/, added widgets/ folder

Added cypress folder to .gitignore

* Address Matt's PR reviews

* Move new Pane renaming to folder
2022-02-22 00:18:21 +01:00
Matt Godbolt 73c758671a Update eslint et al 2021-12-13 22:40:03 -06:00
RabsRincon ed0609bb90 Avoid null error if asm line is somehow missing 2021-11-08 17:42:35 +01:00
Matt Godbolt a4edf7ed6b No array for each 2021-05-28 18:08:05 -05:00
Matt Godbolt a465962ab3 explicit length check 2021-05-27 23:17:13 -05:00
Rubén Rincón BlancoandPatrick Quist 1642130a55 Add support for more cases of verbose demangling (#2446)
* Add support for more cases of verbose demangling

I skipped the tests on this commit so that I could push it,
 and add the tests at a later date.

I do this because I'm not sure this does not break unreleated
 stuff so I wanted to make the changes visible before fixing the tests

* Adress review comments

* Update cpp.js

* new test results

Co-authored-by: Patrick Quist <partouf@gmail.com>
2021-02-25 21:38:51 +01:00
Matt Godboltandpartouf a9d76dd0df Demangle optimization (#2390)
Uses a prefix tree to find replacements in each
line, instead of looping over all replacements for all lines.
Adds a large test (which was part of bug 1336). On my machine it
used to take 45s to process that test, now it takes ~1.5s.

Skip demangle replacement entirely if there's no demangling to be done. CC @apmorton

Co-authored-by: partouf <partouf@gmail.com>
2021-01-18 11:33:19 -06:00
Austin Morton de85aecc7d Normalize and enforce license disclaimer headers (#2234) 2020-09-27 00:20:19 -04:00
Patrick Quist a2eed58cd0 Transfer copyright to compiler explorer authors (#2232) 2020-09-26 18:26:02 -04:00
Austin Morton 044dcfbf88 Use ES6 Modules (#2132) 2020-09-26 16:59:26 -04:00
Austin Morton bac07fea6d Eliminate all dynamic require statements (#2230) 2020-09-25 11:21:30 -04:00
Austin Morton 3c4aa76707 Replace demanglerClassFile with demanglerType (#2225) 2020-09-23 05:34:30 -04:00