| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 __ bind(&ok); | 170 __ bind(&ok); |
| 171 } | 171 } |
| 172 | 172 |
| 173 // Open a frame scope to indicate that there is a frame on the stack. The | 173 // Open a frame scope to indicate that there is a frame on the stack. The |
| 174 // MANUAL indicates that the scope shouldn't actually generate code to set up | 174 // MANUAL indicates that the scope shouldn't actually generate code to set up |
| 175 // the frame (that is done below). | 175 // the frame (that is done below). |
| 176 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 176 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
| 177 | 177 |
| 178 info->set_prologue_offset(masm_->pc_offset()); | 178 info->set_prologue_offset(masm_->pc_offset()); |
| 179 __ Prologue(BUILD_FUNCTION_FRAME); | 179 ASSERT(!info->IsStub()); |
| 180 __ Prologue(info); |
| 180 info->AddNoFrameRange(0, masm_->pc_offset()); | 181 info->AddNoFrameRange(0, masm_->pc_offset()); |
| 181 | 182 |
| 182 { Comment cmnt(masm_, "[ Allocate locals"); | 183 { Comment cmnt(masm_, "[ Allocate locals"); |
| 183 int locals_count = info->scope()->num_stack_slots(); | 184 int locals_count = info->scope()->num_stack_slots(); |
| 184 // Generators allocate locals, if any, in context slots. | 185 // Generators allocate locals, if any, in context slots. |
| 185 ASSERT(!info->function()->is_generator() || locals_count == 0); | 186 ASSERT(!info->function()->is_generator() || locals_count == 0); |
| 186 if (locals_count > 0) { | 187 if (locals_count > 0) { |
| 187 if (locals_count >= 128) { | 188 if (locals_count >= 128) { |
| 188 EmitStackCheck(masm_, a2, locals_count, t5); | 189 EmitStackCheck(masm_, a2, locals_count, t5); |
| 189 } | 190 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) { | 347 void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) { |
| 347 __ li(a2, Operand(profiling_counter_)); | 348 __ li(a2, Operand(profiling_counter_)); |
| 348 __ lw(a3, FieldMemOperand(a2, Cell::kValueOffset)); | 349 __ lw(a3, FieldMemOperand(a2, Cell::kValueOffset)); |
| 349 __ Subu(a3, a3, Operand(Smi::FromInt(delta))); | 350 __ Subu(a3, a3, Operand(Smi::FromInt(delta))); |
| 350 __ sw(a3, FieldMemOperand(a2, Cell::kValueOffset)); | 351 __ sw(a3, FieldMemOperand(a2, Cell::kValueOffset)); |
| 351 } | 352 } |
| 352 | 353 |
| 353 | 354 |
| 354 void FullCodeGenerator::EmitProfilingCounterReset() { | 355 void FullCodeGenerator::EmitProfilingCounterReset() { |
| 355 int reset_value = FLAG_interrupt_budget; | 356 int reset_value = FLAG_interrupt_budget; |
| 356 if (isolate()->IsDebuggerActive()) { | 357 if (info_->is_debug()) { |
| 357 // Detect debug break requests as soon as possible. | 358 // Detect debug break requests as soon as possible. |
| 358 reset_value = FLAG_interrupt_budget >> 4; | 359 reset_value = FLAG_interrupt_budget >> 4; |
| 359 } | 360 } |
| 360 __ li(a2, Operand(profiling_counter_)); | 361 __ li(a2, Operand(profiling_counter_)); |
| 361 __ li(a3, Operand(Smi::FromInt(reset_value))); | 362 __ li(a3, Operand(Smi::FromInt(reset_value))); |
| 362 __ sw(a3, FieldMemOperand(a2, Cell::kValueOffset)); | 363 __ sw(a3, FieldMemOperand(a2, Cell::kValueOffset)); |
| 363 } | 364 } |
| 364 | 365 |
| 365 | 366 |
| 366 void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, | 367 void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, |
| (...skipping 4485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4852 Assembler::target_address_at(pc_immediate_load_address)) == | 4853 Assembler::target_address_at(pc_immediate_load_address)) == |
| 4853 reinterpret_cast<uint32_t>( | 4854 reinterpret_cast<uint32_t>( |
| 4854 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4855 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4855 return OSR_AFTER_STACK_CHECK; | 4856 return OSR_AFTER_STACK_CHECK; |
| 4856 } | 4857 } |
| 4857 | 4858 |
| 4858 | 4859 |
| 4859 } } // namespace v8::internal | 4860 } } // namespace v8::internal |
| 4860 | 4861 |
| 4861 #endif // V8_TARGET_ARCH_MIPS | 4862 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |