| 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 #ifndef V8_TYPE_INFO_H_ | 5 #ifndef V8_TYPE_INFO_H_ |
| 6 #define V8_TYPE_INFO_H_ | 6 #define V8_TYPE_INFO_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/globals.h" | 9 #include "src/globals.h" |
| 10 #include "src/types.h" | 10 #include "src/types.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 KeyedAccessStoreMode* store_mode, | 60 KeyedAccessStoreMode* store_mode, |
| 61 IcCheckType* key_type); | 61 IcCheckType* key_type); |
| 62 void CountReceiverTypes(TypeFeedbackId id, | 62 void CountReceiverTypes(TypeFeedbackId id, |
| 63 SmallMapList* receiver_types); | 63 SmallMapList* receiver_types); |
| 64 | 64 |
| 65 void CollectReceiverTypes(TypeFeedbackId id, | 65 void CollectReceiverTypes(TypeFeedbackId id, |
| 66 SmallMapList* types); | 66 SmallMapList* types); |
| 67 template <class T> | 67 template <class T> |
| 68 void CollectReceiverTypes(T* obj, SmallMapList* types); | 68 void CollectReceiverTypes(T* obj, SmallMapList* types); |
| 69 | 69 |
| 70 static bool CanRetainOtherContext(Map* map, Context* native_context); | 70 static bool IsRelevantFeedback(Map* map, Context* native_context) { |
| 71 static bool CanRetainOtherContext(JSFunction* function, | 71 Object* constructor = map->GetConstructor(); |
| 72 Context* native_context); | 72 return !constructor->IsJSFunction() || |
| 73 JSFunction::cast(constructor)->context()->native_context() == |
| 74 native_context; |
| 75 } |
| 73 | 76 |
| 74 Handle<JSFunction> GetCallTarget(FeedbackVectorICSlot slot); | 77 Handle<JSFunction> GetCallTarget(FeedbackVectorICSlot slot); |
| 75 Handle<AllocationSite> GetCallAllocationSite(FeedbackVectorICSlot slot); | 78 Handle<AllocationSite> GetCallAllocationSite(FeedbackVectorICSlot slot); |
| 76 Handle<JSFunction> GetCallNewTarget(FeedbackVectorSlot slot); | 79 Handle<JSFunction> GetCallNewTarget(FeedbackVectorSlot slot); |
| 77 Handle<AllocationSite> GetCallNewAllocationSite(FeedbackVectorSlot slot); | 80 Handle<AllocationSite> GetCallNewAllocationSite(FeedbackVectorSlot slot); |
| 78 | 81 |
| 79 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id); | 82 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id); |
| 80 | 83 |
| 81 // TODO(1571) We can't use ToBooleanStub::Types as the return value because | 84 // TODO(1571) We can't use ToBooleanStub::Types as the return value because |
| 82 // of various cycles in our headers. Death to tons of implementations in | 85 // of various cycles in our headers. Death to tons of implementations in |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 Zone* zone_; | 141 Zone* zone_; |
| 139 Handle<UnseededNumberDictionary> dictionary_; | 142 Handle<UnseededNumberDictionary> dictionary_; |
| 140 Handle<TypeFeedbackVector> feedback_vector_; | 143 Handle<TypeFeedbackVector> feedback_vector_; |
| 141 | 144 |
| 142 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); | 145 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); |
| 143 }; | 146 }; |
| 144 | 147 |
| 145 } } // namespace v8::internal | 148 } } // namespace v8::internal |
| 146 | 149 |
| 147 #endif // V8_TYPE_INFO_H_ | 150 #endif // V8_TYPE_INFO_H_ |
| OLD | NEW |