| 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/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
| 9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
| 10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 Counters* counters = masm->isolate()->counters(); | 673 Counters* counters = masm->isolate()->counters(); |
| 674 __ IncrementCounter(counters->load_miss(), 1); | 674 __ IncrementCounter(counters->load_miss(), 1); |
| 675 | 675 |
| 676 LoadIC_PushArgs(masm); | 676 LoadIC_PushArgs(masm); |
| 677 | 677 |
| 678 Register receiver = LoadDescriptor::ReceiverRegister(); | 678 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 679 | 679 |
| 680 // Sanity check: The receiver must be a JS-exposed kind of object, | 680 // Sanity check: The receiver must be a JS-exposed kind of object, |
| 681 // not something internal (like a Map, or FixedArray). Check this here | 681 // not something internal (like a Map, or FixedArray). Check this here |
| 682 // to chase after a rare but recurring crash bug. | 682 // to chase after a rare but recurring crash bug. |
| 683 // TODO(jkummerow): Remove this when it has generated a few crash reports. | 683 // TODO(chromium:527994): Remove this when we have a few crash reports. |
| 684 | 684 |
| 685 Label ok, sound_alarm; | 685 Label ok, sound_alarm; |
| 686 __ JumpIfSmi(receiver, &ok, Label::kNear); | 686 __ JumpIfSmi(receiver, &ok, Label::kNear); |
| 687 __ movp(rbx, FieldOperand(receiver, HeapObject::kMapOffset)); | 687 __ movp(rbx, FieldOperand(receiver, HeapObject::kMapOffset)); |
| 688 __ CompareRoot(rbx, Heap::kMetaMapRootIndex); | 688 __ CompareRoot(rbx, Heap::kMetaMapRootIndex); |
| 689 __ j(equal, &sound_alarm); | 689 __ j(equal, &sound_alarm); |
| 690 __ CompareRoot(rbx, Heap::kFixedArrayMapRootIndex); | 690 __ CompareRoot(rbx, Heap::kFixedArrayMapRootIndex); |
| 691 __ j(not_equal, &ok, Label::kNear); | 691 __ j(not_equal, &ok, Label::kNear); |
| 692 | 692 |
| 693 // This cmpp instruction is only here to identify which of several kinds | 693 // This cmpp instruction is only here to identify which of several kinds |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 Condition cc = | 916 Condition cc = |
| 917 (check == ENABLE_INLINED_SMI_CHECK) | 917 (check == ENABLE_INLINED_SMI_CHECK) |
| 918 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 918 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 919 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 919 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 920 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 920 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 921 } | 921 } |
| 922 } // namespace internal | 922 } // namespace internal |
| 923 } // namespace v8 | 923 } // namespace v8 |
| 924 | 924 |
| 925 #endif // V8_TARGET_ARCH_X64 | 925 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |