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

Side by Side Diff: src/field-index.h

Issue 2191823002: [turbofan] Refactor the lowering of element/property accesses. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/compiler/load-elimination.cc ('k') | src/handles.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_FIELD_INDEX_H_ 5 #ifndef V8_FIELD_INDEX_H_
6 #define V8_FIELD_INDEX_H_ 6 #define V8_FIELD_INDEX_H_
7 7
8 #include "src/property-details.h" 8 #include "src/property-details.h"
9 #include "src/utils.h" 9 #include "src/utils.h"
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return result; 69 return result;
70 } 70 }
71 71
72 int GetKeyedLookupCacheIndex() const; 72 int GetKeyedLookupCacheIndex() const;
73 73
74 int GetFieldAccessStubKey() const { 74 int GetFieldAccessStubKey() const {
75 return bit_field_ & 75 return bit_field_ &
76 (IsInObjectBits::kMask | IsDoubleBits::kMask | IndexBits::kMask); 76 (IsInObjectBits::kMask | IsDoubleBits::kMask | IndexBits::kMask);
77 } 77 }
78 78
79 bool operator==(FieldIndex const& other) const {
80 return bit_field_ == other.bit_field_;
81 }
82 bool operator!=(FieldIndex const& other) const { return !(*this == other); }
83
79 // For GetLoadByFieldOffset. 84 // For GetLoadByFieldOffset.
80 class FieldOffsetIsInobject : public BitField<bool, 1, 1> {}; 85 class FieldOffsetIsInobject : public BitField<bool, 1, 1> {};
81 class FieldOffsetIsDouble : public BitField<bool, 2, 1> {}; 86 class FieldOffsetIsDouble : public BitField<bool, 2, 1> {};
82 class FieldOffsetOffset : public BitField<int, 3, 27> {}; 87 class FieldOffsetOffset : public BitField<int, 3, 27> {};
83 // Make sure we don't overflow into the sign bit. 88 // Make sure we don't overflow into the sign bit.
84 STATIC_ASSERT(FieldOffsetOffset::kNext <= kSmiValueSize - 1); 89 STATIC_ASSERT(FieldOffsetOffset::kNext <= kSmiValueSize - 1);
85 90
86 private: 91 private:
87 FieldIndex(bool is_inobject, int local_index, bool is_double, 92 FieldIndex(bool is_inobject, int local_index, bool is_double,
88 int inobject_properties, int first_inobject_property_offset, 93 int inobject_properties, int first_inobject_property_offset,
(...skipping 30 matching lines...) Expand all
119 : public BitField<bool, FirstInobjectPropertyOffsetBits::kNext, 1> {}; 124 : public BitField<bool, FirstInobjectPropertyOffsetBits::kNext, 1> {};
120 STATIC_ASSERT(IsHiddenField::kNext <= 32); 125 STATIC_ASSERT(IsHiddenField::kNext <= 32);
121 126
122 int bit_field_; 127 int bit_field_;
123 }; 128 };
124 129
125 } // namespace internal 130 } // namespace internal
126 } // namespace v8 131 } // namespace v8
127 132
128 #endif 133 #endif
OLDNEW
« no previous file with comments | « src/compiler/load-elimination.cc ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698