| 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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 } else { | 749 } else { |
| 750 if (is_monomorphic_) { | 750 if (is_monomorphic_) { |
| 751 keyed_array_call_is_holey_ = | 751 keyed_array_call_is_holey_ = |
| 752 oracle->KeyedArrayCallIsHoley(CallFeedbackId()); | 752 oracle->KeyedArrayCallIsHoley(CallFeedbackId()); |
| 753 } | 753 } |
| 754 } | 754 } |
| 755 } | 755 } |
| 756 | 756 |
| 757 | 757 |
| 758 void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 758 void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
| 759 allocation_info_cell_ = | 759 allocation_site_ = |
| 760 oracle->GetCallNewAllocationInfoCell(CallNewFeedbackId()); | 760 oracle->GetCallNewAllocationSite(CallNewFeedbackId()); |
| 761 is_monomorphic_ = oracle->CallNewIsMonomorphic(CallNewFeedbackId()); | 761 is_monomorphic_ = oracle->CallNewIsMonomorphic(CallNewFeedbackId()); |
| 762 if (is_monomorphic_) { | 762 if (is_monomorphic_) { |
| 763 target_ = oracle->GetCallNewTarget(CallNewFeedbackId()); | 763 target_ = oracle->GetCallNewTarget(CallNewFeedbackId()); |
| 764 Object* value = allocation_info_cell_->value(); | 764 if (!allocation_site_.is_null()) { |
| 765 ASSERT(!value->IsTheHole()); | 765 elements_kind_ = allocation_site_->GetElementsKind(); |
| 766 if (value->IsAllocationSite()) { | |
| 767 AllocationSite* site = AllocationSite::cast(value); | |
| 768 elements_kind_ = site->GetElementsKind(); | |
| 769 } | 766 } |
| 770 } | 767 } |
| 771 } | 768 } |
| 772 | 769 |
| 773 | 770 |
| 774 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 771 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
| 775 TypeFeedbackId id = key()->LiteralFeedbackId(); | 772 TypeFeedbackId id = key()->LiteralFeedbackId(); |
| 776 SmallMapList maps; | 773 SmallMapList maps; |
| 777 oracle->CollectReceiverTypes(id, &maps); | 774 oracle->CollectReceiverTypes(id, &maps); |
| 778 receiver_type_ = maps.length() == 1 ? maps.at(0) | 775 receiver_type_ = maps.length() == 1 ? maps.at(0) |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1277 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); | 1274 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); |
| 1278 str = arr; | 1275 str = arr; |
| 1279 } else { | 1276 } else { |
| 1280 str = DoubleToCString(value_->Number(), buffer); | 1277 str = DoubleToCString(value_->Number(), buffer); |
| 1281 } | 1278 } |
| 1282 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); | 1279 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); |
| 1283 } | 1280 } |
| 1284 | 1281 |
| 1285 | 1282 |
| 1286 } } // namespace v8::internal | 1283 } } // namespace v8::internal |
| OLD | NEW |