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

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

Issue 181453002: Reset trunk to 3.24.35.4 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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/symbol.js ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 class TypeFeedbackOracle: public ZoneObject { 44 class TypeFeedbackOracle: public ZoneObject {
45 public: 45 public:
46 TypeFeedbackOracle(Handle<Code> code, 46 TypeFeedbackOracle(Handle<Code> code,
47 Handle<Context> native_context, 47 Handle<Context> native_context,
48 Zone* zone); 48 Zone* zone);
49 49
50 bool LoadIsUninitialized(TypeFeedbackId id); 50 bool LoadIsUninitialized(TypeFeedbackId id);
51 bool StoreIsUninitialized(TypeFeedbackId id); 51 bool StoreIsUninitialized(TypeFeedbackId id);
52 bool StoreIsKeyedPolymorphic(TypeFeedbackId id); 52 bool StoreIsKeyedPolymorphic(TypeFeedbackId id);
53 bool CallIsMonomorphic(int slot);
54 bool CallIsMonomorphic(TypeFeedbackId aid); 53 bool CallIsMonomorphic(TypeFeedbackId aid);
55 bool KeyedArrayCallIsHoley(TypeFeedbackId id); 54 bool CallNewIsMonomorphic(TypeFeedbackId id);
56 bool CallNewIsMonomorphic(int slot);
57 55
58 // TODO(1571) We can't use ForInStatement::ForInType as the return value due 56 // TODO(1571) We can't use ForInStatement::ForInType as the return value due
59 // to various cycles in our headers. 57 // to various cycles in our headers.
60 // TODO(rossberg): once all oracle access is removed from ast.cc, it should 58 // TODO(rossberg): once all oracle access is removed from ast.cc, it should
61 // be possible. 59 // be possible.
62 byte ForInType(int feedback_vector_slot); 60 byte ForInType(TypeFeedbackId id);
63 61
64 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId id); 62 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId id);
65 63
66 void PropertyReceiverTypes(TypeFeedbackId id, 64 void PropertyReceiverTypes(TypeFeedbackId id,
67 Handle<String> name, 65 Handle<String> name,
68 SmallMapList* receiver_types, 66 SmallMapList* receiver_types,
69 bool* is_prototype); 67 bool* is_prototype);
70 void KeyedPropertyReceiverTypes(TypeFeedbackId id, 68 void KeyedPropertyReceiverTypes(TypeFeedbackId id,
71 SmallMapList* receiver_types, 69 SmallMapList* receiver_types,
72 bool* is_string); 70 bool* is_string);
73 void AssignmentReceiverTypes(TypeFeedbackId id, 71 void AssignmentReceiverTypes(TypeFeedbackId id,
74 Handle<String> name, 72 Handle<String> name,
75 SmallMapList* receiver_types); 73 SmallMapList* receiver_types);
76 void KeyedAssignmentReceiverTypes(TypeFeedbackId id, 74 void KeyedAssignmentReceiverTypes(TypeFeedbackId id,
77 SmallMapList* receiver_types, 75 SmallMapList* receiver_types,
78 KeyedAccessStoreMode* store_mode); 76 KeyedAccessStoreMode* store_mode);
79 void CountReceiverTypes(TypeFeedbackId id, 77 void CountReceiverTypes(TypeFeedbackId id,
80 SmallMapList* receiver_types); 78 SmallMapList* receiver_types);
81 79
82 void CollectReceiverTypes(TypeFeedbackId id, 80 void CollectReceiverTypes(TypeFeedbackId id,
83 SmallMapList* types); 81 SmallMapList* types);
84 82
85 static bool CanRetainOtherContext(Map* map, Context* native_context); 83 static bool CanRetainOtherContext(Map* map, Context* native_context);
86 static bool CanRetainOtherContext(JSFunction* function, 84 static bool CanRetainOtherContext(JSFunction* function,
87 Context* native_context); 85 Context* native_context);
88 86
89 Handle<JSFunction> GetCallTarget(int slot); 87 Handle<JSFunction> GetCallTarget(TypeFeedbackId id);
90 Handle<JSFunction> GetCallNewTarget(int slot); 88 Handle<JSFunction> GetCallNewTarget(TypeFeedbackId id);
91 Handle<AllocationSite> GetCallNewAllocationSite(int slot); 89 Handle<AllocationSite> GetCallNewAllocationSite(TypeFeedbackId id);
92 90
93 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id); 91 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id);
94 bool LoadIsStub(TypeFeedbackId id, ICStub* stub); 92 bool LoadIsStub(TypeFeedbackId id, ICStub* stub);
95 93
96 // TODO(1571) We can't use ToBooleanStub::Types as the return value because 94 // TODO(1571) We can't use ToBooleanStub::Types as the return value because
97 // of various cycles in our headers. Death to tons of implementations in 95 // of various cycles in our headers. Death to tons of implementations in
98 // headers!! :-P 96 // headers!! :-P
99 byte ToBooleanTypes(TypeFeedbackId id); 97 byte ToBooleanTypes(TypeFeedbackId id);
100 98
101 // Get type information for arithmetic operations and compares. 99 // Get type information for arithmetic operations and compares.
(...skipping 23 matching lines...) Expand all
125 123
126 void SetInfo(TypeFeedbackId id, Object* target); 124 void SetInfo(TypeFeedbackId id, Object* target);
127 125
128 void BuildDictionary(Handle<Code> code); 126 void BuildDictionary(Handle<Code> code);
129 void GetRelocInfos(Handle<Code> code, ZoneList<RelocInfo>* infos); 127 void GetRelocInfos(Handle<Code> code, ZoneList<RelocInfo>* infos);
130 void CreateDictionary(Handle<Code> code, ZoneList<RelocInfo>* infos); 128 void CreateDictionary(Handle<Code> code, ZoneList<RelocInfo>* infos);
131 void RelocateRelocInfos(ZoneList<RelocInfo>* infos, 129 void RelocateRelocInfos(ZoneList<RelocInfo>* infos,
132 byte* old_start, 130 byte* old_start,
133 byte* new_start); 131 byte* new_start);
134 void ProcessRelocInfos(ZoneList<RelocInfo>* infos); 132 void ProcessRelocInfos(ZoneList<RelocInfo>* infos);
133 void ProcessTypeFeedbackCells(Handle<Code> code);
135 134
136 // Returns an element from the backing store. Returns undefined if 135 // Returns an element from the backing store. Returns undefined if
137 // there is no information. 136 // there is no information.
138 Handle<Object> GetInfo(TypeFeedbackId id); 137 Handle<Object> GetInfo(TypeFeedbackId id);
139 138
140 // Returns an element from the type feedback vector. Returns undefined
141 // if there is no information.
142 Handle<Object> GetInfo(int slot);
143
144 private: 139 private:
145 Handle<Context> native_context_; 140 Handle<Context> native_context_;
146 Zone* zone_; 141 Zone* zone_;
147 Handle<UnseededNumberDictionary> dictionary_; 142 Handle<UnseededNumberDictionary> dictionary_;
148 Handle<FixedArray> feedback_vector_;
149 143
150 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); 144 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle);
151 }; 145 };
152 146
153 } } // namespace v8::internal 147 } } // namespace v8::internal
154 148
155 #endif // V8_TYPE_INFO_H_ 149 #endif // V8_TYPE_INFO_H_
OLDNEW
« no previous file with comments | « src/symbol.js ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698