OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2649 Label* fail, | 2649 Label* fail, |
2650 Label::Distance distance) { | 2650 Label::Distance distance) { |
2651 STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); | 2651 STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
2652 STATIC_ASSERT(FAST_ELEMENTS == 1); | 2652 STATIC_ASSERT(FAST_ELEMENTS == 1); |
2653 cmpb(FieldOperand(map, Map::kBitField2Offset), | 2653 cmpb(FieldOperand(map, Map::kBitField2Offset), |
2654 Immediate(Map::kMaximumBitField2FastElementValue)); | 2654 Immediate(Map::kMaximumBitField2FastElementValue)); |
2655 j(above, fail, distance); | 2655 j(above, fail, distance); |
2656 } | 2656 } |
2657 | 2657 |
2658 | 2658 |
| 2659 void MacroAssembler::CheckFastObjectElements(Register map, |
| 2660 Label* fail, |
| 2661 Label::Distance distance) { |
| 2662 STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
| 2663 STATIC_ASSERT(FAST_ELEMENTS == 1); |
| 2664 cmpb(FieldOperand(map, Map::kBitField2Offset), |
| 2665 Immediate(Map::kMaximumBitField2FastSmiOnlyElementValue)); |
| 2666 j(below_equal, fail, distance); |
| 2667 cmpb(FieldOperand(map, Map::kBitField2Offset), |
| 2668 Immediate(Map::kMaximumBitField2FastElementValue)); |
| 2669 j(above, fail, distance); |
| 2670 } |
| 2671 |
| 2672 |
| 2673 void MacroAssembler::CheckFastSmiOnlyElements(Register map, |
| 2674 Label* fail, |
| 2675 Label::Distance distance) { |
| 2676 STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS == 0); |
| 2677 cmpb(FieldOperand(map, Map::kBitField2Offset), |
| 2678 Immediate(Map::kMaximumBitField2FastSmiOnlyElementValue)); |
| 2679 j(above, fail, distance); |
| 2680 } |
| 2681 |
| 2682 |
2659 void MacroAssembler::CheckMap(Register obj, | 2683 void MacroAssembler::CheckMap(Register obj, |
2660 Handle<Map> map, | 2684 Handle<Map> map, |
2661 Label* fail, | 2685 Label* fail, |
2662 SmiCheckType smi_check_type) { | 2686 SmiCheckType smi_check_type) { |
2663 if (smi_check_type == DO_SMI_CHECK) { | 2687 if (smi_check_type == DO_SMI_CHECK) { |
2664 JumpIfSmi(obj, fail); | 2688 JumpIfSmi(obj, fail); |
2665 } | 2689 } |
2666 Cmp(FieldOperand(obj, HeapObject::kMapOffset), map); | 2690 Cmp(FieldOperand(obj, HeapObject::kMapOffset), map); |
2667 j(not_equal, fail); | 2691 j(not_equal, fail); |
2668 } | 2692 } |
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4197 | 4221 |
4198 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); | 4222 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); |
4199 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length); | 4223 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length); |
4200 | 4224 |
4201 bind(&done); | 4225 bind(&done); |
4202 } | 4226 } |
4203 | 4227 |
4204 } } // namespace v8::internal | 4228 } } // namespace v8::internal |
4205 | 4229 |
4206 #endif // V8_TARGET_ARCH_X64 | 4230 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |