| 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 | 458 |
| 459 | 459 |
| 460 void FullCodeGenerator::PrepareForBailoutForId(BailoutId id, State state) { | 460 void FullCodeGenerator::PrepareForBailoutForId(BailoutId id, State state) { |
| 461 // There's no need to prepare this code for bailouts from already optimized | 461 // There's no need to prepare this code for bailouts from already optimized |
| 462 // code or code that can't be optimized. | 462 // code or code that can't be optimized. |
| 463 if (!info_->HasDeoptimizationSupport()) return; | 463 if (!info_->HasDeoptimizationSupport()) return; |
| 464 unsigned pc_and_state = | 464 unsigned pc_and_state = |
| 465 StateField::encode(state) | PcField::encode(masm_->pc_offset()); | 465 StateField::encode(state) | PcField::encode(masm_->pc_offset()); |
| 466 ASSERT(Smi::IsValid(pc_and_state)); | 466 ASSERT(Smi::IsValid(pc_and_state)); |
| 467 BailoutEntry entry = { id, pc_and_state }; | 467 BailoutEntry entry = { id, pc_and_state }; |
| 468 ASSERT(!prepared_bailout_ids_.Contains(id.ToInt())); | 468 if (prepared_bailout_ids_.Contains(id.ToInt())) return; |
| 469 prepared_bailout_ids_.Add(id.ToInt(), zone()); | 469 prepared_bailout_ids_.Add(id.ToInt(), zone()); |
| 470 bailout_entries_.Add(entry, zone()); | 470 bailout_entries_.Add(entry, zone()); |
| 471 } | 471 } |
| 472 | 472 |
| 473 | 473 |
| 474 void FullCodeGenerator::RecordTypeFeedbackCell( | 474 void FullCodeGenerator::RecordTypeFeedbackCell( |
| 475 TypeFeedbackId id, Handle<Cell> cell) { | 475 TypeFeedbackId id, Handle<Cell> cell) { |
| 476 TypeFeedbackCellEntry entry = { id, cell }; | 476 TypeFeedbackCellEntry entry = { id, cell }; |
| 477 type_feedback_cells_.Add(entry, zone()); | 477 type_feedback_cells_.Add(entry, zone()); |
| 478 } | 478 } |
| (...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 } | 1685 } |
| 1686 return true; | 1686 return true; |
| 1687 } | 1687 } |
| 1688 #endif // DEBUG | 1688 #endif // DEBUG |
| 1689 | 1689 |
| 1690 | 1690 |
| 1691 #undef __ | 1691 #undef __ |
| 1692 | 1692 |
| 1693 | 1693 |
| 1694 } } // namespace v8::internal | 1694 } } // namespace v8::internal |
| OLD | NEW |