Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: src/x64/fast-codegen-x64.cc

Issue 491077: Fast codegen: Implement with. (Closed)
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/fast-codegen.cc ('K') | « src/ia32/fast-codegen-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« src/fast-codegen.cc ('K') | « src/ia32/fast-codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698