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

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: Removed problematic field TypeFeedbackInfo::feedback_vector(). 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);
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 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId id); 38 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId id);
(...skipping 12 matching lines...) Expand all
52 void CountReceiverTypes(TypeFeedbackId id, 51 void CountReceiverTypes(TypeFeedbackId id,
53 SmallMapList* receiver_types); 52 SmallMapList* receiver_types);
54 53
55 void CollectReceiverTypes(TypeFeedbackId id, 54 void CollectReceiverTypes(TypeFeedbackId id,
56 SmallMapList* types); 55 SmallMapList* types);
57 56
58 static bool CanRetainOtherContext(Map* map, Context* native_context); 57 static bool CanRetainOtherContext(Map* map, Context* native_context);
59 static bool CanRetainOtherContext(JSFunction* function, 58 static bool CanRetainOtherContext(JSFunction* function,
60 Context* native_context); 59 Context* native_context);
61 60
62 Handle<JSFunction> GetCallTarget(FeedbackVectorSlot slot); 61 Handle<JSFunction> GetCallTarget(FeedbackVectorICSlot slot);
63 Handle<AllocationSite> GetCallAllocationSite(FeedbackVectorSlot slot); 62 Handle<AllocationSite> GetCallAllocationSite(FeedbackVectorICSlot slot);
64 Handle<JSFunction> GetCallNewTarget(FeedbackVectorSlot slot); 63 Handle<JSFunction> GetCallNewTarget(FeedbackVectorSlot slot);
65 Handle<AllocationSite> GetCallNewAllocationSite(FeedbackVectorSlot slot); 64 Handle<AllocationSite> GetCallNewAllocationSite(FeedbackVectorSlot slot);
66 65
67 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id); 66 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id);
68 67
69 // TODO(1571) We can't use ToBooleanStub::Types as the return value because 68 // 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 69 // of various cycles in our headers. Death to tons of implementations in
71 // headers!! :-P 70 // headers!! :-P
72 byte ToBooleanTypes(TypeFeedbackId id); 71 byte ToBooleanTypes(TypeFeedbackId id);
73 72
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 Code* new_code); 105 Code* new_code);
107 void ProcessRelocInfos(ZoneList<RelocInfo>* infos); 106 void ProcessRelocInfos(ZoneList<RelocInfo>* infos);
108 107
109 // Returns an element from the backing store. Returns undefined if 108 // Returns an element from the backing store. Returns undefined if
110 // there is no information. 109 // there is no information.
111 Handle<Object> GetInfo(TypeFeedbackId id); 110 Handle<Object> GetInfo(TypeFeedbackId id);
112 111
113 // Returns an element from the type feedback vector. Returns undefined 112 // Returns an element from the type feedback vector. Returns undefined
114 // if there is no information. 113 // if there is no information.
115 Handle<Object> GetInfo(FeedbackVectorSlot slot); 114 Handle<Object> GetInfo(FeedbackVectorSlot slot);
115 Handle<Object> GetInfo(FeedbackVectorICSlot slot);
116 116
117 private: 117 private:
118 Handle<Context> native_context_; 118 Handle<Context> native_context_;
119 Zone* zone_; 119 Zone* zone_;
120 Handle<UnseededNumberDictionary> dictionary_; 120 Handle<UnseededNumberDictionary> dictionary_;
121 Handle<TypeFeedbackVector> feedback_vector_; 121 Handle<TypeFeedbackVector> feedback_vector_;
122 122
123 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); 123 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle);
124 }; 124 };
125 125
126 } } // namespace v8::internal 126 } } // namespace v8::internal
127 127
128 #endif // V8_TYPE_INFO_H_ 128 #endif // V8_TYPE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698