Skip to content

Commit

Permalink
Adapts code to changes in WeaverEngine interface
Browse files Browse the repository at this point in the history
  • Loading branch information
joaobispo committed Dec 29, 2024
1 parent f220eb7 commit 3ca7f8a
Showing 1 changed file with 3 additions and 25 deletions.
28 changes: 3 additions & 25 deletions ClavaWeaver/src/pt/up/fe/specs/clava/weaver/CxxWeaver.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.*;
Expand Down Expand Up @@ -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<String> CLAVA_PREDEFINED_EXTERNAL_DEPS = Arrays.asList("LAT - Lara Autotuning Tool",
Expand All @@ -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";
Expand Down Expand Up @@ -1370,11 +1353,6 @@ public List<WeaverOption> getOptions() {

}

@Override
public LanguageSpecification getLanguageSpecification() {
return buildLanguageSpecificationOld();
}

@Override
public String getName() {
// v1.2.2
Expand Down Expand Up @@ -2026,7 +2004,7 @@ private void obtainFiles(File folder, File baseFolder, Map<File, File> processed
}

@Override
protected LanguageSpecificationV2 buildLangSpecsV2() {
protected LanguageSpecificationV2 buildLangSpecs() {
return buildLanguageSpecification();
}

Expand Down

0 comments on commit 3ca7f8a

Please sign in to comment.