| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2625 } | 2625 } |
| 2626 } | 2626 } |
| 2627 | 2627 |
| 2628 | 2628 |
| 2629 unsigned Deoptimizer::ComputeInputFrameSize() const { | 2629 unsigned Deoptimizer::ComputeInputFrameSize() const { |
| 2630 unsigned fixed_size = ComputeFixedSize(function_); | 2630 unsigned fixed_size = ComputeFixedSize(function_); |
| 2631 // The fp-to-sp delta already takes the context, constant pool pointer and the | 2631 // The fp-to-sp delta already takes the context, constant pool pointer and the |
| 2632 // function into account so we have to avoid double counting them. | 2632 // function into account so we have to avoid double counting them. |
| 2633 unsigned result = fixed_size + fp_to_sp_delta_ - | 2633 unsigned result = fixed_size + fp_to_sp_delta_ - |
| 2634 StandardFrameConstants::kFixedFrameSizeFromFp; | 2634 StandardFrameConstants::kFixedFrameSizeFromFp; |
| 2635 #ifdef DEBUG | |
| 2636 if (compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) { | 2635 if (compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) { |
| 2637 unsigned stack_slots = compiled_code_->stack_slots(); | 2636 unsigned stack_slots = compiled_code_->stack_slots(); |
| 2638 unsigned outgoing_size = ComputeOutgoingArgumentSize(); | 2637 unsigned outgoing_size = ComputeOutgoingArgumentSize(); |
| 2639 ASSERT(result == fixed_size + (stack_slots * kPointerSize) + outgoing_size); | 2638 CHECK(result == fixed_size + (stack_slots * kPointerSize) + outgoing_size); |
| 2640 } | 2639 } |
| 2641 #endif | |
| 2642 return result; | 2640 return result; |
| 2643 } | 2641 } |
| 2644 | 2642 |
| 2645 | 2643 |
| 2646 unsigned Deoptimizer::ComputeFixedSize(JSFunction* function) const { | 2644 unsigned Deoptimizer::ComputeFixedSize(JSFunction* function) const { |
| 2647 // The fixed part of the frame consists of the return address, frame | 2645 // The fixed part of the frame consists of the return address, frame |
| 2648 // pointer, function, context, and all the incoming arguments. | 2646 // pointer, function, context, and all the incoming arguments. |
| 2649 return ComputeIncomingArgumentSize(function) + | 2647 return ComputeIncomingArgumentSize(function) + |
| 2650 StandardFrameConstants::kFixedFrameSize; | 2648 StandardFrameConstants::kFixedFrameSize; |
| 2651 } | 2649 } |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3546 | 3544 |
| 3547 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 3545 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
| 3548 v->VisitPointer(BitCast<Object**>(&function_)); | 3546 v->VisitPointer(BitCast<Object**>(&function_)); |
| 3549 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 3547 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
| 3550 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 3548 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
| 3551 } | 3549 } |
| 3552 | 3550 |
| 3553 #endif // ENABLE_DEBUGGER_SUPPORT | 3551 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3554 | 3552 |
| 3555 } } // namespace v8::internal | 3553 } } // namespace v8::internal |
| OLD | NEW |