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

Side by Side Diff: src/x64/full-codegen-x64.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/weak_collection.js ('k') | src/x87/full-codegen-x87.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_X64 7 #if V8_TARGET_ARCH_X64
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 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 } else { 1675 } else {
1676 VisitForEffect(value); 1676 VisitForEffect(value);
1677 } 1677 }
1678 break; 1678 break;
1679 } 1679 }
1680 __ Push(Operand(rsp, 0)); // Duplicate receiver. 1680 __ Push(Operand(rsp, 0)); // Duplicate receiver.
1681 VisitForStackValue(key); 1681 VisitForStackValue(key);
1682 VisitForStackValue(value); 1682 VisitForStackValue(value);
1683 if (property->emit_store()) { 1683 if (property->emit_store()) {
1684 __ Push(Smi::FromInt(NONE)); // PropertyAttributes 1684 __ Push(Smi::FromInt(NONE)); // PropertyAttributes
1685 __ CallRuntime(Runtime::kSetProperty, 4); 1685 __ CallRuntime(Runtime::kAddProperty, 4);
1686 } else { 1686 } else {
1687 __ Drop(3); 1687 __ Drop(3);
1688 } 1688 }
1689 break; 1689 break;
1690 case ObjectLiteral::Property::PROTOTYPE: 1690 case ObjectLiteral::Property::PROTOTYPE:
1691 __ Push(Operand(rsp, 0)); // Duplicate receiver. 1691 __ Push(Operand(rsp, 0)); // Duplicate receiver.
1692 VisitForStackValue(value); 1692 VisitForStackValue(value);
1693 if (property->emit_store()) { 1693 if (property->emit_store()) {
1694 __ CallRuntime(Runtime::kSetPrototype, 2); 1694 __ CallRuntime(Runtime::kSetPrototype, 2);
1695 } else { 1695 } else {
(...skipping 12 matching lines...) Expand all
1708 // Emit code to define accessors, using only a single call to the runtime for 1708 // Emit code to define accessors, using only a single call to the runtime for
1709 // each pair of corresponding getters and setters. 1709 // each pair of corresponding getters and setters.
1710 for (AccessorTable::Iterator it = accessor_table.begin(); 1710 for (AccessorTable::Iterator it = accessor_table.begin();
1711 it != accessor_table.end(); 1711 it != accessor_table.end();
1712 ++it) { 1712 ++it) {
1713 __ Push(Operand(rsp, 0)); // Duplicate receiver. 1713 __ Push(Operand(rsp, 0)); // Duplicate receiver.
1714 VisitForStackValue(it->first); 1714 VisitForStackValue(it->first);
1715 EmitAccessor(it->second->getter); 1715 EmitAccessor(it->second->getter);
1716 EmitAccessor(it->second->setter); 1716 EmitAccessor(it->second->setter);
1717 __ Push(Smi::FromInt(NONE)); 1717 __ Push(Smi::FromInt(NONE));
1718 __ CallRuntime(Runtime::kDefineOrRedefineAccessorProperty, 5); 1718 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
1719 } 1719 }
1720 1720
1721 if (expr->has_function()) { 1721 if (expr->has_function()) {
1722 ASSERT(result_saved); 1722 ASSERT(result_saved);
1723 __ Push(Operand(rsp, 0)); 1723 __ Push(Operand(rsp, 0));
1724 __ CallRuntime(Runtime::kToFastProperties, 1); 1724 __ CallRuntime(Runtime::kToFastProperties, 1);
1725 } 1725 }
1726 1726
1727 if (result_saved) { 1727 if (result_saved) {
1728 context()->PlugTOS(); 1728 context()->PlugTOS();
(...skipping 3074 matching lines...) Expand 10 before | Expand all | Expand 10 after
4803 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4803 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4804 Assembler::target_address_at(call_target_address, 4804 Assembler::target_address_at(call_target_address,
4805 unoptimized_code)); 4805 unoptimized_code));
4806 return OSR_AFTER_STACK_CHECK; 4806 return OSR_AFTER_STACK_CHECK;
4807 } 4807 }
4808 4808
4809 4809
4810 } } // namespace v8::internal 4810 } } // namespace v8::internal
4811 4811
4812 #endif // V8_TARGET_ARCH_X64 4812 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/weak_collection.js ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698