Commit 277d8d50 authored by Georgia Kouveli's avatar Georgia Kouveli Committed by Commit Bot

[snapshot] Print lazily deserialized builtins.

Change-Id: I0e9ad97eb55e2bd206626e1f0734a05da3ba904c
Reviewed-on: https://chromium-review.googlesource.com/934287
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51593}
parent 4f43be96
...@@ -109,14 +109,35 @@ void BuiltinDeserializer::DeserializeEagerBuiltinsAndHandlers() { ...@@ -109,14 +109,35 @@ void BuiltinDeserializer::DeserializeEagerBuiltinsAndHandlers() {
Code* BuiltinDeserializer::DeserializeBuiltin(int builtin_id) { Code* BuiltinDeserializer::DeserializeBuiltin(int builtin_id) {
allocator()->ReserveAndInitializeBuiltinsTableForBuiltin(builtin_id); allocator()->ReserveAndInitializeBuiltinsTableForBuiltin(builtin_id);
DisallowHeapAllocation no_gc; DisallowHeapAllocation no_gc;
return DeserializeBuiltinRaw(builtin_id); Code* code = DeserializeBuiltinRaw(builtin_id);
#ifdef ENABLE_DISASSEMBLER
if (FLAG_print_builtin_code) {
DCHECK(isolate()->builtins()->is_initialized());
OFStream os(stdout);
code->Disassemble(Builtins::name(builtin_id), os);
os << std::flush;
}
#endif // ENABLE_DISASSEMBLER
return code;
} }
Code* BuiltinDeserializer::DeserializeHandler(Bytecode bytecode, Code* BuiltinDeserializer::DeserializeHandler(Bytecode bytecode,
OperandScale operand_scale) { OperandScale operand_scale) {
allocator()->ReserveForHandler(bytecode, operand_scale); allocator()->ReserveForHandler(bytecode, operand_scale);
DisallowHeapAllocation no_gc; DisallowHeapAllocation no_gc;
return DeserializeHandlerRaw(bytecode, operand_scale); Code* code = DeserializeHandlerRaw(bytecode, operand_scale);
#ifdef ENABLE_DISASSEMBLER
if (FLAG_print_builtin_code) {
OFStream os(stdout);
code->Disassemble(Bytecodes::ToString(bytecode), os);
os << std::flush;
}
#endif // ENABLE_DISASSEMBLER
return code;
} }
Code* BuiltinDeserializer::DeserializeBuiltinRaw(int builtin_id) { Code* BuiltinDeserializer::DeserializeBuiltinRaw(int builtin_id) {
......
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