| 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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 Register map, | 636 Register map, |
| 637 Register instance_type) { | 637 Register instance_type) { |
| 638 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); | 638 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
| 639 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); | 639 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); |
| 640 STATIC_ASSERT(kNotStringTag != 0); | 640 STATIC_ASSERT(kNotStringTag != 0); |
| 641 test(instance_type, Immediate(kIsNotStringMask)); | 641 test(instance_type, Immediate(kIsNotStringMask)); |
| 642 return zero; | 642 return zero; |
| 643 } | 643 } |
| 644 | 644 |
| 645 | 645 |
| 646 Condition MacroAssembler::IsObjectNameType(Register heap_object, |
| 647 Register map, |
| 648 Register instance_type) { |
| 649 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
| 650 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); |
| 651 cmpb(instance_type, static_cast<int8_t>(LAST_NAME_TYPE)); |
| 652 return below_equal; |
| 653 } |
| 654 |
| 655 |
| 646 void MacroAssembler::IsObjectJSObjectType(Register heap_object, | 656 void MacroAssembler::IsObjectJSObjectType(Register heap_object, |
| 647 Register map, | 657 Register map, |
| 648 Register scratch, | 658 Register scratch, |
| 649 Label* fail) { | 659 Label* fail) { |
| 650 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); | 660 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
| 651 IsInstanceJSObjectType(map, scratch, fail); | 661 IsInstanceJSObjectType(map, scratch, fail); |
| 652 } | 662 } |
| 653 | 663 |
| 654 | 664 |
| 655 void MacroAssembler::IsInstanceJSObjectType(Register map, | 665 void MacroAssembler::IsInstanceJSObjectType(Register map, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 Check(not_equal, "Operand is a smi and not a string"); | 713 Check(not_equal, "Operand is a smi and not a string"); |
| 704 push(object); | 714 push(object); |
| 705 mov(object, FieldOperand(object, HeapObject::kMapOffset)); | 715 mov(object, FieldOperand(object, HeapObject::kMapOffset)); |
| 706 CmpInstanceType(object, FIRST_NONSTRING_TYPE); | 716 CmpInstanceType(object, FIRST_NONSTRING_TYPE); |
| 707 pop(object); | 717 pop(object); |
| 708 Check(below, "Operand is not a string"); | 718 Check(below, "Operand is not a string"); |
| 709 } | 719 } |
| 710 } | 720 } |
| 711 | 721 |
| 712 | 722 |
| 723 void MacroAssembler::AssertName(Register object) { |
| 724 if (emit_debug_code()) { |
| 725 test(object, Immediate(kSmiTagMask)); |
| 726 Check(not_equal, "Operand is a smi and not a name"); |
| 727 push(object); |
| 728 mov(object, FieldOperand(object, HeapObject::kMapOffset)); |
| 729 CmpInstanceType(object, LAST_NAME_TYPE); |
| 730 pop(object); |
| 731 Check(below_equal, "Operand is not a name"); |
| 732 } |
| 733 } |
| 734 |
| 735 |
| 713 void MacroAssembler::AssertNotSmi(Register object) { | 736 void MacroAssembler::AssertNotSmi(Register object) { |
| 714 if (emit_debug_code()) { | 737 if (emit_debug_code()) { |
| 715 test(object, Immediate(kSmiTagMask)); | 738 test(object, Immediate(kSmiTagMask)); |
| 716 Check(not_equal, "Operand is a smi"); | 739 Check(not_equal, "Operand is a smi"); |
| 717 } | 740 } |
| 718 } | 741 } |
| 719 | 742 |
| 720 | 743 |
| 721 void MacroAssembler::EnterFrame(StackFrame::Type type) { | 744 void MacroAssembler::EnterFrame(StackFrame::Type type) { |
| 722 push(ebp); | 745 push(ebp); |
| (...skipping 2358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3081 j(greater, &no_info_available); | 3104 j(greater, &no_info_available); |
| 3082 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 3105 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
| 3083 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); | 3106 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); |
| 3084 bind(&no_info_available); | 3107 bind(&no_info_available); |
| 3085 } | 3108 } |
| 3086 | 3109 |
| 3087 | 3110 |
| 3088 } } // namespace v8::internal | 3111 } } // namespace v8::internal |
| 3089 | 3112 |
| 3090 #endif // V8_TARGET_ARCH_IA32 | 3113 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |