diff options
Diffstat (limited to 'chromium/v8/src/codegen.cc')
-rw-r--r-- | chromium/v8/src/codegen.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/chromium/v8/src/codegen.cc b/chromium/v8/src/codegen.cc index 2031b321a4b..d33c7f06bd4 100644 --- a/chromium/v8/src/codegen.cc +++ b/chromium/v8/src/codegen.cc @@ -89,12 +89,12 @@ void CodeGenerator::MakeCodePrologue(CompilationInfo* info, const char* kind) { #ifdef DEBUG if (!info->IsStub() && print_source) { PrintF("--- Source from AST ---\n%s\n", - PrettyPrinter().PrintProgram(info->function())); + PrettyPrinter(info->isolate()).PrintProgram(info->function())); } if (!info->IsStub() && print_ast) { PrintF("--- AST ---\n%s\n", - AstPrinter().PrintProgram(info->function())); + AstPrinter(info->isolate()).PrintProgram(info->function())); } #endif // DEBUG } @@ -114,11 +114,9 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm, Handle<Code> code = isolate->factory()->NewCode(desc, flags, masm->CodeObject(), false, is_crankshafted); - if (!code.is_null()) { - isolate->counters()->total_compiled_code_size()->Increment( - code->instruction_size()); - code->set_prologue_offset(info->prologue_offset()); - } + isolate->counters()->total_compiled_code_size()->Increment( + code->instruction_size()); + code->set_prologue_offset(info->prologue_offset()); return code; } @@ -126,7 +124,7 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm, void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) { #ifdef ENABLE_DISASSEMBLER AllowDeferredHandleDereference allow_deference_for_print_code; - bool print_code = Isolate::Current()->bootstrapper()->IsActive() + bool print_code = info->isolate()->bootstrapper()->IsActive() ? FLAG_print_builtin_code : (FLAG_print_code || (info->IsStub() && FLAG_print_code_stubs) || @@ -173,9 +171,8 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) { } -bool CodeGenerator::ShouldGenerateLog(Expression* type) { +bool CodeGenerator::ShouldGenerateLog(Isolate* isolate, Expression* type) { ASSERT(type != NULL); - Isolate* isolate = Isolate::Current(); if (!isolate->logger()->is_logging() && !isolate->cpu_profiler()->is_profiling()) { return false; |