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/ic/ic.h" | 5 #include "src/ic/ic.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/api-arguments-inl.h" | 10 #include "src/api-arguments-inl.h" |
(...skipping 2640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2651 Handle<Object> key = args.at(1); | 2651 Handle<Object> key = args.at(1); |
2652 Handle<Smi> slot = args.at<Smi>(2); | 2652 Handle<Smi> slot = args.at<Smi>(2); |
2653 Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(3); | 2653 Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(3); |
2654 FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value()); | 2654 FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value()); |
2655 KeyedLoadICNexus nexus(vector, vector_slot); | 2655 KeyedLoadICNexus nexus(vector, vector_slot); |
2656 KeyedLoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); | 2656 KeyedLoadIC ic(IC::NO_EXTRA_FRAME, isolate, &nexus); |
2657 ic.UpdateState(receiver, key); | 2657 ic.UpdateState(receiver, key); |
2658 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); | 2658 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); |
2659 } | 2659 } |
2660 | 2660 |
2661 | |
2662 RUNTIME_FUNCTION(Runtime_KeyedLoadIC_MissFromStubFailure) { | |
2663 HandleScope scope(isolate); | |
2664 typedef LoadWithVectorDescriptor Descriptor; | |
2665 DCHECK_EQ(Descriptor::kParameterCount, args.length()); | |
2666 Handle<Object> receiver = args.at(Descriptor::kReceiver); | |
2667 Handle<Object> key = args.at(Descriptor::kName); | |
2668 Handle<Smi> slot = args.at<Smi>(Descriptor::kSlot); | |
2669 Handle<TypeFeedbackVector> vector = | |
2670 args.at<TypeFeedbackVector>(Descriptor::kVector); | |
2671 FeedbackVectorSlot vector_slot = vector->ToSlot(slot->value()); | |
2672 KeyedLoadICNexus nexus(vector, vector_slot); | |
2673 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | |
2674 ic.UpdateState(receiver, key); | |
2675 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); | |
2676 } | |
2677 | |
2678 | |
2679 // Used from ic-<arch>.cc. | 2661 // Used from ic-<arch>.cc. |
2680 RUNTIME_FUNCTION(Runtime_StoreIC_Miss) { | 2662 RUNTIME_FUNCTION(Runtime_StoreIC_Miss) { |
2681 HandleScope scope(isolate); | 2663 HandleScope scope(isolate); |
2682 DCHECK_EQ(5, args.length()); | 2664 DCHECK_EQ(5, args.length()); |
2683 // Runtime functions don't follow the IC's calling convention. | 2665 // Runtime functions don't follow the IC's calling convention. |
2684 Handle<Object> value = args.at(0); | 2666 Handle<Object> value = args.at(0); |
2685 Handle<Smi> slot = args.at<Smi>(1); | 2667 Handle<Smi> slot = args.at<Smi>(1); |
2686 Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(2); | 2668 Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(2); |
2687 Handle<Object> receiver = args.at(3); | 2669 Handle<Object> receiver = args.at(3); |
2688 Handle<Name> key = args.at<Name>(4); | 2670 Handle<Name> key = args.at<Name>(4); |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3215 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); | 3197 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); |
3216 it.Next(); | 3198 it.Next(); |
3217 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 3199 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
3218 Object::GetProperty(&it)); | 3200 Object::GetProperty(&it)); |
3219 } | 3201 } |
3220 | 3202 |
3221 return *result; | 3203 return *result; |
3222 } | 3204 } |
3223 } // namespace internal | 3205 } // namespace internal |
3224 } // namespace v8 | 3206 } // namespace v8 |
OLD | NEW |