Chromium Code Reviews| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 void VirtualFrame::SyncElementBelowStackPointer(int index) { | 64 void VirtualFrame::SyncElementBelowStackPointer(int index) { |
| 65 UNREACHABLE(); | 65 UNREACHABLE(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 | 68 |
| 69 void VirtualFrame::SyncElementByPushing(int index) { | 69 void VirtualFrame::SyncElementByPushing(int index) { |
| 70 UNREACHABLE(); | 70 UNREACHABLE(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 | 73 |
| 74 void VirtualFrame::SyncRange(int begin, int end) { | |
| 75 // All elements are in memory on ARM (ie, synced). | |
| 76 #ifdef DEBUG | |
| 77 for (int i = begin; i < end; i++) { | |
|
Kasper Lund
2009/04/24 11:21:22
i <= end
| |
| 78 ASSERT(elements_[i].is_synced()); | |
| 79 } | |
| 80 #endif | |
| 81 } | |
| 82 | |
| 83 | |
| 74 void VirtualFrame::MergeTo(VirtualFrame* expected) { | 84 void VirtualFrame::MergeTo(VirtualFrame* expected) { |
| 75 Comment cmnt(masm_, "[ Merge frame"); | 85 Comment cmnt(masm_, "[ Merge frame"); |
| 76 // We should always be merging the code generator's current frame to an | 86 // We should always be merging the code generator's current frame to an |
| 77 // expected frame. | 87 // expected frame. |
| 78 ASSERT(cgen_->frame() == this); | 88 ASSERT(cgen_->frame() == this); |
| 79 | 89 |
| 80 // Adjust the stack pointer upward (toward the top of the virtual | 90 // Adjust the stack pointer upward (toward the top of the virtual |
| 81 // frame) if necessary. | 91 // frame) if necessary. |
| 82 if (stack_pointer_ < expected->stack_pointer_) { | 92 if (stack_pointer_ < expected->stack_pointer_) { |
| 83 int difference = expected->stack_pointer_ - stack_pointer_; | 93 int difference = expected->stack_pointer_ - stack_pointer_; |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 429 ASSERT(stack_pointer_ == elements_.length() - 1); | 439 ASSERT(stack_pointer_ == elements_.length() - 1); |
| 430 elements_.Add(FrameElement::MemoryElement()); | 440 elements_.Add(FrameElement::MemoryElement()); |
| 431 stack_pointer_++; | 441 stack_pointer_++; |
| 432 __ push(reg); | 442 __ push(reg); |
| 433 } | 443 } |
| 434 | 444 |
| 435 | 445 |
| 436 #undef __ | 446 #undef __ |
| 437 | 447 |
| 438 } } // namespace v8::internal | 448 } } // namespace v8::internal |
| OLD | NEW |