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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 } | 688 } |
689 if (decl->mode() == Variable::CONST) { | 689 if (decl->mode() == Variable::CONST) { |
690 __ mov(eax, Immediate(Factory::the_hole_value())); | 690 __ mov(eax, Immediate(Factory::the_hole_value())); |
691 __ mov(CodeGenerator::ContextOperand(esi, slot->index()), eax); | 691 __ mov(CodeGenerator::ContextOperand(esi, slot->index()), eax); |
692 // No write barrier since the hole value is in old space. | 692 // No write barrier since the hole value is in old space. |
693 } else if (decl->fun() != NULL) { | 693 } else if (decl->fun() != NULL) { |
694 VisitForValue(decl->fun(), kAccumulator); | 694 VisitForValue(decl->fun(), kAccumulator); |
695 __ mov(CodeGenerator::ContextOperand(esi, slot->index()), | 695 __ mov(CodeGenerator::ContextOperand(esi, slot->index()), |
696 result_register()); | 696 result_register()); |
697 int offset = Context::SlotOffset(slot->index()); | 697 int offset = Context::SlotOffset(slot->index()); |
698 __ RecordWrite(esi, offset, result_register(), ecx); | 698 __ mov(ebx, esi); |
| 699 __ RecordWrite(ebx, offset, result_register(), ecx); |
699 } | 700 } |
700 break; | 701 break; |
701 | 702 |
702 case Slot::LOOKUP: { | 703 case Slot::LOOKUP: { |
703 __ push(esi); | 704 __ push(esi); |
704 __ push(Immediate(var->name())); | 705 __ push(Immediate(var->name())); |
705 // Declaration nodes are always introduced in one of two modes. | 706 // Declaration nodes are always introduced in one of two modes. |
706 ASSERT(decl->mode() == Variable::VAR || | 707 ASSERT(decl->mode() == Variable::VAR || |
707 decl->mode() == Variable::CONST); | 708 decl->mode() == Variable::CONST); |
708 PropertyAttributes attr = | 709 PropertyAttributes attr = |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1877 __ add(Operand(edx), Immediate(masm_->CodeObject())); | 1878 __ add(Operand(edx), Immediate(masm_->CodeObject())); |
1878 __ mov(Operand(esp, 0), edx); | 1879 __ mov(Operand(esp, 0), edx); |
1879 // And return. | 1880 // And return. |
1880 __ ret(0); | 1881 __ ret(0); |
1881 } | 1882 } |
1882 | 1883 |
1883 | 1884 |
1884 #undef __ | 1885 #undef __ |
1885 | 1886 |
1886 } } // namespace v8::internal | 1887 } } // namespace v8::internal |
OLD | NEW |