| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 VirtualFrame::SpilledScope::~SpilledScope() { | 47 VirtualFrame::SpilledScope::~SpilledScope() { |
| 48 cgen_->set_in_spilled_code(previous_state_); | 48 cgen_->set_in_spilled_code(previous_state_); |
| 49 } | 49 } |
| 50 | 50 |
| 51 | 51 |
| 52 // When cloned, a frame is a deep copy of the original. | 52 // When cloned, a frame is a deep copy of the original. |
| 53 VirtualFrame::VirtualFrame(VirtualFrame* original) | 53 VirtualFrame::VirtualFrame(VirtualFrame* original) |
| 54 : cgen_(original->cgen_), | 54 : cgen_(original->cgen_), |
| 55 masm_(original->masm_), | 55 masm_(original->masm_), |
| 56 elements_(original->elements_.length()), | 56 elements_(original->elements_.capacity()), |
| 57 parameter_count_(original->parameter_count_), | 57 parameter_count_(original->parameter_count_), |
| 58 local_count_(original->local_count_), | 58 local_count_(original->local_count_), |
| 59 stack_pointer_(original->stack_pointer_), | 59 stack_pointer_(original->stack_pointer_), |
| 60 frame_pointer_(original->frame_pointer_) { | 60 frame_pointer_(original->frame_pointer_) { |
| 61 // Copy all the elements from the original. | 61 // Copy all the elements from the original. |
| 62 for (int i = 0; i < original->elements_.length(); i++) { | 62 for (int i = 0; i < original->elements_.length(); i++) { |
| 63 elements_.Add(original->elements_[i]); | 63 elements_.Add(original->elements_[i]); |
| 64 } | 64 } |
| 65 for (int i = 0; i < kNumRegisters; i++) { | 65 for (int i = 0; i < kNumRegisters; i++) { |
| 66 register_locations_[i] = original->register_locations_[i]; | 66 register_locations_[i] = original->register_locations_[i]; |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 #endif | 509 #endif |
| 510 if (stack_pointer_ != other->stack_pointer_) return false; | 510 if (stack_pointer_ != other->stack_pointer_) return false; |
| 511 for (int i = 0; i < elements_.length(); i++) { | 511 for (int i = 0; i < elements_.length(); i++) { |
| 512 if (!elements_[i].Equals(other->elements_[i])) return false; | 512 if (!elements_[i].Equals(other->elements_[i])) return false; |
| 513 } | 513 } |
| 514 | 514 |
| 515 return true; | 515 return true; |
| 516 } | 516 } |
| 517 | 517 |
| 518 } } // namespace v8::internal | 518 } } // namespace v8::internal |
| OLD | NEW |