Commit b09b5f78 authored by Feng Yu's avatar Feng Yu Committed by V8 LUCI CQ

[test] Migrate cctest/test-feedback-vector to unittests/

Bug: v8:12781
Change-Id: I3dfbc03dd2dd4ac32d16cf153146979a0b4bcf50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829504
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82628}
parent 24cf9bd9
...@@ -133,6 +133,7 @@ v8_source_set("cctest_sources") { ...@@ -133,6 +133,7 @@ v8_source_set("cctest_sources") {
"compiler/value-helper.cc", "compiler/value-helper.cc",
"compiler/value-helper.h", "compiler/value-helper.h",
"expression-type-collector-macros.h", "expression-type-collector-macros.h",
"feedback-vector-helper.h",
"heap/heap-tester.h", "heap/heap-tester.h",
"heap/heap-utils.cc", "heap/heap-utils.cc",
"heap/heap-utils.h", "heap/heap-utils.h",
...@@ -179,8 +180,6 @@ v8_source_set("cctest_sources") { ...@@ -179,8 +180,6 @@ v8_source_set("cctest_sources") {
"test-descriptor-array.cc", "test-descriptor-array.cc",
"test-disasm-regex-helper.cc", "test-disasm-regex-helper.cc",
"test-disasm-regex-helper.h", "test-disasm-regex-helper.h",
"test-feedback-vector.cc",
"test-feedback-vector.h",
"test-field-type-tracking.cc", "test-field-type-tracking.cc",
"test-func-name-inference.cc", "test-func-name-inference.cc",
"test-global-handles.cc", "test-global-handles.cc",
......
...@@ -41,27 +41,6 @@ class FeedbackVectorHelper { ...@@ -41,27 +41,6 @@ class FeedbackVectorHelper {
std::vector<FeedbackSlot> slots_; std::vector<FeedbackSlot> slots_;
}; };
template <typename Spec>
Handle<FeedbackVector> NewFeedbackVector(Isolate* isolate, Spec* spec) {
Handle<FeedbackMetadata> metadata = FeedbackMetadata::New(isolate, spec);
Handle<SharedFunctionInfo> shared =
isolate->factory()->NewSharedFunctionInfoForBuiltin(
isolate->factory()->empty_string(), Builtin::kIllegal);
// Set the raw feedback metadata to circumvent checks that we are not
// overwriting existing metadata.
shared->set_raw_outer_scope_info_or_feedback_metadata(*metadata);
Handle<ClosureFeedbackCellArray> closure_feedback_cell_array =
ClosureFeedbackCellArray::New(isolate, shared);
IsCompiledScope is_compiled_scope(shared->is_compiled_scope(isolate));
return FeedbackVector::New(isolate, shared, closure_feedback_cell_array,
&is_compiled_scope);
}
template <typename Spec>
Handle<FeedbackMetadata> NewFeedbackMetadata(Isolate* isolate, Spec* spec) {
return FeedbackMetadata::New(isolate, spec);
}
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
......
...@@ -71,9 +71,9 @@ ...@@ -71,9 +71,9 @@
#include "src/tracing/tracing-category-observer.h" #include "src/tracing/tracing-category-observer.h"
#include "src/utils/ostreams.h" #include "src/utils/ostreams.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "test/cctest/feedback-vector-helper.h"
#include "test/cctest/heap/heap-tester.h" #include "test/cctest/heap/heap-tester.h"
#include "test/cctest/heap/heap-utils.h" #include "test/cctest/heap/heap-utils.h"
#include "test/cctest/test-feedback-vector.h"
#include "test/cctest/test-transitions.h" #include "test/cctest/test-transitions.h"
namespace v8 { namespace v8 {
......
...@@ -445,6 +445,7 @@ v8_source_set("unittests_sources") { ...@@ -445,6 +445,7 @@ v8_source_set("unittests_sources") {
"objects/concurrent-transition-array-unittest.cc", "objects/concurrent-transition-array-unittest.cc",
"objects/dictionary-unittest.cc", "objects/dictionary-unittest.cc",
"objects/elements-kind-unittest.cc", "objects/elements-kind-unittest.cc",
"objects/feedback-vector-unittest.cc",
"objects/global-object-unittest.cc", "objects/global-object-unittest.cc",
"objects/hashcode-unittest.cc", "objects/hashcode-unittest.cc",
"objects/intl-unittest.cc", "objects/intl-unittest.cc",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment