2451 Commits
Author SHA1 Message Date
cor3ntin afd95a2de4 Highlight module-related keywords (#6155)
These keywords are contextual but the rules are non-trivial so we should
treat them as keywords (like final and override)
2024-02-18 15:38:16 -06:00
Patrick Quist 9c5a6d3d95 Clang time trace support in execution pane (#6139) 2024-02-14 19:09:31 +01:00
Fábio de Souza Villaça Medeiros f855e93fd5 Update Hook syntax (#6113) 2024-02-12 21:56:17 -06:00
Marc Auberer 54dda76f22 New language: Spice (#6105)
Add support for the Spice programming language.

Spice (`spicelang`) is a simple, AOT compiled, LLVM-based systems
language with focus on practicality and performance.

**Key features of Spice**
- simplicity - see what you get aproach with batteries included
- performance: As Spice uses LLVM as its primary backbone, it competes
with the performance of other LLVM-based compilers
- enhanced safety: Spice implements an enhanced safety mechanism, which
includes builtin heap type with auto-free and more
- cross-compile support: Currently x86_64, AArch64 and wasm32 are
supported cross-compilation targets, but more to come
- Pretty good C and C++ interop

**Links**
- Source code: https://github.com/spicelang/spice
- Website: https://spicelang.com
- Playground (own CE instance): https://play.spicelang.com
- Infra PR: https://github.com/compiler-explorer/infra/pull/1229

**Things this PR addresses**
- General support for Spice
- Three code examples
- Spice mode (Syntax highlighting)
- Opt pipeline support
- LLVM mca and osaca support
2024-02-12 21:50:33 -06:00
Jeremy Rifkin a049dab662 Fix issue with compiler picker group sorting (#6030)
This restores the sorting behavior for the compiler picker to about two
years ago before the ts conversion. I'm not sure what the effect of
`.localeCompare() === 0` on .sort is, since that's only giving equality
information. The `@types` for underscorejs says `_._Chain.sort`'s
compare function should return a boolean but I can't actually find the
definition of any `sort` function in underscorejs nor are there docs
about what its compare function should return, but I think it's really
calling `Array.prototype.sort` which expects a negative/0/positive.
2024-02-05 20:45:37 -06:00
Patrick Quist 004f3f4006 fix missing createEditor changes (#6099)
Fixes #6088 

Changes the createEditor implementations that were missed in
https://github.com/compiler-explorer/compiler-explorer/pull/6078
2024-02-05 21:10:50 +01:00
Matt Godbolt bba64c6b94 Update; apply lint/format (#6085) 2024-02-04 14:45:04 -06:00
Ofek d2ee6e18a5 Replace the deprecated monaco.editor.ICodeEditor.deltaDecorations (#6078)
Replace the deprecated `monaco.editor.ICodeEditor.deltaDecorations` with `monaco.editor.IEditorDecorationsCollection`

Seems that today the official way of colouring monaco editors is having
them `createDecorationsCollection`, keep the resulting
decorations-collection and call `set` on it with new decorations
whenever needed.
There are many possible design choices on where to put it, I opted to
put `editorDecorations` in `MonacoPane`, and have
`MonacoPane.createEditor` initialize it only in panes where decorations
are actually used.
Also some signatures changed which had a broad (but non-interesting)
impact.
2024-02-04 18:12:53 +02:00
Ofek Shilon 02f455aee5 Fix #5801 per the suggestion in the issue discussion 2024-02-03 18:43:54 +02:00
Ofek Shilon b665dbd7ed Capture additional info on asm tokenization errors 2024-02-03 15:22:34 +02:00
Ofek Shilon 266706f4c4 Revert "Remove usage of the depracated monaco.IEditor deltaDecorations (#6049)"
This reverts commit 9705843bb7.
2024-01-30 14:25:59 +02:00
Matt Godbolt 61b979cd58 Update all the minor packages; reformat and bump (#6064)
Formats all the things too.
2024-01-29 21:37:48 -06:00
Ofek 9705843bb7 Remove usage of the depracated monaco.IEditor deltaDecorations (#6049)
…in favor of createDecorationsCollection.
Minor drive-by cleanups.
2024-01-27 17:02:21 +02:00
Ofek 836dfc875c Fix #5948 per the suggestion in the issue discussion (#6048)
<!-- 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-01-26 17:15:38 +02:00
Ofek 163605aca0 Fix #5126: fix event_hub.mediateDependentCalls (#6031)
Pane contents are populated by `<pane>.onCompileResult`, triggered by
`eventHub.emit('compileResult'..)` in `compiler.ts`.
The contents' colors are updated by `<pane>.onColours`, triggered mainly
by `eventHub.emit('colours'...)` invoked indirectly by
`editor.onCompileResult`. (colors are an editor property).
The order of invocations is governed by the order of registration and is
hard to control, and so a mechanism was devised to cache `onColours`
arguments and invoke it only after `onCompileResult`:
`mediateDependentCalls`:

https://github.com/compiler-explorer/compiler-explorer/blob/ab937c5d151807eeff8d0735ca999ae36ff10392/static/event-hub.ts#L93-L116

It is coded as a generic mechanism but used only for this
color->compileResult dependency in ir-view and ast-view.

I imagine this worked for a while, but somewhere along the line
triggering of events got messier - there are now multiple compilation
runs that generate different contents, and the `mediateDependentCalls`
logic breaks for some triggering orders, eg: dependent -> dependency ->
dependency. (note how

https://github.com/compiler-explorer/compiler-explorer/blob/ab937c5d151807eeff8d0735ca999ae36ff10392/static/event-hub.ts#L104
prevents `dependent` from being called after the last `dependency`
call).

This PR fixes `mediateDependentCalls` to make it call `dependent` with
its _latest_ arguments after _every_ `dependency` call.

This brings color back to IR and to AST. Until a few days ago I wasn't
aware they were already colored in the past, and I suspects others
weren't aware either:
https://github.com/compiler-explorer/compiler-explorer/issues/5475#issuecomment-1714699031
2024-01-21 10:25:25 -06:00
Jeremy ab937c5d15 Revert "Fix issue with compiler picker group sorting"
This reverts commit 3441e45beb.
2024-01-20 21:19:05 -06:00
Jeremy 3441e45beb Fix issue with compiler picker group sorting 2024-01-20 21:18:32 -06:00
Patrick Quist a98fb47278 Fix bug when loading zip file (#6020)
Fixes #6019
2024-01-17 16:56:55 +01:00
Matt Godbolt 4256d42916 Various updates (#6007)
Even more mechanical updates.
2024-01-15 18:31:46 -06:00
Ofek 21fe5523c0 Since ES6 there's no reason to use underscores map and filter (#5989)
Mindless replacements of the form 
`_.filter(options, option =>...`  --> `options.filter(option =>...`.

One not *entirely* mindless replacement at the bottom of
compiler-dropin-tool.ts :
```
-        return _.filter(pathFilteredFlags) as string[];
+        return pathFilteredFlags.filter(Boolean) as string[];
```
6 files can now stop importing underscore.
2024-01-13 18:35:11 +02:00
Ofek bd7ed1a10c Fix #5847 but seriously this time - addition to PR #5882 (#5980)
The previous fix applied only to runtime-tools.
2024-01-12 22:10:58 +02:00
Matt Godbolt 758475b82a Update all the things (#5958)
Not updating `chai` as stuff breaks, but everything else...
2024-01-08 21:19:31 -06:00
Ofek 7e8d8c1459 Fix #5883: the default maxOptions=50 isn't enough (#5884) 2023-12-16 14:10:55 +02:00
Ofek f8dd324af3 Fix #5847 : allow equal-chars while parsing env vars (#5882) 2023-12-15 21:50:21 +02:00
Matt Godbolt 1c23ecc2aa Attempts at getting the sponsors less clippy. Shifts the community motd to the left though 2023-12-13 22:49:20 -06:00
J. Ryan Stinnett 43bdf65d54 Customise opt pipeline language by compiler (#5880)
This allows each compiler to override the default Monaco language used
by the opt pipeline view.
2023-12-12 00:54:43 -05: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
Ofek cce6125929 Fix #5820 (#5831)
The same dropdown glitch described in the bug happens for the compiler
selection dropdown. This addresses both.
2023-12-10 14:06:45 -06:00
Matt Godbolt aa786bd0ef Update deps, format, lint, bump workaround version 2023-12-03 17:30:50 -06:00
Ofek a33f77ab06 Fix #5799 (#5800)
This works and seems reasonable - some intersections might be
unavoidable and we wouldn't want to throw the entire graph away if it
happens.

...But I don't really know what I'm doing, as so far I failed to track
internal `GraphLayoutCore` logic.
@jeremy-rifkin would appreciate if you could take a look.
2023-12-03 13:00:59 -05: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
Jeremy Rifkin c02f94233e Add LanguageConfiguration for llvm ir (#5825)
The main point of this is to make ctrl+/ work, also added an entry to
llvm.defaults.properties
2023-11-30 17:52:17 -05:00
Jeremy Rifkin b134451b7d Add gimple front-end syntax option for gcc tree/rtl viewer (#5816)
This PR adds an option to the gcc tree/rtl dump viewer to dump syntax
that the gimple frontend can accept


![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/4a5ff503-9420-4fc3-ba6f-6b1dc196e938)
2023-11-29 09:42:38 -05:00
David Spickett 4fff49c7b1 Improvements to the display of Overrides favourites (#5758) 2023-11-29 03:10:07 +01:00
David Spickett 17a6aa7480 Disable buttons for favorite overrides that are incompatible with the current compiler (#5748) 2023-11-29 03:05:08 +01:00
Matt Godbolt a7e6ec61e3 Bump remaining deps (#5781)
And reformat everything.
2023-11-20 22:04:57 -06:00
Matt Godbolt af532ddf8d Bump to latest tom-select. Thanks @oyejorge (#5779)
Worked just fine in local testing!
2023-11-20 21:44:10 -06:00
Ofek a1d8570b55 Fix #5463 (#5732) 2023-11-11 13:45:34 +01:00
Ofek ec0e9b4f9b Use Sy's correct name (#5733) 2023-11-10 22:43:38 +01:00
Johel Ernesto Guerrero Peña 3ed3b0eb06 feat: update grammar of Cpp2 (#5727) 2023-11-10 11:30:39 +01:00
Patrick Quist d5fd1ae3a7 Fix shared state close issue (#5725) 2023-11-10 00:13:53 +01:00
Patrick Quist 455d92916a Execution with heaptrack (#5644) 2023-11-07 23:59:40 +01:00
Rubén Rincón Blanco 45baa0b2a6 Fix z-index of toasts in Boostreap 4 (#5719) 2023-11-07 14:52:03 +01:00
Ofek f9c022c374 Fix #5247 (#5665)
<!-- 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-10-30 15:41:16 +01:00
partouf 0ead74ec8a formatting 2023-10-24 17:18:59 +02:00
David Spickett 5f3db78dce Add the LLVM TableGen language (#5629)
LLVM TableGen is used to generate complex output files in the llvm
project. A generic description of classes and definitions produces
"records" that can then be walked by a TableGen backend to produce
things like C++ code, configuration files, etc.

The biggest examples are LLVM's assembler and disassembler where all the
targets' instructions are defined in TableGen.

https://llvm.org/docs/TableGen/ProgRef.html

An example:
```
class Register<int _size, string _alias=""> {
    int size = _size;
    string alias = _alias;
}
def X0: Register<8> {}
def X29: Register<8, "frame pointer"> {}
```
```
------------- Classes -----------------
class Register<int Register:_size = ?, string Register:_alias = ""> {
  int size = Register:_size;
  string alias = Register:_alias;
}
------------- Defs -----------------
def X0 {        // Register
  int size = 8;
  string alias = "";
}
def X29 {       // Register
  int size = 8;
  string alias = "frame pointer";
}
```

It's often a pain point for people new to LLVM so having a quick way to
experiment would be a great benefit for the community (we have a Jupyter
kernel which is good but not as simple as Compiler Explorer).

The compiler for TableGen is `llvm-tblgen`. This comes with most release
builds of LLVM in /bin along with clang and the others. Its default is
to output a text dump of the records defined so that's what I've used
here. This is not executable code so I've disabled the features related
to that.

A user could pass options to `llvm-tblgen` to produce text in a format
other than this, C++ code or JSON for example. However this text dump is
the main use case.

I've re-used an existing clang install, since that includes
`llvm-tblgen` in `bin/`. I just added the 17.01 version for this first
change.

Syntax highlighting is a mix of the Fortran and Ada configuration,
following the language spec I linked above. Though I am very new to that
so it is likely incomplete.
2023-10-23 19:59:46 -05:00
Ofek a5d77e7843 Fix #5552 (#5636)
#5552 boils down to a state where `CompilationResult` has `stderr` but
no `stdout` - which seems reasonable given the input (the compilation
wasn't even run). This causes these lines to break:

```ts
    addOutputLines(result: CompilationResult) {
        const stdout = result.stdout;
        const stderr = result.stderr;
        for (const obj of stdout.concat(stderr)) {   // <-----stdout is undefined
```

This is an attempt to make only `stdout` (not `stderr`) optional, and
account for it being undefined in this context. Feedback is welcome.
2023-10-23 15:31:28 -04:00
Johel Ernesto Guerrero Peña 2de088e691 feat: update grammar of Cpp2 (#5605) 2023-10-22 12:19:52 +02:00
The Phantom Derpstorm c6d3fa61ef ✨ Allow #embed file replacement and preserve eol-tokens (#5600) 2023-10-21 19:27:15 +02:00
Nick DeMarco 58ee2354be Add Hylo support (#5622)
This PR adds front end support for the
[Hylo](https://www.hylo-lang.org/) programming language. Back end
support has already been added with
https://github.com/compiler-explorer/misc-builder/pull/71 and
https://github.com/compiler-explorer/misc-builder/pull/72.
2023-10-18 12:07:38 -05:00