Skip to content

Commit 5de3fbf

Browse files
committed
Unnecessary new _BlockCompilers
1 parent 8d6461e commit 5de3fbf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tool/mustachio/codegen_aot_compiler.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class _BlockCompiler {
312312
var variableAccess = variableLookup.name;
313313
if (invert) {
314314
writeln('if ($variableAccess?.isEmpty ?? true) {');
315-
await _BlockCompiler(_templateCompiler, _contextStack)._compile(block);
315+
await _compile(block);
316316
writeln('}');
317317
} else {
318318
var variableAccessResult = getNewContextName();
@@ -330,7 +330,7 @@ class _BlockCompiler {
330330
var innerContextType = iterableType.typeArguments.first;
331331
var innerContext = _VariableLookup(innerContextType, newContextName);
332332
_contextStack.push(innerContext);
333-
await _BlockCompiler(_templateCompiler, _contextStack)._compile(block);
333+
await _compile(block);
334334
_contextStack.pop();
335335
writeln(' }');
336336
writeln('}');
@@ -344,15 +344,15 @@ class _BlockCompiler {
344344
var variableAccess = variableLookup.name;
345345
if (invert) {
346346
writeln('if ($variableAccess == null) {');
347-
await _BlockCompiler(_templateCompiler, _contextStack)._compile(block);
347+
await _compile(block);
348348
writeln('}');
349349
} else {
350350
var innerContextName = getNewContextName();
351351
writeln('var $innerContextName = $variableAccess;');
352352
writeln('if ($innerContextName != null) {');
353353
var innerContext = _VariableLookup(variableLookup.type, innerContextName);
354354
_contextStack.push(innerContext);
355-
await _BlockCompiler(_templateCompiler, _contextStack)._compile(block);
355+
await _compile(block);
356356
_contextStack.pop();
357357
writeln('}');
358358
}

0 commit comments

Comments
 (0)