Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: src/type-info.h

Issue 650073002: vector-based ICs did not update type feedback counts correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "src/zone-inl.h" 11 #include "src/zone-inl.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 // Forward declarations. 16 // Forward declarations.
17 class SmallMapList; 17 class SmallMapList;
18 18
19 19
20 class TypeFeedbackOracle: public ZoneObject { 20 class TypeFeedbackOracle: public ZoneObject {
21 public: 21 public:
22 TypeFeedbackOracle(Handle<Code> code, 22 TypeFeedbackOracle(Handle<Code> code,
23 Handle<TypeFeedbackVector> feedback_vector, 23 Handle<TypeFeedbackVector> feedback_vector,
24 Handle<Context> native_context, Zone* zone); 24 Handle<Context> native_context, Zone* zone);
25 25
26 bool LoadIsUninitialized(TypeFeedbackId id); 26 bool LoadIsUninitialized(TypeFeedbackId id);
27 bool StoreIsUninitialized(TypeFeedbackId id); 27 bool StoreIsUninitialized(TypeFeedbackId id);
28 bool CallIsMonomorphic(FeedbackVectorSlot slot); 28 bool CallIsMonomorphic(FeedbackVectorICSlot slot);
29 bool CallIsMonomorphic(TypeFeedbackId aid); 29 bool CallIsMonomorphic(TypeFeedbackId aid);
Jakob Kummerow 2014/10/14 15:27:20 While you're here: this method doesn't seem to exi
mvstanton 2014/10/16 10:54:15 Done.
30 bool KeyedArrayCallIsHoley(TypeFeedbackId id); 30 bool KeyedArrayCallIsHoley(TypeFeedbackId id);
31 bool CallNewIsMonomorphic(FeedbackVectorSlot slot); 31 bool CallNewIsMonomorphic(FeedbackVectorSlot slot);
32 32
33 // TODO(1571) We can't use ForInStatement::ForInType as the return value due 33 // TODO(1571) We can't use ForInStatement::ForInType as the return value due
34 // to various cycles in our headers. 34 // to various cycles in our headers.
35 // TODO(rossberg): once all oracle access is removed from ast.cc, it should 35 // TODO(rossberg): once all oracle access is removed from ast.cc, it should
36 // be possible. 36 // be possible.
37 byte ForInType(FeedbackVectorSlot feedback_vector_slot); 37 byte ForInType(FeedbackVectorSlot feedback_vector_slot);
38 38
39 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId id); 39 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId id);
(...skipping 12 matching lines...) Expand all
52 void CountReceiverTypes(TypeFeedbackId id, 52 void CountReceiverTypes(TypeFeedbackId id,
53 SmallMapList* receiver_types); 53 SmallMapList* receiver_types);
54 54
55 void CollectReceiverTypes(TypeFeedbackId id, 55 void CollectReceiverTypes(TypeFeedbackId id,
56 SmallMapList* types); 56 SmallMapList* types);
57 57
58 static bool CanRetainOtherContext(Map* map, Context* native_context); 58 static bool CanRetainOtherContext(Map* map, Context* native_context);
59 static bool CanRetainOtherContext(JSFunction* function, 59 static bool CanRetainOtherContext(JSFunction* function,
60 Context* native_context); 60 Context* native_context);
61 61
62 Handle<JSFunction> GetCallTarget(FeedbackVectorSlot slot); 62 Handle<JSFunction> GetCallTarget(FeedbackVectorICSlot slot);
63 Handle<AllocationSite> GetCallAllocationSite(FeedbackVectorSlot slot); 63 Handle<AllocationSite> GetCallAllocationSite(FeedbackVectorICSlot slot);
64 Handle<JSFunction> GetCallNewTarget(FeedbackVectorSlot slot); 64 Handle<JSFunction> GetCallNewTarget(FeedbackVectorSlot slot);
65 Handle<AllocationSite> GetCallNewAllocationSite(FeedbackVectorSlot slot); 65 Handle<AllocationSite> GetCallNewAllocationSite(FeedbackVectorSlot slot);
66 66
67 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id); 67 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id);
68 68
69 // TODO(1571) We can't use ToBooleanStub::Types as the return value because 69 // TODO(1571) We can't use ToBooleanStub::Types as the return value because
70 // of various cycles in our headers. Death to tons of implementations in 70 // of various cycles in our headers. Death to tons of implementations in
71 // headers!! :-P 71 // headers!! :-P
72 byte ToBooleanTypes(TypeFeedbackId id); 72 byte ToBooleanTypes(TypeFeedbackId id);
73 73
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 Code* new_code); 106 Code* new_code);
107 void ProcessRelocInfos(ZoneList<RelocInfo>* infos); 107 void ProcessRelocInfos(ZoneList<RelocInfo>* infos);
108 108
109 // Returns an element from the backing store. Returns undefined if 109 // Returns an element from the backing store. Returns undefined if
110 // there is no information. 110 // there is no information.
111 Handle<Object> GetInfo(TypeFeedbackId id); 111 Handle<Object> GetInfo(TypeFeedbackId id);
112 112
113 // Returns an element from the type feedback vector. Returns undefined 113 // Returns an element from the type feedback vector. Returns undefined
114 // if there is no information. 114 // if there is no information.
115 Handle<Object> GetInfo(FeedbackVectorSlot slot); 115 Handle<Object> GetInfo(FeedbackVectorSlot slot);
116 Handle<Object> GetInfo(FeedbackVectorICSlot slot);
116 117
117 private: 118 private:
118 Handle<Context> native_context_; 119 Handle<Context> native_context_;
119 Zone* zone_; 120 Zone* zone_;
120 Handle<UnseededNumberDictionary> dictionary_; 121 Handle<UnseededNumberDictionary> dictionary_;
121 Handle<TypeFeedbackVector> feedback_vector_; 122 Handle<TypeFeedbackVector> feedback_vector_;
122 123
123 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); 124 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle);
124 }; 125 };
125 126
126 } } // namespace v8::internal 127 } } // namespace v8::internal
127 128
128 #endif // V8_TYPE_INFO_H_ 129 #endif // V8_TYPE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698