Index: test/cctest/interpreter/interpreter-tester.h |
diff --git a/test/cctest/interpreter/interpreter-tester.h b/test/cctest/interpreter/interpreter-tester.h |
index 6719941f135de1f2c577902544d5b01ef5e6d8c5..bab6950a45a6135bf1af37134bdfb46fba3a13e2 100644 |
--- a/test/cctest/interpreter/interpreter-tester.h |
+++ b/test/cctest/interpreter/interpreter-tester.h |
@@ -39,6 +39,8 @@ class InterpreterCallable { |
return CallInterpreter(isolate_, function_, args...); |
} |
+ TypeFeedbackVector* vector() const { return function_->feedback_vector(); } |
+ |
private: |
Isolate* isolate_; |
Handle<JSFunction> function_; |
@@ -52,12 +54,12 @@ class InterpreterTester { |
public: |
InterpreterTester(Isolate* isolate, const char* source, |
MaybeHandle<BytecodeArray> bytecode, |
- MaybeHandle<TypeFeedbackVector> feedback_vector, |
+ MaybeHandle<TypeFeedbackMetadata> feedback_metadata, |
const char* filter); |
InterpreterTester(Isolate* isolate, Handle<BytecodeArray> bytecode, |
- MaybeHandle<TypeFeedbackVector> feedback_vector = |
- MaybeHandle<TypeFeedbackVector>(), |
+ MaybeHandle<TypeFeedbackMetadata> feedback_metadata = |
+ MaybeHandle<TypeFeedbackMetadata>(), |
const char* filter = kFunctionName); |
InterpreterTester(Isolate* isolate, const char* source, |
@@ -84,7 +86,7 @@ class InterpreterTester { |
Isolate* isolate_; |
const char* source_; |
MaybeHandle<BytecodeArray> bytecode_; |
- MaybeHandle<TypeFeedbackVector> feedback_vector_; |
+ MaybeHandle<TypeFeedbackMetadata> feedback_metadata_; |
template <class... A> |
Handle<JSFunction> GetBytecodeFunction() { |
@@ -114,9 +116,13 @@ 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()) { |
+ // TODO(mvstanton): The call to ClearOptimizedCodeMap can be removed |
+ // when we stop storing literals in the optimized code map (upcoming CL). |
+ function->shared()->ClearOptimizedCodeMap(); |
+ function->shared()->set_feedback_metadata( |
+ *feedback_metadata_.ToHandleChecked()); |
+ JSFunction::EnsureLiterals(function); |
} |
return function; |
} |