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