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 2558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2569 // will not return here | 2569 // will not return here |
2570 int3(); | 2570 int3(); |
2571 } | 2571 } |
2572 | 2572 |
2573 | 2573 |
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; | 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(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset)); | 2584 mov(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset)); |
| 2585 mov(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset)); |
2585 jmp(&ok); | 2586 jmp(&ok); |
| 2587 |
2586 bind(&fail); | 2588 bind(&fail); |
| 2589 cmp(temp, isolate()->factory()->undefined_value()); |
| 2590 j(not_equal, &load_from_back_pointer, Label::kNear); |
2587 mov(descriptors, isolate()->factory()->empty_descriptor_array()); | 2591 mov(descriptors, isolate()->factory()->empty_descriptor_array()); |
| 2592 jmp(&ok); |
| 2593 |
| 2594 bind(&load_from_back_pointer); |
| 2595 mov(temp, FieldOperand(temp, Map::kTransitionsOrBackPointerOffset)); |
| 2596 mov(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset)); |
| 2597 mov(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset)); |
| 2598 |
2588 bind(&ok); | 2599 bind(&ok); |
2589 } | 2600 } |
2590 | 2601 |
2591 | 2602 |
| 2603 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { |
| 2604 mov(dst, FieldOperand(map, Map::kBitField3Offset)); |
| 2605 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); |
| 2606 } |
| 2607 |
| 2608 |
2592 void MacroAssembler::LoadPowerOf2(XMMRegister dst, | 2609 void MacroAssembler::LoadPowerOf2(XMMRegister dst, |
2593 Register scratch, | 2610 Register scratch, |
2594 int power) { | 2611 int power) { |
2595 ASSERT(is_uintn(power + HeapNumber::kExponentBias, | 2612 ASSERT(is_uintn(power + HeapNumber::kExponentBias, |
2596 HeapNumber::kExponentBits)); | 2613 HeapNumber::kExponentBits)); |
2597 mov(scratch, Immediate(power + HeapNumber::kExponentBias)); | 2614 mov(scratch, Immediate(power + HeapNumber::kExponentBias)); |
2598 movd(dst, scratch); | 2615 movd(dst, scratch); |
2599 psllq(dst, HeapNumber::kMantissaBits); | 2616 psllq(dst, HeapNumber::kMantissaBits); |
2600 } | 2617 } |
2601 | 2618 |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2971 j(not_equal, call_runtime); | 2988 j(not_equal, call_runtime); |
2972 | 2989 |
2973 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); | 2990 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); |
2974 cmp(ecx, isolate()->factory()->null_value()); | 2991 cmp(ecx, isolate()->factory()->null_value()); |
2975 j(not_equal, &next); | 2992 j(not_equal, &next); |
2976 } | 2993 } |
2977 | 2994 |
2978 } } // namespace v8::internal | 2995 } } // namespace v8::internal |
2979 | 2996 |
2980 #endif // V8_TARGET_ARCH_IA32 | 2997 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |