новые директивы. v++

This commit is contained in:
2024-04-10 00:29:36 +03:00
parent 0fb9412d24
commit 493941edab
9 changed files with 19 additions and 29 deletions

View File

@@ -39,7 +39,10 @@ public enum DirectiveName {
ASYNC,
FLEXIBLE,
PARAMETER,
UNROLL
UNROLL,
PROCESS_PRIVATE,
COVER,
MERGE
;
public String getDescription() {
switch (this) {
@@ -117,7 +120,12 @@ public enum DirectiveName {
return "Асинхронная";
case FLEXIBLE:
return "Гибкая";
case PROCESS_PRIVATE:
return "Клауза приватных для процесса переменных";
case COVER:
return "Клауза покрытия";
case MERGE:
return "Клауза для объединения циклов";
default:
return "?";
}

View File

@@ -11,6 +11,7 @@ public class Spec3Directive extends SpecDirective {
&& getOwner().flags.get(1).equals(DirectiveName.TRANSFORM)
&& getOwner().nearestGroup.equals(DirectiveName.TRANSFORM)
&& !getOwner().flags.contains(DirectiveName.NOINLINE)
&& !getOwner().flags.contains(DirectiveName.MERGE)
&& !getOwner().flags.contains(DirectiveName.FISSION)
&& !getOwner().flags.contains(DirectiveName.SHRINK)
&& !getOwner().flags.contains(DirectiveName.EXPAND)

View File

@@ -10,7 +10,8 @@ public class SpecDirective extends BaseDirective {
super(provider_in, name_in);
}
public String get_word() {
boolean noBrackets = name.equals(DirectiveName.NOINLINE)||name.equals(DirectiveName.UNROLL);
boolean noBrackets = name.equals(DirectiveName.NOINLINE)||
name.equals(DirectiveName.UNROLL)|| name.equals(DirectiveName.MERGE);
return name.getText() + (noBrackets ? "" : "()");
}
@Override

View File

@@ -7,6 +7,8 @@ public class Spec1Provider extends PrefixWordProvider {
super(owner_in);
addDirective(new Spec1Directive(this, DirectiveName.REDUCTION));
addDirective(new Spec1Directive(this, DirectiveName.PRIVATE));
addDirective(new Spec1Directive(this, DirectiveName.PROCESS_PRIVATE));
addDirective(new Spec1Directive(this, DirectiveName.PARAMETER));
addDirective(new Spec1Directive(this, DirectiveName.COVER));
}
}

View File

@@ -10,5 +10,6 @@ public class Spec3Provider extends PrefixWordProvider {
addDirective(new Spec3Directive(this, DirectiveName.SHRINK));
addDirective(new Spec3Directive(this, DirectiveName.EXPAND));
addDirective(new Spec3Directive(this, DirectiveName.UNROLL));
addDirective(new Spec3Directive(this, DirectiveName.MERGE));
}
}