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