diff options
Diffstat (limited to 'Source/JavaScriptCore/interpreter/StackVisitor.h')
| -rw-r--r-- | Source/JavaScriptCore/interpreter/StackVisitor.h | 43 |
1 files changed, 8 insertions, 35 deletions
diff --git a/Source/JavaScriptCore/interpreter/StackVisitor.h b/Source/JavaScriptCore/interpreter/StackVisitor.h index 0036a789c..990a226b3 100644 --- a/Source/JavaScriptCore/interpreter/StackVisitor.h +++ b/Source/JavaScriptCore/interpreter/StackVisitor.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013, 2015 Apple Inc. All rights reserved. + * Copyright (C) 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,7 +26,6 @@ #ifndef StackVisitor_h #define StackVisitor_h -#include "VMEntryRecord.h" #include <wtf/text/WTFString.h> namespace JSC { @@ -34,12 +33,12 @@ namespace JSC { struct CodeOrigin; struct InlineCallFrame; +class Arguments; class CodeBlock; class ExecState; class JSFunction; class JSObject; class JSScope; -class ClonedArguments; class Register; typedef ExecState CallFrame; @@ -57,9 +56,9 @@ public: size_t index() const { return m_index; } size_t argumentCountIncludingThis() const { return m_argumentCountIncludingThis; } - bool callerIsVMEntryFrame() const { return m_callerIsVMEntryFrame; } CallFrame* callerFrame() const { return m_callerFrame; } JSObject* callee() const { return m_callee; } + JSScope* scope() const { return m_scope; } CodeBlock* codeBlock() const { return m_codeBlock; } unsigned bytecodeOffset() const { return m_bytecodeOffset; } #if ENABLE(DFG_JIT) @@ -78,11 +77,13 @@ public: CodeType codeType() const; JS_EXPORT_PRIVATE void computeLineAndColumn(unsigned& line, unsigned& column); - ClonedArguments* createArguments(); - VMEntryFrame* vmEntryFrame() const { return m_VMEntryFrame; } + Arguments* createArguments(); + Arguments* existingArguments(); CallFrame* callFrame() const { return m_callFrame; } +#ifndef NDEBUG JS_EXPORT_PRIVATE void print(int indentLevel); +#endif private: Frame() { } @@ -93,13 +94,11 @@ public: size_t m_index; size_t m_argumentCountIncludingThis; - VMEntryFrame* m_VMEntryFrame; - VMEntryFrame* m_CallerVMEntryFrame; CallFrame* m_callerFrame; JSObject* m_callee; + JSScope* m_scope; CodeBlock* m_codeBlock; unsigned m_bytecodeOffset; - bool m_callerIsVMEntryFrame; #if ENABLE(DFG_JIT) InlineCallFrame* m_inlineCallFrame; #endif @@ -145,32 +144,6 @@ private: Frame m_frame; }; -class CallerFunctor { -public: - CallerFunctor() - : m_hasSkippedFirstFrame(false) - , m_callerFrame(0) - { - } - - CallFrame* callerFrame() const { return m_callerFrame; } - - StackVisitor::Status operator()(StackVisitor& visitor) - { - if (!m_hasSkippedFirstFrame) { - m_hasSkippedFirstFrame = true; - return StackVisitor::Continue; - } - - m_callerFrame = visitor->callFrame(); - return StackVisitor::Done; - } - -private: - bool m_hasSkippedFirstFrame; - CallFrame* m_callerFrame; -}; - } // namespace JSC #endif // StackVisitor_h |
