| 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 3106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3117 failure); | 3117 failure); |
| 3118 } | 3118 } |
| 3119 | 3119 |
| 3120 | 3120 |
| 3121 // Allocates a heap number or jumps to the need_gc label if the young space | 3121 // Allocates a heap number or jumps to the need_gc label if the young space |
| 3122 // is full and a scavenge is needed. | 3122 // is full and a scavenge is needed. |
| 3123 void MacroAssembler::AllocateHeapNumber(Register result, | 3123 void MacroAssembler::AllocateHeapNumber(Register result, |
| 3124 Register scratch1, | 3124 Register scratch1, |
| 3125 Register scratch2, | 3125 Register scratch2, |
| 3126 Register heap_number_map, | 3126 Register heap_number_map, |
| 3127 Label* gc_required) { | 3127 Label* gc_required, |
| 3128 TaggingMode tagging_mode) { |
| 3128 // Allocate an object in the heap for the heap number and tag it as a heap | 3129 // Allocate an object in the heap for the heap number and tag it as a heap |
| 3129 // object. | 3130 // object. |
| 3130 AllocateInNewSpace(HeapNumber::kSize, | 3131 AllocateInNewSpace(HeapNumber::kSize, |
| 3131 result, | 3132 result, |
| 3132 scratch1, | 3133 scratch1, |
| 3133 scratch2, | 3134 scratch2, |
| 3134 gc_required, | 3135 gc_required, |
| 3135 TAG_OBJECT); | 3136 tagging_mode == TAG_RESULT ? TAG_OBJECT : |
| 3137 NO_ALLOCATION_FLAGS); |
| 3136 | 3138 |
| 3137 // Store heap number map in the allocated object. | 3139 // Store heap number map in the allocated object. |
| 3138 AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); | 3140 AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); |
| 3139 str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); | 3141 if (tagging_mode == TAG_RESULT) { |
| 3142 str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); |
| 3143 } else { |
| 3144 str(heap_number_map, MemOperand(result, HeapObject::kMapOffset)); |
| 3145 } |
| 3140 } | 3146 } |
| 3141 | 3147 |
| 3142 | 3148 |
| 3143 void MacroAssembler::AllocateHeapNumberWithValue(Register result, | 3149 void MacroAssembler::AllocateHeapNumberWithValue(Register result, |
| 3144 DwVfpRegister value, | 3150 DwVfpRegister value, |
| 3145 Register scratch1, | 3151 Register scratch1, |
| 3146 Register scratch2, | 3152 Register scratch2, |
| 3147 Register heap_number_map, | 3153 Register heap_number_map, |
| 3148 Label* gc_required) { | 3154 Label* gc_required) { |
| 3149 AllocateHeapNumber(result, scratch1, scratch2, heap_number_map, gc_required); | 3155 AllocateHeapNumber(result, scratch1, scratch2, heap_number_map, gc_required); |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3854 void CodePatcher::EmitCondition(Condition cond) { | 3860 void CodePatcher::EmitCondition(Condition cond) { |
| 3855 Instr instr = Assembler::instr_at(masm_.pc_); | 3861 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3856 instr = (instr & ~kCondMask) | cond; | 3862 instr = (instr & ~kCondMask) | cond; |
| 3857 masm_.emit(instr); | 3863 masm_.emit(instr); |
| 3858 } | 3864 } |
| 3859 | 3865 |
| 3860 | 3866 |
| 3861 } } // namespace v8::internal | 3867 } } // namespace v8::internal |
| 3862 | 3868 |
| 3863 #endif // V8_TARGET_ARCH_ARM | 3869 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |