OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "accessors.h" | 7 #include "accessors.h" |
8 #include "allocation-site-scopes.h" | 8 #include "allocation-site-scopes.h" |
9 #include "api.h" | 9 #include "api.h" |
10 #include "arguments.h" | 10 #include "arguments.h" |
(...skipping 11242 matching lines...) Loading... |
11253 } | 11253 } |
11254 return age; | 11254 return age; |
11255 } | 11255 } |
11256 | 11256 |
11257 | 11257 |
11258 void Code::MakeOlder(MarkingParity current_parity) { | 11258 void Code::MakeOlder(MarkingParity current_parity) { |
11259 byte* sequence = FindCodeAgeSequence(); | 11259 byte* sequence = FindCodeAgeSequence(); |
11260 if (sequence != NULL) { | 11260 if (sequence != NULL) { |
11261 Age age; | 11261 Age age; |
11262 MarkingParity code_parity; | 11262 MarkingParity code_parity; |
11263 GetCodeAgeAndParity(sequence, &age, &code_parity); | 11263 Isolate* isolate = GetIsolate(); |
| 11264 GetCodeAgeAndParity(isolate, sequence, &age, &code_parity); |
11264 age = EffectiveAge(age); | 11265 age = EffectiveAge(age); |
11265 if (age != kLastCodeAge && code_parity != current_parity) { | 11266 if (age != kLastCodeAge && code_parity != current_parity) { |
11266 PatchPlatformCodeAge(GetIsolate(), | 11267 PatchPlatformCodeAge(isolate, |
11267 sequence, | 11268 sequence, |
11268 static_cast<Age>(age + 1), | 11269 static_cast<Age>(age + 1), |
11269 current_parity); | 11270 current_parity); |
11270 } | 11271 } |
11271 } | 11272 } |
11272 } | 11273 } |
11273 | 11274 |
11274 | 11275 |
11275 bool Code::IsOld() { | 11276 bool Code::IsOld() { |
11276 return GetAge() >= kIsOldCodeAge; | 11277 return GetAge() >= kIsOldCodeAge; |
(...skipping 15 matching lines...) Loading... |
11292 } | 11293 } |
11293 | 11294 |
11294 | 11295 |
11295 Code::Age Code::GetRawAge() { | 11296 Code::Age Code::GetRawAge() { |
11296 byte* sequence = FindCodeAgeSequence(); | 11297 byte* sequence = FindCodeAgeSequence(); |
11297 if (sequence == NULL) { | 11298 if (sequence == NULL) { |
11298 return kNoAgeCodeAge; | 11299 return kNoAgeCodeAge; |
11299 } | 11300 } |
11300 Age age; | 11301 Age age; |
11301 MarkingParity parity; | 11302 MarkingParity parity; |
11302 GetCodeAgeAndParity(sequence, &age, &parity); | 11303 GetCodeAgeAndParity(GetIsolate(), sequence, &age, &parity); |
11303 return age; | 11304 return age; |
11304 } | 11305 } |
11305 | 11306 |
11306 | 11307 |
11307 void Code::GetCodeAgeAndParity(Code* code, Age* age, | 11308 void Code::GetCodeAgeAndParity(Code* code, Age* age, |
11308 MarkingParity* parity) { | 11309 MarkingParity* parity) { |
11309 Isolate* isolate = code->GetIsolate(); | 11310 Isolate* isolate = code->GetIsolate(); |
11310 Builtins* builtins = isolate->builtins(); | 11311 Builtins* builtins = isolate->builtins(); |
11311 Code* stub = NULL; | 11312 Code* stub = NULL; |
11312 #define HANDLE_CODE_AGE(AGE) \ | 11313 #define HANDLE_CODE_AGE(AGE) \ |
(...skipping 5930 matching lines...) Loading... |
17243 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17244 #define ERROR_MESSAGES_TEXTS(C, T) T, |
17244 static const char* error_messages_[] = { | 17245 static const char* error_messages_[] = { |
17245 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17246 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
17246 }; | 17247 }; |
17247 #undef ERROR_MESSAGES_TEXTS | 17248 #undef ERROR_MESSAGES_TEXTS |
17248 return error_messages_[reason]; | 17249 return error_messages_[reason]; |
17249 } | 17250 } |
17250 | 17251 |
17251 | 17252 |
17252 } } // namespace v8::internal | 17253 } } // namespace v8::internal |
OLD | NEW |