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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/insert_refinements.dart

Issue 1572423002: cpsir: fix co19 test - use process* instead of visit* (we unadvertly removed code that recursed int… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 cps_ir.optimization.insert_refinements; 5 library cps_ir.optimization.insert_refinements;
6 6
7 import 'dart:math' show min; 7 import 'dart:math' show min;
8 import 'optimizers.dart' show Pass; 8 import 'optimizers.dart' show Pass;
9 import 'cps_ir_nodes.dart'; 9 import 'cps_ir_nodes.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 TypeMask argSuccessType = argumentSuccessTypes[i]; 120 TypeMask argSuccessType = argumentSuccessTypes[i];
121 121
122 // Skip arguments that provide no refinement. 122 // Skip arguments that provide no refinement.
123 if (argSuccessType == types.dynamicType) continue; 123 if (argSuccessType == types.dynamicType) continue;
124 124
125 applyRefinement(node.parent, 125 applyRefinement(node.parent,
126 new Refinement(node.dartArgument(i), argSuccessType)); 126 new Refinement(node.dartArgument(i), argSuccessType));
127 } 127 }
128 } 128 }
129 129
130 void visitInvokeStatic(InvokeStatic node) { 130 void processInvokeStatic(InvokeStatic node) {
asgerf 2016/01/11 21:35:06 Please do like in visitInvokeMethod and visitTypeT
Siggi Cherem (dart-lang) 2016/01/11 21:51:09 good catch! Done. Before I sent this I haven't ye
131 _refineArguments(node, 131 _refineArguments(node,
132 _getSuccessTypesForStaticMethod(types, node.target)); 132 _getSuccessTypesForStaticMethod(types, node.target));
133 } 133 }
134 134
135 void visitInvokeMethod(InvokeMethod node) { 135 void visitInvokeMethod(InvokeMethod node) {
136 // Update references to their current refined values. 136 // Update references to their current refined values.
137 processReference(node.receiver); 137 processReference(node.receiver);
138 node.arguments.forEach(processReference); 138 node.arguments.forEach(processReference);
139 139
140 // If the call is intercepted, we want to refine the actual receiver, 140 // If the call is intercepted, we want to refine the actual receiver,
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 case 'exp': 425 case 'exp':
426 case 'log': 426 case 'log':
427 return [types.numType]; 427 return [types.numType];
428 case 'pow': 428 case 'pow':
429 return [types.numType, types.numType]; 429 return [types.numType, types.numType];
430 } 430 }
431 } 431 }
432 432
433 return null; 433 return null;
434 } 434 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698