| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 ASSERT(element_count() == other->element_count()); | 67 ASSERT(element_count() == other->element_count()); |
| 68 if (top_of_stack_state_ != other->top_of_stack_state_) return false; | 68 if (top_of_stack_state_ != other->top_of_stack_state_) return false; |
| 69 if (register_allocation_map_ != other->register_allocation_map_) return false; | 69 if (register_allocation_map_ != other->register_allocation_map_) return false; |
| 70 if (tos_known_smi_map_ != other->tos_known_smi_map_) return false; | 70 if (tos_known_smi_map_ != other->tos_known_smi_map_) return false; |
| 71 | 71 |
| 72 return true; | 72 return true; |
| 73 } | 73 } |
| 74 | 74 |
| 75 | 75 |
| 76 void VirtualFrame::PrepareForReturn() { | 76 void VirtualFrame::PrepareForReturn() { |
| 77 SpillAll(); | 77 // Don't bother flushing tos registers as returning does not require more |
| 78 // access to the expression stack. |
| 79 top_of_stack_state_ = NO_TOS_REGISTERS; |
| 78 } | 80 } |
| 79 | 81 |
| 80 | 82 |
| 81 VirtualFrame::RegisterAllocationScope::RegisterAllocationScope( | 83 VirtualFrame::RegisterAllocationScope::RegisterAllocationScope( |
| 82 CodeGenerator* cgen) | 84 CodeGenerator* cgen) |
| 83 : cgen_(cgen), | 85 : cgen_(cgen), |
| 84 old_is_spilled_(SpilledScope::is_spilled_) { | 86 old_is_spilled_(SpilledScope::is_spilled_) { |
| 85 SpilledScope::is_spilled_ = false; | 87 SpilledScope::is_spilled_ = false; |
| 86 if (old_is_spilled_) { | 88 if (old_is_spilled_) { |
| 87 VirtualFrame* frame = cgen->frame(); | 89 VirtualFrame* frame = cgen->frame(); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 161 |
| 160 MemOperand VirtualFrame::LocalAt(int index) { | 162 MemOperand VirtualFrame::LocalAt(int index) { |
| 161 ASSERT(0 <= index); | 163 ASSERT(0 <= index); |
| 162 ASSERT(index < local_count()); | 164 ASSERT(index < local_count()); |
| 163 return MemOperand(fp, kLocal0Offset - index * kPointerSize); | 165 return MemOperand(fp, kLocal0Offset - index * kPointerSize); |
| 164 } | 166 } |
| 165 | 167 |
| 166 } } // namespace v8::internal | 168 } } // namespace v8::internal |
| 167 | 169 |
| 168 #endif // V8_VIRTUAL_FRAME_LIGHT_INL_H_ | 170 #endif // V8_VIRTUAL_FRAME_LIGHT_INL_H_ |
| OLD | NEW |