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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.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/closure.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 'dart:collection'; 5 import 'dart:collection';
6 6
7 import 'package:js_runtime/shared/embedded_names.dart'; 7 import 'package:js_runtime/shared/embedded_names.dart';
8 8
9 import '../closure.dart'; 9 import '../closure.dart';
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 if (!localsHandler.isBoxed(parameter)) { 1389 if (!localsHandler.isBoxed(parameter)) {
1390 bodyCallInputs.add(localsHandler.readLocal(parameter)); 1390 bodyCallInputs.add(localsHandler.readLocal(parameter));
1391 } 1391 }
1392 }); 1392 });
1393 1393
1394 // If there are locals that escape (ie mutated in closures), we 1394 // If there are locals that escape (ie mutated in closures), we
1395 // pass the box to the constructor. 1395 // pass the box to the constructor.
1396 // The box must be passed before any type variable. 1396 // The box must be passed before any type variable.
1397 ClosureAnalysisInfo scopeData = 1397 ClosureAnalysisInfo scopeData =
1398 closureDataLookup.getClosureAnalysisInfo(node); 1398 closureDataLookup.getClosureAnalysisInfo(node);
1399 if (scopeData.requiresContextBox()) { 1399 if (scopeData.requiresContextBox) {
1400 bodyCallInputs.add(localsHandler.readLocal(scopeData.context)); 1400 bodyCallInputs.add(localsHandler.readLocal(scopeData.context));
1401 } 1401 }
1402 1402
1403 // Type variables arguments must come after the box (if there is one). 1403 // Type variables arguments must come after the box (if there is one).
1404 ClassElement currentClass = constructor.enclosingClass; 1404 ClassElement currentClass = constructor.enclosingClass;
1405 if (rtiNeed.classNeedsRti(currentClass)) { 1405 if (rtiNeed.classNeedsRti(currentClass)) {
1406 // If [currentClass] needs RTI, we add the type variables as 1406 // If [currentClass] needs RTI, we add the type variables as
1407 // parameters of the generative constructor body. 1407 // parameters of the generative constructor body.
1408 currentClass.typeVariables 1408 currentClass.typeVariables
1409 .forEach((ResolutionTypeVariableType argument) { 1409 .forEach((ResolutionTypeVariableType argument) {
(...skipping 5457 matching lines...) Expand 10 before | Expand all | Expand 10 after
6867 this.oldReturnLocal, 6867 this.oldReturnLocal,
6868 this.oldReturnType, 6868 this.oldReturnType,
6869 this.oldResolvedAst, 6869 this.oldResolvedAst,
6870 this.oldStack, 6870 this.oldStack,
6871 this.oldLocalsHandler, 6871 this.oldLocalsHandler,
6872 this.inTryStatement, 6872 this.inTryStatement,
6873 this.allFunctionsCalledOnce, 6873 this.allFunctionsCalledOnce,
6874 this.oldElementInferenceResults) 6874 this.oldElementInferenceResults)
6875 : super(function); 6875 : super(function);
6876 } 6876 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698