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

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: REBASE. 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
« no previous file with comments | « src/type-feedback-vector-inl.h ('k') | src/type-info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
30 bool KeyedArrayCallIsHoley(TypeFeedbackId id); 29 bool KeyedArrayCallIsHoley(TypeFeedbackId id);
31 bool CallNewIsMonomorphic(FeedbackVectorSlot slot); 30 bool CallNewIsMonomorphic(FeedbackVectorSlot slot);
32 31
33 // TODO(1571) We can't use ForInStatement::ForInType as the return value due 32 // TODO(1571) We can't use ForInStatement::ForInType as the return value due
34 // to various cycles in our headers. 33 // to various cycles in our headers.
35 // TODO(rossberg): once all oracle access is removed from ast.cc, it should 34 // TODO(rossberg): once all oracle access is removed from ast.cc, it should
36 // be possible. 35 // be possible.
37 byte ForInType(FeedbackVectorSlot feedback_vector_slot); 36 byte ForInType(FeedbackVectorSlot feedback_vector_slot);
38 37
39 void GetStoreModeAndKeyType(TypeFeedbackId id, 38 void GetStoreModeAndKeyType(TypeFeedbackId id,
(...skipping 15 matching lines...) Expand all
55 void CountReceiverTypes(TypeFeedbackId id, 54 void CountReceiverTypes(TypeFeedbackId id,
56 SmallMapList* receiver_types); 55 SmallMapList* receiver_types);
57 56
58 void CollectReceiverTypes(TypeFeedbackId id, 57 void CollectReceiverTypes(TypeFeedbackId id,
59 SmallMapList* types); 58 SmallMapList* types);
60 59
61 static bool CanRetainOtherContext(Map* map, Context* native_context); 60 static bool CanRetainOtherContext(Map* map, Context* native_context);
62 static bool CanRetainOtherContext(JSFunction* function, 61 static bool CanRetainOtherContext(JSFunction* function,
63 Context* native_context); 62 Context* native_context);
64 63
65 Handle<JSFunction> GetCallTarget(FeedbackVectorSlot slot); 64 Handle<JSFunction> GetCallTarget(FeedbackVectorICSlot slot);
66 Handle<AllocationSite> GetCallAllocationSite(FeedbackVectorSlot slot); 65 Handle<AllocationSite> GetCallAllocationSite(FeedbackVectorICSlot slot);
67 Handle<JSFunction> GetCallNewTarget(FeedbackVectorSlot slot); 66 Handle<JSFunction> GetCallNewTarget(FeedbackVectorSlot slot);
68 Handle<AllocationSite> GetCallNewAllocationSite(FeedbackVectorSlot slot); 67 Handle<AllocationSite> GetCallNewAllocationSite(FeedbackVectorSlot slot);
69 68
70 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id); 69 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id);
71 70
72 // TODO(1571) We can't use ToBooleanStub::Types as the return value because 71 // TODO(1571) We can't use ToBooleanStub::Types as the return value because
73 // of various cycles in our headers. Death to tons of implementations in 72 // of various cycles in our headers. Death to tons of implementations in
74 // headers!! :-P 73 // headers!! :-P
75 byte ToBooleanTypes(TypeFeedbackId id); 74 byte ToBooleanTypes(TypeFeedbackId id);
76 75
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 Code* new_code); 108 Code* new_code);
110 void ProcessRelocInfos(ZoneList<RelocInfo>* infos); 109 void ProcessRelocInfos(ZoneList<RelocInfo>* infos);
111 110
112 // Returns an element from the backing store. Returns undefined if 111 // Returns an element from the backing store. Returns undefined if
113 // there is no information. 112 // there is no information.
114 Handle<Object> GetInfo(TypeFeedbackId id); 113 Handle<Object> GetInfo(TypeFeedbackId id);
115 114
116 // Returns an element from the type feedback vector. Returns undefined 115 // Returns an element from the type feedback vector. Returns undefined
117 // if there is no information. 116 // if there is no information.
118 Handle<Object> GetInfo(FeedbackVectorSlot slot); 117 Handle<Object> GetInfo(FeedbackVectorSlot slot);
118 Handle<Object> GetInfo(FeedbackVectorICSlot slot);
119 119
120 private: 120 private:
121 Handle<Context> native_context_; 121 Handle<Context> native_context_;
122 Zone* zone_; 122 Zone* zone_;
123 Handle<UnseededNumberDictionary> dictionary_; 123 Handle<UnseededNumberDictionary> dictionary_;
124 Handle<TypeFeedbackVector> feedback_vector_; 124 Handle<TypeFeedbackVector> feedback_vector_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); 126 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle);
127 }; 127 };
128 128
129 } } // namespace v8::internal 129 } } // namespace v8::internal
130 130
131 #endif // V8_TYPE_INFO_H_ 131 #endif // V8_TYPE_INFO_H_
OLDNEW
« no previous file with comments | « src/type-feedback-vector-inl.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698