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

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

Issue 873823003: Move object literal checking into checker classes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix assert Created 5 years, 10 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
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/messages.js » ('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-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 EmitSetHomeObjectIfNeeded(value, 2); 1666 EmitSetHomeObjectIfNeeded(value, 2);
1667 __ push(Immediate(Smi::FromInt(SLOPPY))); // Strict mode 1667 __ push(Immediate(Smi::FromInt(SLOPPY))); // Strict mode
1668 __ CallRuntime(Runtime::kSetProperty, 4); 1668 __ CallRuntime(Runtime::kSetProperty, 4);
1669 } else { 1669 } else {
1670 __ Drop(3); 1670 __ Drop(3);
1671 } 1671 }
1672 break; 1672 break;
1673 case ObjectLiteral::Property::PROTOTYPE: 1673 case ObjectLiteral::Property::PROTOTYPE:
1674 __ push(Operand(esp, 0)); // Duplicate receiver. 1674 __ push(Operand(esp, 0)); // Duplicate receiver.
1675 VisitForStackValue(value); 1675 VisitForStackValue(value);
1676 if (property->emit_store()) { 1676 DCHECK(property->emit_store());
1677 __ CallRuntime(Runtime::kInternalSetPrototype, 2); 1677 __ CallRuntime(Runtime::kInternalSetPrototype, 2);
1678 } else {
1679 __ Drop(2);
1680 }
1681 break; 1678 break;
1682 case ObjectLiteral::Property::GETTER: 1679 case ObjectLiteral::Property::GETTER:
1683 accessor_table.lookup(key)->second->getter = value; 1680 accessor_table.lookup(key)->second->getter = value;
1684 break; 1681 break;
1685 case ObjectLiteral::Property::SETTER: 1682 case ObjectLiteral::Property::SETTER:
1686 accessor_table.lookup(key)->second->setter = value; 1683 accessor_table.lookup(key)->second->setter = value;
1687 break; 1684 break;
1688 } 1685 }
1689 } 1686 }
1690 1687
(...skipping 28 matching lines...) Expand all
1719 if (!result_saved) { 1716 if (!result_saved) {
1720 __ push(eax); // Save result on the stack 1717 __ push(eax); // Save result on the stack
1721 result_saved = true; 1718 result_saved = true;
1722 } 1719 }
1723 1720
1724 __ push(Operand(esp, 0)); // Duplicate receiver. 1721 __ push(Operand(esp, 0)); // Duplicate receiver.
1725 1722
1726 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { 1723 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) {
1727 DCHECK(!property->is_computed_name()); 1724 DCHECK(!property->is_computed_name());
1728 VisitForStackValue(value); 1725 VisitForStackValue(value);
1729 if (property->emit_store()) { 1726 DCHECK(property->emit_store());
1730 __ CallRuntime(Runtime::kInternalSetPrototype, 2); 1727 __ CallRuntime(Runtime::kInternalSetPrototype, 2);
1731 } else {
1732 __ Drop(2);
1733 }
1734 } else { 1728 } else {
1735 EmitPropertyKey(property); 1729 EmitPropertyKey(property);
1736 VisitForStackValue(value); 1730 VisitForStackValue(value);
1737 1731
1738 switch (property->kind()) { 1732 switch (property->kind()) {
1739 case ObjectLiteral::Property::CONSTANT: 1733 case ObjectLiteral::Property::CONSTANT:
1740 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 1734 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
1741 case ObjectLiteral::Property::COMPUTED: 1735 case ObjectLiteral::Property::COMPUTED:
1742 if (property->emit_store()) { 1736 if (property->emit_store()) {
1743 __ push(Immediate(Smi::FromInt(NONE))); 1737 __ push(Immediate(Smi::FromInt(NONE)));
(...skipping 3538 matching lines...) Expand 10 before | Expand all | Expand 10 after
5282 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5276 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5283 Assembler::target_address_at(call_target_address, 5277 Assembler::target_address_at(call_target_address,
5284 unoptimized_code)); 5278 unoptimized_code));
5285 return OSR_AFTER_STACK_CHECK; 5279 return OSR_AFTER_STACK_CHECK;
5286 } 5280 }
5287 5281
5288 5282
5289 } } // namespace v8::internal 5283 } } // namespace v8::internal
5290 5284
5291 #endif // V8_TARGET_ARCH_IA32 5285 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698