| OLD | NEW |
| 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<FixedArray> feedback_vector, | 23 Handle<TypeFeedbackVector> feedback_vector, |
| 24 Handle<Context> native_context, | 24 Handle<Context> native_context, Zone* zone); |
| 25 Zone* zone); | |
| 26 | 25 |
| 27 bool LoadIsUninitialized(TypeFeedbackId id); | 26 bool LoadIsUninitialized(TypeFeedbackId id); |
| 28 bool StoreIsUninitialized(TypeFeedbackId id); | 27 bool StoreIsUninitialized(TypeFeedbackId id); |
| 29 bool StoreIsKeyedPolymorphic(TypeFeedbackId id); | 28 bool StoreIsKeyedPolymorphic(TypeFeedbackId id); |
| 30 bool CallIsMonomorphic(int slot); | 29 bool CallIsMonomorphic(int slot); |
| 31 bool CallIsMonomorphic(TypeFeedbackId aid); | 30 bool CallIsMonomorphic(TypeFeedbackId aid); |
| 32 bool KeyedArrayCallIsHoley(TypeFeedbackId id); | 31 bool KeyedArrayCallIsHoley(TypeFeedbackId id); |
| 33 bool CallNewIsMonomorphic(int slot); | 32 bool CallNewIsMonomorphic(int slot); |
| 34 | 33 |
| 35 // TODO(1571) We can't use ForInStatement::ForInType as the return value due | 34 // TODO(1571) We can't use ForInStatement::ForInType as the return value due |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 Handle<Object> GetInfo(TypeFeedbackId id); | 112 Handle<Object> GetInfo(TypeFeedbackId id); |
| 114 | 113 |
| 115 // Returns an element from the type feedback vector. Returns undefined | 114 // Returns an element from the type feedback vector. Returns undefined |
| 116 // if there is no information. | 115 // if there is no information. |
| 117 Handle<Object> GetInfo(int slot); | 116 Handle<Object> GetInfo(int slot); |
| 118 | 117 |
| 119 private: | 118 private: |
| 120 Handle<Context> native_context_; | 119 Handle<Context> native_context_; |
| 121 Zone* zone_; | 120 Zone* zone_; |
| 122 Handle<UnseededNumberDictionary> dictionary_; | 121 Handle<UnseededNumberDictionary> dictionary_; |
| 123 Handle<FixedArray> feedback_vector_; | 122 Handle<TypeFeedbackVector> feedback_vector_; |
| 124 | 123 |
| 125 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); | 124 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); |
| 126 }; | 125 }; |
| 127 | 126 |
| 128 } } // namespace v8::internal | 127 } } // namespace v8::internal |
| 129 | 128 |
| 130 #endif // V8_TYPE_INFO_H_ | 129 #endif // V8_TYPE_INFO_H_ |
| OLD | NEW |