| 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 intptr_t fp_value = top_address + output_offset; | 351 intptr_t fp_value = top_address + output_offset; |
| 352 ASSERT(!is_bottommost || input_->GetRegister(rbp.code()) == fp_value); | 352 ASSERT(!is_bottommost || input_->GetRegister(rbp.code()) == fp_value); |
| 353 output_frame->SetFp(fp_value); | 353 output_frame->SetFp(fp_value); |
| 354 if (is_topmost) output_frame->SetRegister(rbp.code(), fp_value); | 354 if (is_topmost) output_frame->SetRegister(rbp.code(), fp_value); |
| 355 if (FLAG_trace_deopt) { | 355 if (FLAG_trace_deopt) { |
| 356 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 356 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 357 V8PRIxPTR " ; caller's fp\n", | 357 V8PRIxPTR " ; caller's fp\n", |
| 358 fp_value, output_offset, value); | 358 fp_value, output_offset, value); |
| 359 } | 359 } |
| 360 | 360 |
| 361 // The context can be gotten from the function so long as we don't | 361 // For the bottommost output frame the context can be gotten from the input |
| 362 // optimize functions that need local contexts. | 362 // frame. For all subsequent output frames it can be gotten from the function |
| 363 // so long as we don't inline functions that need local contexts. |
| 363 output_offset -= kPointerSize; | 364 output_offset -= kPointerSize; |
| 364 input_offset -= kPointerSize; | 365 input_offset -= kPointerSize; |
| 365 value = reinterpret_cast<intptr_t>(function->context()); | 366 if (is_bottommost) { |
| 366 // The context for the bottommost output frame should also agree with the | 367 value = input_->GetFrameSlot(input_offset); |
| 367 // input frame. | 368 } else { |
| 368 ASSERT(!is_bottommost || input_->GetFrameSlot(input_offset) == value); | 369 value = reinterpret_cast<intptr_t>(function->context()); |
| 370 } |
| 369 output_frame->SetFrameSlot(output_offset, value); | 371 output_frame->SetFrameSlot(output_offset, value); |
| 370 if (is_topmost) output_frame->SetRegister(rsi.code(), value); | 372 if (is_topmost) output_frame->SetRegister(rsi.code(), value); |
| 371 if (FLAG_trace_deopt) { | 373 if (FLAG_trace_deopt) { |
| 372 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 374 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 373 V8PRIxPTR "; context\n", | 375 V8PRIxPTR "; context\n", |
| 374 top_address + output_offset, output_offset, value); | 376 top_address + output_offset, output_offset, value); |
| 375 } | 377 } |
| 376 | 378 |
| 377 // The function was mentioned explicitly in the BEGIN_FRAME. | 379 // The function was mentioned explicitly in the BEGIN_FRAME. |
| 378 output_offset -= kPointerSize; | 380 output_offset -= kPointerSize; |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 } | 632 } |
| 631 __ bind(&done); | 633 __ bind(&done); |
| 632 } | 634 } |
| 633 | 635 |
| 634 #undef __ | 636 #undef __ |
| 635 | 637 |
| 636 | 638 |
| 637 } } // namespace v8::internal | 639 } } // namespace v8::internal |
| 638 | 640 |
| 639 #endif // V8_TARGET_ARCH_X64 | 641 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |