| 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/scopes.h" | 10 #include "src/scopes.h" |
| (...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 } | 1592 } |
| 1593 __ pop(ebp); // Pop caller's frame pointer. | 1593 __ pop(ebp); // Pop caller's frame pointer. |
| 1594 __ ret(0); | 1594 __ ret(0); |
| 1595 } else { | 1595 } else { |
| 1596 // No saved registers. | 1596 // No saved registers. |
| 1597 __ mov(esp, ebp); // Move stack pointer back to frame pointer. | 1597 __ mov(esp, ebp); // Move stack pointer back to frame pointer. |
| 1598 __ pop(ebp); // Pop caller's frame pointer. | 1598 __ pop(ebp); // Pop caller's frame pointer. |
| 1599 __ ret(0); | 1599 __ ret(0); |
| 1600 } | 1600 } |
| 1601 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { | 1601 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { |
| 1602 __ mov(esp, ebp); // Move stack pointer back to frame pointer. | 1602 // Canonicalize JSFunction return sites for now. |
| 1603 __ pop(ebp); // Pop caller's frame pointer. | 1603 if (return_label_.is_bound()) { |
| 1604 int pop_count = descriptor->IsJSFunctionCall() | 1604 __ jmp(&return_label_); |
| 1605 ? static_cast<int>(descriptor->JSParameterCount()) | 1605 } else { |
| 1606 : 0; | 1606 __ bind(&return_label_); |
| 1607 __ Ret(pop_count * kPointerSize, ebx); | 1607 __ mov(esp, ebp); // Move stack pointer back to frame pointer. |
| 1608 __ pop(ebp); // Pop caller's frame pointer. |
| 1609 int pop_count = descriptor->IsJSFunctionCall() |
| 1610 ? static_cast<int>(descriptor->JSParameterCount()) |
| 1611 : 0; |
| 1612 __ Ret(pop_count * kPointerSize, ebx); |
| 1613 } |
| 1608 } else { | 1614 } else { |
| 1609 __ ret(0); | 1615 __ ret(0); |
| 1610 } | 1616 } |
| 1611 } | 1617 } |
| 1612 | 1618 |
| 1613 | 1619 |
| 1614 void CodeGenerator::AssembleMove(InstructionOperand* source, | 1620 void CodeGenerator::AssembleMove(InstructionOperand* source, |
| 1615 InstructionOperand* destination) { | 1621 InstructionOperand* destination) { |
| 1616 X87OperandConverter g(this, NULL); | 1622 X87OperandConverter g(this, NULL); |
| 1617 // Dispatch on the source and destination operand kinds. Not all | 1623 // Dispatch on the source and destination operand kinds. Not all |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1840 __ Nop(padding_size); | 1846 __ Nop(padding_size); |
| 1841 } | 1847 } |
| 1842 } | 1848 } |
| 1843 } | 1849 } |
| 1844 | 1850 |
| 1845 #undef __ | 1851 #undef __ |
| 1846 | 1852 |
| 1847 } // namespace compiler | 1853 } // namespace compiler |
| 1848 } // namespace internal | 1854 } // namespace internal |
| 1849 } // namespace v8 | 1855 } // namespace v8 |
| OLD | NEW |