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 2907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2918 void MacroAssembler::LoadInstanceDescriptors(Register map, | 2918 void MacroAssembler::LoadInstanceDescriptors(Register map, |
2919 Register descriptors) { | 2919 Register descriptors) { |
2920 Register temp = descriptors; | 2920 Register temp = descriptors; |
2921 movq(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset)); | 2921 movq(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset)); |
2922 | 2922 |
2923 Label ok, fail, load_from_back_pointer; | 2923 Label ok, fail, load_from_back_pointer; |
2924 CheckMap(temp, | 2924 CheckMap(temp, |
2925 isolate()->factory()->fixed_array_map(), | 2925 isolate()->factory()->fixed_array_map(), |
2926 &fail, | 2926 &fail, |
2927 DONT_DO_SMI_CHECK); | 2927 DONT_DO_SMI_CHECK); |
2928 movq(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset)); | 2928 movq(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset)); |
2929 movq(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset)); | |
2930 jmp(&ok); | 2929 jmp(&ok); |
2931 | 2930 |
2932 bind(&fail); | 2931 bind(&fail); |
2933 CompareRoot(temp, Heap::kUndefinedValueRootIndex); | 2932 CompareRoot(temp, Heap::kUndefinedValueRootIndex); |
2934 j(not_equal, &load_from_back_pointer, Label::kNear); | 2933 j(not_equal, &load_from_back_pointer, Label::kNear); |
2935 Move(descriptors, isolate()->factory()->empty_descriptor_array()); | 2934 Move(descriptors, isolate()->factory()->empty_descriptor_array()); |
2936 jmp(&ok); | 2935 jmp(&ok); |
2937 | 2936 |
2938 bind(&load_from_back_pointer); | 2937 bind(&load_from_back_pointer); |
2939 movq(temp, FieldOperand(temp, Map::kTransitionsOrBackPointerOffset)); | 2938 movq(temp, FieldOperand(temp, Map::kTransitionsOrBackPointerOffset)); |
2940 movq(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset)); | 2939 movq(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset)); |
2941 movq(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset)); | |
2942 | 2940 |
2943 bind(&ok); | 2941 bind(&ok); |
2944 } | 2942 } |
2945 | 2943 |
2946 | 2944 |
2947 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { | 2945 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { |
2948 movq(dst, FieldOperand(map, Map::kBitField3Offset)); | 2946 movq(dst, FieldOperand(map, Map::kBitField3Offset)); |
2949 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); | 2947 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); |
2950 } | 2948 } |
2951 | 2949 |
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4573 | 4571 |
4574 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); | 4572 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); |
4575 cmpq(rcx, null_value); | 4573 cmpq(rcx, null_value); |
4576 j(not_equal, &next); | 4574 j(not_equal, &next); |
4577 } | 4575 } |
4578 | 4576 |
4579 | 4577 |
4580 } } // namespace v8::internal | 4578 } } // namespace v8::internal |
4581 | 4579 |
4582 #endif // V8_TARGET_ARCH_X64 | 4580 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |