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

Side by Side Diff: src/hydrogen.cc

Issue 6611020: Reorganize code for range analysis and suppress unnecessary debug printing of... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 9 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 | src/hydrogen-instructions.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 InferControlFlowRange(inverted_op, compare->right(), compare->left()); 860 InferControlFlowRange(inverted_op, compare->right(), compare->left());
861 } 861 }
862 } 862 }
863 863
864 864
865 // We know that value [op] other. Use this information to update the range on 865 // We know that value [op] other. Use this information to update the range on
866 // value. 866 // value.
867 void HRangeAnalysis::InferControlFlowRange(Token::Value op, 867 void HRangeAnalysis::InferControlFlowRange(Token::Value op,
868 HValue* value, 868 HValue* value,
869 HValue* other) { 869 HValue* other) {
870 Range* range = other->range(); 870 Range temp_range;
871 if (range == NULL) range = new Range(); 871 Range* range = other->range() != NULL ? other->range() : &temp_range;
872 Range* new_range = NULL; 872 Range* new_range = NULL;
873 873
874 TraceRange("Control flow range infer %d %s %d\n", 874 TraceRange("Control flow range infer %d %s %d\n",
875 value->id(), 875 value->id(),
876 Token::Name(op), 876 Token::Name(op),
877 other->id()); 877 other->id());
878 878
879 if (op == Token::EQ || op == Token::EQ_STRICT) { 879 if (op == Token::EQ || op == Token::EQ_STRICT) {
880 // The same range has to apply for value. 880 // The same range has to apply for value.
881 new_range = range->Copy(); 881 new_range = range->Copy();
(...skipping 5119 matching lines...) Expand 10 before | Expand all | Expand 10 after
6001 } 6001 }
6002 } 6002 }
6003 6003
6004 #ifdef DEBUG 6004 #ifdef DEBUG
6005 if (graph_ != NULL) graph_->Verify(); 6005 if (graph_ != NULL) graph_->Verify();
6006 if (allocator_ != NULL) allocator_->Verify(); 6006 if (allocator_ != NULL) allocator_->Verify();
6007 #endif 6007 #endif
6008 } 6008 }
6009 6009
6010 } } // namespace v8::internal 6010 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698