diff options
Diffstat (limited to 'src/full-codegen.cc')
-rw-r--r-- | src/full-codegen.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/full-codegen.cc b/src/full-codegen.cc index b3dc95bd..d509cd5b 100644 --- a/src/full-codegen.cc +++ b/src/full-codegen.cc @@ -275,10 +275,11 @@ void BreakableStatementChecker::VisitThisFunction(ThisFunction* expr) { #define __ ACCESS_MASM(masm()) bool FullCodeGenerator::MakeCode(CompilationInfo* info) { + Isolate* isolate = info->isolate(); Handle<Script> script = info->script(); if (!script->IsUndefined() && !script->source()->IsUndefined()) { int len = String::cast(script->source())->length(); - Counters::total_full_codegen_source_size.Increment(len); + isolate->counters()->total_full_codegen_source_size()->Increment(len); } if (FLAG_trace_codegen) { PrintF("Full Compiler - "); @@ -293,7 +294,7 @@ bool FullCodeGenerator::MakeCode(CompilationInfo* info) { FullCodeGenerator cgen(&masm); cgen.Generate(info); if (cgen.HasStackOverflow()) { - ASSERT(!Top::has_pending_exception()); + ASSERT(!isolate->has_pending_exception()); return false; } unsigned table_offset = cgen.EmitStackCheckTable(); @@ -343,7 +344,8 @@ void FullCodeGenerator::PopulateDeoptimizationData(Handle<Code> code) { if (!info_->HasDeoptimizationSupport()) return; int length = bailout_entries_.length(); Handle<DeoptimizationOutputData> data = - Factory::NewDeoptimizationOutputData(length, TENURED); + isolate()->factory()-> + NewDeoptimizationOutputData(length, TENURED); for (int i = 0; i < length; i++) { data->SetAstId(i, Smi::FromInt(bailout_entries_[i].id)); data->SetPcAndState(i, Smi::FromInt(bailout_entries_[i].pc_and_state)); @@ -545,7 +547,8 @@ void FullCodeGenerator::VisitDeclarations( // Compute array of global variable and function declarations. // Do nothing in case of no declared global functions or variables. if (globals > 0) { - Handle<FixedArray> array = Factory::NewFixedArray(2 * globals, TENURED); + Handle<FixedArray> array = + isolate()->factory()->NewFixedArray(2 * globals, TENURED); for (int j = 0, i = 0; i < length; i++) { Declaration* decl = declarations->at(i); Variable* var = decl->proxy()->var(); @@ -596,7 +599,7 @@ void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { void FullCodeGenerator::SetStatementPosition(Statement* stmt) { if (FLAG_debug_info) { #ifdef ENABLE_DEBUGGER_SUPPORT - if (!Debugger::IsDebuggerActive()) { + if (!isolate()->debugger()->IsDebuggerActive()) { CodeGenerator::RecordPositions(masm_, stmt->statement_pos()); } else { // Check if the statement will be breakable without adding a debug break @@ -624,7 +627,7 @@ void FullCodeGenerator::SetStatementPosition(Statement* stmt) { void FullCodeGenerator::SetExpressionPosition(Expression* expr, int pos) { if (FLAG_debug_info) { #ifdef ENABLE_DEBUGGER_SUPPORT - if (!Debugger::IsDebuggerActive()) { + if (!isolate()->debugger()->IsDebuggerActive()) { CodeGenerator::RecordPositions(masm_, pos); } else { // Check if the expression will be breakable without adding a debug break @@ -694,7 +697,7 @@ FullCodeGenerator::InlineFunctionGenerator void FullCodeGenerator::EmitInlineRuntimeCall(CallRuntime* node) { ZoneList<Expression*>* args = node->arguments(); Handle<String> name = node->name(); - Runtime::Function* function = node->function(); + const Runtime::Function* function = node->function(); ASSERT(function != NULL); ASSERT(function->intrinsic_type == Runtime::INLINE); InlineFunctionGenerator generator = |