PPC: Fix DCHECK error in set_constant_pool_offset

the DCHECK in set_constant_pool_offset fails due to the
InstructionSize() needs builtin_index()

Change-Id: Ia86b57ebc4901672dee3012ba931e0222933ec1d
Reviewed-on: https://chromium-review.googlesource.com/c/1454265
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#59418}
This commit is contained in:
Junliang Yan 2019-02-05 13:04:26 -05:00 committed by Commit Bot
parent 82d240c736
commit 69d26c73cf

View File

@ -84,6 +84,7 @@ void InitializeCode(Heap* heap, Handle<Code> code, int object_size,
code->set_relocation_info(*reloc_info);
code->initialize_flags(kind, has_unwinding_info, is_turbofanned, stack_slots,
kIsNotOffHeapTrampoline);
code->set_builtin_index(builtin_index);
code->set_code_data_container(*data_container);
code->set_deoptimization_data(*deopt_data);
code->set_source_position_table(*source_position_table);
@ -91,7 +92,6 @@ void InitializeCode(Heap* heap, Handle<Code> code, int object_size,
code->set_handler_table_offset(desc.handler_table_offset);
code->set_constant_pool_offset(desc.constant_pool_offset);
code->set_code_comments_offset(desc.code_comments_offset);
code->set_builtin_index(builtin_index);
// Allow self references to created code object by patching the handle to
// point to the newly allocated Code object.