Index: src/full-codegen.cc |
diff --git a/src/full-codegen.cc b/src/full-codegen.cc |
index e20b20dab8cf01705a9b1dfb5fbf68a79c8c23f8..cb5e94a0c38a684b234aa2e0ba330af4ff9145dc 100644 |
--- a/src/full-codegen.cc |
+++ b/src/full-codegen.cc |
@@ -301,6 +301,11 @@ bool FullCodeGenerator::MakeCode(CompilationInfo* info) { |
CodeGenerator::MakeCodePrologue(info, "full"); |
const int kInitialBufferSize = 4 * KB; |
MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize); |
+ if (FLAG_serialize_toplevel && |
+ info->cached_data_mode() == PRODUCE_CACHED_DATA && info->is_global()) { |
+ masm.enable_serializer(); |
+ } |
+ |
#ifdef ENABLE_GDB_JIT_INTERFACE |
masm.positions_recorder()->StartGDBJITLineInfoRecording(); |
#endif |