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 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 | 1664 |
1665 | 1665 |
1666 void FastCodeGenerator::VisitThisFunction(ThisFunction* expr) { | 1666 void FastCodeGenerator::VisitThisFunction(ThisFunction* expr) { |
1667 __ movq(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 1667 __ movq(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
1668 Move(expr->context(), rax); | 1668 Move(expr->context(), rax); |
1669 } | 1669 } |
1670 | 1670 |
1671 | 1671 |
1672 Register FastCodeGenerator::result_register() { return rax; } | 1672 Register FastCodeGenerator::result_register() { return rax; } |
1673 | 1673 |
| 1674 |
| 1675 Register FastCodeGenerator::context_register() { return rsi; } |
| 1676 |
| 1677 |
| 1678 void FastCodeGenerator::StoreFrameField(int frame_offset, Register value) { |
| 1679 ASSERT_EQ(POINTER_SIZE_ALIGN(frame_offset), |
| 1680 static_cast<intptr_t>(frame_offset)); |
| 1681 __ movq(Operand(rbp, frame_offset), value); |
| 1682 } |
| 1683 |
| 1684 |
| 1685 void FastCodeGenerator::LoadContextField(Register dst, int context_index) { |
| 1686 __ movq(dst, Operand(context_register(), Context::SlotOffset(context_index))); |
| 1687 } |
| 1688 |
| 1689 |
1674 // ---------------------------------------------------------------------------- | 1690 // ---------------------------------------------------------------------------- |
1675 // Non-local control flow support. | 1691 // Non-local control flow support. |
1676 | 1692 |
1677 | 1693 |
1678 void FastCodeGenerator::EnterFinallyBlock() { | 1694 void FastCodeGenerator::EnterFinallyBlock() { |
1679 ASSERT(!result_register().is(rdx)); | 1695 ASSERT(!result_register().is(rdx)); |
1680 ASSERT(!result_register().is(rcx)); | 1696 ASSERT(!result_register().is(rcx)); |
1681 // Cook return address on top of stack (smi encoded Code* delta) | 1697 // Cook return address on top of stack (smi encoded Code* delta) |
1682 __ movq(rdx, Operand(rsp, 0)); | 1698 __ movq(rdx, Operand(rsp, 0)); |
1683 __ Move(rcx, masm_->CodeObject()); | 1699 __ Move(rcx, masm_->CodeObject()); |
(...skipping 23 matching lines...) Expand all Loading... |
1707 | 1723 |
1708 void FastCodeGenerator::ThrowException() { | 1724 void FastCodeGenerator::ThrowException() { |
1709 __ push(result_register()); | 1725 __ push(result_register()); |
1710 __ CallRuntime(Runtime::kThrow, 1); | 1726 __ CallRuntime(Runtime::kThrow, 1); |
1711 } | 1727 } |
1712 | 1728 |
1713 #undef __ | 1729 #undef __ |
1714 | 1730 |
1715 | 1731 |
1716 } } // namespace v8::internal | 1732 } } // namespace v8::internal |
OLD | NEW |