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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 isolate->factory()->keyed_load_dummy_vector()); | 405 isolate->factory()->keyed_load_dummy_vector()); |
406 int slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); | 406 int slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); |
407 __ push(Immediate(Smi::FromInt(slot))); | 407 __ push(Immediate(Smi::FromInt(slot))); |
408 __ push(Immediate(dummy_vector)); | 408 __ push(Immediate(dummy_vector)); |
409 | 409 |
410 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 410 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
411 Code::ComputeHandlerFlags(Code::LOAD_IC)); | 411 Code::ComputeHandlerFlags(Code::LOAD_IC)); |
412 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, | 412 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, |
413 false, receiver, key, ebx, edi); | 413 false, receiver, key, ebx, edi); |
414 | 414 |
415 __ pop(VectorLoadICDescriptor::VectorRegister()); | 415 __ pop(LoadWithVectorDescriptor::VectorRegister()); |
416 __ pop(VectorLoadICDescriptor::SlotRegister()); | 416 __ pop(LoadDescriptor::SlotRegister()); |
417 | 417 |
418 // Cache miss. | 418 // Cache miss. |
419 GenerateMiss(masm); | 419 GenerateMiss(masm); |
420 | 420 |
421 // Do a quick inline probe of the receiver's dictionary, if it | 421 // Do a quick inline probe of the receiver's dictionary, if it |
422 // exists. | 422 // exists. |
423 __ bind(&probe_dictionary); | 423 __ bind(&probe_dictionary); |
424 | 424 |
425 __ mov(eax, FieldOperand(receiver, JSObject::kMapOffset)); | 425 __ mov(eax, FieldOperand(receiver, JSObject::kMapOffset)); |
426 __ movzx_b(eax, FieldOperand(eax, Map::kInstanceTypeOffset)); | 426 __ movzx_b(eax, FieldOperand(eax, Map::kInstanceTypeOffset)); |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 // Dictionary load failed, go slow (but don't miss). | 722 // Dictionary load failed, go slow (but don't miss). |
723 __ bind(&slow); | 723 __ bind(&slow); |
724 GenerateRuntimeGetProperty(masm); | 724 GenerateRuntimeGetProperty(masm); |
725 } | 725 } |
726 | 726 |
727 | 727 |
728 static void LoadIC_PushArgs(MacroAssembler* masm) { | 728 static void LoadIC_PushArgs(MacroAssembler* masm) { |
729 Register receiver = LoadDescriptor::ReceiverRegister(); | 729 Register receiver = LoadDescriptor::ReceiverRegister(); |
730 Register name = LoadDescriptor::NameRegister(); | 730 Register name = LoadDescriptor::NameRegister(); |
731 | 731 |
732 Register slot = VectorLoadICDescriptor::SlotRegister(); | 732 Register slot = LoadDescriptor::SlotRegister(); |
733 Register vector = VectorLoadICDescriptor::VectorRegister(); | 733 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
734 DCHECK(!edi.is(receiver) && !edi.is(name) && !edi.is(slot) && | 734 DCHECK(!edi.is(receiver) && !edi.is(name) && !edi.is(slot) && |
735 !edi.is(vector)); | 735 !edi.is(vector)); |
736 | 736 |
737 __ pop(edi); | 737 __ pop(edi); |
738 __ push(receiver); | 738 __ push(receiver); |
739 __ push(name); | 739 __ push(name); |
740 __ push(slot); | 740 __ push(slot); |
741 __ push(vector); | 741 __ push(vector); |
742 __ push(edi); | 742 __ push(edi); |
743 } | 743 } |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 Condition cc = | 946 Condition cc = |
947 (check == ENABLE_INLINED_SMI_CHECK) | 947 (check == ENABLE_INLINED_SMI_CHECK) |
948 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 948 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
949 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 949 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
950 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 950 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
951 } | 951 } |
952 } | 952 } |
953 } // namespace v8::internal | 953 } // namespace v8::internal |
954 | 954 |
955 #endif // V8_TARGET_ARCH_X87 | 955 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |