| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 osr_pc_offset_ = masm()->pc_offset(); | 252 osr_pc_offset_ = masm()->pc_offset(); |
| 253 | 253 |
| 254 // Adjust the frame size, subsuming the unoptimized frame into the | 254 // Adjust the frame size, subsuming the unoptimized frame into the |
| 255 // optimized frame. | 255 // optimized frame. |
| 256 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); | 256 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); |
| 257 ASSERT(slots >= 0); | 257 ASSERT(slots >= 0); |
| 258 __ sub(sp, sp, Operand(slots * kPointerSize)); | 258 __ sub(sp, sp, Operand(slots * kPointerSize)); |
| 259 } | 259 } |
| 260 | 260 |
| 261 | 261 |
| 262 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { |
| 263 if (!instr->IsLazyBailout() && !instr->IsGap()) { |
| 264 safepoints_.BumpLastLazySafepointIndex(); |
| 265 } |
| 266 } |
| 267 |
| 268 |
| 262 bool LCodeGen::GenerateDeferredCode() { | 269 bool LCodeGen::GenerateDeferredCode() { |
| 263 ASSERT(is_generating()); | 270 ASSERT(is_generating()); |
| 264 if (deferred_.length() > 0) { | 271 if (deferred_.length() > 0) { |
| 265 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { | 272 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { |
| 266 LDeferredCode* code = deferred_[i]; | 273 LDeferredCode* code = deferred_[i]; |
| 267 | 274 |
| 268 HValue* value = | 275 HValue* value = |
| 269 instructions_->at(code->instruction_index())->hydrogen_value(); | 276 instructions_->at(code->instruction_index())->hydrogen_value(); |
| 270 RecordAndWritePosition(value->position()); | 277 RecordAndWritePosition(value->position()); |
| 271 | 278 |
| (...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2183 ASSERT(ToRegister(instr->context()).is(cp)); | 2190 ASSERT(ToRegister(instr->context()).is(cp)); |
| 2184 ASSERT(ToRegister(instr->left()).is(r1)); | 2191 ASSERT(ToRegister(instr->left()).is(r1)); |
| 2185 ASSERT(ToRegister(instr->right()).is(r0)); | 2192 ASSERT(ToRegister(instr->right()).is(r0)); |
| 2186 ASSERT(ToRegister(instr->result()).is(r0)); | 2193 ASSERT(ToRegister(instr->result()).is(r0)); |
| 2187 | 2194 |
| 2188 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); | 2195 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); |
| 2189 // Block literal pool emission to ensure nop indicating no inlined smi code | 2196 // Block literal pool emission to ensure nop indicating no inlined smi code |
| 2190 // is in the correct position. | 2197 // is in the correct position. |
| 2191 Assembler::BlockConstPoolScope block_const_pool(masm()); | 2198 Assembler::BlockConstPoolScope block_const_pool(masm()); |
| 2192 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 2199 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 2193 __ nop(); // Signals no inlined code. | |
| 2194 } | 2200 } |
| 2195 | 2201 |
| 2196 | 2202 |
| 2197 template<class InstrType> | 2203 template<class InstrType> |
| 2198 void LCodeGen::EmitBranch(InstrType instr, Condition condition) { | 2204 void LCodeGen::EmitBranch(InstrType instr, Condition condition) { |
| 2199 int left_block = instr->TrueDestination(chunk_); | 2205 int left_block = instr->TrueDestination(chunk_); |
| 2200 int right_block = instr->FalseDestination(chunk_); | 2206 int right_block = instr->FalseDestination(chunk_); |
| 2201 | 2207 |
| 2202 int next_block = GetNextEmittedBlock(); | 2208 int next_block = GetNextEmittedBlock(); |
| 2203 | 2209 |
| (...skipping 3691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5895 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5901 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5896 __ ldr(result, FieldMemOperand(scratch, | 5902 __ ldr(result, FieldMemOperand(scratch, |
| 5897 FixedArray::kHeaderSize - kPointerSize)); | 5903 FixedArray::kHeaderSize - kPointerSize)); |
| 5898 __ bind(&done); | 5904 __ bind(&done); |
| 5899 } | 5905 } |
| 5900 | 5906 |
| 5901 | 5907 |
| 5902 #undef __ | 5908 #undef __ |
| 5903 | 5909 |
| 5904 } } // namespace v8::internal | 5910 } } // namespace v8::internal |
| OLD | NEW |