| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1646 Handle<Code> ic = is_classic_mode() | 1646 Handle<Code> ic = is_classic_mode() |
| 1647 ? isolate()->builtins()->StoreIC_Initialize() | 1647 ? isolate()->builtins()->StoreIC_Initialize() |
| 1648 : isolate()->builtins()->StoreIC_Initialize_Strict(); | 1648 : isolate()->builtins()->StoreIC_Initialize_Strict(); |
| 1649 CallIC(ic, RelocInfo::CODE_TARGET, key->LiteralFeedbackId()); | 1649 CallIC(ic, RelocInfo::CODE_TARGET, key->LiteralFeedbackId()); |
| 1650 PrepareForBailoutForId(key->id(), NO_REGISTERS); | 1650 PrepareForBailoutForId(key->id(), NO_REGISTERS); |
| 1651 } else { | 1651 } else { |
| 1652 VisitForEffect(value); | 1652 VisitForEffect(value); |
| 1653 } | 1653 } |
| 1654 break; | 1654 break; |
| 1655 } | 1655 } |
| 1656 // Fall through. | |
| 1657 case ObjectLiteral::Property::PROTOTYPE: | |
| 1658 // Duplicate receiver on stack. | 1656 // Duplicate receiver on stack. |
| 1659 __ lw(a0, MemOperand(sp)); | 1657 __ lw(a0, MemOperand(sp)); |
| 1660 __ push(a0); | 1658 __ push(a0); |
| 1661 VisitForStackValue(key); | 1659 VisitForStackValue(key); |
| 1662 VisitForStackValue(value); | 1660 VisitForStackValue(value); |
| 1663 if (property->emit_store()) { | 1661 if (property->emit_store()) { |
| 1664 __ li(a0, Operand(Smi::FromInt(NONE))); // PropertyAttributes. | 1662 __ li(a0, Operand(Smi::FromInt(NONE))); // PropertyAttributes. |
| 1665 __ push(a0); | 1663 __ push(a0); |
| 1666 __ CallRuntime(Runtime::kSetProperty, 4); | 1664 __ CallRuntime(Runtime::kSetProperty, 4); |
| 1667 } else { | 1665 } else { |
| 1668 __ Drop(3); | 1666 __ Drop(3); |
| 1669 } | 1667 } |
| 1670 break; | 1668 break; |
| 1669 case ObjectLiteral::Property::PROTOTYPE: |
| 1670 // Duplicate receiver on stack. |
| 1671 __ lw(a0, MemOperand(sp)); |
| 1672 __ push(a0); |
| 1673 VisitForStackValue(value); |
| 1674 if (property->emit_store()) { |
| 1675 __ CallRuntime(Runtime::kSetPrototype, 2); |
| 1676 } else { |
| 1677 __ Drop(2); |
| 1678 } |
| 1679 break; |
| 1671 case ObjectLiteral::Property::GETTER: | 1680 case ObjectLiteral::Property::GETTER: |
| 1672 accessor_table.lookup(key)->second->getter = value; | 1681 accessor_table.lookup(key)->second->getter = value; |
| 1673 break; | 1682 break; |
| 1674 case ObjectLiteral::Property::SETTER: | 1683 case ObjectLiteral::Property::SETTER: |
| 1675 accessor_table.lookup(key)->second->setter = value; | 1684 accessor_table.lookup(key)->second->setter = value; |
| 1676 break; | 1685 break; |
| 1677 } | 1686 } |
| 1678 } | 1687 } |
| 1679 | 1688 |
| 1680 // Emit code to define accessors, using only a single call to the runtime for | 1689 // Emit code to define accessors, using only a single call to the runtime for |
| (...skipping 2907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4588 *context_length = 0; | 4597 *context_length = 0; |
| 4589 return previous_; | 4598 return previous_; |
| 4590 } | 4599 } |
| 4591 | 4600 |
| 4592 | 4601 |
| 4593 #undef __ | 4602 #undef __ |
| 4594 | 4603 |
| 4595 } } // namespace v8::internal | 4604 } } // namespace v8::internal |
| 4596 | 4605 |
| 4597 #endif // V8_TARGET_ARCH_MIPS | 4606 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |