| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 | 377 |
| 378 // Adjust the frame size, subsuming the unoptimized frame into the | 378 // Adjust the frame size, subsuming the unoptimized frame into the |
| 379 // optimized frame. | 379 // optimized frame. |
| 380 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); | 380 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); |
| 381 ASSERT(slots >= 1); | 381 ASSERT(slots >= 1); |
| 382 __ sub(esp, Immediate((slots - 1) * kPointerSize)); | 382 __ sub(esp, Immediate((slots - 1) * kPointerSize)); |
| 383 } | 383 } |
| 384 | 384 |
| 385 | 385 |
| 386 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { | 386 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { |
| 387 if (!instr->IsLazyBailout() && !instr->IsGap()) { |
| 388 safepoints_.BumpLastLazySafepointIndex(); |
| 389 } |
| 387 if (!CpuFeatures::IsSupported(SSE2)) FlushX87StackIfNecessary(instr); | 390 if (!CpuFeatures::IsSupported(SSE2)) FlushX87StackIfNecessary(instr); |
| 388 } | 391 } |
| 389 | 392 |
| 390 | 393 |
| 391 void LCodeGen::GenerateBodyInstructionPost(LInstruction* instr) { | 394 void LCodeGen::GenerateBodyInstructionPost(LInstruction* instr) { |
| 392 if (!CpuFeatures::IsSupported(SSE2)) { | 395 if (!CpuFeatures::IsSupported(SSE2)) { |
| 393 if (instr->IsGoto()) { | 396 if (instr->IsGoto()) { |
| 394 x87_stack_.LeavingBlock(current_block_, LGoto::cast(instr)); | 397 x87_stack_.LeavingBlock(current_block_, LGoto::cast(instr)); |
| 395 } else if (FLAG_debug_code && FLAG_enable_slow_asserts && | 398 } else if (FLAG_debug_code && FLAG_enable_slow_asserts && |
| 396 !instr->IsGap() && !instr->IsReturn()) { | 399 !instr->IsGap() && !instr->IsReturn()) { |
| (...skipping 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2351 | 2354 |
| 2352 | 2355 |
| 2353 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { | 2356 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
| 2354 ASSERT(ToRegister(instr->context()).is(esi)); | 2357 ASSERT(ToRegister(instr->context()).is(esi)); |
| 2355 ASSERT(ToRegister(instr->left()).is(edx)); | 2358 ASSERT(ToRegister(instr->left()).is(edx)); |
| 2356 ASSERT(ToRegister(instr->right()).is(eax)); | 2359 ASSERT(ToRegister(instr->right()).is(eax)); |
| 2357 ASSERT(ToRegister(instr->result()).is(eax)); | 2360 ASSERT(ToRegister(instr->result()).is(eax)); |
| 2358 | 2361 |
| 2359 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); | 2362 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); |
| 2360 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 2363 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 2361 __ nop(); // Signals no inlined code. | |
| 2362 } | 2364 } |
| 2363 | 2365 |
| 2364 | 2366 |
| 2365 template<class InstrType> | 2367 template<class InstrType> |
| 2366 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { | 2368 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { |
| 2367 int left_block = instr->TrueDestination(chunk_); | 2369 int left_block = instr->TrueDestination(chunk_); |
| 2368 int right_block = instr->FalseDestination(chunk_); | 2370 int right_block = instr->FalseDestination(chunk_); |
| 2369 | 2371 |
| 2370 int next_block = GetNextEmittedBlock(); | 2372 int next_block = GetNextEmittedBlock(); |
| 2371 | 2373 |
| (...skipping 4066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6438 FixedArray::kHeaderSize - kPointerSize)); | 6440 FixedArray::kHeaderSize - kPointerSize)); |
| 6439 __ bind(&done); | 6441 __ bind(&done); |
| 6440 } | 6442 } |
| 6441 | 6443 |
| 6442 | 6444 |
| 6443 #undef __ | 6445 #undef __ |
| 6444 | 6446 |
| 6445 } } // namespace v8::internal | 6447 } } // namespace v8::internal |
| 6446 | 6448 |
| 6447 #endif // V8_TARGET_ARCH_IA32 | 6449 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |