Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (136862 => 136863)
--- trunk/Source/_javascript_Core/ChangeLog 2012-12-06 19:33:33 UTC (rev 136862)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-12-06 19:34:27 UTC (rev 136863)
@@ -1,3 +1,19 @@
+2012-12-06 Oliver Hunt <[email protected]>
+
+ Build fix, last patch rolled out logic that is now needed on ToT.
+
+ * parser/ASTBuilder.h:
+ (ASTBuilder):
+ (JSC::ASTBuilder::setFunctionStart):
+ * parser/Nodes.h:
+ (JSC::FunctionBodyNode::setFunctionStart):
+ (JSC::FunctionBodyNode::functionStart):
+ (FunctionBodyNode):
+ * parser/Parser.cpp:
+ (JSC::::parseFunctionInfo):
+ * parser/SyntaxChecker.h:
+ (JSC::SyntaxChecker::setFunctionStart):
+
2012-12-05 Oliver Hunt <[email protected]>
Remove harmful string->function cache
Modified: trunk/Source/_javascript_Core/parser/ASTBuilder.h (136862 => 136863)
--- trunk/Source/_javascript_Core/parser/ASTBuilder.h 2012-12-06 19:33:33 UTC (rev 136862)
+++ trunk/Source/_javascript_Core/parser/ASTBuilder.h 2012-12-06 19:34:27 UTC (rev 136863)
@@ -267,6 +267,11 @@
{
return FunctionBodyNode::create(m_globalData, location, inStrictContext);
}
+
+ void setFunctionStart(FunctionBodyNode* body, int functionStart)
+ {
+ body->setFunctionStart(functionStart);
+ }
template <bool> PropertyNode* createGetterOrSetterProperty(const JSTokenLocation& location, PropertyNode::Type type, const Identifier* name, ParameterNode* params, FunctionBodyNode* body, int openBracePos, int closeBracePos, int bodyStartLine, int bodyEndLine)
{
Modified: trunk/Source/_javascript_Core/parser/Nodes.h (136862 => 136863)
--- trunk/Source/_javascript_Core/parser/Nodes.h 2012-12-06 19:33:33 UTC (rev 136862)
+++ trunk/Source/_javascript_Core/parser/Nodes.h 2012-12-06 19:34:27 UTC (rev 136863)
@@ -1424,6 +1424,9 @@
bool functionNameIsInScope() { return m_functionNameIsInScopeToggle == FunctionNameIsInScope; }
FunctionNameIsInScopeToggle functionNameIsInScopeToggle() { return m_functionNameIsInScopeToggle; }
+ void setFunctionStart(int functionStart) { m_functionStart = functionStart; }
+ int functionStart() const { return m_functionStart; }
+
static const bool scopeIsFunction = true;
private:
@@ -1434,6 +1437,7 @@
Identifier m_inferredName;
FunctionNameIsInScopeToggle m_functionNameIsInScopeToggle;
RefPtr<FunctionParameters> m_parameters;
+ int m_functionStart;
};
class FuncExprNode : public ExpressionNode {
Modified: trunk/Source/_javascript_Core/parser/Parser.cpp (136862 => 136863)
--- trunk/Source/_javascript_Core/parser/Parser.cpp 2012-12-06 19:33:33 UTC (rev 136862)
+++ trunk/Source/_javascript_Core/parser/Parser.cpp 2012-12-06 19:34:27 UTC (rev 136863)
@@ -842,6 +842,7 @@
failIfFalse(popScope(functionScope, TreeBuilder::NeedsFreeVariableInfo));
closeBracePos = cachedInfo->closeBracePos;
+ context.setFunctionStart(body, functionStart);
m_token = cachedInfo->closeBraceToken();
m_lexer->setOffset(m_token.m_location.endOffset);
m_lexer->setLineNumber(m_token.m_location.line);
@@ -869,6 +870,7 @@
newInfo = adoptPtr(new SourceProviderCacheItem(functionStart, m_token.m_location.line, closeBracePos));
functionScope->saveFunctionInfo(newInfo.get());
}
+ context.setFunctionStart(body, functionStart);
failIfFalse(popScope(functionScope, TreeBuilder::NeedsFreeVariableInfo));
matchOrFail(CLOSEBRACE);
Modified: trunk/Source/_javascript_Core/parser/SyntaxChecker.h (136862 => 136863)
--- trunk/Source/_javascript_Core/parser/SyntaxChecker.h 2012-12-06 19:33:33 UTC (rev 136862)
+++ trunk/Source/_javascript_Core/parser/SyntaxChecker.h 2012-12-06 19:34:27 UTC (rev 136863)
@@ -151,6 +151,7 @@
ExpressionType createAssignResolve(const JSTokenLocation&, const Identifier&, ExpressionType, int, int, int) { return AssignmentExpr; }
ExpressionType createFunctionExpr(const JSTokenLocation&, const Identifier*, int, int, int, int, int, int) { return FunctionExpr; }
int createFunctionBody(const JSTokenLocation&, bool) { return 1; }
+ void setFunctionStart(int, int) { }
int createArguments() { return 1; }
int createArguments(int) { return 1; }
int createArgumentsList(const JSTokenLocation&, int) { return 1; }