Chromium Code Reviews| 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 10630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10641 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); | 10641 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); |
| 10642 if (target->is_inline_cache_stub()) { | 10642 if (target->is_inline_cache_stub()) { |
| 10643 if (kind == NULL || *kind == target->kind()) { | 10643 if (kind == NULL || *kind == target->kind()) { |
| 10644 IC::Clear(this->GetIsolate(), info->pc()); | 10644 IC::Clear(this->GetIsolate(), info->pc()); |
| 10645 } | 10645 } |
| 10646 } | 10646 } |
| 10647 } | 10647 } |
| 10648 } | 10648 } |
| 10649 | 10649 |
| 10650 | 10650 |
| 10651 void Code::ClearTypeFeedbackInfo(Heap* heap) { | 10651 void SharedFunctionInfo::ClearTypeFeedbackInfo(Heap* heap) { |
| 10652 if (kind() != FUNCTION) return; | 10652 FixedArray* vector = feedback_vector(); |
| 10653 Object* raw_info = type_feedback_info(); | 10653 for (int i = 0; i < vector->length(); i++) { |
| 10654 if (raw_info->IsTypeFeedbackInfo()) { | 10654 Object* obj = vector->get(i); |
| 10655 FixedArray* feedback_vector = | 10655 if (!obj->IsAllocationSite()) { |
|
Benedikt Meurer
2014/03/05 07:22:56
Unrelated to this CL, but... Do we really want to
mvstanton
2014/03/05 08:48:02
Indeed, per our discussion, I'll try and remove th
| |
| 10656 TypeFeedbackInfo::cast(raw_info)->feedback_vector(); | 10656 ASSERT(heap->the_hole_value() == |
| 10657 for (int i = 0; i < feedback_vector->length(); i++) { | 10657 TypeFeedbackInfo::RawUninitializedSentinel(heap)); |
|
Benedikt Meurer
2014/03/05 07:22:56
Nit: Please add a comment that this ASSERT is only
mvstanton
2014/03/05 08:48:02
Done.
| |
| 10658 Object* obj = feedback_vector->get(i); | 10658 vector->set(i, TypeFeedbackInfo::RawUninitializedSentinel(heap), |
| 10659 if (!obj->IsAllocationSite()) { | 10659 SKIP_WRITE_BARRIER); |
| 10660 // TODO(mvstanton): Can't I avoid a write barrier for this sentinel? | |
| 10661 feedback_vector->set(i, | |
| 10662 TypeFeedbackInfo::RawUninitializedSentinel(heap)); | |
| 10663 } | |
| 10664 } | 10660 } |
| 10665 } | 10661 } |
| 10666 } | 10662 } |
| 10667 | 10663 |
| 10668 | 10664 |
| 10669 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { | 10665 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
| 10670 DisallowHeapAllocation no_gc; | 10666 DisallowHeapAllocation no_gc; |
| 10671 ASSERT(kind() == FUNCTION); | 10667 ASSERT(kind() == FUNCTION); |
| 10672 BackEdgeTable back_edges(this, &no_gc); | 10668 BackEdgeTable back_edges(this, &no_gc); |
| 10673 for (uint32_t i = 0; i < back_edges.length(); i++) { | 10669 for (uint32_t i = 0; i < back_edges.length(); i++) { |
| (...skipping 5822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 16496 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16492 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16497 static const char* error_messages_[] = { | 16493 static const char* error_messages_[] = { |
| 16498 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16494 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16499 }; | 16495 }; |
| 16500 #undef ERROR_MESSAGES_TEXTS | 16496 #undef ERROR_MESSAGES_TEXTS |
| 16501 return error_messages_[reason]; | 16497 return error_messages_[reason]; |
| 16502 } | 16498 } |
| 16503 | 16499 |
| 16504 | 16500 |
| 16505 } } // namespace v8::internal | 16501 } } // namespace v8::internal |
| OLD | NEW |