OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4173 jmp(&entry); | 4173 jmp(&entry); |
4174 bind(&loop); | 4174 bind(&loop); |
4175 movq(Operand(start_offset, 0), filler); | 4175 movq(Operand(start_offset, 0), filler); |
4176 addq(start_offset, Immediate(kPointerSize)); | 4176 addq(start_offset, Immediate(kPointerSize)); |
4177 bind(&entry); | 4177 bind(&entry); |
4178 cmpq(start_offset, end_offset); | 4178 cmpq(start_offset, end_offset); |
4179 j(less, &loop); | 4179 j(less, &loop); |
4180 } | 4180 } |
4181 | 4181 |
4182 | 4182 |
| 4183 void MacroAssembler::ReloadContextFromFrame() { |
| 4184 movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 4185 } |
| 4186 |
| 4187 |
4183 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { | 4188 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { |
4184 if (context_chain_length > 0) { | 4189 if (context_chain_length > 0) { |
4185 // Move up the chain of contexts to the context containing the slot. | 4190 // Move up the chain of contexts to the context containing the slot. |
4186 movq(dst, Operand(rsi, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 4191 movq(dst, Operand(rsi, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
4187 for (int i = 1; i < context_chain_length; i++) { | 4192 for (int i = 1; i < context_chain_length; i++) { |
4188 movq(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 4193 movq(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
4189 } | 4194 } |
4190 } else { | 4195 } else { |
4191 // Slot is in the current function context. Move it into the | 4196 // Slot is in the current function context. Move it into the |
4192 // destination register in case we store into it (the write barrier | 4197 // destination register in case we store into it (the write barrier |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4633 j(greater, &no_info_available); | 4638 j(greater, &no_info_available); |
4634 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 4639 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
4635 Heap::kAllocationSiteInfoMapRootIndex); | 4640 Heap::kAllocationSiteInfoMapRootIndex); |
4636 bind(&no_info_available); | 4641 bind(&no_info_available); |
4637 } | 4642 } |
4638 | 4643 |
4639 | 4644 |
4640 } } // namespace v8::internal | 4645 } } // namespace v8::internal |
4641 | 4646 |
4642 #endif // V8_TARGET_ARCH_X64 | 4647 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |