summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/bytecode/CodeBlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/bytecode/CodeBlock.h')
-rw-r--r--Source/JavaScriptCore/bytecode/CodeBlock.h29
1 files changed, 8 insertions, 21 deletions
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h
index 1d56999ff..07d1e0a06 100644
--- a/Source/JavaScriptCore/bytecode/CodeBlock.h
+++ b/Source/JavaScriptCore/bytecode/CodeBlock.h
@@ -547,29 +547,16 @@ namespace JSC {
return needsFullScopeChain() && codeType() != GlobalCode;
}
- bool argumentsAreCaptured() const
- {
- return needsActivation() || usesArguments();
- }
-
- bool argumentIsCaptured(int) const
- {
- return argumentsAreCaptured();
- }
-
- bool localIsCaptured(InlineCallFrame* inlineCallFrame, int operand) const
- {
- if (!inlineCallFrame)
- return operand < m_numCapturedVars;
-
- return inlineCallFrame->capturedVars.get(operand);
- }
-
- bool isCaptured(InlineCallFrame* inlineCallFrame, int operand) const
+ bool isCaptured(int operand, InlineCallFrame* inlineCallFrame = 0) const
{
+ if (inlineCallFrame && !operandIsArgument(operand))
+ return inlineCallFrame->capturedVars.get(operand);
+
+ // Our estimate of argument capture is conservative.
if (operandIsArgument(operand))
- return argumentIsCaptured(operandToArgument(operand));
- return localIsCaptured(inlineCallFrame, operand);
+ return needsActivation() || usesArguments();
+
+ return operand < m_numCapturedVars;
}
CodeType codeType() const { return m_codeType; }