| 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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 if (!lookup->isolate()->heap()->InNewSpace(*candidate)) { | 636 if (!lookup->isolate()->heap()->InNewSpace(*candidate)) { |
| 637 target_ = candidate; | 637 target_ = candidate; |
| 638 return true; | 638 return true; |
| 639 } | 639 } |
| 640 } | 640 } |
| 641 return false; | 641 return false; |
| 642 } | 642 } |
| 643 | 643 |
| 644 | 644 |
| 645 void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 645 void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
| 646 int allocation_site_feedback_slot = FLAG_pretenuring_call_new |
| 647 ? AllocationSiteFeedbackSlot() |
| 648 : CallNewFeedbackSlot(); |
| 646 allocation_site_ = | 649 allocation_site_ = |
| 647 oracle->GetCallNewAllocationSite(CallNewFeedbackSlot()); | 650 oracle->GetCallNewAllocationSite(allocation_site_feedback_slot); |
| 648 is_monomorphic_ = oracle->CallNewIsMonomorphic(CallNewFeedbackSlot()); | 651 is_monomorphic_ = oracle->CallNewIsMonomorphic(CallNewFeedbackSlot()); |
| 649 if (is_monomorphic_) { | 652 if (is_monomorphic_) { |
| 650 target_ = oracle->GetCallNewTarget(CallNewFeedbackSlot()); | 653 target_ = oracle->GetCallNewTarget(CallNewFeedbackSlot()); |
| 651 if (!allocation_site_.is_null()) { | 654 if (!allocation_site_.is_null()) { |
| 652 elements_kind_ = allocation_site_->GetElementsKind(); | 655 elements_kind_ = allocation_site_->GetElementsKind(); |
| 653 } | 656 } |
| 654 } | 657 } |
| 655 } | 658 } |
| 656 | 659 |
| 657 | 660 |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); | 1176 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); |
| 1174 str = arr; | 1177 str = arr; |
| 1175 } else { | 1178 } else { |
| 1176 str = DoubleToCString(value_->Number(), buffer); | 1179 str = DoubleToCString(value_->Number(), buffer); |
| 1177 } | 1180 } |
| 1178 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); | 1181 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); |
| 1179 } | 1182 } |
| 1180 | 1183 |
| 1181 | 1184 |
| 1182 } } // namespace v8::internal | 1185 } } // namespace v8::internal |
| OLD | NEW |