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.
* Fix loading a project
Chrome DevTools suggest that `.map()` does not exist here. I think that the right one is `.forEach()`.
https://stuk.github.io/jszip/documentation/api_jszip/for_each.html
* Remove `Promise.all()`
`zip.forEach()` does not return a value, hence waiting on it does not make sense.
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.
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>
in the *.defaults.properties files:
- remove x86-64 from gfortan, because use of native and not specific a.
- add .x to major version of gcc compilers,
because release of multi minor versions for GCC (see c++ config)
Co-authored-by: Sven Johannsen <s.johannsen@bretgeld-engineering.de>
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.
```
* 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>
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>
* 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>
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>
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>
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>
The formatter-registry will now use the site settings when querying the Format API. For compilers that do not support multiple styles, __DefeaultStyle is passed.