Skip to content

Commit cae48e1

Browse files
committed
Remove unused declaration in LKQL JIT sources
1 parent e099fb1 commit cae48e1

File tree

26 files changed

+2
-455
lines changed

26 files changed

+2
-455
lines changed

lkql_jit/language/src/main/java/com/adacore/lkql_jit/LKQLContext.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,10 @@ public final class LKQLContext {
143143
@CompilerDirectives.CompilationFinal(dimensions = 1)
144144
private Libadalang.ScenarioVariable[] scenarioVars = null;
145145

146-
private Boolean useAutoProvider = null;
147-
148146
/** The ada files passed through the command line. */
149147
@CompilerDirectives.CompilationFinal(dimensions = 1)
150148
private String[] files = null;
151149

152-
/** The error printing mode. */
153-
@CompilerDirectives.CompilationFinal private String errorMode = null;
154-
155150
/** Whether the checker is in debug mode. */
156151
@CompilerDirectives.CompilationFinal private Boolean checkerDebug = null;
157152

@@ -343,18 +338,6 @@ public boolean isCheckerDebug() {
343338
return this.checkerDebug;
344339
}
345340

346-
/**
347-
* Get the error handling mode.
348-
*
349-
* @return The mode in a string.
350-
*/
351-
public String getErrorMode() {
352-
if (this.errorMode == null) {
353-
this.errorMode = this.env.getOptions().get(LKQLLanguage.errorMode);
354-
}
355-
return this.errorMode;
356-
}
357-
358341
/**
359342
* Get the directories to get the rules from.
360343
*
@@ -395,7 +378,6 @@ private void invalidateOptionCaches() {
395378
this.isVerbose = null;
396379
this.projectFile = null;
397380
this.files = null;
398-
this.errorMode = null;
399381
this.ruleInstances = null;
400382
this.instancesArgsCache = new HashMap<>();
401383
this.ruleDirectories = null;

lkql_jit/language/src/main/java/com/adacore/lkql_jit/built_ins/BuiltInSelectorValue.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

lkql_jit/language/src/main/java/com/adacore/lkql_jit/built_ins/BuiltInsHolder.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import com.adacore.lkql_jit.built_ins.functions.*;
99
import com.adacore.lkql_jit.built_ins.methods.*;
10-
import com.adacore.lkql_jit.built_ins.selectors.*;
1110
import com.adacore.lkql_jit.checker.built_ins.NodeCheckerFunction;
1211
import com.adacore.lkql_jit.checker.built_ins.UnitCheckerFunction;
1312
import com.adacore.lkql_jit.utils.LKQLTypesHelper;

lkql_jit/language/src/main/java/com/adacore/lkql_jit/built_ins/selectors/BuiltInSelector.java

Lines changed: 0 additions & 30 deletions
This file was deleted.

lkql_jit/language/src/main/java/com/adacore/lkql_jit/checker/BaseChecker.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -102,42 +102,10 @@ public String getMessage() {
102102
return message;
103103
}
104104

105-
public String getHelp() {
106-
return help;
107-
}
108-
109105
public boolean isFollowGenericInstantiations() {
110106
return followGenericInstantiations;
111107
}
112108

113-
public String getCategory() {
114-
return category;
115-
}
116-
117-
public String getSubcategory() {
118-
return subcategory;
119-
}
120-
121-
public Remediation getRemediation() {
122-
return remediation;
123-
}
124-
125-
public long getExecutionCost() {
126-
return executionCost;
127-
}
128-
129-
public boolean isParametricExemption() {
130-
return parametricExemption;
131-
}
132-
133-
public String getImpact() {
134-
return impact;
135-
}
136-
137-
public String getTarget() {
138-
return target;
139-
}
140-
141109
// ----- Setters -----
142110

143111
public void setAlias(String alias) {

lkql_jit/language/src/main/java/com/adacore/lkql_jit/exception/LKQLRuntimeException.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ public static LKQLRuntimeException ignoredExpressionReturn(Node location) {
114114
"Can't ignore the return value of an expr in a block expr", location);
115115
}
116116

117-
/** Create a new exception when a key appears many times in the same object literal. */
118-
public static LKQLRuntimeException multipleSameNameKeys(String key, Node location) {
119-
return LKQLRuntimeException.fromMessage(
120-
"Multiple keys with the same name in the object: \"" + key + "\"", location);
121-
}
122-
123117
// --- Symbol exception
124118

125119
/**

lkql_jit/language/src/main/java/com/adacore/lkql_jit/exception/LangkitException.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ public final class LangkitException extends AbstractTruffleException {
2020

2121
@Serial private static final long serialVersionUID = 1755847711876252095L;
2222

23-
/** Kind of the Langkit exception. */
24-
private final String kind;
25-
2623
/** Message of the exception. */
2724
private final String msg;
2825

@@ -34,22 +31,16 @@ public final class LangkitException extends AbstractTruffleException {
3431
/**
3532
* Create a new Langkit exception.
3633
*
37-
* @param kind The kind of the exception.
3834
* @param msg The message of the exception.
3935
* @param location The location of the exception.
4036
*/
41-
public LangkitException(String kind, String msg, SourceSection location) {
42-
this.kind = kind;
37+
public LangkitException(String msg, SourceSection location) {
4338
this.msg = msg;
4439
this.location = location;
4540
}
4641

4742
// ----- Getters -----
4843

49-
public String getKind() {
50-
return this.kind;
51-
}
52-
5344
public String getMsg() {
5445
return this.msg;
5546
}

lkql_jit/language/src/main/java/com/adacore/lkql_jit/langkit_translator/passes/framing_utils/ScriptFrames.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ public ScriptFrames(
5656
this.current = null;
5757
}
5858

59-
// ----- Getters -----
60-
61-
public AbstractNodeFrame getCurrent() {
62-
return this.current;
63-
}
64-
6559
// ----- Instance methods -----
6660

6761
// --- Frame methods

lkql_jit/language/src/main/java/com/adacore/lkql_jit/langkit_translator/passes/framing_utils/ScriptFramesBuilder.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ public ScriptFramesBuilder() {
3838
this.current = null;
3939
}
4040

41-
// ----- Getters -----
42-
43-
public NodeFrameBuilder getCurrent() {
44-
return this.current;
45-
}
46-
4741
// ----- Instance methods -----
4842

4943
// --- Frame methods
@@ -253,7 +247,6 @@ public ScriptFrames.AbstractNodeFrame build(final ScriptFrames.AbstractNodeFrame
253247
: new ScriptFrames.NodeFrame(this.node, parent);
254248

255249
// Add all bindings to the node frame
256-
final boolean saveNames = this.node instanceof Liblkqllang.TopLevelList;
257250
for (String binding : this.bindings) {
258251
res.addBinding(binding);
259252
}

lkql_jit/language/src/main/java/com/adacore/lkql_jit/nodes/declarations/selector/SelectorArm.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,6 @@ public SelectorArm(SourceSection location, BasePattern pattern, Expr expr) {
5050
this.expr = expr;
5151
}
5252

53-
// ----- Getters -----
54-
55-
public BasePattern getPattern() {
56-
return pattern;
57-
}
58-
59-
public Expr getExpr() {
60-
return expr;
61-
}
62-
6353
// ----- Execution methods -----
6454

6555
/**

lkql_jit/language/src/main/java/com/adacore/lkql_jit/nodes/declarations/selector/SelectorExpr.java

Lines changed: 0 additions & 93 deletions
This file was deleted.

lkql_jit/language/src/main/java/com/adacore/lkql_jit/nodes/expressions/FunExpr.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ public final class FunExpr extends Expr {
4141
/** The default values of the parameters. */
4242
private final Expr[] parameterValues;
4343

44-
// ----- Children -----
45-
46-
/** The body of the function. */
47-
@Child
48-
@SuppressWarnings("FieldMayBeFinal")
49-
private Expr body;
50-
5144
// ----- Constructors -----
5245

5346
/**
@@ -72,7 +65,6 @@ public FunExpr(
7265
new FunctionRootNode(LKQLLanguage.getLanguage(this), frameDescriptor, false, body);
7366
this.parameterNames = new String[parameters.length];
7467
this.parameterValues = new Expr[parameters.length];
75-
this.body = body;
7668
this.documentation = documentation;
7769

7870
this.initParams(parameters);

lkql_jit/language/src/main/java/com/adacore/lkql_jit/nodes/expressions/list_comprehension/ComprehensionAssoc.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,10 @@ public ComprehensionAssoc(SourceSection location, String name, int slot, Expr co
5555

5656
// ----- Getters -----
5757

58-
public String getName() {
59-
return name;
60-
}
61-
6258
public int getSlot() {
6359
return slot;
6460
}
6561

66-
public Expr getCollection() {
67-
return collection;
68-
}
69-
7062
// ----- Execution methods -----
7163

7264
/**

0 commit comments

Comments
 (0)