MIPS: Remove TLS access for current Zone.

Port r11761 (769624bf)

Original commit message:
By passing around a Zone object explicitly we no longer need to do a
TLS access at the sites that allocate memory from the current Zone.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10537108
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4b50adaf
...@@ -5980,7 +5980,8 @@ RegExpEngine::CompilationResult RegExpEngine::Compile( ...@@ -5980,7 +5980,8 @@ RegExpEngine::CompilationResult RegExpEngine::Compile(
RegExpMacroAssemblerARM macro_assembler(mode, (data->capture_count + 1) * 2, RegExpMacroAssemblerARM macro_assembler(mode, (data->capture_count + 1) * 2,
zone); zone);
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
RegExpMacroAssemblerMIPS macro_assembler(mode, (data->capture_count + 1) * 2); RegExpMacroAssemblerMIPS macro_assembler(mode, (data->capture_count + 1) * 2,
zone);
#endif #endif
#else // V8_INTERPRETED_REGEXP #else // V8_INTERPRETED_REGEXP
......
...@@ -817,10 +817,11 @@ void FullCodeGenerator::VisitVariableDeclaration( ...@@ -817,10 +817,11 @@ void FullCodeGenerator::VisitVariableDeclaration(
bool hole_init = mode == CONST || mode == CONST_HARMONY || mode == LET; bool hole_init = mode == CONST || mode == CONST_HARMONY || mode == LET;
switch (variable->location()) { switch (variable->location()) {
case Variable::UNALLOCATED: case Variable::UNALLOCATED:
globals_->Add(variable->name()); globals_->Add(variable->name(), zone());
globals_->Add(variable->binding_needs_init() globals_->Add(variable->binding_needs_init()
? isolate()->factory()->the_hole_value() ? isolate()->factory()->the_hole_value()
: isolate()->factory()->undefined_value()); : isolate()->factory()->undefined_value(),
zone());
break; break;
case Variable::PARAMETER: case Variable::PARAMETER:
...@@ -877,12 +878,12 @@ void FullCodeGenerator::VisitFunctionDeclaration( ...@@ -877,12 +878,12 @@ void FullCodeGenerator::VisitFunctionDeclaration(
Variable* variable = proxy->var(); Variable* variable = proxy->var();
switch (variable->location()) { switch (variable->location()) {
case Variable::UNALLOCATED: { case Variable::UNALLOCATED: {
globals_->Add(variable->name()); globals_->Add(variable->name(), zone());
Handle<SharedFunctionInfo> function = Handle<SharedFunctionInfo> function =
Compiler::BuildFunctionInfo(declaration->fun(), script()); Compiler::BuildFunctionInfo(declaration->fun(), script());
// Check for stack-overflow exception. // Check for stack-overflow exception.
if (function.is_null()) return SetStackOverflow(); if (function.is_null()) return SetStackOverflow();
globals_->Add(function); globals_->Add(function, zone());
break; break;
} }
...@@ -936,8 +937,8 @@ void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { ...@@ -936,8 +937,8 @@ void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
switch (variable->location()) { switch (variable->location()) {
case Variable::UNALLOCATED: { case Variable::UNALLOCATED: {
Comment cmnt(masm_, "[ ModuleDeclaration"); Comment cmnt(masm_, "[ ModuleDeclaration");
globals_->Add(variable->name()); globals_->Add(variable->name(), zone());
globals_->Add(instance); globals_->Add(instance, zone());
Visit(declaration->module()); Visit(declaration->module());
break; break;
} }
...@@ -1611,7 +1612,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { ...@@ -1611,7 +1612,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
// Mark all computed expressions that are bound to a key that // Mark all computed expressions that are bound to a key that
// is shadowed by a later occurrence of the same key. For the // is shadowed by a later occurrence of the same key. For the
// marked expressions, no store code is emitted. // marked expressions, no store code is emitted.
expr->CalculateEmitStore(); expr->CalculateEmitStore(zone());
AccessorTable accessor_table(isolate()->zone()); AccessorTable accessor_table(isolate()->zone());
for (int i = 0; i < expr->properties()->length(); i++) { for (int i = 0; i < expr->properties()->length(); i++) {
......
...@@ -599,7 +599,7 @@ void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment* environment, ...@@ -599,7 +599,7 @@ void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment* environment,
environment->Register(deoptimization_index, environment->Register(deoptimization_index,
translation.index(), translation.index(),
(mode == Safepoint::kLazyDeopt) ? pc_offset : -1); (mode == Safepoint::kLazyDeopt) ? pc_offset : -1);
deoptimizations_.Add(environment); deoptimizations_.Add(environment, zone());
} }
} }
...@@ -678,7 +678,7 @@ int LCodeGen::DefineDeoptimizationLiteral(Handle<Object> literal) { ...@@ -678,7 +678,7 @@ int LCodeGen::DefineDeoptimizationLiteral(Handle<Object> literal) {
for (int i = 0; i < deoptimization_literals_.length(); ++i) { for (int i = 0; i < deoptimization_literals_.length(); ++i) {
if (deoptimization_literals_[i].is_identical_to(literal)) return i; if (deoptimization_literals_[i].is_identical_to(literal)) return i;
} }
deoptimization_literals_.Add(literal); deoptimization_literals_.Add(literal, zone());
return result; return result;
} }
...@@ -726,12 +726,12 @@ void LCodeGen::RecordSafepoint( ...@@ -726,12 +726,12 @@ void LCodeGen::RecordSafepoint(
if (pointer->IsStackSlot()) { if (pointer->IsStackSlot()) {
safepoint.DefinePointerSlot(pointer->index(), zone()); safepoint.DefinePointerSlot(pointer->index(), zone());
} else if (pointer->IsRegister() && (kind & Safepoint::kWithRegisters)) { } else if (pointer->IsRegister() && (kind & Safepoint::kWithRegisters)) {
safepoint.DefinePointerRegister(ToRegister(pointer)); safepoint.DefinePointerRegister(ToRegister(pointer), zone());
} }
} }
if (kind & Safepoint::kWithRegisters) { if (kind & Safepoint::kWithRegisters) {
// Register cp always contains a pointer to the context. // Register cp always contains a pointer to the context.
safepoint.DefinePointerRegister(cp); safepoint.DefinePointerRegister(cp, zone());
} }
} }
...@@ -743,7 +743,7 @@ void LCodeGen::RecordSafepoint(LPointerMap* pointers, ...@@ -743,7 +743,7 @@ void LCodeGen::RecordSafepoint(LPointerMap* pointers,
void LCodeGen::RecordSafepoint(Safepoint::DeoptMode deopt_mode) { void LCodeGen::RecordSafepoint(Safepoint::DeoptMode deopt_mode) {
LPointerMap empty_pointers(RelocInfo::kNoPosition); LPointerMap empty_pointers(RelocInfo::kNoPosition, zone());
RecordSafepoint(&empty_pointers, deopt_mode); RecordSafepoint(&empty_pointers, deopt_mode);
} }
...@@ -2044,7 +2044,7 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { ...@@ -2044,7 +2044,7 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
}; };
DeferredInstanceOfKnownGlobal* deferred; DeferredInstanceOfKnownGlobal* deferred;
deferred = new DeferredInstanceOfKnownGlobal(this, instr); deferred = new(zone()) DeferredInstanceOfKnownGlobal(this, instr);
Label done, false_result; Label done, false_result;
Register object = ToRegister(instr->InputAt(0)); Register object = ToRegister(instr->InputAt(0));
...@@ -3025,7 +3025,7 @@ void LCodeGen::DoMathAbs(LUnaryMathOperation* instr) { ...@@ -3025,7 +3025,7 @@ void LCodeGen::DoMathAbs(LUnaryMathOperation* instr) {
} else { } else {
// Representation is tagged. // Representation is tagged.
DeferredMathAbsTaggedHeapNumber* deferred = DeferredMathAbsTaggedHeapNumber* deferred =
new DeferredMathAbsTaggedHeapNumber(this, instr); new(zone()) DeferredMathAbsTaggedHeapNumber(this, instr);
Register input = ToRegister(instr->InputAt(0)); Register input = ToRegister(instr->InputAt(0));
// Smi check. // Smi check.
__ JumpIfNotSmi(input, deferred->entry()); __ JumpIfNotSmi(input, deferred->entry());
...@@ -3216,7 +3216,7 @@ void LCodeGen::DoRandom(LRandom* instr) { ...@@ -3216,7 +3216,7 @@ void LCodeGen::DoRandom(LRandom* instr) {
LRandom* instr_; LRandom* instr_;
}; };
DeferredDoRandom* deferred = new DeferredDoRandom(this, instr); DeferredDoRandom* deferred = new(zone()) DeferredDoRandom(this, instr);
// Having marked this instruction as a call we can use any // Having marked this instruction as a call we can use any
// registers. // registers.
ASSERT(ToDoubleRegister(instr->result()).is(f0)); ASSERT(ToDoubleRegister(instr->result()).is(f0));
...@@ -3777,7 +3777,7 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { ...@@ -3777,7 +3777,7 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
}; };
DeferredStringCharCodeAt* deferred = DeferredStringCharCodeAt* deferred =
new DeferredStringCharCodeAt(this, instr); new(zone()) DeferredStringCharCodeAt(this, instr);
StringCharLoadGenerator::Generate(masm(), StringCharLoadGenerator::Generate(masm(),
ToRegister(instr->string()), ToRegister(instr->string()),
ToRegister(instr->index()), ToRegister(instr->index()),
...@@ -3831,7 +3831,7 @@ void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { ...@@ -3831,7 +3831,7 @@ void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
}; };
DeferredStringCharFromCode* deferred = DeferredStringCharFromCode* deferred =
new DeferredStringCharFromCode(this, instr); new(zone()) DeferredStringCharFromCode(this, instr);
ASSERT(instr->hydrogen()->value()->representation().IsInteger32()); ASSERT(instr->hydrogen()->value()->representation().IsInteger32());
Register char_code = ToRegister(instr->char_code()); Register char_code = ToRegister(instr->char_code());
...@@ -3907,7 +3907,7 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) { ...@@ -3907,7 +3907,7 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
Register dst = ToRegister(instr->result()); Register dst = ToRegister(instr->result());
Register overflow = scratch0(); Register overflow = scratch0();
DeferredNumberTagI* deferred = new DeferredNumberTagI(this, instr); DeferredNumberTagI* deferred = new(zone()) DeferredNumberTagI(this, instr);
__ SmiTagCheckOverflow(dst, src, overflow); __ SmiTagCheckOverflow(dst, src, overflow);
__ BranchOnOverflow(deferred->entry(), overflow); __ BranchOnOverflow(deferred->entry(), overflow);
__ bind(deferred->exit()); __ bind(deferred->exit());
...@@ -3975,7 +3975,7 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) { ...@@ -3975,7 +3975,7 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
Register temp1 = ToRegister(instr->TempAt(0)); Register temp1 = ToRegister(instr->TempAt(0));
Register temp2 = ToRegister(instr->TempAt(1)); Register temp2 = ToRegister(instr->TempAt(1));
DeferredNumberTagD* deferred = new DeferredNumberTagD(this, instr); DeferredNumberTagD* deferred = new(zone()) DeferredNumberTagD(this, instr);
if (FLAG_inline_new) { if (FLAG_inline_new) {
__ LoadRoot(scratch, Heap::kHeapNumberMapRootIndex); __ LoadRoot(scratch, Heap::kHeapNumberMapRootIndex);
__ AllocateHeapNumber(reg, temp1, temp2, scratch, deferred->entry()); __ AllocateHeapNumber(reg, temp1, temp2, scratch, deferred->entry());
...@@ -4169,7 +4169,7 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) { ...@@ -4169,7 +4169,7 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
Register input_reg = ToRegister(input); Register input_reg = ToRegister(input);
DeferredTaggedToI* deferred = new DeferredTaggedToI(this, instr); DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr);
// Let the deferred code handle the HeapObject case. // Let the deferred code handle the HeapObject case.
__ JumpIfNotSmi(input_reg, deferred->entry()); __ JumpIfNotSmi(input_reg, deferred->entry());
...@@ -4420,7 +4420,8 @@ void LCodeGen::DoAllocateObject(LAllocateObject* instr) { ...@@ -4420,7 +4420,8 @@ void LCodeGen::DoAllocateObject(LAllocateObject* instr) {
LAllocateObject* instr_; LAllocateObject* instr_;
}; };
DeferredAllocateObject* deferred = new DeferredAllocateObject(this, instr); DeferredAllocateObject* deferred =
new(zone()) DeferredAllocateObject(this, instr);
Register result = ToRegister(instr->result()); Register result = ToRegister(instr->result());
Register scratch = ToRegister(instr->TempAt(0)); Register scratch = ToRegister(instr->TempAt(0));
...@@ -5065,7 +5066,7 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) { ...@@ -5065,7 +5066,7 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) {
ASSERT(instr->hydrogen()->is_backwards_branch()); ASSERT(instr->hydrogen()->is_backwards_branch());
// Perform stack overflow check if this goto needs it before jumping. // Perform stack overflow check if this goto needs it before jumping.
DeferredStackCheck* deferred_stack_check = DeferredStackCheck* deferred_stack_check =
new DeferredStackCheck(this, instr); new(zone()) DeferredStackCheck(this, instr);
__ LoadRoot(at, Heap::kStackLimitRootIndex); __ LoadRoot(at, Heap::kStackLimitRootIndex);
__ Branch(deferred_stack_check->entry(), lo, sp, Operand(at)); __ Branch(deferred_stack_check->entry(), lo, sp, Operand(at));
EnsureSpaceForLazyDeopt(); EnsureSpaceForLazyDeopt();
......
...@@ -51,20 +51,20 @@ class LCodeGen BASE_EMBEDDED { ...@@ -51,20 +51,20 @@ class LCodeGen BASE_EMBEDDED {
current_block_(-1), current_block_(-1),
current_instruction_(-1), current_instruction_(-1),
instructions_(chunk->instructions()), instructions_(chunk->instructions()),
deoptimizations_(4), deoptimizations_(4, zone),
deopt_jump_table_(4), deopt_jump_table_(4, zone),
deoptimization_literals_(8), deoptimization_literals_(8, zone),
inlined_function_count_(0), inlined_function_count_(0),
scope_(info->scope()), scope_(info->scope()),
status_(UNUSED), status_(UNUSED),
translations_(zone), translations_(zone),
deferred_(8), deferred_(8, zone),
osr_pc_offset_(-1), osr_pc_offset_(-1),
last_lazy_deopt_pc_(0), last_lazy_deopt_pc_(0),
safepoints_(zone), safepoints_(zone),
zone_(zone),
resolver_(this), resolver_(this),
expected_safepoint_kind_(Safepoint::kSimple), expected_safepoint_kind_(Safepoint::kSimple) {
zone_(zone) {
PopulateDeoptimizationLiteralsWithInlinedFunctions(); PopulateDeoptimizationLiteralsWithInlinedFunctions();
} }
...@@ -178,7 +178,7 @@ class LCodeGen BASE_EMBEDDED { ...@@ -178,7 +178,7 @@ class LCodeGen BASE_EMBEDDED {
void Abort(const char* format, ...); void Abort(const char* format, ...);
void Comment(const char* format, ...); void Comment(const char* format, ...);
void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code); } void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); }
// Code generation passes. Returns true if code generation should // Code generation passes. Returns true if code generation should
// continue. // continue.
...@@ -375,13 +375,13 @@ class LCodeGen BASE_EMBEDDED { ...@@ -375,13 +375,13 @@ class LCodeGen BASE_EMBEDDED {
// itself is emitted at the end of the generated code. // itself is emitted at the end of the generated code.
SafepointTableBuilder safepoints_; SafepointTableBuilder safepoints_;
Zone* zone_;
// Compiler from a set of parallel moves to a sequential list of moves. // Compiler from a set of parallel moves to a sequential list of moves.
LGapResolver resolver_; LGapResolver resolver_;
Safepoint::Kind expected_safepoint_kind_; Safepoint::Kind expected_safepoint_kind_;
Zone* zone_;
class PushSafepointRegistersScope BASE_EMBEDDED { class PushSafepointRegistersScope BASE_EMBEDDED {
public: public:
PushSafepointRegistersScope(LCodeGen* codegen, PushSafepointRegistersScope(LCodeGen* codegen,
......
...@@ -35,7 +35,7 @@ namespace internal { ...@@ -35,7 +35,7 @@ namespace internal {
LGapResolver::LGapResolver(LCodeGen* owner) LGapResolver::LGapResolver(LCodeGen* owner)
: cgen_(owner), : cgen_(owner),
moves_(32), moves_(32, owner->zone()),
root_index_(0), root_index_(0),
in_cycle_(false), in_cycle_(false),
saved_destination_(NULL) {} saved_destination_(NULL) {}
...@@ -80,7 +80,7 @@ void LGapResolver::BuildInitialMoveList(LParallelMove* parallel_move) { ...@@ -80,7 +80,7 @@ void LGapResolver::BuildInitialMoveList(LParallelMove* parallel_move) {
const ZoneList<LMoveOperands>* moves = parallel_move->move_operands(); const ZoneList<LMoveOperands>* moves = parallel_move->move_operands();
for (int i = 0; i < moves->length(); ++i) { for (int i = 0; i < moves->length(); ++i) {
LMoveOperands move = moves->at(i); LMoveOperands move = moves->at(i);
if (!move.IsRedundant()) moves_.Add(move); if (!move.IsRedundant()) moves_.Add(move, cgen_->zone());
} }
Verify(); Verify();
} }
......
...@@ -411,9 +411,9 @@ LChunk::LChunk(CompilationInfo* info, HGraph* graph) ...@@ -411,9 +411,9 @@ LChunk::LChunk(CompilationInfo* info, HGraph* graph)
: spill_slot_count_(0), : spill_slot_count_(0),
info_(info), info_(info),
graph_(graph), graph_(graph),
instructions_(32), instructions_(32, graph->zone()),
pointer_maps_(8), pointer_maps_(8, graph->zone()),
inlined_closures_(1) { inlined_closures_(1, graph->zone()) {
} }
...@@ -427,9 +427,9 @@ int LChunk::GetNextSpillIndex(bool is_double) { ...@@ -427,9 +427,9 @@ int LChunk::GetNextSpillIndex(bool is_double) {
LOperand* LChunk::GetNextSpillSlot(bool is_double) { LOperand* LChunk::GetNextSpillSlot(bool is_double) {
int index = GetNextSpillIndex(is_double); int index = GetNextSpillIndex(is_double);
if (is_double) { if (is_double) {
return LDoubleStackSlot::Create(index); return LDoubleStackSlot::Create(index, zone());
} else { } else {
return LStackSlot::Create(index); return LStackSlot::Create(index, zone());
} }
} }
...@@ -474,23 +474,23 @@ void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) { ...@@ -474,23 +474,23 @@ void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) {
LInstructionGap* gap = new(graph_->zone()) LInstructionGap(block); LInstructionGap* gap = new(graph_->zone()) LInstructionGap(block);
int index = -1; int index = -1;
if (instr->IsControl()) { if (instr->IsControl()) {
instructions_.Add(gap); instructions_.Add(gap, zone());
index = instructions_.length(); index = instructions_.length();
instructions_.Add(instr); instructions_.Add(instr, zone());
} else { } else {
index = instructions_.length(); index = instructions_.length();
instructions_.Add(instr); instructions_.Add(instr, zone());
instructions_.Add(gap); instructions_.Add(gap, zone());
} }
if (instr->HasPointerMap()) { if (instr->HasPointerMap()) {
pointer_maps_.Add(instr->pointer_map()); pointer_maps_.Add(instr->pointer_map(), zone());
instr->pointer_map()->set_lithium_position(index); instr->pointer_map()->set_lithium_position(index);
} }
} }
LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) { LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) {
return LConstantOperand::Create(constant->id()); return LConstantOperand::Create(constant->id(), zone());
} }
...@@ -529,7 +529,8 @@ int LChunk::NearestGapPos(int index) const { ...@@ -529,7 +529,8 @@ int LChunk::NearestGapPos(int index) const {
void LChunk::AddGapMove(int index, LOperand* from, LOperand* to) { void LChunk::AddGapMove(int index, LOperand* from, LOperand* to) {
GetGapAt(index)->GetOrCreateParallelMove(LGap::START)->AddMove(from, to); GetGapAt(index)->GetOrCreateParallelMove(
LGap::START, zone())->AddMove(from, to, zone());
} }
...@@ -762,7 +763,7 @@ LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, ...@@ -762,7 +763,7 @@ LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) {
ASSERT(!instr->HasPointerMap()); ASSERT(!instr->HasPointerMap());
instr->set_pointer_map(new(zone()) LPointerMap(position_)); instr->set_pointer_map(new(zone()) LPointerMap(position_, zone()));
return instr; return instr;
} }
...@@ -1596,7 +1597,8 @@ LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { ...@@ -1596,7 +1597,8 @@ LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { LInstruction* LChunkBuilder::DoDateField(HDateField* instr) {
LOperand* object = UseFixed(instr->value(), a0); LOperand* object = UseFixed(instr->value(), a0);
LDateField* result = new LDateField(object, FixedTemp(a1), instr->index()); LDateField* result =
new(zone()) LDateField(object, FixedTemp(a1), instr->index());
return MarkAsCall(DefineFixed(result, v0), instr); return MarkAsCall(DefineFixed(result, v0), instr);
} }
...@@ -2111,8 +2113,8 @@ LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { ...@@ -2111,8 +2113,8 @@ LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) {
LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) {
LAllocateObject* result = new(zone()) LAllocateObject( LAllocateObject* result =
TempRegister(), TempRegister()); new(zone()) LAllocateObject(TempRegister(), TempRegister());
return AssignPointerMap(DefineAsRegister(result)); return AssignPointerMap(DefineAsRegister(result));
} }
......
...@@ -332,8 +332,10 @@ class LGap: public LTemplateInstruction<0, 0, 0> { ...@@ -332,8 +332,10 @@ class LGap: public LTemplateInstruction<0, 0, 0> {
LAST_INNER_POSITION = AFTER LAST_INNER_POSITION = AFTER
}; };
LParallelMove* GetOrCreateParallelMove(InnerPosition pos) { LParallelMove* GetOrCreateParallelMove(InnerPosition pos, Zone* zone) {
if (parallel_moves_[pos] == NULL) parallel_moves_[pos] = new LParallelMove; if (parallel_moves_[pos] == NULL) {
parallel_moves_[pos] = new(zone) LParallelMove(zone);
}
return parallel_moves_[pos]; return parallel_moves_[pos];
} }
...@@ -2233,9 +2235,11 @@ class LChunk: public ZoneObject { ...@@ -2233,9 +2235,11 @@ class LChunk: public ZoneObject {
} }
void AddInlinedClosure(Handle<JSFunction> closure) { void AddInlinedClosure(Handle<JSFunction> closure) {
inlined_closures_.Add(closure); inlined_closures_.Add(closure, zone());
} }
Zone* zone() const { return graph_->zone(); }
private: private:
int spill_slot_count_; int spill_slot_count_;
CompilationInfo* info_; CompilationInfo* info_;
......
...@@ -119,8 +119,10 @@ namespace internal { ...@@ -119,8 +119,10 @@ namespace internal {
RegExpMacroAssemblerMIPS::RegExpMacroAssemblerMIPS( RegExpMacroAssemblerMIPS::RegExpMacroAssemblerMIPS(
Mode mode, Mode mode,
int registers_to_save) int registers_to_save,
: masm_(new MacroAssembler(Isolate::Current(), NULL, kRegExpCodeSize)), Zone* zone)
: NativeRegExpMacroAssembler(zone),
masm_(new MacroAssembler(Isolate::Current(), NULL, kRegExpCodeSize)),
mode_(mode), mode_(mode),
num_registers_(registers_to_save), num_registers_(registers_to_save),
num_saved_registers_(registers_to_save), num_saved_registers_(registers_to_save),
......
...@@ -47,7 +47,7 @@ class RegExpMacroAssemblerMIPS: public RegExpMacroAssembler { ...@@ -47,7 +47,7 @@ class RegExpMacroAssemblerMIPS: public RegExpMacroAssembler {
#else // V8_INTERPRETED_REGEXP #else // V8_INTERPRETED_REGEXP
class RegExpMacroAssemblerMIPS: public NativeRegExpMacroAssembler { class RegExpMacroAssemblerMIPS: public NativeRegExpMacroAssembler {
public: public:
RegExpMacroAssemblerMIPS(Mode mode, int registers_to_save); RegExpMacroAssemblerMIPS(Mode mode, int registers_to_save, Zone* zone);
virtual ~RegExpMacroAssemblerMIPS(); virtual ~RegExpMacroAssemblerMIPS();
virtual int stack_limit_slack(); virtual int stack_limit_slack();
virtual void AdvanceCurrentPosition(int by); virtual void AdvanceCurrentPosition(int by);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment