OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
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 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2659 default: | 2659 default: |
2660 UNREACHABLE(); | 2660 UNREACHABLE(); |
2661 } | 2661 } |
2662 } | 2662 } |
2663 | 2663 |
2664 // prototype | 2664 // prototype |
2665 __ CallRuntime(Runtime::kToFastProperties, 1); | 2665 __ CallRuntime(Runtime::kToFastProperties, 1); |
2666 | 2666 |
2667 // constructor | 2667 // constructor |
2668 __ CallRuntime(Runtime::kToFastProperties, 1); | 2668 __ CallRuntime(Runtime::kToFastProperties, 1); |
| 2669 |
| 2670 if (is_strong(language_mode())) { |
| 2671 __ LoadP(scratch, |
| 2672 FieldMemOperand(r3, JSFunction::kPrototypeOrInitialMapOffset)); |
| 2673 __ Push(r3, scratch); |
| 2674 // TODO(conradw): It would be more efficient to define the properties with |
| 2675 // the right attributes the first time round. |
| 2676 // Freeze the prototype. |
| 2677 __ CallRuntime(Runtime::kObjectFreeze, 1); |
| 2678 // Freeze the constructor. |
| 2679 __ CallRuntime(Runtime::kObjectFreeze, 1); |
| 2680 } |
2669 } | 2681 } |
2670 | 2682 |
2671 | 2683 |
2672 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { | 2684 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { |
2673 __ pop(r4); | 2685 __ pop(r4); |
2674 Handle<Code> code = | 2686 Handle<Code> code = |
2675 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); | 2687 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); |
2676 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. | 2688 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
2677 CallIC(code, expr->BinaryOperationFeedbackId()); | 2689 CallIC(code, expr->BinaryOperationFeedbackId()); |
2678 patch_site.EmitPatchInfo(); | 2690 patch_site.EmitPatchInfo(); |
(...skipping 2901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5580 return ON_STACK_REPLACEMENT; | 5592 return ON_STACK_REPLACEMENT; |
5581 } | 5593 } |
5582 | 5594 |
5583 DCHECK(interrupt_address == | 5595 DCHECK(interrupt_address == |
5584 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5596 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5585 return OSR_AFTER_STACK_CHECK; | 5597 return OSR_AFTER_STACK_CHECK; |
5586 } | 5598 } |
5587 } // namespace internal | 5599 } // namespace internal |
5588 } // namespace v8 | 5600 } // namespace v8 |
5589 #endif // V8_TARGET_ARCH_PPC | 5601 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |