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 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2553 ObjectLiteral::Property* property = lit->properties()->at(i); | 2553 ObjectLiteral::Property* property = lit->properties()->at(i); |
2554 Expression* value = property->value(); | 2554 Expression* value = property->value(); |
2555 | 2555 |
2556 if (property->is_static()) { | 2556 if (property->is_static()) { |
2557 __ ld(scratch, MemOperand(sp, kPointerSize)); // constructor | 2557 __ ld(scratch, MemOperand(sp, kPointerSize)); // constructor |
2558 } else { | 2558 } else { |
2559 __ ld(scratch, MemOperand(sp, 0)); // prototype | 2559 __ ld(scratch, MemOperand(sp, 0)); // prototype |
2560 } | 2560 } |
2561 __ push(scratch); | 2561 __ push(scratch); |
2562 EmitPropertyKey(property, lit->GetIdForProperty(i)); | 2562 EmitPropertyKey(property, lit->GetIdForProperty(i)); |
| 2563 |
| 2564 // The static prototype property is read only. We handle the non computed |
| 2565 // property name case in the parser. Since this is the only case where we |
| 2566 // need to check for an own read only property we special case this so we do |
| 2567 // not need to do this for every property. |
| 2568 if (property->is_static() && property->is_computed_name()) { |
| 2569 __ CallRuntime(Runtime::kThrowIfStaticPrototype, 1); |
| 2570 __ push(v0); |
| 2571 } |
| 2572 |
2563 VisitForStackValue(value); | 2573 VisitForStackValue(value); |
2564 EmitSetHomeObjectIfNeeded(value, 2); | 2574 EmitSetHomeObjectIfNeeded(value, 2); |
2565 | 2575 |
2566 switch (property->kind()) { | 2576 switch (property->kind()) { |
2567 case ObjectLiteral::Property::CONSTANT: | 2577 case ObjectLiteral::Property::CONSTANT: |
2568 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2578 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
2569 case ObjectLiteral::Property::PROTOTYPE: | 2579 case ObjectLiteral::Property::PROTOTYPE: |
2570 UNREACHABLE(); | 2580 UNREACHABLE(); |
2571 case ObjectLiteral::Property::COMPUTED: | 2581 case ObjectLiteral::Property::COMPUTED: |
2572 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2582 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
(...skipping 2900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5473 Assembler::target_address_at(pc_immediate_load_address)) == | 5483 Assembler::target_address_at(pc_immediate_load_address)) == |
5474 reinterpret_cast<uint64_t>( | 5484 reinterpret_cast<uint64_t>( |
5475 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5485 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5476 return OSR_AFTER_STACK_CHECK; | 5486 return OSR_AFTER_STACK_CHECK; |
5477 } | 5487 } |
5478 | 5488 |
5479 | 5489 |
5480 } } // namespace v8::internal | 5490 } } // namespace v8::internal |
5481 | 5491 |
5482 #endif // V8_TARGET_ARCH_MIPS64 | 5492 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |