OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 14338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14349 static bool IsOldAge(Code::Age age) { | 14349 static bool IsOldAge(Code::Age age) { |
14350 return age >= Code::kIsOldCodeAge || age == Code::kNotExecutedCodeAge; | 14350 return age >= Code::kIsOldCodeAge || age == Code::kNotExecutedCodeAge; |
14351 } | 14351 } |
14352 | 14352 |
14353 | 14353 |
14354 void Code::MakeYoung(Isolate* isolate) { | 14354 void Code::MakeYoung(Isolate* isolate) { |
14355 byte* sequence = FindCodeAgeSequence(); | 14355 byte* sequence = FindCodeAgeSequence(); |
14356 if (sequence != NULL) MakeCodeAgeSequenceYoung(sequence, isolate); | 14356 if (sequence != NULL) MakeCodeAgeSequenceYoung(sequence, isolate); |
14357 } | 14357 } |
14358 | 14358 |
| 14359 void Code::PreAge(Isolate* isolate) { |
| 14360 byte* sequence = FindCodeAgeSequence(); |
| 14361 if (sequence != NULL) { |
| 14362 PatchPlatformCodeAge(isolate, sequence, kPreAgedCodeAge, NO_MARKING_PARITY); |
| 14363 } |
| 14364 } |
14359 | 14365 |
14360 void Code::MarkToBeExecutedOnce(Isolate* isolate) { | 14366 void Code::MarkToBeExecutedOnce(Isolate* isolate) { |
14361 byte* sequence = FindCodeAgeSequence(); | 14367 byte* sequence = FindCodeAgeSequence(); |
14362 if (sequence != NULL) { | 14368 if (sequence != NULL) { |
14363 PatchPlatformCodeAge(isolate, sequence, kToBeExecutedOnceCodeAge, | 14369 PatchPlatformCodeAge(isolate, sequence, kToBeExecutedOnceCodeAge, |
14364 NO_MARKING_PARITY); | 14370 NO_MARKING_PARITY); |
14365 } | 14371 } |
14366 } | 14372 } |
14367 | 14373 |
14368 | |
14369 void Code::MakeOlder(MarkingParity current_parity) { | 14374 void Code::MakeOlder(MarkingParity current_parity) { |
14370 byte* sequence = FindCodeAgeSequence(); | 14375 byte* sequence = FindCodeAgeSequence(); |
14371 if (sequence != NULL) { | 14376 if (sequence != NULL) { |
14372 Age age; | 14377 Age age; |
14373 MarkingParity code_parity; | 14378 MarkingParity code_parity; |
14374 Isolate* isolate = GetIsolate(); | 14379 Isolate* isolate = GetIsolate(); |
14375 GetCodeAgeAndParity(isolate, sequence, &age, &code_parity); | 14380 GetCodeAgeAndParity(isolate, sequence, &age, &code_parity); |
14376 Age next_age = NextAge(age); | 14381 Age next_age = NextAge(age); |
14377 if (age != next_age && code_parity != current_parity) { | 14382 if (age != next_age && code_parity != current_parity) { |
14378 PatchPlatformCodeAge(isolate, sequence, next_age, current_parity); | 14383 PatchPlatformCodeAge(isolate, sequence, next_age, current_parity); |
(...skipping 5411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19790 if (cell->value() != *new_value) { | 19795 if (cell->value() != *new_value) { |
19791 cell->set_value(*new_value); | 19796 cell->set_value(*new_value); |
19792 Isolate* isolate = cell->GetIsolate(); | 19797 Isolate* isolate = cell->GetIsolate(); |
19793 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19798 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19794 isolate, DependentCode::kPropertyCellChangedGroup); | 19799 isolate, DependentCode::kPropertyCellChangedGroup); |
19795 } | 19800 } |
19796 } | 19801 } |
19797 | 19802 |
19798 } // namespace internal | 19803 } // namespace internal |
19799 } // namespace v8 | 19804 } // namespace v8 |
OLD | NEW |