// Generate the code for the stub.
masm.set_generating_stub(true);
+ // TODO(yangguo): remove this once we can serialize IC stubs.
+ masm.enable_serializer();
NoCurrentFrameScope scope(&masm);
GenerateLightweightMiss(&masm, miss);
}
// Generate the code for the stub.
masm.set_generating_stub(true);
+ // TODO(yangguo): remove this once we can serialize IC stubs.
+ masm.enable_serializer();
NoCurrentFrameScope scope(&masm);
Generate(&masm);
}
}
+static PrintDeserializedCodeInfo(Handle<JSFunction> function) {
+ if (function->code() == function->shared()->code() &&
+ function->shared()->deserialized()) {
+ PrintF("Running deserialized script: ");
+ Object* script = function->shared()->script();
+ if (script->IsScript()) {
+ Script::cast(script)->name()->ShortPrint();
+ } else {
+ function->shared()->script()->ShortPrint();
+ }
+ PrintF("\n");
+ }
+}
+
+
MUST_USE_RESULT static MaybeHandle<Object> Invoke(
bool is_construct,
Handle<JSFunction> function,
JSFunction* func = *function;
Object* recv = *receiver;
Object*** argv = reinterpret_cast<Object***>(args);
+ if (FLAG_profile_deserialization) PrintDeserializedCodeInfo(function);
value =
CALL_GENERATED_CODE(stub_entry, function_entry, func, recv, argc, argv);
}
has_duplicate_parameters,
kHasDuplicateParameters)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, asm_function, kIsAsmFunction)
+BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, deserialized, kDeserialized)
#if V8_HOST_ARCH_32_BIT
// Indicates that this function is an asm function.
DECL_BOOLEAN_ACCESSORS(asm_function)
+ // Indicates that the the shared function info is deserialized from cache.
+ DECL_BOOLEAN_ACCESSORS(deserialized)
+
inline FunctionKind kind();
inline void set_kind(FunctionKind kind);
kIsGenerator,
kIsConciseMethod,
kIsAsmFunction,
+ kDeserialized,
kCompilerHintsCount // Pseudo entry
};
int length = data->length();
PrintF("[Deserializing from %d bytes took %0.3f ms]\n", length, ms);
}
- return Handle<SharedFunctionInfo>(SharedFunctionInfo::cast(root), isolate);
+ Handle<SharedFunctionInfo> result(SharedFunctionInfo::cast(root), isolate);
+ result->set_deserialized(true);
+ return result;
}