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 55 matching lines...) Loading... |
66 V(ArgumentsAccess) \ | 66 V(ArgumentsAccess) \ |
67 V(RegExpConstructResult) \ | 67 V(RegExpConstructResult) \ |
68 V(NumberToString) \ | 68 V(NumberToString) \ |
69 V(CEntry) \ | 69 V(CEntry) \ |
70 V(JSEntry) \ | 70 V(JSEntry) \ |
71 V(KeyedLoadElement) \ | 71 V(KeyedLoadElement) \ |
72 V(KeyedStoreElement) \ | 72 V(KeyedStoreElement) \ |
73 V(DebuggerStatement) \ | 73 V(DebuggerStatement) \ |
74 V(StringDictionaryLookup) \ | 74 V(StringDictionaryLookup) \ |
75 V(ElementsTransitionAndStore) \ | 75 V(ElementsTransitionAndStore) \ |
76 V(StoreArrayLiteralElement) | 76 V(StoreArrayLiteralElement) \ |
| 77 V(ProfileEntryHook) |
77 | 78 |
78 // List of code stubs only used on ARM platforms. | 79 // List of code stubs only used on ARM platforms. |
79 #ifdef V8_TARGET_ARCH_ARM | 80 #ifdef V8_TARGET_ARCH_ARM |
80 #define CODE_STUB_LIST_ARM(V) \ | 81 #define CODE_STUB_LIST_ARM(V) \ |
81 V(GetProperty) \ | 82 V(GetProperty) \ |
82 V(SetProperty) \ | 83 V(SetProperty) \ |
83 V(InvokeBuiltin) \ | 84 V(InvokeBuiltin) \ |
84 V(RegExpCEntry) \ | 85 V(RegExpCEntry) \ |
85 V(DirectCEntry) | 86 V(DirectCEntry) |
86 #else | 87 #else |
(...skipping 1048 matching lines...) Loading... |
1135 | 1136 |
1136 private: | 1137 private: |
1137 Major MajorKey() { return StoreArrayLiteralElement; } | 1138 Major MajorKey() { return StoreArrayLiteralElement; } |
1138 int MinorKey() { return 0; } | 1139 int MinorKey() { return 0; } |
1139 | 1140 |
1140 void Generate(MacroAssembler* masm); | 1141 void Generate(MacroAssembler* masm); |
1141 | 1142 |
1142 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub); | 1143 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub); |
1143 }; | 1144 }; |
1144 | 1145 |
| 1146 |
| 1147 class ProfileEntryHookStub : public CodeStub { |
| 1148 public: |
| 1149 explicit ProfileEntryHookStub() {} |
| 1150 |
| 1151 // The profile entry hook function is not allowed to cause a GC. |
| 1152 virtual bool SometimesSetsUpAFrame() { return false; } |
| 1153 |
| 1154 // Generates a call to the entry hook if it's enabled. |
| 1155 static void MaybeCallEntryHook(MacroAssembler* masm); |
| 1156 |
| 1157 // Sets or unsets the entry hook function. Returns true on success, |
| 1158 // false on an attempt to replace a non-NULL entry hook with another |
| 1159 // non-NULL hook. |
| 1160 static bool SetFunctionEntryHook(FunctionEntryHook entry_hook); |
| 1161 |
| 1162 private: |
| 1163 static void EntryHookTrampoline(intptr_t function, |
| 1164 intptr_t stack_pointer); |
| 1165 |
| 1166 Major MajorKey() { return ProfileEntryHook; } |
| 1167 int MinorKey() { return 0; } |
| 1168 |
| 1169 void Generate(MacroAssembler* masm); |
| 1170 |
| 1171 // The current function entry hook. |
| 1172 static FunctionEntryHook entry_hook_; |
| 1173 |
| 1174 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
| 1175 }; |
| 1176 |
1145 } } // namespace v8::internal | 1177 } } // namespace v8::internal |
1146 | 1178 |
1147 #endif // V8_CODE_STUBS_H_ | 1179 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |