| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 FeedbackVectorSlot slot, SmallMapList* receiver_types, bool* is_string, | 290 FeedbackVectorSlot slot, SmallMapList* receiver_types, bool* is_string, |
| 291 IcCheckType* key_type) { | 291 IcCheckType* key_type) { |
| 292 receiver_types->Clear(); | 292 receiver_types->Clear(); |
| 293 if (slot.IsInvalid()) { | 293 if (slot.IsInvalid()) { |
| 294 *is_string = false; | 294 *is_string = false; |
| 295 *key_type = ELEMENT; | 295 *key_type = ELEMENT; |
| 296 } else { | 296 } else { |
| 297 KeyedLoadICNexus nexus(feedback_vector_, slot); | 297 KeyedLoadICNexus nexus(feedback_vector_, slot); |
| 298 CollectReceiverTypes(&nexus, receiver_types); | 298 CollectReceiverTypes(&nexus, receiver_types); |
| 299 *is_string = HasOnlyStringMaps(receiver_types); | 299 *is_string = HasOnlyStringMaps(receiver_types); |
| 300 *key_type = nexus.FindFirstName() != NULL ? PROPERTY : ELEMENT; | 300 *key_type = nexus.GetKeyType(); |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 | 303 |
| 304 | 304 |
| 305 void TypeFeedbackOracle::AssignmentReceiverTypes(FeedbackVectorSlot slot, | 305 void TypeFeedbackOracle::AssignmentReceiverTypes(FeedbackVectorSlot slot, |
| 306 Handle<Name> name, | 306 Handle<Name> name, |
| 307 SmallMapList* receiver_types) { | 307 SmallMapList* receiver_types) { |
| 308 receiver_types->Clear(); | 308 receiver_types->Clear(); |
| 309 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); | 309 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); |
| 310 CollectReceiverTypes(slot, name, flags, receiver_types); | 310 CollectReceiverTypes(slot, name, flags, receiver_types); |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 // Dictionary has been allocated with sufficient size for all elements. | 467 // Dictionary has been allocated with sufficient size for all elements. |
| 468 DisallowHeapAllocation no_need_to_resize_dictionary; | 468 DisallowHeapAllocation no_need_to_resize_dictionary; |
| 469 HandleScope scope(isolate()); | 469 HandleScope scope(isolate()); |
| 470 USE(UnseededNumberDictionary::AtNumberPut( | 470 USE(UnseededNumberDictionary::AtNumberPut( |
| 471 dictionary_, IdToKey(ast_id), handle(target, isolate()))); | 471 dictionary_, IdToKey(ast_id), handle(target, isolate()))); |
| 472 } | 472 } |
| 473 | 473 |
| 474 | 474 |
| 475 } // namespace internal | 475 } // namespace internal |
| 476 } // namespace v8 | 476 } // namespace v8 |
| OLD | NEW |