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

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

Issue 2829373002: dart2js: use ResolutionInterfaceType in SSA builders (Closed)
Patch Set: Created 3 years, 8 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/codegen.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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 constructorArguments.add(value); 270 constructorArguments.add(value);
271 }, includeSuperAndInjectedMembers: true); 271 }, includeSuperAndInjectedMembers: true);
272 272
273 // TODO(het): If the class needs runtime type information, add it as a 273 // TODO(het): If the class needs runtime type information, add it as a
274 // constructor argument. 274 // constructor argument.
275 HInstruction newObject = new HCreate( 275 HInstruction newObject = new HCreate(
276 astAdapter.getClass(constructor.enclosingClass), 276 astAdapter.getClass(constructor.enclosingClass),
277 constructorArguments, 277 constructorArguments,
278 new TypeMask.nonNullExact( 278 new TypeMask.nonNullExact(
279 astAdapter.getClass(constructor.enclosingClass), closedWorld), 279 astAdapter.getClass(constructor.enclosingClass), closedWorld),
280 instantiatedTypes: <DartType>[ 280 instantiatedTypes: <ResolutionInterfaceType>[
281 astAdapter.getClass(constructor.enclosingClass).thisType 281 astAdapter.getClass(constructor.enclosingClass).thisType
282 ], 282 ],
283 hasRtiInput: false); 283 hasRtiInput: false);
284 284
285 add(newObject); 285 add(newObject);
286 286
287 // Generate calls to the constructor bodies. 287 // Generate calls to the constructor bodies.
288 288
289 for (ir.Constructor body in constructorChain.reversed) { 289 for (ir.Constructor body in constructorChain.reversed) {
290 if (_isEmptyStatement(body.function.body)) continue; 290 if (_isEmptyStatement(body.function.body)) continue;
(...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after
2510 push(new HStringConcat(inputs[0], inputs[1], commonMasks.stringType)); 2510 push(new HStringConcat(inputs[0], inputs[1], commonMasks.stringType));
2511 } 2511 }
2512 2512
2513 void _pushStaticInvocation( 2513 void _pushStaticInvocation(
2514 ir.Member target, List<HInstruction> arguments, TypeMask typeMask) { 2514 ir.Member target, List<HInstruction> arguments, TypeMask typeMask) {
2515 HInvokeStatic instruction = new HInvokeStatic( 2515 HInvokeStatic instruction = new HInvokeStatic(
2516 astAdapter.getMember(target), arguments, typeMask, 2516 astAdapter.getMember(target), arguments, typeMask,
2517 targetCanThrow: astAdapter.getCanThrow(target, closedWorld)); 2517 targetCanThrow: astAdapter.getCanThrow(target, closedWorld));
2518 if (currentImplicitInstantiations.isNotEmpty) { 2518 if (currentImplicitInstantiations.isNotEmpty) {
2519 instruction.instantiatedTypes = 2519 instruction.instantiatedTypes =
2520 new List<ResolutionDartType>.from(currentImplicitInstantiations); 2520 new List<ResolutionInterfaceType>.from(currentImplicitInstantiations);
2521 } 2521 }
2522 instruction.sideEffects = astAdapter.getSideEffects(target, closedWorld); 2522 instruction.sideEffects = astAdapter.getSideEffects(target, closedWorld);
2523 2523
2524 push(instruction); 2524 push(instruction);
2525 } 2525 }
2526 2526
2527 void _pushDynamicInvocation( 2527 void _pushDynamicInvocation(
2528 ir.Node node, TypeMask mask, List<HInstruction> arguments, 2528 ir.Node node, TypeMask mask, List<HInstruction> arguments,
2529 {Selector selector}) { 2529 {Selector selector}) {
2530 HInstruction receiver = arguments.first; 2530 HInstruction receiver = arguments.first;
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
3219 enterBlock.setBlockFlow( 3219 enterBlock.setBlockFlow(
3220 new HTryBlockInformation( 3220 new HTryBlockInformation(
3221 kernelBuilder.wrapStatementGraph(bodyGraph), 3221 kernelBuilder.wrapStatementGraph(bodyGraph),
3222 exception, 3222 exception,
3223 kernelBuilder.wrapStatementGraph(catchGraph), 3223 kernelBuilder.wrapStatementGraph(catchGraph),
3224 kernelBuilder.wrapStatementGraph(finallyGraph)), 3224 kernelBuilder.wrapStatementGraph(finallyGraph)),
3225 exitBlock); 3225 exitBlock);
3226 kernelBuilder.inTryStatement = previouslyInTryStatement; 3226 kernelBuilder.inTryStatement = previouslyInTryStatement;
3227 } 3227 }
3228 } 3228 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698