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

Unified Diff: test/cctest/test-feedback-vector.h

Issue 1384673002: The metadata part of TypeFeedbackVector is extracted to TypeFeedbackMetadata array. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup Created 5 years, 2 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 | « test/cctest/interpreter/test-interpreter.cc ('k') | test/cctest/test-feedback-vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-feedback-vector.h
diff --git a/test/cctest/test-feedback-vector.h b/test/cctest/test-feedback-vector.h
index 52f92d12479bbfe3f8aa7f9176cf4695901350ad..6817a266aaaedec15deb80cb5a511119257dfa1e 100644
--- a/test/cctest/test-feedback-vector.h
+++ b/test/cctest/test-feedback-vector.h
@@ -17,9 +17,9 @@ class FeedbackVectorHelper {
public:
explicit FeedbackVectorHelper(Handle<TypeFeedbackVector> vector)
: vector_(vector) {
- int slot_count = vector->Slots();
+ int slot_count = vector->slot_count();
slots_.reserve(slot_count);
- TypeFeedbackMetadataIterator iter(vector);
+ TypeFeedbackMetadataIterator iter(vector->metadata());
while (iter.HasNext()) {
FeedbackVectorSlot slot = iter.Next();
slots_.push_back(slot);
@@ -39,6 +39,14 @@ class FeedbackVectorHelper {
std::vector<FeedbackVectorSlot> slots_;
};
+template <typename Spec>
+Handle<TypeFeedbackVector> NewTypeFeedbackVector(Isolate* isolate, Spec* spec) {
+ Handle<TypeFeedbackMetadata> metadata =
+ TypeFeedbackMetadata::New(isolate, spec);
+ return TypeFeedbackVector::New(isolate, metadata);
+}
+
+
} // namespace internal
} // namespace v8
« no previous file with comments | « test/cctest/interpreter/test-interpreter.cc ('k') | test/cctest/test-feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698