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 10591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10602 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); | 10602 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); |
10603 if (target->is_inline_cache_stub()) { | 10603 if (target->is_inline_cache_stub()) { |
10604 if (kind == NULL || *kind == target->kind()) { | 10604 if (kind == NULL || *kind == target->kind()) { |
10605 IC::Clear(this->GetIsolate(), info->pc()); | 10605 IC::Clear(this->GetIsolate(), info->pc()); |
10606 } | 10606 } |
10607 } | 10607 } |
10608 } | 10608 } |
10609 } | 10609 } |
10610 | 10610 |
10611 | 10611 |
10612 void Code::ClearTypeFeedbackCells(Heap* heap) { | 10612 void Code::ClearTypeFeedbackInfo(Heap* heap) { |
10613 if (kind() != FUNCTION) return; | 10613 if (kind() != FUNCTION) return; |
10614 Object* raw_info = type_feedback_info(); | 10614 Object* raw_info = type_feedback_info(); |
10615 if (raw_info->IsTypeFeedbackInfo()) { | 10615 if (raw_info->IsTypeFeedbackInfo()) { |
10616 TypeFeedbackCells* type_feedback_cells = | 10616 FixedArray* feedback_vector = |
10617 TypeFeedbackInfo::cast(raw_info)->type_feedback_cells(); | 10617 TypeFeedbackInfo::cast(raw_info)->feedback_vector(); |
10618 for (int i = 0; i < type_feedback_cells->CellCount(); i++) { | 10618 for (int i = 0; i < feedback_vector->length(); i++) { |
10619 Cell* cell = type_feedback_cells->GetCell(i); | 10619 Object* obj = feedback_vector->get(i); |
10620 // Don't clear AllocationSites | 10620 if (!obj->IsAllocationSite()) { |
10621 Object* value = cell->value(); | 10621 // TODO(mvstanton): Can't I avoid a write barrier for this sentinel? |
10622 if (value == NULL || !value->IsAllocationSite()) { | 10622 feedback_vector->set(i, |
10623 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); | 10623 TypeFeedbackInfo::RawUninitializedSentinel(heap)); |
10624 } | 10624 } |
10625 } | 10625 } |
10626 } | 10626 } |
10627 } | 10627 } |
10628 | 10628 |
10629 | 10629 |
10630 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { | 10630 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
10631 DisallowHeapAllocation no_gc; | 10631 DisallowHeapAllocation no_gc; |
10632 ASSERT(kind() == FUNCTION); | 10632 ASSERT(kind() == FUNCTION); |
10633 BackEdgeTable back_edges(this, &no_gc); | 10633 BackEdgeTable back_edges(this, &no_gc); |
(...skipping 5833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16467 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16467 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16468 static const char* error_messages_[] = { | 16468 static const char* error_messages_[] = { |
16469 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16469 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16470 }; | 16470 }; |
16471 #undef ERROR_MESSAGES_TEXTS | 16471 #undef ERROR_MESSAGES_TEXTS |
16472 return error_messages_[reason]; | 16472 return error_messages_[reason]; |
16473 } | 16473 } |
16474 | 16474 |
16475 | 16475 |
16476 } } // namespace v8::internal | 16476 } } // namespace v8::internal |
OLD | NEW |