| OLD | NEW |
| 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 import 'package:kernel/text/ast_to_text.dart' show debugNodeToString; | 6 import 'package:kernel/text/ast_to_text.dart' show debugNodeToString; |
| 7 | 7 |
| 8 import '../closure.dart'; | 8 import '../closure.dart'; |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 10 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 } | 208 } |
| 209 | 209 |
| 210 /// Pops the most recent instruction from the stack and 'boolifies' it. | 210 /// Pops the most recent instruction from the stack and 'boolifies' it. |
| 211 /// | 211 /// |
| 212 /// Boolification is checking if the value is '=== true'. | 212 /// Boolification is checking if the value is '=== true'. |
| 213 @override | 213 @override |
| 214 HInstruction popBoolified() { | 214 HInstruction popBoolified() { |
| 215 HInstruction value = pop(); | 215 HInstruction value = pop(); |
| 216 if (typeBuilder.checkOrTrustTypes) { | 216 if (typeBuilder.checkOrTrustTypes) { |
| 217 return typeBuilder.potentiallyCheckOrTrustType( | 217 return typeBuilder.potentiallyCheckOrTrustType( |
| 218 value, compiler.coreTypes.boolType, | 218 value, compiler.commonElements.boolType, |
| 219 kind: HTypeConversion.BOOLEAN_CONVERSION_CHECK); | 219 kind: HTypeConversion.BOOLEAN_CONVERSION_CHECK); |
| 220 } | 220 } |
| 221 HInstruction result = new HBoolify(value, commonMasks.boolType); | 221 HInstruction result = new HBoolify(value, commonMasks.boolType); |
| 222 add(result); | 222 add(result); |
| 223 return result; | 223 return result; |
| 224 } | 224 } |
| 225 | 225 |
| 226 /// Builds generative constructors. | 226 /// Builds generative constructors. |
| 227 /// | 227 /// |
| 228 /// Generative constructors are built in two stages. | 228 /// Generative constructors are built in two stages. |
| (...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2226 kernelBuilder.open(exitBlock); | 2226 kernelBuilder.open(exitBlock); |
| 2227 enterBlock.setBlockFlow( | 2227 enterBlock.setBlockFlow( |
| 2228 new HTryBlockInformation( | 2228 new HTryBlockInformation( |
| 2229 kernelBuilder.wrapStatementGraph(bodyGraph), | 2229 kernelBuilder.wrapStatementGraph(bodyGraph), |
| 2230 exception, | 2230 exception, |
| 2231 kernelBuilder.wrapStatementGraph(catchGraph), | 2231 kernelBuilder.wrapStatementGraph(catchGraph), |
| 2232 kernelBuilder.wrapStatementGraph(finallyGraph)), | 2232 kernelBuilder.wrapStatementGraph(finallyGraph)), |
| 2233 exitBlock); | 2233 exitBlock); |
| 2234 } | 2234 } |
| 2235 } | 2235 } |
| OLD | NEW |