mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 09:23:52 -05:00
Add new language: Algol68 and corresponding GCC frontend (#7346)
refs https://github.com/compiler-explorer/compiler-explorer/issues/7258 Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
This commit is contained in:
6
.github/labeler.yml
vendored
6
.github/labeler.yml
vendored
@@ -11,6 +11,12 @@
|
||||
- 'etc/config/ada.*.properties'
|
||||
- 'static/modes/ada-mode.ts'
|
||||
|
||||
'lang-algol68':
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'lib/compilers/gac.ts'
|
||||
- 'etc/config/algol68.*.properties'
|
||||
|
||||
'lang-android-java':
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
|
||||
87
etc/config/algol68.amazon.properties
Normal file
87
etc/config/algol68.amazon.properties
Normal file
@@ -0,0 +1,87 @@
|
||||
compilers=&ga68
|
||||
objdumper=/opt/compiler-explorer/gcc-14.2.0/bin/objdump
|
||||
defaultCompiler=ga68-snapshot
|
||||
demangler=/opt/compiler-explorer/gcc-14.2.0/bin/c++filt
|
||||
|
||||
group.ga68.compilers=&ga68-x86
|
||||
group.ga68.supportsBinary=false
|
||||
group.ga68.supportsBinaryObject=true
|
||||
group.ga68.compilerType=ga68
|
||||
group.ga68.versionFlag=--version
|
||||
group.ga68.isSemVer=true
|
||||
group.ga68.unwiseOptions=-march=native
|
||||
|
||||
# native compiler
|
||||
group.ga68-x86.compilers=ga68-snapshot
|
||||
group.ga68-x86.groupName=x86-64 GA68
|
||||
group.ga68-x86.baseName=x86-64 GA68
|
||||
group.ga68-x86.unwiseOptions=-march=native
|
||||
|
||||
compiler.ga68-snapshot.exe=/opt/compiler-explorer/algol68/gcc-ga68-master/bin/ga68
|
||||
compiler.ga68-snapshot.semver=(GA68 master)
|
||||
compiler.ga68-snapshot.isNightly=true
|
||||
|
||||
#################################
|
||||
#################################
|
||||
# Installed tools
|
||||
tools=ldd:llvm-mcatrunk:osacatrunk:pahole:readelf:nm:strings:llvmdwarfdumptrunk:bloaty11
|
||||
|
||||
tools.ldd.name=ldd
|
||||
tools.ldd.exe=/usr/bin/ldd
|
||||
tools.ldd.type=postcompilation
|
||||
tools.ldd.class=readelf-tool
|
||||
tools.ldd.exclude=
|
||||
tools.ldd.stdinHint=disabled
|
||||
|
||||
tools.llvm-mcatrunk.name=llvm-mca (trunk)
|
||||
tools.llvm-mcatrunk.exe=/opt/compiler-explorer/clang-trunk/bin/llvm-mca
|
||||
tools.llvm-mcatrunk.type=postcompilation
|
||||
tools.llvm-mcatrunk.class=llvm-mca-tool
|
||||
tools.llvm-mcatrunk.stdinHint=disabled
|
||||
|
||||
tools.osacatrunk.name=OSACA (0.6.1)
|
||||
tools.osacatrunk.exe=/opt/compiler-explorer/osaca-0.6.1/bin/osaca
|
||||
tools.osacatrunk.type=postcompilation
|
||||
tools.osacatrunk.class=osaca-tool
|
||||
tools.osacatrunk.stdinHint=disabled
|
||||
|
||||
tools.pahole.name=pahole
|
||||
tools.pahole.exe=/opt/compiler-explorer/pahole/bin/pahole
|
||||
tools.pahole.type=postcompilation
|
||||
tools.pahole.class=pahole-tool
|
||||
tools.pahole.exclude=
|
||||
tools.pahole.stdinHint=disabled
|
||||
tools.pahole.languageId=cppp
|
||||
|
||||
tools.readelf.name=readelf
|
||||
tools.readelf.exe=/opt/compiler-explorer/gcc-snapshot/bin/readelf
|
||||
tools.readelf.type=postcompilation
|
||||
tools.readelf.class=readelf-tool
|
||||
tools.readelf.exclude=
|
||||
tools.readelf.stdinHint=disabled
|
||||
|
||||
tools.nm.name=nm (trunk)
|
||||
tools.nm.exe=/opt/compiler-explorer/gcc-snapshot/bin/nm
|
||||
tools.nm.type=postcompilation
|
||||
tools.nm.class=nm-tool
|
||||
tools.nm.exclude=djggp
|
||||
tools.nm.stdinHint=disabled
|
||||
|
||||
tools.strings.exe=/opt/compiler-explorer/gcc-snapshot/bin/strings
|
||||
tools.strings.name=strings
|
||||
tools.strings.type=postcompilation
|
||||
tools.strings.class=strings-tool
|
||||
tools.strings.exclude=
|
||||
tools.strings.stdinHint=disabled
|
||||
|
||||
tools.llvmdwarfdumptrunk.exe=/opt/compiler-explorer/clang-trunk/bin/llvm-dwarfdump
|
||||
tools.llvmdwarfdumptrunk.name=llvm-dwarfdump (trunk)
|
||||
tools.llvmdwarfdumptrunk.type=postcompilation
|
||||
tools.llvmdwarfdumptrunk.class=llvm-dwarfdump-tool
|
||||
tools.llvmdwarfdumptrunk.stdinHint=disabled
|
||||
|
||||
tools.bloaty11.name=bloaty (1.1)
|
||||
tools.bloaty11.exe=/opt/compiler-explorer/bloaty-1.1/bin/bloaty
|
||||
tools.bloaty11.type=postcompilation
|
||||
tools.bloaty11.class=bloaty-tool
|
||||
tools.bloaty11.stdinHint=disabled
|
||||
47
etc/config/algol68.defaults.properties
Normal file
47
etc/config/algol68.defaults.properties
Normal file
@@ -0,0 +1,47 @@
|
||||
# Default settings for Algol68
|
||||
compilers=&ga68
|
||||
defaultCompiler=ga68default
|
||||
demangler=c++filt
|
||||
objdumper=objdump
|
||||
postProcess=
|
||||
supportsBinary=false
|
||||
supportsBinaryObject=true
|
||||
|
||||
group.ga68.compilers=ga68default
|
||||
compiler.ga68default.exe=/usr/bin/ga68
|
||||
compiler.ga68default.name=ga68
|
||||
|
||||
tools=clangquerydefault:clangtidydefault:readelf:nm:llvmdwarfdumpdefault
|
||||
|
||||
tools.clangquerydefault.exe=/usr/bin/clang-query
|
||||
tools.clangquerydefault.name=clang-query (default)
|
||||
tools.clangquerydefault.type=independent
|
||||
tools.clangquerydefault.class=clang-query-tool
|
||||
tools.clangquerydefault.stdinHint=Query commands
|
||||
tools.clangquerydefault.monacoStdin=true
|
||||
|
||||
tools.clangtidydefault.exe=/usr/bin/clang-tidy
|
||||
tools.clangtidydefault.name=clang-tidy (default)
|
||||
tools.clangtidydefault.type=independent
|
||||
tools.clangtidydefault.class=clang-tidy-tool
|
||||
tools.clangtidydefault.stdinHint=disabled
|
||||
|
||||
tools.readelf.name=readelf (default)
|
||||
tools.readelf.exe=/usr/bin/readelf
|
||||
tools.readelf.type=postcompilation
|
||||
tools.readelf.class=readelf-tool
|
||||
tools.readelf.exclude=djggp
|
||||
tools.readelf.stdinHint=disabled
|
||||
|
||||
tools.nm.name=nm (default)
|
||||
tools.nm.exe=/usr/bin/nm
|
||||
tools.nm.type=postcompilation
|
||||
tools.nm.class=nm-tool
|
||||
tools.nm.exclude=djggp
|
||||
tools.nm.stdinHint=disabled
|
||||
|
||||
tools.llvmdwarfdumpdefault.exe=/usr/bin/llvm-dwarfdump
|
||||
tools.llvmdwarfdumpdefault.name=llvm-dwarfdump (default)
|
||||
tools.llvmdwarfdumpdefault.type=postcompilation
|
||||
tools.llvmdwarfdumpdefault.class=llvm-dwarfdump-tool
|
||||
tools.llvmdwarfdumpdefault.stdinHint=disabled
|
||||
4
examples/algol68/default.a68
Normal file
4
examples/algol68/default.a68
Normal file
@@ -0,0 +1,4 @@
|
||||
PROGRAM
|
||||
BEGIN puts ("Hello world!\n");
|
||||
0
|
||||
END
|
||||
31
lib/compilers/ga68.ts
Normal file
31
lib/compilers/ga68.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
// Copyright (c) 2025, Compiler Explorer Authors
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import {GCCCompiler} from './gcc.js';
|
||||
|
||||
export class GA68Compiler extends GCCCompiler {
|
||||
static override get key() {
|
||||
return 'ga68';
|
||||
}
|
||||
}
|
||||
@@ -77,6 +77,17 @@ const definitions: Record<LanguageKey, LanguageDefinition> = {
|
||||
previewFilter: null,
|
||||
monacoDisassembly: null,
|
||||
},
|
||||
algol68: {
|
||||
name: 'Algol68',
|
||||
monaco: 'algol68',
|
||||
extensions: ['.a68'],
|
||||
alias: [],
|
||||
logoUrl: '',
|
||||
logoUrlDark: '',
|
||||
formatter: null,
|
||||
previewFilter: null,
|
||||
monacoDisassembly: null,
|
||||
},
|
||||
analysis: {
|
||||
name: 'Analysis',
|
||||
monaco: 'asm',
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
export type LanguageKey =
|
||||
| 'ada'
|
||||
| 'algol68'
|
||||
| 'analysis'
|
||||
| 'android-java'
|
||||
| 'android-kotlin'
|
||||
|
||||
Reference in New Issue
Block a user