diff --git a/etc/config/c++.amazon.properties b/etc/config/c++.amazon.properties index 2d5138b47..73224aaf1 100644 --- a/etc/config/c++.amazon.properties +++ b/etc/config/c++.amazon.properties @@ -748,7 +748,7 @@ compiler.clang211assert.semver=21.1.0 (assertions) compiler.clang211assert.options=--gcc-toolchain=/opt/compiler-explorer/gcc-15.2.0 compiler.clang211assert.ldPath=${exePath}/../lib|${exePath}/../lib/x86_64-unknown-linux-gnu -group.clang-rocm.compilers=clang-rocm-trunk:clang-rocm-40502:clang-rocm-50002:clang-rocm-50103:clang-rocm-50203:clang-rocm-50303:clang-rocm-50700:clang-rocm-60002:clang-rocm-60102:clang-rocm-60204:clang-rocm-60303:clang-rocm-60400 +group.clang-rocm.compilers=clang-rocm-trunk:clang-rocm-40502:clang-rocm-50002:clang-rocm-50103:clang-rocm-50203:clang-rocm-50303:clang-rocm-50700:clang-rocm-60002:clang-rocm-60102:clang-rocm-60204:clang-rocm-60303:clang-rocm-60400:clang-rocm-70001 group.clang-rocm.intelAsm=-mllvm --x86-asm-syntax=intel group.clang-rocm.groupName=ROCm clang x86-64 group.clang-rocm.instructionSet=amd64 @@ -818,6 +818,10 @@ compiler.clang-rocm-60400.exe=/opt/compiler-explorer/clang-rocm-6.4.0/bin/clang+ compiler.clang-rocm-60400.semver=rocm-6.4.0 compiler.clang-rocm-60400.options=--gcc-toolchain=/opt/compiler-explorer/gcc-14.2.0 compiler.clang-rocm-60400.ldPath=${exePath}/../lib|${exePath}/../lib/x86_64-unknown-linux-gnu +compiler.clang-rocm-70001.exe=/opt/compiler-explorer/clang-rocm-7.0.1/bin/clang++ +compiler.clang-rocm-70001.semver=rocm-7.0.1 +compiler.clang-rocm-70001.options=--gcc-toolchain=/opt/compiler-explorer/gcc-14.2.0 +compiler.clang-rocm-70001.ldPath=${exePath}/../lib|${exePath}/../lib/x86_64-unknown-linux-gnu ################################ # Clang for Arm diff --git a/etc/config/cuda.amazon.properties b/etc/config/cuda.amazon.properties index b429352d8..9ea84fe6f 100644 --- a/etc/config/cuda.amazon.properties +++ b/etc/config/cuda.amazon.properties @@ -362,7 +362,7 @@ compiler.cltrunk.exe=/opt/compiler-explorer/clang-trunk/bin/clang++ compiler.cltrunk.demangler=/opt/compiler-explorer/gcc-snapshot/bin/c++filt compiler.cltrunk.options=--gcc-toolchain=/opt/compiler-explorer/gcc-snapshot --cuda-path=/opt/compiler-explorer/cuda/12.8.1 --cuda-gpu-arch=sm_100a --cuda-device-only -Wno-unknown-cuda-version -D_ALLOW_UNSUPPORTED_LIBCPP -group.hipclang.compilers=hiptrunk:hipclang-rocm-40502:hipclang-rocm-50002:hipclang-rocm-50103:hipclang-rocm-50203:hipclang-rocm-50302:hipclang-rocm-50700:hipclang-rocm-60002:hipclang-rocm-60102:hipclang-trunk-rocm-60102:hipclang-staging-rocm-60102:hipclang-rocm-60204:hipclang-trunk-rocm-60204:hipclang-staging-rocm-60204:hipclang-rocm-60303:hipclang-trunk-rocm-60303:hipclang-staging-rocm-60303:hipclang-rocm-60400:hipclang-trunk-rocm-60400:hipclang-staging-rocm-60400 +group.hipclang.compilers=hiptrunk:hipclang-rocm-40502:hipclang-rocm-50002:hipclang-rocm-50103:hipclang-rocm-50203:hipclang-rocm-50302:hipclang-rocm-50700:hipclang-rocm-60002:hipclang-rocm-60102:hipclang-trunk-rocm-60102:hipclang-staging-rocm-60102:hipclang-rocm-60204:hipclang-trunk-rocm-60204:hipclang-staging-rocm-60204:hipclang-rocm-60303:hipclang-trunk-rocm-60303:hipclang-staging-rocm-60303:hipclang-rocm-60400:hipclang-trunk-rocm-60400:hipclang-staging-rocm-60400:hipclang-rocm-70001:hipclang-trunk-rocm-70001:hipclang-staging-rocm-70001 group.hipclang.isSemVer=true group.hipclang.baseName=clang group.hipclang.compilerType=clang-hip @@ -491,6 +491,24 @@ compiler.hipclang-staging-rocm-60400.name=clang staging rocm-6.4.0 compiler.hipclang-staging-rocm-60400.nvdisasm=/opt/compiler-explorer/clang-rocm-trunk/bin/llvm-objdump compiler.hipclang-staging-rocm-60400.objdumper=/opt/compiler-explorer/clang-rocm-trunk/bin/llvm-objdump compiler.hipclang-staging-rocm-60400.options=-x hip --cuda-device-only -O3 --rocm-path=/opt/compiler-explorer/libs/rocm/6.4.0 -include hip/hip_runtime.h +compiler.hipclang-rocm-70001.exe=/opt/compiler-explorer/clang-rocm-7.0.1/bin/clang++ +compiler.hipclang-rocm-70001.semver=7.0.1 +compiler.hipclang-rocm-70001.name=clang rocm-7.0.1 +compiler.hipclang-rocm-70001.nvdisasm=/opt/compiler-explorer/clang-rocm-7.0.1/bin/llvm-objdump +compiler.hipclang-rocm-70001.objdumper=/opt/compiler-explorer/clang-rocm-7.0.1/bin/llvm-objdump +compiler.hipclang-rocm-70001.options=-x hip --cuda-device-only -O3 --rocm-path=/opt/compiler-explorer/libs/rocm/7.0.1 -include hip/hip_runtime.h +compiler.hipclang-trunk-rocm-70001.exe=/opt/compiler-explorer/clang-assertions-trunk/bin/clang++ +compiler.hipclang-trunk-rocm-70001.semver=trunk-7.0.1 +compiler.hipclang-trunk-rocm-70001.name=clang trunk rocm-7.0.1 +compiler.hipclang-trunk-rocm-70001.nvdisasm=/opt/compiler-explorer/clang-assertions-trunk/bin/llvm-objdump +compiler.hipclang-trunk-rocm-70001.objdumper=/opt/compiler-explorer/clang-assertions-trunk/bin/llvm-objdump +compiler.hipclang-trunk-rocm-70001.options=-x hip --cuda-device-only -O3 --rocm-path=/opt/compiler-explorer/libs/rocm/7.0.1 -include hip/hip_runtime.h +compiler.hipclang-staging-rocm-70001.exe=/opt/compiler-explorer/clang-rocm-trunk/bin/clang++ +compiler.hipclang-staging-rocm-70001.semver=staging-7.0.1 +compiler.hipclang-staging-rocm-70001.name=clang staging rocm-7.0.1 +compiler.hipclang-staging-rocm-70001.nvdisasm=/opt/compiler-explorer/clang-rocm-trunk/bin/llvm-objdump +compiler.hipclang-staging-rocm-70001.objdumper=/opt/compiler-explorer/clang-rocm-trunk/bin/llvm-objdump +compiler.hipclang-staging-rocm-70001.options=-x hip --cuda-device-only -O3 --rocm-path=/opt/compiler-explorer/libs/rocm/7.0.1 -include hip/hip_runtime.h group.nvrtc.compilers=nvrtc130u1:nvrtc130:nvrtc129u1:nvrtc129:nvrtc128u1:nvrtc126u2:nvrtc126u1:nvrtc125u1:nvrtc124u1:nvrtc123u1:nvrtc122u1:nvrtc121:nvrtc120u1:nvrtc120:nvrtc118:nvrtc117u1:nvrtc117:nvrtc116u2:nvrtc116u1:nvrtc116:nvrtc115u2:nvrtc115u1:nvrtc115:nvrtc114u1:nvrtc114:nvrtc113u1:nvrtc113:nvrtc112u2:nvrtc112u1:nvrtc112:nvrtc111u1:nvrtc111:nvrtc11u1:nvrtc11 group.nvrtc.compilerType=nvrtc @@ -752,7 +770,7 @@ libs.nsimd.versions.22.path=/opt/compiler-explorer/libs/nsimd/v2.2/cuda/include libs.nsimd.versions.301.version=3.0.1 libs.nsimd.versions.301.path=/opt/compiler-explorer/libs/nsimd/v3.0.1/cuda/include libs.hip-amd.name=HIP (AMD Platform) -libs.hip-amd.versions=60400:60303:60204:60102:60002:50700:50203:50103:50002:40502 +libs.hip-amd.versions=70001:60400:60303:60204:60102:60002:50700:50203:50103:50002:40502 libs.hip-amd.url=https://github.com/ROCm-Developer-Tools/hipamd libs.hip-amd.versions.40502.version=4.5.2 libs.hip-amd.versions.40502.path=/opt/compiler-explorer/libs/rocm/4.5.2 @@ -774,3 +792,5 @@ libs.hip-amd.versions.60303.version=6.3.3 libs.hip-amd.versions.60303.path=/opt/compiler-explorer/libs/rocm/6.3.3 libs.hip-amd.versions.60400.version=6.4.0 libs.hip-amd.versions.60400.path=/opt/compiler-explorer/libs/rocm/6.4.0 +libs.hip-amd.versions.70001.version=7.0.1 +libs.hip-amd.versions.70001.path=/opt/compiler-explorer/libs/rocm/7.0.1 diff --git a/etc/config/ispc.amazon.properties b/etc/config/ispc.amazon.properties index 714440a47..20c15cfae 100644 --- a/etc/config/ispc.amazon.properties +++ b/etc/config/ispc.amazon.properties @@ -1,10 +1,13 @@ compilers=&ispc -defaultCompiler=ispc1281 +defaultCompiler=ispc1282 objdumper=/opt/compiler-explorer/gcc-14.2.0/bin/objdump -group.ispc.compilers=ispc1281:ispc1280:ispc1270:ispc1260:ispc1253:ispc1250:ispc1240:ispc1230:ispc1220:ispc1210:ispc1200:ispc1190:ispc1180:ispc1170:ispc1161:ispc1160:ispc1150:ispc1141:ispc1140:ispc1130:ispc1120:ispc1110:ispc1100:ispc192:ispc191:ispc-trunk +group.ispc.compilers=ispc1282:ispc1281:ispc1280:ispc1270:ispc1260:ispc1253:ispc1250:ispc1240:ispc1230:ispc1220:ispc1210:ispc1200:ispc1190:ispc1180:ispc1170:ispc1161:ispc1160:ispc1150:ispc1141:ispc1140:ispc1130:ispc1120:ispc1110:ispc1100:ispc192:ispc191:ispc-trunk group.ispc.isSemVer=true group.ispc.baseName=ispc +compiler.ispc1282.exe=/opt/compiler-explorer/ispc-1.28.2/bin/ispc +compiler.ispc1282.semver=1.28.2 +compiler.ispc1282.executableLinker=/opt/compiler-explorer/gcc-14.2.0/bin/gcc compiler.ispc1281.exe=/opt/compiler-explorer/ispc-1.28.1/bin/ispc compiler.ispc1281.semver=1.28.1 compiler.ispc1281.executableLinker=/opt/compiler-explorer/gcc-14.2.0/bin/gcc diff --git a/etc/scripts/gh_tool/README.md b/etc/scripts/gh_tool/README.md index fa116b9e0..980bf0f1d 100644 --- a/etc/scripts/gh_tool/README.md +++ b/etc/scripts/gh_tool/README.md @@ -31,7 +31,7 @@ uv run gh_tool find-duplicates --help ### find-duplicates -Finds potential duplicate issues in the compiler-explorer repository using text similarity (Damerau-Levenshtein algorithm via difflib.SequenceMatcher). +Finds potential duplicate issues in the compiler-explorer repository using text similarity analysis (difflib.SequenceMatcher). **Usage:** diff --git a/examples/ispc/default.ispc b/examples/ispc/default.ispc index 8d8ec61ac..cef0c92c6 100644 --- a/examples/ispc/default.ispc +++ b/examples/ispc/default.ispc @@ -1,10 +1,6 @@ // Type your code here, or load an example. varying int square_even(varying int num) { - if (num % 2 == 0) { - return num * num; - } else { - return num; - } + return (num % 2 == 0)? num * num: num; } // Uncomment this if you would like to execute the code diff --git a/static/history.ts b/static/history.ts index e3c0df11f..451b196bd 100644 --- a/static/history.ts +++ b/static/history.ts @@ -24,7 +24,7 @@ import _ from 'underscore'; import {localStorage} from './local.js'; -import {Sharing} from './sharing.js'; +import {SharingBase} from './sharing.js'; const maxHistoryEntries = 30; export type HistorySource = {dt: number; source: string}; @@ -100,7 +100,7 @@ export function trackHistory(layout: any) { let lastState: string | null = null; const debouncedPush = _.debounce(push, 500); layout.on('stateChanged', () => { - const stringifiedConfig = JSON.stringify(Sharing.filterComponentState(layout.toConfig())); + const stringifiedConfig = JSON.stringify(SharingBase.filterComponentState(layout.toConfig())); if (stringifiedConfig !== lastState) { lastState = stringifiedConfig; debouncedPush(stringifiedConfig); diff --git a/static/main.ts b/static/main.ts index 6ddd0a57f..7f2686a0c 100644 --- a/static/main.ts +++ b/static/main.ts @@ -64,7 +64,7 @@ import {Presentation} from './presentation.js'; import {Printerinator} from './print-view.js'; import {setupRealDark, takeUsersOutOfRealDark} from './real-dark.js'; import {Settings, SiteSettings} from './settings.js'; -import {Sharing} from './sharing.js'; +import {initialiseSharing} from './sharing.js'; import {Themer} from './themes.js'; import * as url from './url.js'; import {formatISODate, updateAndCalcTopBarHeight} from './utils.js'; @@ -779,7 +779,7 @@ function start() { History.trackHistory(layout); setupSiteTemplateWidgetButton(layout); - if (!options.embedded) new Sharing(layout); + initialiseSharing(layout, !!options.embedded); new Printerinator(hub, themer); hub.layout.eventHub.emit('settingsChange', settings); // Ensure everyone knows the settings diff --git a/static/sharing.ts b/static/sharing.ts index bdb1d1268..0bd150a95 100644 --- a/static/sharing.ts +++ b/static/sharing.ts @@ -85,10 +85,61 @@ const shareServices = { }, }; -export class Sharing { - private layout: GoldenLayout; - private lastState: any; +// Base class that handles state tracking and embedded link updates +export class SharingBase { + protected layout: GoldenLayout; + protected lastState: string | null = null; + constructor(layout: GoldenLayout) { + this.layout = layout; + this.initCallbacks(); + } + + protected initCallbacks(): void { + this.layout.on('stateChanged', this.onStateChanged.bind(this)); + } + + protected onStateChanged(): void { + const config = SharingBase.filterComponentState(this.layout.toConfig()); + this.ensureUrlIsNotOutdated(config); + + // Update embedded links if present (works in both modes) + if (options.embedded) { + const strippedToLast = window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/') + 1); + $('a.link').prop('href', strippedToLast + '#' + url.serialiseState(config)); + } + } + + protected ensureUrlIsNotOutdated(config: any): void { + const stringifiedConfig = JSON.stringify(config); + if (stringifiedConfig !== this.lastState) { + if (this.lastState != null && window.location.pathname !== window.httpRoot) { + window.history.replaceState(null, '', window.httpRoot); + } + this.lastState = stringifiedConfig; + } + } + + public static filterComponentState(config: any): any { + function filterComponentStateImpl(component: any) { + if (component.content) { + for (let i = 0; i < component.content.length; i++) { + filterComponentStateImpl(component.content[i]); + } + } + + if (component.componentState) { + delete component.componentState.selection; + } + } + + config = cloneDeep(config); + filterComponentStateImpl(config); + return config; + } +} + +export class Sharing extends SharingBase { private readonly share: JQuery; private readonly shareTooltipTarget: JQuery; private readonly shareShort: JQuery; @@ -100,9 +151,8 @@ export class Sharing { private clippyButton: ClipboardJS | null; private readonly shareLinkDialog: HTMLElement; - constructor(layout: any) { - this.layout = layout; - this.lastState = null; + constructor(layout: GoldenLayout) { + super(layout); this.shareLinkDialog = unwrap(document.getElementById('sharelinkdialog'), 'Share modal element not found'); this.share = $('#share'); @@ -119,17 +169,16 @@ export class Sharing { this.clippyButton = null; this.initButtons(); - this.initCallbacks(); + this.initFullCallbacks(); } - private initCallbacks(): void { + private initFullCallbacks(): void { this.layout.eventHub.on('displaySharingPopover', () => { this.openShareModalForType(LinkType.Short); }); this.layout.eventHub.on('copyShortLinkToClip', () => { this.copyLinkTypeToClipboard(LinkType.Short); }); - this.layout.on('stateChanged', this.onStateChanged.bind(this)); this.shareLinkDialog.addEventListener('show.bs.modal', this.onOpenModalPane.bind(this)); this.shareLinkDialog.addEventListener('hidden.bs.modal', this.onCloseModalPane.bind(this)); @@ -152,25 +201,6 @@ export class Sharing { }); } - private onStateChanged(): void { - const config = Sharing.filterComponentState(this.layout.toConfig()); - this.ensureUrlIsNotOutdated(config); - if (options.embedded) { - const strippedToLast = window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/') + 1); - $('a.link').prop('href', strippedToLast + '#' + url.serialiseState(config)); - } - } - - private ensureUrlIsNotOutdated(config: any): void { - const stringifiedConfig = JSON.stringify(config); - if (stringifiedConfig !== this.lastState) { - if (this.lastState != null && window.location.pathname !== window.httpRoot) { - window.history.replaceState(null, '', window.httpRoot); - } - this.lastState = stringifiedConfig; - } - } - private static bindToLinkType(bind: string): LinkType { switch (bind) { case 'Full': @@ -466,28 +496,6 @@ export class Sharing { return (navigator.clipboard as Clipboard | undefined) !== undefined; } - public static filterComponentState(config: any, keysToRemove: [string] = ['selection']): any { - function filterComponentStateImpl(component: any) { - if (component.content) { - for (let i = 0; i < component.content.length; i++) { - filterComponentStateImpl(component.content[i]); - } - } - - if (component.componentState) { - Object.keys(component.componentState) - .filter(e => keysToRemove.includes(e)) - .forEach(key => { - delete component.componentState[key]; - }); - } - } - - config = cloneDeep(config); - filterComponentStateImpl(config); - return config; - } - private static updateShares(container: JQuery, url: string): void { const baseTemplate = $('#share-item'); _.each(shareServices, (service, serviceName) => { @@ -508,3 +516,14 @@ export class Sharing { }); } } + +// Initialize sharing functionality based on whether we're in embedded mode or not +export function initialiseSharing(layout: GoldenLayout, isEmbedded: boolean): void { + if (isEmbedded) { + // Just create the base class for state tracking and link updates + new SharingBase(layout); + } else { + // Create full Sharing with all features + new Sharing(layout); + } +}