| 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 574 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
| 575 __ str(ip, CodeGenerator::ContextOperand(cp, slot->index())); | 575 __ str(ip, CodeGenerator::ContextOperand(cp, slot->index())); |
| 576 // No write barrier since the_hole_value is in old space. | 576 // No write barrier since the_hole_value is in old space. |
| 577 } else if (decl->fun() != NULL) { | 577 } else if (decl->fun() != NULL) { |
| 578 VisitForValue(decl->fun(), kAccumulator); | 578 VisitForValue(decl->fun(), kAccumulator); |
| 579 __ str(result_register(), | 579 __ str(result_register(), |
| 580 CodeGenerator::ContextOperand(cp, slot->index())); | 580 CodeGenerator::ContextOperand(cp, slot->index())); |
| 581 int offset = Context::SlotOffset(slot->index()); | 581 int offset = Context::SlotOffset(slot->index()); |
| 582 __ mov(r2, Operand(offset)); | 582 __ mov(r2, Operand(offset)); |
| 583 // We know that we have written a function, which is not a smi. | 583 // We know that we have written a function, which is not a smi. |
| 584 __ RecordWrite(cp, r2, result_register()); | 584 __ mov(r1, Operand(cp)); |
| 585 __ RecordWrite(r1, r2, result_register()); |
| 585 } | 586 } |
| 586 break; | 587 break; |
| 587 | 588 |
| 588 case Slot::LOOKUP: { | 589 case Slot::LOOKUP: { |
| 589 __ mov(r2, Operand(var->name())); | 590 __ mov(r2, Operand(var->name())); |
| 590 // Declaration nodes are always introduced in one of two modes. | 591 // Declaration nodes are always introduced in one of two modes. |
| 591 ASSERT(decl->mode() == Variable::VAR || | 592 ASSERT(decl->mode() == Variable::VAR || |
| 592 decl->mode() == Variable::CONST); | 593 decl->mode() == Variable::CONST); |
| 593 PropertyAttributes attr = | 594 PropertyAttributes attr = |
| 594 (decl->mode() == Variable::VAR) ? NONE : READ_ONLY; | 595 (decl->mode() == Variable::VAR) ? NONE : READ_ONLY; |
| (...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1761 __ pop(result_register()); | 1762 __ pop(result_register()); |
| 1762 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); | 1763 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); |
| 1763 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 1764 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
| 1764 __ add(pc, r1, Operand(masm_->CodeObject())); | 1765 __ add(pc, r1, Operand(masm_->CodeObject())); |
| 1765 } | 1766 } |
| 1766 | 1767 |
| 1767 | 1768 |
| 1768 #undef __ | 1769 #undef __ |
| 1769 | 1770 |
| 1770 } } // namespace v8::internal | 1771 } } // namespace v8::internal |
| OLD | NEW |