Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 351853005: Split SetProperty(...attributes, strictmode) into AddProperty(...attributes) and SetProperty(...… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/i18n.js ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 } else { 1642 } else {
1643 VisitForEffect(value); 1643 VisitForEffect(value);
1644 } 1644 }
1645 break; 1645 break;
1646 } 1646 }
1647 __ push(Operand(esp, 0)); // Duplicate receiver. 1647 __ push(Operand(esp, 0)); // Duplicate receiver.
1648 VisitForStackValue(key); 1648 VisitForStackValue(key);
1649 VisitForStackValue(value); 1649 VisitForStackValue(value);
1650 if (property->emit_store()) { 1650 if (property->emit_store()) {
1651 __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes 1651 __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes
1652 __ CallRuntime(Runtime::kSetProperty, 4); 1652 __ CallRuntime(Runtime::kAddProperty, 4);
1653 } else { 1653 } else {
1654 __ Drop(3); 1654 __ Drop(3);
1655 } 1655 }
1656 break; 1656 break;
1657 case ObjectLiteral::Property::PROTOTYPE: 1657 case ObjectLiteral::Property::PROTOTYPE:
1658 __ push(Operand(esp, 0)); // Duplicate receiver. 1658 __ push(Operand(esp, 0)); // Duplicate receiver.
1659 VisitForStackValue(value); 1659 VisitForStackValue(value);
1660 if (property->emit_store()) { 1660 if (property->emit_store()) {
1661 __ CallRuntime(Runtime::kSetPrototype, 2); 1661 __ CallRuntime(Runtime::kSetPrototype, 2);
1662 } else { 1662 } else {
(...skipping 12 matching lines...) Expand all
1675 // Emit code to define accessors, using only a single call to the runtime for 1675 // Emit code to define accessors, using only a single call to the runtime for
1676 // each pair of corresponding getters and setters. 1676 // each pair of corresponding getters and setters.
1677 for (AccessorTable::Iterator it = accessor_table.begin(); 1677 for (AccessorTable::Iterator it = accessor_table.begin();
1678 it != accessor_table.end(); 1678 it != accessor_table.end();
1679 ++it) { 1679 ++it) {
1680 __ push(Operand(esp, 0)); // Duplicate receiver. 1680 __ push(Operand(esp, 0)); // Duplicate receiver.
1681 VisitForStackValue(it->first); 1681 VisitForStackValue(it->first);
1682 EmitAccessor(it->second->getter); 1682 EmitAccessor(it->second->getter);
1683 EmitAccessor(it->second->setter); 1683 EmitAccessor(it->second->setter);
1684 __ push(Immediate(Smi::FromInt(NONE))); 1684 __ push(Immediate(Smi::FromInt(NONE)));
1685 __ CallRuntime(Runtime::kDefineOrRedefineAccessorProperty, 5); 1685 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
1686 } 1686 }
1687 1687
1688 if (expr->has_function()) { 1688 if (expr->has_function()) {
1689 ASSERT(result_saved); 1689 ASSERT(result_saved);
1690 __ push(Operand(esp, 0)); 1690 __ push(Operand(esp, 0));
1691 __ CallRuntime(Runtime::kToFastProperties, 1); 1691 __ CallRuntime(Runtime::kToFastProperties, 1);
1692 } 1692 }
1693 1693
1694 if (result_saved) { 1694 if (result_saved) {
1695 context()->PlugTOS(); 1695 context()->PlugTOS();
(...skipping 3103 matching lines...) Expand 10 before | Expand all | Expand 10 after
4799 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4799 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4800 Assembler::target_address_at(call_target_address, 4800 Assembler::target_address_at(call_target_address,
4801 unoptimized_code)); 4801 unoptimized_code));
4802 return OSR_AFTER_STACK_CHECK; 4802 return OSR_AFTER_STACK_CHECK;
4803 } 4803 }
4804 4804
4805 4805
4806 } } // namespace v8::internal 4806 } } // namespace v8::internal
4807 4807
4808 #endif // V8_TARGET_ARCH_IA32 4808 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/i18n.js ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698