| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 } | 276 } |
| 277 | 277 |
| 278 | 278 |
| 279 void TypeFeedbackOracle::PropertyReceiverTypes( | 279 void TypeFeedbackOracle::PropertyReceiverTypes( |
| 280 TypeFeedbackId id, Handle<String> name, | 280 TypeFeedbackId id, Handle<String> name, |
| 281 SmallMapList* receiver_types, bool* is_prototype) { | 281 SmallMapList* receiver_types, bool* is_prototype) { |
| 282 receiver_types->Clear(); | 282 receiver_types->Clear(); |
| 283 FunctionPrototypeStub proto_stub(Code::LOAD_IC); | 283 FunctionPrototypeStub proto_stub(Code::LOAD_IC); |
| 284 *is_prototype = LoadIsStub(id, &proto_stub); | 284 *is_prototype = LoadIsStub(id, &proto_stub); |
| 285 if (!*is_prototype) { | 285 if (!*is_prototype) { |
| 286 Code::Flags flags = Code::ComputeFlags( | 286 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); |
| 287 Code::HANDLER, MONOMORPHIC, kNoExtraICState, | |
| 288 Code::NORMAL, Code::LOAD_IC); | |
| 289 CollectReceiverTypes(id, name, flags, receiver_types); | 287 CollectReceiverTypes(id, name, flags, receiver_types); |
| 290 } | 288 } |
| 291 } | 289 } |
| 292 | 290 |
| 293 | 291 |
| 294 void TypeFeedbackOracle::KeyedPropertyReceiverTypes( | 292 void TypeFeedbackOracle::KeyedPropertyReceiverTypes( |
| 295 TypeFeedbackId id, SmallMapList* receiver_types, bool* is_string) { | 293 TypeFeedbackId id, SmallMapList* receiver_types, bool* is_string) { |
| 296 receiver_types->Clear(); | 294 receiver_types->Clear(); |
| 297 *is_string = false; | 295 *is_string = false; |
| 298 if (LoadIsBuiltin(id, Builtins::kKeyedLoadIC_String)) { | 296 if (LoadIsBuiltin(id, Builtins::kKeyedLoadIC_String)) { |
| 299 *is_string = true; | 297 *is_string = true; |
| 300 } else { | 298 } else { |
| 301 CollectReceiverTypes(id, receiver_types); | 299 CollectReceiverTypes(id, receiver_types); |
| 302 } | 300 } |
| 303 } | 301 } |
| 304 | 302 |
| 305 | 303 |
| 306 void TypeFeedbackOracle::AssignmentReceiverTypes( | 304 void TypeFeedbackOracle::AssignmentReceiverTypes( |
| 307 TypeFeedbackId id, Handle<String> name, SmallMapList* receiver_types) { | 305 TypeFeedbackId id, Handle<String> name, SmallMapList* receiver_types) { |
| 308 receiver_types->Clear(); | 306 receiver_types->Clear(); |
| 309 Code::Flags flags = Code::ComputeFlags( | 307 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); |
| 310 Code::HANDLER, MONOMORPHIC, kNoExtraICState, | |
| 311 Code::NORMAL, Code::STORE_IC); | |
| 312 CollectReceiverTypes(id, name, flags, receiver_types); | 308 CollectReceiverTypes(id, name, flags, receiver_types); |
| 313 } | 309 } |
| 314 | 310 |
| 315 | 311 |
| 316 void TypeFeedbackOracle::KeyedAssignmentReceiverTypes( | 312 void TypeFeedbackOracle::KeyedAssignmentReceiverTypes( |
| 317 TypeFeedbackId id, SmallMapList* receiver_types, | 313 TypeFeedbackId id, SmallMapList* receiver_types, |
| 318 KeyedAccessStoreMode* store_mode) { | 314 KeyedAccessStoreMode* store_mode) { |
| 319 receiver_types->Clear(); | 315 receiver_types->Clear(); |
| 320 CollectReceiverTypes(id, receiver_types); | 316 CollectReceiverTypes(id, receiver_types); |
| 321 *store_mode = GetStoreMode(id); | 317 *store_mode = GetStoreMode(id); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 #ifdef DEBUG | 490 #ifdef DEBUG |
| 495 Object* result = NULL; | 491 Object* result = NULL; |
| 496 // Dictionary has been allocated with sufficient size for all elements. | 492 // Dictionary has been allocated with sufficient size for all elements. |
| 497 ASSERT(maybe_result->ToObject(&result)); | 493 ASSERT(maybe_result->ToObject(&result)); |
| 498 ASSERT(*dictionary_ == result); | 494 ASSERT(*dictionary_ == result); |
| 499 #endif | 495 #endif |
| 500 } | 496 } |
| 501 | 497 |
| 502 | 498 |
| 503 } } // namespace v8::internal | 499 } } // namespace v8::internal |
| OLD | NEW |