CodeBlock refactoring broke profile dumping
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Sep 2013 02:02:47 +0000 (02:02 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Sep 2013 02:02:47 +0000 (02:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=120551

Reviewed by Michael Saboff.

Fix the bug, and did a big clean-up of how Executable returns CodeBlocks. A lot
of the problems we have with code like CodeBlock::baselineVersion() is that we
were trying *way too hard* to side-step the fact that Executable can't return a
CodeBlock*. Previously it could only return CodeBlock&, so if it didn't have a
CodeBlock yet, you were screwed. And if you didn't know, or weren't sure, if it
did have a CodeBlock, you were really going to have a bad time. Also it really
bugs me that the methods were called generatedBytecode(). In all other contexts
if you ask for a CodeBlock, then method to call is codeBlock(). So I made all
of those changes.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::baselineVersion):
(JSC::ProgramCodeBlock::replacement):
(JSC::EvalCodeBlock::replacement):
(JSC::FunctionCodeBlock::replacement):
(JSC::CodeBlock::globalObjectFor):
* bytecode/CodeOrigin.cpp:
(JSC::InlineCallFrame::hash):
* dfg/DFGOperations.cpp:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
* jit/JITCode.h:
(JSC::JITCode::isExecutableScript):
(JSC::JITCode::isLowerTier):
* jit/JITStubs.cpp:
(JSC::lazyLinkFor):
(JSC::DEFINE_STUB_FUNCTION):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::traceFunctionPrologue):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setUpCall):
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::arityCheckFor):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::installCode):
* runtime/Executable.h:
(JSC::EvalExecutable::codeBlock):
(JSC::ProgramExecutable::codeBlock):
(JSC::FunctionExecutable::eitherCodeBlock):
(JSC::FunctionExecutable::codeBlockForCall):
(JSC::FunctionExecutable::codeBlockForConstruct):
(JSC::FunctionExecutable::codeBlockFor):
* runtime/FunctionExecutableDump.cpp:
(JSC::FunctionExecutableDump::dump):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154935 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/bytecode/CodeOrigin.cpp
Source/JavaScriptCore/dfg/DFGOperations.cpp
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/JavaScriptCore/jit/JITCode.h
Source/JavaScriptCore/jit/JITStubs.cpp
Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
Source/JavaScriptCore/runtime/ArrayPrototype.cpp
Source/JavaScriptCore/runtime/CommonSlowPaths.h
Source/JavaScriptCore/runtime/Executable.cpp
Source/JavaScriptCore/runtime/Executable.h
Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp

index 31d9d7c..c7a00da 100644 (file)
@@ -1,3 +1,60 @@
+2013-08-30  Filip Pizlo  <fpizlo@apple.com>
+
+        CodeBlock refactoring broke profile dumping
+        https://bugs.webkit.org/show_bug.cgi?id=120551
+
+        Reviewed by Michael Saboff.
+        
+        Fix the bug, and did a big clean-up of how Executable returns CodeBlocks. A lot
+        of the problems we have with code like CodeBlock::baselineVersion() is that we
+        were trying *way too hard* to side-step the fact that Executable can't return a
+        CodeBlock*. Previously it could only return CodeBlock&, so if it didn't have a
+        CodeBlock yet, you were screwed. And if you didn't know, or weren't sure, if it
+        did have a CodeBlock, you were really going to have a bad time. Also it really
+        bugs me that the methods were called generatedBytecode(). In all other contexts
+        if you ask for a CodeBlock, then method to call is codeBlock(). So I made all
+        of those changes.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::baselineVersion):
+        (JSC::ProgramCodeBlock::replacement):
+        (JSC::EvalCodeBlock::replacement):
+        (JSC::FunctionCodeBlock::replacement):
+        (JSC::CodeBlock::globalObjectFor):
+        * bytecode/CodeOrigin.cpp:
+        (JSC::InlineCallFrame::hash):
+        * dfg/DFGOperations.cpp:
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::execute):
+        (JSC::Interpreter::executeCall):
+        (JSC::Interpreter::executeConstruct):
+        (JSC::Interpreter::prepareForRepeatCall):
+        * jit/JITCode.h:
+        (JSC::JITCode::isExecutableScript):
+        (JSC::JITCode::isLowerTier):
+        * jit/JITStubs.cpp:
+        (JSC::lazyLinkFor):
+        (JSC::DEFINE_STUB_FUNCTION):
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::traceFunctionPrologue):
+        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+        (JSC::LLInt::setUpCall):
+        * runtime/ArrayPrototype.cpp:
+        (JSC::isNumericCompareFunction):
+        * runtime/CommonSlowPaths.h:
+        (JSC::CommonSlowPaths::arityCheckFor):
+        * runtime/Executable.cpp:
+        (JSC::ScriptExecutable::installCode):
+        * runtime/Executable.h:
+        (JSC::EvalExecutable::codeBlock):
+        (JSC::ProgramExecutable::codeBlock):
+        (JSC::FunctionExecutable::eitherCodeBlock):
+        (JSC::FunctionExecutable::codeBlockForCall):
+        (JSC::FunctionExecutable::codeBlockForConstruct):
+        (JSC::FunctionExecutable::codeBlockFor):
+        * runtime/FunctionExecutableDump.cpp:
+        (JSC::FunctionExecutableDump::dump):
+
 2013-08-30  Oliver Hunt  <oliver@apple.com>
 
         Implement ES6 Set class
index aa1a4df..a2aecc7 100644 (file)
@@ -2363,22 +2363,18 @@ void CodeBlock::stronglyVisitWeakReferences(SlotVisitor& visitor)
 
 CodeBlock* CodeBlock::baselineVersion()
 {
-#if ENABLE(JIT)
-    // When we're initializing the original baseline code block, we won't be able
-    // to get its replacement. But we'll know that it's the original baseline code
-    // block because it won't have JIT code yet and it won't have an alternative.
-    if (jitType() == JITCode::None && !alternative())
+    if (JITCode::isBaselineCode(jitType()))
         return this;
-    
+#if ENABLE(JIT)
     CodeBlock* result = replacement();
-    ASSERT(result);
     while (result->alternative())
         result = result->alternative();
-    ASSERT(result);
-    ASSERT(JITCode::isBaselineCode(result->jitType()));
+    RELEASE_ASSERT(result);
+    RELEASE_ASSERT(JITCode::isBaselineCode(result->jitType()));
     return result;
 #else
-    return this;
+    RELEASE_ASSERT_NOT_REACHED();
+    return 0;
 #endif
 }
 
@@ -2712,17 +2708,17 @@ void CodeBlock::reoptimize()
 
 CodeBlock* ProgramCodeBlock::replacement()
 {
-    return &static_cast<ProgramExecutable*>(ownerExecutable())->generatedBytecode();
+    return jsCast<ProgramExecutable*>(ownerExecutable())->codeBlock();
 }
 
 CodeBlock* EvalCodeBlock::replacement()
 {
-    return &static_cast<EvalExecutable*>(ownerExecutable())->generatedBytecode();
+    return jsCast<EvalExecutable*>(ownerExecutable())->codeBlock();
 }
 
 CodeBlock* FunctionCodeBlock::replacement()
 {
-    return &static_cast<FunctionExecutable*>(ownerExecutable())->generatedBytecodeFor(m_isConstructor ? CodeForConstruct : CodeForCall);
+    return jsCast<FunctionExecutable*>(ownerExecutable())->codeBlockFor(m_isConstructor ? CodeForConstruct : CodeForCall);
 }
 
 DFG::CapabilityLevel ProgramCodeBlock::capabilityLevelInternal()
@@ -2773,7 +2769,7 @@ JSGlobalObject* CodeBlock::globalObjectFor(CodeOrigin codeOrigin)
 {
     if (!codeOrigin.inlineCallFrame)
         return globalObject();
-    return jsCast<FunctionExecutable*>(codeOrigin.inlineCallFrame->executable.get())->generatedBytecode().globalObject();
+    return jsCast<FunctionExecutable*>(codeOrigin.inlineCallFrame->executable.get())->eitherCodeBlock()->globalObject();
 }
 
 void CodeBlock::noticeIncomingCall(ExecState* callerFrame)
index cfebd47..52a9483 100644 (file)
@@ -89,8 +89,8 @@ JSFunction* InlineCallFrame::calleeForCallFrame(ExecState* exec) const
 
 CodeBlockHash InlineCallFrame::hash() const
 {
-    return jsCast<FunctionExecutable*>(executable.get())->generatedBytecodeFor(
-        specializationKind()).hash();
+    return jsCast<FunctionExecutable*>(executable.get())->codeBlockFor(
+        specializationKind())->hash();
 }
 
 CString InlineCallFrame::inferredName() const
index 9fc975c..802c7e6 100644 (file)
@@ -1286,7 +1286,7 @@ inline char* linkFor(ExecState* execCallee, CodeSpecializationKind kind)
             vm->throwException(exec, createStackOverflowError(exec));
             return reinterpret_cast<char*>(vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress());
         }
-        codeBlock = &functionExecutable->generatedBytecodeFor(kind);
+        codeBlock = functionExecutable->codeBlockFor(kind);
         if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()))
             codePtr = functionExecutable->generatedJITCodeWithArityCheckFor(kind);
         else
@@ -1361,7 +1361,7 @@ static bool attemptToOptimizeClosureCall(ExecState* execCallee, JSCell* calleeAs
     if (callee->executable()->isHostFunction())
         codeBlock = 0;
     else {
-        codeBlock = &jsCast<FunctionExecutable*>(callee->executable())->generatedBytecodeForCall();
+        codeBlock = jsCast<FunctionExecutable*>(callee->executable())->codeBlockForCall();
         if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()))
             return false;
     }
index 5005725..1d5b514 100644 (file)
@@ -737,7 +737,7 @@ failedJSONP:
     if (JSObject* error = program->prepareForExecution(callFrame, scope, CodeForCall))
         return checkedReturn(callFrame->vm().throwException(callFrame, error));
 
-    ProgramCodeBlock* codeBlock = &program->generatedBytecode();
+    ProgramCodeBlock* codeBlock = program->codeBlock();
 
     if (UNLIKELY(vm.watchdog.didFire(callFrame)))
         return throwTerminatedExecutionException(callFrame);
@@ -807,7 +807,7 @@ JSValue Interpreter::executeCall(CallFrame* callFrame, JSObject* function, CallT
         if (UNLIKELY(!!compileError)) {
             return checkedReturn(callFrame->vm().throwException(callFrame, compileError));
         }
-        newCodeBlock = &callData.js.functionExecutable->generatedBytecodeForCall();
+        newCodeBlock = callData.js.functionExecutable->codeBlockForCall();
         ASSERT(!!newCodeBlock);
         newCodeBlock->m_shouldAlwaysBeInlined = false;
     } else
@@ -886,7 +886,7 @@ JSObject* Interpreter::executeConstruct(CallFrame* callFrame, JSObject* construc
         if (UNLIKELY(!!compileError)) {
             return checkedReturn(callFrame->vm().throwException(callFrame, compileError));
         }
-        newCodeBlock = &constructData.js.functionExecutable->generatedBytecodeForConstruct();
+        newCodeBlock = constructData.js.functionExecutable->codeBlockForConstruct();
         ASSERT(!!newCodeBlock);
         newCodeBlock->m_shouldAlwaysBeInlined = false;
     } else
@@ -961,7 +961,7 @@ CallFrameClosure Interpreter::prepareForRepeatCall(FunctionExecutable* functionE
         callFrame->vm().throwException(callFrame, error);
         return CallFrameClosure();
     }
-    CodeBlock* newCodeBlock = &functionExecutable->generatedBytecodeForCall();
+    CodeBlock* newCodeBlock = functionExecutable->codeBlockForCall();
     newCodeBlock->m_shouldAlwaysBeInlined = false;
 
     size_t argsCount = argumentCountIncludingThis;
@@ -1075,7 +1075,7 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSValue
     JSObject* compileError = eval->prepareForExecution(callFrame, scope, CodeForCall);
     if (UNLIKELY(!!compileError))
         return checkedReturn(callFrame->vm().throwException(callFrame, compileError));
-    EvalCodeBlock* codeBlock = &eval->generatedBytecode();
+    EvalCodeBlock* codeBlock = eval->codeBlock();
 
     if (numVariables || numFunctions) {
         BatchedTransitionOptimizer optimizer(vm, variableObject);
index 1101144..3b4a631 100644 (file)
@@ -80,6 +80,17 @@ public:
         }
     }
     
+    static bool isExecutableScript(JITType jitType)
+    {
+        switch (jitType) {
+        case None:
+        case HostCallThunk:
+            return false;
+        default:
+            return true;
+        }
+    }
+    
     static bool couldBeInterpreted(JITType jitType)
     {
         switch (jitType) {
@@ -105,8 +116,8 @@ public:
     
     static bool isLowerTier(JITType expectedLower, JITType expectedHigher)
     {
-        RELEASE_ASSERT(isJIT(expectedLower));
-        RELEASE_ASSERT(isJIT(expectedHigher));
+        RELEASE_ASSERT(isExecutableScript(expectedLower));
+        RELEASE_ASSERT(isExecutableScript(expectedHigher));
         return expectedLower < expectedHigher;
     }
     
index 64c39b7..559dda4 100644 (file)
@@ -1276,7 +1276,7 @@ inline void* lazyLinkFor(CallFrame* callFrame, CodeSpecializationKind kind)
             callFrame->vm().throwException(callFrame, error);
             return 0;
         }
-        codeBlock = &functionExecutable->generatedBytecodeFor(kind);
+        codeBlock = functionExecutable->codeBlockFor(kind);
         if (callFrame->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters())
             || callLinkInfo->callType == CallLinkInfo::CallVarargs)
             codePtr = functionExecutable->generatedJITCodeWithArityCheckFor(kind);
@@ -1335,7 +1335,7 @@ DEFINE_STUB_FUNCTION(void*, vm_lazyLinkClosureCall)
         ASSERT(executable->hasJITCodeForCall());
         codePtr = executable->generatedJITCodeForCall()->addressForCall();
         if (!callee->executable()->isHostFunction()) {
-            calleeCodeBlock = &jsCast<FunctionExecutable*>(executable)->generatedBytecodeForCall();
+            calleeCodeBlock = jsCast<FunctionExecutable*>(executable)->codeBlockForCall();
             if (callFrame->argumentCountIncludingThis() < static_cast<size_t>(calleeCodeBlock->numParameters())) {
                 shouldLink = false;
                 codePtr = executable->generatedJITCodeWithArityCheckFor(CodeForCall);
index 259a7e8..ea92731 100644 (file)
@@ -212,7 +212,7 @@ static void traceFunctionPrologue(ExecState* exec, const char* comment, CodeSpec
 {
     JSFunction* callee = jsCast<JSFunction*>(exec->callee());
     FunctionExecutable* executable = callee->jsExecutable();
-    CodeBlock* codeBlock = &executable->generatedBytecodeFor(kind);
+    CodeBlock* codeBlock = executable->codeBlockFor(kind);
     dataLogF("%p / %p: in %s of function %p, executable %p; numVars = %u, numParameters = %u, numCalleeRegisters = %u, caller = %p.\n",
             codeBlock, exec, comment, callee, executable,
             codeBlock->m_numVars, codeBlock->numParameters(), codeBlock->m_numCalleeRegisters,
@@ -351,22 +351,22 @@ LLINT_SLOW_PATH_DECL(entry_osr)
 
 LLINT_SLOW_PATH_DECL(entry_osr_function_for_call)
 {
-    return entryOSR(exec, pc, &jsCast<JSFunction*>(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForCall), "entry_osr_function_for_call", Prologue);
+    return entryOSR(exec, pc, jsCast<JSFunction*>(exec->callee())->jsExecutable()->codeBlockForCall(), "entry_osr_function_for_call", Prologue);
 }
 
 LLINT_SLOW_PATH_DECL(entry_osr_function_for_construct)
 {
-    return entryOSR(exec, pc, &jsCast<JSFunction*>(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForConstruct), "entry_osr_function_for_construct", Prologue);
+    return entryOSR(exec, pc, jsCast<JSFunction*>(exec->callee())->jsExecutable()->codeBlockForConstruct(), "entry_osr_function_for_construct", Prologue);
 }
 
 LLINT_SLOW_PATH_DECL(entry_osr_function_for_call_arityCheck)
 {
-    return entryOSR(exec, pc, &jsCast<JSFunction*>(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForCall), "entry_osr_function_for_call_arityCheck", ArityCheck);
+    return entryOSR(exec, pc, jsCast<JSFunction*>(exec->callee())->jsExecutable()->codeBlockForCall(), "entry_osr_function_for_call_arityCheck", ArityCheck);
 }
 
 LLINT_SLOW_PATH_DECL(entry_osr_function_for_construct_arityCheck)
 {
-    return entryOSR(exec, pc, &jsCast<JSFunction*>(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForConstruct), "entry_osr_function_for_construct_arityCheck", ArityCheck);
+    return entryOSR(exec, pc, jsCast<JSFunction*>(exec->callee())->jsExecutable()->codeBlockForConstruct(), "entry_osr_function_for_construct_arityCheck", ArityCheck);
 }
 
 LLINT_SLOW_PATH_DECL(loop_osr)
@@ -1017,7 +1017,7 @@ inline SlowPathReturnType setUpCall(ExecState* execCallee, Instruction* pc, Code
         JSObject* error = functionExecutable->prepareForExecution(execCallee, callee->scope(), kind);
         if (error)
             LLINT_CALL_THROW(execCallee->callerFrame(), pc, error);
-        codeBlock = &functionExecutable->generatedBytecodeFor(kind);
+        codeBlock = functionExecutable->codeBlockFor(kind);
         ASSERT(codeBlock);
         if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()))
             codePtr = functionExecutable->jsCodeWithArityCheckEntryFor(kind);
index 4582c99..2f8ddba 100644 (file)
@@ -82,7 +82,7 @@ static inline bool isNumericCompareFunction(ExecState* exec, CallType callType,
     if (error)
         return false;
 
-    return executable->generatedBytecodeForCall().isNumericCompareFunction();
+    return executable->codeBlockForCall()->isNumericCompareFunction();
 }
 
 // ------------------------------ ArrayPrototype ----------------------------
index 2665aa3..96fc8a7 100644 (file)
@@ -49,7 +49,7 @@ ALWAYS_INLINE int arityCheckFor(ExecState* exec, JSStack* stack, CodeSpecializat
 {
     JSFunction* callee = jsCast<JSFunction*>(exec->callee());
     ASSERT(!callee->isHostFunction());
-    CodeBlock* newCodeBlock = &callee->jsExecutable()->generatedBytecodeFor(kind);
+    CodeBlock* newCodeBlock = callee->jsExecutable()->codeBlockFor(kind);
     int argumentCountIncludingThis = exec->argumentCountIncludingThis();
     
     // This ensures enough space for the worst case scenario of zero arguments passed by the caller.
index ae35d7d..a1d6d31 100644 (file)
@@ -116,6 +116,7 @@ void ScriptExecutable::destroy(JSCell* cell)
 void ScriptExecutable::installCode(CodeBlock* genericCodeBlock)
 {
     RELEASE_ASSERT(genericCodeBlock->ownerExecutable() == this);
+    RELEASE_ASSERT(JITCode::isExecutableScript(genericCodeBlock->jitType()));
     
     VM& vm = *genericCodeBlock->vm();
     
index a031bb4..0cb3bb9 100644 (file)
@@ -449,10 +449,9 @@ public:
     void jettisonOptimizedCode(VM&);
 #endif
 
-    EvalCodeBlock& generatedBytecode()
+    EvalCodeBlock* codeBlock()
     {
-        ASSERT(m_evalCodeBlock);
-        return *m_evalCodeBlock;
+        return m_evalCodeBlock.get();
     }
 
     static EvalExecutable* create(ExecState*, const SourceCode&, bool isInStrictContext);
@@ -511,10 +510,9 @@ public:
     void jettisonOptimizedCode(VM&);
 #endif
 
-    ProgramCodeBlock& generatedBytecode()
+    ProgramCodeBlock* codeBlock()
     {
-        ASSERT(m_programCodeBlock);
-        return *m_programCodeBlock;
+        return m_programCodeBlock.get();
     }
 
     JSObject* checkSyntax(ExecState*);
@@ -576,12 +574,11 @@ public:
     // Returns either call or construct bytecode. This can be appropriate
     // for answering questions that that don't vary between call and construct --
     // for example, argumentsRegister().
-    FunctionCodeBlock& generatedBytecode()
+    FunctionCodeBlock* eitherCodeBlock()
     {
         if (m_codeBlockForCall)
-            return *m_codeBlockForCall;
-        ASSERT(m_codeBlockForConstruct);
-        return *m_codeBlockForConstruct;
+            return m_codeBlockForCall.get();
+        return m_codeBlockForConstruct.get();
     }
         
 #if ENABLE(JIT)
@@ -593,10 +590,9 @@ public:
         return m_codeBlockForCall;
     }
 
-    FunctionCodeBlock& generatedBytecodeForCall()
+    FunctionCodeBlock* codeBlockForCall()
     {
-        ASSERT(m_codeBlockForCall);
-        return *m_codeBlockForCall;
+        return m_codeBlockForCall.get();
     }
 
 #if ENABLE(JIT)
@@ -608,10 +604,9 @@ public:
         return m_codeBlockForConstruct;
     }
 
-    FunctionCodeBlock& generatedBytecodeForConstruct()
+    FunctionCodeBlock* codeBlockForConstruct()
     {
-        ASSERT(m_codeBlockForConstruct);
-        return *m_codeBlockForConstruct;
+        return m_codeBlockForConstruct.get();
     }
         
 #if ENABLE(JIT)
@@ -634,12 +629,12 @@ public:
         return isGeneratedForConstruct();
     }
         
-    FunctionCodeBlock& generatedBytecodeFor(CodeSpecializationKind kind)
+    FunctionCodeBlock* codeBlockFor(CodeSpecializationKind kind)
     {
         if (kind == CodeForCall)
-            return generatedBytecodeForCall();
+            return codeBlockForCall();
         ASSERT(kind == CodeForConstruct);
-        return generatedBytecodeForConstruct();
+        return codeBlockForConstruct();
     }
 
     FunctionCodeBlock* baselineCodeBlockFor(CodeSpecializationKind);
@@ -673,14 +668,6 @@ public:
 private:
     FunctionExecutable(VM&, const SourceCode&, UnlinkedFunctionExecutable*, unsigned firstLine, unsigned lastLine, unsigned startColumn);
 
-    RefPtr<FunctionCodeBlock>& codeBlockFor(CodeSpecializationKind kind)
-    {
-        if (kind == CodeForCall)
-            return m_codeBlockForCall;
-        ASSERT(kind == CodeForConstruct);
-        return m_codeBlockForConstruct;
-    }
     bool isCompiling()
     {
 #if ENABLE(JIT)
index a885272..d0583fc 100644 (file)
@@ -34,12 +34,12 @@ void FunctionExecutableDump::dump(PrintStream& out) const
 {
     out.print(m_executable->inferredName().string(), "#");
     if (m_executable->isGeneratedForCall())
-        out.print(m_executable->generatedBytecodeForCall().hash());
+        out.print(m_executable->codeBlockForCall()->hash());
     else
         out.print("<nogen>");
     out.print("/");
     if (m_executable->isGeneratedForConstruct())
-        out.print(m_executable->generatedBytecodeForConstruct().hash());
+        out.print(m_executable->codeBlockForConstruct()->hash());
     else
         out.print("<nogen>");
     out.print(":[", RawPointer(m_executable), "]");