Index: src/full-codegen.cc |
=================================================================== |
--- src/full-codegen.cc (revision 7267) |
+++ src/full-codegen.cc (working copy) |
@@ -275,10 +275,11 @@ |
#define __ ACCESS_MASM(masm()) |
bool FullCodeGenerator::MakeCode(CompilationInfo* info) { |
+ Isolate* isolate = Isolate::Current(); |
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 @@ |
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 @@ |
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 @@ |
// 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::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::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 @@ |
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 = |