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

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

Issue 54473003: Fix a bug in the way we deal with HTypeKnown instructions in our SSA type propagation phase. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart » ('j') | 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) 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 } 168 }
169 169
170 class HInstructionStringifier implements HVisitor<String> { 170 class HInstructionStringifier implements HVisitor<String> {
171 final Compiler compiler; 171 final Compiler compiler;
172 final JavaScriptItemCompilationContext context; 172 final JavaScriptItemCompilationContext context;
173 final HBasicBlock currentBlock; 173 final HBasicBlock currentBlock;
174 174
175 HInstructionStringifier(this.context, this.currentBlock, this.compiler); 175 HInstructionStringifier(this.context, this.currentBlock, this.compiler);
176 176
177 visit(HInstruction node) => node.accept(this); 177 visit(HInstruction node) => '${node.accept(this)} ${node.instructionType}';
178 178
179 String temporaryId(HInstruction instruction) { 179 String temporaryId(HInstruction instruction) {
180 String prefix; 180 String prefix;
181 HType type = instruction.instructionType; 181 HType type = instruction.instructionType;
182 if (type.isNull()) { 182 if (type.isNull()) {
183 prefix = 'u'; 183 prefix = 'u';
184 } else if (type.isConflicting()) { 184 } else if (type.isConflicting()) {
185 prefix = 'c'; 185 prefix = 'c';
186 } else if (type.isExtendableArray(compiler)) { 186 } else if (type.isExtendableArray(compiler)) {
187 prefix = 'e'; 187 prefix = 'e';
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 515
516 String visitTypeKnown(HTypeKnown node) { 516 String visitTypeKnown(HTypeKnown node) {
517 assert(node.inputs.length == 1); 517 assert(node.inputs.length == 1);
518 return "TypeKnown: ${temporaryId(node.checkedInput)} is ${node.knownType}"; 518 return "TypeKnown: ${temporaryId(node.checkedInput)} is ${node.knownType}";
519 } 519 }
520 520
521 String visitRangeConversion(HRangeConversion node) { 521 String visitRangeConversion(HRangeConversion node) {
522 return "RangeConversion: ${node.checkedInput}"; 522 return "RangeConversion: ${node.checkedInput}";
523 } 523 }
524 } 524 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698