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 10624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10635 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); | 10635 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); |
10636 if (target->is_inline_cache_stub()) { | 10636 if (target->is_inline_cache_stub()) { |
10637 if (kind == NULL || *kind == target->kind()) { | 10637 if (kind == NULL || *kind == target->kind()) { |
10638 IC::Clear(this->GetIsolate(), info->pc()); | 10638 IC::Clear(this->GetIsolate(), info->pc()); |
10639 } | 10639 } |
10640 } | 10640 } |
10641 } | 10641 } |
10642 } | 10642 } |
10643 | 10643 |
10644 | 10644 |
10645 void Code::ClearTypeFeedbackInfo(Heap* heap) { | 10645 void SharedFunctionInfo::ClearTypeFeedbackInfo(Heap* heap) { |
10646 if (kind() != FUNCTION) return; | 10646 FixedArray* vector = feedback_vector(); |
10647 Object* raw_info = type_feedback_info(); | 10647 for (int i = 0; i < vector->length(); i++) { |
10648 if (raw_info->IsTypeFeedbackInfo()) { | 10648 Object* obj = vector->get(i); |
10649 FixedArray* feedback_vector = | 10649 if (!obj->IsAllocationSite()) { |
10650 TypeFeedbackInfo::cast(raw_info)->feedback_vector(); | 10650 // The assert verifies we can skip the write barrier. |
10651 for (int i = 0; i < feedback_vector->length(); i++) { | 10651 ASSERT(heap->uninitialized_symbol() == |
10652 Object* obj = feedback_vector->get(i); | 10652 TypeFeedbackInfo::RawUninitializedSentinel(heap)); |
10653 if (!obj->IsAllocationSite()) { | 10653 vector->set(i, TypeFeedbackInfo::RawUninitializedSentinel(heap), |
10654 // TODO(mvstanton): Can't I avoid a write barrier for this sentinel? | 10654 SKIP_WRITE_BARRIER); |
10655 feedback_vector->set(i, | |
10656 TypeFeedbackInfo::RawUninitializedSentinel(heap)); | |
10657 } | |
10658 } | 10655 } |
10659 } | 10656 } |
10660 } | 10657 } |
10661 | 10658 |
10662 | 10659 |
10663 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { | 10660 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
10664 DisallowHeapAllocation no_gc; | 10661 DisallowHeapAllocation no_gc; |
10665 ASSERT(kind() == FUNCTION); | 10662 ASSERT(kind() == FUNCTION); |
10666 BackEdgeTable back_edges(this, &no_gc); | 10663 BackEdgeTable back_edges(this, &no_gc); |
10667 for (uint32_t i = 0; i < back_edges.length(); i++) { | 10664 for (uint32_t i = 0; i < back_edges.length(); i++) { |
(...skipping 5836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16504 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16501 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16505 static const char* error_messages_[] = { | 16502 static const char* error_messages_[] = { |
16506 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16503 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16507 }; | 16504 }; |
16508 #undef ERROR_MESSAGES_TEXTS | 16505 #undef ERROR_MESSAGES_TEXTS |
16509 return error_messages_[reason]; | 16506 return error_messages_[reason]; |
16510 } | 16507 } |
16511 | 16508 |
16512 | 16509 |
16513 } } // namespace v8::internal | 16510 } } // namespace v8::internal |
OLD | NEW |