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

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

Issue 2653203002: Use entities in CommonElements interface. (Closed)
Patch Set: Created 3 years, 11 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/kernel_ast_adapter.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, CodegenWorkItem; 9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
10 import '../common/names.dart'; 10 import '../common/names.dart';
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 closeFunction(); 221 closeFunction();
222 } 222 }
223 223
224 /// Pops the most recent instruction from the stack and 'boolifies' it. 224 /// Pops the most recent instruction from the stack and 'boolifies' it.
225 /// 225 ///
226 /// Boolification is checking if the value is '=== true'. 226 /// Boolification is checking if the value is '=== true'.
227 @override 227 @override
228 HInstruction popBoolified() { 228 HInstruction popBoolified() {
229 HInstruction value = pop(); 229 HInstruction value = pop();
230 if (typeBuilder.checkOrTrustTypes) { 230 if (typeBuilder.checkOrTrustTypes) {
231 return typeBuilder.potentiallyCheckOrTrustType( 231 ResolutionInterfaceType type = compiler.commonElements.boolType;
232 value, compiler.commonElements.boolType, 232 return typeBuilder.potentiallyCheckOrTrustType(value, type,
233 kind: HTypeConversion.BOOLEAN_CONVERSION_CHECK); 233 kind: HTypeConversion.BOOLEAN_CONVERSION_CHECK);
234 } 234 }
235 HInstruction result = new HBoolify(value, commonMasks.boolType); 235 HInstruction result = new HBoolify(value, commonMasks.boolType);
236 add(result); 236 add(result);
237 return result; 237 return result;
238 } 238 }
239 239
240 void _addClassTypeVariablesIfNeeded(ir.Member constructor) { 240 void _addClassTypeVariablesIfNeeded(ir.Member constructor) {
241 var enclosing = constructor.enclosingClass; 241 var enclosing = constructor.enclosingClass;
242 if (backend.classNeedsRti(astAdapter.getElement(enclosing))) { 242 if (backend.classNeedsRti(astAdapter.getElement(enclosing))) {
(...skipping 2847 matching lines...) Expand 10 before | Expand all | Expand 10 after
3090 enterBlock.setBlockFlow( 3090 enterBlock.setBlockFlow(
3091 new HTryBlockInformation( 3091 new HTryBlockInformation(
3092 kernelBuilder.wrapStatementGraph(bodyGraph), 3092 kernelBuilder.wrapStatementGraph(bodyGraph),
3093 exception, 3093 exception,
3094 kernelBuilder.wrapStatementGraph(catchGraph), 3094 kernelBuilder.wrapStatementGraph(catchGraph),
3095 kernelBuilder.wrapStatementGraph(finallyGraph)), 3095 kernelBuilder.wrapStatementGraph(finallyGraph)),
3096 exitBlock); 3096 exitBlock);
3097 kernelBuilder.inTryStatement = previouslyInTryStatement; 3097 kernelBuilder.inTryStatement = previouslyInTryStatement;
3098 } 3098 }
3099 } 3099 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698