| 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 library dart2js.kernel.env; | 5 library dart2js.kernel.env; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' as ir; | 7 import 'package:kernel/ast.dart' as ir; |
| 8 import 'package:kernel/clone.dart'; | 8 import 'package:kernel/clone.dart'; |
| 9 import 'package:kernel/type_algebra.dart'; | 9 import 'package:kernel/type_algebra.dart'; |
| 10 | 10 |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 } | 376 } |
| 377 | 377 |
| 378 @override | 378 @override |
| 379 FunctionData copy() { | 379 FunctionData copy() { |
| 380 return new FunctionData(node, functionNode); | 380 return new FunctionData(node, functionNode); |
| 381 } | 381 } |
| 382 } | 382 } |
| 383 | 383 |
| 384 class ConstructorData extends FunctionData { | 384 class ConstructorData extends FunctionData { |
| 385 ConstantConstructor _constantConstructor; | 385 ConstantConstructor _constantConstructor; |
| 386 ConstructorBodyEntity constructorBody; |
| 386 | 387 |
| 387 ConstructorData(ir.Member node, ir.FunctionNode functionNode) | 388 ConstructorData(ir.Member node, ir.FunctionNode functionNode) |
| 388 : super(node, functionNode); | 389 : super(node, functionNode); |
| 389 | 390 |
| 390 ConstantConstructor getConstructorConstant( | 391 ConstantConstructor getConstructorConstant( |
| 391 KernelToElementMapBase elementMap, ConstructorEntity constructor) { | 392 KernelToElementMapBase elementMap, ConstructorEntity constructor) { |
| 392 if (_constantConstructor == null) { | 393 if (_constantConstructor == null) { |
| 393 if (node is ir.Constructor && constructor.isConst) { | 394 if (node is ir.Constructor && constructor.isConst) { |
| 394 _constantConstructor = | 395 _constantConstructor = |
| 395 new Constantifier(elementMap).computeConstantConstructor(node); | 396 new Constantifier(elementMap).computeConstantConstructor(node); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 } | 430 } |
| 430 } | 431 } |
| 431 return _constant; | 432 return _constant; |
| 432 } | 433 } |
| 433 | 434 |
| 434 @override | 435 @override |
| 435 FieldData copy() { | 436 FieldData copy() { |
| 436 return new FieldData(node); | 437 return new FieldData(node); |
| 437 } | 438 } |
| 438 } | 439 } |
| OLD | NEW |