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

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

Issue 1413213004: Move remaining helpers to BackendHelpers (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of ssa; 5 part of ssa;
6 6
7 /** 7 /**
8 * [InvokeDynamicSpecializer] and its subclasses are helpers to 8 * [InvokeDynamicSpecializer] and its subclasses are helpers to
9 * optimize intercepted dynamic calls. It knows what input types 9 * optimize intercepted dynamic calls. It knows what input types
10 * would be beneficial for performance, and how to change a invoke 10 * would be beneficial for performance, and how to change a invoke
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 return left.isUInt31(compiler) && right.isUInt31(compiler); 231 return left.isUInt31(compiler) && right.isUInt31(compiler);
232 } 232 }
233 233
234 HInstruction newBuiltinVariant(HInvokeDynamic instruction, Compiler compiler); 234 HInstruction newBuiltinVariant(HInvokeDynamic instruction, Compiler compiler);
235 235
236 Selector renameToOptimizedSelector(String name, 236 Selector renameToOptimizedSelector(String name,
237 Selector selector, 237 Selector selector,
238 Compiler compiler) { 238 Compiler compiler) {
239 if (selector.name == name) return selector; 239 if (selector.name == name) return selector;
240 JavaScriptBackend backend = compiler.backend; 240 JavaScriptBackend backend = compiler.backend;
241 return new Selector.call(new Name(name, backend.interceptorsLibrary), 241 return new Selector.call(
242 new Name(name, backend.helpers.interceptorsLibrary),
242 new CallStructure(selector.argumentCount)); 243 new CallStructure(selector.argumentCount));
243 } 244 }
244 } 245 }
245 246
246 class AddSpecializer extends BinaryArithmeticSpecializer { 247 class AddSpecializer extends BinaryArithmeticSpecializer {
247 const AddSpecializer(); 248 const AddSpecializer();
248 249
249 TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction, 250 TypeMask computeTypeFromInputTypes(HInvokeDynamic instruction,
250 Compiler compiler) { 251 Compiler compiler) {
251 if (inputsAreUInt31(instruction, compiler)) { 252 if (inputsAreUInt31(instruction, compiler)) {
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 return constantSystem.codeUnitAt; 761 return constantSystem.codeUnitAt;
761 } 762 }
762 763
763 HInstruction tryConvertToBuiltin(HInvokeDynamic instruction, 764 HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
764 Compiler compiler) { 765 Compiler compiler) {
765 // TODO(sra): Implement a builtin HCodeUnitAt instruction and the same index 766 // TODO(sra): Implement a builtin HCodeUnitAt instruction and the same index
766 // bounds checking optimizations as for HIndex. 767 // bounds checking optimizations as for HIndex.
767 return null; 768 return null;
768 } 769 }
769 } 770 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/interceptor_simplifier.dart ('k') | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698