Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (167812 => 167813)
--- trunk/Source/_javascript_Core/ChangeLog 2014-04-25 18:17:46 UTC (rev 167812)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-04-25 18:51:20 UTC (rev 167813)
@@ -1,3 +1,20 @@
+2014-04-25 Oliver Hunt <[email protected]>
+
+ Remove unused parameter from codeblock linking function
+ https://bugs.webkit.org/show_bug.cgi?id=132199
+
+ Reviewed by Anders Carlsson.
+
+ No change in behaviour. This is just a small change to make it
+ slightly easier to reason about what the offsets in UnlinkedFunctionExecutable
+ actually mean.
+
+ * bytecode/UnlinkedCodeBlock.cpp:
+ (JSC::UnlinkedFunctionExecutable::link):
+ * bytecode/UnlinkedCodeBlock.h:
+ * runtime/Executable.cpp:
+ (JSC::ProgramExecutable::initializeGlobalProperties):
+
2014-04-25 Andreas Kling <[email protected]>
Mark some things with WTF_MAKE_FAST_ALLOCATED.
Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp (167812 => 167813)
--- trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp 2014-04-25 18:17:46 UTC (rev 167812)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp 2014-04-25 18:51:20 UTC (rev 167813)
@@ -124,15 +124,14 @@
visitor.append(&thisObject->m_symbolTableForConstruct);
}
-FunctionExecutable* UnlinkedFunctionExecutable::link(VM& vm, const SourceCode& source, size_t lineOffset, size_t sourceOffset)
+FunctionExecutable* UnlinkedFunctionExecutable::link(VM& vm, const SourceCode& source, size_t lineOffset)
{
unsigned firstLine = lineOffset + m_firstLineOffset;
- unsigned startOffset = sourceOffset + m_startOffset;
bool startColumnIsOnFirstSourceLine = !m_firstLineOffset;
unsigned startColumn = m_unlinkedBodyStartColumn + (startColumnIsOnFirstSourceLine ? source.startColumn() : 1);
bool endColumnIsOnStartLine = !m_lineCount;
unsigned endColumn = m_unlinkedBodyEndColumn + (endColumnIsOnStartLine ? startColumn : 1);
- SourceCode code(source.provider(), startOffset, startOffset + m_sourceLength, firstLine, startColumn);
+ SourceCode code(source.provider(), m_startOffset, m_startOffset + m_sourceLength, firstLine, startColumn);
return FunctionExecutable::create(vm, code, this, firstLine, firstLine + m_lineCount, startColumn, endColumn);
}
Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h (167812 => 167813)
--- trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h 2014-04-25 18:17:46 UTC (rev 167812)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h 2014-04-25 18:51:20 UTC (rev 167813)
@@ -132,7 +132,7 @@
static UnlinkedFunctionExecutable* fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, JSObject** exception);
- FunctionExecutable* link(VM&, const SourceCode&, size_t lineOffset, size_t sourceOffset);
+ FunctionExecutable* link(VM&, const SourceCode&, size_t lineOffset);
void clearCodeForRecompilation()
{
Modified: trunk/Source/_javascript_Core/runtime/Executable.cpp (167812 => 167813)
--- trunk/Source/_javascript_Core/runtime/Executable.cpp 2014-04-25 18:17:46 UTC (rev 167812)
+++ trunk/Source/_javascript_Core/runtime/Executable.cpp 2014-04-25 18:51:20 UTC (rev 167813)
@@ -485,7 +485,7 @@
for (size_t i = 0; i < functionDeclarations.size(); ++i) {
UnlinkedFunctionExecutable* unlinkedFunctionExecutable = functionDeclarations[i].second.get();
- JSValue value = JSFunction::create(vm, unlinkedFunctionExecutable->link(vm, m_source, lineNo(), 0), scope);
+ JSValue value = JSFunction::create(vm, unlinkedFunctionExecutable->link(vm, m_source, lineNo()), scope);
globalObject->addFunction(callFrame, functionDeclarations[i].first, value);
}