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

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

Issue 23883004: Fix bug http://code.google.com/p/dart/issues/detail?id=12941 by doing speculative optimizations eve… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class BailoutInfo { 7 class BailoutInfo {
8 int instructionId; 8 int instructionId;
9 int bailoutId; 9 int bailoutId;
10 BailoutInfo(this.instructionId, this.bailoutId); 10 BailoutInfo(this.instructionId, this.bailoutId);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 bool get hasTypeGuards => work.guards.length != 0; 116 bool get hasTypeGuards => work.guards.length != 0;
117 117
118 bool isUsedWithIncompatibleSelector(HInstruction instruction, 118 bool isUsedWithIncompatibleSelector(HInstruction instruction,
119 HType speculativeType) { 119 HType speculativeType) {
120 for (HInstruction user in instruction.usedBy) { 120 for (HInstruction user in instruction.usedBy) {
121 if (user is HCheck 121 if (user is HCheck
122 && isUsedWithIncompatibleSelector(user, speculativeType)) { 122 && isUsedWithIncompatibleSelector(user, speculativeType)) {
123 return true; 123 return true;
124 } else if (user.selector != null 124 } else if (user.selector != null
125 && user.getDartReceiver(compiler) == instruction 125 && user.getDartReceiver(compiler) == instruction
126 && !speculativeType.computeMask(compiler).willHit( 126 && !speculativeType.computeMask(compiler).understands(
127 user.selector, compiler)) { 127 user.selector, compiler)) {
128 return true; 128 return true;
129 } 129 }
130 } 130 }
131 return false; 131 return false;
132 } 132 }
133 133
134 bool typeGuardWouldBeValuable(HInstruction instruction, 134 bool typeGuardWouldBeValuable(HInstruction instruction,
135 HType speculativeType) { 135 HType speculativeType) {
136 // If the type itself is not valuable, do not generate a guard for it. 136 // If the type itself is not valuable, do not generate a guard for it.
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 hasComplexBailoutTargets = true; 700 hasComplexBailoutTargets = true;
701 } 701 }
702 } else { 702 } else {
703 hasComplexBailoutTargets = true; 703 hasComplexBailoutTargets = true;
704 blocks.forEach((HBasicBlock block) { 704 blocks.forEach((HBasicBlock block) {
705 block.bailoutTargets.add(target); 705 block.bailoutTargets.add(target);
706 }); 706 });
707 } 707 }
708 } 708 }
709 } 709 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698