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: runtime/vm/intermediate_language.cc

Issue 62203018: Remove dead code from IfThenElse and StrictCompare in the compiler. (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 | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('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 #include "vm/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 comparison->InputAt(i)->set_instruction(this); 765 comparison->InputAt(i)->set_instruction(this);
766 } 766 }
767 } 767 }
768 768
769 769
770 void BranchInstr::RawSetInputAt(intptr_t i, Value* value) { 770 void BranchInstr::RawSetInputAt(intptr_t i, Value* value) {
771 comparison()->RawSetInputAt(i, value); 771 comparison()->RawSetInputAt(i, value);
772 } 772 }
773 773
774 774
775 // A misleadingly named function for use in template functions that replace
776 // both definitions with definitions and branch comparisons with
777 // comparisons. In the branch case, leave the branch intact and replace its
778 // comparison with a new comparison not currently in the graph.
779 void BranchInstr::ReplaceWith(ComparisonInstr* other,
780 ForwardInstructionIterator* ignored) {
781 SetComparison(other);
782 }
783
784
785 void BranchInstr::SetComparison(ComparisonInstr* new_comparison) { 775 void BranchInstr::SetComparison(ComparisonInstr* new_comparison) {
786 for (intptr_t i = new_comparison->InputCount() - 1; i >= 0; --i) { 776 for (intptr_t i = new_comparison->InputCount() - 1; i >= 0; --i) {
787 Value* input = new_comparison->InputAt(i); 777 Value* input = new_comparison->InputAt(i);
788 input->definition()->AddInputUse(input); 778 input->definition()->AddInputUse(input);
789 input->set_instruction(this); 779 input->set_instruction(this);
790 } 780 }
791 // There should be no need to copy or unuse an environment. 781 // There should be no need to copy or unuse an environment.
792 ASSERT(comparison()->env() == NULL); 782 ASSERT(comparison()->env() == NULL);
793 ASSERT(new_comparison->env() == NULL); 783 ASSERT(new_comparison->env() == NULL);
794 // Remove the current comparison's input uses. 784 // Remove the current comparison's input uses.
(...skipping 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2944 return kCosRuntimeEntry; 2934 return kCosRuntimeEntry;
2945 default: 2935 default:
2946 UNREACHABLE(); 2936 UNREACHABLE();
2947 } 2937 }
2948 return kSinRuntimeEntry; 2938 return kSinRuntimeEntry;
2949 } 2939 }
2950 2940
2951 #undef __ 2941 #undef __
2952 2942
2953 } // namespace dart 2943 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698