| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 osr_pc_offset_ = masm()->pc_offset(); | 262 osr_pc_offset_ = masm()->pc_offset(); |
| 263 | 263 |
| 264 // Adjust the frame size, subsuming the unoptimized frame into the | 264 // Adjust the frame size, subsuming the unoptimized frame into the |
| 265 // optimized frame. | 265 // optimized frame. |
| 266 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); | 266 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); |
| 267 ASSERT(slots >= 0); | 267 ASSERT(slots >= 0); |
| 268 __ sub(sp, sp, Operand(slots * kPointerSize)); | 268 __ sub(sp, sp, Operand(slots * kPointerSize)); |
| 269 } | 269 } |
| 270 | 270 |
| 271 | 271 |
| 272 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { |
| 273 if (!instr->IsLazyBailout() && !instr->IsGap()) { |
| 274 safepoints_.BumpLastLazySafepointIndex(); |
| 275 } |
| 276 } |
| 277 |
| 278 |
| 272 bool LCodeGen::GenerateDeferredCode() { | 279 bool LCodeGen::GenerateDeferredCode() { |
| 273 ASSERT(is_generating()); | 280 ASSERT(is_generating()); |
| 274 if (deferred_.length() > 0) { | 281 if (deferred_.length() > 0) { |
| 275 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { | 282 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { |
| 276 LDeferredCode* code = deferred_[i]; | 283 LDeferredCode* code = deferred_[i]; |
| 277 | 284 |
| 278 HValue* value = | 285 HValue* value = |
| 279 instructions_->at(code->instruction_index())->hydrogen_value(); | 286 instructions_->at(code->instruction_index())->hydrogen_value(); |
| 280 RecordAndWritePosition(value->position()); | 287 RecordAndWritePosition(value->position()); |
| 281 | 288 |
| (...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2105 ASSERT(ToRegister(instr->context()).is(cp)); | 2112 ASSERT(ToRegister(instr->context()).is(cp)); |
| 2106 ASSERT(ToRegister(instr->left()).is(r1)); | 2113 ASSERT(ToRegister(instr->left()).is(r1)); |
| 2107 ASSERT(ToRegister(instr->right()).is(r0)); | 2114 ASSERT(ToRegister(instr->right()).is(r0)); |
| 2108 ASSERT(ToRegister(instr->result()).is(r0)); | 2115 ASSERT(ToRegister(instr->result()).is(r0)); |
| 2109 | 2116 |
| 2110 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); | 2117 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); |
| 2111 // Block literal pool emission to ensure nop indicating no inlined smi code | 2118 // Block literal pool emission to ensure nop indicating no inlined smi code |
| 2112 // is in the correct position. | 2119 // is in the correct position. |
| 2113 Assembler::BlockConstPoolScope block_const_pool(masm()); | 2120 Assembler::BlockConstPoolScope block_const_pool(masm()); |
| 2114 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 2121 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 2115 __ nop(); // Signals no inlined code. | |
| 2116 } | 2122 } |
| 2117 | 2123 |
| 2118 | 2124 |
| 2119 template<class InstrType> | 2125 template<class InstrType> |
| 2120 void LCodeGen::EmitBranch(InstrType instr, Condition condition) { | 2126 void LCodeGen::EmitBranch(InstrType instr, Condition condition) { |
| 2121 int left_block = instr->TrueDestination(chunk_); | 2127 int left_block = instr->TrueDestination(chunk_); |
| 2122 int right_block = instr->FalseDestination(chunk_); | 2128 int right_block = instr->FalseDestination(chunk_); |
| 2123 | 2129 |
| 2124 int next_block = GetNextEmittedBlock(); | 2130 int next_block = GetNextEmittedBlock(); |
| 2125 | 2131 |
| (...skipping 3617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5743 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5749 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5744 __ ldr(result, FieldMemOperand(scratch, | 5750 __ ldr(result, FieldMemOperand(scratch, |
| 5745 FixedArray::kHeaderSize - kPointerSize)); | 5751 FixedArray::kHeaderSize - kPointerSize)); |
| 5746 __ bind(&done); | 5752 __ bind(&done); |
| 5747 } | 5753 } |
| 5748 | 5754 |
| 5749 | 5755 |
| 5750 #undef __ | 5756 #undef __ |
| 5751 | 5757 |
| 5752 } } // namespace v8::internal | 5758 } } // namespace v8::internal |
| OLD | NEW |