OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #include "v8.h" | 7 #include "v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 3099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3110 scratch1, | 3110 scratch1, |
3111 scratch2); | 3111 scratch2); |
3112 } | 3112 } |
3113 | 3113 |
3114 | 3114 |
3115 void MacroAssembler::AllocateAsciiConsString(Register result, | 3115 void MacroAssembler::AllocateAsciiConsString(Register result, |
3116 Register length, | 3116 Register length, |
3117 Register scratch1, | 3117 Register scratch1, |
3118 Register scratch2, | 3118 Register scratch2, |
3119 Label* gc_required) { | 3119 Label* gc_required) { |
3120 Label allocate_new_space, install_map; | |
3121 AllocationFlags flags = TAG_OBJECT; | |
3122 | |
3123 ExternalReference high_promotion_mode = ExternalReference:: | |
3124 new_space_high_promotion_mode_active_address(isolate()); | |
3125 li(scratch1, Operand(high_promotion_mode)); | |
3126 lw(scratch1, MemOperand(scratch1, 0)); | |
3127 Branch(&allocate_new_space, eq, scratch1, Operand(zero_reg)); | |
3128 | |
3129 Allocate(ConsString::kSize, | 3120 Allocate(ConsString::kSize, |
3130 result, | 3121 result, |
3131 scratch1, | 3122 scratch1, |
3132 scratch2, | 3123 scratch2, |
3133 gc_required, | 3124 gc_required, |
3134 static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE)); | 3125 TAG_OBJECT); |
3135 | |
3136 jmp(&install_map); | |
3137 | |
3138 bind(&allocate_new_space); | |
3139 Allocate(ConsString::kSize, | |
3140 result, | |
3141 scratch1, | |
3142 scratch2, | |
3143 gc_required, | |
3144 flags); | |
3145 | |
3146 bind(&install_map); | |
3147 | 3126 |
3148 InitializeNewString(result, | 3127 InitializeNewString(result, |
3149 length, | 3128 length, |
3150 Heap::kConsAsciiStringMapRootIndex, | 3129 Heap::kConsAsciiStringMapRootIndex, |
3151 scratch1, | 3130 scratch1, |
3152 scratch2); | 3131 scratch2); |
3153 } | 3132 } |
3154 | 3133 |
3155 | 3134 |
3156 void MacroAssembler::AllocateTwoByteSlicedString(Register result, | 3135 void MacroAssembler::AllocateTwoByteSlicedString(Register result, |
(...skipping 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5742 } | 5721 } |
5743 if (ms.shift() > 0) sra(result, result, ms.shift()); | 5722 if (ms.shift() > 0) sra(result, result, ms.shift()); |
5744 srl(at, dividend, 31); | 5723 srl(at, dividend, 31); |
5745 Addu(result, result, Operand(at)); | 5724 Addu(result, result, Operand(at)); |
5746 } | 5725 } |
5747 | 5726 |
5748 | 5727 |
5749 } } // namespace v8::internal | 5728 } } // namespace v8::internal |
5750 | 5729 |
5751 #endif // V8_TARGET_ARCH_MIPS | 5730 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |