| 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/contexts.h" | 9 #include "src/contexts.h" |
| 10 #include "src/globals.h" | 10 #include "src/globals.h" |
| 11 #include "src/parsing/token.h" | 11 #include "src/parsing/token.h" |
| 12 #include "src/types.h" | 12 #include "src/types.h" |
| 13 #include "src/zone.h" | 13 #include "src/zone.h" |
| 14 | 14 |
| 15 namespace v8 { | 15 namespace v8 { |
| 16 namespace internal { | 16 namespace internal { |
| 17 | 17 |
| 18 // Forward declarations. | 18 // Forward declarations. |
| 19 class SmallMapList; | 19 class SmallMapList; |
| 20 class FeedbackNexus; | 20 class FeedbackNexus; |
| 21 class StubCache; |
| 21 | 22 |
| 22 class TypeFeedbackOracle: public ZoneObject { | 23 class TypeFeedbackOracle: public ZoneObject { |
| 23 public: | 24 public: |
| 24 TypeFeedbackOracle(Isolate* isolate, Zone* zone, Handle<Code> code, | 25 TypeFeedbackOracle(Isolate* isolate, Zone* zone, Handle<Code> code, |
| 25 Handle<TypeFeedbackVector> feedback_vector, | 26 Handle<TypeFeedbackVector> feedback_vector, |
| 26 Handle<Context> native_context); | 27 Handle<Context> native_context); |
| 27 | 28 |
| 28 InlineCacheState LoadInlineCacheState(FeedbackVectorSlot slot); | 29 InlineCacheState LoadInlineCacheState(FeedbackVectorSlot slot); |
| 29 bool StoreIsUninitialized(FeedbackVectorSlot slot); | 30 bool StoreIsUninitialized(FeedbackVectorSlot slot); |
| 30 bool CallIsUninitialized(FeedbackVectorSlot slot); | 31 bool CallIsUninitialized(FeedbackVectorSlot slot); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 Type** left, | 89 Type** left, |
| 89 Type** right, | 90 Type** right, |
| 90 Type** combined); | 91 Type** combined); |
| 91 | 92 |
| 92 Type* CountType(TypeFeedbackId id); | 93 Type* CountType(TypeFeedbackId id); |
| 93 | 94 |
| 94 Zone* zone() const { return zone_; } | 95 Zone* zone() const { return zone_; } |
| 95 Isolate* isolate() const { return isolate_; } | 96 Isolate* isolate() const { return isolate_; } |
| 96 | 97 |
| 97 private: | 98 private: |
| 98 void CollectReceiverTypes(FeedbackVectorSlot slot, Handle<Name> name, | 99 void CollectReceiverTypes(StubCache* stub_cache, FeedbackVectorSlot slot, |
| 99 Code::Flags flags, SmallMapList* types); | 100 Handle<Name> name, Code::Flags flags, |
| 100 void CollectReceiverTypes(FeedbackNexus* nexus, Handle<Name> name, | 101 SmallMapList* types); |
| 101 Code::Flags flags, SmallMapList* types); | 102 void CollectReceiverTypes(StubCache* stub_cache, FeedbackNexus* nexus, |
| 103 Handle<Name> name, Code::Flags flags, |
| 104 SmallMapList* types); |
| 102 | 105 |
| 103 // Returns true if there is at least one string map and if | 106 // Returns true if there is at least one string map and if |
| 104 // all maps are string maps. | 107 // all maps are string maps. |
| 105 bool HasOnlyStringMaps(SmallMapList* receiver_types); | 108 bool HasOnlyStringMaps(SmallMapList* receiver_types); |
| 106 | 109 |
| 107 void SetInfo(TypeFeedbackId id, Object* target); | 110 void SetInfo(TypeFeedbackId id, Object* target); |
| 108 | 111 |
| 109 void BuildDictionary(Handle<Code> code); | 112 void BuildDictionary(Handle<Code> code); |
| 110 void GetRelocInfos(Handle<Code> code, ZoneList<RelocInfo>* infos); | 113 void GetRelocInfos(Handle<Code> code, ZoneList<RelocInfo>* infos); |
| 111 void CreateDictionary(Handle<Code> code, ZoneList<RelocInfo>* infos); | 114 void CreateDictionary(Handle<Code> code, ZoneList<RelocInfo>* infos); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 129 Handle<UnseededNumberDictionary> dictionary_; | 132 Handle<UnseededNumberDictionary> dictionary_; |
| 130 Handle<TypeFeedbackVector> feedback_vector_; | 133 Handle<TypeFeedbackVector> feedback_vector_; |
| 131 | 134 |
| 132 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); | 135 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); |
| 133 }; | 136 }; |
| 134 | 137 |
| 135 } // namespace internal | 138 } // namespace internal |
| 136 } // namespace v8 | 139 } // namespace v8 |
| 137 | 140 |
| 138 #endif // V8_TYPE_INFO_H_ | 141 #endif // V8_TYPE_INFO_H_ |
| OLD | NEW |