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 "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_ARM | 9 #if V8_TARGET_ARCH_ARM |
10 | 10 |
(...skipping 2234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2245 if (smi_check_type == DO_SMI_CHECK) { | 2245 if (smi_check_type == DO_SMI_CHECK) { |
2246 JumpIfSmi(obj, fail); | 2246 JumpIfSmi(obj, fail); |
2247 } | 2247 } |
2248 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 2248 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); |
2249 LoadRoot(ip, index); | 2249 LoadRoot(ip, index); |
2250 cmp(scratch, ip); | 2250 cmp(scratch, ip); |
2251 b(ne, fail); | 2251 b(ne, fail); |
2252 } | 2252 } |
2253 | 2253 |
2254 | 2254 |
2255 void MacroAssembler::DispatchMap(Register obj, | 2255 void MacroAssembler::DispatchWeakMap(Register obj, Register scratch1, |
2256 Register scratch, | 2256 Register scratch2, Handle<WeakCell> cell, |
2257 Handle<Map> map, | 2257 Handle<Code> success, |
2258 Handle<Code> success, | 2258 SmiCheckType smi_check_type) { |
2259 SmiCheckType smi_check_type) { | |
2260 Label fail; | 2259 Label fail; |
2261 if (smi_check_type == DO_SMI_CHECK) { | 2260 if (smi_check_type == DO_SMI_CHECK) { |
2262 JumpIfSmi(obj, &fail); | 2261 JumpIfSmi(obj, &fail); |
2263 } | 2262 } |
2264 ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 2263 ldr(scratch1, FieldMemOperand(obj, HeapObject::kMapOffset)); |
2265 mov(ip, Operand(map)); | 2264 CmpWeakValue(scratch1, cell, scratch2); |
2266 cmp(scratch, ip); | |
2267 Jump(success, RelocInfo::CODE_TARGET, eq); | 2265 Jump(success, RelocInfo::CODE_TARGET, eq); |
2268 bind(&fail); | 2266 bind(&fail); |
2269 } | 2267 } |
2270 | 2268 |
2271 | 2269 |
2272 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, | 2270 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, |
2273 Register scratch) { | 2271 Register scratch) { |
2274 mov(scratch, Operand(cell)); | 2272 mov(scratch, Operand(cell)); |
2275 ldr(scratch, FieldMemOperand(scratch, WeakCell::kValueOffset)); | 2273 ldr(scratch, FieldMemOperand(scratch, WeakCell::kValueOffset)); |
2276 cmp(value, scratch); | 2274 cmp(value, scratch); |
(...skipping 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4088 } | 4086 } |
4089 } | 4087 } |
4090 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 4088 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
4091 add(result, result, Operand(dividend, LSR, 31)); | 4089 add(result, result, Operand(dividend, LSR, 31)); |
4092 } | 4090 } |
4093 | 4091 |
4094 } // namespace internal | 4092 } // namespace internal |
4095 } // namespace v8 | 4093 } // namespace v8 |
4096 | 4094 |
4097 #endif // V8_TARGET_ARCH_ARM | 4095 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |