| 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 4412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4423 | 4423 |
| 4424 void LoadICTrampolineStub::Generate(MacroAssembler* masm) { | 4424 void LoadICTrampolineStub::Generate(MacroAssembler* masm) { |
| 4425 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); | 4425 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); |
| 4426 LoadICStub stub(isolate(), state()); | 4426 LoadICStub stub(isolate(), state()); |
| 4427 stub.GenerateForTrampoline(masm); | 4427 stub.GenerateForTrampoline(masm); |
| 4428 } | 4428 } |
| 4429 | 4429 |
| 4430 | 4430 |
| 4431 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { | 4431 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { |
| 4432 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); | 4432 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); |
| 4433 KeyedLoadICStub stub(isolate(), state()); | 4433 KeyedLoadICStub stub(isolate()); |
| 4434 stub.GenerateForTrampoline(masm); | 4434 stub.GenerateForTrampoline(masm); |
| 4435 } | 4435 } |
| 4436 | 4436 |
| 4437 | 4437 |
| 4438 static void HandleArrayCases(MacroAssembler* masm, Register receiver, | 4438 static void HandleArrayCases(MacroAssembler* masm, Register receiver, |
| 4439 Register key, Register vector, Register slot, | 4439 Register key, Register vector, Register slot, |
| 4440 Register feedback, bool is_polymorphic, | 4440 Register feedback, bool is_polymorphic, |
| 4441 Label* miss) { | 4441 Label* miss) { |
| 4442 // feedback initially contains the feedback array | 4442 // feedback initially contains the feedback array |
| 4443 Label next, next_loop, prepare_next; | 4443 Label next, next_loop, prepare_next; |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4627 // We have a polymorphic element handler. | 4627 // We have a polymorphic element handler. |
| 4628 Label polymorphic, try_poly_name; | 4628 Label polymorphic, try_poly_name; |
| 4629 __ bind(&polymorphic); | 4629 __ bind(&polymorphic); |
| 4630 HandleArrayCases(masm, receiver, key, vector, slot, feedback, true, &miss); | 4630 HandleArrayCases(masm, receiver, key, vector, slot, feedback, true, &miss); |
| 4631 | 4631 |
| 4632 __ bind(¬_array); | 4632 __ bind(¬_array); |
| 4633 // Is it generic? | 4633 // Is it generic? |
| 4634 __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex); | 4634 __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex); |
| 4635 __ j(not_equal, &try_poly_name); | 4635 __ j(not_equal, &try_poly_name); |
| 4636 Handle<Code> megamorphic_stub = | 4636 Handle<Code> megamorphic_stub = |
| 4637 KeyedLoadIC::ChooseMegamorphicStub(masm->isolate(), GetExtraICState()); | 4637 KeyedLoadIC::ChooseMegamorphicStub(masm->isolate()); |
| 4638 __ jmp(megamorphic_stub, RelocInfo::CODE_TARGET); | 4638 __ jmp(megamorphic_stub, RelocInfo::CODE_TARGET); |
| 4639 | 4639 |
| 4640 __ bind(&try_poly_name); | 4640 __ bind(&try_poly_name); |
| 4641 // We might have a name in feedback, and a fixed array in the next slot. | 4641 // We might have a name in feedback, and a fixed array in the next slot. |
| 4642 __ cmp(key, feedback); | 4642 __ cmp(key, feedback); |
| 4643 __ j(not_equal, &miss); | 4643 __ j(not_equal, &miss); |
| 4644 // If the name comparison succeeded, we know we have a fixed array with | 4644 // If the name comparison succeeded, we know we have a fixed array with |
| 4645 // at least one map/handler pair. | 4645 // at least one map/handler pair. |
| 4646 __ mov(feedback, FieldOperand(vector, slot, times_half_pointer_size, | 4646 __ mov(feedback, FieldOperand(vector, slot, times_half_pointer_size, |
| 4647 FixedArray::kHeaderSize + kPointerSize)); | 4647 FixedArray::kHeaderSize + kPointerSize)); |
| (...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5478 Operand(ebp, 7 * kPointerSize), NULL); | 5478 Operand(ebp, 7 * kPointerSize), NULL); |
| 5479 } | 5479 } |
| 5480 | 5480 |
| 5481 | 5481 |
| 5482 #undef __ | 5482 #undef __ |
| 5483 | 5483 |
| 5484 } // namespace internal | 5484 } // namespace internal |
| 5485 } // namespace v8 | 5485 } // namespace v8 |
| 5486 | 5486 |
| 5487 #endif // V8_TARGET_ARCH_IA32 | 5487 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |