2527 Commits
Author SHA1 Message Date
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
Matt Godbolt 72d2fdccc1 Apply the font scale when we know the target (#6849)
This fixes an ordering issue with font scales. The issue would happen if
you changed the default font scale and then e.g. opened a tool window.
It would have the "default" size selected; but it wouldn't apply to the
editor window.
2024-09-10 16:00:13 -05:00
Ofek 730a45c2c7 Fix #6801: handle changeLangage before selectize initialization (#6811) 2024-09-07 10:11:23 +02:00
Patrick Quist 3a278ad3b3 Add library lookupname to support binary builds for boost (#6814) 2024-09-04 19:18:37 +02:00
Ofek d6f0807e9f More fixes for pane-renaming in various scenarios (#6781) 2024-08-22 11:00:00 +03:00
Ofek 09fc2c1ca4 Final (?) pane-renaming fix (#6774)
Some major-ish fixes to tree and minor fixes in multifile-service.
This hopefully fixes #6770, #5734, and maybe others.
2024-08-21 23:42:26 +03:00
Ofek d83bb38f1a add paneName fallback to filename in editor.getPaneName() (#6773) 2024-08-18 09:57:13 +03:00
Ofek 12f6bfcc12 Make pane-renaming central (#6772)
When each `Pane` (and others) create their own `PaneRenaming`, which
extends `EventEmitter.EventEmitter`, when one actor emits `renamePane`
no other actor can hear it.

This PR makes `PaneRenaming` stop using its own event emission, and
instead use the central `Hub` it now receives at its ctor.
2024-08-17 22:51:11 +03:00
Ofek 4cdef67bba fix Alert (#6771)
All `Alert` modal windows reuse the same yesButton/noButton.
The callback are setup in the Alert ctor -
```
        const yesNoModal = $('#yes-no');
        yesNoModal.find('button.yes').on('click', () => {
            this.yesHandler?.();
        });
        yesNoModal.find('button.no').on('click', () => {
            this.noHandler?.();
        });
    }
```
On every yes/no click, *All* callbacks of *All* alert instances are
called.
So each `Alert` instance needs to cleanup its callbacks after usage, and
it tries to - via the weirdly named `toggleEventListener`.
`toggleEventListener` only did

```
element.off(eventName);
```
Some of the renaming problems were caused by persistance of [this
callback](https://github.com/compiler-explorer/compiler-explorer/blob/00648a7e1c38c9172c5226d1f64511b8bebfe1c9/static/widgets/pane-renaming.ts#L68-L72).
Extending the cleanup to -
```
        element.off(eventName);
        this.yesHandler = null;
        this.noHandler = null;
```
seems to solve it this particular problem - not even sure `element.off`
is even needed.
2024-08-17 22:50:46 +03:00
Ofek a99edaf5bf Fix opt-remarks / stack-usage font size in all themes - not just default (#6751)
Leftover from PR #6671
2024-08-04 16:11:37 +03:00
narpfel 3beeef8fe3 Implement more diff types (#6730)
Add support for diffing clang ASTs, LLVM IR, and Rust HIR, MIR and macro
expansions. These new options are only shown in the picker when the
compiler supports the respective output type (e. g. when diffing `g++`
output, there will be no item to select LLVM IR).

Because the specified output must be activated manually, this PR also
adds help texts so that the user isn’t shown an empty pane. E. g. when
diffing execution stdout but “Execute the code” is not checked, the diff
viewer will show “<activate 'Output...' → 'Execute the code' in this
compiler's pane>”.

Resolves #6726.
2024-07-29 22:19:59 -05:00
Christoffer Lerno a8b0030858 Add 0.5.5, 0.6.0, 0.6.1 C3 versions. Remove incorrect keywords from C3. (#6728)
<!-- 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!
-->
This updates C3 with 0.5.5/0.6.0/0.6.1 and removes some long gone
keywords. This also renames "0.4 -> 0.4.0" and "0.5 -> 0.5.0". The new
versions are in the infra pull request here:
https://github.com/compiler-explorer/infra/pull/1374
2024-07-29 21:21:03 -05:00
Ofek 9857667ad1 The 2s-delay experiment was never deployed... Restoring it 2024-07-24 14:43:41 -04:00
Ofek 89c33d9d70 After a 10 day experiment, decrease defaultDelayAfterChange back (#6719)
… to 1.5sec
2024-07-23 18:43:00 -04:00
Ofek 2055f087d5 Make scroll-up increase the font size and scroll-down decrease it (#6705)
Just feels more natural
2024-07-23 16:22:46 -04:00
Ofek 2aa1101a86 Increase defaultDelayAfterChange to 2s (#6703)
<!-- 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!
-->
2024-07-15 21:32:00 +03:00
OfekandAbril Rincón Blanco 68ebf251f8 Change the default delay before re-compilation from 750 to 1500 ms (fix #6669)
Co-authored-by: Abril Rincón Blanco <git@rinconblanco.es>
2024-06-29 23:44:09 +03:00
Ofek b8a3a12371 Stop fixing stack-usage/opt-remarks font size (#6671)
Setting font-size in css does not respond to resizing:

![badresize](https://github.com/compiler-explorer/compiler-explorer/assets/73080/ab19084c-c494-4932-a94c-17733e8da2e5)

I suspect (1) this is a monaco limitation (based on
[this](https://github.com/microsoft/monaco-editor/discussions/3717#discussioncomment-5190536)),
and (2) they're not keen on improving their font control (based on
[this](https://github.com/microsoft/monaco-editor/issues/2242#issuecomment-1433466832)).

Reverting the css fontsize makes it behave properly:

![goodresize](https://github.com/compiler-explorer/compiler-explorer/assets/73080/f337bd99-9239-4a0f-8a1d-9b96f52265ce)


@RubenRBS Sorry, I too preferred your idea of smaller decoration text.
2024-06-29 18:10:19 +02:00
Abril Rincón Blanco feb7b35754 Fix paneRenaming not affecting source editor (#6611) 2024-06-29 03:06:11 +02:00
Patrick Quist cdb59644cc Add build info for libraries (#6639) 2024-06-29 00:03:09 +02:00
Partouf 88e94c9e90 fix toast notication z-index 2024-06-21 02:59:31 +02:00
Matt Godbolt e91b5d12da Comply with some MS terms (#6627)
- Ensure MSVC license terms are clearly shown to the user.
- Simplify config of vc and vcpp slightly by extracting common stuff
into a group.
- Remove reference to MS privacy policy
2024-06-19 18:09:59 -05:00
Jeremy Rifkin f1421bbf89 Add C23 keywords to our C highlighting mode (#6604)
This PR adds new C23 keywords from
https://en.cppreference.com/w/c/keyword. I have some FUD about always
highlighting things like `bool`, since what most people think of as C is
not C23. I think ideally we'd be able to only highlight C23 keywords
when `-std=c23` is being used, but that of course makes things a good
deal more complex. But also, it probably makes sense to just go ahead
and highlight these.

Possibly related to #6568.
2024-06-19 14:30:37 -05:00
A. Rincón Blanco f63005116f Add a way to filter opt-pipeline passes (#6570) 2024-06-16 11:06:04 +02:00
Jeremy Rifkin 03cbf20c92 Update ansi dark colors (#6573)
This PR tweaks some of the ansi colors for dark themes. It's fairly
subtle overall, I mainly:
- Decreased brightnesses of green/cyan/yellow
- Desaturated purple/blue/red and made them a bit lighter
- Switched white to a slightly off-white

| old | new |
|---|---|
|
![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/edc17a12-fb8f-44e8-8111-f771d3591df0)
|
![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/b36e7244-f354-447a-841d-f0f17d99ed93)
|

Old:

![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/76e05892-3984-48fb-8e90-2a36f2e71107)

New:

![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/d7573514-2307-440a-babf-bed5c646e8fe)
2024-06-15 12:10:09 -05:00
Jeremy Rifkin fad25749a8 Remember scroll position on recompile (#6605)
This is a proposed fix for #6516
2024-06-15 11:50:21 -05:00
Jeremy Rifkin 7db4a4d253 Horizontal scroll the entire execution pane (#6606)
Fixes #6210
2024-06-14 20:40:41 -05:00
Ofek f886da7241 Add 'wrap lines' toggle to ir-view (#6595)
Mostly for rust - IR line length there can be legendary.

![irwrap](https://github.com/compiler-explorer/compiler-explorer/assets/73080/1d584ea2-3911-4592-867b-01793425f3e0)
2024-06-12 20:27:44 +03:00
Matt Godbolt 7bab098a7f Reinstate a missing line 2024-06-10 21:49:34 -05:00
Afonso BordadoandPatrick Quist c9ec0f2add Add webassembly language (#6429)
👋 Hey,

This PR adds support for the Webassembly Text Language (#1871).
Currently it only supports the
[wasmtime](https://github.com/bytecodealliance/wasmtime) compiler, but
it should be possible to add others (i.e. v8 / wasmer / etc...).

It looks like the monaco does not support the WAT language, so I've
added a simple mode for it, that is mostly copied from the clojure mode
with some changes. From what I've tested it seems to work reasonably
well.


![image](https://github.com/compiler-explorer/compiler-explorer/assets/1357143/9e38b28e-235c-47e5-a71e-50217e5d2056)

---------

Co-authored-by: Patrick Quist <partouf@gmail.com>
2024-06-10 21:33:57 -05:00
Jeremy Rifkin b940908b28 Use improved ansi colors for one dark pro (#6572)
![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/a18aceb9-b1e2-410c-8a8d-663ef063fdc6)
2024-06-10 21:33:56 -05:00
Ofek 7cc4e371ab Fix bad paste (#6555) 2024-06-10 21:33:56 -05:00
Ofek 05f49a59c7 Some extra safety, following sentry-caught exceptions (#6553)
This is the crash:
https://compiler-explorer.sentry.io/issues/5427865018/

Looking at [where these values are
populated](https://github.com/compiler-explorer/compiler-explorer/blob/2307e16fa485bf5d92dd28e0d88bfde9cf6d9b99/lib/base-compiler.ts#L2711-L2715)
my conjecture is that `BigInt.toString` failed and returned undefined /
null, but I see no documented conditions that can trigger this (maybe
[just for ridiculous
values](https://stackoverflow.com/a/75593358/89706)).
2024-06-10 21:33:55 -05:00
Ofek Shilon bce3a65d6d Add full-url capture for sentry messages triggered in front end 2024-06-03 22:11:52 +03:00
Ofek ca28aec7a8 Remove unused events filtersChange, requestFilters, some added types to BaseCompiler.compile (#6486)
Just some minor housekeeping.
2024-05-29 18:10:21 +02:00
Patrick Quist d2c7a5222e Local/Remote Execution environment (#6413) 2024-05-26 22:09:01 +02:00
Ofek 930ee1d4fc Fix and investigate weird exception in stack-usage-view (#6501) 2024-05-19 22:31:22 +03:00
Ofek 42533d8dbb Stop duplicating hasXXoutput + XXoutput (#6476)
When you need to check if `XXoutput` exists, check it directly.
+some TSification in CompilationResult
2024-05-14 20:11:09 +03:00
Ofek bcb397f56b Add noUnusedLocals to tsconfig + fix the new alerts (#6396)
<!-- 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!
-->
2024-05-14 18:46:22 +03:00
Ofek cf358fb075 Add 'wrap lines' button to opt-view (#6477)
![wrapopt](https://github.com/compiler-explorer/compiler-explorer/assets/73080/bcd63dff-5463-4822-944d-e426165b2987)

I thought I already added it but seems I didn't.
2024-05-14 10:57:51 +03:00
Ofek 2687f6a309 Make stack-usage display inline, same as opt-view (#6469)
Following the intention declaration
[here](https://github.com/compiler-explorer/compiler-explorer/pull/6393#issuecomment-2076787747):


![image](https://github.com/compiler-explorer/compiler-explorer/assets/73080/4c239691-07ac-4ab3-9745-43cf67dd5679)
2024-05-14 10:56:24 +03:00
Ofek 8559ea5937 Fix #6468: Don't trust hasStackUsageOutput/hasOptOutput (#6471) 2024-05-13 00:24:56 +03:00
Ofek Shilon 0741ec2fdc Fix: page refresh restores default code 2024-05-11 17:29:11 +03:00
Ofek 44d48dca16 Fix #6464: defend against empty saved layout (#6465)
Fix #6464, following the discord discussion.

2 protections are added here:

(1) Make the first code editor non-closable, to avoid an empty layout,
(2) If a loaded config has empty layout - fallback to the default
config.
2024-05-10 11:24:11 +03:00
Ofek b5dcb4bab0 Init optRemarks in ctor (#6463)
Fix #6460: trying to access an `undefined` this.optRemarks.

The order of opt-view.ts invocations at opt-view pane open is:
1. `constructor`,
2. `registerButtons`,
3. `onCompileResult`

If someone manages to click the filter checkboxes after (2) but before
(3), then `showOptRemarks` would be triggered before `this.optRemakrs`
is initialized and this exception would ensue. The solution here is to
initialize `this.optRemakrs` at the constructor.

Couldn't reproduce, the solution is entirely hypothetical. If it would
happen again we'll revisit this.
2024-05-09 20:26:08 +03:00
Jeremy c508d202d9 Update tooltip arrow color in one dark theme 2024-05-05 12:27:18 -05:00
Jeremy aa7fc9bd82 Fix un-needed scrollbars on tooltips 2024-05-05 12:23:38 -05:00
Ofek 9d8c503b3d Improve initialization of decorations in MonacoPane (#6426)
Make MonacoPane calls `createDecorationsCollection` in a single place
instead of forcing many subclasses to remember to call
`initDecorations`. Some subclasses never use DecorationsCollection and
call init for no reason now, but it still seems healthier - this avoids
the possibility of a MonacoPane subclass trying to use an uninitialized
decoration collection.

Also remove the depracated `deltaDecorations` from stack-usage-view.
2024-05-05 10:17:57 +03:00
Ofek 9f5906abf3 Fix inline opt-remarks: toggling a filter off did not remove the remarks from the display. (#6407)
No idea how this worked on my machine prior to submitting...
Anyway, fixed now.
2024-04-28 21:48:15 +03:00
Ofek f59bad3a7e Opt remarks: replace hover-over-sidebar display with inline text (#6393)
![inlineoptrem](https://github.com/compiler-explorer/compiler-explorer/assets/73080/6c306b3f-2256-4578-b1d3-beaa1494a083)
2024-04-25 12:37:57 +03:00