aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/field-index-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/field-index-inl.h')
-rw-r--r--deps/v8/src/field-index-inl.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/deps/v8/src/field-index-inl.h b/deps/v8/src/field-index-inl.h
index d54e43121e..42828db923 100644
--- a/deps/v8/src/field-index-inl.h
+++ b/deps/v8/src/field-index-inl.h
@@ -7,21 +7,20 @@
#include "src/field-index.h"
#include "src/objects-inl.h"
-#include "src/objects/descriptor-array.h"
+#include "src/objects/descriptor-array-inl.h"
namespace v8 {
namespace internal {
-inline FieldIndex FieldIndex::ForInObjectOffset(int offset, Encoding encoding) {
+FieldIndex FieldIndex::ForInObjectOffset(int offset, Encoding encoding) {
DCHECK_IMPLIES(encoding == kWord32, IsAligned(offset, kInt32Size));
DCHECK_IMPLIES(encoding == kTagged, IsAligned(offset, kTaggedSize));
DCHECK_IMPLIES(encoding == kDouble, IsAligned(offset, kDoubleSize));
return FieldIndex(true, offset, encoding, 0, 0);
}
-inline FieldIndex FieldIndex::ForPropertyIndex(const Map map,
- int property_index,
- Representation representation) {
+FieldIndex FieldIndex::ForPropertyIndex(const Map map, int property_index,
+ Representation representation) {
DCHECK(map->instance_type() >= FIRST_NONSTRING_TYPE);
int inobject_properties = map->GetInObjectProperties();
bool is_inobject = property_index < inobject_properties;
@@ -43,7 +42,7 @@ inline FieldIndex FieldIndex::ForPropertyIndex(const Map map,
// Returns the index format accepted by the HLoadFieldByIndex instruction.
// (In-object: zero-based from (object start + JSObject::kHeaderSize),
// out-of-object: zero-based from FixedArray::kHeaderSize.)
-inline int FieldIndex::GetLoadByFieldIndex() const {
+int FieldIndex::GetLoadByFieldIndex() const {
// For efficiency, the LoadByFieldIndex instruction takes an index that is
// optimized for quick access. If the property is inline, the index is
// positive. If it's out-of-line, the encoded index is -raw_index - 1 to
@@ -57,12 +56,11 @@ inline int FieldIndex::GetLoadByFieldIndex() const {
result -= FixedArray::kHeaderSize / kTaggedSize;
result = -result - 1;
}
- result <<= 1;
+ result = static_cast<uint32_t>(result) << 1;
return is_double() ? (result | 1) : result;
}
-inline FieldIndex FieldIndex::ForDescriptor(const Map map,
- int descriptor_index) {
+FieldIndex FieldIndex::ForDescriptor(const Map map, int descriptor_index) {
PropertyDetails details =
map->instance_descriptors()->GetDetails(descriptor_index);
int field_index = details.field_index();