| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 class SmallMapList; | 223 class SmallMapList; |
| 224 | 224 |
| 225 | 225 |
| 226 class TypeFeedbackOracle: public ZoneObject { | 226 class TypeFeedbackOracle: public ZoneObject { |
| 227 public: | 227 public: |
| 228 TypeFeedbackOracle(Handle<Code> code, | 228 TypeFeedbackOracle(Handle<Code> code, |
| 229 Handle<Context> native_context, | 229 Handle<Context> native_context, |
| 230 Isolate* isolate, | 230 Isolate* isolate, |
| 231 Zone* zone); | 231 Zone* zone); |
| 232 | 232 |
| 233 bool LoadIsMonomorphicNormal(TypeFeedbackId id); | |
| 234 bool LoadIsUninitialized(TypeFeedbackId id); | 233 bool LoadIsUninitialized(TypeFeedbackId id); |
| 235 bool LoadIsPreMonomorphic(TypeFeedbackId id); | 234 bool LoadIsPreMonomorphic(TypeFeedbackId id); |
| 236 bool LoadIsPolymorphic(TypeFeedbackId id); | |
| 237 bool StoreIsUninitialized(TypeFeedbackId id); | 235 bool StoreIsUninitialized(TypeFeedbackId id); |
| 238 bool StoreIsMonomorphicNormal(TypeFeedbackId id); | |
| 239 bool StoreIsPreMonomorphic(TypeFeedbackId id); | 236 bool StoreIsPreMonomorphic(TypeFeedbackId id); |
| 240 bool StoreIsKeyedPolymorphic(TypeFeedbackId id); | 237 bool StoreIsKeyedPolymorphic(TypeFeedbackId id); |
| 241 bool CallIsMonomorphic(TypeFeedbackId aid); | 238 bool CallIsMonomorphic(TypeFeedbackId aid); |
| 242 bool KeyedArrayCallIsHoley(TypeFeedbackId id); | 239 bool KeyedArrayCallIsHoley(TypeFeedbackId id); |
| 243 bool CallNewIsMonomorphic(TypeFeedbackId id); | 240 bool CallNewIsMonomorphic(TypeFeedbackId id); |
| 244 bool ObjectLiteralStoreIsMonomorphic(TypeFeedbackId id); | |
| 245 | 241 |
| 246 // TODO(1571) We can't use ForInStatement::ForInType as the return value due | 242 // TODO(1571) We can't use ForInStatement::ForInType as the return value due |
| 247 // to various cycles in our headers. | 243 // to various cycles in our headers. |
| 248 // TODO(rossberg): once all oracle access is removed from ast.cc, it should | 244 // TODO(rossberg): once all oracle access is removed from ast.cc, it should |
| 249 // be possible. | 245 // be possible. |
| 250 byte ForInType(TypeFeedbackId id); | 246 byte ForInType(TypeFeedbackId id); |
| 251 | 247 |
| 252 Handle<Map> LoadMonomorphicReceiverType(TypeFeedbackId id); | |
| 253 Handle<Map> StoreMonomorphicReceiverType(TypeFeedbackId id); | |
| 254 | |
| 255 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId id); | 248 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId id); |
| 256 | 249 |
| 257 void LoadReceiverTypes(TypeFeedbackId id, | |
| 258 Handle<String> name, | |
| 259 SmallMapList* types); | |
| 260 void StoreReceiverTypes(TypeFeedbackId id, | |
| 261 Handle<String> name, | |
| 262 SmallMapList* types); | |
| 263 void CallReceiverTypes(TypeFeedbackId id, | 250 void CallReceiverTypes(TypeFeedbackId id, |
| 264 Handle<String> name, | 251 Handle<String> name, |
| 265 int arity, | 252 int arity, |
| 266 CallKind call_kind, | 253 CallKind call_kind, |
| 267 SmallMapList* types); | 254 SmallMapList* types); |
| 268 void CollectKeyedReceiverTypes(TypeFeedbackId id, | |
| 269 SmallMapList* types); | |
| 270 void CollectPolymorphicStoreReceiverTypes(TypeFeedbackId id, | |
| 271 SmallMapList* types); | |
| 272 | |
| 273 void PropertyReceiverTypes(TypeFeedbackId id, | 255 void PropertyReceiverTypes(TypeFeedbackId id, |
| 274 Handle<String> name, | 256 Handle<String> name, |
| 275 SmallMapList* receiver_types, | 257 SmallMapList* receiver_types, |
| 276 bool* is_prototype); | 258 bool* is_prototype); |
| 277 void KeyedPropertyReceiverTypes(TypeFeedbackId id, | 259 void KeyedPropertyReceiverTypes(TypeFeedbackId id, |
| 278 SmallMapList* receiver_types, | 260 SmallMapList* receiver_types, |
| 279 bool* is_string); | 261 bool* is_string); |
| 280 void AssignmentReceiverTypes(TypeFeedbackId id, | 262 void AssignmentReceiverTypes(TypeFeedbackId id, |
| 281 Handle<String> name, | 263 Handle<String> name, |
| 282 SmallMapList* receiver_types); | 264 SmallMapList* receiver_types); |
| 283 void KeyedAssignmentReceiverTypes(TypeFeedbackId id, | 265 void KeyedAssignmentReceiverTypes(TypeFeedbackId id, |
| 284 SmallMapList* receiver_types, | 266 SmallMapList* receiver_types, |
| 285 KeyedAccessStoreMode* store_mode); | 267 KeyedAccessStoreMode* store_mode); |
| 286 void CountReceiverTypes(TypeFeedbackId id, | 268 void CountReceiverTypes(TypeFeedbackId id, |
| 287 SmallMapList* receiver_types); | 269 SmallMapList* receiver_types); |
| 288 | 270 |
| 271 void CollectReceiverTypes(TypeFeedbackId id, |
| 272 SmallMapList* types); |
| 273 |
| 289 static bool CanRetainOtherContext(Map* map, Context* native_context); | 274 static bool CanRetainOtherContext(Map* map, Context* native_context); |
| 290 static bool CanRetainOtherContext(JSFunction* function, | 275 static bool CanRetainOtherContext(JSFunction* function, |
| 291 Context* native_context); | 276 Context* native_context); |
| 292 | 277 |
| 293 void CollectPolymorphicMaps(Handle<Code> code, SmallMapList* types); | |
| 294 | |
| 295 CheckType GetCallCheckType(TypeFeedbackId id); | 278 CheckType GetCallCheckType(TypeFeedbackId id); |
| 296 Handle<JSFunction> GetCallTarget(TypeFeedbackId id); | 279 Handle<JSFunction> GetCallTarget(TypeFeedbackId id); |
| 297 Handle<JSFunction> GetCallNewTarget(TypeFeedbackId id); | 280 Handle<JSFunction> GetCallNewTarget(TypeFeedbackId id); |
| 298 Handle<Cell> GetCallNewAllocationInfoCell(TypeFeedbackId id); | 281 Handle<Cell> GetCallNewAllocationInfoCell(TypeFeedbackId id); |
| 299 | 282 |
| 300 Handle<Map> GetObjectLiteralStoreMap(TypeFeedbackId id); | |
| 301 | |
| 302 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id); | 283 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id); |
| 303 bool LoadIsStub(TypeFeedbackId id, ICStub* stub); | 284 bool LoadIsStub(TypeFeedbackId id, ICStub* stub); |
| 304 | 285 |
| 305 // TODO(1571) We can't use ToBooleanStub::Types as the return value because | 286 // TODO(1571) We can't use ToBooleanStub::Types as the return value because |
| 306 // of various cycles in our headers. Death to tons of implementations in | 287 // of various cycles in our headers. Death to tons of implementations in |
| 307 // headers!! :-P | 288 // headers!! :-P |
| 308 byte ToBooleanTypes(TypeFeedbackId id); | 289 byte ToBooleanTypes(TypeFeedbackId id); |
| 309 | 290 |
| 310 // Get type information for arithmetic operations and compares. | 291 // Get type information for arithmetic operations and compares. |
| 311 void BinaryType(TypeFeedbackId id, | 292 void BinaryType(TypeFeedbackId id, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 Isolate* isolate_; | 337 Isolate* isolate_; |
| 357 Zone* zone_; | 338 Zone* zone_; |
| 358 Handle<UnseededNumberDictionary> dictionary_; | 339 Handle<UnseededNumberDictionary> dictionary_; |
| 359 | 340 |
| 360 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); | 341 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); |
| 361 }; | 342 }; |
| 362 | 343 |
| 363 } } // namespace v8::internal | 344 } } // namespace v8::internal |
| 364 | 345 |
| 365 #endif // V8_TYPE_INFO_H_ | 346 #endif // V8_TYPE_INFO_H_ |
| OLD | NEW |