OLD | NEW |
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 30 matching lines...) Expand all Loading... |
41 class SmallMapList; | 41 class SmallMapList; |
42 | 42 |
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 LoadIsPreMonomorphic(TypeFeedbackId id); | |
52 bool StoreIsUninitialized(TypeFeedbackId id); | 51 bool StoreIsUninitialized(TypeFeedbackId id); |
53 bool StoreIsPreMonomorphic(TypeFeedbackId id); | |
54 bool StoreIsKeyedPolymorphic(TypeFeedbackId id); | 52 bool StoreIsKeyedPolymorphic(TypeFeedbackId id); |
55 bool CallIsMonomorphic(TypeFeedbackId aid); | 53 bool CallIsMonomorphic(TypeFeedbackId aid); |
56 bool KeyedArrayCallIsHoley(TypeFeedbackId id); | |
57 bool CallNewIsMonomorphic(TypeFeedbackId id); | 54 bool CallNewIsMonomorphic(TypeFeedbackId id); |
58 | 55 |
59 // 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 |
60 // to various cycles in our headers. | 57 // to various cycles in our headers. |
61 // 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 |
62 // be possible. | 59 // be possible. |
63 byte ForInType(TypeFeedbackId id); | 60 byte ForInType(TypeFeedbackId id); |
64 | 61 |
65 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId id); | 62 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId id); |
66 | 63 |
67 void CallReceiverTypes(TypeFeedbackId id, | |
68 Handle<String> name, | |
69 int arity, | |
70 SmallMapList* types); | |
71 void PropertyReceiverTypes(TypeFeedbackId id, | 64 void PropertyReceiverTypes(TypeFeedbackId id, |
72 Handle<String> name, | 65 Handle<String> name, |
73 SmallMapList* receiver_types, | 66 SmallMapList* receiver_types, |
74 bool* is_prototype); | 67 bool* is_prototype); |
75 void KeyedPropertyReceiverTypes(TypeFeedbackId id, | 68 void KeyedPropertyReceiverTypes(TypeFeedbackId id, |
76 SmallMapList* receiver_types, | 69 SmallMapList* receiver_types, |
77 bool* is_string); | 70 bool* is_string); |
78 void AssignmentReceiverTypes(TypeFeedbackId id, | 71 void AssignmentReceiverTypes(TypeFeedbackId id, |
79 Handle<String> name, | 72 Handle<String> name, |
80 SmallMapList* receiver_types); | 73 SmallMapList* receiver_types); |
81 void KeyedAssignmentReceiverTypes(TypeFeedbackId id, | 74 void KeyedAssignmentReceiverTypes(TypeFeedbackId id, |
82 SmallMapList* receiver_types, | 75 SmallMapList* receiver_types, |
83 KeyedAccessStoreMode* store_mode); | 76 KeyedAccessStoreMode* store_mode); |
84 void CountReceiverTypes(TypeFeedbackId id, | 77 void CountReceiverTypes(TypeFeedbackId id, |
85 SmallMapList* receiver_types); | 78 SmallMapList* receiver_types); |
86 | 79 |
87 void CollectReceiverTypes(TypeFeedbackId id, | 80 void CollectReceiverTypes(TypeFeedbackId id, |
88 SmallMapList* types); | 81 SmallMapList* types); |
89 | 82 |
90 static bool CanRetainOtherContext(Map* map, Context* native_context); | 83 static bool CanRetainOtherContext(Map* map, Context* native_context); |
91 static bool CanRetainOtherContext(JSFunction* function, | 84 static bool CanRetainOtherContext(JSFunction* function, |
92 Context* native_context); | 85 Context* native_context); |
93 | 86 |
94 CheckType GetCallCheckType(TypeFeedbackId id); | |
95 Handle<JSFunction> GetCallTarget(TypeFeedbackId id); | 87 Handle<JSFunction> GetCallTarget(TypeFeedbackId id); |
96 Handle<JSFunction> GetCallNewTarget(TypeFeedbackId id); | 88 Handle<JSFunction> GetCallNewTarget(TypeFeedbackId id); |
97 Handle<AllocationSite> GetCallNewAllocationSite(TypeFeedbackId id); | 89 Handle<AllocationSite> GetCallNewAllocationSite(TypeFeedbackId id); |
98 | 90 |
99 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id); | 91 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id); |
100 bool LoadIsStub(TypeFeedbackId id, ICStub* stub); | 92 bool LoadIsStub(TypeFeedbackId id, ICStub* stub); |
101 | 93 |
102 // 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 |
103 // 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 |
104 // headers!! :-P | 96 // headers!! :-P |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 Handle<Context> native_context_; | 140 Handle<Context> native_context_; |
149 Zone* zone_; | 141 Zone* zone_; |
150 Handle<UnseededNumberDictionary> dictionary_; | 142 Handle<UnseededNumberDictionary> dictionary_; |
151 | 143 |
152 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); | 144 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); |
153 }; | 145 }; |
154 | 146 |
155 } } // namespace v8::internal | 147 } } // namespace v8::internal |
156 | 148 |
157 #endif // V8_TYPE_INFO_H_ | 149 #endif // V8_TYPE_INFO_H_ |
OLD | NEW |