| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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/tasks.dart'; | 9 import '../common/tasks.dart'; |
| 10 import '../elements/entities.dart'; | 10 import '../elements/entities.dart'; |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 final String name; | 381 final String name; |
| 382 final ir.TreeNode executableContext; | 382 final ir.TreeNode executableContext; |
| 383 NodeBox(this.name, this.executableContext); | 383 NodeBox(this.name, this.executableContext); |
| 384 } | 384 } |
| 385 | 385 |
| 386 class JClosureField extends JField { | 386 class JClosureField extends JField { |
| 387 JClosureField(String name, int memberIndex, | 387 JClosureField(String name, int memberIndex, |
| 388 KernelClosureClass containingClass, bool isConst, bool isAssignable) | 388 KernelClosureClass containingClass, bool isConst, bool isAssignable) |
| 389 : super(memberIndex, containingClass.library, containingClass, | 389 : super(memberIndex, containingClass.library, containingClass, |
| 390 new Name(name, containingClass.library), | 390 new Name(name, containingClass.library), |
| 391 isAssignable: isAssignable, isConst: isConst); | 391 isAssignable: isAssignable, isConst: isConst, isStatic: false); |
| 392 } | 392 } |
| 393 | 393 |
| 394 /// A ClosureField that has been "boxed" to prevent name shadowing with the | 394 /// A ClosureField that has been "boxed" to prevent name shadowing with the |
| 395 /// original variable and ensure that this variable is updated/read with the | 395 /// original variable and ensure that this variable is updated/read with the |
| 396 /// most recent value. | 396 /// most recent value. |
| 397 /// This corresponds to BoxFieldElement; we reuse BoxLocal from the original | 397 /// This corresponds to BoxFieldElement; we reuse BoxLocal from the original |
| 398 /// algorithm to correspond to the actual name of the variable. | 398 /// algorithm to correspond to the actual name of the variable. |
| 399 class JBoxedField extends JField { | 399 class JBoxedField extends JField { |
| 400 final BoxLocal box; | 400 final BoxLocal box; |
| 401 JBoxedField(String name, int memberIndex, this.box, | 401 JBoxedField(String name, int memberIndex, this.box, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 KernelScopeInfo scopeInfo; | 441 KernelScopeInfo scopeInfo; |
| 442 | 442 |
| 443 /// Collected [CapturedScope] data for nodes. | 443 /// Collected [CapturedScope] data for nodes. |
| 444 Map<ir.Node, KernelCapturedScope> capturedScopesMap = | 444 Map<ir.Node, KernelCapturedScope> capturedScopesMap = |
| 445 <ir.Node, KernelCapturedScope>{}; | 445 <ir.Node, KernelCapturedScope>{}; |
| 446 | 446 |
| 447 /// Collected [ScopeInfo] data for nodes. | 447 /// Collected [ScopeInfo] data for nodes. |
| 448 Map<ir.FunctionNode, KernelScopeInfo> closuresToGenerate = | 448 Map<ir.FunctionNode, KernelScopeInfo> closuresToGenerate = |
| 449 <ir.FunctionNode, KernelScopeInfo>{}; | 449 <ir.FunctionNode, KernelScopeInfo>{}; |
| 450 } | 450 } |
| OLD | NEW |