| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 18 matching lines...) Expand all Loading... |
| 29 #define V8_TYPE_INFO_H_ | 29 #define V8_TYPE_INFO_H_ |
| 30 | 30 |
| 31 #include "allocation.h" | 31 #include "allocation.h" |
| 32 #include "globals.h" | 32 #include "globals.h" |
| 33 #include "zone.h" | 33 #include "zone.h" |
| 34 #include "zone-inl.h" | 34 #include "zone-inl.h" |
| 35 | 35 |
| 36 namespace v8 { | 36 namespace v8 { |
| 37 namespace internal { | 37 namespace internal { |
| 38 | 38 |
| 39 const int kMaxKeyedPolymorphism = 4; |
| 40 |
| 39 // Unknown | 41 // Unknown |
| 40 // | \____________ | 42 // | \____________ |
| 41 // | | | 43 // | | |
| 42 // Primitive Non-primitive | 44 // Primitive Non-primitive |
| 43 // | \_______ | | 45 // | \_______ | |
| 44 // | | | | 46 // | | | |
| 45 // Number String | | 47 // Number String | |
| 46 // / \ | | | 48 // / \ | | |
| 47 // Double Integer32 | / | 49 // Double Integer32 | / |
| 48 // | | / / | 50 // | | / / |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 class CountOperation; | 211 class CountOperation; |
| 210 class CompilationInfo; | 212 class CompilationInfo; |
| 211 class Property; | 213 class Property; |
| 212 class CaseClause; | 214 class CaseClause; |
| 213 | 215 |
| 214 class TypeFeedbackOracle BASE_EMBEDDED { | 216 class TypeFeedbackOracle BASE_EMBEDDED { |
| 215 public: | 217 public: |
| 216 TypeFeedbackOracle(Handle<Code> code, Handle<Context> global_context); | 218 TypeFeedbackOracle(Handle<Code> code, Handle<Context> global_context); |
| 217 | 219 |
| 218 bool LoadIsMonomorphicNormal(Property* expr); | 220 bool LoadIsMonomorphicNormal(Property* expr); |
| 221 bool LoadIsMegamorphicWithTypeInfo(Property* expr); |
| 219 bool StoreIsMonomorphicNormal(Expression* expr); | 222 bool StoreIsMonomorphicNormal(Expression* expr); |
| 223 bool StoreIsMegamorphicWithTypeInfo(Expression* expr); |
| 220 bool CallIsMonomorphic(Call* expr); | 224 bool CallIsMonomorphic(Call* expr); |
| 221 | 225 |
| 222 Handle<Map> LoadMonomorphicReceiverType(Property* expr); | 226 Handle<Map> LoadMonomorphicReceiverType(Property* expr); |
| 223 Handle<Map> StoreMonomorphicReceiverType(Expression* expr); | 227 Handle<Map> StoreMonomorphicReceiverType(Expression* expr); |
| 224 | 228 |
| 225 ZoneMapList* LoadReceiverTypes(Property* expr, Handle<String> name); | 229 ZoneMapList* LoadReceiverTypes(Property* expr, Handle<String> name); |
| 226 ZoneMapList* StoreReceiverTypes(Assignment* expr, Handle<String> name); | 230 ZoneMapList* StoreReceiverTypes(Assignment* expr, Handle<String> name); |
| 227 ZoneMapList* CallReceiverTypes(Call* expr, | 231 ZoneMapList* CallReceiverTypes(Call* expr, |
| 228 Handle<String> name, | 232 Handle<String> name, |
| 229 CallKind call_kind); | 233 CallKind call_kind); |
| 234 void CollectKeyedReceiverTypes(unsigned ast_id, |
| 235 ZoneMapList* types); |
| 230 | 236 |
| 231 CheckType GetCallCheckType(Call* expr); | 237 CheckType GetCallCheckType(Call* expr); |
| 232 Handle<JSObject> GetPrototypeForPrimitiveCheck(CheckType check); | 238 Handle<JSObject> GetPrototypeForPrimitiveCheck(CheckType check); |
| 233 | 239 |
| 234 bool LoadIsBuiltin(Property* expr, Builtins::Name id); | 240 bool LoadIsBuiltin(Property* expr, Builtins::Name id); |
| 235 | 241 |
| 236 // Get type information for arithmetic operations and compares. | 242 // Get type information for arithmetic operations and compares. |
| 237 TypeInfo UnaryType(UnaryOperation* expr); | 243 TypeInfo UnaryType(UnaryOperation* expr); |
| 238 TypeInfo BinaryType(BinaryOperation* expr); | 244 TypeInfo BinaryType(BinaryOperation* expr); |
| 239 TypeInfo CompareType(CompareOperation* expr); | 245 TypeInfo CompareType(CompareOperation* expr); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 260 | 266 |
| 261 Handle<Context> global_context_; | 267 Handle<Context> global_context_; |
| 262 Handle<NumberDictionary> dictionary_; | 268 Handle<NumberDictionary> dictionary_; |
| 263 | 269 |
| 264 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); | 270 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); |
| 265 }; | 271 }; |
| 266 | 272 |
| 267 } } // namespace v8::internal | 273 } } // namespace v8::internal |
| 268 | 274 |
| 269 #endif // V8_TYPE_INFO_H_ | 275 #endif // V8_TYPE_INFO_H_ |
| OLD | NEW |