Serializer: remove unused --serialize-inner flag.

R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31280}
This commit is contained in:
yangguo 2015-10-15 01:47:05 -07:00 committed by Commit bot
parent b6c945642c
commit c7c7b598ee
4 changed files with 4 additions and 21 deletions

View File

@ -1570,13 +1570,6 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfo(
!LiveEditFunctionTracker::IsActive(isolate) &&
(!info.is_debug() || allow_lazy_without_ctx);
if (outer_info->parse_info()->is_toplevel() && outer_info->will_serialize()) {
// Make sure that if the toplevel code (possibly to be serialized),
// the inner function must be allowed to be compiled lazily.
// This is necessary to serialize toplevel code without inner functions.
DCHECK(allow_lazy);
}
bool lazy = FLAG_lazy && allow_lazy && !literal->should_eager_compile();
// Generate code

View File

@ -557,7 +557,6 @@ DEFINE_BOOL(trace_stub_failures, false,
"trace deoptimization of generated code stubs")
DEFINE_BOOL(serialize_toplevel, true, "enable caching of toplevel scripts")
DEFINE_BOOL(serialize_inner, true, "enable caching of inner functions")
DEFINE_BOOL(trace_serializer, false, "print code serializer trace")
// compiler.cc

View File

@ -2422,7 +2422,7 @@ ScriptData* CodeSerializer::Serialize(Isolate* isolate,
// Serialize code object.
SnapshotByteSink sink(info->code()->CodeSize() * 2);
CodeSerializer cs(isolate, &sink, *source, info->code());
CodeSerializer cs(isolate, &sink, *source);
DisallowHeapAllocation no_gc;
Object** location = Handle<Object>::cast(info).location();
cs.VisitPointer(location);
@ -2476,14 +2476,7 @@ void CodeSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
return;
case Code::FUNCTION:
DCHECK(code_object->has_reloc_info_for_serialization());
// Only serialize the code for the toplevel function unless specified
// by flag. Replace code of inner functions by the lazy compile builtin.
// This is safe, as checked in Compiler::GetSharedFunctionInfo.
if (code_object != main_code_ && !FLAG_serialize_inner) {
SerializeBuiltin(Builtins::kCompileLazy, how_to_code, where_to_point);
} else {
SerializeGeneric(code_object, how_to_code, where_to_point);
}
SerializeGeneric(code_object, how_to_code, where_to_point);
return;
case Code::WASM_FUNCTION:
UNREACHABLE();

View File

@ -855,9 +855,8 @@ class CodeSerializer : public Serializer {
const List<uint32_t>* stub_keys() const { return &stub_keys_; }
private:
CodeSerializer(Isolate* isolate, SnapshotByteSink* sink, String* source,
Code* main_code)
: Serializer(isolate, sink), source_(source), main_code_(main_code) {
CodeSerializer(Isolate* isolate, SnapshotByteSink* sink, String* source)
: Serializer(isolate, sink), source_(source) {
back_reference_map_.AddSourceString(source);
}
@ -878,7 +877,6 @@ class CodeSerializer : public Serializer {
DisallowHeapAllocation no_gc_;
String* source_;
Code* main_code_;
List<uint32_t> stub_keys_;
DISALLOW_COPY_AND_ASSIGN(CodeSerializer);
};