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_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
10 | 10 |
(...skipping 3947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3958 SmiCheckType smi_check_type) { | 3958 SmiCheckType smi_check_type) { |
3959 if (smi_check_type == DO_SMI_CHECK) { | 3959 if (smi_check_type == DO_SMI_CHECK) { |
3960 JumpIfSmi(obj, fail); | 3960 JumpIfSmi(obj, fail); |
3961 } | 3961 } |
3962 Label success; | 3962 Label success; |
3963 CompareMapAndBranch(obj, scratch, map, &success, ne, fail); | 3963 CompareMapAndBranch(obj, scratch, map, &success, ne, fail); |
3964 bind(&success); | 3964 bind(&success); |
3965 } | 3965 } |
3966 | 3966 |
3967 | 3967 |
3968 void MacroAssembler::DispatchMap(Register obj, | 3968 void MacroAssembler::DispatchWeakMap(Register obj, Register scratch1, |
3969 Register scratch, | 3969 Register scratch2, Handle<WeakCell> cell, |
3970 Handle<Map> map, | 3970 Handle<Code> success, |
3971 Handle<Code> success, | 3971 SmiCheckType smi_check_type) { |
3972 SmiCheckType smi_check_type) { | |
3973 Label fail; | 3972 Label fail; |
3974 if (smi_check_type == DO_SMI_CHECK) { | 3973 if (smi_check_type == DO_SMI_CHECK) { |
3975 JumpIfSmi(obj, &fail); | 3974 JumpIfSmi(obj, &fail); |
3976 } | 3975 } |
3977 ld(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); | 3976 ld(scratch1, FieldMemOperand(obj, HeapObject::kMapOffset)); |
3978 Jump(success, RelocInfo::CODE_TARGET, eq, scratch, Operand(map)); | 3977 GetWeakValue(scratch2, cell); |
| 3978 Jump(success, RelocInfo::CODE_TARGET, eq, scratch1, Operand(scratch2)); |
3979 bind(&fail); | 3979 bind(&fail); |
3980 } | 3980 } |
3981 | 3981 |
3982 | 3982 |
3983 void MacroAssembler::CheckMap(Register obj, | 3983 void MacroAssembler::CheckMap(Register obj, |
3984 Register scratch, | 3984 Register scratch, |
3985 Heap::RootListIndex index, | 3985 Heap::RootListIndex index, |
3986 Label* fail, | 3986 Label* fail, |
3987 SmiCheckType smi_check_type) { | 3987 SmiCheckType smi_check_type) { |
3988 if (smi_check_type == DO_SMI_CHECK) { | 3988 if (smi_check_type == DO_SMI_CHECK) { |
(...skipping 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6316 } | 6316 } |
6317 if (mag.shift > 0) sra(result, result, mag.shift); | 6317 if (mag.shift > 0) sra(result, result, mag.shift); |
6318 srl(at, dividend, 31); | 6318 srl(at, dividend, 31); |
6319 Addu(result, result, Operand(at)); | 6319 Addu(result, result, Operand(at)); |
6320 } | 6320 } |
6321 | 6321 |
6322 | 6322 |
6323 } } // namespace v8::internal | 6323 } } // namespace v8::internal |
6324 | 6324 |
6325 #endif // V8_TARGET_ARCH_MIPS64 | 6325 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |