| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1938 // recently run) and continues. A young function is therefore one which has a | 1938 // recently run) and continues. A young function is therefore one which has a |
| 1939 // normal frame setup sequence, and an old function has a code age sequence | 1939 // normal frame setup sequence, and an old function has a code age sequence |
| 1940 // which calls a code ageing stub. | 1940 // which calls a code ageing stub. |
| 1941 | 1941 |
| 1942 // Set up a basic stack frame for young code (or code exempt from ageing) with | 1942 // Set up a basic stack frame for young code (or code exempt from ageing) with |
| 1943 // type FUNCTION. It may be patched later for code ageing support. This is | 1943 // type FUNCTION. It may be patched later for code ageing support. This is |
| 1944 // done by to Code::PatchPlatformCodeAge and EmitCodeAgeSequence. | 1944 // done by to Code::PatchPlatformCodeAge and EmitCodeAgeSequence. |
| 1945 // | 1945 // |
| 1946 // This function takes an Assembler so it can be called from either a | 1946 // This function takes an Assembler so it can be called from either a |
| 1947 // MacroAssembler or a PatchingAssembler context. | 1947 // MacroAssembler or a PatchingAssembler context. |
| 1948 static void EmitFrameSetupForCodeAgePatching(Assembler * assm); | 1948 static void EmitFrameSetupForCodeAgePatching(Assembler* assm); |
| 1949 | 1949 |
| 1950 // Call EmitFrameSetupForCodeAgePatching from a MacroAssembler context. | 1950 // Call EmitFrameSetupForCodeAgePatching from a MacroAssembler context. |
| 1951 void EmitFrameSetupForCodeAgePatching(); | 1951 void EmitFrameSetupForCodeAgePatching(); |
| 1952 | 1952 |
| 1953 // Emit a code age sequence that calls the relevant code age stub. The code | 1953 // Emit a code age sequence that calls the relevant code age stub. The code |
| 1954 // generated by this sequence is expected to replace the code generated by | 1954 // generated by this sequence is expected to replace the code generated by |
| 1955 // EmitFrameSetupForCodeAgePatching, and represents an old function. | 1955 // EmitFrameSetupForCodeAgePatching, and represents an old function. |
| 1956 // | 1956 // |
| 1957 // It never makes sense to call this other than in a patching context, so this | |
| 1958 // method only accepts a PatchingAssembler. | |
| 1959 // | |
| 1960 // If stub is NULL, this function generates the code age sequence but omits | 1957 // If stub is NULL, this function generates the code age sequence but omits |
| 1961 // the stub address that is normally embedded in the instruction stream. This | 1958 // the stub address that is normally embedded in the instruction stream. This |
| 1962 // can be used by debug code to verify code age sequences. | 1959 // can be used by debug code to verify code age sequences. |
| 1963 static void EmitCodeAgeSequence(PatchingAssembler * assm, Code * stub); | 1960 static void EmitCodeAgeSequence(Assembler* assm, Code* stub); |
| 1961 |
| 1962 // Call EmitCodeAgeSequence from a MacroAssembler context. |
| 1963 void EmitCodeAgeSequence(Code* stub); |
| 1964 | 1964 |
| 1965 // Return true if the sequence is a young sequence geneated by | 1965 // Return true if the sequence is a young sequence geneated by |
| 1966 // EmitFrameSetupForCodeAgePatching. Otherwise, this method asserts that the | 1966 // EmitFrameSetupForCodeAgePatching. Otherwise, this method asserts that the |
| 1967 // sequence is a code age sequence (emitted by EmitCodeAgeSequence). | 1967 // sequence is a code age sequence (emitted by EmitCodeAgeSequence). |
| 1968 static bool IsYoungSequence(byte* sequence); | 1968 static bool IsYoungSequence(byte* sequence); |
| 1969 | 1969 |
| 1970 #ifdef DEBUG | 1970 #ifdef DEBUG |
| 1971 // Return true if the sequence is a code age sequence generated by | 1971 // Return true if the sequence is a code age sequence generated by |
| 1972 // EmitCodeAgeSequence. | 1972 // EmitCodeAgeSequence. |
| 1973 static bool IsCodeAgeSequence(byte* sequence); | 1973 static bool IsCodeAgeSequence(byte* sequence); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2185 #error "Unsupported option" | 2185 #error "Unsupported option" |
| 2186 #define CODE_COVERAGE_STRINGIFY(x) #x | 2186 #define CODE_COVERAGE_STRINGIFY(x) #x |
| 2187 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2187 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 2188 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2188 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 2189 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2189 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 2190 #else | 2190 #else |
| 2191 #define ACCESS_MASM(masm) masm-> | 2191 #define ACCESS_MASM(masm) masm-> |
| 2192 #endif | 2192 #endif |
| 2193 | 2193 |
| 2194 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ | 2194 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ |
| OLD | NEW |