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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 if (decl->mode() == Variable::CONST) { | 691 if (decl->mode() == Variable::CONST) { |
692 __ LoadRoot(kScratchRegister, Heap::kTheHoleValueRootIndex); | 692 __ LoadRoot(kScratchRegister, Heap::kTheHoleValueRootIndex); |
693 __ movq(CodeGenerator::ContextOperand(rsi, slot->index()), | 693 __ movq(CodeGenerator::ContextOperand(rsi, slot->index()), |
694 kScratchRegister); | 694 kScratchRegister); |
695 // No write barrier since the hole value is in old space. | 695 // No write barrier since the hole value is in old space. |
696 } else if (decl->fun() != NULL) { | 696 } else if (decl->fun() != NULL) { |
697 VisitForValue(decl->fun(), kAccumulator); | 697 VisitForValue(decl->fun(), kAccumulator); |
698 __ movq(CodeGenerator::ContextOperand(rsi, slot->index()), | 698 __ movq(CodeGenerator::ContextOperand(rsi, slot->index()), |
699 result_register()); | 699 result_register()); |
700 int offset = Context::SlotOffset(slot->index()); | 700 int offset = Context::SlotOffset(slot->index()); |
701 __ RecordWrite(rsi, offset, result_register(), rcx); | 701 __ movq(rbx, rsi); |
| 702 __ RecordWrite(rbx, offset, result_register(), rcx); |
702 } | 703 } |
703 break; | 704 break; |
704 | 705 |
705 case Slot::LOOKUP: { | 706 case Slot::LOOKUP: { |
706 __ push(rsi); | 707 __ push(rsi); |
707 __ Push(var->name()); | 708 __ Push(var->name()); |
708 // Declaration nodes are always introduced in one of two modes. | 709 // Declaration nodes are always introduced in one of two modes. |
709 ASSERT(decl->mode() == Variable::VAR || | 710 ASSERT(decl->mode() == Variable::VAR || |
710 decl->mode() == Variable::CONST); | 711 decl->mode() == Variable::CONST); |
711 PropertyAttributes attr = | 712 PropertyAttributes attr = |
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 __ movq(Operand(rsp, 0), rdx); | 1885 __ movq(Operand(rsp, 0), rdx); |
1885 // And return. | 1886 // And return. |
1886 __ ret(0); | 1887 __ ret(0); |
1887 } | 1888 } |
1888 | 1889 |
1889 | 1890 |
1890 #undef __ | 1891 #undef __ |
1891 | 1892 |
1892 | 1893 |
1893 } } // namespace v8::internal | 1894 } } // namespace v8::internal |
OLD | NEW |