OLD | NEW |
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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1785 | 1785 |
1786 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { | 1786 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { |
1787 DCHECK(!property->is_computed_name()); | 1787 DCHECK(!property->is_computed_name()); |
1788 VisitForStackValue(value); | 1788 VisitForStackValue(value); |
1789 if (property->emit_store()) { | 1789 if (property->emit_store()) { |
1790 __ CallRuntime(Runtime::kInternalSetPrototype, 2); | 1790 __ CallRuntime(Runtime::kInternalSetPrototype, 2); |
1791 } else { | 1791 } else { |
1792 __ Drop(2); | 1792 __ Drop(2); |
1793 } | 1793 } |
1794 } else { | 1794 } else { |
1795 EmitPropertyKey(property); | 1795 EmitPropertyKey(property, expr->GetIdForProperty(property_index)); |
1796 VisitForStackValue(value); | 1796 VisitForStackValue(value); |
1797 | 1797 |
1798 switch (property->kind()) { | 1798 switch (property->kind()) { |
1799 case ObjectLiteral::Property::CONSTANT: | 1799 case ObjectLiteral::Property::CONSTANT: |
1800 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1800 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1801 case ObjectLiteral::Property::COMPUTED: | 1801 case ObjectLiteral::Property::COMPUTED: |
1802 if (property->emit_store()) { | 1802 if (property->emit_store()) { |
1803 __ li(a0, Operand(Smi::FromInt(NONE))); | 1803 __ li(a0, Operand(Smi::FromInt(NONE))); |
1804 __ push(a0); | 1804 __ push(a0); |
1805 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); | 1805 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4); |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2518 for (int i = 0; i < lit->properties()->length(); i++) { | 2518 for (int i = 0; i < lit->properties()->length(); i++) { |
2519 ObjectLiteral::Property* property = lit->properties()->at(i); | 2519 ObjectLiteral::Property* property = lit->properties()->at(i); |
2520 Expression* value = property->value(); | 2520 Expression* value = property->value(); |
2521 | 2521 |
2522 if (property->is_static()) { | 2522 if (property->is_static()) { |
2523 __ ld(scratch, MemOperand(sp, kPointerSize)); // constructor | 2523 __ ld(scratch, MemOperand(sp, kPointerSize)); // constructor |
2524 } else { | 2524 } else { |
2525 __ ld(scratch, MemOperand(sp, 0)); // prototype | 2525 __ ld(scratch, MemOperand(sp, 0)); // prototype |
2526 } | 2526 } |
2527 __ push(scratch); | 2527 __ push(scratch); |
2528 EmitPropertyKey(property); | 2528 EmitPropertyKey(property, lit->GetIdForProperty(i)); |
2529 VisitForStackValue(value); | 2529 VisitForStackValue(value); |
2530 EmitSetHomeObjectIfNeeded(value, 2); | 2530 EmitSetHomeObjectIfNeeded(value, 2); |
2531 | 2531 |
2532 switch (property->kind()) { | 2532 switch (property->kind()) { |
2533 case ObjectLiteral::Property::CONSTANT: | 2533 case ObjectLiteral::Property::CONSTANT: |
2534 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2534 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
2535 case ObjectLiteral::Property::COMPUTED: | 2535 case ObjectLiteral::Property::COMPUTED: |
2536 case ObjectLiteral::Property::PROTOTYPE: | 2536 case ObjectLiteral::Property::PROTOTYPE: |
2537 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2537 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
2538 break; | 2538 break; |
(...skipping 2814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5353 Assembler::target_address_at(pc_immediate_load_address)) == | 5353 Assembler::target_address_at(pc_immediate_load_address)) == |
5354 reinterpret_cast<uint64_t>( | 5354 reinterpret_cast<uint64_t>( |
5355 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5355 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5356 return OSR_AFTER_STACK_CHECK; | 5356 return OSR_AFTER_STACK_CHECK; |
5357 } | 5357 } |
5358 | 5358 |
5359 | 5359 |
5360 } } // namespace v8::internal | 5360 } } // namespace v8::internal |
5361 | 5361 |
5362 #endif // V8_TARGET_ARCH_MIPS64 | 5362 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |