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 8857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8868 if (sequence == NULL) return false; | 8868 if (sequence == NULL) return false; |
8869 Age age; | 8869 Age age; |
8870 MarkingParity parity; | 8870 MarkingParity parity; |
8871 GetCodeAgeAndParity(sequence, &age, &parity); | 8871 GetCodeAgeAndParity(sequence, &age, &parity); |
8872 return age >= kSexagenarianCodeAge; | 8872 return age >= kSexagenarianCodeAge; |
8873 } | 8873 } |
8874 | 8874 |
8875 | 8875 |
8876 byte* Code::FindCodeAgeSequence() { | 8876 byte* Code::FindCodeAgeSequence() { |
8877 return FLAG_age_code && | 8877 return FLAG_age_code && |
8878 strlen(FLAG_stop_at) == 0 && | 8878 prologue_offset() != kPrologueOffsetNotSet && |
8879 !ProfileEntryHookStub::HasEntryHook() && | |
8880 (kind() == OPTIMIZED_FUNCTION || | 8879 (kind() == OPTIMIZED_FUNCTION || |
8881 (kind() == FUNCTION && !has_debug_break_slots())) | 8880 (kind() == FUNCTION && !has_debug_break_slots())) |
8882 ? FindPlatformCodeAgeSequence() | 8881 ? instruction_start() + prologue_offset() |
8883 : NULL; | 8882 : NULL; |
8884 } | 8883 } |
8885 | 8884 |
8886 | 8885 |
8887 void Code::GetCodeAgeAndParity(Code* code, Age* age, | 8886 void Code::GetCodeAgeAndParity(Code* code, Age* age, |
8888 MarkingParity* parity) { | 8887 MarkingParity* parity) { |
8889 Isolate* isolate = Isolate::Current(); | 8888 Isolate* isolate = Isolate::Current(); |
8890 Builtins* builtins = isolate->builtins(); | 8889 Builtins* builtins = isolate->builtins(); |
8891 Code* stub = NULL; | 8890 Code* stub = NULL; |
8892 #define HANDLE_CODE_AGE(AGE) \ | 8891 #define HANDLE_CODE_AGE(AGE) \ |
(...skipping 4989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13882 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13881 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
13883 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13882 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
13884 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13883 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
13885 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13884 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
13886 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13885 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
13887 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13886 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
13888 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13887 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
13889 } | 13888 } |
13890 | 13889 |
13891 } } // namespace v8::internal | 13890 } } // namespace v8::internal |
OLD | NEW |