| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2661 __ jmp(return_addr_reg); | 2661 __ jmp(return_addr_reg); |
| 2662 } | 2662 } |
| 2663 if (no_frame_start != -1) { | 2663 if (no_frame_start != -1) { |
| 2664 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); | 2664 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); |
| 2665 } | 2665 } |
| 2666 } | 2666 } |
| 2667 | 2667 |
| 2668 | 2668 |
| 2669 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { | 2669 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { |
| 2670 Register result = ToRegister(instr->result()); | 2670 Register result = ToRegister(instr->result()); |
| 2671 __ LoadGlobalCell(result, instr->hydrogen()->cell()); | 2671 __ LoadGlobalCell(result, instr->hydrogen()->cell().handle()); |
| 2672 if (instr->hydrogen()->RequiresHoleCheck()) { | 2672 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2673 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); | 2673 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); |
| 2674 DeoptimizeIf(equal, instr->environment()); | 2674 DeoptimizeIf(equal, instr->environment()); |
| 2675 } | 2675 } |
| 2676 } | 2676 } |
| 2677 | 2677 |
| 2678 | 2678 |
| 2679 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2679 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2680 ASSERT(ToRegister(instr->global_object()).is(rax)); | 2680 ASSERT(ToRegister(instr->global_object()).is(rax)); |
| 2681 ASSERT(ToRegister(instr->result()).is(rax)); | 2681 ASSERT(ToRegister(instr->result()).is(rax)); |
| 2682 | 2682 |
| 2683 __ Move(rcx, instr->name()); | 2683 __ Move(rcx, instr->name()); |
| 2684 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET : | 2684 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET : |
| 2685 RelocInfo::CODE_TARGET_CONTEXT; | 2685 RelocInfo::CODE_TARGET_CONTEXT; |
| 2686 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); | 2686 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); |
| 2687 CallCode(ic, mode, instr); | 2687 CallCode(ic, mode, instr); |
| 2688 } | 2688 } |
| 2689 | 2689 |
| 2690 | 2690 |
| 2691 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2691 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
| 2692 Register value = ToRegister(instr->value()); | 2692 Register value = ToRegister(instr->value()); |
| 2693 Handle<Cell> cell_handle = instr->hydrogen()->cell(); | 2693 Handle<Cell> cell_handle = instr->hydrogen()->cell().handle(); |
| 2694 | 2694 |
| 2695 // If the cell we are storing to contains the hole it could have | 2695 // If the cell we are storing to contains the hole it could have |
| 2696 // been deleted from the property dictionary. In that case, we need | 2696 // been deleted from the property dictionary. In that case, we need |
| 2697 // to update the property details in the property dictionary to mark | 2697 // to update the property details in the property dictionary to mark |
| 2698 // it as no longer deleted. We deoptimize in that case. | 2698 // it as no longer deleted. We deoptimize in that case. |
| 2699 if (instr->hydrogen()->RequiresHoleCheck()) { | 2699 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2700 // We have a temp because CompareRoot might clobber kScratchRegister. | 2700 // We have a temp because CompareRoot might clobber kScratchRegister. |
| 2701 Register cell = ToRegister(instr->temp()); | 2701 Register cell = ToRegister(instr->temp()); |
| 2702 ASSERT(!value.is(cell)); | 2702 ASSERT(!value.is(cell)); |
| 2703 __ movq(cell, cell_handle, RelocInfo::CELL); | 2703 __ movq(cell, cell_handle, RelocInfo::CELL); |
| (...skipping 2812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5516 FixedArray::kHeaderSize - kPointerSize)); | 5516 FixedArray::kHeaderSize - kPointerSize)); |
| 5517 __ bind(&done); | 5517 __ bind(&done); |
| 5518 } | 5518 } |
| 5519 | 5519 |
| 5520 | 5520 |
| 5521 #undef __ | 5521 #undef __ |
| 5522 | 5522 |
| 5523 } } // namespace v8::internal | 5523 } } // namespace v8::internal |
| 5524 | 5524 |
| 5525 #endif // V8_TARGET_ARCH_X64 | 5525 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |