| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index 5a076d2f1387fba5b3d16f7b9935867aab99a5f9..f19063230a7d953d7dabe5c152c6e0eaf8798bc9 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -73,7 +73,8 @@ namespace internal {
|
| V(DebuggerStatement) \
|
| V(StringDictionaryLookup) \
|
| V(ElementsTransitionAndStore) \
|
| - V(StoreArrayLiteralElement)
|
| + V(StoreArrayLiteralElement) \
|
| + V(ProfileEntryHook)
|
|
|
| // List of code stubs only used on ARM platforms.
|
| #ifdef V8_TARGET_ARCH_ARM
|
| @@ -1142,6 +1143,37 @@ class StoreArrayLiteralElementStub : public CodeStub {
|
| DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub);
|
| };
|
|
|
| +
|
| +class ProfileEntryHookStub : public CodeStub {
|
| + public:
|
| + explicit ProfileEntryHookStub() {}
|
| +
|
| + // The profile entry hook function is not allowed to cause a GC.
|
| + virtual bool SometimesSetsUpAFrame() { return false; }
|
| +
|
| + // Generates a call to the entry hook if it's enabled.
|
| + static void MaybeCallEntryHook(MacroAssembler* masm);
|
| +
|
| + // Sets or unsets the entry hook function. Returns true on success,
|
| + // false on an attempt to replace a non-NULL entry hook with another
|
| + // non-NULL hook.
|
| + static bool SetFunctionEntryHook(FunctionEntryHook entry_hook);
|
| +
|
| + private:
|
| + static void EntryHookTrampoline(intptr_t function,
|
| + intptr_t stack_pointer);
|
| +
|
| + Major MajorKey() { return ProfileEntryHook; }
|
| + int MinorKey() { return 0; }
|
| +
|
| + void Generate(MacroAssembler* masm);
|
| +
|
| + // The current function entry hook.
|
| + static FunctionEntryHook entry_hook_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
|
| +};
|
| +
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_CODE_STUBS_H_
|
|
|