| 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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 5046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5057 } | 5057 } |
| 5058 } | 5058 } |
| 5059 | 5059 |
| 5060 | 5060 |
| 5061 void MacroAssembler::LoadTransitionedArrayMapConditional( | 5061 void MacroAssembler::LoadTransitionedArrayMapConditional( |
| 5062 ElementsKind expected_kind, | 5062 ElementsKind expected_kind, |
| 5063 ElementsKind transitioned_kind, | 5063 ElementsKind transitioned_kind, |
| 5064 Register map_in_out, | 5064 Register map_in_out, |
| 5065 Register scratch, | 5065 Register scratch, |
| 5066 Label* no_map_match) { | 5066 Label* no_map_match) { |
| 5067 DCHECK(IsFastElementsKind(expected_kind)); |
| 5068 DCHECK(IsFastElementsKind(transitioned_kind)); |
| 5069 |
| 5067 // Check that the function's map is the same as the expected cached map. | 5070 // Check that the function's map is the same as the expected cached map. |
| 5068 LoadNativeContextSlot(Context::JS_ARRAY_MAPS_INDEX, scratch); | 5071 movp(scratch, NativeContextOperand()); |
| 5069 | 5072 cmpp(map_in_out, |
| 5070 int offset = expected_kind * kPointerSize + | 5073 ContextOperand(scratch, Context::ArrayMapIndex(expected_kind))); |
| 5071 FixedArrayBase::kHeaderSize; | |
| 5072 cmpp(map_in_out, FieldOperand(scratch, offset)); | |
| 5073 j(not_equal, no_map_match); | 5074 j(not_equal, no_map_match); |
| 5074 | 5075 |
| 5075 // Use the transitioned cached map. | 5076 // Use the transitioned cached map. |
| 5076 offset = transitioned_kind * kPointerSize + | 5077 movp(map_in_out, |
| 5077 FixedArrayBase::kHeaderSize; | 5078 ContextOperand(scratch, Context::ArrayMapIndex(transitioned_kind))); |
| 5078 movp(map_in_out, FieldOperand(scratch, offset)); | |
| 5079 } | 5079 } |
| 5080 | 5080 |
| 5081 | 5081 |
| 5082 #ifdef _WIN64 | 5082 #ifdef _WIN64 |
| 5083 static const int kRegisterPassedArguments = 4; | 5083 static const int kRegisterPassedArguments = 4; |
| 5084 #else | 5084 #else |
| 5085 static const int kRegisterPassedArguments = 6; | 5085 static const int kRegisterPassedArguments = 6; |
| 5086 #endif | 5086 #endif |
| 5087 | 5087 |
| 5088 | 5088 |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5552 movl(rax, dividend); | 5552 movl(rax, dividend); |
| 5553 shrl(rax, Immediate(31)); | 5553 shrl(rax, Immediate(31)); |
| 5554 addl(rdx, rax); | 5554 addl(rdx, rax); |
| 5555 } | 5555 } |
| 5556 | 5556 |
| 5557 | 5557 |
| 5558 } // namespace internal | 5558 } // namespace internal |
| 5559 } // namespace v8 | 5559 } // namespace v8 |
| 5560 | 5560 |
| 5561 #endif // V8_TARGET_ARCH_X64 | 5561 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |