| 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 8816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8827 byte* sequence = FindCodeAgeSequence(); | 8827 byte* sequence = FindCodeAgeSequence(); |
| 8828 if (sequence == NULL) return false; | 8828 if (sequence == NULL) return false; |
| 8829 Age age; | 8829 Age age; |
| 8830 MarkingParity parity; | 8830 MarkingParity parity; |
| 8831 GetCodeAgeAndParity(sequence, &age, &parity); | 8831 GetCodeAgeAndParity(sequence, &age, &parity); |
| 8832 return age >= kSexagenarianCodeAge; | 8832 return age >= kSexagenarianCodeAge; |
| 8833 } | 8833 } |
| 8834 | 8834 |
| 8835 | 8835 |
| 8836 byte* Code::FindCodeAgeSequence() { | 8836 byte* Code::FindCodeAgeSequence() { |
| 8837 if (kind() != FUNCTION && kind() != OPTIMIZED_FUNCTION) return NULL; | 8837 return FLAG_age_code && |
| 8838 if (strlen(FLAG_stop_at) == 0 && | 8838 strlen(FLAG_stop_at) == 0 && |
| 8839 !ProfileEntryHookStub::HasEntryHook() && | 8839 !ProfileEntryHookStub::HasEntryHook() && |
| 8840 (kind() == FUNCTION && !has_debug_break_slots())) { | 8840 (kind() == OPTIMIZED_FUNCTION || |
| 8841 return FindPlatformCodeAgeSequence(); | 8841 (kind() == FUNCTION && !has_debug_break_slots())) |
| 8842 } | 8842 ? FindPlatformCodeAgeSequence() |
| 8843 return NULL; | 8843 : NULL; |
| 8844 } | 8844 } |
| 8845 | 8845 |
| 8846 | 8846 |
| 8847 void Code::GetCodeAgeAndParity(Code* code, Age* age, | 8847 void Code::GetCodeAgeAndParity(Code* code, Age* age, |
| 8848 MarkingParity* parity) { | 8848 MarkingParity* parity) { |
| 8849 Isolate* isolate = Isolate::Current(); | 8849 Isolate* isolate = Isolate::Current(); |
| 8850 Builtins* builtins = isolate->builtins(); | 8850 Builtins* builtins = isolate->builtins(); |
| 8851 Code* stub = NULL; | 8851 Code* stub = NULL; |
| 8852 #define HANDLE_CODE_AGE(AGE) \ | 8852 #define HANDLE_CODE_AGE(AGE) \ |
| 8853 stub = *builtins->Make##AGE##CodeYoungAgainEvenMarking(); \ | 8853 stub = *builtins->Make##AGE##CodeYoungAgainEvenMarking(); \ |
| (...skipping 5006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13860 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13860 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 13861 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13861 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 13862 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13862 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 13863 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13863 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 13864 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13864 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 13865 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13865 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 13866 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13866 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 13867 } | 13867 } |
| 13868 | 13868 |
| 13869 } } // namespace v8::internal | 13869 } } // namespace v8::internal |
| OLD | NEW |