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

Unified Diff: src/type-feedback-vector.cc

Issue 2642743002: Revert [TypeFeedbackVector] Root literal arrays in function literal slots (Closed)
Patch Set: Altered test for wasm. Created 3 years, 11 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
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-feedback-vector.cc
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc
index dfcb98d1ec1501114b85dd39da622d739de1198a..267fd862edc8bed19ffbae4468767e4f5b23c73f 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -251,8 +251,10 @@ Handle<TypeFeedbackVector> TypeFeedbackVector::New(
// the empty literals array here.
array->set(index, *factory->empty_literals_array(), SKIP_WRITE_BARRIER);
} else {
- Handle<FixedArray> value = factory->NewFixedArray(length);
- array->set(index, *value);
+ // TODO(mvstanton): Create the array.
+ // Handle<FixedArray> value = factory->NewFixedArray(length);
+ // array->set(index, *value);
+ array->set(index, *factory->empty_literals_array(), SKIP_WRITE_BARRIER);
}
}
i += entry_size;
@@ -373,10 +375,10 @@ void TypeFeedbackVector::ClearSlotsImpl(SharedFunctionInfo* shared,
break;
}
case FeedbackVectorSlotKind::CREATE_CLOSURE: {
- // Clear the literals in the embedded LiteralsArray.
- LiteralsArray* literals = LiteralsArray::cast(Get(slot));
- for (int i = 0; i < literals->literals_count(); i++) {
- literals->set_literal_undefined(i);
+ // Fill the array with undefined.
+ FixedArray* array = FixedArray::cast(Get(slot));
+ for (int i = 1; i < array->length(); i++) {
+ array->set_undefined(i);
}
break;
}
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698