Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: pkg/compiler/lib/src/ssa/builder_kernel.dart

Issue 2936323003: Make requiresContextBox a getter as per Siggi's suggestion. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/locals_handler.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/codegen.dart' show CodegenRegistry; 9 import '../common/codegen.dart' show CodegenRegistry;
10 import '../common/names.dart'; 10 import '../common/names.dart';
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 // Provide the parameters to the generative constructor body. 334 // Provide the parameters to the generative constructor body.
335 body.function.positionalParameters.forEach(handleParameter); 335 body.function.positionalParameters.forEach(handleParameter);
336 body.function.namedParameters.toList() 336 body.function.namedParameters.toList()
337 ..sort(namedOrdering) 337 ..sort(namedOrdering)
338 ..forEach(handleParameter); 338 ..forEach(handleParameter);
339 339
340 // If there are locals that escape (i.e. mutated in closures), we pass the 340 // If there are locals that escape (i.e. mutated in closures), we pass the
341 // box to the constructor. 341 // box to the constructor.
342 ClosureAnalysisInfo scopeData = closureDataLookup 342 ClosureAnalysisInfo scopeData = closureDataLookup
343 .getClosureAnalysisInfo(constructorElement.resolvedAst.node); 343 .getClosureAnalysisInfo(constructorElement.resolvedAst.node);
344 if (scopeData.requiresContextBox()) { 344 if (scopeData.requiresContextBox) {
345 bodyCallInputs.add(localsHandler.readLocal(scopeData.context)); 345 bodyCallInputs.add(localsHandler.readLocal(scopeData.context));
346 } 346 }
347 347
348 // Pass type arguments. 348 // Pass type arguments.
349 ir.Class currentClass = body.enclosingClass; 349 ir.Class currentClass = body.enclosingClass;
350 if (backend.rtiNeed.classNeedsRti(_elementMap.getClass(currentClass))) { 350 if (backend.rtiNeed.classNeedsRti(_elementMap.getClass(currentClass))) {
351 for (ir.DartType typeParameter in currentClass.thisType.typeArguments) { 351 for (ir.DartType typeParameter in currentClass.thisType.typeArguments) {
352 HInstruction argument = localsHandler.readLocal(localsHandler 352 HInstruction argument = localsHandler.readLocal(localsHandler
353 .getTypeVariableAsLocal(_elementMap.getDartType(typeParameter) 353 .getTypeVariableAsLocal(_elementMap.getDartType(typeParameter)
354 as ResolutionTypeVariableType)); 354 as ResolutionTypeVariableType));
(...skipping 3116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3471 enterBlock.setBlockFlow( 3471 enterBlock.setBlockFlow(
3472 new HTryBlockInformation( 3472 new HTryBlockInformation(
3473 kernelBuilder.wrapStatementGraph(bodyGraph), 3473 kernelBuilder.wrapStatementGraph(bodyGraph),
3474 exception, 3474 exception,
3475 kernelBuilder.wrapStatementGraph(catchGraph), 3475 kernelBuilder.wrapStatementGraph(catchGraph),
3476 kernelBuilder.wrapStatementGraph(finallyGraph)), 3476 kernelBuilder.wrapStatementGraph(finallyGraph)),
3477 exitBlock); 3477 exitBlock);
3478 kernelBuilder.inTryStatement = previouslyInTryStatement; 3478 kernelBuilder.inTryStatement = previouslyInTryStatement;
3479 } 3479 }
3480 } 3480 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/locals_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698