From 0ead74ec8acc9c25b1ccd63df00d2271b9cee2ec Mon Sep 17 00:00:00 2001 From: partouf Date: Tue, 24 Oct 2023 17:18:59 +0200 Subject: [PATCH] formatting --- README.md | 21 ++++++++++++++++----- lib/cfg/instruction-sets/base.ts | 8 +++++--- static/modes/tablegen-mode.ts | 9 +-------- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index b5b494b1c..715c55365 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,26 @@ # Compiler Explorer -Is an interactive compiler exploration website. Edit code in C, C++, C#, F#, Rust, Go, D, Haskell, -Swift, Pascal, [ispc](https://ispc.github.io/), Python, Java, or any of the other [30+ supported languages](https://godbolt.org/api/languages) components, and see how that code looks after being compiled in real -time. +Is an interactive compiler exploration website. Edit code in C, C++, C#, F#, Rust, Go, D, Haskell, Swift, Pascal, +[ispc](https://ispc.github.io/), Python, Java, or any of the other +[30+ supported languages](https://godbolt.org/api/languages) components, and see how that code looks after being +compiled in real time. -[Bug Report](https://github.com/compiler-explorer/compiler-explorer/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBUG%5D%3A+) · [Compiler Request](https://github.com/compiler-explorer/compiler-explorer/issues/new?assignees=&labels=request%2Cnew-compilers&projects=&template=compiler_request.yml&title=%5BCOMPILER+REQUEST%5D%3A+) · [Feature Request](https://github.com/compiler-explorer/compiler-explorer/issues/new?assignees=&labels=request&projects=&template=feature_request.yml&title=%5BREQUEST%5D%3A+) · [Language Request](https://github.com/compiler-explorer/compiler-explorer/issues/new?assignees=&labels=request%2Cnew-language&projects=&template=language_request.yml&title=%5BLANGUAGE+REQUEST%5D%3A+) · [Library Request](https://github.com/compiler-explorer/compiler-explorer/issues/new?assignees=&labels=request%2Cnew-libs&projects=&template=library_request.yml&title=%5BLIB+REQUEST%5D%3A+) · [Report Vulnerability](https://github.com/compiler-explorer/compiler-explorer/security/advisories/new) +[Bug Report](https://github.com/compiler-explorer/compiler-explorer/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBUG%5D%3A+) +· +[Compiler Request](https://github.com/compiler-explorer/compiler-explorer/issues/new?assignees=&labels=request%2Cnew-compilers&projects=&template=compiler_request.yml&title=%5BCOMPILER+REQUEST%5D%3A+) +· +[Feature Request](https://github.com/compiler-explorer/compiler-explorer/issues/new?assignees=&labels=request&projects=&template=feature_request.yml&title=%5BREQUEST%5D%3A+) +· +[Language Request](https://github.com/compiler-explorer/compiler-explorer/issues/new?assignees=&labels=request%2Cnew-language&projects=&template=language_request.yml&title=%5BLANGUAGE+REQUEST%5D%3A+) +· +[Library Request](https://github.com/compiler-explorer/compiler-explorer/issues/new?assignees=&labels=request%2Cnew-libs&projects=&template=library_request.yml&title=%5BLIB+REQUEST%5D%3A+) +· [Report Vulnerability](https://github.com/compiler-explorer/compiler-explorer/security/advisories/new) # Overview -Multiple compilers are supported for each language, many different tools and visualizations are available, and the UI layout is configurable (thanks to [GoldenLayout](https://www.golden-layout.com/)). +Multiple compilers are supported for each language, many different tools and visualizations are available, and the UI +layout is configurable (thanks to [GoldenLayout](https://www.golden-layout.com/)). Try out at [godbolt.org](https://godbolt.org), or [run your own local instance](#running-a-local-instance). An overview of what the site lets you achieve, why it's useful, and how to use it is diff --git a/lib/cfg/instruction-sets/base.ts b/lib/cfg/instruction-sets/base.ts index 7f024bd7e..08d7d2ef3 100644 --- a/lib/cfg/instruction-sets/base.ts +++ b/lib/cfg/instruction-sets/base.ts @@ -37,9 +37,11 @@ export class BaseInstructionSetInfo { } isJmpInstruction(x: string) { - return x.trim()[0] === 'j' - || !!x.match(/\bb\.*(eq|ne|cs|hs|cc|lo|hi|ls|ge|lt|gt|le|rge|rlt)?\b/) - || !!x.match(/(?:tbnz|tbz|cbnz|cbz)/); + return ( + x.trim()[0] === 'j' || + !!x.match(/\bb\.*(eq|ne|cs|hs|cc|lo|hi|ls|ge|lt|gt|le|rge|rlt)?\b/) || + !!x.match(/(?:tbnz|tbz|cbnz|cbz)/) + ); } getInstructionType(inst: string) { diff --git a/static/modes/tablegen-mode.ts b/static/modes/tablegen-mode.ts index e47136e79..7dd0183a4 100644 --- a/static/modes/tablegen-mode.ts +++ b/static/modes/tablegen-mode.ts @@ -47,14 +47,7 @@ export function definition(): monaco.languages.IMonarchLanguage { 'then', 'true', ], - standardTypes: [ - 'bit', - 'int', - 'string', - 'dag', - 'bits', - 'list', - ], + standardTypes: ['bit', 'int', 'string', 'dag', 'bits', 'list'], operators: [ '!add', '!and',