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

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

Issue 115013003: Merged r17800, r17801 into 3.20 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.20
Patch Set: Fix new line Created 7 years 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/hydrogen-dehoist.cc ('k') | src/lithium.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 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 5726 matching lines...) Expand 10 before | Expand all | Expand 10 after
5737 5737
5738 protected: 5738 protected:
5739 virtual bool DataEquals(HValue* other) { return true; } 5739 virtual bool DataEquals(HValue* other) { return true; }
5740 }; 5740 };
5741 5741
5742 class ArrayInstructionInterface { 5742 class ArrayInstructionInterface {
5743 public: 5743 public:
5744 virtual HValue* GetKey() = 0; 5744 virtual HValue* GetKey() = 0;
5745 virtual void SetKey(HValue* key) = 0; 5745 virtual void SetKey(HValue* key) = 0;
5746 virtual void SetIndexOffset(uint32_t index_offset) = 0; 5746 virtual void SetIndexOffset(uint32_t index_offset) = 0;
5747 virtual int MaxIndexOffsetBits() = 0;
5747 virtual bool IsDehoisted() = 0; 5748 virtual bool IsDehoisted() = 0;
5748 virtual void SetDehoisted(bool is_dehoisted) = 0; 5749 virtual void SetDehoisted(bool is_dehoisted) = 0;
5749 virtual ~ArrayInstructionInterface() { }; 5750 virtual ~ArrayInstructionInterface() { };
5750 5751
5751 static Representation KeyedAccessIndexRequirement(Representation r) { 5752 static Representation KeyedAccessIndexRequirement(Representation r) {
5752 return r.IsInteger32() || kSmiValueSize != 31 5753 return r.IsInteger32() || kSmiValueSize != 31
5753 ? Representation::Integer32() : Representation::Smi(); 5754 ? Representation::Integer32() : Representation::Smi();
5754 } 5755 }
5755 }; 5756 };
5756 5757
(...skipping 19 matching lines...) Expand all
5776 HValue* key() { return OperandAt(1); } 5777 HValue* key() { return OperandAt(1); }
5777 HValue* dependency() { 5778 HValue* dependency() {
5778 ASSERT(HasDependency()); 5779 ASSERT(HasDependency());
5779 return OperandAt(2); 5780 return OperandAt(2);
5780 } 5781 }
5781 bool HasDependency() const { return OperandAt(0) != OperandAt(2); } 5782 bool HasDependency() const { return OperandAt(0) != OperandAt(2); }
5782 uint32_t index_offset() { return IndexOffsetField::decode(bit_field_); } 5783 uint32_t index_offset() { return IndexOffsetField::decode(bit_field_); }
5783 void SetIndexOffset(uint32_t index_offset) { 5784 void SetIndexOffset(uint32_t index_offset) {
5784 bit_field_ = IndexOffsetField::update(bit_field_, index_offset); 5785 bit_field_ = IndexOffsetField::update(bit_field_, index_offset);
5785 } 5786 }
5787 virtual int MaxIndexOffsetBits() {
5788 return kBitsForIndexOffset;
5789 }
5786 HValue* GetKey() { return key(); } 5790 HValue* GetKey() { return key(); }
5787 void SetKey(HValue* key) { SetOperandAt(1, key); } 5791 void SetKey(HValue* key) { SetOperandAt(1, key); }
5788 bool IsDehoisted() { return IsDehoistedField::decode(bit_field_); } 5792 bool IsDehoisted() { return IsDehoistedField::decode(bit_field_); }
5789 void SetDehoisted(bool is_dehoisted) { 5793 void SetDehoisted(bool is_dehoisted) {
5790 bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted); 5794 bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted);
5791 } 5795 }
5792 ElementsKind elements_kind() const { 5796 ElementsKind elements_kind() const {
5793 return ElementsKindField::decode(bit_field_); 5797 return ElementsKindField::decode(bit_field_);
5794 } 5798 }
5795 LoadKeyedHoleMode hole_mode() const { 5799 LoadKeyedHoleMode hole_mode() const {
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
6144 6148
6145 HValue* elements() { return OperandAt(0); } 6149 HValue* elements() { return OperandAt(0); }
6146 HValue* key() { return OperandAt(1); } 6150 HValue* key() { return OperandAt(1); }
6147 HValue* value() { return OperandAt(2); } 6151 HValue* value() { return OperandAt(2); }
6148 bool value_is_smi() const { 6152 bool value_is_smi() const {
6149 return IsFastSmiElementsKind(elements_kind_); 6153 return IsFastSmiElementsKind(elements_kind_);
6150 } 6154 }
6151 ElementsKind elements_kind() const { return elements_kind_; } 6155 ElementsKind elements_kind() const { return elements_kind_; }
6152 uint32_t index_offset() { return index_offset_; } 6156 uint32_t index_offset() { return index_offset_; }
6153 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } 6157 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; }
6158 virtual int MaxIndexOffsetBits() {
6159 return 31 - ElementsKindToShiftSize(elements_kind_);
6160 }
6154 HValue* GetKey() { return key(); } 6161 HValue* GetKey() { return key(); }
6155 void SetKey(HValue* key) { SetOperandAt(1, key); } 6162 void SetKey(HValue* key) { SetOperandAt(1, key); }
6156 bool IsDehoisted() { return is_dehoisted_; } 6163 bool IsDehoisted() { return is_dehoisted_; }
6157 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } 6164 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; }
6158 bool IsUninitialized() { return is_uninitialized_; } 6165 bool IsUninitialized() { return is_uninitialized_; }
6159 void SetUninitialized(bool is_uninitialized) { 6166 void SetUninitialized(bool is_uninitialized) {
6160 is_uninitialized_ = is_uninitialized; 6167 is_uninitialized_ = is_uninitialized;
6161 } 6168 }
6162 6169
6163 bool IsConstantHoleStore() { 6170 bool IsConstantHoleStore() {
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
6837 virtual bool IsDeletable() const { return true; } 6844 virtual bool IsDeletable() const { return true; }
6838 }; 6845 };
6839 6846
6840 6847
6841 #undef DECLARE_INSTRUCTION 6848 #undef DECLARE_INSTRUCTION
6842 #undef DECLARE_CONCRETE_INSTRUCTION 6849 #undef DECLARE_CONCRETE_INSTRUCTION
6843 6850
6844 } } // namespace v8::internal 6851 } } // namespace v8::internal
6845 6852
6846 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6853 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen-dehoist.cc ('k') | src/lithium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698