Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index c91c3f908fcb02a713455ca99cd383670d6f5450..ee57e7c748b2bd44c24717b2078c24775cb47790 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -3131,6 +3131,7 @@ RUNTIME_FUNCTION(Runtime_SetCode) { |
target_shared->ReplaceCode(source_shared->code()); |
target_shared->set_scope_info(source_shared->scope_info()); |
target_shared->set_length(source_shared->length()); |
+ target_shared->set_feedback_vector(source_shared->feedback_vector()); |
target_shared->set_formal_parameter_count( |
source_shared->formal_parameter_count()); |
target_shared->set_script(source_shared->script()); |
@@ -8617,10 +8618,10 @@ RUNTIME_FUNCTION(Runtime_ClearFunctionTypeFeedback) { |
HandleScope scope(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
+ function->shared()->ClearTypeFeedbackInfo(); |
Code* unoptimized = function->shared()->code(); |
if (unoptimized->kind() == Code::FUNCTION) { |
unoptimized->ClearInlineCaches(); |
- unoptimized->ClearTypeFeedbackInfo(isolate->heap()); |
} |
return isolate->heap()->undefined_value(); |
} |