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 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1490 unsigned fixed_size = ComputeFixedSize(function_); | 1490 unsigned fixed_size = ComputeFixedSize(function_); |
1491 // The fp-to-sp delta already takes the context and the function | 1491 // The fp-to-sp delta already takes the context and the function |
1492 // into account so we have to avoid double counting them (-2). | 1492 // into account so we have to avoid double counting them (-2). |
1493 unsigned result = fixed_size + fp_to_sp_delta_ - (2 * kPointerSize); | 1493 unsigned result = fixed_size + fp_to_sp_delta_ - (2 * kPointerSize); |
1494 #ifdef DEBUG | 1494 #ifdef DEBUG |
1495 if (bailout_type_ == OSR) { | 1495 if (bailout_type_ == OSR) { |
1496 // TODO(kasperl): It would be nice if we could verify that the | 1496 // TODO(kasperl): It would be nice if we could verify that the |
1497 // size matches with the stack height we can compute based on the | 1497 // size matches with the stack height we can compute based on the |
1498 // environment at the OSR entry. The code for that his built into | 1498 // environment at the OSR entry. The code for that his built into |
1499 // the DoComputeOsrOutputFrame function for now. | 1499 // the DoComputeOsrOutputFrame function for now. |
1500 } else { | 1500 } else if (compiled_code_->kind() != Code::COMPILED_STUB) { |
1501 unsigned stack_slots = compiled_code_->stack_slots(); | 1501 unsigned stack_slots = compiled_code_->stack_slots(); |
1502 unsigned outgoing_size = compiled_code_->kind() == Code::COMPILED_STUB | 1502 unsigned outgoing_size = ComputeOutgoingArgumentSize(); |
1503 ? 0 : ComputeOutgoingArgumentSize(); | |
1504 ASSERT(result == fixed_size + (stack_slots * kPointerSize) + outgoing_size); | 1503 ASSERT(result == fixed_size + (stack_slots * kPointerSize) + outgoing_size); |
1505 } | 1504 } |
1506 #endif | 1505 #endif |
1507 return result; | 1506 return result; |
1508 } | 1507 } |
1509 | 1508 |
1510 | 1509 |
1511 unsigned Deoptimizer::ComputeFixedSize(JSFunction* function) const { | 1510 unsigned Deoptimizer::ComputeFixedSize(JSFunction* function) const { |
1512 // The fixed part of the frame consists of the return address, frame | 1511 // The fixed part of the frame consists of the return address, frame |
1513 // pointer, function, context, and all the incoming arguments. | 1512 // pointer, function, context, and all the incoming arguments. |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2130 | 2129 |
2131 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 2130 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
2132 v->VisitPointer(BitCast<Object**>(&function_)); | 2131 v->VisitPointer(BitCast<Object**>(&function_)); |
2133 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 2132 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
2134 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 2133 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
2135 } | 2134 } |
2136 | 2135 |
2137 #endif // ENABLE_DEBUGGER_SUPPORT | 2136 #endif // ENABLE_DEBUGGER_SUPPORT |
2138 | 2137 |
2139 } } // namespace v8::internal | 2138 } } // namespace v8::internal |
OLD | NEW |