Commit Graph
43 Commits
Author SHA1 Message Date
Ofek c2e9d61fe9 Adapt python cfg to python 3.13 (#7906)
Along with improved function names.
2025-07-12 18:39:00 +03:00
Ofek 1b1055d2cb CFG for Python (#7855) 2025-07-01 21:49:20 +03:00
OfekandOfek Shilon 273a280b73 Fix #7858: Allow for angle brackets in llvm labels (#7859)
Co-authored-by: Ofek Shilon <oshilon@speedata.io>
2025-06-24 06:49:54 +03:00
Ofek 2d74bb24aa Fix #7573: Handle catchswitch, catchret and cleanupret LLVM-IR block terminators (#7574) 2025-04-18 06:39:16 +03:00
Mats Jun Larsen 5eea63328f Migrate to Biome for linting and formatting (#7033) 2025-02-02 17:54:31 +00:00
Ofek b321566b09 Fix #7096: consider the rust case where an IR label can include '[' (#7098) 2024-11-14 13:01:08 +02:00
Ofek c1985d64a1 Tsification binge #7 (#6974) 2024-10-25 12:19:04 +03:00
Mats Jun ce97bd1696 Replace old utils with JavaScript builtins (#7005) 2024-10-23 11:53:01 +02:00
Ofek 2df8d32758 Tsify #6 (#6941)
Another tsification batch. 347 to go and I'm running out of easy fixes
:(
2024-10-22 21:41:44 +03:00
kevinjeon-g d54e2baa8d Update OatCFGParser's jump target format (#6909)
We need to account for latest versions of dex2oat saving jump targets in
non-truncated form, for example,

(old) "b #+0x28 (addr 0x416c)" vs. (new) "b.hs #+0x24 (addr 0x00008074)"
2024-09-26 11:04:44 -05:00
kevinjeon-g 404a0114a3 Add CFG support to dex2oat (#6864)
This currently only covers the default arm64 output, and isn't
compatible with the custom '--full-output' flag. If there's demand for
it, both of these can be fixed by updating how the oatdump output is
parsed in OatCFGParser.
2024-09-24 14:34:40 -05:00
Ofek fecd0fbf11 tsification + small package upgrade (semver) (#6841) 2024-09-10 17:18:48 +03:00
Ofek 9ef46fbafe Binge of (mostly) mindless tsification (#6838)
Turned on `noImplicitAny` in tsconfig, then went around fixing some
random easy stuff.
Hopefully tsification-PRs with more real content coming up.
2024-09-07 14:36:43 +03:00
Ofek 3db92c3753 Fix rust IR function/label parsing (#6594)
Fixes at least #6554.

Modified to not clash with @narpfel 's earlier fix to #6558
2024-06-19 22:01:05 +03:00
Ofek 2f117a24c3 Fix llvm-ir-cfg: callbr might be multiline, AND might start with %1 = (#6546)
Fixes #6545
2024-06-01 17:33:04 +03:00
Ofek 0fc6a922b1 Fix #6437: Don't try and generate cfg for incomplete (truncated) IR (#6444) 2024-05-06 22:08:31 +03:00
Patrick Quist b8325cf0c6 eslint root setting and fixes (#6307) 2024-04-16 21:26:53 +02:00
Marc Auberer 54dda76f22 New language: Spice (#6105)
Add support for the Spice programming language.

Spice (`spicelang`) is a simple, AOT compiled, LLVM-based systems
language with focus on practicality and performance.

**Key features of Spice**
- simplicity - see what you get aproach with batteries included
- performance: As Spice uses LLVM as its primary backbone, it competes
with the performance of other LLVM-based compilers
- enhanced safety: Spice implements an enhanced safety mechanism, which
includes builtin heap type with auto-free and more
- cross-compile support: Currently x86_64, AArch64 and wasm32 are
supported cross-compilation targets, but more to come
- Pretty good C and C++ interop

**Links**
- Source code: https://github.com/spicelang/spice
- Website: https://spicelang.com
- Playground (own CE instance): https://play.spicelang.com
- Infra PR: https://github.com/compiler-explorer/infra/pull/1229

**Things this PR addresses**
- General support for Spice
- Three code examples
- Spice mode (Syntax highlighting)
- Opt pipeline support
- LLVM mca and osaca support
2024-02-12 21:50:33 -06:00
Ofek Shilon 04fe14445f Fixes for two llvm-cfg glitches caught by Sentry 2024-02-09 17:58:55 +02:00
Ofek Shilon 31dd08be80 Capture more info on Sentry makeLlvmEdges reports 2024-02-04 21:11:35 +02:00
Ofek c0db47487c Fix #5784 (#5793)
Fix the name of the entry block in an IR control flow graph.
2023-11-27 10:33:03 -05:00
Ofek bb66fc6a97 Fix #5694 (#5703) 2023-11-04 20:54:24 +01:00
Ofek 991c58e18c Fix #5672 (#5691)
The existing `returnInstruction` regex failed both `ret` (with no
arguments) and `pop {r4, pc}`. This small fix solves these.
2023-10-31 10:33:59 -04:00
Ofek 2f73f1d26e Fix #5683 (#5685)
The filtering of directive lines (those starting with dot) is already
performed at `parser.filterData`. All that was missing is dropping empty
"functions".
2023-10-30 20:57:42 -05:00
Ofek 47a2493c82 Fix #5464 (#5654)
Nothing fancy, just 2 more special cases for multi-line IR instructions.
2023-10-30 20:36:35 -05:00
Ofek ca7447e185 Fix #5621 (#5637)
I opted to suggest as minor a change as possible, and just special-cased
these `.omp_outlined.` functions (their name can contain an index) in
two places. This is enough to solve the confusing IR/ASM cfg diff, and
have asm separate functions properly.
2023-10-24 15:27:57 -04:00
Ofek f1c562395e Another fix on the way to resolving #5617 (#5646)
Turns out `ArmInstructionSetInfo.unconditionalJumps` and
`ArmInstructionSetInfo.conditionalJumps` are not disjoint, and the order
in which they are tested matters. Specifically an opcode like `b.lt`
provides a match for `ArmInstructionSetInfo.unconditionalJumps` in the
single char `b` and so erroneously returned `InstructionType.jmp`.

One can imagine a better solution in modifying the regexes to make them
properly disjoint, but AFAICT this is good enough, at least to un-break
the ARM CFG.
2023-10-24 15:27:06 -04:00
partouf 0ead74ec8a formatting 2023-10-24 17:18:59 +02:00
nickpdemarco 5e1b320ee2 Update path from main 2023-10-18 16:40:25 -04:00
nickpdemarco 4fd7f325f4 merge main 2023-10-18 16:36:52 -04:00
Ofek 82b4d0fa58 Fix #5617 (#5620) 2023-10-18 14:03:11 -05:00
Mauro Baladés a33dd9de16 Added snowball lang (#5245)
# Language name
Snowball 🐱 

Language version
Snowball v0.0.7-beta

## Language homepage
Soon™️ 

Not the websites but some (WIP) documentation:
https://snowball-lang.gitbook.io/docs/

Compiler homepage

https://github.com/snowball-lang/snowball

Compiler version
v0.0.7-beta

Motivation

With a myriad of features to offer, Snowball boasts object-oriented
programming, memory safety, built-in functions for enhanced
productivity, and faster execution than other languages. Plus, its
garbage collector and unit testing make it a comprehensive tool for
developers.

> It's still in development but it's development is fast
2023-07-10 20:38:55 -05:00
Jeremy Rifkin 3c4b22c1eb Quick llvm ir cfg parsing patches (#5234)
Fixes some issues noticed in
https://github.com/compiler-explorer/compiler-explorer/pull/5155#issuecomment-1617709720
- confusing coloring and hyphens not being part of the label regex

CC @OfekShilon
2023-07-06 08:09:27 -04:00
Jeremy ce69ac76fa Add unreachable as a llvm block terminator 2023-06-21 14:50:53 -04:00
Jeremy Rifkin 122a0047e8 Add instruction set info for generating arm control flow graphs (#5158)
Fixes #4410

On top of #5156
2023-06-19 22:13:15 -04:00
Jeremy Rifkin 3716cbd446 Support control flow graphs from the IR pane (#5155)
On top of #5154


![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/7bf25b5b-8988-42ff-9d8c-233e6d817997)

Additionally, while I was here, added support for multiple control flow
graphs to be opened from one compiler instead of disabling the button
once one is opened. And improved the implementation for how this was
done for the llvm opt pipeline.

And did some type work along the way.
2023-06-19 21:48:20 -04:00
Jeremy Rifkin 42ea9cc128 General work on solidifying the instruction set system (#5156)
Mainly type work
2023-06-17 19:41:26 -04:00
Jeremy Rifkin 59a53d5419 LLVM IR control flow graphs (#5154)
![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/5a2eb341-4f3e-4175-82a3-7cce513ed0ae)

![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/8fe56ced-338a-4c40-bd54-bff5725d9cf5)

Closes #4658
2023-06-17 10:55:24 -04:00
Mats Jun LarsenandMatt Godbolt 633eb82d18 Transition to ECMAScript Modules (#4780)
Makes the Compiler Explorer app, and all the tooling ESM compatible.
Things that have been done:

1. The package.json has `type: module` now
2. All relative imports have a .js ending
3. All directory imports are now directory/index.js to comply with ESM
standards
4. Dependency node-graceful is now imported into tree, because the
package is broken under esm
5. Dependency p-queue has been bumped to 7.x with ESM support
6. Dependency profanities has been bumped to 3.x with ESM support
7. Webpack config is now both ESM and CommonJS compatible
8. Non-ESM compatible imports have been rewritten
9. ESLint configuration has been tweaked to not fail on .js imports
10. Mocha is now hacked together and ran with ts-node-esm
11. Webpack is now hacked together and ran with ts-node-esm
12. Webpack config is now ESM compatible, so that it can be used in the
dev server
13. Cypress code still runs commonjs, and has been excluded from the
tsconfig
14. All sinon mock tests have been commented out, because sinon module
mocks do not work with ESModules (because ESModules are immutable)

A lot of tests are now giving warnings/errors to stdout, yet still pass.
Docenizer codegenerator scripts have been updated, but I did not re-run
them, and instead just changed their code.

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-02-27 18:06:38 -06:00
Jeremy Rifkin 384c297906 Fix trailing comma issue (#4775)
Make trailing commas more consistent throughout the project, fixes
config conflict between eslint and prettier. Resolves an oversight in
#4766.
2023-02-26 12:21:35 -05:00
Jeremy Rifkin 2b06c69111 Turn some auto-fixable eslint rules back on (#4766)
This PR turns comma-dangle and indent eslint rules on for lib/. These
are rules inherited from the eslint config for static/, this PR just
makes things more consistent. Also turned
@typescript-eslint/no-var-requires back on while I was here.
2023-02-23 17:16:17 -05:00
Jeremy fec19f8238 Unused import 2023-02-13 16:47:17 -05:00
Jeremy Rifkin ac8f444505 Convert, modernize, and refactor cfg generation (#4657) 2023-01-29 16:28:38 -05:00