| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 383 |
| 384 // Adjust the frame size, subsuming the unoptimized frame into the | 384 // Adjust the frame size, subsuming the unoptimized frame into the |
| 385 // optimized frame. | 385 // optimized frame. |
| 386 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); | 386 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); |
| 387 ASSERT(slots >= 1); | 387 ASSERT(slots >= 1); |
| 388 __ sub(esp, Immediate((slots - 1) * kPointerSize)); | 388 __ sub(esp, Immediate((slots - 1) * kPointerSize)); |
| 389 } | 389 } |
| 390 | 390 |
| 391 | 391 |
| 392 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { | 392 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { |
| 393 if (!instr->IsLazyBailout() && !instr->IsGap()) { |
| 394 safepoints_.BumpLastLazySafepointIndex(); |
| 395 } |
| 393 if (!CpuFeatures::IsSupported(SSE2)) FlushX87StackIfNecessary(instr); | 396 if (!CpuFeatures::IsSupported(SSE2)) FlushX87StackIfNecessary(instr); |
| 394 } | 397 } |
| 395 | 398 |
| 396 | 399 |
| 397 void LCodeGen::GenerateBodyInstructionPost(LInstruction* instr) { | 400 void LCodeGen::GenerateBodyInstructionPost(LInstruction* instr) { |
| 398 if (!CpuFeatures::IsSupported(SSE2)) { | 401 if (!CpuFeatures::IsSupported(SSE2)) { |
| 399 if (instr->IsGoto()) { | 402 if (instr->IsGoto()) { |
| 400 x87_stack_.LeavingBlock(current_block_, LGoto::cast(instr)); | 403 x87_stack_.LeavingBlock(current_block_, LGoto::cast(instr)); |
| 401 } else if (FLAG_debug_code && FLAG_enable_slow_asserts && | 404 } else if (FLAG_debug_code && FLAG_enable_slow_asserts && |
| 402 !instr->IsGap() && !instr->IsReturn()) { | 405 !instr->IsGap() && !instr->IsReturn()) { |
| (...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2267 | 2270 |
| 2268 | 2271 |
| 2269 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { | 2272 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
| 2270 ASSERT(ToRegister(instr->context()).is(esi)); | 2273 ASSERT(ToRegister(instr->context()).is(esi)); |
| 2271 ASSERT(ToRegister(instr->left()).is(edx)); | 2274 ASSERT(ToRegister(instr->left()).is(edx)); |
| 2272 ASSERT(ToRegister(instr->right()).is(eax)); | 2275 ASSERT(ToRegister(instr->right()).is(eax)); |
| 2273 ASSERT(ToRegister(instr->result()).is(eax)); | 2276 ASSERT(ToRegister(instr->result()).is(eax)); |
| 2274 | 2277 |
| 2275 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); | 2278 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); |
| 2276 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 2279 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 2277 __ nop(); // Signals no inlined code. | |
| 2278 } | 2280 } |
| 2279 | 2281 |
| 2280 | 2282 |
| 2281 template<class InstrType> | 2283 template<class InstrType> |
| 2282 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { | 2284 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { |
| 2283 int left_block = instr->TrueDestination(chunk_); | 2285 int left_block = instr->TrueDestination(chunk_); |
| 2284 int right_block = instr->FalseDestination(chunk_); | 2286 int right_block = instr->FalseDestination(chunk_); |
| 2285 | 2287 |
| 2286 int next_block = GetNextEmittedBlock(); | 2288 int next_block = GetNextEmittedBlock(); |
| 2287 | 2289 |
| (...skipping 3982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6270 FixedArray::kHeaderSize - kPointerSize)); | 6272 FixedArray::kHeaderSize - kPointerSize)); |
| 6271 __ bind(&done); | 6273 __ bind(&done); |
| 6272 } | 6274 } |
| 6273 | 6275 |
| 6274 | 6276 |
| 6275 #undef __ | 6277 #undef __ |
| 6276 | 6278 |
| 6277 } } // namespace v8::internal | 6279 } } // namespace v8::internal |
| 6278 | 6280 |
| 6279 #endif // V8_TARGET_ARCH_IA32 | 6281 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |