OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 4453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4464 } | 4464 } |
4465 | 4465 |
4466 | 4466 |
4467 void MacroAssembler::LoadTransitionedArrayMapConditional( | 4467 void MacroAssembler::LoadTransitionedArrayMapConditional( |
4468 ElementsKind expected_kind, | 4468 ElementsKind expected_kind, |
4469 ElementsKind transitioned_kind, | 4469 ElementsKind transitioned_kind, |
4470 Register map_in_out, | 4470 Register map_in_out, |
4471 Register scratch1, | 4471 Register scratch1, |
4472 Register scratch2, | 4472 Register scratch2, |
4473 Label* no_map_match) { | 4473 Label* no_map_match) { |
| 4474 DCHECK(IsFastElementsKind(expected_kind)); |
| 4475 DCHECK(IsFastElementsKind(transitioned_kind)); |
| 4476 |
4474 // Check that the function's map is the same as the expected cached map. | 4477 // Check that the function's map is the same as the expected cached map. |
4475 LoadNativeContextSlot(Context::JS_ARRAY_MAPS_INDEX, scratch1); | 4478 Ldr(scratch1, NativeContextMemOperand()); |
4476 int offset = (expected_kind * kPointerSize) + FixedArrayBase::kHeaderSize; | 4479 Ldr(scratch2, |
4477 Ldr(scratch2, FieldMemOperand(scratch1, offset)); | 4480 ContextMemOperand(scratch1, Context::ArrayMapIndex(expected_kind))); |
4478 Cmp(map_in_out, scratch2); | 4481 Cmp(map_in_out, scratch2); |
4479 B(ne, no_map_match); | 4482 B(ne, no_map_match); |
4480 | 4483 |
4481 // Use the transitioned cached map. | 4484 // Use the transitioned cached map. |
4482 offset = (transitioned_kind * kPointerSize) + FixedArrayBase::kHeaderSize; | 4485 Ldr(map_in_out, |
4483 Ldr(map_in_out, FieldMemOperand(scratch1, offset)); | 4486 ContextMemOperand(scratch1, Context::ArrayMapIndex(transitioned_kind))); |
4484 } | 4487 } |
4485 | 4488 |
4486 | 4489 |
4487 void MacroAssembler::LoadNativeContextSlot(int index, Register dst) { | 4490 void MacroAssembler::LoadNativeContextSlot(int index, Register dst) { |
4488 Ldr(dst, NativeContextMemOperand()); | 4491 Ldr(dst, NativeContextMemOperand()); |
4489 Ldr(dst, ContextMemOperand(dst, index)); | 4492 Ldr(dst, ContextMemOperand(dst, index)); |
4490 } | 4493 } |
4491 | 4494 |
4492 | 4495 |
4493 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, | 4496 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4923 } | 4926 } |
4924 | 4927 |
4925 | 4928 |
4926 #undef __ | 4929 #undef __ |
4927 | 4930 |
4928 | 4931 |
4929 } // namespace internal | 4932 } // namespace internal |
4930 } // namespace v8 | 4933 } // namespace v8 |
4931 | 4934 |
4932 #endif // V8_TARGET_ARCH_ARM64 | 4935 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |