Commit Graph
24 Commits
Author SHA1 Message Date
Ofek b6386887a8 Make 'new source editor' preserve the origin language (#7031)
When doing 'Add new...'/'Source editor' from, e.g., a Rust editor - open
a new Rust editor and not a C++ one.


![image](https://github.com/user-attachments/assets/861c53bc-fb1e-44c0-ac23-09d2ac839bdb)
2024-10-27 11:06:51 +02:00
Ofek c1985d64a1 Tsification binge #7 (#6974) 2024-10-25 12:19:04 +03:00
Sirui Mu a49dbc6dd7 Add ClangIR output for clangir compiler (#6798)
Currently the clangir compiler is implemented by a special clang variant
whose compilation options list gets appended with `-Xclang -fclangir
-Xclang -emit-cir`. This introduces a problem: we no longer gets access
to its LLVM IR output and assembly output because `-emit-cir` is an
exclusive option.

This patch resolves this problem by introducing a new ClangIR pane,
similar to the LLVM IR pane or Rust MIR pane. A new output kind named
`ClangIR` is added to the "Add new..." drop down menu and it toggles the
ClangIR pane. This patch then removes `-Xclang -emit-cir` from the
options list of the clangir compiler. The clangir compiler will then
output assembly code just like other clang compilers. The removed
options will be added back when compiled from the ClangIR pane.
2024-09-12 19:43:26 +03:00
J. Ryan StinnettandMatt Godbolt f0e1d5d264 Add Racket optimisation pipeline (#5836)
This adds a Racket optimisation pipeline view by reusing the existing
LLVM-focused optimisation pipeline UI. A Racket-specific pass parser
translates its output into passes for the UI to present.

This new Racket optimisation pipeline view is currently only enabled for
Racket nightly, as it depends on [recent
changes](https://github.com/racket/racket/pull/4842) to Racket's
compiler output to function.

This also extends the opt pipeline view to allow customising the
function selector label as well as the options and filters for each
compiler where needed.


![image](https://github.com/compiler-explorer/compiler-explorer/assets/279572/f540b41e-fd55-4375-bb2d-a0bb977530b3)

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-12-11 19:35:45 -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 455d92916a Execution with heaptrack (#5644) 2023-11-07 23:59:40 +01:00
Jeremy Rifkin 3716cbd446 Support control flow graphs from the IR pane (#5155)
On top of #5154


![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/7bf25b5b-8988-42ff-9d8c-233e6d817997)

Additionally, while I was here, added support for multiple control flow
graphs to be opened from one compiler instead of disabling the button
once one is opened. And improved the implementation for how this was
done for the llvm opt pipeline.

And did some type work along the way.
2023-06-19 21:48:20 -04:00
Guo Ci 7651874a98 add Stack Usage Viewer (#5160)
For #4834
2023-06-19 20:26:15 -05:00
Jeremy Rifkin 8d624b523c Improve CFG viewer navigation and behavior (#5134) 2023-06-11 19:12:09 -04:00
Patrick Quist 079d495757 Compiler overrides (#5001) 2023-05-16 03:53:57 +02:00
Jeremy Rifkin 01935ecb2a Ensure a default language is provided for new editor panes (#4890)
Fixes #4889
2023-03-20 17:03:42 -04:00
Patrick Quist 59a91f5203 Add default cmake arg (#4830) 2023-03-08 01:24:42 +01: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 973ec6dfac Fix tool conversion bugs (#4731)
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
2023-02-13 16:11:38 -05:00
+24 fb47642ff7 Convert tool.js to typescript (based off #4166) (#4474)
Signed-off-by: Markus <28785953+MarkusJx@users.noreply.github.com>
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: MarkusJx <28785953+markusjx@users.noreply.github.com>
Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>
Co-authored-by: partouf <partouf@gmail.com>
Co-authored-by: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com>
Co-authored-by: Marc Poulhiès <dkm@kataplop.net>
Co-authored-by: Paul Taylor <paul.e.taylor@me.com>
Co-authored-by: Mats Larsen <me@supergrecko.com>
Co-authored-by: David Spickett <DavidSpickett@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Compiler Explorer Bot <mattgodbolt@users.noreply.github.com>
Co-authored-by: Enrico Seiler <eseiler@users.noreply.github.com>
Co-authored-by: Quinton Miller <nicetas.c@gmail.com>
Co-authored-by: James Murphy <72399781+mCodingLLC@users.noreply.github.com>
Co-authored-by: Miguel Ojeda <ojeda@users.noreply.github.com>
Co-authored-by: Ofek <ofekshilon@gmail.com>
Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
Co-authored-by: Sebastian Büttner <mail@bueddl.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Thornburgh <mysterymath@gmail.com>
Co-authored-by: Cory Bloor <Cordell.Bloor@amd.com>
Co-authored-by: marcosmartinezfco <marcosmartinezfco@gmail.com>
Co-authored-by: amyspark <amy@amyspark.me>
Co-authored-by: Robert Cohn <robert.s.cohn@intel.com>
Co-authored-by: Steve <hez2010@outlook.com>
Co-authored-by: Ofek <ofek@istraresearch.com>
Co-authored-by: kasperk81 <83082615+kasperk81@users.noreply.github.com>
Co-authored-by: Samuel Bronson <naesten@gmail.com>
Co-authored-by: Alfredo Correa <alfredo.correa+work@gmail.com>
Co-authored-by: Anastasia Stulova <38433336+AnastasiaStulova@users.noreply.github.com>
Co-authored-by: Michael Debertol <michael.debertol@gmail.com>
Co-authored-by: Madhur Chauhan <madhur4127@gmail.com>
Co-authored-by: Jessica Clarke <jrtc27@jrtc27.com>
Co-authored-by: Tobias Hieta <tobias@hieta.se>
2023-02-08 11:22:02 -05:00
Patrick Quist c022ca8a6c rebased ts/executor (#4605) 2023-02-02 20:46:15 +01:00
Jeremy Rifkin 07f37abe76 The War of The Types (#4490) 2023-01-13 19:22:25 -05:00
Marc Poulhiès 9d3096d2cc fix: Gcc dump types (#4369)
While doing some cleaning, the typing of the GCC dump feature was found
incorrect. This change tries to fix most of it... But some details still need to
be fixed (FIXME notes left in the code).

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2022-11-30 20:41:15 +01:00
Jeremy Rifkin 1294c3f949 Control flow graph tool rework (#3899)
* Removed old code

* Base functionality

* Work on edge offsets

* Setup interval trees for edges

* linter things

* Formatting

* Added syntax highlighting

* Cleanup and simplification. Improved handling of direct dropdown edges.

* Basic zoom/pan

* Remove old blocks from output

* Fix distance calculation

* Added function selector

* Improved zoom behavior

* figue 8 logic

* Canvas scaling / repainting, updated colors

* Don't truncate output, also removed some console.logs

* Tweak to zoom system

* Replaced canvas stuff with svg

* Experimenting with adding shadows to edges

* Removed shadows, was causing problems. Improved how blocks with lots of incident edges are handled.

* Slightly improved edge system

* some work on implementing segment priority system from cutter

* Optimization to rendering process. I was worried the graph layout algorithm was causing the page to hang but it turns out it was adding elements to the page with +=

* Removed need for storing the previous segment

* refactor, splitting up some logic

* Cleaned up logic and got horizontal edges working better

* Remove vis-network dependency

* Updated package-lock, removed @import vis-network css stuff, added a todo for myself

* Cleaned up notes and error messages. Added comments. Clear the pane if there's no function to display

* Added layout time information, implemented .resize

* Light theme

* State work and bug fix for dragiing

* Re-dading lost dark theme changes

* Added jquery import

* Cleaned up console.logs

* Added basic block count

* Incorporated PR review comments; Fixed cypress (hopefully), added documentation, improved the dropdown, and fixed dropdown items not being cleared with an empty result.cfg

* Ran format
2022-11-29 22:28:10 -05:00
Marc Poulhiès 2fa2bbb16a refactor: renames the CompilerFilters type (#4346)
The type which probably started as a real enum of possible post filtering
options now also includes options used for compilers' invocations.

The type was already split, but the naming was not reflecting this in the other
part of the code.

This changes tries to apply a simple renaming to the type only (corresponding
variables are left as 'filters').

While doing so, some typing error were discovered around the GccDump feature.
A fix for this will follow in a different PR.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2022-11-28 21:37:15 +01:00
Patrick Quist 1e0543fbbb Change auto-open device-view to only when there's device asm (#4202) 2022-10-25 23:11:49 +02:00
Jeremy Rifkin ed1a4e6b27 LLVM Optimization Pass Viewer (#3769) 2022-07-01 01:53:02 +02:00
MarkusandMats Larsen f4753b0d7e Convert components.js to typescript (#2993)
Co-authored-by: Mats Larsen <me@supergrecko.com>
2022-06-22 00:29:16 +02:00