| Commit message (Collapse) | Author | Age |
| |
|
|
|
| |
Replaces #6310
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Move to using `vitest`'s built-in behaviour, or nearer to it. Rename all
the txt to `.json` files, as that's what they are.
A bit of a workaround, though we might decide to keep it.
To update the "expected" you can run `npx vitest test/filter-tests.ts
--update` or similar.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This PR fixes missed demangle cases pointed out in #6348, namely of the
form `mov eax, OFFSET FLAT:_Z...` and `jmp qword ptr [rip + _Z...]`.
Closes #6348.
---------
Co-authored-by: Patrick Quist <partouf@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Compilers like to encode short-ish strings into immediate arguments to
various assembly instructions. This makes it hard to read the assembly.
To improve readability, show a string representation of a number’s bytes
when they’re valid UTF-8.
This now also shows a string representation for *unprintable* ASCII
characters, such as `10` being shown as `"\n"` or `1` as `"\u0001"`.
Resolves #6220.
## Examples
([link](https://godbolt.org/z/7hzn6b8YG))
* 8583909746840200552: `8'583'909'746'840'200'552 =
0x7720'2C6F'6C6C'6568 = 6.5188685003648344e+265 = "hello, w"`
* 1684828783: `1'684'828'783 = 0x646C'726F = 1.74467096e+22f = "orld"`
* -6934491452449512253: `-6'934'491'452'449'512'253 =
0x9FC3'BCC3'B6C3'A4C3 = -1.1500622354593239e-155 = "äöüß"`
* 1633837924: `1'633'837'924 = 0x6162'6364 = 2.61007876e+20f = "dcba"`
* 97: `97 = 0x61 = 1.35925951e-43f = "a"`
* 10: `10 = 0xA = 1.40129846e-44f = "\n"`
* 92: `92 = 0x5C = 1.28919459e-43f = "\\"`
## Open questions
* The code assumes little-endian encoding, so the string representation
is reversed compared to the numeric representation (see `integer`
example). Should this be configurable or should the bytes not be
reversed?
* Negative numbers are masked to 64-bit unsigned ints (same as in the
hex representation), so if the number is shorter than 8 bytes, it has
some leading `ff` bytes and is not valid UTF-8 (see
`small_negative_number` in the example link). Is this an acceptable
limitation?
* I'd like to add some tests for `getNumericToolTip`, but I’m not really
familiar with TypeScript. I tried to importing
`static/panes/compiler.ts` in a test file, but
([after](https://github.com/vitest-dev/vitest/discussions/1806#discussioncomment-3570047)
some [struggling](https://vitest.dev/config/#environment)) it seems that
that file needs a [specific DOM
element](https://github.com/compiler-explorer/compiler-explorer/blob/3c26c64ca320853cb383b3751d3e08a86b581639/static/options.ts#L27)
that is not present during testing. The simplest solution I could come
up with is moving `getNumericToolTip` into another file (such as
`static/utils.ts`). Is that okay or is is it possible test
`static/panes/compiler.ts` some other way?
---------
Co-authored-by: Patrick Quist <partouf@gmail.com>
|
|
|
|
| |
Port to vitest. Port everything to typescript. Remove chai, mocha and
chai-as-promised. Adds some docs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Long numbers are sometimes hard to read in the numeric tooltip. To
improve readability, this PR adds language-specific digit separators to
the numeric tooltip.
Decimal numbers are grouped into chunks of three digits while
hexadecimal numbers are grouped into chunks of length four.
The digit separator is language-specific and chosen so that the number
is a valid token in the source language.
[Examples](https://godbolt.org/z/s86cMbjeK):
* for C++, hovering the number `8583909746840200552` shows this tooltip:
`8'583'909'746'840'200'552 = 0x7720'2C6F'6C6C'6568 =
6.5188685003648344e+265`
* for Python, hovering the number `-12345678` shows this tooltip:
`-123_456_789 = 0xFFFF_FFFF_F8A4_32EB = -2.66427945e+34f`
For languages that don’t have a `digitSeparator` set, the tooltip is not
changed.
|
| |
|
|
|
|
|
|
|
| |
This adds support for filtering tail calls to `llvm.dbg.*` intrinsics
using the regex-based filter mechanism.
Previously, normal calls were filtered out, but tail calls are not
caught by the regex so they remained in the output.
Example with the previous state: https://play.spicelang.com/z/MGGn98
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Maps env vars just like we map everything else, to catch all cases where
"app dir" is an input to jailed processes, the jailed process only sees
the "right" path (`/app/something`).
Tested locally and fixes the dot net "read only `/nosym`" thing while
keeping the `/nosym` behaviour etc
|
| |
|
| |
|
|
|
|
|
|
|
| |
Instead of having several globals, set via environment variables,
explicitly set the "correct" env var if passed `--tmpDir` and then
consistently use it in the rest of the program.
See @apmorton's comments in #1707
|
| |
|
|
|
|
|
|
|
| |
Adds Dex2OatCompiler, which applies to the Android Java and Android
Kotlin languages. Dex2OatCompiler runs on .dex files output by
D8Compiler, which in turn runs on .class files output by JavaCompiler or
KotlinCompiler. A parser has been added for dex2oat optimization passes.
|
|
|
|
|
|
|
| |
Fix #5951
Fix #5085
Extended the fictitious version number for non-numbers, so that trunk
can be listed higher than a `yyyymmdd` as a version (EVE uses this)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code here assumes a top-level AST subtree can be in 3 states:
1. The header line indicates it's system code (e.g. includes `/usr`
etc.)
2. The header line indicates it's user code (includes `<source>`)
3. The header contains no such info (typically it includes `<invalid
sloc>`)
For the 3rd case this PR looks-ahead inside the current subtree and
decides based on its contents.
This is enough to filter out `<vector>` or `<string>` contents, as
demonstrated in issue #5889 (added a test). This solution holds also for
the case from issue #3849.
|
|
|
|
|
|
|
|
| |
Some operations set `exec`'s `maxOutput` to a value larger than the max
string length. This change ensures we always cap output to the engine's
string limit (currently 512 MB in recent Node versions).
This also tweaks handling when reaching the string limit to ensure
adding the "truncated" message itself does not send us beyond the limit.
|
|
|
| |
Co-authored-by: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.

---------
Co-authored-by: Matt Godbolt <matt@godbolt.org>
|
|
|
|
|
|
| |
Also errors early if we can't get them at all, and configures retries
and timeouts
Mitigation for #5813
|
|
|
| |
Fix the name of the entry block in an IR control flow graph.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Previously an error in e.g. YAML parsing would take down the whole
process.
Part of #5686 but doesn't fix the underlying issue.
|
| |
|
| |
|
| |
|
|
|
|
| |
same input
|
| |
|
|
|
|
|
|
|
|
|
| |
As best I can tell the bug happens due to stuff happening _before_ the
user code. So I have removed anything after the user code (ie the giant
gob of dwarf debug info and symbols), in an attempt to reduce the test
sizes in general.
I manually undid the fix from #1285 and the tests correctly fail with
this reduced input.
|
|
|
|
|
|
| |
Just to reduce test size. Unlike an earlier change I haven't done
extensive investigation as to what we might be missing as these weren't
specifically targeted tests, more smoke/regression tests, and my hope is
5000 lines is enough (previously they were 30+k each)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds more data definition directives to be recognized by
`AsmParser` in lib/parsers/asm-parser.ts.
Fixes #5489, as well as inappropriate filtering of `.double` directives
in test/filter-cases/diab.asm which is similar to #5489.
The list of data directives are taken from the "Assembler Directives"
chapter of the [GNU `as` manual][as]. Directives added by this patch
are:
- `.dc[size]`
- `.dcb[size]`
- `.ds[size]`
- `.double`
- `.fill`
- `.float`
- `.int`
- `.single`
- `.skip`
- `.space`
- `.string8`, `.string16`, `.string32`, `.string64`
The `.space` directive is not a data directive when assembling for the
HPPA architecture; this must be fixed if HPPA support is to be added to
Compiler Explorer.
Some of the directives such as `.string64` are pretty unlikely to be
emitted by actual compilers, but we add them because it can't break
existing input (no `as`-compatible compiler can use them as non-data
directives), and will futureproof us against future compilers that do
emit them.
Architecture-specific directives documented in the "Machine Dependent
Features" chapter are not added in this patch, even though it may be
better to add some of them (such as `.stringz`) as well. Existing
directives that are not found on the "Assembler Directives" list are not
removed.
`.sleb128` and `.uleb128` are technically data directives, but aren't
added because we assume they're only used in debuginfo.
[as]: https://sourceware.org/binutils/docs-2.41/as/index.html
<!-- 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!
-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After some time we know either the client or CloudFront will give up on
pending compilations. As such, if we continue to process compilations
after the client's timed out we're just clogging up the compilation
queue with pointless work.
As such, this change now supports the notion of "stale" work which will
be abandoned once it's made it to the front of the queue. Only compiles
coming from the user will be abandoned, so discovery and health checks
are unaffected.
Hopefully this will mitigate the number of nodes marked unhealthy due to
being overloaded: work they were doing was "pointless" anyway, and them
being killed by going unhealthy is equivalent to abandoning all the work
in flight anyway, but this means there's a fighting chance the node will
recover quickly enough to return a "healthy" status.
|