OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2616 } | 2616 } |
2617 } | 2617 } |
2618 } | 2618 } |
2619 | 2619 |
2620 | 2620 |
2621 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { | 2621 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
2622 ASSERT(ToRegister(instr->object()).is(rdx)); | 2622 ASSERT(ToRegister(instr->object()).is(rdx)); |
2623 ASSERT(ToRegister(instr->value()).is(rax)); | 2623 ASSERT(ToRegister(instr->value()).is(rax)); |
2624 | 2624 |
2625 __ Move(rcx, instr->hydrogen()->name()); | 2625 __ Move(rcx, instr->hydrogen()->name()); |
2626 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); | 2626 Handle<Code> ic(Builtins::builtin( |
| 2627 info_->is_strict() ? Builtins::StoreIC_Initialize_Strict |
| 2628 : Builtins::StoreIC_Initialize)); |
2627 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2629 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2628 } | 2630 } |
2629 | 2631 |
2630 | 2632 |
2631 void LCodeGen::DoStorePixelArrayElement(LStorePixelArrayElement* instr) { | 2633 void LCodeGen::DoStorePixelArrayElement(LStorePixelArrayElement* instr) { |
2632 Register external_pointer = ToRegister(instr->external_pointer()); | 2634 Register external_pointer = ToRegister(instr->external_pointer()); |
2633 Register key = ToRegister(instr->key()); | 2635 Register key = ToRegister(instr->key()); |
2634 Register value = ToRegister(instr->value()); | 2636 Register value = ToRegister(instr->value()); |
2635 | 2637 |
2636 { // Clamp the value to [0..255]. | 2638 { // Clamp the value to [0..255]. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2685 __ RecordWrite(elements, key, value); | 2687 __ RecordWrite(elements, key, value); |
2686 } | 2688 } |
2687 } | 2689 } |
2688 | 2690 |
2689 | 2691 |
2690 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { | 2692 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { |
2691 ASSERT(ToRegister(instr->object()).is(rdx)); | 2693 ASSERT(ToRegister(instr->object()).is(rdx)); |
2692 ASSERT(ToRegister(instr->key()).is(rcx)); | 2694 ASSERT(ToRegister(instr->key()).is(rcx)); |
2693 ASSERT(ToRegister(instr->value()).is(rax)); | 2695 ASSERT(ToRegister(instr->value()).is(rax)); |
2694 | 2696 |
2695 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); | 2697 Handle<Code> ic(Builtins::builtin( |
| 2698 info_->is_strict() ? Builtins::KeyedStoreIC_Initialize_Strict |
| 2699 : Builtins::KeyedStoreIC_Initialize)); |
2696 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2700 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2697 } | 2701 } |
2698 | 2702 |
2699 | 2703 |
2700 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { | 2704 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { |
2701 class DeferredStringCharCodeAt: public LDeferredCode { | 2705 class DeferredStringCharCodeAt: public LDeferredCode { |
2702 public: | 2706 public: |
2703 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) | 2707 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) |
2704 : LDeferredCode(codegen), instr_(instr) { } | 2708 : LDeferredCode(codegen), instr_(instr) { } |
2705 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } | 2709 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3552 RegisterEnvironmentForDeoptimization(environment); | 3556 RegisterEnvironmentForDeoptimization(environment); |
3553 ASSERT(osr_pc_offset_ == -1); | 3557 ASSERT(osr_pc_offset_ == -1); |
3554 osr_pc_offset_ = masm()->pc_offset(); | 3558 osr_pc_offset_ = masm()->pc_offset(); |
3555 } | 3559 } |
3556 | 3560 |
3557 #undef __ | 3561 #undef __ |
3558 | 3562 |
3559 } } // namespace v8::internal | 3563 } } // namespace v8::internal |
3560 | 3564 |
3561 #endif // V8_TARGET_ARCH_X64 | 3565 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |