| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 4354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4365 | 4365 |
| 4366 void LoadICTrampolineStub::Generate(MacroAssembler* masm) { | 4366 void LoadICTrampolineStub::Generate(MacroAssembler* masm) { |
| 4367 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); | 4367 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); |
| 4368 LoadICStub stub(isolate(), state()); | 4368 LoadICStub stub(isolate(), state()); |
| 4369 stub.GenerateForTrampoline(masm); | 4369 stub.GenerateForTrampoline(masm); |
| 4370 } | 4370 } |
| 4371 | 4371 |
| 4372 | 4372 |
| 4373 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { | 4373 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { |
| 4374 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); | 4374 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); |
| 4375 KeyedLoadICStub stub(isolate()); | 4375 KeyedLoadICStub stub(isolate(), state()); |
| 4376 stub.GenerateForTrampoline(masm); | 4376 stub.GenerateForTrampoline(masm); |
| 4377 } | 4377 } |
| 4378 | 4378 |
| 4379 | 4379 |
| 4380 static void HandleArrayCases(MacroAssembler* masm, Register receiver, | 4380 static void HandleArrayCases(MacroAssembler* masm, Register receiver, |
| 4381 Register key, Register vector, Register slot, | 4381 Register key, Register vector, Register slot, |
| 4382 Register feedback, Register receiver_map, | 4382 Register feedback, Register receiver_map, |
| 4383 Register scratch1, Register scratch2, | 4383 Register scratch1, Register scratch2, |
| 4384 Register scratch3, bool is_polymorphic, | 4384 Register scratch3, bool is_polymorphic, |
| 4385 Label* miss) { | 4385 Label* miss) { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4544 Label polymorphic, try_poly_name; | 4544 Label polymorphic, try_poly_name; |
| 4545 __ bind(&polymorphic); | 4545 __ bind(&polymorphic); |
| 4546 HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, | 4546 HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, |
| 4547 integer_slot, r11, r15, true, &miss); | 4547 integer_slot, r11, r15, true, &miss); |
| 4548 | 4548 |
| 4549 __ bind(¬_array); | 4549 __ bind(¬_array); |
| 4550 // Is it generic? | 4550 // Is it generic? |
| 4551 __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex); | 4551 __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex); |
| 4552 __ j(not_equal, &try_poly_name); | 4552 __ j(not_equal, &try_poly_name); |
| 4553 Handle<Code> megamorphic_stub = | 4553 Handle<Code> megamorphic_stub = |
| 4554 KeyedLoadIC::ChooseMegamorphicStub(masm->isolate()); | 4554 KeyedLoadIC::ChooseMegamorphicStub(masm->isolate(), GetExtraICState()); |
| 4555 __ jmp(megamorphic_stub, RelocInfo::CODE_TARGET); | 4555 __ jmp(megamorphic_stub, RelocInfo::CODE_TARGET); |
| 4556 | 4556 |
| 4557 __ bind(&try_poly_name); | 4557 __ bind(&try_poly_name); |
| 4558 // We might have a name in feedback, and a fixed array in the next slot. | 4558 // We might have a name in feedback, and a fixed array in the next slot. |
| 4559 __ cmpp(key, feedback); | 4559 __ cmpp(key, feedback); |
| 4560 __ j(not_equal, &miss); | 4560 __ j(not_equal, &miss); |
| 4561 // If the name comparison succeeded, we know we have a fixed array with | 4561 // If the name comparison succeeded, we know we have a fixed array with |
| 4562 // at least one map/handler pair. | 4562 // at least one map/handler pair. |
| 4563 __ movp(feedback, FieldOperand(vector, integer_slot, times_pointer_size, | 4563 __ movp(feedback, FieldOperand(vector, integer_slot, times_pointer_size, |
| 4564 FixedArray::kHeaderSize + kPointerSize)); | 4564 FixedArray::kHeaderSize + kPointerSize)); |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5423 kStackSpace, nullptr, return_value_operand, NULL); | 5423 kStackSpace, nullptr, return_value_operand, NULL); |
| 5424 } | 5424 } |
| 5425 | 5425 |
| 5426 | 5426 |
| 5427 #undef __ | 5427 #undef __ |
| 5428 | 5428 |
| 5429 } // namespace internal | 5429 } // namespace internal |
| 5430 } // namespace v8 | 5430 } // namespace v8 |
| 5431 | 5431 |
| 5432 #endif // V8_TARGET_ARCH_X64 | 5432 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |