From a8690e3ca586a1a0af4efde944e60aa81a1d31a6 Mon Sep 17 00:00:00 2001 From: Luca Patrignani Date: Thu, 22 Aug 2024 10:56:27 +0200 Subject: [PATCH] Display named regions and function call regions --- src/renderer/renderer.ts | 2 ++ src/renderer/renderer_elements.ts | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/renderer/renderer.ts b/src/renderer/renderer.ts index 2320be2a..e31a204c 100644 --- a/src/renderer/renderer.ts +++ b/src/renderer/renderer.ts @@ -4859,6 +4859,8 @@ function relayoutSDFGBlock( switch (block.type) { case SDFGElementType.LoopRegion: case SDFGElementType.ControlFlowRegion: + case SDFGElementType.NamedRegion: + case SDFGElementType.FunctionCallRegion: return relayoutStateMachine( ctx, block as JsonSDFGControlFlowRegion, sdfg, sdfgList, stateParentList, omitAccessNodes, parent diff --git a/src/renderer/renderer_elements.ts b/src/renderer/renderer_elements.ts index e06b8343..d8219ece 100644 --- a/src/renderer/renderer_elements.ts +++ b/src/renderer/renderer_elements.ts @@ -45,6 +45,8 @@ export enum SDFGElementType { ControlFlowBlock = 'ControlFlowBlock', ControlFlowRegion = 'ControlFlowRegion', LoopRegion = 'LoopRegion', + NamedRegion = 'NamedRegion', + FunctionCallRegion = 'FunctionCallRegion' } function draw_summary_symbol( @@ -649,6 +651,10 @@ export class ControlFlowRegion extends ControlFlowBlock { } +export class NamedRegion extends ControlFlowRegion {} + +export class FunctionCallRegion extends ControlFlowRegion {} + export class State extends BasicBlock { public draw( @@ -3404,4 +3410,6 @@ export const SDFGElements: { [name: string]: typeof SDFGElement } = { BreakBlock, ContinueBlock, ReturnBlock, + NamedRegion, + FunctionCallRegion };