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 10591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10602 ASSERT(kind() == FUNCTION); | 10602 ASSERT(kind() == FUNCTION); |
10603 BackEdgeTable back_edges(this, &no_gc); | 10603 BackEdgeTable back_edges(this, &no_gc); |
10604 for (uint32_t i = 0; i < back_edges.length(); i++) { | 10604 for (uint32_t i = 0; i < back_edges.length(); i++) { |
10605 if (back_edges.pc_offset(i) == pc_offset) return back_edges.ast_id(i); | 10605 if (back_edges.pc_offset(i) == pc_offset) return back_edges.ast_id(i); |
10606 } | 10606 } |
10607 return BailoutId::None(); | 10607 return BailoutId::None(); |
10608 } | 10608 } |
10609 | 10609 |
10610 | 10610 |
10611 void Code::MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate) { | 10611 void Code::MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate) { |
10612 PatchPlatformCodeAge(isolate, sequence, kNoAge, NO_MARKING_PARITY); | 10612 PatchPlatformCodeAge(isolate, sequence, kNoAgeCodeAge, NO_MARKING_PARITY); |
10613 } | 10613 } |
10614 | 10614 |
10615 | 10615 |
10616 void Code::MarkCodeAsExecuted(byte* sequence, Isolate* isolate) { | 10616 void Code::MarkCodeAsExecuted(byte* sequence, Isolate* isolate) { |
10617 PatchPlatformCodeAge(isolate, sequence, kExecutedOnceCodeAge, | 10617 PatchPlatformCodeAge(isolate, sequence, kExecutedOnceCodeAge, |
10618 NO_MARKING_PARITY); | 10618 NO_MARKING_PARITY); |
10619 } | 10619 } |
10620 | 10620 |
10621 | 10621 |
10622 void Code::MakeOlder(MarkingParity current_parity) { | 10622 void Code::MakeOlder(MarkingParity current_parity) { |
(...skipping 24 matching lines...) Expand all Loading... |
10647 (kind() == OPTIMIZED_FUNCTION || | 10647 (kind() == OPTIMIZED_FUNCTION || |
10648 (kind() == FUNCTION && !has_debug_break_slots())) | 10648 (kind() == FUNCTION && !has_debug_break_slots())) |
10649 ? instruction_start() + prologue_offset() | 10649 ? instruction_start() + prologue_offset() |
10650 : NULL; | 10650 : NULL; |
10651 } | 10651 } |
10652 | 10652 |
10653 | 10653 |
10654 Code::Age Code::GetAge() { | 10654 Code::Age Code::GetAge() { |
10655 byte* sequence = FindCodeAgeSequence(); | 10655 byte* sequence = FindCodeAgeSequence(); |
10656 if (sequence == NULL) { | 10656 if (sequence == NULL) { |
10657 return Code::kNoAge; | 10657 return Code::kNoAgeCodeAge; |
10658 } | 10658 } |
10659 Age age; | 10659 Age age; |
10660 MarkingParity parity; | 10660 MarkingParity parity; |
10661 GetCodeAgeAndParity(sequence, &age, &parity); | 10661 GetCodeAgeAndParity(sequence, &age, &parity); |
10662 return age; | 10662 return age; |
10663 } | 10663 } |
10664 | 10664 |
10665 | 10665 |
10666 void Code::GetCodeAgeAndParity(Code* code, Age* age, | 10666 void Code::GetCodeAgeAndParity(Code* code, Age* age, |
10667 MarkingParity* parity) { | 10667 MarkingParity* parity) { |
(...skipping 5730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16398 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16398 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16399 static const char* error_messages_[] = { | 16399 static const char* error_messages_[] = { |
16400 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16400 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16401 }; | 16401 }; |
16402 #undef ERROR_MESSAGES_TEXTS | 16402 #undef ERROR_MESSAGES_TEXTS |
16403 return error_messages_[reason]; | 16403 return error_messages_[reason]; |
16404 } | 16404 } |
16405 | 16405 |
16406 | 16406 |
16407 } } // namespace v8::internal | 16407 } } // namespace v8::internal |
OLD | NEW |