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

Side by Side Diff: src/hydrogen-instructions.h

Issue 219213003: Fixed power-of-2 predicates, excluding 0. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 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
« no previous file with comments | « src/gdb-jit.cc ('k') | src/ia32/lithium-codegen-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3743 matching lines...) Expand 10 before | Expand all | Expand 10 after
3754 void SetOperandPositions(Zone* zone, 3754 void SetOperandPositions(Zone* zone,
3755 HSourcePosition left_pos, 3755 HSourcePosition left_pos,
3756 HSourcePosition right_pos) { 3756 HSourcePosition right_pos) {
3757 set_operand_position(zone, 1, left_pos); 3757 set_operand_position(zone, 1, left_pos);
3758 set_operand_position(zone, 2, right_pos); 3758 set_operand_position(zone, 2, right_pos);
3759 } 3759 }
3760 3760
3761 bool RightIsPowerOf2() { 3761 bool RightIsPowerOf2() {
3762 if (!right()->IsInteger32Constant()) return false; 3762 if (!right()->IsInteger32Constant()) return false;
3763 int32_t value = right()->GetInteger32Constant(); 3763 int32_t value = right()->GetInteger32Constant();
3764 return value != 0 && (IsPowerOf2(value) || IsPowerOf2(-value)); 3764 return IsPowerOf2(value) || IsPowerOf2(-value);
3765 } 3765 }
3766 3766
3767 DECLARE_ABSTRACT_INSTRUCTION(BinaryOperation) 3767 DECLARE_ABSTRACT_INSTRUCTION(BinaryOperation)
3768 3768
3769 private: 3769 private:
3770 bool IgnoreObservedOutputRepresentation(Representation current_rep); 3770 bool IgnoreObservedOutputRepresentation(Representation current_rep);
3771 3771
3772 Representation observed_input_representation_[2]; 3772 Representation observed_input_representation_[2];
3773 Representation observed_output_representation_; 3773 Representation observed_output_representation_;
3774 }; 3774 };
(...skipping 3752 matching lines...) Expand 10 before | Expand all | Expand 10 after
7527 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7527 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7528 }; 7528 };
7529 7529
7530 7530
7531 #undef DECLARE_INSTRUCTION 7531 #undef DECLARE_INSTRUCTION
7532 #undef DECLARE_CONCRETE_INSTRUCTION 7532 #undef DECLARE_CONCRETE_INSTRUCTION
7533 7533
7534 } } // namespace v8::internal 7534 } } // namespace v8::internal
7535 7535
7536 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7536 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/gdb-jit.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698