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 4592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4603 cmpq(empty_fixed_array_value, | 4603 cmpq(empty_fixed_array_value, |
4604 FieldOperand(rcx, JSObject::kElementsOffset)); | 4604 FieldOperand(rcx, JSObject::kElementsOffset)); |
4605 j(not_equal, call_runtime); | 4605 j(not_equal, call_runtime); |
4606 | 4606 |
4607 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); | 4607 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); |
4608 cmpq(rcx, null_value); | 4608 cmpq(rcx, null_value); |
4609 j(not_equal, &next); | 4609 j(not_equal, &next); |
4610 } | 4610 } |
4611 | 4611 |
4612 | 4612 |
| 4613 void MacroAssembler::PerformAllocationSiteInfoCheck( |
| 4614 Label* allocation_info_present) { |
| 4615 Label no_info_available; |
| 4616 // ----------- S t a t e ------------- |
| 4617 // -- rdx : receiver |
| 4618 // rdi is clobbered. |
| 4619 // ----------------------------------- |
| 4620 ExternalReference new_space_start = |
| 4621 ExternalReference::new_space_start(isolate()); |
| 4622 ExternalReference new_space_allocation_top = |
| 4623 ExternalReference::new_space_allocation_top_address(isolate()); |
| 4624 |
| 4625 lea(rdi, Operand(rdx, JSArray::kSize + AllocationSiteInfo::kSize)); |
| 4626 movq(kScratchRegister, new_space_start); |
| 4627 cmpq(rdi, kScratchRegister); |
| 4628 j(less, &no_info_available); |
| 4629 cmpq(rdi, ExternalOperand(new_space_allocation_top)); |
| 4630 j(greater_equal, &no_info_available); |
| 4631 CompareRoot(MemOperand(rdi, 0), Heap::kAllocationSiteInfoMapRootIndex); |
| 4632 |
| 4633 // Use the j/jmp sequence below for debugging, but the j(equal) sequence |
| 4634 // for production. |
| 4635 // j(not_equal, &no_info_available); |
| 4636 // int3(); |
| 4637 // jmp(allocation_info_present); |
| 4638 // or |
| 4639 j(equal, allocation_info_present); |
| 4640 bind(&no_info_available); |
| 4641 } |
| 4642 |
| 4643 |
4613 } } // namespace v8::internal | 4644 } } // namespace v8::internal |
4614 | 4645 |
4615 #endif // V8_TARGET_ARCH_X64 | 4646 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |