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 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 5039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5050 } | 5050 } |
5051 } | 5051 } |
5052 | 5052 |
5053 | 5053 |
5054 void MacroAssembler::LoadTransitionedArrayMapConditional( | 5054 void MacroAssembler::LoadTransitionedArrayMapConditional( |
5055 ElementsKind expected_kind, | 5055 ElementsKind expected_kind, |
5056 ElementsKind transitioned_kind, | 5056 ElementsKind transitioned_kind, |
5057 Register map_in_out, | 5057 Register map_in_out, |
5058 Register scratch, | 5058 Register scratch, |
5059 Label* no_map_match) { | 5059 Label* no_map_match) { |
| 5060 DCHECK(IsFastElementsKind(expected_kind)); |
| 5061 DCHECK(IsFastElementsKind(transitioned_kind)); |
| 5062 |
5060 // Check that the function's map is the same as the expected cached map. | 5063 // Check that the function's map is the same as the expected cached map. |
5061 LoadNativeContextSlot(Context::JS_ARRAY_MAPS_INDEX, scratch); | 5064 ld(scratch, NativeContextMemOperand()); |
5062 int offset = expected_kind * kPointerSize + FixedArrayBase::kHeaderSize; | 5065 ld(at, ContextMemOperand(scratch, Context::ArrayMapIndex(expected_kind))); |
5063 ld(at, FieldMemOperand(scratch, offset)); | |
5064 Branch(no_map_match, ne, map_in_out, Operand(at)); | 5066 Branch(no_map_match, ne, map_in_out, Operand(at)); |
5065 | 5067 |
5066 // Use the transitioned cached map. | 5068 // Use the transitioned cached map. |
5067 offset = transitioned_kind * kPointerSize + | 5069 ld(map_in_out, |
5068 FixedArrayBase::kHeaderSize; | 5070 ContextMemOperand(scratch, Context::ArrayMapIndex(transitioned_kind))); |
5069 ld(map_in_out, FieldMemOperand(scratch, offset)); | |
5070 } | 5071 } |
5071 | 5072 |
5072 | 5073 |
5073 void MacroAssembler::LoadNativeContextSlot(int index, Register dst) { | 5074 void MacroAssembler::LoadNativeContextSlot(int index, Register dst) { |
5074 ld(dst, NativeContextMemOperand()); | 5075 ld(dst, NativeContextMemOperand()); |
5075 ld(dst, ContextMemOperand(dst, index)); | 5076 ld(dst, ContextMemOperand(dst, index)); |
5076 } | 5077 } |
5077 | 5078 |
5078 | 5079 |
5079 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, | 5080 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, |
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6299 if (mag.shift > 0) sra(result, result, mag.shift); | 6300 if (mag.shift > 0) sra(result, result, mag.shift); |
6300 srl(at, dividend, 31); | 6301 srl(at, dividend, 31); |
6301 Addu(result, result, Operand(at)); | 6302 Addu(result, result, Operand(at)); |
6302 } | 6303 } |
6303 | 6304 |
6304 | 6305 |
6305 } // namespace internal | 6306 } // namespace internal |
6306 } // namespace v8 | 6307 } // namespace v8 |
6307 | 6308 |
6308 #endif // V8_TARGET_ARCH_MIPS64 | 6309 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |