From 4c0ea08388dc220e184614f80940b4f1248c362c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bispo?= Date: Thu, 25 Jul 2024 21:58:10 +0100 Subject: [PATCH 01/20] [ClavaWeaver] $jp.setFirstChild and .setLastChild now return the replaced child, if any --- Clava-JS/src-api/Joinpoints.ts | 8 +- ClavaLaraApi/src-lara/clava/Joinpoints.js | 546 +------------- ClavaLaraApi/src-lara/clava/clava/Clava.js | 6 +- .../src-lara/clava/clava/ClavaCode.js | 11 +- .../src-lara/clava/clava/code/Inliner.js | 13 +- .../src-lara/clava/clava/code/Outliner.js | 29 +- .../src-lara/clava/clava/gprofer/Gprofer.js | 6 +- .../clava/clava/graphs/cfg/CfgBuilder.js | 7 +- .../clava/clava/graphs/scg/ScgNodeData.js | 3 +- .../graphs/scg/StaticCallGraphBuilder.js | 6 +- .../src-lara/clava/clava/hls/MathAnalysis.js | 9 +- .../src-lara/clava/clava/hls/MathHInfo.js | 10 +- .../clava/clava/hls/TraceInstrumentation.js | 11 +- .../clava/clava/liveness/LivenessUtils.js | 8 +- .../clava/clava/memoi/MemoiAnalysis.js | 4 +- .../src-lara/clava/clava/memoi/MemoiGen.js | 34 +- .../src-lara/clava/clava/memoi/MemoiProf.js | 19 +- .../src-lara/clava/clava/memoi/MemoiTarget.js | 11 +- .../clava/clava/memoi/_MemoiGenHelper.js | 19 +- .../clava/clava/opencl/KernelReplacerAuto.js | 4 +- .../src-lara/clava/clava/opt/Inlining.js | 7 +- .../clava/clava/opt/NormalizeToSubset.js | 5 +- .../clava/clava/pass/SimplifyReturnStmts.js | 4 +- .../clava/pass/SimplifySelectionStmts.js | 4 +- .../clava/clava/pass/SingleReturnFunction.js | 9 +- .../clava/clava/pass/TransformSwitchToIf.js | 4 +- .../src-lara/clava/clava/stats/OpsCounter.js | 6 +- .../clava/clava/stats/StaticOpsCounter.js | 11 +- .../clava/clava/util/ClavaDataStore.js | 4 +- .../clava/clava/vitishls/VitisHlsUtils.js | 3 +- ClavaLaraApi/src-lara/clava/core.js | 6 - .../lara/benchmark/ClavaBenchmarkInstance.js | 3 +- .../src-lara/clava/lara/code/Timer.js | 11 +- .../clava/weaverspecs/actionModel.xml | 8 +- .../up/fe/specs/clava/weaver/CxxActions.java | 4 +- .../up/fe/specs/clava/weaver/CxxWeaver.json | 688 +++++++++--------- .../weaver/abstracts/ACxxWeaverJoinPoint.java | 35 +- .../joinpoints/AAccessSpecifier.java | 12 +- .../abstracts/joinpoints/AAdjustedType.java | 12 +- .../abstracts/joinpoints/AArrayAccess.java | 12 +- .../abstracts/joinpoints/AArrayType.java | 12 +- .../abstracts/joinpoints/ABinaryOp.java | 12 +- .../weaver/abstracts/joinpoints/ABody.java | 12 +- .../abstracts/joinpoints/ABoolLiteral.java | 12 +- .../weaver/abstracts/joinpoints/ABreak.java | 12 +- .../abstracts/joinpoints/ABuiltinType.java | 12 +- .../weaver/abstracts/joinpoints/ACall.java | 14 +- .../weaver/abstracts/joinpoints/ACase.java | 12 +- .../weaver/abstracts/joinpoints/ACast.java | 12 +- .../weaver/abstracts/joinpoints/ACilkFor.java | 12 +- .../abstracts/joinpoints/ACilkSpawn.java | 12 +- .../abstracts/joinpoints/ACilkSync.java | 12 +- .../weaver/abstracts/joinpoints/AClass.java | 12 +- .../abstracts/joinpoints/AContinue.java | 12 +- .../abstracts/joinpoints/ACudaKernelCall.java | 12 +- .../abstracts/joinpoints/ADeclStmt.java | 12 +- .../abstracts/joinpoints/ADeclarator.java | 12 +- .../abstracts/joinpoints/ADeleteExpr.java | 12 +- .../abstracts/joinpoints/AElaboratedType.java | 12 +- .../abstracts/joinpoints/AEmptyStmt.java | 12 +- .../abstracts/joinpoints/AEnumDecl.java | 12 +- .../abstracts/joinpoints/AEnumType.java | 12 +- .../abstracts/joinpoints/AEnumeratorDecl.java | 12 +- .../abstracts/joinpoints/AExprStmt.java | 12 +- .../weaver/abstracts/joinpoints/AField.java | 12 +- .../weaver/abstracts/joinpoints/AFile.java | 20 +- .../abstracts/joinpoints/AFloatLiteral.java | 12 +- .../abstracts/joinpoints/AFunction.java | 36 +- .../abstracts/joinpoints/AFunctionType.java | 12 +- .../abstracts/joinpoints/AGotoStmt.java | 12 +- .../weaver/abstracts/joinpoints/AIf.java | 12 +- .../abstracts/joinpoints/AImplicitValue.java | 12 +- .../weaver/abstracts/joinpoints/AInclude.java | 12 +- .../abstracts/joinpoints/AInitList.java | 12 +- .../abstracts/joinpoints/AIntLiteral.java | 12 +- .../abstracts/joinpoints/AJoinPoint.java | 82 ++- .../abstracts/joinpoints/ALabelDecl.java | 12 +- .../abstracts/joinpoints/ALabelStmt.java | 12 +- .../weaver/abstracts/joinpoints/ALiteral.java | 12 +- .../weaver/abstracts/joinpoints/ALoop.java | 16 +- .../weaver/abstracts/joinpoints/AMarker.java | 12 +- .../abstracts/joinpoints/AMemberAccess.java | 12 +- .../abstracts/joinpoints/AMemberCall.java | 12 +- .../weaver/abstracts/joinpoints/AMethod.java | 12 +- .../abstracts/joinpoints/ANamedDecl.java | 12 +- .../weaver/abstracts/joinpoints/ANewExpr.java | 12 +- .../weaver/abstracts/joinpoints/AOmp.java | 12 +- .../weaver/abstracts/joinpoints/AOp.java | 12 +- .../weaver/abstracts/joinpoints/AParam.java | 12 +- .../abstracts/joinpoints/AParenExpr.java | 12 +- .../abstracts/joinpoints/AParenType.java | 12 +- .../abstracts/joinpoints/APointerType.java | 12 +- .../weaver/abstracts/joinpoints/AProgram.java | 10 +- .../abstracts/joinpoints/AQualType.java | 12 +- .../weaver/abstracts/joinpoints/ARecord.java | 12 +- .../abstracts/joinpoints/AReturnStmt.java | 12 +- .../weaver/abstracts/joinpoints/AScope.java | 48 +- .../weaver/abstracts/joinpoints/AStruct.java | 12 +- .../weaver/abstracts/joinpoints/ASwitch.java | 12 +- .../weaver/abstracts/joinpoints/ATag.java | 12 +- .../weaver/abstracts/joinpoints/ATagType.java | 12 +- .../ATemplateSpecializationType.java | 12 +- .../abstracts/joinpoints/ATernaryOp.java | 12 +- .../weaver/abstracts/joinpoints/AThis.java | 12 +- .../weaver/abstracts/joinpoints/AType.java | 10 +- .../abstracts/joinpoints/ATypedefDecl.java | 12 +- .../joinpoints/ATypedefNameDecl.java | 12 +- .../abstracts/joinpoints/ATypedefType.java | 12 +- .../joinpoints/AUnaryExprOrType.java | 12 +- .../weaver/abstracts/joinpoints/AUnaryOp.java | 12 +- .../abstracts/joinpoints/AUndefinedType.java | 12 +- .../weaver/abstracts/joinpoints/AVardecl.java | 16 +- .../joinpoints/AVariableArrayType.java | 12 +- .../weaver/abstracts/joinpoints/AVarref.java | 12 +- .../abstracts/joinpoints/AWrapperStmt.java | 12 +- .../weaver/joinpoints/CxxExpression.java | 2 +- .../clava/weaver/joinpoints/CxxProgram.java | 2 +- 117 files changed, 1096 insertions(+), 1564 deletions(-) diff --git a/Clava-JS/src-api/Joinpoints.ts b/Clava-JS/src-api/Joinpoints.ts index d29d515b5..6d17e3f28 100644 --- a/Clava-JS/src-api/Joinpoints.ts +++ b/Clava-JS/src-api/Joinpoints.ts @@ -484,9 +484,9 @@ export class Joinpoint extends LaraJoinPoint { */ setData(source: object): void { return wrapJoinPoint(this._javaObject.setData(JSON.stringify(source))); } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. */ - setFirstChild(node: Joinpoint): void { return wrapJoinPoint(this._javaObject.setFirstChild(unwrapJoinPoint(node))); } + setFirstChild(node: Joinpoint): Joinpoint { return wrapJoinPoint(this._javaObject.setFirstChild(unwrapJoinPoint(node))); } /** * Sets the commented that are embedded in a node */ @@ -500,9 +500,9 @@ export class Joinpoint extends LaraJoinPoint { */ setInlineComments(p1: string[] | string): void { return wrapJoinPoint(this._javaObject.setInlineComments(unwrapJoinPoint(p1))); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. */ - setLastChild(node: Joinpoint): void { return wrapJoinPoint(this._javaObject.setLastChild(unwrapJoinPoint(node))); } + setLastChild(node: Joinpoint): Joinpoint { return wrapJoinPoint(this._javaObject.setLastChild(unwrapJoinPoint(node))); } /** * Sets the type of a node, if it has a type */ diff --git a/ClavaLaraApi/src-lara/clava/Joinpoints.js b/ClavaLaraApi/src-lara/clava/Joinpoints.js index e329dc0b5..187bac7fd 100644 --- a/ClavaLaraApi/src-lara/clava/Joinpoints.js +++ b/ClavaLaraApi/src-lara/clava/Joinpoints.js @@ -10,12 +10,6 @@ /* eslint-disable @typescript-eslint/no-duplicate-type-constituents */ import { LaraJoinPoint, registerJoinpointMapper, wrapJoinPoint, unwrapJoinPoint, } from "lara-js/api/LaraJoinPoint.js"; export class Joinpoint extends LaraJoinPoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * String with a dump of the AST representation starting from this node. This representation corresponds to the internal Java representation of the ClavaAst, where the node names correspond to Java classes. To get an equivalent representation with join point names, use the attribute 'dump' */ @@ -354,35 +348,17 @@ export class Joinpoint extends LaraJoinPoint { toComment(prefix = "", suffix = "") { return wrapJoinPoint(this._javaObject.toComment(unwrapJoinPoint(prefix), unwrapJoinPoint(suffix))); } } export class Attribute extends Joinpoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get kind() { return wrapJoinPoint(this._javaObject.getKind()); } } /** * Utility joinpoint, to represent certain problems when generating join points */ export class ClavaException extends Joinpoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get exception() { return wrapJoinPoint(this._javaObject.getException()); } get exceptionType() { return wrapJoinPoint(this._javaObject.getExceptionType()); } get message() { return wrapJoinPoint(this._javaObject.getMessage()); } } export class Comment extends Joinpoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get text() { return wrapJoinPoint(this._javaObject.getText()); } set text(value) { this._javaObject.setText(unwrapJoinPoint(value)); } setText(text) { return wrapJoinPoint(this._javaObject.setText(unwrapJoinPoint(text))); } @@ -391,12 +367,6 @@ export class Comment extends Joinpoint { * Represents one declaration (e.g., int foo(){return 0;}) or definition (e.g., int foo();) in the code */ export class Decl extends Joinpoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * The attributes (e.g. Pure, CUDAGlobal) associated to this decl */ @@ -406,20 +376,8 @@ export class Decl extends Joinpoint { * Utility joinpoint, to represent empty nodes when directly accessing the tree */ export class Empty extends Joinpoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; } export class Expression extends Joinpoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * A 'decl' join point that represents the declaration associated with this expression, or undefined if there is none */ @@ -439,12 +397,7 @@ export class Expression extends Joinpoint { * Represents a source file (.c, .cpp., .cl, etc) */ export class FileJp extends Joinpoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; /** * The path to the source folder that was given as the base folder of this file */ @@ -563,23 +516,12 @@ export class FileJp extends Joinpoint { write(destinationFoldername) { return wrapJoinPoint(this._javaObject.write(unwrapJoinPoint(destinationFoldername))); } } export class ImplicitValue extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; } /** * Represents an include directive (e.g., #include ) */ export class Include extends Decl { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; /** * True if this is an angled include (i.e., system include) */ @@ -594,32 +536,14 @@ export class Include extends Decl { get relativeFolderpath() { return wrapJoinPoint(this._javaObject.getRelativeFolderpath()); } } export class InitList extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * [May be undefined] If this initializer list initializes an array with more elements than there are initializers in the list, specifies an expression to be used for value initialization of the rest of the elements */ get arrayFiller() { return wrapJoinPoint(this._javaObject.getArrayFiller()); } } export class Literal extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; } export class MemberAccess extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * True if this is a member access that uses arrow (i.e., foo->bar), false if uses dot (i.e., foo.bar) */ @@ -641,12 +565,7 @@ export class MemberAccess extends Expression { * Represents a decl with a name */ export class NamedDecl extends Decl { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; get isPublic() { return wrapJoinPoint(this._javaObject.getIsPublic()); } get name() { return wrapJoinPoint(this._javaObject.getName()); } set name(value) { this._javaObject.setName(unwrapJoinPoint(value)); } @@ -668,20 +587,8 @@ export class NamedDecl extends Decl { setQualifiedPrefix(qualifiedPrefix) { return wrapJoinPoint(this._javaObject.setQualifiedPrefix(unwrapJoinPoint(qualifiedPrefix))); } } export class NewExpr extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; } export class Op extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get isBitwise() { return wrapJoinPoint(this._javaObject.getIsBitwise()); } /** * The kind of the operator. If it is a binary operator, can be one of: ptr_mem_d, ptr_mem_i, mul, div, rem, add, sub, shl, shr, cmp, lt, gt, le, ge, eq, ne, and, xor, or, l_and, l_or, assign, mul_assign, div_assign, rem_assign, add_assign, sub_assign, shl_assign, shr_assign, and_assign, xor_assign, or_assign, comma. If it is a unary operator, can be one of: post_inc, post_dec, pre_inc, pre_dec, addr_of, deref, plus, minus, not, l_not, real, imag, extension, cowait. @@ -690,12 +597,6 @@ export class Op extends Expression { get operator() { return wrapJoinPoint(this._javaObject.getOperator()); } } export class ParenExpr extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * Returns the expression inside this parenthesis expression */ @@ -705,12 +606,7 @@ export class ParenExpr extends Expression { * Represents a pragma in the code (e.g., #pragma kernel) */ export class Pragma extends Joinpoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; /** * Everything that is after the name of the pragma */ @@ -742,12 +638,7 @@ export class Pragma extends Joinpoint { * Represents the complete program and is the top-most joinpoint in the hierarchy */ export class Program extends Joinpoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; get baseFolder() { return wrapJoinPoint(this._javaObject.getBaseFolder()); } get defaultFlags() { return wrapJoinPoint(this._javaObject.getDefaultFlags()); } /** @@ -847,12 +738,7 @@ export class Program extends Joinpoint { * Common class of struct, union and class */ export class RecordJp extends NamedDecl { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; get fields() { return wrapJoinPoint(this._javaObject.getFields()); } get functions() { return wrapJoinPoint(this._javaObject.getFunctions()); } /** @@ -870,12 +756,6 @@ export class RecordJp extends NamedDecl { addField(field) { return wrapJoinPoint(this._javaObject.addField(unwrapJoinPoint(field))); } } export class Statement extends Joinpoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get isFirst() { return wrapJoinPoint(this._javaObject.getIsFirst()); } get isLast() { return wrapJoinPoint(this._javaObject.getIsLast()); } } @@ -883,20 +763,9 @@ export class Statement extends Joinpoint { * Represets a struct declaration */ export class Struct extends RecordJp { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; } export class Switch extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * The case statements inside this switch */ @@ -918,43 +787,20 @@ export class Switch extends Statement { * A pragma that references a point in the code and sticks to it */ export class Tag extends Pragma { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "id", - }; + static _defaultAttribute = "id"; /** * The ID of the pragma */ get id() { return wrapJoinPoint(this._javaObject.getId()); } } export class TernaryOp extends Op { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get cond() { return wrapJoinPoint(this._javaObject.getCond()); } get falseExpr() { return wrapJoinPoint(this._javaObject.getFalseExpr()); } get trueExpr() { return wrapJoinPoint(this._javaObject.getTrueExpr()); } } export class This extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; } export class Type extends Joinpoint { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get arrayDims() { return wrapJoinPoint(this._javaObject.getArrayDims()); } get arraySize() { return wrapJoinPoint(this._javaObject.getArraySize()); } get constant() { return wrapJoinPoint(this._javaObject.getConstant()); } @@ -1029,23 +875,12 @@ export class Type extends Joinpoint { * Base node for declarations which introduce a typedef-name */ export class TypedefNameDecl extends NamedDecl { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; } /** * Represents the type of a typedef. */ export class TypedefType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * The typedef declaration associated with this typedef type */ @@ -1056,12 +891,6 @@ export class TypedefType extends Type { get underlyingType() { return wrapJoinPoint(this._javaObject.getUnderlyingType()); } } export class UnaryExprOrType extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get argExpr() { return wrapJoinPoint(this._javaObject.getArgExpr()); } get argType() { return wrapJoinPoint(this._javaObject.getArgType()); } set argType(value) { this._javaObject.setArgType(unwrapJoinPoint(value)); } @@ -1071,33 +900,16 @@ export class UnaryExprOrType extends Expression { setArgType(argType) { return wrapJoinPoint(this._javaObject.setArgType(unwrapJoinPoint(argType))); } } export class UnaryOp extends Op { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get isPointerDeref() { return wrapJoinPoint(this._javaObject.getIsPointerDeref()); } get operand() { return wrapJoinPoint(this._javaObject.getOperand()); } } export class UndefinedType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; } /** * A reference to a variable */ export class Varref extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; get declaration() { return wrapJoinPoint(this._javaObject.getDeclaration()); } /** * True if this variable reference has a MS-style property, false otherwise @@ -1121,46 +933,23 @@ export class Varref extends Expression { setName(name) { return wrapJoinPoint(this._javaObject.setName(unwrapJoinPoint(name))); } } export class WrapperStmt extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get content() { return wrapJoinPoint(this._javaObject.getContent()); } get kind() { return wrapJoinPoint(this._javaObject.getKind()); } } export class AccessSpecifier extends Decl { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "kind", - }; + static _defaultAttribute = "kind"; /** * The type of specifier. Can return 'public', 'protected', 'private' or 'none' */ get kind() { return wrapJoinPoint(this._javaObject.getKind()); } } export class AdjustedType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * The type that is being adjusted */ get originalType() { return wrapJoinPoint(this._javaObject.getOriginalType()); } } export class ArrayAccess extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * Expression representing the variable of the array access (can be a varref, memberAccess...) */ @@ -1183,12 +972,6 @@ export class ArrayAccess extends Expression { get subscript() { return wrapJoinPoint(this._javaObject.getSubscript()); } } export class ArrayType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get elementType() { return wrapJoinPoint(this._javaObject.getElementType()); } set elementType(value) { this._javaObject.setElementType(unwrapJoinPoint(value)); } /** @@ -1197,12 +980,6 @@ export class ArrayType extends Type { setElementType(arrayElementType) { return wrapJoinPoint(this._javaObject.setElementType(unwrapJoinPoint(arrayElementType))); } } export class BinaryOp extends Op { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get isAssignment() { return wrapJoinPoint(this._javaObject.getIsAssignment()); } get left() { return wrapJoinPoint(this._javaObject.getLeft()); } set left(value) { this._javaObject.setLeft(unwrapJoinPoint(value)); } @@ -1212,33 +989,15 @@ export class BinaryOp extends Op { setRight(right) { return wrapJoinPoint(this._javaObject.setRight(unwrapJoinPoint(right))); } } export class BoolLiteral extends Literal { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get value() { return wrapJoinPoint(this._javaObject.getValue()); } } export class Break extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * The enclosing statement related to this break. It should be either a loop or a switch statement. */ get enclosingStmt() { return wrapJoinPoint(this._javaObject.getEnclosingStmt()); } } export class BuiltinType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get builtinKind() { return wrapJoinPoint(this._javaObject.getBuiltinKind()); } /** * True, if ot is a floating type (e.g., float, double) @@ -1262,12 +1021,7 @@ export class BuiltinType extends Type { get isVoid() { return wrapJoinPoint(this._javaObject.getIsVoid()); } } export class Call extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; /** * An alias for 'args' */ @@ -1332,12 +1086,6 @@ export class Call extends Expression { wrap(name) { return wrapJoinPoint(this._javaObject.wrap(unwrapJoinPoint(name))); } } export class Case extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * The instructions that are associated with this case in the source code. This does not represent what instructions are actually executed (e.g., if a case does not have a break, does not show instructions of the next case) */ @@ -1364,12 +1112,6 @@ export class Case extends Statement { get values() { return wrapJoinPoint(this._javaObject.getValues()); } } export class Cast extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get fromType() { return wrapJoinPoint(this._javaObject.getFromType()); } /** * @deprecated Use expr.implicitCast instead @@ -1379,31 +1121,15 @@ export class Cast extends Expression { get toType() { return wrapJoinPoint(this._javaObject.getToType()); } } export class CilkSpawn extends Call { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; } export class CilkSync extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; } /** * Represents a C++ class */ export class Class extends RecordJp { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; /** * All the classes this class inherits from */ @@ -1450,32 +1176,15 @@ export class Class extends RecordJp { addMethod(method) { return wrapJoinPoint(this._javaObject.addMethod(unwrapJoinPoint(method))); } } export class Continue extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; } export class CudaKernelCall extends Call { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; get config() { return wrapJoinPoint(this._javaObject.getConfig()); } set config(value) { this._javaObject.setConfig(unwrapJoinPoint(value)); } setConfig(args) { return wrapJoinPoint(this._javaObject.setConfig(unwrapJoinPoint(args))); } setConfigFromStrings(args) { return wrapJoinPoint(this._javaObject.setConfigFromStrings(unwrapJoinPoint(args))); } } export class DeclStmt extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * The declarations in this statement */ @@ -1485,31 +1194,14 @@ export class DeclStmt extends Statement { * Represents a decl that comes from a declarator (e.g., function, field, variable) */ export class Declarator extends NamedDecl { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; } export class DeleteExpr extends Expression { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; } /** * Represents a type that was referred to using an elaborated type keyword, e.g., struct S, or via a qualified name, e.g., N::M::type, or both. This type is used to keep track of a type name as written in the source code, including tag keywords and any nested-name-specifiers. The type itself is always 'sugar', used to express what was written in the source code but containing no additional semantic information. */ export class ElaboratedType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * The keyword of this elaborated type, if present. Can be one of: struct, interface, union, class, enum, typename */ @@ -1524,40 +1216,18 @@ export class ElaboratedType extends Type { get qualifier() { return wrapJoinPoint(this._javaObject.getQualifier()); } } export class EmptyStmt extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; } /** * Represents an enum */ export class EnumDecl extends NamedDecl { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; get enumerators() { return wrapJoinPoint(this._javaObject.getEnumerators()); } } export class EnumeratorDecl extends NamedDecl { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; } export class ExprStmt extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * The expression join point associated to this exprStmt */ @@ -1567,32 +1237,16 @@ export class ExprStmt extends Statement { * Represents a member of a struct/union/class */ export class Field extends Declarator { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; } export class FloatLiteral extends Literal { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get value() { return wrapJoinPoint(this._javaObject.getValue()); } } /** * Represents a function declaration or definition */ export class FunctionJp extends Declarator { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; get body() { return wrapJoinPoint(this._javaObject.getBody()); } set body(value) { this._javaObject.setBody(unwrapJoinPoint(value)); } get calls() { return wrapJoinPoint(this._javaObject.getCalls()); } @@ -1706,12 +1360,6 @@ export class FunctionJp extends Declarator { setReturnType(returnType) { return wrapJoinPoint(this._javaObject.setReturnType(unwrapJoinPoint(returnType))); } } export class FunctionType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get paramTypes() { return wrapJoinPoint(this._javaObject.getParamTypes()); } get returnType() { return wrapJoinPoint(this._javaObject.getReturnType()); } set returnType(value) { this._javaObject.setReturnType(unwrapJoinPoint(value)); } @@ -1725,12 +1373,6 @@ export class FunctionType extends Type { setReturnType(newType) { return wrapJoinPoint(this._javaObject.setReturnType(unwrapJoinPoint(newType))); } } export class GotoStmt extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get label() { return wrapJoinPoint(this._javaObject.getLabel()); } set label(value) { this._javaObject.setLabel(unwrapJoinPoint(value)); } /** @@ -1739,12 +1381,6 @@ export class GotoStmt extends Statement { setLabel(label) { return wrapJoinPoint(this._javaObject.setLabel(unwrapJoinPoint(label))); } } export class If extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get cond() { return wrapJoinPoint(this._javaObject.getCond()); } set cond(value) { this._javaObject.setCond(unwrapJoinPoint(value)); } get condDecl() { return wrapJoinPoint(this._javaObject.getCondDecl()); } @@ -1766,29 +1402,12 @@ export class If extends Statement { setThen(then) { return wrapJoinPoint(this._javaObject.setThen(unwrapJoinPoint(then))); } } export class IntLiteral extends Literal { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get value() { return wrapJoinPoint(this._javaObject.getValue()); } } export class LabelDecl extends NamedDecl { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; } export class LabelStmt extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get decl() { return wrapJoinPoint(this._javaObject.getDecl()); } set decl(value) { this._javaObject.setDecl(unwrapJoinPoint(value)); } /** @@ -1797,12 +1416,7 @@ export class LabelStmt extends Statement { setDecl(label) { return wrapJoinPoint(this._javaObject.setDecl(unwrapJoinPoint(label))); } } export class Loop extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "kind", - }; + static _defaultAttribute = "kind"; get body() { return wrapJoinPoint(this._javaObject.getBody()); } set body(value) { this._javaObject.setBody(unwrapJoinPoint(value)); } /** @@ -1923,12 +1537,7 @@ export class Loop extends Statement { * Special pragma that can be used to mark scopes (e.g., #pragma lara marker loop1) */ export class Marker extends Pragma { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "id", - }; + static _defaultAttribute = "id"; /** * A scope, associated with this marker */ @@ -1936,12 +1545,7 @@ export class Marker extends Pragma { get id() { return wrapJoinPoint(this._javaObject.getId()); } } export class MemberCall extends Call { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; get base() { return wrapJoinPoint(this._javaObject.getBase()); } get rootBase() { return wrapJoinPoint(this._javaObject.getRootBase()); } } @@ -1949,12 +1553,7 @@ export class MemberCall extends Call { * Represents a C++ class method declaration or definition */ export class Method extends FunctionJp { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; get record() { return wrapJoinPoint(this._javaObject.getRecord()); } /** * Removes the of the method @@ -1965,12 +1564,7 @@ export class Method extends FunctionJp { * Represents an OpenMP pragma (e.g., #pragma omp parallel) */ export class Omp extends Pragma { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "kind", - }; + static _defaultAttribute = "kind"; /** * The names of the kinds of all clauses in the pragma, or empty array if no clause is defined */ @@ -2169,12 +1763,6 @@ export class Omp extends Pragma { setShared(newVariables) { return wrapJoinPoint(this._javaObject.setShared(unwrapJoinPoint(newVariables))); } } export class ParenType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get innerType() { return wrapJoinPoint(this._javaObject.getInnerType()); } set innerType(value) { this._javaObject.setInnerType(unwrapJoinPoint(value)); } /** @@ -2183,12 +1771,6 @@ export class ParenType extends Type { setInnerType(innerType) { return wrapJoinPoint(this._javaObject.setInnerType(unwrapJoinPoint(innerType))); } } export class PointerType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get pointee() { return wrapJoinPoint(this._javaObject.getPointee()); } set pointee(value) { this._javaObject.setPointee(unwrapJoinPoint(value)); } /** @@ -2201,34 +1783,16 @@ export class PointerType extends Type { setPointee(pointeeType) { return wrapJoinPoint(this._javaObject.setPointee(unwrapJoinPoint(pointeeType))); } } export class QualType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get qualifiers() { return wrapJoinPoint(this._javaObject.getQualifiers()); } get unqualifiedType() { return wrapJoinPoint(this._javaObject.getUnqualifiedType()); } } export class ReturnStmt extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get returnExpr() { return wrapJoinPoint(this._javaObject.getReturnExpr()); } } /** * Represents a group of statements */ export class Scope extends Statement { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * Returns the descendant statements of this scope, excluding other scopes, loops, ifs and wrapper statements */ @@ -2283,12 +1847,6 @@ export class Scope extends Statement { setNaked(isNaked) { return wrapJoinPoint(this._javaObject.setNaked(unwrapJoinPoint(isNaked))); } } export class TagType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; /** * A 'decl' join point that represents the declaration of this tag type */ @@ -2296,12 +1854,6 @@ export class TagType extends Type { get name() { return wrapJoinPoint(this._javaObject.getName()); } } export class TemplateSpecializationType extends Type { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get args() { return wrapJoinPoint(this._javaObject.getArgs()); } get firstArgType() { return wrapJoinPoint(this._javaObject.getFirstArgType()); } get numArgs() { return wrapJoinPoint(this._javaObject.getNumArgs()); } @@ -2311,23 +1863,13 @@ export class TemplateSpecializationType extends Type { * Declaration of a typedef-name via the 'typedef' type specifier */ export class TypedefDecl extends TypedefNameDecl { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; } /** * Represents a variable declaration or definition */ export class Vardecl extends Declarator { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; /** * The vardecl corresponding to the actual definition. For global variables, returns the vardecl of the file where it is actually defined (instead of the vardecl that defines an external link to the variable) */ @@ -2382,12 +1924,6 @@ export class Vardecl extends Declarator { varref() { return wrapJoinPoint(this._javaObject.varref()); } } export class VariableArrayType extends ArrayType { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get sizeExpr() { return wrapJoinPoint(this._javaObject.getSizeExpr()); } set sizeExpr(value) { this._javaObject.setSizeExpr(unwrapJoinPoint(value)); } /** @@ -2396,37 +1932,15 @@ export class VariableArrayType extends ArrayType { setSizeExpr(sizeExpr) { return wrapJoinPoint(this._javaObject.setSizeExpr(unwrapJoinPoint(sizeExpr))); } } export class Body extends Scope { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; } export class CilkFor extends Loop { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "kind", - }; + static _defaultAttribute = "kind"; } export class EnumType extends TagType { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: null, - }; get integerType() { return wrapJoinPoint(this._javaObject.getIntegerType()); } } export class Param extends Vardecl { - /** - * @hidden - */ - static _defaultAttributeInfo = { - name: "name", - }; + static _defaultAttribute = "name"; } export var StorageClass; (function (StorageClass) { diff --git a/ClavaLaraApi/src-lara/clava/clava/Clava.js b/ClavaLaraApi/src-lara/clava/clava/Clava.js index 09057805a..a19483924 100644 --- a/ClavaLaraApi/src-lara/clava/clava/Clava.js +++ b/ClavaLaraApi/src-lara/clava/clava/Clava.js @@ -67,7 +67,7 @@ extern "C" { #endif`; /** * Launches a Clava weaving session. - * @param args - The arguments to pass to the weaver, as if it was launched from the command-line + * @param {(string|Array)} args - The arguments to pass to the weaver, as if it was launched from the command-line * @returns True if the weaver execution without problems, false otherwise */ static runClava(args) { @@ -163,14 +163,14 @@ extern "C" { } /** * - * @returns A list of join points representing available user includes + * @returns {J#List} a list of join points representing available user includes */ static getAvailableIncludes() { return ClavaJavaTypes.CxxWeaverApi.getAvailableUserIncludes(); } /** * - * @returns {J#Set} A set with paths to the include folders of the current configuration. + * @returns {J#Set} a set with paths to the include folders of the current configuration. */ static getIncludeFolders() { return ClavaJavaTypes.CxxWeaverApi.getIncludeFolders(); diff --git a/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js b/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js index 1cad9d8e3..7ae0643e0 100644 --- a/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js +++ b/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js @@ -1,7 +1,7 @@ import Io from "lara-js/api/lara/Io.js"; import { debug } from "lara-js/api/lara/core/LaraCore.js"; import Query from "lara-js/api/weaver/Query.js"; -import { FileJp, FunctionJp, If, Loop, StorageClass, Vardecl, } from "../Joinpoints.js"; +import { FunctionJp, If, Loop, StorageClass, Vardecl, } from "../Joinpoints.js"; import Clava from "./Clava.js"; /** * Utility methods related with the source code. @@ -37,7 +37,8 @@ export default class ClavaCode { const staticVerification = true; const includes = new Set(); let bodyCode = ""; - for (const $file of Query.search(FileJp)) { + for (const $f of Query.search("file")) { + const $file = $f; if ($file.isHeader) { continue; } @@ -69,14 +70,12 @@ export default class ClavaCode { let changedCode = false; // Look for static declarations for (const child of $file.children) { - if (child instanceof FunctionJp && - child.storageClass === StorageClass.STATIC) { + if (child instanceof FunctionJp && child.storageClass === StorageClass.STATIC) { const newName = child.name + "_static_rename"; child.name = newName; changedCode = true; } - if (child instanceof Vardecl && - child.storageClass === StorageClass.STATIC) { + if (child instanceof Vardecl && child.storageClass === StorageClass.STATIC) { console.log(child.code); throw "Not yet supported for static variable declarations"; } diff --git a/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js b/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js index 98ed54f4c..b7f1401e7 100644 --- a/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js +++ b/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js @@ -1,6 +1,6 @@ import { debug } from "lara-js/api/lara/core/LaraCore.js"; import Query from "lara-js/api/weaver/Query.js"; -import { BinaryOp, Call, Expression, GotoStmt, Joinpoint, LabelDecl, LabelStmt, ParenExpr, ParenType, PointerType, StorageClass, Vardecl, VariableArrayType, Varref, } from "../../Joinpoints.js"; +import { BinaryOp, Call, Expression, GotoStmt, LabelStmt, ParenExpr, ParenType, PointerType, StorageClass, Vardecl, VariableArrayType, Varref, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class Inliner { options; @@ -227,7 +227,8 @@ export default class Inliner { // should be added const $parentFunction = $call.getAncestor("function"); const addedDeclarations = new Set(); - for (const $newCall of Query.searchFrom($newNodes, Call)) { + for (const $jp of Query.searchFrom($newNodes, "call")) { + const $newCall = $jp; // Ignore functions that are part of the system headers if ($newCall.function.isInSystemHeader) { continue; @@ -260,7 +261,7 @@ export default class Inliner { // Maps label names to new LabelDecl const newLabels = {}; // Visit all gotoStmt and labelStmt - for (const jp of Query.search(Joinpoint, { + for (const jp of Query.search("joinpoint", { self: ($jp) => $jp instanceof GotoStmt || $jp instanceof LabelStmt, })) { const $jp = jp; @@ -282,7 +283,8 @@ export default class Inliner { } } // If there are any label decls, rename them - for (const $labelDecl of Query.search(LabelDecl)) { + for (const $jp of Query.search("labelDecl")) { + const $labelDecl = $jp; const $newLabelDecl = newLabels[$labelDecl.name]; $labelDecl.replaceWith($newLabelDecl); } @@ -427,7 +429,8 @@ export default class Inliner { // TODO: I have no idea if this type cast is correct. const $sizeExprCopy = type.sizeExpr.copy(); // Update any children of sizeExpr - for (const $varRef of Query.searchFrom($sizeExprCopy, Varref)) { + for (const $jp of Query.searchFrom($sizeExprCopy, "varref")) { + const $varRef = $jp; const $newVarref = this.updateVarRef($varRef, $call, newVariableMap); if ($newVarref !== $varRef) { hasChanges = true; diff --git a/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js b/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js index 0fd61d64f..956a7ec16 100644 --- a/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js +++ b/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js @@ -1,6 +1,6 @@ import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; import Query from "lara-js/api/weaver/Query.js"; -import { AdjustedType, ArrayType, BuiltinType, Decl, DeclStmt, FileJp, FunctionJp, Param, PointerType, ReturnStmt, Statement, Vardecl, Varref, } from "../../Joinpoints.js"; +import { AdjustedType, ArrayType, BuiltinType, DeclStmt, FileJp, FunctionJp, PointerType, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class Outliner { verbose = true; @@ -202,7 +202,8 @@ export default class Outliner { } findGlobalVars() { const globals = []; - for (const decl of Query.search(Vardecl)) { + for (const jp of Query.search("vardecl")) { + const decl = jp; if (decl.isGlobal) { globals.push(decl); } @@ -218,12 +219,14 @@ export default class Outliner { const decls = []; // get decls from the prologue for (const stmt of prologue) { - for (const decl of Query.searchFrom(stmt, Vardecl)) { + for (const jp of Query.searchFrom(stmt, "vardecl")) { + const decl = jp; decls.push(decl); } } // get decls from the parent function params - for (const param of Query.searchFrom(parentFun, Param)) { + for (const jp of Query.searchFrom(parentFun, "param")) { + const param = jp; decls.push(param.definition); } // no need to handle global vars - they are not parameters @@ -272,7 +275,8 @@ export default class Outliner { findNonvoidReturnStmts(startingPoints) { const returnStmts = []; for (const stmt of startingPoints) { - for (const ret of Query.searchFrom(stmt, ReturnStmt)) { + for (const jp of Query.searchFrom(stmt, "returnStmt")) { + const ret = jp; if (ret.numChildren > 0) { returnStmts.push(ret); } @@ -282,7 +286,8 @@ export default class Outliner { } scalarsToPointers(region, params) { for (const stmt of region) { - for (const varref of Query.searchFrom(stmt, Varref)) { + for (const jp of Query.searchFrom(stmt, "varref")) { + const varref = jp; for (const param of params) { if (param.name === varref.name && varref.type instanceof BuiltinType) { @@ -320,14 +325,16 @@ export default class Outliner { findRefsInRegion(region) { const declsNames = []; for (const stmt of region) { - for (const decl of Query.searchFrom(stmt, Decl)) { + for (const jp of Query.searchFrom(stmt, "decl")) { + const decl = jp; declsNames.push(decl.name); } } const varrefs = []; const varrefsNames = []; for (const stmt of region) { - for (const varref of Query.searchFrom(stmt, Varref)) { + for (const jp of Query.searchFrom(stmt, "varref")) { + const varref = jp; // may need to filter for other types, like macros, etc // select all varrefs with no matching decl in the region, except globals if (!varrefsNames.includes(varref.name) && @@ -356,7 +363,8 @@ export default class Outliner { const epilogueVarrefsNames = []; for (const stmt of epilogue) { // also gets function names... could it cause an issue? - for (const varref of Query.searchFrom(stmt, Varref)) { + for (const jp of Query.searchFrom(stmt, "varref")) { + const varref = jp; epilogueVarrefsNames.push(varref.name); } } @@ -378,7 +386,8 @@ export default class Outliner { const epilogue = []; let inPrologue = true; let inRegion = false; - for (const stmt of Query.searchFrom(fun, Statement)) { + for (const jp of Query.searchFrom(fun, "statement")) { + const stmt = jp; if (inPrologue) { if (stmt.astId == begin.astId) { region.push(stmt); diff --git a/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js b/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js index 76824e4ad..c86af1386 100644 --- a/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js +++ b/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js @@ -2,22 +2,22 @@ import Io from "lara-js/api/lara/Io.js"; import Strings from "lara-js/api/lara/Strings.js"; import JavaTypes from "lara-js/api/lara/util/JavaTypes.js"; import Query from "lara-js/api/weaver/Query.js"; -import { FunctionJp } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import CMaker from "../cmake/CMaker.js"; import { debug } from "lara-js/api/lara/core/LaraCore.js"; function GproferGetCxxFunction(signature) { - return Query.search(FunctionJp, { + return Query.search("function", { signature: signature, hasDefinition: true, }).first(); } function GproferGetCFunction(signature) { - return Query.search(FunctionJp, { + return Query.search("function", { name: signature, hasDefinition: true, }).first(); } +; export default class Gprofer { _runs; _args; diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js b/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js index f8ed05f20..5fce7fb0d 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js @@ -1,7 +1,7 @@ import { debug } from "lara-js/api/lara/core/LaraCore.js"; import Graphs from "lara-js/api/lara/graphs/Graphs.js"; import Query from "lara-js/api/weaver/Query.js"; -import { FunctionJp, LabelStmt, Loop, Scope, Statement, } from "../../../Joinpoints.js"; +import { FunctionJp, Loop, Scope, Statement, } from "../../../Joinpoints.js"; import ClavaJoinPoints from "../../ClavaJoinPoints.js"; import CfgEdge from "./CfgEdge.js"; import CfgEdgeType from "./CfgEdgeType.js"; @@ -159,7 +159,8 @@ export default class CfgBuilder { createNodes() { // Test all statements for leadership // If they are leaders, create node - for (const $stmt of Query.searchFromInclusive(this.jp, Statement)) { + for (const $jp of Query.searchFromInclusive(this.jp, "statement")) { + const $stmt = $jp; if (CfgUtils.isLeader($stmt)) { if (this.splitInstList && CfgUtils.getNodeType($stmt) === CfgNodeType.INST_LIST) { @@ -438,7 +439,7 @@ export default class CfgBuilder { throw new Error("Goto statement is undefined"); } const labelName = $gotoStmt.label.name; - const $labelStmt = Query.searchFromInclusive(this.jp, LabelStmt, { + const $labelStmt = Query.searchFromInclusive(this.jp, "labelStmt", { decl: (decl) => decl.name == labelName, }).first(); if ($labelStmt === undefined) { diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js index ad679f648..f2b7bc116 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js @@ -1,6 +1,5 @@ import NodeData from "lara-js/api/lara/graphs/NodeData.js"; import Query from "lara-js/api/weaver/Query.js"; -import { Call } from "../../../Joinpoints.js"; export default class ScgNodeData extends NodeData { /** * The function represented by this node @@ -24,7 +23,7 @@ export default class ScgNodeData extends NodeData { return this.$function.isImplementation; } hasCalls() { - return Query.searchFrom(this.$function, Call).get().length > 0; + return Query.searchFrom(this.$function, "call").get().length > 0; } } //# sourceMappingURL=ScgNodeData.js.map \ No newline at end of file diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js index 5e2a34bbb..a7c40518c 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js @@ -1,6 +1,6 @@ import Graphs from "lara-js/api/lara/graphs/Graphs.js"; import Query from "lara-js/api/weaver/Query.js"; -import { Call, FunctionJp } from "../../../Joinpoints.js"; +import { Call } from "../../../Joinpoints.js"; import ScgEdgeData from "./ScgEdgeData.js"; import ScgNodeData from "./ScgNodeData.js"; export default class StaticCallGraphBuilder { @@ -91,8 +91,8 @@ export default class StaticCallGraphBuilder { } for (const $jpToSearch of jpsToSearch) { // Get all function/call pairs for functions that are not yet in the seen functions - const functionCall = Query.searchFromInclusive($jpToSearch, FunctionJp, (self) => !seenFunctions.has(self.signature)) - .search(Call) + const functionCall = Query.searchFromInclusive($jpToSearch, "function", (self) => !seenFunctions.has(self.signature)) + .search("call") .chain(); for (const pair of functionCall) { const $function = pair["function"]; diff --git a/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js b/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js index 0f5a58f89..89222efb8 100644 --- a/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js +++ b/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js @@ -1,6 +1,5 @@ import Io from "lara-js/api/lara/Io.js"; import Query from "lara-js/api/weaver/Query.js"; -import { Call } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import MathHInfo from "./MathHInfo.js"; export class MathAnalysis { @@ -24,11 +23,11 @@ export class MathAnalysis { function MathReport(mathFun, csv = false, name) { //Counter for occurences of each math.h function const occurrences = {}; - mathFun.forEach((f) => { + mathFun.forEach(f => { occurrences[f.name] = 0; }); //Count occurrences - for (const elem of Query.search(Call).chain()) { + for (const elem of Query.search("call").chain()) { const fun = elem["call"].name; if (fun in occurrences) { occurrences[fun] += 1; @@ -68,7 +67,7 @@ function MathReport(mathFun, csv = false, name) { function MathCompare(mathFun) { //Compare, for each call, the type of arguments and the function signature console.log("Type of arguments being passed to each call to a math.h function:"); - for (const elem of Query.search(Call).chain()) { + for (const elem of Query.search("call").chain()) { const $call = elem["call"]; const fun = $call.name; if (fun in mathFun) { @@ -96,7 +95,7 @@ function MathCompare(mathFun) { * (see documentation of clava.hls.MathHInfo for the format) * */ function MathReplace(mathFun) { - for (const elem of Query.search(Call).chain()) { + for (const elem of Query.search("call").chain()) { const $call = elem["call"]; const fun = $call.name; if (fun in mathFun) { diff --git a/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js b/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js index e81585d79..94d777ecd 100644 --- a/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js +++ b/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js @@ -1,6 +1,5 @@ import Io from "lara-js/api/lara/Io.js"; import Query from "lara-js/api/weaver/Query.js"; -import { Call, FileJp, FunctionJp } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class MathHInfo { @@ -8,7 +7,7 @@ export default class MathHInfo { // Save current AST Clava.pushAst(); // Clear AST - for (const $file of Query.search(FileJp)) { + for (const $file of Query.search("file")) { $file.detach(); } // Prepare source file that will test math.h @@ -22,10 +21,10 @@ export default class MathHInfo { Query.root().addFile($testFile); Clava.rebuild(); // Seach for the abs call and obtain math.h file where it was declared - const $absCall = Query.search(Call, "abs").first(); + const $absCall = Query.search("call", "abs").first(); const mathIncludeFile = $absCall.declaration.filepath; // Clear AST - for (const $file of Query.search(FileJp)) { + for (const $file of Query.search("file")) { $file.detach(); } // Add math.h to the AST @@ -34,7 +33,8 @@ export default class MathHInfo { Query.root().addFile($mathFile); Clava.rebuild(); const results = []; - for (const $fn of Query.search(FileJp, "math_copy.h").search(FunctionJp)) { + for (const $mathFunction of Query.search("file", "math_copy.h").search("function")) { + const $fn = $mathFunction; const paramTypes = []; for (const $param of $fn.params) { paramTypes.push($param.type.code); diff --git a/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js b/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js index 309c4b545..1f68acdb7 100644 --- a/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js +++ b/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js @@ -1,5 +1,5 @@ import Query from "lara-js/api/weaver/Query.js"; -import { ArrayAccess, BinaryOp, Expression, FunctionJp, Loop, Param, Scope, Statement, UnaryOp, Vardecl, Varref, } from "../../Joinpoints.js"; +import { ArrayAccess, BinaryOp, Expression, Loop, Param, Scope, Statement, UnaryOp, Vardecl, Varref } from "../../Joinpoints.js"; import Logger from "../../lara/code/Logger.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; const interfaces = {}; @@ -19,7 +19,7 @@ export default class TraceInstrumentation { let root; const filename = funName + ".dot"; logger = new Logger(undefined, filename); - for (const elem of Query.search(FunctionJp).chain()) { + for (const elem of Query.search("function").chain()) { if (elem["function"].name == funName) root = elem["function"]; } @@ -44,12 +44,12 @@ export default class TraceInstrumentation { } const children = scope.children; //Get global vars as interfaces - for (const elem of Query.search(Vardecl)) { + for (const elem of Query.search("vardecl")) { if (elem.isGlobal) registerInterface(elem); } //Get local vars - for (const elem of Query.search(FunctionJp, { name: funName }).search(Vardecl)) { + for (const elem of Query.search("function", { name: funName }).search("vardecl")) { registerLocal(elem); } //Begin graph and create counters @@ -445,7 +445,8 @@ function getInfo(node) { return info; } function handleExpression(node) { - if (node.children.length == 3 && node.children[0] instanceof Expression) { + if (node.children.length == 3 && + node.children[0] instanceof Expression) { //Build comparison const cmpInfo = getInfo(node.children[0].children[0]); //Build true value diff --git a/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js b/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js index 354eb4ac9..bc4b868ec 100644 --- a/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js +++ b/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js @@ -1,5 +1,5 @@ import Query from "lara-js/api/weaver/Query.js"; -import { BinaryOp, Vardecl, Varref, } from "../../Joinpoints.js"; +import { BinaryOp, Varref, } from "../../Joinpoints.js"; export default class LivenessUtils { /** * Checks if the given graph is a Cytoscape graph @@ -106,7 +106,7 @@ export default class LivenessUtils { * @returns A set of variable names declared with initialization in the given joinpoint */ static getVarDeclsWithInit($jp) { - const $varDecls = Query.searchFromInclusive($jp, Vardecl, { + const $varDecls = Query.searchFromInclusive($jp, "vardecl", { hasInit: true, }); const varNames = [...$varDecls].map(($decl) => $decl.name); @@ -118,7 +118,7 @@ export default class LivenessUtils { * @returns A set containing the names of the local variables or parameters on the left-hand side (LHS) of each assignment present in the given joinpoint */ static getAssignedVars($jp) { - const $assignments = Query.searchFromInclusive($jp, BinaryOp, { + const $assignments = Query.searchFromInclusive($jp, "binaryOp", { isAssignment: true, left: (left) => left instanceof Varref, }); @@ -133,7 +133,7 @@ export default class LivenessUtils { * @returns A set containing the names of local variables or parameters referenced by varref joinpoints, excluding those present on the LHS of assignments. */ static getVarRefs($jp) { - const $varRefs = Query.searchFromInclusive($jp, Varref); + const $varRefs = Query.searchFromInclusive($jp, "varref"); const varNames = [...$varRefs] .filter(($ref) => !LivenessUtils.isAssignedVar($ref) && LivenessUtils.isLocalOrParam($ref)) diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js index 8da32ce2e..840c5afa8 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js @@ -1,7 +1,6 @@ import { JSONtoFile } from "lara-js/api/core/output.js"; import { debug } from "lara-js/api/lara/core/LaraCore.js"; import Query from "lara-js/api/weaver/Query.js"; -import { Call } from "../../Joinpoints.js"; import MemoiTarget from "./MemoiTarget.js"; import MemoiUtils from "./MemoiUtils.js"; /** @@ -27,7 +26,8 @@ export default class MemoiAnalysis { const targets = []; const report = new FailReport(); const processed = {}; - for (const $call of Query.search(Call)) { + for (const $jp of Query.search("call")) { + const $call = $jp; // find function or skip const $func = $call.function; if ($func === undefined) { diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js index d5a8ebed9..40ef19e12 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js @@ -3,7 +3,6 @@ import { arrayFromArgs } from "lara-js/api/lara/core/LaraCore.js"; import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; import { TimerUnit } from "lara-js/api/lara/util/TimeUnits.js"; import Query from "lara-js/api/weaver/Query.js"; -import { Call, FileJp, FunctionJp } from "../../Joinpoints.js"; import Timer from "../../lara/code/Timer.js"; import ClavaJavaTypes from "../ClavaJavaTypes.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; @@ -190,7 +189,8 @@ class MemoiGen { signature: (s) => this._target.sig === MemoiUtils.normalizeSig(s), location: (l) => report !== undefined ? report.callSites[0] === l : true, // if there is a report, we also filter by site }; - for (const $call of Query.search(Call, filter)) { + for (const $jp of Query.search("call", filter)) { + const $call = $jp; const wrapperName = IdGenerator.next("mw_" + cSig); s.add(wrapperName); $call.wrap(wrapperName); @@ -203,9 +203,10 @@ class MemoiGen { const cSig = MemoiUtils.cSig(this._target.sig); const wrapperName = "mw_" + cSig; s.add(wrapperName); - for (const $call of Query.search(Call, { + for (const $jp of Query.search("call", { signature: (s) => this._target.sig === MemoiUtils.normalizeSig(s), })) { + const $call = $jp; $call.wrap(wrapperName); } this.generateGeneric(wrapperName, report); @@ -217,15 +218,16 @@ class MemoiGen { const globalName = "memoi_target_timer"; const printName = "print_perfect_inst"; // wrap every call to the target - for (const $call of Query.search(Call, { + for (const $jp of Query.search("call", { signature: (s) => this._target.sig === MemoiUtils.normalizeSig(s), })) { + const $call = $jp; $call.wrap(wrapperName); } // change the wrapper by timing around the original call - for (const chain of Query.search(FileJp) - .search(FunctionJp, { name: wrapperName }) - .search(Call) + for (const chain of Query.search("file") + .search("function", { name: wrapperName }) + .search("call") .chain()) { const $file = chain["file"]; const $function = chain["function"]; @@ -236,14 +238,14 @@ class MemoiGen { $function.insertReturn(`memoi_target_timer += ${tVar};`); } // if print_perfect_inst function is found, some other target has dealt with the main code and we're done - for (const chain of Query.search(FileJp, { hasMain: true }) - .search(FunctionJp, { name: printName }) + for (const chain of Query.search("file", { hasMain: true }) + .search("function", { name: printName }) .chain()) { return; } // change the main function to print the time to a file - for (const chain of Query.search(FileJp) - .search(FunctionJp, { name: "main" }) + for (const chain of Query.search("file") + .search("function", { name: "main" }) .chain()) { const $file = chain["file"]; const $main = chain["function"]; @@ -277,9 +279,9 @@ class MemoiGen { } } generateGeneric(wrapperName, report) { - for (const chain of Query.search(FileJp) - .search(FunctionJp, { name: wrapperName }) - .search(Call) + for (const chain of Query.search("file") + .search("function", { name: wrapperName }) + .search("call") .chain()) { const $file = chain["file"]; const $function = chain["function"]; @@ -332,8 +334,8 @@ class MemoiGen { } } addMainDebug(totalName, missesName, updatesName, wrapperName) { - const chain = Query.search(FileJp) - .search(FunctionJp, { name: "main" }) + const chain = Query.search("file") + .search("function", { name: "main" }) .chain(); const firstAndOnly = chain[0]; if (firstAndOnly === undefined) { diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js index 2a7a79126..ae18f4878 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js @@ -1,7 +1,6 @@ import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; import Query from "lara-js/api/weaver/Query.js"; -import { Call, FileJp, FunctionJp, Scope } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import MemoiUtils from "./MemoiUtils.js"; @@ -51,9 +50,10 @@ export default class MemoiProf { const monitorName = "mp_" + cSig; const monitorType = ClavaJoinPoints.typeLiteral("MemoiProf*"); // make the wrapper - for (const $call of Query.search(Call, { + for (const $jp of Query.search("call", { signature: (s) => this.target.sig === MemoiUtils.normalizeSig(s), })) { + const $call = $jp; $call.wrap(wrapperName); } // instrument the wrapper @@ -71,9 +71,10 @@ export default class MemoiProf { const wrapperNameBase = "mw_" + cSig; const monitorNameBase = "mp_" + cSig; const monitorType = ClavaJoinPoints.typeLiteral("MemoiProf*"); - for (const $call of Query.search(Call, { + for (const $jp of Query.search("call", { signature: (s) => this.target.sig === MemoiUtils.normalizeSig(s), })) { + const $call = $jp; // make the wrapper const wrapperName = IdGenerator.next(wrapperNameBase); $call.wrap(wrapperName); @@ -89,9 +90,9 @@ export default class MemoiProf { memoiInstrumentWrapper(wrapperName, monitorName, monitorType) { const numInputs = this.target.numInputs; const numOutputs = this.target.numOutputs; - const query = Query.search(FileJp) - .search(FunctionJp, { name: wrapperName }) - .search(Call) + const query = Query.search("file") + .search("function", { name: wrapperName }) + .search("call") .chain(); for (const row of query) { let code = "mp_inc(" + monitorName; @@ -130,9 +131,9 @@ export default class MemoiProf { }) .join(",") .toUpperCase(); - const query = Query.search(FileJp) - .search(FunctionJp, { name: "main" }) - .children(Scope) + const query = Query.search("file") + .search("function", { name: "main" }) + .children("scope") .chain()[0]; if (query !== undefined) { throw new Error("MemoiProf: Could not find main function needed for setup"); diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js index 559060e85..8aec46fc5 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js @@ -1,5 +1,4 @@ import Query from "lara-js/api/weaver/Query.js"; -import { Call, FunctionJp } from "../../Joinpoints.js"; import MemoiUtils from "./MemoiUtils.js"; export default class MemoiTarget { sig; @@ -43,11 +42,11 @@ export default class MemoiTarget { } static fromSig(sig) { sig = MemoiUtils.normalizeSig(sig); - const $func = Query.search(FunctionJp, { + const $func = Query.search("function", { signature: (signature) => sig === MemoiUtils.normalizeSig(signature), }).first(); if ($func === undefined) { - const $call = Query.search(Call, { + const $call = Query.search("call", { signature: (signature) => sig === MemoiUtils.normalizeSig(signature), }).first(); if ($call === undefined) { @@ -58,7 +57,7 @@ export default class MemoiTarget { return MemoiTarget.fromFunction($func); } findNumCallSites() { - return Query.search(Call, { + return Query.search("call", { signature: (signature) => this.sig === MemoiUtils.normalizeSig(signature), }).get().length; } @@ -94,14 +93,14 @@ export default class MemoiTarget { return !normalTypes.includes(e); }); if (inputsInvalid) { - throw `The inputs of the target function '${this.sig}' are not supported.`; + throw (`The inputs of the target function '${this.sig}' are not supported.`); } const outputTestArray = this.numOutputs == 1 ? normalTypes : pointerTypes; const outputsInvalid = this.outputTypes.some(function (e) { return !outputTestArray.includes(e); }); if (outputsInvalid) { - throw `The outputs of the target function '${this.sig}' are not supported.`; + throw (`The outputs of the target function '${this.sig}' are not supported.`); } // if the output are valid, drop the pointer from the type this.outputTypes = this.outputTypes.map(function (e) { diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js b/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js index c55715489..9c6c2578a 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js @@ -1,7 +1,6 @@ import { debug } from "lara-js/api/lara/core/LaraCore.js"; import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; import Query from "lara-js/api/weaver/Query.js"; -import { Call, FileJp, FunctionJp, Statement } from "../../Joinpoints.js"; import ClavaJavaTypes from "../ClavaJavaTypes.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import MemoiUtils from "./MemoiUtils.js"; @@ -28,8 +27,8 @@ export function _generate(insertPred, countComparator, report, isMemoiDebug, isM } export function _Memoi_WrapGlobalTarget(signature) { const wrapperName = `mw_${MemoiUtils.normalizeSig(signature)}`; - for (const chain of Query.search(Statement) - .search(Call, { + for (const chain of Query.search("stmt") + .search("call", { signature: (sig) => sig.replace(/ /g, "") == signature, }) .chain()) { @@ -40,8 +39,8 @@ export function _Memoi_WrapGlobalTarget(signature) { return { wrapperName }; } export function _Memoi_WrapSingleTarget(signature, location) { - for (const chain of Query.search(Statement) - .search(Call, { + for (const chain of Query.search("stmt") + .search("call", { signature: (sig) => sig.replace(/ /g, "") == signature, }) .chain()) { @@ -54,9 +53,9 @@ export function _Memoi_WrapSingleTarget(signature, location) { throw `Did not find call to ${signature} at ${location}`; } export function _Memoi_InsertTableCode(insertPred, countComparator, report, wrapperName, isMemoiDebug, isMemoiOnline, isMemoiEmpty, isMemoiUpdateAlways, memoiApproxBits, tableSize) { - Query.search(FileJp) - .search(FunctionJp, { name: wrapperName }) - .search(Call) + Query.search("file") + .search("function", { name: wrapperName }) + .search("call") .chain() .forEach((chain) => { const $file = chain["file"]; @@ -81,8 +80,8 @@ export function _Memoi_InsertTableCode(insertPred, countComparator, report, wrap }); } export function _Memoi_AddMainDebug(totalName, missesName, wrapperName) { - Query.search(FileJp) - .search(FunctionJp, { name: "main" }) + Query.search("file") + .search("function", { name: "main" }) .chain() .forEach((chain) => { const $file = chain["file"]; diff --git a/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js b/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js index c5468b0c7..0773fbf5b 100644 --- a/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js +++ b/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js @@ -1,13 +1,13 @@ import Io from "lara-js/api/lara/Io.js"; import Strings from "lara-js/api/lara/Strings.js"; import Query from "lara-js/api/weaver/Query.js"; -import { Pragma } from "../../Joinpoints.js"; import KernelReplacer from "./KernelReplacer.js"; // This aspect can be included in a library, imported and // called by a user, since it needs no configuration/parameterization export default function KernelReplacerAuto() { // look for pragma - for (const $pragma of Query.search(Pragma, "clava")) { + for (const $p of Query.search("pragma", "clava")) { + const $pragma = $p; const $file = $pragma.target.getAncestor("file"); if (!$pragma.content.startsWith("opencl_call")) { continue; diff --git a/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js b/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js index 960767e15..ead91a622 100644 --- a/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js +++ b/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js @@ -1,5 +1,4 @@ import Query from "lara-js/api/weaver/Query.js"; -import { FunctionJp } from "../../Joinpoints.js"; import Inliner from "../code/Inliner.js"; import NormalizeToSubset from "./NormalizeToSubset.js"; import PrepareForInlining from "./PrepareForInlining.js"; @@ -14,13 +13,15 @@ export default function Inlining(options = { // TODO: Maybe passing a NormalizeToSubset instance is preferrable, but that means making NormalizeToSubset a class instead of a function NormalizeToSubset(Query.root(), options.normalizeToSubset); const inliner = new Inliner(options.inliner); - for (const $function of Query.search(FunctionJp, { + for (const $jp of Query.search("function", { name: (name) => name !== "main", isImplementation: true, // Only inline if function has a body })) { + const $function = $jp; PrepareForInlining($function); } - for (const $function of Query.search(FunctionJp, "main")) { + for (const $jp of Query.search("function", "main")) { + const $function = $jp; inliner.inlineFunctionTree($function); } } diff --git a/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js b/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js index 514165d96..7cf9e87ef 100644 --- a/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js +++ b/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js @@ -28,7 +28,10 @@ export default function NormalizeToSubset($startJp, options = { simplifyLoops: { declStmt.apply($startJp); varDecls.apply($startJp); localStaticToGlobal.apply($startJp); - for (const $assign of Query.searchFrom($startJp, BinaryOp, (jp) => jp.isAssignment && jp.operator !== "=")) { + for (const $jp of Query.searchFrom($startJp, "binaryOp", { + self: (self) => self instanceof BinaryOp && self.isAssignment && self.operator !== "=", + })) { + const $assign = $jp; SimplifyAssignment($assign); } } diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js index 74e6e7f8f..fd5c7ffb3 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js @@ -1,7 +1,6 @@ import Pass from "lara-js/api/lara/pass/Pass.js"; import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; import Query from "lara-js/api/weaver/Query.js"; -import { ReturnStmt } from "../../Joinpoints.js"; // TODO: Refactor to use the SimplePass pattern export default class SimplifyReturnStmts extends Pass { _name = "SimplifyReturnStmts"; @@ -12,7 +11,8 @@ export default class SimplifyReturnStmts extends Pass { } _apply_impl($jp) { let appliedPass = false; - for (const $returnStmt of Query.searchFromInclusive($jp, ReturnStmt)) { + for (const jp of Query.searchFromInclusive($jp, "returnStmt")) { + const $returnStmt = jp; const transformed = this.transform($returnStmt); // If any change, mark as applied if (transformed) { diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js index 928c6c5c6..d0f695a73 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js @@ -1,7 +1,6 @@ import Pass from "lara-js/api/lara/pass/Pass.js"; import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; import Query from "lara-js/api/weaver/Query.js"; -import { If } from "../../Joinpoints.js"; // TODO: Refactor to use the SimplePass pattern export default class SimplifySelectionStmts extends Pass { _name = "SimplifySelectionStmts"; @@ -12,7 +11,8 @@ export default class SimplifySelectionStmts extends Pass { } _apply_impl($jp) { let appliedPass = false; - for (const $if of Query.searchFromInclusive($jp, If)) { + for (const jp of Query.searchFromInclusive($jp, "if")) { + const $if = jp; appliedPass = true; this.transform($if); } diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js b/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js index a13c51cbc..4c58d6167 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js @@ -1,7 +1,7 @@ import Pass from "lara-js/api/lara/pass/Pass.js"; import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; import Query from "lara-js/api/weaver/Query.js"; -import { BuiltinType, FunctionJp, ReturnStmt, } from "../../Joinpoints.js"; +import { BuiltinType, FunctionJp, ReturnStmt } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import DecomposeVarDeclarations from "./DecomposeVarDeclarations.js"; export default class SingleReturnFunction extends Pass { @@ -16,7 +16,7 @@ export default class SingleReturnFunction extends Pass { return this.new_result($jp, false); } const $body = $jp.body; - const $returnStmts = Query.searchFrom($body, ReturnStmt).get(); + const $returnStmts = Query.searchFrom($body, "returnStmt").get(); if ($returnStmts.length === 0 || ($returnStmts.length === 1 && $body.lastChild instanceof ReturnStmt)) { return this.new_result($jp, false); @@ -53,10 +53,7 @@ export default class SingleReturnFunction extends Pass { return this.new_result($jp, true); } new_result($jp, appliedPass) { - return new PassResult(this, $jp, { - appliedPass: appliedPass, - insertedLiteralCode: false, - }); + return new PassResult(this, $jp, { appliedPass: appliedPass, insertedLiteralCode: false }); } } //# sourceMappingURL=SingleReturnFunction.js.map \ No newline at end of file diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js b/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js index 99b67e548..53d25520d 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js @@ -2,7 +2,7 @@ import Query from "lara-js/api/weaver/Query.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import SimplePass from "lara-js/api/lara/pass/SimplePass.js"; import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; -import { Break, GotoStmt, Switch, } from "../../Joinpoints.js"; +import { GotoStmt, Switch, } from "../../Joinpoints.js"; /** * Transforms a switch statement into an if statement. * @@ -188,7 +188,7 @@ export default class TransformSwitchToIf extends SimplePass { * @param $switchExitGoTo - The goto statement that corresponds to the switch exit. This statement will be used to replace the break statements */ replaceBreakWithGoto($jp, $switchExitGoTo) { - const $breakStmts = Query.searchFromInclusive($jp, Break, { + const $breakStmts = Query.searchFromInclusive($jp, "break", { enclosingStmt: (enclosingStmt) => enclosingStmt.astId === $jp.astId, }); for (const $break of $breakStmts) diff --git a/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js b/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js index 6ac353174..f47e82083 100644 --- a/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js +++ b/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js @@ -3,7 +3,7 @@ import GlobalVariable from "../code/GlobalVariable.js"; import Query from "lara-js/api/weaver/Query.js"; import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; import Logger from "../../lara/code/Logger.js"; -import { BuiltinType, Call, FunctionJp, Op, } from "../../Joinpoints.js"; +import { BuiltinType, FunctionJp, } from "../../Joinpoints.js"; /** * Instruments an application so that it counts total operations in a region of code. * @@ -62,11 +62,11 @@ export default class OpsCounter { this.instrumentedFunctions.add($function.jpId); console.log(`OpsCounter.instrument: Instrumenting function ${$function.jpId}`); // Apply to all ops found in the region - for (const $op of Query.searchFrom($region, Op)) { + for (const $op of Query.searchFrom($region, "op")) { this.countOp($op); } // Call function recursively when function calls are found - for (const $call of Query.searchFrom($region, Call)) { + for (const $call of Query.searchFrom($region, "call")) { const $funcDef = $call.definition; if ($funcDef === undefined) { continue; diff --git a/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js b/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js index 11cf076cd..f2392d996 100644 --- a/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js +++ b/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js @@ -1,6 +1,6 @@ import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; import Query from "lara-js/api/weaver/Query.js"; -import { BinaryOp, BuiltinType, Call, FunctionJp, Loop, Op, Param, Varref, } from "../../Joinpoints.js"; +import { BinaryOp, BuiltinType, FunctionJp, Loop, Param, } from "../../Joinpoints.js"; import OpsBlock from "./OpsBlock.js"; export default class StaticOpsCounter { // Whitelist of ops @@ -102,7 +102,8 @@ export default class StaticOpsCounter { } // If stmt is not a loop, count ops // Apply to all ops found in the stmt - for (const $op of Query.searchFrom($stmt, Op)) { + for (const $jp of Query.searchFrom($stmt, "op")) { + const $op = $jp; // If not a valid op, continue if (!this.isValidOp($op)) { continue; @@ -119,7 +120,8 @@ export default class StaticOpsCounter { opsBlock.add(opsId); } // Call function recursively when function calls are found - for (const $call of Query.searchFrom($stmt, Call)) { + for (const $jp of Query.searchFrom($stmt, "call")) { + const $call = $jp; const $funcDef = $call.definition; if ($funcDef === undefined) { continue; @@ -161,7 +163,8 @@ export default class StaticOpsCounter { } analyseIterationsExpr($expr, $source) { const result = {}; - for (const $varref of Query.searchFromInclusive($expr, Varref)) { + for (const $jp of Query.searchFromInclusive($expr, "varref")) { + const $varref = $jp; if (result[$varref.name] !== undefined) { continue; } diff --git a/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js b/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js index b86353fa2..e1aeec3d4 100644 --- a/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js +++ b/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js @@ -32,13 +32,13 @@ export default class ClavaDataStore extends WeaverDataStore { this.put("Compiler Flags", flags); } /** - * @returns A list with the current extra system includes. + * @returns {J#java.util.List} A list with the current extra system includes. */ getSystemIncludes() { return this.get("library includes").getFiles(); } /** - * @returns A list with the current user includes. + * @return {J#java.util.List} A list with the current user includes. */ getUserIncludes() { return this.get("header includes").getFiles(); diff --git a/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js b/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js index 0d579be22..803e3fb7c 100644 --- a/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js +++ b/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js @@ -1,9 +1,8 @@ import Query from "lara-js/api/weaver/Query.js"; -import { WrapperStmt } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class VitisHlsUtils { static activateAllDirectives(turnOn) { - const pragmas = Query.search(WrapperStmt, { + const pragmas = Query.search("wrapperStmt", { code: (code) => code.includes("#pragma HLS") || code.includes("#pragma hls"), }).get(); if (pragmas == undefined) { diff --git a/ClavaLaraApi/src-lara/clava/core.js b/ClavaLaraApi/src-lara/clava/core.js index 342742d4f..41d3148fa 100644 --- a/ClavaLaraApi/src-lara/clava/core.js +++ b/ClavaLaraApi/src-lara/clava/core.js @@ -1,9 +1,3 @@ -/** - * This file is used only in Clava Classic to load the core API. - * This is done for compatibility with the previous version of Clava. - * Do not use this file in new (clava-js) projects. - * Remove this file if Clava Classic has died out. - */ const prefix = "clava-js/api/"; const coreImports = []; const sideEffectsOnlyImports = ["Joinpoints.js"]; diff --git a/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js b/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js index aa5ca0af7..f74e5bb6c 100644 --- a/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js +++ b/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js @@ -3,7 +3,6 @@ import BenchmarkInstance from "lara-js/api/lara/benchmark/BenchmarkInstance.js"; import Query from "lara-js/api/weaver/Query.js"; import Weaver from "lara-js/api/weaver/Weaver.js"; import Clava from "../..//clava/Clava.js"; -import { Pragma } from "../../Joinpoints.js"; import CMaker from "../../clava/cmake/CMaker.js"; /** * Instance of a Clava benchmark. @@ -54,7 +53,7 @@ export default class ClavaBenchmarkInstance extends BenchmarkInstance { * Looks for #pragma kernel, returns target of that pragma */ getKernel() { - const $pragma = Query.search(Pragma, "kernel").first(); + const $pragma = Query.search("pragma", "kernel").first(); if ($pragma === undefined) { throw `ClavaBenchmarkInstance.getKernel: Could not find '#pragma kernel' in benchmark ${this.getName()}`; } diff --git a/ClavaLaraApi/src-lara/clava/lara/code/Timer.js b/ClavaLaraApi/src-lara/clava/lara/code/Timer.js index 42ac34938..7e8ec9536 100644 --- a/ClavaLaraApi/src-lara/clava/lara/code/Timer.js +++ b/ClavaLaraApi/src-lara/clava/lara/code/Timer.js @@ -50,11 +50,11 @@ export default class Timer extends TimerBase { // Declare variable for time interval, which uses calculation as initialization const timeIntervalVar = IdGenerator.next("clava_timing_duration_"); // Create literal node with calculation of time interval - const $timingResult = ClavaJoinPoints.exprLiteral("long long " + this._timer_cpp_calc_interval(startVar, endVar, cppUnit, timeIntervalVar)); + const $timingResult = ClavaJoinPoints.exprLiteral(this._timer_cpp_calc_interval(startVar, endVar, cppUnit, timeIntervalVar)); // Build message logger .append(prefix) - .appendLong(timeIntervalVar); + .appendLong(this._timer_cpp_print_interval(cppUnit, timeIntervalVar)); if (this.printUnit) { logger.append(this.timeUnits.getUnitsString()); } @@ -68,8 +68,10 @@ export default class Timer extends TimerBase { } const $startVarDecl = ClavaJoinPoints.stmtLiteral(this._timer_cpp_define_time_var(startVar)); const $endVarDecl = ClavaJoinPoints.stmtLiteral(this._timer_cpp_define_time_var(endVar)); + const $timingResultDecl = ClavaJoinPoints.varDeclNoInit(timeIntervalVar, ClavaJoinPoints.typeLiteral("std::chrono::high_resolution_clock::duration")); $insertionTic.insertBefore($startVarDecl); $insertionTic.insertBefore($endVarDecl); + $insertionTic.insertBefore($timingResultDecl); let afterJp = undefined; // Check if $end is a scope if ($end instanceof Scope) { @@ -199,7 +201,10 @@ QueryPerformanceFrequency(&${timeFrequencyVar});`; return `${timeVar} = std::chrono::high_resolution_clock::now();`; } _timer_cpp_calc_interval(startVar, endVar, unit, differentialVar) { - return `${differentialVar} = std::chrono::duration_cast(${endVar} - ${startVar}).count()`; + return `${differentialVar} = ${endVar} - ${startVar}`; + } + _timer_cpp_print_interval(unit, differentialVar) { + return `std::chrono::duration_cast(${differentialVar}).count()`; } } //# sourceMappingURL=Timer.js.map \ No newline at end of file diff --git a/ClavaWeaver/resources/clava/weaverspecs/actionModel.xml b/ClavaWeaver/resources/clava/weaverspecs/actionModel.xml index 4874d028f..9ba206a66 100644 --- a/ClavaWeaver/resources/clava/weaverspecs/actionModel.xml +++ b/ClavaWeaver/resources/clava/weaverspecs/actionModel.xml @@ -91,12 +91,12 @@ https://docs.google.com/document/d/1uPrvuVBXHSbjDTfehpEeLDz9hgIr8EuJJJvBc5A70rs/ - + - + diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxActions.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxActions.java index 528f718d5..849fb39bd 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxActions.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxActions.java @@ -462,12 +462,12 @@ public static AJoinPoint insertReturn(AScope scope, AJoinPoint code) { for (ReturnStmt returnStmt : returnStatements) { ACxxWeaverJoinPoint returnJp = CxxJoinpoints.create(returnStmt); - lastInsertPoint = returnJp.insertBefore(code); + lastInsertPoint = returnJp.insertBeforeImpl(code); } // If there is no return in the body, add at the end of the function if (lastReturnStmt == null) { - lastInsertPoint = scope.insertEnd(code); + lastInsertPoint = scope.insertEndImpl(code); } return lastInsertPoint; diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.json b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.json index 4b182d01a..9f82f0bc5 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.json +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.json @@ -826,10 +826,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -868,10 +868,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -1809,10 +1809,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -1851,10 +1851,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -3035,10 +3035,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -3077,10 +3077,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -4104,10 +4104,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -4146,10 +4146,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -5343,10 +5343,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -5385,10 +5385,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -6315,10 +6315,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -6357,10 +6357,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -7412,10 +7412,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -7454,10 +7454,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -8743,10 +8743,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -8785,10 +8785,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -9763,10 +9763,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -9805,10 +9805,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -10827,10 +10827,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -10869,10 +10869,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -12097,10 +12097,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -12139,10 +12139,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -13373,10 +13373,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -13415,10 +13415,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -14482,10 +14482,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -14524,10 +14524,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -15527,10 +15527,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -15569,10 +15569,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -16941,10 +16941,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -16983,10 +16983,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -18217,10 +18217,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -18259,10 +18259,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -19272,10 +19272,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -19314,10 +19314,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -20491,10 +20491,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -20533,10 +20533,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -21480,10 +21480,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -21522,10 +21522,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -22465,10 +22465,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -22507,10 +22507,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -23520,10 +23520,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -23562,10 +23562,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -24830,10 +24830,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -24872,10 +24872,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -25804,10 +25804,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -25846,10 +25846,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -26868,10 +26868,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -26910,10 +26910,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -27917,10 +27917,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -27959,10 +27959,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -28929,10 +28929,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -28971,10 +28971,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -30174,10 +30174,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -30216,10 +30216,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -31139,10 +31139,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -31181,10 +31181,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -32194,10 +32194,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -32236,10 +32236,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -33256,10 +33256,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -33298,10 +33298,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -34498,10 +34498,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -34540,10 +34540,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -35546,10 +35546,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -35588,10 +35588,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -36610,10 +36610,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -36652,10 +36652,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -37622,10 +37622,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -37664,10 +37664,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -38671,10 +38671,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -38713,10 +38713,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -40058,10 +40058,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -40100,10 +40100,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -41078,10 +41078,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -41120,10 +41120,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -42613,10 +42613,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -42655,10 +42655,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -43879,10 +43879,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -43921,10 +43921,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -44956,10 +44956,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -44998,10 +44998,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -46110,10 +46110,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -46152,10 +46152,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -47122,10 +47122,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -47164,10 +47164,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -48124,10 +48124,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -48166,10 +48166,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -49145,10 +49145,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -49187,10 +49187,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -50165,10 +50165,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -50207,10 +50207,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -51213,10 +51213,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -51255,10 +51255,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -52290,10 +52290,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -52332,10 +52332,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -53302,10 +53302,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -53344,10 +53344,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -54716,10 +54716,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -54758,10 +54758,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -55776,10 +55776,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -55818,10 +55818,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -56843,10 +56843,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -56885,10 +56885,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -58135,10 +58135,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -58177,10 +58177,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -59687,10 +59687,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -59729,10 +59729,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -60736,10 +60736,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -60778,10 +60778,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -61748,10 +61748,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -61790,10 +61790,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -63229,10 +63229,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -63271,10 +63271,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -64266,10 +64266,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -64308,10 +64308,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -65447,10 +65447,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -65489,10 +65489,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -66468,10 +66468,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -66510,10 +66510,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -67707,10 +67707,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -67749,10 +67749,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -68955,10 +68955,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -68997,10 +68997,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -69993,10 +69993,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -70035,10 +70035,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -71275,10 +71275,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -71317,10 +71317,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -72508,10 +72508,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -72550,10 +72550,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -73618,10 +73618,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -73660,10 +73660,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -74686,10 +74686,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -74728,10 +74728,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -76018,10 +76018,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -76060,10 +76060,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -77073,10 +77073,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -77115,10 +77115,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -78183,10 +78183,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -78225,10 +78225,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -79274,10 +79274,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -79316,10 +79316,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -80321,10 +80321,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -80363,10 +80363,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -81555,10 +81555,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -81597,10 +81597,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -82804,10 +82804,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -82846,10 +82846,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -83880,10 +83880,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -83922,10 +83922,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -84892,10 +84892,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -84934,10 +84934,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -86109,10 +86109,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -86151,10 +86151,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -87158,10 +87158,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -87200,10 +87200,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -88207,10 +88207,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -88249,10 +88249,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -89443,10 +89443,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -89485,10 +89485,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -90508,10 +90508,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -90550,10 +90550,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -91566,10 +91566,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -91608,10 +91608,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -92783,10 +92783,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -92825,10 +92825,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -93965,10 +93965,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -94007,10 +94007,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -95226,10 +95226,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -95268,10 +95268,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -96313,10 +96313,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -96355,10 +96355,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { @@ -97384,10 +97384,10 @@ }, { "type": "action", - "tooltip": "Replaces the first child, or inserts the join point if no child is present", + "tooltip": "Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setFirstChild" }, { @@ -97426,10 +97426,10 @@ }, { "type": "action", - "tooltip": "Replaces the last child, or inserts the join point if no child is present", + "tooltip": "Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.", "children": [ { - "type": "void", + "type": "joinpoint", "name": "setLastChild" }, { diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/ACxxWeaverJoinPoint.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/ACxxWeaverJoinPoint.java index d297679a8..c8ae311e3 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/ACxxWeaverJoinPoint.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/ACxxWeaverJoinPoint.java @@ -449,7 +449,7 @@ public AJoinPoint replaceWithImpl(AJoinPoint[] node) { AJoinPoint topInserted = null; for (var nodeToInsert : reverseNodes) { - topInserted = insertAfter(nodeToInsert); + topInserted = insertAfterImpl(nodeToInsert); } // Remove current node from the tree @@ -467,7 +467,7 @@ public AJoinPoint replaceWithStringsImpl(String[] node) { AJoinPoint topInserted = null; for (var nodeToInsert : reverseNodes) { - topInserted = insertAfter(nodeToInsert); + topInserted = insertAfterImpl(nodeToInsert); } // Remove current node from the tree @@ -1268,20 +1268,21 @@ public AJoinPoint getFirstChildImpl() { @Override public void defFirstChildImpl(AJoinPoint value) { + setFirstChildImpl(value); + } + @Override + public AJoinPoint setFirstChildImpl(AJoinPoint value) { // If no children, just insert the node if (!getHasChildrenImpl()) { getNode().addChild(value.getNode()); - return; + return null; } // Otherwise, replace node - getFirstChildImpl().replaceWith(value); - } - - @Override - public void setFirstChildImpl(AJoinPoint node) { - defFirstChildImpl(node); + var firstChild = getFirstChildImpl(); + firstChild.replaceWith(value); + return firstChild; } @Override @@ -1299,19 +1300,21 @@ public AJoinPoint getLastChildImpl() { @Override public void defLastChildImpl(AJoinPoint value) { + setLastChildImpl(value); + } + + @Override + public AJoinPoint setLastChildImpl(AJoinPoint value) { // If no children, just insert the node if (!getHasChildrenImpl()) { getNode().addChild(value.getNode()); - return; + return null; } // Otherwise, replace node - getLastChildImpl().replaceWith(value); - } - - @Override - public void setLastChildImpl(AJoinPoint node) { - defLastChildImpl(node); + var lastChild =getLastChildImpl(); + lastChild.replaceWith(value); + return lastChild; } @Override diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AAccessSpecifier.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AAccessSpecifier.java index 82ca98890..cd25b04ee 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AAccessSpecifier.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AAccessSpecifier.java @@ -768,21 +768,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aDecl.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aDecl.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aDecl.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aDecl.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AAdjustedType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AAdjustedType.java index 91e77db46..160e62ed7 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AAdjustedType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AAdjustedType.java @@ -944,21 +944,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AArrayAccess.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AArrayAccess.java index 6ffd1959c..0715e274c 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AArrayAccess.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AArrayAccess.java @@ -932,21 +932,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AArrayType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AArrayType.java index 7064df04b..baa478ea9 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AArrayType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AArrayType.java @@ -980,21 +980,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABinaryOp.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABinaryOp.java index dd717c2e0..247f0a6d5 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABinaryOp.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABinaryOp.java @@ -977,21 +977,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aOp.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aOp.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aOp.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aOp.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABody.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABody.java index 054fc57b6..f9e00d15d 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABody.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABody.java @@ -1075,21 +1075,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aScope.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aScope.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aScope.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aScope.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABoolLiteral.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABoolLiteral.java index 7d471a7aa..478338c71 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABoolLiteral.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABoolLiteral.java @@ -816,21 +816,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aLiteral.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aLiteral.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aLiteral.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aLiteral.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABreak.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABreak.java index 438def5d8..93db78a21 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABreak.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABreak.java @@ -912,21 +912,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABuiltinType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABuiltinType.java index 4d2428ac6..e95da2146 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABuiltinType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ABuiltinType.java @@ -1061,21 +1061,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACall.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACall.java index b830c3a61..10a8a69f4 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACall.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACall.java @@ -527,7 +527,7 @@ public boolean inlineImpl() { /** * Tries to inline this call */ - public final boolean inline() { + public final Object inline() { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "inline", this, Optional.empty()); @@ -1418,21 +1418,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACase.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACase.java index f203d727c..067d6a6be 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACase.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACase.java @@ -1047,21 +1047,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACast.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACast.java index 09ae65027..c86b00f05 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACast.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACast.java @@ -888,21 +888,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkFor.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkFor.java index 0f4c764cf..341b87de4 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkFor.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkFor.java @@ -1146,21 +1146,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aLoop.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aLoop.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aLoop.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aLoop.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkSpawn.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkSpawn.java index 42887a170..73d271faa 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkSpawn.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkSpawn.java @@ -958,21 +958,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aCall.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aCall.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aCall.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aCall.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkSync.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkSync.java index f1200a373..ce7e82bce 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkSync.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACilkSync.java @@ -887,21 +887,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AClass.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AClass.java index a32fd9489..347db7b19 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AClass.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AClass.java @@ -1173,21 +1173,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aRecord.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aRecord.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aRecord.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aRecord.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AContinue.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AContinue.java index 90a033b17..3c63f0ee5 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AContinue.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AContinue.java @@ -887,21 +887,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACudaKernelCall.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACudaKernelCall.java index 830f18b32..b2287a944 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACudaKernelCall.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ACudaKernelCall.java @@ -1055,21 +1055,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aCall.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aCall.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aCall.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aCall.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeclStmt.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeclStmt.java index 931e5c86f..80c3844f7 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeclStmt.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeclStmt.java @@ -922,21 +922,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeclarator.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeclarator.java index 787793f48..0e20d68df 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeclarator.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeclarator.java @@ -801,21 +801,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aNamedDecl.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aNamedDecl.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aNamedDecl.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aNamedDecl.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeleteExpr.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeleteExpr.java index 728fa95fc..a3537ff44 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeleteExpr.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ADeleteExpr.java @@ -788,21 +788,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AElaboratedType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AElaboratedType.java index 68dcc3f0d..7b955f839 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AElaboratedType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AElaboratedType.java @@ -990,21 +990,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEmptyStmt.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEmptyStmt.java index 2494c9104..853344b27 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEmptyStmt.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEmptyStmt.java @@ -887,21 +887,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumDecl.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumDecl.java index 7864384ff..918ca3e7f 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumDecl.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumDecl.java @@ -847,21 +847,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aNamedDecl.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aNamedDecl.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aNamedDecl.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aNamedDecl.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumType.java index c733f02dc..d15654adf 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumType.java @@ -965,21 +965,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aTagType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aTagType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aTagType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aTagType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumeratorDecl.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumeratorDecl.java index 0014db338..e50282a31 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumeratorDecl.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AEnumeratorDecl.java @@ -801,21 +801,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aNamedDecl.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aNamedDecl.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aNamedDecl.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aNamedDecl.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AExprStmt.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AExprStmt.java index 0e5bdb238..749d8347f 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AExprStmt.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AExprStmt.java @@ -912,21 +912,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AField.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AField.java index cb222d107..e968216f2 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AField.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AField.java @@ -801,21 +801,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aDeclarator.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aDeclarator.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aDeclarator.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aDeclarator.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFile.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFile.java index 9e2ec45a2..18b68ea4b 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFile.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFile.java @@ -604,7 +604,7 @@ public AVardecl addGlobalImpl(String name, AJoinPoint type, String initValue) { * @param type * @param initValue */ - public final AVardecl addGlobal(String name, AJoinPoint type, String initValue) { + public final Object addGlobal(String name, AJoinPoint type, String initValue) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "addGlobal", this, Optional.empty(), name, type, initValue); @@ -613,7 +613,7 @@ public final AVardecl addGlobal(String name, AJoinPoint type, String initValue) if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "addGlobal", this, Optional.ofNullable(result), name, type, initValue); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "addGlobal", e); } @@ -631,7 +631,7 @@ public String writeImpl(String destinationFoldername) { * Writes the code of this file to a given folder * @param destinationFoldername */ - public final String write(String destinationFoldername) { + public final Object write(String destinationFoldername) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "write", this, Optional.empty(), destinationFoldername); @@ -640,7 +640,7 @@ public final String write(String destinationFoldername) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "write", this, Optional.ofNullable(result), destinationFoldername); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "write", e); } @@ -682,7 +682,7 @@ public AFile rebuildImpl() { /** * Recompiles only this file, returns a join point to the new recompiled file, or throws an exception if a problem happens */ - public final AFile rebuild() { + public final Object rebuild() { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "rebuild", this, Optional.empty()); @@ -691,7 +691,7 @@ public final AFile rebuild() { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "rebuild", this, Optional.ofNullable(result)); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "rebuild", e); } @@ -707,7 +707,7 @@ public AJoinPoint rebuildTryImpl() { /** * Recompiles only this file, returns a join point to the new recompiled file, or returns a clavaException join point if a problem happens */ - public final AJoinPoint rebuildTry() { + public final Object rebuildTry() { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "rebuildTry", this, Optional.empty()); @@ -716,7 +716,7 @@ public final AJoinPoint rebuildTry() { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "rebuildTry", this, Optional.ofNullable(result)); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "rebuildTry", e); } @@ -838,7 +838,7 @@ public AJoinPoint addFunctionImpl(String name) { * Adds a function to the file that returns void and has no parameters * @param name */ - public final AJoinPoint addFunction(String name) { + public final Object addFunction(String name) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "addFunction", this, Optional.empty(), name); @@ -847,7 +847,7 @@ public final AJoinPoint addFunction(String name) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "addFunction", this, Optional.ofNullable(result), name); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "addFunction", e); } diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFloatLiteral.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFloatLiteral.java index 423ecf328..fcb8163be 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFloatLiteral.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFloatLiteral.java @@ -816,21 +816,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aLiteral.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aLiteral.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aLiteral.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aLiteral.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFunction.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFunction.java index 5c66dc3fe..ffb2977cf 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFunction.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFunction.java @@ -724,7 +724,7 @@ public AFunction cloneImpl(String newName, Boolean insert) { * @param newName * @param insert */ - public final AFunction clone(String newName, Boolean insert) { + public final Object clone(String newName, Boolean insert) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "clone", this, Optional.empty(), newName, insert); @@ -733,7 +733,7 @@ public final AFunction clone(String newName, Boolean insert) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "clone", this, Optional.ofNullable(result), newName, insert); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "clone", e); } @@ -753,7 +753,7 @@ public AFunction cloneOnFileImpl(String newName, String fileName) { * @param newName * @param fileName */ - public final AFunction cloneOnFile(String newName, String fileName) { + public final Object cloneOnFile(String newName, String fileName) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "cloneOnFile", this, Optional.empty(), newName, fileName); @@ -762,7 +762,7 @@ public final AFunction cloneOnFile(String newName, String fileName) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "cloneOnFile", this, Optional.ofNullable(result), newName, fileName); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "cloneOnFile", e); } @@ -782,7 +782,7 @@ public AFunction cloneOnFileImpl(String newName, AFile fileName) { * @param newName * @param fileName */ - public final AFunction cloneOnFile(String newName, AFile fileName) { + public final Object cloneOnFile(String newName, AFile fileName) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "cloneOnFile", this, Optional.empty(), newName, fileName); @@ -791,7 +791,7 @@ public final AFunction cloneOnFile(String newName, AFile fileName) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "cloneOnFile", this, Optional.ofNullable(result), newName, fileName); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "cloneOnFile", e); } @@ -809,7 +809,7 @@ public AJoinPoint insertReturnImpl(AJoinPoint code) { * Inserts the joinpoint before the return points of the function (return statements and implicitly, at the end of the function). Returns the last inserted node * @param code */ - public final AJoinPoint insertReturn(AJoinPoint code) { + public final Object insertReturn(AJoinPoint code) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertReturn", this, Optional.empty(), code); @@ -818,7 +818,7 @@ public final AJoinPoint insertReturn(AJoinPoint code) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertReturn", this, Optional.ofNullable(result), code); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertReturn", e); } @@ -836,7 +836,7 @@ public AJoinPoint insertReturnImpl(String code) { * Inserts code as a literal statement before the return points of the function (return statements and implicitly, at the end of the function). Returns the last inserted node * @param code */ - public final AJoinPoint insertReturn(String code) { + public final Object insertReturn(String code) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertReturn", this, Optional.empty(), code); @@ -845,7 +845,7 @@ public final AJoinPoint insertReturn(String code) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertReturn", this, Optional.ofNullable(result), code); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertReturn", e); } @@ -999,7 +999,7 @@ public ACall newCallImpl(AJoinPoint[] args) { * Creates a new call to this function * @param args */ - public final ACall newCall(AJoinPoint[] args) { + public final Object newCall(AJoinPoint[] args) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "newCall", this, Optional.empty(), new Object[] { args}); @@ -1008,7 +1008,7 @@ public final ACall newCall(AJoinPoint[] args) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "newCall", this, Optional.ofNullable(result), new Object[] { args}); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "newCall", e); } @@ -1924,21 +1924,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aDeclarator.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aDeclarator.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aDeclarator.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aDeclarator.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFunctionType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFunctionType.java index a7bfe8b7a..3bb5ef54b 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFunctionType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AFunctionType.java @@ -1043,21 +1043,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AGotoStmt.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AGotoStmt.java index 457af84e0..edef193e7 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AGotoStmt.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AGotoStmt.java @@ -948,21 +948,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AIf.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AIf.java index 5609d93c0..b61d96a3f 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AIf.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AIf.java @@ -1130,21 +1130,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AImplicitValue.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AImplicitValue.java index 50e2b8432..d3d33106b 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AImplicitValue.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AImplicitValue.java @@ -788,21 +788,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AInclude.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AInclude.java index d1392259d..bcfd0ae1e 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AInclude.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AInclude.java @@ -814,21 +814,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aDecl.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aDecl.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aDecl.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aDecl.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AInitList.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AInitList.java index f9faa31ab..96e9ab11c 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AInitList.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AInitList.java @@ -813,21 +813,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AIntLiteral.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AIntLiteral.java index 8e85d0729..e5a102386 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AIntLiteral.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AIntLiteral.java @@ -816,21 +816,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aLiteral.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aLiteral.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aLiteral.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aLiteral.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AJoinPoint.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AJoinPoint.java index 7da69151f..3d69cae68 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AJoinPoint.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AJoinPoint.java @@ -138,7 +138,7 @@ public AJoinPoint replaceWithImpl(AJoinPoint node) { * Replaces this node with the given node * @param node */ - public final AJoinPoint replaceWith(AJoinPoint node) { + public final Object replaceWith(AJoinPoint node) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "replaceWith", this, Optional.empty(), node); @@ -147,7 +147,7 @@ public final AJoinPoint replaceWith(AJoinPoint node) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "replaceWith", this, Optional.ofNullable(result), node); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "replaceWith", e); } @@ -165,7 +165,7 @@ public AJoinPoint replaceWithImpl(String node) { * Overload which accepts a string * @param node */ - public final AJoinPoint replaceWith(String node) { + public final Object replaceWith(String node) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "replaceWith", this, Optional.empty(), node); @@ -174,7 +174,7 @@ public final AJoinPoint replaceWith(String node) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "replaceWith", this, Optional.ofNullable(result), node); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "replaceWith", e); } @@ -192,7 +192,7 @@ public AJoinPoint replaceWithImpl(AJoinPoint[] node) { * Overload which accepts a list of join points * @param node */ - public final AJoinPoint replaceWith(AJoinPoint[] node) { + public final Object replaceWith(AJoinPoint[] node) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "replaceWith", this, Optional.empty(), new Object[] { node}); @@ -201,7 +201,7 @@ public final AJoinPoint replaceWith(AJoinPoint[] node) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "replaceWith", this, Optional.ofNullable(result), new Object[] { node}); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "replaceWith", e); } @@ -219,7 +219,7 @@ public AJoinPoint replaceWithStringsImpl(String[] node) { * Overload which accepts a list of strings * @param node */ - public final AJoinPoint replaceWithStrings(String[] node) { + public final Object replaceWithStrings(String[] node) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "replaceWithStrings", this, Optional.empty(), new Object[] { node}); @@ -228,7 +228,7 @@ public final AJoinPoint replaceWithStrings(String[] node) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "replaceWithStrings", this, Optional.ofNullable(result), new Object[] { node}); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "replaceWithStrings", e); } @@ -246,7 +246,7 @@ public AJoinPoint insertBeforeImpl(AJoinPoint node) { * Inserts the given join point before this join point * @param node */ - public final AJoinPoint insertBefore(AJoinPoint node) { + public final Object insertBefore(AJoinPoint node) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertBefore", this, Optional.empty(), node); @@ -255,7 +255,7 @@ public final AJoinPoint insertBefore(AJoinPoint node) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertBefore", this, Optional.ofNullable(result), node); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertBefore", e); } @@ -273,7 +273,7 @@ public AJoinPoint insertBeforeImpl(String node) { * Overload which accepts a string * @param node */ - public final AJoinPoint insertBefore(String node) { + public final Object insertBefore(String node) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertBefore", this, Optional.empty(), node); @@ -282,7 +282,7 @@ public final AJoinPoint insertBefore(String node) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertBefore", this, Optional.ofNullable(result), node); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertBefore", e); } @@ -300,7 +300,7 @@ public AJoinPoint insertAfterImpl(AJoinPoint node) { * Inserts the given join point after this join point * @param node */ - public final AJoinPoint insertAfter(AJoinPoint node) { + public final Object insertAfter(AJoinPoint node) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertAfter", this, Optional.empty(), node); @@ -309,7 +309,7 @@ public final AJoinPoint insertAfter(AJoinPoint node) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertAfter", this, Optional.ofNullable(result), node); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertAfter", e); } @@ -327,7 +327,7 @@ public AJoinPoint insertAfterImpl(String code) { * Overload which accepts a string * @param code */ - public final AJoinPoint insertAfter(String code) { + public final Object insertAfter(String code) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertAfter", this, Optional.empty(), code); @@ -336,7 +336,7 @@ public final AJoinPoint insertAfter(String code) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertAfter", this, Optional.ofNullable(result), code); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertAfter", e); } @@ -352,7 +352,7 @@ public AJoinPoint detachImpl() { /** * Removes the node associated to this joinpoint from the AST */ - public final AJoinPoint detach() { + public final Object detach() { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "detach", this, Optional.empty()); @@ -361,7 +361,7 @@ public final AJoinPoint detach() { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "detach", this, Optional.ofNullable(result)); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "detach", e); } @@ -403,7 +403,7 @@ public AJoinPoint copyImpl() { /** * Performs a copy of the node and its children, but not of the nodes in its fields */ - public final AJoinPoint copy() { + public final Object copy() { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "copy", this, Optional.empty()); @@ -412,7 +412,7 @@ public final AJoinPoint copy() { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "copy", this, Optional.ofNullable(result)); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "copy", e); } @@ -428,7 +428,7 @@ public AJoinPoint deepCopyImpl() { /** * Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive) */ - public final AJoinPoint deepCopy() { + public final Object deepCopy() { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "deepCopy", this, Optional.empty()); @@ -437,7 +437,7 @@ public final AJoinPoint deepCopy() { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "deepCopy", this, Optional.ofNullable(result)); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "deepCopy", e); } @@ -466,7 +466,7 @@ public final Object setUserField(String fieldName, Object value) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "setUserField", this, Optional.ofNullable(result), fieldName, value); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "setUserField", e); } @@ -493,7 +493,7 @@ public final Object setUserField(Map fieldNameAndValue) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "setUserField", this, Optional.ofNullable(result), fieldNameAndValue); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "setUserField", e); } @@ -513,7 +513,7 @@ public AJoinPoint setValueImpl(String key, Object value) { * @param key * @param value */ - public final AJoinPoint setValue(String key, Object value) { + public final Object setValue(String key, Object value) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "setValue", this, Optional.empty(), key, value); @@ -522,7 +522,7 @@ public final AJoinPoint setValue(String key, Object value) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "setValue", this, Optional.ofNullable(result), key, value); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "setValue", e); } @@ -579,52 +579,54 @@ public final void removeChildren() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ - public void setFirstChildImpl(AJoinPoint node) { + public AJoinPoint setFirstChildImpl(AJoinPoint node) { throw new UnsupportedOperationException(get_class()+": Action setFirstChild not implemented "); } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ - public final void setFirstChild(AJoinPoint node) { + public final Object setFirstChild(AJoinPoint node) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "setFirstChild", this, Optional.empty(), node); } - this.setFirstChildImpl(node); + AJoinPoint result = this.setFirstChildImpl(node); if(hasListeners()) { - eventTrigger().triggerAction(Stage.END, "setFirstChild", this, Optional.empty(), node); + eventTrigger().triggerAction(Stage.END, "setFirstChild", this, Optional.ofNullable(result), node); } + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "setFirstChild", e); } } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ - public void setLastChildImpl(AJoinPoint node) { + public AJoinPoint setLastChildImpl(AJoinPoint node) { throw new UnsupportedOperationException(get_class()+": Action setLastChild not implemented "); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ - public final void setLastChild(AJoinPoint node) { + public final Object setLastChild(AJoinPoint node) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "setLastChild", this, Optional.empty(), node); } - this.setLastChildImpl(node); + AJoinPoint result = this.setLastChildImpl(node); if(hasListeners()) { - eventTrigger().triggerAction(Stage.END, "setLastChild", this, Optional.empty(), node); + eventTrigger().triggerAction(Stage.END, "setLastChild", this, Optional.ofNullable(result), node); } + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "setLastChild", e); } @@ -644,7 +646,7 @@ public AJoinPoint toCommentImpl(String prefix, String suffix) { * @param prefix * @param suffix */ - public final AJoinPoint toComment(String prefix, String suffix) { + public final Object toComment(String prefix, String suffix) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "toComment", this, Optional.empty(), prefix, suffix); @@ -653,7 +655,7 @@ public final AJoinPoint toComment(String prefix, String suffix) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "toComment", this, Optional.ofNullable(result), prefix, suffix); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "toComment", e); } diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALabelDecl.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALabelDecl.java index b4dabe8bc..af59756de 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALabelDecl.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALabelDecl.java @@ -801,21 +801,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aNamedDecl.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aNamedDecl.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aNamedDecl.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aNamedDecl.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALabelStmt.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALabelStmt.java index 8a58206bc..a5d6a29b6 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALabelStmt.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALabelStmt.java @@ -948,21 +948,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALiteral.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALiteral.java index c5bd06e1c..9598f72f5 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALiteral.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALiteral.java @@ -788,21 +788,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALoop.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALoop.java index 8cb496708..042fa06a6 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALoop.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ALoop.java @@ -822,7 +822,7 @@ public AStatement tileImpl(String blockSize, AStatement reference, Boolean useTe * @param reference * @param useTernary */ - public final AStatement tile(String blockSize, AStatement reference, Boolean useTernary) { + public final Object tile(String blockSize, AStatement reference, Boolean useTernary) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "tile", this, Optional.empty(), blockSize, reference, useTernary); @@ -831,7 +831,7 @@ public final AStatement tile(String blockSize, AStatement reference, Boolean use if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "tile", this, Optional.ofNullable(result), blockSize, reference, useTernary); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "tile", e); } @@ -1752,21 +1752,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMarker.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMarker.java index 553dc04bf..23fdb3416 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMarker.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMarker.java @@ -838,21 +838,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aPragma.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aPragma.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aPragma.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aPragma.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMemberAccess.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMemberAccess.java index 5cdee2d0d..77d280367 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMemberAccess.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMemberAccess.java @@ -965,21 +965,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMemberCall.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMemberCall.java index 5c003b93e..5fd812ca4 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMemberCall.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMemberCall.java @@ -1010,21 +1010,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aCall.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aCall.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aCall.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aCall.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMethod.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMethod.java index 9f3298a0a..6e173b9be 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMethod.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AMethod.java @@ -1131,21 +1131,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aFunction.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aFunction.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aFunction.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aFunction.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ANamedDecl.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ANamedDecl.java index 7fbffe0f3..0d1d357f8 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ANamedDecl.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ANamedDecl.java @@ -945,21 +945,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aDecl.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aDecl.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aDecl.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aDecl.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ANewExpr.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ANewExpr.java index 31cbd5c4e..901de52c1 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ANewExpr.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ANewExpr.java @@ -788,21 +788,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AOmp.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AOmp.java index 1dc4e589c..9df994e84 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AOmp.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AOmp.java @@ -1806,21 +1806,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aPragma.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aPragma.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aPragma.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aPragma.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AOp.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AOp.java index be30c60a9..3e4572481 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AOp.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AOp.java @@ -863,21 +863,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParam.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParam.java index 29756a8e7..dca70bd37 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParam.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParam.java @@ -880,21 +880,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aVardecl.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aVardecl.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aVardecl.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aVardecl.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParenExpr.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParenExpr.java index 1530fde51..1f258c48a 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParenExpr.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParenExpr.java @@ -813,21 +813,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParenType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParenType.java index c08502f41..eadb200aa 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParenType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AParenType.java @@ -980,21 +980,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/APointerType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/APointerType.java index 655c68300..a67da6a04 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/APointerType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/APointerType.java @@ -1003,21 +1003,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AProgram.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AProgram.java index 996151190..47880e777 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AProgram.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AProgram.java @@ -475,7 +475,7 @@ public boolean rebuildImpl() { /** * Recompiles the program currently represented by the AST, transforming literal code into AST nodes. Returns true if all files could be parsed correctly, or false otherwise */ - public final boolean rebuild() { + public final Object rebuild() { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "rebuild", this, Optional.empty()); @@ -526,7 +526,7 @@ public AJoinPoint addFileImpl(AFile file) { * Adds a file join point to the current program * @param file */ - public final AJoinPoint addFile(AFile file) { + public final Object addFile(AFile file) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "addFile", this, Optional.empty(), file); @@ -535,7 +535,7 @@ public final AJoinPoint addFile(AFile file) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "addFile", this, Optional.ofNullable(result), file); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "addFile", e); } @@ -553,7 +553,7 @@ public AJoinPoint addFileFromPathImpl(Object filepath) { * Adds a file join point to the current program, from the given path, which can be either a Java File or a String * @param filepath */ - public final AJoinPoint addFileFromPath(Object filepath) { + public final Object addFileFromPath(Object filepath) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "addFileFromPath", this, Optional.empty(), filepath); @@ -562,7 +562,7 @@ public final AJoinPoint addFileFromPath(Object filepath) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "addFileFromPath", this, Optional.ofNullable(result), filepath); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "addFileFromPath", e); } diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AQualType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AQualType.java index 0d3647b8e..707928a21 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AQualType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AQualType.java @@ -981,21 +981,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ARecord.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ARecord.java index 1d1a4e991..f93aa522d 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ARecord.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ARecord.java @@ -980,21 +980,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aNamedDecl.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aNamedDecl.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aNamedDecl.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aNamedDecl.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AReturnStmt.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AReturnStmt.java index fb6918603..9e6353bbc 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AReturnStmt.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AReturnStmt.java @@ -923,21 +923,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AScope.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AScope.java index 97be46a77..9b150e079 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AScope.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AScope.java @@ -340,7 +340,7 @@ public AJoinPoint insertBeginImpl(AJoinPoint node) { * * @param node */ - public final AJoinPoint insertBegin(AJoinPoint node) { + public final Object insertBegin(AJoinPoint node) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertBegin", this, Optional.empty(), node); @@ -349,7 +349,7 @@ public final AJoinPoint insertBegin(AJoinPoint node) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertBegin", this, Optional.ofNullable(result), node); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertBegin", e); } @@ -367,7 +367,7 @@ public AJoinPoint insertBeginImpl(String code) { * * @param code */ - public final AJoinPoint insertBegin(String code) { + public final Object insertBegin(String code) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertBegin", this, Optional.empty(), code); @@ -376,7 +376,7 @@ public final AJoinPoint insertBegin(String code) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertBegin", this, Optional.ofNullable(result), code); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertBegin", e); } @@ -394,7 +394,7 @@ public AJoinPoint insertEndImpl(AJoinPoint node) { * * @param node */ - public final AJoinPoint insertEnd(AJoinPoint node) { + public final Object insertEnd(AJoinPoint node) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertEnd", this, Optional.empty(), node); @@ -403,7 +403,7 @@ public final AJoinPoint insertEnd(AJoinPoint node) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertEnd", this, Optional.ofNullable(result), node); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertEnd", e); } @@ -421,7 +421,7 @@ public AJoinPoint insertEndImpl(String code) { * * @param code */ - public final AJoinPoint insertEnd(String code) { + public final Object insertEnd(String code) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertEnd", this, Optional.empty(), code); @@ -430,7 +430,7 @@ public final AJoinPoint insertEnd(String code) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertEnd", this, Optional.ofNullable(result), code); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertEnd", e); } @@ -448,7 +448,7 @@ public AJoinPoint insertReturnImpl(AJoinPoint code) { * Inserts the joinpoint before the return points of the scope (return statements and implicitly, at the end of the scope). Returns the last inserted node * @param code */ - public final AJoinPoint insertReturn(AJoinPoint code) { + public final Object insertReturn(AJoinPoint code) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertReturn", this, Optional.empty(), code); @@ -457,7 +457,7 @@ public final AJoinPoint insertReturn(AJoinPoint code) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertReturn", this, Optional.ofNullable(result), code); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertReturn", e); } @@ -475,7 +475,7 @@ public AJoinPoint insertReturnImpl(String code) { * Inserts the joinpoint before the return points of the scope (return statements and implicitly, at the end of the scope). Returns the last inserted node * @param code */ - public final AJoinPoint insertReturn(String code) { + public final Object insertReturn(String code) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "insertReturn", this, Optional.empty(), code); @@ -484,7 +484,7 @@ public final AJoinPoint insertReturn(String code) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "insertReturn", this, Optional.ofNullable(result), code); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "insertReturn", e); } @@ -506,7 +506,7 @@ public AJoinPoint addLocalImpl(String name, AJoinPoint type, String initValue) { * @param type * @param initValue */ - public final AJoinPoint addLocal(String name, AJoinPoint type, String initValue) { + public final Object addLocal(String name, AJoinPoint type, String initValue) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "addLocal", this, Optional.empty(), name, type, initValue); @@ -515,7 +515,7 @@ public final AJoinPoint addLocal(String name, AJoinPoint type, String initValue) if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "addLocal", this, Optional.ofNullable(result), name, type, initValue); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "addLocal", e); } @@ -581,7 +581,7 @@ public String cfgImpl() { /** * CFG tester */ - public final String cfg() { + public final Object cfg() { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "cfg", this, Optional.empty()); @@ -590,7 +590,7 @@ public final String cfg() { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "cfg", this, Optional.ofNullable(result)); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "cfg", e); } @@ -606,7 +606,7 @@ public String dfgImpl() { /** * DFG tester */ - public final String dfg() { + public final Object dfg() { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "dfg", this, Optional.empty()); @@ -615,7 +615,7 @@ public final String dfg() { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "dfg", this, Optional.ofNullable(result)); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "dfg", e); } @@ -1484,21 +1484,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AStruct.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AStruct.java index 2d8b81fe3..2fca5d2ac 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AStruct.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AStruct.java @@ -855,21 +855,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aRecord.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aRecord.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aRecord.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aRecord.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ASwitch.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ASwitch.java index 270604fc5..c86ddf1f4 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ASwitch.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ASwitch.java @@ -991,21 +991,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATag.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATag.java index 26f893d70..4de9fd7f3 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATag.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATag.java @@ -804,21 +804,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aPragma.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aPragma.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aPragma.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aPragma.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATagType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATagType.java index b73836308..29120f19a 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATagType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATagType.java @@ -969,21 +969,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATemplateSpecializationType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATemplateSpecializationType.java index ee14d6db5..111ac7222 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATemplateSpecializationType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATemplateSpecializationType.java @@ -1031,21 +1031,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATernaryOp.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATernaryOp.java index 3429587a8..04e9510a0 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATernaryOp.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATernaryOp.java @@ -939,21 +939,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aOp.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aOp.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aOp.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aOp.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AThis.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AThis.java index ecfb21a36..37e6a7891 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AThis.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AThis.java @@ -788,21 +788,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AType.java index 140c9be92..1862caf68 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AType.java @@ -619,7 +619,7 @@ public boolean setTypeFieldByValueRecursiveImpl(Object currentValue, Object newV * @param currentValue * @param newValue */ - public final boolean setTypeFieldByValueRecursive(Object currentValue, Object newValue) { + public final Object setTypeFieldByValueRecursive(Object currentValue, Object newValue) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "setTypeFieldByValueRecursive", this, Optional.empty(), currentValue, newValue); @@ -648,7 +648,7 @@ public AType setUnderlyingTypeImpl(AType oldValue, AType newValue) { * @param oldValue * @param newValue */ - public final AType setUnderlyingType(AType oldValue, AType newValue) { + public final Object setUnderlyingType(AType oldValue, AType newValue) { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "setUnderlyingType", this, Optional.empty(), oldValue, newValue); @@ -657,7 +657,7 @@ public final AType setUnderlyingType(AType oldValue, AType newValue) { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "setUnderlyingType", this, Optional.ofNullable(result), oldValue, newValue); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "setUnderlyingType", e); } @@ -673,7 +673,7 @@ public AType asConstImpl() { /** * Returns a new node based on this type with the qualifier const */ - public final AType asConst() { + public final Object asConst() { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "asConst", this, Optional.empty()); @@ -682,7 +682,7 @@ public final AType asConst() { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "asConst", this, Optional.ofNullable(result)); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "asConst", e); } diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefDecl.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefDecl.java index b25706bad..577e3001b 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefDecl.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefDecl.java @@ -801,21 +801,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aTypedefNameDecl.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aTypedefNameDecl.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aTypedefNameDecl.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aTypedefNameDecl.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefNameDecl.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefNameDecl.java index 2f71ec800..f0295f4ad 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefNameDecl.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefNameDecl.java @@ -801,21 +801,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aNamedDecl.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aNamedDecl.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aNamedDecl.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aNamedDecl.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefType.java index b0bdbf33f..5fa425b8c 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/ATypedefType.java @@ -967,21 +967,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUnaryExprOrType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUnaryExprOrType.java index 3e2dbb737..d0213218e 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUnaryExprOrType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUnaryExprOrType.java @@ -949,21 +949,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUnaryOp.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUnaryOp.java index cf3f1fdcd..b80eea305 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUnaryOp.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUnaryOp.java @@ -877,21 +877,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aOp.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aOp.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aOp.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aOp.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUndefinedType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUndefinedType.java index c512b26d6..2f5b5abaa 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUndefinedType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AUndefinedType.java @@ -919,21 +919,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVardecl.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVardecl.java index cafb560f5..ee94b914f 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVardecl.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVardecl.java @@ -293,7 +293,7 @@ public AVarref varrefImpl() { /** * Creates a new varref based on this vardecl */ - public final AVarref varref() { + public final Object varref() { try { if(hasListeners()) { eventTrigger().triggerAction(Stage.BEGIN, "varref", this, Optional.empty()); @@ -302,7 +302,7 @@ public final AVarref varref() { if(hasListeners()) { eventTrigger().triggerAction(Stage.END, "varref", this, Optional.ofNullable(result)); } - return result; + return result!=null?result:getUndefinedValue(); } catch(Exception e) { throw new ActionException(get_class(), "varref", e); } @@ -1110,21 +1110,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aDeclarator.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aDeclarator.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aDeclarator.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aDeclarator.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVariableArrayType.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVariableArrayType.java index 18e9f5bd4..48c8d0a06 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVariableArrayType.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVariableArrayType.java @@ -997,21 +997,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aArrayType.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aArrayType.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aArrayType.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aArrayType.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVarref.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVarref.java index 29dbf6476..c31a491bd 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVarref.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AVarref.java @@ -991,21 +991,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aExpression.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aExpression.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aExpression.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aExpression.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AWrapperStmt.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AWrapperStmt.java index e6883bb6e..42ec4d7a9 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AWrapperStmt.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/abstracts/joinpoints/AWrapperStmt.java @@ -939,21 +939,21 @@ public void removeChildrenImpl() { } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setFirstChildImpl(AJoinPoint node) { - this.aStatement.setFirstChildImpl(node); + public AJoinPoint setFirstChildImpl(AJoinPoint node) { + return this.aStatement.setFirstChildImpl(node); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. * @param node */ @Override - public void setLastChildImpl(AJoinPoint node) { - this.aStatement.setLastChildImpl(node); + public AJoinPoint setLastChildImpl(AJoinPoint node) { + return this.aStatement.setLastChildImpl(node); } /** diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/joinpoints/CxxExpression.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/joinpoints/CxxExpression.java index 3add472ce..40ab6f612 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/joinpoints/CxxExpression.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/joinpoints/CxxExpression.java @@ -139,7 +139,7 @@ public ADecl getDeclImpl() { public AJoinPoint replaceWithImpl(AJoinPoint node) { // If node to replace is statement, check if this expression is inside an ExprStmt if (node instanceof AStatement && node.getNode().getParent() instanceof ExprStmt) { - return node.getParentImpl().replaceWith(node); + return node.getParentImpl().replaceWithImpl(node); } return super.replaceWithImpl(node); diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/joinpoints/CxxProgram.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/joinpoints/CxxProgram.java index 0a8eb0576..f0445b96a 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/joinpoints/CxxProgram.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/joinpoints/CxxProgram.java @@ -257,7 +257,7 @@ public AJoinPoint addFileFromPathImpl(Object filepath) { // Create file join point TranslationUnit newTu = getFactory().translationUnit(file, Arrays.asList(code)); - return addFile(new CxxFile(newTu)); + return addFileImpl(new CxxFile(newTu)); } private File getFile(Object filepath) { From 36fa44fc7ffa574b1a98c3f42f082766d4fda211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bispo?= Date: Thu, 22 Aug 2024 15:44:07 +0100 Subject: [PATCH 02/20] Renames GitHub workflow files --- .github/workflows/{ant-main.yml => main.yml} | 0 .github/workflows/{ant-staging.yml => staging.yml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ant-main.yml => main.yml} (100%) rename .github/workflows/{ant-staging.yml => staging.yml} (100%) diff --git a/.github/workflows/ant-main.yml b/.github/workflows/main.yml similarity index 100% rename from .github/workflows/ant-main.yml rename to .github/workflows/main.yml diff --git a/.github/workflows/ant-staging.yml b/.github/workflows/staging.yml similarity index 100% rename from .github/workflows/ant-staging.yml rename to .github/workflows/staging.yml From 841ac22ca6e55dffe79274368a232a7209c498fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bispo?= Date: Thu, 22 Aug 2024 15:48:33 +0100 Subject: [PATCH 03/20] Updates staging workflow to use Gradle build instead of Eclipse-build --- .github/workflows/staging.yml | 68 ++++++++++++++++------------------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index ccacc6737..08939c2fa 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -21,54 +21,48 @@ jobs: runs-on: ubuntu-latest - #defaults: - # run: - # working-directory: ./.. - steps: - uses: actions/checkout@v4 # Because of scheduled runs, by default run on default branch with: ref: staging + path: workspace/clava - - name: Cache ivy dependencies - id: cache-nivy - uses: actions/cache@v3 - env: - cache-name: cache-ivy-dependencies - with: - # ivy dependencies cache files are stored in `~/.ivy2` on Linux/macOS - path: ~/.ivy2 - key: ${{ runner.os }}-build-${{ env.cache-name }} - - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' - - name: Install build essentials and CMake - run: | - sudo apt-get update - sudo apt-get install build-essential - sudo apt-get install -y cmake - - name: Generate build.xml - run: | - wget -q -N http://specs.fe.up.pt/tools/eclipse-build.jar - java -jar eclipse-build.jar https://github.com/specs-feup/specs-java-libs https://github.com/specs-feup/lara-framework?commit=staging ./ - wget -N -O /usr/share/ant/lib/ivy-2.5.0.jar specs.fe.up.pt/libs/ivy-2.5.0.jar - - name: Build with Ant - run: | - ant -noinput -buildfile build.xml + - name: Check out specs-java-libs repo + uses: actions/checkout@v4 + with: + repository: specs-feup/specs-java-libs + path: workspace/specs-java-libs + + - name: Check out lara-framework repo + uses: actions/checkout@v4 + with: + repository: specs-feup/lara-framework + path: workspace/lara-framework + ref: staging + + # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 - - name: List directory - run: | - echo "Current folder" - ls - - name: Publish Test Report - uses: mikepenz/action-junit-report@v3.6.1 - if: always() # always run even if the previous step fails + # Setting up gradle multi-project would be helpful + - name: Build and test ClangAstParser + working-directory: workspace/clava/ClangAstParser + run: gradle build test + - name: Build and test ClavaWeaver + working-directory: workspace/clava/ClavaWeaver + run: gradle build test + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: always() with: - report_paths: '**/reports-eclipse-build/TEST-*.xml' + report_paths: 'workspace/clava/**/build/test-results/test/TEST-*.xml' summary: true - #exclude_sources: '' From f58e517a1bc4d1e3d514ac2a0d3f524967a09e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bispo?= Date: Thu, 22 Aug 2024 16:45:05 +0100 Subject: [PATCH 04/20] [ClangAstParser] Removes spurious @Test tag from file --- .../antarex/clang/parser/AClangAstTester.java | 22 ++++++------------- .../test/eu/antarex/clang/parser/CTester.java | 6 ++--- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/ClangAstParser/test/eu/antarex/clang/parser/AClangAstTester.java b/ClangAstParser/test/eu/antarex/clang/parser/AClangAstTester.java index 2986013ad..859bfa976 100644 --- a/ClangAstParser/test/eu/antarex/clang/parser/AClangAstTester.java +++ b/ClangAstParser/test/eu/antarex/clang/parser/AClangAstTester.java @@ -1,11 +1,11 @@ /** * Copyright 2016 SPeCS. - * + *

* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + *

* http://www.apache.org/licenses/LICENSE-2.0 - * + *

* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. under the License. @@ -13,19 +13,8 @@ package eu.antarex.clang.parser; -import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - import org.junit.Assert; import org.junit.Before; -import org.junit.Test; - import pt.up.fe.specs.clang.codeparser.CodeParser; import pt.up.fe.specs.clang.codeparser.ParallelCodeParser; import pt.up.fe.specs.clang.dumper.ClangAstDumper; @@ -37,6 +26,10 @@ import pt.up.fe.specs.util.SpecsSystem; import pt.up.fe.specs.util.providers.ResourceProvider; +import java.io.File; +import java.util.*; +import java.util.stream.Collectors; + public abstract class AClangAstTester { private static final boolean CLEAN_CLANG_FILES = true; @@ -183,7 +176,6 @@ public static void clear() throws Exception { } - @Test public void testProper() { // Parse files diff --git a/ClangAstParser/test/eu/antarex/clang/parser/CTester.java b/ClangAstParser/test/eu/antarex/clang/parser/CTester.java index d7f5c00db..c2097869a 100644 --- a/ClangAstParser/test/eu/antarex/clang/parser/CTester.java +++ b/ClangAstParser/test/eu/antarex/clang/parser/CTester.java @@ -1,11 +1,11 @@ /** * Copyright 2017 SPeCS. - * + *

* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + *

* http://www.apache.org/licenses/LICENSE-2.0 - * + *

* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. under the License. From 453376b581022ab10225d9d6f2a267919ae92c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bispo?= Date: Thu, 22 Aug 2024 16:57:24 +0100 Subject: [PATCH 05/20] Updates main workflow file to use Gradle as build system --- .github/workflows/main.yml | 74 ++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index be517fdba..2027fe3a2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,10 @@ on: pull_request: branches: [ master ] + # Daily at midnight + schedule: + - cron: '0 0 * * *' + permissions: checks: write @@ -17,46 +21,48 @@ jobs: runs-on: ubuntu-latest - #defaults: - # run: - # working-directory: ./.. - steps: - - uses: actions/checkout@v3 - - - name: Cache ivy dependencies - id: cache-nivy - uses: actions/cache@v3 - env: - cache-name: cache-ivy-dependencies + - uses: actions/checkout@v4 + # Because of scheduled runs, by default run on default branch with: - # ivy dependencies cache files are stored in `~/.ivy2` on Linux/macOS - path: ~/.ivy2 - key: ${{ runner.os }}-build-${{ env.cache-name }} - + ref: master + path: workspace/clava + - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' - - name: Generate build.xml - run: | - wget -N http://specs.fe.up.pt/tools/eclipse-build.jar - java -jar eclipse-build.jar https://github.com/specs-feup/specs-java-libs https://github.com/specs-feup/lara-framework ./ - wget -N -O /usr/share/ant/lib/ivy-2.5.0.jar specs.fe.up.pt/libs/ivy-2.5.0.jar - - name: Build with Ant - run: | - ant -noinput -buildfile build.xml - - - name: List directory - run: | - echo "Current folder" - ls - - name: Publish Test Report - uses: mikepenz/action-junit-report@v3.6.1 - if: always() # always run even if the previous step fails + - name: Check out specs-java-libs repo + uses: actions/checkout@v4 + with: + repository: specs-feup/specs-java-libs + path: workspace/specs-java-libs + + - name: Check out lara-framework repo + uses: actions/checkout@v4 + with: + repository: specs-feup/lara-framework + path: workspace/lara-framework + ref: master + + # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + + # Setting up gradle multi-project would be helpful + - name: Build and test ClangAstParser + working-directory: workspace/clava/ClangAstParser + run: gradle build test + - name: Build and test ClavaWeaver + working-directory: workspace/clava/ClavaWeaver + run: gradle build test + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: always() with: - report_paths: '**/reports-eclipse-build/TEST-*.xml' + report_paths: 'workspace/clava/**/build/test-results/test/TEST-*.xml' summary: true - #exclude_sources: '' From 6150e7af44decf94e4fa5c209407cf1c3cb971f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bispo?= Date: Sun, 25 Aug 2024 13:48:43 +0100 Subject: [PATCH 06/20] [ClavaWeaver] Adds gradle task that generates legacy documentation --- ClavaWeaver/build.gradle | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ClavaWeaver/build.gradle b/ClavaWeaver/build.gradle index 5381e87f5..dc05b0182 100644 --- a/ClavaWeaver/build.gradle +++ b/ClavaWeaver/build.gradle @@ -105,4 +105,23 @@ task clava(type: JavaExec) { classpath = sourceSets.main.runtimeClasspath mainClass = 'pt.up.fe.specs.clava.weaver.ClavaWeaverLauncher' args = [] +} + +// Clava Doc (old version) +task clavadoc(type: JavaExec) { + group = "Execution" + description = "Generates Documentation (Legacy)" + classpath = sourceSets.main.runtimeClasspath + mainClass = 'pt.up.fe.specs.clava.weaver.ClavaWeaverLauncher' + args = [ + '-doc', + '--output', + '"../docs/api"', + '--clean', + '--exclude', + '_', + '--packages', +// '{"Clava API": ["../ClavaLaraApi/src-lara-clava/clava"], "LARA API": ["../LaraApi/src-lara-base","../LaraApi}/src-lara","../LARAI/src-lara","../LaraExtraApi/src-lara","../ClavaLaraApi/src-lara/clava"], "LARA Common Language API": ["../LaraCommonLanguageApi/src-lara"], "ANTAREX API": ["../AntarexClavaApi/src-lara/clava"]}', + '{\'Clava API\': [\'../ClavaLaraApi/src-lara-clava/clava\'], \'LARA API\': [\'../LaraApi/src-lara-base\',\'../LaraApi}/src-lara\',\'../LARAI/src-lara\',\'../LaraExtraApi/src-lara\',\'../ClavaLaraApi/src-lara/clava\'], \'LARA Common Language API\': [\'../LaraCommonLanguageApi/src-lara\'], \'ANTAREX API\': [\'../AntarexClavaApi/src-lara/clava\']}', + ] } \ No newline at end of file From 8a86289b0a6f4c5a75b545c84b51f1be4bd65f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bispo?= Date: Tue, 10 Sep 2024 19:02:33 +0100 Subject: [PATCH 07/20] Change to check if this triggers updated PR tests --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 91c9ea56d..08d2ad956 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ If you have used Clava, please consider filling the [Clava User Experience Feedb Clava also supports LARA files (`.lara`), but the LARA DSL is now considered legacy, please use JavaScript instead. + # Compatibility Currently Clava requires Java 11. From 222086c8f5d8280e239676a648c6ad76aa4b67fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bispo?= Date: Wed, 18 Sep 2024 11:16:01 +0100 Subject: [PATCH 08/20] Regenerates Joinpoints.ts to fix several tests - For some reason, _defaultAttributeInfo was annotated with @hidden instead of @internal, and this broke the default attribute functionality; --- Clava-JS/src-api/Joinpoints.ts | 172 +++--- ClavaLaraApi/src-lara/clava/Joinpoints.js | 550 +++++++++++++++++- ClavaLaraApi/src-lara/clava/clava/Clava.js | 6 +- .../src-lara/clava/clava/ClavaCode.js | 11 +- .../src-lara/clava/clava/code/Inliner.js | 13 +- .../src-lara/clava/clava/code/Outliner.js | 29 +- .../src-lara/clava/clava/gprofer/Gprofer.js | 6 +- .../clava/clava/graphs/cfg/CfgBuilder.js | 7 +- .../clava/clava/graphs/scg/ScgNodeData.js | 3 +- .../graphs/scg/StaticCallGraphBuilder.js | 6 +- .../src-lara/clava/clava/hls/MathAnalysis.js | 9 +- .../src-lara/clava/clava/hls/MathHInfo.js | 10 +- .../clava/clava/hls/TraceInstrumentation.js | 11 +- .../clava/clava/liveness/LivenessUtils.js | 8 +- .../clava/clava/memoi/MemoiAnalysis.js | 4 +- .../src-lara/clava/clava/memoi/MemoiGen.js | 34 +- .../src-lara/clava/clava/memoi/MemoiProf.js | 19 +- .../src-lara/clava/clava/memoi/MemoiTarget.js | 11 +- .../clava/clava/memoi/_MemoiGenHelper.js | 19 +- .../clava/clava/opencl/KernelReplacerAuto.js | 4 +- .../src-lara/clava/clava/opt/Inlining.js | 7 +- .../clava/clava/opt/NormalizeToSubset.js | 5 +- .../clava/clava/pass/SimplifyReturnStmts.js | 4 +- .../clava/pass/SimplifySelectionStmts.js | 4 +- .../clava/clava/pass/SingleReturnFunction.js | 9 +- .../clava/clava/pass/TransformSwitchToIf.js | 4 +- .../src-lara/clava/clava/stats/OpsCounter.js | 6 +- .../clava/clava/stats/StaticOpsCounter.js | 11 +- .../clava/clava/util/ClavaDataStore.js | 4 +- .../clava/clava/vitishls/VitisHlsUtils.js | 3 +- ClavaLaraApi/src-lara/clava/core.js | 6 + .../lara/benchmark/ClavaBenchmarkInstance.js | 3 +- .../src-lara/clava/lara/code/Timer.js | 11 +- 33 files changed, 741 insertions(+), 268 deletions(-) diff --git a/Clava-JS/src-api/Joinpoints.ts b/Clava-JS/src-api/Joinpoints.ts index 6d17e3f28..2c540300a 100644 --- a/Clava-JS/src-api/Joinpoints.ts +++ b/Clava-JS/src-api/Joinpoints.ts @@ -142,7 +142,7 @@ type DefaultAttributeMap = { export class Joinpoint extends LaraJoinPoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -531,7 +531,7 @@ export class Joinpoint extends LaraJoinPoint { export class Attribute extends Joinpoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -544,7 +544,7 @@ export class Attribute extends Joinpoint { */ export class ClavaException extends Joinpoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -556,7 +556,7 @@ export class ClavaException extends Joinpoint { export class Comment extends Joinpoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -571,7 +571,7 @@ export class Comment extends Joinpoint { */ export class Decl extends Joinpoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -587,7 +587,7 @@ export class Decl extends Joinpoint { */ export class Empty extends Joinpoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -596,7 +596,7 @@ export class Empty extends Joinpoint { export class Expression extends Joinpoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -622,7 +622,7 @@ export class Expression extends Joinpoint { */ export class FileJp extends Joinpoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -763,7 +763,7 @@ export class FileJp extends Joinpoint { export class ImplicitValue extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -775,7 +775,7 @@ export class ImplicitValue extends Expression { */ export class Include extends Decl { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -796,7 +796,7 @@ export class Include extends Decl { export class InitList extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -809,7 +809,7 @@ export class InitList extends Expression { export class Literal extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -818,7 +818,7 @@ export class Literal extends Expression { export class MemberAccess extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -846,7 +846,7 @@ export class MemberAccess extends Expression { */ export class NamedDecl extends Decl { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -874,7 +874,7 @@ export class NamedDecl extends Decl { export class NewExpr extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -883,7 +883,7 @@ export class NewExpr extends Expression { export class Op extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -898,7 +898,7 @@ export class Op extends Expression { export class ParenExpr extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -914,7 +914,7 @@ export class ParenExpr extends Expression { */ export class Pragma extends Joinpoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -952,7 +952,7 @@ export class Pragma extends Joinpoint { */ export class Program extends Joinpoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1058,7 +1058,7 @@ export class Program extends Joinpoint { */ export class RecordJp extends NamedDecl { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1082,7 +1082,7 @@ export class RecordJp extends NamedDecl { export class Statement extends Joinpoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1096,7 +1096,7 @@ export class Statement extends Joinpoint { */ export class Struct extends RecordJp { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1105,7 +1105,7 @@ export class Struct extends RecordJp { export class Switch extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1133,7 +1133,7 @@ export class Switch extends Statement { */ export class Tag extends Pragma { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "id", @@ -1146,7 +1146,7 @@ export class Tag extends Pragma { export class TernaryOp extends Op { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1158,7 +1158,7 @@ export class TernaryOp extends Op { export class This extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1167,7 +1167,7 @@ export class This extends Expression { export class Type extends Joinpoint { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1248,7 +1248,7 @@ export class Type extends Joinpoint { */ export class TypedefNameDecl extends NamedDecl { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1260,7 +1260,7 @@ export class TypedefNameDecl extends NamedDecl { */ export class TypedefType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1277,7 +1277,7 @@ export class TypedefType extends Type { export class UnaryExprOrType extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1293,7 +1293,7 @@ export class UnaryExprOrType extends Expression { export class UnaryOp extends Op { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1304,7 +1304,7 @@ export class UnaryOp extends Op { export class UndefinedType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1316,7 +1316,7 @@ export class UndefinedType extends Type { */ export class Varref extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1346,7 +1346,7 @@ export class Varref extends Expression { export class WrapperStmt extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1357,7 +1357,7 @@ export class WrapperStmt extends Statement { export class AccessSpecifier extends Decl { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "kind", @@ -1370,7 +1370,7 @@ export class AccessSpecifier extends Decl { export class AdjustedType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1383,7 +1383,7 @@ export class AdjustedType extends Type { export class ArrayAccess extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1412,7 +1412,7 @@ export class ArrayAccess extends Expression { export class ArrayType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1427,7 +1427,7 @@ export class ArrayType extends Type { export class BinaryOp extends Op { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1443,7 +1443,7 @@ export class BinaryOp extends Op { export class BoolLiteral extends Literal { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1453,7 +1453,7 @@ export class BoolLiteral extends Literal { export class Break extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1466,7 +1466,7 @@ export class Break extends Statement { export class BuiltinType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1496,7 +1496,7 @@ export class BuiltinType extends Type { export class Call extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1575,7 +1575,7 @@ export class Call extends Expression { export class Case extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1608,7 +1608,7 @@ export class Case extends Statement { export class Cast extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1624,7 +1624,7 @@ export class Cast extends Expression { export class CilkSpawn extends Call { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1633,7 +1633,7 @@ export class CilkSpawn extends Call { export class CilkSync extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1645,7 +1645,7 @@ export class CilkSync extends Statement { */ export class Class extends RecordJp { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1698,7 +1698,7 @@ export class Class extends RecordJp { export class Continue extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1707,7 +1707,7 @@ export class Continue extends Statement { export class CudaKernelCall extends Call { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1720,7 +1720,7 @@ export class CudaKernelCall extends Call { export class DeclStmt extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1736,7 +1736,7 @@ export class DeclStmt extends Statement { */ export class Declarator extends NamedDecl { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1745,7 +1745,7 @@ export class Declarator extends NamedDecl { export class DeleteExpr extends Expression { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1757,7 +1757,7 @@ export class DeleteExpr extends Expression { */ export class ElaboratedType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1778,7 +1778,7 @@ export class ElaboratedType extends Type { export class EmptyStmt extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1790,7 +1790,7 @@ export class EmptyStmt extends Statement { */ export class EnumDecl extends NamedDecl { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1800,7 +1800,7 @@ export class EnumDecl extends NamedDecl { export class EnumeratorDecl extends NamedDecl { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1809,7 +1809,7 @@ export class EnumeratorDecl extends NamedDecl { export class ExprStmt extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1825,7 +1825,7 @@ export class ExprStmt extends Statement { */ export class Field extends Declarator { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1834,7 +1834,7 @@ export class Field extends Declarator { export class FloatLiteral extends Literal { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -1847,7 +1847,7 @@ export class FloatLiteral extends Literal { */ export class FunctionJp extends Declarator { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -1999,7 +1999,7 @@ export class FunctionJp extends Declarator { export class FunctionType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2019,7 +2019,7 @@ export class FunctionType extends Type { export class GotoStmt extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2034,7 +2034,7 @@ export class GotoStmt extends Statement { export class If extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2062,7 +2062,7 @@ export class If extends Statement { export class IntLiteral extends Literal { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2072,7 +2072,7 @@ export class IntLiteral extends Literal { export class LabelDecl extends NamedDecl { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -2081,7 +2081,7 @@ export class LabelDecl extends NamedDecl { export class LabelStmt extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2096,7 +2096,7 @@ export class LabelStmt extends Statement { export class Loop extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "kind", @@ -2223,7 +2223,7 @@ export class Loop extends Statement { */ export class Marker extends Pragma { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "id", @@ -2237,7 +2237,7 @@ export class Marker extends Pragma { export class MemberCall extends Call { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -2251,7 +2251,7 @@ export class MemberCall extends Call { */ export class Method extends FunctionJp { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -2268,7 +2268,7 @@ export class Method extends FunctionJp { */ export class Omp extends Pragma { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "kind", @@ -2489,7 +2489,7 @@ export class Omp extends Pragma { export class ParenType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2504,7 +2504,7 @@ export class ParenType extends Type { export class PointerType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2523,7 +2523,7 @@ export class PointerType extends Type { export class QualType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2534,7 +2534,7 @@ export class QualType extends Type { export class ReturnStmt extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2547,7 +2547,7 @@ export class ReturnStmt extends Statement { */ export class Scope extends Statement { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2620,7 +2620,7 @@ export class Scope extends Statement { export class TagType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2634,7 +2634,7 @@ export class TagType extends Type { export class TemplateSpecializationType extends Type { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2650,7 +2650,7 @@ export class TemplateSpecializationType extends Type { */ export class TypedefDecl extends TypedefNameDecl { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -2662,7 +2662,7 @@ export class TypedefDecl extends TypedefNameDecl { */ export class Vardecl extends Declarator { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", @@ -2731,7 +2731,7 @@ export class Vardecl extends Declarator { export class VariableArrayType extends ArrayType { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2746,7 +2746,7 @@ export class VariableArrayType extends ArrayType { export class Body extends Scope { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2755,7 +2755,7 @@ export class Body extends Scope { export class CilkFor extends Loop { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "kind", @@ -2764,7 +2764,7 @@ export class CilkFor extends Loop { export class EnumType extends TagType { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, @@ -2774,7 +2774,7 @@ export class EnumType extends TagType { export class Param extends Vardecl { /** - * @hidden + * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: "name", diff --git a/ClavaLaraApi/src-lara/clava/Joinpoints.js b/ClavaLaraApi/src-lara/clava/Joinpoints.js index 187bac7fd..cf79d69f9 100644 --- a/ClavaLaraApi/src-lara/clava/Joinpoints.js +++ b/ClavaLaraApi/src-lara/clava/Joinpoints.js @@ -10,6 +10,12 @@ /* eslint-disable @typescript-eslint/no-duplicate-type-constituents */ import { LaraJoinPoint, registerJoinpointMapper, wrapJoinPoint, unwrapJoinPoint, } from "lara-js/api/LaraJoinPoint.js"; export class Joinpoint extends LaraJoinPoint { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * String with a dump of the AST representation starting from this node. This representation corresponds to the internal Java representation of the ClavaAst, where the node names correspond to Java classes. To get an equivalent representation with join point names, use the attribute 'dump' */ @@ -319,7 +325,7 @@ export class Joinpoint extends LaraJoinPoint { */ setData(source) { return wrapJoinPoint(this._javaObject.setData(JSON.stringify(source))); } /** - * Replaces the first child, or inserts the join point if no child is present + * Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. */ setFirstChild(node) { return wrapJoinPoint(this._javaObject.setFirstChild(unwrapJoinPoint(node))); } /** @@ -327,7 +333,7 @@ export class Joinpoint extends LaraJoinPoint { */ setInlineComments(p1) { return wrapJoinPoint(this._javaObject.setInlineComments(unwrapJoinPoint(p1))); } /** - * Replaces the last child, or inserts the join point if no child is present + * Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present. */ setLastChild(node) { return wrapJoinPoint(this._javaObject.setLastChild(unwrapJoinPoint(node))); } /** @@ -348,17 +354,35 @@ export class Joinpoint extends LaraJoinPoint { toComment(prefix = "", suffix = "") { return wrapJoinPoint(this._javaObject.toComment(unwrapJoinPoint(prefix), unwrapJoinPoint(suffix))); } } export class Attribute extends Joinpoint { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get kind() { return wrapJoinPoint(this._javaObject.getKind()); } } /** * Utility joinpoint, to represent certain problems when generating join points */ export class ClavaException extends Joinpoint { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get exception() { return wrapJoinPoint(this._javaObject.getException()); } get exceptionType() { return wrapJoinPoint(this._javaObject.getExceptionType()); } get message() { return wrapJoinPoint(this._javaObject.getMessage()); } } export class Comment extends Joinpoint { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get text() { return wrapJoinPoint(this._javaObject.getText()); } set text(value) { this._javaObject.setText(unwrapJoinPoint(value)); } setText(text) { return wrapJoinPoint(this._javaObject.setText(unwrapJoinPoint(text))); } @@ -367,6 +391,12 @@ export class Comment extends Joinpoint { * Represents one declaration (e.g., int foo(){return 0;}) or definition (e.g., int foo();) in the code */ export class Decl extends Joinpoint { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * The attributes (e.g. Pure, CUDAGlobal) associated to this decl */ @@ -376,8 +406,20 @@ export class Decl extends Joinpoint { * Utility joinpoint, to represent empty nodes when directly accessing the tree */ export class Empty extends Joinpoint { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; } export class Expression extends Joinpoint { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * A 'decl' join point that represents the declaration associated with this expression, or undefined if there is none */ @@ -397,7 +439,12 @@ export class Expression extends Joinpoint { * Represents a source file (.c, .cpp., .cl, etc) */ export class FileJp extends Joinpoint { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; /** * The path to the source folder that was given as the base folder of this file */ @@ -516,12 +563,23 @@ export class FileJp extends Joinpoint { write(destinationFoldername) { return wrapJoinPoint(this._javaObject.write(unwrapJoinPoint(destinationFoldername))); } } export class ImplicitValue extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; } /** * Represents an include directive (e.g., #include ) */ export class Include extends Decl { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; /** * True if this is an angled include (i.e., system include) */ @@ -536,14 +594,32 @@ export class Include extends Decl { get relativeFolderpath() { return wrapJoinPoint(this._javaObject.getRelativeFolderpath()); } } export class InitList extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * [May be undefined] If this initializer list initializes an array with more elements than there are initializers in the list, specifies an expression to be used for value initialization of the rest of the elements */ get arrayFiller() { return wrapJoinPoint(this._javaObject.getArrayFiller()); } } export class Literal extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; } export class MemberAccess extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * True if this is a member access that uses arrow (i.e., foo->bar), false if uses dot (i.e., foo.bar) */ @@ -565,7 +641,12 @@ export class MemberAccess extends Expression { * Represents a decl with a name */ export class NamedDecl extends Decl { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; get isPublic() { return wrapJoinPoint(this._javaObject.getIsPublic()); } get name() { return wrapJoinPoint(this._javaObject.getName()); } set name(value) { this._javaObject.setName(unwrapJoinPoint(value)); } @@ -587,8 +668,20 @@ export class NamedDecl extends Decl { setQualifiedPrefix(qualifiedPrefix) { return wrapJoinPoint(this._javaObject.setQualifiedPrefix(unwrapJoinPoint(qualifiedPrefix))); } } export class NewExpr extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; } export class Op extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get isBitwise() { return wrapJoinPoint(this._javaObject.getIsBitwise()); } /** * The kind of the operator. If it is a binary operator, can be one of: ptr_mem_d, ptr_mem_i, mul, div, rem, add, sub, shl, shr, cmp, lt, gt, le, ge, eq, ne, and, xor, or, l_and, l_or, assign, mul_assign, div_assign, rem_assign, add_assign, sub_assign, shl_assign, shr_assign, and_assign, xor_assign, or_assign, comma. If it is a unary operator, can be one of: post_inc, post_dec, pre_inc, pre_dec, addr_of, deref, plus, minus, not, l_not, real, imag, extension, cowait. @@ -597,6 +690,12 @@ export class Op extends Expression { get operator() { return wrapJoinPoint(this._javaObject.getOperator()); } } export class ParenExpr extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * Returns the expression inside this parenthesis expression */ @@ -606,7 +705,12 @@ export class ParenExpr extends Expression { * Represents a pragma in the code (e.g., #pragma kernel) */ export class Pragma extends Joinpoint { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; /** * Everything that is after the name of the pragma */ @@ -638,7 +742,12 @@ export class Pragma extends Joinpoint { * Represents the complete program and is the top-most joinpoint in the hierarchy */ export class Program extends Joinpoint { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; get baseFolder() { return wrapJoinPoint(this._javaObject.getBaseFolder()); } get defaultFlags() { return wrapJoinPoint(this._javaObject.getDefaultFlags()); } /** @@ -738,7 +847,12 @@ export class Program extends Joinpoint { * Common class of struct, union and class */ export class RecordJp extends NamedDecl { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; get fields() { return wrapJoinPoint(this._javaObject.getFields()); } get functions() { return wrapJoinPoint(this._javaObject.getFunctions()); } /** @@ -756,6 +870,12 @@ export class RecordJp extends NamedDecl { addField(field) { return wrapJoinPoint(this._javaObject.addField(unwrapJoinPoint(field))); } } export class Statement extends Joinpoint { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get isFirst() { return wrapJoinPoint(this._javaObject.getIsFirst()); } get isLast() { return wrapJoinPoint(this._javaObject.getIsLast()); } } @@ -763,9 +883,20 @@ export class Statement extends Joinpoint { * Represets a struct declaration */ export class Struct extends RecordJp { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; } export class Switch extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * The case statements inside this switch */ @@ -787,20 +918,43 @@ export class Switch extends Statement { * A pragma that references a point in the code and sticks to it */ export class Tag extends Pragma { - static _defaultAttribute = "id"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "id", + }; /** * The ID of the pragma */ get id() { return wrapJoinPoint(this._javaObject.getId()); } } export class TernaryOp extends Op { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get cond() { return wrapJoinPoint(this._javaObject.getCond()); } get falseExpr() { return wrapJoinPoint(this._javaObject.getFalseExpr()); } get trueExpr() { return wrapJoinPoint(this._javaObject.getTrueExpr()); } } export class This extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; } export class Type extends Joinpoint { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get arrayDims() { return wrapJoinPoint(this._javaObject.getArrayDims()); } get arraySize() { return wrapJoinPoint(this._javaObject.getArraySize()); } get constant() { return wrapJoinPoint(this._javaObject.getConstant()); } @@ -875,12 +1029,23 @@ export class Type extends Joinpoint { * Base node for declarations which introduce a typedef-name */ export class TypedefNameDecl extends NamedDecl { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; } /** * Represents the type of a typedef. */ export class TypedefType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * The typedef declaration associated with this typedef type */ @@ -891,6 +1056,12 @@ export class TypedefType extends Type { get underlyingType() { return wrapJoinPoint(this._javaObject.getUnderlyingType()); } } export class UnaryExprOrType extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get argExpr() { return wrapJoinPoint(this._javaObject.getArgExpr()); } get argType() { return wrapJoinPoint(this._javaObject.getArgType()); } set argType(value) { this._javaObject.setArgType(unwrapJoinPoint(value)); } @@ -900,16 +1071,33 @@ export class UnaryExprOrType extends Expression { setArgType(argType) { return wrapJoinPoint(this._javaObject.setArgType(unwrapJoinPoint(argType))); } } export class UnaryOp extends Op { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get isPointerDeref() { return wrapJoinPoint(this._javaObject.getIsPointerDeref()); } get operand() { return wrapJoinPoint(this._javaObject.getOperand()); } } export class UndefinedType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; } /** * A reference to a variable */ export class Varref extends Expression { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; get declaration() { return wrapJoinPoint(this._javaObject.getDeclaration()); } /** * True if this variable reference has a MS-style property, false otherwise @@ -933,23 +1121,46 @@ export class Varref extends Expression { setName(name) { return wrapJoinPoint(this._javaObject.setName(unwrapJoinPoint(name))); } } export class WrapperStmt extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get content() { return wrapJoinPoint(this._javaObject.getContent()); } get kind() { return wrapJoinPoint(this._javaObject.getKind()); } } export class AccessSpecifier extends Decl { - static _defaultAttribute = "kind"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "kind", + }; /** * The type of specifier. Can return 'public', 'protected', 'private' or 'none' */ get kind() { return wrapJoinPoint(this._javaObject.getKind()); } } export class AdjustedType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * The type that is being adjusted */ get originalType() { return wrapJoinPoint(this._javaObject.getOriginalType()); } } export class ArrayAccess extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * Expression representing the variable of the array access (can be a varref, memberAccess...) */ @@ -972,6 +1183,12 @@ export class ArrayAccess extends Expression { get subscript() { return wrapJoinPoint(this._javaObject.getSubscript()); } } export class ArrayType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get elementType() { return wrapJoinPoint(this._javaObject.getElementType()); } set elementType(value) { this._javaObject.setElementType(unwrapJoinPoint(value)); } /** @@ -980,6 +1197,12 @@ export class ArrayType extends Type { setElementType(arrayElementType) { return wrapJoinPoint(this._javaObject.setElementType(unwrapJoinPoint(arrayElementType))); } } export class BinaryOp extends Op { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get isAssignment() { return wrapJoinPoint(this._javaObject.getIsAssignment()); } get left() { return wrapJoinPoint(this._javaObject.getLeft()); } set left(value) { this._javaObject.setLeft(unwrapJoinPoint(value)); } @@ -989,15 +1212,33 @@ export class BinaryOp extends Op { setRight(right) { return wrapJoinPoint(this._javaObject.setRight(unwrapJoinPoint(right))); } } export class BoolLiteral extends Literal { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get value() { return wrapJoinPoint(this._javaObject.getValue()); } } export class Break extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * The enclosing statement related to this break. It should be either a loop or a switch statement. */ get enclosingStmt() { return wrapJoinPoint(this._javaObject.getEnclosingStmt()); } } export class BuiltinType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get builtinKind() { return wrapJoinPoint(this._javaObject.getBuiltinKind()); } /** * True, if ot is a floating type (e.g., float, double) @@ -1021,7 +1262,12 @@ export class BuiltinType extends Type { get isVoid() { return wrapJoinPoint(this._javaObject.getIsVoid()); } } export class Call extends Expression { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; /** * An alias for 'args' */ @@ -1086,6 +1332,12 @@ export class Call extends Expression { wrap(name) { return wrapJoinPoint(this._javaObject.wrap(unwrapJoinPoint(name))); } } export class Case extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * The instructions that are associated with this case in the source code. This does not represent what instructions are actually executed (e.g., if a case does not have a break, does not show instructions of the next case) */ @@ -1112,6 +1364,12 @@ export class Case extends Statement { get values() { return wrapJoinPoint(this._javaObject.getValues()); } } export class Cast extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get fromType() { return wrapJoinPoint(this._javaObject.getFromType()); } /** * @deprecated Use expr.implicitCast instead @@ -1121,15 +1379,31 @@ export class Cast extends Expression { get toType() { return wrapJoinPoint(this._javaObject.getToType()); } } export class CilkSpawn extends Call { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; } export class CilkSync extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; } /** * Represents a C++ class */ export class Class extends RecordJp { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; /** * All the classes this class inherits from */ @@ -1176,15 +1450,32 @@ export class Class extends RecordJp { addMethod(method) { return wrapJoinPoint(this._javaObject.addMethod(unwrapJoinPoint(method))); } } export class Continue extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; } export class CudaKernelCall extends Call { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; get config() { return wrapJoinPoint(this._javaObject.getConfig()); } set config(value) { this._javaObject.setConfig(unwrapJoinPoint(value)); } setConfig(args) { return wrapJoinPoint(this._javaObject.setConfig(unwrapJoinPoint(args))); } setConfigFromStrings(args) { return wrapJoinPoint(this._javaObject.setConfigFromStrings(unwrapJoinPoint(args))); } } export class DeclStmt extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * The declarations in this statement */ @@ -1194,14 +1485,31 @@ export class DeclStmt extends Statement { * Represents a decl that comes from a declarator (e.g., function, field, variable) */ export class Declarator extends NamedDecl { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; } export class DeleteExpr extends Expression { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; } /** * Represents a type that was referred to using an elaborated type keyword, e.g., struct S, or via a qualified name, e.g., N::M::type, or both. This type is used to keep track of a type name as written in the source code, including tag keywords and any nested-name-specifiers. The type itself is always 'sugar', used to express what was written in the source code but containing no additional semantic information. */ export class ElaboratedType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * The keyword of this elaborated type, if present. Can be one of: struct, interface, union, class, enum, typename */ @@ -1216,18 +1524,40 @@ export class ElaboratedType extends Type { get qualifier() { return wrapJoinPoint(this._javaObject.getQualifier()); } } export class EmptyStmt extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; } /** * Represents an enum */ export class EnumDecl extends NamedDecl { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; get enumerators() { return wrapJoinPoint(this._javaObject.getEnumerators()); } } export class EnumeratorDecl extends NamedDecl { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; } export class ExprStmt extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * The expression join point associated to this exprStmt */ @@ -1237,16 +1567,32 @@ export class ExprStmt extends Statement { * Represents a member of a struct/union/class */ export class Field extends Declarator { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; } export class FloatLiteral extends Literal { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get value() { return wrapJoinPoint(this._javaObject.getValue()); } } /** * Represents a function declaration or definition */ export class FunctionJp extends Declarator { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; get body() { return wrapJoinPoint(this._javaObject.getBody()); } set body(value) { this._javaObject.setBody(unwrapJoinPoint(value)); } get calls() { return wrapJoinPoint(this._javaObject.getCalls()); } @@ -1360,6 +1706,12 @@ export class FunctionJp extends Declarator { setReturnType(returnType) { return wrapJoinPoint(this._javaObject.setReturnType(unwrapJoinPoint(returnType))); } } export class FunctionType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get paramTypes() { return wrapJoinPoint(this._javaObject.getParamTypes()); } get returnType() { return wrapJoinPoint(this._javaObject.getReturnType()); } set returnType(value) { this._javaObject.setReturnType(unwrapJoinPoint(value)); } @@ -1373,6 +1725,12 @@ export class FunctionType extends Type { setReturnType(newType) { return wrapJoinPoint(this._javaObject.setReturnType(unwrapJoinPoint(newType))); } } export class GotoStmt extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get label() { return wrapJoinPoint(this._javaObject.getLabel()); } set label(value) { this._javaObject.setLabel(unwrapJoinPoint(value)); } /** @@ -1381,6 +1739,12 @@ export class GotoStmt extends Statement { setLabel(label) { return wrapJoinPoint(this._javaObject.setLabel(unwrapJoinPoint(label))); } } export class If extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get cond() { return wrapJoinPoint(this._javaObject.getCond()); } set cond(value) { this._javaObject.setCond(unwrapJoinPoint(value)); } get condDecl() { return wrapJoinPoint(this._javaObject.getCondDecl()); } @@ -1402,12 +1766,29 @@ export class If extends Statement { setThen(then) { return wrapJoinPoint(this._javaObject.setThen(unwrapJoinPoint(then))); } } export class IntLiteral extends Literal { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get value() { return wrapJoinPoint(this._javaObject.getValue()); } } export class LabelDecl extends NamedDecl { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; } export class LabelStmt extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get decl() { return wrapJoinPoint(this._javaObject.getDecl()); } set decl(value) { this._javaObject.setDecl(unwrapJoinPoint(value)); } /** @@ -1416,7 +1797,12 @@ export class LabelStmt extends Statement { setDecl(label) { return wrapJoinPoint(this._javaObject.setDecl(unwrapJoinPoint(label))); } } export class Loop extends Statement { - static _defaultAttribute = "kind"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "kind", + }; get body() { return wrapJoinPoint(this._javaObject.getBody()); } set body(value) { this._javaObject.setBody(unwrapJoinPoint(value)); } /** @@ -1537,7 +1923,12 @@ export class Loop extends Statement { * Special pragma that can be used to mark scopes (e.g., #pragma lara marker loop1) */ export class Marker extends Pragma { - static _defaultAttribute = "id"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "id", + }; /** * A scope, associated with this marker */ @@ -1545,7 +1936,12 @@ export class Marker extends Pragma { get id() { return wrapJoinPoint(this._javaObject.getId()); } } export class MemberCall extends Call { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; get base() { return wrapJoinPoint(this._javaObject.getBase()); } get rootBase() { return wrapJoinPoint(this._javaObject.getRootBase()); } } @@ -1553,7 +1949,12 @@ export class MemberCall extends Call { * Represents a C++ class method declaration or definition */ export class Method extends FunctionJp { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; get record() { return wrapJoinPoint(this._javaObject.getRecord()); } /** * Removes the of the method @@ -1564,7 +1965,12 @@ export class Method extends FunctionJp { * Represents an OpenMP pragma (e.g., #pragma omp parallel) */ export class Omp extends Pragma { - static _defaultAttribute = "kind"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "kind", + }; /** * The names of the kinds of all clauses in the pragma, or empty array if no clause is defined */ @@ -1763,6 +2169,12 @@ export class Omp extends Pragma { setShared(newVariables) { return wrapJoinPoint(this._javaObject.setShared(unwrapJoinPoint(newVariables))); } } export class ParenType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get innerType() { return wrapJoinPoint(this._javaObject.getInnerType()); } set innerType(value) { this._javaObject.setInnerType(unwrapJoinPoint(value)); } /** @@ -1771,6 +2183,12 @@ export class ParenType extends Type { setInnerType(innerType) { return wrapJoinPoint(this._javaObject.setInnerType(unwrapJoinPoint(innerType))); } } export class PointerType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get pointee() { return wrapJoinPoint(this._javaObject.getPointee()); } set pointee(value) { this._javaObject.setPointee(unwrapJoinPoint(value)); } /** @@ -1783,16 +2201,34 @@ export class PointerType extends Type { setPointee(pointeeType) { return wrapJoinPoint(this._javaObject.setPointee(unwrapJoinPoint(pointeeType))); } } export class QualType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get qualifiers() { return wrapJoinPoint(this._javaObject.getQualifiers()); } get unqualifiedType() { return wrapJoinPoint(this._javaObject.getUnqualifiedType()); } } export class ReturnStmt extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get returnExpr() { return wrapJoinPoint(this._javaObject.getReturnExpr()); } } /** * Represents a group of statements */ export class Scope extends Statement { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * Returns the descendant statements of this scope, excluding other scopes, loops, ifs and wrapper statements */ @@ -1847,6 +2283,12 @@ export class Scope extends Statement { setNaked(isNaked) { return wrapJoinPoint(this._javaObject.setNaked(unwrapJoinPoint(isNaked))); } } export class TagType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; /** * A 'decl' join point that represents the declaration of this tag type */ @@ -1854,6 +2296,12 @@ export class TagType extends Type { get name() { return wrapJoinPoint(this._javaObject.getName()); } } export class TemplateSpecializationType extends Type { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get args() { return wrapJoinPoint(this._javaObject.getArgs()); } get firstArgType() { return wrapJoinPoint(this._javaObject.getFirstArgType()); } get numArgs() { return wrapJoinPoint(this._javaObject.getNumArgs()); } @@ -1863,13 +2311,23 @@ export class TemplateSpecializationType extends Type { * Declaration of a typedef-name via the 'typedef' type specifier */ export class TypedefDecl extends TypedefNameDecl { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; } /** * Represents a variable declaration or definition */ export class Vardecl extends Declarator { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; /** * The vardecl corresponding to the actual definition. For global variables, returns the vardecl of the file where it is actually defined (instead of the vardecl that defines an external link to the variable) */ @@ -1924,6 +2382,12 @@ export class Vardecl extends Declarator { varref() { return wrapJoinPoint(this._javaObject.varref()); } } export class VariableArrayType extends ArrayType { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get sizeExpr() { return wrapJoinPoint(this._javaObject.getSizeExpr()); } set sizeExpr(value) { this._javaObject.setSizeExpr(unwrapJoinPoint(value)); } /** @@ -1932,15 +2396,37 @@ export class VariableArrayType extends ArrayType { setSizeExpr(sizeExpr) { return wrapJoinPoint(this._javaObject.setSizeExpr(unwrapJoinPoint(sizeExpr))); } } export class Body extends Scope { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; } export class CilkFor extends Loop { - static _defaultAttribute = "kind"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "kind", + }; } export class EnumType extends TagType { + /** + * @internal + */ + static _defaultAttributeInfo = { + name: null, + }; get integerType() { return wrapJoinPoint(this._javaObject.getIntegerType()); } } export class Param extends Vardecl { - static _defaultAttribute = "name"; + /** + * @internal + */ + static _defaultAttributeInfo = { + name: "name", + }; } export var StorageClass; (function (StorageClass) { diff --git a/ClavaLaraApi/src-lara/clava/clava/Clava.js b/ClavaLaraApi/src-lara/clava/clava/Clava.js index a19483924..09057805a 100644 --- a/ClavaLaraApi/src-lara/clava/clava/Clava.js +++ b/ClavaLaraApi/src-lara/clava/clava/Clava.js @@ -67,7 +67,7 @@ extern "C" { #endif`; /** * Launches a Clava weaving session. - * @param {(string|Array)} args - The arguments to pass to the weaver, as if it was launched from the command-line + * @param args - The arguments to pass to the weaver, as if it was launched from the command-line * @returns True if the weaver execution without problems, false otherwise */ static runClava(args) { @@ -163,14 +163,14 @@ extern "C" { } /** * - * @returns {J#List} a list of join points representing available user includes + * @returns A list of join points representing available user includes */ static getAvailableIncludes() { return ClavaJavaTypes.CxxWeaverApi.getAvailableUserIncludes(); } /** * - * @returns {J#Set} a set with paths to the include folders of the current configuration. + * @returns {J#Set} A set with paths to the include folders of the current configuration. */ static getIncludeFolders() { return ClavaJavaTypes.CxxWeaverApi.getIncludeFolders(); diff --git a/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js b/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js index 7ae0643e0..1cad9d8e3 100644 --- a/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js +++ b/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js @@ -1,7 +1,7 @@ import Io from "lara-js/api/lara/Io.js"; import { debug } from "lara-js/api/lara/core/LaraCore.js"; import Query from "lara-js/api/weaver/Query.js"; -import { FunctionJp, If, Loop, StorageClass, Vardecl, } from "../Joinpoints.js"; +import { FileJp, FunctionJp, If, Loop, StorageClass, Vardecl, } from "../Joinpoints.js"; import Clava from "./Clava.js"; /** * Utility methods related with the source code. @@ -37,8 +37,7 @@ export default class ClavaCode { const staticVerification = true; const includes = new Set(); let bodyCode = ""; - for (const $f of Query.search("file")) { - const $file = $f; + for (const $file of Query.search(FileJp)) { if ($file.isHeader) { continue; } @@ -70,12 +69,14 @@ export default class ClavaCode { let changedCode = false; // Look for static declarations for (const child of $file.children) { - if (child instanceof FunctionJp && child.storageClass === StorageClass.STATIC) { + if (child instanceof FunctionJp && + child.storageClass === StorageClass.STATIC) { const newName = child.name + "_static_rename"; child.name = newName; changedCode = true; } - if (child instanceof Vardecl && child.storageClass === StorageClass.STATIC) { + if (child instanceof Vardecl && + child.storageClass === StorageClass.STATIC) { console.log(child.code); throw "Not yet supported for static variable declarations"; } diff --git a/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js b/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js index b7f1401e7..98ed54f4c 100644 --- a/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js +++ b/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js @@ -1,6 +1,6 @@ import { debug } from "lara-js/api/lara/core/LaraCore.js"; import Query from "lara-js/api/weaver/Query.js"; -import { BinaryOp, Call, Expression, GotoStmt, LabelStmt, ParenExpr, ParenType, PointerType, StorageClass, Vardecl, VariableArrayType, Varref, } from "../../Joinpoints.js"; +import { BinaryOp, Call, Expression, GotoStmt, Joinpoint, LabelDecl, LabelStmt, ParenExpr, ParenType, PointerType, StorageClass, Vardecl, VariableArrayType, Varref, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class Inliner { options; @@ -227,8 +227,7 @@ export default class Inliner { // should be added const $parentFunction = $call.getAncestor("function"); const addedDeclarations = new Set(); - for (const $jp of Query.searchFrom($newNodes, "call")) { - const $newCall = $jp; + for (const $newCall of Query.searchFrom($newNodes, Call)) { // Ignore functions that are part of the system headers if ($newCall.function.isInSystemHeader) { continue; @@ -261,7 +260,7 @@ export default class Inliner { // Maps label names to new LabelDecl const newLabels = {}; // Visit all gotoStmt and labelStmt - for (const jp of Query.search("joinpoint", { + for (const jp of Query.search(Joinpoint, { self: ($jp) => $jp instanceof GotoStmt || $jp instanceof LabelStmt, })) { const $jp = jp; @@ -283,8 +282,7 @@ export default class Inliner { } } // If there are any label decls, rename them - for (const $jp of Query.search("labelDecl")) { - const $labelDecl = $jp; + for (const $labelDecl of Query.search(LabelDecl)) { const $newLabelDecl = newLabels[$labelDecl.name]; $labelDecl.replaceWith($newLabelDecl); } @@ -429,8 +427,7 @@ export default class Inliner { // TODO: I have no idea if this type cast is correct. const $sizeExprCopy = type.sizeExpr.copy(); // Update any children of sizeExpr - for (const $jp of Query.searchFrom($sizeExprCopy, "varref")) { - const $varRef = $jp; + for (const $varRef of Query.searchFrom($sizeExprCopy, Varref)) { const $newVarref = this.updateVarRef($varRef, $call, newVariableMap); if ($newVarref !== $varRef) { hasChanges = true; diff --git a/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js b/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js index 956a7ec16..0fd61d64f 100644 --- a/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js +++ b/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js @@ -1,6 +1,6 @@ import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; import Query from "lara-js/api/weaver/Query.js"; -import { AdjustedType, ArrayType, BuiltinType, DeclStmt, FileJp, FunctionJp, PointerType, } from "../../Joinpoints.js"; +import { AdjustedType, ArrayType, BuiltinType, Decl, DeclStmt, FileJp, FunctionJp, Param, PointerType, ReturnStmt, Statement, Vardecl, Varref, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class Outliner { verbose = true; @@ -202,8 +202,7 @@ export default class Outliner { } findGlobalVars() { const globals = []; - for (const jp of Query.search("vardecl")) { - const decl = jp; + for (const decl of Query.search(Vardecl)) { if (decl.isGlobal) { globals.push(decl); } @@ -219,14 +218,12 @@ export default class Outliner { const decls = []; // get decls from the prologue for (const stmt of prologue) { - for (const jp of Query.searchFrom(stmt, "vardecl")) { - const decl = jp; + for (const decl of Query.searchFrom(stmt, Vardecl)) { decls.push(decl); } } // get decls from the parent function params - for (const jp of Query.searchFrom(parentFun, "param")) { - const param = jp; + for (const param of Query.searchFrom(parentFun, Param)) { decls.push(param.definition); } // no need to handle global vars - they are not parameters @@ -275,8 +272,7 @@ export default class Outliner { findNonvoidReturnStmts(startingPoints) { const returnStmts = []; for (const stmt of startingPoints) { - for (const jp of Query.searchFrom(stmt, "returnStmt")) { - const ret = jp; + for (const ret of Query.searchFrom(stmt, ReturnStmt)) { if (ret.numChildren > 0) { returnStmts.push(ret); } @@ -286,8 +282,7 @@ export default class Outliner { } scalarsToPointers(region, params) { for (const stmt of region) { - for (const jp of Query.searchFrom(stmt, "varref")) { - const varref = jp; + for (const varref of Query.searchFrom(stmt, Varref)) { for (const param of params) { if (param.name === varref.name && varref.type instanceof BuiltinType) { @@ -325,16 +320,14 @@ export default class Outliner { findRefsInRegion(region) { const declsNames = []; for (const stmt of region) { - for (const jp of Query.searchFrom(stmt, "decl")) { - const decl = jp; + for (const decl of Query.searchFrom(stmt, Decl)) { declsNames.push(decl.name); } } const varrefs = []; const varrefsNames = []; for (const stmt of region) { - for (const jp of Query.searchFrom(stmt, "varref")) { - const varref = jp; + for (const varref of Query.searchFrom(stmt, Varref)) { // may need to filter for other types, like macros, etc // select all varrefs with no matching decl in the region, except globals if (!varrefsNames.includes(varref.name) && @@ -363,8 +356,7 @@ export default class Outliner { const epilogueVarrefsNames = []; for (const stmt of epilogue) { // also gets function names... could it cause an issue? - for (const jp of Query.searchFrom(stmt, "varref")) { - const varref = jp; + for (const varref of Query.searchFrom(stmt, Varref)) { epilogueVarrefsNames.push(varref.name); } } @@ -386,8 +378,7 @@ export default class Outliner { const epilogue = []; let inPrologue = true; let inRegion = false; - for (const jp of Query.searchFrom(fun, "statement")) { - const stmt = jp; + for (const stmt of Query.searchFrom(fun, Statement)) { if (inPrologue) { if (stmt.astId == begin.astId) { region.push(stmt); diff --git a/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js b/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js index c86af1386..76824e4ad 100644 --- a/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js +++ b/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js @@ -2,22 +2,22 @@ import Io from "lara-js/api/lara/Io.js"; import Strings from "lara-js/api/lara/Strings.js"; import JavaTypes from "lara-js/api/lara/util/JavaTypes.js"; import Query from "lara-js/api/weaver/Query.js"; +import { FunctionJp } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import CMaker from "../cmake/CMaker.js"; import { debug } from "lara-js/api/lara/core/LaraCore.js"; function GproferGetCxxFunction(signature) { - return Query.search("function", { + return Query.search(FunctionJp, { signature: signature, hasDefinition: true, }).first(); } function GproferGetCFunction(signature) { - return Query.search("function", { + return Query.search(FunctionJp, { name: signature, hasDefinition: true, }).first(); } -; export default class Gprofer { _runs; _args; diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js b/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js index 5fce7fb0d..f8ed05f20 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js @@ -1,7 +1,7 @@ import { debug } from "lara-js/api/lara/core/LaraCore.js"; import Graphs from "lara-js/api/lara/graphs/Graphs.js"; import Query from "lara-js/api/weaver/Query.js"; -import { FunctionJp, Loop, Scope, Statement, } from "../../../Joinpoints.js"; +import { FunctionJp, LabelStmt, Loop, Scope, Statement, } from "../../../Joinpoints.js"; import ClavaJoinPoints from "../../ClavaJoinPoints.js"; import CfgEdge from "./CfgEdge.js"; import CfgEdgeType from "./CfgEdgeType.js"; @@ -159,8 +159,7 @@ export default class CfgBuilder { createNodes() { // Test all statements for leadership // If they are leaders, create node - for (const $jp of Query.searchFromInclusive(this.jp, "statement")) { - const $stmt = $jp; + for (const $stmt of Query.searchFromInclusive(this.jp, Statement)) { if (CfgUtils.isLeader($stmt)) { if (this.splitInstList && CfgUtils.getNodeType($stmt) === CfgNodeType.INST_LIST) { @@ -439,7 +438,7 @@ export default class CfgBuilder { throw new Error("Goto statement is undefined"); } const labelName = $gotoStmt.label.name; - const $labelStmt = Query.searchFromInclusive(this.jp, "labelStmt", { + const $labelStmt = Query.searchFromInclusive(this.jp, LabelStmt, { decl: (decl) => decl.name == labelName, }).first(); if ($labelStmt === undefined) { diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js index f2b7bc116..ad679f648 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js @@ -1,5 +1,6 @@ import NodeData from "lara-js/api/lara/graphs/NodeData.js"; import Query from "lara-js/api/weaver/Query.js"; +import { Call } from "../../../Joinpoints.js"; export default class ScgNodeData extends NodeData { /** * The function represented by this node @@ -23,7 +24,7 @@ export default class ScgNodeData extends NodeData { return this.$function.isImplementation; } hasCalls() { - return Query.searchFrom(this.$function, "call").get().length > 0; + return Query.searchFrom(this.$function, Call).get().length > 0; } } //# sourceMappingURL=ScgNodeData.js.map \ No newline at end of file diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js index a7c40518c..5e2a34bbb 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js @@ -1,6 +1,6 @@ import Graphs from "lara-js/api/lara/graphs/Graphs.js"; import Query from "lara-js/api/weaver/Query.js"; -import { Call } from "../../../Joinpoints.js"; +import { Call, FunctionJp } from "../../../Joinpoints.js"; import ScgEdgeData from "./ScgEdgeData.js"; import ScgNodeData from "./ScgNodeData.js"; export default class StaticCallGraphBuilder { @@ -91,8 +91,8 @@ export default class StaticCallGraphBuilder { } for (const $jpToSearch of jpsToSearch) { // Get all function/call pairs for functions that are not yet in the seen functions - const functionCall = Query.searchFromInclusive($jpToSearch, "function", (self) => !seenFunctions.has(self.signature)) - .search("call") + const functionCall = Query.searchFromInclusive($jpToSearch, FunctionJp, (self) => !seenFunctions.has(self.signature)) + .search(Call) .chain(); for (const pair of functionCall) { const $function = pair["function"]; diff --git a/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js b/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js index 89222efb8..0f5a58f89 100644 --- a/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js +++ b/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js @@ -1,5 +1,6 @@ import Io from "lara-js/api/lara/Io.js"; import Query from "lara-js/api/weaver/Query.js"; +import { Call } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import MathHInfo from "./MathHInfo.js"; export class MathAnalysis { @@ -23,11 +24,11 @@ export class MathAnalysis { function MathReport(mathFun, csv = false, name) { //Counter for occurences of each math.h function const occurrences = {}; - mathFun.forEach(f => { + mathFun.forEach((f) => { occurrences[f.name] = 0; }); //Count occurrences - for (const elem of Query.search("call").chain()) { + for (const elem of Query.search(Call).chain()) { const fun = elem["call"].name; if (fun in occurrences) { occurrences[fun] += 1; @@ -67,7 +68,7 @@ function MathReport(mathFun, csv = false, name) { function MathCompare(mathFun) { //Compare, for each call, the type of arguments and the function signature console.log("Type of arguments being passed to each call to a math.h function:"); - for (const elem of Query.search("call").chain()) { + for (const elem of Query.search(Call).chain()) { const $call = elem["call"]; const fun = $call.name; if (fun in mathFun) { @@ -95,7 +96,7 @@ function MathCompare(mathFun) { * (see documentation of clava.hls.MathHInfo for the format) * */ function MathReplace(mathFun) { - for (const elem of Query.search("call").chain()) { + for (const elem of Query.search(Call).chain()) { const $call = elem["call"]; const fun = $call.name; if (fun in mathFun) { diff --git a/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js b/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js index 94d777ecd..e81585d79 100644 --- a/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js +++ b/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js @@ -1,5 +1,6 @@ import Io from "lara-js/api/lara/Io.js"; import Query from "lara-js/api/weaver/Query.js"; +import { Call, FileJp, FunctionJp } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class MathHInfo { @@ -7,7 +8,7 @@ export default class MathHInfo { // Save current AST Clava.pushAst(); // Clear AST - for (const $file of Query.search("file")) { + for (const $file of Query.search(FileJp)) { $file.detach(); } // Prepare source file that will test math.h @@ -21,10 +22,10 @@ export default class MathHInfo { Query.root().addFile($testFile); Clava.rebuild(); // Seach for the abs call and obtain math.h file where it was declared - const $absCall = Query.search("call", "abs").first(); + const $absCall = Query.search(Call, "abs").first(); const mathIncludeFile = $absCall.declaration.filepath; // Clear AST - for (const $file of Query.search("file")) { + for (const $file of Query.search(FileJp)) { $file.detach(); } // Add math.h to the AST @@ -33,8 +34,7 @@ export default class MathHInfo { Query.root().addFile($mathFile); Clava.rebuild(); const results = []; - for (const $mathFunction of Query.search("file", "math_copy.h").search("function")) { - const $fn = $mathFunction; + for (const $fn of Query.search(FileJp, "math_copy.h").search(FunctionJp)) { const paramTypes = []; for (const $param of $fn.params) { paramTypes.push($param.type.code); diff --git a/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js b/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js index 1f68acdb7..309c4b545 100644 --- a/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js +++ b/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js @@ -1,5 +1,5 @@ import Query from "lara-js/api/weaver/Query.js"; -import { ArrayAccess, BinaryOp, Expression, Loop, Param, Scope, Statement, UnaryOp, Vardecl, Varref } from "../../Joinpoints.js"; +import { ArrayAccess, BinaryOp, Expression, FunctionJp, Loop, Param, Scope, Statement, UnaryOp, Vardecl, Varref, } from "../../Joinpoints.js"; import Logger from "../../lara/code/Logger.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; const interfaces = {}; @@ -19,7 +19,7 @@ export default class TraceInstrumentation { let root; const filename = funName + ".dot"; logger = new Logger(undefined, filename); - for (const elem of Query.search("function").chain()) { + for (const elem of Query.search(FunctionJp).chain()) { if (elem["function"].name == funName) root = elem["function"]; } @@ -44,12 +44,12 @@ export default class TraceInstrumentation { } const children = scope.children; //Get global vars as interfaces - for (const elem of Query.search("vardecl")) { + for (const elem of Query.search(Vardecl)) { if (elem.isGlobal) registerInterface(elem); } //Get local vars - for (const elem of Query.search("function", { name: funName }).search("vardecl")) { + for (const elem of Query.search(FunctionJp, { name: funName }).search(Vardecl)) { registerLocal(elem); } //Begin graph and create counters @@ -445,8 +445,7 @@ function getInfo(node) { return info; } function handleExpression(node) { - if (node.children.length == 3 && - node.children[0] instanceof Expression) { + if (node.children.length == 3 && node.children[0] instanceof Expression) { //Build comparison const cmpInfo = getInfo(node.children[0].children[0]); //Build true value diff --git a/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js b/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js index bc4b868ec..354eb4ac9 100644 --- a/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js +++ b/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js @@ -1,5 +1,5 @@ import Query from "lara-js/api/weaver/Query.js"; -import { BinaryOp, Varref, } from "../../Joinpoints.js"; +import { BinaryOp, Vardecl, Varref, } from "../../Joinpoints.js"; export default class LivenessUtils { /** * Checks if the given graph is a Cytoscape graph @@ -106,7 +106,7 @@ export default class LivenessUtils { * @returns A set of variable names declared with initialization in the given joinpoint */ static getVarDeclsWithInit($jp) { - const $varDecls = Query.searchFromInclusive($jp, "vardecl", { + const $varDecls = Query.searchFromInclusive($jp, Vardecl, { hasInit: true, }); const varNames = [...$varDecls].map(($decl) => $decl.name); @@ -118,7 +118,7 @@ export default class LivenessUtils { * @returns A set containing the names of the local variables or parameters on the left-hand side (LHS) of each assignment present in the given joinpoint */ static getAssignedVars($jp) { - const $assignments = Query.searchFromInclusive($jp, "binaryOp", { + const $assignments = Query.searchFromInclusive($jp, BinaryOp, { isAssignment: true, left: (left) => left instanceof Varref, }); @@ -133,7 +133,7 @@ export default class LivenessUtils { * @returns A set containing the names of local variables or parameters referenced by varref joinpoints, excluding those present on the LHS of assignments. */ static getVarRefs($jp) { - const $varRefs = Query.searchFromInclusive($jp, "varref"); + const $varRefs = Query.searchFromInclusive($jp, Varref); const varNames = [...$varRefs] .filter(($ref) => !LivenessUtils.isAssignedVar($ref) && LivenessUtils.isLocalOrParam($ref)) diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js index 840c5afa8..8da32ce2e 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js @@ -1,6 +1,7 @@ import { JSONtoFile } from "lara-js/api/core/output.js"; import { debug } from "lara-js/api/lara/core/LaraCore.js"; import Query from "lara-js/api/weaver/Query.js"; +import { Call } from "../../Joinpoints.js"; import MemoiTarget from "./MemoiTarget.js"; import MemoiUtils from "./MemoiUtils.js"; /** @@ -26,8 +27,7 @@ export default class MemoiAnalysis { const targets = []; const report = new FailReport(); const processed = {}; - for (const $jp of Query.search("call")) { - const $call = $jp; + for (const $call of Query.search(Call)) { // find function or skip const $func = $call.function; if ($func === undefined) { diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js index 40ef19e12..d5a8ebed9 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js @@ -3,6 +3,7 @@ import { arrayFromArgs } from "lara-js/api/lara/core/LaraCore.js"; import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; import { TimerUnit } from "lara-js/api/lara/util/TimeUnits.js"; import Query from "lara-js/api/weaver/Query.js"; +import { Call, FileJp, FunctionJp } from "../../Joinpoints.js"; import Timer from "../../lara/code/Timer.js"; import ClavaJavaTypes from "../ClavaJavaTypes.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; @@ -189,8 +190,7 @@ class MemoiGen { signature: (s) => this._target.sig === MemoiUtils.normalizeSig(s), location: (l) => report !== undefined ? report.callSites[0] === l : true, // if there is a report, we also filter by site }; - for (const $jp of Query.search("call", filter)) { - const $call = $jp; + for (const $call of Query.search(Call, filter)) { const wrapperName = IdGenerator.next("mw_" + cSig); s.add(wrapperName); $call.wrap(wrapperName); @@ -203,10 +203,9 @@ class MemoiGen { const cSig = MemoiUtils.cSig(this._target.sig); const wrapperName = "mw_" + cSig; s.add(wrapperName); - for (const $jp of Query.search("call", { + for (const $call of Query.search(Call, { signature: (s) => this._target.sig === MemoiUtils.normalizeSig(s), })) { - const $call = $jp; $call.wrap(wrapperName); } this.generateGeneric(wrapperName, report); @@ -218,16 +217,15 @@ class MemoiGen { const globalName = "memoi_target_timer"; const printName = "print_perfect_inst"; // wrap every call to the target - for (const $jp of Query.search("call", { + for (const $call of Query.search(Call, { signature: (s) => this._target.sig === MemoiUtils.normalizeSig(s), })) { - const $call = $jp; $call.wrap(wrapperName); } // change the wrapper by timing around the original call - for (const chain of Query.search("file") - .search("function", { name: wrapperName }) - .search("call") + for (const chain of Query.search(FileJp) + .search(FunctionJp, { name: wrapperName }) + .search(Call) .chain()) { const $file = chain["file"]; const $function = chain["function"]; @@ -238,14 +236,14 @@ class MemoiGen { $function.insertReturn(`memoi_target_timer += ${tVar};`); } // if print_perfect_inst function is found, some other target has dealt with the main code and we're done - for (const chain of Query.search("file", { hasMain: true }) - .search("function", { name: printName }) + for (const chain of Query.search(FileJp, { hasMain: true }) + .search(FunctionJp, { name: printName }) .chain()) { return; } // change the main function to print the time to a file - for (const chain of Query.search("file") - .search("function", { name: "main" }) + for (const chain of Query.search(FileJp) + .search(FunctionJp, { name: "main" }) .chain()) { const $file = chain["file"]; const $main = chain["function"]; @@ -279,9 +277,9 @@ class MemoiGen { } } generateGeneric(wrapperName, report) { - for (const chain of Query.search("file") - .search("function", { name: wrapperName }) - .search("call") + for (const chain of Query.search(FileJp) + .search(FunctionJp, { name: wrapperName }) + .search(Call) .chain()) { const $file = chain["file"]; const $function = chain["function"]; @@ -334,8 +332,8 @@ class MemoiGen { } } addMainDebug(totalName, missesName, updatesName, wrapperName) { - const chain = Query.search("file") - .search("function", { name: "main" }) + const chain = Query.search(FileJp) + .search(FunctionJp, { name: "main" }) .chain(); const firstAndOnly = chain[0]; if (firstAndOnly === undefined) { diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js index ae18f4878..2a7a79126 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js @@ -1,6 +1,7 @@ import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; import Query from "lara-js/api/weaver/Query.js"; +import { Call, FileJp, FunctionJp, Scope } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import MemoiUtils from "./MemoiUtils.js"; @@ -50,10 +51,9 @@ export default class MemoiProf { const monitorName = "mp_" + cSig; const monitorType = ClavaJoinPoints.typeLiteral("MemoiProf*"); // make the wrapper - for (const $jp of Query.search("call", { + for (const $call of Query.search(Call, { signature: (s) => this.target.sig === MemoiUtils.normalizeSig(s), })) { - const $call = $jp; $call.wrap(wrapperName); } // instrument the wrapper @@ -71,10 +71,9 @@ export default class MemoiProf { const wrapperNameBase = "mw_" + cSig; const monitorNameBase = "mp_" + cSig; const monitorType = ClavaJoinPoints.typeLiteral("MemoiProf*"); - for (const $jp of Query.search("call", { + for (const $call of Query.search(Call, { signature: (s) => this.target.sig === MemoiUtils.normalizeSig(s), })) { - const $call = $jp; // make the wrapper const wrapperName = IdGenerator.next(wrapperNameBase); $call.wrap(wrapperName); @@ -90,9 +89,9 @@ export default class MemoiProf { memoiInstrumentWrapper(wrapperName, monitorName, monitorType) { const numInputs = this.target.numInputs; const numOutputs = this.target.numOutputs; - const query = Query.search("file") - .search("function", { name: wrapperName }) - .search("call") + const query = Query.search(FileJp) + .search(FunctionJp, { name: wrapperName }) + .search(Call) .chain(); for (const row of query) { let code = "mp_inc(" + monitorName; @@ -131,9 +130,9 @@ export default class MemoiProf { }) .join(",") .toUpperCase(); - const query = Query.search("file") - .search("function", { name: "main" }) - .children("scope") + const query = Query.search(FileJp) + .search(FunctionJp, { name: "main" }) + .children(Scope) .chain()[0]; if (query !== undefined) { throw new Error("MemoiProf: Could not find main function needed for setup"); diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js index 8aec46fc5..559060e85 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js @@ -1,4 +1,5 @@ import Query from "lara-js/api/weaver/Query.js"; +import { Call, FunctionJp } from "../../Joinpoints.js"; import MemoiUtils from "./MemoiUtils.js"; export default class MemoiTarget { sig; @@ -42,11 +43,11 @@ export default class MemoiTarget { } static fromSig(sig) { sig = MemoiUtils.normalizeSig(sig); - const $func = Query.search("function", { + const $func = Query.search(FunctionJp, { signature: (signature) => sig === MemoiUtils.normalizeSig(signature), }).first(); if ($func === undefined) { - const $call = Query.search("call", { + const $call = Query.search(Call, { signature: (signature) => sig === MemoiUtils.normalizeSig(signature), }).first(); if ($call === undefined) { @@ -57,7 +58,7 @@ export default class MemoiTarget { return MemoiTarget.fromFunction($func); } findNumCallSites() { - return Query.search("call", { + return Query.search(Call, { signature: (signature) => this.sig === MemoiUtils.normalizeSig(signature), }).get().length; } @@ -93,14 +94,14 @@ export default class MemoiTarget { return !normalTypes.includes(e); }); if (inputsInvalid) { - throw (`The inputs of the target function '${this.sig}' are not supported.`); + throw `The inputs of the target function '${this.sig}' are not supported.`; } const outputTestArray = this.numOutputs == 1 ? normalTypes : pointerTypes; const outputsInvalid = this.outputTypes.some(function (e) { return !outputTestArray.includes(e); }); if (outputsInvalid) { - throw (`The outputs of the target function '${this.sig}' are not supported.`); + throw `The outputs of the target function '${this.sig}' are not supported.`; } // if the output are valid, drop the pointer from the type this.outputTypes = this.outputTypes.map(function (e) { diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js b/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js index 9c6c2578a..c55715489 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js @@ -1,6 +1,7 @@ import { debug } from "lara-js/api/lara/core/LaraCore.js"; import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; import Query from "lara-js/api/weaver/Query.js"; +import { Call, FileJp, FunctionJp, Statement } from "../../Joinpoints.js"; import ClavaJavaTypes from "../ClavaJavaTypes.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import MemoiUtils from "./MemoiUtils.js"; @@ -27,8 +28,8 @@ export function _generate(insertPred, countComparator, report, isMemoiDebug, isM } export function _Memoi_WrapGlobalTarget(signature) { const wrapperName = `mw_${MemoiUtils.normalizeSig(signature)}`; - for (const chain of Query.search("stmt") - .search("call", { + for (const chain of Query.search(Statement) + .search(Call, { signature: (sig) => sig.replace(/ /g, "") == signature, }) .chain()) { @@ -39,8 +40,8 @@ export function _Memoi_WrapGlobalTarget(signature) { return { wrapperName }; } export function _Memoi_WrapSingleTarget(signature, location) { - for (const chain of Query.search("stmt") - .search("call", { + for (const chain of Query.search(Statement) + .search(Call, { signature: (sig) => sig.replace(/ /g, "") == signature, }) .chain()) { @@ -53,9 +54,9 @@ export function _Memoi_WrapSingleTarget(signature, location) { throw `Did not find call to ${signature} at ${location}`; } export function _Memoi_InsertTableCode(insertPred, countComparator, report, wrapperName, isMemoiDebug, isMemoiOnline, isMemoiEmpty, isMemoiUpdateAlways, memoiApproxBits, tableSize) { - Query.search("file") - .search("function", { name: wrapperName }) - .search("call") + Query.search(FileJp) + .search(FunctionJp, { name: wrapperName }) + .search(Call) .chain() .forEach((chain) => { const $file = chain["file"]; @@ -80,8 +81,8 @@ export function _Memoi_InsertTableCode(insertPred, countComparator, report, wrap }); } export function _Memoi_AddMainDebug(totalName, missesName, wrapperName) { - Query.search("file") - .search("function", { name: "main" }) + Query.search(FileJp) + .search(FunctionJp, { name: "main" }) .chain() .forEach((chain) => { const $file = chain["file"]; diff --git a/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js b/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js index 0773fbf5b..c5468b0c7 100644 --- a/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js +++ b/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js @@ -1,13 +1,13 @@ import Io from "lara-js/api/lara/Io.js"; import Strings from "lara-js/api/lara/Strings.js"; import Query from "lara-js/api/weaver/Query.js"; +import { Pragma } from "../../Joinpoints.js"; import KernelReplacer from "./KernelReplacer.js"; // This aspect can be included in a library, imported and // called by a user, since it needs no configuration/parameterization export default function KernelReplacerAuto() { // look for pragma - for (const $p of Query.search("pragma", "clava")) { - const $pragma = $p; + for (const $pragma of Query.search(Pragma, "clava")) { const $file = $pragma.target.getAncestor("file"); if (!$pragma.content.startsWith("opencl_call")) { continue; diff --git a/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js b/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js index ead91a622..960767e15 100644 --- a/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js +++ b/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js @@ -1,4 +1,5 @@ import Query from "lara-js/api/weaver/Query.js"; +import { FunctionJp } from "../../Joinpoints.js"; import Inliner from "../code/Inliner.js"; import NormalizeToSubset from "./NormalizeToSubset.js"; import PrepareForInlining from "./PrepareForInlining.js"; @@ -13,15 +14,13 @@ export default function Inlining(options = { // TODO: Maybe passing a NormalizeToSubset instance is preferrable, but that means making NormalizeToSubset a class instead of a function NormalizeToSubset(Query.root(), options.normalizeToSubset); const inliner = new Inliner(options.inliner); - for (const $jp of Query.search("function", { + for (const $function of Query.search(FunctionJp, { name: (name) => name !== "main", isImplementation: true, // Only inline if function has a body })) { - const $function = $jp; PrepareForInlining($function); } - for (const $jp of Query.search("function", "main")) { - const $function = $jp; + for (const $function of Query.search(FunctionJp, "main")) { inliner.inlineFunctionTree($function); } } diff --git a/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js b/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js index 7cf9e87ef..514165d96 100644 --- a/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js +++ b/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js @@ -28,10 +28,7 @@ export default function NormalizeToSubset($startJp, options = { simplifyLoops: { declStmt.apply($startJp); varDecls.apply($startJp); localStaticToGlobal.apply($startJp); - for (const $jp of Query.searchFrom($startJp, "binaryOp", { - self: (self) => self instanceof BinaryOp && self.isAssignment && self.operator !== "=", - })) { - const $assign = $jp; + for (const $assign of Query.searchFrom($startJp, BinaryOp, (jp) => jp.isAssignment && jp.operator !== "=")) { SimplifyAssignment($assign); } } diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js index fd5c7ffb3..74e6e7f8f 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js @@ -1,6 +1,7 @@ import Pass from "lara-js/api/lara/pass/Pass.js"; import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; import Query from "lara-js/api/weaver/Query.js"; +import { ReturnStmt } from "../../Joinpoints.js"; // TODO: Refactor to use the SimplePass pattern export default class SimplifyReturnStmts extends Pass { _name = "SimplifyReturnStmts"; @@ -11,8 +12,7 @@ export default class SimplifyReturnStmts extends Pass { } _apply_impl($jp) { let appliedPass = false; - for (const jp of Query.searchFromInclusive($jp, "returnStmt")) { - const $returnStmt = jp; + for (const $returnStmt of Query.searchFromInclusive($jp, ReturnStmt)) { const transformed = this.transform($returnStmt); // If any change, mark as applied if (transformed) { diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js index d0f695a73..928c6c5c6 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js @@ -1,6 +1,7 @@ import Pass from "lara-js/api/lara/pass/Pass.js"; import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; import Query from "lara-js/api/weaver/Query.js"; +import { If } from "../../Joinpoints.js"; // TODO: Refactor to use the SimplePass pattern export default class SimplifySelectionStmts extends Pass { _name = "SimplifySelectionStmts"; @@ -11,8 +12,7 @@ export default class SimplifySelectionStmts extends Pass { } _apply_impl($jp) { let appliedPass = false; - for (const jp of Query.searchFromInclusive($jp, "if")) { - const $if = jp; + for (const $if of Query.searchFromInclusive($jp, If)) { appliedPass = true; this.transform($if); } diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js b/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js index 4c58d6167..a13c51cbc 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js @@ -1,7 +1,7 @@ import Pass from "lara-js/api/lara/pass/Pass.js"; import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; import Query from "lara-js/api/weaver/Query.js"; -import { BuiltinType, FunctionJp, ReturnStmt } from "../../Joinpoints.js"; +import { BuiltinType, FunctionJp, ReturnStmt, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import DecomposeVarDeclarations from "./DecomposeVarDeclarations.js"; export default class SingleReturnFunction extends Pass { @@ -16,7 +16,7 @@ export default class SingleReturnFunction extends Pass { return this.new_result($jp, false); } const $body = $jp.body; - const $returnStmts = Query.searchFrom($body, "returnStmt").get(); + const $returnStmts = Query.searchFrom($body, ReturnStmt).get(); if ($returnStmts.length === 0 || ($returnStmts.length === 1 && $body.lastChild instanceof ReturnStmt)) { return this.new_result($jp, false); @@ -53,7 +53,10 @@ export default class SingleReturnFunction extends Pass { return this.new_result($jp, true); } new_result($jp, appliedPass) { - return new PassResult(this, $jp, { appliedPass: appliedPass, insertedLiteralCode: false }); + return new PassResult(this, $jp, { + appliedPass: appliedPass, + insertedLiteralCode: false, + }); } } //# sourceMappingURL=SingleReturnFunction.js.map \ No newline at end of file diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js b/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js index 53d25520d..99b67e548 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js @@ -2,7 +2,7 @@ import Query from "lara-js/api/weaver/Query.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import SimplePass from "lara-js/api/lara/pass/SimplePass.js"; import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; -import { GotoStmt, Switch, } from "../../Joinpoints.js"; +import { Break, GotoStmt, Switch, } from "../../Joinpoints.js"; /** * Transforms a switch statement into an if statement. * @@ -188,7 +188,7 @@ export default class TransformSwitchToIf extends SimplePass { * @param $switchExitGoTo - The goto statement that corresponds to the switch exit. This statement will be used to replace the break statements */ replaceBreakWithGoto($jp, $switchExitGoTo) { - const $breakStmts = Query.searchFromInclusive($jp, "break", { + const $breakStmts = Query.searchFromInclusive($jp, Break, { enclosingStmt: (enclosingStmt) => enclosingStmt.astId === $jp.astId, }); for (const $break of $breakStmts) diff --git a/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js b/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js index f47e82083..6ac353174 100644 --- a/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js +++ b/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js @@ -3,7 +3,7 @@ import GlobalVariable from "../code/GlobalVariable.js"; import Query from "lara-js/api/weaver/Query.js"; import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; import Logger from "../../lara/code/Logger.js"; -import { BuiltinType, FunctionJp, } from "../../Joinpoints.js"; +import { BuiltinType, Call, FunctionJp, Op, } from "../../Joinpoints.js"; /** * Instruments an application so that it counts total operations in a region of code. * @@ -62,11 +62,11 @@ export default class OpsCounter { this.instrumentedFunctions.add($function.jpId); console.log(`OpsCounter.instrument: Instrumenting function ${$function.jpId}`); // Apply to all ops found in the region - for (const $op of Query.searchFrom($region, "op")) { + for (const $op of Query.searchFrom($region, Op)) { this.countOp($op); } // Call function recursively when function calls are found - for (const $call of Query.searchFrom($region, "call")) { + for (const $call of Query.searchFrom($region, Call)) { const $funcDef = $call.definition; if ($funcDef === undefined) { continue; diff --git a/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js b/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js index f2392d996..11cf076cd 100644 --- a/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js +++ b/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js @@ -1,6 +1,6 @@ import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; import Query from "lara-js/api/weaver/Query.js"; -import { BinaryOp, BuiltinType, FunctionJp, Loop, Param, } from "../../Joinpoints.js"; +import { BinaryOp, BuiltinType, Call, FunctionJp, Loop, Op, Param, Varref, } from "../../Joinpoints.js"; import OpsBlock from "./OpsBlock.js"; export default class StaticOpsCounter { // Whitelist of ops @@ -102,8 +102,7 @@ export default class StaticOpsCounter { } // If stmt is not a loop, count ops // Apply to all ops found in the stmt - for (const $jp of Query.searchFrom($stmt, "op")) { - const $op = $jp; + for (const $op of Query.searchFrom($stmt, Op)) { // If not a valid op, continue if (!this.isValidOp($op)) { continue; @@ -120,8 +119,7 @@ export default class StaticOpsCounter { opsBlock.add(opsId); } // Call function recursively when function calls are found - for (const $jp of Query.searchFrom($stmt, "call")) { - const $call = $jp; + for (const $call of Query.searchFrom($stmt, Call)) { const $funcDef = $call.definition; if ($funcDef === undefined) { continue; @@ -163,8 +161,7 @@ export default class StaticOpsCounter { } analyseIterationsExpr($expr, $source) { const result = {}; - for (const $jp of Query.searchFromInclusive($expr, "varref")) { - const $varref = $jp; + for (const $varref of Query.searchFromInclusive($expr, Varref)) { if (result[$varref.name] !== undefined) { continue; } diff --git a/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js b/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js index e1aeec3d4..b86353fa2 100644 --- a/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js +++ b/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js @@ -32,13 +32,13 @@ export default class ClavaDataStore extends WeaverDataStore { this.put("Compiler Flags", flags); } /** - * @returns {J#java.util.List} A list with the current extra system includes. + * @returns A list with the current extra system includes. */ getSystemIncludes() { return this.get("library includes").getFiles(); } /** - * @return {J#java.util.List} A list with the current user includes. + * @returns A list with the current user includes. */ getUserIncludes() { return this.get("header includes").getFiles(); diff --git a/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js b/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js index 803e3fb7c..0d579be22 100644 --- a/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js +++ b/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js @@ -1,8 +1,9 @@ import Query from "lara-js/api/weaver/Query.js"; +import { WrapperStmt } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class VitisHlsUtils { static activateAllDirectives(turnOn) { - const pragmas = Query.search("wrapperStmt", { + const pragmas = Query.search(WrapperStmt, { code: (code) => code.includes("#pragma HLS") || code.includes("#pragma hls"), }).get(); if (pragmas == undefined) { diff --git a/ClavaLaraApi/src-lara/clava/core.js b/ClavaLaraApi/src-lara/clava/core.js index 41d3148fa..342742d4f 100644 --- a/ClavaLaraApi/src-lara/clava/core.js +++ b/ClavaLaraApi/src-lara/clava/core.js @@ -1,3 +1,9 @@ +/** + * This file is used only in Clava Classic to load the core API. + * This is done for compatibility with the previous version of Clava. + * Do not use this file in new (clava-js) projects. + * Remove this file if Clava Classic has died out. + */ const prefix = "clava-js/api/"; const coreImports = []; const sideEffectsOnlyImports = ["Joinpoints.js"]; diff --git a/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js b/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js index e0c97a2ed..ceaf0d301 100644 --- a/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js +++ b/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js @@ -3,6 +3,7 @@ import BenchmarkInstance from "lara-js/api/lara/benchmark/BenchmarkInstance.js"; import Query from "lara-js/api/weaver/Query.js"; import Weaver from "lara-js/api/weaver/Weaver.js"; import Clava from "../..//clava/Clava.js"; +import { Pragma } from "../../Joinpoints.js"; import CMaker from "../../clava/cmake/CMaker.js"; import ClavaJoinPoints from "../../clava/ClavaJoinPoints.js"; /** @@ -87,7 +88,7 @@ export default class ClavaBenchmarkInstance extends BenchmarkInstance { * Looks for #pragma kernel, returns target of that pragma */ getKernel() { - const $pragma = Query.search("pragma", "kernel").first(); + const $pragma = Query.search(Pragma, "kernel").first(); if ($pragma === undefined) { throw `ClavaBenchmarkInstance.getKernel: Could not find '#pragma kernel' in benchmark ${this.getName()}`; } diff --git a/ClavaLaraApi/src-lara/clava/lara/code/Timer.js b/ClavaLaraApi/src-lara/clava/lara/code/Timer.js index 7e8ec9536..42ac34938 100644 --- a/ClavaLaraApi/src-lara/clava/lara/code/Timer.js +++ b/ClavaLaraApi/src-lara/clava/lara/code/Timer.js @@ -50,11 +50,11 @@ export default class Timer extends TimerBase { // Declare variable for time interval, which uses calculation as initialization const timeIntervalVar = IdGenerator.next("clava_timing_duration_"); // Create literal node with calculation of time interval - const $timingResult = ClavaJoinPoints.exprLiteral(this._timer_cpp_calc_interval(startVar, endVar, cppUnit, timeIntervalVar)); + const $timingResult = ClavaJoinPoints.exprLiteral("long long " + this._timer_cpp_calc_interval(startVar, endVar, cppUnit, timeIntervalVar)); // Build message logger .append(prefix) - .appendLong(this._timer_cpp_print_interval(cppUnit, timeIntervalVar)); + .appendLong(timeIntervalVar); if (this.printUnit) { logger.append(this.timeUnits.getUnitsString()); } @@ -68,10 +68,8 @@ export default class Timer extends TimerBase { } const $startVarDecl = ClavaJoinPoints.stmtLiteral(this._timer_cpp_define_time_var(startVar)); const $endVarDecl = ClavaJoinPoints.stmtLiteral(this._timer_cpp_define_time_var(endVar)); - const $timingResultDecl = ClavaJoinPoints.varDeclNoInit(timeIntervalVar, ClavaJoinPoints.typeLiteral("std::chrono::high_resolution_clock::duration")); $insertionTic.insertBefore($startVarDecl); $insertionTic.insertBefore($endVarDecl); - $insertionTic.insertBefore($timingResultDecl); let afterJp = undefined; // Check if $end is a scope if ($end instanceof Scope) { @@ -201,10 +199,7 @@ QueryPerformanceFrequency(&${timeFrequencyVar});`; return `${timeVar} = std::chrono::high_resolution_clock::now();`; } _timer_cpp_calc_interval(startVar, endVar, unit, differentialVar) { - return `${differentialVar} = ${endVar} - ${startVar}`; - } - _timer_cpp_print_interval(unit, differentialVar) { - return `std::chrono::duration_cast(${differentialVar}).count()`; + return `${differentialVar} = std::chrono::duration_cast(${endVar} - ${startVar}).count()`; } } //# sourceMappingURL=Timer.js.map \ No newline at end of file From 698f7db8f09cc28b83cc1d985e5c291d15116ff6 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Thu, 26 Sep 2024 19:30:44 +0100 Subject: [PATCH 09/20] Update import statements to reflect new package name --- Clava-JS/package.json | 2 +- Clava-JS/src-api/Joinpoints.ts | 2 +- Clava-JS/src-api/Query.test.ts | 4 +- Clava-JS/src-api/clava/Clava.ts | 14 +- Clava-JS/src-api/clava/ClavaCode.ts | 9 +- Clava-JS/src-api/clava/ClavaJavaTypes.ts | 4 +- .../src-api/clava/ClavaJoinPoints.test.ts | 4 +- Clava-JS/src-api/clava/ClavaJoinPoints.ts | 9 +- Clava-JS/src-api/clava/Format.ts | 38 +-- Clava-JS/src-api/clava/MathExtra.ts | 2 +- .../clava/analysis/AnalyserResult.test.ts | 2 +- .../clava/analysis/CheckBasedAnalyser.ts | 2 +- .../clava/analysis/MessageGenerator.ts | 2 +- .../analysis/analysers/BoundsAnalyser.ts | 2 +- .../analysis/analysers/DoubleFreeAnalyser.ts | 2 +- Clava-JS/src-api/clava/cmake/CMaker.ts | 12 +- Clava-JS/src-api/clava/cmake/CMakerSources.ts | 9 +- Clava-JS/src-api/clava/cmake/CMakerUtils.ts | 2 +- Clava-JS/src-api/clava/code/Inliner.ts | 6 +- Clava-JS/src-api/clava/code/Outliner.ts | 4 +- .../src-api/clava/code/StatementDecomposer.ts | 2 +- Clava-JS/src-api/clava/gprofer/Gprofer.ts | 12 +- .../src-api/clava/graphs/ControlFlowGraph.ts | 4 +- .../src-api/clava/graphs/StaticCallGraph.ts | 8 +- .../src-api/clava/graphs/cfg/CfgBuilder.ts | 10 +- Clava-JS/src-api/clava/graphs/cfg/CfgEdge.ts | 2 +- .../src-api/clava/graphs/cfg/CfgNodeData.ts | 6 +- Clava-JS/src-api/clava/graphs/cfg/CfgUtils.ts | 2 +- .../src-api/clava/graphs/cfg/NextCfgNode.ts | 9 +- .../src-api/clava/graphs/scg/ScgEdgeData.ts | 2 +- .../src-api/clava/graphs/scg/ScgNodeData.ts | 4 +- .../graphs/scg/StaticCallGraphBuilder.ts | 8 +- Clava-JS/src-api/clava/hls/HLSAnalysis.ts | 217 +++++++++--------- Clava-JS/src-api/clava/hls/MathAnalysis.ts | 4 +- Clava-JS/src-api/clava/hls/MathHInfo.ts | 8 +- .../src-api/clava/hls/TraceInstrumentation.ts | 2 +- .../clava/liveness/LivenessAnalyser.ts | 4 +- .../clava/liveness/LivenessAnalysis.ts | 2 +- .../src-api/clava/liveness/LivenessUtils.ts | 6 +- Clava-JS/src-api/clava/memoi/MemoiAnalysis.ts | 6 +- Clava-JS/src-api/clava/memoi/MemoiGen.ts | 10 +- Clava-JS/src-api/clava/memoi/MemoiProf.ts | 6 +- Clava-JS/src-api/clava/memoi/MemoiTarget.ts | 2 +- .../src-api/clava/memoi/_MemoiGenHelper.ts | 6 +- .../src-api/clava/opencl/KernelReplacer.ts | 4 +- .../clava/opencl/KernelReplacerAuto.ts | 6 +- Clava-JS/src-api/clava/opencl/OpenCLCall.ts | 6 +- Clava-JS/src-api/clava/opt/Inlining.ts | 2 +- .../src-api/clava/opt/NormalizeToSubset.ts | 4 +- Clava-JS/src-api/clava/parser/BatchParser.ts | 12 +- .../src-api/clava/pass/DecomposeDeclStmt.ts | 4 +- .../clava/pass/DecomposeVarDeclarations.ts | 4 +- .../src-api/clava/pass/LocalStaticToGlobal.ts | 6 +- Clava-JS/src-api/clava/pass/SimplifyLoops.ts | 4 +- .../src-api/clava/pass/SimplifyReturnStmts.ts | 6 +- .../clava/pass/SimplifySelectionStmts.ts | 6 +- .../clava/pass/SingleReturnFunction.ts | 11 +- .../src-api/clava/pass/TransformSwitchToIf.ts | 11 +- Clava-JS/src-api/clava/stats/OpsCounter.ts | 4 +- .../src-api/clava/stats/StaticOpsCounter.ts | 4 +- Clava-JS/src-api/clava/util/ClavaDataStore.ts | 12 +- Clava-JS/src-api/clava/util/CodeInserter.ts | 4 +- Clava-JS/src-api/clava/util/FileIterator.ts | 6 +- Clava-JS/src-api/clava/vitishls/VitisHls.ts | 19 +- .../clava/vitishls/VitisHlsReportParser.ts | 2 +- .../src-api/clava/vitishls/VitisHlsUtils.ts | 2 +- Clava-JS/src-api/core.ts | 2 +- Clava-JS/src-api/jest.config.js | 10 +- .../lara/benchmark/ClavaBenchmarkInstance.ts | 10 +- Clava-JS/src-api/lara/code/Energy.ts | 9 +- Clava-JS/src-api/lara/code/Logger.ts | 6 +- Clava-JS/src-api/lara/code/Timer.ts | 20 +- Clava-JS/src-api/lara/metrics/EnergyMetric.ts | 8 +- .../lara/metrics/ExecutionTimeMetric.ts | 10 +- Clava-JS/src-api/weaver/WeaverLauncher.ts | 2 +- Clava-JS/src-code/Sandbox.ts | 2 +- Clava-JS/src-code/WeaverConfiguration.ts | 6 +- Clava-JS/src-code/index.ts | 2 +- Clava-JS/typedoc.config.js | 6 +- ClavaLaraApi/src-lara/clava/Joinpoints.js | 2 +- ClavaLaraApi/src-lara/clava/clava/Clava.js | 12 +- .../src-lara/clava/clava/ClavaCode.js | 6 +- .../src-lara/clava/clava/ClavaJavaTypes.js | 2 +- .../src-lara/clava/clava/ClavaJoinPoints.js | 4 +- ClavaLaraApi/src-lara/clava/clava/Format.js | 12 +- .../src-lara/clava/clava/MathExtra.js | 2 +- .../clava/analysis/CheckBasedAnalyser.js | 2 +- .../clava/clava/analysis/MessageGenerator.js | 2 +- .../analysis/analysers/BoundsAnalyser.js | 2 +- .../analysis/analysers/DoubleFreeAnalyser.js | 2 +- .../src-lara/clava/clava/cmake/CMaker.js | 10 +- .../clava/clava/cmake/CMakerSources.js | 5 +- .../src-lara/clava/clava/cmake/CMakerUtils.js | 2 +- .../src-lara/clava/clava/code/Inliner.js | 4 +- .../src-lara/clava/clava/code/Outliner.js | 4 +- .../clava/clava/code/StatementDecomposer.js | 2 +- .../src-lara/clava/clava/gprofer/Gprofer.js | 10 +- .../clava/clava/graphs/ControlFlowGraph.js | 2 +- .../clava/clava/graphs/StaticCallGraph.js | 6 +- .../clava/clava/graphs/cfg/CfgBuilder.js | 6 +- .../clava/clava/graphs/cfg/CfgEdge.js | 2 +- .../clava/clava/graphs/cfg/CfgNodeData.js | 2 +- .../clava/clava/graphs/scg/ScgEdgeData.js | 2 +- .../clava/clava/graphs/scg/ScgNodeData.js | 4 +- .../graphs/scg/StaticCallGraphBuilder.js | 4 +- .../src-lara/clava/clava/hls/HLSAnalysis.js | 2 +- .../src-lara/clava/clava/hls/MathAnalysis.js | 4 +- .../src-lara/clava/clava/hls/MathHInfo.js | 4 +- .../clava/clava/hls/TraceInstrumentation.js | 2 +- .../clava/clava/liveness/LivenessUtils.js | 2 +- .../clava/clava/memoi/MemoiAnalysis.js | 6 +- .../src-lara/clava/clava/memoi/MemoiGen.js | 10 +- .../src-lara/clava/clava/memoi/MemoiProf.js | 6 +- .../src-lara/clava/clava/memoi/MemoiTarget.js | 2 +- .../clava/clava/memoi/_MemoiGenHelper.js | 6 +- .../clava/clava/opencl/KernelReplacer.js | 4 +- .../clava/clava/opencl/KernelReplacerAuto.js | 6 +- .../src-lara/clava/clava/opencl/OpenCLCall.js | 6 +- .../src-lara/clava/clava/opt/Inlining.js | 2 +- .../clava/clava/opt/NormalizeToSubset.js | 2 +- .../clava/clava/parser/BatchParser.js | 10 +- .../clava/clava/pass/DecomposeDeclStmt.js | 4 +- .../clava/pass/DecomposeVarDeclarations.js | 4 +- .../clava/clava/pass/LocalStaticToGlobal.js | 6 +- .../clava/clava/pass/SimplifyLoops.js | 4 +- .../clava/clava/pass/SimplifyReturnStmts.js | 6 +- .../clava/pass/SimplifySelectionStmts.js | 6 +- .../clava/clava/pass/SingleReturnFunction.js | 6 +- .../clava/clava/pass/TransformSwitchToIf.js | 6 +- .../src-lara/clava/clava/stats/OpsCounter.js | 4 +- .../clava/clava/stats/StaticOpsCounter.js | 4 +- .../clava/clava/util/ClavaDataStore.js | 8 +- .../src-lara/clava/clava/util/CodeInserter.js | 4 +- .../src-lara/clava/clava/util/FileIterator.js | 4 +- .../src-lara/clava/clava/vitishls/VitisHls.js | 13 +- .../clava/vitishls/VitisHlsReportParser.js | 2 +- .../clava/clava/vitishls/VitisHlsUtils.js | 2 +- ClavaLaraApi/src-lara/clava/core.js | 2 +- .../lara/benchmark/ClavaBenchmarkInstance.js | 8 +- .../src-lara/clava/lara/code/Energy.js | 9 +- .../src-lara/clava/lara/code/Logger.js | 6 +- .../src-lara/clava/lara/code/Timer.js | 15 +- .../clava/lara/metrics/EnergyMetric.js | 6 +- .../clava/lara/metrics/ExecutionTimeMetric.js | 8 +- .../src-lara/clava/weaver/WeaverLauncher.js | 2 +- .../up/fe/specs/clava/weaver/CxxWeaver.java | 2 +- 146 files changed, 540 insertions(+), 493 deletions(-) diff --git a/Clava-JS/package.json b/Clava-JS/package.json index 33630774a..6e150ef10 100644 --- a/Clava-JS/package.json +++ b/Clava-JS/package.json @@ -35,7 +35,7 @@ "test:cov": "npm run test -- --coverage", "test:watch": "npm run test -- --watch", "java-dist": "npx lara-java-dist --jsSourceFolder api --jsDestinationFolder ../ClavaLaraApi/src-lara/clava/ --javaClassname ClavaApiJsResource --javaPackageName pt.up.fe.specs.clava.weaver --javaDestinationFolder ../ClavaLaraApi/src-java/pt/up/fe/specs/clava/weaver/ --javaResourceNamespace clava", - "build-interfaces": "npx lara-build-interfaces --input ../ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.json --lara lara-js/LaraJoinPointSpecification.json --output src-api/Joinpoints.ts" + "build-interfaces": "npx lara-build-interfaces --input ../ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.json --lara @specs-feup/lara/LaraJoinPointSpecification.json --output src-api/Joinpoints.ts" }, "repository": { "type": "git", diff --git a/Clava-JS/src-api/Joinpoints.ts b/Clava-JS/src-api/Joinpoints.ts index 2c540300a..ca3c4e9b0 100644 --- a/Clava-JS/src-api/Joinpoints.ts +++ b/Clava-JS/src-api/Joinpoints.ts @@ -16,7 +16,7 @@ import { registerJoinpointMapper, wrapJoinPoint, unwrapJoinPoint, -} from "lara-js/api/LaraJoinPoint.js"; +} from "@specs-feup/lara/api/LaraJoinPoint.js"; type PrivateMapper = { "Joinpoint": typeof Joinpoint, diff --git a/Clava-JS/src-api/Query.test.ts b/Clava-JS/src-api/Query.test.ts index f204cfa14..477308a33 100644 --- a/Clava-JS/src-api/Query.test.ts +++ b/Clava-JS/src-api/Query.test.ts @@ -1,5 +1,5 @@ -import { registerSourceCode } from "lara-js/jest/jestHelpers.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { registerSourceCode } from "@specs-feup/lara/jest/jestHelpers.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { FunctionJp, Loop } from "./Joinpoints.js"; const code = `void query_loop() { diff --git a/Clava-JS/src-api/clava/Clava.ts b/Clava-JS/src-api/clava/Clava.ts index bcf4ac1a0..7f8d52015 100644 --- a/Clava-JS/src-api/clava/Clava.ts +++ b/Clava-JS/src-api/clava/Clava.ts @@ -1,10 +1,10 @@ -import { wrapJoinPoint } from "lara-js/api/LaraJoinPoint.js"; -import Io from "lara-js/api/lara/Io.js"; -import JavaInterop from "lara-js/api/lara/JavaInterop.js"; -import { JavaClasses } from "lara-js/api/lara/util/JavaTypes.js"; -import Query from "lara-js/api/weaver/Query.js"; -import Weaver from "lara-js/api/weaver/Weaver.js"; -import WeaverOptions from "lara-js/api/weaver/WeaverOptions.js"; +import { wrapJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import JavaInterop from "@specs-feup/lara/api/lara/JavaInterop.js"; +import { JavaClasses } from "@specs-feup/lara/api/lara/util/JavaTypes.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; +import Weaver from "@specs-feup/lara/api/weaver/Weaver.js"; +import WeaverOptions from "@specs-feup/lara/api/weaver/WeaverOptions.js"; import { FileJp, Include, Joinpoint, Program } from "../Joinpoints.js"; import ClavaJavaTypes from "./ClavaJavaTypes.js"; import ClavaDataStore from "./util/ClavaDataStore.js"; diff --git a/Clava-JS/src-api/clava/ClavaCode.ts b/Clava-JS/src-api/clava/ClavaCode.ts index fe77c4af1..d50230427 100644 --- a/Clava-JS/src-api/clava/ClavaCode.ts +++ b/Clava-JS/src-api/clava/ClavaCode.ts @@ -1,7 +1,7 @@ -import Io from "lara-js/api/lara/Io.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import { JavaClasses } from "lara-js/api/lara/util/JavaTypes.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import { JavaClasses } from "@specs-feup/lara/api/lara/util/JavaTypes.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { FileJp, FunctionJp, @@ -59,7 +59,6 @@ export default class ClavaCode { let bodyCode = ""; for (const $file of Query.search(FileJp)) { - if ($file.isHeader) { continue; } diff --git a/Clava-JS/src-api/clava/ClavaJavaTypes.ts b/Clava-JS/src-api/clava/ClavaJavaTypes.ts index 3df7b6922..bd63ae75f 100644 --- a/Clava-JS/src-api/clava/ClavaJavaTypes.ts +++ b/Clava-JS/src-api/clava/ClavaJavaTypes.ts @@ -1,4 +1,6 @@ -import JavaTypes, { JavaClasses } from "lara-js/api/lara/util/JavaTypes.js"; +import JavaTypes, { + JavaClasses, +} from "@specs-feup/lara/api/lara/util/JavaTypes.js"; // eslint-disable-next-line @typescript-eslint/no-namespace export namespace ClavaJavaClasses { diff --git a/Clava-JS/src-api/clava/ClavaJoinPoints.test.ts b/Clava-JS/src-api/clava/ClavaJoinPoints.test.ts index 4b2362809..f570a5eda 100644 --- a/Clava-JS/src-api/clava/ClavaJoinPoints.test.ts +++ b/Clava-JS/src-api/clava/ClavaJoinPoints.test.ts @@ -1,5 +1,5 @@ -import { registerSourceCode } from "lara-js/jest/jestHelpers.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { registerSourceCode } from "@specs-feup/lara/jest/jestHelpers.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { ExprStmt } from "../Joinpoints.js"; import ClavaJoinPoints from "./ClavaJoinPoints.js"; diff --git a/Clava-JS/src-api/clava/ClavaJoinPoints.ts b/Clava-JS/src-api/clava/ClavaJoinPoints.ts index c4bf0069e..14d5f0a42 100644 --- a/Clava-JS/src-api/clava/ClavaJoinPoints.ts +++ b/Clava-JS/src-api/clava/ClavaJoinPoints.ts @@ -1,9 +1,12 @@ -import { unwrapJoinPoint, wrapJoinPoint } from "lara-js/api/LaraJoinPoint.js"; +import { + unwrapJoinPoint, + wrapJoinPoint, +} from "@specs-feup/lara/api/LaraJoinPoint.js"; import { arrayFromArgs, flattenArgsArray, -} from "lara-js/api/lara/core/LaraCore.js"; -import { JavaClasses } from "lara-js/api/lara/util/JavaTypes.js"; +} from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import { JavaClasses } from "@specs-feup/lara/api/lara/util/JavaTypes.js"; import * as Joinpoints from "../Joinpoints.js"; import Clava from "./Clava.js"; import ClavaJavaTypes from "./ClavaJavaTypes.js"; diff --git a/Clava-JS/src-api/clava/Format.ts b/Clava-JS/src-api/clava/Format.ts index 289968a9e..a3793873d 100644 --- a/Clava-JS/src-api/clava/Format.ts +++ b/Clava-JS/src-api/clava/Format.ts @@ -1,19 +1,29 @@ -import JavaTypes from "lara-js/api/lara/util/JavaTypes.js"; +import JavaTypes from "@specs-feup/lara/api/lara/util/JavaTypes.js"; export default class Format { - static addPrefix(str: string, prefix: string): string { - return str.split("\n").map(line => prefix + line).join("\n"); - } + static addPrefix(str: string, prefix: string): string { + return str + .split("\n") + .map((line) => prefix + line) + .join("\n"); + } - static addSuffix(str: string, suffix: string): string { - return str.split("\n").map(line => line + suffix).join("\n"); - } + static addSuffix(str: string, suffix: string): string { + return str + .split("\n") + .map((line) => line + suffix) + .join("\n"); + } - static addPrefixAndSuffix(str: string, prefix: string, suffix: string): string { - return Format.addSuffix(Format.addPrefix(str, prefix), suffix); - } + static addPrefixAndSuffix( + str: string, + prefix: string, + suffix: string + ): string { + return Format.addSuffix(Format.addPrefix(str, prefix), suffix); + } - static escape(str: string): string { - return JavaTypes.SpecsStrings.escapeJson(str); - } -} \ No newline at end of file + static escape(str: string): string { + return JavaTypes.SpecsStrings.escapeJson(str); + } +} diff --git a/Clava-JS/src-api/clava/MathExtra.ts b/Clava-JS/src-api/clava/MathExtra.ts index 2893f3260..4a2a69272 100644 --- a/Clava-JS/src-api/clava/MathExtra.ts +++ b/Clava-JS/src-api/clava/MathExtra.ts @@ -1,4 +1,4 @@ -import JavaTypes from "lara-js/api/lara/util/JavaTypes.js"; +import JavaTypes from "@specs-feup/lara/api/lara/util/JavaTypes.js"; import { Expression } from "../Joinpoints.js"; import ClavaJavaTypes from "./ClavaJavaTypes.js"; diff --git a/Clava-JS/src-api/clava/analysis/AnalyserResult.test.ts b/Clava-JS/src-api/clava/analysis/AnalyserResult.test.ts index 8f9af39ac..7effbf021 100644 --- a/Clava-JS/src-api/clava/analysis/AnalyserResult.test.ts +++ b/Clava-JS/src-api/clava/analysis/AnalyserResult.test.ts @@ -1,5 +1,5 @@ import AnalyserResult from "./AnalyserResult.js"; -import ClavaJoinPoints from "clava-js/api/clava/ClavaJoinPoints.js"; +import ClavaJoinPoints from "@specs-feup/clava/api/clava/ClavaJoinPoints.js"; describe("AnalyserResult", () => { describe("getName", () => { diff --git a/Clava-JS/src-api/clava/analysis/CheckBasedAnalyser.ts b/Clava-JS/src-api/clava/analysis/CheckBasedAnalyser.ts index 8a61b4b57..9020b4bbe 100644 --- a/Clava-JS/src-api/clava/analysis/CheckBasedAnalyser.ts +++ b/Clava-JS/src-api/clava/analysis/CheckBasedAnalyser.ts @@ -1,7 +1,7 @@ import Analyser from "./Analyser.js"; import Checker from "./Checker.js"; import ResultFormatManager from "./ResultFormatManager.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { FileJp, Joinpoint, Program } from "../../Joinpoints.js"; import AnalyserResult from "./AnalyserResult.js"; diff --git a/Clava-JS/src-api/clava/analysis/MessageGenerator.ts b/Clava-JS/src-api/clava/analysis/MessageGenerator.ts index 2eb5fabc2..25e663a2b 100644 --- a/Clava-JS/src-api/clava/analysis/MessageGenerator.ts +++ b/Clava-JS/src-api/clava/analysis/MessageGenerator.ts @@ -1,4 +1,4 @@ -import Io from "lara-js/api/lara/Io.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; import Clava from "../Clava.js"; import AnalyserResult from "./AnalyserResult.js"; import ResultList from "./ResultList.js"; diff --git a/Clava-JS/src-api/clava/analysis/analysers/BoundsAnalyser.ts b/Clava-JS/src-api/clava/analysis/analysers/BoundsAnalyser.ts index 5ced24d4d..9ab20fdf6 100644 --- a/Clava-JS/src-api/clava/analysis/analysers/BoundsAnalyser.ts +++ b/Clava-JS/src-api/clava/analysis/analysers/BoundsAnalyser.ts @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { ArrayAccess, ArrayType, diff --git a/Clava-JS/src-api/clava/analysis/analysers/DoubleFreeAnalyser.ts b/Clava-JS/src-api/clava/analysis/analysers/DoubleFreeAnalyser.ts index e2817dc35..43fd4198a 100644 --- a/Clava-JS/src-api/clava/analysis/analysers/DoubleFreeAnalyser.ts +++ b/Clava-JS/src-api/clava/analysis/analysers/DoubleFreeAnalyser.ts @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BinaryOp, Call, diff --git a/Clava-JS/src-api/clava/cmake/CMaker.ts b/Clava-JS/src-api/clava/cmake/CMaker.ts index 965bab5b6..ee3a28971 100644 --- a/Clava-JS/src-api/clava/cmake/CMaker.ts +++ b/Clava-JS/src-api/clava/cmake/CMaker.ts @@ -1,18 +1,18 @@ -import Io from "lara-js/api/lara/Io.js"; -import Platforms from "lara-js/api/lara/Platforms.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Platforms from "@specs-feup/lara/api/lara/Platforms.js"; import { arrayFromArgs, debug, debugObject, -} from "lara-js/api/lara/core/LaraCore.js"; -import { JavaClasses } from "lara-js/api/lara/util/JavaTypes.js"; -import ProcessExecutor from "lara-js/api/lara/util/ProcessExecutor.js"; +} from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import { JavaClasses } from "@specs-feup/lara/api/lara/util/JavaTypes.js"; +import ProcessExecutor from "@specs-feup/lara/api/lara/util/ProcessExecutor.js"; import { FileJp } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import CMakerSources from "./CMakerSources.js"; import CMakerUtils from "./CMakerUtils.js"; import CMakeCompiler from "./compilers/CMakeCompiler.js"; -import BenchmarkCompilationEngine from "lara-js/api/lara/benchmark/BenchmarkCompilationEngine.js"; +import BenchmarkCompilationEngine from "@specs-feup/lara/api/lara/benchmark/BenchmarkCompilationEngine.js"; /** * Builds CMake configurations. diff --git a/Clava-JS/src-api/clava/cmake/CMakerSources.ts b/Clava-JS/src-api/clava/cmake/CMakerSources.ts index d240c210c..b824a7c7c 100644 --- a/Clava-JS/src-api/clava/cmake/CMakerSources.ts +++ b/Clava-JS/src-api/clava/cmake/CMakerSources.ts @@ -1,6 +1,6 @@ -import Io from "lara-js/api/lara/Io.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import { JavaClasses } from "lara-js/api/lara/util/JavaTypes.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import { JavaClasses } from "@specs-feup/lara/api/lara/util/JavaTypes.js"; import Clava from "../Clava.js"; import CMakerUtils from "./CMakerUtils.js"; @@ -178,6 +178,5 @@ export default class CMakerSources { } return prefix + values.join("\n" + space) + "\n)"; - - }; + } } diff --git a/Clava-JS/src-api/clava/cmake/CMakerUtils.ts b/Clava-JS/src-api/clava/cmake/CMakerUtils.ts index b650218ae..eff7c8890 100644 --- a/Clava-JS/src-api/clava/cmake/CMakerUtils.ts +++ b/Clava-JS/src-api/clava/cmake/CMakerUtils.ts @@ -1,4 +1,4 @@ -import ToolUtils from "lara-js/api/lara/tool/ToolUtils.js"; +import ToolUtils from "@specs-feup/lara/api/lara/tool/ToolUtils.js"; import CMakeCompiler from "./compilers/CMakeCompiler.js"; import GenericCMakeCompiler from "./compilers/GenericCMakeCompiler.js"; diff --git a/Clava-JS/src-api/clava/code/Inliner.ts b/Clava-JS/src-api/clava/code/Inliner.ts index cf947eda4..0ca32aa9d 100644 --- a/Clava-JS/src-api/clava/code/Inliner.ts +++ b/Clava-JS/src-api/clava/code/Inliner.ts @@ -1,6 +1,6 @@ -import { LaraJoinPoint } from "lara-js/api/LaraJoinPoint.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { LaraJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BinaryOp, Call, diff --git a/Clava-JS/src-api/clava/code/Outliner.ts b/Clava-JS/src-api/clava/code/Outliner.ts index 0b036dfc2..b999f497e 100644 --- a/Clava-JS/src-api/clava/code/Outliner.ts +++ b/Clava-JS/src-api/clava/code/Outliner.ts @@ -1,5 +1,5 @@ -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import Query from "lara-js/api/weaver/Query.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { AdjustedType, ArrayType, diff --git a/Clava-JS/src-api/clava/code/StatementDecomposer.ts b/Clava-JS/src-api/clava/code/StatementDecomposer.ts index 604661144..59e9b1b17 100644 --- a/Clava-JS/src-api/clava/code/StatementDecomposer.ts +++ b/Clava-JS/src-api/clava/code/StatementDecomposer.ts @@ -1,4 +1,4 @@ -import { debug } from "lara-js/api/lara/core/LaraCore.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; import { BinaryOp, Call, diff --git a/Clava-JS/src-api/clava/gprofer/Gprofer.ts b/Clava-JS/src-api/clava/gprofer/Gprofer.ts index 1d1e8a9f4..8b1201827 100644 --- a/Clava-JS/src-api/clava/gprofer/Gprofer.ts +++ b/Clava-JS/src-api/clava/gprofer/Gprofer.ts @@ -1,11 +1,13 @@ -import Io from "lara-js/api/lara/Io.js"; -import Strings from "lara-js/api/lara/Strings.js"; -import JavaTypes, { JavaClasses } from "lara-js/api/lara/util/JavaTypes.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; +import JavaTypes, { + JavaClasses, +} from "@specs-feup/lara/api/lara/util/JavaTypes.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { FileJp, FunctionJp } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import CMaker from "../cmake/CMaker.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; function GproferGetCxxFunction(signature: string) { return Query.search(FunctionJp, { diff --git a/Clava-JS/src-api/clava/graphs/ControlFlowGraph.ts b/Clava-JS/src-api/clava/graphs/ControlFlowGraph.ts index 80ee5e04d..84c6ef329 100644 --- a/Clava-JS/src-api/clava/graphs/ControlFlowGraph.ts +++ b/Clava-JS/src-api/clava/graphs/ControlFlowGraph.ts @@ -1,5 +1,5 @@ -import Graph from "lara-js/api/lara/graphs/Graph.js"; -import cytoscape from "lara-js/api/libs/cytoscape-3.26.0.js"; +import Graph from "@specs-feup/lara/api/lara/graphs/Graph.js"; +import cytoscape from "@specs-feup/lara/api/libs/cytoscape-3.26.0.js"; import { Statement } from "../../Joinpoints.js"; import CfgBuilder from "./cfg/CfgBuilder.js"; diff --git a/Clava-JS/src-api/clava/graphs/StaticCallGraph.ts b/Clava-JS/src-api/clava/graphs/StaticCallGraph.ts index facb6903b..a37f397f0 100644 --- a/Clava-JS/src-api/clava/graphs/StaticCallGraph.ts +++ b/Clava-JS/src-api/clava/graphs/StaticCallGraph.ts @@ -1,7 +1,7 @@ -import DotFormatter from "lara-js/api/lara/graphs/DotFormatter.js"; -import Graph from "lara-js/api/lara/graphs/Graph.js"; -import Graphs from "lara-js/api/lara/graphs/Graphs.js"; -import cytoscape from "lara-js/api/libs/cytoscape-3.26.0.js"; +import DotFormatter from "@specs-feup/lara/api/lara/graphs/DotFormatter.js"; +import Graph from "@specs-feup/lara/api/lara/graphs/Graph.js"; +import Graphs from "@specs-feup/lara/api/lara/graphs/Graphs.js"; +import cytoscape from "@specs-feup/lara/api/libs/cytoscape-3.26.0.js"; import { FunctionJp, Joinpoint } from "../../Joinpoints.js"; import ScgNodeData from "./scg/ScgNodeData.js"; import StaticCallGraphBuilder from "./scg/StaticCallGraphBuilder.js"; diff --git a/Clava-JS/src-api/clava/graphs/cfg/CfgBuilder.ts b/Clava-JS/src-api/clava/graphs/cfg/CfgBuilder.ts index 14be9eeb5..4273bd9ac 100644 --- a/Clava-JS/src-api/clava/graphs/cfg/CfgBuilder.ts +++ b/Clava-JS/src-api/clava/graphs/cfg/CfgBuilder.ts @@ -1,7 +1,7 @@ -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import Graphs from "lara-js/api/lara/graphs/Graphs.js"; -import cytoscape from "lara-js/api/libs/cytoscape-3.26.0.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import Graphs from "@specs-feup/lara/api/lara/graphs/Graphs.js"; +import cytoscape from "@specs-feup/lara/api/libs/cytoscape-3.26.0.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Break, Continue, @@ -30,7 +30,7 @@ import ScopeNodeData from "./nodedata/ScopeNodeData.js"; import SwitchData from "./nodedata/SwitchData.js"; import GotoData from "./nodedata/GotoData.js"; import LabelData from "./nodedata/LabelData.js"; -import { LaraJoinPoint } from "lara-js/api/LaraJoinPoint.js"; +import { LaraJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; export default class CfgBuilder { /** diff --git a/Clava-JS/src-api/clava/graphs/cfg/CfgEdge.ts b/Clava-JS/src-api/clava/graphs/cfg/CfgEdge.ts index 141c5108e..ec0c59121 100644 --- a/Clava-JS/src-api/clava/graphs/cfg/CfgEdge.ts +++ b/Clava-JS/src-api/clava/graphs/cfg/CfgEdge.ts @@ -1,4 +1,4 @@ -import EdgeData from "lara-js/api/lara/graphs/EdgeData.js"; +import EdgeData from "@specs-feup/lara/api/lara/graphs/EdgeData.js"; import CfgEdgeType from "./CfgEdgeType.js"; /** diff --git a/Clava-JS/src-api/clava/graphs/cfg/CfgNodeData.ts b/Clava-JS/src-api/clava/graphs/cfg/CfgNodeData.ts index 3d4868167..c35eb7903 100644 --- a/Clava-JS/src-api/clava/graphs/cfg/CfgNodeData.ts +++ b/Clava-JS/src-api/clava/graphs/cfg/CfgNodeData.ts @@ -1,11 +1,13 @@ -import NodeData from "lara-js/api/lara/graphs/NodeData.js"; +import NodeData from "@specs-feup/lara/api/lara/graphs/NodeData.js"; import { Statement } from "../../../Joinpoints.js"; import CfgNodeType from "./CfgNodeType.js"; /** * The data of a CFG node. */ -export default class CfgNodeData extends NodeData { +export default class CfgNodeData< + T extends Statement = Statement, +> extends NodeData { /** * The statement join point of the CFG node */ diff --git a/Clava-JS/src-api/clava/graphs/cfg/CfgUtils.ts b/Clava-JS/src-api/clava/graphs/cfg/CfgUtils.ts index f645d41a9..625108b46 100644 --- a/Clava-JS/src-api/clava/graphs/cfg/CfgUtils.ts +++ b/Clava-JS/src-api/clava/graphs/cfg/CfgUtils.ts @@ -1,4 +1,4 @@ -import cytoscape from "lara-js/api/libs/cytoscape-3.26.0.js"; +import cytoscape from "@specs-feup/lara/api/libs/cytoscape-3.26.0.js"; import { Break, Case, diff --git a/Clava-JS/src-api/clava/graphs/cfg/NextCfgNode.ts b/Clava-JS/src-api/clava/graphs/cfg/NextCfgNode.ts index 0d43b933f..bd1f944bd 100644 --- a/Clava-JS/src-api/clava/graphs/cfg/NextCfgNode.ts +++ b/Clava-JS/src-api/clava/graphs/cfg/NextCfgNode.ts @@ -1,4 +1,4 @@ -import cytoscape from "lara-js/api/libs/cytoscape-3.26.0.js"; +import cytoscape from "@specs-feup/lara/api/libs/cytoscape-3.26.0.js"; import { Case, FunctionJp, @@ -24,7 +24,11 @@ export default class NextCfgNode { */ private endNode: cytoscape.NodeSingular; - constructor($entryPoint: Statement, nodes: Map, endNode: cytoscape.NodeSingular) { + constructor( + $entryPoint: Statement, + nodes: Map, + endNode: cytoscape.NodeSingular + ) { this.entryPoint = $entryPoint; this.nodes = nodes; this.endNode = endNode; @@ -143,7 +147,6 @@ export default class NextCfgNode { return rightStmts[0]; } - // If scope parent is not a statement, there is no next statement if ($scopeParent instanceof Statement) { // Return next statement of parent statement diff --git a/Clava-JS/src-api/clava/graphs/scg/ScgEdgeData.ts b/Clava-JS/src-api/clava/graphs/scg/ScgEdgeData.ts index fa18426ae..1541821c6 100644 --- a/Clava-JS/src-api/clava/graphs/scg/ScgEdgeData.ts +++ b/Clava-JS/src-api/clava/graphs/scg/ScgEdgeData.ts @@ -1,4 +1,4 @@ -import EdgeData from "lara-js/api/lara/graphs/EdgeData.js"; +import EdgeData from "@specs-feup/lara/api/lara/graphs/EdgeData.js"; import { Call } from "../../../Joinpoints.js"; export default class ScgEdgeData extends EdgeData { diff --git a/Clava-JS/src-api/clava/graphs/scg/ScgNodeData.ts b/Clava-JS/src-api/clava/graphs/scg/ScgNodeData.ts index df60cf3cc..147227ec2 100644 --- a/Clava-JS/src-api/clava/graphs/scg/ScgNodeData.ts +++ b/Clava-JS/src-api/clava/graphs/scg/ScgNodeData.ts @@ -1,5 +1,5 @@ -import NodeData from "lara-js/api/lara/graphs/NodeData.js"; -import Query from "lara-js/api/weaver/Query.js"; +import NodeData from "@specs-feup/lara/api/lara/graphs/NodeData.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FunctionJp } from "../../../Joinpoints.js"; export default class ScgNodeData extends NodeData { diff --git a/Clava-JS/src-api/clava/graphs/scg/StaticCallGraphBuilder.ts b/Clava-JS/src-api/clava/graphs/scg/StaticCallGraphBuilder.ts index 4c58fa491..a21911db4 100644 --- a/Clava-JS/src-api/clava/graphs/scg/StaticCallGraphBuilder.ts +++ b/Clava-JS/src-api/clava/graphs/scg/StaticCallGraphBuilder.ts @@ -1,7 +1,7 @@ -import { LaraJoinPoint } from "lara-js/api/LaraJoinPoint.js"; -import Graphs from "lara-js/api/lara/graphs/Graphs.js"; -import cytoscape from "lara-js/api/libs/cytoscape-3.26.0.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { LaraJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; +import Graphs from "@specs-feup/lara/api/lara/graphs/Graphs.js"; +import cytoscape from "@specs-feup/lara/api/libs/cytoscape-3.26.0.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FunctionJp, Joinpoint, Program } from "../../../Joinpoints.js"; import ScgEdgeData from "./ScgEdgeData.js"; import ScgNodeData from "./ScgNodeData.js"; diff --git a/Clava-JS/src-api/clava/hls/HLSAnalysis.ts b/Clava-JS/src-api/clava/hls/HLSAnalysis.ts index 820541ecd..10dec1258 100644 --- a/Clava-JS/src-api/clava/hls/HLSAnalysis.ts +++ b/Clava-JS/src-api/clava/hls/HLSAnalysis.ts @@ -1,122 +1,131 @@ -import { unwrapJoinPoint } from "lara-js/api/LaraJoinPoint.js"; +import { unwrapJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; import { FunctionJp } from "../../Joinpoints.js"; import ClavaJavaTypes from "../ClavaJavaTypes.js"; export default class HLSAnalysis { - -/** - * Applies a set of Vivado HLS directives to a provided function using a set - * of strategies to select and configure those directives. This function applies the - * main optimization flow, which is comprised of the following strategies, by this order: - * - Function Inlining - * - Array Streaming - * - Loop strategies (loop unrolling, pipelining and array partitioning) - * For a description of how each strategy works, as well as for a standalone version of - * each of these strategies, please consult the other methods of this class. - * - * @param func - A JoinPoint of the function to analyze - * @param options - An optional argument to specify the HLS options. The format - * is the following: \{"B": 2, "N": 32, "P": 64\} - * If not specified, the compiler will use the values provided in the example above. - * - */ -static applyGenericStrategies(func: FunctionJp, options: {B?: number, N?: number, P?: number} = {}) { + /** + * Applies a set of Vivado HLS directives to a provided function using a set + * of strategies to select and configure those directives. This function applies the + * main optimization flow, which is comprised of the following strategies, by this order: + * - Function Inlining + * - Array Streaming + * - Loop strategies (loop unrolling, pipelining and array partitioning) + * For a description of how each strategy works, as well as for a standalone version of + * each of these strategies, please consult the other methods of this class. + * + * @param func - A JoinPoint of the function to analyze + * @param options - An optional argument to specify the HLS options. The format + * is the following: \{"B": 2, "N": 32, "P": 64\} + * If not specified, the compiler will use the values provided in the example above. + * + */ + static applyGenericStrategies( + func: FunctionJp, + options: { B?: number; N?: number; P?: number } = {} + ) { ClavaJavaTypes.HighLevelSynthesisAPI.applyGenericStrategies( unwrapJoinPoint(func), JSON.stringify(options) ); -} + } - -/** - * Applies the function inlining directive to every called function. - * It works by calculating the cost of both the called function and the callee, - * in which cost is defined as the total number of array loads on the total lifetime - * of the function. This is then fed to the formula: - * - * calleeCost \> (callFrequency * calledCost) / B - * - * If this function is true, the function is inlined. Factor B is configurable, and allows - * for this formula to be more restrictive/permissive, based on the user's needs. The - * default value is 2. - * - * - * @param func - A JoinPoint of the function to analyze - * @param B - A positive real number to control the heuristic's aggressiveness - * */ -static applyFunctionInlining(func: FunctionJp, B: number): void { + /** + * Applies the function inlining directive to every called function. + * It works by calculating the cost of both the called function and the callee, + * in which cost is defined as the total number of array loads on the total lifetime + * of the function. This is then fed to the formula: + * + * calleeCost \> (callFrequency * calledCost) / B + * + * If this function is true, the function is inlined. Factor B is configurable, and allows + * for this formula to be more restrictive/permissive, based on the user's needs. The + * default value is 2. + * + * + * @param func - A JoinPoint of the function to analyze + * @param B - A positive real number to control the heuristic's aggressiveness + * */ + static applyFunctionInlining(func: FunctionJp, B: number): void { ClavaJavaTypes.HighLevelSynthesisAPI.applyFunctionInlining( unwrapJoinPoint(func), B.toString() ); -} + } -/** - * This strategy analyzes every input/output array of the function, and - * tries to see if they can be implemented as a FIFO. To do this, the strategy - * makes a series of checks to see whether the array can be implemented as such. - * These checks are: - * - Check if the array only has either loads or stores operations - * - Check if the array is always accessed sequentially (limited by the information - * available at compile time) - * - Check whether each array position is accessed only once during the entire function - * lifetime - * If all these checks apply, the array is implemented as a FIFO using a Vivado HLS directive. - * - * @param func - A JoinPoint of the function to analyze - * */ -static applyArrayStreaming(func: FunctionJp): void { - ClavaJavaTypes.HighLevelSynthesisAPI.applyArrayStreaming(unwrapJoinPoint(func)); -} - -/** - * Analyzes every loop nest of a function and applies loop optimizations. These - * optimizations are a combination of loop unrolling and loop pipelining. For the latter - * to be efficient, array partitioning is also applied. This strategy works by always - * unrolling the innermost loop of every nest, with a resource limitation directive to - * prevent excessive resource usage. Then, if the number of iterations of the outermost - * loop is less than 4, that loop is also unrolled, and so on. However, this is an edge case, - * since this rarely happens; the outermost loop is, instead, pipelined. The array partitioning - * is done in two ways: if an array is less than 4096 bytes, it is mapped into registers; otherwise, - * it is partitioned into P partitions using a cyclic strategy. - * - * - * @param func - A JoinPoint of the function to analyze - * @param P - The number of partitions to use. 64 is the default. - * */ -static applyLoopStrategies(func: FunctionJp, P: number): void { - ClavaJavaTypes.HighLevelSynthesisAPI.applyLoopStrategies(unwrapJoinPoint(func), P.toString()); -} + /** + * This strategy analyzes every input/output array of the function, and + * tries to see if they can be implemented as a FIFO. To do this, the strategy + * makes a series of checks to see whether the array can be implemented as such. + * These checks are: + * - Check if the array only has either loads or stores operations + * - Check if the array is always accessed sequentially (limited by the information + * available at compile time) + * - Check whether each array position is accessed only once during the entire function + * lifetime + * If all these checks apply, the array is implemented as a FIFO using a Vivado HLS directive. + * + * @param func - A JoinPoint of the function to analyze + * */ + static applyArrayStreaming(func: FunctionJp): void { + ClavaJavaTypes.HighLevelSynthesisAPI.applyArrayStreaming( + unwrapJoinPoint(func) + ); + } -/** - * Applies the load/stores strategy to simple loops. A simple loop is defined as - * a function with only one loop with no nests, and in which every array is either only - * loaded from or stored to in each iteration. This method can validate whether the provided - * function is a simple loop or not. If it is one, then it applies three HLS directives in tandem: - * it unrolls the loop by a factor N (called the load/stores factor), it partitions each array by - * that same factor N using a cyclic strategy and finally it pipelines the loop. This strategy is - * better than the other generic strategies for this type of function. Generally, larger values lead - * to a better speedup, although there are exceptions. Therefore, it is recommended for users to - * experiment with different values if results are unsatisfactory (the default value is 32). - * - * - * @param func - A JoinPoint of the function to analyze - * @param N - A positive integer value for the load/stores factor - * */ -static applyLoadStoresStrategy(func: FunctionJp, N: number): void { - ClavaJavaTypes.HighLevelSynthesisAPI.applyLoadStoresStrategy(unwrapJoinPoint(func), N.toString()); -} + /** + * Analyzes every loop nest of a function and applies loop optimizations. These + * optimizations are a combination of loop unrolling and loop pipelining. For the latter + * to be efficient, array partitioning is also applied. This strategy works by always + * unrolling the innermost loop of every nest, with a resource limitation directive to + * prevent excessive resource usage. Then, if the number of iterations of the outermost + * loop is less than 4, that loop is also unrolled, and so on. However, this is an edge case, + * since this rarely happens; the outermost loop is, instead, pipelined. The array partitioning + * is done in two ways: if an array is less than 4096 bytes, it is mapped into registers; otherwise, + * it is partitioned into P partitions using a cyclic strategy. + * + * + * @param func - A JoinPoint of the function to analyze + * @param P - The number of partitions to use. 64 is the default. + * */ + static applyLoopStrategies(func: FunctionJp, P: number): void { + ClavaJavaTypes.HighLevelSynthesisAPI.applyLoopStrategies( + unwrapJoinPoint(func), + P.toString() + ); + } -/** - * Checks whether a function can be instrumented. Only workds for old versions - * of the trace2c tool. - * - * @param func - A JoinPoint of the function to analyze - * @returns Whether the function can be or not instrumented - * */ -static canBeInstrumented(func: FunctionJp): boolean { - return ClavaJavaTypes.HighLevelSynthesisAPI.canBeInstrumented(unwrapJoinPoint(func)); -} + /** + * Applies the load/stores strategy to simple loops. A simple loop is defined as + * a function with only one loop with no nests, and in which every array is either only + * loaded from or stored to in each iteration. This method can validate whether the provided + * function is a simple loop or not. If it is one, then it applies three HLS directives in tandem: + * it unrolls the loop by a factor N (called the load/stores factor), it partitions each array by + * that same factor N using a cyclic strategy and finally it pipelines the loop. This strategy is + * better than the other generic strategies for this type of function. Generally, larger values lead + * to a better speedup, although there are exceptions. Therefore, it is recommended for users to + * experiment with different values if results are unsatisfactory (the default value is 32). + * + * + * @param func - A JoinPoint of the function to analyze + * @param N - A positive integer value for the load/stores factor + * */ + static applyLoadStoresStrategy(func: FunctionJp, N: number): void { + ClavaJavaTypes.HighLevelSynthesisAPI.applyLoadStoresStrategy( + unwrapJoinPoint(func), + N.toString() + ); + } + /** + * Checks whether a function can be instrumented. Only workds for old versions + * of the trace2c tool. + * + * @param func - A JoinPoint of the function to analyze + * @returns Whether the function can be or not instrumented + * */ + static canBeInstrumented(func: FunctionJp): boolean { + return ClavaJavaTypes.HighLevelSynthesisAPI.canBeInstrumented( + unwrapJoinPoint(func) + ); + } } - diff --git a/Clava-JS/src-api/clava/hls/MathAnalysis.ts b/Clava-JS/src-api/clava/hls/MathAnalysis.ts index b2ba20c19..53ee2dd01 100644 --- a/Clava-JS/src-api/clava/hls/MathAnalysis.ts +++ b/Clava-JS/src-api/clava/hls/MathAnalysis.ts @@ -1,5 +1,5 @@ -import Io from "lara-js/api/lara/Io.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BuiltinType, Call, Expression } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import MathHInfo, { MathInfo } from "./MathHInfo.js"; diff --git a/Clava-JS/src-api/clava/hls/MathHInfo.ts b/Clava-JS/src-api/clava/hls/MathHInfo.ts index 048002333..32b2e4edf 100644 --- a/Clava-JS/src-api/clava/hls/MathHInfo.ts +++ b/Clava-JS/src-api/clava/hls/MathHInfo.ts @@ -1,5 +1,5 @@ -import Io from "lara-js/api/lara/Io.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FileJp, FunctionJp, Program } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; @@ -49,9 +49,7 @@ export default class MathHInfo { Clava.rebuild(); const results = []; - for (const $fn of Query.search(FileJp, "math_copy.h").search( - FunctionJp - )) { + for (const $fn of Query.search(FileJp, "math_copy.h").search(FunctionJp)) { const paramTypes = []; for (const $param of $fn.params) { paramTypes.push($param.type.code); diff --git a/Clava-JS/src-api/clava/hls/TraceInstrumentation.ts b/Clava-JS/src-api/clava/hls/TraceInstrumentation.ts index 7c1de50db..9f810b382 100644 --- a/Clava-JS/src-api/clava/hls/TraceInstrumentation.ts +++ b/Clava-JS/src-api/clava/hls/TraceInstrumentation.ts @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { ArrayAccess, BinaryOp, diff --git a/Clava-JS/src-api/clava/liveness/LivenessAnalyser.ts b/Clava-JS/src-api/clava/liveness/LivenessAnalyser.ts index 39101c095..e4b773569 100644 --- a/Clava-JS/src-api/clava/liveness/LivenessAnalyser.ts +++ b/Clava-JS/src-api/clava/liveness/LivenessAnalyser.ts @@ -1,4 +1,4 @@ -import cytoscape from "lara-js/api/libs/cytoscape-3.26.0.js"; +import cytoscape from "@specs-feup/lara/api/libs/cytoscape-3.26.0.js"; import { Case, Expression, If, Statement, Switch } from "../../Joinpoints.js"; import ControlFlowGraph from "../graphs/ControlFlowGraph.js"; import CfgNodeData from "../graphs/cfg/CfgNodeData.js"; @@ -73,7 +73,7 @@ export default class LivenessAnalyser { Map>, Map>, Map>, - Map> + Map>, ] { this.computeDefs(); this.computeUses(); diff --git a/Clava-JS/src-api/clava/liveness/LivenessAnalysis.ts b/Clava-JS/src-api/clava/liveness/LivenessAnalysis.ts index ceb420292..1d571e565 100644 --- a/Clava-JS/src-api/clava/liveness/LivenessAnalysis.ts +++ b/Clava-JS/src-api/clava/liveness/LivenessAnalysis.ts @@ -1,4 +1,4 @@ -import cytoscape from "lara-js/api/libs/cytoscape-3.26.0.js"; +import cytoscape from "@specs-feup/lara/api/libs/cytoscape-3.26.0.js"; import ControlFlowGraph from "../graphs/ControlFlowGraph.js"; import LivenessAnalyser from "./LivenessAnalyser.js"; diff --git a/Clava-JS/src-api/clava/liveness/LivenessUtils.ts b/Clava-JS/src-api/clava/liveness/LivenessUtils.ts index bb5d67684..998b33546 100644 --- a/Clava-JS/src-api/clava/liveness/LivenessUtils.ts +++ b/Clava-JS/src-api/clava/liveness/LivenessUtils.ts @@ -1,6 +1,6 @@ -import { LaraJoinPoint } from "lara-js/api/LaraJoinPoint.js"; -import cytoscape from "lara-js/api/libs/cytoscape-3.26.0.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { LaraJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; +import cytoscape from "@specs-feup/lara/api/libs/cytoscape-3.26.0.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BinaryOp, Expression, diff --git a/Clava-JS/src-api/clava/memoi/MemoiAnalysis.ts b/Clava-JS/src-api/clava/memoi/MemoiAnalysis.ts index 8b615360f..937260974 100644 --- a/Clava-JS/src-api/clava/memoi/MemoiAnalysis.ts +++ b/Clava-JS/src-api/clava/memoi/MemoiAnalysis.ts @@ -1,6 +1,6 @@ -import { JSONtoFile } from "lara-js/api/core/output.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { JSONtoFile } from "@specs-feup/lara/api/core/output.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FunctionJp, Type, Varref } from "../../Joinpoints.js"; import MemoiTarget from "./MemoiTarget.js"; import MemoiUtils from "./MemoiUtils.js"; diff --git a/Clava-JS/src-api/clava/memoi/MemoiGen.ts b/Clava-JS/src-api/clava/memoi/MemoiGen.ts index 8d856dc07..873ac6d74 100644 --- a/Clava-JS/src-api/clava/memoi/MemoiGen.ts +++ b/Clava-JS/src-api/clava/memoi/MemoiGen.ts @@ -1,8 +1,8 @@ -import Io from "lara-js/api/lara/Io.js"; -import { arrayFromArgs } from "lara-js/api/lara/core/LaraCore.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import { TimerUnit } from "lara-js/api/lara/util/TimeUnits.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import { arrayFromArgs } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import { TimerUnit } from "@specs-feup/lara/api/lara/util/TimeUnits.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FileJp, FunctionJp } from "../../Joinpoints.js"; import Timer from "../../lara/code/Timer.js"; import ClavaJavaTypes, { ClavaJavaClasses } from "../ClavaJavaTypes.js"; diff --git a/Clava-JS/src-api/clava/memoi/MemoiProf.ts b/Clava-JS/src-api/clava/memoi/MemoiProf.ts index 8ab60699b..0388da5cb 100644 --- a/Clava-JS/src-api/clava/memoi/MemoiProf.ts +++ b/Clava-JS/src-api/clava/memoi/MemoiProf.ts @@ -1,6 +1,6 @@ -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; -import Query from "lara-js/api/weaver/Query.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import PrintOnce from "@specs-feup/lara/api/lara/util/PrintOnce.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FileJp, FunctionJp, Scope, Type } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; diff --git a/Clava-JS/src-api/clava/memoi/MemoiTarget.ts b/Clava-JS/src-api/clava/memoi/MemoiTarget.ts index 992e1a93b..c6aec5019 100644 --- a/Clava-JS/src-api/clava/memoi/MemoiTarget.ts +++ b/Clava-JS/src-api/clava/memoi/MemoiTarget.ts @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FunctionJp } from "../../Joinpoints.js"; import MemoiUtils from "./MemoiUtils.js"; diff --git a/Clava-JS/src-api/clava/memoi/_MemoiGenHelper.ts b/Clava-JS/src-api/clava/memoi/_MemoiGenHelper.ts index 696d556e0..bb6452cad 100644 --- a/Clava-JS/src-api/clava/memoi/_MemoiGenHelper.ts +++ b/Clava-JS/src-api/clava/memoi/_MemoiGenHelper.ts @@ -1,6 +1,6 @@ -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FileJp, FunctionJp, Statement } from "../../Joinpoints.js"; import ClavaJavaTypes, { ClavaJavaClasses } from "../ClavaJavaTypes.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; diff --git a/Clava-JS/src-api/clava/opencl/KernelReplacer.ts b/Clava-JS/src-api/clava/opencl/KernelReplacer.ts index d7e472c8b..3f85c2bab 100644 --- a/Clava-JS/src-api/clava/opencl/KernelReplacer.ts +++ b/Clava-JS/src-api/clava/opencl/KernelReplacer.ts @@ -1,5 +1,5 @@ -import Io from "lara-js/api/lara/Io.js"; -import Strings from "lara-js/api/lara/Strings.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; import { BuiltinType, Call, diff --git a/Clava-JS/src-api/clava/opencl/KernelReplacerAuto.ts b/Clava-JS/src-api/clava/opencl/KernelReplacerAuto.ts index 99e3f2449..fda9724da 100644 --- a/Clava-JS/src-api/clava/opencl/KernelReplacerAuto.ts +++ b/Clava-JS/src-api/clava/opencl/KernelReplacerAuto.ts @@ -1,6 +1,6 @@ -import Io from "lara-js/api/lara/Io.js"; -import Strings from "lara-js/api/lara/Strings.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FileJp, Pragma } from "../../Joinpoints.js"; import KernelReplacer, { OpenClKernelReplacerConfiguration, diff --git a/Clava-JS/src-api/clava/opencl/OpenCLCall.ts b/Clava-JS/src-api/clava/opencl/OpenCLCall.ts index 07d973a39..ee33f6d8c 100644 --- a/Clava-JS/src-api/clava/opencl/OpenCLCall.ts +++ b/Clava-JS/src-api/clava/opencl/OpenCLCall.ts @@ -1,6 +1,6 @@ -import Io from "lara-js/api/lara/Io.js"; -import Platforms from "lara-js/api/lara/Platforms.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Platforms from "@specs-feup/lara/api/lara/Platforms.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; import { Call, FileJp, FunctionJp } from "../../Joinpoints.js"; import OpenCLCallVariables from "./OpenCLCallVariables.js"; diff --git a/Clava-JS/src-api/clava/opt/Inlining.ts b/Clava-JS/src-api/clava/opt/Inlining.ts index f0e4fb1c5..0815cd4b6 100644 --- a/Clava-JS/src-api/clava/opt/Inlining.ts +++ b/Clava-JS/src-api/clava/opt/Inlining.ts @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { FunctionJp, Joinpoint } from "../../Joinpoints.js"; import Inliner from "../code/Inliner.js"; import NormalizeToSubset from "./NormalizeToSubset.js"; diff --git a/Clava-JS/src-api/clava/opt/NormalizeToSubset.ts b/Clava-JS/src-api/clava/opt/NormalizeToSubset.ts index 2a51e89c5..9d190a9ad 100644 --- a/Clava-JS/src-api/clava/opt/NormalizeToSubset.ts +++ b/Clava-JS/src-api/clava/opt/NormalizeToSubset.ts @@ -1,5 +1,5 @@ -import { LaraJoinPoint } from "lara-js/api/LaraJoinPoint.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { LaraJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BinaryOp, Joinpoint } from "../../Joinpoints.js"; import SimplifyAssignment from "../code/SimplifyAssignment.js"; import StatementDecomposer from "../code/StatementDecomposer.js"; diff --git a/Clava-JS/src-api/clava/parser/BatchParser.ts b/Clava-JS/src-api/clava/parser/BatchParser.ts index 4359f6539..3b0a1f2da 100644 --- a/Clava-JS/src-api/clava/parser/BatchParser.ts +++ b/Clava-JS/src-api/clava/parser/BatchParser.ts @@ -1,11 +1,11 @@ -import Io from "lara-js/api/lara/Io.js"; -import Check from "lara-js/api/lara/Check.js"; -import System from "lara-js/api/lara/System.js"; -import Strings from "lara-js/api/lara/Strings.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Check from "@specs-feup/lara/api/lara/Check.js"; +import System from "@specs-feup/lara/api/lara/System.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; import Clava from "../Clava.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; -import { JavaClasses } from "lara-js/api/lara/util/JavaTypes.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; +import { JavaClasses } from "@specs-feup/lara/api/lara/util/JavaTypes.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; import { ClavaException, FileJp } from "../../Joinpoints.js"; /** diff --git a/Clava-JS/src-api/clava/pass/DecomposeDeclStmt.ts b/Clava-JS/src-api/clava/pass/DecomposeDeclStmt.ts index 70c854f48..4835cbe81 100644 --- a/Clava-JS/src-api/clava/pass/DecomposeDeclStmt.ts +++ b/Clava-JS/src-api/clava/pass/DecomposeDeclStmt.ts @@ -1,5 +1,5 @@ -import SimplePass from "lara-js/api/lara/pass/SimplePass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; +import SimplePass from "@specs-feup/lara/api/lara/pass/SimplePass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; import { DeclStmt, Joinpoint } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; diff --git a/Clava-JS/src-api/clava/pass/DecomposeVarDeclarations.ts b/Clava-JS/src-api/clava/pass/DecomposeVarDeclarations.ts index e2404cfb5..d83cf5929 100644 --- a/Clava-JS/src-api/clava/pass/DecomposeVarDeclarations.ts +++ b/Clava-JS/src-api/clava/pass/DecomposeVarDeclarations.ts @@ -1,5 +1,5 @@ -import SimplePass from "lara-js/api/lara/pass/SimplePass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; +import SimplePass from "@specs-feup/lara/api/lara/pass/SimplePass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; import { ArrayType, Joinpoint, diff --git a/Clava-JS/src-api/clava/pass/LocalStaticToGlobal.ts b/Clava-JS/src-api/clava/pass/LocalStaticToGlobal.ts index 51e1bcaff..d7663524d 100644 --- a/Clava-JS/src-api/clava/pass/LocalStaticToGlobal.ts +++ b/Clava-JS/src-api/clava/pass/LocalStaticToGlobal.ts @@ -1,6 +1,6 @@ -import PassTransformationError from "lara-js/api/lara/pass/PassTransformationError.js"; -import SimplePass from "lara-js/api/lara/pass/SimplePass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; +import PassTransformationError from "@specs-feup/lara/api/lara/pass/PassTransformationError.js"; +import SimplePass from "@specs-feup/lara/api/lara/pass/SimplePass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; import { DeclStmt, FunctionJp, diff --git a/Clava-JS/src-api/clava/pass/SimplifyLoops.ts b/Clava-JS/src-api/clava/pass/SimplifyLoops.ts index e0377cf81..5f68dccfd 100644 --- a/Clava-JS/src-api/clava/pass/SimplifyLoops.ts +++ b/Clava-JS/src-api/clava/pass/SimplifyLoops.ts @@ -1,5 +1,5 @@ -import Pass from "lara-js/api/lara/pass/Pass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; import { DeclStmt, ExprStmt, Joinpoint, Loop } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import DoToWhileStmt from "../code/DoToWhileStmt.js"; diff --git a/Clava-JS/src-api/clava/pass/SimplifyReturnStmts.ts b/Clava-JS/src-api/clava/pass/SimplifyReturnStmts.ts index 853384edf..d217f68a0 100644 --- a/Clava-JS/src-api/clava/pass/SimplifyReturnStmts.ts +++ b/Clava-JS/src-api/clava/pass/SimplifyReturnStmts.ts @@ -1,6 +1,6 @@ -import Pass from "lara-js/api/lara/pass/Pass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Joinpoint, ReturnStmt } from "../../Joinpoints.js"; import StatementDecomposer from "../code/StatementDecomposer.js"; diff --git a/Clava-JS/src-api/clava/pass/SimplifySelectionStmts.ts b/Clava-JS/src-api/clava/pass/SimplifySelectionStmts.ts index e6bdaefce..4f5d434c4 100644 --- a/Clava-JS/src-api/clava/pass/SimplifySelectionStmts.ts +++ b/Clava-JS/src-api/clava/pass/SimplifySelectionStmts.ts @@ -1,6 +1,6 @@ -import Pass from "lara-js/api/lara/pass/Pass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { If, Joinpoint } from "../../Joinpoints.js"; import StatementDecomposer from "../code/StatementDecomposer.js"; diff --git a/Clava-JS/src-api/clava/pass/SingleReturnFunction.ts b/Clava-JS/src-api/clava/pass/SingleReturnFunction.ts index f90e29b61..342031788 100644 --- a/Clava-JS/src-api/clava/pass/SingleReturnFunction.ts +++ b/Clava-JS/src-api/clava/pass/SingleReturnFunction.ts @@ -1,6 +1,6 @@ -import Pass from "lara-js/api/lara/pass/Pass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BuiltinType, FunctionJp, @@ -25,10 +25,7 @@ export default class SingleReturnFunction extends Pass { return this.new_result($jp, false); } const $body = $jp.body; - const $returnStmts = Query.searchFrom( - $body, - ReturnStmt - ).get(); + const $returnStmts = Query.searchFrom($body, ReturnStmt).get(); if ( $returnStmts.length === 0 || ($returnStmts.length === 1 && $body.lastChild instanceof ReturnStmt) diff --git a/Clava-JS/src-api/clava/pass/TransformSwitchToIf.ts b/Clava-JS/src-api/clava/pass/TransformSwitchToIf.ts index 80e25ddb4..2201ce999 100644 --- a/Clava-JS/src-api/clava/pass/TransformSwitchToIf.ts +++ b/Clava-JS/src-api/clava/pass/TransformSwitchToIf.ts @@ -1,7 +1,7 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; -import SimplePass from "lara-js/api/lara/pass/SimplePass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; +import SimplePass from "@specs-feup/lara/api/lara/pass/SimplePass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; import { Break, Case, @@ -11,7 +11,7 @@ import { Statement, Switch, } from "../../Joinpoints.js"; -import { LaraJoinPoint } from "lara-js/api/LaraJoinPoint.js"; +import { LaraJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; /** * Transforms a switch statement into an if statement. @@ -249,8 +249,7 @@ export default class TransformSwitchToIf extends SimplePass { enclosingStmt: (enclosingStmt: LaraJoinPoint) => (enclosingStmt as Statement).astId === $jp.astId, }); - for (const $break of $breakStmts) - $break.replaceWith($switchExitGoTo); + for (const $break of $breakStmts) $break.replaceWith($switchExitGoTo); } /** diff --git a/Clava-JS/src-api/clava/stats/OpsCounter.ts b/Clava-JS/src-api/clava/stats/OpsCounter.ts index 8a5e2b557..8d3eccaf7 100644 --- a/Clava-JS/src-api/clava/stats/OpsCounter.ts +++ b/Clava-JS/src-api/clava/stats/OpsCounter.ts @@ -1,7 +1,7 @@ import ClavaJoinPoints from "../ClavaJoinPoints.js"; import GlobalVariable from "../code/GlobalVariable.js"; -import Query from "lara-js/api/weaver/Query.js"; -import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; +import PrintOnce from "@specs-feup/lara/api/lara/util/PrintOnce.js"; import Logger from "../../lara/code/Logger.js"; import { BuiltinType, diff --git a/Clava-JS/src-api/clava/stats/StaticOpsCounter.ts b/Clava-JS/src-api/clava/stats/StaticOpsCounter.ts index 96acb4f3b..afdf1fff7 100644 --- a/Clava-JS/src-api/clava/stats/StaticOpsCounter.ts +++ b/Clava-JS/src-api/clava/stats/StaticOpsCounter.ts @@ -1,5 +1,5 @@ -import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; -import Query from "lara-js/api/weaver/Query.js"; +import PrintOnce from "@specs-feup/lara/api/lara/util/PrintOnce.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BinaryOp, BuiltinType, diff --git a/Clava-JS/src-api/clava/util/ClavaDataStore.ts b/Clava-JS/src-api/clava/util/ClavaDataStore.ts index 3761bb803..5e1a6e87a 100644 --- a/Clava-JS/src-api/clava/util/ClavaDataStore.ts +++ b/Clava-JS/src-api/clava/util/ClavaDataStore.ts @@ -1,9 +1,11 @@ -import WeaverDataStore from "lara-js/api/weaver/util/WeaverDataStore.js"; +import WeaverDataStore from "@specs-feup/lara/api/weaver/util/WeaverDataStore.js"; import ClavaJavaTypes from "../ClavaJavaTypes.js"; -import JavaTypes, { JavaClasses } from "lara-js/api/lara/util/JavaTypes.js"; -import Io from "lara-js/api/lara/Io.js"; -import DataStore from "lara-js/api/lara/util/DataStore.js"; -import { arrayFromArgs } from "lara-js/api/lara/core/LaraCore.js"; +import JavaTypes, { + JavaClasses, +} from "@specs-feup/lara/api/lara/util/JavaTypes.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import DataStore from "@specs-feup/lara/api/lara/util/DataStore.js"; +import { arrayFromArgs } from "@specs-feup/lara/api/lara/core/LaraCore.js"; /** * DataStore used in Clava. diff --git a/Clava-JS/src-api/clava/util/CodeInserter.ts b/Clava-JS/src-api/clava/util/CodeInserter.ts index 2ac64111b..f37b0c912 100644 --- a/Clava-JS/src-api/clava/util/CodeInserter.ts +++ b/Clava-JS/src-api/clava/util/CodeInserter.ts @@ -1,5 +1,5 @@ -import Io from "lara-js/api/lara/Io.js"; -import LineInserter from "lara-js/api/lara/util/LineInserter.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import LineInserter from "@specs-feup/lara/api/lara/util/LineInserter.js"; import { FileJp } from "../../Joinpoints.js"; import Clava from "../Clava.js"; diff --git a/Clava-JS/src-api/clava/util/FileIterator.ts b/Clava-JS/src-api/clava/util/FileIterator.ts index 3d27fee6a..21267c0aa 100644 --- a/Clava-JS/src-api/clava/util/FileIterator.ts +++ b/Clava-JS/src-api/clava/util/FileIterator.ts @@ -1,6 +1,6 @@ -import Io from "lara-js/api/lara/Io.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import { JavaClasses } from "lara-js/api/lara/util/JavaTypes.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import { JavaClasses } from "@specs-feup/lara/api/lara/util/JavaTypes.js"; import { FileJp } from "../../Joinpoints.js"; import Clava from "../Clava.js"; diff --git a/Clava-JS/src-api/clava/vitishls/VitisHls.ts b/Clava-JS/src-api/clava/vitishls/VitisHls.ts index ae2925811..3db78031d 100644 --- a/Clava-JS/src-api/clava/vitishls/VitisHls.ts +++ b/Clava-JS/src-api/clava/vitishls/VitisHls.ts @@ -1,9 +1,9 @@ import Clava from "../Clava.js"; -import ProcessExecutor from "lara-js/api/lara/util/ProcessExecutor.js"; +import ProcessExecutor from "@specs-feup/lara/api/lara/util/ProcessExecutor.js"; import VitisHlsReportParser from "./VitisHlsReportParser.js"; -import Tool from "lara-js/api/lara/tool/Tool.js"; -import ToolUtils from "lara-js/api/lara/tool/ToolUtils.js"; -import Io from "lara-js/api/lara/Io.js"; +import Tool from "@specs-feup/lara/api/lara/tool/Tool.js"; +import ToolUtils from "@specs-feup/lara/api/lara/tool/ToolUtils.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; export default class VitisHls extends Tool { topFunction: string; @@ -80,7 +80,12 @@ export default class VitisHls extends Tool { } private getSynthesisReportPath() { - return this.vitisDir + "/" + this.vitisProjName + "/solution1/syn/report/csynth.xml"; + return ( + this.vitisDir + + "/" + + this.vitisProjName + + "/solution1/syn/report/csynth.xml" + ); } private executeVitis(verbose: boolean) { @@ -149,7 +154,9 @@ exit return (+n).toFixed(decimalPlaces); } - prettyPrintReport(report: ReturnType) { + prettyPrintReport( + report: ReturnType + ) { const period = this.preciseStr(report["clockEstim"], 2); const freq = this.preciseStr(report["fmax"], 2); diff --git a/Clava-JS/src-api/clava/vitishls/VitisHlsReportParser.ts b/Clava-JS/src-api/clava/vitishls/VitisHlsReportParser.ts index 5cf939328..22cc46bed 100644 --- a/Clava-JS/src-api/clava/vitishls/VitisHlsReportParser.ts +++ b/Clava-JS/src-api/clava/vitishls/VitisHlsReportParser.ts @@ -1,4 +1,4 @@ -import Io from "lara-js/api/lara/Io.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; export default class VitisHlsReportParser { private reportPath: string; diff --git a/Clava-JS/src-api/clava/vitishls/VitisHlsUtils.ts b/Clava-JS/src-api/clava/vitishls/VitisHlsUtils.ts index d7cc6e934..866519e2a 100644 --- a/Clava-JS/src-api/clava/vitishls/VitisHlsUtils.ts +++ b/Clava-JS/src-api/clava/vitishls/VitisHlsUtils.ts @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { WrapperStmt } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; diff --git a/Clava-JS/src-api/core.ts b/Clava-JS/src-api/core.ts index 6f59c004b..4ca929e79 100644 --- a/Clava-JS/src-api/core.ts +++ b/Clava-JS/src-api/core.ts @@ -5,7 +5,7 @@ * Remove this file if Clava Classic has died out. */ -const prefix = "clava-js/api/"; +const prefix = "@specs-feup/clava/api/"; const coreImports: string[] = []; const sideEffectsOnlyImports: string[] = ["Joinpoints.js"]; diff --git a/Clava-JS/src-api/jest.config.js b/Clava-JS/src-api/jest.config.js index d062c9217..1a3bc058a 100644 --- a/Clava-JS/src-api/jest.config.js +++ b/Clava-JS/src-api/jest.config.js @@ -2,12 +2,12 @@ import { weaverConfig } from "../code/WeaverConfiguration.js"; const config = { preset: "ts-jest/presets/default-esm", - testEnvironment: "lara-js/jest/jestEnvironment.js", - globalSetup: "lara-js/jest/jestGlobalSetup.js", - globalTeardown: "lara-js/jest/jestGlobalTeardown.js", - setupFiles: ["lara-js/jest/setupFiles/sharedJavaModule.js"], + testEnvironment: "@specs-feup/lara/jest/jestEnvironment.js", + globalSetup: "@specs-feup/lara/jest/jestGlobalSetup.js", + globalTeardown: "@specs-feup/lara/jest/jestGlobalTeardown.js", + setupFiles: ["@specs-feup/lara/jest/setupFiles/sharedJavaModule.js"], moduleNameMapper: { - "clava-js/api/(.+).js": "clava-js/src-api/$1", + "@specs-feup/clava/api/(.+).js": "@specs-feup/clava/src-api/$1", "(.+)\\.js": "$1", }, testEnvironmentOptions: { diff --git a/Clava-JS/src-api/lara/benchmark/ClavaBenchmarkInstance.ts b/Clava-JS/src-api/lara/benchmark/ClavaBenchmarkInstance.ts index 997427fab..ab5ac40a2 100644 --- a/Clava-JS/src-api/lara/benchmark/ClavaBenchmarkInstance.ts +++ b/Clava-JS/src-api/lara/benchmark/ClavaBenchmarkInstance.ts @@ -1,8 +1,8 @@ -import Io from "lara-js/api/lara/Io.js"; -import BenchmarkInstance from "lara-js/api/lara/benchmark/BenchmarkInstance.js"; -import { JavaClasses } from "lara-js/api/lara/util/JavaTypes.js"; -import Query from "lara-js/api/weaver/Query.js"; -import Weaver from "lara-js/api/weaver/Weaver.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import BenchmarkInstance from "@specs-feup/lara/api/lara/benchmark/BenchmarkInstance.js"; +import { JavaClasses } from "@specs-feup/lara/api/lara/util/JavaTypes.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; +import Weaver from "@specs-feup/lara/api/weaver/Weaver.js"; import Clava from "../..//clava/Clava.js"; import { Joinpoint, Pragma, Program } from "../../Joinpoints.js"; import CMaker from "../../clava/cmake/CMaker.js"; diff --git a/Clava-JS/src-api/lara/code/Energy.ts b/Clava-JS/src-api/lara/code/Energy.ts index 4bcc0de00..4e74a4cfe 100644 --- a/Clava-JS/src-api/lara/code/Energy.ts +++ b/Clava-JS/src-api/lara/code/Energy.ts @@ -1,10 +1,10 @@ -import EnergyBase from "lara-js/api/lara/code/EnergyBase.js"; +import EnergyBase from "@specs-feup/lara/api/lara/code/EnergyBase.js"; import Clava from "../../clava/Clava.js"; import Logger from "./Logger.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import PrintOnce from "@specs-feup/lara/api/lara/util/PrintOnce.js"; import { FileJp, Joinpoint } from "../../Joinpoints.js"; export default class Energy extends EnergyBase { @@ -47,7 +47,8 @@ export default class Energy extends EnergyBase { const $file = $start.getAncestor("file") as FileJp | undefined; if ($file === undefined) { console.log( - "Could not find the corresponding file of the given joinpoint: " + $start.joinPointType + "Could not find the corresponding file of the given joinpoint: " + + $start.joinPointType ); return; } diff --git a/Clava-JS/src-api/lara/code/Logger.ts b/Clava-JS/src-api/lara/code/Logger.ts index 275864af0..e7aa0c937 100644 --- a/Clava-JS/src-api/lara/code/Logger.ts +++ b/Clava-JS/src-api/lara/code/Logger.ts @@ -1,6 +1,6 @@ -import LoggerBase from "lara-js/api/lara/code/LoggerBase.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; +import LoggerBase from "@specs-feup/lara/api/lara/code/LoggerBase.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import PrintOnce from "@specs-feup/lara/api/lara/util/PrintOnce.js"; import Clava from "../../clava/Clava.js"; import { Expression, diff --git a/Clava-JS/src-api/lara/code/Timer.ts b/Clava-JS/src-api/lara/code/Timer.ts index 3c926c998..54f1c2ac3 100644 --- a/Clava-JS/src-api/lara/code/Timer.ts +++ b/Clava-JS/src-api/lara/code/Timer.ts @@ -1,7 +1,7 @@ -import Platforms from "lara-js/api/lara/Platforms.js"; -import TimerBase from "lara-js/api/lara/code/TimerBase.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import { TimerUnit } from "lara-js/api/lara/util/TimeUnits.js"; +import Platforms from "@specs-feup/lara/api/lara/Platforms.js"; +import TimerBase from "@specs-feup/lara/api/lara/code/TimerBase.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import { TimerUnit } from "@specs-feup/lara/api/lara/util/TimeUnits.js"; import { FileJp, Joinpoint, Scope } from "../../Joinpoints.js"; import Clava from "../../clava/Clava.js"; import ClavaJoinPoints from "../../clava/ClavaJoinPoints.js"; @@ -62,13 +62,17 @@ export default class Timer extends TimerBase { const timeIntervalVar = IdGenerator.next("clava_timing_duration_"); // Create literal node with calculation of time interval const $timingResult = ClavaJoinPoints.exprLiteral( - "long long " + this._timer_cpp_calc_interval(startVar, endVar, cppUnit, timeIntervalVar) + "long long " + + this._timer_cpp_calc_interval( + startVar, + endVar, + cppUnit, + timeIntervalVar + ) ); // Build message - logger - .append(prefix) - .appendLong(timeIntervalVar); + logger.append(prefix).appendLong(timeIntervalVar); if (this.printUnit) { logger.append(this.timeUnits.getUnitsString()); } diff --git a/Clava-JS/src-api/lara/metrics/EnergyMetric.ts b/Clava-JS/src-api/lara/metrics/EnergyMetric.ts index 7209e6e5b..b049f001d 100644 --- a/Clava-JS/src-api/lara/metrics/EnergyMetric.ts +++ b/Clava-JS/src-api/lara/metrics/EnergyMetric.ts @@ -1,7 +1,7 @@ -import Strings from "lara-js/api/lara/Strings.js"; -import Metric from "lara-js/api/lara/metrics/Metric.js"; -import MetricResult from "lara-js/api/lara/metrics/MetricResult.js"; -import ProcessExecutor from "lara-js/api/lara/util/ProcessExecutor.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; +import Metric from "@specs-feup/lara/api/lara/metrics/Metric.js"; +import MetricResult from "@specs-feup/lara/api/lara/metrics/MetricResult.js"; +import ProcessExecutor from "@specs-feup/lara/api/lara/util/ProcessExecutor.js"; import { Joinpoint } from "../../Joinpoints.js"; import Energy from "../code/Energy.js"; diff --git a/Clava-JS/src-api/lara/metrics/ExecutionTimeMetric.ts b/Clava-JS/src-api/lara/metrics/ExecutionTimeMetric.ts index ff992a6ef..1fa7e319d 100644 --- a/Clava-JS/src-api/lara/metrics/ExecutionTimeMetric.ts +++ b/Clava-JS/src-api/lara/metrics/ExecutionTimeMetric.ts @@ -1,8 +1,8 @@ -import Strings from "lara-js/api/lara/Strings.js"; -import Metric from "lara-js/api/lara/metrics/Metric.js"; -import MetricResult from "lara-js/api/lara/metrics/MetricResult.js"; -import ProcessExecutor from "lara-js/api/lara/util/ProcessExecutor.js"; -import { TimerUnit } from "lara-js/api/lara/util/TimeUnits.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; +import Metric from "@specs-feup/lara/api/lara/metrics/Metric.js"; +import MetricResult from "@specs-feup/lara/api/lara/metrics/MetricResult.js"; +import ProcessExecutor from "@specs-feup/lara/api/lara/util/ProcessExecutor.js"; +import { TimerUnit } from "@specs-feup/lara/api/lara/util/TimeUnits.js"; import { Joinpoint } from "../../Joinpoints.js"; import Timer from "../code/Timer.js"; diff --git a/Clava-JS/src-api/weaver/WeaverLauncher.ts b/Clava-JS/src-api/weaver/WeaverLauncher.ts index e7b10a15d..1faee2aba 100644 --- a/Clava-JS/src-api/weaver/WeaverLauncher.ts +++ b/Clava-JS/src-api/weaver/WeaverLauncher.ts @@ -1,4 +1,4 @@ -import WeaverLauncherBase from "lara-js/api/weaver/WeaverLauncherBase.js"; +import WeaverLauncherBase from "@specs-feup/lara/api/weaver/WeaverLauncherBase.js"; import Clava from "../clava/Clava.js"; export default class WeaverLauncher extends WeaverLauncherBase { diff --git a/Clava-JS/src-code/Sandbox.ts b/Clava-JS/src-code/Sandbox.ts index 37d86caf5..50b423cf0 100644 --- a/Clava-JS/src-code/Sandbox.ts +++ b/Clava-JS/src-code/Sandbox.ts @@ -1,5 +1,5 @@ import { ChildProcess, spawn, spawnSync } from "child_process"; -import { addActiveChildProcess } from "lara-js/code/ChildProcessHandling.js"; +import { addActiveChildProcess } from "@specs-feup/lara/code/ChildProcessHandling.js"; export default class Sandbox { /** diff --git a/Clava-JS/src-code/WeaverConfiguration.ts b/Clava-JS/src-code/WeaverConfiguration.ts index ee9a85a50..e6729c428 100644 --- a/Clava-JS/src-code/WeaverConfiguration.ts +++ b/Clava-JS/src-code/WeaverConfiguration.ts @@ -1,15 +1,15 @@ -import WeaverConfiguration from "lara-js/code/WeaverConfiguration.js"; +import WeaverConfiguration from "@specs-feup/lara/code/WeaverConfiguration.js"; import path from "path"; import { fileURLToPath } from "url"; export const weaverConfig: WeaverConfiguration = { weaverName: "clava", weaverPrettyName: "Clava", - weaverFileName: "lara-js/code/Weaver.js", + weaverFileName: "@specs-feup/lara/code/Weaver.js", jarPath: path.join( path.dirname(path.dirname(fileURLToPath(import.meta.url))), "./java-binaries/" ), javaWeaverQualifiedName: "pt.up.fe.specs.clava.weaver.CxxWeaver", - importForSideEffects: ["clava-js/api/Joinpoints.js"], + importForSideEffects: ["@specs-feup/clava/api/Joinpoints.js"], }; diff --git a/Clava-JS/src-code/index.ts b/Clava-JS/src-code/index.ts index 4297292a1..c9782c286 100644 --- a/Clava-JS/src-code/index.ts +++ b/Clava-JS/src-code/index.ts @@ -1,5 +1,5 @@ #!/usr/bin/env node -import WeaverLauncher from "lara-js/code/WeaverLauncher.js"; +import WeaverLauncher from "@specs-feup/lara/code/WeaverLauncher.js"; import { weaverConfig } from "./WeaverConfiguration.js"; const weaverLauncher = new WeaverLauncher(weaverConfig); diff --git a/Clava-JS/typedoc.config.js b/Clava-JS/typedoc.config.js index 4f737e868..b000de544 100644 --- a/Clava-JS/typedoc.config.js +++ b/Clava-JS/typedoc.config.js @@ -1,7 +1,9 @@ import { fileURLToPath } from "url"; export default { - extends: [ fileURLToPath(import.meta.resolve("lara-js/typedoc.base.json")) ], + extends: [ + fileURLToPath(import.meta.resolve("@specs-feup/lara/typedoc.base.json")), + ], entryPoints: ["src-api/"], tsconfig: "src-api/tsconfig.json", -} +}; diff --git a/ClavaLaraApi/src-lara/clava/Joinpoints.js b/ClavaLaraApi/src-lara/clava/Joinpoints.js index cf79d69f9..ff692d367 100644 --- a/ClavaLaraApi/src-lara/clava/Joinpoints.js +++ b/ClavaLaraApi/src-lara/clava/Joinpoints.js @@ -8,7 +8,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/no-duplicate-type-constituents */ -import { LaraJoinPoint, registerJoinpointMapper, wrapJoinPoint, unwrapJoinPoint, } from "lara-js/api/LaraJoinPoint.js"; +import { LaraJoinPoint, registerJoinpointMapper, wrapJoinPoint, unwrapJoinPoint, } from "@specs-feup/lara/api/LaraJoinPoint.js"; export class Joinpoint extends LaraJoinPoint { /** * @internal diff --git a/ClavaLaraApi/src-lara/clava/clava/Clava.js b/ClavaLaraApi/src-lara/clava/clava/Clava.js index 09057805a..f53de7390 100644 --- a/ClavaLaraApi/src-lara/clava/clava/Clava.js +++ b/ClavaLaraApi/src-lara/clava/clava/Clava.js @@ -1,9 +1,9 @@ -import { wrapJoinPoint } from "lara-js/api/LaraJoinPoint.js"; -import Io from "lara-js/api/lara/Io.js"; -import JavaInterop from "lara-js/api/lara/JavaInterop.js"; -import Query from "lara-js/api/weaver/Query.js"; -import Weaver from "lara-js/api/weaver/Weaver.js"; -import WeaverOptions from "lara-js/api/weaver/WeaverOptions.js"; +import { wrapJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import JavaInterop from "@specs-feup/lara/api/lara/JavaInterop.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; +import Weaver from "@specs-feup/lara/api/weaver/Weaver.js"; +import WeaverOptions from "@specs-feup/lara/api/weaver/WeaverOptions.js"; import ClavaJavaTypes from "./ClavaJavaTypes.js"; import ClavaDataStore from "./util/ClavaDataStore.js"; export default class Clava { diff --git a/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js b/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js index 1cad9d8e3..6132ca1f0 100644 --- a/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js +++ b/ClavaLaraApi/src-lara/clava/clava/ClavaCode.js @@ -1,6 +1,6 @@ -import Io from "lara-js/api/lara/Io.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { FileJp, FunctionJp, If, Loop, StorageClass, Vardecl, } from "../Joinpoints.js"; import Clava from "./Clava.js"; /** diff --git a/ClavaLaraApi/src-lara/clava/clava/ClavaJavaTypes.js b/ClavaLaraApi/src-lara/clava/clava/ClavaJavaTypes.js index c93266ad0..884156d2f 100644 --- a/ClavaLaraApi/src-lara/clava/clava/ClavaJavaTypes.js +++ b/ClavaLaraApi/src-lara/clava/clava/ClavaJavaTypes.js @@ -1,4 +1,4 @@ -import JavaTypes from "lara-js/api/lara/util/JavaTypes.js"; +import JavaTypes from "@specs-feup/lara/api/lara/util/JavaTypes.js"; /** * Static variables with class names of Java classes used in the Clava API. * diff --git a/ClavaLaraApi/src-lara/clava/clava/ClavaJoinPoints.js b/ClavaLaraApi/src-lara/clava/clava/ClavaJoinPoints.js index 44e542cdd..630e5dada 100644 --- a/ClavaLaraApi/src-lara/clava/clava/ClavaJoinPoints.js +++ b/ClavaLaraApi/src-lara/clava/clava/ClavaJoinPoints.js @@ -1,5 +1,5 @@ -import { unwrapJoinPoint, wrapJoinPoint } from "lara-js/api/LaraJoinPoint.js"; -import { arrayFromArgs, flattenArgsArray, } from "lara-js/api/lara/core/LaraCore.js"; +import { unwrapJoinPoint, wrapJoinPoint, } from "@specs-feup/lara/api/LaraJoinPoint.js"; +import { arrayFromArgs, flattenArgsArray, } from "@specs-feup/lara/api/lara/core/LaraCore.js"; import * as Joinpoints from "../Joinpoints.js"; import Clava from "./Clava.js"; import ClavaJavaTypes from "./ClavaJavaTypes.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/Format.js b/ClavaLaraApi/src-lara/clava/clava/Format.js index 81cc4d17e..418948760 100644 --- a/ClavaLaraApi/src-lara/clava/clava/Format.js +++ b/ClavaLaraApi/src-lara/clava/clava/Format.js @@ -1,10 +1,16 @@ -import JavaTypes from "lara-js/api/lara/util/JavaTypes.js"; +import JavaTypes from "@specs-feup/lara/api/lara/util/JavaTypes.js"; export default class Format { static addPrefix(str, prefix) { - return str.split("\n").map(line => prefix + line).join("\n"); + return str + .split("\n") + .map((line) => prefix + line) + .join("\n"); } static addSuffix(str, suffix) { - return str.split("\n").map(line => line + suffix).join("\n"); + return str + .split("\n") + .map((line) => line + suffix) + .join("\n"); } static addPrefixAndSuffix(str, prefix, suffix) { return Format.addSuffix(Format.addPrefix(str, prefix), suffix); diff --git a/ClavaLaraApi/src-lara/clava/clava/MathExtra.js b/ClavaLaraApi/src-lara/clava/clava/MathExtra.js index fc80a02c5..0e1d2cf86 100644 --- a/ClavaLaraApi/src-lara/clava/clava/MathExtra.js +++ b/ClavaLaraApi/src-lara/clava/clava/MathExtra.js @@ -1,4 +1,4 @@ -import JavaTypes from "lara-js/api/lara/util/JavaTypes.js"; +import JavaTypes from "@specs-feup/lara/api/lara/util/JavaTypes.js"; import { Expression } from "../Joinpoints.js"; import ClavaJavaTypes from "./ClavaJavaTypes.js"; export default class MathExtra { diff --git a/ClavaLaraApi/src-lara/clava/clava/analysis/CheckBasedAnalyser.js b/ClavaLaraApi/src-lara/clava/clava/analysis/CheckBasedAnalyser.js index 813457486..34f28c86c 100644 --- a/ClavaLaraApi/src-lara/clava/clava/analysis/CheckBasedAnalyser.js +++ b/ClavaLaraApi/src-lara/clava/clava/analysis/CheckBasedAnalyser.js @@ -1,6 +1,6 @@ import Analyser from "./Analyser.js"; import ResultFormatManager from "./ResultFormatManager.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; /** * Analyser that scan code to detect unsafe functions */ diff --git a/ClavaLaraApi/src-lara/clava/clava/analysis/MessageGenerator.js b/ClavaLaraApi/src-lara/clava/clava/analysis/MessageGenerator.js index 82f848bd5..a9a070713 100644 --- a/ClavaLaraApi/src-lara/clava/clava/analysis/MessageGenerator.js +++ b/ClavaLaraApi/src-lara/clava/clava/analysis/MessageGenerator.js @@ -1,4 +1,4 @@ -import Io from "lara-js/api/lara/Io.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; import Clava from "../Clava.js"; // Class sorting resultLists and generating an analysis report export default class MessageGenerator { diff --git a/ClavaLaraApi/src-lara/clava/clava/analysis/analysers/BoundsAnalyser.js b/ClavaLaraApi/src-lara/clava/clava/analysis/analysers/BoundsAnalyser.js index d95e6968e..fdce70996 100644 --- a/ClavaLaraApi/src-lara/clava/clava/analysis/analysers/BoundsAnalyser.js +++ b/ClavaLaraApi/src-lara/clava/clava/analysis/analysers/BoundsAnalyser.js @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { ArrayAccess, ArrayType, FunctionJp, Vardecl, } from "../../../Joinpoints.js"; import Analyser from "../Analyser.js"; import ResultFormatManager from "../ResultFormatManager.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/analysis/analysers/DoubleFreeAnalyser.js b/ClavaLaraApi/src-lara/clava/clava/analysis/analysers/DoubleFreeAnalyser.js index 333b4fec3..66aeb378f 100644 --- a/ClavaLaraApi/src-lara/clava/clava/analysis/analysers/DoubleFreeAnalyser.js +++ b/ClavaLaraApi/src-lara/clava/clava/analysis/analysers/DoubleFreeAnalyser.js @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BinaryOp, Call, FunctionJp, Vardecl, } from "../../../Joinpoints.js"; import Analyser from "../Analyser.js"; import ResultFormatManager from "../ResultFormatManager.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/cmake/CMaker.js b/ClavaLaraApi/src-lara/clava/clava/cmake/CMaker.js index 03017fa7a..bddc3efee 100644 --- a/ClavaLaraApi/src-lara/clava/clava/cmake/CMaker.js +++ b/ClavaLaraApi/src-lara/clava/clava/cmake/CMaker.js @@ -1,11 +1,11 @@ -import Io from "lara-js/api/lara/Io.js"; -import Platforms from "lara-js/api/lara/Platforms.js"; -import { arrayFromArgs, debug, debugObject, } from "lara-js/api/lara/core/LaraCore.js"; -import ProcessExecutor from "lara-js/api/lara/util/ProcessExecutor.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Platforms from "@specs-feup/lara/api/lara/Platforms.js"; +import { arrayFromArgs, debug, debugObject, } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import ProcessExecutor from "@specs-feup/lara/api/lara/util/ProcessExecutor.js"; import Clava from "../Clava.js"; import CMakerSources from "./CMakerSources.js"; import CMakerUtils from "./CMakerUtils.js"; -import BenchmarkCompilationEngine from "lara-js/api/lara/benchmark/BenchmarkCompilationEngine.js"; +import BenchmarkCompilationEngine from "@specs-feup/lara/api/lara/benchmark/BenchmarkCompilationEngine.js"; /** * Builds CMake configurations. * diff --git a/ClavaLaraApi/src-lara/clava/clava/cmake/CMakerSources.js b/ClavaLaraApi/src-lara/clava/clava/cmake/CMakerSources.js index e9770e995..5f0357644 100644 --- a/ClavaLaraApi/src-lara/clava/clava/cmake/CMakerSources.js +++ b/ClavaLaraApi/src-lara/clava/clava/cmake/CMakerSources.js @@ -1,5 +1,5 @@ -import Io from "lara-js/api/lara/Io.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; import Clava from "../Clava.js"; import CMakerUtils from "./CMakerUtils.js"; /** @@ -142,6 +142,5 @@ export default class CMakerSources { } return prefix + values.join("\n" + space) + "\n)"; } - ; } //# sourceMappingURL=CMakerSources.js.map \ No newline at end of file diff --git a/ClavaLaraApi/src-lara/clava/clava/cmake/CMakerUtils.js b/ClavaLaraApi/src-lara/clava/clava/cmake/CMakerUtils.js index 43f64b646..f8e19fcc2 100644 --- a/ClavaLaraApi/src-lara/clava/clava/cmake/CMakerUtils.js +++ b/ClavaLaraApi/src-lara/clava/clava/cmake/CMakerUtils.js @@ -1,4 +1,4 @@ -import ToolUtils from "lara-js/api/lara/tool/ToolUtils.js"; +import ToolUtils from "@specs-feup/lara/api/lara/tool/ToolUtils.js"; import GenericCMakeCompiler from "./compilers/GenericCMakeCompiler.js"; export default class CMakerUtils extends ToolUtils { static compilerTable = { diff --git a/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js b/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js index 98ed54f4c..f72b94787 100644 --- a/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js +++ b/ClavaLaraApi/src-lara/clava/clava/code/Inliner.js @@ -1,5 +1,5 @@ -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BinaryOp, Call, Expression, GotoStmt, Joinpoint, LabelDecl, LabelStmt, ParenExpr, ParenType, PointerType, StorageClass, Vardecl, VariableArrayType, Varref, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class Inliner { diff --git a/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js b/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js index 0fd61d64f..99d54a5e8 100644 --- a/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js +++ b/ClavaLaraApi/src-lara/clava/clava/code/Outliner.js @@ -1,5 +1,5 @@ -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import Query from "lara-js/api/weaver/Query.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { AdjustedType, ArrayType, BuiltinType, Decl, DeclStmt, FileJp, FunctionJp, Param, PointerType, ReturnStmt, Statement, Vardecl, Varref, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class Outliner { diff --git a/ClavaLaraApi/src-lara/clava/clava/code/StatementDecomposer.js b/ClavaLaraApi/src-lara/clava/clava/code/StatementDecomposer.js index 0238ec9a3..d36581100 100644 --- a/ClavaLaraApi/src-lara/clava/clava/code/StatementDecomposer.js +++ b/ClavaLaraApi/src-lara/clava/clava/code/StatementDecomposer.js @@ -1,4 +1,4 @@ -import { debug } from "lara-js/api/lara/core/LaraCore.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; import { BinaryOp, Call, Case, DeclStmt, EmptyStmt, ExprStmt, LabelStmt, MemberCall, ReturnStmt, Scope, Statement, TernaryOp, UnaryOp, Vardecl, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import DecomposeResult from "./DecomposeResult.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js b/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js index 76824e4ad..4b7350af5 100644 --- a/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js +++ b/ClavaLaraApi/src-lara/clava/clava/gprofer/Gprofer.js @@ -1,11 +1,11 @@ -import Io from "lara-js/api/lara/Io.js"; -import Strings from "lara-js/api/lara/Strings.js"; -import JavaTypes from "lara-js/api/lara/util/JavaTypes.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; +import JavaTypes from "@specs-feup/lara/api/lara/util/JavaTypes.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { FunctionJp } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import CMaker from "../cmake/CMaker.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; function GproferGetCxxFunction(signature) { return Query.search(FunctionJp, { signature: signature, diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/ControlFlowGraph.js b/ClavaLaraApi/src-lara/clava/clava/graphs/ControlFlowGraph.js index 1b26f79a4..95e66e0e9 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/ControlFlowGraph.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/ControlFlowGraph.js @@ -1,4 +1,4 @@ -import Graph from "lara-js/api/lara/graphs/Graph.js"; +import Graph from "@specs-feup/lara/api/lara/graphs/Graph.js"; import CfgBuilder from "./cfg/CfgBuilder.js"; export default class ControlFlowGraph extends Graph { /** diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/StaticCallGraph.js b/ClavaLaraApi/src-lara/clava/clava/graphs/StaticCallGraph.js index 3a9251b4d..d4a168c20 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/StaticCallGraph.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/StaticCallGraph.js @@ -1,6 +1,6 @@ -import DotFormatter from "lara-js/api/lara/graphs/DotFormatter.js"; -import Graph from "lara-js/api/lara/graphs/Graph.js"; -import Graphs from "lara-js/api/lara/graphs/Graphs.js"; +import DotFormatter from "@specs-feup/lara/api/lara/graphs/DotFormatter.js"; +import Graph from "@specs-feup/lara/api/lara/graphs/Graph.js"; +import Graphs from "@specs-feup/lara/api/lara/graphs/Graphs.js"; import StaticCallGraphBuilder from "./scg/StaticCallGraphBuilder.js"; export default class StaticCallGraph extends Graph { static dotFormatterInstance = undefined; diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js b/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js index f8ed05f20..ebb89ebf6 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgBuilder.js @@ -1,6 +1,6 @@ -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import Graphs from "lara-js/api/lara/graphs/Graphs.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import Graphs from "@specs-feup/lara/api/lara/graphs/Graphs.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { FunctionJp, LabelStmt, Loop, Scope, Statement, } from "../../../Joinpoints.js"; import ClavaJoinPoints from "../../ClavaJoinPoints.js"; import CfgEdge from "./CfgEdge.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgEdge.js b/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgEdge.js index 785300004..06bd532db 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgEdge.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgEdge.js @@ -1,4 +1,4 @@ -import EdgeData from "lara-js/api/lara/graphs/EdgeData.js"; +import EdgeData from "@specs-feup/lara/api/lara/graphs/EdgeData.js"; import CfgEdgeType from "./CfgEdgeType.js"; /** * An edge of the CFG diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgNodeData.js b/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgNodeData.js index eb27407af..ca9632c39 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgNodeData.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/cfg/CfgNodeData.js @@ -1,4 +1,4 @@ -import NodeData from "lara-js/api/lara/graphs/NodeData.js"; +import NodeData from "@specs-feup/lara/api/lara/graphs/NodeData.js"; /** * The data of a CFG node. */ diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgEdgeData.js b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgEdgeData.js index 33b3652bf..038001243 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgEdgeData.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgEdgeData.js @@ -1,4 +1,4 @@ -import EdgeData from "lara-js/api/lara/graphs/EdgeData.js"; +import EdgeData from "@specs-feup/lara/api/lara/graphs/EdgeData.js"; export default class ScgEdgeData extends EdgeData { /** * The calls that contributed to this edge diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js index ad679f648..1fa1f996c 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/ScgNodeData.js @@ -1,5 +1,5 @@ -import NodeData from "lara-js/api/lara/graphs/NodeData.js"; -import Query from "lara-js/api/weaver/Query.js"; +import NodeData from "@specs-feup/lara/api/lara/graphs/NodeData.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call } from "../../../Joinpoints.js"; export default class ScgNodeData extends NodeData { /** diff --git a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js index 5e2a34bbb..8e5cadea0 100644 --- a/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js +++ b/ClavaLaraApi/src-lara/clava/clava/graphs/scg/StaticCallGraphBuilder.js @@ -1,5 +1,5 @@ -import Graphs from "lara-js/api/lara/graphs/Graphs.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Graphs from "@specs-feup/lara/api/lara/graphs/Graphs.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FunctionJp } from "../../../Joinpoints.js"; import ScgEdgeData from "./ScgEdgeData.js"; import ScgNodeData from "./ScgNodeData.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/hls/HLSAnalysis.js b/ClavaLaraApi/src-lara/clava/clava/hls/HLSAnalysis.js index 4b992a5d4..157ec4ba5 100644 --- a/ClavaLaraApi/src-lara/clava/clava/hls/HLSAnalysis.js +++ b/ClavaLaraApi/src-lara/clava/clava/hls/HLSAnalysis.js @@ -1,4 +1,4 @@ -import { unwrapJoinPoint } from "lara-js/api/LaraJoinPoint.js"; +import { unwrapJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; import ClavaJavaTypes from "../ClavaJavaTypes.js"; export default class HLSAnalysis { /** diff --git a/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js b/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js index 0f5a58f89..8b144068f 100644 --- a/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js +++ b/ClavaLaraApi/src-lara/clava/clava/hls/MathAnalysis.js @@ -1,5 +1,5 @@ -import Io from "lara-js/api/lara/Io.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import MathHInfo from "./MathHInfo.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js b/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js index e81585d79..8cdf4795a 100644 --- a/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js +++ b/ClavaLaraApi/src-lara/clava/clava/hls/MathHInfo.js @@ -1,5 +1,5 @@ -import Io from "lara-js/api/lara/Io.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FileJp, FunctionJp } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js b/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js index 309c4b545..ba9d86f66 100644 --- a/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js +++ b/ClavaLaraApi/src-lara/clava/clava/hls/TraceInstrumentation.js @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { ArrayAccess, BinaryOp, Expression, FunctionJp, Loop, Param, Scope, Statement, UnaryOp, Vardecl, Varref, } from "../../Joinpoints.js"; import Logger from "../../lara/code/Logger.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js b/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js index 354eb4ac9..597e64d49 100644 --- a/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js +++ b/ClavaLaraApi/src-lara/clava/clava/liveness/LivenessUtils.js @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BinaryOp, Vardecl, Varref, } from "../../Joinpoints.js"; export default class LivenessUtils { /** diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js index 8da32ce2e..0df749c01 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiAnalysis.js @@ -1,6 +1,6 @@ -import { JSONtoFile } from "lara-js/api/core/output.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { JSONtoFile } from "@specs-feup/lara/api/core/output.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call } from "../../Joinpoints.js"; import MemoiTarget from "./MemoiTarget.js"; import MemoiUtils from "./MemoiUtils.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js index d5a8ebed9..3ade6cfa5 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiGen.js @@ -1,8 +1,8 @@ -import Io from "lara-js/api/lara/Io.js"; -import { arrayFromArgs } from "lara-js/api/lara/core/LaraCore.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import { TimerUnit } from "lara-js/api/lara/util/TimeUnits.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import { arrayFromArgs } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import { TimerUnit } from "@specs-feup/lara/api/lara/util/TimeUnits.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FileJp, FunctionJp } from "../../Joinpoints.js"; import Timer from "../../lara/code/Timer.js"; import ClavaJavaTypes from "../ClavaJavaTypes.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js index 2a7a79126..a634bd0d0 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiProf.js @@ -1,6 +1,6 @@ -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; -import Query from "lara-js/api/weaver/Query.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import PrintOnce from "@specs-feup/lara/api/lara/util/PrintOnce.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FileJp, FunctionJp, Scope } from "../../Joinpoints.js"; import Clava from "../Clava.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js index 559060e85..754990451 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/MemoiTarget.js @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FunctionJp } from "../../Joinpoints.js"; import MemoiUtils from "./MemoiUtils.js"; export default class MemoiTarget { diff --git a/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js b/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js index c55715489..1d05ca8e9 100644 --- a/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js +++ b/ClavaLaraApi/src-lara/clava/clava/memoi/_MemoiGenHelper.js @@ -1,6 +1,6 @@ -import { debug } from "lara-js/api/lara/core/LaraCore.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import Query from "lara-js/api/weaver/Query.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Call, FileJp, FunctionJp, Statement } from "../../Joinpoints.js"; import ClavaJavaTypes from "../ClavaJavaTypes.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacer.js b/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacer.js index f1fc17d74..73189d865 100644 --- a/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacer.js +++ b/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacer.js @@ -1,5 +1,5 @@ -import Io from "lara-js/api/lara/Io.js"; -import Strings from "lara-js/api/lara/Strings.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; import { BuiltinType, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class KernelReplacer { diff --git a/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js b/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js index c5468b0c7..df426374d 100644 --- a/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js +++ b/ClavaLaraApi/src-lara/clava/clava/opencl/KernelReplacerAuto.js @@ -1,6 +1,6 @@ -import Io from "lara-js/api/lara/Io.js"; -import Strings from "lara-js/api/lara/Strings.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { Pragma } from "../../Joinpoints.js"; import KernelReplacer from "./KernelReplacer.js"; // This aspect can be included in a library, imported and diff --git a/ClavaLaraApi/src-lara/clava/clava/opencl/OpenCLCall.js b/ClavaLaraApi/src-lara/clava/clava/opencl/OpenCLCall.js index 86154193b..1128bbd16 100644 --- a/ClavaLaraApi/src-lara/clava/clava/opencl/OpenCLCall.js +++ b/ClavaLaraApi/src-lara/clava/clava/opencl/OpenCLCall.js @@ -1,6 +1,6 @@ -import Io from "lara-js/api/lara/Io.js"; -import Platforms from "lara-js/api/lara/Platforms.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Platforms from "@specs-feup/lara/api/lara/Platforms.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; import OpenCLCallVariables from "./OpenCLCallVariables.js"; export default class OpenCLCall { $kernel = undefined; diff --git a/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js b/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js index 960767e15..e96e8eee3 100644 --- a/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js +++ b/ClavaLaraApi/src-lara/clava/clava/opt/Inlining.js @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { FunctionJp } from "../../Joinpoints.js"; import Inliner from "../code/Inliner.js"; import NormalizeToSubset from "./NormalizeToSubset.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js b/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js index 514165d96..9782683ee 100644 --- a/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js +++ b/ClavaLaraApi/src-lara/clava/clava/opt/NormalizeToSubset.js @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BinaryOp } from "../../Joinpoints.js"; import SimplifyAssignment from "../code/SimplifyAssignment.js"; import StatementDecomposer from "../code/StatementDecomposer.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/parser/BatchParser.js b/ClavaLaraApi/src-lara/clava/clava/parser/BatchParser.js index 1d38e6952..f57d7caa2 100644 --- a/ClavaLaraApi/src-lara/clava/clava/parser/BatchParser.js +++ b/ClavaLaraApi/src-lara/clava/clava/parser/BatchParser.js @@ -1,10 +1,10 @@ -import Io from "lara-js/api/lara/Io.js"; -import Check from "lara-js/api/lara/Check.js"; -import System from "lara-js/api/lara/System.js"; -import Strings from "lara-js/api/lara/Strings.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import Check from "@specs-feup/lara/api/lara/Check.js"; +import System from "@specs-feup/lara/api/lara/System.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; import Clava from "../Clava.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; import { FileJp } from "../../Joinpoints.js"; /** * Parses C/C++ files. diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/DecomposeDeclStmt.js b/ClavaLaraApi/src-lara/clava/clava/pass/DecomposeDeclStmt.js index b46008828..6a084a124 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/DecomposeDeclStmt.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/DecomposeDeclStmt.js @@ -1,5 +1,5 @@ -import SimplePass from "lara-js/api/lara/pass/SimplePass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; +import SimplePass from "@specs-feup/lara/api/lara/pass/SimplePass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; import { DeclStmt } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; /** diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/DecomposeVarDeclarations.js b/ClavaLaraApi/src-lara/clava/clava/pass/DecomposeVarDeclarations.js index 094821462..b31bc7710 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/DecomposeVarDeclarations.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/DecomposeVarDeclarations.js @@ -1,5 +1,5 @@ -import SimplePass from "lara-js/api/lara/pass/SimplePass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; +import SimplePass from "@specs-feup/lara/api/lara/pass/SimplePass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; import { ArrayType, UndefinedType, Vardecl, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; /** diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/LocalStaticToGlobal.js b/ClavaLaraApi/src-lara/clava/clava/pass/LocalStaticToGlobal.js index 85d018e0d..66f777efa 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/LocalStaticToGlobal.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/LocalStaticToGlobal.js @@ -1,6 +1,6 @@ -import PassTransformationError from "lara-js/api/lara/pass/PassTransformationError.js"; -import SimplePass from "lara-js/api/lara/pass/SimplePass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; +import PassTransformationError from "@specs-feup/lara/api/lara/pass/PassTransformationError.js"; +import SimplePass from "@specs-feup/lara/api/lara/pass/SimplePass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; import { DeclStmt, StorageClass, Vardecl, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; /** diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyLoops.js b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyLoops.js index 3c324b75d..dca872b41 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyLoops.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyLoops.js @@ -1,5 +1,5 @@ -import Pass from "lara-js/api/lara/pass/Pass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; import { DeclStmt, Loop } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import DoToWhileStmt from "../code/DoToWhileStmt.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js index 74e6e7f8f..d72d8202e 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifyReturnStmts.js @@ -1,6 +1,6 @@ -import Pass from "lara-js/api/lara/pass/Pass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { ReturnStmt } from "../../Joinpoints.js"; // TODO: Refactor to use the SimplePass pattern export default class SimplifyReturnStmts extends Pass { diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js index 928c6c5c6..73c4064da 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/SimplifySelectionStmts.js @@ -1,6 +1,6 @@ -import Pass from "lara-js/api/lara/pass/Pass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { If } from "../../Joinpoints.js"; // TODO: Refactor to use the SimplePass pattern export default class SimplifySelectionStmts extends Pass { diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js b/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js index a13c51cbc..1d25f4fa6 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/SingleReturnFunction.js @@ -1,6 +1,6 @@ -import Pass from "lara-js/api/lara/pass/Pass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; -import Query from "lara-js/api/weaver/Query.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BuiltinType, FunctionJp, ReturnStmt, } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; import DecomposeVarDeclarations from "./DecomposeVarDeclarations.js"; diff --git a/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js b/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js index 99b67e548..b5447b642 100644 --- a/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js +++ b/ClavaLaraApi/src-lara/clava/clava/pass/TransformSwitchToIf.js @@ -1,7 +1,7 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; -import SimplePass from "lara-js/api/lara/pass/SimplePass.js"; -import PassResult from "lara-js/api/lara/pass/results/PassResult.js"; +import SimplePass from "@specs-feup/lara/api/lara/pass/SimplePass.js"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; import { Break, GotoStmt, Switch, } from "../../Joinpoints.js"; /** * Transforms a switch statement into an if statement. diff --git a/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js b/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js index 6ac353174..816a46892 100644 --- a/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js +++ b/ClavaLaraApi/src-lara/clava/clava/stats/OpsCounter.js @@ -1,7 +1,7 @@ import ClavaJoinPoints from "../ClavaJoinPoints.js"; import GlobalVariable from "../code/GlobalVariable.js"; -import Query from "lara-js/api/weaver/Query.js"; -import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; +import PrintOnce from "@specs-feup/lara/api/lara/util/PrintOnce.js"; import Logger from "../../lara/code/Logger.js"; import { BuiltinType, Call, FunctionJp, Op, } from "../../Joinpoints.js"; /** diff --git a/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js b/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js index 11cf076cd..89952549a 100644 --- a/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js +++ b/ClavaLaraApi/src-lara/clava/clava/stats/StaticOpsCounter.js @@ -1,5 +1,5 @@ -import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; -import Query from "lara-js/api/weaver/Query.js"; +import PrintOnce from "@specs-feup/lara/api/lara/util/PrintOnce.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { BinaryOp, BuiltinType, Call, FunctionJp, Loop, Op, Param, Varref, } from "../../Joinpoints.js"; import OpsBlock from "./OpsBlock.js"; export default class StaticOpsCounter { diff --git a/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js b/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js index b86353fa2..0feeb7301 100644 --- a/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js +++ b/ClavaLaraApi/src-lara/clava/clava/util/ClavaDataStore.js @@ -1,8 +1,8 @@ -import WeaverDataStore from "lara-js/api/weaver/util/WeaverDataStore.js"; +import WeaverDataStore from "@specs-feup/lara/api/weaver/util/WeaverDataStore.js"; import ClavaJavaTypes from "../ClavaJavaTypes.js"; -import JavaTypes from "lara-js/api/lara/util/JavaTypes.js"; -import Io from "lara-js/api/lara/Io.js"; -import { arrayFromArgs } from "lara-js/api/lara/core/LaraCore.js"; +import JavaTypes from "@specs-feup/lara/api/lara/util/JavaTypes.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import { arrayFromArgs } from "@specs-feup/lara/api/lara/core/LaraCore.js"; /** * DataStore used in Clava. * diff --git a/ClavaLaraApi/src-lara/clava/clava/util/CodeInserter.js b/ClavaLaraApi/src-lara/clava/clava/util/CodeInserter.js index 4bd9a394e..864553213 100644 --- a/ClavaLaraApi/src-lara/clava/clava/util/CodeInserter.js +++ b/ClavaLaraApi/src-lara/clava/clava/util/CodeInserter.js @@ -1,5 +1,5 @@ -import Io from "lara-js/api/lara/Io.js"; -import LineInserter from "lara-js/api/lara/util/LineInserter.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import LineInserter from "@specs-feup/lara/api/lara/util/LineInserter.js"; import Clava from "../Clava.js"; /** * Writes the original code of the application, with the possibility of inserting new lines of code. diff --git a/ClavaLaraApi/src-lara/clava/clava/util/FileIterator.js b/ClavaLaraApi/src-lara/clava/clava/util/FileIterator.js index df0ec1618..c1fea73d6 100644 --- a/ClavaLaraApi/src-lara/clava/clava/util/FileIterator.js +++ b/ClavaLaraApi/src-lara/clava/clava/util/FileIterator.js @@ -1,5 +1,5 @@ -import Io from "lara-js/api/lara/Io.js"; -import { debug } from "lara-js/api/lara/core/LaraCore.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import { debug } from "@specs-feup/lara/api/lara/core/LaraCore.js"; import Clava from "../Clava.js"; /** * Given a folder, collects sources in that folder, parses and returns one each time next() is called. diff --git a/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHls.js b/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHls.js index 59c16a133..4de2a4566 100644 --- a/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHls.js +++ b/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHls.js @@ -1,9 +1,9 @@ import Clava from "../Clava.js"; -import ProcessExecutor from "lara-js/api/lara/util/ProcessExecutor.js"; +import ProcessExecutor from "@specs-feup/lara/api/lara/util/ProcessExecutor.js"; import VitisHlsReportParser from "./VitisHlsReportParser.js"; -import Tool from "lara-js/api/lara/tool/Tool.js"; -import ToolUtils from "lara-js/api/lara/tool/ToolUtils.js"; -import Io from "lara-js/api/lara/Io.js"; +import Tool from "@specs-feup/lara/api/lara/tool/Tool.js"; +import ToolUtils from "@specs-feup/lara/api/lara/tool/ToolUtils.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; export default class VitisHls extends Tool { topFunction; platform; @@ -59,7 +59,10 @@ export default class VitisHls extends Tool { Io.deleteFolderContents(this.vitisDir); } getSynthesisReportPath() { - return this.vitisDir + "/" + this.vitisProjName + "/solution1/syn/report/csynth.xml"; + return (this.vitisDir + + "/" + + this.vitisProjName + + "/solution1/syn/report/csynth.xml"); } executeVitis(verbose) { console.log(`${this.getTimestamp()} Executing Vitis HLS`); diff --git a/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsReportParser.js b/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsReportParser.js index 5468826a6..b7a120413 100644 --- a/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsReportParser.js +++ b/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsReportParser.js @@ -1,4 +1,4 @@ -import Io from "lara-js/api/lara/Io.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; export default class VitisHlsReportParser { reportPath; constructor(reportPath) { diff --git a/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js b/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js index 0d579be22..3f06d40ff 100644 --- a/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js +++ b/ClavaLaraApi/src-lara/clava/clava/vitishls/VitisHlsUtils.js @@ -1,4 +1,4 @@ -import Query from "lara-js/api/weaver/Query.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; import { WrapperStmt } from "../../Joinpoints.js"; import ClavaJoinPoints from "../ClavaJoinPoints.js"; export default class VitisHlsUtils { diff --git a/ClavaLaraApi/src-lara/clava/core.js b/ClavaLaraApi/src-lara/clava/core.js index 342742d4f..a4fdf24c2 100644 --- a/ClavaLaraApi/src-lara/clava/core.js +++ b/ClavaLaraApi/src-lara/clava/core.js @@ -4,7 +4,7 @@ * Do not use this file in new (clava-js) projects. * Remove this file if Clava Classic has died out. */ -const prefix = "clava-js/api/"; +const prefix = "@specs-feup/clava/api/"; const coreImports = []; const sideEffectsOnlyImports = ["Joinpoints.js"]; for (const sideEffectsOnlyImport of sideEffectsOnlyImports) { diff --git a/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js b/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js index ceaf0d301..0ce8754cd 100644 --- a/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js +++ b/ClavaLaraApi/src-lara/clava/lara/benchmark/ClavaBenchmarkInstance.js @@ -1,7 +1,7 @@ -import Io from "lara-js/api/lara/Io.js"; -import BenchmarkInstance from "lara-js/api/lara/benchmark/BenchmarkInstance.js"; -import Query from "lara-js/api/weaver/Query.js"; -import Weaver from "lara-js/api/weaver/Weaver.js"; +import Io from "@specs-feup/lara/api/lara/Io.js"; +import BenchmarkInstance from "@specs-feup/lara/api/lara/benchmark/BenchmarkInstance.js"; +import Query from "@specs-feup/lara/api/weaver/Query.js"; +import Weaver from "@specs-feup/lara/api/weaver/Weaver.js"; import Clava from "../..//clava/Clava.js"; import { Pragma } from "../../Joinpoints.js"; import CMaker from "../../clava/cmake/CMaker.js"; diff --git a/ClavaLaraApi/src-lara/clava/lara/code/Energy.js b/ClavaLaraApi/src-lara/clava/lara/code/Energy.js index d9438c70a..12476195b 100644 --- a/ClavaLaraApi/src-lara/clava/lara/code/Energy.js +++ b/ClavaLaraApi/src-lara/clava/lara/code/Energy.js @@ -1,8 +1,8 @@ -import EnergyBase from "lara-js/api/lara/code/EnergyBase.js"; +import EnergyBase from "@specs-feup/lara/api/lara/code/EnergyBase.js"; import Clava from "../../clava/Clava.js"; import Logger from "./Logger.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import PrintOnce from "@specs-feup/lara/api/lara/util/PrintOnce.js"; export default class Energy extends EnergyBase { /** * Current SpecsRapl library measures uJ. @@ -26,7 +26,8 @@ export default class Energy extends EnergyBase { // Add include const $file = $start.getAncestor("file"); if ($file === undefined) { - console.log("Could not find the corresponding file of the given joinpoint: " + $start.joinPointType); + console.log("Could not find the corresponding file of the given joinpoint: " + + $start.joinPointType); return; } $file.addInclude("rapl.h", false); diff --git a/ClavaLaraApi/src-lara/clava/lara/code/Logger.js b/ClavaLaraApi/src-lara/clava/lara/code/Logger.js index 04142e852..abf68fdfe 100644 --- a/ClavaLaraApi/src-lara/clava/lara/code/Logger.js +++ b/ClavaLaraApi/src-lara/clava/lara/code/Logger.js @@ -1,6 +1,6 @@ -import LoggerBase from "lara-js/api/lara/code/LoggerBase.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import PrintOnce from "lara-js/api/lara/util/PrintOnce.js"; +import LoggerBase from "@specs-feup/lara/api/lara/code/LoggerBase.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import PrintOnce from "@specs-feup/lara/api/lara/util/PrintOnce.js"; import Clava from "../../clava/Clava.js"; import { FunctionJp, Scope, } from "../../Joinpoints.js"; export default class Logger extends LoggerBase { diff --git a/ClavaLaraApi/src-lara/clava/lara/code/Timer.js b/ClavaLaraApi/src-lara/clava/lara/code/Timer.js index 42ac34938..234a5f237 100644 --- a/ClavaLaraApi/src-lara/clava/lara/code/Timer.js +++ b/ClavaLaraApi/src-lara/clava/lara/code/Timer.js @@ -1,7 +1,7 @@ -import Platforms from "lara-js/api/lara/Platforms.js"; -import TimerBase from "lara-js/api/lara/code/TimerBase.js"; -import IdGenerator from "lara-js/api/lara/util/IdGenerator.js"; -import { TimerUnit } from "lara-js/api/lara/util/TimeUnits.js"; +import Platforms from "@specs-feup/lara/api/lara/Platforms.js"; +import TimerBase from "@specs-feup/lara/api/lara/code/TimerBase.js"; +import IdGenerator from "@specs-feup/lara/api/lara/util/IdGenerator.js"; +import { TimerUnit } from "@specs-feup/lara/api/lara/util/TimeUnits.js"; import { Scope } from "../../Joinpoints.js"; import Clava from "../../clava/Clava.js"; import ClavaJoinPoints from "../../clava/ClavaJoinPoints.js"; @@ -50,11 +50,10 @@ export default class Timer extends TimerBase { // Declare variable for time interval, which uses calculation as initialization const timeIntervalVar = IdGenerator.next("clava_timing_duration_"); // Create literal node with calculation of time interval - const $timingResult = ClavaJoinPoints.exprLiteral("long long " + this._timer_cpp_calc_interval(startVar, endVar, cppUnit, timeIntervalVar)); + const $timingResult = ClavaJoinPoints.exprLiteral("long long " + + this._timer_cpp_calc_interval(startVar, endVar, cppUnit, timeIntervalVar)); // Build message - logger - .append(prefix) - .appendLong(timeIntervalVar); + logger.append(prefix).appendLong(timeIntervalVar); if (this.printUnit) { logger.append(this.timeUnits.getUnitsString()); } diff --git a/ClavaLaraApi/src-lara/clava/lara/metrics/EnergyMetric.js b/ClavaLaraApi/src-lara/clava/lara/metrics/EnergyMetric.js index dce986678..218425924 100644 --- a/ClavaLaraApi/src-lara/clava/lara/metrics/EnergyMetric.js +++ b/ClavaLaraApi/src-lara/clava/lara/metrics/EnergyMetric.js @@ -1,6 +1,6 @@ -import Strings from "lara-js/api/lara/Strings.js"; -import Metric from "lara-js/api/lara/metrics/Metric.js"; -import MetricResult from "lara-js/api/lara/metrics/MetricResult.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; +import Metric from "@specs-feup/lara/api/lara/metrics/Metric.js"; +import MetricResult from "@specs-feup/lara/api/lara/metrics/MetricResult.js"; import Energy from "../code/Energy.js"; /** * Measures energy consumed during an application. diff --git a/ClavaLaraApi/src-lara/clava/lara/metrics/ExecutionTimeMetric.js b/ClavaLaraApi/src-lara/clava/lara/metrics/ExecutionTimeMetric.js index a6b8f505b..9aa95cab3 100644 --- a/ClavaLaraApi/src-lara/clava/lara/metrics/ExecutionTimeMetric.js +++ b/ClavaLaraApi/src-lara/clava/lara/metrics/ExecutionTimeMetric.js @@ -1,7 +1,7 @@ -import Strings from "lara-js/api/lara/Strings.js"; -import Metric from "lara-js/api/lara/metrics/Metric.js"; -import MetricResult from "lara-js/api/lara/metrics/MetricResult.js"; -import { TimerUnit } from "lara-js/api/lara/util/TimeUnits.js"; +import Strings from "@specs-feup/lara/api/lara/Strings.js"; +import Metric from "@specs-feup/lara/api/lara/metrics/Metric.js"; +import MetricResult from "@specs-feup/lara/api/lara/metrics/MetricResult.js"; +import { TimerUnit } from "@specs-feup/lara/api/lara/util/TimeUnits.js"; import Timer from "../code/Timer.js"; /** * Measures execution time of an application. diff --git a/ClavaLaraApi/src-lara/clava/weaver/WeaverLauncher.js b/ClavaLaraApi/src-lara/clava/weaver/WeaverLauncher.js index 933cd225e..82b6e4710 100644 --- a/ClavaLaraApi/src-lara/clava/weaver/WeaverLauncher.js +++ b/ClavaLaraApi/src-lara/clava/weaver/WeaverLauncher.js @@ -1,4 +1,4 @@ -import WeaverLauncherBase from "lara-js/api/weaver/WeaverLauncherBase.js"; +import WeaverLauncherBase from "@specs-feup/lara/api/weaver/WeaverLauncherBase.js"; import Clava from "../clava/Clava.js"; export default class WeaverLauncher extends WeaverLauncherBase { execute(args) { diff --git a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.java b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.java index f1b334584..1fc14ff66 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.java @@ -171,7 +171,7 @@ public static List getDefaultFlags() { return DEFAULT_DUMPER_FLAGS; } - private static final String CLAVA_API_NAME = "clava-js"; + private static final String CLAVA_API_NAME = "@specs-feup/clava"; private static final List CLAVA_LARA_API = new ArrayList<>(); static { From dc7c00749477a61d5377187cc4004a90890c7da0 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Thu, 26 Sep 2024 19:31:10 +0100 Subject: [PATCH 10/20] Disable host dependant JS tests --- Clava-JS/src-code/ClangPlugin/ClangPlugin.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Clava-JS/src-code/ClangPlugin/ClangPlugin.test.ts b/Clava-JS/src-code/ClangPlugin/ClangPlugin.test.ts index 764770dc4..48ec45472 100644 --- a/Clava-JS/src-code/ClangPlugin/ClangPlugin.test.ts +++ b/Clava-JS/src-code/ClangPlugin/ClangPlugin.test.ts @@ -23,6 +23,7 @@ describe("ClangPlugin", () => { }); }); + /* describe("getClangVersionNumberFromExecutable", () => { it("should return the clang version number when given a valid clang executable", async () => { const clangExecutable = "clang++-14"; @@ -88,4 +89,5 @@ describe("ClangPlugin", () => { jest.restoreAllMocks(); }); }); + */ }); From 4ebe406e9dd10624afa258a4643a6dd787a7c7d7 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Thu, 26 Sep 2024 21:34:55 +0100 Subject: [PATCH 11/20] Run gradle tests in nightly workflow --- .github/workflows/ant-lara-2.0-legacy.yml | 69 ----------------------- .github/workflows/main.yml | 68 ---------------------- .github/workflows/nightly.yml | 17 ++++-- .github/workflows/staging.yml | 68 ---------------------- 4 files changed, 13 insertions(+), 209 deletions(-) delete mode 100644 .github/workflows/ant-lara-2.0-legacy.yml delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/staging.yml diff --git a/.github/workflows/ant-lara-2.0-legacy.yml b/.github/workflows/ant-lara-2.0-legacy.yml deleted file mode 100644 index 8eac8986c..000000000 --- a/.github/workflows/ant-lara-2.0-legacy.yml +++ /dev/null @@ -1,69 +0,0 @@ -# This workflow will build a Java project with Ant -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant - -name: Java CI - Lara 2.0 Legacy - -on: - push: - branches: [ lara-2.0-legacy ] - pull_request: - branches: [ lara-2.0-legacy ] - - # Daily at midnight - schedule: - - cron: '0 0 * * *' - -permissions: - checks: write - -jobs: - build: - - runs-on: ubuntu-latest - - #defaults: - # run: - # working-directory: ./.. - - steps: - - uses: actions/checkout@v4 - # Because of scheduled runs, by default run on default branch - with: - ref: lara-2.0-legacy - - - name: Cache ivy dependencies - id: cache-nivy - uses: actions/cache@v3 - env: - cache-name: cache-ivy-dependencies - with: - # ivy dependencies cache files are stored in `~/.ivy2` on Linux/macOS - path: ~/.ivy2 - key: ${{ runner.os }}-build-${{ env.cache-name }} - - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - - name: Generate build.xml - run: | - wget -q -N http://specs.fe.up.pt/tools/eclipse-build.jar - java -jar eclipse-build.jar https://github.com/specs-feup/specs-java-libs https://github.com/specs-feup/lara-framework?commit=lara-2.0-legacy ./ - wget -N -O /usr/share/ant/lib/ivy-2.5.0.jar specs.fe.up.pt/libs/ivy-2.5.0.jar - - name: Build with Ant - run: | - ant -noinput -buildfile build.xml - - - name: List directory - run: | - echo "Current folder" - ls - - name: Publish Test Report - uses: mikepenz/action-junit-report@v3.6.1 - if: always() # always run even if the previous step fails - with: - report_paths: '**/reports-eclipse-build/TEST-*.xml' - summary: true - #exclude_sources: '' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 2027fe3a2..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,68 +0,0 @@ -# This workflow will build a Java project with Ant -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant - -name: Java CI - Main - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - - # Daily at midnight - schedule: - - cron: '0 0 * * *' - -permissions: - checks: write - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - # Because of scheduled runs, by default run on default branch - with: - ref: master - path: workspace/clava - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - - name: Check out specs-java-libs repo - uses: actions/checkout@v4 - with: - repository: specs-feup/specs-java-libs - path: workspace/specs-java-libs - - - name: Check out lara-framework repo - uses: actions/checkout@v4 - with: - repository: specs-feup/lara-framework - path: workspace/lara-framework - ref: master - - # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. - # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md - - name: Setup Gradle - uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 - - # Setting up gradle multi-project would be helpful - - name: Build and test ClangAstParser - working-directory: workspace/clava/ClangAstParser - run: gradle build test - - name: Build and test ClavaWeaver - working-directory: workspace/clava/ClavaWeaver - run: gradle build test - - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: always() - with: - report_paths: 'workspace/clava/**/build/test-results/test/TEST-*.xml' - summary: true diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c694419f7..58d41bae8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,7 +1,9 @@ -# This workflow will build a Java project with Ant -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant +# This workflow will build a the whole project every day at midnight +# It will build the Java part and the JS part +# Every push to a branch will trigger the build +# Every pull request will trigger the build -name: Java +name: nightly on: push: @@ -59,7 +61,7 @@ jobs: repository: specs-feup/lara-framework path: lara-framework ref: ${{ steps.Branch-lara-framework.outputs.stdout == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }} - + - name: Checkout specs-java-libs uses: actions/checkout@v4 with: @@ -72,6 +74,13 @@ jobs: cd clava/ClavaWeaver gradle installDist + - name: Test with Gradle + run: | + cd clava/ClavaWeaver + gradle test + env: + GITHUB_DEPENDENCY_GRAPH_ENABLED: false + - name: Upload ClavaWeaver artifacts uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml deleted file mode 100644 index 08939c2fa..000000000 --- a/.github/workflows/staging.yml +++ /dev/null @@ -1,68 +0,0 @@ -# This workflow will build a Java project with Ant -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant - -name: Java CI - Staging - -on: - push: - branches: [ staging ] - pull_request: - branches: [ staging ] - - # Daily at midnight - schedule: - - cron: '0 0 * * *' - -permissions: - checks: write - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - # Because of scheduled runs, by default run on default branch - with: - ref: staging - path: workspace/clava - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - - name: Check out specs-java-libs repo - uses: actions/checkout@v4 - with: - repository: specs-feup/specs-java-libs - path: workspace/specs-java-libs - - - name: Check out lara-framework repo - uses: actions/checkout@v4 - with: - repository: specs-feup/lara-framework - path: workspace/lara-framework - ref: staging - - # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. - # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md - - name: Setup Gradle - uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 - - # Setting up gradle multi-project would be helpful - - name: Build and test ClangAstParser - working-directory: workspace/clava/ClangAstParser - run: gradle build test - - name: Build and test ClavaWeaver - working-directory: workspace/clava/ClavaWeaver - run: gradle build test - - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: always() - with: - report_paths: 'workspace/clava/**/build/test-results/test/TEST-*.xml' - summary: true From 4dc7de13fc4ef8257d9faf9e0fd83dacf81e42c0 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Fri, 27 Sep 2024 18:30:45 +0100 Subject: [PATCH 12/20] Make variables available in all jobs --- .github/workflows/nightly.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 58d41bae8..977b28914 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -19,16 +19,14 @@ permissions: env: JAVA_VERSION: 17 + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + DEFAULT_BRANCH: ${{ github.base_ref || 'master' }} jobs: build-java: name: Build Java runs-on: ubuntu-latest - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - DEFAULT_BRANCH: ${{ github.base_ref || 'master' }} - steps: - name: Setup Java uses: actions/setup-java@v4 From 678925a6c9a22503be439a113a0746d8d21ee5b2 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Fri, 27 Sep 2024 18:31:24 +0100 Subject: [PATCH 13/20] Modify check method --- .github/workflows/nightly.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 977b28914..9193b2673 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -58,14 +58,14 @@ jobs: with: repository: specs-feup/lara-framework path: lara-framework - ref: ${{ steps.Branch-lara-framework.outputs.stdout == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }} + ref: ${{ startsWith(steps.Branch-lara-framework.outputs.stdout, '1') && env.BRANCH_NAME || env.DEFAULT_BRANCH }} - name: Checkout specs-java-libs uses: actions/checkout@v4 with: repository: specs-feup/specs-java-libs path: specs-java-libs - ref: ${{ steps.Branch-specs-java-libs.outputs.stdout == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }} + ref: ${{ startsWith(steps.Branch-specs-java-libs.outputs.stdout, '1') && env.BRANCH_NAME || env.DEFAULT_BRANCH }} - name: Build with Gradle run: | @@ -123,7 +123,7 @@ jobs: with: repository: specs-feup/lara-framework path: lara-framework - ref: ${{ steps.Branch-lara-framework.outputs.stdout == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }} + ref: ${{ startsWith(steps.Branch-lara-framework.outputs.stdout, '1') && env.BRANCH_NAME || env.DEFAULT_BRANCH }} - name: Setup js workspace run: | From fe1206b7c6374f8c2d8ba312443101f47e4ef2a5 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Fri, 27 Sep 2024 18:44:31 +0100 Subject: [PATCH 14/20] Add checks printout --- .github/workflows/nightly.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9193b2673..167ba5d21 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -53,6 +53,13 @@ jobs: id: Branch-specs-java-libs run: git ls-remote --heads https://github.com/specs-feup/specs-java-libs.git refs/heads/${{ env.BRANCH_NAME }} | wc -l + - name: Echo checks + run: | + echo "Branch-lara-framework: ${{ steps.Branch-lara-framework.outputs.stdout }}" + echo "Branch-specs-java-libs: ${{ steps.Branch-specs-java-libs.outputs.stdout }}" + echo "Branch name: ${{ env.BRANCH_NAME }}" + echo "Default branch: ${{ env.DEFAULT_BRANCH }}" + - name: Checkout lara-framework uses: actions/checkout@v4 with: From ef904fb44072187f503b3fdb499345dfe7f42e0f Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Fri, 27 Sep 2024 18:15:16 +0000 Subject: [PATCH 15/20] Update nightly.yml --- .github/workflows/nightly.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 167ba5d21..9db49f9c1 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -47,11 +47,11 @@ jobs: - name: Check if branch exists on lara-framework id: Branch-lara-framework - run: git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l + run: echo $(git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l) >> $GITHUB_OUTPUT - name: Check if branch exists on specs-java-libs id: Branch-specs-java-libs - run: git ls-remote --heads https://github.com/specs-feup/specs-java-libs.git refs/heads/${{ env.BRANCH_NAME }} | wc -l + run: echo $(git ls-remote --heads https://github.com/specs-feup/specs-java-libs.git refs/heads/${{ env.BRANCH_NAME }} | wc -l) >> $GITHUB_OUTPUT - name: Echo checks run: | @@ -123,7 +123,7 @@ jobs: - name: Check if branch exists on lara-framework id: Branch-lara-framework - run: git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l + run: echo $(git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l) >> $GITHUB_OUTPUT - name: Checkout lara-framework uses: actions/checkout@v4 From efce39363c5a4424ffb2868ee184f9beab727a4b Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Fri, 27 Sep 2024 22:41:52 +0000 Subject: [PATCH 16/20] Update nightly.yml --- .github/workflows/nightly.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9db49f9c1..474316cc4 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -47,11 +47,11 @@ jobs: - name: Check if branch exists on lara-framework id: Branch-lara-framework - run: echo $(git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l) >> $GITHUB_OUTPUT + run: git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l | read GITHUB_OUTPUT - name: Check if branch exists on specs-java-libs id: Branch-specs-java-libs - run: echo $(git ls-remote --heads https://github.com/specs-feup/specs-java-libs.git refs/heads/${{ env.BRANCH_NAME }} | wc -l) >> $GITHUB_OUTPUT + run: git ls-remote --heads https://github.com/specs-feup/specs-java-libs.git refs/heads/${{ env.BRANCH_NAME }} | wc -l | read GITHUB_OUTPUT - name: Echo checks run: | @@ -123,7 +123,7 @@ jobs: - name: Check if branch exists on lara-framework id: Branch-lara-framework - run: echo $(git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l) >> $GITHUB_OUTPUT + run: git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l | read GITHUB_OUTPUT - name: Checkout lara-framework uses: actions/checkout@v4 From 7948f60e135e55af0ffd3a9abfb90a6a4d9dc568 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Sat, 28 Sep 2024 12:15:29 +0100 Subject: [PATCH 17/20] Maybe this one is the charm --- .github/workflows/nightly.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 474316cc4..dca6383df 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -27,6 +27,10 @@ jobs: name: Build Java runs-on: ubuntu-latest + outputs: + branch-exists-lara-framework: ${{ steps.Branch-lara-framework.outputs.value }} + branch-exists-specs-java-libs: ${{ steps.Branch-specs-java-libs.outputs.value }} + steps: - name: Setup Java uses: actions/setup-java@v4 @@ -47,16 +51,16 @@ jobs: - name: Check if branch exists on lara-framework id: Branch-lara-framework - run: git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l | read GITHUB_OUTPUT + run: echo "value=$(git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l)" >> $GITHUB_OUTPUT - name: Check if branch exists on specs-java-libs id: Branch-specs-java-libs - run: git ls-remote --heads https://github.com/specs-feup/specs-java-libs.git refs/heads/${{ env.BRANCH_NAME }} | wc -l | read GITHUB_OUTPUT + run: echo "value=$(git ls-remote --heads https://github.com/specs-feup/specs-java-libs.git refs/heads/${{ env.BRANCH_NAME }} | wc -l)" >> $GITHUB_OUTPUT - name: Echo checks run: | - echo "Branch-lara-framework: ${{ steps.Branch-lara-framework.outputs.stdout }}" - echo "Branch-specs-java-libs: ${{ steps.Branch-specs-java-libs.outputs.stdout }}" + echo "Branch-lara-framework: ${{ steps.Branch-lara-framework.outputs.value }}" + echo "Branch-specs-java-libs: ${{ steps.Branch-specs-java-libs.outputs.value }}" echo "Branch name: ${{ env.BRANCH_NAME }}" echo "Default branch: ${{ env.DEFAULT_BRANCH }}" @@ -65,14 +69,14 @@ jobs: with: repository: specs-feup/lara-framework path: lara-framework - ref: ${{ startsWith(steps.Branch-lara-framework.outputs.stdout, '1') && env.BRANCH_NAME || env.DEFAULT_BRANCH }} + ref: ${{ steps.Branch-lara-framework.outputs.value == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }} - name: Checkout specs-java-libs uses: actions/checkout@v4 with: repository: specs-feup/specs-java-libs path: specs-java-libs - ref: ${{ startsWith(steps.Branch-specs-java-libs.outputs.stdout, '1') && env.BRANCH_NAME || env.DEFAULT_BRANCH }} + ref: ${{ steps.Branch-specs-java-libs.outputs.value == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }} - name: Build with Gradle run: | @@ -121,16 +125,12 @@ jobs: with: path: clava - - name: Check if branch exists on lara-framework - id: Branch-lara-framework - run: git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l | read GITHUB_OUTPUT - - name: Checkout lara-framework uses: actions/checkout@v4 with: repository: specs-feup/lara-framework path: lara-framework - ref: ${{ startsWith(steps.Branch-lara-framework.outputs.stdout, '1') && env.BRANCH_NAME || env.DEFAULT_BRANCH }} + ref: ${{ needs.build-java.outputs.branch-exists-lara-framework == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }} - name: Setup js workspace run: | From 9101733c6474cc06190c221d1f25dded524d5736 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Sat, 28 Sep 2024 13:13:45 +0100 Subject: [PATCH 18/20] Test multiple Node versions --- .github/workflows/nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index dca6383df..8ffb1f567 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -103,7 +103,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: ['latest'] + node-version: ['latest', '20.x', '18.x'] os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} From b1d9e6dba6ec56a984e11d156faeb3015b597fb0 Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Sat, 28 Sep 2024 13:59:23 +0100 Subject: [PATCH 19/20] Disable latest node version in testing --- .github/workflows/nightly.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 8ffb1f567..1227b80cc 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -103,7 +103,8 @@ jobs: strategy: fail-fast: false matrix: - node-version: ['latest', '20.x', '18.x'] + #node-version: ['latest', '20.x', '18.x'] + node-version: ['20.x', '18.x'] os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} From 0fb75543f469e9e8c8ad0621570aef31d958f4ea Mon Sep 17 00:00:00 2001 From: "L. Sousa" Date: Sat, 28 Sep 2024 14:17:42 +0100 Subject: [PATCH 20/20] Perhaps a change in quotes? --- Clava-JS/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Clava-JS/package.json b/Clava-JS/package.json index 6e150ef10..32796532c 100644 --- a/Clava-JS/package.json +++ b/Clava-JS/package.json @@ -29,7 +29,7 @@ "build:code": "tsc -b src-code", "build:watch": "npm run build -- --watch", "lint": "eslint .", - "test": "cross-env NODE_OPTIONS='$NODE_OPTIONS --experimental-vm-modules' jest --detectOpenHandles --forceExit", + "test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --detectOpenHandles --forceExit", "test:api": "npm run test -- src-api", "test:code": "npm run test -- src-code", "test:cov": "npm run test -- --coverage",