GCC Code Coverage Report


Directory: ../
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 132 / 0 / 132
Functions: 100.0% 4 / 0 / 4
Branches: 65.9% 162 / 0 / 246

src/typechecker/TypeCheckerTopLevelDefinitionsCheck.cpp
Line Branch Exec Source
1 // Copyright (c) 2021-2026 ChilliBits. All rights reserved.
2
3 #include "TypeChecker.h"
4
5 #include <SourceFile.h>
6 #include <ast/ASTNodes.h>
7 #include <exception/SemanticError.h>
8 #include <model/Interface.h>
9 #include <symboltablebuilder/Scope.h>
10 #include <symboltablebuilder/SymbolTableBuilder.h>
11 #include <typechecker/FunctionManager.h>
12 #include <typechecker/TypeMatcher.h>
13
14 namespace spice::compiler {
15
16 529 std::any TypeChecker::visitMainFctDefCheck(MainFctDefNode *node) {
17 // Skip if already type-checked
18
2/2
✓ Branch 2 → 3 taken 61 times.
✓ Branch 2 → 6 taken 468 times.
529 if (typeCheckedMainFct)
19
1/2
✓ Branch 3 → 4 taken 61 times.
✗ Branch 3 → 13 not taken.
122 return nullptr;
20
21 468 node->resizeToNumberOfManifestations(1);
22
23 // Change to function body scope
24 468 currentScope = node->bodyScope;
25 // Visit statements in new scope
26
2/2
✓ Branch 7 → 8 taken 438 times.
✓ Branch 7 → 14 taken 30 times.
468 visit(node->body);
27 // Leave main function body scope
28 438 currentScope = rootScope;
29
30 // Set to type-checked
31 438 typeCheckedMainFct = true;
32
1/2
✓ Branch 9 → 10 taken 438 times.
✗ Branch 9 → 15 not taken.
876 return nullptr;
33 }
34
35 30284 std::any TypeChecker::visitFctDefCheck(FctDefNode *node) {
36 30284 node->resizeToNumberOfManifestations(node->manifestations.size());
37 30284 manIdx = 0; // Reset the manifestation index
38
39 // Get all manifestations for this function definition
40
2/2
✓ Branch 56 → 6 taken 40228 times.
✓ Branch 56 → 57 taken 30282 times.
100794 for (Function *manifestation : node->manifestations) {
41 // Skip non-substantiated or already checked functions
42
7/8
✓ Branch 8 → 9 taken 40228 times.
✗ Branch 8 → 72 not taken.
✓ Branch 9 → 10 taken 31605 times.
✓ Branch 9 → 11 taken 8623 times.
✓ Branch 10 → 11 taken 16879 times.
✓ Branch 10 → 12 taken 14726 times.
✓ Branch 13 → 14 taken 25502 times.
✓ Branch 13 → 15 taken 14726 times.
40228 if (!manifestation->isFullySubstantiated() || manifestation->alreadyTypeChecked) {
43 25502 manIdx++; // Increase the manifestation index
44 25502 continue;
45 }
46
47 // Change scope to concrete struct specialization scope
48
2/2
✓ Branch 15 → 16 taken 7339 times.
✓ Branch 15 → 21 taken 7387 times.
14726 if (node->isMethod) {
49
2/4
✓ Branch 16 → 17 taken 7339 times.
✗ Branch 16 → 63 not taken.
✓ Branch 17 → 18 taken 7339 times.
✗ Branch 17 → 63 not taken.
7339 const std::string &scopeName = Struct::getScopeName(node->name->structName, manifestation->thisType.getTemplateTypes());
50
1/2
✓ Branch 18 → 19 taken 7339 times.
✗ Branch 18 → 61 not taken.
7339 changeToScope(scopeName, ScopeType::STRUCT);
51 7339 }
52
53 // Change to function scope
54
1/2
✓ Branch 21 → 22 taken 14726 times.
✗ Branch 21 → 72 not taken.
14726 changeToScope(manifestation->bodyScope, ScopeType::FUNC_PROC_BODY);
55
56 // Mount type mapping for this manifestation
57
1/2
✗ Branch 23 → 24 not taken.
✓ Branch 23 → 25 taken 14726 times.
14726 assert(typeMapping.empty());
58
1/2
✓ Branch 25 → 26 taken 14726 times.
✗ Branch 25 → 72 not taken.
14726 typeMapping = manifestation->typeMapping;
59
60 // Set return type to the result variable
61
1/2
✓ Branch 28 → 29 taken 14726 times.
✗ Branch 28 → 66 not taken.
44178 SymbolTableEntry *resultVarEntry = currentScope->lookupStrict(RETURN_VARIABLE_NAME);
62
1/2
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 36 taken 14726 times.
14726 assert(resultVarEntry != nullptr);
63
1/2
✓ Branch 36 → 37 taken 14726 times.
✗ Branch 36 → 72 not taken.
14726 resultVarEntry->updateType(manifestation->returnType, false);
64 14726 resultVarEntry->used = true;
65
66 // Visit parameters
67 // This happens once in the type checker prepare stage. This second time is only required if we have a generic function
68
2/2
✓ Branch 37 → 38 taken 10750 times.
✓ Branch 37 → 41 taken 3976 times.
14726 if (node->hasParams)
69
1/2
✓ Branch 38 → 39 taken 10750 times.
✗ Branch 38 → 70 not taken.
10750 visit(node->paramLst);
70
71 // Visit statements in new scope
72
2/2
✓ Branch 41 → 42 taken 14724 times.
✓ Branch 41 → 71 taken 2 times.
14726 visit(node->body);
73
74 // Clear type mapping
75 14724 typeMapping.clear();
76
77 // Change to root scope
78 14724 currentScope = rootScope;
79
1/2
✗ Branch 44 → 45 not taken.
✓ Branch 44 → 46 taken 14724 times.
14724 assert(currentScope->type == ScopeType::GLOBAL);
80
81 // Do not type-check this manifestation again
82 14724 manifestation->alreadyTypeChecked = true;
83
84 14724 manIdx++; // Increase the manifestation index
85 }
86 30282 manIdx = 0; // Reset the manifestation index
87
88
1/2
✓ Branch 57 → 58 taken 30282 times.
✗ Branch 57 → 73 not taken.
60564 return nullptr;
89 }
90
91 16721 std::any TypeChecker::visitProcDefCheck(ProcDefNode *node) {
92 16721 node->resizeToNumberOfManifestations(node->manifestations.size());
93 16721 manIdx = 0; // Reset the manifestation index
94
95 // Get all manifestations for this procedure definition
96
2/2
✓ Branch 49 → 6 taken 23226 times.
✓ Branch 49 → 50 taken 16721 times.
56668 for (Function *manifestation : node->manifestations) {
97 // Skip non-substantiated or already checked procedures
98
7/8
✓ Branch 8 → 9 taken 23226 times.
✗ Branch 8 → 59 not taken.
✓ Branch 9 → 10 taken 14289 times.
✓ Branch 9 → 11 taken 8937 times.
✓ Branch 10 → 11 taken 6859 times.
✓ Branch 10 → 12 taken 7430 times.
✓ Branch 13 → 14 taken 15796 times.
✓ Branch 13 → 15 taken 7430 times.
23226 if (!manifestation->isFullySubstantiated() || manifestation->alreadyTypeChecked) {
99 15796 manIdx++; // Increase the manifestation index
100 15796 continue;
101 }
102
103 // Change scope to concrete struct specialization scope
104
2/2
✓ Branch 15 → 16 taken 6019 times.
✓ Branch 15 → 21 taken 1411 times.
7430 if (node->isMethod) {
105
2/4
✓ Branch 16 → 17 taken 6019 times.
✗ Branch 16 → 56 not taken.
✓ Branch 17 → 18 taken 6019 times.
✗ Branch 17 → 56 not taken.
6019 const std::string &scopeName = Struct::getScopeName(node->name->structName, manifestation->thisType.getTemplateTypes());
106
1/2
✓ Branch 18 → 19 taken 6019 times.
✗ Branch 18 → 54 not taken.
6019 changeToScope(scopeName, ScopeType::STRUCT);
107 6019 }
108
109 // Change to procedure scope
110
1/2
✓ Branch 21 → 22 taken 7430 times.
✗ Branch 21 → 59 not taken.
7430 changeToScope(manifestation->bodyScope, ScopeType::FUNC_PROC_BODY);
111
112 // Mount type mapping for this manifestation
113
1/2
✗ Branch 23 → 24 not taken.
✓ Branch 23 → 25 taken 7430 times.
7430 assert(typeMapping.empty());
114
1/2
✓ Branch 25 → 26 taken 7430 times.
✗ Branch 25 → 59 not taken.
7430 typeMapping = manifestation->typeMapping;
115
116 // Visit parameters
117 // This happens once in the type checker prepare stage. This second time is only required if we have a generic procedure
118
2/2
✓ Branch 26 → 27 taken 5632 times.
✓ Branch 26 → 30 taken 1798 times.
7430 if (node->hasParams)
119
1/2
✓ Branch 27 → 28 taken 5632 times.
✗ Branch 27 → 57 not taken.
5632 visit(node->paramLst);
120
121 // Prepare generation of special ctor preamble to store VTable, default field values, etc. if required
122
2/2
✓ Branch 30 → 31 taken 3142 times.
✓ Branch 30 → 32 taken 4288 times.
7430 if (node->isCtor)
123
1/2
✓ Branch 31 → 32 taken 3142 times.
✗ Branch 31 → 59 not taken.
3142 createCtorBodyPreamble(node->scope);
124
125 // Visit statements in new scope
126
1/2
✓ Branch 32 → 33 taken 7430 times.
✗ Branch 32 → 58 not taken.
7430 visit(node->body);
127
128 // Clear type mapping
129 7430 typeMapping.clear();
130
131 // Change to root scope
132 7430 currentScope = rootScope;
133
2/4
✓ Branch 35 → 36 taken 7430 times.
✗ Branch 35 → 38 not taken.
✓ Branch 36 → 37 taken 7430 times.
✗ Branch 36 → 38 not taken.
7430 assert(currentScope != nullptr && currentScope->type == ScopeType::GLOBAL);
134
135 // Do not type-check this manifestation again
136 7430 manifestation->alreadyTypeChecked = true;
137
138 7430 manIdx++; // Increase the manifestation index
139 }
140 16721 manIdx = 0; // Reset the manifestation index
141
142
1/2
✓ Branch 50 → 51 taken 16721 times.
✗ Branch 50 → 60 not taken.
33442 return nullptr;
143 }
144
145 3061 std::any TypeChecker::visitStructDefCheck(StructDefNode *node) {
146 3061 node->resizeToNumberOfManifestations(node->structManifestations.size());
147 3061 manIdx = 0; // Reset the manifestation index
148
149 // Get all manifestations for this procedure definition
150
2/2
✓ Branch 214 → 6 taken 5353 times.
✓ Branch 214 → 215 taken 3061 times.
11475 for (const Struct *manifestation : node->structManifestations) {
151 // Skip non-substantiated or already checked procedures
152
3/4
✓ Branch 8 → 9 taken 5353 times.
✗ Branch 8 → 298 not taken.
✓ Branch 9 → 10 taken 1229 times.
✓ Branch 9 → 11 taken 4124 times.
5353 if (!manifestation->isFullySubstantiated()) {
153 1229 manIdx++; // Increase the manifestation index
154 1229 continue;
155 }
156
157 // Change to struct scope
158
1/2
✓ Branch 11 → 12 taken 4124 times.
✗ Branch 11 → 298 not taken.
4124 changeToScope(manifestation->scope, ScopeType::STRUCT);
159
160 // Mount type mapping for this manifestation, so that the body preamble helpers below can substantiate
161 // generic field types (e.g. `heap T*` on `Vector<T>`). Without this, an auto-generated body preamble that
162 // touches a still-generic field would assert in TypeMatcher::substantiateTypeWithTypeMapping.
163
1/2
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 4124 times.
4124 assert(typeMapping.empty());
164
1/2
✓ Branch 15 → 16 taken 4124 times.
✗ Branch 15 → 298 not taken.
4124 typeMapping = manifestation->typeMapping;
165
166 // Re-visit all default values. This is required, since the type of the default value might vary for different manifestations
167
2/2
✓ Branch 39 → 18 taken 8919 times.
✓ Branch 39 → 40 taken 4124 times.
17167 for (const FieldNode *field : node->fields) {
168
2/2
✓ Branch 20 → 21 taken 1948 times.
✓ Branch 20 → 30 taken 6971 times.
8919 if (field->defaultValue != nullptr) {
169
1/2
✓ Branch 21 → 22 taken 1948 times.
✗ Branch 21 → 219 not taken.
1948 visit(field->defaultValue);
170
1/2
✓ Branch 23 → 24 taken 1948 times.
✗ Branch 23 → 221 not taken.
1948 SymbolTableEntry *fieldEntry = manifestation->scope->lookupStrict(field->fieldName);
171
1/2
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 28 taken 1948 times.
1948 assert(fieldEntry != nullptr);
172
1/2
✓ Branch 28 → 29 taken 1948 times.
✗ Branch 28 → 220 not taken.
1948 fieldEntry->updateState(INITIALIZED, field);
173 }
174 }
175
176 // Build struct type
177
1/2
✓ Branch 40 → 41 taken 4124 times.
✗ Branch 40 → 298 not taken.
4124 const QualType structType = manifestation->entry->getQualType();
178
179 // Check if the struct implements all methods of all attached interfaces
180 4124 size_t vtableIndex = 0;
181
2/2
✓ Branch 145 → 43 taken 1307 times.
✓ Branch 145 → 146 taken 4124 times.
9555 for (const QualType &interfaceType : manifestation->interfaceTypes) {
182
1/2
✓ Branch 45 → 46 taken 1307 times.
✗ Branch 45 → 265 not taken.
1307 const Interface *interface = interfaceType.getInterface(node);
183
1/2
✗ Branch 46 → 47 not taken.
✓ Branch 46 → 48 taken 1307 times.
1307 assert(interface != nullptr);
184
185 // Check for all methods, that it is implemented by the struct
186
2/2
✓ Branch 135 → 50 taken 3356 times.
✓ Branch 135 → 136 taken 1307 times.
5970 for (const Function *expMethod : interface->methods) {
187
1/2
✓ Branch 52 → 53 taken 3356 times.
✗ Branch 52 → 263 not taken.
3356 const std::string methodName = expMethod->name;
188
1/2
✓ Branch 53 → 54 taken 3356 times.
✗ Branch 53 → 261 not taken.
3356 QualTypeList params = expMethod->getParamTypes();
189 3356 QualType returnType = expMethod->returnType;
190
191 // Substantiate param and return types
192
1/2
✓ Branch 54 → 55 taken 3356 times.
✗ Branch 54 → 259 not taken.
3356 TypeMatcher::substantiateTypesWithTypeMapping(params, interface->typeMapping, node);
193
3/4
✓ Branch 55 → 56 taken 3356 times.
✗ Branch 55 → 259 not taken.
✓ Branch 56 → 57 taken 1900 times.
✓ Branch 56 → 58 taken 1456 times.
3356 if (returnType.hasAnyGenericParts())
194
1/2
✓ Branch 57 → 58 taken 1900 times.
✗ Branch 57 → 259 not taken.
1900 TypeMatcher::substantiateTypeWithTypeMapping(returnType, interface->typeMapping, node);
195
196 // Build args list
197 3356 ArgList args;
198
1/2
✓ Branch 59 → 60 taken 3356 times.
✗ Branch 59 → 257 not taken.
3356 args.reserve(params.size());
199
2/2
✓ Branch 74 → 62 taken 103 times.
✓ Branch 74 → 75 taken 3356 times.
6815 for (const QualType &param : params)
200
1/2
✓ Branch 64 → 65 taken 103 times.
✗ Branch 64 → 222 not taken.
103 args.emplace_back(param, nullptr);
201
202 // Search for method that has the required signature
203
1/2
✓ Branch 76 → 77 taken 3356 times.
✗ Branch 76 → 224 not taken.
3356 Function *spiceFunction = FunctionManager::match(currentScope, methodName, structType, args, {}, true, node);
204
2/2
✓ Branch 78 → 79 taken 4 times.
✓ Branch 78 → 91 taken 3352 times.
3356 if (spiceFunction == nullptr) {
205
1/2
✓ Branch 84 → 85 taken 4 times.
✗ Branch 84 → 227 not taken.
4 softError(node, INTERFACE_METHOD_NOT_IMPLEMENTED,
206
5/10
✓ Branch 79 → 80 taken 4 times.
✗ Branch 79 → 239 not taken.
✓ Branch 80 → 81 taken 4 times.
✗ Branch 80 → 235 not taken.
✓ Branch 81 → 82 taken 4 times.
✗ Branch 81 → 233 not taken.
✓ Branch 82 → 83 taken 4 times.
✗ Branch 82 → 231 not taken.
✓ Branch 83 → 84 taken 4 times.
✗ Branch 83 → 229 not taken.
8 "The struct '" + node->structName + "' does not implement method '" + expMethod->getSignature() + "'.");
207 4 continue;
208 }
209
210 // Check return type
211
5/6
✓ Branch 91 → 92 taken 3352 times.
✗ Branch 91 → 257 not taken.
✓ Branch 92 → 93 taken 614 times.
✓ Branch 92 → 96 taken 2738 times.
✓ Branch 97 → 98 taken 2 times.
✓ Branch 97 → 110 taken 3350 times.
3966 if (spiceFunction->returnType != returnType &&
212
3/4
✓ Branch 93 → 94 taken 614 times.
✗ Branch 93 → 257 not taken.
✓ Branch 94 → 95 taken 2 times.
✓ Branch 94 → 96 taken 612 times.
614 !returnType.matchesInterfaceImplementedByStruct(spiceFunction->returnType)) {
213
1/2
✓ Branch 103 → 104 taken 2 times.
✗ Branch 103 → 242 not taken.
2 softError(node, INTERFACE_METHOD_NOT_IMPLEMENTED,
214
4/8
✓ Branch 98 → 99 taken 2 times.
✗ Branch 98 → 254 not taken.
✓ Branch 99 → 100 taken 2 times.
✗ Branch 99 → 250 not taken.
✓ Branch 100 → 101 taken 2 times.
✗ Branch 100 → 248 not taken.
✓ Branch 101 → 102 taken 2 times.
✗ Branch 101 → 246 not taken.
4 "The struct '" + node->structName + "' does not implement method '" + expMethod->getSignature() +
215
1/2
✓ Branch 102 → 103 taken 2 times.
✗ Branch 102 → 244 not taken.
2 "'. The return type does not match.");
216 2 continue;
217 }
218 // Set to virtual, since it overrides the interface method
219 3350 spiceFunction->isVirtual = true;
220 3350 spiceFunction->vtableIndex = vtableIndex++;
221
6/6
✓ Branch 112 → 113 taken 3350 times.
✓ Branch 112 → 114 taken 6 times.
✓ Branch 117 → 118 taken 3350 times.
✓ Branch 117 → 119 taken 6 times.
✓ Branch 122 → 123 taken 3350 times.
✓ Branch 122 → 125 taken 6 times.
10068 }
222 }
223
224 // Check default ctor body if required
225
2/4
✓ Branch 149 → 150 taken 4124 times.
✗ Branch 149 → 268 not taken.
✓ Branch 150 → 151 taken 4124 times.
✗ Branch 150 → 266 not taken.
12372 const Function *ctorFunc = FunctionManager::lookup(currentScope, CTOR_FUNCTION_NAME, structType, {}, true);
226
4/4
✓ Branch 154 → 155 taken 1250 times.
✓ Branch 154 → 160 taken 2874 times.
✓ Branch 155 → 156 taken 201 times.
✓ Branch 155 → 160 taken 1049 times.
4124 if (ctorFunc != nullptr && ctorFunc->implicitDefault) {
227
1/2
✓ Branch 156 → 157 taken 201 times.
✗ Branch 156 → 298 not taken.
201 createCtorBodyPreamble(ctorFunc->bodyScope);
228
2/4
✓ Branch 157 → 158 taken 201 times.
✗ Branch 157 → 298 not taken.
✗ Branch 158 → 159 not taken.
✓ Branch 158 → 160 taken 201 times.
201 assert(manifestation->areAllFieldsInitialized() == nullptr);
229 }
230
231 // Check default copy ctor body if required
232
2/4
✓ Branch 160 → 161 taken 4124 times.
✗ Branch 160 → 279 not taken.
✓ Branch 164 → 165 taken 4124 times.
✗ Branch 164 → 275 not taken.
12372 const ArgList args = {{structType.toConstRef(node), false /* always non-temporary */}};
233
2/4
✓ Branch 168 → 169 taken 4124 times.
✗ Branch 168 → 283 not taken.
✓ Branch 169 → 170 taken 4124 times.
✗ Branch 169 → 281 not taken.
4124 const Function *copyCtorFunc = FunctionManager::lookup(currentScope, CTOR_FUNCTION_NAME, structType, args, true);
234
4/4
✓ Branch 172 → 173 taken 883 times.
✓ Branch 172 → 178 taken 3241 times.
✓ Branch 173 → 174 taken 289 times.
✓ Branch 173 → 178 taken 594 times.
4124 if (copyCtorFunc != nullptr && copyCtorFunc->implicitDefault) {
235
1/2
✓ Branch 174 → 175 taken 289 times.
✗ Branch 174 → 296 not taken.
289 createCopyCtorBodyPreamble(copyCtorFunc->bodyScope);
236
2/4
✓ Branch 175 → 176 taken 289 times.
✗ Branch 175 → 296 not taken.
✗ Branch 176 → 177 not taken.
✓ Branch 176 → 178 taken 289 times.
289 assert(manifestation->areAllFieldsInitialized() == nullptr);
237 }
238
239 // Check default move ctor body if required. findMoveCtor scans the manifestations directly to avoid the
240 // constify-based false-positive that FunctionManager::lookup with a non-const ref arg can produce.
241
5/6
✓ Branch 178 → 179 taken 4124 times.
✗ Branch 178 → 296 not taken.
✓ Branch 179 → 180 taken 22 times.
✓ Branch 179 → 185 taken 4102 times.
✓ Branch 180 → 181 taken 17 times.
✓ Branch 180 → 185 taken 5 times.
4124 if (const Function *moveCtorFunc = FunctionManager::findMoveCtor(currentScope); moveCtorFunc && moveCtorFunc->implicitDefault) {
242
1/2
✓ Branch 181 → 182 taken 17 times.
✗ Branch 181 → 296 not taken.
17 createMoveCtorBodyPreamble(moveCtorFunc->bodyScope);
243
2/4
✓ Branch 182 → 183 taken 17 times.
✗ Branch 182 → 296 not taken.
✗ Branch 183 → 184 not taken.
✓ Branch 183 → 185 taken 17 times.
17 assert(manifestation->areAllFieldsInitialized() == nullptr);
244 }
245
246 // Check default dtor body if required
247
2/4
✓ Branch 188 → 189 taken 4124 times.
✗ Branch 188 → 289 not taken.
✓ Branch 189 → 190 taken 4124 times.
✗ Branch 189 → 287 not taken.
12372 const Function *dtorFunc = FunctionManager::lookup(currentScope, DTOR_FUNCTION_NAME, structType, {}, true);
248
4/4
✓ Branch 193 → 194 taken 2025 times.
✓ Branch 193 → 196 taken 2099 times.
✓ Branch 194 → 195 taken 1547 times.
✓ Branch 194 → 196 taken 478 times.
4124 if (dtorFunc != nullptr && dtorFunc->implicitDefault)
249
1/2
✓ Branch 195 → 196 taken 1547 times.
✗ Branch 195 → 296 not taken.
1547 createDtorBodyPreamble(dtorFunc->bodyScope);
250
251 // Reset field symbols to declared state for the next manifestation
252
1/2
✓ Branch 196 → 197 taken 4124 times.
✗ Branch 196 → 296 not taken.
4124 manifestation->resetFieldSymbolsToDeclared(node);
253
254 // Clear type mapping
255 4124 typeMapping.clear();
256
257 // Return to the root scope
258 4124 currentScope = rootScope;
259
2/4
✓ Branch 198 → 199 taken 4124 times.
✗ Branch 198 → 201 not taken.
✓ Branch 199 → 200 taken 4124 times.
✗ Branch 199 → 201 not taken.
4124 assert(currentScope != nullptr && currentScope->type == ScopeType::GLOBAL);
260
261 4124 manIdx++; // Increase the manifestation index
262 4124 }
263 3061 manIdx = 0; // Reset the manifestation index
264
265
1/2
✓ Branch 215 → 216 taken 3061 times.
✗ Branch 215 → 300 not taken.
6122 return nullptr;
266 }
267
268 } // namespace spice::compiler
269