| 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 #include "src/type-info.h" | 5 #include "src/type-info.h" |
| 6 | 6 |
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 FeedbackVectorSlot slot, SmallMapList* receiver_types, bool* is_string, | 294 FeedbackVectorSlot slot, SmallMapList* receiver_types, bool* is_string, |
| 295 IcCheckType* key_type) { | 295 IcCheckType* key_type) { |
| 296 receiver_types->Clear(); | 296 receiver_types->Clear(); |
| 297 if (slot.IsInvalid()) { | 297 if (slot.IsInvalid()) { |
| 298 *is_string = false; | 298 *is_string = false; |
| 299 *key_type = ELEMENT; | 299 *key_type = ELEMENT; |
| 300 } else { | 300 } else { |
| 301 KeyedLoadICNexus nexus(feedback_vector_, slot); | 301 KeyedLoadICNexus nexus(feedback_vector_, slot); |
| 302 CollectReceiverTypes<FeedbackNexus>(&nexus, receiver_types); | 302 CollectReceiverTypes<FeedbackNexus>(&nexus, receiver_types); |
| 303 *is_string = HasOnlyStringMaps(receiver_types); | 303 *is_string = HasOnlyStringMaps(receiver_types); |
| 304 *key_type = nexus.FindFirstName() != NULL ? PROPERTY : ELEMENT; | 304 *key_type = nexus.GetKeyType(); |
| 305 } | 305 } |
| 306 } | 306 } |
| 307 | 307 |
| 308 | 308 |
| 309 void TypeFeedbackOracle::AssignmentReceiverTypes(FeedbackVectorSlot slot, | 309 void TypeFeedbackOracle::AssignmentReceiverTypes(FeedbackVectorSlot slot, |
| 310 Handle<Name> name, | 310 Handle<Name> name, |
| 311 SmallMapList* receiver_types) { | 311 SmallMapList* receiver_types) { |
| 312 receiver_types->Clear(); | 312 receiver_types->Clear(); |
| 313 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); | 313 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); |
| 314 CollectReceiverTypes(slot, name, flags, receiver_types); | 314 CollectReceiverTypes(slot, name, flags, receiver_types); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 // Dictionary has been allocated with sufficient size for all elements. | 474 // Dictionary has been allocated with sufficient size for all elements. |
| 475 DisallowHeapAllocation no_need_to_resize_dictionary; | 475 DisallowHeapAllocation no_need_to_resize_dictionary; |
| 476 HandleScope scope(isolate()); | 476 HandleScope scope(isolate()); |
| 477 USE(UnseededNumberDictionary::AtNumberPut( | 477 USE(UnseededNumberDictionary::AtNumberPut( |
| 478 dictionary_, IdToKey(ast_id), handle(target, isolate()))); | 478 dictionary_, IdToKey(ast_id), handle(target, isolate()))); |
| 479 } | 479 } |
| 480 | 480 |
| 481 | 481 |
| 482 } // namespace internal | 482 } // namespace internal |
| 483 } // namespace v8 | 483 } // namespace v8 |
| OLD | NEW |