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 10613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10624 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); | 10624 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); |
10625 if (target->is_inline_cache_stub()) { | 10625 if (target->is_inline_cache_stub()) { |
10626 if (kind == NULL || *kind == target->kind()) { | 10626 if (kind == NULL || *kind == target->kind()) { |
10627 IC::Clear(this->GetIsolate(), info->pc()); | 10627 IC::Clear(this->GetIsolate(), info->pc()); |
10628 } | 10628 } |
10629 } | 10629 } |
10630 } | 10630 } |
10631 } | 10631 } |
10632 | 10632 |
10633 | 10633 |
10634 void Code::ClearTypeFeedbackCells(Heap* heap) { | 10634 void Code::ClearTypeFeedbackInfo(Heap* heap) { |
10635 if (kind() != FUNCTION) return; | 10635 if (kind() != FUNCTION) return; |
10636 Object* raw_info = type_feedback_info(); | 10636 Object* raw_info = type_feedback_info(); |
10637 if (raw_info->IsTypeFeedbackInfo()) { | 10637 if (raw_info->IsTypeFeedbackInfo()) { |
10638 TypeFeedbackCells* type_feedback_cells = | 10638 FixedArray* feedback_vector = |
10639 TypeFeedbackInfo::cast(raw_info)->type_feedback_cells(); | 10639 TypeFeedbackInfo::cast(raw_info)->feedback_vector(); |
10640 for (int i = 0; i < type_feedback_cells->CellCount(); i++) { | 10640 for (int i = 0; i < feedback_vector->length(); i++) { |
10641 Cell* cell = type_feedback_cells->GetCell(i); | 10641 Object* obj = feedback_vector->get(i); |
10642 // Don't clear AllocationSites | 10642 if (!obj->IsAllocationSite()) { |
10643 Object* value = cell->value(); | 10643 // TODO(mvstanton): Can't I avoid a write barrier for this sentinel? |
10644 if (value == NULL || !value->IsAllocationSite()) { | 10644 feedback_vector->set(i, |
10645 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); | 10645 TypeFeedbackInfo::RawUninitializedSentinel(heap)); |
10646 } | 10646 } |
10647 } | 10647 } |
10648 } | 10648 } |
10649 } | 10649 } |
10650 | 10650 |
10651 | 10651 |
10652 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { | 10652 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
10653 DisallowHeapAllocation no_gc; | 10653 DisallowHeapAllocation no_gc; |
10654 ASSERT(kind() == FUNCTION); | 10654 ASSERT(kind() == FUNCTION); |
10655 BackEdgeTable back_edges(this, &no_gc); | 10655 BackEdgeTable back_edges(this, &no_gc); |
(...skipping 5850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16506 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16506 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16507 static const char* error_messages_[] = { | 16507 static const char* error_messages_[] = { |
16508 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16508 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16509 }; | 16509 }; |
16510 #undef ERROR_MESSAGES_TEXTS | 16510 #undef ERROR_MESSAGES_TEXTS |
16511 return error_messages_[reason]; | 16511 return error_messages_[reason]; |
16512 } | 16512 } |
16513 | 16513 |
16514 | 16514 |
16515 } } // namespace v8::internal | 16515 } } // namespace v8::internal |
OLD | NEW |