| Index: src/codegen.cc
|
| diff --git a/src/codegen.cc b/src/codegen.cc
|
| index 90ab2b5a209713bd51eb7f26fc9c934dc06e4ae9..ff4003c1eff09b5a76d9c60e802b3c2575620469 100644
|
| --- a/src/codegen.cc
|
| +++ b/src/codegen.cc
|
| @@ -106,10 +106,13 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm,
|
|
|
| // Allocate and install the code.
|
| CodeDesc desc;
|
| + bool is_crankshafted =
|
| + Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION ||
|
| + info->IsStub();
|
| masm->GetCode(&desc);
|
| Handle<Code> code =
|
| - isolate->factory()->NewCode(desc, flags, masm->CodeObject());
|
| -
|
| + isolate->factory()->NewCode(desc, flags, masm->CodeObject(),
|
| + false, is_crankshafted);
|
| if (!code.is_null()) {
|
| isolate->counters()->total_compiled_code_size()->Increment(
|
| code->instruction_size());
|
| @@ -129,7 +132,7 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
|
| if (print_code) {
|
| // Print the source code if available.
|
| FunctionLiteral* function = info->function();
|
| - if (code->kind() != Code::COMPILED_STUB) {
|
| + if (code->kind() == Code::OPTIMIZED_FUNCTION) {
|
| Handle<Script> script = info->script();
|
| if (!script->IsUndefined() && !script->source()->IsUndefined()) {
|
| PrintF("--- Raw source ---\n");
|
|
|