| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 10584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10595 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); | 10595 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); |
| 10596 if (target->is_inline_cache_stub()) { | 10596 if (target->is_inline_cache_stub()) { |
| 10597 if (kind == NULL || *kind == target->kind()) { | 10597 if (kind == NULL || *kind == target->kind()) { |
| 10598 IC::Clear(this->GetIsolate(), info->pc()); | 10598 IC::Clear(this->GetIsolate(), info->pc()); |
| 10599 } | 10599 } |
| 10600 } | 10600 } |
| 10601 } | 10601 } |
| 10602 } | 10602 } |
| 10603 | 10603 |
| 10604 | 10604 |
| 10605 void Code::ClearTypeFeedbackCells(Heap* heap) { | 10605 void Code::ClearTypeFeedbackInfo(Heap* heap) { |
| 10606 if (kind() != FUNCTION) return; | 10606 if (kind() != FUNCTION) return; |
| 10607 Object* raw_info = type_feedback_info(); | 10607 Object* raw_info = type_feedback_info(); |
| 10608 if (raw_info->IsTypeFeedbackInfo()) { | 10608 if (raw_info->IsTypeFeedbackInfo()) { |
| 10609 TypeFeedbackCells* type_feedback_cells = | 10609 FixedArray* feedback_vector = |
| 10610 TypeFeedbackInfo::cast(raw_info)->type_feedback_cells(); | 10610 TypeFeedbackInfo::cast(raw_info)->feedback_vector(); |
| 10611 for (int i = 0; i < type_feedback_cells->CellCount(); i++) { | 10611 for (int i = 0; i < feedback_vector->length(); i++) { |
| 10612 Cell* cell = type_feedback_cells->GetCell(i); | 10612 Object* obj = feedback_vector->get(i); |
| 10613 // Don't clear AllocationSites | 10613 if (!obj->IsAllocationSite()) { |
| 10614 Object* value = cell->value(); | 10614 // TODO(mvstanton): Can't I avoid a write barrier for this sentinel? |
| 10615 if (value == NULL || !value->IsAllocationSite()) { | 10615 feedback_vector->set(i, |
| 10616 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); | 10616 TypeFeedbackInfo::RawUninitializedSentinel(heap)); |
| 10617 } | 10617 } |
| 10618 } | 10618 } |
| 10619 } | 10619 } |
| 10620 } | 10620 } |
| 10621 | 10621 |
| 10622 | 10622 |
| 10623 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { | 10623 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
| 10624 DisallowHeapAllocation no_gc; | 10624 DisallowHeapAllocation no_gc; |
| 10625 ASSERT(kind() == FUNCTION); | 10625 ASSERT(kind() == FUNCTION); |
| 10626 BackEdgeTable back_edges(this, &no_gc); | 10626 BackEdgeTable back_edges(this, &no_gc); |
| (...skipping 5790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16417 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16417 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16418 static const char* error_messages_[] = { | 16418 static const char* error_messages_[] = { |
| 16419 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16419 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16420 }; | 16420 }; |
| 16421 #undef ERROR_MESSAGES_TEXTS | 16421 #undef ERROR_MESSAGES_TEXTS |
| 16422 return error_messages_[reason]; | 16422 return error_messages_[reason]; |
| 16423 } | 16423 } |
| 16424 | 16424 |
| 16425 | 16425 |
| 16426 } } // namespace v8::internal | 16426 } } // namespace v8::internal |
| OLD | NEW |