Ignore:
Timestamp:
Sep 22, 2009, 5:40:58 PM (16 years ago)
Author:
[email protected]
Message:

Code sampling builds are broken.
https://bugs.webkit.org/show_bug.cgi?id=29662

Reviewed by Geoff Garen

Fix build.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Executable.h

    r47775 r48662  
    2828
    2929#include "JSFunction.h"
     30#include "Interpreter.h"
    3031#include "Nodes.h"
     32#include "SamplingTool.h"
    3133
    3234namespace JSC {
     
    103105    class ScriptExecutable : public ExecutableBase {
    104106    public:
    105         ScriptExecutable(const SourceCode& source)
     107        ScriptExecutable(JSGlobalData* globalData, const SourceCode& source)
    106108            : ExecutableBase(NUM_PARAMETERS_NOT_COMPILED)
    107109            , m_source(source)
    108110            , m_features(0)
    109111        {
     112#if ENABLE(CODEBLOCK_SAMPLING)
     113            if (SamplingTool* sampler = globalData->interpreter->sampler())
     114                sampler->notifyOfScope(this);
     115#else
     116            UNUSED_PARAM(globalData);
     117#endif
     118        }
     119
     120        ScriptExecutable(ExecState* exec, const SourceCode& source)
     121            : ExecutableBase(NUM_PARAMETERS_NOT_COMPILED)
     122            , m_source(source)
     123            , m_features(0)
     124        {
     125#if ENABLE(CODEBLOCK_SAMPLING)
     126            if (SamplingTool* sampler = exec->globalData().interpreter->sampler())
     127                sampler->notifyOfScope(this);
     128#else
     129            UNUSED_PARAM(exec);
     130#endif
    110131        }
    111132
     
    138159    class EvalExecutable : public ScriptExecutable {
    139160    public:
    140         EvalExecutable(const SourceCode& source)
    141             : ScriptExecutable(source)
     161        EvalExecutable(ExecState* exec, const SourceCode& source)
     162            : ScriptExecutable(exec, source)
    142163            , m_evalCodeBlock(0)
    143164        {
     
    158179
    159180        ExceptionInfo* reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*);
    160         static PassRefPtr<EvalExecutable> create(const SourceCode& source) { return adoptRef(new EvalExecutable(source)); }
     181        static PassRefPtr<EvalExecutable> create(ExecState* exec, const SourceCode& source) { return adoptRef(new EvalExecutable(exec, source)); }
    161182
    162183    private:
     
    179200    class ProgramExecutable : public ScriptExecutable {
    180201    public:
    181         ProgramExecutable(const SourceCode& source)
    182             : ScriptExecutable(source)
     202        ProgramExecutable(ExecState* exec, const SourceCode& source)
     203            : ScriptExecutable(exec, source)
    183204            , m_programCodeBlock(0)
    184205        {
     
    222243        friend class JIT;
    223244    public:
    224         static PassRefPtr<FunctionExecutable> create(const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
    225         {
    226             return adoptRef(new FunctionExecutable(name, source, forceUsesArguments, parameters, firstLine, lastLine));
     245        static PassRefPtr<FunctionExecutable> create(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
     246        {
     247            return adoptRef(new FunctionExecutable(exec, name, source, forceUsesArguments, parameters, firstLine, lastLine));
     248        }
     249
     250        static PassRefPtr<FunctionExecutable> create(JSGlobalData* globalData, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
     251        {
     252            return adoptRef(new FunctionExecutable(globalData, name, source, forceUsesArguments, parameters, firstLine, lastLine));
    227253        }
    228254
     
    264290
    265291    private:
    266         FunctionExecutable(const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
    267             : ScriptExecutable(source)
     292        FunctionExecutable(JSGlobalData* globalData, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
     293            : ScriptExecutable(globalData, source)
    268294            , m_forceUsesArguments(forceUsesArguments)
    269295            , m_parameters(parameters)
     
    276302        }
    277303
     304        FunctionExecutable(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
     305            : ScriptExecutable(exec, source)
     306            , m_forceUsesArguments(forceUsesArguments)
     307            , m_parameters(parameters)
     308            , m_codeBlock(0)
     309            , m_name(name)
     310            , m_numVariables(0)
     311        {
     312            m_firstLine = firstLine;
     313            m_lastLine = lastLine;
     314        }
     315
    278316        void compile(ExecState*, ScopeChainNode*);
    279317
Note: See TracChangeset for help on using the changeset viewer.