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 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 virtual bool SometimesSetsUpAFrame() { return false; } | 1164 virtual bool SometimesSetsUpAFrame() { return false; } |
1165 | 1165 |
1166 // Generates a call to the entry hook if it's enabled. | 1166 // Generates a call to the entry hook if it's enabled. |
1167 static void MaybeCallEntryHook(MacroAssembler* masm); | 1167 static void MaybeCallEntryHook(MacroAssembler* masm); |
1168 | 1168 |
1169 // Sets or unsets the entry hook function. Returns true on success, | 1169 // Sets or unsets the entry hook function. Returns true on success, |
1170 // false on an attempt to replace a non-NULL entry hook with another | 1170 // false on an attempt to replace a non-NULL entry hook with another |
1171 // non-NULL hook. | 1171 // non-NULL hook. |
1172 static bool SetFunctionEntryHook(FunctionEntryHook entry_hook); | 1172 static bool SetFunctionEntryHook(FunctionEntryHook entry_hook); |
1173 | 1173 |
| 1174 static bool HasEntryHook() { return entry_hook_ != NULL; } |
| 1175 |
1174 private: | 1176 private: |
1175 static void EntryHookTrampoline(intptr_t function, | 1177 static void EntryHookTrampoline(intptr_t function, |
1176 intptr_t stack_pointer); | 1178 intptr_t stack_pointer); |
1177 | 1179 |
1178 Major MajorKey() { return ProfileEntryHook; } | 1180 Major MajorKey() { return ProfileEntryHook; } |
1179 int MinorKey() { return 0; } | 1181 int MinorKey() { return 0; } |
1180 | 1182 |
1181 void Generate(MacroAssembler* masm); | 1183 void Generate(MacroAssembler* masm); |
1182 | 1184 |
1183 // The current function entry hook. | 1185 // The current function entry hook. |
1184 static FunctionEntryHook entry_hook_; | 1186 static FunctionEntryHook entry_hook_; |
1185 | 1187 |
1186 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 1188 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
1187 }; | 1189 }; |
1188 | 1190 |
1189 } } // namespace v8::internal | 1191 } } // namespace v8::internal |
1190 | 1192 |
1191 #endif // V8_CODE_STUBS_H_ | 1193 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |