| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 output_frame->SetFrameSlot(output_offset, value); | 424 output_frame->SetFrameSlot(output_offset, value); |
| 425 intptr_t fp_value = top_address + output_offset; | 425 intptr_t fp_value = top_address + output_offset; |
| 426 ASSERT(!is_bottommost || input_->GetRegister(ebp.code()) == fp_value); | 426 ASSERT(!is_bottommost || input_->GetRegister(ebp.code()) == fp_value); |
| 427 output_frame->SetFp(fp_value); | 427 output_frame->SetFp(fp_value); |
| 428 if (is_topmost) output_frame->SetRegister(ebp.code(), fp_value); | 428 if (is_topmost) output_frame->SetRegister(ebp.code(), fp_value); |
| 429 if (FLAG_trace_deopt) { | 429 if (FLAG_trace_deopt) { |
| 430 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; caller's fp\n", | 430 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; caller's fp\n", |
| 431 fp_value, output_offset, value); | 431 fp_value, output_offset, value); |
| 432 } | 432 } |
| 433 | 433 |
| 434 // The context can be gotten from the function so long as we don't | 434 // For the bottommost output frame the context can be gotten from the input |
| 435 // optimize functions that need local contexts. | 435 // frame. For all subsequent output frames it can be gotten from the function |
| 436 // so long as we don't inline functions that need local contexts. |
| 436 output_offset -= kPointerSize; | 437 output_offset -= kPointerSize; |
| 437 input_offset -= kPointerSize; | 438 input_offset -= kPointerSize; |
| 438 value = reinterpret_cast<uint32_t>(function->context()); | 439 if (is_bottommost) { |
| 439 // The context for the bottommost output frame should also agree with the | 440 value = input_->GetFrameSlot(input_offset); |
| 440 // input frame. | 441 } else { |
| 441 ASSERT(!is_bottommost || input_->GetFrameSlot(input_offset) == value); | 442 value = reinterpret_cast<uint32_t>(function->context()); |
| 443 } |
| 442 output_frame->SetFrameSlot(output_offset, value); | 444 output_frame->SetFrameSlot(output_offset, value); |
| 443 if (is_topmost) output_frame->SetRegister(esi.code(), value); | 445 if (is_topmost) output_frame->SetRegister(esi.code(), value); |
| 444 if (FLAG_trace_deopt) { | 446 if (FLAG_trace_deopt) { |
| 445 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; context\n", | 447 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; context\n", |
| 446 top_address + output_offset, output_offset, value); | 448 top_address + output_offset, output_offset, value); |
| 447 } | 449 } |
| 448 | 450 |
| 449 // The function was mentioned explicitly in the BEGIN_FRAME. | 451 // The function was mentioned explicitly in the BEGIN_FRAME. |
| 450 output_offset -= kPointerSize; | 452 output_offset -= kPointerSize; |
| 451 input_offset -= kPointerSize; | 453 input_offset -= kPointerSize; |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 } | 655 } |
| 654 __ bind(&done); | 656 __ bind(&done); |
| 655 } | 657 } |
| 656 | 658 |
| 657 #undef __ | 659 #undef __ |
| 658 | 660 |
| 659 | 661 |
| 660 } } // namespace v8::internal | 662 } } // namespace v8::internal |
| 661 | 663 |
| 662 #endif // V8_TARGET_ARCH_IA32 | 664 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |