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

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

Issue 2323733002: Compute ResolutionImpact directly from kernel, part 1 of ? (Closed)
Patch Set: dartfmt Created 4 years, 3 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 'dart:collection'; 5 import 'dart:collection';
6 6
7 import 'package:js_runtime/shared/embedded_names.dart'; 7 import 'package:js_runtime/shared/embedded_names.dart';
8 8
9 import '../closure.dart'; 9 import '../closure.dart';
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 HInstruction newObject; 1495 HInstruction newObject;
1496 if (!isNativeUpgradeFactory) { 1496 if (!isNativeUpgradeFactory) {
1497 // Create the runtime type information, if needed. 1497 // Create the runtime type information, if needed.
1498 bool hasRtiInput = false; 1498 bool hasRtiInput = false;
1499 if (backend.classNeedsRtiField(classElement)) { 1499 if (backend.classNeedsRtiField(classElement)) {
1500 // Read the values of the type arguments and create a 1500 // Read the values of the type arguments and create a
1501 // HTypeInfoExpression to set on the newly create object. 1501 // HTypeInfoExpression to set on the newly create object.
1502 hasRtiInput = true; 1502 hasRtiInput = true;
1503 List<HInstruction> typeArguments = <HInstruction>[]; 1503 List<HInstruction> typeArguments = <HInstruction>[];
1504 classElement.typeVariables.forEach((TypeVariableType typeVariable) { 1504 classElement.typeVariables.forEach((TypeVariableType typeVariable) {
1505 HInstruction argument = localsHandler 1505 HInstruction argument = localsHandler
1506 .readLocal(localsHandler.getTypeVariableAsLocal(typeVariable)); 1506 .readLocal(localsHandler.getTypeVariableAsLocal(typeVariable));
1507 typeArguments.add(argument); 1507 typeArguments.add(argument);
1508 }); 1508 });
1509 1509
1510 HInstruction typeInfo = new HTypeInfoExpression( 1510 HInstruction typeInfo = new HTypeInfoExpression(
1511 TypeInfoExpressionKind.INSTANCE, 1511 TypeInfoExpressionKind.INSTANCE,
1512 classElement.thisType, 1512 classElement.thisType,
1513 typeArguments, 1513 typeArguments,
1514 backend.dynamicType); 1514 backend.dynamicType);
1515 add(typeInfo); 1515 add(typeInfo);
1516 constructorArguments.add(typeInfo); 1516 constructorArguments.add(typeInfo);
1517 } 1517 }
1518 1518
(...skipping 6037 matching lines...) Expand 10 before | Expand all | Expand 10 after
7556 const _LoopTypeVisitor(); 7556 const _LoopTypeVisitor();
7557 int visitNode(ast.Node node) => HLoopBlockInformation.NOT_A_LOOP; 7557 int visitNode(ast.Node node) => HLoopBlockInformation.NOT_A_LOOP;
7558 int visitWhile(ast.While node) => HLoopBlockInformation.WHILE_LOOP; 7558 int visitWhile(ast.While node) => HLoopBlockInformation.WHILE_LOOP;
7559 int visitFor(ast.For node) => HLoopBlockInformation.FOR_LOOP; 7559 int visitFor(ast.For node) => HLoopBlockInformation.FOR_LOOP;
7560 int visitDoWhile(ast.DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP; 7560 int visitDoWhile(ast.DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP;
7561 int visitAsyncForIn(ast.AsyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; 7561 int visitAsyncForIn(ast.AsyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP;
7562 int visitSyncForIn(ast.SyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; 7562 int visitSyncForIn(ast.SyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP;
7563 int visitSwitchStatement(ast.SwitchStatement node) => 7563 int visitSwitchStatement(ast.SwitchStatement node) =>
7564 HLoopBlockInformation.SWITCH_CONTINUE_LOOP; 7564 HLoopBlockInformation.SWITCH_CONTINUE_LOOP;
7565 } 7565 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698