summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGJITCompiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGJITCompiler.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGJITCompiler.h47
1 files changed, 7 insertions, 40 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGJITCompiler.h b/Source/JavaScriptCore/dfg/DFGJITCompiler.h
index 5596876fc..a0c68fe4b 100644
--- a/Source/JavaScriptCore/dfg/DFGJITCompiler.h
+++ b/Source/JavaScriptCore/dfg/DFGJITCompiler.h
@@ -92,11 +92,7 @@ public:
ASSERT_UNUSED(codeOriginIndex, codeOriginIndex < UINT_MAX);
ASSERT_UNUSED(codeOriginIndex, codeOriginIndex == m_codeOriginIndex);
}
-
- void assertNoCodeOriginIndex() const
- {
- ASSERT(m_codeOriginIndex == UINT_MAX);
- }
+
private:
#if !ASSERT_DISABLED
unsigned m_codeOriginIndex;
@@ -191,8 +187,8 @@ struct PropertyAccessRecord {
// call to be linked).
class JITCompiler : public CCallHelpers {
public:
- JITCompiler(JSGlobalData* globalData, Graph& dfg, CodeBlock* codeBlock)
- : CCallHelpers(globalData, codeBlock)
+ JITCompiler(Graph& dfg)
+ : CCallHelpers(&dfg.m_globalData, dfg.m_codeBlock)
, m_graph(dfg)
, m_currentCodeOriginIndex(0)
{
@@ -205,22 +201,16 @@ public:
Graph& graph() { return m_graph; }
// Just get a token for beginning a call.
- CallBeginToken nextCallBeginToken(CodeOrigin codeOrigin)
+ CallBeginToken beginJSCall()
{
- if (!codeOrigin.inlineCallFrame)
- return CallBeginToken();
return CallBeginToken(m_currentCodeOriginIndex++);
}
// Get a token for beginning a call, and set the current code origin index in
// the call frame.
- CallBeginToken beginCall(CodeOrigin codeOrigin)
+ CallBeginToken beginCall()
{
- unsigned codeOriginIndex;
- if (!codeOrigin.inlineCallFrame)
- codeOriginIndex = UINT_MAX;
- else
- codeOriginIndex = m_currentCodeOriginIndex++;
+ unsigned codeOriginIndex = m_currentCodeOriginIndex++;
store32(TrustedImm32(codeOriginIndex), tagFor(static_cast<VirtualRegister>(RegisterFile::ArgumentCount)));
return CallBeginToken(codeOriginIndex);
}
@@ -254,21 +244,6 @@ public:
m_exceptionChecks.append(CallExceptionRecord(functionCall, exceptionCheck, codeOrigin, token));
}
- // Helper methods to check nodes for constants.
- bool isConstant(NodeIndex nodeIndex) { return graph().isConstant(nodeIndex); }
- bool isJSConstant(NodeIndex nodeIndex) { return graph().isJSConstant(nodeIndex); }
- bool isInt32Constant(NodeIndex nodeIndex) { return graph().isInt32Constant(codeBlock(), nodeIndex); }
- bool isDoubleConstant(NodeIndex nodeIndex) { return graph().isDoubleConstant(codeBlock(), nodeIndex); }
- bool isNumberConstant(NodeIndex nodeIndex) { return graph().isNumberConstant(codeBlock(), nodeIndex); }
- bool isBooleanConstant(NodeIndex nodeIndex) { return graph().isBooleanConstant(codeBlock(), nodeIndex); }
- bool isFunctionConstant(NodeIndex nodeIndex) { return graph().isFunctionConstant(codeBlock(), nodeIndex); }
- // Helper methods get constant values from nodes.
- JSValue valueOfJSConstant(NodeIndex nodeIndex) { return graph().valueOfJSConstant(codeBlock(), nodeIndex); }
- int32_t valueOfInt32Constant(NodeIndex nodeIndex) { return graph().valueOfInt32Constant(codeBlock(), nodeIndex); }
- double valueOfNumberConstant(NodeIndex nodeIndex) { return graph().valueOfNumberConstant(codeBlock(), nodeIndex); }
- bool valueOfBooleanConstant(NodeIndex nodeIndex) { return graph().valueOfBooleanConstant(codeBlock(), nodeIndex); }
- JSFunction* valueOfFunctionConstant(NodeIndex nodeIndex) { return graph().valueOfFunctionConstant(codeBlock(), nodeIndex); }
-
// Helper methods to get predictions
PredictedType getPrediction(Node& node) { return node.prediction(); }
PredictedType getPrediction(NodeIndex nodeIndex) { return getPrediction(graph()[nodeIndex]); }
@@ -277,7 +252,7 @@ public:
#if USE(JSVALUE32_64)
void* addressOfDoubleConstant(NodeIndex nodeIndex)
{
- ASSERT(isNumberConstant(nodeIndex));
+ ASSERT(m_graph.isNumberConstant(nodeIndex));
unsigned constantIndex = graph()[nodeIndex].constantNumber();
return &(codeBlock()->constantRegister(FirstConstantRegisterIndex + constantIndex));
}
@@ -339,14 +314,6 @@ public:
#endif
}
- ValueProfile* valueProfileFor(NodeIndex nodeIndex)
- {
- if (nodeIndex == NoNode)
- return 0;
-
- return m_graph.valueProfileFor(nodeIndex, baselineCodeBlockFor(m_graph[nodeIndex].codeOrigin));
- }
-
private:
// Internal implementation to compile.
void compileEntry();