| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
| 8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 // | FP | RET | args | caller frame | | 769 // | FP | RET | args | caller frame | |
| 770 // ^ esp,ebp | 770 // ^ esp,ebp |
| 771 | 771 |
| 772 // --{ pop ebp }---------------------------------------------------------------- | 772 // --{ pop ebp }---------------------------------------------------------------- |
| 773 // | RET | args | caller frame | | 773 // | RET | args | caller frame | |
| 774 // ^ esp ^ ebp | 774 // ^ esp ^ ebp |
| 775 | 775 |
| 776 | 776 |
| 777 void CodeGenerator::AssemblePrologue() { | 777 void CodeGenerator::AssemblePrologue() { |
| 778 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 778 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
| 779 Frame* frame = code_->frame(); | 779 Frame* frame = this->frame(); |
| 780 int stack_slots = frame->GetSpillSlotCount(); | 780 int stack_slots = frame->GetSpillSlotCount(); |
| 781 if (descriptor->kind() == CallDescriptor::kCallAddress) { | 781 if (descriptor->kind() == CallDescriptor::kCallAddress) { |
| 782 // Assemble a prologue similar the to cdecl calling convention. | 782 // Assemble a prologue similar the to cdecl calling convention. |
| 783 __ push(ebp); | 783 __ push(ebp); |
| 784 __ mov(ebp, esp); | 784 __ mov(ebp, esp); |
| 785 const RegList saves = descriptor->CalleeSavedRegisters(); | 785 const RegList saves = descriptor->CalleeSavedRegisters(); |
| 786 if (saves != 0) { // Save callee-saved registers. | 786 if (saves != 0) { // Save callee-saved registers. |
| 787 int register_save_area_size = 0; | 787 int register_save_area_size = 0; |
| 788 for (int i = Register::kNumRegisters - 1; i >= 0; i--) { | 788 for (int i = Register::kNumRegisters - 1; i >= 0; i--) { |
| 789 if (!((1 << i) & saves)) continue; | 789 if (!((1 << i) & saves)) continue; |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 } | 1033 } |
| 1034 } | 1034 } |
| 1035 MarkLazyDeoptSite(); | 1035 MarkLazyDeoptSite(); |
| 1036 } | 1036 } |
| 1037 | 1037 |
| 1038 #undef __ | 1038 #undef __ |
| 1039 | 1039 |
| 1040 } // namespace compiler | 1040 } // namespace compiler |
| 1041 } // namespace internal | 1041 } // namespace internal |
| 1042 } // namespace v8 | 1042 } // namespace v8 |
| OLD | NEW |