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 10622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10633 if (target->is_inline_cache_stub()) { | 10633 if (target->is_inline_cache_stub()) { |
10634 if (kind == NULL || *kind == target->kind()) { | 10634 if (kind == NULL || *kind == target->kind()) { |
10635 IC::Clear(this->GetIsolate(), info->pc(), | 10635 IC::Clear(this->GetIsolate(), info->pc(), |
10636 info->host()->constant_pool()); | 10636 info->host()->constant_pool()); |
10637 } | 10637 } |
10638 } | 10638 } |
10639 } | 10639 } |
10640 } | 10640 } |
10641 | 10641 |
10642 | 10642 |
10643 void Code::ClearTypeFeedbackInfo(Heap* heap) { | 10643 void SharedFunctionInfo::ClearTypeFeedbackInfo(Heap* heap) { |
10644 if (kind() != FUNCTION) return; | 10644 FixedArray* vector = feedback_vector(); |
10645 Object* raw_info = type_feedback_info(); | 10645 for (int i = 0; i < vector->length(); i++) { |
10646 if (raw_info->IsTypeFeedbackInfo()) { | 10646 Object* obj = vector->get(i); |
10647 FixedArray* feedback_vector = | 10647 if (!obj->IsAllocationSite()) { |
10648 TypeFeedbackInfo::cast(raw_info)->feedback_vector(); | 10648 // The assert verifies we can skip the write barrier. |
10649 for (int i = 0; i < feedback_vector->length(); i++) { | 10649 ASSERT(heap->uninitialized_symbol() == |
10650 Object* obj = feedback_vector->get(i); | 10650 TypeFeedbackInfo::RawUninitializedSentinel(heap)); |
10651 if (!obj->IsAllocationSite()) { | 10651 vector->set(i, TypeFeedbackInfo::RawUninitializedSentinel(heap), |
10652 // TODO(mvstanton): Can't I avoid a write barrier for this sentinel? | 10652 SKIP_WRITE_BARRIER); |
10653 feedback_vector->set(i, | |
10654 TypeFeedbackInfo::RawUninitializedSentinel(heap)); | |
10655 } | |
10656 } | 10653 } |
10657 } | 10654 } |
10658 } | 10655 } |
10659 | 10656 |
10660 | 10657 |
10661 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { | 10658 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
10662 DisallowHeapAllocation no_gc; | 10659 DisallowHeapAllocation no_gc; |
10663 ASSERT(kind() == FUNCTION); | 10660 ASSERT(kind() == FUNCTION); |
10664 BackEdgeTable back_edges(this, &no_gc); | 10661 BackEdgeTable back_edges(this, &no_gc); |
10665 for (uint32_t i = 0; i < back_edges.length(); i++) { | 10662 for (uint32_t i = 0; i < back_edges.length(); i++) { |
(...skipping 5815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16481 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16478 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16482 static const char* error_messages_[] = { | 16479 static const char* error_messages_[] = { |
16483 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16480 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16484 }; | 16481 }; |
16485 #undef ERROR_MESSAGES_TEXTS | 16482 #undef ERROR_MESSAGES_TEXTS |
16486 return error_messages_[reason]; | 16483 return error_messages_[reason]; |
16487 } | 16484 } |
16488 | 16485 |
16489 | 16486 |
16490 } } // namespace v8::internal | 16487 } } // namespace v8::internal |
OLD | NEW |