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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
921 Address pc, | 921 Address pc, |
922 BackEdgeState target_state, | 922 BackEdgeState target_state, |
923 Code* replacement_code); | 923 Code* replacement_code); |
924 | 924 |
925 // Change all patched back edges back to normal interrupts. | 925 // Change all patched back edges back to normal interrupts. |
926 static void Revert(Isolate* isolate, | 926 static void Revert(Isolate* isolate, |
927 Code* unoptimized_code); | 927 Code* unoptimized_code); |
928 | 928 |
929 // Change a back edge patched for on-stack replacement to perform a | 929 // Change a back edge patched for on-stack replacement to perform a |
930 // stack check first. | 930 // stack check first. |
931 static void AddStackCheck(CompilationInfo* info); | 931 static void AddStackCheck(Code* code, uint32_t pc_offset); |
titzer
2013/12/09 14:49:28
Why not a Handle<Code>?
| |
932 | 932 |
933 // Remove the stack check, if available, and replace by on-stack replacement. | 933 // Revert the patch by AddStackCheck. |
934 static void RemoveStackCheck(CompilationInfo* info); | 934 static void RemoveStackCheck(CompilationInfo* info); |
titzer
2013/12/09 14:49:28
And why does this one take a CompilationInfo? Does
Yang
2013/12/10 11:22:04
This removes only the one added in AddStackCheck.
titzer
2013/12/17 15:27:55
I think Add and Remove should be symmetric, and ne
Yang
2013/12/17 16:31:33
Made the signatures symmetrical.
| |
935 | 935 |
936 // Return the current patch state of the back edge. | 936 // Return the current patch state of the back edge. |
937 static BackEdgeState GetBackEdgeState(Isolate* isolate, | 937 static BackEdgeState GetBackEdgeState(Isolate* isolate, |
938 Code* unoptimized_code, | 938 Code* unoptimized_code, |
939 Address pc_after); | 939 Address pc_after); |
940 | 940 |
941 #ifdef DEBUG | 941 #ifdef DEBUG |
942 // Verify that all back edges of a certain loop depth are patched. | 942 // Verify that all back edges of a certain loop depth are patched. |
943 static bool Verify(Isolate* isolate, | 943 static bool Verify(Isolate* isolate, |
944 Code* unoptimized_code, | 944 Code* unoptimized_code, |
(...skipping 14 matching lines...) Expand all Loading... | |
959 | 959 |
960 Address start_; | 960 Address start_; |
961 Address instruction_start_; | 961 Address instruction_start_; |
962 uint32_t length_; | 962 uint32_t length_; |
963 }; | 963 }; |
964 | 964 |
965 | 965 |
966 } } // namespace v8::internal | 966 } } // namespace v8::internal |
967 | 967 |
968 #endif // V8_FULL_CODEGEN_H_ | 968 #endif // V8_FULL_CODEGEN_H_ |
OLD | NEW |