| 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 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1619 Handle<Code> ic = is_classic_mode() | 1619 Handle<Code> ic = is_classic_mode() |
| 1620 ? isolate()->builtins()->StoreIC_Initialize() | 1620 ? isolate()->builtins()->StoreIC_Initialize() |
| 1621 : isolate()->builtins()->StoreIC_Initialize_Strict(); | 1621 : isolate()->builtins()->StoreIC_Initialize_Strict(); |
| 1622 CallIC(ic, RelocInfo::CODE_TARGET, key->LiteralFeedbackId()); | 1622 CallIC(ic, RelocInfo::CODE_TARGET, key->LiteralFeedbackId()); |
| 1623 PrepareForBailoutForId(key->id(), NO_REGISTERS); | 1623 PrepareForBailoutForId(key->id(), NO_REGISTERS); |
| 1624 } else { | 1624 } else { |
| 1625 VisitForEffect(value); | 1625 VisitForEffect(value); |
| 1626 } | 1626 } |
| 1627 break; | 1627 break; |
| 1628 } | 1628 } |
| 1629 // Fall through. | |
| 1630 case ObjectLiteral::Property::PROTOTYPE: | |
| 1631 __ push(Operand(rsp, 0)); // Duplicate receiver. | 1629 __ push(Operand(rsp, 0)); // Duplicate receiver. |
| 1632 VisitForStackValue(key); | 1630 VisitForStackValue(key); |
| 1633 VisitForStackValue(value); | 1631 VisitForStackValue(value); |
| 1634 if (property->emit_store()) { | 1632 if (property->emit_store()) { |
| 1635 __ Push(Smi::FromInt(NONE)); // PropertyAttributes | 1633 __ Push(Smi::FromInt(NONE)); // PropertyAttributes |
| 1636 __ CallRuntime(Runtime::kSetProperty, 4); | 1634 __ CallRuntime(Runtime::kSetProperty, 4); |
| 1637 } else { | 1635 } else { |
| 1638 __ Drop(3); | 1636 __ Drop(3); |
| 1639 } | 1637 } |
| 1640 break; | 1638 break; |
| 1639 case ObjectLiteral::Property::PROTOTYPE: |
| 1640 __ push(Operand(rsp, 0)); // Duplicate receiver. |
| 1641 VisitForStackValue(value); |
| 1642 if (property->emit_store()) { |
| 1643 __ CallRuntime(Runtime::kSetPrototype, 2); |
| 1644 } else { |
| 1645 __ Drop(2); |
| 1646 } |
| 1647 break; |
| 1641 case ObjectLiteral::Property::GETTER: | 1648 case ObjectLiteral::Property::GETTER: |
| 1642 accessor_table.lookup(key)->second->getter = value; | 1649 accessor_table.lookup(key)->second->getter = value; |
| 1643 break; | 1650 break; |
| 1644 case ObjectLiteral::Property::SETTER: | 1651 case ObjectLiteral::Property::SETTER: |
| 1645 accessor_table.lookup(key)->second->setter = value; | 1652 accessor_table.lookup(key)->second->setter = value; |
| 1646 break; | 1653 break; |
| 1647 } | 1654 } |
| 1648 } | 1655 } |
| 1649 | 1656 |
| 1650 // Emit code to define accessors, using only a single call to the runtime for | 1657 // Emit code to define accessors, using only a single call to the runtime for |
| (...skipping 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4539 *context_length = 0; | 4546 *context_length = 0; |
| 4540 return previous_; | 4547 return previous_; |
| 4541 } | 4548 } |
| 4542 | 4549 |
| 4543 | 4550 |
| 4544 #undef __ | 4551 #undef __ |
| 4545 | 4552 |
| 4546 } } // namespace v8::internal | 4553 } } // namespace v8::internal |
| 4547 | 4554 |
| 4548 #endif // V8_TARGET_ARCH_X64 | 4555 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |