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