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

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

Issue 6850031: Make HConstant a bit more compact. (Closed)
Patch Set: Created 9 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
« no previous file with comments | « no previous file | src/hydrogen-instructions.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 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 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 protected: 1983 protected:
1984 virtual Range* InferRange(); 1984 virtual Range* InferRange();
1985 1985
1986 virtual bool DataEquals(HValue* other) { 1986 virtual bool DataEquals(HValue* other) {
1987 HConstant* other_constant = HConstant::cast(other); 1987 HConstant* other_constant = HConstant::cast(other);
1988 return handle().is_identical_to(other_constant->handle()); 1988 return handle().is_identical_to(other_constant->handle());
1989 } 1989 }
1990 1990
1991 private: 1991 private:
1992 Handle<Object> handle_; 1992 Handle<Object> handle_;
1993 HType constant_type_;
1994 1993
1995 // The following two values represent the int32 and the double value of the 1994 // The following two values represent the int32 and the double value of the
1996 // given constant if there is a lossless conversion between the constant 1995 // given constant if there is a lossless conversion between the constant
1997 // and the specific representation. 1996 // and the specific representation.
1998 bool has_int32_value_; 1997 bool has_int32_value_ : 1;
1998 bool has_double_value_ : 1;
1999 int32_t int32_value_; 1999 int32_t int32_value_;
2000 bool has_double_value_;
2001 double double_value_; 2000 double double_value_;
2002 }; 2001 };
2003 2002
2004 2003
2005 class HBinaryOperation: public HTemplateInstruction<2> { 2004 class HBinaryOperation: public HTemplateInstruction<2> {
2006 public: 2005 public:
2007 HBinaryOperation(HValue* left, HValue* right) { 2006 HBinaryOperation(HValue* left, HValue* right) {
2008 ASSERT(left != NULL && right != NULL); 2007 ASSERT(left != NULL && right != NULL);
2009 SetOperandAt(0, left); 2008 SetOperandAt(0, left);
2010 SetOperandAt(1, right); 2009 SetOperandAt(1, right);
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after
3670 HValue* object() { return left(); } 3669 HValue* object() { return left(); }
3671 HValue* key() { return right(); } 3670 HValue* key() { return right(); }
3672 }; 3671 };
3673 3672
3674 #undef DECLARE_INSTRUCTION 3673 #undef DECLARE_INSTRUCTION
3675 #undef DECLARE_CONCRETE_INSTRUCTION 3674 #undef DECLARE_CONCRETE_INSTRUCTION
3676 3675
3677 } } // namespace v8::internal 3676 } } // namespace v8::internal
3678 3677
3679 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 3678 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698