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

Unified Diff: src/objects-inl.h

Issue 1217943004: Vector ICs: Introduce an InstanceType for the type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix for failing test. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 1e40ac5d9c12f6b253f75530812d4f4bc41573ea..252daa9864f01b0fe515bb804df92979de0382dd 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -142,7 +142,7 @@ int PropertyDetails::field_width_in_words() const {
bool Object::IsFixedArrayBase() const {
return IsFixedArray() || IsFixedDoubleArray() || IsFixedTypedArrayBase() ||
- IsExternalArray();
+ IsExternalArray() || IsTypeFeedbackVector();
}
@@ -718,6 +718,7 @@ TYPE_CHECKER(Map, MAP_TYPE)
TYPE_CHECKER(FixedArray, FIXED_ARRAY_TYPE)
TYPE_CHECKER(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE)
TYPE_CHECKER(WeakFixedArray, FIXED_ARRAY_TYPE)
+TYPE_CHECKER(TypeFeedbackVector, FEEDBACK_VECTOR_TYPE)
bool Object::IsJSWeakCollection() const {
@@ -743,9 +744,6 @@ bool Object::IsTransitionArray() const {
}
-bool Object::IsTypeFeedbackVector() const { return IsFixedArray(); }
-
-
bool Object::IsDeoptimizationInputData() const {
// Must be a fixed array.
if (!IsFixedArray()) return false;
@@ -2269,7 +2267,8 @@ void FixedArray::set(int index, Smi* value) {
void FixedArray::set(int index, Object* value) {
DCHECK_NE(GetHeap()->fixed_cow_array_map(), map());
- DCHECK_EQ(FIXED_ARRAY_TYPE, map()->instance_type());
+ DCHECK(map()->instance_type() == FIXED_ARRAY_TYPE ||
+ map()->instance_type() == FEEDBACK_VECTOR_TYPE);
DCHECK(index >= 0 && index < this->length());
int offset = kHeaderSize + index * kPointerSize;
WRITE_FIELD(this, offset, value);
@@ -4111,7 +4110,8 @@ int HeapObject::SizeFromMap(Map* map) {
if (instance_size != kVariableSizeSentinel) return instance_size;
// Only inline the most frequent cases.
InstanceType instance_type = map->instance_type();
- if (instance_type == FIXED_ARRAY_TYPE) {
+ if (instance_type == FIXED_ARRAY_TYPE ||
+ instance_type == FEEDBACK_VECTOR_TYPE) {
return FixedArray::BodyDescriptor::SizeOf(map, this);
}
if (instance_type == ONE_BYTE_STRING_TYPE ||

Powered by Google App Engine
This is Rietveld 408576698