Chromium Code Reviews| Index: src/factory.cc |
| diff --git a/src/factory.cc b/src/factory.cc |
| index 3c5f4161fd00f8c162a8c0c21903cceeb8e9260f..0807bd1f2fa2fc4534e84f56431171dcac89e118 100644 |
| --- a/src/factory.cc |
| +++ b/src/factory.cc |
| @@ -1427,7 +1427,11 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc, |
| Handle<ByteArray> reloc_info = NewByteArray(desc.reloc_size, TENURED); |
| // Compute size. |
| - int body_size = RoundUp(desc.instr_size, kObjectAlignment); |
| + int unpadded_body_size = desc.unwinding_info_size > 0 |
|
rmcilroy
2016/06/21 13:47:43
nit - just body_size (the RoundUp at the end isn't
rmcilroy
2016/06/21 13:47:43
Create a local variable for has_unwinding_info and
Stefano Sanfilippo
2016/06/23 15:23:43
Done.
Stefano Sanfilippo
2016/06/23 15:23:43
Done.
|
| + ? RoundUp(desc.instr_size, kInt64Size) + |
| + desc.unwinding_info_size + kInt64Size |
|
rmcilroy
2016/06/21 13:47:43
Do this addition in an if block (setting body_size
Stefano Sanfilippo
2016/06/23 15:23:43
Done.
|
| + : desc.instr_size; |
| + int body_size = RoundUp(unpadded_body_size, kObjectAlignment); |
| int obj_size = Code::SizeFor(body_size); |
| Handle<Code> code = NewCodeRaw(obj_size, immovable); |
| @@ -1444,6 +1448,7 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc, |
| code->set_instruction_size(desc.instr_size); |
| code->set_relocation_info(*reloc_info); |
| code->set_flags(flags); |
| + code->set_has_unwinding_info(desc.unwinding_info_size > 0); |
| code->set_raw_kind_specific_flags1(0); |
| code->set_raw_kind_specific_flags2(0); |
| code->set_is_crankshafted(crankshafted); |