| 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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 } | 648 } |
| 649 } | 649 } |
| 650 | 650 |
| 651 | 651 |
| 652 void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 652 void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
| 653 allocation_info_cell_ = oracle->GetCallNewAllocationInfoCell(this); | 653 allocation_info_cell_ = oracle->GetCallNewAllocationInfoCell(this); |
| 654 is_monomorphic_ = oracle->CallNewIsMonomorphic(this); | 654 is_monomorphic_ = oracle->CallNewIsMonomorphic(this); |
| 655 if (is_monomorphic_) { | 655 if (is_monomorphic_) { |
| 656 target_ = oracle->GetCallNewTarget(this); | 656 target_ = oracle->GetCallNewTarget(this); |
| 657 Object* value = allocation_info_cell_->value(); | 657 Object* value = allocation_info_cell_->value(); |
| 658 ASSERT(!value->IsTheHole()); |
| 658 if (value->IsSmi()) { | 659 if (value->IsSmi()) { |
| 659 elements_kind_ = static_cast<ElementsKind>(Smi::cast(value)->value()); | 660 elements_kind_ = static_cast<ElementsKind>(Smi::cast(value)->value()); |
| 660 } | 661 } |
| 661 } | 662 } |
| 662 } | 663 } |
| 663 | 664 |
| 664 | 665 |
| 665 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 666 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
| 666 receiver_type_ = oracle->ObjectLiteralStoreIsMonomorphic(this) | 667 receiver_type_ = oracle->ObjectLiteralStoreIsMonomorphic(this) |
| 667 ? oracle->GetObjectLiteralStoreMap(this) | 668 ? oracle->GetObjectLiteralStoreMap(this) |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); | 1164 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); |
| 1164 str = arr; | 1165 str = arr; |
| 1165 } else { | 1166 } else { |
| 1166 str = DoubleToCString(value_->Number(), buffer); | 1167 str = DoubleToCString(value_->Number(), buffer); |
| 1167 } | 1168 } |
| 1168 return factory->NewStringFromAscii(CStrVector(str)); | 1169 return factory->NewStringFromAscii(CStrVector(str)); |
| 1169 } | 1170 } |
| 1170 | 1171 |
| 1171 | 1172 |
| 1172 } } // namespace v8::internal | 1173 } } // namespace v8::internal |
| OLD | NEW |