Commit Graph
1536 Commits
Author SHA1 Message Date
Patrick Quist 27136f3e1d Clean trunk and execution (#2916) 2021-09-04 20:55:49 +02:00
HazandRubén Rincón Blanco b3628b2c31 OCaml Improvements: objdump and a few refactorings (#2913)
* OCaml properties fixes

- Improve defaults by adding local and system versions
  - Make no assumptions about whether local and system are the same
  - Enable OPAM workflows which rely on updating PATH
- Fix version flag
- Fix objdumper

* OCaml output refactoring

* Add an arg parser for OCaml

Derived from Pascal (for now)

* Rename default OCaml compiler ids

* Add alias of old OCaml default compiler id

Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>
2021-09-03 05:51:15 +02:00
Kevin Adler 44c5162add Add support for Microsoft Visual C++ 6 (#2907)
A new compiler type 'win32-vc6' has been added, which uses a slightly
modified version of asm-parser-vc to handle assembly output differences
from current Visual Studio output.

In particular, MSVC6 does not output a comment line containing the
function's compile flags prior to the function body. The win32-vc parser
uses this to identify the start of a function and initialize
currentFunction. Instead, we use the regex that identifies a function
name to do this. Otherwise, a TypeError occurs trying to set
currentFunction.name when currentFunction is null.

In addition, MSVC6 only outputs a file comment once (presumably, until a
function from a different file is output). So instead of initializing
currentFunction.file to undefined, it is set to currentFile instead.
This should get set on the first function found in the file, but if not
it is initialized to undefined, so the behavior there would be the same.

Finally, the _DATA and _TLS segments are handled as well as some
additional miscellaneous directives.
2021-09-01 07:50:26 -05:00
Patrick Quist 31050a81ac Cmakeproms (#2906)
* new counters for cmake and bugfix executeCounter

* bugfix execution counter

* bugfix for when switching language
2021-08-31 17:46:21 +02:00
Patrick Quist 22304af44e new counters for cmake and bugfix executeCounter (#2905) 2021-08-31 16:39:55 +02:00
Patrick Quist b744d6ad9e Asm-parser binary bugfix (#2904)
* unittests

* extra label definition screws up logic

* fix test
2021-08-31 14:07:23 +02:00
partouf 9d382eb03e bugfix mainsource detection 2021-08-29 13:11:15 +00:00
Mats Larsen cfff740283 Fix execution for Java with multifile ui (#2882)
* Fix execution for Java with multifile ui

* Remove dev comment
2021-08-28 14:39:02 +02:00
RabsRincon 955e500cea Make asSafeVer even safer for more types of inputs 2021-08-28 02:55:33 +02:00
RabsRincon 0b75857df3 Only focus on the first word of semver for ordering
Helps with #2860
2021-08-28 02:40:05 +02:00
Patrick Quist 27d29d991a allow .f fortran file 2021-08-27 20:36:45 +02:00
Patrick Quist 5e5e60159a Multifile/IDE mode (#2725) 2021-08-26 21:57:07 +02:00
Rubén Rincón Blanco aab1e8cbaa Add chibicc (#2873)
I think this should not be a nightly install but a target for every
commit
2021-08-26 18:13:28 +02:00
Mats LarsenandMatt Godbolt 53b9e0ac59 Support multiple formatter types for /api/format (#2818)
* Make /api/format handle multiple formatter types
* Ignore preferred style if the formatter is a 'one true style' formatter
* Add tests for base formatter
* Document /api/formats and /api/format/<formatter> usage
* Document adding a new formatter
* Update amazon config

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2021-08-24 18:46:38 -05:00
Matt Godbolt 019029c070 Support execution and binary mode in haskell. Closes #2854 2021-08-14 13:06:26 -05:00
Haz 60db8ba531 Make OCaml examples executable and objdumpable (#2853)
Changes:

- ocaml.default.properties:
  - add the relevant flags for execution and emitting binaries
  - add nicer version number reporting
  - let CE know `objdump` can be used on ocaml objects

- ocaml.js:
  - update optionsForFilter for both executable and object handling
  - override the getter for executable to work within ocamlopt context
2021-08-14 13:03:13 -05:00
Mats Larsen b6c2380c56 Assembly API documentation for Java Bytecode (#2817)
* Add assembly documentation endpoint for Java bytecode
* Upstream asm docenizer for Java
* Remove jvms.html from gitattributes as it is never checked into vcs
* EOF line for docenizer-java.js
* Use find-node to locate nodejs
* Format code according to style guide
2021-08-14 12:56:33 -05:00
ca017bac31 Add support for heterogeneous compute (#2836)
* Extract device code from assembly files.

This commit by itself does not actually add any viewing panes for the
extracted device code, nor does it provide any means to provide
device-specific postprocessing steps.

* Add a rudimentary device view.

This doesn't handle multiple device outputs correctly at the moment, and
it provides no opportunity to view device code differently from
non-device code for now.

* Lint issues

* Some more WIP getting it working.

* Add device extraction code

* More fixes, and keep state

Co-authored-by: Joshua Cranmer <joshua.cranmer@intel.com>
Co-authored-by: Patrick Quist <partouf@gmail.com>
2021-08-14 12:53:22 -05:00
RabsRincon 565a4f7b48 Actually fix Windows options-handler tests for realsies now 2021-08-13 06:11:32 +02:00
RabsRincon 9a1c83d34e Change some _.bind(fn, this) to fn.bind(this) 2021-08-13 05:41:59 +02:00
RabsRincon 16ff1a8a4b Add api/version and api/releaseBuild GET endpoints 2021-08-13 05:31:40 +02:00
Haz 4d3750bef3 Override default compiler flags for OCaml (#2849)
Fixes github issue #2848
2021-08-11 23:02:21 +02:00
Rubén Rincón Blanco 387c75a1d7 Adds configs for nsjail cfg and firejail profile paths (#2846)
* Adds configs for nsjail cfg and firejail profile paths

As suggested by @apmorton

Issue #2845

* Add & improve exec tests with new config changes

* Remove stub. Exports are inmutable so no replacing the internal calls

* Resort back to calling the mapping function in the tests too

* But don't call it in the one function that is testing it

* Expand reach of .local gitignore

* Address @apmorton PR review

The tests are now a mess, so I won't merge,
 just in case I get shown how to do it properly
2021-08-11 06:38:04 +02:00
RabsRincon 3593ddb4a7 Add doc support for MOVBE amd64 instruction
It also improves the code a bit, and automates the patching of #2380

Closes #2819
2021-08-04 10:54:09 +02:00
Patrick Quist 508d6045a3 lintfixes 2021-07-31 20:28:01 +02:00
Joachim Schmidt 4c0711be78 Update to latest zig trunk (#2832)
Unused function parameters (used in the custom panic handler) are now
compile errors.
2021-07-31 20:21:44 +02:00
Quinton Miller 7e1835fa0f Add support for Ruby (#2816) 2021-07-30 16:29:37 -04:00
Michał Cichoń 2930b0cec2 Add support for Intel asm syntax (#2824) 2021-07-28 22:36:33 -05:00
RabsRincon d6c5752852 Reassign my copyright to Compiler Explorer Authors 2021-07-27 06:03:54 +02:00
Michał Cichoń 3bce751739 Add support for Circle (https://www.circle-lang.org/) (#2808)
* Add support for circle-lang (closes #1845)
* Add circle-128 version.
* Support keywords starting with @ (thanks Matt!)
2021-07-25 21:26:00 -05:00
Mats Larsen 92884e0151 Add rustfmt as code formatting tool for Rust (#2798)
* Rustfmt for Rust
* Modify amazon config to include rustfmt with tools installed by infra
* Tag rustfmt version in amazon.properties
2021-07-25 10:34:48 -05:00
Mats Larsen 9b11050c5c Remove invalid todo comment and fix rustMir button toggling (#2806) 2021-07-24 12:42:27 -05:00
Mats Larsen aa431e1336 Add rustc MIR output view (#2795)
* Add Rustc MIR representation view
* Enable MIR view for rust-cg-gcc
2021-07-24 10:56:06 -05:00
Tom Ritter ff75d02bec Allow a tool to have a separate monaco editor for it's stdinput (#2785)
* Allow a tool to have a separate monaco editor for it's stdinput

* Fix bugs identified during code review.

 - Selection wasn't being persisted in state.
   Needed to do some kind of ugly things to make this work...
 - Closing and re-opening the panel wasn't persisting the input!
 - getToolInputViewWith -> getToolInputView
 - remove _currentDecoration
2021-07-24 09:12:05 -05:00
Matt Godbolt 25f48a89a0 Reassign my copyright to Compiler Explorer Authors 2021-07-24 08:46:18 -05:00
RabsRincon db6626e3e8 Reassign my copyright to Compiler Explorer Authors 2021-07-24 00:51:34 +02:00
Matt GodboltandRabsRincon d52a1318f8 Treat data definitions in the middle of functions as "strong" (#2792)
* Treat data definitions in the middle of functions as "strong"

Things like ARM jump tables put important data inline within a function. Such
data should be treated as a "strong" reference (e.g. a root use). For example:

```
        sub     r3, r0, #65
        cmp     r3, #19
        ldrls   pc, [pc, r3, asl #2]
        b       .L7
        .word   .L8
        .word   .L7
        .word   .L6
        .word   .L7
        ....etc...
.L7: some things
.L8: some other things
```

Without this change, the `.L8` label would be dropped as unused. But it's implicitly used
by the sequence of `.word`s in the middle of the function.

Closes #2788

* Keep curly bracket style of existing if-else block

Co-authored-by: RabsRincon <ruben@rinconblanco.es>
2021-07-22 14:12:54 -05:00
Matt Godbolt 625732bf73 cproc tweaks 2021-07-19 22:56:45 -05:00
Marc Poulhiès 040115eaf5 Support cproc C11 compiler (#2787)
Add support for cproc C11 compiler.
cproc is a lightweight compiler using the QBE backend.

Fixes #2755
2021-07-19 22:24:46 -05:00
Artem Belevich 115cbf3817 Add support for HIP compilation for AMD GPUs. (#2759)
* Added support for HIP compilation for AMD GPUs.

At the moment it only supports stand-alone compilation w/o ROCm SDK.

* Enable barebones HIP compilation.

Clang by itself is good enough to compile simple kernels that do not need ROCm
SDK headers and bitcode libraries.

Closes #2760
2021-07-19 21:55:23 -05:00
Rubén Rincón Blanco f3acbc972a Adds .hidden for libraries (#2780)
* Adds .hidden for libraries
* Add test for new hidden property
2021-07-19 21:53:54 -05:00
Quinton Miller 9829915b27 Improve handling of Crystal's quoted labels (#2789) 2021-07-19 21:51:43 -05:00
RabsRincon e0c5a73f0b Adds toggle for full compiler version output
Thanks to @JohanEngelen for suggesting it, almost a year ago :/

Closes #2298
2021-07-16 00:18:27 +02:00
Jason Zheng 18a03e5577 Add C++ for OpenCL language (#2771) 2021-07-13 09:24:13 -05:00
Marc Poulhiès f000d51ad0 Adding rustc-cg-gcc (#2746)
GCC backend for rustc is still in a very early state.
It is in the process of being merged in main rustc source:
https://github.com/rust-lang/compiler-team/issues/442

Currently reusing main rust compiler class and simply remove -Cllvm= argument if
any (only for intel asm syntax).

Disabling binary until the result is more friendly (currently binary are too
big).

refs #2683
2021-07-12 15:35:01 -05:00
Quinton Miller 6ea7669814 Override CC env variable in Crystal propeties (#2776) 2021-07-12 08:37:32 -05:00
Matt Godbolt 7fddb70e22 Add optional support for noting page loads with which icons are visible (#2774)
* Add optional support for noting page loads with which icons are visible
* Add an endpoint
2021-07-11 17:06:48 -05:00
partouf a44c2ae83e lintfix 2021-07-08 15:07:12 +00:00
Marc Poulhiès 5fe6f140a5 Better handling of Kalray MPPA comment and bundle separator (#2768)
The KVX assembly uses ;; as the bundle separator, which can be a problem to
parse as ; is also commonly used as a comment marker.

Latest compiler version also adds cycle information for opt level >= 1, which
confuses the current comment filter that treats the bundle separator as comment.

Tune the regex to treat the following :

        addd $r12 = $r12, -96
        get $r16 = $ra
        ;;      # (end cycle 0)

as non-comment. The ';;  #' is special-cased as non-comment.
2021-07-08 16:45:15 +02:00
partouf 2eebf0372f lint fixes 2021-07-08 14:40:41 +00:00