OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 5104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5115 DECLARE_PRINTER(Code) | 5115 DECLARE_PRINTER(Code) |
5116 DECLARE_VERIFIER(Code) | 5116 DECLARE_VERIFIER(Code) |
5117 | 5117 |
5118 void ClearInlineCaches(); | 5118 void ClearInlineCaches(); |
5119 void ClearTypeFeedbackCells(Heap* heap); | 5119 void ClearTypeFeedbackCells(Heap* heap); |
5120 | 5120 |
5121 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); | 5121 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); |
5122 | 5122 |
5123 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, | 5123 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, |
5124 enum Age { | 5124 enum Age { |
| 5125 kNotExecutedCodeAge = -2, |
| 5126 kExecutedOnceCodeAge = -1, |
5125 kNoAge = 0, | 5127 kNoAge = 0, |
5126 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) | 5128 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) |
5127 kAfterLastCodeAge, | 5129 kAfterLastCodeAge, |
5128 kLastCodeAge = kAfterLastCodeAge - 1, | 5130 kLastCodeAge = kAfterLastCodeAge - 1, |
5129 kCodeAgeCount = kAfterLastCodeAge - 1 | 5131 kCodeAgeCount = kAfterLastCodeAge - 1, |
| 5132 kIsOldCodeAge = kSexagenarianCodeAge, |
| 5133 kPreAgedCodeAge = kIsOldCodeAge - 1 |
5130 }; | 5134 }; |
5131 #undef DECLARE_CODE_AGE_ENUM | 5135 #undef DECLARE_CODE_AGE_ENUM |
5132 | 5136 |
5133 // Code aging. Indicates how many full GCs this code has survived without | 5137 // Code aging. Indicates how many full GCs this code has survived without |
5134 // being entered through the prologue. Used to determine when it is | 5138 // being entered through the prologue. Used to determine when it is |
5135 // relatively safe to flush this code object and replace it with the lazy | 5139 // relatively safe to flush this code object and replace it with the lazy |
5136 // compilation stub. | 5140 // compilation stub. |
5137 static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate); | 5141 static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate); |
| 5142 static void MarkCodeAsExecuted(byte* sequence, Isolate* isolate); |
5138 void MakeOlder(MarkingParity); | 5143 void MakeOlder(MarkingParity); |
5139 static bool IsYoungSequence(byte* sequence); | 5144 static bool IsYoungSequence(byte* sequence); |
5140 bool IsOld(); | 5145 bool IsOld(); |
5141 int GetAge(); | 5146 Age GetAge(); |
| 5147 static inline Code* GetPreAgedCodeAgeStub(Isolate* isolate) { |
| 5148 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY); |
| 5149 } |
5142 | 5150 |
5143 void PrintDeoptLocation(int bailout_id); | 5151 void PrintDeoptLocation(int bailout_id); |
5144 bool CanDeoptAt(Address pc); | 5152 bool CanDeoptAt(Address pc); |
5145 | 5153 |
5146 #ifdef VERIFY_HEAP | 5154 #ifdef VERIFY_HEAP |
5147 void VerifyEmbeddedMapsDependency(); | 5155 void VerifyEmbeddedMapsDependency(); |
5148 #endif | 5156 #endif |
5149 | 5157 |
5150 // Max loop nesting marker used to postpose OSR. We don't take loop | 5158 // Max loop nesting marker used to postpose OSR. We don't take loop |
5151 // nesting that is deeper than 5 levels into account. | 5159 // nesting that is deeper than 5 levels into account. |
(...skipping 5081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10233 } else { | 10241 } else { |
10234 value &= ~(1 << bit_position); | 10242 value &= ~(1 << bit_position); |
10235 } | 10243 } |
10236 return value; | 10244 return value; |
10237 } | 10245 } |
10238 }; | 10246 }; |
10239 | 10247 |
10240 } } // namespace v8::internal | 10248 } } // namespace v8::internal |
10241 | 10249 |
10242 #endif // V8_OBJECTS_H_ | 10250 #endif // V8_OBJECTS_H_ |
OLD | NEW |