From 3ca7f8a9b000a39bc1942f4199d7b89eb13dfc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bispo?= Date: Sun, 29 Dec 2024 23:40:37 +0000 Subject: [PATCH] Adapts code to changes in WeaverEngine interface --- .../up/fe/specs/clava/weaver/CxxWeaver.java | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) 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 b7f003eb2..26f4017d3 100644 --- a/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.java +++ b/ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.java @@ -8,7 +8,6 @@ import org.lara.interpreter.weaver.interf.events.Stage; import org.lara.interpreter.weaver.options.WeaverOption; import org.lara.interpreter.weaver.utils.LaraResourceProvider; -import org.lara.language.specification.LanguageSpecification; import org.lara.language.specification.dsl.LanguageSpecificationV2; import org.suikasoft.jOptions.Interfaces.DataStore; import org.suikasoft.jOptions.storedefinition.StoreDefinition; @@ -40,7 +39,6 @@ import pt.up.fe.specs.clava.weaver.options.CxxWeaverOption; import pt.up.fe.specs.clava.weaver.options.CxxWeaverOptions; import pt.up.fe.specs.clava.weaver.utils.ClavaAstMethods; -import pt.up.fe.specs.lara.langspec.LangSpecsXmlParser; import pt.up.fe.specs.lara.lcl.LaraCommonLanguageApis; import pt.up.fe.specs.lara.unit.LaraUnitLauncher; import pt.up.fe.specs.util.*; @@ -76,14 +74,8 @@ public class CxxWeaver extends ACxxWeaver { } public static LanguageSpecificationV2 buildLanguageSpecification() { - // var langSpecV1 = LanguageSpecification.newInstance(ClavaWeaverResource.JOINPOINTS, - // ClavaWeaverResource.ARTIFACTS, - // ClavaWeaverResource.ACTIONS, true); - // - // return JoinPointFactory.fromOld(langSpecV1); - // System.out.println("JPS: " + ClavaWeaverResource.JOINPOINTS.read()); - return LangSpecsXmlParser.parse(ClavaWeaverResource.JOINPOINTS, ClavaWeaverResource.ARTIFACTS, - ClavaWeaverResource.ACTIONS, true); + return LanguageSpecificationV2.newInstance(ClavaWeaverResource.JOINPOINTS, ClavaWeaverResource.ARTIFACTS, + ClavaWeaverResource.ACTIONS); } private static final List CLAVA_PREDEFINED_EXTERNAL_DEPS = Arrays.asList("LAT - Lara Autotuning Tool", @@ -104,15 +96,6 @@ public static LanguageSpecificationV2 buildLanguageSpecification() { "Benchmark - Rosetta (import lara.benchmark.RosettaBenchmarkSet)", "https://github.com/specs-feup/clava-benchmarks.git?folder=Rosetta"); - /** - * @return - * @deprecated - */ - @Deprecated - public static LanguageSpecification buildLanguageSpecificationOld() { - return LanguageSpecification.newInstance(ClavaWeaverResource.JOINPOINTS, ClavaWeaverResource.ARTIFACTS, - ClavaWeaverResource.ACTIONS, true); - } private static final String TEMP_WEAVING_FOLDER = "__clava_woven"; private static final String TEMP_SRC_FOLDER = "__clava_src"; @@ -1370,11 +1353,6 @@ public List getOptions() { } - @Override - public LanguageSpecification getLanguageSpecification() { - return buildLanguageSpecificationOld(); - } - @Override public String getName() { // v1.2.2 @@ -2026,7 +2004,7 @@ private void obtainFiles(File folder, File baseFolder, Map processed } @Override - protected LanguageSpecificationV2 buildLangSpecsV2() { + protected LanguageSpecificationV2 buildLangSpecs() { return buildLanguageSpecification(); }