Commit 464f76b7 authored by chunyang.dai's avatar chunyang.dai Committed by Commit bot

Copy the corresponding opt_count_and_bailout_reason info when invoking Runtime_SetCode.

  This error is exposed by this CL:  https://codereview.chromium.org/817293005.

   This CL set all Buildin JS function to optimization_disabled.
   And set the bailout reason to "kBuiltinFunctionCannotBeOptimized". But in Runtime_SetCode() function.
   It copied the the compiler_hints which include the "bool optimization_disabled" value,
   But the corresponding Bailout reason is not copied.
   This leads to the check error in "CompilationInfo::AbortOptimization(...)" function.

  This issue is exposed on turbofan unsupported X87 platform. Crankshaft is invoked to compile
 the typed array function Uint8Array.

BUG=

Review URL: https://codereview.chromium.org/917643002

Cr-Commit-Position: refs/heads/master@{#26595}
parent 9b158fa7
......@@ -279,6 +279,8 @@ RUNTIME_FUNCTION(Runtime_SetCode) {
target_shared->set_end_position(source_shared->end_position());
bool was_native = target_shared->native();
target_shared->set_compiler_hints(source_shared->compiler_hints());
target_shared->set_opt_count_and_bailout_reason(
source_shared->opt_count_and_bailout_reason());
target_shared->set_native(was_native);
target_shared->set_profiler_ticks(source_shared->profiler_ticks());
......
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