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 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2574 void MacroAssembler::LoadInstanceDescriptors(Register map, | 2574 void MacroAssembler::LoadInstanceDescriptors(Register map, |
2575 Register descriptors) { | 2575 Register descriptors) { |
2576 Register temp = descriptors; | 2576 Register temp = descriptors; |
2577 mov(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset)); | 2577 mov(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset)); |
2578 | 2578 |
2579 Label ok, fail, load_from_back_pointer; | 2579 Label ok, fail, load_from_back_pointer; |
2580 CheckMap(temp, | 2580 CheckMap(temp, |
2581 isolate()->factory()->fixed_array_map(), | 2581 isolate()->factory()->fixed_array_map(), |
2582 &fail, | 2582 &fail, |
2583 DONT_DO_SMI_CHECK); | 2583 DONT_DO_SMI_CHECK); |
2584 mov(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset)); | 2584 mov(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset)); |
2585 mov(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset)); | |
2586 jmp(&ok); | 2585 jmp(&ok); |
2587 | 2586 |
2588 bind(&fail); | 2587 bind(&fail); |
2589 cmp(temp, isolate()->factory()->undefined_value()); | 2588 cmp(temp, isolate()->factory()->undefined_value()); |
2590 j(not_equal, &load_from_back_pointer, Label::kNear); | 2589 j(not_equal, &load_from_back_pointer, Label::kNear); |
2591 mov(descriptors, isolate()->factory()->empty_descriptor_array()); | 2590 mov(descriptors, isolate()->factory()->empty_descriptor_array()); |
2592 jmp(&ok); | 2591 jmp(&ok); |
2593 | 2592 |
2594 bind(&load_from_back_pointer); | 2593 bind(&load_from_back_pointer); |
2595 mov(temp, FieldOperand(temp, Map::kTransitionsOrBackPointerOffset)); | 2594 mov(temp, FieldOperand(temp, Map::kTransitionsOrBackPointerOffset)); |
2596 mov(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset)); | 2595 mov(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset)); |
2597 mov(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset)); | |
2598 | 2596 |
2599 bind(&ok); | 2597 bind(&ok); |
2600 } | 2598 } |
2601 | 2599 |
2602 | 2600 |
2603 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { | 2601 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { |
2604 mov(dst, FieldOperand(map, Map::kBitField3Offset)); | 2602 mov(dst, FieldOperand(map, Map::kBitField3Offset)); |
2605 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); | 2603 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); |
2606 } | 2604 } |
2607 | 2605 |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2988 j(not_equal, call_runtime); | 2986 j(not_equal, call_runtime); |
2989 | 2987 |
2990 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); | 2988 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); |
2991 cmp(ecx, isolate()->factory()->null_value()); | 2989 cmp(ecx, isolate()->factory()->null_value()); |
2992 j(not_equal, &next); | 2990 j(not_equal, &next); |
2993 } | 2991 } |
2994 | 2992 |
2995 } } // namespace v8::internal | 2993 } } // namespace v8::internal |
2996 | 2994 |
2997 #endif // V8_TARGET_ARCH_IA32 | 2995 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |