Index: src/codegen.cc |
diff --git a/src/codegen.cc b/src/codegen.cc |
index c9de2b1af16c666177617a5600ae30f5298a1a34..cc5495bc1b91612ca409d9eca06fd654ac3d3e17 100644 |
--- a/src/codegen.cc |
+++ b/src/codegen.cc |
@@ -149,10 +149,18 @@ void CodeGenerator::MakeCodePrologue(CompilationInfo* info, const char* kind) { |
Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm, |
- Code::Flags flags, |
CompilationInfo* info) { |
Isolate* isolate = info->isolate(); |
+ Code::Flags flags = |
+ info->code_stub() != nullptr |
+ ? Code::ComputeFlags(info->code_stub()->GetCodeKind(), |
+ info->code_stub()->GetICState(), |
+ info->code_stub()->GetExtraICState(), |
+ info->code_stub()->GetStubType()) |
+ : Code::ComputeFlags(info->IsOptimizing() ? Code::OPTIMIZED_FUNCTION |
+ : Code::FUNCTION); |
+ |
// Allocate and install the code. |
CodeDesc desc; |
bool is_crankshafted = |