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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/tracer.dart

Issue 14416014: After a dynamic call, refine the receiver type by looking at the potential targets of that call. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
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 library tracer; 5 library tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 8
9 import 'ssa.dart'; 9 import 'ssa.dart';
10 import '../js_backend/js_backend.dart'; 10 import '../js_backend/js_backend.dart';
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 void addInstructions(HInstructionStringifier stringifier, 77 void addInstructions(HInstructionStringifier stringifier,
78 HInstructionList list) { 78 HInstructionList list) {
79 for (HInstruction instruction = list.first; 79 for (HInstruction instruction = list.first;
80 instruction != null; 80 instruction != null;
81 instruction = instruction.next) { 81 instruction = instruction.next) {
82 int bci = 0; 82 int bci = 0;
83 int uses = instruction.usedBy.length; 83 int uses = instruction.usedBy.length;
84 String changes = instruction.hasSideEffects() ? '!' : ' '; 84 String changes = instruction.hasSideEffects() ? '!' : ' ';
85 String depends = instruction.dependsOnSomething() ? '?' : ''; 85 String depends = instruction.dependsOnSomething() ? '?' : '';
86 String usesGvn = instruction.useGvn() ? 'G' : '';
86 addIndent(); 87 addIndent();
87 String temporaryId = stringifier.temporaryId(instruction); 88 String temporaryId = stringifier.temporaryId(instruction);
88 String instructionString = stringifier.visit(instruction); 89 String instructionString = stringifier.visit(instruction);
89 add("$bci $uses $temporaryId $instructionString $changes $depends <|@\n"); 90 add("$bci $uses $temporaryId $instructionString "
91 "$changes $depends $usesGvn <|@\n");
90 } 92 }
91 } 93 }
92 94
93 void visitBasicBlock(HBasicBlock block) { 95 void visitBasicBlock(HBasicBlock block) {
94 HInstructionStringifier stringifier = 96 HInstructionStringifier stringifier =
95 new HInstructionStringifier(context, block); 97 new HInstructionStringifier(context, block);
96 assert(block.id != null); 98 assert(block.id != null);
97 tag("block", () { 99 tag("block", () {
98 printProperty("name", "B${block.id}"); 100 printProperty("name", "B${block.id}");
99 printProperty("from_bci", -1); 101 printProperty("from_bci", -1);
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 551
550 String visitTypeConversion(HTypeConversion node) { 552 String visitTypeConversion(HTypeConversion node) {
551 return "TypeConversion: ${temporaryId(node.checkedInput)} to " 553 return "TypeConversion: ${temporaryId(node.checkedInput)} to "
552 "${node.instructionType}"; 554 "${node.instructionType}";
553 } 555 }
554 556
555 String visitRangeConversion(HRangeConversion node) { 557 String visitRangeConversion(HRangeConversion node) {
556 return "RangeConversion: ${node.checkedInput}"; 558 return "RangeConversion: ${node.checkedInput}";
557 } 559 }
558 } 560 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/optimize.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698