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...) Expand 10 before | Expand all | Expand 10 after 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) | |
78 | 77 |
79 // List of code stubs only used on ARM platforms. | 78 // List of code stubs only used on ARM platforms. |
80 #ifdef V8_TARGET_ARCH_ARM | 79 #ifdef V8_TARGET_ARCH_ARM |
81 #define CODE_STUB_LIST_ARM(V) \ | 80 #define CODE_STUB_LIST_ARM(V) \ |
82 V(GetProperty) \ | 81 V(GetProperty) \ |
83 V(SetProperty) \ | 82 V(SetProperty) \ |
84 V(InvokeBuiltin) \ | 83 V(InvokeBuiltin) \ |
85 V(RegExpCEntry) \ | 84 V(RegExpCEntry) \ |
86 V(DirectCEntry) | 85 V(DirectCEntry) |
87 #else | 86 #else |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 | 1135 |
1137 private: | 1136 private: |
1138 Major MajorKey() { return StoreArrayLiteralElement; } | 1137 Major MajorKey() { return StoreArrayLiteralElement; } |
1139 int MinorKey() { return 0; } | 1138 int MinorKey() { return 0; } |
1140 | 1139 |
1141 void Generate(MacroAssembler* masm); | 1140 void Generate(MacroAssembler* masm); |
1142 | 1141 |
1143 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub); | 1142 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub); |
1144 }; | 1143 }; |
1145 | 1144 |
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 | |
1177 } } // namespace v8::internal | 1145 } } // namespace v8::internal |
1178 | 1146 |
1179 #endif // V8_CODE_STUBS_H_ | 1147 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |