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

Side by Side Diff: src/arm/full-codegen-arm.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 | « no previous file | src/arm64/full-codegen-arm64.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_ARM 7 #if V8_TARGET_ARCH_ARM
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 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 __ CallRuntime(Runtime::kSetProperty, 4); 1740 __ CallRuntime(Runtime::kSetProperty, 4);
1741 } else { 1741 } else {
1742 __ Drop(3); 1742 __ Drop(3);
1743 } 1743 }
1744 break; 1744 break;
1745 case ObjectLiteral::Property::PROTOTYPE: 1745 case ObjectLiteral::Property::PROTOTYPE:
1746 // Duplicate receiver on stack. 1746 // Duplicate receiver on stack.
1747 __ ldr(r0, MemOperand(sp)); 1747 __ ldr(r0, MemOperand(sp));
1748 __ push(r0); 1748 __ push(r0);
1749 VisitForStackValue(value); 1749 VisitForStackValue(value);
1750 if (property->emit_store()) { 1750 DCHECK(property->emit_store());
1751 __ CallRuntime(Runtime::kInternalSetPrototype, 2); 1751 __ CallRuntime(Runtime::kInternalSetPrototype, 2);
1752 } else {
1753 __ Drop(2);
1754 }
1755 break; 1752 break;
1756 1753
1757 case ObjectLiteral::Property::GETTER: 1754 case ObjectLiteral::Property::GETTER:
1758 accessor_table.lookup(key)->second->getter = value; 1755 accessor_table.lookup(key)->second->getter = value;
1759 break; 1756 break;
1760 case ObjectLiteral::Property::SETTER: 1757 case ObjectLiteral::Property::SETTER:
1761 accessor_table.lookup(key)->second->setter = value; 1758 accessor_table.lookup(key)->second->setter = value;
1762 break; 1759 break;
1763 } 1760 }
1764 } 1761 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 __ push(r0); // Save result on the stack 1794 __ push(r0); // Save result on the stack
1798 result_saved = true; 1795 result_saved = true;
1799 } 1796 }
1800 1797
1801 __ ldr(r0, MemOperand(sp)); // Duplicate receiver. 1798 __ ldr(r0, MemOperand(sp)); // Duplicate receiver.
1802 __ push(r0); 1799 __ push(r0);
1803 1800
1804 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { 1801 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) {
1805 DCHECK(!property->is_computed_name()); 1802 DCHECK(!property->is_computed_name());
1806 VisitForStackValue(value); 1803 VisitForStackValue(value);
1807 if (property->emit_store()) { 1804 DCHECK(property->emit_store());
1808 __ CallRuntime(Runtime::kInternalSetPrototype, 2); 1805 __ CallRuntime(Runtime::kInternalSetPrototype, 2);
1809 } else {
1810 __ Drop(2);
1811 }
1812 } else { 1806 } else {
1813 EmitPropertyKey(property); 1807 EmitPropertyKey(property);
1814 VisitForStackValue(value); 1808 VisitForStackValue(value);
1815 1809
1816 switch (property->kind()) { 1810 switch (property->kind()) {
1817 case ObjectLiteral::Property::CONSTANT: 1811 case ObjectLiteral::Property::CONSTANT:
1818 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 1812 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
1819 case ObjectLiteral::Property::COMPUTED: 1813 case ObjectLiteral::Property::COMPUTED:
1820 if (property->emit_store()) { 1814 if (property->emit_store()) {
1821 __ mov(r0, Operand(Smi::FromInt(NONE))); 1815 __ mov(r0, Operand(Smi::FromInt(NONE)));
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
2550 __ ldr(scratch, MemOperand(sp, 0)); // prototype 2544 __ ldr(scratch, MemOperand(sp, 0)); // prototype
2551 } 2545 }
2552 __ push(scratch); 2546 __ push(scratch);
2553 EmitPropertyKey(property); 2547 EmitPropertyKey(property);
2554 VisitForStackValue(value); 2548 VisitForStackValue(value);
2555 EmitSetHomeObjectIfNeeded(value, 2); 2549 EmitSetHomeObjectIfNeeded(value, 2);
2556 2550
2557 switch (property->kind()) { 2551 switch (property->kind()) {
2558 case ObjectLiteral::Property::CONSTANT: 2552 case ObjectLiteral::Property::CONSTANT:
2559 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2553 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2554 case ObjectLiteral::Property::PROTOTYPE:
2555 UNREACHABLE();
2560 case ObjectLiteral::Property::COMPUTED: 2556 case ObjectLiteral::Property::COMPUTED:
2561 case ObjectLiteral::Property::PROTOTYPE:
2562 __ CallRuntime(Runtime::kDefineClassMethod, 3); 2557 __ CallRuntime(Runtime::kDefineClassMethod, 3);
2563 break; 2558 break;
2564 2559
2565 case ObjectLiteral::Property::GETTER: 2560 case ObjectLiteral::Property::GETTER:
2566 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); 2561 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3);
2567 break; 2562 break;
2568 2563
2569 case ObjectLiteral::Property::SETTER: 2564 case ObjectLiteral::Property::SETTER:
2570 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); 2565 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3);
2571 break; 2566 break;
(...skipping 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after
5410 5405
5411 DCHECK(interrupt_address == 5406 DCHECK(interrupt_address ==
5412 isolate->builtins()->OsrAfterStackCheck()->entry()); 5407 isolate->builtins()->OsrAfterStackCheck()->entry());
5413 return OSR_AFTER_STACK_CHECK; 5408 return OSR_AFTER_STACK_CHECK;
5414 } 5409 }
5415 5410
5416 5411
5417 } } // namespace v8::internal 5412 } } // namespace v8::internal
5418 5413
5419 #endif // V8_TARGET_ARCH_ARM 5414 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698