Commit Graph
489 Commits
Author SHA1 Message Date
partouf 3a885634e8 lintfix 2022-02-11 15:43:41 +01:00
Jeremy Rifkin 74efcfa754 Preprocessor output panel (#3330) 2022-02-11 15:42:41 +01:00
partouf a894faf1eb lintfixes 2022-02-11 00:19:16 +01:00
Yusuf Bham 41853b4a8c Fixes check for empty request body (#3350)
Check `req.body` being empty in addition to `source` being `undefined`.

Closes #3349
2022-02-10 23:43:16 +01:00
Matt Godbolt 5f0a3a7f23 Re-enable ansi tests. CC @matsjla 2022-01-31 22:17:30 -06:00
Mats Larsen 9b890b1656 Refactor handling of Assembly Documentation Providers (#3247) 2022-01-31 14:05:21 +01:00
Mats Larsen 1406669452 Move BaseFormatter into /lib/formatters (#3250) 2022-01-24 21:07:52 -06:00
Elektron72 bf9d2334b9 Add AVR assembly documentation (#3218) 2022-01-07 16:30:56 +01:00
partouf 7e294e7473 fix unittest 2021-12-28 14:50:40 +00:00
Elektron72 5a350691bb Add assembly documentation for 6502 (#3210)
This PR adds assembly documentation for the MOS 6502 and WDC 65C02 instruction sets, which are output by cc65.
2021-12-23 16:34:08 +01:00
Mats Larsen 810a1d0918 Describe which opcode and arch was not found (#3175) 2021-12-15 19:10:50 +01:00
Matt Godbolt eb002af78f Update prettier, reformat json files 2021-12-13 23:12:25 -06:00
Matt Godbolt 73c758671a Update eslint et al 2021-12-13 22:40:03 -06:00
Mats Larsen d7c4eecbf7 Refactor and return 404 from AsmDocs APIs (#3143)
Refactors the handler for the AsmDocs API to reduce code duplication.

**Breaking changes proposed**

- API will now return 404. This used to return 200 with "Unknown opcode" which is what led to issue #3117. Following cases has been changed:
  1. archiecture was not found
  2. instruction opcode was not found
- API will now return 406 not acceptable when the accepted content type is not text or json
- There is no longer a `result` field on a 200 request, instead the assembly documentation object is returned.
- There is no longer a `found` field on any request, the HTTP codes indicate whether it was found or not (200 means found)

**New features**

- The frontend will only request the opcode for an instruction set at most once, caching every single outgoing request.
- The "There was an error fetching the documentation for this opcode" has been adjusted to contain what went wrong.

Relevant tests have been added and updated.
2021-12-07 11:43:08 +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
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
Patrick Quist 379a89f41f skip demangling (c++filt) tests when not on linux to allow more people to run the unittests (#3013) 2021-10-06 20:15:52 +02:00
MarkusandMats Larsen 511236c8ec Convert ansi-to-html.js to typescript (#2988)
* Convert ansi-to-html.js to typescript

Signed-off-by: Markus <28785953+MarkusJx@users.noreply.github.com>
Co-authored-by: Mats Larsen <me@supergrecko.com>
2021-10-04 22:29:41 -05:00
Mats Larsen 66e5734da3 Create test case for #2995 (#3002)
Adds a Java assembly test case for issue #2995 which was resolved in #2996
2021-10-05 01:45:05 +02:00
Austin Morton dc49b67741 Fix sinon lint warnings in tests 2021-10-03 14:16:57 -04: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
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 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
Rubén Rincón Blanco b87f8569e3 Make linter happy 2021-08-28 20:10:51 +02:00
RabsRincon d562ae0376 Add test for forcedVersion flag 2021-08-28 19:28:03 +02:00
RabsRincon 854fdf7127 Some more semver tests 2021-08-28 02:43:44 +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 5e5e60159a Multifile/IDE mode (#2725) 2021-08-26 21:57:07 +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
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 2607bf580a Fix options-handler tools tests in Windows 2021-08-13 06:03:53 +02:00
RabsRincon 6fd069b35c Fix utils-test.js eslint complaints 2021-08-13 05:31:10 +02:00
RabsRincon 39aac5341b Add basic options-handler tools parse test 2021-08-11 08:54:27 +02:00
RabsRincon 383c540ad8 Add missing tests for utils.fileExists 2021-08-11 08:19:54 +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 a66df0bf31 Bump timeout value of filters tests 2021-08-10 10:41:30 +02: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
Mats Larsen 0693def6b4 Re-enable tests for JavaCompiler (#2797)
Now that Java is running on CE again, it'd make sense to re-enable these tests. This patch also includes a fix for the javap parsing test.

The local compilation environment variable was never set, causing env to be undefined inside testJava
2021-07-22 07:29:05 -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
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
Rubén Rincón Blanco 27012bb0ec Initial sketch for how we could parse Rust output (#2761)
* Initial sketch for how we could parse Rust output

It has many issues, which I need to ask about, but ey, it works!

* Fix spacing

* Add tests for the new Rust output parsing
2021-07-06 05:21:31 +02:00
Patrick Quist d6083eadf7 Limit AWS SSM request to what we actually use (#2750)
* test

* use different call

* fixes to call and unittest
2021-06-30 07:09:19 +02:00