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

Side by Side Diff: src/mips/full-codegen-mips.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, 11 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/messages.js ('k') | src/mips64/full-codegen-mips64.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 __ CallRuntime(Runtime::kSetProperty, 4); 1726 __ CallRuntime(Runtime::kSetProperty, 4);
1727 } else { 1727 } else {
1728 __ Drop(3); 1728 __ Drop(3);
1729 } 1729 }
1730 break; 1730 break;
1731 case ObjectLiteral::Property::PROTOTYPE: 1731 case ObjectLiteral::Property::PROTOTYPE:
1732 // Duplicate receiver on stack. 1732 // Duplicate receiver on stack.
1733 __ lw(a0, MemOperand(sp)); 1733 __ lw(a0, MemOperand(sp));
1734 __ push(a0); 1734 __ push(a0);
1735 VisitForStackValue(value); 1735 VisitForStackValue(value);
1736 if (property->emit_store()) { 1736 DCHECK(property->emit_store());
1737 __ CallRuntime(Runtime::kInternalSetPrototype, 2); 1737 __ CallRuntime(Runtime::kInternalSetPrototype, 2);
1738 } else {
1739 __ Drop(2);
1740 }
1741 break; 1738 break;
1742 case ObjectLiteral::Property::GETTER: 1739 case ObjectLiteral::Property::GETTER:
1743 accessor_table.lookup(key)->second->getter = value; 1740 accessor_table.lookup(key)->second->getter = value;
1744 break; 1741 break;
1745 case ObjectLiteral::Property::SETTER: 1742 case ObjectLiteral::Property::SETTER:
1746 accessor_table.lookup(key)->second->setter = value; 1743 accessor_table.lookup(key)->second->setter = value;
1747 break; 1744 break;
1748 } 1745 }
1749 } 1746 }
1750 1747
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 __ push(v0); // Save result on the stack 1779 __ push(v0); // Save result on the stack
1783 result_saved = true; 1780 result_saved = true;
1784 } 1781 }
1785 1782
1786 __ lw(a0, MemOperand(sp)); // Duplicate receiver. 1783 __ lw(a0, MemOperand(sp)); // Duplicate receiver.
1787 __ push(a0); 1784 __ push(a0);
1788 1785
1789 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { 1786 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) {
1790 DCHECK(!property->is_computed_name()); 1787 DCHECK(!property->is_computed_name());
1791 VisitForStackValue(value); 1788 VisitForStackValue(value);
1792 if (property->emit_store()) { 1789 DCHECK(property->emit_store());
1793 __ CallRuntime(Runtime::kInternalSetPrototype, 2); 1790 __ CallRuntime(Runtime::kInternalSetPrototype, 2);
1794 } else {
1795 __ Drop(2);
1796 }
1797 } else { 1791 } else {
1798 EmitPropertyKey(property); 1792 EmitPropertyKey(property);
1799 VisitForStackValue(value); 1793 VisitForStackValue(value);
1800 1794
1801 switch (property->kind()) { 1795 switch (property->kind()) {
1802 case ObjectLiteral::Property::CONSTANT: 1796 case ObjectLiteral::Property::CONSTANT:
1803 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 1797 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
1804 case ObjectLiteral::Property::COMPUTED: 1798 case ObjectLiteral::Property::COMPUTED:
1805 if (property->emit_store()) { 1799 if (property->emit_store()) {
1806 __ li(a0, Operand(Smi::FromInt(NONE))); 1800 __ li(a0, Operand(Smi::FromInt(NONE)));
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
2528 __ lw(scratch, MemOperand(sp, 0)); // prototype 2522 __ lw(scratch, MemOperand(sp, 0)); // prototype
2529 } 2523 }
2530 __ push(scratch); 2524 __ push(scratch);
2531 EmitPropertyKey(property); 2525 EmitPropertyKey(property);
2532 VisitForStackValue(value); 2526 VisitForStackValue(value);
2533 EmitSetHomeObjectIfNeeded(value, 2); 2527 EmitSetHomeObjectIfNeeded(value, 2);
2534 2528
2535 switch (property->kind()) { 2529 switch (property->kind()) {
2536 case ObjectLiteral::Property::CONSTANT: 2530 case ObjectLiteral::Property::CONSTANT:
2537 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2531 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2532 case ObjectLiteral::Property::PROTOTYPE:
2533 UNREACHABLE();
2538 case ObjectLiteral::Property::COMPUTED: 2534 case ObjectLiteral::Property::COMPUTED:
2539 case ObjectLiteral::Property::PROTOTYPE:
2540 __ CallRuntime(Runtime::kDefineClassMethod, 3); 2535 __ CallRuntime(Runtime::kDefineClassMethod, 3);
2541 break; 2536 break;
2542 2537
2543 case ObjectLiteral::Property::GETTER: 2538 case ObjectLiteral::Property::GETTER:
2544 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); 2539 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3);
2545 break; 2540 break;
2546 2541
2547 case ObjectLiteral::Property::SETTER: 2542 case ObjectLiteral::Property::SETTER:
2548 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); 2543 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3);
2549 break; 2544 break;
(...skipping 2798 matching lines...) Expand 10 before | Expand all | Expand 10 after
5348 Assembler::target_address_at(pc_immediate_load_address)) == 5343 Assembler::target_address_at(pc_immediate_load_address)) ==
5349 reinterpret_cast<uint32_t>( 5344 reinterpret_cast<uint32_t>(
5350 isolate->builtins()->OsrAfterStackCheck()->entry())); 5345 isolate->builtins()->OsrAfterStackCheck()->entry()));
5351 return OSR_AFTER_STACK_CHECK; 5346 return OSR_AFTER_STACK_CHECK;
5352 } 5347 }
5353 5348
5354 5349
5355 } } // namespace v8::internal 5350 } } // namespace v8::internal
5356 5351
5357 #endif // V8_TARGET_ARCH_MIPS 5352 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698