OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 5518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5529 DECLARE_VERIFIER(Code) | 5529 DECLARE_VERIFIER(Code) |
5530 | 5530 |
5531 void ClearInlineCaches(); | 5531 void ClearInlineCaches(); |
5532 void ClearInlineCaches(Kind kind); | 5532 void ClearInlineCaches(Kind kind); |
5533 | 5533 |
5534 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); | 5534 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); |
5535 uint32_t TranslateAstIdToPcOffset(BailoutId ast_id); | 5535 uint32_t TranslateAstIdToPcOffset(BailoutId ast_id); |
5536 | 5536 |
5537 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, | 5537 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, |
5538 enum Age { | 5538 enum Age { |
| 5539 kToBeExecutedOnceCodeAge = -3, |
5539 kNotExecutedCodeAge = -2, | 5540 kNotExecutedCodeAge = -2, |
5540 kExecutedOnceCodeAge = -1, | 5541 kExecutedOnceCodeAge = -1, |
5541 kNoAgeCodeAge = 0, | 5542 kNoAgeCodeAge = 0, |
5542 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) | 5543 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) |
5543 kAfterLastCodeAge, | 5544 kAfterLastCodeAge, |
5544 kFirstCodeAge = kNotExecutedCodeAge, | 5545 kFirstCodeAge = kToBeExecutedOnceCodeAge, |
5545 kLastCodeAge = kAfterLastCodeAge - 1, | 5546 kLastCodeAge = kAfterLastCodeAge - 1, |
5546 kCodeAgeCount = kAfterLastCodeAge - kNotExecutedCodeAge - 1, | 5547 kCodeAgeCount = kAfterLastCodeAge - kFirstCodeAge - 1, |
5547 kIsOldCodeAge = kSexagenarianCodeAge, | 5548 kIsOldCodeAge = kSexagenarianCodeAge, |
5548 kPreAgedCodeAge = kIsOldCodeAge - 1 | 5549 kPreAgedCodeAge = kIsOldCodeAge - 1 |
5549 }; | 5550 }; |
5550 #undef DECLARE_CODE_AGE_ENUM | 5551 #undef DECLARE_CODE_AGE_ENUM |
5551 | 5552 |
5552 // Code aging. Indicates how many full GCs this code has survived without | 5553 // Code aging. Indicates how many full GCs this code has survived without |
5553 // being entered through the prologue. Used to determine when it is | 5554 // being entered through the prologue. Used to determine when it is |
5554 // relatively safe to flush this code object and replace it with the lazy | 5555 // relatively safe to flush this code object and replace it with the lazy |
5555 // compilation stub. | 5556 // compilation stub. |
5556 static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate); | 5557 static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate); |
5557 static void MarkCodeAsExecuted(byte* sequence, Isolate* isolate); | 5558 static void MarkCodeAsExecuted(byte* sequence, Isolate* isolate); |
5558 void MakeYoung(Isolate* isolate); | 5559 void MakeYoung(Isolate* isolate); |
| 5560 void MarkToBeExecutedOnce(Isolate* isolate); |
5559 void MakeOlder(MarkingParity); | 5561 void MakeOlder(MarkingParity); |
5560 static bool IsYoungSequence(Isolate* isolate, byte* sequence); | 5562 static bool IsYoungSequence(Isolate* isolate, byte* sequence); |
5561 bool IsOld(); | 5563 bool IsOld(); |
5562 Age GetAge(); | 5564 Age GetAge(); |
5563 // Gets the raw code age, including psuedo code-age values such as | |
5564 // kNotExecutedCodeAge and kExecutedOnceCodeAge. | |
5565 Age GetRawAge(); | |
5566 static inline Code* GetPreAgedCodeAgeStub(Isolate* isolate) { | 5565 static inline Code* GetPreAgedCodeAgeStub(Isolate* isolate) { |
5567 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY); | 5566 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY); |
5568 } | 5567 } |
5569 | 5568 |
5570 void PrintDeoptLocation(FILE* out, Address pc); | 5569 void PrintDeoptLocation(FILE* out, Address pc); |
5571 bool CanDeoptAt(Address pc); | 5570 bool CanDeoptAt(Address pc); |
5572 | 5571 |
5573 #ifdef VERIFY_HEAP | 5572 #ifdef VERIFY_HEAP |
5574 void VerifyEmbeddedObjectsDependency(); | 5573 void VerifyEmbeddedObjectsDependency(); |
5575 #endif | 5574 #endif |
(...skipping 5521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11097 } else { | 11096 } else { |
11098 value &= ~(1 << bit_position); | 11097 value &= ~(1 << bit_position); |
11099 } | 11098 } |
11100 return value; | 11099 return value; |
11101 } | 11100 } |
11102 }; | 11101 }; |
11103 | 11102 |
11104 } } // namespace v8::internal | 11103 } } // namespace v8::internal |
11105 | 11104 |
11106 #endif // V8_OBJECTS_H_ | 11105 #endif // V8_OBJECTS_H_ |
OLD | NEW |