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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart

Issue 17028011: Implement a list tracer phase, that tries to find element types in individual lists. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart (revision 24023)
+++ sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart (working copy)
@@ -154,18 +154,18 @@
HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
Compiler compiler) {
- if (instruction.inputs[1].isIndexable(compiler)) {
- if (!instruction.inputs[2].isInteger() && compiler.enableTypeAssertions) {
- // We want the right checked mode error.
- return null;
- }
- HInstruction index = new HIndex(
- instruction.inputs[1], instruction.inputs[2], instruction.selector);
- index.instructionType =
- new HType.inferredTypeForSelector(instruction.selector, compiler);
- return index;
+ if (!instruction.inputs[1].isIndexable(compiler)) return null;
+ if (!instruction.inputs[2].isInteger() && compiler.enableTypeAssertions) {
+ // We want the right checked mode error.
+ return null;
}
- return null;
+ HInstruction index = new HIndex(
+ instruction.inputs[1], instruction.inputs[2], instruction.selector);
+ HType receiverType = instruction.getDartReceiver(compiler).instructionType;
+ Selector refined = receiverType.refine(instruction.selector, compiler);
+ HType type = new HType.inferredTypeForSelector(refined, compiler);
+ index.instructionType = type;
+ return index;
}
bool hasBuiltinVariant(HInvokeDynamic instruction, Compiler compiler) {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698