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

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

Issue 21049003: Smi-support for HSar. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 4 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/arm/lithium-codegen-arm.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 4954 matching lines...) Expand 10 before | Expand all | Expand 10 after
4965 } 4965 }
4966 } 4966 }
4967 return false; 4967 return false;
4968 } 4968 }
4969 4969
4970 virtual Range* InferRange(Zone* zone); 4970 virtual Range* InferRange(Zone* zone);
4971 4971
4972 virtual void UpdateRepresentation(Representation new_rep, 4972 virtual void UpdateRepresentation(Representation new_rep,
4973 HInferRepresentationPhase* h_infer, 4973 HInferRepresentationPhase* h_infer,
4974 const char* reason) { 4974 const char* reason) {
4975 if (new_rep.IsSmi()) new_rep = Representation::Integer32(); 4975 if (new_rep.IsSmi() && !right()->IsConstant()) {
4976 new_rep = Representation::Integer32();
4977 }
4976 HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); 4978 HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason);
4977 } 4979 }
4978 4980
4979 DECLARE_CONCRETE_INSTRUCTION(Sar) 4981 DECLARE_CONCRETE_INSTRUCTION(Sar)
4980 4982
4981 protected: 4983 protected:
4982 virtual bool DataEquals(HValue* other) { return true; } 4984 virtual bool DataEquals(HValue* other) { return true; }
4983 4985
4984 private: 4986 private:
4985 HSar(HValue* context, HValue* left, HValue* right) 4987 HSar(HValue* context, HValue* left, HValue* right)
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after
6951 virtual bool IsDeletable() const { return true; } 6953 virtual bool IsDeletable() const { return true; }
6952 }; 6954 };
6953 6955
6954 6956
6955 #undef DECLARE_INSTRUCTION 6957 #undef DECLARE_INSTRUCTION
6956 #undef DECLARE_CONCRETE_INSTRUCTION 6958 #undef DECLARE_CONCRETE_INSTRUCTION
6957 6959
6958 } } // namespace v8::internal 6960 } } // namespace v8::internal
6959 6961
6960 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6962 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698