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 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1594 Handle<Code> ic = is_classic_mode() | 1594 Handle<Code> ic = is_classic_mode() |
1595 ? isolate()->builtins()->StoreIC_Initialize() | 1595 ? isolate()->builtins()->StoreIC_Initialize() |
1596 : isolate()->builtins()->StoreIC_Initialize_Strict(); | 1596 : isolate()->builtins()->StoreIC_Initialize_Strict(); |
1597 CallIC(ic, RelocInfo::CODE_TARGET, key->LiteralFeedbackId()); | 1597 CallIC(ic, RelocInfo::CODE_TARGET, key->LiteralFeedbackId()); |
1598 PrepareForBailoutForId(key->id(), NO_REGISTERS); | 1598 PrepareForBailoutForId(key->id(), NO_REGISTERS); |
1599 } else { | 1599 } else { |
1600 VisitForEffect(value); | 1600 VisitForEffect(value); |
1601 } | 1601 } |
1602 break; | 1602 break; |
1603 } | 1603 } |
1604 // Fall through. | |
1605 case ObjectLiteral::Property::PROTOTYPE: | |
1606 __ push(Operand(esp, 0)); // Duplicate receiver. | 1604 __ push(Operand(esp, 0)); // Duplicate receiver. |
1607 VisitForStackValue(key); | 1605 VisitForStackValue(key); |
1608 VisitForStackValue(value); | 1606 VisitForStackValue(value); |
1609 if (property->emit_store()) { | 1607 if (property->emit_store()) { |
1610 __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes | 1608 __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes |
1611 __ CallRuntime(Runtime::kSetProperty, 4); | 1609 __ CallRuntime(Runtime::kSetProperty, 4); |
1612 } else { | 1610 } else { |
1613 __ Drop(3); | 1611 __ Drop(3); |
1614 } | 1612 } |
1615 break; | 1613 break; |
| 1614 case ObjectLiteral::Property::PROTOTYPE: |
| 1615 __ push(Operand(esp, 0)); // Duplicate receiver. |
| 1616 VisitForStackValue(value); |
| 1617 if (property->emit_store()) { |
| 1618 __ CallRuntime(Runtime::kSetPrototype, 2); |
| 1619 } else { |
| 1620 __ Drop(2); |
| 1621 } |
| 1622 break; |
1616 case ObjectLiteral::Property::GETTER: | 1623 case ObjectLiteral::Property::GETTER: |
1617 accessor_table.lookup(key)->second->getter = value; | 1624 accessor_table.lookup(key)->second->getter = value; |
1618 break; | 1625 break; |
1619 case ObjectLiteral::Property::SETTER: | 1626 case ObjectLiteral::Property::SETTER: |
1620 accessor_table.lookup(key)->second->setter = value; | 1627 accessor_table.lookup(key)->second->setter = value; |
1621 break; | 1628 break; |
1622 } | 1629 } |
1623 } | 1630 } |
1624 | 1631 |
1625 // Emit code to define accessors, using only a single call to the runtime for | 1632 // Emit code to define accessors, using only a single call to the runtime for |
(...skipping 2913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4539 *stack_depth = 0; | 4546 *stack_depth = 0; |
4540 *context_length = 0; | 4547 *context_length = 0; |
4541 return previous_; | 4548 return previous_; |
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_IA32 | 4555 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |