summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/interpreter/interpreter-tester.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/interpreter/interpreter-tester.h')
-rw-r--r--deps/v8/test/cctest/interpreter/interpreter-tester.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/deps/v8/test/cctest/interpreter/interpreter-tester.h b/deps/v8/test/cctest/interpreter/interpreter-tester.h
index ce103fe6d1..f0a0aef6e3 100644
--- a/deps/v8/test/cctest/interpreter/interpreter-tester.h
+++ b/deps/v8/test/cctest/interpreter/interpreter-tester.h
@@ -4,6 +4,7 @@
#include "src/v8.h"
+#include "src/api.h"
#include "src/execution.h"
#include "src/handles.h"
#include "src/interpreter/bytecode-array-builder.h"
@@ -53,12 +54,12 @@ class InterpreterTester {
public:
InterpreterTester(Isolate* isolate, const char* source,
MaybeHandle<BytecodeArray> bytecode,
- MaybeHandle<FeedbackVector> feedback_vector,
+ MaybeHandle<FeedbackMetadata> feedback_metadata,
const char* filter);
InterpreterTester(Isolate* isolate, Handle<BytecodeArray> bytecode,
- MaybeHandle<FeedbackVector> feedback_vector =
- MaybeHandle<FeedbackVector>(),
+ MaybeHandle<FeedbackMetadata> feedback_metadata =
+ MaybeHandle<FeedbackMetadata>(),
const char* filter = kFunctionName);
InterpreterTester(Isolate* isolate, const char* source,
@@ -85,7 +86,7 @@ class InterpreterTester {
Isolate* isolate_;
const char* source_;
MaybeHandle<BytecodeArray> bytecode_;
- MaybeHandle<FeedbackVector> feedback_vector_;
+ MaybeHandle<FeedbackMetadata> feedback_metadata_;
template <class... A>
Handle<JSFunction> GetBytecodeFunction() {
@@ -115,9 +116,11 @@ class InterpreterTester {
if (!bytecode_.is_null()) {
function->shared()->set_function_data(*bytecode_.ToHandleChecked());
}
- if (!feedback_vector_.is_null()) {
- function->literals()->set_feedback_vector(
- *feedback_vector_.ToHandleChecked());
+ if (!feedback_metadata_.is_null()) {
+ function->set_feedback_vector_cell(isolate_->heap()->undefined_cell());
+ function->shared()->set_feedback_metadata(
+ *feedback_metadata_.ToHandleChecked());
+ JSFunction::EnsureLiterals(function);
}
return function;
}