Commit Graph
1585 Commits
Author SHA1 Message Date
Mats Larsen 560d18c410 Temporarily patch Kotlin runtime execution (#3151)
Fixes the problem where any (reasonable) Kotlin JVM execution would fail with a NoClassDefFound error with kotlin.jvm.internal.Intrinsics.

The Kotlin execution is now packed into a jar with the Kotlin Standard Library and executed with java -jar.
2021-12-03 22:59:08 +01:00
Björn Gustavsson 12d27b59b7 Format the output file for Erlang in a nicer way (#3135)
For Erlang, format the output in the same way as the 'S' option
does. To achieve this, we use the `beam_listing` module, which is
undocumented but has been stable for many many years.
2021-11-24 08:30:34 -06:00
Marc Poulhiès 8a6701f3a1 Fix and refactor rustc-cg-gcc GCC dump (#3128)
Conflicting changes in #3109 and #3064 left the GCC dump of rustc broken.

Reapplied the changes and refactored how the -fdump-foo-pass= option is crafted.
Instead of using stdout, use an explicit file. Beware that this won't work with
older GCC version. Regular GCC is still using the 'dump all files' instead of
the targeted option, so it's not impacted by this limitation. Only rustc-cg-gcc
is currently using this mecanism and it's using a recent libgccjit.

Really fixes #2868

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2021-11-22 00:08:02 +01:00
Patrick Quist 2bc71691ef Erlang highlight and add to amazon (#3129) 2021-11-21 23:53:43 +01:00
Marc Poulhiès 0efd82d6a4 Fix linter error in erlang.js
Trivial linter error:
```
compiler-explorer/lib/compilers/erlang.js
  65:1  warning  More than 1 blank line not allowed  no-multiple-empty-lines

✖ 1 problem (0 errors, 1 warning)
  0 errors and 1 warning potentially fixable with the `--fix` option.
```
2021-11-21 19:15:27 +01:00
Timothy MooresandPatrick Quist 82772f4bbb add support for erlang to beam bytecode (#3094)
* add support for erlang to beam bytecode

* changed call by 'this' to overridden functions

* Update base-compiler.js

Co-authored-by: Patrick Quist <partouf@gmail.com>
2021-11-21 14:22:04 +01:00
Marc Poulhiès 177fee0739 Enable the GCC dump for the rustc using GCC backend (#3109)
Beware that the way it is working causes several dump files to be empty. The
list of potential files is based on `-fdump-passes` output, but during the
actual compilation, some passes may or may not emit something (eg. a passe may
not be executed at all because it's not applicable). The drop down list will
contain some dump names that will simply display message like:

   Pass 'cselim (tree)' was requested
   but nothing was dumped. Possible causes are:
    - pass is not valid in this (maybe you changed the compiler options);
    - pass is valid but did not emit anything (eg. it was not executed).

This is expected and until someone has a better idea, this will be the case :)

fixes: #2868
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2021-11-21 14:18:25 +01:00
Marc PoulhièsandNico Lehmann 20ebcf7417 Honour rustc flags when emitting MIR and emit both assembly and MIR in the same execution (#3116)
* Honor compiler flags in rustc MIR output view

* Refactor rustc/MIR execution handling

Apply the same receipe as for GNAT and GCC for minimizing the number of
executions for getting extra outputs (here MIR).

After discussions in #3107, the way the output files are created is also
changed to use the syntax `--emit KIND=PATH` (see
https://doc.bccnsoft.com/docs/rust-1.36.0-docs-html/rustc/command-line-arguments.html)

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>

* fixup! Refactor rustc/MIR execution handling

Co-authored-by: Nico Lehmann <nico.lehmannm@gmail.com>
2021-11-21 14:15:30 +01:00
Rubén Rincón Blanco f7d77bd07e Modify the path include guard to fix some false-positives (#3083)
Closes #3045
2021-11-21 13:45:50 +01:00
Marc Poulhiès bba925ae02 Show GNAT expanded code pane even in case of compiler error (#3121)
Even when the compiler exits with an error, try to display the expanded
code.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2021-11-21 13:26:27 +01:00
Marc Poulhiès 4e96bfb776 Filter fdump-passes output from stderr before displaying (#3115)
The refactor from #3024 left all the output from -fdump-passes in
stderr. Filter it out before displaying it in the output pane.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2021-11-21 13:26:12 +01:00
Marc Poulhiès 88d58f9fe2 Refactor GCC dump and GNAT expanded code creation (#3064)
Instead of having a dedicated invocation of the compilers, inject needed options
in the main compilation command and do everything in one run. This should fix
GNAT race condition on ALI file, save some CPU time and make the latency a bit
better. This can work as long as everything can really be done in one run (eg.
no incompatible options, no clash on stdout/stderr).

Add optionsForBackend in base compiler class that is meant to be overloaded by
compilers for injecting options based on current backend options. Use it for
GCC dumps (BaseCompiler) and GNAT expanded code.

Fixes #3041
References #3029

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2021-11-16 21:09:18 +01:00
Nico Lehmann 19159930b5 Remove trailing whitespaces
Reviewed-by: Marc Poulhiès <dkm@kataplop.net>
2021-11-13 18:29:23 +01:00
Marc PoulhièsandRubén Rincón Blanco 6f18695dc0 Refactor GCC dump handling (#3024)
This change allows for only dumping a single pass (the one selected). In order
to populate the list of available dumps, it now queries GCC for the enabled
passes.

It can still be misleading to users as a pass can be enabled but for some reason
does not dump anything. In order to avoid this, the only solution seems to be to
still dump all files and filter the list... This defeats the initial goal and
only adds complexity for the current compilers.

But this makes #2868 easier to implement (see #2985 that was a aborted first
attempt) and if someday another libgccjit-based compiler is added, it could be
easily hooked to this.

It also changes the naming in the drop down menu. For example, instead of :
'009t.omplower' it now uses 'omplower (tree)' (ie.
'<pass-name> (tree|ipa|rtl)').

Fixes #3014

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>
2021-11-08 18:52:30 +01:00
RabsRincon ed0609bb90 Avoid null error if asm line is somehow missing 2021-11-08 17:42:35 +01:00
Mats Larsen 27b3c5ec20 Set Java default encoding to UTF-8 (#3096)
The default encoding used for Java is now UTF-8. This did not have to be changed for the Scala or Kotlin compilers as those already default to UTF-8
2021-11-04 17:15:21 +01:00
Matt Godbolt cf7d70402e Await for things (#3086)
* Await for things

We had a number of things that aren't await()ing their promises.
That led to non-deterministic compiler settings like Intel support.
I used the IDE to find them all and fix the ones that I thought looked
important.

More generally we should use tslint (once we're all typescript) to
ensure this more generally. I tried the eslint equivalent but it
either overreacted or didn't catch anything.

Closes #3085
2021-10-31 15:31:45 -05:00
Mats Larsen c9542a2c1a Implemement backwards compatability for Format API after #2957 (#3066)
* Implement fix for #3065

* Address review comments

* Undo accidental formatting
2021-10-30 15:40:34 +02:00
RabsRincon 8886821da4 Add a way to ensure no tracking is done and now 3rd party is available 2021-10-26 20:31:38 +02:00
Justus H 3d573e4b79 Fix IAR EWB implementation to work on Linux and tweak its ARM support (#3028)
* Fix path regex in IAR EWB asm parser to work with Linux paths

Currently the regex only supports Windows paths. This commit updates
the regex so that it works with Windows as well as Linux paths.

* Improve ARM support in IAR EWB asm parser
2021-10-22 08:55:13 -05:00
partouf 08611becc6 fix tools for prediscovered compilers 2021-10-22 13:00:42 +00:00
partouf c8569b8e4c fix tool includeKey things 2021-10-19 21:45:54 +00:00
partouf 8383b64d94 fix props lambda 2021-10-19 19:51:48 +00:00
partouf 730f1b8f0c bugfix tools 2021-10-15 18:00:50 +00:00
Patrick Quist 1ca884c367 Seperate compiler finding process (#3022) 2021-10-15 18:22:33 +02:00
Marc PoulhièsandMats Larsen 9b46d4f1fd Initial support for GNAT specific debug output (#3000)
This change only gets the GNAT Debug expanded generated code (-gnatD).

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Co-authored-by: Mats Larsen <me@supergrecko.com>
2021-10-13 19:59:26 +02:00
Bhavin Ag 26f8357627 refactor: replace underscore each usage with native for of (#3012)
* refactor: update underscore each usage to native iterations
* refactor: replace object.entries with for of
2021-10-08 07:50:27 -05:00
Mats Larsen 63b3c90dc2 Add Go formatting with Gofmt (#2966)
Fixes #1009

Supports formatting go code, using gofmt as backend.
2021-10-05 15:41:16 +02:00
Austin Morton 810134942d Avoid calling compilerProps after compiler object construction (#3005) 2021-10-04 23:21:32 -05:00
Marc Poulhiès e104811b6b Enable GCC dump for the GNAT Ada compiler (#2989)
* Enable GCC dump for the GNAT Ada compiler

GNAT is part of GCC and can handle the regular GCC options for dump files.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2021-10-04 22:43:49 -05:00
Mats Larsen 87ed92ac0a Implement LLVM IR output for ispc (#2972) 2021-10-04 21:55:06 -05:00
Rubén Rincón Blanco b6338e0897 Adds supportsExecute language option (#2963)
* Adds supportsExecute language option

It's recalculated every time the compilers change
2021-10-04 21:47:29 -05:00
Jason ZhengandPatrick Quist d103b7f362 Add support for generating SPIR-V assembly from OpenCL C and C++ for OpenCL (#2940)
* Add support for generating SPIR-V assembly from OpenCL C and C++ for OpenCL
* Update cpp_for_opencl.amazon.properties
* Update openclc.amazon.properties

Co-authored-by: Patrick Quist <partouf@gmail.com>
2021-10-04 21:43:07 -05:00
813b654a3e Show full java asm output when using switch expression (#2996)
Fixes #2995 

Co-authored-by: Maurice Mohlek <maurice.mohlek@valtech.de>
Co-authored-by: Mats Larsen <me@supergrecko.com>
2021-10-05 01:21:50 +02:00
Matt Godbolt f71e3c4997 Unconditionally use the compilation queue (#2978)
* Unconditionally use the compilation queue and re-enable MS compilers

* Always use the compilation queue, which ensures we don't
  execute more native apps thn are configured, especially while
  we're starting up.
* Guard the compilation queue from enqueueing stuff that was
  already executing in a queue context. This is to prevent deadlock
  though it's not always a problem (it's only if the caller awaits
  the job, which is often the case).

Should mitigate the issues we had on Sep 30 2021, where nodes were
having trouble starting up due to the large amount of JVM-based
compilers. See #2977
2021-09-30 22:42:23 -05:00
Matt Godbolt 4e75139484 Another attempt at speeding up the regex 2021-09-27 22:46:03 -05:00
Matt Godbolt a75fe0986b Improve the regular expression used to parse conditionals.
https://github.com/compiler-explorer/compiler-explorer/security/code-scanning/16?query=ref%3Arefs%2Fheads%2Fmain
2021-09-27 21:56:32 -05:00
Mats Larsen 97134a9813 Fix linting errors from #2932 2021-09-27 10:03:22 +02:00
Mats Larsen 278d28b313 Add rustc Macro Expansion view (#2932)
Adds a new pane for producing the macro expansion of Rust code compiled with rustc.
2021-09-27 00:33:09 +02:00
Mats Larsen e7b9cbda91 Respect tab width and tabs/spaces settings for format APIs (#2957)
Site settings for tab width and tabs vs spaces are now being used when sent to the /api/format APIs.

This patch also includes some tiny internal refactoring on the bits related to the formatting API.
2021-09-26 23:56:39 +02:00
Patrick QuistandRabsRincon c3a72742b3 Remove user-agent dependencies and add some extra metadata stuff (#2943)
* lintfix

* dont look at user agent to escape things

* Clean my old code a tad

* Fix lint error

* some more metadata options and tests for it

* refactor underscore calls

Co-authored-by: RabsRincon <ruben@rinconblanco.es>
2021-09-17 20:14:53 +02:00
Mats Larsen 8c852d90fa Rename CUDA to CUDA C++ in language dropdown (#2938) 2021-09-15 16:11:01 +02:00
partouf eda7397668 add .ixx to c++ extensions 2021-09-13 21:12:45 +00:00
partouf 8cd9aaf85a oops 2021-09-13 20:24:46 +00:00
partouf 04f39e2e8e bugfixes pascal objdump 2021-09-13 20:20:21 +00:00
partouf 6919532473 bugfixes cmake inputFilename 2021-09-13 19:56:56 +00:00
Patrick Quist e24f724e47 Options cleanup (#2924)
* getting rid of compiler.libs

* old widget no longer needed

* move supportedLibraries code to base-compiler

* bugfix

* oops

* grmbl

* bugfix remote msvc compilers
2021-09-13 20:22:39 +02:00
bc6757ae94 Pascalchanges (#2881)
* Changes to allow Program (vs Unit) in Object Pascal

* add possibility of dpr

* more flexibility with pascal filenames

* lintfixes

* i have no idea what im doing

* apply changes to pascal-win

* pascal fixes

* pascal projectfile changes

* work in progress

* bugfixes

* bla

* bugfixes

* mostly working

Co-authored-by: paul mcgee <paul.mcgee.8@bigpond.com>
Co-authored-by: Paul McGee <paulmcgee1969@gmail.com>
2021-09-13 20:22:27 +02:00
Patrick Quist d6081f5bda support cmake for fortran (#2930)
* support cmake for fortran

* fortran compiler flags
2021-09-12 02:43:36 +02:00
Patrick Quist 27136f3e1d Clean trunk and execution (#2916) 2021-09-04 20:55:49 +02:00