From 8b637bb680022adfddad653280734877951535a9 Mon Sep 17 00:00:00 2001 From: Apple Date: Thu, 12 Feb 2015 19:39:56 +0000 Subject: [PATCH] JavaScriptCore-1218.0.1.tar.gz --- ChangeLog | 3565 -- ChangeLog-2002-12-03 | 2271 - ChangeLog-2003-10-25 | 1483 - ChangeLog-2007-10-14 | 26221 --------- ChangeLog-2008-08-10 | 31482 ---------- ChangeLog-2009-06-16 | 39978 ------------- ChangeLog-2010-05-24 | 28211 --------- ChangeLog-2011-02-16 | 24628 -------- ChangeLog-2012-05-22 | 70902 ----------------------- ChangeLog-2012-10-02 | 20888 ------- ChangeLog-2013-04-24 | 29044 ---------- ChangeLog-PEP | 15646 ----- ChangeLog-PEP-2009-02-25 | 10415 ---- Configurations/FeatureDefines.xcconfig | 2 +- disassembler/udis86/ud_opcode.pyc | Bin 0 -> 7370 bytes disassembler/udis86/ud_optable.pyc | Bin 0 -> 2863 bytes 16 files changed, 1 insertion(+), 304735 deletions(-) delete mode 100644 ChangeLog delete mode 100644 ChangeLog-2002-12-03 delete mode 100644 ChangeLog-2003-10-25 delete mode 100644 ChangeLog-2007-10-14 delete mode 100644 ChangeLog-2008-08-10 delete mode 100644 ChangeLog-2009-06-16 delete mode 100644 ChangeLog-2010-05-24 delete mode 100644 ChangeLog-2011-02-16 delete mode 100644 ChangeLog-2012-05-22 delete mode 100644 ChangeLog-2012-10-02 delete mode 100644 ChangeLog-2013-04-24 delete mode 100644 ChangeLog-PEP delete mode 100644 ChangeLog-PEP-2009-02-25 create mode 100644 disassembler/udis86/ud_opcode.pyc create mode 100644 disassembler/udis86/ud_optable.pyc diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 799f50a..0000000 --- a/ChangeLog +++ /dev/null @@ -1,3565 +0,0 @@ -2013-07-18 Andreas Kling - - CodeBlock DFG entry list isn't getting shrunk-to-fit after linking. - - - - Reviewed by Geoffrey Garen. - - Move the CodeBlock::shrinkToFit() call out of JITCompiler::link() and to the call sites - so SpeculativeJIT::linkOSREntries() can fill in CodeBlock::m_dfgData->osrEntry first. - - 886 kB progression on - - * dfg/DFGJITCompiler.cpp: - (JSC::DFG::JITCompiler::link): - (JSC::DFG::JITCompiler::compile): - (JSC::DFG::JITCompiler::compileFunction): - -2013-07-18 Andreas Kling - - CodeBlock::m_argumentValueProfiles wastes a lot of memory. - - - - Reviewed by Anders Carlsson. - - Use Vector::resizeToFit() for CodeBlock::m_argumentValueProfiles. We don't need any padding - for growth, since we won't be appending to it anyway. - - 921 KB progression on - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::setNumParameters): - -2013-07-16 Mark Hahnenberg - - Remove reference to JSValueStructSupport.h from JSExport.h - https://bugs.webkit.org/show_bug.cgi?id=118746 - - Reviewed by Filip Pizlo. - - * API/JSExport.h: No such header exists, so it doesn't make sense to reference it. - -2013-07-17 Lucas Forschler - - Rollout r152600 - -2013-07-17 Lucas Forschler - - Merge r152600 - - 2013-07-12 Brent Fulgham - - [Windows] Build correction after r152573/r152577. - https://bugs.webkit.org/show_bug.cgi?id=118610 - - Reviewed by Oliver Hunt. - - * jit/JITThunks.cpp: - (JSC::JITThunks::hostFunctionStub): Hand-feed MSVC++ the fact that we want the second - argument of the make_pair to be a function pointer. - -2013-07-17 Lucas Forschler - - Merge r152742 - - 2013-07-16 Filip Pizlo - - MakeRope fixup shouldn't lead to an Identity without kids - https://bugs.webkit.org/show_bug.cgi?id=118745 - - Reviewed by Mark Hahnenberg. - - Make the empty string pruning part of fixupMakeRope() stop if it's on the last child. - - Make Node::convertToIdentity release-assert that it has exactly one kid. - - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupMakeRope): - * dfg/DFGNode.h: - (JSC::DFG::Node::convertToIdentity): - -2013-07-15 Lucas Forschler - - Merge r152613 - - 2013-07-13 Commit Queue - - Unreviewed, rolling out r151978. - http://trac.webkit.org/changeset/151978 - https://bugs.webkit.org/show_bug.cgi?id=118651 - - Caused regressions at least 3 websites (Requested by rniwa on - #webkit). - - * runtime/JSCJSValue.h: - * runtime/JSString.h: - -2013-07-15 Lucas Forschler - - Merge r152577 - - 2013-07-11 Oliver Hunt - - Attempt to fix the windows build. - - * jit/JITThunks.cpp: - (JSC::JITThunks::hostFunctionStub): - * jit/JITThunks.h: - -2013-07-15 Lucas Forschler - - Merge r152573 - - 2013-07-10 Oliver Hunt - - NativeExecutable cache needs to use both call and construct functions for key - https://bugs.webkit.org/show_bug.cgi?id=118545 - - Reviewed by Geoffrey Garen. - - Make the native executable cache make use a key pair so we don't decide to - treat all subsequent functions as not being constructors. - - * jit/JITThunks.cpp: - (JSC::JITThunks::hostFunctionStub): - * jit/JITThunks.h: - * runtime/JSBoundFunction.cpp: - (JSC::JSBoundFunction::create): - * runtime/JSCell.cpp: - (JSC::JSCell::getCallData): - (JSC::JSCell::getConstructData): - -2013-07-09 Lucas Forschler - - Merge r152497 - - 2013-07-09 Mark Lam - - Gardening to unbreak builds on the Windows bot. - - Not reviewed. - - * parser/ParserTokens.h: - -2013-07-09 Lucas Forschler - - Merge r152494 - - 2013-07-09 Mark Lam - - Fix 30% JSBench regression (caused by adding column numbers to stack traces). - https://bugs.webkit.org/show_bug.cgi?id=118481. - - Reviewed by Mark Hahnenberg and Geoffrey Garen. - - Previously, we already capture ExpressionRangeInfo that provides a divot for - each bytecode that can potentially throw an exception (and therefore generate - a stack trace). On first attempt to compute column numbers, we then do a walk - of the source string to record all line start positions in a table associated - with the SourceProvider. The column number can then be computed as - divot - lineStartFor(bytecodeOffset). - - The computation of this lineStarts table is the source of the 30% JSBench - performance regression. - - The new code now records lineStarts as the lexer and parser scans the source - code. These lineStarts are then used to compute the column number for the - given divot, and stored in the ExpressionRangeInfo. Similarly, we also capture - the line number at the divot point and store that in the ExpressionRangeInfo. - Hence, to look up line and column numbers, we now lookup the ExpressionRangeInfo - for the bytecodeOffset, and then compute the line and column from the values - stored in the expression info. - - The strategy: - 1. We want to minimize perturbations to the lexer and parser. Specifically, - the changes added should not change how it scans code, and generate bytecode. - 2. We regard the divot as the source character position we are interested - in. As such, we'll capture line and lineStart (for column) at the point - when we capture the divot information. This ensures that the 3 values are - consistent. - - How the change is done: - 1. Change the lexer to track lineStarts. - 2. Change the parser to capture line and lineStarts at the point of capturing - divots. - 3. Change the parser and associated code to plumb these values all the way to - the point that the correspoinding ExpressionRangeInfo is emitted. - 4. Propagate and record SourceCode firstLine and firstLineColumnOffset to the - the necessary places so that we can add them as needed when reifying - UnlinkedCodeBlocks into CodeBlocks. - 5. Compress the line and column number values in the ExpressionRangeInfo. In - practice, we seldom have both large line and column numbers. Hence, we can - encode both in an uint32_t most of the time. For the times when we encounter - both large line and column numbers, we have a fallback to store the "fat" - position info. - 6. Emit an ExpressionRangeInfo for UnaryOp nodes to get more line and column - number coverage. - 7. Change the interpreter to use the new way of computing line and column. - 8. Delete old line and column computation code that is now unused. - - Misc details: - - the old lexer was tracking both a startOffset and charPosition where - charPosition equals startOffset - SourceCode.startOffset. We now use - startOffset exclusively throughout the system for consistency. - All offset values (including lineStart) are relative to the start of the - SourceProvider string. These values will only be converted to be relative - to the SourceCode.startOffset at the very last minute i.e. when the divot - is stored into the ExpressionRangeInfo. - - This change to use the same offset system everywhere reduces confusion - from having to convert back and forth between the 2 systems. It also - enables a lot of assertions to be used. - - - Also fixed some bugs in the choice of divot positions to use. For example, - both Eval and Function expressions previously used column numbers from - the start of the expression but used the line number at the end of the - expression. This is now fixed to use either the start or end positions - as appropriate, but not a mix of line and columns from both. - - - Why use ints instead of unsigneds for offsets and lineStarts inside the - lexer and parser? - Some tests (e.g. fast/js/call-base-resolution.html and - fast/js/eval-cross-window.html) has shown that lineStart offsets can be - prior to the SourceCode.startOffset. Keeping the lexer offsets as ints - simplifies computations and makes it easier to maintain the assertions - that (startOffset >= lineStartOffset). - - However, column and line numbers are always unsigned when we publish - them to the ExpressionRangeInfo. The ints are only used inside the - lexer and parser ... well, and bytecode generator. - - - For all cases, lineStart is always captured where the divot is captured. - However, some sputnik conformance tests have shown that we cannot honor - line breaks for assignment statements like the following: - - eval("x\u000A*=\u000A-1;"); - - In this case, the lineStart is expected to be captured at the start of - the assignment expression instead of at the divot point in the middle. - The assignment expression is the only special case for this. - - This patch has been tested against the full layout tests both with release - and debug builds with no regression. - - * API/JSContextRef.cpp: - (JSContextCreateBacktrace): - - Updated to use the new StackFrame::computeLineAndColumn(). - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - - Added m_firstLineColumnOffset initialization. - - Plumbed the firstLineColumnOffset into the SourceCode. - - Initialized column for op_debug using the new way. - (JSC::CodeBlock::lineNumberForBytecodeOffset): - - Changed to compute line number using the ExpressionRangeInfo. - (JSC::CodeBlock::columnNumberForBytecodeOffset): Added - - Changed to compute column number using the ExpressionRangeInfo. - (JSC::CodeBlock::expressionRangeForBytecodeOffset): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::firstLineColumnOffset): - (JSC::GlobalCodeBlock::GlobalCodeBlock): - - Plumbed firstLineColumnOffset through to the super class. - (JSC::ProgramCodeBlock::ProgramCodeBlock): - - Plumbed firstLineColumnOffset through to the super class. - (JSC::EvalCodeBlock::EvalCodeBlock): - - Plumbed firstLineColumnOffset through to the super class. - But for EvalCodeBlocks, the firstLineColumnOffset is always 1 - because we're starting with a new source string with no start - offset. - (JSC::FunctionCodeBlock::FunctionCodeBlock): - - Plumbed firstLineColumnOffset through to the super class. - - * bytecode/ExpressionRangeInfo.h: - - Added modes for encoding line and column into a single 30-bit - unsigned. The encoding is in 1 of 3 modes: - 1. FatLineMode: 22-bit line, 8-bit column - 2. FatColumnMode: 8-bit line, 22-bit column - 3. FatLineAndColumnMode: 32-bit line, 32-bit column - (JSC::ExpressionRangeInfo::encodeFatLineMode): Added. - - Encodes line and column into the 30-bit position using FatLine mode. - (JSC::ExpressionRangeInfo::encodeFatColumnMode): Added. - - Encodes line and column into the 30-bit position using FatColumn mode. - (JSC::ExpressionRangeInfo::decodeFatLineMode): Added. - - Decodes the FatLine mode 30-bit position into line and column. - (JSC::ExpressionRangeInfo::decodeFatColumnMode): Added. - - Decodes the FatColumn mode 30-bit position into line and column. - - * bytecode/UnlinkedCodeBlock.cpp: - (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): - - Plumbed startColumn through. - (JSC::UnlinkedFunctionExecutable::link): - - Plumbed startColumn through. - (JSC::UnlinkedCodeBlock::lineNumberForBytecodeOffset): - - Computes a line number using the new way. - (JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset): - - Added decoding of line and column. - - Added handling of the case when we do not find a fitting expression - range info for a specified bytecodeOffset. This only happens if the - bytecodeOffset is below the first expression range info. In that - case, we'll use the first expression range info entry. - (JSC::UnlinkedCodeBlock::addExpressionInfo): - - Added encoding of line and column. - - * bytecode/UnlinkedCodeBlock.h: - - Added m_expressionInfoFatPositions in RareData. - (JSC::UnlinkedFunctionExecutable::functionStartColumn): - (JSC::UnlinkedCodeBlock::shrinkToFit): - - Removed obsoleted m_lineInfo. - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitCall): Plumbed line and lineStart through. - (JSC::BytecodeGenerator::emitCallEval): Plumbed line and lineStart through. - (JSC::BytecodeGenerator::emitCallVarargs): Plumbed line and lineStart through. - (JSC::BytecodeGenerator::emitConstruct): Plumbed line and lineStart through. - (JSC::BytecodeGenerator::emitDebugHook): Plumbed lineStart through. - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitNode): - (JSC::BytecodeGenerator::emitNodeInConditionContext): - - Removed obsoleted m_lineInfo. - (JSC::BytecodeGenerator::emitExpressionInfo): - - Plumbed line and lineStart through. - - Compute the line and column to be added to the expression range info. - * bytecompiler/NodesCodegen.cpp: - (JSC::ThrowableExpressionData::emitThrowReferenceError): - (JSC::ResolveNode::emitBytecode): - (JSC::ArrayNode::toArgumentList): - (JSC::BracketAccessorNode::emitBytecode): - (JSC::DotAccessorNode::emitBytecode): - (JSC::NewExprNode::emitBytecode): - (JSC::EvalFunctionCallNode::emitBytecode): - (JSC::FunctionCallValueNode::emitBytecode): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::FunctionCallBracketNode::emitBytecode): - (JSC::FunctionCallDotNode::emitBytecode): - (JSC::CallFunctionCallDotNode::emitBytecode): - (JSC::ApplyFunctionCallDotNode::emitBytecode): - (JSC::PostfixNode::emitResolve): - (JSC::PostfixNode::emitBracket): - (JSC::PostfixNode::emitDot): - (JSC::DeleteResolveNode::emitBytecode): - (JSC::DeleteBracketNode::emitBytecode): - (JSC::DeleteDotNode::emitBytecode): - (JSC::PrefixNode::emitResolve): - (JSC::PrefixNode::emitBracket): - (JSC::PrefixNode::emitDot): - - Plumbed line and lineStart through the above as needed. - - (JSC::UnaryOpNode::emitBytecode): - - Added emission of an ExpressionRangeInfo for the UnaryOp node. - - (JSC::BinaryOpNode::emitStrcat): - (JSC::ThrowableBinaryOpNode::emitBytecode): - (JSC::InstanceOfNode::emitBytecode): - (JSC::emitReadModifyAssignment): - (JSC::ReadModifyResolveNode::emitBytecode): - (JSC::AssignResolveNode::emitBytecode): - (JSC::AssignDotNode::emitBytecode): - (JSC::ReadModifyDotNode::emitBytecode): - (JSC::AssignBracketNode::emitBytecode): - (JSC::ReadModifyBracketNode::emitBytecode): - - Plumbed line and lineStart through the above as needed. - - (JSC::ConstStatementNode::emitBytecode): - (JSC::EmptyStatementNode::emitBytecode): - (JSC::DebuggerStatementNode::emitBytecode): - (JSC::ExprStatementNode::emitBytecode): - (JSC::VarStatementNode::emitBytecode): - (JSC::IfElseNode::emitBytecode): - (JSC::DoWhileNode::emitBytecode): - (JSC::WhileNode::emitBytecode): - (JSC::ForNode::emitBytecode): - (JSC::ForInNode::emitBytecode): - (JSC::ContinueNode::emitBytecode): - (JSC::BreakNode::emitBytecode): - (JSC::ReturnNode::emitBytecode): - (JSC::WithNode::emitBytecode): - (JSC::SwitchNode::emitBytecode): - (JSC::LabelNode::emitBytecode): - (JSC::ThrowNode::emitBytecode): - (JSC::TryNode::emitBytecode): - (JSC::ProgramNode::emitBytecode): - (JSC::EvalNode::emitBytecode): - (JSC::FunctionBodyNode::emitBytecode): - - Plumbed line and lineStart through the above as needed. - - * interpreter/Interpreter.cpp: - (JSC::appendSourceToError): - - Added line and column arguments for expressionRangeForBytecodeOffset(). - (JSC::StackFrame::computeLineAndColumn): - - Replaces StackFrame::line() and StackFrame::column(). - (JSC::StackFrame::expressionInfo): - - Added line and column arguments. - (JSC::StackFrame::toString): - - Changed to use the new StackFrame::computeLineAndColumn(). - (JSC::Interpreter::getStackTrace): - - Added the needed firstLineColumnOffset arg for the StackFrame. - - * interpreter/Interpreter.h: - * parser/ASTBuilder.h: - (JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo): - (JSC::ASTBuilder::AssignmentInfo::AssignmentInfo): - (JSC::ASTBuilder::createResolve): - (JSC::ASTBuilder::createBracketAccess): - (JSC::ASTBuilder::createDotAccess): - (JSC::ASTBuilder::createRegExp): - (JSC::ASTBuilder::createNewExpr): - (JSC::ASTBuilder::createAssignResolve): - (JSC::ASTBuilder::createFunctionExpr): - (JSC::ASTBuilder::createFunctionBody): - (JSC::ASTBuilder::createGetterOrSetterProperty): - (JSC::ASTBuilder::createFuncDeclStatement): - (JSC::ASTBuilder::createBlockStatement): - (JSC::ASTBuilder::createExprStatement): - (JSC::ASTBuilder::createIfStatement): - (JSC::ASTBuilder::createForLoop): - (JSC::ASTBuilder::createForInLoop): - (JSC::ASTBuilder::createVarStatement): - (JSC::ASTBuilder::createReturnStatement): - (JSC::ASTBuilder::createBreakStatement): - (JSC::ASTBuilder::createContinueStatement): - (JSC::ASTBuilder::createTryStatement): - (JSC::ASTBuilder::createSwitchStatement): - (JSC::ASTBuilder::createWhileStatement): - (JSC::ASTBuilder::createDoWhileStatement): - (JSC::ASTBuilder::createLabelStatement): - (JSC::ASTBuilder::createWithStatement): - (JSC::ASTBuilder::createThrowStatement): - (JSC::ASTBuilder::createDebugger): - (JSC::ASTBuilder::createConstStatement): - (JSC::ASTBuilder::appendBinaryExpressionInfo): - (JSC::ASTBuilder::appendUnaryToken): - (JSC::ASTBuilder::unaryTokenStackLastStart): - (JSC::ASTBuilder::unaryTokenStackLastLineStartPosition): Added. - (JSC::ASTBuilder::assignmentStackAppend): - (JSC::ASTBuilder::createAssignment): - (JSC::ASTBuilder::setExceptionLocation): - (JSC::ASTBuilder::makeDeleteNode): - (JSC::ASTBuilder::makeFunctionCallNode): - (JSC::ASTBuilder::makeBinaryNode): - (JSC::ASTBuilder::makeAssignNode): - (JSC::ASTBuilder::makePrefixNode): - (JSC::ASTBuilder::makePostfixNode):. - - Plumbed line, lineStart, and startColumn through the above as needed. - - * parser/Lexer.cpp: - (JSC::::currentSourcePtr): - (JSC::::setCode): - - Added tracking for sourceoffset and lineStart. - (JSC::::internalShift): - (JSC::::parseIdentifier): - - Added tracking for lineStart. - (JSC::::parseIdentifierSlowCase): - (JSC::::parseString): - - Added tracking for lineStart. - (JSC::::parseStringSlowCase): - (JSC::::lex): - - Added tracking for sourceoffset. - (JSC::::sourceCode): - * parser/Lexer.h: - (JSC::Lexer::currentOffset): - (JSC::Lexer::currentLineStartOffset): - (JSC::Lexer::setOffset): - - Added tracking for lineStart. - (JSC::Lexer::offsetFromSourcePtr): Added. conversion function. - (JSC::Lexer::sourcePtrFromOffset): Added. conversion function. - (JSC::Lexer::setOffsetFromSourcePtr): - (JSC::::lexExpectIdentifier): - - Added tracking for sourceoffset and lineStart. - - * parser/NodeConstructors.h: - (JSC::Node::Node): - (JSC::ResolveNode::ResolveNode): - (JSC::EvalFunctionCallNode::EvalFunctionCallNode): - (JSC::FunctionCallValueNode::FunctionCallValueNode): - (JSC::FunctionCallResolveNode::FunctionCallResolveNode): - (JSC::FunctionCallBracketNode::FunctionCallBracketNode): - (JSC::FunctionCallDotNode::FunctionCallDotNode): - (JSC::CallFunctionCallDotNode::CallFunctionCallDotNode): - (JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode): - (JSC::PostfixNode::PostfixNode): - (JSC::DeleteResolveNode::DeleteResolveNode): - (JSC::DeleteBracketNode::DeleteBracketNode): - (JSC::DeleteDotNode::DeleteDotNode): - (JSC::PrefixNode::PrefixNode): - (JSC::ReadModifyResolveNode::ReadModifyResolveNode): - (JSC::ReadModifyBracketNode::ReadModifyBracketNode): - (JSC::AssignBracketNode::AssignBracketNode): - (JSC::AssignDotNode::AssignDotNode): - (JSC::ReadModifyDotNode::ReadModifyDotNode): - (JSC::AssignErrorNode::AssignErrorNode): - (JSC::WithNode::WithNode): - (JSC::ForInNode::ForInNode): - - Plumbed line and lineStart through the above as needed. - * parser/Nodes.cpp: - (JSC::StatementNode::setLoc): Plumbed lineStart. - (JSC::ScopeNode::ScopeNode): Plumbed lineStart. - (JSC::ProgramNode::ProgramNode): Plumbed startColumn. - (JSC::ProgramNode::create): Plumbed startColumn. - (JSC::EvalNode::create): - (JSC::FunctionBodyNode::FunctionBodyNode): Plumbed startColumn. - (JSC::FunctionBodyNode::create): Plumbed startColumn. - * parser/Nodes.h: - (JSC::Node::startOffset): - (JSC::Node::lineStartOffset): Added. - (JSC::StatementNode::firstLine): - (JSC::StatementNode::lastLine): - (JSC::ThrowableExpressionData::ThrowableExpressionData): - (JSC::ThrowableExpressionData::setExceptionSourceCode): - (JSC::ThrowableExpressionData::divotStartOffset): - (JSC::ThrowableExpressionData::divotEndOffset): - (JSC::ThrowableExpressionData::divotLine): - (JSC::ThrowableExpressionData::divotLineStart): - (JSC::ThrowableSubExpressionData::ThrowableSubExpressionData): - (JSC::ThrowableSubExpressionData::setSubexpressionInfo): - (JSC::ThrowableSubExpressionData::subexpressionDivot): - (JSC::ThrowableSubExpressionData::subexpressionStartOffset): - (JSC::ThrowableSubExpressionData::subexpressionEndOffset): - (JSC::ThrowableSubExpressionData::subexpressionLine): - (JSC::ThrowableSubExpressionData::subexpressionLineStart): - (JSC::ThrowablePrefixedSubExpressionData::ThrowablePrefixedSubExpressionData): - (JSC::ThrowablePrefixedSubExpressionData::setSubexpressionInfo): - (JSC::ThrowablePrefixedSubExpressionData::subexpressionDivot): - (JSC::ThrowablePrefixedSubExpressionData::subexpressionStartOffset): - (JSC::ThrowablePrefixedSubExpressionData::subexpressionEndOffset): - (JSC::ThrowablePrefixedSubExpressionData::subexpressionLine): - (JSC::ThrowablePrefixedSubExpressionData::subexpressionLineStart): - (JSC::ScopeNode::startStartOffset): - (JSC::ScopeNode::startLineStartOffset): - (JSC::ProgramNode::startColumn): - (JSC::EvalNode::startColumn): - (JSC::FunctionBodyNode::startColumn): - - Plumbed line and lineStart through the above as needed. - * parser/Parser.cpp: - (JSC::::Parser): - (JSC::::parseSourceElements): - (JSC::::parseVarDeclarationList): - (JSC::::parseConstDeclarationList): - (JSC::::parseForStatement): - (JSC::::parseBreakStatement): - (JSC::::parseContinueStatement): - (JSC::::parseReturnStatement): - (JSC::::parseThrowStatement): - (JSC::::parseWithStatement): - - Plumbed line and lineStart through the above as needed. - (JSC::::parseFunctionBody): - - Plumbed startColumn. - (JSC::::parseFunctionInfo): - (JSC::::parseFunctionDeclaration): - (JSC::LabelInfo::LabelInfo): - (JSC::::parseExpressionOrLabelStatement): - (JSC::::parseAssignmentExpression): - (JSC::::parseBinaryExpression): - (JSC::::parseProperty): - (JSC::::parseObjectLiteral): - (JSC::::parsePrimaryExpression): - (JSC::::parseMemberExpression): - (JSC::::parseUnaryExpression): - - Plumbed line, lineStart, startColumn through the above as needed. - * parser/Parser.h: - (JSC::Parser::next): - (JSC::Parser::nextExpectIdentifier): - (JSC::Parser::tokenStart): - (JSC::Parser::tokenColumn): - (JSC::Parser::tokenEnd): - (JSC::Parser::tokenLineStart): - (JSC::Parser::lastTokenLine): - (JSC::Parser::lastTokenLineStart): - (JSC::::parse): - * parser/ParserTokens.h: - (JSC::JSTokenLocation::JSTokenLocation): - - Plumbed lineStart. - (JSC::JSTokenLocation::lineStartPosition): - (JSC::JSTokenLocation::startPosition): - (JSC::JSTokenLocation::endPosition): - * parser/SourceCode.h: - (JSC::SourceCode::SourceCode): - (JSC::SourceCode::startColumn): - (JSC::makeSource): - (JSC::SourceCode::subExpression): - * parser/SourceProvider.cpp: delete old code. - * parser/SourceProvider.h: delete old code. - * parser/SourceProviderCacheItem.h: - (JSC::SourceProviderCacheItem::closeBraceToken): - (JSC::SourceProviderCacheItem::SourceProviderCacheItem): - - Plumbed lineStart. - * parser/SyntaxChecker.h: - (JSC::SyntaxChecker::makeFunctionCallNode): - (JSC::SyntaxChecker::makeAssignNode): - (JSC::SyntaxChecker::makePrefixNode): - (JSC::SyntaxChecker::makePostfixNode): - (JSC::SyntaxChecker::makeDeleteNode): - (JSC::SyntaxChecker::createResolve): - (JSC::SyntaxChecker::createBracketAccess): - (JSC::SyntaxChecker::createDotAccess): - (JSC::SyntaxChecker::createRegExp): - (JSC::SyntaxChecker::createNewExpr): - (JSC::SyntaxChecker::createAssignResolve): - (JSC::SyntaxChecker::createFunctionExpr): - (JSC::SyntaxChecker::createFunctionBody): - (JSC::SyntaxChecker::createFuncDeclStatement): - (JSC::SyntaxChecker::createForInLoop): - (JSC::SyntaxChecker::createReturnStatement): - (JSC::SyntaxChecker::createBreakStatement): - (JSC::SyntaxChecker::createContinueStatement): - (JSC::SyntaxChecker::createWithStatement): - (JSC::SyntaxChecker::createLabelStatement): - (JSC::SyntaxChecker::createThrowStatement): - (JSC::SyntaxChecker::createGetterOrSetterProperty): - (JSC::SyntaxChecker::appendBinaryExpressionInfo): - (JSC::SyntaxChecker::operatorStackPop): - - Made SyntaxChecker prototype changes to match ASTBuilder due to new - args added for plumbing line, lineStart, and startColumn. - * runtime/CodeCache.cpp: - (JSC::CodeCache::generateBytecode): - (JSC::CodeCache::getCodeBlock): - - Plumbed startColumn. - * runtime/Executable.cpp: - (JSC::FunctionExecutable::FunctionExecutable): - (JSC::ProgramExecutable::compileInternal): - (JSC::FunctionExecutable::produceCodeBlockFor): - (JSC::FunctionExecutable::fromGlobalCode): - - Plumbed startColumn. - * runtime/Executable.h: - (JSC::ScriptExecutable::startColumn): - (JSC::ScriptExecutable::recordParse): - (JSC::FunctionExecutable::create): - - Plumbed startColumn. - -2013-07-08 Lucas Forschler - - Merge r152052 - - 2013-06-26 Anders Carlsson - - Add JSStringCreateWithCharactersNoCopy SPI - https://bugs.webkit.org/show_bug.cgi?id=118074 - - - Reviewed by Geoffrey Garen. - - * API/JSStringRef.cpp: - (JSStringCreateWithCharactersNoCopy): - Create a new OpaqueJSString, using the newly added StringImpl::createWithoutCopying function. - - * API/JSStringRefPrivate.h: Added. - Add a home for the JSStringCreateWithCharactersNoCopy function. - - * API/OpaqueJSString.h: - (OpaqueJSString::OpaqueJSString): - Just call isolatedCopy on the passed in string. - - * API/tests/testapi.c: - Add an API test for JSStringCreateWithCharactersNoCopy. - - * JavaScriptCore.xcodeproj/project.pbxproj: - Add new files. - -2013-07-08 Lucas Forschler - - Merge r152314 - - 2013-07-02 Mark Hahnenberg - - Replace RELEASE_ASSERT with ASSERT in CodeBlock:: bytecodeOffsetForCallAtIndex - https://bugs.webkit.org/show_bug.cgi?id=118316 - - Reviewed by Geoffrey Garen. - - This is causing some crashiness in release builds. We should replace it with an ASSERT - until we track down all the places that need fixing in bug 118315. - - * bytecode/CodeBlock.h: - (JSC::CodeBlock::bytecodeOffsetForCallAtIndex): - -2013-07-01 Lucas Forschler - - Merge r152091 - - 2013-06-27 Timothy Hatcher - - Notify the debugger about functions created from source code via new Function() or WebCore::JSLazyEventListener. - - https://bugs.webkit.org/show_bug.cgi?id=118063 - - Reviewed by Geoffrey Garen. - - * bytecode/UnlinkedCodeBlock.cpp: - (JSC::UnlinkedFunctionExecutable::fromGlobalCode): Call Debugger::sourceParsed. - -2013-07-01 Lucas Forschler - - Merge r151978 - - 2013-06-25 Ryosuke Niwa - - JSString should remember AtomicString - https://bugs.webkit.org/show_bug.cgi?id=117386 - - Reviewed by Geoffrey Garen. - - Added JSValue::toAtomicString and JSString::atomicString. These two functions allow WebCore to update - JSString's m_value to set isAtomic flag and avoid the AtomicStringTable lookups in subsequent attempts - to obtain the AtomicString of the same value. - - * runtime/JSCJSValue.h: - * runtime/JSString.h: - (JSC::JSString::atomicString): - (JSC::JSValue::toAtomicString): - -2013-06-25 Lucas Forschler - - Merge r151786 - - 2013-06-20 Mark Hahnenberg - - Improper deallocation of JSManagedValue causes crashes during autorelease pool draining - https://bugs.webkit.org/show_bug.cgi?id=117840 - - Reviewed by Geoffrey Garen. - - Improperly managing a JSManagedValue can cause a crash when the JSC::Weak inside the - JSManagedValue is destroyed upon deallocation. We would rather have improperly maintained - JSManagedValues cause memory leaks than take down the whole app. - - The fix is to use the callback to the JSC::Weak on the destruction of the VM so that we - can safely null it out. This will prevent ~Weak from crashing. - - * API/JSManagedValue.mm: - (-[JSManagedValue JSC::JSC::]): - (JSManagedValueHandleOwner::finalize): - * API/tests/testapi.mm: Added a test that crashed prior to this fix due to a leaked - managed reference. Also fixed a small style nit I noticed in another test. - -2013-06-25 Lucas Forschler - - Merge r151923 - - 2013-06-24 Roger Fong - - Unreviewed. Makefile build fix for AppleWindows. - - * JavaScriptCore.vcxproj/JavaScriptCore.make: - -2013-06-21 Lucas Forschler - - Merge r151787 - - 2013-06-20 Roger Fong - - Make Windows makefile copy build output to a different folder. - . - - * JavaScriptCore.vcxproj/JavaScriptCore.make: - -2013-06-18 Roger Fong - - Disable some feature flags. - . - - Rubberstamped by Jon Lee. - - * Configurations/FeatureDefines.xcconfig: - -2013-06-18 Oliver Hunt - - Going to google.com/trends causes a crash - https://bugs.webkit.org/show_bug.cgi?id=117602 - - Reviewed by Geoffrey Garen. - - When handling op_throw, etc we need to flush the variables and arguments - for the entire inline stack, not just the top frame. - - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::flushAllArgumentsAndCapturedVariablesInInlineStack): - (JSC::DFG::ByteCodeParser::parseBlock): - -2013-06-18 Roger Fong - - Replace tools32 folder with tools and update WebKit Windows solution accordingly. - . - - Rubberstamped by Brent Fulgham. - - * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: - * JavaScriptCore.vcxproj/JavaScriptCoreDebug.props: - * JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props: - * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: - * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props: - * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props: - * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props: - * JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd: - * JavaScriptCore.vcxproj/JavaScriptCoreProduction.props: - * JavaScriptCore.vcxproj/JavaScriptCoreRelease.props: - * JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props: - * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: - * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: - * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: - * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: - * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props: - * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: - * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: - * JavaScriptCore.vcxproj/jsc/jscDebug.props: - * JavaScriptCore.vcxproj/jsc/jscProduction.props: - * JavaScriptCore.vcxproj/jsc/jscRelease.props: - * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: - * JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props: - * JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props: - * JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props: - * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: - * JavaScriptCore.vcxproj/testapi/testapiDebug.props: - * JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props: - * JavaScriptCore.vcxproj/testapi/testapiProduction.props: - * JavaScriptCore.vcxproj/testapi/testapiRelease.props: - * JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props: - -2013-06-17 Roger Fong - - Modify Windows makefiles to copy some bin output into Program Files. - https://bugs.webkit.org/show_bug.cgi?id=117714. - - - Reviewed by Brent Fulgham. - - * JavaScriptCore.vcxproj/JavaScriptCore.make: - -2013-06-14 Ryosuke Niwa - - Function names on Object.prototype should be common identifiers - https://bugs.webkit.org/show_bug.cgi?id=117614 - - Reviewed by Darin Adler. - - Patch written by Sam Weinig. Make Object's prototype function names common identififers since they're used frequently. - - * runtime/CommonIdentifiers.h: - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - * runtime/JSObject.h: - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::finishCreation): - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::finishCreation): - -2013-06-13 Ryosuke Niwa - - Remove LiteralIdentifierTable - https://bugs.webkit.org/show_bug.cgi?id=117613 - - Reviewed by Geoffrey Garen. - - Removed LiteralIdentifierTable since it doesn't seem to have any perf. impact now. - - * runtime/Identifier.cpp: - (JSC::Identifier::add): - -2013-06-12 Conrad Shultz - - JSExport header documentation substitutes "semicolon" for "colon" - https://bugs.webkit.org/show_bug.cgi?id=117552 - - Reviewed by Mark Hahnenberg. - - * API/JSExport.h: - Fix a couple typos. - -2013-06-10 Raphael Kubo da Costa - - [JSC] Remove a vestige of wxWidgets support. - https://bugs.webkit.org/show_bug.cgi?id=117419 - - Reviewed by Benjamin Poulain. - - * runtime/JSExportMacros.h: Remove a check for BUILDING_WX__ that - seems to have gone unnoticed when the wxWidgets port was removed. - -2013-06-06 Roger Fong - - Stop copying AAS binaries into build folder. - https://bugs.webkit.org/show_bug.cgi?id=117319. - - Rubberstamped by Darin Adler. - - * JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd: - * JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd: - * JavaScriptCore.vcxproj/jsc/jscPreLink.cmd: - * JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd: - * JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd: - * JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd: - -2013-06-05 Filip Pizlo - - DFG CFA shouldn't filter ArrayModes with ALL_NON_ARRAY_ARRAY_MODES if the speculated type is not SpecArray - https://bugs.webkit.org/show_bug.cgi?id=117279 - - - Reviewed by Mark Hahnenberg. - - * dfg/DFGAbstractValue.h: - (JSC::DFG::AbstractValue::filterArrayModesByType): - -2013-06-05 Michael Saboff - - JSC: Crash beneath cti_op_div @ http://gmailblog.blogspot.com - https://bugs.webkit.org/show_bug.cgi?id=117280 - - Reviewed by Filip Pizlo. - - Updated the merging of VariableAccessData nodes in ArgumentPosition lists - to find the unified VariableAccessData node that is the root of the - current node instead of using the current node directly when merging - attributes. - Added new dump code to dump the ArgumentPosition list. - - * dfg/DFGArgumentPosition.h: - (JSC::DFG::rgumentPosition::mergeArgumentPredictionAwareness): - (JSC::DFG::ArgumentPosition::mergeArgumentUnboxingAwareness): - (JSC::DFG::ArgumentPosition::dump): - * dfg/DFGGraph.cpp: - (JSC::DFG::Graph::dump): - -2013-06-05 Bear Travis - - [CSS Exclusions][CSS Shapes] Split CSS Exclusions & Shapes compile & runtime flags - https://bugs.webkit.org/show_bug.cgi?id=117172 - - Reviewed by Alexandru Chiculita. - - Adding the CSS_SHAPES compile flag. - - * Configurations/FeatureDefines.xcconfig: - -2013-06-05 Balazs Kilvady - - JSC Assertion tests failures on MIPS. - https://bugs.webkit.org/show_bug.cgi?id=116552 - - Reviewed by Geoffrey Garen. - - Fix condition handlig in branchAdd32 implemetations. - - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::branchAdd32): - -2013-06-04 Julien Brianceau - - [sh4] Add floating point absolute function support in baseline JIT. - https://bugs.webkit.org/show_bug.cgi?id=117147 - - Reviewed by Geoffrey Garen. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::supportsFloatingPointAbs): - (JSC::MacroAssemblerSH4::absDouble): - * assembler/SH4Assembler.h: - (JSC::SH4Assembler::dabs): - (JSC::SH4Assembler::printInstr): - -2013-06-04 Zan Dobersek - - [JSC] Test262 15.5.4.9_3 test is failing - https://bugs.webkit.org/show_bug.cgi?id=116789 - - Reviewed by Geoffrey Garen. - - Bring the String.prototype.localeCompare behavior in line wit ES5 15.9.4.9. - If method is not given enough arguments, the minimal amount of arguments must be assumed, with their value being undefined. - The first argument to localeCompare, in its string form, is used as the 'that' string that's used in the comparison. - Therefor, when calling str.localeCompare() or str.localeCompare(undefined), the first argument is `undefined` and the - string "undefined" is used as the string to which value of str is compared. - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncLocaleCompare): Remove the early return in case of no given arguments to achieve the desired behavior. - -2013-06-03 Hojong Han - - [EFL] Implement GCActivityCallback - https://bugs.webkit.org/show_bug.cgi?id=95923 - - Reviewed by Geoffrey Garen. - - Implements the activity triggered garbage collector. - Additional GCs can be triggered by platfrom timer. - It has sort of compaction effect not to make JSC heap grow fast - so that memory usage becomes lower than usual. - - * PlatformEfl.cmake: Added. - * heap/HeapTimer.cpp: - (JSC): - (JSC::HeapTimer::HeapTimer): - (JSC::HeapTimer::~HeapTimer): - (JSC::HeapTimer::add): - (JSC::HeapTimer::stop): - (JSC::HeapTimer::timerEvent): - * heap/HeapTimer.h: - (HeapTimer): - * jsc.cpp: - (main): - * runtime/GCActivityCallback.cpp: - (JSC): - (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): - (JSC::DefaultGCActivityCallback::scheduleTimer): - (JSC::DefaultGCActivityCallback::cancelTimer): - (JSC::DefaultGCActivityCallback::didAllocate): - * runtime/GCActivityCallback.h: - (GCActivityCallback): - (JSC::GCActivityCallback::GCActivityCallback): - (DefaultGCActivityCallback): - -2013-06-03 Roger Fong - - Nuke VS2005 files from the tree. - . - - Rubberstamped by Brent Fulgham. - - * JavaScriptCore.vcproj: Removed. - * JavaScriptCore.vcproj/JavaScriptCore: Removed. - * JavaScriptCore.vcproj/JavaScriptCore.make: Removed. - * JavaScriptCore.vcproj/JavaScriptCore.resources: Removed. - * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist: Removed. - * JavaScriptCore.vcproj/JavaScriptCore.sln: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebug.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugAll.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugCairoCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedProduction.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedRelease.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleaseCairoCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleasePGO.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: Removed. - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Removed. - * JavaScriptCore.vcproj/LLIntAssembly: Removed. - * JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.make: Removed. - * JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.vcproj: Removed. - * JavaScriptCore.vcproj/LLIntAssembly/build-LLIntAssembly.sh: Removed. - * JavaScriptCore.vcproj/LLIntDesiredOffsets: Removed. - * JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.make: Removed. - * JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcproj: Removed. - * JavaScriptCore.vcproj/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh: Removed. - * JavaScriptCore.vcproj/LLIntOffsetsExtractor: Removed. - * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcproj: Removed. - * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.vsprops: Removed. - * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.vsprops: Removed. - * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugAll.vsprops: Removed. - * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugCairoCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.vsprops: Removed. - * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.vsprops: Removed. - * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleaseCairoCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleasePGO.vsprops: Removed. - * JavaScriptCore.vcproj/jsc: Removed. - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Removed. - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Removed. - * JavaScriptCore.vcproj/jsc/jscDebug.vsprops: Removed. - * JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops: Removed. - * JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Removed. - * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Removed. - * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Removed. - * JavaScriptCore.vcproj/jsc/jscProduction.vsprops: Removed. - * JavaScriptCore.vcproj/jsc/jscRelease.vsprops: Removed. - * JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops: Removed. - * JavaScriptCore.vcproj/testRegExp: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExp.vcproj: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExpDebug.vsprops: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExpDebugAll.vsprops: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExpDebugCairoCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExpPostBuild.cmd: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExpPreBuild.cmd: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExpPreLink.cmd: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExpProduction.vsprops: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExpRelease.vsprops: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExpReleaseCairoCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/testRegExp/testRegExpReleasePGO.vsprops: Removed. - * JavaScriptCore.vcproj/testapi: Removed. - * JavaScriptCore.vcproj/testapi/testapi.vcproj: Removed. - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Removed. - * JavaScriptCore.vcproj/testapi/testapiDebug.vsprops: Removed. - * JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops: Removed. - * JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops: Removed. - * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Removed. - * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Removed. - * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Removed. - * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops: Removed. - * JavaScriptCore.vcproj/testapi/testapiRelease.vsprops: Removed. - * JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops: Removed. - -2013-05-31 Filip Pizlo - - Incorrect assertion in DFG::Graph::uncheckedActivationRegisterFor() - - - Rubber stamped by Mark Hahnenberg. - - This has a bogus assertion that checks that the passed CodeOrigin doesn't have - an inline call frame. This was well intentioned in the sense that it is true - that inlined call frames wouldn't have an activation register. But that doesn't - mean that people won't ask. Removing the assertion fixes a debug-only crash and - has no impact on production code. This change adds a comment to that effect. - - * dfg/DFGGraph.h: - (JSC::DFG::Graph::uncheckedActivationRegisterFor): - -2013-05-31 Julien Brianceau - - [sh4] Fix Overflow case of branchMul32 in baseline JIT. - https://bugs.webkit.org/show_bug.cgi?id=117057 - - Reviewed by Oliver Hunt. - - Current implementation of Overflow case in branchMul32 performs an - unsigned multiplication whereas a signed multiplication is expected. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::branchMul32): - -2013-05-31 Julien Brianceau - - [sh4] Fix floating point comparisons in baseline JIT. - https://bugs.webkit.org/show_bug.cgi?id=117066. - - Reviewed by Oliver Hunt. - - Current implementation of branchDouble function in baseline JIT is wrong - for some conditions and overkill for others. For instance: - - With DoubleGreaterThanOrEqual condition, branch will be taken if either - operand is NaN with current implementation whereras it should not. - - With DoubleNotEqualOrUnordered condition, performed NaN checks are - useless (because comparison result is false if either operand is NaN). - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::branchDouble): - -2013-05-31 Julien Brianceau - - [sh4] Fix double floating point transfer in baseline JIT. - https://bugs.webkit.org/show_bug.cgi?id=117054 - - Reviewed by Oliver Hunt. - - In current implementation, dmovRegReg function transfers only one single - FPRegister as PR=1 and SZ=0 in floating point status/control register. - Double transfers must be performed with two fmov.s opcodes. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::moveDouble): - (JSC::MacroAssemblerSH4::addDouble): Handle (op2==dest) case properly. - (JSC::MacroAssemblerSH4::sqrtDouble): - * assembler/SH4Assembler.h: - (JSC::SH4Assembler::fmovsRegReg): - -2013-05-31 Julien Brianceau - - [sh4] Handle branchType properly in branchTruncateDoubleToInt32. - https://bugs.webkit.org/show_bug.cgi?id=117062 - - Reviewed by Oliver Hunt. - - Current implementation of branchTruncateDoubleToInt32 is incorrect - when branchType == BranchIfTruncateSuccessful in sh4 baseline JIT. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::branchTruncateDoubleToInt32): - -2013-05-31 Brent Fulgham - - [Windows] Unreviewed build fix for VS2005 builders. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: Add - missing export for WTF::SHA1::computeHexDigest - -2013-05-30 David Farler - - Fix jscore-test when not using --sdk option with jsDriver.pl - https://bugs.webkit.org/show_bug.cgi?id=116339 - - Reviewed by Joe Pecoraro. - - * tests/mozilla/jsDriver.pl: - (execute_tests): - With each test, the shell_command needs to be started from scratch. - - This fix will clear the shell_command and start over as before with - the opt_arch option when not using --sdk with jsDriver.pl. - -2013-05-30 Roger Fong - - Get rid of JavaScript exports file on AppleWin port. - https://bugs.webkit.org/show_bug.cgi?id=117050. - - Reviewed by Darin Adler. - - Delete the JavaScriptCoreExportGenerator folder and remove dependencies. - Start linking in WTF.lib now that it's a shared library. - - * JavaScriptCore.vcxproj/JavaScriptCore.submit.sln: - * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: - * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator: Removed. - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj: Removed. - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj.filters: Removed. - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorBuildCmd.cmd: Removed. - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props: Removed. - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorDebug.props: Removed. - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd: Removed. - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPreBuild.cmd: Removed. - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorProduction.props: Removed. - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorRelease.props: Removed. - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: Removed. - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/make-export-file-generator: Removed. - * JavaScriptCore.vcxproj/jsc/jscCommon.props: - * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: - * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters: - * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props: - * JavaScriptCore.vcxproj/testapi/testapiCommon.props: - -2013-05-22 David Farler - - Add --sdk option to jsDriver.pl to run with iOS Simulator - https://bugs.webkit.org/show_bug.cgi?id=116339 - - Reviewed by David Kilzer. - - * tests/mozilla/jsDriver.pl: - (execute_tests): - Prefix shell command with the path to the "sim" tool. - (parse_args): - Add -d / --sdk option. - (usage): - Help message for -d / --sdk option. - -2013-05-30 Julien Brianceau - - [sh4] Optimize NaN checks in LLINT for floating point comparisons. - https://bugs.webkit.org/show_bug.cgi?id=117049 - - Reviewed by Oliver Hunt. - - Use the fcmp/eq opcode in sh4 LLINT to test if a double is NaN. - This is more efficient, doesn't require two tmp registers and requires - less code than current implementation (which converts double to float, - then checks 'E = Emax + 1' and 'f != 0'). - - * offlineasm/sh4.rb: - -2013-05-30 Oliver Hunt - - JSCallbackObject does not correctly initialise the PropertySlot for getOwnPropertyDescriptor - https://bugs.webkit.org/show_bug.cgi?id=117053 - - Reviewed by Mark Hahnenberg. - - Set appropriate thisValue on the PropertySlot - - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertyDescriptor): - * API/tests/testapi.mm: - -2013-05-29 Jeffrey Pfau - - [Mac] Enable cache partitioning and the public suffix list on 10.8 - - - Rubber-stamped by David Kilzer. - - * Configurations/FeatureDefines.xcconfig: - -2013-05-28 Brent Fulgham - - [Windows] Put correct byteCompile symbol in file. Previous version - had an extra 'i' appended to the end. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: - -2013-05-28 Brent Fulgham - - [Windows] Unreviewed build fix. Remove ?byteCompile symbol that - is no longer accessible during link. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: - -2013-05-28 Gavin Barraclough - - String(new Date(2010,10,1)) is wrong in KRAT, YAKT - https://bugs.webkit.org/show_bug.cgi?id=106750 - - Reviewed by Darin Adler. - - * runtime/JSDateMath.cpp: - (JSC::msToGregorianDateTime): - - Additional review comment fix. - -2013-05-28 Brent Fulgham - - [Windows] Unreviewed build fix after r150833 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: - A CR/LF combination was lost in the file, combining two symbols. - -2013-05-27 Gavin Barraclough - - String(new Date(2010,10,1)) is wrong in KRAT, YAKT - https://bugs.webkit.org/show_bug.cgi?id=106750 - - Reviewed by Darin Adler. - - First part of a fix, simplfy date handling code, instead of operating separately - on the UTC-standard and standard-DST offsets, just generate a combined UTC-local - offset (this is what we actually need, and what the OS gives us). - - * runtime/JSDateMath.cpp: - (JSC::getLocalTimeOffset): - - removed getUTCOffset, converted getDSTOffset -> getLocalTimeOffset - (JSC::gregorianDateTimeToMS): - (JSC::msToGregorianDateTime): - (JSC::parseDateFromNullTerminatedCharacters): - - call getLocalTimeOffset instead of getUTCOffset/getDSTOffset - * runtime/VM.cpp: - (JSC::VM::resetDateCache): - - removed cachedUTCOffset, converted DSTOffsetCache -> LocalTimeOffsetCache - * runtime/VM.h: - (JSC::LocalTimeOffsetCache::LocalTimeOffsetCache): - (JSC::LocalTimeOffsetCache::reset): - (LocalTimeOffsetCache): - - removed cachedUTCOffset, converted DSTOffsetCache -> LocalTimeOffsetCache - -2013-05-28 Mark Hahnenberg - - r150199 is very wrong - https://bugs.webkit.org/show_bug.cgi?id=116876 - - JSValue needs to protect its internal JSValueRef. - - Reviewed by Darin Adler. - - * API/JSValue.mm: - (-[JSValue initWithValue:inContext:]): - (-[JSValue dealloc]): - * API/tests/testapi.mm: Added a simple test to make sure that we protect the - underlying JavaScript value across garbage collections. - -2013-05-27 Patrick Gansterer - - Use ICU_INCLUDE_DIRS in BlackBerry CMake files - https://bugs.webkit.org/show_bug.cgi?id=116210 - - Reviewed by Rob Buis. - - Set and use the ICU_INCLUDE_DIRS variable to avoid - duplicated adding of the ICU include directory. - - * PlatformBlackBerry.cmake: - -2013-05-27 Gabor Rapcsanyi - - MacroAssemblerARM should use xor to swap registers instead of move - https://bugs.webkit.org/show_bug.cgi?id=116306 - - Reviewed by Zoltan Herczeg. - - Change register swapping to xor from move and this way we don't need - temporary register anymore. - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::swap): - -2013-05-25 Filip Pizlo - - We broke (-2^31/-1)|0 in the DFG - https://bugs.webkit.org/show_bug.cgi?id=116767 - - Reviewed by Andreas Kling. - - The bug is that we were assuming that in the -2^31 case, we already had -2^31 - in the result register. This was a wrong assumption. - - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForX86): - -2013-05-24 Filip Pizlo - - We broke !(0/0) - https://bugs.webkit.org/show_bug.cgi?id=116736 - - Reviewed by Gavin Barraclough. - - * parser/ASTBuilder.h: - (JSC::ASTBuilder::createLogicalNot): - * runtime/JSCJSValueInlines.h: - (JSC::JSValue::pureToBoolean): - -2013-05-24 Julien Brianceau - - [sh4] Optimize LLINT generated code and fix few bugs in baseline JIT. - https://bugs.webkit.org/show_bug.cgi?id=116716 - - Reviewed by Geoffrey Garen. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::mul32): Cosmetic changes. - (JSC::MacroAssemblerSH4::convertInt32ToDouble): Absolute address was not dereferenced. - (JSC::MacroAssemblerSH4::branch32): Absolute address was not dereferenced. - (JSC::MacroAssemblerSH4::revertJumpReplacementToBranchPtrWithPatch): Use all 32 bits of pointer for revertJump call. - * assembler/SH4Assembler.h: - (JSC::SH4Assembler::revertJump): Use changePCrelativeAddress to patch the whole pointer. - (JSC::SH4Assembler::linkJump): Cosmetic change. - * offlineasm/sh4.rb: Optimize LLINT generated code. - -2013-05-23 Peter Wang - - CLoop llint backend should not use the d8 register as scratch register - https://bugs.webkit.org/show_bug.cgi?id=116019 - - Reviewed by Csaba Osztrogonác. - - * offlineasm/cloop.rb: - -2013-05-22 Peter Wang - - Use uninitialized register in "JIT::emit_op_neq_null" and "emit_op_eq_null" - https://bugs.webkit.org/show_bug.cgi?id=116593 - - Reviewed by Filip Pizlo. - - Generated instructions using uninitialized register. It's caused by a mistake of r126494. - - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - -2013-05-22 Filip Pizlo - - Fix indentation of CodeBlock.h - - Rubber stampted by Mark Hahnenberg. - - * bytecode/CodeBlock.h: - -2013-05-22 Julien Brianceau - - [sh4] Remove MacroAssemblerSH4.cpp file. - https://bugs.webkit.org/show_bug.cgi?id=116596. - - Reviewed by Geoffrey Garen. - - Move linkCall and repatchCall implementations from MacroAssemblerSH4.cpp - to MacroAssemblerSH4.h and remove MacroAssemblerSH4.cpp, as it is done - for other architectures. - - * GNUmakefile.list.am: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * assembler/MacroAssemblerSH4.cpp: Removed. - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::linkCall): - (MacroAssemblerSH4): - (JSC::MacroAssemblerSH4::repatchCall): - -2013-05-21 Brent Fulgham - - [Windows] Unreviewed speculative fix for test-bots. - - Add export declaration for WTFInvokeCrashHook to avoid runtime - load error on test bots. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: - -2013-05-21 Mark Lam - - Added missing assert condition for PositiveOrZero in ARM branch32(). - https://bugs.webkit.org/show_bug.cgi?id=116538. - - Reviewed by Geoffrey Garen. - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::branchAdd32): - -2013-05-20 Mark Hahnenberg - - Disable SuperRegion - https://bugs.webkit.org/show_bug.cgi?id=116362 - - Rubber stamped by Geoff Garen. - - * heap/Region.h: - -2013-05-20 Oliver Hunt - - Make C API more robust against null contexts - https://bugs.webkit.org/show_bug.cgi?id=116462 - - Reviewed by Anders Carlsson. - - Handle null contexts in a non-crashy way. It's a bug to ever call the - API with a null context, and the absence of a context means we can't - produce a meaningful result, so we still assert in debug builds. - - Now where possible we detect and early return, returning null for any - pointer type, NaN for doubles, and false for any boolean result. - - * API/JSBase.cpp: - (JSEvaluateScript): - (JSCheckScriptSyntax): - (JSReportExtraMemoryCost): - * API/JSContextRef.cpp: - (JSContextGetGlobalObject): - (JSContextGetGroup): - (JSContextGetGlobalContext): - (JSContextCreateBacktrace): - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeConstructor): - (JSObjectMakeFunction): - (JSObjectMakeArray): - (JSObjectMakeDate): - (JSObjectMakeError): - (JSObjectMakeRegExp): - (JSObjectGetPrototype): - (JSObjectSetPrototype): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - (JSObjectDeleteProperty): - (JSObjectCopyPropertyNames): - * API/JSValueRef.cpp: - (JSValueGetType): - (JSValueIsUndefined): - (JSValueIsNull): - (JSValueIsBoolean): - (JSValueIsNumber): - (JSValueIsString): - (JSValueIsObject): - (JSValueIsObjectOfClass): - (JSValueIsEqual): - (JSValueIsStrictEqual): - (JSValueIsInstanceOfConstructor): - (JSValueMakeUndefined): - (JSValueMakeNull): - (JSValueMakeBoolean): - (JSValueMakeNumber): - (JSValueMakeString): - (JSValueMakeFromJSONString): - (JSValueCreateJSONString): - (JSValueToBoolean): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - * API/JSWeakObjectMapRefPrivate.cpp: - -2013-05-20 David Kilzer - - Synchronize FeatureDefines.xcconfig - - * Configurations/FeatureDefines.xcconfig: Remove - ENABLE_LINK_PRERENDER. This was missed in r150356. - -2013-05-19 Anders Carlsson - - Remove link prerendering code - https://bugs.webkit.org/show_bug.cgi?id=116415 - - Reviewed by Darin Adler. - - This code was only used by Chromium and is dead now. - - * Configurations/FeatureDefines.xcconfig: - -2013-05-18 Patrick Gansterer - - [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME - https://bugs.webkit.org/show_bug.cgi?id=114554 - - Reviewed by Gyuyoung Kim. - - Using variables as target names is very uncommon in CMake. - The usual way to specify the name of the resulting binary - is to set the OUTPUT_NAME target property. - - * CMakeLists.txt: - * shell/CMakeLists.txt: - -2013-05-17 Patrick Gansterer - - [CMake] Remove invalid include paths - https://bugs.webkit.org/show_bug.cgi?id=116213 - - Reviewed by Gyuyoung Kim. - - Since "${JAVASCRIPTCORE_DIR}/wtf" does not exist, it is safe - to remove them from the list of include directories. - - * PlatformEfl.cmake: Removed. - * PlatformGTK.cmake: Removed. - -2013-05-16 Patrick Gansterer - - Consolidate lists in JavaScriptCore CMake files - https://bugs.webkit.org/show_bug.cgi?id=115992 - - Reviewed by Gyuyoung Kim. - - Move common files into the CMakeLists.txt to avoid duplicating the list of files. - Also rebase the recently added GTK files to match the other CMake ports, since - the submitted patch was based on an older version of the source tree. - - * CMakeLists.txt: - * PlatformEfl.cmake: - * PlatformGTK.cmake: - * shell/CMakeLists.txt: - * shell/PlatformEfl.cmake: - * shell/PlatformGTK.cmake: - -2013-05-16 Geoffrey Garen - - JSValue shouldn't protect/unprotect its context - https://bugs.webkit.org/show_bug.cgi?id=116234 - - Reviewed by Mark Hahnenberg. - - Our retain on _context is sufficient. - - * API/JSValue.mm: - (-[JSValue initWithValue:inContext:]): - (-[JSValue dealloc]): - -2013-05-15 Ryosuke Niwa - - Another Windows build fix attempt after r150160. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: - -2013-05-15 Oliver Hunt - - RefCountedArray needs to use vector initialisers for its backing store - https://bugs.webkit.org/show_bug.cgi?id=116194 - - Reviewed by Gavin Barraclough. - - Use an out of line function to clear the exception stack to avoid - needing to include otherwise unnecessary headers all over the place. - - Everything else is just being updated to use that. - - * bytecompiler/BytecodeGenerator.cpp: - * interpreter/CallFrame.h: - (JSC::ExecState::clearSupplementaryExceptionInfo): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::addStackTraceIfNecessary): - (JSC::Interpreter::throwException): - * runtime/JSGlobalObject.cpp: - (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): - * runtime/VM.cpp: - (JSC): - (JSC::VM::clearExceptionStack): - * runtime/VM.h: - (VM): - (JSC::VM::exceptionStack): - -2013-05-15 Commit Queue - - Unreviewed, rolling out r150051. - http://trac.webkit.org/changeset/150051 - https://bugs.webkit.org/show_bug.cgi?id=116186 - - Broke all JSC tests on Mac and the author is unresponsive - (Requested by rniwa on #webkit). - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2013-05-15 Julien Brianceau - - Remove savedTimeoutReg from JITStackFrame for sh4 base JIT. - https://bugs.webkit.org/show_bug.cgi?id=116143 - - Reviewed by Geoffrey Garen. - - Since r148119, timeoutCheckRegister is removed from baseline JIT. - So we don't need to save r8 register in JITStackFrame anymore for sh4. - - * jit/JITStubs.cpp: - * jit/JITStubs.h: - (JITStackFrame): - -2013-05-15 Nico Weber - - WebKit doesn't support MSVS2003 any more, remove preprocessor checks for older versions. - https://bugs.webkit.org/show_bug.cgi?id=116157 - - Reviewed by Anders Carlsson. - - Also remove a gcc3.2 workaround. - - Merges parts of these two commits by the talented Nico Weber: - https://chromium.googlesource.com/chromium/blink/+/3677e2f47348daeff405a40b6f90fbdf0654c2f5 - https://chromium.googlesource.com/chromium/blink/+/0fcd96c448dc30be1416dcc15713c53710c1a312 - - * os-win32/inttypes.h: - -2013-05-13 Alvaro Lopez Ortega - - Nightly build's jsc doesn't work without DYLD_FRAMEWORK... - https://bugs.webkit.org/show_bug.cgi?id=79065 - - Reviewed by Darin Adler. - - Fixes the build process so the depencencies of the jsc binary are - modified before its copied to its target directory. In this way - jsc should always use relative reference to the JavaScriptCore - libraries. - - * JavaScriptCore.xcodeproj/project.pbxproj: Fixes the commands in - the "Copy Into Framework" target. - -2013-05-13 Mark Hahnenberg - - Objective-C API: scanExternalObjectGraph should not create new JSVirtualMachine wrappers - https://bugs.webkit.org/show_bug.cgi?id=116074 - - If scanExternalObjectGraph creates a new JSVirtualMachine wrapper during collection, when the - scanExternalObjectGraph call finishes and the autorelease pool is drained we will dealloc the - JSVirtualMachine which will cause us to try to take the API lock for the corresponding VM. - If this happens on a GC thread other than the "main" thread, we will deadlock. The solution - is to just check the VM cache, and if there is no JSVirtualMachine wrapper, return early. - - Reviewed by Darin Adler. - - * API/JSVirtualMachine.mm: - (scanExternalObjectGraph): - -2013-05-13 Benjamin Poulain - - Improve stringProtoFuncLastIndexOf for the prefix case - https://bugs.webkit.org/show_bug.cgi?id=115952 - - Reviewed by Geoffrey Garen. - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncLastIndexOf): - Use the optimized string search when possible. - - On Joseph Pecoraro's tests, this gives a ~30% speed improvement. - -2013-05-13 Zalan Bujtas - - WebProcess consuming very high CPU on linkedin.com - https://bugs.webkit.org/show_bug.cgi?id=115601 - - Reviewed by Andreas Kling. - - Disable WEB_TIMING_MINIMAL. - Turn off window.performance and performance.now(). Some JS frameworks expect - additional Web Timing APIs, when performance.now() is available. - - * Configurations/FeatureDefines.xcconfig: - -2013-05-12 Anders Carlsson - - Stop including UnusedParam.h - https://bugs.webkit.org/show_bug.cgi?id=116003 - - Reviewed by Sam Weinig. - - UnusedParam.h is empty now so there's no need to include it anymore. - - * API/APICast.h: - * API/tests/JSNode.c: - * API/tests/JSNodeList.c: - * API/tests/minidom.c: - * API/tests/testapi.c: - * assembler/AbstractMacroAssembler.h: - * assembler/MacroAssemblerCodeRef.h: - * bytecode/CodeBlock.cpp: - * heap/HandleStack.h: - * interpreter/JSStackInlines.h: - * jit/CompactJITCodeMap.h: - * jit/ExecutableAllocator.h: - * parser/SourceProvider.h: - * runtime/DatePrototype.cpp: - * runtime/JSNotAnObject.cpp: - * runtime/JSSegmentedVariableObject.h: - * runtime/JSVariableObject.h: - * runtime/Options.cpp: - * runtime/PropertyOffset.h: - -2013-05-11 Martin Robinson - - [GTK] Add a basic cmake build for WTF and JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=115967 - - Reviewed by Laszlo Gombos. - - * PlatformGTK.cmake: Added. - * shell/PlatformGTK.cmake: Added. - -2013-05-10 Laszlo Gombos - - Remove USE(OS_RANDOMNESS) - https://bugs.webkit.org/show_bug.cgi?id=108095 - - Reviewed by Darin Adler. - - Remove the USE(OS_RANDOMNESS) guard as it is turned on for all - ports. - - * jit/JIT.cpp: - (JSC::JIT::JIT): - -2013-05-10 Mark Hahnenberg - - Rename StructureCheckHoistingPhase to TypeCheckHoistingPhase - https://bugs.webkit.org/show_bug.cgi?id=115938 - - We're going to add some more types of check hoisting soon, so let's have the right name here. - - Rubber stamped by Filip Pizlo. - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * dfg/DFGDriver.cpp: - (JSC::DFG::compile): - * dfg/DFGStructureCheckHoistingPhase.cpp: Removed. - * dfg/DFGStructureCheckHoistingPhase.h: Removed. - * dfg/DFGTypeCheckHoistingPhase.cpp: Copied from Source/JavaScriptCore/dfg/DFGStructureCheckHoistingPhase.cpp. - (JSC::DFG::TypeCheckHoistingPhase::TypeCheckHoistingPhase): - (JSC::DFG::performTypeCheckHoisting): - * dfg/DFGTypeCheckHoistingPhase.h: Copied from Source/JavaScriptCore/dfg/DFGStructureCheckHoistingPhase.h. - -2013-05-09 Christophe Dumez - - Unreviewed build fix after r149836. - - It broke at least EFL and GTK builds. Move new static members initialization - outside the class. Those need to have a definition outside the class because - their address is used (e.g. CodeCacheMap::nonGlobalWorkingSetMaxEntries). - - * runtime/CodeCache.cpp: - (JSC): - * runtime/CodeCache.h: - (CodeCacheMap): - -2013-05-08 Oliver Hunt - - Code cache stores bogus var references for functions in eval code - https://bugs.webkit.org/show_bug.cgi?id=115747 - - Reviewed by Mark Hahnenberg. - - Non-global eval now uses a per-CodeBlock cache, and only use it - when we're at the top of a function's scope. This means that we - will no longer cache the parsing of a single string across - multiple functions, and we won't cache when we're nested inside - constructs like |with| and |catch| where previously we would, which - is good because caching in those cases is unsound. - - * bytecode/EvalCodeCache.h: - (JSC): - (JSC::EvalCodeCache::getSlow): - (JSC::EvalCodeCache::get): - * bytecode/UnlinkedCodeBlock.h: - (JSC::UnlinkedCodeBlock::codeCacheForEval): - (UnlinkedCodeBlock): - (RareData): - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * interpreter/Interpreter.cpp: - (JSC::eval): - * runtime/CodeCache.cpp: - (JSC::CodeCache::CodeCache): - (JSC::CodeCache::generateBytecode): - (JSC): - (JSC::CodeCache::getCodeBlock): - * runtime/CodeCache.h: - (JSC::CodeCacheMap::CodeCacheMap): - (CodeCacheMap): - (JSC::CodeCacheMap::canPruneQuickly): - (JSC::CodeCacheMap::prune): - (JSC::CodeCache::create): - (CodeCache): - * runtime/Executable.cpp: - (JSC::EvalExecutable::EvalExecutable): - (JSC::EvalExecutable::compileInternal): - * runtime/Executable.h: - (JSC::EvalExecutable::create): - (EvalExecutable): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::createEvalCodeBlock): - * runtime/JSGlobalObject.h: - (JSGlobalObject): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - * runtime/VM.cpp: - (JSC::VM::VM): - * runtime/VM.h: - (VM): - -2013-05-08 Mark Hahnenberg - - DFGArrayMode::fromObserved is too liberal when it sees different Array and NonArray shapes - https://bugs.webkit.org/show_bug.cgi?id=115805 - - Reviewed by Geoffrey Garen. - - It checks the observed ArrayModes to see if we have seen any ArrayWith* first. If so, it assumes it's - an Array::Array, even if we've also observed any NonArrayWith* in the ArrayProfile. This leads to the - code generated by jumpSlowForUnwantedArrayMode to check the indexing type against (shape | IsArray) - instead of just shape, which can cause us to exit a lot in the case that we saw a NonArray. - - To fix this we need to add a case that checks for both ArrayWith* and NonArrayWith* cases first, which - should then use Array::PossiblyArray, then do the checks we were already doing. - - * bytecode/ArrayProfile.h: - (JSC::hasSeenArray): - (JSC::hasSeenNonArray): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::ArrayMode::fromObserved): - -2013-05-09 Joe Mason - - [BlackBerry] Set up logging buffer on start of jsc executable - https://bugs.webkit.org/show_bug.cgi?id=114688 - - Reviewed by Rob Buis. - - Internal PR: 322715 - Internally Reviewed By: Jeff Rogers - - * jsc.cpp: - (main): call BB::Platform::setupApplicationLogging - -2013-05-08 Michael Saboff - - JSC: There should be a disassembler for ARM Thumb 2 - https://bugs.webkit.org/show_bug.cgi?id=115827 - - Reviewed by Filip Pizlo. - - Added a new disassembler for ARMv7 Thumb2 instructions for use by the JSC debugging - and profiling code. The opcode coverage is currently not complete. It covers all - of the integer instructions JSC currently emits, but only a limited number of - floating point opcodes. Currently that is just the 64 bit vmov and vmsr instructions. - - The disassembler is structured as a base opcode class ARMv7DOpcode with sub-classes - for each instruction group. There is a public format method that does the bulk of - the disassembly work. There are two broad sub-classes, ARMv7D16BitOpcode and - ARMv7D32BitOpcode, for the 16 bit and 32 bit opcodes. There are sub-classes under - those two classes for individual and related groups of opcodes. Instructions are - "dispatched" to the right subclass via two arrays of linked lists in the inner classes - OpcodeGroup. There is one such inner class for each ARMv7D16BitOpcode and ARMv7D32BitOpcode. - Each OpcodeGroup has a mask and a pattern that it applies to the instruction to determine - that it matches a particular group. OpcodeGroup uses a static method to reinterpret_cast - the Opcode object to the right base class for the instruction group for formatting. - The cast eliminates the need of allocating an object for each decoded instruction. - Unknown instructions are formatted as ".word 1234" or ".long 12345678" depending whether - the instruction is 16 or 32 bit. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * disassembler/ARMv7: Added. - * disassembler/ARMv7/ARMv7DOpcode.cpp: Added. - (ARMv7Disassembler): - (OpcodeGroupInitializer): - (JSC::ARMv7Disassembler::ARMv7DOpcode::init): - (JSC::ARMv7Disassembler::ARMv7DOpcode::startITBlock): - (JSC::ARMv7Disassembler::ARMv7DOpcode::saveITConditionAt): - (JSC::ARMv7Disassembler::ARMv7DOpcode::fetchOpcode): - (JSC::ARMv7Disassembler::ARMv7DOpcode::disassemble): - (JSC::ARMv7Disassembler::ARMv7DOpcode::bufferPrintf): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendInstructionName): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendRegisterName): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendRegisterList): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendFPRegisterName): - (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::init): - (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::doDisassemble): - (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::defaultFormat): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddRegisterT2::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSPPlusImmediate::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractT1::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate3::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate8::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchConditionalT1::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchExchangeT1::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchT2::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareImmediateT1::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareRegisterT1::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareRegisterT2::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegisterT1::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeGeneratePCRelativeAddress::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadFromLiteralPool::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterSPRelative::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLogicalImmediateT1::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscAddSubSP::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscBreakpointT1::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscByteHalfwordOps::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscCompareAndBranch::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscHint16::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscIfThenT1::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscPushPop::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveImmediateT1::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveRegisterT1::format): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::init): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::doDisassemble): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::defaultFormat): - (JSC::ARMv7Disassembler::ARMv7DOpcodeConditionalBranchT3::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchOrBranchLink::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::appendModifiedImmediate): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::appendImmShift): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::appendFPRegister): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegShift::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegExtend::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegParallel::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegMisc::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeHint32::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadRegister::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadSignedImmediate::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadUnsignedImmediate::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataPushPopSingle::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate12::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate8::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleRegister::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVDoublePrecision::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVSinglePrecision::format): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMSR::format): - * disassembler/ARMv7/ARMv7DOpcode.h: Added. - (ARMv7Disassembler): - (ARMv7DOpcode): - (JSC::ARMv7Disassembler::ARMv7DOpcode::ARMv7DOpcode): - (JSC::ARMv7Disassembler::ARMv7DOpcode::is32BitInstruction): - (JSC::ARMv7Disassembler::ARMv7DOpcode::isFPInstruction): - (JSC::ARMv7Disassembler::ARMv7DOpcode::conditionName): - (JSC::ARMv7Disassembler::ARMv7DOpcode::shiftName): - (JSC::ARMv7Disassembler::ARMv7DOpcode::inITBlock): - (JSC::ARMv7Disassembler::ARMv7DOpcode::startingITBlock): - (JSC::ARMv7Disassembler::ARMv7DOpcode::endITBlock): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendInstructionNameNoITBlock): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendSeparator): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendCharacter): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendString): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendShiftType): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendSignedImmediate): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendUnsignedImmediate): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendPCRelativeOffset): - (JSC::ARMv7Disassembler::ARMv7DOpcode::appendShiftAmount): - (ARMv7D16BitOpcode): - (OpcodeGroup): - (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::OpcodeGroup::OpcodeGroup): - (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::OpcodeGroup::setNext): - (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::OpcodeGroup::next): - (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::OpcodeGroup::matches): - (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::OpcodeGroup::format): - (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::rm): - (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::rd): - (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::opcodeGroupNumber): - (ARMv7DOpcodeAddRegisterT2): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddRegisterT2::rdn): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddRegisterT2::rm): - (ARMv7DOpcodeAddSPPlusImmediate): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSPPlusImmediate::rd): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSPPlusImmediate::immediate8): - (ARMv7DOpcodeAddSubtract): - (ARMv7DOpcodeAddSubtractT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractT1::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractT1::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractT1::rm): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractT1::rn): - (ARMv7DOpcodeAddSubtractImmediate3): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate3::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate3::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate3::immediate3): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate3::rn): - (ARMv7DOpcodeAddSubtractImmediate8): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate8::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate8::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate8::rdn): - (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate8::immediate8): - (ARMv7DOpcodeBranchConditionalT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchConditionalT1::condition): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchConditionalT1::offset): - (ARMv7DOpcodeBranchExchangeT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchExchangeT1::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchExchangeT1::rm): - (ARMv7DOpcodeBranchT2): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchT2::immediate11): - (ARMv7DOpcodeCompareImmediateT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareImmediateT1::rn): - (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareImmediateT1::immediate8): - (ARMv7DOpcodeCompareRegisterT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareRegisterT1::rn): - (ARMv7DOpcodeCompareRegisterT2): - (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareRegisterT2::rn): - (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareRegisterT2::rm): - (ARMv7DOpcodeDataProcessingRegisterT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegisterT1::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegisterT1::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegisterT1::rm): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegisterT1::rdn): - (ARMv7DOpcodeGeneratePCRelativeAddress): - (JSC::ARMv7Disassembler::ARMv7DOpcodeGeneratePCRelativeAddress::rd): - (JSC::ARMv7Disassembler::ARMv7DOpcodeGeneratePCRelativeAddress::immediate8): - (ARMv7DOpcodeLoadFromLiteralPool): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadFromLiteralPool::rt): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadFromLiteralPool::immediate8): - (ARMv7DOpcodeLoadStoreRegisterImmediate): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::immediate5): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::rn): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::rt): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::scale): - (ARMv7DOpcodeLoadStoreRegisterImmediateWordAndByte): - (ARMv7DOpcodeLoadStoreRegisterImmediateHalfWord): - (ARMv7DOpcodeLoadStoreRegisterOffsetT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::opB): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::rm): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::rn): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::rt): - (ARMv7DOpcodeLoadStoreRegisterSPRelative): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterSPRelative::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterSPRelative::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterSPRelative::rt): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterSPRelative::immediate8): - (ARMv7DOpcodeLogicalImmediateT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLogicalImmediateT1::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLogicalImmediateT1::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLogicalImmediateT1::immediate5): - (ARMv7DOpcodeMiscAddSubSP): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscAddSubSP::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscAddSubSP::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscAddSubSP::immediate7): - (ARMv7DOpcodeMiscByteHalfwordOps): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscByteHalfwordOps::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscByteHalfwordOps::op): - (ARMv7DOpcodeMiscBreakpointT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscBreakpointT1::immediate8): - (ARMv7DOpcodeMiscCompareAndBranch): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscCompareAndBranch::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscCompareAndBranch::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscCompareAndBranch::immediate6): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscCompareAndBranch::rn): - (ARMv7DOpcodeMiscHint16): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscHint16::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscHint16::opA): - (ARMv7DOpcodeMiscIfThenT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscIfThenT1::firstCondition): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscIfThenT1::mask): - (ARMv7DOpcodeMiscPushPop): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscPushPop::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscPushPop::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscPushPop::registerMask): - (ARMv7DOpcodeMoveImmediateT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveImmediateT1::rd): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveImmediateT1::immediate8): - (ARMv7DOpcodeMoveRegisterT1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveRegisterT1::rd): - (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveRegisterT1::rm): - (ARMv7D32BitOpcode): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::OpcodeGroup::OpcodeGroup): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::OpcodeGroup::setNext): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::OpcodeGroup::next): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::OpcodeGroup::matches): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::OpcodeGroup::format): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::rd): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::rm): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::rn): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::rt): - (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::opcodeGroupNumber): - (ARMv7DOpcodeBranchRelative): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchRelative::sBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchRelative::j1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchRelative::j2): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchRelative::immediate11): - (ARMv7DOpcodeConditionalBranchT3): - (JSC::ARMv7Disassembler::ARMv7DOpcodeConditionalBranchT3::offset): - (JSC::ARMv7Disassembler::ARMv7DOpcodeConditionalBranchT3::condition): - (JSC::ARMv7Disassembler::ARMv7DOpcodeConditionalBranchT3::immediate6): - (ARMv7DOpcodeBranchOrBranchLink): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchOrBranchLink::offset): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchOrBranchLink::immediate10): - (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchOrBranchLink::isBL): - (ARMv7DOpcodeDataProcessingLogicalAndRithmetic): - (ARMv7DOpcodeDataProcessingModifiedImmediate): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::sBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::immediate12): - (ARMv7DOpcodeDataProcessingShiftedReg): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::sBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::immediate5): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::type): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::tbBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::tBit): - (ARMv7DOpcodeDataProcessingReg): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingReg::op1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingReg::op2): - (ARMv7DOpcodeDataProcessingRegShift): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegShift::opName): - (ARMv7DOpcodeDataProcessingRegExtend): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegExtend::opExtendName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegExtend::opExtendAndAddName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegExtend::rotate): - (ARMv7DOpcodeDataProcessingRegParallel): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegParallel::opName): - (ARMv7DOpcodeDataProcessingRegMisc): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegMisc::opName): - (ARMv7DOpcodeHint32): - (JSC::ARMv7Disassembler::ARMv7DOpcodeHint32::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeHint32::isDebugHint): - (JSC::ARMv7Disassembler::ARMv7DOpcodeHint32::debugOption): - (JSC::ARMv7Disassembler::ARMv7DOpcodeHint32::op): - (ARMv7DOpcodeFPTransfer): - (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::opH): - (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::opL): - (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::rt): - (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::opC): - (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::opB): - (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::vd): - (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::vn): - (ARMv7DOpcodeDataLoad): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataLoad::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataLoad::op): - (ARMv7DOpcodeLoadRegister): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadRegister::immediate2): - (ARMv7DOpcodeLoadSignedImmediate): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadSignedImmediate::pBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadSignedImmediate::uBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadSignedImmediate::wBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadSignedImmediate::immediate8): - (ARMv7DOpcodeLoadUnsignedImmediate): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadUnsignedImmediate::immediate12): - (ARMv7DOpcodeLongMultipleDivide): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::smlalOpName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::smlaldOpName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::smlsldOpName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::rdLo): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::rdHi): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::op1): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::op2): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::nBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::mBit): - (ARMv7DOpcodeDataPushPopSingle): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataPushPopSingle::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataPushPopSingle::op): - (ARMv7DOpcodeDataStoreSingle): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataStoreSingle::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeDataStoreSingle::op): - (ARMv7DOpcodeStoreSingleImmediate12): - (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate12::immediate12): - (ARMv7DOpcodeStoreSingleImmediate8): - (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate8::pBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate8::uBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate8::wBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate8::immediate8): - (ARMv7DOpcodeStoreSingleRegister): - (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleRegister::immediate2): - (ARMv7DOpcodeUnmodifiedImmediate): - (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::opName): - (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::shBit): - (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::bitNumOrSatImmediate): - (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::immediate5): - (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::immediate12): - (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::immediate16): - (ARMv7DOpcodeVMOVDoublePrecision): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVDoublePrecision::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVDoublePrecision::rt2): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVDoublePrecision::rt): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVDoublePrecision::vm): - (ARMv7DOpcodeVMOVSinglePrecision): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVSinglePrecision::op): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVSinglePrecision::rt2): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVSinglePrecision::rt): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVSinglePrecision::vm): - (ARMv7DOpcodeVMSR): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMSR::opL): - (JSC::ARMv7Disassembler::ARMv7DOpcodeVMSR::rt): - * disassembler/ARMv7Disassembler.cpp: Added. - (JSC::tryToDisassemble): - -2013-05-07 Julien Brianceau - - Take advantage of pre-decrement and post-increment opcodes for sh4 base JIT. - https://bugs.webkit.org/show_bug.cgi?id=115722 - - Reviewed by Oliver Hunt. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::load8PostInc): - (MacroAssemblerSH4): - (JSC::MacroAssemblerSH4::load16Unaligned): - (JSC::MacroAssemblerSH4::load16PostInc): - (JSC::MacroAssemblerSH4::storeDouble): - (JSC::MacroAssemblerSH4::load32WithUnalignedHalfWords): - * assembler/SH4Assembler.h: - (JSC::SH4Assembler::movwMemRegIn): - (SH4Assembler): - (JSC::SH4Assembler::movbMemRegIn): - (JSC::SH4Assembler::printInstr): - -2013-05-07 Anders Carlsson - - Remove AlwaysInline.h from WTF - https://bugs.webkit.org/show_bug.cgi?id=115727 - - Reviewed by Brent Fulgham. - - The macro that used to be in AlwaysInline.h is now in Compiler.h so there's no reason - to keep AlwaysInline.h around anymore. - - * jit/JSInterfaceJIT.h: - * parser/Lexer.h: - * runtime/JSCJSValue.h: - * runtime/SymbolTable.h: - -2013-05-07 Mikhail Pozdnyakov - - HashTraits >::PeekType should be raw pointer for better performance - https://bugs.webkit.org/show_bug.cgi?id=115646 - - Reviewed by Darin Adler. - - * bytecompiler/StaticPropertyAnalyzer.h: - (JSC::StaticPropertyAnalyzer::putById): - Updated accordingly to new HashMap<.., RefPtr>::get() semantics. - -2013-05-06 Julien Brianceau - - Misc bugfix and cleaning in sh4 base JIT. - https://bugs.webkit.org/show_bug.cgi?id=115627 - - Reviewed by Oliver Hunt. - - Get rid of loadX(RegisterID r0, RegisterID src, RegisterID dest) functions. - Remove misplaced extuw() implementation from MacroAssemblerSH4. - Add movbRegMemr0 and movwRegMemr0 functions in SH4Assembler. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::add32): Skip operation when first operand is a zero immediate. - (JSC::MacroAssemblerSH4::sub32): Skip operation when first operand is a zero immediate. - (JSC::MacroAssemblerSH4::load32): Fix wrong usage of r0 register. - (JSC::MacroAssemblerSH4::load8Signed): Handle "base == r0" case. - (MacroAssemblerSH4): - (JSC::MacroAssemblerSH4::load16): Handle "base == r0" case. - (JSC::MacroAssemblerSH4::load16Unaligned): Use extuw() implementation from SH4Assembler. - (JSC::MacroAssemblerSH4::load16Signed): Cosmetic change. - (JSC::MacroAssemblerSH4::store8): Fix unhandled BaseIndex offset and handle (base == r0) case. - (JSC::MacroAssemblerSH4::store16): Fix unhandled BaseIndex offset and handle (base == r0) case. - (JSC::MacroAssemblerSH4::store32): - * assembler/SH4Assembler.h: - (JSC::SH4Assembler::movwRegMemr0): - (SH4Assembler): - (JSC::SH4Assembler::movbRegMemr0): - (JSC::SH4Assembler::placeConstantPoolBarrier): Cosmetic change. - (JSC::SH4Assembler::maxJumpReplacementSize): - (JSC::SH4Assembler::replaceWithJump): Correct branch range and save an opcode. - (JSC::SH4Assembler::printInstr): - -2013-05-06 Anders Carlsson - - Stop using WTF::deleteAllValues in JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=115670 - - Reviewed by Oliver Hunt. - - Change the Vectors used to Vectors of OwnPtrs instead. - - * heap/DFGCodeBlocks.cpp: - (JSC::DFGCodeBlocks::~DFGCodeBlocks): - (JSC::DFGCodeBlocks::deleteUnmarkedJettisonedCodeBlocks): - -2013-05-06 Andras Becsi - - Build with GCC 4.8 fails because of -Wmaybe-uninitialized - https://bugs.webkit.org/show_bug.cgi?id=115648 - - Reviewed by Michael Saboff. - - Initialize values in Options::setOption since from - there we end up calling OptionRange::init with - uninitialized members. - - * runtime/Options.cpp: - -2013-05-06 Gabor Rapcsanyi - - JSC ARM traditional failing on Octane NavierStokes test - https://bugs.webkit.org/show_bug.cgi?id=115626 - - Reviewed by Zoltan Herczeg. - - Change the ARM traditional assembler to use double precision on value - conversions. - - * assembler/ARMAssembler.h: - -2013-05-03 Michael Saboff - - There should be a runtime option to constrain what functions get DFG compiled - https://bugs.webkit.org/show_bug.cgi?id=115576 - - Reviewed by Mark Hahnenberg. - - Added OptionRange to Options to allow checking that something is within an option - or not. The new OptionClass supports range strings in the form of [!][:]. - If only one value is given, then it will be used for both low and high. A leading - '!' inverts the check. If no range is given, then checking for a value within a range - will always return true. Added the option "bytecodeRangeToDFGCompile" that takes an - OptionRange string to select the bytecode range of code blocks to DFG compile. - - * dfg/DFGDriver.cpp: - (JSC::DFG::compile): Added new check for bytecode count within bytecodeRangeToDFGCompile - range. - * runtime/Options.cpp: - (JSC::parse): Added overloaded parse() for OptionRange. - (JSC::OptionRange::init): Parse range string and then initialize the range. - (JSC::OptionRange::isInRange): Function used by consumer to check if a value is within - the specified range. - (JSC::Options::dumpOption): Added code to dump OptionRange options. - * runtime/Options.h: - (OptionRange): New class. - (JSC::OptionRange::operator= ): This is really used as a default ctor for use within - the Option static array initialization. - (JSC::OptionRange::rangeString): This is used for debug. It assumes that the char* - passed into OptionRange::init is valid when this function is called. - -2013-05-02 Oliver Hunt - - Fix potential bug in lookup logic - https://bugs.webkit.org/show_bug.cgi?id=115522 - - Reviewed by Mark Hahnenberg. - - Though not a problem in practise, it is technically possible - to inject an un-proxied global object into the scope chain - via the C API. This change makes sure that the scope walk - in BytecodeGenerator actually limits itself to scopes that - are statically bindable. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::resolve): - * runtime/JSObject.h: - (JSObject): - (JSC): - (JSC::JSObject::isStaticScopeObject): - -2013-05-01 Roger Fong - - Set Path in makefile for AppleWin. - - * JavaScriptCore.vcxproj/JavaScriptCore.make: - -2013-05-01 Benjamin Poulain - - Remove the remaining wscript - https://bugs.webkit.org/show_bug.cgi?id=115459 - - Reviewed by Andreas Kling. - - * wscript: Removed. - -2013-04-30 Mark Lam - - JSContextGroupSetExecutionTimeLimit() should not pass a callback to the - VM watchdog if its client did not pass one in. - https://bugs.webkit.org/show_bug.cgi?id=115461. - - Reviewed by Geoffrey Garen. - - * API/JSContextRef.cpp: - (internalScriptTimeoutCallback): - (JSContextGroupSetExecutionTimeLimit): - * API/tests/testapi.c: - (main): - - Added test case when the time limit callback is 0. - - Also updated a check to verify that a TerminatedExecutionException is - thrown when the time out is cancelled. - - Also fixed some cosmetic typos. - -2013-04-30 Geoffrey Garen - - Removed op_ensure_property_exists - https://bugs.webkit.org/show_bug.cgi?id=115460 - - Reviewed by Mark Hahnenberg. - - It was unused, and whatever it was once used for was not optimized. - - * JavaScriptCore.order: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dumpBytecode): - * bytecode/Opcode.h: - (JSC::padOpcodeName): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - * jit/JITOpcodes32_64.cpp: - * jit/JITStubs.cpp: - * jit/JITStubs.h: - * llint/LLIntSlowPaths.cpp: - * llint/LLIntSlowPaths.h: - * llint/LowLevelInterpreter.asm: - -2013-04-30 Oliver Hunt - - JSC Stack walking logic craches in the face of inlined functions triggering VM re-entry - https://bugs.webkit.org/show_bug.cgi?id=115449 - - Reviewed by Geoffrey Garen. - - Rename callframeishost to something that makes sense, and fix - getCallerInfo to correctly handle inline functions calling into - the VM. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::codeOriginForReturn): - Make this more robust in the face of incorrect stack walking - * interpreter/CallFrame.cpp: - (JSC::CallFrame::trueCallerFrame): - Everyone has to perform a codeblock() check before calling this - so we might as well just do it here. - * interpreter/Interpreter.cpp: - (JSC::getCallerInfo): - -2013-04-30 Julien Brianceau - - Bug fixing in sh4 base JIT and LLINT. - https://bugs.webkit.org/show_bug.cgi?id=115420 - - Reviewed by Oliver Hunt. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::lshift32): - (JSC::MacroAssemblerSH4::rshift32): - (JSC::MacroAssemblerSH4::branchMul32): - (JSC::MacroAssemblerSH4::urshift32): - (JSC::MacroAssemblerSH4::replaceWithJump): - (JSC::MacroAssemblerSH4::maxJumpReplacementSize): - * assembler/SH4Assembler.h: - (JSC::SH4Assembler::shldRegReg): - (JSC::SH4Assembler::shadRegReg): - (JSC::SH4Assembler::shalImm8r): - (SH4Assembler): - (JSC::SH4Assembler::sharImm8r): - (JSC::SH4Assembler::maxJumpReplacementSize): - (JSC::SH4Assembler::replaceWithJump): - * offlineasm/sh4.rb: - -2013-04-30 Geoffrey Garen - - Objective-C JavaScriptCore API should publicly support bridging to C - https://bugs.webkit.org/show_bug.cgi?id=115447 - - Reviewed by Mark Hahnenberg. - - For consistency, I renamed - - +[JSValue valueWithValue:] => +[JSValue valueWithJSValueRef] - +[JSContext contextWithGlobalContextRef] => +[JSContext contextWithJSGlobalContextRef] - -[JSContext globalContext] => -[JSContext JSGlobalContextRef] - - I searched svn to verify that these functions don't have clients yet, - so we won't break anything. - - I also exported as public API - - +[JSValue valueWithJSValueRef:] - +[JSContext contextWithJSGlobalContextRef:] - - It's hard to integrate with the C API without these. - -2013-04-30 Commit Queue - - Unreviewed, rolling out r149349 and r149354. - http://trac.webkit.org/changeset/149349 - http://trac.webkit.org/changeset/149354 - https://bugs.webkit.org/show_bug.cgi?id=115444 - - The Thumb version of compileSoftModulo make invalid use of - registers (Requested by benjaminp on #webkit). - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/ARMv7Assembler.h: - (ARMv7Assembler): - * assembler/AbstractMacroAssembler.h: - (JSC::isARMv7s): - (JSC): - * assembler/MacroAssemblerARMv7.cpp: Removed. - * assembler/MacroAssemblerARMv7.h: - (MacroAssemblerARMv7): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - * dfg/DFGOperations.cpp: - * dfg/DFGOperations.h: - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compileSoftModulo): - (DFG): - (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForARMv7s): - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::callOperation): - (SpeculativeJIT): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - -2013-04-30 Zalan Bujtas - - Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/ - https://bugs.webkit.org/show_bug.cgi?id=111244 - - Reviewed by David Kilzer. - - Enable performance.now() as a minimal subset of Web Timing API. - It returns DOMHighResTimeStamp, a monotonically increasing value representing the - number of milliseconds from the start of the navigation of the current document. - JS libraries use this API to check against the requestAnimationFrame() timestamp. - - * Configurations/FeatureDefines.xcconfig: - -2013-04-30 Zoltan Arvai - - Unreviewed. Speculative build fix on Qt Arm and Mips after r149349. - - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compileSoftModulo): - -2013-04-29 Cosmin Truta - - [ARM] Expand the use of integer division - https://bugs.webkit.org/show_bug.cgi?id=115138 - - Reviewed by Benjamin Poulain. - - If availability of hardware integer division isn't known at compile - time, check the CPU flags and decide at runtime whether to fall back - to software. Currently, this OS-specific check is implemented on QNX. - - Moreover, use operator % instead of fmod() in the calculation of the - software modulo. Even when it's software-emulated, operator % is faster - than fmod(): on ARM v7 QNX, without hardware division, we noticed - >3% speedup on SunSpider. - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::sdiv): Did not compile conditionally. - (JSC::ARMv7Assembler::udiv): Ditto. - * assembler/AbstractMacroAssembler.h: - (JSC::isARMv7s): Removed. - * assembler/MacroAssemblerARMv7.cpp: Added. - (JSC::isIntegerDivSupported): Added. - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::supportsIntegerDiv): Added. - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): Checked MacroAssembler::supportsIntegerDiv() in ArithDiv case. - * dfg/DFGOperations.cpp: - (JSC::DFG::operationModOnInts): Added. - * dfg/DFGOperations.h: - (JSC::DFG::Z_DFGOperation_ZZ): Added. - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compileSoftModulo): Separated the X86-specific and ARM-specific codegen - from the common implementation; used operationModOnInts on ARM. - (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForARM): Renamed from compileIntegerArithDivForARMv7. - (JSC::DFG::SpeculativeJIT::compileArithMod): Allowed run-time detection of integer div on ARM. - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::callOperation): Added overloads with Z_DFGOperation_ZZ arguments. - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): Used compileIntegerArithDivForARM. - -2013-04-29 Benjamin Poulain - - Unify the data access of StringImpl members from JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=115320 - - Reviewed by Andreas Kling. - - DFG accesses the member infos by directly calling the methods on StringImpl, - while the baseline JIT was using helper methods on ThunkHelpers. - - Cut the middle man, and use StringImpl directly everywhere. - - * jit/JITInlines.h: - (JSC::JIT::emitLoadCharacterString): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::stringGetByValStubGenerator): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::stringGetByValStubGenerator): - * jit/JSInterfaceJIT.h: - * jit/ThunkGenerators.cpp: - (JSC::stringCharLoad): - -2013-04-29 Benjamin Poulain - - Use push and pop for iOS math function thunks - https://bugs.webkit.org/show_bug.cgi?id=115215 - - Reviewed by Filip Pizlo. - - The iOS ABI is a little different than regular ARM ABI regarding stack alignment. - The requirement is 4 bytes: - "The ARM environment uses a stack that—at the point of function calls—is 4-byte aligned, - grows downward, and contains local variables and a function’s parameters." - - Subsequently, we can just use push and pop to preserve the link register. - - * jit/ThunkGenerators.cpp: - -2013-04-29 Brent Fulgham - - [Windows, WinCairo] Get rid of last few pthread include/link references. - https://bugs.webkit.org/show_bug.cgi?id=115375 - - Reviewed by Tim Horton. - - * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: - * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: - * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: - * JavaScriptCore.vcxproj/jsc/jscCommon.props: - * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props: - * JavaScriptCore.vcxproj/testapi/testapiCommon.props: - -2013-04-29 Roger Fong - - Unreviewed. AppleWin VS2010 build fix. - - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: - -2013-04-26 Mark Hahnenberg - - ~BlockAllocator should ASSERT that it has no more Regions left - https://bugs.webkit.org/show_bug.cgi?id=115287 - - Reviewed by Andreas Kling. - - * heap/BlockAllocator.cpp: - (JSC::BlockAllocator::~BlockAllocator): - (JSC::BlockAllocator::allRegionSetsAreEmpty): - * heap/BlockAllocator.h: - (RegionSet): - (JSC::BlockAllocator::RegionSet::isEmpty): - (BlockAllocator): - -2013-04-29 Mark Hahnenberg - - IndexingTypes should use hex - https://bugs.webkit.org/show_bug.cgi?id=115286 - - Decimal is kind of confusing/hard to read because they're used as bit masks. Hex seems more appropriate. - - Reviewed by Geoffrey Garen. - - * runtime/IndexingType.h: - -2013-04-29 Carlos Garcia Campos - - Unreviewed. Fix make distcheck. - - * GNUmakefile.list.am: Add missing headers files to compilation - and offlineasm/sh4.rb script. - -2013-04-28 Dean Jackson - - [Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS) - https://bugs.webkit.org/show_bug.cgi?id=115310 - - Reviewed by Simon Fraser. - - Remove ENABLE_HIGH_DPI_CANVAS_macosx. - - * Configurations/FeatureDefines.xcconfig: - -2013-04-27 Darin Adler - - Move from constructor and member function adoptCF/NS to free function adoptCF/NS. - https://bugs.webkit.org/show_bug.cgi?id=115307 - - Reviewed by Geoffrey Garen. - - * heap/HeapTimer.cpp: - (JSC::HeapTimer::HeapTimer): - * runtime/VM.cpp: - (JSC::enableAssembler): - Use adoptCF free function. - -2013-04-27 Anders Carlsson - - Try to fix the Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: - -2013-04-25 Geoffrey Garen - - Cleaned up pre/post inc/dec in bytecode - https://bugs.webkit.org/show_bug.cgi?id=115222 - - Reviewed by Filip Pizlo. - - A few related changes here: - - (*) Removed post_inc and post_dec. The two-result form was awkward to - reason about. Being explicit about the intermediate mov and to_number - reduces DFG overhead, removes some fragile ASSERTs from the DFG, and - fixes a const bug. Plus, we get to blow away 262 lines of code. - - (*) Renamed pre_inc and pre_dec to inc and dec, since there's only one - version now. - - (*) Renamed to_jsnumber to to_number, to match the ECMA name. - - (*) Tightened up the codegen and runtime support for to_number. - - - * JavaScriptCore.order: Order! - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dumpBytecode): - * bytecode/Opcode.h: - (JSC::padOpcodeName): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitInc): - (JSC::BytecodeGenerator::emitDec): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitToNumber): - (BytecodeGenerator): Removed post_inc and post_dec. - - * bytecompiler/NodesCodegen.cpp: - (JSC::emitPreIncOrDec): Updated for rename. - - (JSC::emitPostIncOrDec): Issue an explicit mov and to_number when needed. - These are rare, and they boil away in the DFG. - - (JSC::PostfixNode::emitResolve): - (JSC::PrefixNode::emitResolve): For const, use an explicit mov instead - of any special forms. This fixes a bug where we would do string - add/subtract instead of number. - - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGCapabilities.h: - (JSC::DFG::canCompileOpcode): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_inc): - (JSC::JIT::emitSlow_op_inc): - (JSC::JIT::emit_op_dec): - (JSC::JIT::emitSlow_op_dec): - * jit/JITArithmetic32_64.cpp: - (JSC::JIT::emit_op_inc): - (JSC::JIT::emitSlow_op_inc): - (JSC::JIT::emit_op_dec): - (JSC::JIT::emitSlow_op_dec): Removed post_inc/dec, and updated for renames. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_to_number): - (JSC::JIT::emitSlow_op_to_number): Removed a test for number cells. There's - no such thing! - - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_to_number): Use LowestTag to avoid making assumptions - about the lowest valued tag. - - (JSC::JIT::emitSlow_op_to_number): Updated for renames. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - * llint/LLIntSlowPaths.cpp: - (JSC::LLInt::LLINT_SLOW_PATH_DECL): - * llint/LLIntSlowPaths.h: - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: - * parser/NodeConstructors.h: - (JSC::UnaryPlusNode::UnaryPlusNode): Removed post_inc/dec, and updated for renames. - - * runtime/Operations.cpp: - (JSC::jsIsObjectType): Removed a test for number cells. There's - no such thing! - -2013-04-27 Julien Brianceau - - REGRESSION(r149114): cache flush for SH4 arch may flush an extra page. - https://bugs.webkit.org/show_bug.cgi?id=115305 - - Reviewed by Andreas Kling. - - * assembler/SH4Assembler.h: - (JSC::SH4Assembler::cacheFlush): - -2013-04-26 Geoffrey Garen - - Re-landing - - Filled out more cases of branch folding in bytecode when emitting - expressions into a branching context - https://bugs.webkit.org/show_bug.cgi?id=115057 - - Reviewed by Phil Pizlo. - - We can't fold the number == 1 case to boolean because all non-zero numbers - down-cast to true, but only 1 is == to true. - -2013-04-26 Filip Pizlo - - Correct indentation of SymbolTable.h - - Rubber stamped by Mark Hahnenberg. - - * runtime/SymbolTable.h: - -2013-04-26 Roger Fong - - Make Apple Windows VS2010 build results into and get dependencies from __32 suffixed folders. - Make the DebugSuffix configuration use _debug dependencies. - - * JavaScriptCore.vcxproj/JavaScriptCore.make: - * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: - * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: - * JavaScriptCore.vcxproj/JavaScriptCoreCF.props: - * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: - * JavaScriptCore.vcxproj/JavaScriptCoreDebug.props: - * JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj.filters: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorBuildCmd.cmd: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorDebug.props: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPreBuild.cmd: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorProduction.props: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorRelease.props: - * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make: - * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: - * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedCommon.props: - * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props: - * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props: - * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props: - * JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd: - * JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd: - * JavaScriptCore.vcxproj/JavaScriptCoreProduction.props: - * JavaScriptCore.vcxproj/JavaScriptCoreRelease.props: - * JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props: - * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make: - * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: - * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh: - * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make: - * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: - * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh: - * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: - * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: - * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: - * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props: - * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: - * JavaScriptCore.vcxproj/build-generated-files.sh: - * JavaScriptCore.vcxproj/copy-files.cmd: - * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: - * JavaScriptCore.vcxproj/jsc/jscCommon.props: - * JavaScriptCore.vcxproj/jsc/jscDebug.props: - * JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd: - * JavaScriptCore.vcxproj/jsc/jscPreLink.cmd: - * JavaScriptCore.vcxproj/jsc/jscProduction.props: - * JavaScriptCore.vcxproj/jsc/jscRelease.props: - * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: - * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters: - * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props: - * JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props: - * JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd: - * JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd: - * JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props: - * JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props: - * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: - * JavaScriptCore.vcxproj/testapi/testapiCommon.props: - * JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props: - * JavaScriptCore.vcxproj/testapi/testapiDebug.props: - * JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props: - * JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd: - * JavaScriptCore.vcxproj/testapi/testapiProduction.props: - * JavaScriptCore.vcxproj/testapi/testapiRelease.props: - * JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props: - -2013-04-26 Roger Fong - - Disable sub-pixel layout on mac. - https://bugs.webkit.org/show_bug.cgi?id=114999. - - Reviewed by Simon Fraser. - - * Configurations/FeatureDefines.xcconfig: - -2013-04-26 Oliver Hunt - - Make stack tracing more robust - https://bugs.webkit.org/show_bug.cgi?id=115272 - - Reviewed by Geoffrey Garen. - - CallFrame already handles stack walking confusion robustly, - so we should make sure that the actual walk handles that as well. - - * interpreter/Interpreter.cpp: - (JSC::getCallerInfo): - -2013-04-26 Mark Hahnenberg - - REGRESSION(r149165): It made many tests crash on 32 bit - https://bugs.webkit.org/show_bug.cgi?id=115227 - - Reviewed by Csaba Osztrogonác. - - m_reservation is uninitialized when ENABLE(SUPER_REGION) is false. - - * heap/SuperRegion.cpp: - (JSC::SuperRegion::~SuperRegion): - -2013-04-26 Julien Brianceau - - Fix SH4 build broken since r149159. - https://bugs.webkit.org/show_bug.cgi?id=115229 - - Add BranchTruncateType enum in SH4 port and handle it in branchTruncateDoubleToInt32. - - Reviewed by Allan Sandfeld Jensen. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::branchTruncateDoubleToInt32): - -2013-04-25 Mark Hahnenberg - - SuperRegion doesn't call deallocate() on its PageReservation - https://bugs.webkit.org/show_bug.cgi?id=115208 - - Reviewed by Geoffrey Garen. - - It should. This doesn't cause us to leak physical memory, but it does cause us to leak virtual - address space (and probably mach ports), which is also bad :-( FixedVMPoolExecutableAllocator - also has this bug, but it doesn't matter much because there's only one instance of that class - throughout the entire lifetime of the process, whereas each VM has its own SuperRegion. - - * heap/SuperRegion.cpp: - (JSC::SuperRegion::~SuperRegion): - * heap/SuperRegion.h: - (SuperRegion): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (FixedVMPoolExecutableAllocator): - (JSC::FixedVMPoolExecutableAllocator::~FixedVMPoolExecutableAllocator): - -2013-04-25 Filip Pizlo - - DFG doesn't support to_jsnumber - https://bugs.webkit.org/show_bug.cgi?id=115129 - - Reviewed by Geoffrey Garen. - - Based on Oliver's patch. Implements to_jsnumber as Identity(Number:@thingy), and then does - an optimization in Fixup to turn Identity(Number:) into Identity(Int32:) if the predictions - tell us to. Identity is later turned into Phantom. - - Also fixed BackPropMask, which appeared to have NodeDoesNotExit included in it. That's - wrong; NodeDoesNotExit is not a backward propagation property. - - Also fixed Identity to be marked as CanExit (i.e. not NodeDoesNotExit). - - This more than doubles the FPS on ammo. - - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGCapabilities.h: - (JSC::DFG::canCompileOpcode): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - (FixupPhase): - (JSC::DFG::FixupPhase::observeUseKindOnNode): - (JSC::DFG::FixupPhase::observeUseKindOnEdge): - * dfg/DFGNodeFlags.h: - (DFG): - * dfg/DFGNodeType.h: - (DFG): - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - -2013-04-24 Oliver Hunt - - Add support for Math.imul - https://bugs.webkit.org/show_bug.cgi?id=115143 - - Reviewed by Filip Pizlo. - - Add support for Math.imul, a thunk generator for Math.imul, - and an intrinsic. - - Fairly self explanatory set of changes, DFG intrinsics simply - leverages the existing ValueToInt32 nodes. - - * create_hash_table: - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::executeEffects): - * dfg/DFGBackwardsPropagationPhase.cpp: - (JSC::DFG::BackwardsPropagationPhase::propagate): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::handleIntrinsic): - * dfg/DFGCSEPhase.cpp: - (JSC::DFG::CSEPhase::performNodeCSE): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - * dfg/DFGNodeType.h: - (DFG): - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compileArithIMul): - * dfg/DFGSpeculativeJIT.h: - (SpeculativeJIT): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * jit/ThunkGenerators.cpp: - (JSC::imulThunkGenerator): - (JSC): - * jit/ThunkGenerators.h: - (JSC): - * runtime/Intrinsic.h: - * runtime/MathObject.cpp: - (JSC): - (JSC::mathProtoFuncIMul): - * runtime/VM.cpp: - (JSC::thunkGeneratorForIntrinsic): - -2013-04-25 Filip Pizlo - - Unreviewed, roll out http://trac.webkit.org/changeset/148999 - It broke http://kripken.github.io/ammo.js/examples/new/ammo.html - - * JavaScriptCore.order: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitNewArray): - (JSC::BytecodeGenerator::emitThrowReferenceError): - (JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::shouldEmitProfileHooks): - (BytecodeGenerator): - * bytecompiler/NodesCodegen.cpp: - (JSC): - (JSC::NullNode::emitBytecode): - (JSC::BooleanNode::emitBytecode): - (JSC::NumberNode::emitBytecode): - (JSC::StringNode::emitBytecode): - (JSC::IfNode::emitBytecode): - (JSC::IfElseNode::emitBytecode): - * parser/ASTBuilder.h: - (JSC::ASTBuilder::createIfStatement): - (ASTBuilder): - * parser/NodeConstructors.h: - (JSC): - (JSC::NullNode::NullNode): - (JSC::BooleanNode::BooleanNode): - (JSC::NumberNode::NumberNode): - (JSC::StringNode::StringNode): - (JSC::IfNode::IfNode): - (JSC::IfElseNode::IfElseNode): - * parser/Nodes.h: - (JSC::ExpressionNode::isPure): - (JSC::ExpressionNode::isSubtract): - (StatementNode): - (NullNode): - (JSC::NullNode::isNull): - (BooleanNode): - (JSC::BooleanNode::isPure): - (NumberNode): - (JSC::NumberNode::value): - (JSC::NumberNode::isPure): - (StringNode): - (JSC::StringNode::isPure): - (JSC::StringNode::isString): - (BinaryOpNode): - (IfNode): - (JSC): - (IfElseNode): - (ContinueNode): - (BreakNode): - * parser/Parser.cpp: - (JSC::::parseIfStatement): - * parser/ResultType.h: - (ResultType): - * runtime/JSCJSValueInlines.h: - (JSC::JSValue::pureToBoolean): - * runtime/JSCell.h: - (JSCell): - * runtime/JSCellInlines.h: - (JSC): - -2013-04-25 Filip Pizlo - - PreciseJumpTargets should treat loop_hint as a jump target - https://bugs.webkit.org/show_bug.cgi?id=115209 - - Reviewed by Mark Hahnenberg. - - I didn't add a test but I turned this into a release assertion. Running Octane is enough - to trigger it. - - * bytecode/PreciseJumpTargets.cpp: - (JSC::computePreciseJumpTargets): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - -2013-04-25 Roman Zhuykov - - Fix problems with processing negative zero on DFG. - https://bugs.webkit.org/show_bug.cgi?id=113862 - - Reviewed by Filip Pizlo. - - Fix NodeNeedsNegZero flag propagation in BackwardPropagationPhase. - Function arithNodeFlags should not mask NodeNeedsNegZero flag for ArithNegate and DoubleAsInt32 - nodes and this flag should be always used to decide where we need to generate nezative-zero checks. - Remove unnecessary negative-zero checks from integer ArithDiv on ARM. - Also remove such checks from integer ArithMod on ARM and X86, and make them always to - check not only "modulo_result == 0" but also "dividend < 0". - Generate faster code for case when ArithMod operation divisor is constant power of 2 on ARMv7 - in the same way as on ARMv7s, and add negative-zero checks into this code when needed. - Change speculationCheck ExitKind from Overflow to NegativeZero where applicable. - - This shows 30% speedup of math-spectral-norm, and 5% speedup - on SunSpider overall on ARMv7 Linux. - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32): - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32): - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::branchConvertDoubleToInt32): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32): - * dfg/DFGBackwardsPropagationPhase.cpp: - (JSC::DFG::BackwardsPropagationPhase::isNotNegZero): - (JSC::DFG::BackwardsPropagationPhase::isNotPosZero): - (JSC::DFG::BackwardsPropagationPhase::propagate): - * dfg/DFGNode.h: - (JSC::DFG::Node::arithNodeFlags): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compileDoubleAsInt32): - (JSC::DFG::SpeculativeJIT::compileSoftModulo): - (JSC::DFG::SpeculativeJIT::compileArithNegate): - -2013-04-25 Oliver Hunt - - Stack guards are too conservative - https://bugs.webkit.org/show_bug.cgi?id=115147 - - Reviewed by Mark Hahnenberg. - - Increase stack guard to closer to old size. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::StackPolicy::StackPolicy): - -2013-04-25 Oliver Hunt - - Stack guards are too conservative - https://bugs.webkit.org/show_bug.cgi?id=115147 - - Reviewed by Geoffrey Garen. - - Reduce the limits and simplify the decision making. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::StackPolicy::StackPolicy): - -2013-04-25 Nick Diego Yamane - - JSC: Fix interpreter misbehavior in builds with JIT disabled - https://bugs.webkit.org/show_bug.cgi?id=115190 - - Reviewed by Oliver Hunt. - - Commit http://trac.webkit.org/changeset/147858 modified - some details on how JS stack traces are built. The method - "getLineNumberForCallFrame", renamed in that changeset to - "getBytecodeOffsetForCallFrame" is always returning `0' when - JIT is disabled - - How to reproduce: - - Build webkit with JIT disabled - - Open MiniBrowser, for example, with http://google.com - - In a debug build, WebProcess will hit the following ASSERT: - Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:279 ASSERT(low); - - * interpreter/Interpreter.cpp: - (JSC::getBytecodeOffsetForCallFrame): - -2013-04-25 Oliver Hunt - - Make checkSyntax take a VM instead of an ExecState - - RS=Tim - - * jsc.cpp: - (runInteractive): - * runtime/Completion.cpp: - (JSC::checkSyntax): - * runtime/Completion.h: - (JSC): - -2013-04-25 Michael Saboff - - 32 Bit: Crash due to RegExpTest nodes not setting result type to Boolean - https://bugs.webkit.org/show_bug.cgi?id=115188 - - Reviewed by Geoffrey Garen. - - Changed the RegExpTest node to set the AbstractValue to boolean, since that - what it is. - - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::executeEffects): - -2013-04-25 Julien Brianceau - - REGRESSION(r137994): Random crashes occur with SH4 JSC. - https://bugs.webkit.org/show_bug.cgi?id=115167. - - Reviewed by Oliver Hunt. - - Since r137994, uncommited pages could be inside the area of memory in - parameter of the cacheFlush function. That's why we have to flush each - page separately to avoid a fail of the whole flush, if an uncommited page - is in the area. - - This patch is very similar to changeset 145194 made for ARMv7 architecture, - see https://bugs.webkit.org/show_bug.cgi?id=111441 for further information. - - * assembler/SH4Assembler.h: - (JSC::SH4Assembler::cacheFlush): - -2013-04-24 Mark Lam - - Add watchdog timer polling for the DFG. - https://bugs.webkit.org/show_bug.cgi?id=115134. - - Reviewed by Geoffrey Garen. - - The strategy is to add a speculation check to the DFG generated code to - test if the watchdog timer has fired or not. If the watchdog timer has - fired, the generated code will do an OSR exit to the baseline JIT, and - let it handle servicing the watchdog timer. - - If the watchdog is not enabled, this speculation check will not be - emitted. - - * API/tests/testapi.c: - (currentCPUTime_callAsFunction): - (extendTerminateCallback): - (main): - - removed try/catch statements so that we can test the watchdog on the DFG. - - added JS bindings to a native currentCPUTime() function so that the timeout - tests can be more accurate. - - also shortened the time values so that the tests can complete sooner. - - * bytecode/ExitKind.h: - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::executeEffects): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - * dfg/DFGNodeType.h: - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * runtime/Watchdog.cpp: - (JSC::Watchdog::setTimeLimit): - -2013-04-24 Filip Pizlo - - Special thunks for math functions should work on ARMv7 - https://bugs.webkit.org/show_bug.cgi?id=115144 - - Reviewed by Gavin Barraclough and Oliver Hunt. - - The only hard bit here was ensuring that we implemented the very special - "cheap C call" convention on ARMv7. - - * assembler/AbstractMacroAssembler.h: - (JSC::isARMv7s): - (JSC): - (JSC::isX86): - * dfg/DFGCommon.h: - * jit/SpecializedThunkJIT.h: - (SpecializedThunkJIT): - (JSC::SpecializedThunkJIT::callDoubleToDoublePreservingReturn): - * jit/ThunkGenerators.cpp: - (JSC::floorThunkGenerator): - (JSC::ceilThunkGenerator): - (JSC::roundThunkGenerator): - (JSC::expThunkGenerator): - (JSC::logThunkGenerator): - -2013-04-24 Julien Brianceau - - Misc bugfix and cleaning in sh4 base JIT. - https://bugs.webkit.org/show_bug.cgi?id=115022. - - Reviewed by Oliver Hunt. - - Remove unused add32() and sub32() with scratchreg parameter to avoid - confusion as this function prototype means another behaviour. - Remove unused "void push(Address)" function which seems quite buggy. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::and32): Cosmetic change. - (JSC::MacroAssemblerSH4::lshift32): Cosmetic change. - (JSC::MacroAssemblerSH4::or32): Cosmetic change. - (JSC::MacroAssemblerSH4::xor32): Cosmetic change. - (MacroAssemblerSH4): - (JSC::MacroAssemblerSH4::load32): Cosmetic change. - (JSC::MacroAssemblerSH4::load8Signed): Fix invalid offset upper limit - when using r0 register and cosmetic changes. - (JSC::MacroAssemblerSH4::load8): Reuse load8Signed to avoid duplication. - (JSC::MacroAssemblerSH4::load16): Fix invalid offset upper limit when - using r0 register, fix missing offset shift and cosmetic changes. - (JSC::MacroAssemblerSH4::store32): Cosmetic change. - (JSC::MacroAssemblerSH4::branchAdd32): Store result value before branch. - -2013-04-24 Patrick Gansterer - - [WIN] Remove pthread from Visual Studio files in JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=114864 - - Reviewed by Brent Fulgham. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: - * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props: - * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: - * JavaScriptCore.vcxproj/jsc/jscCommon.props: - * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props: - * JavaScriptCore.vcxproj/testapi/testapiCommon.props: - * JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props: - -2013-04-24 Filip Pizlo - - DFG should keep the operand to create_this alive if it's emitting code for create_this - https://bugs.webkit.org/show_bug.cgi?id=115133 - - Reviewed by Mark Hahnenberg. - - The DFG must model bytecode liveness, or else OSR exit is going to have a really bad time. - - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - -2013-04-24 Roger Fong - - Have VS2010 WebKit solution look in WebKit_Libraries/lib32 for dependencies. - - * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd: - * JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd: - * JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd: - * JavaScriptCore.vcxproj/jsc/jscPreLink.cmd: - * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters: - * JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd: - * JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd: - * JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd: - -2013-04-24 Geoffrey Garen - - 32-bit build fix. - - Unreviewed. - - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compilePeepHoleBooleanBranch): Explicitly - truncate to 32-bit to avoid compiler warnings. It's safe to truncate - because the payload of a boolean is the low bits on both 64-bit and 32-bit. - -2013-04-23 Geoffrey Garen - - Filled out more cases of branch folding in the DFG - https://bugs.webkit.org/show_bug.cgi?id=115088 - - Reviewed by Oliver Hunt. - - No change on the benchmarks we track, but a 3X speedup on a - microbenchmark that uses these techniques. - - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): (!/=)= and (!/=)== can constant - fold all types, not just numbers, because true constants have no - side effects when type-converted at runtime. - - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - * dfg/DFGNode.h: - (JSC::DFG::Node::shouldSpeculateBoolean): Added support for fixing up - boolean uses, like we do for other types like number. - - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compilePeepHoleBooleanBranch): - (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch): - (JSC::DFG::SpeculativeJIT::compare): - (JSC::DFG::SpeculativeJIT::compileStrictEq): - (JSC::DFG::SpeculativeJIT::compileBooleanCompare): Peephole fuse - boolean compare and/or compare-branch, now that we have the types for - them. - - * dfg/DFGSpeculativeJIT.h: Updated declarations. - -== Rolled over to ChangeLog-2013-04-24 == diff --git a/ChangeLog-2002-12-03 b/ChangeLog-2002-12-03 deleted file mode 100644 index bd63777..0000000 --- a/ChangeLog-2002-12-03 +++ /dev/null @@ -1,2271 +0,0 @@ -2002-12-03 Maciej Stachowiak - - Reviewed by: Darin Adler - - - fixed Deployment build. - - * kjs/dtoa.cpp: Work around warnings. - -2002-12-03 Maciej Stachowiak - - - fixed 3114790 - Gamespot reviews pages badly mis-rendering - because floating point numbers format wide - - Reviewed by: David Hyatt - - * kjs/dtoa.cpp: Imported float <--> string conversion routines - from David M. Gay. I changed this to fix warnings and avoid - colliding with names of standard library functions. - * kjs/dtoa.h: Added a header I made up for dtoa.cpp - * kjs/ustring.cpp: - (UString::from): Use new double to string routine (kjs_strtod). - (UString::toDouble): Use new string to double routine (kjs_dtoa). - * JavaScriptCore.pbproj/project.pbxproj: Added new files - -2002-11-27 John Sullivan - - * kjs/collector.cpp: - removed puts("COLLECT") leftover debugging spam that was - buggin' gramps - -=== Alexander-34 === - -2002-11-26 Maciej Stachowiak - - Change ActivationImp to be allocated via the garbage collector - again instead of on the stack. This fixes the following four - regressions but sadly it causes a 6% performance hit. It's - probably possibly to reduce the hit a bit by being smarter about - inlining and the way the marking list variant is implemented, but - I'll look into that later. - - - fixed 3111500 - REGRESSION: crash in "KJS::ScopeChain::mark()" on www.posci.com - - fixed 3111145 - REGRESSION: reproducible crash in KJS hashtable lookup at time.com - - fixed 3110897 - REGRESSION: javascript crasher on http://bmwgallery.tripod.com/ - - fixed 3109987 - REGRESSION: Reproducible crash in KJS ObjectImp at live365.com - - Also: - - - improved DEBUG_COLLECTOR mode a bit by never giving memory back - to the system. - - * kjs/collector.cpp: - * kjs/context.h: - * kjs/function.cpp: - (ActivationImp::ActivationImp): - (ActivationImp::mark): - (ActivationImp::createArgumentsObject): - * kjs/function.h: - * kjs/internal.cpp: - (ContextImp::ContextImp): - (ContextImp::mark): - * kjs/list.cpp: - * kjs/list.h: - * kjs/value.cpp: - (Value::Value): - -2002-11-26 Darin Adler - - * kjs/property_map.cpp: - (PropertyMap::save): Look at the attributes the same way in the single hash entry - case as in the actual hash table case. Change the rule for which attributes to save - to "attributes that don't have the ReadOnly, DontEnum, or Function bit set". - Also fix bug where saving an empty property map would leave the count set to the old value. - -2002-11-26 Richard Williamson - - Remove debugging code. Could be cause of performance regresssion. - * kjs/nodes.cpp: - (FunctionCallNode::evaluate): - - Restire attributes correctly. - * kjs/property_map.cpp: - -2002-11-25 Richard Williamson - - Use delete[] (not delete) operator to delete array. - - * kjs/property_map.cpp: - -2002-11-25 Richard Williamson - - Added debugging info. Fixed property map save function. - - * kjs/nodes.cpp: - (FunctionCallNode::evaluate): - * kjs/property_map.cpp: - -2002-11-25 Richard Williamson - - Changes for back/forward. Currently disabled. - - * kjs/property_map.cpp: - * kjs/property_map.h: - -2002-11-25 Darin Adler - - * kjs/property_map.cpp: Rearrange code a little bit and tweak indentation. - This might provide a tiny speedup because we don't look at the single entry - any more in cases where the _table pointer is non-0. - -2002-11-24 Darin Adler - - - changed ScopeChain to not ref each item in the chain, and use - marking instead; gains 1% on JavaScript iBench - - * kjs/context.h: Return chain by reference. - * kjs/internal.cpp: (ContextImp::mark): Mark the scope chain. - * kjs/interpreter.cpp: (Context::scopeChain): Return chain by reference. - * kjs/interpreter.h: Make some Context methods inline. - * kjs/nodes.cpp: - (ThisNode::evaluate): Get at ContextImp directly. - (ResolveNode::evaluateReference): Ditto. - (VarDeclNode::evaluate): Ditto. - (VarDeclNode::processVarDecls): Ditto. - (FuncDeclNode::processFuncDecl): Pass ScopeChain directly to avoid copying. - (FuncExprNode::evaluate): Ditto. - * kjs/object.cpp: Make scope and setScope inline. - * kjs/object.h: Make scope return a chain by reference. Make scope and - setScope both be inline. Use a normal ScopeChain instead of NoRefScopeChain - since they are now one and the same. - * kjs/scope_chain.cpp: Remove all the code to ref and deref objects. - Merge NoRefScopeChain in with ScopeChain since they both work this way now. - * kjs/scope_chain.h: Remove NoRefScopeChain and simplify the ref counts. - Make more functions inline. - -2002-11-24 Maciej Stachowiak - - - fixed 3098356 - Hard hang on movie search at www.movietickets.com - - * kjs/string_object.cpp: - (StringProtoFuncImp::call): When doing a regexp replacement that - results in an empty match, always move on to the next character - after doing the replacement. The previous code would hit an - infinite loop if an initial empty match was replaced with the - empty string. - -2002-11-24 Maciej Stachowiak - - - fixed 3095446 - Crash on AppleScript page due to very long argument list - - * kjs/grammar.y: Don't try to construct the argument list in the - right order, since that blows out the parser stack. - * kjs/nodes.cpp: - (ArgumentsNode::ArgumentsNode): Instead reverse the argument list - here. - * kjs/nodes.h: Make ArgumentsNode a friend of ArgumentListNode. - * kjs/grammar.cpp: Updated from grammar.y. - -2002-11-23 Maciej Stachowiak - - - completed Darin's mostly-fix for 3037795 - Resource use - increases when accessing very high index value in array - - The two missing pieces were handling sparse properties when - shrinking the array, and when sorting. Thse are now both taken - care of. - - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstanceImp::put): - (ArrayInstanceImp::deleteProperty): - (ArrayInstanceImp::resizeStorage): - (ArrayInstanceImp::setLength): - (ArrayInstanceImp::sort): - (ArrayInstanceImp::pushUndefinedObjectsToEnd): - * kjs/identifier.h: - * kjs/object.h: - * kjs/property_map.cpp: - * kjs/property_map.h: - * kjs/reference_list.cpp: - (ReferenceList::append): - (ReferenceList::length): - * kjs/reference_list.h: - * kjs/ustring.cpp: - (UString::toUInt32): - * kjs/ustring.h: - -2002-11-23 Maciej Stachowiak - - Numerous collector changes for a net gain of 3% on JS ibench: - - - Replaced per-block bitmap with free list. - - Increased number of empty blocks kept around to 2. - - Doubled block size. - - When scanning heap in collector, skip scanning the rest of a - block as soon as we see as many live cells as the the number of - used cells it had originally. - - Also the following collector changes unrelated to performance: - - - Made constants `const int' instead of `static const int'. - - Miscellaneous code cleanup. - - * kjs/collector.cpp: - - - Added debugging mode enabled by defining DEBUG_GC which asserts - when a destroyed ValueImp - - * kjs/internal.cpp: - (ContextImp::mark): - * kjs/value.cpp: - (Value::Value): - * kjs/value.h: - * kjs/config.h: - -2002-11-22 Darin Adler - - - replaced List class with a vector rather than a linked list, changed it - to use a pool of instances instead of all the nodes allocated off of the - heap; gives 10% gain on iBench - - * kjs/list.h: Complete rewrite. - * kjs/list.cpp: Ditto. - - * kjs/array_object.cpp: (compareWithCompareFunctionForQSort): Go back to - doing a clear and two appends here. Fast with the new list implementation. - - * kjs/collector.h: Remove _COLLECTOR hack and just make rootObjectClasses - return a const void *. - * kjs/collector.cpp: Remove _COLLECTOR hack, and various other minor tweaks. - -2002-11-22 Darin Adler - - - prepare to reimplement KJS::List; move to its own file, add statistics - - * kjs/function_object.cpp: (FunctionProtoFuncImp::call): Use new copyTail() - function rather than copy() and removeFirst(). - - * kjs/identifier.cpp: Add statistics, off by default. - * kjs/property_map.cpp: Add statistics, off by default. - - * kjs/list.cpp: Added. Moved code here. To be rewritten. - * kjs/list.h: Added. Moved interface here. To be rewritten. - - * kjs/types.cpp: Removed. - * kjs/types.h: Now just an empty header that includes other headers. - - * JavaScriptCore.pbproj/project.pbxproj: Add new files, rearrange. - -2002-11-22 Maciej Stachowiak - - - reduce cell size to 56 bytes from 64, now that nearly all - objects fit in that size. .5% speed gain and probably some - footprint gain. - - * kjs/collector.cpp: Change CELL_SIZE from 64 to 56. - -2002-11-22 Darin Adler - - - change ScopeChain to be a singly linked list shares tails, gives 11% gain on iBench - - * kjs/context.h: - (ContextImp::pushScope): Make inline, use push instead of prepend, and pass imp pointer. - (ContextImp::popScope): Make inline, use pop instead of removeFirst. - * kjs/function.cpp: (DeclaredFunctionImp::DeclaredFunctionImp): No need to copy. - * kjs/function_object.cpp: (FunctionObjectImp::construct): Use push instead of - prepend, and pass imp pointer. - * kjs/internal.cpp: (ContextImp::ContextImp): Use clear, push instead of prepend, - and pass imp pointers. - * kjs/nodes.cpp: (ResolveNode::evaluateReference): Use isEmpty, pop, and top instead - of ScopeChainIterator. - * kjs/object.h: Change _scope to be a NoRefScopeChain. - * kjs/object.cpp: No need to initialize _scope any more, since it's not a NoRefScopeChain. - - * kjs/scope_chain.h: Rewrite, different implementation and interface. - * kjs/scope_chain.cpp: More of the same. - -2002-11-22 Maciej Stachowiak - - - a simple change for .4% gain on ibench - instead of unmarking - all objects at the start of collection, instead unmark as part of - the sweep phase - - * kjs/collector.cpp: - (Collector::collect): Remove separate unmarking pass and instead - unmark the objects that don't get collected during the sweep - phase. - -2002-11-21 Darin Adler - - - stop garbage collecting the ActivationImp objects, gets 3% on iBench - - pave the way to separate the argument lists from scope chains - - * kjs/context.h: Added. Moved ContextImp here so it can use things defined - in function.h - - * kjs/scope_chain.h: Added. Starting as a copy of List, to be improved. - * kjs/scope_chain.cpp: Added. Starting as a copy of List, to be improved. - - * JavaScriptCore.pbproj/project.pbxproj: Rearranged things, added context.h. - - * kjs/function.cpp: - (FunctionImp::call): Pass InterpreterImp, not ExecState, to ContextImp. - (DeclaredFunctionImp::DeclaredFunctionImp): List -> ScopeChain. - (ActivationImp::createArgumentsObject): ArgumentList -> List. - (GlobalFuncImp::call): Pass InterpreterImp, not an ExecState, to ContextImp. - * kjs/function.h: List -> ScopeChain. - * kjs/function_object.cpp: (FunctionObjectImp::construct): List -> ScopeChain. - * kjs/internal.cpp: - (ContextImp::ContextImp): Set the context in the interpreter. - (ContextImp::~ContextImp): Set the context in the interpreter to the caller. - (ContextImp::mark): Mark all the activation objects. - (InterpreterImp::InterpreterImp): Initialize context to 0. - (InterpreterImp::mark): Mark the top context. - (InterpreterImp::evaluate): Pass InterpreterImp to ContextImp. - * kjs/internal.h: Move ContextImp to its own header. Add setContext to InterpreterImp. - * kjs/interpreter.cpp: (Context::scopeChain): List -> ScopeChain. - * kjs/interpreter.h: List -> ScopeChain. - * kjs/nodes.cpp: - (ResolveNode::evaluateReference): List -> ScopeChain. - (FuncDeclNode::processFuncDecl): List -> ScopeChain. - (FuncExprNode::evaluate): List -> ScopeChain. - * kjs/object.cpp: List -> ScopeChain. - * kjs/object.h: List -> ScopeChain. - - * kjs/types.h: Remove needsMarking features from List. - * kjs/types.cpp: Ditto. - -2002-11-21 Maciej Stachowiak - - - reduced the size of PropertyMap by storing sizes and such in the - dynamically allocated part of the object to reduce the size of - ObjectImp - .5% speed improvement on JS iBench. - - * kjs/property_map.cpp: - * kjs/property_map.h: - -2002-11-21 Maciej Stachowiak - - * Makefile.am: Pass symroots for this tree to pbxbuild. - -=== Alexander-33 === - -2002-11-21 Darin Adler - - * kjs/property_map.cpp: More assertions. - -2002-11-21 Darin Adler - - * kjs/property_map.cpp: Turn that consistency check back off. - -2002-11-21 Darin Adler - - - someone somewhere must be defining a macro named check, causing a compile failure in WebCore - - Rename check() to checkConsistency(). - - * kjs/property_map.h: Rename. - * kjs/property_map.cpp: Yes, rename. - -2002-11-21 Darin Adler - - - add self-check to property map in hopes of finding the cnet.com bug - - * kjs/property_map.h: Add check() function. - * kjs/property_map.cpp: Add the checking, controlled by DO_CONSISTENCY_CHECK. - - - fixed UChar interface so it's not so slow in debug builds - - * kjs/ustring.h: Nothing in UChar needs to be private. - - * kjs/function.cpp: (GlobalFuncImp::call): - * kjs/function_object.cpp: (FunctionObjectImp::construct): - * kjs/identifier.cpp: - * kjs/lexer.cpp: (Lexer::setCode), (Lexer::shift): - * kjs/lookup.cpp: (keysMatch): - * kjs/ustring.cpp: (UString::Rep::computeHash), (KJS::compare): - Use the "uc" field instead of the "unicode()" inline function. - -2002-11-21 Darin Adler - - - fixed a null-dereference I ran into while trying to reproduce bug 3107351 - - * kjs/function.h: Change ActivationImp constructor to take context parameter. - * kjs/function.cpp: (ActivationImp::ActivationImp): Take context parameter, - not execution state parameter. - - * kjs/internal.cpp: (ContextImp::ContextImp): Initialize activation object - from context, not execution state, because the new context is not yet in the - execution state. - -2002-11-20 Darin Adler - - - added a feature for Richard to use in his back/forward cache - - * kjs/object.h: Added save/restoreProperties. - * kjs/property_map.h: Here too. - * kjs/property_map.cpp: Here too. - -2002-11-20 Darin Adler - - - created argument list objects only on demand for a 7.5% speedup - - * kjs/function.h: Change ActivationImp around. - * kjs/function.cpp: - (FunctionImp::call): Pass a pointer to the arguments list to avoid ref/unref. - (FunctionImp::get): Get the function pointer from the context directly, - not the activation object. - (ArgumentsImp::ArgumentsImp): Add an overload that takes no arguments. - (ActivationImp::ActivationImp): Store a context pointer and an arguments object pointer. - (ActivationImp::get): Special case for arguments, create it and return it. - (ActivationImp::put): Special case for arguments, can't be set. - (ActivationImp::hasProperty): Special case for arguments, return true. - (ActivationImp::deleteProperty): Special case for arguments, refuse to delete. - (ActivationImp::mark): Mark the arguments object. - (ActivationImp::createArgumentsObject): Do the work of actually creating it. - (GlobalFuncImp::call): Use stack-based objects for the ContextImp and ExecState. - - * kjs/internal.h: Keep function and arguments pointer in the context. - * kjs/internal.cpp: - (ContextImp::ContextImp): Don't pass in the func and args when making an ActivationImp. - (InterpreterImp::evaluate): Use stack-based objects here. - - * kjs/types.h: Add ArgumentList as a synonym for List, soon to be separate. - -2002-11-20 Maciej Stachowiak - - Reduced the size of ValueImp by 8 bytes for a .5% speedup. - - * kjs/value.h: Removed destructed flag. Made refcount and flag 16 - bits each. - * kjs/value.cpp: - (ValueImp::~ValueImp): Don't set destructed flag. - -2002-11-20 Darin Adler - - * kjs/types.cpp: Keep ref count for the whole lists of nodes. - Doesn't speed things up much, less than 1%. - -2002-11-20 Maciej Stachowiak - - * kjs/collector.cpp: - (Collector::allocate): Clear the flags on newly allocated objects. - -2002-11-20 Darin Adler - - - oops, checked in big regression instead of 5% speedup - - * kjs/function.cpp: (ActivationImp::ActivationImp): Make a marking - list, not a refing list. - - - a cut at the sparse array implementation - - * kjs/array_instance.h: Keep storageLength separate from length. - * kjs/array_object.cpp: - (ArrayInstanceImp::ArrayInstanceImp): Start with storageLength == length. - (ArrayInstanceImp::get): Check against storage length. - (ArrayInstanceImp::put): Ditto. - (ArrayInstanceImp::hasProperty): Ditto. - (ArrayInstanceImp::deleteProperty): Ditto. - (ArrayInstanceImp::setLength): Only enlarge storage length up to a cutoff. - (ArrayInstanceImp::mark): Use storageLength. - (ArrayInstanceImp::pushUndefinedObjectsToEnd): Added FIXME. - -2002-11-20 Darin Adler - - - decrease ref/deref -- 5% speedup in iBench - - * JavaScriptCore.pbproj/project.pbxproj: Added array_instance.h - * kjs/array_instance.h: Added so it can be shared by function.h. - - * kjs/array_object.cpp: - * kjs/array_object.h: - * kjs/bool_object.cpp: - * kjs/bool_object.h: - * kjs/collector.cpp: - * kjs/date_object.cpp: - * kjs/date_object.h: - * kjs/error_object.cpp: - * kjs/function.cpp: - * kjs/function.h: - * kjs/function_object.cpp: - * kjs/internal.cpp: - * kjs/internal.h: - * kjs/math_object.cpp: - * kjs/nodes.cpp: - * kjs/number_object.cpp: - * kjs/object.cpp: - * kjs/object.h: - * kjs/object_object.cpp: - * kjs/property_map.cpp: - * kjs/reference.cpp: - * kjs/reference.h: - * kjs/regexp_object.cpp: - * kjs/string_object.cpp: - * kjs/string_object.h: - * kjs/value.cpp: - * kjs/value.h: - Switched lots of interfaces so they don't require ref/deref. - -2002-11-20 Maciej Stachowiak - - Fixed the two most obvious problems with the new GC for another 6% - improvement. - - * kjs/collector.cpp: - (Collector::allocate): Don't bother doing the bit tests on a bitmap word if - all it's bits are on. - (Collector::collect): Track memoryFull boolean. - * kjs/collector.h: Inlined outOfMemory since it was showing up on profiles. - -2002-11-20 Maciej Stachowiak - - Rewrote garbage collector to make blocks of actual memory instead - of blocks of pointers. 7% improvement on JavaScript - iBench. There's still lots of room to tune the new GC, this is - just my first cut. - - * kjs/collector.cpp: - (Collector::allocate): - (Collector::collect): - (Collector::size): - (Collector::outOfMemory): - (Collector::finalCheck): - (Collector::numGCNotAllowedObjects): - (Collector::numReferencedObjects): - (Collector::liveObjectClasses): - * kjs/collector.h: - * kjs/function.cpp: - (ActivationImp::ActivationImp): - * kjs/function.h: - -2002-11-20 Darin Adler - - - on the road to killing ActivationImp - - * kjs/function.h: Add get/put to FunctionImp. Remove argumentsObject() from - ActivationImp. Add function() to ActivationImp. - * kjs/function.cpp: - (FunctionImp::FunctionImp): No arguments property. - (FunctionImp::call): No need to set up the arguments property. - (FunctionImp::parameterString): Remove ** strangeness. - (FunctionImp::processParameters): Ditto. - (FunctionImp::get): Added, handles arguments and length properties. - (FunctionImp::put): Ditto. - (FunctionImp::hasProperty): Ditto. - (FunctionImp::deleteProperty): Ditto. - (ActivationImp::ActivationImp): Store a function pointer so we can find it - in the context. - - * kjs/function_object.cpp: (FunctionObjectImp::construct): No need to set up - arguments property. - * kjs/nodes.cpp: (FuncExprNode::evaluate): No need to set up length property. - - * kjs/internal.h: Return ObjectImp * for activation object. - - * kjs/interpreter.h: Remove stray declaration of ExecStateImp. - -2002-11-20 Darin Adler - - - add a couple of list operations to avoid clearing lists so much during sorting; gives 1.5% iBench - - * kjs/types.h: Added replaceFirst/replaceLast. - * kjs/types.cpp: (List::replaceFirst), (List::replaceLast): Added. - - * kjs/array_object.cpp: (compareWithCompareFunctionForQSort): Use replaceFirst/replaceLast. - - * kjs/property_map.cpp: Put in an ifdef so I can re-add/remove the single entry to see if - it has outlived its usefulness. (It hasn't yet.) - -2002-11-20 Darin Adler - - - atomic identifiers; gives another 6.5% in the iBench suite - - * kjs/identifier.h: Did the real thing. - * kjs/identifier.cpp: Ditto. - - * kjs/property_map.h: _tableSizeHashMask -> _tableSizeMask - * kjs/property_map.cpp: The above, plus take advantage of comparing - by pointer instead of by comparing bytes. - -2002-11-19 Darin Adler - - - a few more globals for often-used property names - - conversion to Identifier from UString must now be explicit - - * kjs/error_object.cpp: - * kjs/function.cpp: - * kjs/function_object.cpp: - * kjs/identifier.cpp: - * kjs/identifier.h: - * kjs/lexer.cpp: - * kjs/nodes.cpp: - * kjs/number_object.cpp: - * kjs/object.cpp: - * kjs/object.h: - * kjs/string_object.cpp: - * kjs/testkjs.cpp: - * kjs/ustring.cpp: - * kjs/ustring.h: - -2002-11-19 Darin Adler - - - another step towards atomic identifiers; storing hash in the string rep. gives about - a 1.5% speedup in the JavaScript iBench - - * kjs/ustring.h: Add a hash field to UString::Rep. - * kjs/ustring.cpp: - (UString::Rep::create): Set hash to uninitialized value. - (UString::Rep::destroy): Do the deleting in her, and call Identifier if needed. - (UString::Rep::computeHash): Added. - (UString::append): Set hash to 0 when modifying the string in place. - (UString::operator=): Ditto. - - * kjs/property_map.cpp: Use the hash from UString. - - * kjs/identifier.h: Added aboutToDestroyUStringRep. - * kjs/identifier.cpp: (Identifier::aboutToDestroyUStringRep): Added. - -2002-11-19 Darin Adler - - - next step towards atomic identifiers; Identifier is no longer derived from UString - - * kjs/identifier.h: Remove base class and add _ustring member. - * kjs/identifier.cpp: Add null and an == that works with const char *. - * kjs/property_map.cpp: Get rep through _ustring. - - * kjs/function.cpp: (FunctionImp::parameterString): Call ustring(). - * kjs/function_object.cpp: (FunctionProtoFuncImp::call): Ditto. - * kjs/nodes.cpp: - (PropertyNode::evaluate): Ditto. - (VarDeclNode::evaluate): Ditto. - (ForInNode::execute): Ditto. - * kjs/nodes2string.cpp: (SourceStream::operator<<): Add overload for Identifier. - * kjs/reference.cpp: (Reference::getValue): Call ustring(). - * kjs/regexp_object.cpp: (RegExpObjectImp::get): Call ustring(). - -2002-11-19 Darin Adler - - - fixed memory trasher - - * kjs/ustring.cpp: (UString::from): Fix "end of buffer" computation. - -2002-11-19 Darin Adler - - - a first step towards atomic identifiers in JavaScript - - Most places that work with identifiers now use Identifier - instead of UString. - - * kjs/identifier.cpp: Added. - * kjs/identifier.h: Added. - * JavaScriptCore.pbproj/project.pbxproj: Added files. - - * kjs/array_object.cpp: - * kjs/array_object.h: - * kjs/completion.cpp: - * kjs/completion.h: - * kjs/date_object.cpp: - * kjs/date_object.h: - * kjs/function.cpp: - * kjs/function.h: - * kjs/function_object.cpp: - * kjs/grammar.cpp: - * kjs/grammar.cpp.h: - * kjs/grammar.h: - * kjs/grammar.y: - * kjs/internal.cpp: - * kjs/internal.h: - * kjs/lexer.cpp: - * kjs/lookup.cpp: - * kjs/lookup.h: - * kjs/math_object.cpp: - * kjs/math_object.h: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/number_object.cpp: - * kjs/number_object.h: - * kjs/object.cpp: - * kjs/object.h: - * kjs/property_map.cpp: - * kjs/property_map.h: - * kjs/reference.cpp: - * kjs/reference.h: - * kjs/regexp_object.cpp: - * kjs/regexp_object.h: - * kjs/string_object.cpp: - * kjs/string_object.h: - -2002-11-19 Darin Adler - - - fix hash function and key comparison for the other kind of hash table; yields 3% - - * kjs/lookup.cpp: - (keysMatch): Added. - (Lookup::findEntry): Don't allocate and convert to ASCII just to search. - -2002-11-19 Darin Adler - - - another hash table fix; yields a 2% improvement on iBench JavaScript - - * kjs/property_map.cpp: A few more places where we use & instead of %. - - - some List changes that don't affect speed yet - - * kjs/types.cpp: - (List::prependList): Tighten up a tiny bit. - (List::copy): Use prependList. - * kjs/types.h: Remove appendList and globalClear. - - * kjs/interpreter.cpp: (Interpreter::finalCheck): Remove List::globalClear(). - -2002-11-19 Darin Adler - - - fixed 3105026 -- REGRESSION: DHTML menus are broken all over the place - - * kjs/types.cpp: (List::prepend): Fix backwards links in new node. - -2002-11-19 Darin Adler - - - a fix that gives another 1.5% on the iBench JavaScript test - - * kjs/ustring.cpp: (UString::from): Stop using sprintf to format integers. - -2002-11-18 Darin Adler - - - reduced the creation of Value objects and hoisted the property map - into Object for another gain of about 6% - - * JavaScriptCore.pbproj/project.pbxproj: Made property_map.h public. - * kjs/array_object.cpp: - (compareWithCompareFunctionForQSort): Don't wrap the ValueImp * in a Value - just to add it to a list. - (ArrayProtoFuncImp::call): Pass the globalObject directly so we don't have - to ref/deref. - * kjs/function.cpp: - (FunctionImp::call): Use a reference for the global object to avoid ref/deref. - (GlobalFuncImp::call): Ditto. - * kjs/internal.cpp: - (BooleanImp::toObject): Put the object directly into the list, don't create a Value. - (StringImp::toObject): Ditto. - (NumberImp::toObject): Ditto. - (InterpreterImp::evaluate): Use a reference for the global object. - * kjs/internal.h: Return a reference for the global object. - * kjs/interpreter.cpp: (Interpreter::globalObject): Ditto. - * kjs/interpreter.h: Ditto. - * kjs/object.cpp: Use _prop directly in the object, not a separate pointer. - * kjs/object.h: Ditto. - * kjs/types.cpp: Added List methods that work directly with ValueImp. - (List::append): Added a ValueImp version. - (List::prepend): Ditto. - (List::appendList): Work directly with the ValueImp's. - (List::prependList): Ditto. - (List::copy): Use appendList. - (List::empty): Use a shared global List. - * kjs/types.h: Update for above changes. - -2002-11-18 Darin Adler - - * kjs/property_map.cpp: Oops, copyright goes to Apple, not me. - * kjs/property_map.h: Ditto. - -2002-11-18 Darin Adler - - - property and string improvements giving a 7% or so improvement in JavaScript iBench - - * kjs/property_map.h: Rewrite to use a hash table. - * kjs/property_map.cpp: Ditto. - - * kjs/string_object.h: - * kjs/string_object.cpp: - (StringInstanceImp::StringInstanceImp): Construct a string with the right value - instead of putting the string in later. - (StringInstanceImp::get): Get the length from the string, not a separate property. - (StringInstanceImp::put): Ignore attempts to set length, since we don't put it in - the property map. - (StringInstanceImp::hasProperty): Return true for length. - (StringInstanceImp::deleteProperty): Return false for length. - (StringObjectImp::construct): Call new StringInstanceImp constructor. Don't try - to set a length property. - - * kjs/ustring.h: Make the rep deref know how to deallocate the rep. - * kjs/ustring.cpp: - (UString::release): Move the real work to the rep's deref, since the hash table - now uses the rep directly. - - * kjs/object.h: Remove unused field. - -2002-11-18 Maciej Stachowiak - - Change List to completely avoid going through the GC - allocator. 3.6% performance improvement on JavaScript iBench. - - * kjs/internal.cpp: - (InterpreterImp::mark): Don't mark the empty list. - - For all the methods below I basically lifted the ListImp version - up to the List method with minor tweaks. - - * kjs/types.cpp: - (ListIterator::ListIterator): - (List::List): - (List::operator=): - (List::~List): - (List::mark): - (List::append): - (List::prepend): - (List::appendList): - (List::prependList): - (List::removeFirst): - (List::removeLast): - (List::remove): - (List::clear): - (List::clearInternal): - (List::copy): - (List::begin): - (List::end): - (List::isEmpty): - (List::size): - (List::at): - (List::operator[]): - (List::empty): - (List::erase): - (List::refAll): - (List::derefAll): - (List::swap): - (List::globalClear): - * kjs/types.h: - -2002-11-18 Maciej Stachowiak - - Fixed a horrible leak introduced with my last change that - somehow did not show up on my machine. - - * kjs/types.cpp: - (List::List): Mark ListImp as GC allowed. - -2002-11-18 Maciej Stachowiak - - Another step towards the List conversion: stop inheriting from Value. - - * kjs/types.cpp: - (ListIterator::ListIterator): - (List::List): - (List::operator=): - (List::~List): - (List::mark): - (List::append): - (List::prepend): - (List::appendList): - (List::prependList): - (List::removeFirst): - (List::removeLast): - (List::remove): - (List::clear): - (List::copy): - (List::begin): - (List::end): - (List::isEmpty): - (List::size): - (List::at): - (List::operator[]): - * kjs/types.h: - -2002-11-18 Maciej Stachowiak - - Partway to removing Value from List. Created a marking List - variant, used it in place of ListImp. - - * kjs/internal.h: Removed List stuff. - * kjs/internal.cpp: - (InterpreterImp::mark): Call appropriate List method to do marking of - empty ListImp. - * kjs/object.h: - * kjs/object.cpp: Use marking List instead of ListImp *. - * kjs/types.h: - * kjs/types.cpp: - (List::List): New boolean needsMarking parameter. - (List::operator=): Perform trickery related to needsMarking. - (List::~List): Likewise. - (List::mark): Mark the ListImp. - (List::markEmptyList): - (ListImp::*): Moved here fron internal.cpp, they will be - integrated into the relevant List methods soon. - -2002-11-18 Darin Adler - - - another string constant discovered that can be optimized - - * kjs/object.h: Add a property name constant for "__proto__". - * kjs/object.cpp: Define it. - (ObjectImp::get): Use it. - (ObjectImp::hasProperty): Use it. - - - prepare to turn PropertyMap into a hash table - - * kjs/object.cpp: - (ObjectImp::mark): Use the new PropertyMap::mark(). - (ObjectImp::put): Use the new overload of PropertyMap::get(). - (ObjectImp::deleteProperty): Use the new overload of PropertyMap::get(). - (ObjectImp::propList): Use PropertyMap::addEnumerablesToReferenceList(). - - * kjs/property_map.h: Remove PropertyMapNode and make all node-related methods private. - Add mark(), a new overload of get() that returns attributes, a clear() that takes no attributes, - and addEnumerablesToReferenceList(). - * kjs/property_map.cpp: - (PropertyMap::get): Added new overload. - (PropertyMap::clear): Added new overload. - (PropertyMap::mark): Added. - (PropertyMap::addEnumerablesToReferenceList): Added. - - * kjs/ustring.h: Added a hash function. - * kjs/ustring.cpp: (KJS::hash): Added. - -2002-11-18 Darin Adler - - - simplified the ExecState class, which was showing up in profiles - - Sped up JavaScript iBench by 6%. - - * kjs/interpreter.h: Removed the level of indirection, and made it all inline. - * kjs/interpreter.cpp: Removed ExecState implementation from here altogether. - - - fixed an oversight in my sort speedup - - * kjs/array_object.h: Add pushUndefinedObjectsToEnd. - * kjs/array_object.cpp: - (ArrayInstanceImp::sort): Call pushUndefinedObjectsToEnd. - (ArrayInstanceImp::pushUndefinedObjectsToEnd): Added. - Pushes all undefined to the end of the array. - -2002-11-18 Darin Adler - - - fix worst speed problems on the sort page of the iBench JavaScript test - - Sped up JavaScript iBench by 70%, the sort page by 88%. - - * kjs/array_object.h: Add array-specific sort functions. - * kjs/array_object.cpp: - (compareByStringForQSort): Added. - (ArrayInstanceImp::sort): Added. - (compareWithCompareFunctionForQSort): Added. - (ArrayProtoFuncImp::call): Use ArrayInstanceImp::sort if the object being - sorted is actually an array. - - * kjs/object.h: Add argumentsPropertyName. - * kjs/object.cpp: Add argumentsPropertyName. - * kjs/function.cpp: - (FunctionImp::FunctionImp): Use argumentsPropertyName to avoid making a UString. - (FunctionImp::call): Ditto. - (ActivationImp::ActivationImp): Ditto. - * kjs/function_object.cpp: (FunctionObjectImp::construct): Ditto. - - * kjs/ustring.h: Added compare function for -1/0/+1 comparison. - * kjs/ustring.cpp: (KJS::compare): Added. - -2002-11-18 Maciej Stachowiak - - Change ArgumentListNode operations to be iterative instead of - recursive. This probably fixes 3095446 (Crash in - KJS::ArgumentListNode::ref()) but I can't reproduce it myself so - I'm not 100% sure. I think the original bug was a stack overflow - and this change would remove that possibility. - - * kjs/nodes.cpp: - (ArgumentListNode::ref): Make iterative. - (ArgumentListNode::deref): Make iterative. - (ArgumentListNode::evaluateList): Make iterative. - -=== Alexander-32 === - -2002-11-14 Darin Adler - - - fixed 3101243 -- excite passes date that can't be parsed, results in bogus date at top right corner - - * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Handle errors from strtol - by checking errno. Check the "string in a haystack" to be sure it's a multiple - of 3. Add case that allows year to be after time. - -2002-11-14 Darin Adler - - - fixed 3101191 -- REGRESSION: Hang loading excite.com - - * kjs/date_object.cpp: - (mktimeUsingCF): Pick an arbitrary cutoff of 3000, and return -1 if the - year passed in is that big so we don't infinite loop. Also validate the - rest of the date with CFGregorianDateIsValid. - (DateProtoFuncImp::call): Handle a -1 result from mktime. - (DateObjectImp::construct): Check for NaN before calling mktime, and also - handle a -1 result from mktime. - (DateObjectFuncImp::call): Check for NaN before calling mktime, and also - handle a -1 result from mktime. - -2002-11-13 Darin Adler - - - fixed 3099930 -- dates/times without time zones are parsed as UTC by kjs, - local time by other browsers - - * kjs/date_object.cpp: - (DateProtoFuncImp::call): Handle the NaN case better, like Mozilla and OmniWeb. - (DateObjectFuncImp::call): Return NaN rather than Undefined() for bad dates. - (KJS::parseDate): Return NaN rather than Undefined() or 0 for bad dates. - (KJS::KRFCDate_parseDate): Return -1 rather than 0 for bad dates. - Assume local time if no time zone is passed. Don't return 1 if we parse 0. - -2002-11-13 Darin Adler - - - fixed 3073230 -- JavaScript time calls do I/O by lstat()ing /etc/localtime - - * kjs/date_object.cpp: - (formatDate): Added. - (formatTime): Added. - (formatLocaleDate): Added. - (formatLocaleTime): Added. - (DateProtoFuncImp::call): Changed to use the above functions instead of - using strftime. - -2002-11-08 Darin Adler - - * kjs/date_object.cpp: - (ctimeUsingCF): Added. - (timeUsingCF): Added. - -2002-11-07 Darin Adler - - * kjs/date_object.cpp: (mktimeUsingCF): Fix storage leak. - -2002-11-07 Maciej Stachowiak - - - partial fix to 3073230 - JavaScript time calls do I/O by - lastat()ing /etc/localtime - - * kjs/date_object.cpp: - (mktimeUsingCF): Implementation of mktime using CF. - -=== Alexander-31 === - -2002-11-01 Darin Adler - - * kjs/object.cpp: Make the same change Maciej just did, but to the - other constructor right next to the one he changed. - -2002-10-31 Maciej Stachowiak - - - fixed 3082660 - REGRESSION: one ListImp leaks opening/closing nearly empty web page - - * kjs/object.cpp: Set gc allowed on freshly created ListImp, since - there is no List wrapper for it. - -2002-10-31 Darin Adler - - * kjs/grammar.y: Fix the APPLE_CHANGES thing here too. - * kjs/grammar.cpp: Regenerated this file. - -=== Alexander-30 === - -2002-10-30 Darin Adler - - - fixed 3073230 -- Alex is doing file I/O when executing JavaScript by asking for localtime - - I fixed this by using Core Foundation time functions instead. - - * kjs/date_object.cpp: - (tmUsingCF): Function that uses Core Foundation to get the time and then puts it into - a tm struct. - (gmtimeUsingCF): Function used instead of gmtime (used a macro to make the substitution). - (localtimeUsingCF): Function used instead of localtime (used a macro to make the substitution). - -2002-10-26 Darin Adler - - - changed to use #if APPLE_CHANGES and #if !APPLE_CHANGES consistently - - We no longer do #ifdef APPLE_CHANGES or #ifndef APPLE_CHANGES. - - * kjs/collector.cpp: - * kjs/collector.h: - * kjs/grammar.cpp: - * kjs/internal.cpp: - * kjs/ustring.h: - -2002-10-25 Darin Adler - - - fixed 3038011 -- drop-down menu hierarchy broken at yahoo new acct page - - * kjs/array_object.cpp: (ArrayProtoFuncImp::call): - Fix bug calling concat on an empty array. The old code tried to - optimize in a way that would prevent appending any arrays until - at least one element was in the destination array. So if you were - concatenating a non-empty array into an empty array, you got an empty array. - -=== Alexander-29 === - -=== Alexander-28 === - -2002-10-10 Darin Adler - - - fixed 3072643 -- infinite loop in JavaScript code at walgreens.com - - The problem is that "xxx".indexOf("", 1) needs to return 1, but we - were returning 0. - - * kjs/ustring.cpp: - (UString::find): Return pos, not 0, when the search string is empty. - (UString::rfind): Make sure that pos is not past the end of the string, - taking into account the search string; fixes a potential read off the end - of the buffer. Also return pos, not 0, when the search string is empty. - -=== Alexander-27 === - -2002-10-07 Darin Adler - - Fixed absurdly high memory usage when looking at pages that use a lot of JavaScript. - - * kjs/collector.cpp: - (Collector::allocate): Implement a new policy of doing a garbage collect every 1000 - allocations. The old policy was both complicated and misguided. - (Collector::collect): Zero out the "number of allocations since last collect". - -2002-10-06 Darin Adler - - I noticed some broken lists at mapblast.com and tracked it down to this. - - * kjs/array_object.cpp: - (ArrayInstanceImp::put): Don't truncate the list; only extend the length if - it's not already long enough. - (ArrayProtoFuncImp::call): Fix some ifdef'd code so it compiles if you turn - the ifdefs on. - -2002-10-04 Darin Adler - - Fixed problems parsing numbers that are larger than a long with parseInt. - - * kjs/config.h: Define HAVE_FUNC_STRTOLL. - * kjs/function.cpp: (GlobalFuncImp::call): - Change parseInt to use strtoll if available. - -=== Alexander-26 === - -2002-09-27 Darin Adler - - - fixed 3033969 -- repro crash (infinite recursion in JavaScript) - clicking on "screens" option at fsv.sf.net - - * kjs/object.h: Change recursion limit to 100 levels rather than 1000. - -=== Alexander-25 === - -2002-09-26 Darin Adler - - Fix the infinity problem Dave worked around. We didn't have the - configuration flags set right to make infinity work. Setting those - properly made everything work without changes to min and max. - - * kjs/config.h: Define HAVE_FUNC_ISINF, HAVE_STRING_H, and - also WORDS_BIGENDIAN (if on ppc). - - * kjs/math_object.cpp: (MathFuncImp::call): Roll out min and max - changes from yesterday. - -2002-09-25 David Hyatt - - Fix the impls of min/max to not use +inf/-inf when you have - arguments. Technically there's still a bug here for the no - argument case, probably caused by a screwup when +inf/-inf are - converted to doubles. - - * kjs/math_object.cpp: - (MathFuncImp::call): - -2002-09-25 Darin Adler - - - fixed 3057964 -- JS problem performing MD5 script embedded in yahoo login page - - * kjs/simple_number.h: Fix incorrect check for sign bit that was munging numbers - in the range 0x10000000 to 0x1FFFFFFF. - -=== Alexander-24 === - -=== Alexander-22 === - -2002-09-05 Maciej Stachowiak - - First baby step towards moving List away from garbage collection. - - * kjs/types.h: Add needsMarking boolean and make List inherit from - Value privately instead of publicly. - -2002-08-30 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Allowed the new Project Builder to put in - encodings for each file. - -=== Alexander-21 === - -=== Alexander-20 === - -2002-08-20 Darin Adler - - Three small changes to things that showed up in the sample. - - 5% speed increase on cvs-js-performance test. - - * kjs/simple_number.h: Check if double is an integer with d == (double)(int)d - instead of remainder(d, 1) == 0, saving a function call each time. - - * kjs/ustring.cpp: - (UString::find): Compare the first character before calling memcmp for the rest. - (UString::rfind): Ditto. - (KJS::operator==): Don't do a strlen before starting to compare the characters. - -2002-08-20 Maciej Stachowiak - - * kjs/object.cpp: Don't reference other ValueImps in the - destructor, they may have already been destroyed, and will have - GC_ALLOWED set already in any case. - -2002-08-19 Maciej Stachowiak - - Fixed the bug that made sony.com menus come out wrong and made - aa.com crash (Radar 3027762). - - Mode most methods inline. - - * kjs/completion.cpp: - * kjs/completion.h: - -2002-08-19 Maciej Stachowiak - - Maintain stack of old "arguments" property values for functions - implicitly on the system stack instead of explicitly in the - FunctionImp. This eliminates only a trivial number of GC - allocations (less than 200) but eliminates one of the two cases - where a ListImp * is stored directly, paving the way to separate - List from Value. - - * kjs/function.h: Remove argStack, pushArgs and popArgs. - * kjs/function.cpp: - (FunctionImp::FunctionImp): Don't initalize argStack. - (FunctionImp::~FunctionImp): Remove comment about argStack. - (FunctionImp::mark): Don't mark the argStack. - (FunctionImp::call): Save old "arguments" property in a Value, - where it will be GC-protected, rather than keeping a list, and - restore the old value when done executing. - -2002-08-18 Darin Adler - - * kjs/internal.cpp: (KJS::printInfo): Remove one more CompletionType - that Maciej missed. - -2002-08-18 Maciej Stachowiak - - Remove stray references to CompletionType and CompletionImp. - - * kjs/completion.h: - * kjs/object.cpp: - * kjs/value.h: - -2002-08-18 Maciej Stachowiak - - Separated Completion from Value and made it a pure stack - object. This removed another 160,000 of the remaining 580,000 - garbage collected object allocations. - - 6% speed increase on cvs-js-performance test. - - * kjs/completion.cpp: Added. New implementation that doesn't - require a ValueImp *. - (Completion::Completion): - (Completion::complType): - (Completion::value): - (Completion::target): - (Completion::isValueCompletion): - * kjs/completion.h: Added. - * kjs/function.cpp: - (GlobalFuncImp::call): Removed some (apparently mistaken) uses of - Completion as a Value. - * kjs/internal.cpp: - * kjs/internal.h: - * kjs/types.cpp: Removed Completion stuff. - * kjs/types.h: Removed Completion stuff. - * JavaScriptCore.pbproj/project.pbxproj: Added new header. - -2002-08-16 Darin Adler - - Fix the Development build. - - * kjs/object.cpp: Take out a use of ReferenceType. - - * kjs/ustring.h: Added a bit more inlining. - * kjs/ustring.cpp: Moved the function out of here. - -2002-08-16 Maciej Stachowiak - - Final step of the Reference change. Completely separate Reference - from Value, and eliminate ReferenceImp. - - 18% speedup on cvs-js-performance test. - - * kjs/internal.cpp, kjs/internal.h: Remove ReferenceImp. - * kjs/nodes.cpp: - (Node::evaluateReference): Use Reference::makeValueReference(), - not ConstReference. - * kjs/reference.cpp: - (Reference::Reference): New implementation, handles both regular - and value references. - (Reference::makeValueReference): Incorporate functionality of ConstReference - into this class. - (Reference::getBase): New implementation (incorporates error vase - for value references). - (Reference::getPropertyName): New implementation (incorporates error case - for value references). - (Reference::putValue): New implementation (incorporates error case - for value references). - (Reference::deleteValue): New implementation (incorporates error case - for value references). - (Reference::getValue): New implementation (incorporates special case - for value references). - (Reference::isMutable): New implementation. - * kjs/reference.h: New implementation that merges ReferenceImp - into the stack object. - * kjs/value.h, kjs/value.cpp: Removed all reference-related method. - -2002-08-16 Darin Adler - - - fixed 3026184 -- Hang going to http://aa.com/ while executing JavaScript - - * kjs/simple_number.h: (SimpleNumber::value): Fixed conversion to a negative - number. The technique of using division was no good. Instead, or in the sign - bits as needed. - -2002-08-16 Maciej Stachowiak - - * kjs/reference_list.h: Must include headers with "", not - <>. D'oh! - -2002-08-16 Maciej Stachowiak - - * JavaScriptCore.pbproj/project.pbxproj: Install reference.h and - reference_list.h so WebCore compiles (duh). - -2002-08-16 Maciej Stachowiak - - * JavaScriptCore.pbproj/project.pbxproj: - * kjs/internal.cpp: - * kjs/internal.h: - * kjs/nodes.cpp: - (Node::evaluateReference): - * kjs/reference.cpp: - (Reference::Reference): - (Reference::makeValueReference): - (Reference::getBase): - (Reference::getPropertyName): - (Reference::getValue): - (Reference::putValue): - (Reference::deleteValue): - (Reference::isMutable): - * kjs/reference.h: - * kjs/reference_list.h: - * kjs/value.cpp: - (ValueImp::dispatchToUInt32): - * kjs/value.h: - -2002-08-16 Maciej Stachowiak - - Next step: reimplement ReferenceList from scratch, and store it as - an actual Reference object, so ReferenceList no longer depends on - Reference being a Value or having a ReferenceImp. A resizing - vector might be even better the way this is used. - - Also moved Reference to its own header and implementation file in - preparation for reimplementing it. - - * JavaScriptCore.pbproj/project.pbxproj: - * kjs/nodes.cpp: - (ForInNode::execute): - * kjs/reference.cpp: Added. - (Reference::Reference): - (Reference::dynamicCast): - (ConstReference::ConstReference): - * kjs/reference.h: Added. - * kjs/reference_list.cpp: Added. - (ReferenceList::ReferenceList): - (ReferenceList::operator=): - (ReferenceList::swap): - (ReferenceList::append): - (ReferenceList::~ReferenceList): - (ReferenceList::begin): - (ReferenceList::end): - (ReferenceListIterator::ReferenceListIterator): - (ReferenceListIterator::operator!=): - (ReferenceListIterator::operator->): - (ReferenceListIterator::operator++): - * kjs/reference_list.h: - * kjs/types.cpp: - * kjs/types.h: - -2002-08-16 Maciej Stachowiak - - Fix Development build - some NDEBUG code had to be changed for the - Value/Reference split. - - * kjs/internal.cpp: - (KJS::printInfo): - * kjs/nodes.cpp: - (FunctionCallNode::evaluate): - -2002-08-16 Maciej Stachowiak - - * kjs/reference_list.h: Added file I forgot to check in last time. - -2002-08-15 Maciej Stachowiak - - Phase 1 of optimization to stop allocating references through the - collector. This step clearly splits evaluating to a reference and - evaluating to a value, and moves all of the reference-specific - operations from Value to Reference. A special ConstReference class - helps out for the one case where you need special reference - operations if the result is a reference, and not otherwise. - - Also, Reference now inherits privately from Value, and there is a - new ReferenceList class that inherits privately from List, so the - uses of Reference and Value are now completely orthogonal. This - means that as the next step, their implementations can be - completely disentangled. - - This step has no actual performance impact. - - * kjs/collector.cpp: - (Collector::collect): - * kjs/nodes.cpp: - (Node::evaluateReference): - (ResolveNode::evaluate): - (ResolveNode::evaluateReference): - (ElementNode::evaluate): - (PropertyValueNode::evaluate): - (AccessorNode1::evaluate): - (AccessorNode1::evaluateReference): - (AccessorNode2::evaluate): - (AccessorNode2::evaluateReference): - (ArgumentListNode::evaluateList): - (NewExprNode::evaluate): - (FunctionCallNode::evaluate): - (PostfixNode::evaluate): - (DeleteNode::evaluate): - (VoidNode::evaluate): - (TypeOfNode::evaluate): - (PrefixNode::evaluate): - (UnaryPlusNode::evaluate): - (NegateNode::evaluate): - (BitwiseNotNode::evaluate): - (LogicalNotNode::evaluate): - (MultNode::evaluate): - (AddNode::evaluate): - (ShiftNode::evaluate): - (RelationalNode::evaluate): - (EqualNode::evaluate): - (BitOperNode::evaluate): - (BinaryLogicalNode::evaluate): - (ConditionalNode::evaluate): - (AssignNode::evaluate): - (CommaNode::evaluate): - (VarDeclNode::evaluate): - (ExprStatementNode::execute): - (IfNode::execute): - (DoWhileNode::execute): - (WhileNode::execute): - (ForNode::execute): - (ForInNode::execute): - (ReturnNode::execute): - (WithNode::execute): - (CaseClauseNode::evaluate): - (SwitchNode::execute): - (ThrowNode::execute): - * kjs/nodes.h: - * kjs/types.cpp: - (ConstReference::ConstReference): - * kjs/types.h: - * kjs/value.h: - -2002-08-15 Darin Adler - - Tweaks and small bug fixes to Maciej's excellent new fixnum optimization. - Also updated or removed comments that call it "fixnum" instead of "simple number". - - * kjs/simple_number.h: Change constant names so they don't SHOUT the way macro - names do. Added constants for shift, min, and max. Fixed off-by-1 error that - prevented us from using the extreme values on either end. Base the range of - numbers on a fixed 32 bits constant rather than the size of a long, because - code elsewhere depends on positive numbers fitting into both "unsigned" and - "UInt32" while assuming it doesn't need to check; we can easily change this - later. Used int types rather than long for essentially the same reason. - Fixed the value-extraction function so it will work for negative numbers even - if the shift is logical, not arithmetic, by using division instead. - Renamed functions to be quite terse since they are inside a class. - - * kjs/value.h: - * kjs/value.cpp: - (ValueImp::dispatchToObject): Call NumberImp::toObject in a "non-virtual" - way rather than repeating the code here. - (ValueImp::dispatchToUInt32): Handle the negative number case correctly. - (ValueImp::dispatchGetBase): Call ValueImp::getBase in a "non-virtual" - way rather than repeating the code here. - (ValueImp::dispatchGetPropertyName): Call ValueImp::getPropertyName in a - "non-virtual" way rather than repeating the code here. - (ValueImp::dispatchPutValue): Call ValueImp::putValue in a "non-virtual" - way rather than repeating the code here. - (ValueImp::dispatchDeleteValue): Call ValueImp::deleteValue in a "non-virtual" - way rather than repeating the code here. - (Number::Number): Fixed a bug where the double-based constructor was casting - to long, so wouldn't do the "remainder" check. - -=== Alexander-19 === - -=== Alexander-18 === - -2002-08-15 Maciej Stachowiak - - Phase 2 of fixnum optimization. Store any integral number that - will fit in two bits less than a long inside the ValueImp * - itself, thus avoiding the need to deal with the garbage collector - at all for these types. Such numbers comprised .5 million of the - 1.7 million ValueImps created during the cvs-js-performance test, - so traffic through the garbage collector should be - - 20% improvement on cvs-js-performance. This may also show up on - cvs-base, but I did not compare and I am too lazy to make clean in - WebCore yet again. - - This also significantly reduces memory footprint on - JavaScript-heavy pages. Size after going through - cvs-js-performance suite is now 22MB to 17.5MB. - - * JavaScriptCore.pbproj/project.pbxproj: - * kjs/simple_number.h: Added. Some inline static methods for handling - simple numbers that are stored in the pointer. - * kjs/ustring.h: - * kjs/ustring.cpp: - (UString::from): Added new overload for long. - * kjs/value.cpp: - (ValueImp::marked): Add special case for simple numbers. - (ValueImp::setGcAllowed): Likewise. - (ValueImp::toInteger): Call dispatch version of - toUInt32(unsigned&), not the real method. - (ValueImp::toInt32): Likewise. - (ValueImp::toUInt32): Likewise. - (ValueImp::toUInt16): Likewise. - (ValueImp::dispatchType): Add special case for simple numbers. - (ValueImp::dispatchToPrimitive): Likewise. - (ValueImp::dispatchToBoolean): Likewise. - (ValueImp::dispatchToNumber): Likewise. - (ValueImp::dispatchToString): Likewise. - (ValueImp::dispatchToObject): Likewise. - (ValueImp::dispatchToUInt32): Likewise. - (ValueImp::dispatchGetBase): Likewise. - (ValueImp::dispatchGetPropertyName): Likewise. - (ValueImp::dispatchPutValue): Likewise. - (ValueImp::dispatchDeleteValue): Likewise. - (Number::Number): Create a simple number instead of a full-blown - ValueImp when possible. - (Number::value): Likewise. - * kjs/value.h: - -2002-08-15 Maciej Stachowiak - - Phase one of the "fixnum" optimization (storing small enough - integers in the pointer). This just paves the way for the change - by making all the virtual functions of ValueImp private and adding - non-virtual dispatchers which can call the virtual function or - handle fixnums specially. - - Also, I marked every place that should need a special case with a - FIXNUM comment. - - * kjs/bool_object.cpp: - (BooleanObjectImp::construct): Call dispatch method not the real method. - * kjs/internal.h: Make toUInt32 private to make sure no one calls it directly - on a NumberImp*. - * kjs/nodes.cpp: - (ForInNode::execute): Call dispatch method not the real method. - * kjs/object.cpp: - (ObjectImp::propList): Call dispatch method not the real method. - * kjs/object.h: - * kjs/string_object.cpp: - (StringProtoFuncImp::call): Call dispatch method not the real method. - (StringObjectImp::construct): Call dispatch method not the real method. - * kjs/value.h: - * kjs/value.cpp: - (ValueImp::marked): Put a comment about required FIXNUM change. - (ValueImp::setGcAllowed): Likewise. - (ValueImp::dispatchType): Just call the virtual method for now. - (ValueImp::dispatchToPrimitive): Likewise. - (ValueImp::dispatchToBoolean): Likewise. - (ValueImp::dispatchToNumber): Likewise. - (ValueImp::dispatchToString): Likewise. - (ValueImp::dispatchToObject): Likewise. - (ValueImp::dispatchToUInt32): Likewise. - (ValueImp::dispatchGetBase): Likewise. - (ValueImp::dispatchGetPropertyName): Likewise. - (ValueImp::dispatchGetValue): Likewise. - (ValueImp::dispatchPutValue): Likewise. - (ValueImp::dispatchDeleteValue): Likewise. - -2002-08-14 Darin Adler - - Another pass of tweaks, including one bug fix. - - * kjs/array_object.cpp: - (ArrayInstanceImp::ArrayInstanceImp): Use malloc, not new. - (ArrayInstanceImp::get): Use a local variable so we don't rely on the optimizer - to avoid indexing twice. - (ArrayInstanceImp::hasProperty): Use a local variable, and also check against - UndefinedImp::staticUndefined rather than doing type() != UndefinedType. - -2002-08-14 Maciej Stachowiak - - Simplified array handling by using NULL to represent empty cells - instead of the Undefined object, so we can use calloc, realloc and - memset instead of loops. Inspired by a suggestion of Darin's. - - * kjs/array_object.cpp: - (ArrayInstanceImp::ArrayInstanceImp): - (ArrayInstanceImp::~ArrayInstanceImp): - (ArrayInstanceImp::get): - (ArrayInstanceImp::hasProperty): - (ArrayInstanceImp::deleteProperty): - (ArrayInstanceImp::setLength): - (ArrayInstanceImp::mark): - -2002-08-14 Maciej Stachowiak - - Fix major JavaScript memory leak. run-plt says cvs-base improved - by 2% and cvs-js-performance improved by 7%. However, this was - within the possible noise level in each case. - - The fix was to store ValueImp *'s in the array instead of Value - objects, since the Value wrapper will keep a ref and make the - object immortal. - - * kjs/array_object.cpp: - (ArrayInstanceImp::ArrayInstanceImp): - (ArrayInstanceImp::get): - (ArrayInstanceImp::put): - (ArrayInstanceImp::hasProperty): - (ArrayInstanceImp::deleteProperty): - (ArrayInstanceImp::setLength): - (ArrayInstanceImp::mark): - * kjs/array_object.h: - -2002-08-13 Maciej Stachowiak - - Add the ability to determine the classes of live JavaScript - objects, to help with leak fixing. - - * kjs/collector.h, kjs/collector.cpp: - (Collector::liveObjectClasses): - -2002-08-13 Maciej Stachowiak - - Small speed improvement. 3% faster on cvs-js-performance, no - measurable change on cvs-static-urls. - - * kjs/collector.cpp: - (Collector::collect): Combine 3 loops over all objects into one, - to reduce flat time and improve locality of reference. - -2002-08-12 Darin Adler - - Speed improvements. 19% faster on cvs-js-performance, 1% on cvs-static-urls. - - Use global string objects for length and other common property names rather - than constantly making and destroying them. Use integer versions of get() and - other related calls rather than always making a string. - - Also get rid of many unneeded constructors, destructors, copy constructors, and - assignment operators. And make some functions non-virtual. - - * kjs/internal.h: - * kjs/internal.cpp: - (NumberImp::toUInt32): Implement. - (ReferenceImp::ReferenceImp): Special case for numeric property names. - (ReferenceImp::getPropertyName): Moved guts here from ValueImp. Handle numeric case. - (ReferenceImp::getValue): Moved guts here from ValueImp. Handle numeric case. - (ReferenceImp::putValue): Moved guts here from ValueImp. Handle numeric case. - (ReferenceImp::deleteValue): Added. Handle numeric case. - - * kjs/array_object.h: - * kjs/array_object.cpp: All-new array implementation that stores the elements - in a C++ array rather than in a property map. - (ArrayInstanceImp::ArrayInstanceImp): Allocate the C++ array. - (ArrayInstanceImp::~ArrayInstanceImp): Delete the C++ array. - (ArrayInstanceImp::get): Implement both the old version and the new overload that - takes an unsigned index for speed. - (ArrayInstanceImp::put): Implement both the old version and the new overload that - takes an unsigned index for speed. - (ArrayInstanceImp::hasProperty): Implement both the old version and the new overload that - takes an unsigned index for speed. - (ArrayInstanceImp::deleteProperty): Implement both the old version and the new overload that - takes an unsigned index for speed. - (ArrayInstanceImp::setLength): Added. Used by the above to resize the array. - (ArrayInstanceImp::mark): Mark the elements of the array too. - (ArrayPrototypeImp::ArrayPrototypeImp): Pass the length to the array instance constructor. - - * kjs/bool_object.cpp: - * kjs/date_object.cpp: - * kjs/error_object.cpp: - * kjs/function.cpp: - * kjs/function_object.cpp: - * kjs/math_object.cpp: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/number_object.cpp: - * kjs/object_object.cpp: - * kjs/regexp_object.cpp: - * kjs/string_object.cpp: - - * kjs/nodes2string.cpp: (SourceStream::operator<<): Add a special case for char now that - you can't create a UString from a char implicitly. - - * kjs/object.h: - * kjs/object.cpp: - (ObjectImp::get): Call through to the string version if the numeric version is not implemented. - (ObjectImp::put): Call through to the string version if the numeric version is not implemented. - (ObjectImp::hasProperty): Call through to the string version if the numeric version is not implemented. - (ObjectImp::deleteProperty): Call through to the string version if the numeric version is not implemented. - - * kjs/types.h: - * kjs/types.cpp: - (Reference::Reference): Added constructors for the numeric property name case. - - * kjs/ustring.h: Made the constructor that turns a character into a string be explicit so we - don't get numbers that turn themselves into strings. - * kjs/ustring.cpp: - (UString::UString): Detect the empty string case, and use a shared empty string. - (UString::find): Add an overload for single character finds. - (UString::rfind): Add an overload for single character finds. - (KJS::operator==): Fix bug where it would call strlen(0) if the first string was not null. - Also handle non-ASCII characters consistently with the rest of the code by casting to unsigned char - just in case. - - * kjs/value.h: Make ValueImp and all subclasses non-copyable and non-assignable. - * kjs/value.cpp: - (ValueImp::toUInt32): New interface, mainly useful so we can detect array indices and not turn - them into strings and back. - (ValueImp::toInteger): Use the new toUInt32. Probably can use more improvement. - (ValueImp::toInt32): Use the new toUInt32. Probably can use more improvement. - (ValueImp::toUInt16): Use the new toUInt32. Probably can use more improvement. - (ValueImp::getBase): Remove handling of the Reference case. That's in ReferenceImp now. - (ValueImp::getPropertyName): Remove handling of the Reference case. That's in ReferenceImp now. - (ValueImp::getValue): Remove handling of the Reference case. That's in ReferenceImp now. - (ValueImp::putValue): Remove handling of the Reference case. That's in ReferenceImp now. - (ValueImp::deleteValue): Added. Used so we can do delete the same way we do put. - -=== Alexander-17 === - -2002-08-09 Darin Adler - - Some string speedups. Makes sony.com cached 11% faster on Development, but - the improvement for Deployment should be greater. - - * kjs/ustring.h: Made it possible for UChar objects to be uninitialized, which - gives a speed boost. Inlined CString's +=, UString's destructor, +=, and +. - * kjs/ustring.cpp: - (UString::UString): Optimize const char * version, which showed up - heavily in performance analysis. Added new two-UString version, which - makes the + operator fast. - (UString::ascii): Remove thread safety changes. Change static buffer to remember - its size, and to always be at least 4096 bytes long; that way we never have to - reallocate unless it's for a long string. Also make code to extract the characters - significantly faster by getting rid of two pointer dereferences per character. - (UString::is8Bit): Avoid one pointer dereference per character. - (UString::toDouble): Use ascii() instead of cstring() to avoid copying the string. - - * kjs/collector.cpp: Remove unneeded APPLE_CHANGES. - * kjs/regexp.cpp: Remove ifdefs around some APPLE_CHANGES that we - want to keep, because they just fix warnings. - * kjs/value.h: Remove obsolete APPLE_CHANGES comment. - - * JavaScriptCore.pbproj/project.pbxproj: Project Builder decided - to move a line around in the file. - -2002-08-09 Maciej Stachowiak - - Fix my last change to actually call the versions of the lock functions - that are recursive and initialize as needed. - - * kjs/internal.cpp: - (InterpreterImp::InterpreterImp): - (InterpreterImp::clear): - (InterpreterImp::evaluate): - -2002-08-09 Maciej Stachowiak - - - fixed 2948835 - JavaScriptCore locking is too fine grained, makes it too slow - - * kjs/collector.cpp: - (Collector::allocate): - (Collector::collect): - (Collector::finalCheck): - (Collector::numInterpreters): - (Collector::numGCNotAllowedObjects): - (Collector::numReferencedObjects): - * kjs/collector.h: - * kjs/internal.cpp: - (initializeInterpreterLock): - (lockInterpreter): - (unlockInterpreter): - (Parser::parse): - (InterpreterImp::InterpreterImp): - (InterpreterImp::clear): - (InterpreterImp::evaluate): - * kjs/value.cpp: - (ValueImp::ValueImp): - (ValueImp::setGcAllowed): - -=== milestone 0.5 === - -=== Alexander-16 === - -2002-08-05 Maciej Stachowiak - - - fixed 3007072 - need to be able to build fat - - * JavaScriptCore.pbproj/project.pbxproj: Fixed DeploymentFat build. - -=== Alexander-15 === - -2002-07-25 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Add DeploymentFat build style. - -=== Alexander-14 === - -2002-07-21 Darin Adler - - * kjs/*: Roll KDE 3.0.2 changes in. Also switch to not using APPLE_CHANGES - for some of the changes that we definitely want to contribute upstream. - -2002-07-21 Maciej Stachowiak - - * Makefile.am: Remove products from symroots on `make clean'. - -=== Alexander-13 === - -2002-07-13 Darin Adler - - * Makefile.am: Don't use embed.am any more. - * JavaScriptCore.pbproj/project.pbxproj: Use embed-into-alex instead - of make embed. - -2002-07-12 Darin Adler - - * kjs/ustring.h: Since includes ushort and uint now, had - to change the includes here to be compatible with that. - -2002-07-11 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: To make the build of - WebCore work without using -I to peek at JavaScriptCore sources, - made all the Public sources Private so they are all in one directory. - Also, made lookup.h be Private. - -=== Alexander-11 === - -=== Alexander-10 === - -2002-06-25 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Re-add -Wmissing-format-attribute. - -=== Alexander-9 === - -2002-06-19 Kenneth Kocienda - - I just played alchemical voodoo games with the linker to - make all our frameworks and Alexander prebound. - - * JavaScriptCore.pbproj/project.pbxproj - -2002-06-15 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Removed explicit PFE_FILE_C_DIALECTS now that - Project Builder handles this automatically. Removed explicit USE_GCC3 since that's implicit - now. Also, since this project is all C++, only use WARNING_CFLAGS with flags that are appropriate - for C++; don't bother breaking out C vs. C++. - - * kjs/collector.cpp: Now that the system warning is fixed, use PTHREAD_MUTEX_INITIALIZER and - PTHREAD_COND_INITIALIZER. - * kjs/internal.cpp: Use PTHREAD_MUTEX_INITIALIZER. - * kjs/ustring.cpp: Use PTHREAD_ONCE_INIT. - -2002-06-15 Maciej Stachowiak - - Made Development build mode mean what Unoptimized used to mean. Removed Unoptimized build mode. - Added a Mixed build mode which does what Deployment used to. All this to fix: - - Radar 2955367 - Change default build style to "Unoptimized" - - * JavaScriptCore.pbproj/project.pbxproj: - -2002-06-12 Darin Adler - - * kjs/nodes.cpp: (Node::finalCheck): A bit of APPLE_CHANGES so we - can compile with KJS_DEBUG_MEM defined if we want to. - -2002-06-10 Darin Adler - - Merged in changes from KDE 3.0.1. - - * kjs/collector.cpp: - * kjs/date_object.cpp: - * kjs/function.cpp: - * kjs/internal.cpp: - * kjs/lookup.h: - * kjs/object.cpp: - * kjs/operations.cpp: - * kjs/regexp.cpp: - * kjs/regexp_object.cpp: - * kjs/regexp_object.h: - * kjs/string_object.cpp: - * kjs/testkjs.cpp: - * kjs/ustring.cpp: - * kjs/value.cpp: - * kjs/value.h: - Do the merge, and add APPLE_CHANGES as needed to make things compile. - - * kjs/date_object.lut.h: Re-generated. - -2002-06-07 Darin Adler - - * Makefile.am: Use new shared "embed.am" file so we don't need four copies of - the embedding rules for WebFoundation, JavaScriptCore, WebCore, and WebKit. - -2002-06-07 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Don't use any warning flags for C that won't work - for C++, because PFE uses the C warning flags on a C++ compile. - -=== Alexander-8 === - -2002-06-06 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Update warning flags for compatibility - with new C++. - -2002-06-05 Darin Adler - - Fix problem seen as build failure on Jersey. - - * Makefile.am: JavaScriptCore-stamp needs to be a dependency, not a - source file, because it doesn't have a corresponding object file. - Making it a dependency causes things to compile in the right order. - -2002-06-04 Darin Adler - - Improve the speed of the JavaScript string append operation by growing - the capacity so we don't need to reallocate the string every time. - - Also fix script execution so it doesn't use recursion to advance from - one statement to the next, using iteration instead. - - * Makefile.am: Stop using BUILT_SOURCES to build JavaScriptCore-stamp, - because this causes the Project Builder project to build *before* the - subdir. Intead, use an all-am rule in a way more similar to all our - other directories. - - * kjs/grammar.y: Link the SourceElementsNode in the opposite direction, - so we can walk the list and execute each element instead of using - recursion to reverse the list. - * kjs/grammar.cpp: Check in new generated file. - - * kjs/nodes.cpp: - (SourceElementsNode::execute): - (SourceElementsNode::processFuncDecl): - (SourceElementsNode::processVarDecls): - Use loops instead of recursion. - - * kjs/ustring.h: Don't initialize all UChar objects to 0. This was - wasting a *huge* amount of time. - * kjs/ustring.cpp: - (UString::Rep::create): Add a "capacity" along with the length. - (UString::append): Include 50% extra capacity when appending. - (UString::operator=): Reuse the buffer if possible rather than - always creating a new one. - -2002-06-02 Darin Adler - - * COPYING.LIB: Fix line endings. It was using CRs. - -2002-05-31 Darin Adler - - * Makefile.am: - * kjs/Makefile.am: - Slight improvements to rules that touch stamp files. - -2002-05-28 Maciej Stachowiak - - * THANKS: Demangled. - -=== Alexander-7 === - -2002-05-24 Maciej Stachowiak - - Added license and acknowledgements. - - * AUTHORS: Added. - * COPYING.LIB: Added. - * THANKS: Added. - -=== 0.3 === - -=== Alexander-6 === - -=== Alexander-5 === - -=== Alexander-4 === - -=== JavaScriptCore-5 === - -2002-05-21 Maciej Stachowiak - - Reviewed by: Richard Williamson - - Fixed Radar 2928775 - Sherlock crashes sitting in stocks channel - - * kjs/internal.cpp: - (InterpreterImp::InterpreterImp): Set the interp pointer earlier, - in case garbage collection takes place while creating the global - values. - -2002-05-15 Darin Adler - - Reviewed by: Maciej Stachowiak - - * Makefile.am: - Use all-am and clean-am instead of all and clean because it's better and - to make "make check" at the top level work right. - -2002-05-13 Darin Adler - - Reviewed by: Maciej Stachowiak - - * kjs/value.h: Fix comment typos. - -=== JavaScriptCore-4 === - -2002-05-10 Maciej Stachowiak - - Reviewed by: Ken Kocienda and Darin Adler - - Fixed the following bug: - - Radar 2890573 - JavaScriptCore needs to be thread-safe - - Actually this is only a weak form of thread-safety - you can safely - use different interpreters from different threads at the same - time. If you try to use a single interpreter object from multiple - threads, you need to provide your own locking. - - * kjs/collector.h, kjs/collector.cpp: - (Collector::lock, Collector::unlock): Trivial implementation of a - recursive mutex. - (Collector::allocate): Lock around the body of this function. - (Collector::collect): Likewise. - (Collector::finalCheck): Likewise. - (Collector::numInterpreters): Likewise. - (Collector::numGCNotAllowedObjects): Likewise. - (Collector::numReferencedObjects): Likewise. - * kjs/internal.cpp: - (Parser::parse): use a mutex to lock around the whole parse, since - it uses a bunch of global state. - (InterpreterImp::InterpreterImp): Grab the Collector lock here, - both the mutually exclude calls to the body of this function, and - to protect the s_hook static member which the collector pokes at. - (InterpreterImp::clear): Likewise. - * kjs/ustring.cpp: - (statBufferKeyCleanup, statBufferKeyInit, UString::ascii): Convert - use of static variable - * kjs/value.cpp: - (ValueImp::ValueImp, ValueImp::mark, ValueImp::marked, - ValueImp::setGcAllowed): Grab the GC lock around any flag changes. - -=== Alexander-3 === - -2002-05-08 Darin Adler - - * kjs/collector.h: - * kjs/collector.cpp: - (Collector::numInterpreters): - (Collector::numGCNotAllowedObjects): - (Collector::numReferencedObjects): - Add three new functions so we can see a bit more about leaking JavaScriptCore. - -2002-05-06 Darin Adler - - * JavaScriptCorePrefix.h: Added. - * JavaScriptCore.pbproj/project.pbxproj: Use PFE precompiling. - Also switch from xNDEBUG to NDEBUG. - -=== Alexander 0.3c2 (v1) === - -2002-04-18 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Oops. Take out -Wstrict-prototypes, put back - -Wmissing-prototypes. - -2002-04-18 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Take out -Wmissing-prototypes - because system headers are triggering it when we don't have - precompiled headers on. - -2002-04-18 Darin Adler - - Reviewed by Maciej - - * JavaScriptCore.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings - as in the rest of Labyrinth (see top level ChangeLog for details). - -2002-04-17 Maciej Stachowiak - - Reviewed by: Darin Adler - - * kjs/testkjs.cpp: Don't include to avoid gcc3 - warning. - -2002-04-15 Darin Adler - - Reviwed by: Maciej Stachowiak - - * kjs/internal.cpp: - * kjs/property_map.cpp: - * kjs/ustring.h: - Removed some unneeded includes so we are more similar - to the real KDE sources. - -2002-04-15 Darin Adler - - Reviwed by: Maciej Stachowiak - - Merged changes from KDE 3.0 final and did some build fixes. - - * JavaScriptCore.pbproj/project.pbxproj: Added nodes2string.cpp. - - * kjs/grammar.*: Regenerated. - * kjs/*.lut.h: Regenerated. - -2002-04-08 Darin Adler - - Reviwed by: Maciej Stachowiak - - * JavaScriptCore.pbproj/project.pbxproj: Re-added -Wno-format-y2k. - -2002-04-04 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Add an Unoptimized build - style: exactly like Development except without the -O. - -2002-04-03 Darin Adler - - * kjs/Makefile.am: Gratuitous cleanup. - -2002-04-02 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Update flags as I did for - WebFoundation. - -2002-04-02 Maciej Stachowiak - - * JavaScriptCore.pbproj/project.pbxproj: Pass -Wno-format-y2k so - the project builds with gcc3. - - * kjs/nodes.cpp: Avoid including an obsolete header to avoid - warning with gcc3. - -2002-04-02 Darin Adler - - * kjs/property_map.cpp: (PropertyMap::~PropertyMap): Deallocate the - map by calling clear so we don't leak the entire map. - -2002-04-02 Darin Adler - - * kjs/internal.cpp: (InterpreterImp::globalClear): Add code to - deallocate and null out emptyList, because once the last interpreter - is destroyed there's nothing to keep it from being garbage collected. - -2002-04-01 Darin Adler - - Got rid of KWQDef.h because it's dangerous to have two files with - the same name and different contents. - - * JavaScriptCore.pbproj/project.pbxproj: - * kjs/KWQDef.h: Removed. - * kjs/ustring.h: Defines unsigned int types inline now. - -2002-03-30 Maciej Stachowiak - - Fixed Radar 2891272 (JavaScript crashes loading quicktime.com and - apple.com) - - * kjs/object.cpp: (ObjectImp::~ObjectImp): Don't call setGCAlloc - on object internals pointed to, because they may have already been - collected by the time this object is collected, and in that case - we would corrupt the malloc arena. - - * Makefile.am: Make the stamp file depend on all the sources and - headers so the framework gets rebuilt properly. - - * JavaScriptCore.pbproj/project.pbxproj: Some random numbers moved - around. No idea what I really changed. - -2002-03-30 Darin Adler - - * kjs/grammar.y: Took out Id tag so we won't constantly need to - update grammar.cpp. - * kjs/grammar.cpp: Regenerated without Id tag. - - * .cvsignore: Ignore some additional autogenerated files. - * kjs/.cvsignore: Ignore some additional autogenerated files. - -2002-03-30 Maciej Stachowiak - - * JavaScriptCore.pbproj/project.pbxproj: Install some of the - headers. - -2002-03-30 Maciej Stachowiak - - Converted JavaScriptCore to build with Project Builder, in - preparation for B&I submission. - - * English.lproj/InfoPlist.strings: Added. - * JavaScriptCore.pbproj/.cvsignore: Added. - * JavaScriptCore.pbproj/project.pbxproj: Added. - - * .cvsignore: Update the set of ignored things. - - * Makefile.am: Hand off to PB for the main build, but still handle - the generated files and the test program. - - * kjs/Makefile.am: Don't build anything except the generated - source files. - - * kjs/KWQDef.h, kjs/config.h: Added minimal versions of these - files to get kjs to build. - - Check in all the genrated files, since Project Builder isn't up to - the task of handling built sources: - - * kjs/array_object.lut.h: Added. - * kjs/date_object.lut.h: Added. - * kjs/grammar.cpp: Added. - * kjs/grammar.cpp.h: Added. - * kjs/grammar.h: Added. - * kjs/lexer.lut.h: Added. - * kjs/math_object.lut.h: Added. - * kjs/number_object.lut.h: Added. - * kjs/string_object.lut.h: Added. - - * kjs/.cvsignore: Update set of ignored things. - -2002-03-28 Maciej Stachowiak - - * kjs/kjs-test.chk: Update output for new test results. - -2002-03-26 Maciej Stachowiak - - Set up kjs to build by itself into libJavaScriptCore.dylib. - - * .cvsignore: Added. - * Makefile.am: Added. - * dummy.cpp: Added. - * kjs/.cvsignore: Added. diff --git a/ChangeLog-2003-10-25 b/ChangeLog-2003-10-25 deleted file mode 100644 index 7127d32..0000000 --- a/ChangeLog-2003-10-25 +++ /dev/null @@ -1,1483 +0,0 @@ -=== Safari-111 === - -2003-10-22 Maciej Stachowiak - - Fix broken build. - - * kjs/simple_number.h: - -2003-10-22 Maciej Stachowiak - - Merged 64-bit compilation fixes, and fixes for handling negative 0 - from upstream kjs. - - * kjs/internal.cpp: - * kjs/simple_number.h: - (KJS::SimpleNumber): fixed constants; added negZero constant. - (KJS::SimpleNumber::is): adjusted to use long and not int. - (KJS::SimpleNumber::value): ditto. - (KJS::SimpleNumber::fits): ditto; also don't allow -0 to fit, so - we don't lose the distinction between -0 and +0. - (KJS::SimpleNumber::make): adjusted to use long. - -2003-10-18 Darin Adler - - Reviewed by Dave. - - - fixed 3367015 -- interdependent variable declarations in for loop don't work (they go backwards) - - * kjs/nodes.h: (KJS::ForNode::ForNode): Add a new overload of the constructor for when the - first parameter is a variable declaration list. Call reverseList as we do in other constructors - that take lists that are built backwards. - * kjs/nodes.cpp: (ForNode::reverseList): Added. New helper function. - -=== Safari-110 === - -=== Safari-109 === - -2003-10-06 Darin Adler - - * kjs/create_hash_table: Remove stray semicolon. - - * kjs/array_object.lut.h: - * kjs/date_object.lut.h: - * kjs/lexer.lut.h: - * kjs/math_object.lut.h: - * kjs/number_object.lut.h: - * kjs/string_object.lut.h: - Regenerated. - -=== Safari-108 === - -2003-10-02 Darin Adler - - Reviewed by Dave. - - - fixed 3441656 -- constructor bad for objs created w/ function as prototype (www.moock.org/asdg/codedepot) - - * kjs/nodes.cpp: (FuncDeclNode::processFuncDecl): Set up the constructor as - as specified in the JavaScript spec. We were already doing this right in the - other place we make functions. - -2003-09-30 Darin Adler - - Reviewed by Dave. - - Rolled in Harri Porten's change to accept non-breaking space in JavaScript. - - * kjs/lexer.cpp: (Lexer::isWhiteSpace): Accept 00A0 as "whitespace". - -2003-09-25 Maciej Stachowiak - - Roll out build system change since it did not actually work. :-( - - * JavaScriptCore.pbproj/project.pbxproj: - * Makefile.am: - -2003-09-25 Maciej Stachowiak - - Reviewed by Darin. - - * JavaScriptCore.pbproj/project.pbxproj: Don't hack install name. Instead - of embedding into Safari, embed into WebKit as sub-umbrella. - * Makefile.am: Don't forget to rebuild if the user removes - JavaScript.framework from symroots manually. - -=== Safari-107 === - -2003-09-24 Darin Adler - - Reviewed by Ken. - - - fixed 3421107 -- some dates that other browsers can parse can't be parsed by KJS's Date.parse() - - * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Added code to be more strict about month names, - to allow a time zone after date even if the date omits the time, and to understand AM and PM. - -2003-09-22 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Rename Mixed build style to OptimizedWithSymbols. - -2003-09-22 Darin Adler - - Reviewed by Ken. - - * kjs/config.h: Added HAVE_SYS_PARAM_H, since KJS does look for this header, and we do - indeed have it. Just something I noticed in passing while cleaning up configure.in. - -2003-09-20 Darin Adler - - Reviewed by Dave. - - - fixed 3419380 -- JavaScript Date.getTimezoneOffset is off by one hour (during daylight savings) - - * kjs/date_object.cpp: (DateProtoFuncImp::call): The daylight savings correction - in here was incorrect. Perhaps I should have corrected it for the non-BSD case too, - but I'm not sure the issue is the same. - -2003-09-17 Darin Adler - - Reviewed by Maciej. - - * kjs/date_object.cpp: Removed our CF-based implementations of gmtime, localtime, - mktime, timegm, and time, since they no longer have the slow "hit the filesystem - every time" behavior. - -=== Safari-100 === - -=== Safari-99 === - -=== Safari-98 === - -=== Safari-97 === - -=== Safari-96 === - -2003-08-27 Maciej Stachowiak - - Reviewed by John - - - fixed rdar://problem/3397316 - sherlock crash: KJS::Collector::allocate(unsigned long) - - * kjs/internal.cpp: - (InterpreterImp::InterpreterImp): Hold the lock a bit longer, so - the call to initGlobalObject is covered. - -=== Safari-95 === - -2003-08-24 Darin Adler - - Reviewed by John. - - - fixed 3098350 -- opt. params to date methods are ignored (can't set end date in Exchange/Outlook web cal.) - - * kjs/date_object.cpp: (DateProtoFuncImp::call): Added code to handle the optional parameters. - Strangely, the table of functions already had the right number of parameters listed, but the - code to look at the parameter values was missing. - -=== Safari-94 === - -2003-08-17 Darin Adler - - Reviewed by Maciej. - - - fixed 3247528 -- encodeURI missing from JavaScriptCore (needed by Crystal Reports) - - fixed 3381297 -- escape method does not escape the null character - - fixed 3381299 -- escape method produces incorrect escape sequences ala WinIE, rather than correct ala Gecko - - fixed 3381303 -- unescape method treats escape sequences as Latin-1 ala WinIE rather than as UTF-8 ala Gecko - - fixed 3381304 -- unescape method garbles strings with bad escape sequences in them - - * kjs/function.h: Added constants for decodeURI, decodeURIComponent, encodeURI, and - encodeURIComponent. - * kjs/function.cpp: - (encode): Added. New helper function for escape, encodeURI, and encodeURIComponent. - (decode): Added. New helper function for unescape, decodeURI, and decodeURIComponent. - (GlobalFuncImp::call): Added decodeURI, decodeURIComponent, encodeURI, and encodeURIComponent - implementations. Changed escape and unescape to use new helper functions, which fixes - the four problems above. - - * kjs/internal.cpp: (InterpreterImp::initGlobalObject): Add decodeURI, decodeURIComponent, - encodeURI, and encodeURIComponent to the global object. - - * kjs/ustring.h: Added a length to the CString class so it can hold strings with null - characters in them, not just null-terminated strings. This allows a null character from - a UString to survive the process of UTF-16 to UTF-8 decoding. Added overloads to - UString::append, UString::UTF8String, UTF8SequenceLength, decodeUTF8Sequence, - convertUTF16OffsetsToUTF8Offsets, and convertUTF8OffsetsToUTF16Offsets. - - * kjs/ustring.cpp: - (CString::CString): Set up the length properly in all the constructors. Also add a new - constructor that takes a length. - (CString::append): Use and set the length properly. - (CString::operator=): Use and set the length properly. - (operator==): Use and the length and memcmp instead of strcmp. - (UString::append): Added new overloads for const char * and for a single string to make - it more efficient to build up a UString from pieces. The old way, a UString was created - and destroyed each time you appended. - (UTF8SequenceLength): New. Helper for decoding UTF-8. - (decodeUTF8Sequence): New. Helper for decoding UTF-8. - (UString::UTF8String): New. Decodes from UTF-16 to UTF-8. Same as the function that - was in regexp.cpp, except has proper handling for UTF-16 surrogates. - (compareStringOffsets): Moved from regexp.cpp. - (createSortedOffsetsArray): Moved from regexp.cpp. - (convertUTF16OffsetsToUTF8Offsets): New. Converts UTF-16 offsets to UTF-8 offsets, given - a UTF-8 string. Same as the function that was in regexp.cpp, except has proper handling - for UTF-16 surrogates. - (convertUTF8OffsetsToUTF16Offsets): New. Converts UTF-8 offsets to UTF-16 offsets, given - a UTF-8 string. Same as the function that was in regexp.cpp, except has proper handling - for UTF-16 surrogates. - - - fixed 3381296 -- regular expression matches with UTF-16 surrogates will treat sequences as two characters - - * kjs/regexp.cpp: - (RegExp::RegExp): Use the new UString::UTF8String function instead a function in this file. - (RegExp::match): Use the new convertUTF16OffsetsToUTF8Offsets (and the corresponding - reverse) instead of convertCharacterOffsetsToUTF8ByteOffsets in this file. - -=== Safari-93 === - -2003-08-14 Vicki Murley - - Reviewed by John. - - * JavaScriptCore.pbproj/project.pbxproj: deleted JavaScriptCore.order from the project. - -2003-08-14 Vicki Murley - - Reviewed by John. - - * JavaScriptCore.order: Removed. We now link to the order file at /AppleInternal/OrderFiles. - * JavaScriptCore.pbproj/project.pbxproj: change sectorder flag to point to /AppleInternal/OrderFiles/JavaScriptCore.order - -=== JavaScriptCore-92.1 === - -2003-08-07 Darin Adler - - Reviewed by John Sullivan. - - - fixed 3365527 -- subscripting JavaScript strings does not work (leads to hang at www.newmagna.com.au) - - The JavaScript specification says nothing about this, but other browsers seem to give - read-only access to the characters in a string as if the string was an array of characters. - - * kjs/array_object.cpp: - (ArrayInstanceImp::get): Update to use a public toArrayIndex function instead of our own getArrayIndex - function, so we can share with string. - (ArrayInstanceImp::put): Ditto. - (ArrayInstanceImp::hasProperty): Ditto. - (ArrayInstanceImp::setLength): Ditto. - - * kjs/ustring.h: Add toArrayIndex. - * kjs/ustring.cpp: (UString::toArrayIndex): Added. Implements the rule from array. - * kjs/identifier.h: Add a forwarding function so we can use toArrayIndex. - - * kjs/string_object.cpp: - (StringInstanceImp::get): Return a single character string if the property name is an array index. - (StringInstanceImp::hasProperty): Return true for property names that are suitable array indices. - - * JavaScriptCore.pbproj/project.pbxproj: Let Xcode be Xcode. - -=== Safari-92 === - -2003-08-07 Maciej Stachowiak - - Reviewed by Darin. - - - fixed 3366975 - repro hang in KJS::Value::Value entering text at eil.com - - * kjs/string_object.cpp: - (StringProtoFuncImp::call): When doing a match against a regexp - with the global flag set, make sure to return null rather than an - empty array when there is no match. This is what other browsers do. - -2003-08-05 Maciej Stachowiak - - Reviewed by John. - - * kjs/list.cpp: - (List::copyTail): Test for loop termination with < instead of !=, - since i starts at 1 but size could be 0. Do the same for the other - loop for consistency's sake. - -2003-08-01 Maciej Stachowiak - - Reviewed by John. - - - fixed 3222621 - Cryptic "anonymous function hack" messages in console (10.2.4) - - * kjs/lexer.cpp: - (Lexer::lex): Remove useless debug spew. - -=== Safari-91 === - -2003-07-30 Darin Adler - - Reviewed by Dave. - - - fixed problem where some JavaScriptCore symbols had no namespace or prefix - - * kjs/grammar.y: Added a define for yylloc to make it use the kjs prefix. - This is the same thing done for the rest of the symbols automatically by yacc, - but for some reason it's not done for yyloc. Also make automatic() function static. - * kjs/grammar.cpp: Regenerated. - * kjs/lexer.cpp: Use kjsyylloc instead of yyloc. - - * pcre/pcre.h: Add defines to prepend kjs prefixes for all the PCRE functions. - -2003-07-30 Darin Adler - - * Makefile.am: Include the subdirectory with the PCRE code in it. - -2003-07-30 John Sullivan - - - JavaScriptCore part of fix for 3284525 -- AutoFill fills in - only e-mail address field of New Account form on Apple Store Japan - - Reviewed by Darin - - * JavaScriptCore.pbproj/project.pbxproj: - Mark pcre.h as a Private header - -2003-07-28 Maciej Stachowiak - - Reviewed by Richard. - - - fixed 3240814 - LEAK: 120 byte leak in JavaScript parser in Sherlock Movies channel - - * kjs/internal.cpp: - (Parser::parse): ref() and deref() the program node, to make sure to clean up properly, - before deleting it. - (InterpreterImp::checkSyntax): Likewise. - -=== Safari-90 === - -2003-07-22 Maciej Stachowiak - - Reviewed by John. - - Remove -seg_addr_table_filename to fix build. - - * JavaScriptCore.pbproj/project.pbxproj: - -2003-07-17 Maciej Stachowiak - - Reviewed by John. - - - fixed 3330344 - Please change allowable client to "JavaScriptGlue" from "JSGlue" - - * JavaScriptCore.pbproj/project.pbxproj: Changed allowable client - to "JavaScriptGlue" - -2003-07-13 Darin Adler - - Reviewed by Maciej. - - - do some improvements Maciej suggested while reviewing the array index change - - * kjs/array_object.cpp: - (getArrayIndex): Return a flag to say whether the index was value separately, to avoid - in-band signalling. - (ArrayInstanceImp::get): Update for new getArrayIndex parameters. - (ArrayInstanceImp::put): Ditto. - (ArrayInstanceImp::hasProperty): Ditto. - (ArrayInstanceImp::setLength): Ditto. - - * kjs/ustring.cpp: (UString::toStrictUInt32): Check for overflow in a way that avoids doing - a divide every time through the loop. But note that it adds an extra branch to the loop. - I wonder which is worse. - -2003-07-12 Darin Adler - - Fixed broken build. - - * kjs/identifier.h: Add toULong back. It's still used in WebCore (and maybe in JavaScriptGlue, - for all I know). - -2003-07-12 Darin Adler - - Reviewed by Dave. - - - fixed 3272777 -- array object indices treated as integers by Safari, but as strings in other web browsers - - JavaScriptCore did not implement the proper rule for what an array index is. - - * kjs/array_object.cpp: - (getArrayIndex): Added. Implements the rule from the specification, which also provides a handy - "not an array index" value of 2^32-1. - (ArrayInstanceImp::get): Use getArrayIndex. - (ArrayInstanceImp::put): Ditto. - (ArrayInstanceImp::hasProperty): Ditto. - (ArrayInstanceImp::setLength): Ditto. - - * kjs/identifier.h: Removed now-unused toULong, and added toStrictUInt32, in both cases forwarding - functions that forward to UString. - - * kjs/ustring.h: Added toStringUInt32. - * kjs/ustring.cpp: (UString::toStrictUInt32): Added. Converts a string to a 32-bit unsigned integer, - and rejects any string that does not exactly match the way the integer would be formatted on output. - This is the rule documented in the ECMA language standard. - -=== Safari-89 === - -2003-07-10 Maciej Stachowiak - - Reviewed by Darin. - - - fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/ - - The crux of this was saving and restoring the prototype objects - for all the standard types when saving and restoring for the page - cache. - - * kjs/internal.cpp: - (InterpreterImp::saveBuiltins): - (InterpreterImp::restoreBuiltins): - * kjs/internal.h: - * kjs/interpreter.cpp: - (Interpreter::saveBuiltins): - (Interpreter::restoreBuiltins): - (SavedBuiltins::SavedBuiltins): - (SavedBuiltins::~SavedBuiltins): - * kjs/interpreter.h: - * kjs/property_map.cpp: - -2003-07-07 Maciej Stachowiak - - Reviewed by John. - - - fixed 3295916 - b/c JavaScriptCore and WebCore are installing in wrong location, private headers are public - - * WebCore.pbproj/project.pbxproj: Install in WebKit.framework/Versions/A/Frameworks. - -=== Safari-88 === - -2003-07-02 Maciej Stachowiak - - Reviewed by Ken. - - - fixed 3096961 - JavaScriptCore should link only to what it uses, shouldn't drag in Cocoa.framework - - * JavaScriptCore.pbproj/project.pbxproj: Don't link Cocoa.framework; - just pull in CoreFoundation and CoreServices. - * kjs/date_object.cpp: Include CoreServices.h instead of Carbon.h - (the stuff we want is in CarbonCore). - -2003-06-20 Darin Adler - - Reviewed by Maciej. - - - improved the property map sorting technique so that the indices - are separate for each property map, and also preserve the ordering - when property maps are saved and restored - - * kjs/property_map.cpp: - (PropertyMap::put): Don't bother setting the index for _singleEntry, since there's - no need to sort a single entry. Use the per-table lastIndexUsed instead of a global. - (PropertyMap::expand): Don't use the index (uninitialized now) out of a _singleEntry - when putting it in a newly-created map; just use 0. Compute a value for the new map's - lastIndexUsed as we walk through the elements we are adding to it (using the same old - indices from the old map). - -=== Safari-85.1 === - -=== Safari-85 === - -2003-06-13 Darin Adler - - Reviewed by Dave. - - - fixed 3178438 -- return elements in order of addition in for..in loop (other browsers seem to) - - fixed 3292067 -- REGRESSION (64-65): albertsons.com "Shop A to Z" menus are not sorted alphabetically - - * kjs/property_map.h: Add index field to hash table entry and index parameter to insert function. - * kjs/property_map.cpp: - (PropertyMap::put): Set an index for new map entries to an ever-increasing number based on a global. - (PropertyMap::insert): Take an index parameter. - (PropertyMap::expand): Preserve the indices as we rehash the table. - (comparePropertyMapEntryIndices): Added. Compares two property map entries by index. - (PropertyMap::addEnumerablesToReferenceList): Sort the proprty map entries by index before adding - them to the reference list. - -=== Safari-84 === - -2003-06-10 Vicki Murley - - Reviewed by john. - - * JavaScriptCore.order: new order file for 1.0 - -=== Safari-83 === - -2003-06-04 Darin Adler - - Reviewed by Dave. - - - fixed 3224031 -- can't search at rakuten.co.jp b/c of extra characters inserted by regexp replace (8-bit char) - - Use PCRE UTF-8 regular expressions instead of just chopping off high bytes. - - * kjs/regexp.h: Redo field names, remove some unused stuff. - * kjs/regexp.cpp: - (convertToUTF8): Added. - (compareStringOffsets): Added. - (createSortedOffsetsArray): Added. - (convertCharacterOffsetsToUTF8ByteOffsets): Added. - (convertUTF8ByteOffsetsToCharacterOffsets): Added. - (RegExp::RegExp): Set the PCRE_UTF8 flag, and convert the UString to UTF-8 instead of - using ascii() on it. - (RegExp::~RegExp): Remove unneeded if statement (pcre_free is 0-tolerant as free is). - (RegExp::match): Convert the UString to UTF-8 and convert the character offsets to and - from UTF-8 byte offsets. Also do fixes for the "no offset vector" case so we get the - correct position and matched string. - - * JavaScriptCore.pbproj/project.pbxproj: Add a PCRE header that was missing before. - -=== Safari-82 === - -=== Safari-81 === - -2003-05-21 Vicki Murley - - Reviewed by john - - fixed 3234553: Safari and its frameworks should link using order files - - * JavaScriptCore.order: Added. - * JavaScriptCore.pbproj/project.pbxproj: set SECTORDER_FLAGS = -sectorder __TEXT __text JavaScriptCore.order - -=== Safari-80 === - -2003-05-19 Maciej Stachowiak - - - fixed 3261096 - Make WebKit an umbrella framework - - * JavaScriptCore.pbproj/project.pbxproj: In a B&I build, compile as a - sub-umbrella of WebKit. - -2003-05-16 Maciej Stachowiak - - Reviewed by Ken. - - - fixed 3254063 - REGRESSION: hang in KJS PropertyMap with many items in iDisk pictures folder - - * kjs/property_map.cpp: - (PropertyMap::expand): Fixed to maintain key count properly - otherwise the hashtable - could get completely full, resulting in disaster. - (PropertyMap::checkConsistency): Fixed compilation. Fixed to know about deleted - sentinel. Fixed to search with double-hashing instead of linear probing. - -=== Safari-79 === - -2003-05-15 Maciej Stachowiak - - Reviewed by Chris. - - - fixed 3259673 - REGRESSION: marvel.com thinks I don't have the flash plugin any more - - * kjs/nodes.cpp: - (ContinueNode::execute): Return a Continue completion, not a Break - completion, in the normal non-exception case. - -2003-05-12 Maciej Stachowiak - - Reviewed by Darin. - - - fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu - - improved JavaScript error message format - - * kjs/error_object.cpp: - (ErrorProtoFuncImp::call): Include line number in toString output. - * kjs/internal.cpp: - (Parser::parse): Remove redundant fprintf. - * kjs/interpreter.cpp: - (Interpreter::evaluate): Log if the flag is on. Include filename in log output. - (Interpreter::shouldPrintExceptions): Check the global flag. - (Interpreter::setShouldPrintExceptions): Set the global flag. - * kjs/interpreter.h: - * kjs/nodes.cpp: - (Node::throwError): Add variants that include value and expression or label in format. - (NewExprNode::evaluate): Improve error message. - (FunctionCallNode::evaluate): Improve error message. - (RelationalNode::evaluate): Improve error message. - (ContinueNode::execute): Improve error message. - (BreakNode::execute): Improve error message. - (LabelNode::execute): Improve error message. - * kjs/nodes.h: - -=== Safari-78 === - -2003-05-07 Vicki Murley - - Reviewed by darin. - - - modify the Mixed build style to build optimized with symbols - - * JavaScriptCore.pbproj/project.pbxproj: removed OPTIMIZATION_CFLAGS - -2003-05-05 Maciej Stachowiak - - Reviewed by Don. - - - fixed 3239961 - www.phiffer.com doesn't work; uses "var top; top = n;" - - * kjs/nodes.cpp: - (VarDeclNode::evaluate): Check if the property exists with - getDirect() instead of hasProperty(). - -=== Safari-77 === - -2003-04-29 Darin Adler - - Reviewed by John. - - - fixed 2959353 -- eliminate globally initialized objects from JavaScriptCore - - * JavaScriptCore.pbproj/project.pbxproj: Added fpconst.cpp. - * kjs/fpconst.cpp: Added. Defines KJS::NaN and KJS::Inf in a way that does not require a - framework init routine. - - * kjs/identifier.h: Use a new KJS_IDENTIFIER_EACH_GLOBAL macro so we can do things to - the entire set of identifiers easily. Also added an init function that sets up these globals - in a way that does not require a framework init routine. - * kjs/identifier.cpp: (Identifier::init): Initialize the property ane globals in a way that - does not require a framework init routine. - - * kjs/internal.cpp: (InterpreterImp::initGlobalObject): Call Identifier::init. - - * kjs/ustring.h: Remove UChar::null and UString::null, and add UString::null(). We can't have - a global object of a class that has a constructor if we want to avoid framework init routines, - and luckily very little code relies on these. - * kjs/ustring.cpp: - (UCharReference::ref): Use our own global specific to this function rather than returning - UChar::null when past the end of the string. This is dangerous because if the caller modifies - it, that affects what all subsequent callers will see. - (UString::Rep::create): Added assertions. - (UString::UString): Got rid of code here that used to set up UString::null. - (UString::null): Added. Returns a global null string, and can be used in some of the places - where we used to use the UString::null global. - (UString::operator[]): Fixed case where this used to return UChar::null to return '\0' instead. - - * kjs/regexp.cpp: (RegExp::match): Change uses of UString::null to UString::null(). - -2003-04-25 Darin Adler - - - fixed 3241344 -- REGRESSION: top of page missing on wired.com and cnn.com - - Caused by the ResolveNode speedup. Roll it out until I can figure out why. - - * kjs/nodes.cpp: (ResolveNode::evaluate): Go back to using evaluateReference. - -2003-04-25 Darin Adler - - Reviewed by Maciej. - - - a couple improvements that give a 6.6% speedup on iBench JavaScript - - * kjs/nodes.cpp: (ResolveNode::evaluate): Don't use evaluateReference. - - * kjs/object.cpp: (ObjectImp::get): Do the prototype work with the ValueImp, not a wrapper. - Contributes a tiny bit to the speedup, but cleaner anyway. - (ObjectImp::hasProperty): Same thing here. - -2003-04-25 Darin Adler - - Reviewed by Maciej. - - - move from linear probing to double hashing, gives an 0.7% speedup in iBench JavaScript - - * kjs/property_map.h: Remove the hash function. - * kjs/property_map.cpp: Added statistics for rehashes and removes. - Moved from linear probing to double hashing, using the hash modulo - (table size minus one) plus one for the probing distance. - - * kjs/ustring.h: Use unsigned instead of int for hash function result. - -=== Safari-75 === - -2003-04-18 Maciej Stachowiak - - Reviewed by Ken. - - Improved List pool for 3% speed improvement on cvs-js-ibench - - * kjs/list.cpp: Replaced the roving cursor with a free list and - raised the high water mark to 384. - -2003-04-12 Maciej Stachowiak - - Reviewed by Don. - - - JavaScriptCore part of fix for 3158769 - JavaScript triggers not as async as they used to be - - Added a way to get the current interpreter lock count, so Sherlock - can unlock the interpreter inside JS method implementations that - spend a long time waiting for I/O, allowing more efficient - multi-threaded operation. - - * kjs/internal.cpp: - (lockInterpreter): - (unlockInterpreter): - (InterpreterImp::lock): - (InterpreterImp::lockCount): - * kjs/internal.h: - * kjs/interpreter.cpp: - (Interpreter::lockCount): - * kjs/interpreter.h: - -=== Safari-73 === - -=== Safari-72 === - -=== Safari-71 === - -2003-03-31 Darin Adler - - * English.lproj/InfoPlist.strings: Changed "1.0 Beta" to "1.0 Beta 2". - * JavaScriptCore.pbproj/project.pbxproj: Changed "1.0 Beta" to "1.0 Beta 2". - -=== Safari-69 === - -2003-03-24 Trey Matteson - - Pass -seg_addr_table_filename to ld. This makes our frameworks in - SYMROOT actually work for symbol resolution because they will have the correct - prebinding address. It also fixes obscure B&I problems with prebinding - reported by Matt Reda. - - Note the reason all this is tricky for our projects is that we have a different - install location for Jaguar and Panther. The purpose of this arg is to declare - at link time our eventual location, which allows the prebinding address to be - found in /AppleInternal/Developer/seg_addr_table. We use a funky back-tick - expression within OTHER_LDFLAGS to get a conditional value depending on the - build train we are in. - - This can all go away once we only build on Panther and don't embed the - frameworks inside the Safari.app wrapper. - - In addition I fixed the OTHER_LDFLAGS settings in our build styles to be - additive instead of overriding, so we have the args we used for B&I in force - when building outside of B&I. - - Reviewed by Maciej. - - * JavaScriptCore.pbproj/project.pbxproj: - -=== Safari-68 === - -2003-03-16 Trey Matteson - - 3198135 - need to fix our projects so SYMROOT is not stripped - - Tweaked stripping options: B&I build does not COPY_PHASE_STRIP. - Deployment build still does. - We strip manually as part of the install that we do ourselves. - - Reviewed by Maciej. - - * JavaScriptCore.pbproj/project.pbxproj: - -=== Safari-67 === - -=== Safari-66 === - -2003-03-10 Darin Adler - - Reviewed by Ken. - - - fixed 3193099 -- date parsing can't handle the time zone format that date formatting produces - - * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Allow a "GMT" prefix before the time zone offset. - -=== Safari-65 === - -2003-03-04 Darin Adler - - Reviewed by Maciej. - - - got rid of some framework initialization (working on bug 2959353) - - * kjs/identifier.h: Turn Identifier:null into Identifier:null(). - * kjs/identifier.cpp: Removed Identifier:null and added Identifier:null(). - - * kjs/internal.cpp: Made NaN_Bytes and Inf_Bytes const. - - * kjs/completion.h: Use Identifier:null() instead of Identifier:null. - * kjs/function.h: Ditto. - * kjs/function_object.cpp: (FunctionObjectImp::construct): Ditto. - * kjs/nodes.cpp: (FuncExprNode::evaluate): Use Identifier:null() instead of Identifier:null. - -2003-03-02 Maciej Stachowiak - - Reviewed by Trey. - - - fixed 3158833 - ebay prefs page is so slow, it seems like a hang. - - 92% speed improvement on ebay prefs page. - 1% speed improvement on js-ibench and js-performance plt suites. - - There were a couple of problems with the identifier hash table that - I fixed: - - * kjs/identifier.cpp: - (void Identifier::remove): Adjust the shrink threshold to avoid - constantly growing and shrinking. - * kjs/ustring.cpp: - (UString::Rep::computeHash): Use a better hash function that - avoids collisions for obvious data sets. - -=== Safari-64 === - -=== Safari-63 === - -2003-02-26 Maciej Stachowiak - - Reviewed by Darin. - - - fixed 3156705 - REGRESSION: javascript menus improperly placed at umich.edu store - - * kjs/nodes.cpp: - (StatListNode::execute): If the first statement's completion is - not normal, return immediately. - -2003-02-21 Darin Adler - - Reviewed by Maciej. - - - fixed 3142355 -- nil-deref in CFTimeZoneCopyAbbreviation - - The real problem wasn't with the current time zone, but with the UTC time zone. - The poor sod had a broken /usr/share/zoneinfo directory, with a 0-byte-long UTC file. - - * kjs/date_object.cpp: (UTCTimeZone): Use CFTimeZoneCreateWithTimeIntervalFromGMT(NULL, 0.0) - to get the universal time zone instead of getting it by name. - -=== Safari-62 === - -2003-02-18 Darin Adler - - Reviewed by Trey and Ken. - - - fixed 3142355 -- nil-deref in CFTimeZoneCopyAbbreviation - - Although I can't reproduce this bug, it seems that it's caused by CFTimeZoneCopyDefault returning NULL. - I'm almost certain that the UTC time zone will be created successfully in this case, so I'll just use that. - - * kjs/date_object.cpp: - (UTCTimeZone): Added. Gets the UTC time zone (once in a global). - (CopyLocalTimeZone): Added. Gets the local time zone, but falls back to UTC. - (gmtimeUsingCF): Use UTCTimeZone. - (localtimeUsingCF): Use CopyLocalTimeZone. - (mktimeUsingCF): Use CopyLocalTimeZone. - (timegmUsingCF): Use UTCTimeZone. - -2003-02-12 Darin Adler - - Reviewed by Dave. - - - fixed 3145442 -- toString(16) is not working, causing non-ASCII characters in mac.com homepage to be munged - - * kjs/number_object.cpp: (NumberProtoFuncImp::call): Add handling for toString with a radix other than - 10 passed as an argument. - -2003-02-11 Trey Matteson - - Set -seg1addr in our build styles, but not for the B&I build. - This makes our SYMROOTS from B&I usable to determine symbols from crash - logs from the field. - Also nuked DeploymentFat build style. - - Reviewed by Ken. - - * JavaScriptCore.pbproj/project.pbxproj: - -2003-02-04 Maciej Stachowiak - - Reviewed by Darin. - - * JavaScriptCore.pbproj/project.pbxproj: Updated to build the framework - standalone instead of embedded when doing a B&I build for Panther. - -=== Safari-55 === - -2003-01-29 Darin Adler - - Reviewed by John. - - * kjs/scope_chain.cpp: Rolled out the fix to bug 3137084. - It caused a massive storage leak, and probably didn't even fix the bug. - -2003-01-28 Darin Adler - - Reviewed by Ken. - - - fixed 3157318 -- hang at time zone page after clicking on map at www.time.gov - - * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Allow a comma after the day. - Given how this code is structured, it allows commas in unwanted contexts too, but - that's almost certainly harmless. - -2003-01-28 Darin Adler - - Reviewed by Maciej. - - - fixed 3144918 -- Can't drill down multiple levels of categories when selling on ebay - if first item in list is chosen - - The bug was caused by having array values in the property map past the storageLength cutoff - in an array object; those values would not be seen when you do a get. - - * kjs/array_object.cpp: - (ArrayInstanceImp::put): Implement a new rule for resizing the storage that is independent - of the length. The old rule would sometimes make the storage very big if you added two elements - in a row that both had large, but consecutive indexes. This eliminates any cases where we - make sparse entries in the property map below the sparse array cutoff. - (ArrayInstanceImp::resizeStorage): Don't ever make storage size bigger than the cutoff unless - the caller specifically requests it. - (ArrayInstanceImp::setLength): Change this so it only makes the storage smaller, never larger. - We will actually enlarge the storage when putting elements in. - -2003-01-25 Darin Adler - - Reviewed by Maciej. - - * kjs/Makefile.am: Add dependencies so the .lut.h files get rebuilt if the script changes. - -=== Safari-54 === - -2003-01-22 Darin Adler - - Reviewed by Maciej. - - - fixed 3137084 -- Many non-reproducible crashers in ContextImp::mark / ScopeChain::mark - - * kjs/scope_chain.cpp: (ScopeChain::push): Add assertion. - (ScopeChain::release): Fix while loop so that it decrements refCount of the first node in - the chain too. - -2003-01-21 Darin Adler - - - correct our copyrights to 2003; copyright is based on year of publication, not year worked on - -2003-01-16 Maciej Stachowiak - - Reviewed by Darin. - - - made minor tweaks to work better with Mozilla's JavaScript tests. - - * kjs/testkjs.cpp: - (VersionFunctionImp::call): Implemented - (main): Ignore files named -f (hack to match -f - - * kjs/number_object.cpp: (NumberObjectImp::construct): - Fix build, remove stray space. - -2003-01-16 Darin Adler - - Reviewed by Maciej. - - - rolled in a change from the KJS folks - - * kjs/number_object.h: Use ObjectImp *, not Object, for the proto. - * kjs/number_object.cpp: - (NumberInstanceImp::NumberInstanceImp): Use ObjectImp *, not Object, for the proto. - (NumberPrototypeImp::NumberPrototypeImp): Pass ObjectImp. - (NumberObjectImp::construct): Use ObjectImp. - -=== Safari-52 === - -2003-01-14 Darin Adler - - Reviewed by Ken. - - - rolled in a change from the KJS folks - - Fixes a bug where the date functions would not accept non-strings. - And provides a bit of a speedup. - - * kjs/date_object.h: Change parameter type for parseDate. - * kjs/date_object.cpp: - (DateObjectFuncImp::call): Always call toString, don't check the type. - (KJS::parseDate): Take a UString parameter, not a String parameter. - -2003-01-13 Darin Adler - - * kjs/ustring.h: Fix spelling of occurrence. - -2003-01-12 Darin Adler - - Reviewed by Maciej. - - - turned more recursion into iteration, and fixed some backwards stuff - - * kjs/grammar.y: Use the normal idiom for CaseClauses and FormalParameterList - rather than using append(). - * kjs/grammar.cpp: Regenerated. - - * kjs/nodes.h: Change ClauseListNode and ParameterNode to use the normal idiom, - and got rid of append methods. Also added friend declarations and calls to reverseList(). - * kjs/nodes.cpp: - (StatListNode::ref): Iteration, not recursion. - (StatListNode::deref): Iteration, not recursion. - (StatListNode::execute): Iteration, not recursion. - (StatListNode::processVarDecls): Iteration, not recursion. - (CaseClauseNode::reverseList): Added. - (ClauseListNode::ref): Iteration, not recursion. - (ClauseListNode::deref): Iteration, not recursion. - (ClauseListNode::processVarDecls): Iteration, not recursion. - (CaseBlockNode::reverseLists): Added. - (ParameterNode::ref): Iteration, not recursion. - (ParameterNode::deref): Iteration, not recursion. - (FuncDeclNode::reverseParameterList): Added. - (FuncExprNode::reverseParameterList): Added. - (SourceElementsNode::ref): Iteration, not recursion. - (SourceElementsNode::deref): Iteration, not recursion. - (SourceElementsNode::execute): Use variable name of n to match other functions. - (SourceElementsNode::processFuncDecl): Ditto. - (SourceElementsNode::processVarDecls): Ditto. - - * kjs/nodes2string.cpp: - (SourceStream::operator<<): Used a switch statement for a bit of added clarity. - (ElementNode::streamTo): Iteration, not recursion. - (PropertyValueNode::streamTo): Iteration, not recursion. - (ArgumentListNode::streamTo): Iteration, not recursion. - (StatListNode::streamTo): Iteration, not recursion, and fixed order. - (VarDeclListNode::streamTo): Iteration, not recursion. - (ClauseListNode::streamTo): Used for statement to match other functions. - (CaseBlockNode::streamTo): Used for statement to match other functions. - (ParameterNode::streamTo): Iteration, not recursion. - (SourceElementsNode::streamTo): Iteration, not recursion, and fixed order that has been - backwards since I changed how this works in nodes.cpp. - -2003-01-11 Darin Adler - - Reviewed by John. - - - changes inspired by things I noticed reviewing diffs vs. KDE when preparing the tarball - - * kjs/function.cpp: (GlobalFuncImp::call): Use strtol when strtoll is - not available. Do #ifndef NDEBUG, not #if !NDEBUG. - * kjs/function.h: Do #ifndef NDEBUG, not #if !NDEBUG. - * kjs/internal.cpp: - (InterpreterImp::initGlobalObject): Do #ifndef NDEBUG, not #if !NDEBUG. - (KJS::printInfo): Remove case for ListType and remove default case that just - ends up suppressing the "missing case" warning and does no good. - * kjs/interpreter.cpp: (Interpreter::evaluate): Do #ifndef NDEBUG, not #if !NDEBUG. - * kjs/nodes.cpp: - (Node::finalCheck): Fix accidentally-deleted code in an ifdef we never compile. - (FunctionCallNode::evaluate): Remove bogus XXX comment. Maciej put this comment in, - and together we determined it's not needed. - (TypeOfNode::evaluate): Ditto. - * kjs/object.cpp: Remove assert that refers to ListType. - * kjs/value.h: Remove ListType. - -2003-01-09 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Add the year 2003, remove CFBundleIconFile, - bump marketing version to 0.8.1 and version to 52u to keep up with the branch, - remove CFHumanReadableCopyright, remove NSPrincipalClass. - - * English.lproj/InfoPlist.strings: Updated to match above changes. - -2003-01-05 Maciej Stachowiak - - Reviewed by no one cause I'm just changing copyright strings. - - * JavaScriptCore.pbproj/project.pbxproj: Added non-Apple copyrights to - copyright strings. - * English.lproj/InfoPlist.strings: Likewise. - -2003-01-05 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Fix "Apple Compupter" typo. - Remove unneeded CFBundleLongVersionString we don't use anywhere else. - -2003-01-02 Darin Adler - - Reviewed by Maciej. - - - fixed 3138213 -- browser hangs trying to open Apple travel site - - * kjs/date_object.cpp: (timetUsingCF): Check for very-negative year numbers too. - -=== Alexander-48 === - -=== Alexander-47 === - -2002-12-30 Darin Adler - - Reviewed by Don and Maciej. - - - follow-on to my fix for 3134693 that fixes one more case of recursion and simplifies further - - * kjs/grammar.y: Remove SourceElementNode and just use a StatementNode instead. - Reverse SourceElements rule so the recursive rule comes first as in the original - KJS code (avoids actual parser recursion). - - * kjs/grammar.cpp: Regenerated. - * kjs/grammar.cpp.h: Regenerated. - * kjs/grammar.h: Regenerated. - - * kjs/nodes.h: Make processFuncDecl a virtual function in StatementNode so that we can - use a StatementNode instead of a SourceElementNode. Add a call to reverseList in BlockNode - to correct the order of the linked list in SourceElementsNode, to replace the technique - where we reversed it in the parser. Remove SourceElementNode class, and make the element in - SourceElementsNode be a StatementNode instead. - * kjs/nodes.cpp: Remove SourceElementNode code. - (StatementNode::processFuncDecl): Added empty function. - (BlockNode::reverseList): Added. Used to make the SourceElements list ordered correctly. - * kjs/nodes2string.cpp: Remove SourceElementNode code. - -=== Alexander-46 === - -2002-12-28 Darin Adler - - Reviewed by Gramps and Ken. - Checked in by Ken. - - - fixed 3134693 -- carsdirect.com crash on used car search, due to large JavaScript array - - The parser was using recursion to handle many types of lists. - This meant that we crashed out of stack space when any of the lists were extra big. - I applied the same sort of fix we had already applied a while back for argument lists for - all the other types of lists, including the list of ElementNode that was the reason for - the crash reported here. - - * kjs/grammar.y: Removed ElisionNode altogether and just use a count. - Use specific node types for PropertyNameAndValueList and PropertyName. - - * kjs/grammar.cpp: Regenerated. - * kjs/grammar.cpp.h: Regenerated. - * kjs/grammar.h: Regenerated. - - * kjs/nodes.h: Elide "ElisionNode", changing objects to keep elision counts instead. - Make the ObjectLiteralNode list field be PropertyValueNode, not just Node. - Make PropertyValueNode fields have specific types. Add new reverse list functions, calls - to those functions in the constructors, and friend declarations as needed so the class - that holds the head of a list can reverse the list during parsing. - * kjs/nodes.cpp: - (ElementNode::ref): Use iteration instead of recursion. Also elide "elision". - (ElementNode::deref): Ditto. - (ElementNode::evaluate): Use iteration instead of recursion, taking advantage of - the fact that the linked list is reversed. Also use the elision count rather than - an elision list. - (ArrayNode::reverseElementList): Reverse the list so we can iterate normally. - (ArrayNode::ref): Elide "elision". - (ArrayNode::deref): Ditto. - (ArrayNode::evaluate): Use elision count instead of elision list. - (ObjectLiteralNode::reverseList): Reverse the list so we can iterate normally. - (PropertyValueNode::ref): Use iteration instead of recursion. - (PropertyValueNode::deref): Use iteration instead of recursion. - (PropertyValueNode::evaluate): Use iteration instead of recursion, taking advantage - of the fact that the linked list is reversed. - (ArgumentListNode::ref): Change code to match the other similar cases we had to revise. - (ArgumentListNode::deref): Ditto. - (ArgumentListNode::evaluateList): Ditto. - (ArgumentsNode::reverseList): Ditto. - (VarDeclListNode::ref): Use iteration instead of recursion. - (VarDeclListNode::deref): Ditto. - (VarDeclListNode::evaluate): Use iteration instead of recursion, taking advantage - of the fact that the linked list is reversed. - (VarDeclListNode::processVarDecls): Ditto. - (VarStatementNode::reverseList): Reverse the list so we can iterate normally. - (FunctionBodyNode::FunctionBodyNode): Use BlockNode as the base class, removing - most of the FunctionBodyNode class. - - * kjs/nodes2string.cpp: - (ElementNode::streamTo): Update for using a count for elision, and reverse linking. - (ArrayNode::streamTo): Update for using a count for elision. - (PropertyValueNode::streamTo): Update for reverse linking. - (ArgumentListNode::streamTo): Update for reverse linking. This has been wrong for - a while, since we added the reverse a long time ago. - (VarDeclListNode::streamTo): Update for reverse linking. - (ParameterNode::streamTo): Update for reverse linking. - -=== Alexander-45 === - -2002-12-22 Darin Adler - - Reviewed by Don and John. - - - fixed 3134449 -- Date.UTC returns NaN (invalid date) - - Did more testing of the date functions and made them behave like the other browsers. - There were three problems: - - 1) We did a validity check that other browsers don't do (hence the NaN). - 2) We treated passed-in dates as local time even in Date.UTC (hence a wrong result - once I fixed the NaN). - 3) The results of ToUTCString (and ToGMTString) weren't formatted quite the same - as other browsers. - - Also found a couple of silly but unrelated coding mistakes. - - * kjs/date_object.cpp: - (timetUsingCF): Added. Has the guts of mktimeUsingCF, but without the CFGregorianDateIsValid - check. Other browsers accept invalid dates. Also takes a time zone parameter. - (mktimeUsingCF): Calls timetUsingCF with the current time zone. - (timegmUsingCF): Calls timetUsingCF with the UTC time zone. - (formatDate): Remove the includeComma flag. - (formatDateUTCVariant): Added. For use instead of formatDate with the includeComma flag. - Puts the day before the month name. - (DateProtoFuncImp::call): Use the new formatDateUTCVariant for ToGMTString and ToUTCString. - Without this change the date didn't match other browsers. - (DateObjectImp::DateObjectImp): Use UTCPropertyName. Somehow I declared this and didn't use - it before. - (DateObjectImp::construct): Pass -1 for is_dst literally instead of using invalidDate. - Changing this to invalidDate was just a mistake (although no real difference in compiled - code since invalidDate is just -1). - (DateObjectFuncImp::call): Call timegm for the UTC case instead of mktime. - -=== Alexander-44 === - -=== Alexander-43 === - -2002-12-20 Trey Matteson - - We now build with symbols the B&I. Deployment builds are without symbols, - so it is easy to generate a non-huge app as a one-off. - - Reviewed by Darin - - * JavaScriptCore.pbproj/project.pbxproj: - -=== Alexander-42 === - -=== Alexander-41 === - -=== Alexander-40 === - -2002-12-18 Maciej Stachowiak - - Reviewed by John. - - - fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements - - * English.lproj/InfoPlist.strings: - * JavaScriptCore.pbproj/project.pbxproj: - -2002-12-17 Darin Adler - - Reviewed by Trey. - - * JavaScriptCore.pbproj/project.pbxproj: Removed signature. - -=== Alexander-39 === - -=== Alexander-38 === - -2002-12-16 Darin Adler - - Reviewed by Don and Maciej. - - - fixed 3129115 -- need Apple copyright added to open source documents - - * tons of files: Added our copyright to files we modified, and updated all to standard format. - - - other changes - - * JavaScriptCore.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2. - Also removed completion.cpp. - * kjs/completion.cpp: Removed. - * kjs/completion.h: Made the Completion constructor inline. - - * kjs/grammar.y: Removed an obsolete "pretend ifdef". No need to put these in APPLE_CHANGES now. - -=== Alexander-37 === - -=== JavaScriptCore-37u2 === - -2002-12-15 Maciej Stachowiak - - Reviewed by Darin. - - * JavaScriptCore.pbproj/project.pbxproj: Bump version to 37u2. - -2002-12-14 Darin Adler - - Reviewed by Maciej. - - * JavaScriptCore.pbproj/project.pbxproj: Make dtoa.h visible as an SPI so I can - use it inside QString. - -2002-12-14 Maciej Stachowiak - - Reviewed by Ken. - - - further corrections to number printing. - - * kjs/ustring.cpp: - (UString::from): Make number printing match the ECMA standard - algorithm. - -2002-12-14 Maciej Stachowiak - - Reviewed by Dave. - - - fix toString() conversion for numbers less than 1. Negative - exponents are still wrong though (things like 1E-34). - - * kjs/ustring.cpp: - (UString::from): Don't print empty string for numbers less than 1, - and remember to add extra 0s after the decimal for negative - decimal positions. - -=== Alexander-37u1 === - -=== Alexander-36 === - -2002-12-12 Maciej Stachowiak - - Reviewed by Darin. - - - fixed 3056449 - can't select state at tucows.com - - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstanceImp::propList): Add numeric proprties that are in - special storage. - * kjs/array_object.h: - * kjs/object.h: Make propList a virtual method. - -2002-12-11 Maciej Stachowiak - - Reviewed by Don. - - - Add kjsprint global function in Development build for ease of debugging. - - Print uncaught JavaScript exceptions to the console in Development. - - Improve wording of exception error messages. - - * kjs/function.cpp: - (GlobalFuncImp::call): - * kjs/function.h: - * kjs/internal.cpp: - (InterpreterImp::initGlobalObject): - * kjs/interpreter.cpp: - (Interpreter::evaluate): - * kjs/nodes.cpp: - (NewExprNode::evaluate): - (FunctionCallNode::evaluate): - (RelationalNode::evaluate): - -2002-12-10 John Sullivan - - Fixed more "Alexander"s that were lurking in places I forgot - to look before. - - Reviewed by Darin - - * Makefile.am: - "rm -rf $(SYMROOTS)/Safari.app/Frameworks/JavaScriptCore.framework" - -2002-12-09 Darin Adler - - Reviewed by Maciej. - - * JavaScriptCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u. - * English.lproj/InfoPlist.strings: In here too. - -2002-12-09 Maciej Stachowiak - - Reviewed by Ken. - - - fixed 3059637 - all articles missing at excite.com sports page - - fixed 3065903 - most of content missing at excite.com news page - - These bugs both came up because a JavaScript function has a var - declaration that collides with a function parameter name. - - * kjs/nodes.cpp: - (VarDeclNode::processVarDecls): Don't set the property to - undefined if a property with that name is already set on the - global object. Otherwise we may clobber function parameters with - undefined even before hitting a possible var initializer. - -2002-12-06 Maciej Stachowiak - - Reviewed by: Darin Adler - - - made framework embedding work correctly with buildit - - * JavaScriptCore.pbproj/project.pbxproj: Give framework a relative - install path, don't install it the normal way, and copy it - manually to /AppleInternal/Library/Frameworks if installing. - -=== Alexander-35 === - -2002-12-04 Maciej Stachowiak - - Reviewed by: Richard Williamson - - Added explicit lock/unlock methods so Sherlock can grab the - interpreter lock as needed. - - - partially addressed 3084320 - JavaScriptCore crash - - * kjs/internal.cpp: - (InterpreterImp::InterpreterImp): - (InterpreterImp::lock): - (InterpreterImp::unlock): - * kjs/internal.h: - * kjs/interpreter.cpp: - (Interpreter::lock): - (Interpreter::unlock): - * kjs/interpreter.h: - -2002-12-04 Maciej Stachowiak - - Reviewed by: Darin Adler - - Set things up so JavaScriptCore builds in PCRE and uses it for - regular expressions. This fixes many form validation bugs: - - - fixed 3103197 - javascript at fidelity.com rejects valid input - - fixed 2942552 - form validation at weather.com fails - - fixed 3079752 - js always reports textarea is empty - - fixed 3079719 - covad.com "check availalbility" fails - - * Makefile.am: Add pcre subdir. - * kjs/config.h: define HAVE_PCREPOSIX to true. - * kjs/regexp.h: Don't include pcreposix.h since nothing from there - is used. - * pcre/.cvsignore: Added. - * pcre/ChangeLog: Removed. - * pcre/INSTALL: Removed. - * pcre/Makefile.am: Added. - * pcre/Makefile.in: Removed. - * pcre/NEWS: Removed. - * pcre/NON-UNIX-USE: Removed. - * pcre/README: Removed. - * pcre/chartables.c: Added. - * pcre/config.guess: Removed. - * pcre/config.in: Removed. - * pcre/config.sub: Removed. - * pcre/configure: Removed. - * pcre/configure.in: Removed. - * pcre/dll.mk: Removed. - * pcre/doc/Tech.Notes: Removed. - * pcre/doc/pcre.3: Removed. - * pcre/doc/pcre.html: Removed. - * pcre/doc/pcre.txt: Removed. - * pcre/doc/pcregrep.1: Removed. - * pcre/doc/pcregrep.html: Removed. - * pcre/doc/pcregrep.txt: Removed. - * pcre/doc/pcreposix.3: Removed. - * pcre/doc/pcreposix.html: Removed. - * pcre/doc/pcreposix.txt: Removed. - * pcre/doc/pcretest.1: Removed. - * pcre/doc/pcretest.html: Removed. - * pcre/doc/pcretest.txt: Removed. - * pcre/doc/perltest.txt: Removed. - * pcre/install-sh: Removed. - * pcre/ltmain.sh: Removed. - * pcre/pcre-config.h: Added. - * pcre/pcre-config.in: Removed. - * pcre/internal.h: Include pcre-config.h instead of config.h - * pcre/pcre.c: - (ord2utf8): Fix warnings. - (pcre_compile): Fix warnings. - * pcre/pcre.def: Removed. - * pcre/pcre.h: Added. - * pcre/pcre.in: Removed. - * JavaScriptCore.pbproj/project.pbxproj: Added pcre files to build. - * JavaScriptCorePrefix.h: Guard c++ headers with #ifdef __cplusplus. - -2002-12-04 Maciej Stachowiak - - Reviewed by: Richard Williamson - - * pcre/doc/*: Added. - * pcre/testdata/*: Added. - -2002-12-03 Maciej Stachowiak - - Reviewed by: Darin Adler - - - imported PCRE 3.9 into the tree; this isn't actually compiled or - used yet. - - * pcre/*: Added. - -== Rolled over to ChangeLog-2002-12-03 == diff --git a/ChangeLog-2007-10-14 b/ChangeLog-2007-10-14 deleted file mode 100644 index 693f966..0000000 --- a/ChangeLog-2007-10-14 +++ /dev/null @@ -1,26221 +0,0 @@ -=== Start merge of feature-branch 2007-10-12 === - -2007-10-11 Andrew Wellington - - Reviewed by Eric Seidel. - - Fix for http://bugs.webkit.org/show_bug.cgi?id=15076 - "deg2rad has multiple definitions" - - Define deg2rad, rad2deg, deg2grad, grad2deg, rad2grad, grad2rad - These are used through WebKit. - - Change based on original patch by Rob Buis. - - * wtf/MathExtras.h: - (deg2rad): - (rad2deg): - (deg2grad): - (grad2deg): - (rad2grad): - (grad2rad): - -2007-10-10 Maciej Stachowiak - - Reviewed by Eric. - - - fix assertion failures on quit. - - * kjs/array_object.cpp: - (ArrayProtoFunc::callAsFunction): Dynamically alocate function-scope static - UStrings to avoid the static destructor getting called later. - * kjs/lookup.h: Dynamically alocate function-scope static - Identifiers to avoid the static destructor getting called later. - -2007-10-07 Ed Schouten - - Reviewed and landed by Alexey Proskuryakov. - - Add PLATFORM(FREEBSD), so we can fix the build on FreeBSD-like - systems by including . Also fix some (disabled) - regcomp()/regexec() code; it seems some variable names have - changed. - - * kjs/config.h: - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): - * wtf/Platform.h: - -2007-10-02 Alexey Proskuryakov - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=10370 - RegExp fails to match non-ASCII characters against [\S\s] - - Test: fast/js/regexp-negative-special-characters.html - - * pcre/pcre_compile.c: - (compile_branch): Adjust opcode and bitmap as necessary to include (or exclude) - character codes >255. Fix suggested by Philip Hazel. - - * pcre/pcre_exec.c: - (match): Merged fix for PCRE bug 580 (\S\S vs. \S{2}). - - * tests/mozilla/expected.html: One test was fixed. - * pcre/MERGING: Added information about this fix. - -2007-10-02 Maciej Stachowiak - - Reviewed by Oliver. - - - skip extra hash lookup and avoid converting char* to UString for 19% speedup on CK JS array test - http://bugs.webkit.org/show_bug.cgi?id=15350 - - * kjs/array_object.cpp: - (ArrayProtoFunc::callAsFunction): Implement the two mentioned optimizations. - -2007-10-02 Maciej Stachowiak - - Reviewed by Mark. - - - Efficiently handle regexp property identifiers for 19% speedup on Celtic Kane regexp test - http://bugs.webkit.org/show_bug.cgi?id=15337 - - * kjs/CommonIdentifiers.h: - * kjs/regexp_object.cpp: - (RegExpProtoFunc::callAsFunction): - (RegExpObjectImp::arrayOfMatches): - (RegExpObjectImp::construct): - -2007-10-02 Maciej Stachowiak - - Reviewed by Mark. - - - Cache global prorotypes more efficiently for 10% speedup on CK AJAX benchmark - http://bugs.webkit.org/show_bug.cgi?id=15335 - - * kjs/lookup.h: - -2007-10-01 Oliver Hunt - - Reviewed by Mark. - - Enable Experimental SVG features by default when building from Xcode - - * Configurations/JavaScriptCore.xcconfig: - -2007-09-29 Rob Buis - - Reviewed by Adam. - - http://bugs.webkit.org/show_bug.cgi?id=13472 - Misparsing date in javascript leads to year value of -1 - http://bugs.webkit.org/show_bug.cgi?id=14176 - Some date values not handled consistently with IE/Firefox - - Allow an optional comma between month and year, and year and time. - - * kjs/date_object.cpp: - (KJS::parseDate): - -2007-07-11 Nikolas Zimmermann - - Reviewed by Mark. - - Forwardport the hash table fix from CodeGeneratorJS.pm to create_hash_table. - Reran run-jsc-tests, couldn't find any regressions. Suggested by Darin. - - * kjs/create_hash_table: - -2007-06-25 Antti Koivisto - - Reviewed by Maciej. - - Use intHash to hash floats and doubles too. - - * ChangeLog: - * wtf/HashFunctions.h: - (WTF::FloatHash::hash): - (WTF::FloatHash::equal): - (WTF::): - * wtf/HashTraits.h: - (WTF::FloatHashTraits::emptyValue): - (WTF::FloatHashTraits::deletedValue): - (WTF::): - -=== End merge of feature-branch 2007-10-12 === - -2007-10-11 Mark Rowe - - Reviewed by Tim Hatcher. - - Fix for . Disable debugging symbols in production builds for 10.4 - PowerPC to prevent a huge STABS section from being generated. - - * Configurations/Base.xcconfig: - -2007-10-08 George Staikos - - Reviewed by Adam Roben. - - Fix Qt build on Win32. - - * kjs/testkjs.cpp: - (main): - -2007-10-10 Simon Hausmann - - Reviewed by Lars. - - Fix compilation using gcc 4.3. Header files have been reorganized and as a result some extra - includes are needed for INT_MAX, std::auto_ptr and the like. - - * kjs/collector.cpp: - * kjs/collector.h: - * kjs/lexer.cpp: - * kjs/scope_chain.cpp: - * kjs/ustring.cpp: - * wtf/Vector.h: - -2007-10-09 Lars Knoll - - Reviewed by Simon. - - fix the invokation of slots with return types. Add a JSLock around the conversion from QVariant to JSValue. - - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtInstance::invokeMethod): - * bindings/qt/qt_runtime.cpp: - (KJS::Bindings::convertValueToQVariant): - (KJS::Bindings::convertQVariantToValue): - -2007-10-05 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added JSObject::removeDirect, to support the fix for - REGRESSION: With JavaScript disabled, any - page load causes a crash in PropertyMap::put - - * kjs/object.cpp: - (KJS::JSObject::removeDirect): - * kjs/object.h: - -2007-10-04 Mark Rowe - - Reviewed by Oliver. - - Switch to default level of debugging symbols to resolve . - The "full" level appears to offer no observable benefits even though the documentation - suggests it be used for dead code stripping. This should also decrease link times. - - * Configurations/Base.xcconfig: - -2007-10-03 Lars Knoll - - Reviewed by Rob. - - Fix a stupid bug in Unicode::toUpper/toLower. - Fixes all three test failures in the JavaScriptCore test - suite. - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - -2007-10-02 Darin Adler - - Reviewed by Adam. - - - add support for GDI objects to OwnPtr; I plan to use this - to fix some GDI handle leaks - - * kjs/grammar.y: Change parser to avoid macros that conflict - with macros defined in Windows system headers: THIS, DELETE, - VOID, IN, and CONST. This is needed because OwnPtr.h will now - include . - * kjs/keywords.table: Ditto. - - * wtf/OwnPtr.h: For PLATFORM(WIN), add support so that OwnPtr can be - a GDI handle, and it will call DeleteObject. Also change to use the - RemovePointer technique used by RetainPtr, so you can say OwnPtr - rather than having to pass in the type pointed to by HBITMAP. - - * wtf/OwnPtrWin.cpp: Added. - (WebCore::deleteOwnedPtr): Put this in a separate file so that we - don't have to include in OwnPtr.h. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OwnPtrWin.cpp. - -2007-09-29 Holger Hans Peter Freyther - - Reviewed by Mark. - - -Fix http://bugs.webkit.org/show_bug.cgi?id=13226. - Remove Bakefiles from svn. - - * JavaScriptCoreSources.bkl: Removed. - * jscore.bkl: Removed. - -2007-09-27 Kevin Decker - - Rubber stamped by John Sullivan. - - - - * JavaScriptCore.order: Added. - * JavaScriptCore.xcodeproj/project.pbxproj: We're changing from using an order file built by - another team to using one we actually check into our project repository. Linker settings for - Symbol Ordering Flags have been updated accordingly. - -2007-09-26 Adam Roben - - Make testkjs delay-load WebKit.dll so WebKitInitializer can work its magic - - Rubberstamped by Anders. - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2007-09-25 Adam Roben - - Make testkjs delay-load its dependencies - - This lets WebKitInitializer re-route the dependencies to be loaded out - of the Safari installation directory. - - Rubberstamped by Sam. - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2007-09-25 David Kilzer - - Reviewed by Adam. - - - Fix http://bugs.webkit.org/show_bug.cgi?id=14885 - LGPL'ed files contain incorrect FSF address - - * COPYING.LIB: - * bindings/testbindings.cpp: - * kjs/AllInOneFile.cpp: - * kjs/DateMath.cpp: - * kjs/PropertyNameArray.cpp: - * kjs/PropertyNameArray.h: - * kjs/config.h: - -2007-09-25 Sam Weinig - - Fix location for build products for Debug_Internal. - - Reviewed by Adam Roben. - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2007-09-25 Adam Roben - - Make testkjs use WebKitInitializer - - Reviewed by Sam. - - * JavaScriptCore.vcproj/JavaScriptCore.sln: Add WebKitInitializer and - make testkjs depend on it. - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Link against - WebKitInitializer.lib. - * kjs/testkjs.cpp: - (main): Call initializeWebKit. - -2007-09-24 Kevin McCullough - - Reviewed by Sam. - - - Continued to update project files to not use Edit and Continue for Debug Information since it doesn't work and breaks some functionality. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2007-09-21 Kevin McCullough - - Reviewed by Sam. - - - Updated project files to not use Edit and Continue for Debug Information since it doesn't work and breaks some functionality. - - * JavaScriptCore.vcproj/dftables/dftables.vcproj: - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2007-09-20 Holger Hans Peter Freyther - - Rubber stamped by Adam. - - Renamed files from *Gdk to *Gtk (see #14732) using the - work of Juan A. Suarez Romero as a base. - - GDK -> GTK - - * JavaScriptCore.pri: - * kjs/testkjs.pro: - * pcre/dftables.pro: - * wtf/Platform.h: PLATFORM(GDK) to PLATFORM(GTK) - -2007-09-21 Mark Rowe - - Reviewed by Antti Koivisto. - - http://bugs.webkit.org/show_bug.cgi?id=15250 - REGRESSION: Reproducible crash in Safari when evaluating script in Drosera console (15250) - - * kjs/function.cpp: - (KJS::GlobalFuncImp::callAsFunction): Null-check thisObj before passing it to interpreterForGlobalObject. - -2007-09-19 Holger Hans Peter Freyther - - Rubber stamped by Adam. - - Make the guard/#if use the same name (ENABLE_FTPDIR) as the #define. This follows - the ENABLE_ICONDATABASE example from a couple of lines above. - - * wtf/Platform.h: - -2007-09-19 Mark Rowe - - Reviewed by Maciej. - - NULL dereference crash in FastMallocZone::enumerate when running leaks against Safari - - Storing remote pointers to their local equivalents in mapped memory was leading to the local pointer being - interpreted as a remote pointer. This caused a crash when using the result of mapping this invalid remote pointer. - The fix is to follow the pattern used elsewhere in FastMallocZone by always doing the mapping after reading and - never storing the mapped pointer. - - * wtf/FastMalloc.cpp: - (WTF::FastMallocZone::enumerate): - -2007-09-15 Darin Adler - - - fix Mac build - - * JavaScriptCore.exp: Export WTFLogVerbose. - -2007-09-14 Kevin McCullough - - Reviewed by Sam. - - - Copy JSRetainPtr to include folder. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2007-09-13 Geoffrey Garen - - Try to fix GDK build. - - * wtf/MathExtras.h: - (wtf_random_init): - -2007-09-12 Geoff Garen - - Reviewed by Sam Weinig. - - Fixed 141885 Safari JavaScript: Math.random() slightly less randomly distributed than on Safari / Mac - - Math.random was skewed slightly upward because it assumed that RAND_MAX was outside the range of - values that rand() might return. This problem was particularly pronounced on Windows because - the range of values returned by rand() on Windows is 2^16 smaller than the range of values - return by rand() on Mac. - - Fixed by accounting for RAND_MAX return values. Also, switched Windows over to rand_s, which has - a range that's equal to rand()'s range on Mac. - - * kjs/config.h: - - * kjs/math_object.cpp: - (MathFuncImp::callAsFunction): Use the new new thing. - - * wtf/MathExtras.h: Platform abstraction for random numbers, to cover over differences on Windows. - (wtf_random_init): - (wtf_random): - -2007-09-13 Antti Koivisto - - Reviewed by Maciej. - - Small addition to previous path to cover - http://bugs.webkit.org/show_bug.cgi?id=11399 - window.eval runs in the global scope of the calling window - - Switch variable scope as well. - - * kjs/function.cpp: - (KJS::GlobalFuncImp::callAsFunction): - -2007-09-12 Antti Koivisto - - Reviewed by Geoff, Maciej. - - Fix - REGRESSION: Unable to upload picture to eBay auction due to domain security check - - eBay uses window.eval() between windows. In Firefox window.eval() switches execution - and security context to the target window, something WebKit did not do. With WebKit - security tightening in r24781, this broke picture uploads. - - Fix by making WebKit switch context in window.eval(). - - * kjs/Context.cpp: - (KJS::Context::Context): - (KJS::Context::~Context): - * kjs/context.h: - Save and restore interpreter context independently from calling context. - - * kjs/function.cpp: - (KJS::GlobalFuncImp::callAsFunction): - If eval is called for global object different than current one, switch execution context - to that object and push it to scope. - -2007-09-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - JSStringCreateWithCFString leaks when passed a zero length CFStringRef - - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): Special case the zero length string and remove the - UTF16 optimized path since it will always leak due to the fact that we won't be - able to free the backing store that the CFStringRef provides. - -2007-09-10 Timothy Hatcher - - Reviewed by Darin Adler. - - CrashTracer: [USER] 2 crashes in Toast Titanium at com.apple.CoreServices.CarbonCore: CSMemDisposePtr + 37 - - Removed the implementation of these malloc zone functions. We do not have the ability to - check if a pointer is valid or not, so we can't correctly implement them. The system free - does not fail if you pass in a bad pointer. - - * wtf/FastMalloc.cpp: - (WTF::FastMallocZone::size): - (WTF::FastMallocZone::zoneMalloc): - (WTF::FastMallocZone::zoneCalloc): - (WTF::FastMallocZone::zoneFree): - (WTF::FastMallocZone::zoneRealloc): - -2007-09-07 Darin Adler - - Reviewed by Steve Falkenburg. - - - fix crash seen on Windows release builds - - * wtf/FastMalloc.cpp: Change pthread_getspecific optimization to be done only - on the DARWIN platform. Also correct a couple reinterpret_cast that should be - static_cast instead. - -2007-09-06 Kevin McCullough - - Reviewed by Maciej. - - - Moved JSRetainPtr to the API. - - * API/JSRetainPtr.h: Copied from kjs/JSRetainPtr.h. - (JSRetain): - (JSRelease): - (JSRetainPtr::JSRetainPtr): - (JSRetainPtr::~JSRetainPtr): - (JSRetainPtr::get): - (JSRetainPtr::releaseRef): - (JSRetainPtr::operator->): - (JSRetainPtr::operator!): - (JSRetainPtr::operator UnspecifiedBoolType): - (::operator): - (::adopt): - (::swap): - (swap): - (operator==): - (operator!=): - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/JSRetainPtr.h: Removed. - -2007-09-05 Maciej Stachowiak - - Reviewed by Darin. - - - Remove single-threaded optimization for FastMalloc. - - It does not appear to help anywhere but Mac OS X on PPC, due to - pthread_getspecific being slow there. On Intel, removing the - optimization results in a ~1.5% PLT speedup, a ~1-5% JS iBench - speedup, and a ~1.5% HTML iBench speedup. On PPC this change is a - speedup on some benchmarks, a slight hit on others. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/collector.cpp: - (KJS::Collector::registerThread): - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_ThreadCache::GetCache): - (WTF::TCMalloc_ThreadCache::GetCacheIfPresent): - (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): - (WTF::do_malloc): - * wtf/FastMallocInternal.h: Removed. - -2007-09-05 Kevin McCullough - - Reviewed by Adam, Sam, Darin. - - - Created a JSRetainPtr specifically for JSStringRefs so they can be automatically refed and derefed. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/JSRetainPtr.h: Copied from wtf/RetainPtr.h. - (KJS::JSRetain): - (KJS::JSRelease): - (KJS::): - (KJS::JSRetainPtr::JSRetainPtr): - (KJS::JSRetainPtr::~JSRetainPtr): - (KJS::JSRetainPtr::get): - (KJS::JSRetainPtr::releaseRef): - (KJS::JSRetainPtr::operator->): - (KJS::JSRetainPtr::operator UnspecifiedBoolType): - (KJS::::operator): - (KJS::::adopt): - (KJS::::swap): - (KJS::swap): - (KJS::operator==): - (KJS::operator!=): - -2007-09-05 Mark Rowe - - Unreviewed Qt build fix. - - * wtf/unicode/qt4/UnicodeQt4.h: Fix the constness of the src argument to toUpper to prevent build failures. - -2007-09-04 Maciej Stachowiak - - Back out accidentally committed change. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/collector.cpp: - (KJS::Collector::registerThread): - * wtf/FastMalloc.cpp: - (WTF::fastMallocSetIsMultiThreaded): - (WTF::TCMalloc_ThreadCache::GetCache): - (WTF::TCMalloc_ThreadCache::GetCacheIfPresent): - (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): - (WTF::do_malloc): - * wtf/FastMallocInternal.h: Added. - -2007-09-04 Maciej Stachowiak - - Reviewed by Darin. - - - Added Vector::appendRange(), which appends to a vector based on a given start and end iterator - - Added keys() and values() functions to HashMap iterators, which give keys-only and values-only iterators - - Together, these allow easy copying of a set, or the keys or values of a map, into a Vector. Examples: - - HashMap map; - HashSet set; - Vector vec; - // ... - vec.appendRange(set.begin(), set.end()); - vec.appendRange(map.begin().keys(), map.end().keys()); - vec.appendRange(map.begin().values(), map.end().values()); - - This also allows for a slightly nicer syntax when iterating a map. Instead of saying - (*it)->first, you can say *it.values(). Similarly for keys. Example: - - HashMap::const_iterator end = map.end(); - for (HashMap::const_iterator it = map.begin(); it != end; ++it) - printf(" [%d => %d]", *it.keys(), *it.values()); - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/HashIterators.h: Added. - (WTF::): - (WTF::HashTableConstKeysIterator::HashTableConstKeysIterator): - (WTF::HashTableConstKeysIterator::get): - (WTF::HashTableConstKeysIterator::operator*): - (WTF::HashTableConstKeysIterator::operator->): - (WTF::HashTableConstKeysIterator::operator++): - (WTF::HashTableConstValuesIterator::HashTableConstValuesIterator): - (WTF::HashTableConstValuesIterator::get): - (WTF::HashTableConstValuesIterator::operator*): - (WTF::HashTableConstValuesIterator::operator->): - (WTF::HashTableConstValuesIterator::operator++): - (WTF::HashTableKeysIterator::HashTableKeysIterator): - (WTF::HashTableKeysIterator::get): - (WTF::HashTableKeysIterator::operator*): - (WTF::HashTableKeysIterator::operator->): - (WTF::HashTableKeysIterator::operator++): - (WTF::HashTableKeysIterator::operator HashTableConstKeysIterator): - (WTF::HashTableValuesIterator::HashTableValuesIterator): - (WTF::HashTableValuesIterator::get): - (WTF::HashTableValuesIterator::operator*): - (WTF::HashTableValuesIterator::operator->): - (WTF::HashTableValuesIterator::operator++): - (WTF::HashTableValuesIterator::operator HashTableConstValuesIterator): - (WTF::operator==): - (WTF::operator!=): - * wtf/HashTable.h: - * wtf/Vector.h: - (WTF::::appendRange): - -2007-09-04 Maciej Stachowiak - - Reviewed by Darin. - - - Remove single-threaded optimization for FastMalloc. - - It does not appear to help anywhere but Mac OS X on PPC, due to - pthread_getspecific being slow there. On Intel, removing the - optimization results in a 1% PLT speedup, a 2% JS iBench speedup, - and no measurable effect on HTML iBench (maybe a slight speedup). - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/collector.cpp: - (KJS::Collector::registerThread): - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_ThreadCache::GetCache): - (WTF::TCMalloc_ThreadCache::GetCacheIfPresent): - (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): - (WTF::do_malloc): - * wtf/FastMallocInternal.h: Removed. - -2007-09-03 Mark Rowe - - Reviewed by Tim Hatcher. - - Production build with in symbols directory has no debug info - - Enable debug symbol generation on all build configurations. Production builds are stripped - of symbols by Xcode during deployment post-processing. - - * Configurations/Base.xcconfig: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-08-30 Riku Voipio - - Reviewed by Dave Kilzer. - - Better ARM defines. - - * kjs/ustring.h: Update comments to reflect the change and update test - to fit changes to Platform.h. - * wtf/Platform.h: Forced packing is only needed on oldabi ARM. - Set middle-endian floats only for little-endian oldabi ARM. - Set big-endian define for big-endian ARM. - -2007-08-29 Ryan Leavengood - - Reviewed by Maciej. - - http://bugs.webkit.org/show_bug.cgi?id=15043 - - posix_memalign takes a void** as its first parameter. My port makes use of this function call. - - * kjs/collector.cpp: - (KJS::allocateBlock): - -2007-08-26 Darin Adler - - - quick follow on to that last check-in - - * API/JSCallbackObject.cpp: (KJS::JSCallbackObject::JSCallbackObject): - Need to initialize m_class to 0. - -2007-08-26 Mark Rowe - - Reviewed by Darin Adler. - - JSGlobalContextCreate can cause crashes because it passes a NULL JSContextRef to the globalObjectClass's initialize callback - - JSCallbackObject now tracks whether it was constructed with a null ExecState. This will happen when the object is being used as the global object, - as the Interpreter needs to be created after the global object. In this situation the initialization is deferred until after the Interpreter's - ExecState is available to be passed down to the initialize callbacks. - - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::init): Track whether we successfully initialized. - (KJS::JSCallbackObject::initializeIfNeeded): Attempt to initialize with the new ExecState. - * API/JSCallbackObject.h: - * API/JSContextRef.cpp: - (JSGlobalContextCreate): Initialize the JSCallbackObject with the Interpreter's ExecState. - * API/testapi.c: - (testInitializeOfGlobalObjectClassHasNonNullContext): - (main): Verify that the context passed to the initialize callback is non-null. - -2007-08-26 Mark Rowe - - Reviewed by Darin Adler. - - JSGlobalContextCreate crashes when passed a custom class - - * API/JSContextRef.cpp: - (JSGlobalContextCreate): Specify jsNull() as the prototype and let Interpreter's constructor fix it up to point at builtinObjectPrototype(). - * API/testapi.c: - (main): Use an instance of a custom class as the global object to ensure the code path is exercised in the test. - -2007-08-26 Mike Hommey - - Reviewed by Mark Rowe and David Kilzer. - - Fix build failure on arm. - - * wtf/Platform.h: Also test if __arm__ is defined. - -2007-08-25 Peter Kasting - - Reviewed by Maciej Stachowiak. - - Part 3 of http://bugs.webkit.org/show_bug.cgi?id=14967 - Bug 14967: Reduce wtf::Vector::operator[]() overloads - - * wtf/Vector.h: - (WTF::Vector::operator[]): Only provide versions of operator[] that takes a size_t argument. - -2007-08-25 Peter Kasting - - Reviewed by Sam Weinig. - - Part 2 of http://bugs.webkit.org/show_bug.cgi?id=14967. - Eliminate all remaining implicit conversions of wtf::Vector to T*. Where code was - previously checking that the Vector's data pointer was non-NULL, check !Vector::isEmpty() - instead. - - * wtf/Vector.h: - (WTF::Vector::data): - -2007-08-16 Kevin McCullough - - Reviewed by Geoff and Adam. - - - Changing stack depth to 500 (from 100 on mac and win) to help out some apps specifically gmail. JavaScript call stack limit of 99 is too small for some applications; needs to be closer to 500 (4045) - - * kjs/object.cpp: - -2007-08-15 Peter Kasting - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=14967 part 1 - Eliminate most implicit - conversions of wtf::Vector to T* by explicitly calling .data() - - * API/JSCallbackConstructor.cpp: - (KJS::JSCallbackConstructor::construct): - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::callAsFunction): - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::construct): - (KJS::JSCallbackObject::callAsFunction): - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::invokeMethod): - (KJS::Bindings::CInstance::invokeDefaultMethod): - * kjs/number_object.cpp: - (integer_part_noexp): - (char_sequence): - * kjs/ustring.cpp: - (KJS::UString::UTF8String): - -2007-08-14 Darin Adler - - Reviewed by Sam. - - - fix Global initializer introduced by use of std::numeric_limits in r24919 - - * kjs/ustring.cpp: - (KJS::overflowIndicator): Turned into a function. - (KJS::maxUChars): Ditto. - (KJS::allocChars): Use the functions. - (KJS::reallocChars): Ditto. - (KJS::UString::expandedSize): Ditto. - -2007-08-12 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=14931 - JavaScript regular expression non-participating capturing parentheses - fail in 3 different ways - - Test: fast/js/regexp-non-capturing-groups.html - - * kjs/string_object.cpp: - (KJS::replace): Add missing code to handle undefined backreferences; before we'd get the empty string - instead of a JavaScript "undefined" value. - (KJS::StringProtoFunc::callAsFunction): Implemented backreference support for split. - * pcre/pcre_exec.c: (match): Made backreferences to undefined groups match the empty string instead - of always failing. Only in JAVASCRIPT mode. - - * tests/mozilla/expected.html: Add a new expected test success, since this fixed one test result. - -2007-08-10 Timothy Hatcher - - Reviewed by Adam. - - Stop using some Carbon UI APIs for 64 bit - - Disable the NPAPI for 64-bit on Mac OS X. - - * Configurations/JavaScriptCore.xcconfig: Use the 64-bit export file. - * JavaScriptCore.xcodeproj/project.pbxproj: Create a 64-bit export file - that filters out the NPN fnctions. - * bindings/NP_jsobject.cpp: #ifdef out this for 64-bit on Mac OS X - * bindings/NP_jsobject.h: Ditto. - * bindings/c/c_class.cpp: Ditto. - * bindings/c/c_class.h: Ditto. - * bindings/c/c_instance.cpp: Ditto. - * bindings/c/c_instance.h: Ditto. - * bindings/c/c_runtime.cpp: Ditto. - * bindings/c/c_runtime.h: Ditto. - * bindings/c/c_utility.cpp: Ditto. - * bindings/c/c_utility.h: Ditto. - * bindings/npapi.h: Ditto. - * bindings/npruntime.cpp: Ditto. - * bindings/npruntime.h: Ditto. - * bindings/npruntime_impl.h: Ditto. - * bindings/npruntime_priv.h: Ditto. - * bindings/runtime.cpp: - (KJS::Bindings::Instance::createBindingForLanguageInstance): - don't creat an NPObject on Mac OS X in 64-bit. - -2007-08-09 Mark Rowe - - Reviewed by Antti. - - Versioning in debug and release builds should include minor and tiny version before + - - * Configurations/Version.xcconfig: - * JavaScriptCore.xcodeproj/project.pbxproj: Add a shell script phase to make to dependency between - Version.xcconfig and Info.plist explicit to Xcode. - -2007-08-08 George Staikos - - Make it compile with Qt again. - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::toUpper): - -2007-08-07 Sam Weinig - - Reviewed by Oliver. - - Fix for http://bugs.webkit.org/show_bug.cgi?id=14897 - Decompilation of double negation fails and produces invalid or incorrect code - - Test: fast/js/function-decompilation-operators.html - - * kjs/nodes2string.cpp: - (UnaryPlusNode::streamTo): Put space after unary operator. Matches Firefox. - (NegateNode::streamTo): Diito. - (MultNode::streamTo): Put spaces around binary operator. Matches Firefox. - (AddNode::streamTo): Ditto. - -2007-08-07 Darin Adler - - Reviewed by Adele. - - - fix REGRESSION: XHR.responseText is null instead of empty string - in http/tests/xmlhttprequest/zero-length-response.html - - The new code to handle out of memory conditions was turning a "" into a null string. - - * kjs/ustring.h: Removed UCharReference, which has long been obsolete and unused. - Removed copyForWriting, which was only used for the upper/lowercasing code and for - UCharReference. - * kjs/ustring.cpp: - (KJS::allocChars): Removed special case that made this fail (return 0) when passed 0. - Instead assert that we're not passed 0. Also added an overflow check for two reasons: - 1) for sizes that aren't checked this prevents us from allocating a buffer that's too - small, and 2) for sizes where we overflowed in the expandedSize function and returned - overflowIndicator, it guarantees we fail. - (KJS::reallocChars): Ditto. - (KJS::UString::expandedSize): Return a large number, overflowIndicator, rather than 0 - for cases where we overflow. - (KJS::UString::spliceSubstringsWithSeparators): Added a special case for empty string so - we don't call allocChars with a length of 0. - (KJS::UString::operator=): Added special characters for both 0 and empty string so we - match the behavior of the constructor. This avoids calling allocChars with a length of 0 - and making a null string rather than an empty string in that case, and also matches the - pattern used in the rest of the functions. - (KJS::UString::operator[]): Made the return value const so code that tries to use the - operator to modify the string will fail. - - * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction): Rewrote uppercasing and - lowercasing functions so they don't need copyForWriting any more -- it wasn't really doing - any good for optimization purposes. Instead use a Vector and releaseBuffer. - - * wtf/unicode/icu/UnicodeIcu.h: Eliminate one of the versions of toLower/toUpper -- we now - only need the version where both a source and destination buffer is passed in, not the one - that works in place. - * wtf/unicode/qt4/UnicodeQt4.h: Ditto. - -2007-08-06 Sam Weinig - - Reviewed by Oliver. - - Fix for http://bugs.webkit.org/show_bug.cgi?id=14891 - Decompilation of try block immediately following "else" fails - - Test: fast/js/toString-try-else.html - - * kjs/nodes2string.cpp: - (TryNode::streamTo): Add newline before "try". - -2007-08-07 Mark Rowe - - Reviewed by Maciej. - - REGRESSION: Hang occurs after clicking "Attach a file " link in a new .Mac message - - Attempting to acquire the JSLock inside CollectorHeap::forceLock can lead to a deadlock if the thread currently - holding the lock is waiting on the thread that is forking. It is not considered safe to use system frameworks - after a fork without first execing[*] so it is not particularly important to ensure that the collector and - fastMalloc allocators are unlocked in the child process. If the child process wishes to use JavaScriptCore it - should exec after forking like it would to use any other system framework. - [*]: - - * kjs/CollectorHeapIntrospector.cpp: Remove forceLock and forceUnlock implementations. - * kjs/CollectorHeapIntrospector.h: Stub out forceLock and forceUnlock methods. - * wtf/FastMalloc.cpp: Ditto. - -2007-08-06 Darin Adler - - Rubber stamped by Geoff. - - * kjs/ustring.h: Added an assertion which would have helped us find the - previous bug more easily. - -2007-08-06 Darin Adler - - Reviewed by Anders. - - - fix 9A514: Quartz Composer crash on launch in KJS::jsString - - * API/JSBase.cpp: - (JSEvaluateScript): Turn NULL for sourceURL into UString::null(), just as JSObjectMakeFunction already does. - (JSCheckScriptSyntax): Ditto. - -2007-08-06 Matt Lilek - - Not reviewed, build fix. - - * kjs/string_object.cpp: - (KJS::StringProtoFunc::callAsFunction): - -2007-08-04 Darin Adler - - Reviewed by Maciej. - - - fix crash in Dashcode due to Quartz Composer JavaScript garbage collector reentrancy - - * API/JSBase.cpp: (JSGarbageCollect): Don't call collector() if isBusy() returns true. - - * kjs/collector.h: Added isBusy(), removed the unused return value from collect() - * kjs/collector.cpp: Added an "operation in progress" flag to the allocator. - (KJS::Collector::allocate): Call abort() if an operation is already in progress. Set the new flag instead - of using the debug-only GCLock. - (KJS::Collector::collect): Ditto. - (KJS::Collector::isBusy): Added. - -2007-08-04 Maciej Stachowiak - - Reviewed by Darin and Adam. - - REGRESSION: newsgator.com sign-on 6x slower than Safari 3 beta due to GC changes (14808) - - * kjs/string_object.cpp: - (KJS::replace): if the string didn't change (very common in some cases) reuse the original string value. - (KJS::StringProtoFunc::callAsFunction): Pass in the StringImp* when replacing, not just the UString. - * kjs/string_object.h: - (KJS::StringInstance::internalValue): covariant override to return StringImp for convenience - -2007-08-04 Mark Rowe - - Reviewed by Oliver Hunt. - - r24843 introduces a crash on calling fork() (14878) - http://bugs.webkit.org/show_bug.cgi?id=14878 - - Provide no-op functions for all members of the malloc_zone_t and malloc_introspection_t structures that we - register to avoid crashes in system code that assumes they will be non-null. - - * kjs/CollectorHeapIntrospector.cpp: - (KJS::CollectorHeapIntrospector::CollectorHeapIntrospector): - (KJS::CollectorHeapIntrospector::forceLock): Grab the lock. - (KJS::CollectorHeapIntrospector::forceUnlock): Release the lock. - * kjs/CollectorHeapIntrospector.h: - (KJS::CollectorHeapIntrospector::goodSize): - (KJS::CollectorHeapIntrospector::check): - (KJS::CollectorHeapIntrospector::print): - (KJS::CollectorHeapIntrospector::log): - (KJS::CollectorHeapIntrospector::statistics): - (KJS::CollectorHeapIntrospector::size): - (KJS::CollectorHeapIntrospector::zoneMalloc): - (KJS::CollectorHeapIntrospector::zoneCalloc): - (KJS::CollectorHeapIntrospector::zoneFree): - * wtf/FastMalloc.cpp: - (WTF::FastMallocZone::goodSize): - (WTF::FastMallocZone::check): - (WTF::FastMallocZone::print): - (WTF::FastMallocZone::log): - (WTF::FastMallocZone::forceLock): Grab the TCMalloc locks. - (WTF::FastMallocZone::forceUnlock): Release the TCMalloc locks. - (WTF::FastMallocZone::FastMallocZone): - -2007-08-04 Mark Rowe - - Rubber-stamped by Anders. - - * pcre/pcre_compile.c: Remove non-ASCII character from a comment. - -2007-08-02 Mark Rowe - - Reviewed by Geoff Garen. - - 'leaks' reports false leaks in WebKit (because the WTF allocator uses mmap?) - - Implement malloc zone introspection routines to allow leaks, heap, and friends to request information - about specific memory regions that were allocated by FastMalloc or the JavaScriptCore collector. - - This requires tool-side support before the regions will be displayed. The addition of that support is - tracked by . - - * JavaScriptCore.exp: Export the two variables that are used by leaks to introspect the allocators. - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/AllInOneFile.cpp: - * kjs/CollectorHeapIntrospector.cpp: Added. - (KJS::): - (KJS::CollectorHeapIntrospector::init): - (KJS::CollectorHeapIntrospector::CollectorHeapIntrospector): Create and register our zone with the system. - (KJS::CollectorHeapIntrospector::enumerate): Iterate over the CollectorBlocks that are in use and report them to the caller as being used. - * kjs/CollectorHeapIntrospector.h: Added. - (KJS::CollectorHeapIntrospector::size): Return zero to indicate the specified pointer does not belong to this zone. - * kjs/collector.cpp: - (KJS::Collector::registerThread): Register the CollectorHeapIntrospector with the system when the first thread is registered with the collector. - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::GetDescriptorEnsureSafe): - (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Enumerate the objects on the free list. - (WTF::TCMalloc_ThreadCache::enumerateFreeObjects): Ditto. - (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Ditto. - (WTF::TCMalloc_ThreadCache::InitModule): Register the FastMallocZone with the system when initializing TCMalloc. - (WTF::FreeObjectFinder::FreeObjectFinder): - (WTF::FreeObjectFinder::visit): Add an object to the free list. - (WTF::FreeObjectFinder::isFreeObject): - (WTF::FreeObjectFinder::freeObjectCount): - (WTF::FreeObjectFinder::findFreeObjects): Find the free objects within a thread cache or free list. - (WTF::PageMapFreeObjectFinder::PageMapFreeObjectFinder): Find the free objects within a TC_PageMap. - (WTF::PageMapFreeObjectFinder::visit): Called once per allocated span. Record whether the span or any subobjects are free. - (WTF::PageMapMemoryUsageRecorder::PageMapMemoryUsageRecorder): - (WTF::PageMapMemoryUsageRecorder::visit): Called once per allocated span. Report the range of memory as being allocated, and the span or - its subobjects as being used if they do not appear on the free list. - (WTF::FastMallocZone::enumerate): Map the key remote TCMalloc data structures into our address space. We then locate all free memory ranges - before reporting the other ranges as being in use. - (WTF::FastMallocZone::size): Determine whether the given pointer originates from within our allocation zone. If so, - we return its allocation size. - (WTF::FastMallocZone::zoneMalloc): - (WTF::FastMallocZone::zoneCalloc): - (WTF::FastMallocZone::zoneFree): - (WTF::FastMallocZone::zoneRealloc): - (WTF::): - (WTF::FastMallocZone::FastMallocZone): Create and register our zone with the system. - (WTF::FastMallocZone::init): - * wtf/MallocZoneSupport.h: Added. - (WTF::RemoteMemoryReader::RemoteMemoryReader): A helper class to ease the process of mapping memory in a different process into - our local address space - (WTF::RemoteMemoryReader::operator()): - * wtf/TCPageMap.h: - (TCMalloc_PageMap2::visit): Walk over the heap and visit each allocated span. - (TCMalloc_PageMap3::visit): Ditto. - -2007-08-02 Mark Rowe - - Build fix. - - * kjs/ustring.cpp: - (KJS::UString::expandedSize): Use std::numeric_limits::max() rather than the non-portable SIZE_T_MAX. - -2007-08-02 Mark Rowe - - Reviewed by Maciej. - - "Out of memory" error during repeated JS string concatenation leaks hundreds of MBs of RAM - - A call to fastRealloc was failing which lead to UString::expandCapacity leaking the buffer it was trying to reallocate. - It also resulted in the underlying UString::rep having both a null baseString and buf field, which meant that attempting - to access the contents of the string after the failed memory reallocation would crash. - - A third issue is that expandedSize size was calculating the new length in a way that led to an integer overflow occurring. - Attempting to allocate a string more than 190,000,000 characters long would fail a the integer overflow would lead to a - memory allocation of around 3.6GB being attempted rather than the expected 390MB. Sizes that would lead to an overflow - are now returned as zero and callers are updated to treat this as though the memory allocation has failed. - - * kjs/array_object.cpp: - (ArrayProtoFunc::callAsFunction): Check whether the append failed and raise an "Out of memory" exception if it did. - * kjs/ustring.cpp: - (KJS::allocChars): Wrapper around fastMalloc that takes a length in characters. It will return 0 when asked to allocate a zero-length buffer. - (KJS::reallocChars): Wrapper around fastRealloc that takes a length in characters. It will return 0 when asked to allocate a zero-length buffer. - (KJS::UString::expandedSize): Split the size calculation in two and guard against overflow during each step. - (KJS::UString::expandCapacity): Don't leak r->buf if reallocation fails. Instead free the memory and use the null representation. - (KJS::UString::expandPreCapacity): If fastMalloc fails then use the null representation rather than crashing in memcpy. - (KJS::UString::UString): If calls to expandCapacity, expandPreCapacity or fastMalloc fail then use the null representation rather than crashing in memcpy. - (KJS::UString::append): Ditto. - (KJS::UString::operator=): Ditto. - * kjs/ustring.h: Change return type of expandedSize from int to size_t. - -2007-08-01 Darin Adler - - Reviewed by Kevin McCullough. - - - fix pointers to pieces of class definition passed to JSClassCreate should all be const - - * API/JSObjectRef.h: Added const. - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): Added const. - (OpaqueJSClass::create): Added const. - * API/JSObjectRef.cpp: - (JSClassCreate): Added const. - -2007-08-01 Steve Falkenburg - - Build mod: Fix sln to match configs in vcproj. - - Reviewed by Adam. - - * JavaScriptCore.vcproj/JavaScriptCore.make: - * JavaScriptCore.vcproj/JavaScriptCore.sln: - -2007-07-30 Simon Hausmann - - Done with and reviewed by Lars. - - Removed the __BUILDING_QT ifdef in JSStringRef.h and changed UChar for the Qt build to use wchar_t on Windows. - - * API/JSStringRef.h: - * wtf/unicode/qt4/UnicodeQt4.h: - -2007-07-27 Simon Hausmann - - Done with and reviewed by Lars and Zack. - - Always define JSChar to be unsigned short for the Qt builds, to ensure compatibility with UChar. - - * API/JSStringRef.h: - -2007-07-27 Simon Hausmann - - Done with and reviewed by Lars and Zack. - - Fix compilation with Qt on Windows with MingW: Implemented currentThreadStackBase() for this platform. - - * kjs/collector.cpp: - (KJS::currentThreadStackBase): - -2007-07-27 Simon Hausmann - - Done with and reviewed by Lars and Zack. - - Fix compilation with Qt on Windows with MingW: The MingW headers do not provide a prototype for a reentrant version of localtime. But since we don't use multiple threads for the Qt build we can use the plain localtime() function. - - * kjs/DateMath.cpp: - (KJS::getDSTOffsetSimple): - -2007-07-27 Simon Hausmann - - Done with and reviewed by Lars and Zack. - - Use $(MOVE) instead of mv to eliminated the shell dependency and replaced the long shell line to call bison and modify the css grammar file with a few lines of portable perl code. - - * JavaScriptCore.pri: - -2007-07-27 Simon Hausmann - - Done with and reviewed by Lars and Zack. - - Implemented currentTime() in the interpreter by using QDateTime, so that we don't need timeGetTime() on Windows and therefore also don't need to link against Winmm.dll. - - * kjs/interpreter.cpp: - (KJS::getCurrentTime): - * kjs/testkjs.cpp: - (StopWatch::start): - (StopWatch::stop): - -2007-07-27 Simon Hausmann - - Done with and reviewed by Lars and Zack. - - Replace the use of snprintf with QByteArray to compile under msvc 2005 express. - - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtInstance::stringValue): - -2007-07-27 Simon Hausmann - - Done with and reviewed by Lars and Zack. - - Don't use pthread.h unless thread support is enabled. - - * kjs/collector.cpp: - (KJS::Collector::registerAsMainThread): - (KJS::onMainThread): - -2007-07-27 Simon Hausmann - - Done with and reviewed by Lars and Zack. - - Removed TCSystemMalloc from the Qt build, it's not necessary it seems. - - * JavaScriptCore.pri: - -2007-07-27 Simon Hausmann - - Done with and reviewed by Lars and Zack. - - Added os-win32 to the include search path for the Qt windows build in order to provide the fake stdint.h header file. - - * JavaScriptCore.pri: - -2007-07-25 Maciej Stachowiak - - Reviewed by Mark. - - - follow-up to previous change - - * kjs/ustring.cpp: - (KJS::UString::operator=): Make sure to reset the length when - replacing the buffer contents for a single-owned string. - -2007-07-25 Maciej Stachowiak - - Reviewed by Darin. - - - JavaScriptCore part of fix for Optimize GC to reclaim big, temporary objects (like XMLHttpRequest.responseXML) quickly - - Also, as a side effect of optimizations included in this patch: - - 7% speedup on JavaScript iBench - - 4% speedup on "Celtic Kane" JS benchmark - - The basic idea is explained in a big comment in collector.cpp. When unusually - large objecs are allocated, we push the next GC closer on the assumption that - most objects are short-lived. - - I also did the following two optimizations in the course of tuning - this not to be a performance regression: - - 1) Change UString::Rep to hold a self-pointer as the baseString in - the unshared case, instead of a null pointer; this removes a - number of null checks in hot code because many places already - wanted to use the rep itself or the baseString as appropriate. - - 2) Avoid creating duplicate StringImpls when creating a - StringInstance (the object wrapper for a JS string) or calling - their methods. Since a temporary wrapper object is made every time - a string method is called, this resulted in two useless extra - StringImpls being allocated for no reason whenever a String method - was invoked on a string value. Now we bypass those. - - * kjs/collector.cpp: - (KJS::): - (KJS::Collector::recordExtraCost): Basics of the extra cost mechanism. - (KJS::Collector::allocate): ditto - (KJS::Collector::collect): ditto - * kjs/collector.h: - (KJS::Collector::reportExtraMemoryCost): ditto - * kjs/array_object.cpp: - (ArrayInstance::ArrayInstance): record extra cost - * kjs/internal.cpp: - (KJS::StringImp::toObject): don't create a whole new StringImpl just - to be the internal value of a StringInstance! StringImpls are immutable - so there's no point tot his. - * kjs/internal.h: - (KJS::StringImp::StringImp): report extra cost - * kjs/string_object.cpp: - (KJS::StringInstance::StringInstance): new version that takes a StringImp - (KJS::StringProtoFunc::callAsFunction): don't create a whole new StringImpl - just to convert self to string! we already have one in the internal value - * kjs/string_object.h: report extra cost - * kjs/ustring.cpp: All changes to handle baseString being self instead of null in the - unshared case. - (KJS::): - (KJS::UString::Rep::create): - (KJS::UString::Rep::destroy): - (KJS::UString::usedCapacity): - (KJS::UString::usedPreCapacity): - (KJS::UString::expandCapacity): - (KJS::UString::expandPreCapacity): - (KJS::UString::UString): - (KJS::UString::append): - (KJS::UString::operator=): - (KJS::UString::copyForWriting): - * kjs/ustring.h: - (KJS::UString::Rep::baseIsSelf): new method, now that baseString is - self instead of null in the unshared case we can't just null check. - (KJS::UString::Rep::data): adjusted as mentioned above - (KJS::UString::cost): new method to compute the cost for a UString, for - use by StringImpl. - - * kjs/value.cpp: - (KJS::jsString): style fixups. - (KJS::jsOwnedString): new method, use this for strings allocated from UStrings - held by the parse tree. Tracking their cost as part of string cost is pointless, - because garbage collecting them will not actually free the relevant string buffer. - * kjs/value.h: prototyped jsOwnedString. - * kjs/nodes.cpp: - (StringNode::evaluate): use jsOwnedString as appropriate - (RegExpNode::evaluate): ditto - (PropertyNameNode::evaluate): ditto - (ForInNode::execute): ditto - - * JavaScriptCore.exp: Exported some new symbols. - -2007-07-23 Anders Carlsson - - Reviewed by Geoff. - - REGRESSION: Unable to load JigZone puzzle - - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::createNative): - - Call RootObject::gcProtect on the global object, thereby putting it in the - "protect count" set which is used for checking if a native handle is valid. - -2007-07-23 Darin Adler - - * pcre/pcre_compile.c: Roll back a tiny accidental change in the unused !JAVASCRIPT - side of an #ifdef. This has no effect when using PCRE in JAVASCRIPT mode as we do, - but seems worth rolling back. - -2007-07-23 Maciej Stachowiak - - Reviewed by Oliver. - - - fix remaining problems with Window shadowing - - * kjs/nodes.cpp: - (VarDeclNode::evaluate): Tweak the special case a little. - -2007-07-23 Maciej Stachowiak - - Reviewed by Oliver. - - - fix Window shadowing regressions caused by the previous commit. - - * kjs/nodes.cpp: - (VarDeclNode::evaluate): Handle the case of global scope specially. - -2007-07-22 Maciej Stachowiak - - Reviewed by Darin. - - -fixed REGRESSION (r24287): 1% i-Bench JS slowdown from JavaScript compatibility fix (14719) - http://bugs.webkit.org/show_bug.cgi?id=14719 - - My fix for this actually resulted in JS iBench being 1% faster than before the regression - and the Celtic Kane benchmark being 5% faster than before the regression. - - * kjs/nodes.cpp: - (VarDeclNode::handleSlowCase): factored out the slow code path to be out of line. - (VarDeclNode::evaluate): I did a couple of things: - (1) Don't check if the variable is already declared by looking for the property in - the variable object, that code path was dead code. - (2) Special-case the common case where the top of the scope and the variable object - are the same; in that case the variable must always be in the variable object. - (3) Don't return a jsString() of the variable name, nothing uses the return value - from this node types evaluate method. - * kjs/nodes.h: - -2007-07-22 Darin Adler - - Reviewed by Kevin Decker. - - - fix REGRESSION: Crash after clicking back button in test application (13250) - http://bugs.webkit.org/show_bug.cgi?id=13250 - - * bindings/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue): - If the object returns 0 for _imp, convert that to "undefined", since callers - can't cope with a JSValue of 0. - -2007-07-19 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=10880 | - REGRESSION: JavaScript menu doesn't appear on pricepoint.com (14595) - - Though the ECMA spec says auto-semicolon insertion should not occur - without a newline or '}', Firefox treats do-while specially, and the - library used by pricepoint.com requires that special treatment. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/grammar.y: - -2007-07-19 Darin Adler - - Reviewed by Geoff. - - - fix PCRE computes wrong length for expressions with quantifiers - on named recursion or subexpressions - - It's challenging to implement proper preflighting for compiling these advanced features. - But we don't want them in the JavaScript engine anyway. - - Turned off the following features of PCRE (some of these are simply parsed and not implemented): - - \C \E \G \L \N \P \Q \U \X \Z - \e \l \p \u \z - [::] [..] [==] - (?#) (?<=) (?) - (?C) (?P) (?R) - (?0) (and 1-9) - (?imsxUX) - - Added the following: - - \u \v - - Because of \v, the js1_2/regexp/special_characters.js test now passes. - - To be conservative, I left some features that JavaScript doesn't want, such as - \012 and \x{2013}, in place. We can revisit these later; they're not directly-enough - related to avoiding the incorrect preflighting. - - I also didn't try to remove unused opcodes and remove code from the execution engine. - That could save code size and speed things up a bit, but it would require more changes. - - * kjs/regexp.h: - * kjs/regexp.cpp: (KJS::RegExp::RegExp): Remove the sanitizePattern workaround for - lack of \u support, since the PCRE code now has \u support. - - * pcre/pcre-config.h: Set JAVASCRIPT to 1. - * pcre/pcre_internal.h: Added ESC_v. - - * pcre/pcre_compile.c: Added a different escape table for when JAVASCRIPT is set that - omits all the escapes we don't want interpreted and includes '\v'. - (check_escape): Put !JAVASCRIPT around the code for '\l', '\L', '\N', '\u', and '\U', - and added code to handle '\u2013' inside JAVASCRIPT. - (compile_branch): Put !JAVASCRIPT if around all the code implementing the features we - don't want. - (pcre_compile2): Ditto. - - * tests/mozilla/expected.html: Updated since js1_2/regexp/special_characters.js now - passes. - -2007-07-18 Darin Adler - - Reviewed by Oliver Hunt. - - - fix PCRE computes length wrong for expressions such as "[**]" - - Test: fast/js/regexp-charclass-crash.html - - * pcre/pcre_compile.c: (pcre_compile2): Fix the preflight code that calls - check_posix_syntax to match the actual regular expression compilation code; - before it was missing the check of the first character. - -2007-07-19 Holger Hans Peter Freyther - - Reviewed by Mark. - - Define __BUILDING_GDK when building for Gdk to fix building testkjs on OSX. - - * JavaScriptCore.pri: - -2007-07-18 Simon Hausmann - - * Fix the Qt build, call dftables from the right directory. - - Reviewed by Adam Treat. - - * pcre/pcre.pri: - -2007-07-18 Simon Hausmann - - Reviewed by Zack. - - Don't call gcc directly when building the dftables tool but use a separate .pro file for the Qt build. - - * pcre/dftables.pro: Added. - * pcre/pcre.pri: - -2007-07-17 Cameron Zwarich - - Reviewed by Darin, Maciej, and Adam. - - Fixes , - the failure of ecma/GlobalObject/15.1.2.2-2.js, - the failure of ecma/LexicalConventions/7.7.3-1.js, - and most of the failures of tests in ecma/TypeConversion/9.3.1-3.js. - - Bug 9697: parseInt results may be inaccurate for numbers greater than 2^53 - - This patch also fixes similar issues in the lexer and UString::toDouble(). - - * kjs/function.cpp: - (KJS::parseIntOverflow): - (KJS::parseInt): - * kjs/function.h: - * kjs/lexer.cpp: - (KJS::Lexer::lex): - * kjs/ustring.cpp: - (KJS::UString::toDouble): - * tests/mozilla/expected.html: - -2007-07-16 Sam Weinig - - Reviewed by Oliver. - - Turn off -Wshorten-64-to-32 warning for 64-bit builds. - - * Configurations/Base.xcconfig: - -2007-07-14 Brady Eidson - - Reviewed by Sam Weinig - - Initial check-in for - Supporting FTP directory listings in the browser - - * wtf/Platform.h: Add ENABLE_FTPDIR feature to handle building on platforms that don't have the - proper network-layer support - -2007-07-14 Cameron Zwarich - - Reviewed by Darin. - - Fixes http://bugs.webkit.org/show_bug.cgi?id=13517, - http://bugs.webkit.org/show_bug.cgi?id=14237, and - the failure of test js1_5/Scope/regress-185485.js - - Bug 13517: DOM Exception 8 in finance.aol.com sub-page - Bug 14237: Javascript "var" statement interprets initialization in the topmost function scope - - * kjs/nodes.cpp: - (VarDeclNode::evaluate): - * tests/mozilla/expected.html: - -2007-07-12 Alexey Proskuryakov - - Reviewed by Mitz. - - http://bugs.webkit.org/show_bug.cgi?id=14596 - Fix JSC compilation with KJS_VERBOSE. - - * kjs/function.cpp: - (KJS::FunctionImp::passInParameters): - -2007-07-11 George Staikos - - Make it compile. - - * ForwardingHeaders: Added. - * ForwardingHeaders/JavaScriptCore: Added. - * ForwardingHeaders/JavaScriptCore/APICast.h: Added. - * ForwardingHeaders/JavaScriptCore/JSBase.h: Added. - * ForwardingHeaders/JavaScriptCore/JSContextRef.h: Added. - * ForwardingHeaders/JavaScriptCore/JSLock.h: Added. - * ForwardingHeaders/JavaScriptCore/JSObjectRef.h: Added. - * ForwardingHeaders/JavaScriptCore/JSStringRef.h: Added. - * ForwardingHeaders/JavaScriptCore/JSStringRefCF.h: Added. - * ForwardingHeaders/JavaScriptCore/JSValueRef.h: Added. - * ForwardingHeaders/JavaScriptCore/JavaScriptCore.h: Added. - -2007-07-11 Holger Hans Peter Freyther - - Reviewed by Darin. - - As of http://bugs.webkit.org/show_bug.cgi?id=14527 move the - WebCore/ForwardingHeader/JavaScriptCore to JavaScriptCore - - * ForwardingHeaders: Added. - * ForwardingHeaders/JavaScriptCore: Copied from WebCore/ForwardingHeaders/JavaScriptCore. - -2007-07-11 Nikolas Zimmermann - - Reviewed by Mark. - - Forwardport the hash table fix from CodeGeneratorJS.pm to create_hash_table. - Reran run-jsc-tests, couldn't find any regressions. Suggested by Darin. - - * kjs/create_hash_table: - -2007-07-09 Maciej Stachowiak - - Reviewed by Oliver. - - - JavaScriptCore part of fix for: Repro crash closing tab/window @ maps.google.com in WTF::HashSet, WTF::HashTraits >::add + 11 - - * JavaScriptCore.exp: Added needed export. - -2007-07-06 Maciej Stachowiak - - Reviewed by Antti. - - - JavaScriptCore fails to build with strict-aliasing warnings - - * Configurations/Base.xcconfig: Re-enable -Wstrict-aliasing - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::getJNIEnv): Type-pun via a union instead of a pointer cast. - * wtf/HashMap.h: - (WTF::): Instead of doing type-punned assignments via pointer cast, do one of three things: - (1) assign directly w/o cast if storage type matches real type; (2) assign using cast - via union if type does not need reffing; (3) copy with memcpy and ref/deref manually if type - needs reffing. This is ok peref-wise because memcpy of a constant length gets optomized. - HashTraits are now expected to make ref()/deref() take the storage type, not the true type. - * wtf/HashSet.h: - (WTF::): Same basic idea. - * wtf/HashTable.h: - (WTF::): Added Assigner template for use by HashMap/HashSet. Change RefCounter to call ref() - and deref() via storage type, avoiding the need to - type-pun. - (WTF::RefCounter::ref): ditto - (WTF::RefCounter::deref): ditto - * wtf/HashTraits.h: - (WTF::): Change ref() and deref() for RefPtr HashTraits to take the storage type; cast - via union to pointer type. - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::init): Changed from constructor to init function so this can go in a union. - (WTF::): redefine pageheap macro in terms of getPageHeap(). - (WTF::getPageHeap): new inline function, helper for pageheap macro. This hides the cast in a union. - (WTF::TCMalloc_ThreadCache::InitModule): Call init() instead of using placement new to initialize page - heap. - * wtf/TCPageMap.h: - (TCMalloc_PageMap1::init): Changed from constructor to init function. - (TCMalloc_PageMap2::init): ditto - (TCMalloc_PageMap3::init): ditto - - -2007-07-06 George Staikos - - Reviewed by Maciej. - - Switch USE(ICONDATABASE) to ENABLE(ICONDATABASE) - - * wtf/Platform.h: - -2007-07-03 Sam Weinig - - Reviewed by Darin. - - Eleventh round of fixes for implicit 64-32 bit conversion errors. - - - - Fixes a real bug where where we were setting long long and unsigned long long - values to a long field. - - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - -2007-07-03 Sam Weinig - - Reviewed by Brady Eidson. - - Tenth round of fixes for implicit 64-32 bit conversion errors. - - - - Add explicit casts. - - * kjs/dtoa.cpp: - (Bigint::): - -2007-07-02 Sam Weinig - - Reviewed by Kevin McCullough. - - Fourth round of fixes for implicit 64-32 bit conversion errors. - - - Add custom piDouble and piFloat constants to use instead of M_PI. - - * kjs/math_object.cpp: - (MathObjectImp::getValueProperty): - * wtf/MathExtras.h: - (wtf_atan2): - -2007-06-29 Sam Weinig - - Reviewed by Darin. - - Second pass at fixing implicit 64-32 bit conversion errors. - - - - Add a toFloat() method to JSValue for float conversion. - - * JavaScriptCore.exp: - * kjs/value.cpp: - (KJS::JSValue::toFloat): - * kjs/value.h: - -2007-06-27 Kevin McCullough - - Reviewed by Darin. - - - REGRESSION: Apparent WebKit JavaScript memory smasher when submitting comment to iWeb site (crashes in kjs_pcre_compile2) - - Correctly evaluate the return value of _pcre_ucp_findchar. - - * pcre/pcre_compile.c: - (compile_branch): - * pcre/pcre_exec.c: - (match): - -2007-06-27 Sam Weinig - - Reviewed by Darin. - - First pass at fixing implicit 64-32 bit conversion errors. - - - - Add 'f' suffix where necessary. - - * kjs/testkjs.cpp: - (StopWatch::getElapsedMS): - -2007-06-26 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed JSGarbageCollect headerdoc suggests that - using JavaScriptCore requires leaking memory - - * API/JSBase.h: Changed documentation to explain that you can pass NULL - to JSGarbageCollect. - -2007-06-26 Adam Treat - - Reviewed by Adam Roben. - - Make the SQLite icon database optional. - - * wtf/Platform.h: - -2007-06-15 George Staikos - - More missing files for Qt. - - * JavaScriptCore.pri: - * kjs/testkjs.pro: - -2007-06-15 George Staikos - - Another Qt build fix. - - * JavaScriptCore.pri: - * kjs/testkjs.pro: - -2007-06-15 George Staikos - - Fixing Qt build. - - * JavaScriptCore.pri: - -2007-06-20 Mark Rowe - - Reviewed by Mitz. - - Fix http://bugs.webkit.org/show_bug.cgi?id=14244 - Bug 14244: Data corruption when using a replace() callback function with data containing "$" - - * kjs/string_object.cpp: - (KJS::replace): When 'replacement' is a function, do not replace $n placeholders in its return value. - This matches the behaviour described in ECMA 262 3rd Ed section 15.5.4.1, and as implemented in Firefox. - -2007-06-14 Anders Carlsson - - Fix Windows build. - - * bindings/runtime_object.cpp: - (RuntimeObjectImp::canPut): - -2007-06-14 Anders Carlsson - - Reviewed by Darin. - - - Crash at _NPN_ReleaseObject when quitting page at http://eshop.macsales.com/shop/ModBook - - - http://bugs.webkit.org/show_bug.cgi?id=13547 - REGRESSION: Crash in _NPN_ReleaseObject when closing Safari on nba.com (13547) - - - CrashTracer: [USER] 75 crashes in Safari at com.apple.JavaScriptCore: KJS::Bindings::CInstance::~CInstance + 40 - - Have the root object track all live instances of RuntimeObjectImp. When invalidating - the root object, also invalidate all live runtime objects by zeroing out their instance ivar. - This prevents instances from outliving their plug-ins which lead to crashes. - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertValueToNPVariant): - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::convertValueToJObject): - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::convertValueToJValue): - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::callAsFunction): - * bindings/runtime_array.cpp: - (RuntimeArray::RuntimeArray): - * bindings/runtime_array.h: - (KJS::RuntimeArray::getConcreteArray): - * bindings/runtime_method.cpp: - (RuntimeMethod::callAsFunction): - * bindings/runtime_method.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::RuntimeObjectImp): - (RuntimeObjectImp::~RuntimeObjectImp): - (RuntimeObjectImp::invalidate): - (RuntimeObjectImp::fallbackObjectGetter): - (RuntimeObjectImp::fieldGetter): - (RuntimeObjectImp::methodGetter): - (RuntimeObjectImp::getOwnPropertySlot): - (RuntimeObjectImp::put): - (RuntimeObjectImp::canPut): - (RuntimeObjectImp::defaultValue): - (RuntimeObjectImp::implementsCall): - (RuntimeObjectImp::callAsFunction): - (RuntimeObjectImp::getPropertyNames): - (RuntimeObjectImp::throwInvalidAccessError): - * bindings/runtime_object.h: - * bindings/runtime_root.cpp: - (KJS::Bindings::RootObject::invalidate): - (KJS::Bindings::RootObject::addRuntimeObject): - (KJS::Bindings::RootObject::removeRuntimeObject): - * bindings/runtime_root.h: - -2007-06-14 Anders Carlsson - - Reviewed by Mitz. - - - Safari keeps on complaining about slow script playing NBC TV video (14133) - - http://bugs.webkit.org/show_bug.cgi?id=14133 - Runaway JavaScript timer fires when spinning around in Google Maps street view - - Make sure to start and stop the timeout checker around calls to JS. - - * bindings/NP_jsobject.cpp: - (_NPN_InvokeDefault): - (_NPN_Invoke): - (_NPN_Evaluate): - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::call): - (JavaJSObject::eval): - -2007-06-13 Darin Adler - - Reviewed by Mark Rowe. - - - fix http://bugs.webkit.org/show_bug.cgi?id=14132 - array sort with > 10000 elements sets elements > 10000 undefined - - Test: fast/js/sort-large-array.html - - * kjs/array_instance.h: Replaced pushUndefinedObjectsToEnd with - compactForSorting, and removed ExecState parameters. - - * kjs/array_object.cpp: - (ArrayInstance::sort): Changed to call compactForSorting. - (ArrayInstance::compactForSorting): Do the get and delete of the - properties directly on the property map instead of using public - calls from JSObject. The public calls would just read the undefined - values from the compacted sort results array! - -2007-06-13 George Staikos - - Reviewed by Lars. - - Fix Mac OS X build after last checkin. - - * wtf/FastMalloc.h: - -2007-06-14 Lars Knoll - - Reviewed by Maciej. - - Disable FastMalloc for the Qt build and make sure we - don't reimplement the global new/delete operators - when using the system malloc. - - * wtf/FastMalloc.cpp: - * wtf/FastMalloc.h: - * wtf/Platform.h: - -2007-06-13 Anders Carlsson - - Reviewed by Geoff. - - Make sure that bindings instances get correct root objects. - - * JavaScriptCore.exp: - * bindings/NP_jsobject.cpp: - (listFromVariantArgs): - (_NPN_InvokeDefault): - (_NPN_Invoke): - (_NPN_SetProperty): - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::invokeMethod): - (KJS::Bindings::CInstance::invokeDefaultMethod): - * bindings/c/c_runtime.cpp: - (KJS::Bindings::CField::valueFromInstance): - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertNPVariantToValue): - * bindings/c/c_utility.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - (ObjcInstance::invokeDefaultMethod): - (ObjcInstance::getValueOfUndefinedField): - * bindings/objc/objc_runtime.mm: - (ObjcField::valueFromInstance): - (ObjcArray::valueAt): - * bindings/objc/objc_utility.h: - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertObjcValueToValue): - * bindings/runtime.h: - -2007-06-13 Simon Hausmann - - Reviewed by Lars. - - * kjs/testkjs.pro: WebKitQt is now called QtWebKit. - -2007-06-12 Anders Carlsson - - Another build fix. - - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtInstance::invokeMethod): - -2007-06-12 Anders Carlsson - - Reviewed by Geoff. - - Move the notion of field type to the JNI runtime since that's the only - one that was actually using it. - - * bindings/c/c_runtime.h: - (KJS::Bindings::CField::CField): - * bindings/jni/jni_runtime.h: - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - * bindings/qt/qt_runtime.h: - * bindings/runtime.h: - * bindings/runtime_method.cpp: - -2007-06-12 Anders Carlsson - - Build fix. - - * bindings/qt/qt_class.cpp: - (KJS::Bindings::QtClass::methodsNamed): - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtInstance::invokeMethod): - -2007-06-12 Anders Carlsson - - Reviewed by Oliver. - - Get rid of the MethodList class and use a good ol' Vector instead. - - * bindings/c/c_class.cpp: - (KJS::Bindings::CClass::methodsNamed): - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::invokeMethod): - * bindings/jni/jni_class.cpp: - (JavaClass::JavaClass): - (JavaClass::~JavaClass): - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/objc/objc_class.mm: - (KJS::Bindings::ObjcClass::methodsNamed): - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::callAsFunction): - * bindings/runtime.cpp: - * bindings/runtime.h: - * bindings/runtime_method.cpp: - (RuntimeMethod::lengthGetter): - (RuntimeMethod::callAsFunction): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::getOwnPropertySlot): - -2007-06-12 Anders Carlsson - - Reviewed by Geoff. - - Make RuntimeMethod's method list a pointer so that the object size doesn't - grow beyond 32 bytes when we later will replace MethodList with a Vector. - - * bindings/runtime_method.cpp: - (RuntimeMethod::RuntimeMethod): - (RuntimeMethod::lengthGetter): - (RuntimeMethod::callAsFunction): - * bindings/runtime_method.h: - -2007-06-12 Anders Carlsson - - Reviewed by Geoff. - - Get rid of the Parameter class. - - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_runtime.cpp: - (JavaMethod::signature): - * bindings/jni/jni_runtime.h: - (KJS::Bindings::JavaParameter::JavaParameter): - (KJS::Bindings::JavaParameter::~JavaParameter): - (KJS::Bindings::JavaParameter::type): - (KJS::Bindings::JavaMethod::parameterAt): - (KJS::Bindings::JavaMethod::numParameters): - * bindings/runtime.h: - -2007-06-12 Anders Carlsson - - Build fix. - - * bindings/qt/qt_class.h: - -2007-06-12 Mark Rowe - - Build fix. - - * bindings/objc/objc_runtime.h: - -2007-06-12 Anders Carlsson - - Reviewed by Geoff. - - Get rid of Constructor and its only subclass JavaConstructor. - - * bindings/c/c_class.h: - * bindings/jni/jni_class.cpp: - (JavaClass::JavaClass): - (JavaClass::~JavaClass): - * bindings/jni/jni_class.h: - * bindings/jni/jni_runtime.cpp: - * bindings/jni/jni_runtime.h: - * bindings/objc/objc_class.h: - * bindings/runtime.h: - -2007-06-12 Anders Carlsson - - Reviewed by Geoff. - - Use RetainPtr throughout the bindings code. - - * bindings/objc/objc_class.h: - * bindings/objc/objc_class.mm: - (KJS::Bindings::ObjcClass::ObjcClass): - (KJS::Bindings::ObjcClass::methodsNamed): - (KJS::Bindings::ObjcClass::fieldNamed): - * bindings/objc/objc_instance.h: - (KJS::Bindings::ObjcInstance::getObject): - * bindings/objc/objc_instance.mm: - (ObjcInstance::ObjcInstance): - (ObjcInstance::~ObjcInstance): - (ObjcInstance::implementsCall): - (ObjcInstance::invokeMethod): - (ObjcInstance::invokeDefaultMethod): - (ObjcInstance::defaultValue): - * bindings/objc/objc_runtime.h: - (KJS::Bindings::ObjcMethod::setJavaScriptName): - (KJS::Bindings::ObjcMethod::javaScriptName): - (KJS::Bindings::ObjcArray::getObjcArray): - * bindings/objc/objc_runtime.mm: - (ObjcField::name): - (ObjcArray::ObjcArray): - (ObjcArray::setValueAt): - (ObjcArray::valueAt): - (ObjcArray::getLength): - * wtf/RetainPtr.h: - -2007-06-12 Anders Carlsson - - Reviewed by Maciej. - - Have JSCell inherit from Noncopyable. - - * bindings/objc/objc_runtime.h: - * bindings/runtime_object.h: - * kjs/value.h: - -2007-06-12 Anders Carlsson - - Reviewed by Darin and Maciej. - - More cleanup. Use our Noncopyable WTF class, add a root object member - to the Array class. - - * bindings/c/c_class.h: - * bindings/jni/jni_class.h: - * bindings/jni/jni_instance.h: - * bindings/jni/jni_runtime.cpp: - (JavaArray::JavaArray): - * bindings/jni/jni_runtime.h: - * bindings/objc/objc_class.h: - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcArray::ObjcArray): - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertObjcValueToValue): - * bindings/runtime.cpp: - (KJS::Bindings::Array::Array): - (KJS::Bindings::Array::~Array): - * bindings/runtime.h: - * bindings/runtime_object.h: - * bindings/runtime_root.h: - -2007-06-08 Zack Rusin - - Fix the Qt build - - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtInstance::QtInstance): - * bindings/qt/qt_instance.h: - -2007-06-07 Anders Carlsson - - Reviewed by Geoff. - - Get rid of Instance::setRootObject and pass the root object to the instance constructor instead. - - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::CInstance): - * bindings/c/c_instance.h: - * bindings/jni/jni_instance.cpp: - (JavaInstance::JavaInstance): - * bindings/jni/jni_instance.h: - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::convertJObjectToValue): - * bindings/objc/objc_instance.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::ObjcInstance): - * bindings/runtime.cpp: - (KJS::Bindings::Instance::Instance): - (KJS::Bindings::Instance::createBindingForLanguageInstance): - * bindings/runtime.h: - -2007-06-07 Anders Carlsson - - Reviewed by Adam. - - Don't use a JavaInstance to store the field when all we want to do is to keep the field - from being garbage collected. Instead, use a JObjectWrapper. - - * bindings/jni/jni_instance.h: - * bindings/jni/jni_runtime.cpp: - (JavaField::JavaField): - (JavaField::dispatchValueFromInstance): - (JavaField::dispatchSetValueToInstance): - * bindings/jni/jni_runtime.h: - (KJS::Bindings::JavaField::JavaField): - (KJS::Bindings::JavaField::operator=): - -2007-05-30 Alp Toker - - Reviewed by Brady. - - Enable logging in the Gdk port. - http://bugs.webkit.org/show_bug.cgi?id=13936 - - * wtf/Assertions.cpp: - * wtf/Assertions.h: Add WTFLogVerbose which also logs - the file, line number and function. - -2007-05-30 Mark Rowe - - Mac build fix. Update #include. - - * API/JSCallbackFunction.h: - -2007-05-30 Luciano Montanaro - - Reviewed by Maciej. - - - cross-port Harri Porten's commits 636099 and 636108 from KJS: - "publish a class anyway public already" and "class is being used from - outside for quite some time" in preparation for further syncronizations - - * kjs/context.h: - * kjs/date_object.cpp: - * kjs/date_object.h: - * kjs/function.h: - (KJS::): - (KJS::InternalFunctionImp::classInfo): - (KJS::InternalFunctionImp::functionName): - * kjs/function_object.h: - * kjs/internal.h: - * kjs/lookup.h: - (KJS::getStaticPropertySlot): - (KJS::getStaticFunctionSlot): - (KJS::getStaticValueSlot): - * kjs/object_object.h: - -2007-05-29 Sam Weinig - - Reviewed by Adam Roben. - - Cleanup function and fix to match comparison API. - - * kjs/string_object.cpp: - (KJS::substituteBackreferences): - (KJS::localeCompare): - -2007-05-28 Geoffrey Garen - - Slight clarification to an exception message. - - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::put): - -2007-05-27 Holger Freyther - - Reviewed by Mark Rowe. - - * wtf/Platform.h: Move Gdk up to allow building WebKit/Gdk on Darwin - -2007-05-27 Darin Adler - - - fix a couple ifdefs that said WIN instead of WIN_OS - - * kjs/collector.cpp: - (KJS::allocateBlock): WIN -> WIN_OS - (KJS::freeBlock): Ditto. - -2007-05-26 Sam Weinig - - Reviewed by Darin. - - Patch for http://bugs.webkit.org/show_bug.cgi?id=13854 - Port of commit 667785 from kjs - - - special case calling String.localeCompare() with no parameters to return 0. - - * kjs/string_object.cpp: - (KJS::StringProtoFunc::callAsFunction): - -2007-05-25 Kimmo Kinnunen - - Reviewed by Darin. - - - Fix for http://bugs.webkit.org/show_bug.cgi?id=13456 - REGRESSION: setTimeout "arguments" object gets shadowed by a local variable - - - Add a explicit check for arguments. Previously check was done with getDirect, - but since the arguments is created on-demand in ActivationImp, it doesn't - show up in the test. 'arguments' should always be in the VarDeclNode's - evaluation scope. - - * kjs/nodes.cpp: - (VarDeclNode::evaluate): Additional check if the var decl identifier is 'arguments' - -2007-05-25 George Staikos - - Reviewed by Maciej. - - - Use COMPILER(GCC), not PLATFORM(GCC) - as Platform.h defines - - * wtf/FastMalloc.h: - -2007-05-25 Kimmo Kinnunen - - Reviewed by Darin. - - - http://bugs.webkit.org/show_bug.cgi?id=13623 (Decompilation of function - doesn't compile with "++(x,y)") - - Create the error node based on the actual node, not the node inside - parenthesis - - Fix applies to postfix, prefix and typeof operators - - Produces run-time ReferenceError like other non-lvalue assignments etc. - - * kjs/grammar.y: Create {Prefix,Postfix}ErrorNode based on the actual node, - not the based on the node returned by "nodeInsideAllParens()". Same for - TypeOfValueNode. - -2007-05-25 Simon Hausmann - - Reviewed by Zack. - - Fix crash in Qt JavaScript bindings when the arguments used on the Qt side are not - registered with QMetaType. - - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtInstance::invokeMethod): - * bindings/qt/qt_runtime.cpp: - -2007-05-24 Luciano Montanaro - - Reviewed by Darin - - Patch for http://bugs.webkit.org/show_bug.cgi?id=13855 - Port patch 666176 to JavaScriptCore - - - Renamed JSValue::downcast() to JSValue::asCell() which makes the - function meaning cleaner. It's modeled after Harri Porten change in - KDE trunk. - - * kjs/collector.cpp: - (KJS::Collector::protect): - (KJS::Collector::unprotect): - (KJS::Collector::collectOnMainThreadOnly): - * kjs/object.h: - (KJS::JSValue::isObject): - * kjs/string_object.cpp: - (KJS::StringProtoFunc::callAsFunction): - * kjs/value.h: - (KJS::JSValue::asCell): - (KJS::JSValue::isNumber): - (KJS::JSValue::isString): - (KJS::JSValue::isObject): - (KJS::JSValue::getNumber): - (KJS::JSValue::getString): - (KJS::JSValue::getObject): - (KJS::JSValue::getUInt32): - (KJS::JSValue::mark): - (KJS::JSValue::marked): - (KJS::JSValue::type): - (KJS::JSValue::toPrimitive): - (KJS::JSValue::toBoolean): - (KJS::JSValue::toNumber): - (KJS::JSValue::toString): - (KJS::JSValue::toObject): - -2007-05-18 Holger Hans Peter Freyther - - Reviewed by Mark Rowe. - - * kjs/testkjs.pro: Make the Gdk port link to icu - -2007-05-15 Geoffrey Garen - - Reviewed by Adele Peterson. - - It helps if you swap the right variable. - - * wtf/HashSet.h: - (WTF::::operator): - -2007-05-15 Lars Knoll - - Reviewed by Zack - - Extend the QObject JavaScript bindings to work for slots with - arguments. - - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtInstance::invokeMethod): - -2007-05-14 Kimmo Kinnunen - - Reviewed by Darin. - - - Fixes http://bugs.webkit.org/show_bug.cgi?id=13622 (Decompiler - omits trailing comma in array literal) - - * kjs/nodes2string.cpp: - (ArrayNode::streamTo): print extra ',' in case there was elision - commas (check opt member var) and array elements present - in the array expression - -2007-05-14 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Added HashMap::swap and HashSet::swap. WebCore now uses HashSet::swap. - I figured while I was in the neighborhood I might as well add HashMap::swap, - too. - - * wtf/HashMap.h: - (WTF::::operator): - (WTF::::swap): - * wtf/HashSet.h: - (WTF::::operator): - (WTF::::swap): - -2007-05-11 Kimmo Kinnunen - - Reviewed by Darin. - - - Fix for bug http://bugs.webkit.org/show_bug.cgi?id=13620 - Bogus decompilation of "for (var j = 1 in [])" - - ForInNode toString()'ed to syntax error if there was var decl - and initializer - - ForNode toStringed()'ed lost 'var ' if it was present - - * kjs/nodes2string.cpp: - (VarDeclListNode::streamTo): Print "var " here - (VarStatementNode::streamTo): Don't print "var " here - (ForNode::streamTo): Remove TODO comment, VarDeclListNode will - stream the "var " - (ForInNode::streamTo): ForIn initializer is printed by VarDeclNode - -2007-05-11 Kimmo Kinnunen - - Reviewed by Darin. - - - Fixes http://bugs.webkit.org/show_bug.cgi?id=10878 - (Incorrect decompilation for "4..x") - - Group numbers in dotted expressions in toString() output, so we - avoid the 4.x constructs when the original input is 4..x. - 4..x means the same as 4. .x or (4).x or Number(4).x - - * kjs/nodes2string.cpp: - (KJS::SourceStream::): - Add boolean flag to indicate that if next item is a number, it should be grouped. - Add new formatting enum which turns on the boolean flag. - (KJS::SourceStream::SourceStream): Added. Initialize the flag. - (SourceStream::operator<<): Added. New overloaded operator with double value as parameter. - (NumberNode::streamTo): Use the double operator - (ArrayNode::streamTo): - (DotAccessorNode::streamTo): - (FunctionCallDotNode::streamTo): - (FunctionCallParenDotNode::streamTo): - (PostfixDotNode::streamTo): - (DeleteDotNode::streamTo): - (PrefixDotNode::streamTo): - (AssignDotNode::streamTo): Use the new formatting enum to turn on the grouping flag. - -2007-05-10 Lars Knoll - - Reviewed by Zack - - Fix our last three test failures in the JavaScript - tests. - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - -2007-05-08 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed #includes of JSStringRefCF.h and use of CF datatypes. I think I - misunderstood this issue before. - - * API/JavaScriptCore.h: #include JSStringRefCF.h. Platforms that don't - want this behavior can just #include individual headers, instead of the - umbrella framework header. But we definitely want Mac OS X clients to - get the #include of JSStringRefCF.h "for free." - * API/minidom.c: Don't #include JSStringRefCF.h. (Don't need to #include - JavaScriptCore.h, either.) - * API/testapi.c: Don't #include JSStringRefCF.h. Do use CF datatypes - regardless of whether __APPLE__ is defined. Platforms that don't support - CF just shouldn't compile this file. - (main): - -2007-05-09 Eric Seidel - - Reviewed by mjs. - - http://bugs.webkit.org/show_bug.cgi?id=6985 - Cyclic __proto__ values cause WebKit to hang - - * kjs/object.cpp: - (KJS::JSObject::put): do a cycle check before setting __proto__ - -2007-05-08 Kimmo Kinnunen - - Reviewed by darin. Landed by eseidel. - - - http://bugs.webkit.org/show_bug.cgi?id=10880 (Do..while loop gains - a semicolon each time it is toStringed) - Grammar in Ecma-66262, 12.6: "do Statement while ( Expression );" - EmptyStatement was created after every do..while(expr) which - had semicolon at the end. - - * kjs/grammar.y: Require semicolon at the end of do..while - -2007-05-08 Geoffrey Garen - - Build fix -- this time for sure. - - APICast.h, being private, ends up in a different folder than JSValueRef.h, - so we can't include one from the other using "". Instead, just forward - declare the relevant data types. - - * API/APICast.h: - -2007-05-08 Geoffrey Garen - - Build fix: export APICast.h for WebCore and WebKit. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-05-04 Darin Adler - - Reviewed by Adele. - - - fix http://bugs.webkit.org/show_bug.cgi?id=12821 - Number.toExponential doesn't work for negative numbers - - * kjs/number_object.cpp: (NumberProtoFunc::callAsFunction): - Added a call to fabs before calling log10. - -2007-05-03 Holger Freyther - - Reviewed by Zack, landed by Simon. - This is bugzilla bug 13499. - - * JavaScriptCore.pri: Place Qt into the qt-port scope - * bindings/testbindings.pro: Place Qt into the qt-port scope - * kjs/testkjs.pro: Place Qt into the qt-port scope - * pcre/pcre.pri: Place Qt into the qt-port scope - -2007-05-02 David Harrison - - Reviewed by Antti. - - Crash resulting from DeprecatedString::insert() - - Added insertion support for more than one value. - - * wtf/Vector.h: - (WTF::::insert): - Added support for inserting multiple values. - - (WTF::::prepend): - New. Insert at the start of vectors. Convenient for vectors used as strings. - -2007-05-01 Jungshik Shin - - Reviewed by Alexey. - - - get rid of non-ASCII lteral characters : suppress compiler warnings - http://bugs.webkit.org/show_bug.cgi?id=13551 - - * kjs/testkjs.cpp: - * pcre/pcre_compile.c: - -2007-04-28 Jungshik Shin - - Reviewed by Sam Weinig. - - - Replace copyright sign in Latin-1 (0xA9) with '(C)' - http://bugs.webkit.org/show_bug.cgi?id=13531 - - * bindings/npruntime.h: - -2007-04-28 Darin Adler - - Reviewed by Maciej. - - - fix Hamachi test fails: assertion failure in ListHashSet - - Test: fast/forms/add-remove-form-elements-stress-test.html - - * wtf/ListHashSet.h: - (WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): Initialize - m_isDoneWithInitialFreeList to false. - (WTF::ListHashSetNodeAllocator::allocate): Added assertions based on a debug-only - m_isAllocated flag that make sure we don't allocate a block that's already allocated. - These assertions helped pinpoint the bug. Set m_isDoneWithInitialFreeList when we - allocate the last block of the initial free list. Once we're done with the initial - free list, turn off the rule that says that the next node in the pool after the last - node in the free list is also free. This rule works because any free nodes are added - to the head of the free list, so a node that hasn't been allocated even once is always - at the tail of the free list and all the nodes after it also haven't been allocated - even once. But it doesn't work any longer once the entire pool has been used at least - once, because there's nothing special about the last node on the free list any more. - (WTF::ListHashSetNodeAllocator::deallocate): Set the node's m_isAllocated to false. - (WTF::ListHashSetNodeAllocator::pastPool): Added. Used above. - (WTF::ListHashSetNodeAllocator::inPool): Changed to use the pastPool function. - (WTF::ListHashSetNode::ListHashSetNode): Initialize m_isAllocated to true. - (WTF::ListHashSetNode::operator new): Removed variable name for unused size - parameter. - (WTF::ListHashSetNode::destroy): Changed to call the destructor rather than - delete -- this gets rid of the need to define an operator delete. - -2007-04-27 Christopher Brichford - - Reviewed by Timothy Hatcher. - - Fix for: Bug 13211: Move JavaScriptCore mac project files for apollo port - http://bugs.webkit.org/show_bug.cgi?id=13211 - - * JavaScriptCore.apolloproj/mac/JavaScriptCore.Debug.xcconfig: Added. - * JavaScriptCore.apolloproj/mac/JavaScriptCore.Release.xcconfig: Added. - * JavaScriptCore.apolloproj/mac/JavaScriptCore.xcconfig: Added. - * JavaScriptCore.apolloproj/mac/JavaScriptCore.xcodeproj/project.pbxproj: Added. - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Debug.xcconfig: Removed. - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Release.xcconfig: Removed. - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig: Removed. - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: Removed. - -2007-04-27 Holger Freyther - - Reviewed by Maciej. - - Remove unmaintained CMake build system. - - * CMakeLists.txt: Removed. - * pcre/CMakeLists.txt: Removed. - -2007-04-27 Mark Rowe - - Reviewed by Oliver. - - * JavaScriptCore.xcodeproj/project.pbxproj: Improve dependencies in Xcode project - by marking dftables as a dependency of Generate Derived Sources rather than of - JavaScriptCore itself. - -2007-04-26 Geoffrey Garen - - Build fix -- added #includes that we used to get implicitly through - JSStringRef.h. - - * API/JSNode.c: - * API/JSNodeList.c: - * API/minidom.c: - * API/testapi.c: - -2007-04-26 Geoffrey Garen - - Reviewed by Maciej Stachowiak, Adam Roben. - - Fixed - Remove #include of JSStringRefCF.h from JSStringRef.h - JavaScriptCore is not cross-platform -- JSStringRef.h references CF datatypes - - * API/JSStringRef.h: Removed #include -- no clients need it anymore. - -2007-04-25 David Kilzer - - Reviewed by Maciej. - - Add assertions for debug builds. - - * kjs/JSLock.cpp: - (KJS::JSLock::lock): Assert the return value of pthread_mutex_lock() in debug builds. - (KJS::JSLock::unlock): Assert the return value of pthread_mutex_unlock() in debug builds. - -2007-04-25 Maciej Stachowiak - - Reviewed by Anders. - - - fix build problems - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Disable warning that - gives often downright incorrect results based on guessing what will happen in 64-bit. - -2007-04-25 Darin Adler - - Reviewed by Geoff. - - - tweak the allocator for a small speedup -- Shark showed this was a win, but I can't - measure an improvement right now, but it's also clear these changes do no harm - - * wtf/FastMalloc.cpp: - (WTF::LgFloor): Use ALWAYS_INLINE here; in testing I did a while back this was necessary - to get this single-instruction function to be inlined. - (WTF::SizeClass): Use ALWAYS_INLINE here too for the same reason. Also change the special - case for a size of 0 to work without a branch for a bit of extra speed. - (WTF::ByteSizeForClass): Use ALWAYS_INLINE here too for the same reason. - -2007-04-24 Maciej Stachowiak - - Reviewed by Oliver. - - - use custom calling convention for everything in nodes.cpp on intel gcc for 1.5% speed boost - - Nearly all functions in nodes.cpp were marked up to use the - regparm(3) calling convention under GCC for x86, since this is - faster and they are all guaranteed to be called only internally to - kjs. - - The only exception is destructors, since delete doesn't know how to use a custom calling convention. - - * kjs/nodes.cpp: - (dotExprDoesNotAllowCallsString): - * kjs/nodes.h: - (KJS::Node::): - (KJS::StatementNode::): - (KJS::NullNode::): - (KJS::BooleanNode::): - (KJS::NumberNode::): - (KJS::StringNode::): - (KJS::RegExpNode::): - (KJS::ThisNode::): - (KJS::ResolveNode::): - (KJS::GroupNode::): - (KJS::ElementNode::): - (KJS::ArrayNode::): - (KJS::PropertyNameNode::): - (KJS::PropertyNode::): - (KJS::PropertyListNode::): - (KJS::ObjectLiteralNode::): - (KJS::BracketAccessorNode::): - (KJS::DotAccessorNode::): - (KJS::ArgumentListNode::): - (KJS::ArgumentsNode::): - (KJS::NewExprNode::): - (KJS::FunctionCallValueNode::): - (KJS::FunctionCallResolveNode::): - (KJS::FunctionCallBracketNode::): - (KJS::FunctionCallParenBracketNode::): - (KJS::FunctionCallDotNode::): - (KJS::FunctionCallParenDotNode::): - (KJS::PostfixResolveNode::): - (KJS::PostfixBracketNode::): - (KJS::PostfixDotNode::): - (KJS::PostfixErrorNode::): - (KJS::DeleteResolveNode::): - (KJS::DeleteBracketNode::): - (KJS::DeleteDotNode::): - (KJS::DeleteValueNode::): - (KJS::VoidNode::): - (KJS::TypeOfResolveNode::): - (KJS::TypeOfValueNode::): - (KJS::PrefixResolveNode::): - (KJS::PrefixBracketNode::): - (KJS::PrefixDotNode::): - (KJS::PrefixErrorNode::): - (KJS::UnaryPlusNode::): - (KJS::NegateNode::): - (KJS::BitwiseNotNode::): - (KJS::LogicalNotNode::): - (KJS::MultNode::): - (KJS::AddNode::): - (KJS::ShiftNode::): - (KJS::RelationalNode::): - (KJS::EqualNode::): - (KJS::BitOperNode::): - (KJS::BinaryLogicalNode::): - (KJS::ConditionalNode::): - (KJS::AssignResolveNode::): - (KJS::AssignBracketNode::): - (KJS::AssignDotNode::): - (KJS::AssignErrorNode::): - (KJS::CommaNode::): - (KJS::AssignExprNode::): - (KJS::VarDeclListNode::): - (KJS::VarStatementNode::): - (KJS::EmptyStatementNode::): - (KJS::ExprStatementNode::): - (KJS::IfNode::): - (KJS::DoWhileNode::): - (KJS::WhileNode::): - (KJS::ForNode::): - (KJS::ContinueNode::): - (KJS::BreakNode::): - (KJS::ReturnNode::): - (KJS::WithNode::): - (KJS::LabelNode::): - (KJS::ThrowNode::): - (KJS::TryNode::): - (KJS::ParameterNode::): - (KJS::Parameter::): - (KJS::FunctionBodyNode::): - (KJS::FuncExprNode::): - (KJS::FuncDeclNode::): - (KJS::SourceElementsNode::): - (KJS::CaseClauseNode::): - (KJS::ClauseListNode::): - (KJS::SwitchNode::): - -2007-04-24 Oliver Hunt - - GTK Build fix, ::findEntry->KJS::findEntry - - * kjs/lookup.cpp: - (KJS::Lookup::findEntry): - (KJS::Lookup::find): - -2007-04-23 Maciej Stachowiak - - Reviewed by Geoff. - - - compile most of JavaScriptCore as one file for 4% JS iBench speed improvement - - * JavaScriptCore.xcodeproj/project.pbxproj: Add AllInOneFile.cpp, and remove files it includes - from the build. - * kjs/AllInOneFile.cpp: Added. - * kjs/dtoa.cpp: Renamed CONST to CONST_ to avoid conflict. - (Bigint::): - (Bigint::nrv_alloc): - * kjs/lookup.cpp: Use "namspace KJS { ... }" instead of "using namespace KJS;" - -2007-04-23 Maciej Stachowiak - - Build fix, not reviewed. - - * kjs/collector.h: Fix struct/class mismatch. - -2007-04-23 Maciej Stachowiak - - Reviewed by Darin. - - - raise ALLOCATIONS_PER_COLLECTION to 4000, for 3.7% iBench speed improvement - - Now that the cell size is smaller and the block size is bigger, we can fit 4000 objects in - the two spare cells the collector is willing to keep around, so collect a bit less often. - - * kjs/collector.cpp: - -2007-04-23 Maciej Stachowiak - - Reviewed by Darin and Geoff. - - - move mark and collectOnMainThreadOnly bits into separate bitmaps - - This saves 4 bytes per cell, allowing shrink of cell size to 32, - which leads to a .8% speed improvement on iBench. - - This is only feasible because of all the previous changes on the branch. - - * kjs/collector.cpp: - (KJS::allocateBlock): Adjust for some renames of constants. - (KJS::Collector::markStackObjectsConservatively): Now that cells are 32 bytes (64 - bytes on 64-bit) the cell alignment check can be made much more strict, and also - obsoletes the need for a % sizeof(CollectorCell) check. Also, we can mask off the low - bits of the pointer to have a potential block pointer to look for. - (KJS::Collector::collectOnMainThreadOnly): Use bitmap. - (KJS::Collector::markMainThreadOnlyObjects): Use bitmap. - (KJS::Collector::collect): When sweeping, use bitmaps directly to find mark bits. - * kjs/collector.h: - (KJS::): Move needed constants and type declarations here. - (KJS::CollectorBitmap::get): Bit twiddling to get a bitmap value. - (KJS::CollectorBitmap::set): Bit twiddling to set a bitmap bit to true. - (KJS::CollectorBitmap::clear): Bit twiddling to set a bitmap bit to false. - (KJS::CollectorBitmap::clearAll): Clear whole bitmap at one go. - (KJS::Collector::cellBlock): New operation, compute the block pointer for - a cell by masking off low bits. - (KJS::Collector::cellOffset): New operation, compute the cell offset for a - cell by masking off high bits and dividing (actually a shift). - (KJS::Collector::isCellMarked): Check mark bit in bitmap - (KJS::Collector::markCell): Set mark bit in bitmap. - * kjs/value.h: - (KJS::JSCell::JSCell): No more bits. - (KJS::JSCell::marked): Let collector handle it. - (KJS::JSCell::mark): Let collector handle it. - -2007-04-23 Anders Carlsson - - Build fix. - - * kjs/regexp_object.h: - RegExpObjectImpPrivate is a struct, not a class. - -2007-04-23 Maciej Stachowiak - - Reviewed by Darin. - - - shrink FunctionImp / DeclaredFunctionImp by 4 bytes, by moving parameter list to function body - - I reconciled this with a similar change in KDE kjs by Maks Orlovich . - - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - (KJS::FunctionImp::passInParameters): - (KJS::FunctionImp::lengthGetter): - (KJS::FunctionImp::getParameterName): - * kjs/function.h: - * kjs/function_object.cpp: - (FunctionProtoFunc::callAsFunction): - (FunctionObjectImp::construct): - * kjs/nodes.cpp: - (FunctionBodyNode::addParam): - (FunctionBodyNode::paramString): - (FuncDeclNode::addParams): - (FuncDeclNode::processFuncDecl): - (FuncExprNode::addParams): - (FuncExprNode::evaluate): - * kjs/nodes.h: - (KJS::Parameter::Parameter): - (KJS::FunctionBodyNode::numParams): - (KJS::FunctionBodyNode::paramName): - (KJS::FunctionBodyNode::parameters): - (KJS::FuncExprNode::FuncExprNode): - (KJS::FuncDeclNode::FuncDeclNode): - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Disable 64-bit warnings because - they handle size_t badly. - -2007-04-23 Maciej Stachowiak - - Reviewed by Darin. - - - shrink RegexpObjectImp by 4 bytes - - Somewhat inexplicably, this seems to be a .33% speedup on JS iBench. - - * kjs/regexp_object.cpp: - (KJS::RegExpObjectImpPrivate::RegExpObjectImpPrivate): - (RegExpObjectImp::RegExpObjectImp): - (RegExpObjectImp::performMatch): - (RegExpObjectImp::arrayOfMatches): - (RegExpObjectImp::getBackref): - (RegExpObjectImp::getLastMatch): - (RegExpObjectImp::getLastParen): - (RegExpObjectImp::getLeftContext): - (RegExpObjectImp::getRightContext): - (RegExpObjectImp::getValueProperty): - (RegExpObjectImp::putValueProperty): - * kjs/regexp_object.h: - -2007-04-23 Maciej Stachowiak - - Reviewed by Oliver. - - - change to 1-bit bitfields instead of 8-bit, this turns out to lead to a .51% speedup on JS iBench - - The 1-bit bitfields are actually faster than just plain bools, at least on Intel (go figure). - - * kjs/property_map.h: - -2007-04-23 Maciej Stachowiak - - Reviewed by Darin. - - - shrink ArrayInstance objects by 4 bytes - http://bugs.webkit.org/show_bug.cgi?id=13386 - - I did this by storing the capacity before the beginning of the storage array. It turns out - it is rarely needed and is by definition 0 when the storage array is null. - - * kjs/array_instance.h: - (KJS::ArrayInstance::capacity): Get it from the secret stash - * kjs/array_object.cpp: - (allocateStorage): New function to encapsulate allocating the storage with extra space ahead - for the capacity. - (reallocateStorage): ditto for realloc - (ArrayInstance::ArrayInstance): - (ArrayInstance::~ArrayInstance): - (ArrayInstance::resizeStorage): - -2007-04-23 Darin Adler - - Reviewed by Maciej. - - - fix REGRESSION (r10588, r10621): JavaScript won't parse - modifications of non-references (breaks 300themovie.warnerbros.com, fedex.com) - - Despite the ECMAScript specification's claim that you can treat these as syntax - errors, doing so creates some website incompatibilities. So this patch turns them back - into evaluation errors instead. - - Test: fast/js/modify-non-references.html - - * kjs/grammar.y: Change makeAssignNode, makePrefixNode, and makePostfixNode so that they - never fail to parse. Update rules that use them. Fix a little bit of indenting. Use - new PostfixErrorNode, PrefixErrorNode, and AssignErrorNode classes. - - * kjs/nodes.h: Added an overload of throwError that takes a char* argument. - Replaced setExceptionDetailsIfNeeded and debugExceptionIfNeeded with handleException, - which does both. Added PostfixErrorNode, PrefixErrorNode, and AssignErrorNode classes. - - * kjs/nodes.cpp: Changed exception macros to use handleException; simpler and smaller - code size than the two functions that we used before. - (Node::throwError): Added the overload mentioned above. - (Node::handleException): Added. Contains the code from both setExceptionDetailsIfNeeded - and debugExceptionIfNeeded. - (PostfixErrorNode::evaluate): Added. Throws an exception. - (PrefixErrorNode::evaluate): Ditto. - (AssignErrorNode::evaluate): Ditto. - (ThrowNode::execute): Call handleException instead of debugExceptionIfNeeded; this - effectively adds a call to setExceptionDetailsIfNeeded, which may help with getting - the correct file and line number for these exceptions. - - * kjs/nodes2string.cpp: - (PostfixErrorNode::streamTo): Added. - (PrefixErrorNode::streamTo): Added. - (AssignErrorNode::streamTo): Added. - -2007-04-23 Maciej Stachowiak - - Reviewed by Darin. - - - fix test failures / crashes on PPC - - * kjs/property_map.h: Make the bool fields explicitly 8-bit bitfields, since bool is a full - word there otherwise :-( - -2007-04-23 Maciej Stachowiak - - Reviewed by Darin. - - - fix more test case failures - - * bindings/runtime_array.cpp: - (RuntimeArray::RuntimeArray): inherit from JSObject instead of ArrayInstance; it turns - out that this class only needs the prototype and classInfo from ArrayInstance, not the - actual class itself, and it was too big otherwise. - (RuntimeArray::getOwnPropertySlot): - * bindings/runtime_array.h: - -2007-04-23 Maciej Stachowiak - - Reviewed by Darin. - - - fix some test failures - - * bindings/runtime_method.cpp: - (RuntimeMethod::RuntimeMethod): inherit from InternalFunctionImp instead of FunctionImpl, - otherwise this is too big - (RuntimeMethod::getOwnPropertySlot): - * bindings/runtime_method.h: - -2007-04-22 Maciej Stachowiak - - Reviewed by Darin. - - - discard the arguments List for an ActivationImp when the corresponding Context is destroyed (1.7% speedup) - http://bugs.webkit.org/show_bug.cgi?id=13385 - - Based an idea by Christopher E. Hyde . His patch to do - this also had many other List changes and I found this much simpler subset of the changes - was actually a hair faster. - - This optimization is valid because the arguments list is only kept around to - lazily make the arguments object. If it's not made by the time the function - exits, it never will be, since any function that captures the continuation will - have its own local arguments variable in scope. - - Besides the 1.7% speed improvement, it shrinks List by 4 bytes - (which in turn shrinks ActivationImp by 4 bytes). - - * kjs/Context.cpp: - (KJS::Context::~Context): Clear the activation's arguments list. - * kjs/function.cpp: - (KJS::ActivationImp::ActivationImp): Adjusted for list changes. - (KJS::ActivationImp::mark): No need to mark, lists are always protected (this doesn't - cause a ref-cycle for reasons stated above). - (KJS::ActivationImp::createArgumentsObject): Clear arguments list. - * kjs/function.h: - * kjs/list.cpp: - (KJS::List::List): No more needsMarking boolean - (KJS::List::operator=): ditto - * kjs/list.h: - (KJS::List::List): ditto - (KJS::List::reset): ditto - (KJS::List::deref): ditto - -2007-04-22 Maciej Stachowiak - - Reviewed by Darin. - - - shrink PropertyMap by 8 bytes and therefore shrink CELL_SIZE to 40 (for 32-bit; - similar shrinkage for 64-bit) - http://bugs.webkit.org/show_bug.cgi?id=13384 - - Inspired by similar changes by Christopher E. Hyde - done in the kjs-tweaks branch of KDE's kjs. However, this version is somewhat - cleaner style-wise and avoids some of the negative speed impact (at least on gcc/x86) - of his version. - - This is nearly a wash performance-wise, maybe a slight slowdown, but worth doing - to eventually reach cell size 32. - - * kjs/collector.cpp: - (KJS::): - * kjs/property_map.cpp: - (KJS::PropertyMap::~PropertyMap): - (KJS::PropertyMap::clear): - (KJS::PropertyMap::get): - (KJS::PropertyMap::getLocation): - (KJS::PropertyMap::put): - (KJS::PropertyMap::insert): - (KJS::PropertyMap::expand): - (KJS::PropertyMap::rehash): - (KJS::PropertyMap::remove): - (KJS::PropertyMap::mark): - (KJS::PropertyMap::containsGettersOrSetters): - (KJS::PropertyMap::getEnumerablePropertyNames): - (KJS::PropertyMap::getSparseArrayPropertyNames): - (KJS::PropertyMap::save): - (KJS::PropertyMap::checkConsistency): - * kjs/property_map.h: - (KJS::PropertyMap::hasGetterSetterProperties): - (KJS::PropertyMap::setHasGetterSetterProperties): - (KJS::PropertyMap::): - (KJS::PropertyMap::PropertyMap): - -2007-04-22 Maciej Stachowiak - - Reviewed by Darin. - - - change blocks to 64k in size, and use various platform-specific calls to allocate at 64k-aligned addresses - http://bugs.webkit.org/show_bug.cgi?id=13383 - - * kjs/collector.cpp: - (KJS::allocateBlock): New function to allocate 64k of 64k-aligned memory - (KJS::freeBlock): Corresponding free - (KJS::Collector::allocate): - (KJS::Collector::collect): - -2007-04-22 Maciej Stachowiak - - Reviewed by Darin and Geoff. - - - remove the concept of oversize objects, now that there aren't any (for now - only enforced with an assert). - http://bugs.webkit.org/show_bug.cgi?id=13382 - - This change is a .66% speedup on JS iBench for 32-bit platforms, probably much more - for 64-bit since it finally gives a reasonable cell size, but I did not test that. - - * kjs/collector.cpp: - (KJS::): Use different cell size for 32-bit and 64-bit, now that there is no - oversize allocation. - (KJS::Collector::allocate): Remove oversize allocator. - (KJS::Collector::markStackObjectsConservatively): Don't check oversize objects. - (KJS::Collector::markMainThreadOnlyObjects): Ditto. - (KJS::Collector::collect): Ditto. - -2007-04-21 Mitz Pettel - - Reviewed by Adam. - - - fix http://bugs.webkit.org/show_bug.cgi?id=13428 - REGRESSION (r20973-r20976): Failing ecma/Array/15.4.4.5-3.js - - - fix http://bugs.webkit.org/show_bug.cgi?id=13429 - REGRESSION (r20973-r20976): Crashing in fast/dom/plugin-attributes-enumeration.html - - * kjs/array_object.cpp: - (ArrayInstance::sort): Free the old storage, not the new one. - -2007-04-20 Maciej Stachowiak - - Not reviewed, build fix. - - - fix build problem with last change - -O3 complains more about uninitialized variables - - * pcre/pcre_compile.c: - (compile_branch): - (pcre_compile2): - -2007-04-20 Maciej Stachowiak - - Reviewed by Darin. - - - use mergesort when possible, since it leads to fewer compares (2% JS iBench speedup) - - * kjs/array_object.cpp: - (ArrayInstance::sort): Use mergesort(3) on platforms that have it, since it tends - to do fewer compares than qsort; but avoid it very on large arrays since it uses extra - memory. Also added comments identifying possibly even better sorting algorithms - for sort by string value and sort by compare function. - * kjs/config.h: - -2007-04-20 Maciej Stachowiak - - Reviewed by Darin. - - - bump optimization flags up to -O3 for 1% JS iBench speed improvement - - * Configurations/Base.xcconfig: - -2007-04-20 Mark Rowe - - Reviewed by Maciej. - - Fix bogus optimisation in the generic pthread code path. - - * kjs/collector.cpp: - (KJS::currentThreadStackBase): - -2007-04-20 Mark Rowe - - Reviewed by Anders. - - Improve FreeBSD compatibility, as suggested by Alexander Botero-Lowry. - - * kjs/collector.cpp: - (KJS::currentThreadStackBase): FreeBSD requires that pthread_attr_t's are - initialized via pthread_attr_init before being used in any context. - -2007-04-19 Mark Rowe - - Reviewed by Darin. - - Fix http://bugs.webkit.org/show_bug.cgi?id=13401 - Bug 13401: Reproducible crash calling myArray.sort(compareFn) from within - a sort comparison function - - * kjs/array_object.cpp: - (ArrayInstance::sort): Save/restore the static variables around calls to qsort - to ensure nested calls to ArrayInstance::sort behave correctly. - -2007-04-12 Deneb Meketa - - Reviewed by Darin Adler. - - http://bugs.webkit.org/show_bug.cgi?id=13029 - rdar://problem/4994849 - Bug 13029: Permit NPAPI plug-ins to see HTTP response headers. - This doesn't actually change JavaScriptCore, but that's where npapi.h is. - - * bindings/npapi.h: - Add headers member to NPStream struct. Also increase NP_VERSION_MINOR to 18. - Increasing to >= 17 allows plug-ins to safely detect whether to look for - NPStream::headers. Increasing from 17 to 18 reflects presence of NPObject - enumeration, which was added in a prior patch, and which has been agreed to - constitute version 18 by the plugin-futures list. Also add other missing - bits of npapi.h to catch up from 14 to 18. This includes features that are - not implemented in WebKit, but those are safely stubbed. - -2007-04-10 Geoffrey Garen - - Reviewed by Mark Rowe. - - Fixed last check-in to print in release builds, too. - - * kjs/collector.cpp: - (KJS::getPlatformThreadRegisters): - -2007-04-10 Geoffrey Garen - - Reviewed by John Sullivan, Darin Adler. - - Fixed JavaScript garbage collection leads to - later crash under Rosetta (should abort or leak instead?) - - Log an error message and crash if the kernel reports failure during GC. - We decided to do this instead of just leaking because we don't want people - to get the mistaken impression that running in Rosetta is a supported - configurtion. - - The CRASH macro will also hook into CrashReporter, which will tell us if - many (any?) users run into this issue. - - * kjs/collector.cpp: - (KJS::getPlatformThreadRegisters): - -2007-04-06 Krzysztof Kowalczyk - - Reviewed by darin. - - Coverity fix. Coverity says: - "Event var_deref_model: Variable "sourceRanges" tracked as NULL was passed to a - function that dereferences it" - - * kjs/string_object.cpp: - (KJS::replace): - -2007-04-06 Geoffrey Garen - - Rubber stamped by Adele Peterson. - - * kjs/ExecState.h: Removed obsolete forward/friend declaration of - RuntimeMethodImp. - -2007-04-05 Krzysztof Kowalczyk - - Reviewed by darin. - - Coverity fix. Coverity says: - "Event check_after_deref: Pointer "dateString" dereferenced before NULL check" - - * kjs/date_object.cpp: - (KJS::parseDate): - -2007-04-05 Krzysztof Kowalczyk - - Reviewed by darin. - - Coverity fix. Coverity says: - "Event check_after_deref: Pointer "re" dereferenced before NULL check" - - * pcre/pcre_study.c: - (pcre_study): - -2007-04-05 Krzysztof Kowalczyk - - Reviewed by darin. - - Coverity fixes. Coverity says: - "Event leaked_storage: Returned without freeing storage "buffer"" - and: - "Event leaked_storage: Returned without freeing storage "script"" - - * kjs/testkjs.cpp: - (doIt): - (createStringWithContentsOfFile): - -2007-04-05 Krzysztof Kowalczyk - - Reviewed by darin. - - Coverity fix: in single-threaded case currentThreadIsMainThread is always true - so the code in if (!currentThreadIsMainThread) cannot possibly be reached - and Coverity complains about dead code. - - * kjs/collector.cpp: - (KJS::Collector::collect): - -=== Safari-5522.6 === - -2007-04-03 Kevin McCullough - - Reviewed by Adam. - - - Testing a post-commit hook. - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2007-04-03 Anders Carlsson - - Reviewed by Adam. - - - http://bugs.webkit.org/show_bug.cgi?id=13265 - REGRESSION: Crash in KJS::Bindings::convertValueToNPVariant - - * bindings/NP_jsobject.cpp: - (_NPN_InvokeDefault): - Return false if the object isn't a function. Set the return value to undefined by default - (to match Firefox). - -2007-03-30 Anders Carlsson - - Build fix. - - * bindings/NP_jsobject.cpp: - (_NPN_Enumerate): - -2007-03-30 Anders Carlsson - - Reviewed by Geoff. - - Implement _NPN_Enumerate support. - - * JavaScriptCore.exp: - * bindings/NP_jsobject.cpp: - (_NPN_Enumerate): - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::getPropertyNames): - * bindings/c/c_instance.h: - * bindings/npapi.h: - * bindings/npruntime.h: - * bindings/npruntime_impl.h: - * bindings/runtime.h: - (KJS::Bindings::Instance::getPropertyNames): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::getPropertyNames): - * bindings/runtime_object.h: - (KJS::RuntimeObjectImp::getInternalInstance): - -2007-03-28 Jeff Walden - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=12963 - Fix some inconsistencies in the Mozilla JS Array extras implementations - with respect to the Mozilla implementation: - - - holes in arrays should be skipped, not treated as undefined, - by all such methods - - an element with value undefined is not a hole - - Array.prototype.forEach should return undefined - - * kjs/array_object.cpp: - (ArrayInstance::getOwnPropertySlot): - (ArrayProtoFunc::callAsFunction): - -2007-03-27 Anders Carlsson - - Reviewed by Geoff. - - * bindings/NP_jsobject.cpp: - (_NPN_InvokeDefault): - Call JSObject:call for native JavaScript objects. - -2007-03-26 David Carson - - Reviewed by Darin, landed by Anders. - - Fix for: REGRESSION (r19559): Java applet crash - http://bugs.webkit.org/show_bug.cgi?id=13142 - - - The previous fix http://bugs.webkit.org/show_bug.cgi?id=12636 - introduced new JNIType to enum in jni_utility.h This is a - problem on the Mac as it seems that the JNIType enum is also - used in the JVM, it is used to specify the return type in - jni_objc.mm - Corrected the fix by moving type to the end, and changing - jni_objc.mm to convert the new type to an old compatible - type. - - * bindings/jni/jni_objc.mm: - (KJS::Bindings::dispatchJNICall): - * bindings/jni/jni_utility.h: - -2007-03-26 Christopher Brichford - - Reviewed/landed by Adam. - - Bug 13198: Move build settings from project file to xcconfig file for apollo - port JSCore - http://bugs.webkit.org/show_bug.cgi?id=13198 - - - Moving build settings from xcode project file to xcconfig files. - - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Debug.xcconfig: - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Release.xcconfig: - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig: - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: - -2007-03-26 Brady Eidson - - Rubberstamped by Anders and Maciej aand Geoff (oh my!) - - Since CFTypeRef is really void*, a RetainPtr couldn't be used. - RefType was "void", which doesn't actually exist as a type. - Since RefType only existed for operator*(), and since that operator - doesn't make any sense for RetainPtr, I removed them! - - * kjs/nodes.cpp: Touch this to force a rebuild and (hopefully) help the - compiler with dependencies - * wtf/RetainPtr.h: Nuke RefType and operator*() - -2007-03-26 Geoffrey Garen - - Touched a file to (hopefully) help the compiler with RetainPtr dependencies. - - * kjs/nodes.cpp: - (Node::deref): - -2007-03-24 Brady Eidson - - Reviewed by Adam - - Whoops, RetainPtr should be in the WTF namespace - - * wtf/RetainPtr.h: - -2007-03-24 Brady Eidson - - Reviewed by Adam - - - Move RetainPtr to WTF - - * wtf/RetainPtr.h: Added - * JavaScriptCore.xcodeproj/project.pbxproj: Add it to the project file - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto - - -2007-03-23 Christopher Brichford - - Reviewed/landed by Adam. - - Bug 13175: Make apollo mac project files for JavaScriptCore actually - build something - http://bugs.webkit.org/show_bug.cgi?id=13175 - - - Changing apollo mac project files for JavaScriptCore such that they actually build - JavaScriptCore source code. - - * JavaScriptCore.apolloproj/ForwardingSources/grammar.cpp: Added. - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig: - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: - -2007-03-24 Mark Rowe - - Rubber-stamped by Darin. - - * Configurations/JavaScriptCore.xcconfig: Remove unnecessary INFOPLIST_PREPROCESS. - -2007-03-22 Christopher Brichford - - Reviewed/landed by Adam. - - Bug 13164: Initial version of mac JavaScriptCore project files for - apollo port - http://bugs.webkit.org/show_bug.cgi?id=13164 - - - Adding mac project files for apollo port of JavaScriptCore. Currently project - just builds dftables. - - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Debug.xcconfig: Added. - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Release.xcconfig: Added. - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig: Added. - * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: Added. - -2007-03-21 Timothy Hatcher - - Reviewed by Darin. - - JavaScriptCore has a weak export (vtable for KJS::JSCell) - - * JavaScriptCore.exp: Remove __ZTVN3KJS6JSCellE. - -2007-03-21 Adele Peterson - - Reviewed by Geoff. - - * API/JSStringRef.cpp: (JSStringIsEqual): Added JSLock. - -2007-03-21 Zack Rusin - - Fix the compile when USE(MULTIPLE_THREADS) isn't - defined - - * kjs/JSLock.cpp: - (KJS::JSLock::currentThreadIsHoldingLock): - -2007-03-20 Maciej Stachowiak - - Reviewed by Geoff and Adam. - - - make USE(MULTIPLE_THREADS) support more portable - http://bugs.webkit.org/show_bug.cgi?id=13069 - - - fixed a threadsafety bug discovered by testing this - - - enhanced threadsafety assertions in collector - - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::~JSCallbackObject): This destructor can't - DropAllLocks around the finalize callback, because it gets called - from garbage collection and we can't let other threads collect! - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * kjs/JSLock.cpp: - (KJS::JSLock::currentThreadIsHoldingLock): Added new function - to allow stronger assertions than just that the lock is held - by some thread (you can now assert that the current thread is - holding it, given the new JSLock design). - * kjs/JSLock.h: - * kjs/collector.cpp: Refactored for portability plus added some - stronger assertions. - (KJS::Collector::allocate): - (KJS::currentThreadStackBase): - (KJS::Collector::registerAsMainThread): - (KJS::onMainThread): - (KJS::PlatformThread::PlatformThread): - (KJS::getCurrentPlatformThread): - (KJS::Collector::Thread::Thread): - (KJS::destroyRegisteredThread): - (KJS::Collector::registerThread): - (KJS::Collector::markCurrentThreadConservatively): - (KJS::suspendThread): - (KJS::resumeThread): - (KJS::getPlatformThreadRegisters): - (KJS::otherThreadStackPointer): - (KJS::otherThreadStackBase): - (KJS::Collector::markOtherThreadConservatively): - (KJS::Collector::markStackObjectsConservatively): - (KJS::Collector::protect): - (KJS::Collector::unprotect): - (KJS::Collector::collectOnMainThreadOnly): - (KJS::Collector::markMainThreadOnlyObjects): - (KJS::Collector::collect): - * kjs/collector.h: - * wtf/FastMalloc.cpp: - (WTF::fastMallocSetIsMultiThreaded): - * wtf/FastMallocInternal.h: - * wtf/Platform.h: - -2007-03-19 Darin Adler - - * kjs/value.h: Roll ~JSValue change out. It was causing problems. I'll do it right later. - -2007-03-19 Geoffrey Garen - - Reviewed by John Sullivan. - - Fixed REGRESSION: Crash occurs at WTF::fastFree() - when reloading liveconnect page (applet) - - Best to use free when you use malloc, especially when malloc and delete - use completely different libraries. - - * bindings/jni/jni_runtime.cpp: - (JavaMethod::~JavaMethod): - -2007-03-19 Andrew Wellington - - Reviewed by Maciej. - - Really set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html) - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-03-19 Darin Adler - - Reviewed by Geoff. - - - Changed list size threshold to 5 based on testing. - - I was testing the i-Bench JavaScript with the list statistics - dumping on, and discovered that there were many 5-element lists. - The fast case for lists was for 4 elements and fewer. By changing - the threshold to 5 elements we get a measurable speedup. I believe - this will help real web pages too, not just the benchmark. - - * kjs/list.cpp: Change constant from 4 to 5. - -2007-03-19 Darin Adler - - * kjs/value.h: Oops, fix build. - -2007-03-19 Darin Adler - - Reviewed by Geoff. - - - remove ~JSValue; tiny low-risk performance boost - - * kjs/value.h: Remove unneeded empty virtual destructor from JSValue. - The only class derived from JSValue is JSCell and it already has a - virtual destructor. Declaring an empty constructor in JSValue had one - good effect: it marked the destructor private, making it a compile - time error to try to destroy a JSValue; but that's not a likely - mistake for someone to make. It had two bad effects: (1) it caused gcc, - at least, to generate code to fix up the virtual table pointer to - point to the JSValue version of the virtual table inside the destructor - of all classes derived from JSValue directly or indirectly; (2) it - caused JSValue to be a polymorphic class so required a virtual table for - it. It's cleaner to not have either of those. - -2007-03-18 Maciej Stachowiak - - Reviewed by Mark. - - - avoid static construction (and global variable access) in a smarter, more portable way, - to later enable MUTLI_THREAD mode to work on other platforms and compilers. - - * kjs/CommonIdentifiers.cpp: Added. New class to hold all the shared identifiers. - (KJS::CommonIdentifiers::CommonIdentifiers): - (KJS::CommonIdentifiers::shared): - * kjs/CommonIdentifiers.h: Added. - - * kjs/ExecState.h: - (KJS::ExecState::propertyNames): Hand the CommonIdentifiers instance here for easy access. - (KJS::ExecState::ExecState): - - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): - * CMakeLists.txt: - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * bindings/runtime_array.cpp: - (RuntimeArray::getOwnPropertySlot): - (RuntimeArray::put): - * bindings/runtime_method.cpp: - (RuntimeMethod::getOwnPropertySlot): - * kjs/array_object.cpp: - (ArrayInstance::getOwnPropertySlot): - (ArrayInstance::put): - (ArrayInstance::deleteProperty): - (ArrayProtoFunc::ArrayProtoFunc): - (ArrayProtoFunc::callAsFunction): - (ArrayObjectImp::ArrayObjectImp): - * kjs/bool_object.cpp: - (BooleanPrototype::BooleanPrototype): - (BooleanProtoFunc::BooleanProtoFunc): - (BooleanProtoFunc::callAsFunction): - (BooleanObjectImp::BooleanObjectImp): - * kjs/completion.h: - (KJS::Completion::Completion): - * kjs/date_object.cpp: - (KJS::DateProtoFunc::DateProtoFunc): - (KJS::DateObjectImp::DateObjectImp): - (KJS::DateObjectFuncImp::DateObjectFuncImp): - * kjs/error_object.cpp: - (ErrorPrototype::ErrorPrototype): - (ErrorProtoFunc::ErrorProtoFunc): - (ErrorProtoFunc::callAsFunction): - (ErrorObjectImp::ErrorObjectImp): - (ErrorObjectImp::construct): - (NativeErrorPrototype::NativeErrorPrototype): - (NativeErrorImp::NativeErrorImp): - (NativeErrorImp::construct): - (NativeErrorImp::callAsFunction): - * kjs/function.cpp: - (KJS::FunctionImp::getOwnPropertySlot): - (KJS::FunctionImp::put): - (KJS::FunctionImp::deleteProperty): - (KJS::FunctionImp::getParameterName): - (KJS::DeclaredFunctionImp::construct): - (KJS::IndexToNameMap::unMap): - (KJS::Arguments::Arguments): - (KJS::ActivationImp::getOwnPropertySlot): - (KJS::ActivationImp::deleteProperty): - (KJS::GlobalFuncImp::GlobalFuncImp): - * kjs/function_object.cpp: - (FunctionPrototype::FunctionPrototype): - (FunctionProtoFunc::FunctionProtoFunc): - (FunctionProtoFunc::callAsFunction): - (FunctionObjectImp::FunctionObjectImp): - (FunctionObjectImp::construct): - * kjs/grammar.y: - * kjs/identifier.cpp: - * kjs/identifier.h: - * kjs/interpreter.cpp: - (KJS::Interpreter::init): - (KJS::Interpreter::initGlobalObject): - * kjs/interpreter.h: - * kjs/lookup.h: - * kjs/math_object.cpp: - (MathFuncImp::MathFuncImp): - * kjs/nodes.cpp: - (ArrayNode::evaluate): - (FuncDeclNode::processFuncDecl): - (FuncExprNode::evaluate): - * kjs/number_object.cpp: - (NumberPrototype::NumberPrototype): - (NumberProtoFunc::NumberProtoFunc): - (NumberObjectImp::NumberObjectImp): - * kjs/object.cpp: - (KJS::JSObject::put): - (KJS::JSObject::defaultValue): - (KJS::JSObject::hasInstance): - * kjs/object.h: - (KJS::JSObject::getOwnPropertySlot): - * kjs/object_object.cpp: - (ObjectPrototype::ObjectPrototype): - (ObjectProtoFunc::ObjectProtoFunc): - (ObjectObjectImp::ObjectObjectImp): - * kjs/regexp_object.cpp: - (RegExpPrototype::RegExpPrototype): - (RegExpProtoFunc::RegExpProtoFunc): - (RegExpObjectImp::RegExpObjectImp): - * kjs/string_object.cpp: - (KJS::StringInstance::getOwnPropertySlot): - (KJS::StringInstance::put): - (KJS::StringInstance::deleteProperty): - (KJS::StringPrototype::StringPrototype): - (KJS::StringProtoFunc::StringProtoFunc): - (KJS::StringProtoFunc::callAsFunction): - (KJS::StringObjectImp::StringObjectImp): - (KJS::StringObjectFuncImp::StringObjectFuncImp): - * kjs/testkjs.cpp: - (TestFunctionImp::TestFunctionImp): - -2007-03-18 Andrew Wellington - - Reviewed by Mark Rowe - - Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html) - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-03-19 Mark Rowe - - Rubber-stamped by Brady. - - Update references to bugzilla.opendarwin.org with bugs.webkit.org. - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertUTF8ToUTF16): - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - * kjs/grammar.y: - * kjs/keywords.table: - * kjs/lexer.cpp: - (KJS::Lexer::shift): - -2007-03-18 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Exposed some extra toUInt32 functionality, as part of the fix for - REGRESSION: Incomplete document.all implementation breaks abtelectronics.com - (Style Change Through JavaScript Blanks Content) - - * JavaScriptCore.exp: - * kjs/identifier.h: - (KJS::Identifier::toUInt32): - -2007-03-18 Geoffrey Garen - - Removed duplicate export name. - - * JavaScriptCore.exp: - -2007-03-15 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed Repro ASSERT failure in JS Bindings when - closing window @ lowtrades.bptrade.com - - Unfortunately, the bindings depend on UString and Identifier as string - representations. So, they need to acquire the JSLock when doing something - that will ref/deref their strings. - - Layout tests, the original site, and Java, Flash, and Quicktime on the - web work. No leaks reported. No automated test for this because testing - the Java bindings, like math, is hard. - - * bindings/runtime.h: Made Noncopyable, just to be sure. - - * bindings/c/c_class.cpp: - (KJS::Bindings::CClass::~CClass): Acquire the JSLock and explicitly clear the keys - in our hashtable, since they're UString::Reps, and ref/deref aren't thread-safe. - (KJS::Bindings::CClass::methodsNamed): Also acquire the JSLock when adding - keys to the table, since the table ref's them. - (KJS::Bindings::CClass::fieldNamed): ditto. - - * bindings/c/c_utility.cpp: Removed dead function. - (KJS::Bindings::convertValueToNPVariant): Acquire the JSLock because doing - it recursively is pretty cheap, and it's just too confusing to tell whether - all our callers do it for us. - (KJS::Bindings::convertNPVariantToValue): ditto - * bindings/c/c_utility.h: - - * bindings/jni/jni_class.cpp: Same deal as c_class.cpp. - (JavaClass::JavaClass): - (JavaClass::~JavaClass): - - * bindings/jni/jni_instance.cpp: Same deal as c_utility.cpp. - (JavaInstance::stringValue): - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::convertValueToJObject): - - * bindings/jni/jni_runtime.cpp: - (JavaMethod::~JavaMethod): Moved from header, for clarity. - (appendClassName): Made this static, so the set of callers is known, and - we can assert that we hold the JSLock. Also changed it to take a UString - reference, which makes the calling code simpler. - (JavaMethod::signature): Store the ASCII value we care about instead of - a UString, since UString is so much more hassle. Hold the JSLock while - building up the temporary UString. - - * bindings/jni/jni_runtime.h: Nixed dead code in JavaMethod. - (KJS::Bindings::JavaString::JavaString): Hold a UString::Rep instead of - a UString, so we can acquire the JSLock and explicitly release it. - (KJS::Bindings::JavaString::_commonInit): - (KJS::Bindings::JavaString::~JavaString): - (KJS::Bindings::JavaString::UTF8String): - (KJS::Bindings::JavaString::uchars): - (KJS::Bindings::JavaString::length): - (KJS::Bindings::JavaString::ustring): - - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::convertArrayInstanceToJavaArray): Made this static, so - the set of callers is known, and we can assert that we hold the JSLock. - (KJS::Bindings::convertValueToJValue): Acquire the JSLock because doing - it recursively is pretty cheap, and it's just too confusing to tell whether - all our callers do it for us. - - * bindings/objc/objc_runtime.h: Nixed some dead code. - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertNSStringToString): Same drill as above. - -2007-03-18 Alexey Proskuryakov - - Reviewed by Geoff. - - http://bugs.webkit.org/show_bug.cgi?id=13105 - REGRESSION: an exception raised when calculating base value of a dot expression is not returned - - Test: fast/js/dot-node-base-exception.html - - * kjs/nodes.cpp: - (FunctionCallDotNode::evaluate): Added the necessary KJS_CHECKEXCEPTIONVALUE. - -2007-03-18 Steve Falkenburg - - Build fix. - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2007-03-17 Timothy Hatcher - - Reviewed by Mark Rowe. - - Made Version.xcconfig smarter when building for different configurations. - Now uses the 522+ OpenSource version for Debug and Release, while using the - full 522.4 version for Production builds. The system prefix is also computed - based on the current system, so 4522.4 on Tiger and 5522.4 on Leopard. - - * Configurations/JavaScriptCore.xcconfig: - * Configurations/Version.xcconfig: - -2007-03-15 Maciej Stachowiak - - Not reviewed. - - - build fix - - * wtf/TCSystemAlloc.cpp: - -2007-03-15 Maciej Stachowiak - - Reviewed by Geoff and Steve. - - - fix some portability issues with TCMalloc. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * kjs/config.h: - * wtf/FastMalloc.cpp: - (WTF::SizeClass): - (WTF::InitSizeClasses): - (WTF::TCMalloc_PageHeap::Split): - (WTF::TCMalloc_PageHeap::RegisterSizeClass): - (WTF::TCMalloc_Central_FreeList::length): - (WTF::TCMalloc_ThreadCache::InitTSD): - (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): - * wtf/TCSpinLock.h: - * wtf/TCSystemAlloc.cpp: - (TryVirtualAlloc): - (TCMalloc_SystemAlloc): - -2007-03-15 Timothy Hatcher - - Reviewed by John. - - * Factored out most of our common build settings into .xcconfig files. Anything that was common in - each build configuration was factored out into the shared .xcconfig file. - * Adds a Version.xcconfig file to define the current framework version, to be used in other places. - * Use the new $(BUNDLE_VERSION) (defined in Version.xcconfig) in the preprocessed Info.plist. - * Use the versions defined in Version.xcconfig to set $(DYLIB_CURRENT_VERSION). - - * Configurations/Base.xcconfig: Added. - * Configurations/DebugRelease.xcconfig: Added. - * Configurations/JavaScriptCore.xcconfig: Added. - * Configurations/Version.xcconfig: Added. - * Info.plist: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-03-16 Shrikant Gangoda - - Gdk build fix. - - * kjs/DateMath.cpp: gettimeofday comes from on Linux. - -2007-03-14 Kevin McCullough - - Reviewed by . - - - Fixed one more build breakage - - * kjs/date_object.cpp: - (KJS::formatLocaleDate): - -2007-03-14 Kevin McCullough - - Reviewed by . - - - Fixed a build breakage. - - * kjs/DateMath.cpp: - * kjs/date_object.cpp: - (KJS::formatLocaleDate): - (KJS::DateObjectImp::construct): - -2007-03-14 Kevin McCullough - - Reviewed by Geoff. - - - rdar://problem/5045720 - - DST changes in US affect JavaScript date calculations (12975) - This fix was to ensure we properly test for the new changes to DST in the US. - Also this fixes when we apply DST, now we correctly map most past years to current - DST rules. We still have a small issue with years before 1900 or after 2100. - rdar://problem/5055038 - - * kjs/DateMath.cpp: Fix DST to match spec better. - (KJS::getCurrentUTCTime): - (KJS::mimimumYearForDST): - (KJS::maximumYearForDST): - (KJS::equivalentYearForDST): - (KJS::getDSTOffset): - * kjs/DateMath.h: Consolodated common funtionality. - * kjs/date_object.cpp: Consolodated common functionality. - (KJS::formatLocaleDate): - (KJS::DateObjectImp::construct): - * tests/mozilla/ecma/jsref.js: Added functions for finding the correct days when DST starts and ends. - * tests/mozilla/ecma/shell.js: Added back in the old DST functions for ease of merging with mozilla if needed. - * tests/mozilla/ecma_2/jsref.js: Added functions for finding the correct days when DST starts and ends. - * tests/mozilla/ecma_3/Date/shell.js: Added functions for finding the correct days when DST starts and ends. - * tests/mozilla/expected.html: Updated to show all date tests passing. - -=== Safari-5522.4 === - -2007-03-13 Kevin McCullough - - Reviewed by . - - - Adding expected failures until the are truly fixed. - - rdar://problem/5060302 - - * tests/mozilla/expected.html: - -2007-03-12 Kevin McCullough - - Reviewed by . - - - Actually update tests for new DST rules. - - * tests/mozilla/ecma/Date/15.9.3.1-1.js: - * tests/mozilla/ecma/Date/15.9.3.1-2.js: - * tests/mozilla/ecma/Date/15.9.3.1-3.js: - * tests/mozilla/ecma/Date/15.9.3.1-4.js: - * tests/mozilla/ecma/Date/15.9.3.1-5.js: - * tests/mozilla/ecma/Date/15.9.3.2-1.js: - * tests/mozilla/ecma/Date/15.9.3.2-2.js: - * tests/mozilla/ecma/Date/15.9.3.2-3.js: - * tests/mozilla/ecma/Date/15.9.3.2-4.js: - * tests/mozilla/ecma/Date/15.9.3.2-5.js: - * tests/mozilla/ecma/Date/15.9.3.8-1.js: - * tests/mozilla/ecma/Date/15.9.3.8-2.js: - * tests/mozilla/ecma/Date/15.9.3.8-3.js: - * tests/mozilla/ecma/Date/15.9.3.8-4.js: - * tests/mozilla/ecma/Date/15.9.3.8-5.js: - * tests/mozilla/ecma/Date/15.9.5.10-1.js: - * tests/mozilla/ecma/Date/15.9.5.10-10.js: - * tests/mozilla/ecma/Date/15.9.5.10-11.js: - * tests/mozilla/ecma/Date/15.9.5.10-12.js: - * tests/mozilla/ecma/Date/15.9.5.10-13.js: - * tests/mozilla/ecma/Date/15.9.5.10-2.js: - * tests/mozilla/ecma/Date/15.9.5.10-3.js: - * tests/mozilla/ecma/Date/15.9.5.10-4.js: - * tests/mozilla/ecma/Date/15.9.5.10-5.js: - * tests/mozilla/ecma/Date/15.9.5.10-6.js: - * tests/mozilla/ecma/Date/15.9.5.10-7.js: - * tests/mozilla/ecma/Date/15.9.5.10-8.js: - * tests/mozilla/ecma/Date/15.9.5.10-9.js: - * tests/mozilla/ecma/jsref.js: - * tests/mozilla/ecma_2/jsref.js: - * tests/mozilla/ecma_3/Date/shell.js: - -2007-03-12 Kevin McCullough - - Reviewed by . - - - Update tests for new DST rules. - - * tests/mozilla/ecma/shell.js: - -2007-03-11 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed Installer crashes in KJS::Collector:: - markOtherThreadConservatively(KJS::Collector::Thread*) trying to install - iLife 06 using Rosetta on an Intel Machine - - The problem was that our thread-specific data destructor would modify the - list of active JavaScript threads without holding the JSLock, corrupting - the list. Corruption was especially likely if one JavaScript thread exited - while another was starting up. - - * JavaScriptCore.exp: - * kjs/JSLock.cpp: Don't conflate locking the JSLock with registering a - thread, since the thread-specific data destructor needs to lock - without registering a thread. Instead, treat thread registration as a - part of the convenience of the JSLock object, and whittle down JSLock::lock() - to just the bits that actually do the locking. - (KJS::JSLock::lock): - (KJS::JSLock::registerThread): - * kjs/JSLock.h: Updated comments to mention the new behavior above, and - other recent changes. - (KJS::JSLock::JSLock): - * kjs/collector.cpp: - (KJS::destroyRegisteredThread): Lock here. - (KJS::Collector::registerThread): To match, assert that we're locked here. - -2007-03-10 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed PAC file: lock inversion between QT and - JSCore causes a hang @ www.panoramas.dk - - With a PAC file, run-webkit-tests --threaded passes, the reported site - works, and all the Quicktime/JavaScript and Flash/JavaScript examples - I found through Google work, too. - - Any time JavaScript causes arbitrary non-JavaScript code to execute, it - risks deadlock, because that code may block, trying to acquire a lock - owned by a thread that is waiting to execute JavaScript. In this case, - the thread was a networking thread that was waiting to interpret a PAC file. - - Because non-JavaScript code may execute in response to, well, anything, - a perfect solution to this problem is impossible. I've implemented an - optimistic solution, instead: JavaScript will drop its lock whenever it - makes a direct call to non-JavaScript code through a bridging/plug-in API, - but will blissfully ignore the indirect ways it may cause non-JavaScript - code to run (resizing a window, for example). - - Unfortunately, this solution introduces significant locking overhead in - the bridging APIs. I don't see a way around that. - - This patch includes some distinct bug fixes I saw along the way: - - * bindings/objc/objc_instance.mm: Fixed a bug where a nested begin() call - would leak its autorelease pool, because it would NULL out _pool without - draining it. - - * bindings/runtime_object.cpp: - (RuntimeObjectImp::methodGetter): Don't copy an Identifier to ASCII only - to turn around and make an Identifier from the ASCII. In an earlier - version of this patch, the copy caused an assertion failure. Now it's - just unnecessary work. - (RuntimeObjectImp::getOwnPropertySlot): ditto - - * bindings/objc/objc_instance.h: Removed overrides of setVAlueOfField and - getValueOfField, because they did exactly what the base class versions did. - Removed overrides of Noncopyable declarations for the same reason. - - * bindings/runtime.h: Inherit from Noncopyable instead of rolling our own. - * bindings/c/c_instance.h: ditto - - And the actual patch: - - * API/JSCallbackConstructor.cpp: Drop all locks when calling out to C. - (KJS::JSCallbackConstructor::construct): - * API/JSCallbackFunction.cpp: ditto - (KJS::JSCallbackFunction::callAsFunction): - * API/JSCallbackObject.cpp: ditto - (KJS::JSCallbackObject::init): - (KJS::JSCallbackObject::~JSCallbackObject): - (KJS::JSCallbackObject::getOwnPropertySlot): - (KJS::JSCallbackObject::put): - (KJS::JSCallbackObject::deleteProperty): - (KJS::JSCallbackObject::construct): - (KJS::JSCallbackObject::hasInstance): - (KJS::JSCallbackObject::callAsFunction): - (KJS::JSCallbackObject::getPropertyNames): - (KJS::JSCallbackObject::toNumber): - (KJS::JSCallbackObject::toString): - (KJS::JSCallbackObject::staticValueGetter): - (KJS::JSCallbackObject::callbackGetter): - - * bindings/c/c_instance.cpp: Drop all locks when calling out to C. - (KJS::Bindings::CInstance::invokeMethod): - (KJS::Bindings::CInstance::invokeDefaultMethod): - * bindings/c/c_runtime.cpp: Drop all locks when calling out to C. - (KJS::Bindings::CField::valueFromInstance): - (KJS::Bindings::CField::setValueToInstance): - * bindings/jni/jni_objc.mm: - (KJS::Bindings::dispatchJNICall): Drop all locks when calling out to Java. - - * bindings/objc/objc_instance.mm: The changes here are to accomodate the - fact that C++ unwinding of DropAllLocks goes crazy when you put it inside - a @try block. I moved all JavaScript stuff outside of the @try blocks, and - then prefixed the whole blocks with DropAllLocks objects. This required some - supporting changes in other functions, which now acquire the JSLock for - themselves, intead of relying on their callers to do so. - (ObjcInstance::end): - (ObjcInstance::invokeMethod): - (ObjcInstance::invokeDefaultMethod): - (ObjcInstance::setValueOfUndefinedField): - (ObjcInstance::getValueOfUndefinedField): - * bindings/objc/objc_runtime.mm: Same as above, except I didn't want to - change throwError to acquire the JSLock for itself. - (ObjcField::valueFromInstance): - (ObjcField::setValueToInstance): - * bindings/objc/objc_utility.mm: Supporting changes mentioned above. - (KJS::Bindings::convertValueToObjcValue): - (KJS::Bindings::convertObjcValueToValue): - - * kjs/JSLock.cpp: - (1) Fixed DropAllLocks to behave as advertised, and drop the JSLock only - if the current thread actually acquired it in the first place. This is - important because WebKit needs to ensure that the JSLock has been - dropped before it makes a plug-in call, even though it doesn't know if - the current thread actually acquired the JSLock. (We don't want WebKit - to accidentally drop a lock belonging to *another thread*.) - (2) Used the new per-thread code written for (1) to make recursive calls - to JSLock very cheap. JSLock now knows to call pthread_mutext_lock/ - pthread_mutext_unlock only at nesting level 0. - (KJS::createDidLockJSMutex): - (KJS::JSLock::lock): - (KJS::JSLock::unlock): - (KJS::DropAllLocks::DropAllLocks): - (KJS::DropAllLocks::~DropAllLocks): - (KJS::JSLock::lockCount): - * kjs/JSLock.h: Don't duplicate Noncopyable. - (KJS::JSLock::~JSLock): - - * wtf/Assertions.h: Blind attempt at helping the Windows build. - -2007-03-08 Darin Fisher - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=13018 - Bug 13018: allow embedders to override the definition of CRASH. - - * wtf/Assertions.h: make it possible to override CRASH. - -2007-03-07 Huan Ren - - Reviewed by Maciej. - - Fix http://bugs.webkit.org/show_bug.cgi?id=12535 - Bug 12535: Stack-optimizing compilers can trick GC into freeing in-use objects - - * kjs/internal.cpp: - (KJS::StringImp::toObject): Copy val onto the stack so it is not subject to garbage collection. - -2007-03-07 Geoffrey Garen - - Build fix for non-multiple-thread folks. - - Use a shared global in the non-multiple-thread case. - - * wtf/FastMalloc.cpp: - (WTF::isForbidden): - (WTF::fastMallocForbid): - (WTF::fastMallocAllow): - -2007-03-07 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed ASSERT failure I just introduced. - - Made the fastMalloc isForbidden flag per thread. (Oops!) We expect that - other threads will malloc while we're marking -- we just want to prevent - our own marking from malloc'ing. - - * wtf/FastMalloc.cpp: - (WTF::initializeIsForbiddenKey): - (WTF::isForbidden): - (WTF::fastMallocForbid): - (WTF::fastMallocAllow): - (WTF::fastMalloc): - (WTF::fastCalloc): - (WTF::fastFree): - (WTF::fastRealloc): - (WTF::do_malloc): - -2007-03-07 Shrikant Gangoda - - Reviewed by Maciej. - - http://bugs.webkit.org/show_bug.cgi?id=12997 - - Wrap pthread-specific assertion in #if USE(MULTIPLE_THREADS). - - * kjs/collector.cpp: - (KJS::Collector::markMainThreadOnlyObjects): - -2007-03-06 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed | http://bugs.webkit.org/show_bug.cgi?id=12586 - PAC file: malloc deadlock sometimes causes a hang @ www.apple.com/pro/profiles/ (12586) - - This is a modified version of r14752 on the branch. - - These changes just add debugging functionality. They ASSERT that we don't - malloc during the mark phase of a garbage collection, which can cause a - deadlock. - - * kjs/collector.cpp: - (KJS::Collector::collect): - * wtf/FastMalloc.cpp: - (WTF::fastMallocForbid): - (WTF::fastMallocAllow): - (WTF::fastMalloc): - (WTF::fastCalloc): - (WTF::fastFree): - (WTF::fastRealloc): - (WTF::do_malloc): - * wtf/FastMalloc.h: - -2007-03-06 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed all known crashers exposed by run-webkit-tests --threaded. This covers: - - | http://bugs.webkit.org/show_bug.cgi?id=12585 - PAC file: after closing a window that contains macworld.com, new window - crashes (KJS::PropertyMap::mark()) (12585) - | http://bugs.webkit.org/show_bug.cgi?id=9211 - PAC file: Crash occurs when clicking on the navigation tabs at http://www.businessweek.com/ (9211) - - PAC file: Crash occurs when attempting to view image in slideshow mode - at http://d.smugmug.com/gallery/581716 ( KJS::IfNode::execute (KJS:: - ExecState*) + 312) if you use a PAC file - - (1) Added some missing JSLocks, along with related ASSERTs. - - (2) Fully implemented support for objects that can only be garbage collected - on the main thread. So far, only WebCore uses this. We can add it to API - later if we learn that it's needed. - - The implementation uses a "main thread only" flag inside each object. When - collecting on a secondary thread, the Collector does an extra pass through - the heap to mark all flagged objects before sweeping. This solution makes - the common case -- flag lots of objects, but never collect on a secondary - thread -- very fast, even though the uncommon case of garbage collecting - on a secondary thread isn't as fast as it could be. I left some notes - about how to speed it up, if we ever care. - - For posterity, here are some things I learned about GC while investigating: - - * Each collect must either mark or delete every heap object. "Zombie" - objects, which are neither marked nor deleted, raise these issues: - - * On the next pass, the conservative marking algorithm might mark a - zombie, causing it to mark freed objects. - - * The client might try to use a zombie, which would seem live because - its finalizer had not yet run. - - * A collect on the main thread is free to delete any object. Presumably, - objects allocated on secondary threads have thread-safe finalizers. - - * A collect on a secondary thread must not delete thread-unsafe objects. - - * The mark function must be thread-safe. - - Line by line comments: - - * API/JSObjectRef.h: Added comment specifying that the finalize callback - may run on any thread. - - * JavaScriptCore.exp: Nothing to see here. - - * bindings/npruntime.cpp: - (_NPN_GetStringIdentifier): Added JSLock. - - * bindings/objc/objc_instance.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::~ObjcInstance): Use an autorelease pool. The other callers - to CFRelease needed one, too, but they were dead code, so I removed them - instead. (This fixes a leak seen while running run-webkit-tests --threaded, - although I don't think it's specifically a threading issue.) - - * kjs/collector.cpp: - (KJS::Collector::collectOnMainThreadOnly): New function. Tells the collector - to collect a value only if it's collecting on the main thread. - (KJS::Collector::markMainThreadOnlyObjects): New function. Scans the heap - for "main thread only" objects and marks them. - - * kjs/date_object.cpp: - (KJS::DateObjectImp::DateObjectImp): To make the new ASSERTs happy, allocate - our globals on the heap, avoiding a seemingly unsafe destructor call at - program exit time. - * kjs/function_object.cpp: - (FunctionPrototype::FunctionPrototype): ditto - - * kjs/interpreter.cpp: - (KJS::Interpreter::mark): Removed boolean parameter, which was an incomplete - and arguably hackish way to implement markMainThreadOnlyObjects() inside WebCore. - * kjs/interpreter.h: - - * kjs/identifier.cpp: - (KJS::identifierTable): Added some ASSERTs to check for thread safety - problems. - - * kjs/list.cpp: Added some ASSERTs to check for thread safety problems. - (KJS::allocateListImp): - (KJS::List::release): - (KJS::List::append): - (KJS::List::empty): Make the new ASSERTs happy. - - * kjs/object.h: - (KJS::JSObject::JSObject): "m_destructorIsThreadSafe" => "m_collectOnMainThreadOnly". - I removed the constructor parameter because m_collectOnMainThreadOnly, - like m_marked, is a Collector bit, so only the Collector should set or get it. - - * kjs/object_object.cpp: - (ObjectPrototype::ObjectPrototype): Make the ASSERTs happy. - * kjs/regexp_object.cpp: - (RegExpPrototype::RegExpPrototype): ditto - - * kjs/ustring.cpp: Added some ASSERTs to check for thread safety problems. - (KJS::UCharReference::ref): - (KJS::UString::Rep::createCopying): - (KJS::UString::Rep::create): - (KJS::UString::Rep::destroy): - (KJS::UString::null): Make the new ASSERTs happy. - * kjs/ustring.h: - (KJS::UString::Rep::ref): Added some ASSERTs to check for thread safety problems. - (KJS::UString::Rep::deref): - - * kjs/value.h: - (KJS::JSCell::JSCell): - -2007-03-06 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - 2% speedup on super accurate JS iBench. - - (KJS::Collector::collect): Removed anti-optimization to call - pthread_is_threaded_np() before calling pthread_main_np(). Almost all - apps have more than one thread, so the extra call is actually worse. - Interestingly, even the single-threaded testkjs shows a speed gain - from removing the pthread_is_threaded_np() short-circuit. Not sure why. - -2007-03-04 Peter Kasting - - Reviewed by Nikolas Zimmermann. - - - fix http://bugs.webkit.org/show_bug.cgi?id=12950 - Assertions.cpp should not #define macros that are already defined - - * wtf/Assertions.cpp: Don't #define WINVER and _WIN32_WINNT if they - are already defined. - -2007-03-02 Steve Falkenburg - - Reviewed by Anders. - - Add unsigned int hash traits (matches existing unsigned long version) - - * wtf/HashTraits.h: - (WTF::): - -2007-03-02 Adam Roben - - Reviewed by Kevin M. - - Try to fix the Qt build. - - * kjs/DateMath.cpp: - (KJS::msToGregorianDateTime): Removed unnecessary "struct" keyword. - * kjs/DateMath.h: Moved forward declarations to the top of the file - before they are used. - * kjs/date_object.cpp: - (KJS::formatLocaleDate): Changed to take a const GregorianDateTime& - since GregorianDateTime is Noncopyable. - -2007-03-02 Darin Adler - - Reviewed by Kevin McCullough. - - - fix http://bugs.webkit.org/show_bug.cgi?id=12867 - REGRESSION: BenchJS test 7 (dates) is 220% slower than in Safari 2.0.4 - - * kjs/DateMath.h: Marked GregorianDateTime as noncopyable, since it has a non-trivial - destructor and not the correspoding copy constructor or assignment operator. - Changed the GregorianDateTime constructor to use member initialization syntax. - Fixed the destructor to use the array delete operator, since timeZone is an array. - - * kjs/DateMath.cpp: - (KJS::daysInYear): Changed to call isLeapYear so the rule is not repeated twice. - (KJS::getUTCOffset): Added caching on PLATFORM(DARWIN), since we can rely on the - notify_check function and "com.apple.system.timezone" to let us know when the - offset has changed. - -2007-02-27 Geoffrey Garen - - Reviewed by Darin Adler. - - Follow-up to fixing http://bugs.webkit.org/show_bug.cgi?id=12659 | - JS objects not collected after closing window @ ebay.com/maps.google.com - - Changed Interpreter cache of global constructors and prototypes from - ProtectedPtrs to bare, marked pointers. ProtectedPtrs are inefficient, - and they increase the risk of reference cycles. Also, Darin said something - about ProtectedPtrs giving him warts. - - Also changed data members to precise types from generic JSObject*'s. - - Layout tests and JS tests pass. - - * kjs/SavedBuiltins.h: - * kjs/interpreter.cpp: - (KJS::Interpreter::init): - (KJS::Interpreter::~Interpreter): - (KJS::Interpreter::initGlobalObject): Moved Identifier::init() call to - constructor, for clarity. - (KJS::Interpreter::mark): - * kjs/interpreter.h: - -2007-02-27 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=12659 | - JS objects not collected after closing window @ ebay.com/maps.google.com - - Don't GC in the Interpreter destructor. For that to work, the Interpreter - would have to NULL out all of its ProtectedPtrs before calling collect(). But - we've decided that we don't want things to work that way, anyway. We want the - client to be in charge of manual GC so that it can optimize cases when - it will be destroying many interpreters at once - (e.g., http://bugs.webkit.org/show_bug.cgi?id=12900). - - Also removed Interpreter::collect() because it was redundant with - Collector::collect(). - - * JavaScriptCore.exp: - * kjs/interpreter.cpp: - (KJS::Interpreter::~Interpreter): - * kjs/testkjs.cpp: - (TestFunctionImp::callAsFunction): - -2007-02-26 Krzysztof Kowalczyk - - Reviewed by Adam Roben. - - Rename *_SUPPORT defines to ENABLE_*. - - * jscore.bkl: - -2007-02-26 Maciej Stachowiak - - Reviewed by Lars. - - - Disable experimental SVG features (12883) - - * wtf/Platform.h: Add ENABLE() macro similar to HAVE() and USE(), to - allow nicer handling of optional WebKit features. - -2007-02-22 George Staikos - - Reviewed by Lars. - - Add return values - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - -2007-02-22 Oscar Cwajbaum - - Reviewed by Maciej. - - Fix ARM-specific alignment problem in FastMalloc - http://bugs.webkit.org/show_bug.cgi?id=12841 - - * wtf/FastMalloc.cpp: - Modify how pageheap_memory is declared to ensure proper alignment - on architectures such as ARM - -2007-02-20 Zack Rusin - - Reviewed by Lars - - Make sure that non-void methods always return something. - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::foldCase): - -2007-02-18 Kevin Ollivier - - Reviewed by Adam Roben. - - Fix cases where MSVC-specific code was identified as Win32 platform - code. (as it should be compiled for e.g. wx port when using MSVC too) - - * wtf/Assertions.h: - * wtf/MathExtras.h: - * wtf/StringExtras.h: - changed PLATFORM(WIN) sections to COMPILER(MSVC) as necessary - -2007-02-17 Krzysztof Kowalczyk - - Reviewed by Adam Roben. - - Fix crashes on ARM due to different struct packing. Based on a patch - by Mike Emmel. - * kjs/ustring.cpp: compile-time assert to make sure sizeof(UChar) == 2 - * kjs/ustring.h: pack UChar struct to ensure that sizeof(UChar) == 2 - * wtf/Assertions.h: add COMPILE_ASSERT macro for compile-time assertions - -2007-02-16 George Staikos - - Reviewed by Maciej. - - Fix uninitialized variable - - * bindings/testbindings.cpp: - (myAllocate): - -2007-02-16 Anders Carlsson - - Reviewed by Mitz. - - http://bugs.webkit.org/show_bug.cgi?id=12788 - REGRESSION: Going back one page in history has a noticeable delay - - Um...if all elements in two vectors are equal, then I guess we could say that - the two vectors are equal too. - - * wtf/Vector.h: - (WTF::): - -2007-02-14 Anders Carlsson - - Reviewed by Darin. - - Add new canCompareWithMemcmp vector trait and use it to determine whether - operator== can use memcmp. - - * wtf/Vector.h: - (WTF::): - (WTF::VectorTypeOperations::compare): - (WTF::operator==): - * wtf/VectorTraits.h: - (WTF::): - -2007-02-13 Brady Eidson - - Reviewed by Darin - - Tweaked vector a bit - - * wtf/Vector.h: - (WTF::operator==): - -2007-02-13 Matt Perry - - Reviewed by Darin. - - - fix for http://bugs.webkit.org/show_bug.cgi?id=12750 - Vector operator== was not defined correctly. It returned void, - did not accept const Vectors, and used an int instead of size_t. - - * wtf/Vector.h: fixed comparison operators - (WTF::operator==): - (WTF::operator!=): - -2007-02-10 David Carson - - Reviewed by Maciej. - - - fix for http://bugs.webkit.org/show_bug.cgi?id=12636 - Corrected the generation of method signatures when the parameter - is an Array. - Added support for converting a Javascript array to a Java array. - - * bindings/jni/jni_utility.h: added new type for array, array_type - * bindings/jni/jni_runtime.cpp: add support for new array type - (JavaField::valueFromInstance): - (JavaField::setValueToInstance): - (JavaMethod::JavaMethod): - (JavaMethod::signature): - * bindings/jni/jni_utility.cpp: add support for new array type - (KJS::Bindings::callJNIMethod): - (KJS::Bindings::callJNIStaticMethod): - (KJS::Bindings::callJNIMethodIDA): - (KJS::Bindings::JNITypeFromClassName): - (KJS::Bindings::signatureFromPrimitiveType): - (KJS::Bindings::JNITypeFromPrimitiveType): - (KJS::Bindings::getJNIField): - (KJS::Bindings::convertArrayInstanceToJavaArray): new method - converts the Javascript array to the requested Java array. - (KJS::Bindings::convertValueToJValue): - -2007-02-08 Anders Carlsson - - Reviewed by Geoff. - - - Safari complains about "Slow Script" if GMail is left open and machine is busy - - - Turn off slow script dialog or crank up time that makes it come up - - - Slow script warning is displayed after closing of PROMPT or PRINT dialog - - Re-do the way script timeouts are handled. No longer use a unix timer that sends signals. Instead, add a - tick count and increment it in loop bodies. If the tick count reaches a threshold, do a timeout check. If the total time executing - is higher than the timeout value, (possibly) interrupt the script. The timeout checker also adjusts the threshold dynamically - to prevent doing the timeout check too often. - - * JavaScriptCore.exp: - Remove pause and resume calls. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Add winmm.lib. - - * kjs/interpreter.cpp: - (KJS::Interpreter::init): - (KJS::Interpreter::~Interpreter): - (KJS::Interpreter::startTimeoutCheck): - (KJS::Interpreter::stopTimeoutCheck): - (KJS::Interpreter::resetTimeoutCheck): - (KJS::getCurrentTime): - (KJS::Interpreter::checkTimeout): - * kjs/interpreter.h: - (KJS::Interpreter::timedOut): - * kjs/nodes.cpp: - (DoWhileNode::execute): - (WhileNode::execute): - (ForNode::execute): - -2007-02-07 Darin Adler - - * JavaScriptCore.vcproj/JavaScriptCore.sln: Reenable testkjs. - -2007-02-07 Darin Adler - - Reviewed by Geoff. - - - another build fix; this time for sure - - * pcre/pcre_exec.c: (match): - The compiler caught an incorrect use of the othercase variable across - a call to RMATCH in character repeat processing. Local variables can - change in the crazy NO_RECURSE mode that we use, so we instead need - the value in othercase to be in one of the special stack frame variables. - Added a new stack frame variable for this purpose named repeat_othercase. - Also noted a similar error in the non-UTF-16 side of the #ifdef, but - didn't try to fix that one. Also removed a SUPPORT_UCP #ifdef from the - PCRE_UTF16 side; that code doesn't work without the Unicde properties - table, and we don't try to use it that way. - -2007-02-06 Steve Falkenburg - - Disable testkjs in sln until we figure out mysterious compiler warning. - - * JavaScriptCore.vcproj/JavaScriptCore.sln: - -2007-02-06 Steve Falkenburg - - Build fix by ggaren - - * pcre/pcre_exec.c: - (match): - -2007-02-06 Darin Adler - - Reviewed by Geoff. - - - fix PCRE should avoid setjmp/longjmp even when compiler - is not GCC - - Added a new code path that's slower and way uglier but doesn't rely on GCC's - computed gotos. - - * pcre/pcre_exec.c: Added a numeric parameter to the RMATCH function. It must be - different at every RMATCH call site. Changed the non-GCC NO_RECURSE version of - the macro to use a label incorporating the number. Changed the RRETURN macro to - use a goto instead of longjmp. - (match): Added a different number at each callsite, using a perl script for the - first-time task. Going forward it should be easy to maintain by hand. Added a - switch statement at the bottom of the function. We'll get compile time errors - if we have anything in the switch statement that's never used in an RMATCH, - but errors in the other direction are silent except at runtime. - -2007-02-06 Darin Adler - - Reviewed by John. - - - fix 9A241: JavaScript RegExp 25-30x slower than on 10.4.7 - - I used Shark to figure out what to do. The test case is now 15% faster than with - stock Safari. Some other regular expression cases might still be a few % slower - than before, but the >10x slowdown is now completely gone. - - 1) Fix slowness caused by setjmp/longjmp by using computed goto instead. - - Use GCC extensions - locally declared labels, labels as values, and computed goto - - instead of using setjmp/longjmp to implemement non-recursive version of the regular - expression system. We could probably make this even faster if we reduced the use - of malloc a bit too. - - 2) Fix slowness caused by allocating heapframe objects by allocating the first - 16 of them from the stack. - - 3) Speed up use of malloc and free in PCRE by making it use fastMalloc and fastFree. - - 4) Speed up the test case by adding a special case to a UString function. - - 5) Made a small improvement to the innermost hottest loop of match by hoisting - the conversion from int to pcre_uchar out of the loop. - - * JavaScriptCore.xcodeproj/project.pbxproj: Compile FastMallocPCRE.cpp, and don't - compile pcre_globals.c. - - * wtf/FastMallocPCRE.cpp: Added. A copy of pcre_globals.c that uses FastMalloc.h. - This is better than code that sets the PCRE allocation globals because by doing it - this way there's guaranteed to be no problem with order of initialization. - - * kjs/ustring.cpp: (KJS::UString::spliceSubstringsWithSeparators): Add a fast - special case when this is called for only one subrange and no seaprators. This - was happening a lot in the test case and it seems quite reasonable to optimize this. - - * pcre/pcre_exec.c: Create a copy of the RMATCH and RRETURN macros that use goto - instead of setjmp/longjmp. Change code that calls pcre_stack_malloc to first use - storage on the stack inside the match function. - (match): Move initialization of utf8 up a couple lines to avoid "possibly used - uninitialized" warning. Use a local variable so we compare with pcre_uchar instead - of with int inside the inner "find a character" loop. - -2007-02-03 George Staikos - - Reviewed by Alexey. - - -1 is not a valid point. We can't handle anything > 0xffff anyway. - Fixes crash on cases like eval("x"); - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::category): - -2007-02-02 Darin Adler - - Reviewed by Anders. - - - fix copying and assigning a ListHashSet - - No test because the code path with bugs I am fixing is not used yet. - - * wtf/ListHashSet.h: Tweaked ListHashSetNodeAllocator a little bit for clarity. - Changed m_allocator to be an OwnPtr instead of doing an explicit delete. - Fixed bug in copy constructor where we'd have an uninitialized m_allocator. - Fixed bug in assignment operator where it would swap only the hash table, and - not the head, tail, and allocator pointers. - -2007-02-02 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Use WTFLog instead of fprintf for logging KJS::Node leaks. - - * kjs/nodes.cpp: - (NodeCounter::~NodeCounter): Changed count to unsigned, updated - to match style guidelines. - -2007-02-02 Maciej Stachowiak - - - not reviewed, build fix - - * wtf/ListHashSet.h: - (WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): ummm, use union correctly - -2007-02-01 Maciej Stachowiak - - Reviewed by Darin. - - - use a custom allocator for ListHashSet, to fix ~1% perf regression using it for form control - - * wtf/ListHashSet.h: - (WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): - (WTF::ListHashSetNodeAllocator::allocate): - (WTF::ListHashSetNodeAllocator::deallocate): - (WTF::ListHashSetNode::operator new): - (WTF::ListHashSetNode::operator delete): - (WTF::ListHashSetNode::destroy): - (WTF::ListHashSetTranslator::translate): - (WTF::::ListHashSet): - (WTF::::~ListHashSet): - (WTF::::add): - (WTF::::unlinkAndDelete): - (WTF::::deleteAllNodes): - -2007-01-31 Maciej Stachowiak - - Reviewed by Adam. - - - fix sporadic crash - - * wtf/ListHashSet.h: - (WTF::::remove): remove before deleting - -2007-01-31 Maciej Stachowiak - - Reviewed by Mark with help from Lars. - - - added new ListHashSet class, which combines a hashtable and a linked list to provide a set - that keeps elements in inserted order - - This is to assist in fixing the following: - REGRESSION: Safari places text on incorrect button when returning to a page via back [10541] - http://bugs.webkit.org/show_bug.cgi?id=10541 - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/HashTable.h: - (WTF::HashTable::find): - (WTF::HashTable::contains): - (WTF::::find): - (WTF::::contains): - * wtf/ListHashSet.h: Added. - (WTF::ListHashSetNode::ListHashSetNode): - (WTF::ListHashSetNodeHashFunctions::hash): - (WTF::ListHashSetNodeHashFunctions::equal): - (WTF::ListHashSetIterator::ListHashSetIterator): - (WTF::ListHashSetIterator::get): - (WTF::ListHashSetIterator::operator*): - (WTF::ListHashSetIterator::operator->): - (WTF::ListHashSetIterator::operator++): - (WTF::ListHashSetIterator::operator--): - (WTF::ListHashSetIterator::operator==): - (WTF::ListHashSetIterator::operator!=): - (WTF::ListHashSetIterator::operator const_iterator): - (WTF::ListHashSetIterator::node): - (WTF::ListHashSetConstIterator::ListHashSetConstIterator): - (WTF::ListHashSetConstIterator::get): - (WTF::ListHashSetConstIterator::operator*): - (WTF::ListHashSetConstIterator::operator->): - (WTF::ListHashSetConstIterator::operator++): - (WTF::ListHashSetConstIterator::operator--): - (WTF::ListHashSetConstIterator::operator==): - (WTF::ListHashSetConstIterator::operator!=): - (WTF::ListHashSetConstIterator::node): - (WTF::ListHashSetTranslator::hash): - (WTF::ListHashSetTranslator::equal): - (WTF::ListHashSetTranslator::translate): - (WTF::::ListHashSet): - (WTF::::operator): - (WTF::::~ListHashSet): - (WTF::::size): - (WTF::::capacity): - (WTF::::isEmpty): - (WTF::::begin): - (WTF::::end): - (WTF::::find): - (WTF::::contains): - (WTF::::add): - (WTF::::remove): - (WTF::::clear): - (WTF::::unlinkAndDelete): - (WTF::::appendNode): - (WTF::::deleteAllNodes): - (WTF::::makeIterator): - (WTF::::makeConstIterator): - (WTF::deleteAllValues): - -2007-01-30 Darin Adler - - * kjs/DateMath.cpp: Fix license header to reflect LGPL as the first license - mentioned. We still mention the option of using under MPL or GPL since some - of this code came from the Mozilla project with those license terms. - -2007-01-30 Simon Hausmann - - Reviewed by Zack. - - Turned JavaScriptCore from a separate library into an includable - project, to combine it all into libWebKitQt. - - * JavaScriptCore.pri: Added. - * JavaScriptCore.pro: Removed. - * kjs/testkjs.pro: - -2007-01-29 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed REGRESSION: JavaScriptCore has init routines - - The TCMalloc module now initializes, if needed, inside GetCache() and - fastMallocSetIsMultiThreaded(). We leverage the same synchronization - technique used for enabling / disabling the single-threaded optimization - to synchronize initialization of the library without requiring a lock - for every malloc. - - 1,251 runs of tcmalloc_unittest, 2 runs of a custom, massively multi-threaded - tcmalloc_unittest, and my custom version of the PLT show no regressions. - Super-accurate JS iBench reports a .24% regression, which is right at the - limit of its error range, so I'm declaring victory. - - * wtf/FastMalloc.cpp: - (WTF::fastMallocSetIsMultiThreaded): Initialize, if needed. (InitModule() - checks the "if needed" part.) - (WTF::TCMalloc_ThreadCache::GetCache): Restored original TCMalloc code - inside #ifdef, for posterity. Added new initialization logic. - (WTF::TCMalloc_ThreadCache::InitModule): Call InitTSD(), since we don't - have a static initializer to call it for us, now. This means that fastMalloc - is not usable as a general libc allocator, but it never was, and if it were - the general libc allocator, we wouldn't be here in the first place, so whatever. - (WTF::TCMalloc_ThreadCache::InitTSD): Don't try to take the pageheap_lock, - since InitModule already has it. - -2007-01-29 Kevin McCullough - - Reviewed by Geoff and Oliver. - - - rdar://problem/4955561 - - missusing JavaScript shouldn't crash webkit. Now it doesn't, in this case. - - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::callAsFunction): - * bindings/runtime_method.cpp: - (RuntimeMethod::callAsFunction): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::callAsFunction): - -2007-01-28 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - First step in fixing REGRESSION: JavaScriptCore - has init routines - - Don't rely on a static initializer to store the main thread's ID (which - we would use to detect allocations on secondary threads). Instead, require - the caller to notify fastMalloc if it might allocate on a secondary thread. - - Also fixed what seemed like a race condition in do_malloc. - - tcmalloc_unittest and my custom versions of JS iBench and PLT show no - regressions. - - * wtf/FastMalloc.cpp: - (WTF::fastMallocSetIsMultiThreaded): - (1) Renamed from "fastMallocRegisterThread", which was a misleading name because - not all threads need to register with fastMalloc -- only secondary threads - need to, and only for the purpose of disabling its single-threaded optimization. - - (2) Use the pageheap_lock instead of a custom one, since we need to synchronize - with the read of isMultiThreaded inside CreateCacheIfNecessary. This is a new - requirement, now that we can't guarantee that the first call to CreateCacheIfNecessary - will occur on the main thread at init time, before any other threads have been created. - - (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): - (WTF::do_malloc): Reverted WTF change only to call GetCache() if size <= kMaxSize. - The WTF code would read phinited without holding the pageheap_lock, which - seemed like a race condition. Regardless, calling GetCache reduces the number - of code paths to module initialization, which will help in writing the - final fix for this bug. - -2007-01-28 David Kilzer - - Reviewed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=9815 - JavaScript TypeError loading Dean Edwards' JS compressor/obfuscator - - Creating a function using 'new Function()' was not setting its prototype with the - same flags as 'function() { }'. - - Test: fast/js/function-prototype.html - - * kjs/function_object.cpp: - (FunctionObjectImp::construct): Change flags from DontEnum|DontDelete|ReadOnly to - Internal|DontDelete to match FuncDeclNode::processFuncDecl() and - FuncExprNode::evaluate() in kjs/nodes.cpp. - -2007-01-27 Geoffrey Garen - - Reviewed by Beth Dakin. - - Added some missing JSLocks, which might fix . - - We need to lock whenever we might allocate memory because our FastMalloc - implementation requires clients to register their threads, which we do - through JSLock. - - We also need to lock whenever modifying ref-counts because they're not - thread-safe. - - * API/JSObjectRef.cpp: - (JSClassCreate): Allocates memory - (JSClassRetain): Modifies a ref-count - (JSClassRelease): Modifies a ref-count - (JSPropertyNameArrayRetain): Modifies a ref-count - (JSPropertyNameArrayRelease): Modifies a ref-count - * API/JSStringRef.cpp: - (JSStringRetain): Modifies a ref-count - * API/JSValueRef.cpp: - (JSValueIsInstanceOfConstructor): Might allocate memory if an exception - is thrown. - -2007-01-27 Lars Knoll - - Fix the Qt build. - - * bindings/qt/qt_instance.h: - -2007-01-25 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed WebScriptObject's _rootObject lack - of ownership policy causes crashes (e.g., in Dashcode) - - The old model for RootObject ownership was either to (1) leak them or (2) assign - them to a single owner -- the WebCore::Frame -- which would destroy them - when it believed that all of its plug-ins had unloaded. - - This model was broken because of (1) and also because plug-ins are not the only - RootObject clients. All Bindings clients are RootObjects clients, including - applications, which outlive any particular WebCore::Frame. - - The new model for RootObject ownership is to reference-count them, with a - throw-back to the old model: The WebCore::Frame tracks the RootObjects - it creates, and invalidates them when it believes that all of its plug-ins - have unloaded. - - We maintain this throw-back to avoid plug-in leaks, particularly from Java. - Java is completely broken when it comes to releasing JavaScript objects. - Comments in our code allege that Java does not always call finalize when - collecting objects. Moreoever, my own testing reveals that, when Java does - notify JavaScript of a finalize, the data it provides is totally bogus. - - This setup is far from ideal, but I don't think we can do better without - completely rewriting the bindings code, and possibly part of the Java - plug-in / VM. - - Layout tests pass. No additional leaks reported. WebCore/manual-tests/*liveconnect* - and a few LiveConnect demos on the web also run without a hitch. - - const RootObject* => RootObject*, since we need to ref/deref - - * bindings/NP_jsobject.cpp: - (jsDeallocate): deref our RootObjects. Also unprotect or JSObject, instead - of just relying on the RootObject to do it for us when it's invalidated. - (_isSafeScript): Check RootObject validity. - (_NPN_CreateScriptObject): ditto - (_NPN_Invoke): ditto - (_NPN_Evaluate): ditto - (_NPN_GetProperty): ditto - (_NPN_SetProperty): ditto - (_NPN_RemoveProperty): ditto - (_NPN_HasProperty): ditto - (_NPN_HasMethod): ditto - (_NPN_SetException): ditto - - * bindings/runtime_root.cpp: - Revived bit-rotted LIAR LIAR LIAR comment. - - LOOK: Added support for invalidating RootObjects without deleting them, - which is the main goal of this patch. - - Moved protect counting into the RootObject class, to emphasize that - the RootObject protects the JSObject, and unprotects it upon being invalidated. - addNativeReference => RootObject::gcProtect - removeNativeReference => RootObject::gcUnprotect - ProtectCountSet::contains => RootObject::gcIsProtected - - I know we'll all be sad to see the word "native" go. - - * bindings/runtime_root.h: Added ref-counting support to RootObject, with - all the standard accoutrements. - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertValueToNPVariant): If we can't find a valid RootObject, - return void instead of just leaking. - - * bindings/jni/jni_instance.cpp: - (JavaInstance::JavaInstance): Don't take a RootObject in our constructor; - be like other Instances and require the caller to call setRootObject. This - reduces the number of ownership code paths. - (JavaInstance::invokeMethod): Check RootObject for validity. - * bindings/jni/jni_instance.h: Removed private no-arg constructor. Having - an arg constructor accomplishes the same thing. - - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::invoke): No need to call findProtectCountSet, because finalize() - checks for RootObject validity. - (JavaJSObject::JavaJSObject): check RootObject for validity - (JavaJSObject::call): ditto - (JavaJSObject::eval): ditto - (JavaJSObject::getMember): ditto - (JavaJSObject::setMember): ditto - (JavaJSObject::removeMember): ditto - (JavaJSObject::getSlot): ditto - (JavaJSObject::setSlot): ditto - (JavaJSObject::toString): ditto - (JavaJSObject::finalize): ditto - (JavaJSObject::createNative): No need to tell the RootObject to protect - the global object, since the RootObject already owns the interpreter. - - * bindings/jni/jni_runtime.cpp: - (JavaArray::JavaArray): Removed copy construcutor becaue it was unused. - Dead code is dangerous code. - - * bindings/objc/objc_runtime.mm: Added WebUndefined protocol. Previous use - of WebScriptObject was bogus, because WebUndefined is not a subclass of - WebScriptObject. - (convertValueToObjcObject): If we can't find a valid RootObject, - return nil instead of just leaking. - - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): If we can't find a valid RootObject, - return nil instead of just leaking. - -2007-01-27 Andrew Wellington - - Reviewed by Maciej. - - Fix for Repeated string concatenation results in OOM crash - http://bugs.webkit.org/show_bug.cgi?id=11131 - - * kjs/operations.cpp: - (KJS::add): Throw exception if string addition result is null - * kjs/ustring.cpp: - (KJS::UString::UString): Don't call memcpy when malloc failed - -2007-01-25 Jan Kraemer - - Reviewed by Maciej - - Fix for http://bugs.webkit.org/show_bug.cgi?id=12382 - - Fix crash on architectures with 32 bit ints and - 64 bit longs (For example Linux on AMD64) - - * kjs/dtoa.cpp: #define Long int as suggested in comment - -2007-01-24 Geoffrey Garen - - Fixed up #include order for style. No review necessary. - - * API/JSStringRef.cpp: - -2007-01-24 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Copy JSStringRefCF, in case anybody wants to use it. (I just added - it recently.) - -2007-01-24 Maciej Stachowiak - - Not reviewed, trivial property change. - - * JavaScriptCore.vcproj/JavaScriptCore.sln: remove svn:mime-type - property which made this binary. - -2007-01-25 Mark Rowe - - Reviewed by Darin. - - * Info.plist: Update copyright string. - -2007-01-24 Darin Adler - - Reviewed by Mark Rowe. - - * JavaScriptCore.xcodeproj/project.pbxproj: Changed to /usr/sbin/sysctl - so we don't rely on people's paths. - -2007-01-23 Alice Liu - - release build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Copy APICasts.h - -2007-01-23 Geoffrey Garen - - build fix - - * API/JSStringRef.h: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-01-24 Mark Rowe - - Build fix for DumpRenderTree. - - * JavaScriptCore.xcodeproj/project.pbxproj: Make JSStringRefCF.h public so it's copied into built framework. - -2007-01-23 Anders Carlsson - - Reviewed by Darin. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Copy APICasts.h - -2007-01-23 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed Move CFString function declarations from - JSStringRef.h to JSStringRefCF.h - - Also removed remaining API FIXMEs and changed them into Radars. - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): Added Radar numbers for UTF8 conversion. - - * API/JSContextRef.cpp: - (JSGlobalContextCreate): Replaced FIXME for NULL JSContextRef with Radar number. - - * API/JSObjectRef.h: Removed FIXME, which is unprofessional in a public header. - - * API/JSStringRef.cpp: Moved CF related implementations to JSStringRefCF.cpp. - (JSStringCreateWithUTF8CString): Replaced FIXME with Radar number. - * API/JSStringRef.h: Moved CF related declarations to JSStringRefCF.h. Added - #include of JSStringRefCF.h as a stopgap until clients start #including - it as needed by themselves. - - * API/JSStringRefCF.cpp: Added. - (JSStringCreateWithCFString): - (JSStringCopyCFString): Replaced JSChar cast with UniChar cast, which is - more appropriate for a CF call. - * API/JSStringRefCF.h: Added. - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-01-18 Sanjay Madhav - - Reviewed by Darin. - - Add JavaScriptCore define to help with tracing of when objects are marked. - - * kjs/object.cpp: - (KJS::JSObject::mark): - -2007-01-18 Simon Hausmann - - Reviewed by Zack. - - * JavaScriptCore.pro: Remove generated files on make clean. - * pcre/pcre.pri: - -2007-01-16 Alexey Proskuryakov - - Reviewed by Maciej. - - http://bugs.webkit.org/show_bug.cgi?id=12268 - Give object prototypes their own names - - * kjs/lookup.h: Append "Prototype" to ClassName in KJS_IMPLEMENT_PROTOTYPE. - -2007-01-16 Geoffrey Garen - - Reviewed by Darin Adler. - - Added re-entrency checking to GC allocation and collection. It is an error - to allocate or collect from within a collection. We've had at least one - case of each bug in the past. - - Added a comment to the API header, explaining that API clients must not - make this mistake, either. - - Layout tests and JS tests pass. - - * API/JSObjectRef.h: - * kjs/collector.cpp: - (KJS::GCLock::GCLock): - (KJS::GCLock::~GCLock): - (KJS::Collector::allocate): - (KJS::Collector::collect): - -2007-01-14 Mark Rowe - - Reviewed by Mitz. - - Minor fixes to JavaScript pretty-printing. - - * JavaScriptCore.exp: - * kjs/Parser.cpp: - (KJS::Parser::prettyPrint): Return line number and error message if parsing fails. - * kjs/Parser.h: - * kjs/nodes2string.cpp: - (ElementNode::streamTo): Include comma delimiters in array literals. - (PropertyNameNode::streamTo): Quote property names in object literals to handle the case when the property name is not a valid identifier. - * kjs/testkjs.cpp: - (doIt): Print any errors encountered while pretty-printing. - -2007-01-12 Anders Carlsson - - Reviewed by Darin. - - * wtf/HashTraits.h: - Add hash traits for unsigned long and unsigned long long. - -2007-01-12 Geoffrey Garen - - RS by Brady Eidson. - - Rolling back in r18786 with leaks fixed, and these renames slightly reworked: - - Because they can return 0: - rootObjectForImp => findRootObject (overloaded for JSObject* and Interpreter*) - rootObjectForInterpreter => findRootObject (ditto) - findReferenceSet => findProtectCountSet - -2007-01-11 Geoffrey Garen - - RS by Brady Eidson. - - Rolling out r18786 because it caused leaks. - -2007-01-11 Geoffrey Garen - - Reviewed by Anders Carlsson. - - Even more cleanup in preparation for fixing - WebScriptObject's _executionContext lack of ownership policy causes - crashes (e.g., in Dashcode) - - Layout tests pass. - - Renames: - ReferencesSet | ProtectCounts => ProtectCountSet (because it's a typename for a set of GC protect counts) - ReferencesByRootMap => RootObjectMap (because RootObjectToProtectCountSetMap would have been confusing) - pv => protectedValues - rootObjectForImp => getRootObject (overloaded for JSObject* and Interpreter*) - rootObjectForInterpreter => getRootObject (ditto) - findReferenceSet => getProtectCountSet - imp => jsObject - - (KJS::Bindings::getRootObjectMap): Changed to take advantage of built-in - facility for initializing static variables. - - (KJS::Bindings::getProtectCountSet): - (KJS::Bindings::destroyProtectCountSet): Added. Helps encapsulate the fact - that getting a ProtectCountSet entails adding a RootObject to a hash table, - and destroying one entails the reverse. - - (KJS::Bindings::getRootObject): Removed spurious NULL check. - - (KJS::Bindings::findReferenceSet): Renamed. Changed to use getRootObject() - instead of iterating on its own. - - (KJS::Bindings::addNativeReference): Changed to use an early return instead - of indenting the whole function. - (KJS::Bindings::removeNativeReference): Ditto. - -2007-01-11 Geoffrey Garen - - Reviewed by Anders Carlsson. - - Even more cleanup in preparation for fixing - WebScriptObject's _executionContext lack of ownership policy causes - crashes (e.g., in Dashcode) - - Layout tests pass. - - Renames: - findRootObjectForNativeHandleFunction => createRootObject - FindRootObjectForNativeHandleFunctionPtr => CreateRootObjectFunction - - Also removed unnecessary use of "Bindings::" prefix. - - * JavaScriptCore.exp: - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::createNative): - (JavaJSObject::convertValueToJObject): - (JavaJSObject::convertJObjectToValue): - * bindings/runtime_root.cpp: - (KJS::Bindings::RootObject::setCreateRootObject): - * bindings/runtime_root.h: - (KJS::Bindings::RootObject::createRootObject): - -2007-01-11 George Staikos - - Reviewed by Maciej - - Appears to be Mac specific right now. - - * kjs/config.h: - -2007-01-10 Lars Knoll - - Reviewed by Zack - - Use the new functionality in Qt 4.3, to make - the methods closer compliant with the Unicode - spec. - - Keep the old code so that it still compiles against - Qt 4.2. - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::toTitleCase): - (WTF::Unicode::foldCase): - (WTF::Unicode::isFormatChar): - (WTF::Unicode::isPrintableChar): - (WTF::Unicode::isSeparatorSpace): - (WTF::Unicode::isPunct): - (WTF::Unicode::isDigit): - (WTF::Unicode::isLower): - (WTF::Unicode::isUpper): - (WTF::Unicode::digitValue): - (WTF::Unicode::mirroredChar): - (WTF::Unicode::combiningClass): - (WTF::Unicode::decompositionType): - (WTF::Unicode::umemcasecmp): - (WTF::Unicode::direction): - (WTF::Unicode::category): - -2007-01-09 Darin Adler - - - update 2007 Apple copyright for the new company name - - * kjs/DateMath.cpp: - -2007-01-09 Darin Adler - - - fix build - - * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction): - Actually compile it this time. - -2007-01-09 Darin Adler - - - fix build - - * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction): - Change types. - -2007-01-09 Darin Adler - - - fix build on platforms where Unicode::UChar is != uint16_t - - * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction): - Change types. - -2007-01-09 Mitz Pettel - - Reviewed by Darin. - - - changes for http://bugs.webkit.org/show_bug.cgi?id=11078 - Forms Don't Submit (ASP Pages) - - * JavaScriptCore.exp: - * kjs/value.cpp: - (KJS::JSValue::toInt32): Folded toInt32Inline into this method, which was its - only caller. - (KJS::JSValue::toUInt32): Added a variant that reports if the conversion has - succeeded. - * kjs/value.h: - -2007-01-09 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=12174 - improve Unicode use (less WTF::Unicode:: prefix, centralized character names) - - * wtf/unicode/icu/UnicodeIcu.h: Change parameter and return types - to UChar32 and UChar. Removed unneeded type casts and added some - const to functions that lacked it. Removed WTF::Unicode::memcmp. - (WTF::Unicode::umemcasecmp): Renamed from strcasecmp since this - doesn't work on 0-terminated strings as the str functions do. - * wtf/unicode/qt4/UnicodeQt4.h: Ditto. - - - got rid of namespace prefixes from most uses of WTF::Unicode - - * kjs/function.cpp: - (KJS::isStrWhiteSpace): - (KJS::escapeStringForPrettyPrinting): - * kjs/lexer.cpp: - (KJS::Lexer::isWhiteSpace): - (KJS::Lexer::isIdentStart): - (KJS::Lexer::isIdentPart): - * kjs/string_object.cpp: - (KJS::StringProtoFunc::callAsFunction): - -2007-01-07 David Kilzer - - Reviewed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=11917 - setlocale() can return null - - * kjs/date_object.cpp: - (KJS::DateProtoFunc::callAsFunction): Removed dead code. - -2007-01-07 David Carson - - Reviewed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=12100 - JNI bindings should be available to non-Mac platforms that have JNI - - Change JNI so that it is not wrapped in the PLATFORM(MAC) ifdef, enabling - other platforms who have JNI to use it. - - * bindings/jni/jni_instance.h: - Removed unnecessary include of - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::setJavaVM): - * bindings/jni/jni_utility.h: - Added new method for clients to set the JavaVM - * bindings/runtime.cpp: - (KJS::Bindings::Instance::createBindingForLanguageInstance): - Changed code to utilize new #if HAVE(JNI) - * kjs/config.h: - Added new #define for JNI, ie HAVE_JNI - -2007-01-07 David Carson - - Reviewed by Darin. - - Fix http://bugs.webkit.org/show_bug.cgi?id=11431 - ARM platform has some byte alignment issues - - Fix for NaN being 4 bytes and it must start on a byte boundary - for ARM architectures. - - * kjs/fpconst.cpp: - (KJS::): - -2007-01-04 David Kilzer - - Reviewed by Kevin McCullough. - - - fix http://bugs.webkit.org/show_bug.cgi?id=12070 - REGRESSION: KJS::getUTCOffset() caches UTC offset but ignores time zone changes - - * kjs/DateMath.cpp: - (KJS::getUTCOffset): Don't cache UTC offset. - -2007-01-02 Darin Adler - - - minor tweak (hope this doesn't re-break Windows) - - * pcre/pcre_compile.c: Removed use of const pcre_uchar const * -- Mitz probably - meant const pcre_uchar *const, but I think we can do without the explicit const here. - - * pcre/pcre_internal.h: Re-enabled warning C4114. - -2007-01-02 David Kilzer - - Reviewed by NOBODY (Windows build fix). - - The MSVC compiler requires variables to be declared at the top of the enclosing block in C source. - - Disable this warning to prevent MSVC from complaining about the 'const pcre_uchar const *' type: - warning C4114: same type qualifier used more than once - - * pcre/pcre_compile.c: - (pcre_compile2): Moved variable declarations to top of their respective enclosing blocks. - * pcre/pcre_internal.h: Added pragma to disable compiler warning. - -2007-01-01 Mitz Pettel - - Reviewed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=11849 - REGRESSION (r18182): Google Calendar is broken (a regular expression containing a null character is not parsed correctly) - - Modified pcre_compile() (and the functions that it calls) to work with patterns - containing null characters. - - Covered by JavaScriptCore tests ecma_3/RegExp/octal-002.js and ecma_3/RegExp/regress-85721.js - - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): Changed to not null-terminate the pattern string and instead - pass its length to pcre_compile. - * pcre/pcre.h: - * pcre/pcre_compile.c: - (check_escape): - (get_ucp): - (is_counted_repeat): - (check_posix_syntax): - (compile_branch): - (compile_regex): - (pcre_compile): Added a parameter specifying the length of the pattern, which - is no longer required to be null-terminated and may contain null characters. - (pcre_compile2): - * pcre/pcre_internal.h: - * tests/mozilla/expected.html: Updated for the two tests that this patch - fixes. Also updated failing results for ecma_3/RegExp/regress-100199.js - which were not updated after bug 6257 was fixed. - -2007-01-01 David Kilzer - - Reviewed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=12057 - REGRESSION: JavaScript Date Is One Day In The Future in GMT time zone - - Because Mac OS X returns geographically and historically accurate time zone information, - converting Jan 02, 1970 12:00:00 AM to local time then subtracting 24 hours did not work - in GMT (London - England) since it was in BST (+0100) all year in 1970[1]. Instead, the - UTC offset is calculated by converting Jan 01, 2000 12:00:00 AM to local time then - subtracting that from the same date in UTC. - - [1] http://en.wikipedia.org/wiki/British_Summer_Time - - * kjs/DateMath.cpp: - (KJS::getUTCOffset): Updated UTC offset calculation. - (KJS::getDSTOffset): Improved comment. - -2006-12-31 David Kilzer - - Reviewed by Geoff. - - Update embedded pcre library from version 6.2 to 6.4. Changes from pcre 6.2 to 6.3 - did not include any files in JavaScriptCore/pcre. - - All changes include renaming EXPORT to PCRE_EXPORT, renaming of ucp_findchar() to - _pcre_ucp_findchar(), or comment changes. Additional changes noted below. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Updated source file list. - * JavaScriptCore.xcodeproj/project.pbxproj: Renamed pcre_printint.c to pcre_printint.src - and changed it from a source file to a header file. - * JavaScriptCoreSources.bkl: Updated source file list. - * pcre/CMakeLists.txt: Updated source file list. - * pcre/pcre-config.h: - * pcre/pcre.h: Updated version. - * pcre/pcre.pri: Updated source file list. - * pcre/pcre_compile.c: Include pcre_printint.src #if DEBUG. - (pcre_compile2): - * pcre/pcre_config.c: - * pcre/pcre_exec.c: - (match): - * pcre/pcre_fullinfo.c: - * pcre/pcre_info.c: - * pcre/pcre_internal.h: Added header guard. Removed export of _pcre_printint(). - * pcre/pcre_ord2utf8.c: - * pcre/pcre_printint.c: Renamed to pcre_printint.src. - * pcre/pcre_printint.src: Added. Renamed _pcre_printint() to pcre_printint(). - * pcre/pcre_refcount.c: - * pcre/pcre_study.c: - * pcre/pcre_tables.c: - * pcre/pcre_try_flipped.c: - * pcre/pcre_ucp_findchar.c: Added contents of ucp_findchar.c. - * pcre/pcre_version.c: - * pcre/pcre_xclass.c: - (_pcre_xclass): - * pcre/ucp.h: Removed export of ucp_findchar(). - * pcre/ucp_findchar.c: Removed. Contents moved to pcre_ucp_findchar.c. - -2006-12-29 David Kilzer - - Reviewed by Geoff. - - Update embedded pcre library from version 6.1 to 6.2. From the pcre ChangeLog: - - 3. Added "b" to the 2nd argument of fopen() in dftables.c, for non-Unix-like - operating environments where this matters. - - 5. Named capturing subpatterns were not being correctly counted when a pattern - was compiled. This caused two problems: (a) If there were more than 100 - such subpatterns, the calculation of the memory needed for the whole - compiled pattern went wrong, leading to an overflow error. (b) Numerical - back references of the form \12, where the number was greater than 9, were - not recognized as back references, even though there were sufficient - previous subpatterns. - - * pcre/dftables.c: Item 3. - (main): - * pcre/pcre.h: Updated version. - * pcre/pcre_compile.c: Item 5. - (read_repeat_counts): - (pcre_compile2): - -2006-12-29 Geoffrey Garen - - Reviewed by Brian Dash... err... Mark Rowe. - - More cleanup in preparation for fixing - WebScriptObject's _executionContext lack of ownership policy causes - crashes (e.g., in Dashcode) - - The key change here is to RootObject::RootObject(). - - * JavaScriptCore.exp: - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertValueToNPVariant): Changed to use new constructor. - - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::createNative): Changed to use new constructor. Replaced - large 'if' followed by default condition with "if !" and explicit default - condition. - - * bindings/objc/objc_runtime.mm: - (convertValueToObjcObject): Changed to use new constructor. - - * bindings/runtime_root.cpp: - (KJS::Bindings::RootObject::destroy): "removeAllNativeReferences" => "destroy" - because this function actually destroys the RootObject. - - * bindings/runtime_root.h: Changed Interpreter* to RefPtr - to prevent a RootObject from holding a stale Interperter*. - - (KJS::Bindings::RootObject::RootObject): Changed constructor to take an - Interpreter*, since it's pointless to create a RootObject without one. - Removed setRootObjectImp() and rootObjectImp() because they were just - a confusing way of setting and getting the Interpreter's global object. - - (KJS::Bindings::RootObject::nativeHandle): "_nativeHandle" => "m_nativeHandle" - (KJS::Bindings::RootObject::interpreter): "_interpreter" => "m_interpreter" - -2006-12-28 George Staikos - - Reviewed by Olliej. - - * bindings/qt/qt_instance.cpp: build - (KJS::Bindings::QtInstance::QtInstance): - -2006-12-28 Geoffrey Garen - - Reviewed by Oliver Hunt. - - More cleanup. Layout tests pass. - - Use a helper function to initialize and access WebUndefined and WebScriptObject. - - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (KJS::Bindings::webScriptObjectClass): - (KJS::Bindings::webUndefinedClass): - (convertValueToObjcObject): - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - (KJS::Bindings::convertObjcValueToValue): - -2006-12-28 Geoffrey Garen - - Reviewed by Brady Eidson. - - Some cleanup in preparation for fixing - WebScriptObject's _executionContext lack of ownership policy causes - crashes (e.g., in Dashcode) - - I'm just trying to make heads or tails of this baffling code. - - Renamed "root" | "execContext" | "executionContext" => "rootObject", because - that's the object's (admittedly vague) type name. - - * bindings/runtime.cpp: Removed createLanguageInstanceForValue - because I'll give you a dollar if you can explain to me what it actually did. - - * bindings/runtime_root.cpp: Put everything in the KJS::Bindings namespace, - removing the KJS::Bindings prefix from individual functions and datatypes. - This matches the header and eliminates a lot of syntax cruft. - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertValueToNPVariant): Replaced use of createLanguageInstanceForValue - with call to _NPN_CreateScriptObject because that's what createLanguageInstanceForValue - actually did (but don't ask me for that dollar now; that's cheating.) - - * bindings/objc/objc_utility.h: - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): Removed. Its only purpose was - to call a single function for WebKit, which WebKit can do on its own. - - * kjs/interpreter.h: Removed rtti() because it was unused, and this class - is scheduled for demolition anyway. - - * kjs/interpreter.cpp: Removed createLanguageInstanceForValue because it had - nothing to do with the Interpreter, and nothing makes Chuck Norris more mad - than a function whose sole purpose is to call another function of the same - name. (Really, I asked him.) - -2006-12-26 Geoffrey Garen - - Reviewed by Eric Seidel. - - Some cleanup in preparation for fixing Safari - crash on quit in _NPN_ReleaseObject from KJS::Bindings::CInstance::~CInstance - - * bindings/c/c_instance.cpp: - * bindings/c/c_instance.h: Removed unused copy constructor and assignment - operator. They made tracking data flow more difficult. Unused code is also - dangerous because it can succumb to bit rot with the stealth of a Ninja. - - Replaced #include with forward declaration to reduce header dependency. - - * bindings/npruntime.cpp: Sorted #includes. - (_NPN_GetStringIdentifier): Replaced assert with ASSERT. - (_NPN_GetStringIdentifiers): ditto - (_NPN_ReleaseVariantValue): ditto - (_NPN_CreateObject): ditto - (_NPN_RetainObject): ditto - (_NPN_ReleaseObject): ditto - (_NPN_DeallocateObject): ditto - -2006-12-20 Anders Carlsson - - * kjs/string_object.cpp: - (localeCompare): - Another speculative Win32 fix. - -2006-12-20 Anders Carlsson - - * kjs/string_object.cpp: - (localeCompare): - Speculative Win32 fix. - -2006-12-20 Anders Carlsson - - Reviewed by Darin. - - - - support String.localeCompare. - - Implement localeCompare. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/string_object.cpp: - (localeCompare): - (StringProtoFunc::callAsFunction): - * kjs/string_object.h: - (KJS::StringProtoFunc::): - -2006-12-20 Timothy Hatcher - - Reviewed by Mark Rowe. - - * JavaScriptCore.xcodeproj/project.pbxproj: use GCC 4.0 for all the other test targets - -2006-12-20 Timothy Hatcher - - Reviewed by Mark Rowe. - - JavaScriptCore-421.31's dftables target needs to override default compiler and use gcc-4.0 - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-12-20 Lars Knoll - - Reviewed by David Hyatt - - Added support to bind QObject's to - JavaScript. - - * JavaScriptCore.pro: - * bindings/qt/qt_class.cpp: Added. - (KJS::Bindings::QtClass::QtClass): - (KJS::Bindings::QtClass::~QtClass): - (KJS::Bindings::QtClass::classForObject): - (KJS::Bindings::QtClass::name): - (KJS::Bindings::QtClass::methodsNamed): - (KJS::Bindings::QtClass::fieldNamed): - * bindings/qt/qt_class.h: Added. - (KJS::Bindings::QtClass::constructorAt): - (KJS::Bindings::QtClass::numConstructors): - * bindings/qt/qt_instance.cpp: Added. - (KJS::Bindings::QtInstance::QtInstance): - (KJS::Bindings::QtInstance::~QtInstance): - (KJS::Bindings::QtInstance::operator=): - (KJS::Bindings::QtInstance::getClass): - (KJS::Bindings::QtInstance::begin): - (KJS::Bindings::QtInstance::end): - (KJS::Bindings::QtInstance::implementsCall): - (KJS::Bindings::QtInstance::invokeMethod): - (KJS::Bindings::QtInstance::invokeDefaultMethod): - (KJS::Bindings::QtInstance::defaultValue): - (KJS::Bindings::QtInstance::stringValue): - (KJS::Bindings::QtInstance::numberValue): - (KJS::Bindings::QtInstance::booleanValue): - (KJS::Bindings::QtInstance::valueOf): - * bindings/qt/qt_instance.h: Added. - (KJS::Bindings::QtInstance::getObject): - * bindings/qt/qt_runtime.cpp: Added. - (KJS::Bindings::convertValueToQVariant): - (KJS::Bindings::convertQVariantToValue): - (KJS::Bindings::QtField::name): - (KJS::Bindings::QtField::valueFromInstance): - (KJS::Bindings::QtField::setValueToInstance): - * bindings/qt/qt_runtime.h: Added. - (KJS::Bindings::QtField::QtField): - (KJS::Bindings::QtField::type): - (KJS::Bindings::QtMethod::QtMethod): - (KJS::Bindings::QtMethod::name): - (KJS::Bindings::QtMethod::numParameters): - * bindings/runtime.cpp: - (KJS::Bindings::Instance::createBindingForLanguageInstance): - * bindings/runtime.h: - (KJS::Bindings::Instance::): - * bindings/testbindings.pro: Added. - * bindings/testqtbindings.cpp: Added. - (MyObject::MyObject): - (MyObject::setTestString): - (MyObject::setTestInt): - (MyObject::testString): - (MyObject::testInt): - (MyObject::foo): - (Global::className): - (main): - -2006-12-19 Anders Carlsson - - Reviewed by Geoff. - - Add -p option to testkjs which pretty prints the files instead of executing them. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/Parser.cpp: - (KJS::Parser::prettyPrint): - * kjs/Parser.h: - * kjs/testkjs.cpp: - (doIt): - -2006-12-19 Brady Eidson - - Rubberstamped by Lou - - Removed unneccessary "else" - - * wtf/Assertions.cpp: - -2006-12-19 Timothy Hatcher - - Reviewed by Darin. - - Local WebCore/WebBrowser builds fail in 9A328 due to warning about ObjC-2.0 language features - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-12-17 Simon Hausmann - - Reviewed by Zack. - - * kjs/testkjs.pro: Oops, make it also build on machines other than - mine :) - -2006-12-17 Simon Hausmann - - Reviewed by Rob Buis. - - * kjs/testkjs.pro: Added .pro file to build testkjs. - -2006-12-16 Alexey Proskuryakov - - Reviewed by Rob. - - A deleted object was accessed to prepare RegExp construction error messages. - - * kjs/regexp_object.cpp: - (RegExpObjectImp::construct): Wrap the RegExp into an OwnPtr. - -2006-12-16 Mitz Pettel - - Reviewed by Alexey. - - - fix http://bugs.webkit.org/show_bug.cgi?id=11814 - REGRESSION(r18098): Find does not work with capital letters - - Test: editing/execCommand/findString-3.html - - * wtf/unicode/icu/UnicodeIcu.h: - (WTF::Unicode::foldCase): Changed to not return an error if the result fits - in the buffer without a null terminator. - -2006-12-13 Maciej Stachowiak - - Reviewed by Anders. - - - added equality and inequality operations for HashMap and Vector, useful for comparing more complex types - - * wtf/HashMap.h: - (WTF::operator==): - (WTF::operator!=): - * wtf/Vector.h: - (WTF::operator==): - (WTF::operator!=): - -2006-12-12 Alexey Proskuryakov - - Reviewed by Geoff. Based on a patch by Maks Orlovich. - - http://bugs.webkit.org/show_bug.cgi?id=6257 - Throw errors on invalid expressions (KJS merge) - - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): - (KJS::RegExp::~RegExp): - (KJS::RegExp::match): - * kjs/regexp.h: - (KJS::RegExp::flags): - (KJS::RegExp::isValid): - (KJS::RegExp::errorMessage): - (KJS::RegExp::subPatterns): - Remember and report RegExp construction failures. Renamed data members not to start with underscores. - - * kjs/regexp_object.cpp: - (RegExpObjectImp::construct): Raise an exception if RegExp construction fails. - (RegExpObjectImp::callAsFunction): Removed an obsolete comment. - - * tests/mozilla/ecma_3/RegExp/regress-119909.js: Reduced the number of nested parentheses to - a value supported by PCRE. - -2006-12-11 Alexey Proskuryakov - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=9673 - Add support for window.atob() and window.btoa() - - * JavaScriptCore.exp: Export UString::is8Bit(). - * JavaScriptCore.xcodeproj/project.pbxproj: Added StringExtras.h as - a private header. - -2006-12-11 Darin Adler - - Reviewed by Brady. - - * JavaScriptCore.xcodeproj/project.pbxproj: Let Xcode update this - (I think Hyatt is using an old Xcode). - -2006-12-11 David Hyatt - - Fix the failing layout test. Just remove Unicode::isSpace and - revert StringImpl to do the same thing it was doing before. - - Reviewed by darin - - * wtf/unicode/icu/UnicodeIcu.h: - * wtf/unicode/qt4/UnicodeQt4.h: - -2006-12-09 George Staikos - - Reviewed by Zack. - - Fix bison again on qmake build. - - * JavaScriptCore.pro: - -2006-12-09 Lars Knoll - - Reviewed by Zack - - Make it possible to build WebKit with qmake. - - * JavaScriptCore.pro: Added. - * kjs/kjs.pro: Removed. - * pcre/pcre.pri: Added. - -2006-12-09 Zack Rusin - - Fixing the compilation with platform kde after the icu changes. - - * CMakeLists.txt: - -2006-12-09 Adam Roben - - Reviewed by Darin. - - Some updates in reaction to r18098. - - * wtf/unicode/icu/UnicodeIcu.h: Use !! to convert UBool to bool in all - cases. - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::isDigit): - (WTF::Unicode::isSpace): - (WTF::Unicode::isPunct): - (WTF::Unicode::isLower): - (WTF::Unicode::isUpper): - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2006-12-09 George Staikos - - Patch by Lars Knoll, comment out ICU dependency on Qt platform (unused code). - - Reviewed by Darin. - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertUTF8ToUTF16): - -2006-12-08 David Hyatt - - Land the new ICU abstraction layer. Patch by Lars. - - Reviewed by me - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/Platform.h: - * wtf/unicode/UnicodeCategory.h: Removed. - * wtf/unicode/UnicodeDecomposition.h: Removed. - * wtf/unicode/UnicodeDirection.h: Removed. - * wtf/unicode/icu/UnicodeIcu.h: - (WTF::Unicode::): - (WTF::Unicode::foldCase): - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::toTitleCase): - (WTF::Unicode::isDigit): - (WTF::Unicode::isSpace): - (WTF::Unicode::isPunct): - (WTF::Unicode::mirroredChar): - (WTF::Unicode::category): - (WTF::Unicode::direction): - (WTF::Unicode::isLower): - (WTF::Unicode::isUpper): - (WTF::Unicode::digitValue): - (WTF::Unicode::combiningClass): - (WTF::Unicode::decompositionType): - (WTF::Unicode::strcasecmp): - (WTF::Unicode::memset): - * wtf/unicode/qt4/UnicodeQt4.cpp: Removed. - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::): - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::toTitleCase): - (WTF::Unicode::foldCase): - (WTF::Unicode::isPrintableChar): - (WTF::Unicode::isLower): - (WTF::Unicode::isUpper): - (WTF::Unicode::digitValue): - (WTF::Unicode::combiningClass): - (WTF::Unicode::decompositionType): - (WTF::Unicode::strcasecmp): - (WTF::Unicode::memset): - (WTF::Unicode::direction): - (WTF::Unicode::category): - -=== Safari-521.32 === - -2006-12-08 Adam Roben - - Reviewed by Anders. - - This is a mo' better fix for ensuring we don't use macro definitions - of min/max. - - * kjs/config.h: - * wtf/Vector.h: - -2006-12-07 Kevin Fyure - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=11545 - Disable the testcases do not follow the ECMA-262v3 specification. - - * tests/mozilla/expected.html: Update Results. - * tests/mozilla/js1_2/String/concat.js: - 4 tests disabled. The result of concat Array object is not followinig - ECMA 15.5.4.6 - * tests/mozilla/js1_2/function/Number.js: - 1 test disabled. The result of Array object to Number object conversion - is not following ECMA 9.3. And the test was duplicated in - ecma/TypeConversion/9.3-1.js - * tests/mozilla/js1_2/function/String.js: - 2 tests disabled. The result of Object/Array object to String object - conversion is not following ECMA 15.5.1.1 and ECMA 9.8 - -2006-11-30 Steve Falkenburg - - Reviewed by Oliver. - - Move WTF from JavaScriptCore project into a new WTF project. - - * JavaScriptCore.vcproj/JavaScriptCore.sln: Add WTF.vcproj to sln - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove WTF source files - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added. - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Add dependency on WTF.lib - -2006-11-30 Geoffrey Garen - - Reviewed by Beth Dakin. - - Fixed up garbage collection at window close time. - - * kjs/interpreter.cpp: - (KJS::Interpreter::~Interpreter): Garbage collect here, since - destroying the interpreter frees the global object and - therefore creates a lot of garbage. - -2006-11-20 W. Andy Carrel - - Reviewed by Maciej. - - http://bugs.webkit.org/show_bug.cgi?id=11501 - REGRESSION: \u no longer escapes metacharacters in RegExps - http://bugs.webkit.org/show_bug.cgi?id=11502 - Serializing RegExps doesn't preserve Unicode escapes - - * kjs/lexer.cpp: - (Lexer::Lexer): - (Lexer::setCode): - (Lexer::shift): - (Lexer::scanRegExp): - Push \u parsing back down into the RegExp object rather than in the - parser. This backs out r17354 in favor of a new fix that better - matches the behavior of other browsers. - - * kjs/lexer.h: - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): - (KJS::sanitizePattern): - (KJS::isHexDigit): - (KJS::convertHex): - (KJS::convertUnicode): - * kjs/regexp.h: - Translate \u escaped unicode characters for the benefit of pcre. - - * kjs/ustring.cpp: - (KJS::UString::append): - Fix failure to increment length on the first UChar appended to a - UString that was copy-on-write. - - * tests/mozilla/ecma_2/RegExp/properties-001.js: - Adjust tests back to the uniform standards. - -2006-11-20 Samuel Weinig - - Reviewed by Maciej. - - Fix for http://bugs.webkit.org/show_bug.cgi?id=11647 - Fix Win32 build - - * kjs/config.h: define NOMINMAX instead of min/max - as themselves. - * wtf/Vector.h: put back hack to ensure that min/max - are not defined as macros. - -2006-11-19 Simon Hausmann - - Reviewed by Zack. - - http://bugs.webkit.org/show_bug.cgi?id=11649 - Fix CMake Qt-only build without KDE CMake files - - * CMakeLists.txt: - * pcre/CMakeLists.txt: - -2006-11-17 Anders Carlsson - - Reviewed by Adam. - - Make sure that we always use std::min and std::max instead of macros. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * kjs/config.h: - * wtf/Vector.h: - -=== Safari-521.31 === - -2006-11-12 Geoffrey Garen - - Reviewed by Beth Dakin. - - Added project-wide setting to disable Microsoft's made-up deprecation - warnings related to std:: functions. (Doesn't have any affect yet, - since we currently disable all deprecation warnings.) - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2006-11-12 Mark Rowe - - Reviewed by Mitz. - - Clean up of JavaScriptCore bakefiles. - - * JavaScriptCoreSources.bkl: - * jscore.bkl: - -2006-11-11 Alexey Proskuryakov - - Reviewed by Maciej. - - http://bugs.webkit.org/show_bug.cgi?id=11508 - Undisable some warnings for JSImmediate.h - - Fix suggested by Don Gibson. - - * kjs/JSImmediate.h: - Re-enable all MSVC warnings, move the remaining runtime checks - to compile-time. - -2006-11-10 Zalan Bujtas - - Reviewed by Maciej. - - Added s60/symbian platform defines. - http://bugs.webkit.org/show_bug.cgi?id=11540 - - * wtf/Platform.h: - -=== Safari-521.30 === - -2006-11-08 Ada Chan - - Reviewed by darin. - - Added a method to delete all the keys in a HashMap. - - * wtf/HashMap.h: - (WTF::deleteAllPairFirsts): - (WTF::deleteAllKeys): - -2006-11-07 Anders Carlsson - - Reviewed by Geoff. - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - Initialize cachedPrototype to 0. - -2006-11-06 Krzysztof Kowalczyk - - Reviewed by Maciej. - - Remove warning about garbage after #else. #else clause applies for all - non-mac platforms, not only win. - - * kjs/date_object.cpp: - -2006-11-06 Mark Rowe - - Reviewed by the wonderful Mitz Pettel. - - http://bugs.webkit.org/show_bug.cgi?id=11524 - Bug 11524: REGRESSION(r9842): Array.prototype.join should use ToString operator rather than calling toString on each element - - * kjs/array_object.cpp: - (ArrayProtoFunc::callAsFunction): Use ToString operator on each element rather than calling their toString method. - -2006-11-03 Steve Falkenburg - - Fix build - - * kjs/JSImmediate.h: - -2006-11-03 Alexey Proskuryakov - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=11504 - Fix warnings on non 32 bit platforms - - * kjs/JSImmediate.h: - (KJS::JSImmediate::NanAsBits): - (KJS::JSImmediate::oneAsBits): - Rewrite in a way that moves runtime checks to compile-time. - - (KJS::): - (KJS::JSImmediate::fromDouble): - (KJS::JSImmediate::toDouble): - -2006-11-02 George Staikos - - Reviewed by Maciej. - - * collector.cpp: - Remove a deprecated pthreads call. - -2006-11-02 Anders Carlsson - - Reviewed by Maciej, landed by Anders. - - * CMakeLists.txt: - Make KDE support optional. - -2006-11-01 Kevin McCullough - - Reviewed by Brady. - - - Fixes many JavaScriptCore tests in other timezones. The root problem is that on mac localtime() returns historically accurate information for DST, but the JavaScript spec explicitly states to not take into account historical information but rather to interpolate from valid years. - - * kjs/DateMath.cpp: - (KJS::equivalentYearForDST): - (KJS::getDSTOffsetSimple): - (KJS::getDSTOffset): - -2006-10-31 Geoffrey Garen - - Reviewed by Beth. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=11477 - REGRESSION: GMail crashes in KJS::FunctionImp::callerGetter - - * kjs/function.cpp: - (KJS::FunctionImp::argumentsGetter): Removed unnecessary braces. - (KJS::FunctionImp::callerGetter): More logical NULL checking. - -2006-10-31 Oliver Hunt - - Reviewed by Geoff. - - Adding definition for PLATFORM(CI) - - * wtf/Platform.h: - -2006-10-31 Vladimir Olexa - - Reviewed by Geoff. - - http://bugs.webkit.org/show_bug.cgi?id=4166 - Function object does not support caller property - - Test: fast/js/caller-property.html - - * kjs/function.cpp: - (KJS::FunctionImp::callerGetter): added - (KJS::FunctionImp::getOwnPropertySlot): added if statement to handle callerGetter() - * kjs/function.h: added callerGetter() declaration - * kjs/identifier.h: added caller property macro - * tests/mozilla/expected.html: - -2006-10-30 Kevin McCullough - - Reviewed by Adam. - - - Fix some timezone issues and JavaScriptCore date tests. Addresses bugzilla 4930. - - * kjs/DateMath.h: - (KJS::GregorianDateTime::GregorianDateTime): Here's the fix, to add parenthesis for order of precedence. - * kjs/date_object.cpp: - (KJS::DateProtoFunc::callAsFunction): - (KJS::DateObjectImp::construct): memset not needed as GregorianDateTime initializes itself. - -2006-10-30 Darin Adler - - Reviewed by John Sullivan. - - * kjs/SavedBuiltins.h: Added needed include. - * wtf/OwnPtr.h: (WTF::OwnPtr::set): Fixed mistake in assertion. - -2006-10-28 Darin Adler - - Reviewed by Maciej. - - - renamed PassRefPtr::release to releaseRef to make it clearer that - it's the counterpart of adoptRef, and to make it harder to confuse - it with the safer-to-use RefPtr::release - - * kjs/identifier.cpp: - (KJS::CStringTranslator::translate): - (KJS::UCharBufferTranslator::translate): - * kjs/ustring.cpp: - (KJS::UString::Rep::create): - * wtf/PassRefPtr.h: - (WTF::PassRefPtr::PassRefPtr): - (WTF::PassRefPtr::~PassRefPtr): - (WTF::PassRefPtr::get): - (WTF::PassRefPtr::releaseRef): - (WTF::PassRefPtr::operator->): - (WTF::PassRefPtr::operator=): - (WTF::adoptRef): - (WTF::static_pointer_cast): - (WTF::const_pointer_cast): - * wtf/RefPtr.h: - (WTF::RefPtr::RefPtr): - (WTF::RefPtr::operator=): - -2006-10-28 Darin Adler - - Reviewed by Steve. - - * kjs/grammar.y: Add definitions of YYMALLOC and YYFREE to fix - a warning some people see (not sure why others don't see it). - - * JavaScriptCore.vcproj/JavaScriptCore/grammarWrapper.cpp: Touch - this file to force it to re-build grammar.cpp. - -2006-10-28 Darin Adler - - Reviewed by Geoff. - - - made changes so the code compiles with the highest warning level - under MSVC (disabling some warnings, making some code fixes) - - * API/JSCallbackConstructor.cpp: - (KJS::JSCallbackConstructor::construct): - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::callAsFunction): - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::init): - (KJS::JSCallbackObject::construct): - (KJS::JSCallbackObject::callAsFunction): - * API/JSObjectRef.cpp: - (JSPropertyNameArrayGetNameAtIndex): - * API/JSStringRef.cpp: - (JSStringCreateWithCharacters): - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertUTF8ToUTF16): - (KJS::Bindings::coerceValueToNPVariantStringType): - (KJS::Bindings::convertValueToNPVariant): - * kjs/DateMath.h: - (KJS::GregorianDateTime::GregorianDateTime): - * kjs/ExecState.h: - (KJS::ExecState::hadException): - * kjs/JSImmediate.h: - (KJS::JSImmediate::fromDouble): - (KJS::JSImmediate::toDouble): - (KJS::JSImmediate::NanAsBits): - (KJS::JSImmediate::oneAsBits): - * kjs/Parser.h: - * kjs/PropertyNameArray.h: - (KJS::PropertyNameArray::size): - * kjs/array_object.cpp: - (ArrayObjectImp::callAsFunction): - * kjs/bool_object.cpp: - (BooleanObjectImp::callAsFunction): - * kjs/collector.cpp: - (KJS::Collector::allocate): - (KJS::Collector::markCurrentThreadConservatively): - (KJS::Collector::collect): - * kjs/completion.h: - (KJS::Completion::isValueCompletion): - * kjs/date_object.cpp: - (KJS::findMonth): - * kjs/debugger.cpp: - (Debugger::sourceParsed): - (Debugger::sourceUnused): - (Debugger::exception): - (Debugger::atStatement): - (Debugger::callEvent): - (Debugger::returnEvent): - * kjs/dtoa.cpp: - * kjs/error_object.cpp: - (ErrorObjectImp::callAsFunction): - (NativeErrorImp::callAsFunction): - * kjs/function.cpp: - (KJS::FunctionImp::processVarDecls): - (KJS::GlobalFuncImp::callAsFunction): - * kjs/function_object.cpp: - (FunctionPrototype::callAsFunction): - * kjs/grammar.y: - * kjs/identifier.cpp: - (KJS::CStringTranslator::translate): - (KJS::Identifier::add): - * kjs/internal.h: - * kjs/lexer.cpp: - (Lexer::lex): - (Lexer::isIdentStart): - (Lexer::isIdentPart): - (isDecimalDigit): - (Lexer::isHexDigit): - (Lexer::isOctalDigit): - (Lexer::matchPunctuator): - (Lexer::singleEscape): - (Lexer::convertOctal): - (Lexer::convertHex): - (Lexer::convertUnicode): - (Lexer::record8): - * kjs/lexer.h: - * kjs/math_object.cpp: - (MathFuncImp::callAsFunction): - * kjs/number_object.cpp: - (integer_part_noexp): - (intPow10): - (NumberProtoFunc::callAsFunction): - (NumberObjectImp::callAsFunction): - * kjs/object.cpp: - (KJS::JSObject::deleteProperty): - (KJS::JSObject::callAsFunction): - (KJS::JSObject::toBoolean): - (KJS::JSObject::toObject): - * kjs/object.h: - (KJS::JSObject::getPropertySlot): - * kjs/property_map.cpp: - (KJS::isValid): - (KJS::PropertyMap::put): - (KJS::PropertyMap::insert): - (KJS::PropertyMap::containsGettersOrSetters): - * kjs/property_map.h: - (KJS::PropertyMap::hasGetterSetterProperties): - * kjs/property_slot.h: - * kjs/string_object.cpp: - (StringInstance::getPropertyNames): - (StringObjectImp::callAsFunction): - (StringObjectFuncImp::callAsFunction): - * kjs/ustring.cpp: - (KJS::UString::Rep::computeHash): - (KJS::UString::UString): - (KJS::UString::from): - (KJS::UString::append): - (KJS::UString::ascii): - (KJS::UString::operator=): - (KJS::UString::find): - (KJS::UString::rfind): - * kjs/ustring.h: - (KJS::UChar::high): - (KJS::UChar::low): - (KJS::UCharReference::low): - (KJS::UCharReference::high): - * kjs/value.cpp: - (KJS::JSValue::toUInt16): - * kjs/value.h: - * pcre/pcre_compile.c: - (get_othercase_range): - * pcre/pcre_exec.c: - (match): - * pcre/pcre_internal.h: - * wtf/HashFunctions.h: - (WTF::intHash): - (WTF::PtrHash::hash): - * wtf/MathExtras.h: - (isnan): - (lround): - (lroundf): - * wtf/StringExtras.h: - (strncasecmp): - * wtf/unicode/icu/UnicodeIcu.h: - (WTF::Unicode::isPrintableChar): - -2006-10-26 W. Andy Carrel - - Reviewed by Maciej. - - - Fix http://bugs.webkit.org/show_bug.cgi?id=7445 / - (and 7253 / ) by changing - inline regexps so that they can have \u escaped Unicode sequences and - still work properly. - - * kjs/lexer.cpp: - (Lexer::Lexer): - (Lexer::setCode): - (Lexer::shift): Looking ahead one additional character for the benefit - of scanRegExp - (Lexer::scanRegExp): Change code to support unicode escapes in inline - regexps. - * kjs/lexer.h: Extra lookahead added. - -=== Safari-521.29 === - -2006-10-26 Nikolas Zimmermann - - Reviewed by Darin. - - Fix build with older gcc 3.3.4. - - * kjs/DateMath.cpp: Remove inline prefix. - (KJS::equivalentYearForDST): - -2006-10-26 Darin Adler - - Reviewed by John. - - - fix iteration of properties of string objects (found because of a warning - emitted by the MSVC compiler) - - * kjs/string_object.cpp: (StringInstance::getPropertyNames): Change code that - wants to format a number as a string to use UString::from. Before it was using - the UString constructor that makes a string from a character! - - * kjs/ustring.h: - * kjs/ustring.cpp: Remove the dangerous and not all that helpful UString(char) - constructor. - - * kjs/grammar.y: Change code to not depend on the UString(char) constructor. - This is potentially more efficient anyway because we could overload the + operator - some day to handle char* directly instead of creating a UString. - - * kjs/nodes2string.cpp: (SourceStream::operator<<): Change code to not depend on - the UString(char) constructor. - -2006-10-25 Kevin McCullough - - Reviewed by Steve (rubber stamp). - - - Link against your local build of JavaScriptCore.lib first, this fixes some errors on release builds of testkjs. - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2006-10-25 Geoffrey Garen - - Reviewed by Lou. - - Removed duplicate symbol declaration. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/grammar.y: - -2006-10-24 Steve Falkenburg - - Build config change - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2006-10-24 Kevin McCullough - - Reviewed by Brady. - - - Fixes a date formatting issue on win. Specifically strftime cannot handle some ranges of time so we shift time call strftime and then manipulate the returned string, if needed. - - * kjs/date_object.cpp: - (KJS::): - (KJS::formatLocaleDate): - (KJS::DateProtoFunc::callAsFunction): - -2006-10-23 Kevin McCullough - - Reviewed by - - - Build fix - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/grammar.y: - -2006-10-23 Kevin McCullough - - Reviewed by Maciej. - - - Makes the toTM function an operator. Was going to piggy back on a patch but the patch needs more work. - - * kjs/DateMath.cpp: - (KJS::equivalentYearForDST): - * kjs/DateMath.h: - (KJS::GregorianDateTime::operator tm): - * kjs/date_object.cpp: - (KJS::formatTime): - (KJS::DateProtoFunc::callAsFunction): - -2006-10-23 Kevin McCullough - - Reviewed by Maciej. - - - Fixes two regressions on win. Both are stack overflows. For one the number of recursions is capped at 100, and for the other, nested parenthesis pairs are not evaluated (since they would evaluate to whatever is in them anyway). - - * kjs/grammar.y: - * kjs/object.cpp: - -2006-10-21 Steve Falkenburg - - Reviewed by Adam. - - Add minimal compatibility with MSVCRT leak checker - - * wtf/FastMalloc.h: - -2006-10-23 Kevin McCullough - - Reviewed by Geof. - - - Sets the lowercase range correctly in the test and consolidates a variable to make the test more readable. - - * tests/mozilla/ecma/String/15.5.4.11-2.js: - -2006-10-21 Darin Adler - - Reviewed by Anders. - - - http://bugs.webkit.org/show_bug.cgi?id=11377 - swap(Vector, Vector) should be O(1) instead of O(n) - - * wtf/Vector.h: - (WTF::VectorBuffer::swap): Added. - (WTF::Vector::swap): Added. - (WTF::swap): Added overload that takes two Vector objects. - -2006-10-21 Darin Adler - - Reviewed by Adam. - - - http://bugs.webkit.org/show_bug.cgi?id=11376 - build scripts should invoke make with "-j" option for multiple processors - - * JavaScriptCore.xcodeproj/project.pbxproj: Pass -j `sysctl -n hw.ncpu` to make. - -2006-10-19 Kevin McCullough - - Reviewed by Geof. - - Changed test to make us pass Georgian case changing for Unicode 4.0 and 5.0. This incorporates changes from the 1.4 revision of the same mozilla test. - On Tiger we are still using Unicode 4.0 but on win and Leopard we are using Unicode 5.0, so this test currently allows for either answer. - - * tests/mozilla/ecma/String/15.5.4.11-2.js: - -2006-10-18 Maciej Stachowiak - - Reviewed by Geoff. - - - remove vestiges of KXMLCore name (former name of WTF). - - * wtf/Assertions.h: - * wtf/FastMalloc.h: - (operator new): - (operator delete): - (operator new[]): - (operator delete[]): - * wtf/FastMallocInternal.h: - * wtf/Forward.h: - * wtf/GetPtr.h: - * wtf/HashCountedSet.h: - * wtf/HashFunctions.h: - * wtf/HashMap.h: - * wtf/HashSet.h: - * wtf/HashTable.h: - * wtf/HashTraits.h: - * wtf/ListRefPtr.h: - * wtf/MathExtras.h: - * wtf/Noncopyable.h: - * wtf/OwnArrayPtr.h: - * wtf/OwnPtr.h: - * wtf/PassRefPtr.h: - * wtf/Platform.h: - * wtf/RefPtr.h: - * wtf/StringExtras.h: - (snprintf): - * wtf/UnusedParam.h: - * wtf/Vector.h: - * wtf/VectorTraits.h: - -2006-10-17 Steve Falkenburg - - Reviewed by Maciej. - - Adjust include paths - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2006-10-17 Kevin McCullough - - Reviewed by Darin. - - Fixed a date issue where the UTC offset was not set in win. - - * kjs/DateMath.cpp: - (KJS::getDSTOffsetSimple): - (KJS::getDSTOffset): - (KJS::msToGregorianDateTime): - * kjs/DateMath.h: - (KJS::): - (KJS::GregorianDateTime::GregorianDateTime): - -2006-10-17 Kevin McCullough - - Reviewed by Brady. - - Fixes a JavaScriptCore math issue on win. - - * kjs/math_object.cpp: - (MathFuncImp::callAsFunction): - * wtf/MathExtras.h: - (wtf_atan2): - -2006-10-16 Kevin McCullough - - Reviewed by Geof. - - Removed unecessary global specifiers. - - * kjs/math_object.cpp: - (MathFuncImp::callAsFunction): - -2006-10-16 Kevin McCullough - - Reviewed by John. - - Fixes a compile order issue for testkjs on win. - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2006-10-15 Krzysztof Kowalczyk - - Reviewed by Anders. - - Remove junk (as gcc calls it) after #else clause. - - * wtf/FastMalloc.cpp: - (WTF::do_free): - -2006-10-14 Krzysztof Kowalczyk - - Reviewed by Maciej. - - Define KXMLCORE_USE_CURL for platforms that wish to use CURL as - networking, and set it for GDK build - - * wtf/Platform.h: - -2006-10-13 Brett Wilson - - Reviewed by Kevin McCullough. - - Fixes http://bugs.webkit.org/show_bug.cgi?id=11283 - Fixes Qt/Linux and Windows build - - * kjs/DateMath.cpp: - * kjs/DateMath.h: - * kjs/date_object.cpp: - (KJS::DateProtoFunc::callAsFunction): - -2006-10-13 Kevin McCullough - - Reviewed by Adam, Geoff, Darin. - - Fixed displaying the UTC offset and time zone string, as well as renamed the GregorianDateTime structure and clean up. - - * ChangeLog: - * kjs/DateMath.cpp: - (KJS::getUTCOffset): - (KJS::getDSTOffsetSimple): - (KJS::gregorianDateTimeToMS): - (KJS::msToGregorianDateTime): - * kjs/DateMath.h: - (KJS::GregorianDateTime::GregorianDateTime): - (KJS::GregorianDateTime::~GregorianDateTime): - (KJS::GregorianDateTime::toTM): - * kjs/date_object.cpp: - (KJS::gmtoffset): - (KJS::formatDate): - (KJS::formatDateUTCVariant): - (KJS::formatTime): - (KJS::fillStructuresUsingTimeArgs): - (KJS::fillStructuresUsingDateArgs): - (KJS::DateInstance::getTime): - (KJS::DateInstance::getUTCTime): - (KJS::DateProtoFunc::callAsFunction): - (KJS::DateObjectImp::construct): - (KJS::DateObjectImp::callAsFunction): - (KJS::DateObjectFuncImp::callAsFunction): - (KJS::parseDate): - * kjs/date_object.h: - -2006-10-13 Kevin McCullough - - Reviewed by Adam. - - Gets JavaScripCore tests running on windows. - - * Scripts/run-javascriptcore-tests: - * Scripts/webkitdirs.pm: - -2006-10-12 Geoffrey Garen - - Reviewed by Maciej. - - Removed JSObjectMakeWithPrototype, clarified some comments. We really - don't want people to manage their own prototypes, so we don't want an - extra function in the API devoted to just that. People can still manage - their own prototypes if they really want by using JSObjectSetPrototype. - - * API/JSClassRef.cpp: - (OpaqueJSClass::createNoAutomaticPrototype): - (OpaqueJSClass::create): - * API/JSClassRef.h: - * API/JSObjectRef.cpp: - (JSClassCreate): - (JSObjectMake): - * API/JSObjectRef.h: - * API/testapi.c: - (main): - * JavaScriptCore.exp: - -2006-10-12 Kevin McCullough - - Reviewed by Adam. - - Build breakage fix - - * kjs/DateMath.cpp: - (KJS::msToTM): - * kjs/date_object.cpp: - (KJS::gmtoffset): - -2006-10-11 Kevin McCullough - - Reviewed by Geoff. - - Added our own tm struct to have a consistent set of fields, which lets us display the DST offset and timezone strings correctly. Also there is some code cleanup. - - * kjs/DateMath.cpp: - (KJS::timeToMS): - (KJS::getUTCOffset): - (KJS::getDSTOffsetSimple): - (KJS::dateToMS): - (KJS::msToTM): - (KJS::tmToKJStm): - (KJS::KJStmToTm): - * kjs/DateMath.h: - * kjs/date_object.cpp: - (KJS::gmtoffset): - (KJS::formatTime): - (KJS::DateProtoFunc::callAsFunction): - (KJS::DateObjectImp::construct): - (KJS::DateObjectImp::callAsFunction): - (KJS::DateObjectFuncImp::callAsFunction): - (KJS::parseDate): - * kjs/date_object.h: - -2006-10-09 Krzysztof Kowalczyk - - Reviewed by Geoff. - - Improve gdk build compiler flags (show warning, no rtti and exceptions). - - * jscore.bkl: - -2006-10-06 Kevin McCullough - - Reviewed by Brady. - - DST and TimeZones were wrong in some cases, specifically on some of the dates where DST changes. - - * kjs/DateMath.cpp: - (KJS::equivalentYearForDST): - (KJS::getUTCOffset): - (KJS::getDSTOffsetSimple): - (KJS::getDSTOffset): - (KJS::dateToMseconds): - (KJS::msToTM): - * kjs/DateMath.h: - * kjs/date_object.cpp: - (KJS::gmtoffset): - -2006-10-05 Darin Adler - - Reviewed by Kevin McCullough. - - * wtf/Assertions.cpp: Fix build when _DEBUG is not defined. - -2006-10-04 Kevin McCullough - - Reviewed by Adam. - - - Removed an unnecessary assert that was stopping many pages. tm_gmtoff was not set for UTC time in mozilla but is always set for us. - - * kjs/DateMath.cpp: - (KJS::getUTCOffset): - (KJS::msToTM): - * kjs/date_object.cpp: - (KJS::gmtoffset): - (KJS::formatTime): - -2006-10-04 Geoffrey Garen - - Patch by Darin and me, reviewed by Maciej. - - Fixed REGRESSION(?): Oft-seen but unrepro crash - in JavaScript garbage collection (KJS::Collector::collect()) - Crash in KJS::collect - - The issue here was allocating one garbage-collected object in the midst - of allocating a second garbage-collected object. In such a case, the - zeroIfFree word lies. - - * kjs/collector.cpp: - (KJS::Collector::allocate): - (KJS::Collector::collect): - -2006-10-04 Kevin McCullough - - Reviewed by Adam. - - - Layout test fix - - * kjs/DateMath.cpp: - (KJS::dateToDayInYear): accept and correctly handle negative months - -2006-10-05 Kevin McCullough - - build fix - - * kjs/DateMath.cpp: - (KJS::dateToDayInYear): - -2006-10-05 Mark Rowe - - Reviewed by maculloch. - - Gdk build fix. - - * JavaScriptCoreSources.bkl: Add DateMath.cpp to file list. - -2006-10-05 Kevin McCullough - - Reviewed by aroben - - - build fix - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-10-04 Nikolas Zimmermann - - Reviewed by Mitz. - - Fix Qt/Linux build by adding DateMath.cpp to compilation. - - * CMakeLists.txt: Also replace tabs with spaces. - -2006-10-04 Kevin McCullough - - Reviewed by DethBakin. - - - Apparently the build bot uses an older version of XCode which warns about conversions and the newest version does not. I hope this fixes the build but I cann't be sure on my system. - - * kjs/DateMath.cpp: - (KJS::msToYear): - (KJS::dayInYear): - (KJS::dateToDayInYear): - -2006-10-05 Darin Adler - - Reviewed by Adam. - - * wtf/Assertions.cpp: Changed assertion formatting to omit the "======" - lines so you can see more assertions in less space. Also improved format - of file/line information so it works with more development environments. - -2006-10-04 Kevin McCullough - - Reviewed by Tim H. - - - The build machine is more sensitive about automatic conversions. These fixes exp -licitly cast or change the input and return types of functions to avoid conversions. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/DateMath.cpp: - (KJS::): - (KJS::msToDays): - (KJS::msToYear): - (KJS::dayInYear): - (KJS::monthToDayInYear): - (KJS::dateToDayInYear): - (KJS::getDSTOffsetSimple): - (KJS::getDSTOffset): - (KJS::dateToMseconds): - (KJS::msToTM): - -2006-10-04 Kevin McCullough - - Reviewed by GGaren - - - This is a big makeover for our Date implemenetation. This solves many platform specific issues, specifically dates before 1970, and simplifies some ugly code. The purpose of this was to get us to pass many of the JavaScriptCore tests on windows. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/DateMath.cpp: Added. - (KJS::): - (KJS::daysInYear): - (KJS::daysFrom1970ToYear): - (KJS::msFrom1970ToYear): - (KJS::msToDays): - (KJS::msToYear): - (KJS::isLeapYear): - (KJS::isInLeapYear): - (KJS::dayInYear): - (KJS::msToMilliseconds): - (KJS::msToWeekDay): - (KJS::msToSeconds): - (KJS::msToMinutes): - (KJS::msToHours): - (KJS::msToMonth): - (KJS::msToDayInMonth): - (KJS::monthToDayInYear): - (KJS::timeToMseconds): - (KJS::dateToDayInYear): - (KJS::equivalentYearForDST): - (KJS::getUTCOffset): - (KJS::getDSTOffsetSimple): - (KJS::getDSTOffset): - (KJS::localTimeToUTC): - (KJS::UTCToLocalTime): - (KJS::dateToMseconds): - (KJS::msToTM): - (KJS::isDST): - * kjs/DateMath.h: Added. - (KJS::): - * kjs/date_object.cpp: - (KJS::gmtoffset): - (KJS::formatTime): - (KJS::DateInstance::getTime): - (KJS::DateInstance::getUTCTime): - (KJS::DateProtoFunc::callAsFunction): - (KJS::DateObjectImp::construct): - (KJS::DateObjectFuncImp::callAsFunction): - (KJS::parseDate): - * kjs/testkjs.cpp: - * os-win32/stdint.h: - -2006-10-02 Nikolas Zimmermann - - Reviewed/landed by Adam. - - Build testkjs on Qt/Linux. - - * CMakeLists.txt: - -2006-10-02 Nikolas Zimmermann - - Reviewed by eseidel. Landed by eseidel. - - Fix win32 build, which has no inttypes.h - - * wtf/Assertions.h: - -2006-10-02 Nikolas Zimmermann - - Reviewed by eseidel & mjs. Landed by eseidel. - - Fix Qt/Linux build with older gcc 3.3.4. - http://bugs.webkit.org/show_bug.cgi?id=11116 - - * kjs/lookup.h: Move cacheGlobalObject into KJS namespace. - (KJS::cacheGlobalObject): Also remove GCC_ROOT_NS_HACK. - * wtf/Assertions.h: Include inttypes.h for uintptr_t. - -2006-09-28 Steve Falkenburg - - Reviewed by Maciej. - - Use $(ConfigSuffix) set via vsprops files to add _debug - to end of debug filenames. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/debug.vsprops: Added. - * JavaScriptCore.vcproj/dftables/dftables.vcproj: - * JavaScriptCore.vcproj/release.vsprops: Added. - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2006-09-28 Darin Adler - - Reviewed by Alice. - - - support for change that should fix - REGRESSION: XML iBench shows 10% perf. regression (copying - strings while decoding) - - * wtf/Vector.h: Changed VectorBuffer so that the general case - contains an instance of the 0 case, since deriving from it - was violating the Liskov Substitution Principle. - (WTF::VectorBuffer::releaseBuffer): Added. Releases the buffer so it can - be adopted by another data structure that uses the FastMalloc.h allocator. - Returns 0 if the internal buffer was being used. - (WTF::Vector::releaseBuffer): Added. Releases the buffer as above or creates - a new one in the case where the internal buffer was being used. - -2006-09-28 Maciej Stachowiak - - Reviewed by Geoff. - - - change garbage collection to happen at increments proportional to number of live objects, not always - every 1000 allocations - - * kjs/collector.cpp: - (KJS::Collector::allocate): - -2006-09-28 Maciej Stachowiak - - Reviewed by Mitz. - - - fixed REGRESSION (r16606): javascriptCore Crash on website load - - Plus style fixes. - - - fixed some possible off-by-one bugs - - use indexing, not iterators, for Vectors - - store Vector by pointer instead of by value to avoid blowing out FunctionImp size - - * kjs/function.cpp: - (KJS::FunctionImp::addParameter): - (KJS::FunctionImp::parameterString): - (KJS::FunctionImp::processParameters): - (KJS::FunctionImp::lengthGetter): - (KJS::FunctionImp::getParameterName): - * kjs/function.h: - -2006-09-27 Steve Falkenburg - - Reviewed by Maciej. - - More build tweaks - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/dstroot-to-sdk.cmd: Removed. - -2006-09-27 John Sullivan - - * kjs/function.cpp: - (KJS::FunctionImp::getParameterName): - removed assertion that displeased gcc 4.0.1 (build 5420): - ASSERT(static_cast(index) == index); - -2006-09-27 Kevin McCullough - - Reviewed by GGaren. - - Cleanup of previous fix which was to address Radar: 4752492 - - * kjs/function.cpp: - (KJS::FunctionImp::addParameter): - (KJS::FunctionImp::parameterString): - (KJS::FunctionImp::processParameters): - (KJS::FunctionImp::lengthGetter): - (KJS::FunctionImp::getParameterName): - * kjs/function.h: - -2006-09-27 Kevin McCullough - - Reviewed by Adele. - - Fixes a GC stack overflow crash. - The change is to move from a linked list implementation of Parameters to a Vector. - The problem with the linked list is that each one creates it's own stack frame when being destroyed and in extreme cases this caused the stack to overflow. - - * kjs/function.cpp: - (KJS::Parameter::Parameter): - (KJS::FunctionImp::addParameter): - (KJS::FunctionImp::parameterString): - (KJS::FunctionImp::processParameters): - (KJS::FunctionImp::lengthGetter): - (KJS::FunctionImp::getParameterName): - * kjs/function.h: - -2006-09-27 Steve Falkenburg - - Fix last path fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2006-09-27 Steve Falkenburg - - Set path before build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2006-09-27 Sean Gies - - Reviewed by Adam Roben. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Debug config should link to debug runtime. - * JavaScriptCore.vcproj/dftables/dftables.vcproj: Debug config should link to debug runtime. - -2006-09-27 Don Melton - - Reviewed by Adam Roben. - - Changed line ending from DOS to UNIX format so it doesn't die running - on my machine. ;) - - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: - -2006-09-23 Alexey Proskuryakov - - Reviewed by Maciej. - - http://bugs.webkit.org/show_bug.cgi?id=10183 - REGRESSION: obfuscated JS decoding breaks because of soft hyphen removal - (Fanfiction.net author pages not listing stories) - - Rolled out the fix for bug 4139. - - * kjs/lexer.cpp: - (Lexer::setCode): - (Lexer::shift): - * tests/mozilla/ecma/Array/15.4.5.1-1.js: - * tests/mozilla/expected.html: - -2006-09-22 Steve Falkenburg - - Build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2006-09-22 Darin Adler - - Reviewed by Alice. - - * wtf/Vector.h: Add an append that takes a pointer and length. - Generalize the existing Vector append to work on vectors with - any value for inlineCapacity. Change the append algorithm so - it doesn't check capacity each time through the loop. - -2006-09-22 Steve Falkenburg - - Fix release build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2006-09-21 Geoffrey Garen - - Reviewed by Maciej. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Updated to include the right path. - * wtf/FastMalloc.h: #include Platform.h, since we use Platform macros. - -=== Safari-521.27 === - -2006-09-20 Anders Carlsson - - Reviewed by Dave Hyatt. - - * wtf/MathExtras.h: - Get rid of lrint. - -2006-09-20 Sean Gies - - Reviewed by Steve Falkenburg. - - * wtf/Assertions.cpp: Debug messages should go into debugger console. - -2006-09-20 David Hyatt - - Add an implementation of lrint for Win32. - - Reviewed by anders - - * wtf/MathExtras.h: - (lrint): - -2006-09-15 Krzysztof Kowalczyk - - Reviewed by Adam. - - http://bugs.webkit.org/show_bug.cgi?id=10864 - Bug 10864: Linux\GDK build fixes - - * JavaScriptCoreSources.bkl: - * jscore.bkl: - -2006-09-15 Adam Roben - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: - -2006-09-15 Anders Carlsson - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Fix the release build. - -2006-09-15 Anders Carlsson - - Reviewed by Steve. - - Add JavaScriptCore API to the build. - * API/JSBase.cpp: - * API/JSCallbackConstructor.cpp: - * API/JSCallbackFunction.cpp: - * API/JSCallbackObject.cpp: - * API/JSClassRef.cpp: - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - * API/JSStringRef.cpp: - * API/JSValueRef.cpp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * os-win32/stdbool.h: Added. - -2006-09-12 Steve Falkenburg - - Reviewed by Ada. - - Build tweaks (doing JavaScriptCore now since it doesn't have - dependencies). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: - * JavaScriptCore.vcproj/JavaScriptCore/dstroot-to-sdk.cmd: Added. - * JavaScriptCore.vcproj/dftables/dftables.vcproj: - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2006-09-11 Brady Eidson - - Build fix - I think Tim's last checkin wasn't tested on Tiger, possibly. I simply - commented out the undefined constants until he can have a chance to make the right call - - * bindings/objc/objc_utility.mm: - (KJS::Bindings::objcValueTypeForType): Commented out undefined symbols - -2006-09-11 Timothy Hatcher - - Reviewed by Tim O. and Darin. - - Add support for more method signatures affecting ObjC methods called from JavaScript: - - Added unsigned types and long long. - - Allow methods that use const, oneway, bycopy and byref type modifiers. - - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - * bindings/objc/objc_utility.h: - (KJS::Bindings::): - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - (KJS::Bindings::convertObjcValueToValue): - (KJS::Bindings::objcValueTypeForType): - -2006-09-05 Timothy Hatcher - - Reviewed by Tim O. - - SEL is not char* - - * bindings/objc/objc_class.mm: - (KJS::Bindings::ObjcClass::methodsNamed): use sel_getName instead of a char* cast. - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::callAsFunction): ditto - -2006-09-03 Alexey Proskuryakov - - Reviewed by Tim H. - - http://bugs.webkit.org/show_bug.cgi?id=10693 - Convert JavaScript arrays to AppleScript lists - - * JavaScriptCore.exp: Export ArrayInstance::info and ArrayInstance::getItem(). - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstance::getItem): Added a method to access array items from C++. - -2006-09-02 Krzysztof Kowalczyk - - Reviewed by Tim H. - - Bug 10454: Unix bakefile fixes - http://bugs.webkit.org/show_bug.cgi?id=10454 - - * JavaScriptCoreSources.bkl: - -2006-09-01 Nikolas Zimmermann - - Reviewed by hyatt. Landed by eseidel. - - Fix build on Linux. - - * pcre/CMakeLists.txt: Add wtf/ include. - -2006-09-01 Nikolas Zimmermann - - Reviewed and landed by ap. - - Fix build on Linux (C89 without gcc extensions enabled). - - * pcre/pcre_internal.h: Use C style comments. - * wtf/Assertions.h: Use C style comments. - * wtf/Platform.h: Use C style comments. - -2006-09-01 Steve Falkenburg - - Fix build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/dftables/dftables.vcproj: - -2006-08-31 Anders Carlsson - - Reviewed by Darin. - - Add new portability functions to MathExtras.h and add StringExtras.h which is for - string portability functions. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * bindings/c/c_instance.cpp: - * kjs/date_object.cpp: - * wtf/MathExtras.h: - (copysign): - (isfinite): - * wtf/StringExtras.h: Added. - (snprintf): - (strncasecmp): - -2006-08-31 Anders Carlsson - - Reviewed by Tim H. - - Fix Windows build. - - * JavaScriptCore.vcproj/dftables/dftables.vcproj: - * pcre/pcre_internal.h: - -2006-08-31 Timothy Hatcher - - Reviewed by Geoff. - - Band-aid fix for PCRE to compile for ppc64 and x86_64 now that - we use -Wshorten-64-to-32. Adds an INT_CAST macro that ASSERTs - the value <= INT_MAX. - - I filed to track the need to verify - PCRE's 64-bit compliance. - - * pcre/pcre_compile.c: - (complete_callout): - (compile_branch): - (compile_regex): - (pcre_compile2): - * pcre/pcre_exec.c: - (match): - (pcre_exec): - * pcre/pcre_get.c: - (pcre_get_substring_list): - * pcre/pcre_internal.h: - * pcre/pcre_tables.c: - * pcre/pcre_try_flipped.c: - (_pcre_try_flipped): - -2006-08-30 Darin Adler - - Reviewed by Tim Hatcher. - - - add WTF::getPtr, a function template that makes it possible to write - generic code that gets a raw pointer out of any of our pointer types - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/GetPtr.h: Added. - * wtf/ListRefPtr.h: (WTF::getPtr): Added. - * wtf/OwnArrayPtr.h: (WTF::getPtr): Added. - * wtf/OwnPtr.h: (WTF::getPtr): Added. - * wtf/PassRefPtr.h: (WTF::getPtr): Added. - * wtf/RefPtr.h: (WTF::getPtr): Added. - -2006-08-29 waylonis - - Reviewed, tweaked by ggaren. - - - Added storage and accessor functions for ExecState as a fix for - http://bugs.webkit.org/show_bug.cgi?id=10114 - - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - * kjs/ExecState.h: - * kjs/context.h: - (KJS::Context::setExecState): - (KJS::Context::execState): - -2006-08-30 Nikolas Zimmermann - - Reviewed by Tim H. - - Commit KDE related tweaks, to be able to - differentiate between a Qt-only or a KDE build. - - * CMakeLists.txt: Install wtf-unity library. - * wtf/Platform.h: Add define for the KDE platform. - -2006-08-28 Darin Adler - - Reviewed by Geoff. - - * kjs/list.h: Use explicit in constructor (as appropriate). - -2006-08-24 Nikolas Zimmermann - - Reviewed, tweaked and landed by ap - - http://bugs.webkit.org/show_bug.cgi?id=10467 - WebKit should have Qt platform support (Part II) - - * CMakeLists.txt: Adjust to Anders' build fixes. - * wtf/Platform.h: Fix define for the Qt platform (we don't use/need Cairo.) - -2006-08-23 David Hyatt - - Fix Platform.h to include #defines for graphics features. - - Reviewed by darin - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * wtf/Platform.h: - -2006-08-23 Anders Carlsson - - Reviewed by Darin. - - Make the bindings compile without CoreFoundation. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * bindings/c/c_instance.cpp: - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertUTF8ToUTF16): - * bindings/npapi.h: - * bindings/runtime.cpp: - (KJS::Bindings::Instance::createBindingForLanguageInstance): - (KJS::Bindings::Instance::createLanguageInstanceForValue): - * bindings/runtime_root.cpp: - * bindings/runtime_root.h: - * kjs/interpreter.cpp: - (KJS::Interpreter::createLanguageInstanceForValue): - * kjs/interpreter.h: - -2006-08-22 Anders Carlsson - - Reviewed by Darin. - - Move the npruntime code over to using HashMap and the runtime_root code over to using - HashMap and HashCountedSet. - - * bindings/NP_jsobject.cpp: - * bindings/c/c_utility.cpp: - (KJS::Bindings::identifierFromNPIdentifier): - * bindings/c/c_utility.h: - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::invoke): - * bindings/npruntime.cpp: - (getStringIdentifierMap): - (getIntIdentifierMap): - (_NPN_GetStringIdentifier): - (_NPN_GetIntIdentifier): - * bindings/runtime_root.cpp: - (getReferencesByRootMap): - (getReferencesSet): - (KJS::Bindings::findReferenceSet): - (KJS::Bindings::rootForImp): - (KJS::Bindings::rootForInterpreter): - (KJS::Bindings::addNativeReference): - (KJS::Bindings::removeNativeReference): - (RootObject::removeAllNativeReferences): - * bindings/runtime_root.h: - -2006-08-22 Anders Carlsson - - Reviewed by Geoff. - - Switch over the NPAPI and Java bindings to using HashMaps instead of dictionaries. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/c/c_class.cpp: - (KJS::Bindings::CClass::CClass): - (KJS::Bindings::CClass::~CClass): - (KJS::Bindings::CClass::classForIsA): - (KJS::Bindings::CClass::methodsNamed): - (KJS::Bindings::CClass::fieldNamed): - * bindings/c/c_class.h: - * bindings/jni/jni_class.cpp: - (JavaClass::JavaClass): - (JavaClass::~JavaClass): - (JavaClass::methodsNamed): - (JavaClass::fieldNamed): - * bindings/jni/jni_class.h: - * bindings/objc/objc_class.h: - * bindings/objc/objc_class.mm: - (KJS::Bindings::deleteMethod): - (KJS::Bindings::deleteField): - (KJS::Bindings::): - (KJS::Bindings::ObjcClass::methodsNamed): - (KJS::Bindings::ObjcClass::fieldNamed): - * bindings/runtime.cpp: - * bindings/runtime.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::fieldGetter): - (RuntimeObjectImp::getOwnPropertySlot): - (RuntimeObjectImp::put): - (RuntimeObjectImp::canPut): - -2006-08-21 Vladimir Olexa - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=6252 - JavaScript 1.6 Array.lastIndexOf - - Test: fast/js/array-lastIndexOf.html - - * kjs/array_object.cpp: - (ArrayProtoFunc::callAsFunction): Added a LastIndexOf case. - * kjs/array_object.h: - (KJS::ArrayProtoFunc::): Added LastIndexOf to enum. - * tests/mozilla/expected.html: Two more tests now pass. - -2006-08-20 Nikolas Zimmermann - - Reviewed by Maciej. Landed by rwlbuis. - - Fixes parts of: http://bugs.webkit.org/show_bug.cgi?id=10463 - WebKit should have Qt platform support - - Removing obsolete QConstString/QString constructors in kjs code. - - * kjs/identifier.h: - * kjs/ustring.h: - -2006-08-17 Nikolas Zimmermann - - Reviewed by Maciej. Landed by rwlbuis. - - Fixes: http://bugs.webkit.org/show_bug.cgi?id=10463 - WTF Changes needed for Qt platform code. - - * wtf/Platform.h: - * wtf/unicode/UnicodeDecomposition.h: Added. - (WTF::Unicode::): - * wtf/unicode/UnicodeDirection.h: Added. - (WTF::Unicode::): - * wtf/unicode/qt4/UnicodeQt4.cpp: Added. - (WTF::Unicode::direction): - (WTF::Unicode::category): - (WTF::Unicode::decomposition): - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::isPrintableChar): - (WTF::Unicode::isSpace): - (WTF::Unicode::isPunct): - (WTF::Unicode::isDigit): - (WTF::Unicode::mirroredChar): - (WTF::Unicode::compare): - -2006-08-17 Nikolas Zimmermann - - Reviewed by Eric. Landed by rwlbuis. - - Fixes: http://bugs.webkit.org/show_bug.cgi?id=10464 - Offer a cmake build system for Qt platform. - - * CMakeLists.txt: Added. - * pcre/CMakeLists.txt: Added. - -2006-08-17 Anders Carlsson - - Reviewed by Maciej. - - * bindings/npapi.h: - Fix ifdef. - -2006-08-15 Steve Falkenburg - - Reviewed by mjs. - - Build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * wtf/Assertions.h: - -2006-08-15 Mark Rowe - - Reviewed by Tim H. - - Build fix: DWARF and -gfull are incompatible with symbol separation. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-08-15 Mark Rowe - - Reviewed by Tim H. - - http://bugs.webkit.org/show_bug.cgi?id=10394 - Bug 10394: WebKit Release and Production configurations should enable dead code stripping - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-08-15 Mark Rowe - - Reviewed by Tim H. - - http://bugs.webkit.org/show_bug.cgi?id=10384 - Bug 10384: Switch to DWARF for Release configuration - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-08-13 Maks Orlovich - - Reviewed (and tweaked a little) by Maciej. - - - shrank the size of JSObject by 8 bytes and made the corresponding reduction to the cell size, resulting - in a 1.2% speed improvement on JS iBench (and probably overall memory savings). - - This was done by removing _scope and _internalValue data members - from JSObject and moving them only to the subclasses that actually - make use of them. - - * kjs/object.cpp: - (KJS::JSObject::mark): No need to mark scope or internal value here. - * kjs/object.h: - (KJS::JSObject::JSObject): Don't initialize them. - * kjs/JSWrapperObject.cpp: Added. New base class for object types that - wrap primitive values (Number, String, Boolean, Date). - (KJS::JSWrapperObject::mark): - * kjs/JSWrapperObject.h: Added. - (KJS::JSWrapperObject::JSWrapperObject): - (KJS::JSWrapperObject::internalValue): - (KJS::JSWrapperObject::setInternalValue): - * kjs/array_object.cpp: - (ArrayPrototype::ArrayPrototype): Don't set useless internal value. - * kjs/bool_object.cpp: - (BooleanInstance::BooleanInstance): Inherit from JSWrapperObject. - (BooleanProtoFunc::callAsFunction): Fixed to account for fact that not all - JSObjects have an internal value. - (BooleanObjectImp::construct): ditto. - * kjs/bool_object.h: - * kjs/collector.cpp: Lowered cell size to 48. - (KJS::Collector::allocate): meaningless whitespace change - * kjs/date_object.cpp: - (KJS::DateInstance::DateInstance): Inherit from JSWrapperObject. - (KJS::DateProtoFunc::callAsFunction): adjusted for move of internalValue - (KJS::DateObjectImp::construct): ditto - * kjs/date_object.h: - * kjs/error_object.cpp: - (ErrorPrototype::ErrorPrototype): don't set internal value - * kjs/function.cpp: move _scope and related handling here - (KJS::FunctionImp::mark): mark scope - * kjs/function.h: - (KJS::FunctionImp::scope): moved here from JSObject - (KJS::FunctionImp::setScope): ditto - * kjs/number_object.cpp: - (NumberInstance::NumberInstance): inherit from JSWrapperObject - (NumberProtoFunc::callAsFunction): adjusted - (NumberObjectImp::construct): adjusted - * kjs/number_object.h: shring RegExp-related objects a little - * kjs/regexp_object.cpp: - (RegExpPrototype::RegExpPrototype): Adjust for size tweaks - (RegExpObjectImp::RegExpObjectImp): ditto - * kjs/regexp_object.h: - * kjs/string_object.cpp: - (StringInstance::StringInstance): inherit from JSWrapperObject - (StringProtoFunc::callAsFunction): adjusted - * kjs/string_object.h: - * JavaScriptCore.exp: Exported new methods as needed. - * JavaScriptCore.xcodeproj/project.pbxproj: Added new files to build. - -2006-08-04 Brady Eidson - - Reviewed by Geoff's rubber stamp - - Fix a build break on Intel hardware causes by adapting stricter - compiler warnings (-Wshorten-64-to-32) - - * API/testapi.c: - (assertEqualsAsNumber): manually cast some doubles to floats - (main): ditto - -2006-08-04 Sam Weinig - - Reviewed by Darin. - - - patch for http://bugs.webkit.org/show_bug.cgi?id=10192 - Make WebCore (and friends) compile with -Wshorten-64-to-32 - - * Adds -Wshorten-64-to-32 flag to Xcode project. - * Adds explicit casts where OK. - - * API/JSNodeList.c: - (JSNodeList_item): - (JSNodeList_getProperty): - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-08-04 Adam Roben - - Reviewed by Anders. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Convert - spaces to tabs - -2006-08-03 Sam Weinig - - Reviewed by Darin. - - - patch for http://bugs.webkit.org/show_bug.cgi?id=10176 - Make WebCore compile with -Wundef - - * Adds -Wundef flag to Xcode project - * Converts #ifs to #ifdef and #ifndefs where needed. - * Added #define YYMAXDEPTH 10000 in kjs/grammar.y - to fix a warning from within Bison. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::getSlot): - (JavaJSObject::setSlot): - * bindings/npapi.h: - * bindings/objc/objc_class.mm: - (KJS::Bindings::ObjcClass::methodsNamed): - (KJS::Bindings::ObjcClass::fieldNamed): - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - * bindings/objc/objc_runtime.mm: - (ObjcMethod::getMethodSignature): - (ObjcField::name): - (ObjcField::type): - * kjs/grammar.y: - * kjs/identifier.h: - -2006-08-03 Anders Carlsson - - Reviewed by John Sullivan. - - * wtf/HashSet.h: - (WTF::::operator): - Return *this in operator= - -2006-08-03 Adam Roben - - Reviewed by Anders. - - - Fixed Windows build - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * wtf/MathExtras.h: Implement inline versions of these functions - (nextafter): - (nextafterf): - -2006-08-02 Adam Roben - - Reviewed by Darin. - - - Fixed build - - * kjs/date_object.cpp: - (KJS::formatTime): - -2006-07-29 Darin Adler - - - Removed tabs from these source files that still had them. - We don't use them; that way source files look fine in editors - that have tabs set to 8 spaces or to 4 spaces. - - Removed allow-tabs Subversion property from the files too. - - * bindings/NP_jsobject.cpp: - * bindings/c/c_utility.cpp: - * bindings/jni/jni_runtime.cpp: - * bindings/jni/jni_utility.cpp: - * bindings/objc/objc_utility.mm: - * bindings/runtime.cpp: - * bindings/runtime_method.cpp: - * bindings/testbindings.cpp: - * bindings/testbindings.mm: - * kjs/date_object.cpp: - * kjs/function.cpp: - * kjs/list.cpp: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/string_object.cpp: - * kjs/ustring.cpp: - -2006-07-29 Darin Adler - - * tests/mozilla/expected.html: Update test results now that regress-185165.js - is succeeding. I suspect Anders fix for bug 4620655 is the reason. - -2006-07-29 Sam Weinig - - Reviewed by Darin. - - - patch for http://bugs.webkit.org/show_bug.cgi?id=10080 - Adopt pedantic changes from the Unity project to improve - cross-compiler compatibility - - Changes include: - * Removing trailing semicolon from namespace braces. - * Removing trailing comma from last enum declaration. - * Updating to match style guidelines. - * Adding missing newline to the end of the file. - * Turning on gcc warning for missing newline at the end of a source file - (GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc). - * Alphabetical sorting of Xcode source list files. - * Replace use of non-portable variable-size array with Vector. - * Use C-style comments instead of C++ comments in files that might - be included by either C or C++ files. - - * API/JSCallbackConstructor.cpp: - (KJS::JSCallbackConstructor::construct): - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::callAsFunction): - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::construct): - (KJS::JSCallbackObject::callAsFunction): - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCorePrefix.h: - * bindings/jni/jni_class.cpp: - (JavaClass::fieldNamed): - * bindings/jni/jni_class.h: - * bindings/jni/jni_instance.cpp: - (JavaInstance::JavaInstance): - (JavaInstance::valueOf): - * bindings/jni/jni_objc.mm: - (KJS::Bindings::dispatchJNICall): - * bindings/jni/jni_runtime.cpp: - (JavaParameter::JavaParameter): - (JavaArray::JavaArray): - * bindings/jni/jni_runtime.h: - * bindings/jni/jni_utility.h: - * bindings/objc/objc_instance.h: - * bindings/runtime_array.h: - * kjs/collector.h: - * kjs/config.h: - * kjs/ustring.cpp: - * wtf/Platform.h: - -2006-07-29 Mike Emmel - - Reviewed by Darin. - - - fixes for Linux build - - * JavaScriptCoreSources.bkl: Added new files to build, kjs/PropertyNameArray.cpp - and kjs/testkjs.cpp, and removed old files. - -2006-07-24 Dan Waylonis - - Reviewed and tweaked a bit by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=9902 - jsNull and NSNull not properly converted between JS and ObjC - - * bindings/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue): - Added case for converting NSNull to jsNull. - -2006-07-24 Rob Buis - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=4258 - Date().toString() only includes GMT offset, not timezone string - - Use the info in tm_zone to append timezone abbreviation - to Date().toString(). - - * kjs/date_object.cpp: - (KJS::formatTime): - -2006-07-24 Rob Buis - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=5257 - setYear() does not match FireFox/IE behavior - - Make sure the right values end up in tm_year. - - * kjs/date_object.cpp: - (KJS::formatTime): - -2006-07-23 Mark Rowe - - Reviewed by Maciej. - - Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions - http://bugs.webkit.org/show_bug.cgi?id=9686 - - JavaScriptCore portion of the fix. - - * JavaScriptCore.exp: Update symbol for change in argument type. - * kjs/debugger.cpp: - (Debugger::detach): Clear map of recent exceptions. - (Debugger::hasHandledException): Track the most recent exception - thrown by an interpreter. - (Debugger::exception): Change exception argument to a JSValue. - * kjs/debugger.h: - * kjs/nodes.cpp: - (Node::debugExceptionIfNeeded): Notify the debugger of an exception - if it hasn't seen it before. - (ThrowNode::execute): Notify the debugger that an exception is being thrown. - * kjs/nodes.h: - - 2006-07-23 Geoffrey Garen - - Patch by Eric Albert, reviewed by Darin and me. - - - Fixed JavaScriptCore stack-scanning code - crashes (Collector::markStackObjectsConservatively) - - * bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an - int. - (JavaJSObject::getSlot): - (JavaJSObject::setSlot): - * kjs/collector.cpp: - (KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of - an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned, - and we want to scan the stack for pointers. - * JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the - XCode war has started up again! - -=== Safari-521.20 === - -2006-07-21 Geoffrey Garen - - Reviewed by Darin. - - REGRESSION: overlays don't work on HousingMaps.com (Google Maps-based site) - - - Added support for strings that masquerade as undefined. Currently used - by WebCore to implement undetectable style.filter. - - The name is a little long, but it's only used in one line of code, so I - thought clarity should win over brevity. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/object.h: - * kjs/string_object.h: - (KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined): - (KJS::StringInstanceThatMasqueradesAsUndefined::masqueradeAsUndefined): - (KJS::StringInstanceThatMasqueradesAsUndefined::toBoolean): - -=== Safari-521.19 === - -2006-07-20 Steve Falkenburg - - Fix the build - - * kjs/function.cpp: - (KJS::escapeStringForPrettyPrinting): - -2006-07-19 Anders Carlsson - - Reviewed by Darin. - - REGRESSION(10.4.7-10.5): preview button for a blogger.com post doesn't work - - * kjs/nodes2string.cpp: - (StringNode::streamTo): - Return the escaped string. - - (RegExpNode::streamTo): - Use the correct syntax. - - * kjs/function.cpp: - (KJS::escapeStringForPrettyPrinting): - * kjs/function.h: - Add escape function which escapes a string for pretty-printing so it can be parsed again. - - * wtf/unicode/icu/UnicodeIcu.h: - (WTF::Unicode::isPrintableChar): - New function. - -2006-07-18 Maciej Stachowiak - - Reviewed by Adele Peterson. - - REGRESSION: null character in JS string causes parse error (works in Tiger and in other browsers) - - * kjs/lexer.cpp: - (Lexer::shift): - (Lexer::lex): - (Lexer::record16): - (Lexer::scanRegExp): - * kjs/lexer.h: - -2006-07-18 Tim Omernick - - Reviewed by Tim Hatcher. - - Removed a misleading comment; we recently added support for the NPNVPluginElementNPObject - variable. - - * bindings/npapi.h: - -=== Safari-521.18 === - -2006-07-18 Timothy Hatcher - - Made the following headers public: - - * JavaScriptCore.h - * JSBase.h - * JSContextRef.h - * JSObjectRef.h - * JSStringRef.h - * JSValueRef.h - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-07-17 Geoffrey Garen - - Reviewed by Maciej. - - - Added automatic prototype creation for classes. - - A class stores a weak reference to a prototype, which is cleared when - the prototype is garbage collected, to avoid a reference cycle. - - We now have an attributes field in JSClassDefinition, that currently is - used only to override automatic prototype creation when you want to manage your - own prototypes, but can be extended in the future for other nefarious purposes. - - Similarly, we have JSObjectMake and JSObjectMakeWithPrototype, the latter - allowing you to manage your own prototypes. - - JSObjectMakeConstructor is more interesting now, able to make a constructor - on your behalf if you just give it a class. - - - Removed bogus old code from minidom.js. - - - Tweaked the headerdocs. - - - Added more GC testing, which caught some leaks, and tested more funny - edge cases in lookup, which caught a lookup bug. Removed some testing - we used to do with MyObject because it was redundant with the new, cool - stuff. - - While fixing the lookup bug I retracted this change: - - "If a static setProperty callback returns 'false', to indicate that the - property was not set, we no longer forward the set request up the class - chain, because that's almost certainly not what the programmer expected." - - Returning false when setting a static property is a little silly, but you can see - it being useful when shadowing a base class's static properties, and, regardless - of usefullness, this is the defined behavior of the setProperty callback. - - - Plus a little ASCII art, for the kids. - -2006-07-17 Timothy Hatcher - - Reviewed by Maciej. - - WebScriptObject and WebUndefined are no longer defined by WebKit - - Moves WebScriptObject and WebUndefined up to WebCore. - This change does create an upwards-dependancy on WebScriptObject existing - in the loaded process, but this code path in JavaScriptCore does not get used - unless it is through WebKit/WebCore. Moving all of the binding code out of - JavaScriptCore might make sense in the future. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/objc/WebScriptObject.h: Replaced. - * bindings/objc/WebScriptObject.mm: Removed. - * bindings/objc/WebScriptObjectPrivate.h: Removed. - * bindings/objc/objc_class.h: - * bindings/objc/objc_instance.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::~ObjcInstance): - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (convertValueToObjcObject): - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - (KJS::Bindings::convertObjcValueToValue): - (KJS::Bindings::createObjcInstanceForValue): - -2006-07-17 Darin Adler - - * API/JSBase.h: Fix comment formatting where things used to be lined up but - are now ragged. Got rid of spaces that attempted to line things up. - * API/JSObjectRef.h: Ditto. Also add missing periods for a couple of comments. - -2006-07-17 Geoffrey Garen - - Reviewed by Maciej. - - - Removed the exception parameter from the initialize callback and, by extension, - JSObjectMake. We have never had a need for exceptions when iniitializing, - so the parameter seemed likely to "get in the way." - - Also, an exception in JavaScript is thrown in response to input -- - "invalid URL", "index not a number", etc., so it's the job of the - constructor function, not the initialize method, to throw. - - If initialize *really* wants to throw, it can communicate the throw to - the constructor through the constructed object's private data (e.g., set - it to NULL, signaling to the consntructor that initialization failed.) - - - Added JSObjectMakeWithData, which enables a constructor to set private - data on an object *before* it has been initialized. That way, the initialize - methods can properly operate on the data. - - * API/JSNode.c: Moved ref into the initialize method, for better encapsulation, - now that it's possible. - * API/JSNodeList.c: ditto - * API/minidom.c: - (main): Do more aggressive garbage collection to test ref/deref and - initialize/finalize. - * API/minidom.js: store childNodes in a temporary so it doesn't get re-created - like a thousand times. This makes debugging ref/deref easier - -2006-07-17 Geoffrey Garen - - Reviewed by Maciej. - - - Changed the initialize callback to run from least derived class (parent - class) to most derived class. This enables C++ style initialization, - and derived class overriding of member data. - - - Added excpetion propopgation to JSObjectMake, to support initialize - exceptions, and generally round out our policy of making function - signatures as long as possible. - - * API/JSCallbackObject.h: Use ExecState instead of ContextRef, cuz we're - in C++ land now. - -2006-07-17 Geoffrey Garen - - Reviewed by Maciej. - - - Changed JSObjectMakeConstructor to JSObjectMakeConstructorWithCallback, - to match JSObjectMakeFunctionWithCallback. - - - Added prototype parameter, so the generated constructor - automatically works with hasInstance / instanceof - - - Moved hasInstance implementation from InternalFunctionImp to JSObject - so that subclasses can inherit it without inheriting function-related baggage. - More refactoring here would be good, but this seems like a good short-term - solution. - - (KJS::JSCallbackFunction::implementsHasInstance): override and return false, - because callback functions aren't constructors. - -2006-07-17 Maciej Stachowiak - - Reviewed by Geoff. - - - add a JSContextRef parameter to all JSValueRef, JSObjectRef, and JSContextRef operations; - except JSObject{Get,Set}PrivateData which can be assumed to be simple pure accessors. - - Also renamed the parameter "context" to "ctx" because it makes the code read better with this pervasive - but usually uninteresting parameter. - - * API/JSBase.cpp: - (JSEvaluateScript): - (JSCheckScriptSyntax): - (JSGarbageCollect): - * API/JSBase.h: - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::JSCallbackObject): - (KJS::JSCallbackObject::init): - (KJS::JSCallbackObject::getOwnPropertySlot): - (KJS::JSCallbackObject::put): - (KJS::JSCallbackObject::deleteProperty): - (KJS::JSCallbackObject::toNumber): - (KJS::JSCallbackObject::toString): - * API/JSContextRef.cpp: - (JSGlobalContextCreate): - (JSGlobalContextRetain): - (JSGlobalContextRelease): - (JSContextGetGlobalObject): - * API/JSContextRef.h: - * API/JSNode.c: - (JSNodePrototype_appendChild): - (JSNodePrototype_removeChild): - (JSNodePrototype_replaceChild): - (JSNode_getNodeType): - (JSNode_getFirstChild): - (JSNode_prototype): - * API/JSNodeList.c: - (JSNodeListPrototype_item): - (JSNodeList_length): - (JSNodeList_getProperty): - (JSNodeList_prototype): - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeConstructor): - (JSObjectMakeFunction): - (JSObjectGetPrototype): - (JSObjectSetPrototype): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - (JSObjectDeleteProperty): - (JSObjectIsFunction): - (JSObjectCallAsFunction): - (JSObjectIsConstructor): - (JSObjectCallAsConstructor): - (JSObjectCopyPropertyNames): - * API/JSObjectRef.h: - * API/JSStringRef.cpp: - * API/JSValueRef.cpp: - (JSValueGetType): - (JSValueIsUndefined): - (JSValueIsNull): - (JSValueIsBoolean): - (JSValueIsNumber): - (JSValueIsString): - (JSValueIsObject): - (JSValueIsObjectOfClass): - (JSValueIsEqual): - (JSValueIsStrictEqual): - (JSValueIsInstanceOfConstructor): - (JSValueMakeUndefined): - (JSValueMakeNull): - (JSValueMakeBoolean): - (JSValueMakeNumber): - (JSValueMakeString): - (JSValueToBoolean): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - (JSValueUnprotect): - * API/JSValueRef.h: - * API/minidom.c: - (print): - * API/testapi.c: - (MyObject_getProperty): - (MyObject_deleteProperty): - (MyObject_callAsFunction): - (MyObject_callAsConstructor): - (MyObject_convertToType): - (print_callAsFunction): - (main): - -2006-07-16 Geoffrey Garen - - Approved by Maciej, RS by Beth. - - JSObjectMakeFunction -> JSObjectMakeFunctionWithCallback - JSObjectMakeFunctionWithBody -> JSObjectMakeFunction - - because the latter is more common, and more fundamental, than the former. - - * API/APICast.h: - (toJS): - * API/JSBase.h: - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::getOwnPropertySlot): - (KJS::JSCallbackObject::put): - (KJS::JSCallbackObject::deleteProperty): - (KJS::JSCallbackObject::getPropertyNames): - (KJS::JSCallbackObject::staticValueGetter): - (KJS::JSCallbackObject::staticFunctionGetter): - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - (OpaqueJSClass::~OpaqueJSClass): - * API/JSClassRef.h: - * API/JSObjectRef.cpp: - (JSClassCreate): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeFunction): - (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray): - (JSObjectCopyPropertyNames): - * API/JSObjectRef.h: - * API/minidom.c: - (main): - * API/testapi.c: - (main): - * ChangeLog: - * JavaScriptCore.exp: - -2006-07-16 Geoffrey Garen - - Laughed at by Beth. - - Replace __JS with OpaqueJS because the former, while used by CF, is - a prefix that's triply-reserved by the compiler. (_* is reserved in global - names, _[A-Z] is reserved in all names, and __ is reserved in all names - in C++.) - - Opaque is an alternative used by other Mac OS X framewokrs. - - * API/APICast.h: - (toJS): - * API/JSBase.h: - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::getOwnPropertySlot): - (KJS::JSCallbackObject::put): - (KJS::JSCallbackObject::deleteProperty): - (KJS::JSCallbackObject::getPropertyNames): - (KJS::JSCallbackObject::staticValueGetter): - (KJS::JSCallbackObject::staticFunctionGetter): - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - (OpaqueJSClass::~OpaqueJSClass): - * API/JSClassRef.h: - * API/JSObjectRef.cpp: - (JSClassCreate): - (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray): - (JSObjectCopyPropertyNames): - -2006-07-16 Darin Adler - - - try to fix Windows build - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Added some recently added files, removed some recently removed. - -2006-07-16 Geoffrey Garen - - Reviewed by Maciej. - - - Change getProperty* to return undefined, rather than NULL, for missing - properties, since that's what the spec says. Also added exception out - parameters to the *Index functions, because they can call through to the - regular functions, which can throw for custom objects. - - * API/JSObjectRef.cpp: - (JSObjectGetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - * API/JSObjectRef.h: - * API/testapi.c: - (main): - -2006-07-16 Geoffrey Garen - - Reviewed by Maciej. - - - Properly document and handle NULL callbacks for static properties. We - throw an exception in any case other than a ReadOnly property with a NULL - setProperty callback, because a NULL callback almost certainly indicates - a programming error. Also throw an exception if hasProperty returns true - for a property that getProperty can't get. - - - If a static setProperty callback returns 'false', to indicate that the - property was not set, we no longer forward the set request up the class - chain, because that's almost certainly not what the programmer expected. - - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::getOwnPropertySlot): - (KJS::JSCallbackObject::put): - (KJS::JSCallbackObject::staticValueGetter): - (KJS::JSCallbackObject::staticFunctionGetter): - (KJS::JSCallbackObject::callbackGetter): - * API/JSObjectRef.h: - * API/minidom.js: - * API/testapi.c: - (MyObject_hasProperty): - * API/testapi.js: - -2006-07-16 Geoffrey Garen - - Reviewed by Maciej. - - - Added names to functions. - - - Removed GetPrivate/SetPrivate from callbackFunctions and callbackConstructors. - The private data idiom is that a JS object stores its native implementation - as private data. For functions and constructors, the native implementation is nothing - more than the callback they already store, so supporting private data, too, - confuses the idiom. If you *really* want, you can still create a custom - function with private data. - - * API/JSCallbackConstructor.cpp: - * API/JSCallbackConstructor.h: - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::JSCallbackFunction): - * API/JSCallbackFunction.h: - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::staticFunctionGetter): - * API/JSObjectRef.cpp: - (JSObjectMakeFunction): - (JSObjectMakeFunctionWithBody): - (JSObjectGetPrivate): - (JSObjectSetPrivate): - * API/JSObjectRef.h: - * API/minidom.c: - (main): - * API/testapi.c: - (main): - -2006-07-15 Maciej Stachowiak - - Reviewed by Darin. - - - switch property lists to be vector+set of Identifiers instead of list of References - - This has the following benefits: - - - no duplicates in property lists - - simplifies API calls - - probably more efficient, since linked list is gone - - entirely removed Reference, ReferenceList and ProtectedReference types from the API - - * kjs/PropertyNameArray.cpp: Added. - (KJS::PropertyNameArray::add): Check set, if not already there, add to - vector. - * kjs/PropertyNameArray.h: Added. - (KJS::PropertyNameArray::PropertyNameArray): Newly added type, combines - a set and a vector to make a unique but ordered list of identifiers. - (KJS::PropertyNameArray::begin): ditto - (KJS::PropertyNameArray::end): ditto - (KJS::PropertyNameArray::size): ditto - (KJS::PropertyNameArray::operator[]): ditto - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstance::getPropertyNames): renamed from getPropertyList, updated - for PropertyNameArray - (ArrayInstance::setLength): updated for PropertyNameArray - (ArrayInstance::pushUndefinedObjectsToEnd): ditto - * kjs/nodes.cpp: - (ForInNode::execute): updated for PropertyNameArray - * kjs/nodes.h: - * kjs/object.cpp: - (KJS::JSObject::getPropertyNames): renamed from getPropertyList, updated - for PropertyNameArray - * kjs/object.h: - * kjs/property_map.cpp: - (KJS::PropertyMap::getEnumerablePropertyNames): updated for PropertyNameArray - (KJS::PropertyMap::getSparseArrayPropertyNames): ditto - * kjs/property_map.h: - * kjs/protected_reference.h: Removed. - * kjs/reference.cpp: Removed. - * kjs/reference.h: Removed. - * kjs/reference_list.cpp: Removed. - * kjs/reference_list.h: Removed. - * kjs/scope_chain.cpp: - (KJS::ScopeChain::print): Use PropertyNamesArray instead of ReferenceList. - * kjs/string_object.cpp: - (StringInstance::getPropertyNames): Updated for new approach. - * kjs/string_object.h: - * kjs/ustring.h: - * API/APICast.h: - (toJS): Added overload for PropertyNameAccumulatorRef / PropertyNameArray* - (toRef): ditto - * API/JSBase.h: - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::getPropertyNames): Fixed for new API. - * API/JSCallbackObject.h: - * API/JSObjectRef.cpp: - (__JSPropertyNameArray::__JSPropertyNameArray): Type used for a publicly vended - JSPropertyNameArrayRef. - (JSObjectCopyPropertyNames): New API call - renamed / refactored from - JSObjectCreatePropertyList - (JSPropertyNameArrayRetain): new retain call for JSPropertyNameArray. - (JSPropertyNameArrayRelease): new release call for - " -. - (JSPropertyNameArrayGetCount): Instead of having to use a stateful enumerator you - can now get the count and items in any order. - (JSPropertyNameArrayGetNameAtIndex): See above. - (JSPropertyNameAccumulatorAddName): What you add properties to is now an opaque - accumulator object. - * API/JSObjectRef.h: Prototyped new functions, removed old ones - * JavaScriptCore.exp: Updated exported symbols. - * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, removed old. - * API/testapi.c: - (MyObject_getPropertyNames): Renamed / fixed callback to fit new paradigm. - (main): Updated for new API. - -2006-07-15 Darin Adler - - - oops, missed a few more arrays that had to be const - - * API/JSNode.c: - (JSNodePrototype_appendChild): Added const. - (JSNodePrototype_removeChild): Ditto. - (JSNodePrototype_replaceChild): Ditto. - (JSNode_construct): Ditto. - * API/JSNodeList.c: - (JSNodeListPrototype_item): Ditto. - * API/JSObjectRef.cpp: - (JSObjectMakeFunctionWithBody): Ditto. - (JSObjectCallAsFunction): Ditto. - (JSObjectCallAsConstructor): Ditto. - * API/minidom.c: - (print): Ditto. - * API/testapi.c: - (MyObject_callAsFunction): Ditto. - (MyObject_callAsConstructor): Ditto. - (print_callAsFunction): Ditto. - (myConstructor_callAsConstructor): Ditto. - -2006-07-15 Darin Adler - - Reviewed by Maciej. - - * API/JSNode.h: Made an array parameter const. - * API/JSObjectRef.h: Made array parameters const. Fixed a comment. - -2006-07-15 Geoffrey Garen - - Reviewed by Maciej. - - - JSObjectMakeFunctionWithBody includes a function name and named parameters now. - - * API/JSObjectRef.cpp: - (JSObjectMakeFunctionWithBody): - * API/JSObjectRef.h: - * API/testapi.c: - (assertEqualsAsUTF8String): More informative failure reporting. - (main): Test more function cases. - -2006-07-15 Geoffrey Garen - - Reviewed by Maciej. - - - Moved the arguments passed to JSClassCreate into a single structure, - called JSClassDefinition. This will enable easier structure - migration/versioning in the future, if necessary. - - - Added support for class names. - - - kJSClassDefinitionNull replaces kJSObjectCallbacksNone. - - - JSClass is becoming a fairly complex struct, so I migrated all of its - implementation other than reference counting to the sruct. - - - Also moved JSClass* functions in the API to JSObjectRef.cpp, since they're - declared in JSObjectRef.h - - - Also added some more informative explanation to the class structure doc. - -2006-07-15 Darin Adler - - Reviewed by Geoff. - - - fix http://bugs.webkit.org/show_bug.cgi?id=8395 - - REGRESSION: RegEx seems broken for hex escaped non breaking space - - Test: fast/js/regexp-extended-characters-more.html - - * pcre/pcre_exec.c: - (match): Got rid of utf16Length local variable to guarantee there's no - extra stack usage in recursive calls. Fixed two places in the PCRE_UTF16 - code that were using the length variable, which is the UTF-8 length of - a character in the pattern, to move in the UTF-16 subject string. Instead - they hardcode lengths of 1 and 2 since the code already handles BMP - characters and surrogate pairs separately. Also fixed some DPRINTF so - I could compile with DEBUG on. - (pcre_exec): Changed a place that was checking for multibyte characters - in the subject string to use ISMIDCHAR. Instead it was using hardcoded - logic that was right for UTF-8 but wrong for UTF-16. - - * pcre/pcre_compile.c: (pcre_compile2): Fixed a DPRINTF so I could compile - with DEBUG on. - -2006-07-14 Geoffrey Garen - - RS by Maciej. - - Global replace in the API of argc/argv with argumentCount/arguments. - -2006-07-14 Geoffrey Garen - - Reviewed by Maciej. - - - Finalized exception handling in the API. - - setProperty can throw because it throws for built-in arrays. getProperty - and deleteProperty can throw because setProperty can throw and we want - to be consistent, and also because they seem like "actions." callAsFunction, - callAsConstructor, and hasInstance can throw, because they caan throw for - all built-ins. - - toBoolean can't throw because it's defined that way in the spec. - - - Documented that toBoolean and toObject can't be overridden by custom - objects because they're defined that way in the spec. - -=== Safari-521.17 === - -2006-07-14 Geoffrey Garen - - Reviewed by Maciej. - - - Implemented ref-counting of JSContexts by splitting into two datatypes: - JSGlobalContext, which you can create/retain/release, and JSContext, which - you can't. - - Internally, you retain a JSGlobalContext/ExecState by retaining its - interpreter, which, in the case of a global ExecState, owns it. - - - Also made ~Interpreter() protected to catch places where Interpreter - is manually deleted. (Can't make it private because some crazy fool - decided it would be a good idea to subclass Interpreter in other frameworks. - I pity da fool.) - - * API/APICast.h: - (toJS): Added cast for new JSGlobalContext - * API/JSStringRef.h: Changed vague "you must" language to more specific - (but, ultimately, equally vague) "behavior is undefined if you don't" - language. - (KJS::Interpreter::Interpreter): Factored more common initialization into - init() - * kjs/interpreter.h: - (KJS::Interpreter::ref): new - (KJS::Interpreter::deref): new - (KJS::Interpreter::refCount): new - * kjs/testkjs.cpp: - (doIt): Ref-count the interpreter. - -2006-07-14 Maciej Stachowiak - - Reviewed by Geoff. - - - removed bool return value from JSObjectSetProperty, since it is inefficient and - also doesn't work quite right - - added JSObjectGetPropertyAtIndex and JSObjectSetPropertyAtIndex - - * API/JSObjectRef.cpp: - (JSObjectSetProperty): Removed return value and canPut stuff. - (JSObjectGetPropertyAtIndex): Added. - (JSObjectSetPropertyAtIndex): Added. - * API/JSObjectRef.h: Prototyped and documented new functions. - -2006-07-14 Geoffrey Garen - - Reviewed by Beth. - - Moved JSCheckScriptSyntax, JSEvaluateScript, and JSGarbageCollect into - JSBase.h/.cpp. They don't belong in the value-specific or context-specific - files because they're not part of the value or context implementations. - - * API/JSBase.h: - * API/JSContextRef.cpp: - (JSContextGetGlobalObject): - * API/JSContextRef.h: - * API/JSValueRef.cpp: - (JSValueUnprotect): - * API/JSValueRef.h: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-07-13 Timothy Hatcher - - Reviewed by Maciej. - - Moved JavaScriptCore to be a public framework. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-07-13 Mark Rowe - - Reviewed by Geoffrey. - - http://bugs.webkit.org/show_bug.cgi?id=9742 - Bug 9742: REGRESSION: WebKit hangs when loading - - * kjs/value.h: - (KJS::JSValue::getUInt32): Only types tagged as numeric can be converted to UInt32. - -2006-07-13 Geoffrey Garen - - Pleasing to Maciej. - - - Renamed JSEvaluate -> JSEvaluateScript, JSCheckSyntax -> JSCheckScriptSyntax - - Added exception out parameters to JSValueTo* and JSValueIsEqual because - they can throw - - Removed JSObjectGetDescription because it's useless and vague, and - JSValueToString/JSValueIsObjectOfClass do a better job, anyway - - Clarified comments about "IsFunction/Constructor" to indicate that they - are true of all functions/constructors, not just those created by JSObjectMake* - -2006-07-12 Geoffrey Garen - - RS by Beth. - - Finished previously approved JSInternalString -> JSString conversion - by renaming the files. - - * API/JSCallbackObject.cpp: - * API/JSInternalStringRef.cpp: Removed. - * API/JSInternalStringRef.h: Removed. - * API/JSStringRef.cpp: Added. - * API/JSStringRef.h: Added. - * API/JavaScriptCore.h: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-07-12 Geoffrey Garen - - Reviewed by Maciej. - - - Removed context and exception parameters from JSObjectGetPropertyEnumerator, - removing the spurious use of ExecState inside JavaScriptCore that made - us think this was necessary in the first place. - - (StringInstance::getPropertyList): Use getString instead of toString because - we know we're dealing with a string -- we put it there in the first place. - While we're at it, store the string's size instead of retrieving it each time - through the loop, to avoid the unnecessary killing of puppies. - * kjs/string_object.h: - -2006-07-12 Maciej Stachowiak - - Reviewed by Geoff. - - - add handling of hasInstance callback for API objects - - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::implementsHasInstance): Check if callback is present. - (KJS::JSCallbackObject::hasInstance): Invoke appropriate callback. - * API/JSCallbackObject.h: - * API/JSClassRef.cpp: - * API/JSObjectRef.h: - * API/testapi.c: - (MyObject_hasInstance): Test case; should match what construct would do. - * API/testapi.js: - -2006-07-11 Geoffrey Garen - - Reviewed by Maciej. - - - Implemented a vast number of renames and comment clarifications - suggested during API review. - - JSInternalString -> JSString - JS*Make -> JSValueMake*, JSObjectMake* - JSTypeCode -> JSType - JSValueIsInstanceOf -> JSValueIsInstanceOfConstructor (reads strangely well in client code) - JSGC*Protect -> JSValue*Protect - JS*Callback -> JSObject*Callback - JSGetPropertyListCallback -> JSObjectAddPropertiesToListCallback - JSPropertyEnumeratorGetNext -> JSPropertyEnumeratorGetNextName - JSString* -> - JSStringCreateWithUTF8CString, JSStringGetUTF8CString, - JSStringGetMaximumUTF8CStringSize JSStringIsEqualToUTF8CString, - JSStringCreateWithCFString, JSStringCopyCFString, JSStringCreateWithCharacters. - - - Changed functions taking a JSValue out arg and returning a bool indicating - whether it was set to simply return a JSValue or NULL. - - - Removed JSStringGetCharacters because it's more documentation than code, - and it's just a glorified memcpy built on existing API functionality. - - - Moved standard library includes into the headers that actually require them. - - - Standardized use of the phrase "Create Rule." - - - Removed JSLock from make functions that don't allocate. - - - Added exception handling to JSValueToBoolean, since we now allow - callback objects to throw exceptions upon converting to boolean. - - - Renamed JSGCCollect to JSGarbageCollect. - -2006-07-10 Geoffrey Garen - - Reviewed by Darin. - - - Changed public header includes to the string change. - -=== Safari-521.16 === - -2006-07-10 Darin Adler - - * kjs/value.cpp: (KJS::JSValue::toInt32Inline): Added inline keyword one more place. - Just in case. - -2006-07-10 Darin Adler - - - fix the release build - - * kjs/value.h: - * kjs/value.cpp: - (KJS::JSValue::toInt32Inline): Move the code here to an inline. - (KJS::JSValue::toInt32): Call the inline from both overloaded toInt32 functions. - -2006-07-10 David Kilzer - - Reviewed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=9179 - Implement select.options.add() method - - * JavaScriptCore.exp: Added overloaded KJS::JSValue::toInt32() method. - * JavaScriptCore.xcodeproj/project.pbxproj: Altered attributes metadata for - kjs/value.h to make it available as a forwarded header. - * kjs/lookup.h: - (KJS::lookupPut): Extracted a lookupPut() method from the existing lookupPut() method. - The new method returns a boolean value if no entry is found in the lookup table. - * kjs/value.cpp: - (KJS::JSValue::toInt32): Overloaded toInt32() method with boolean "Ok" argument. - * kjs/value.h: Ditto. - -2006-07-10 Geoffrey Garen - - No review necessary. Removed bogus file I accidentally checked in before. - - * API/JSInternalSringRef.h: Removed. - -2006-07-10 Geoffrey Garen - - Reviewed by Darin. - - Added exception out parameter to API object callbacks, removed semi-bogus - JSContext(.*)Exception functions. - - To make these calls syntactically simple, I added an exceptionSlot() - method to the ExecState class, which provides a JSValue** slot in which to - store a JSValue* exception. - - * API/APICast.h: - (toRef): - * API/JSCallbackConstructor.cpp: - (KJS::JSCallbackConstructor::construct): - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::callAsFunction): - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::init): - (KJS::JSCallbackObject::getOwnPropertySlot): - (KJS::JSCallbackObject::put): - (KJS::JSCallbackObject::deleteProperty): - (KJS::JSCallbackObject::construct): - (KJS::JSCallbackObject::callAsFunction): - (KJS::JSCallbackObject::getPropertyList): - (KJS::JSCallbackObject::toBoolean): - (KJS::JSCallbackObject::toNumber): - (KJS::JSCallbackObject::toString): - (KJS::JSCallbackObject::staticValueGetter): - (KJS::JSCallbackObject::callbackGetter): - * API/JSContextRef.cpp: - (JSCheckSyntax): - * API/JSContextRef.h: - * API/JSNode.c: - (JSNodePrototype_appendChild): - (JSNodePrototype_removeChild): - (JSNodePrototype_replaceChild): - (JSNode_getNodeType): - (JSNode_getChildNodes): - (JSNode_getFirstChild): - (JSNode_construct): - * API/JSNode.h: - * API/JSNodeList.c: - (JSNodeListPrototype_item): - (JSNodeList_length): - (JSNodeList_getProperty): - * API/JSObjectRef.h: - * API/minidom.c: - (print): - * API/testapi.c: - (MyObject_initialize): - (MyObject_hasProperty): - (MyObject_getProperty): - (MyObject_setProperty): - (MyObject_deleteProperty): - (MyObject_getPropertyList): - (MyObject_callAsFunction): - (MyObject_callAsConstructor): - (MyObject_convertToType): - (print_callAsFunction): - (myConstructor_callAsConstructor): - (main): - * JavaScriptCore.exp: - * kjs/ExecState.h: - (KJS::ExecState::exceptionHandle): - -2006-07-10 Geoffrey Garen - - Reviewed by Darin. - - Improved type safety by implementing opaque JSValue/JSObject typing through - abuse of 'const', not void*. Also fixed an alarming number of bugs - exposed by this new type safety. - - I made one design change in JavaScriptCore, which is that the JSObject - constructor should take a JSValue* as its prototype argument, not a JSObject*, - since we allow the prototype to be any JSValue*, including jsNull(), for - example. - - * API/APICast.h: - (toJS): - * API/JSBase.h: - * API/JSCallbackConstructor.cpp: - (KJS::JSCallbackConstructor::construct): - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::callAsFunction): - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::JSCallbackObject): - (KJS::JSCallbackObject::getOwnPropertySlot): - (KJS::JSCallbackObject::put): - (KJS::JSCallbackObject::construct): - (KJS::JSCallbackObject::callAsFunction): - (KJS::JSCallbackObject::staticFunctionGetter): - * API/JSCallbackObject.h: - * API/JSContextRef.cpp: - (JSEvaluate): - * API/JSNode.c: - (JSNodePrototype_appendChild): - (JSNodePrototype_removeChild): - (JSNodePrototype_replaceChild): - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSFunctionMakeWithBody): - (JSObjectGetProperty): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - * API/JSObjectRef.h: - * API/testapi.c: - (main): - * ChangeLog: - * kjs/object.h: - (KJS::JSObject::JSObject): - -2006-07-10 Geoffrey Garen - - Approved by Maciej, Darin. - - Renamed JSStringBufferRef to JSInternalStringRef. "Internal string" means the - JavaScript engine's internal string representation, which is the most - low-level and efficient representation to use when interfacing with JavaScript. - - * API/APICast.h: - (toJS): - (toRef): - * API/JSBase.h: - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::getOwnPropertySlot): - (KJS::JSCallbackObject::put): - (KJS::JSCallbackObject::deleteProperty): - (KJS::JSCallbackObject::staticValueGetter): - (KJS::JSCallbackObject::callbackGetter): - * API/JSContextRef.cpp: - (JSEvaluate): - (JSCheckSyntax): - * API/JSContextRef.h: - * API/JSInternalStringRef.cpp: Added. - (JSStringMake): - (JSInternalStringCreate): - (JSInternalStringCreateUTF8): - (JSInternalStringRetain): - (JSInternalStringRelease): - (JSValueCopyStringValue): - (JSInternalStringGetLength): - (JSInternalStringGetCharactersPtr): - (JSInternalStringGetCharacters): - (JSInternalStringGetMaxLengthUTF8): - (JSInternalStringGetCharactersUTF8): - (JSInternalStringIsEqual): - (JSInternalStringIsEqualUTF8): - (JSInternalStringCreateCF): - (CFStringCreateWithJSInternalString): - * API/JSInternalStringRef.h: Added. - * API/JSNode.c: - (JSNodePrototype_appendChild): - (JSNode_getNodeType): - (JSNode_getChildNodes): - (JSNode_getFirstChild): - * API/JSNodeList.c: - (JSNodeList_length): - (JSNodeList_getProperty): - * API/JSObjectRef.cpp: - (JSFunctionMakeWithBody): - (JSObjectGetDescription): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectDeleteProperty): - (JSPropertyEnumeratorGetNext): - (JSPropertyListAdd): - * API/JSObjectRef.h: - * API/JSStringBufferRef.cpp: Removed. - * API/JSStringBufferRef.h: Removed. - * API/JSValueRef.h: - * API/JavaScriptCore.h: - * API/minidom.c: - (main): - (print): - * API/testapi.c: - (assertEqualsAsUTF8String): - (assertEqualsAsCharactersPtr): - (assertEqualsAsCharacters): - (MyObject_hasProperty): - (MyObject_getProperty): - (MyObject_setProperty): - (MyObject_deleteProperty): - (MyObject_getPropertyList): - (print_callAsFunction): - (myConstructor_callAsConstructor): - (main): - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-07-08 Tim Omernick - - Reviewed by Maciej. - - Added an OpenGL drawing model to the Netscape Plug-in API. - - * bindings/npapi.h: - -2006-07-08 Timothy Hatcher - - Reviewed by Maciej. - - Moved KJS_GetCreatedJavaVMs to jni_utility.cpp. - Switched KJS_GetCreatedJavaVMs over to use dlopen and dlsym - now that NSAddImage, NSLookupSymbolInImage and NSAddressOfSymbol - are deprecated in Leopard. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::KJS_GetCreatedJavaVMs): - * bindings/softlinking.c: Removed. - * bindings/softlinking.h: Removed. - -2006-07-08 Geoffrey Garen - - Reviewed by Anders. - - - Make JSObjectGetProperty return a JSValue or NULL, like JSEvaluate does. - - * API/JSObjectRef.cpp: - (JSObjectGetProperty): - * API/JSObjectRef.h: - * API/testapi.c: - (main): - -2006-07-08 Geoffrey Garen - - Style change -- no review necessary. - - Use 0 instead of NULL in API .cpp files, to match our style guidelines. - - * API/JSContextRef.cpp: - (JSEvaluate): - * API/JSObjectRef.cpp: - (JSFunctionMakeWithBody): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - * API/JSValueRef.cpp: - (JSValueToObject): - -2006-07-08 Geoffrey Garen - - Reviewed by TimO. - - - Added ability to pass NULL for thisObject when calling JSObjectCallAsFunction, - to match JSEvaluate. - - * API/JSObjectRef.cpp: - (JSObjectCallAsFunction): - * API/JSObjectRef.h: - * API/testapi.c: - (main): - -=== Safari-521.15 === - -2006-07-07 Geoffrey Garen - - Reviewed by Maciej. - - - Standardized which functions take a JSContext as an argument. The rule is: - if you might execute JavaScript, you take a JSContext, otherwise you don't. - - The FIXME in JSObjectRef.h requires refactoring some parts of Interpreter, - but not API changes, so I'm putting it off until later. - - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::JSCallbackObject): - (KJS::JSCallbackObject::init): - * API/JSCallbackObject.h: - * API/JSContextRef.cpp: - (JSContextCreate): - * API/JSContextRef.h: - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSPropertyEnumeratorGetNext): - * API/JSObjectRef.h: - * API/testapi.c: - (MyObject_initialize): - (main): - * JavaScriptCore.exp: - * kjs/array_object.cpp: - (ArrayInstance::setLength): - (ArrayInstance::pushUndefinedObjectsToEnd): - * kjs/nodes.cpp: - (ForInNode::execute): - * kjs/reference.cpp: - (KJS::Reference::getPropertyName): - (KJS::Reference::getValue): - * kjs/reference.h: - * kjs/scope_chain.cpp: - (KJS::ScopeChain::print): - -2006-07-06 Geoffrey Garen - - Reviewed by Maciej. - - More API action. - - - Headerdoc finished - - Semantic Changes: - - Added a JSContextRef argument to many functions, because you need a - JSContextRef for doing virtually anything. I expect to add this argument - to even more functions in a future patch. - - - Removed the globalObjectPrototype argument to JSContextCreate because - you can't create an object until you have a context, so it's impossible - to pass a prototype object to JSContextCreate. That's OK because (1) there's - no reason to give the global object a prototype and (2) if you really want - to, you can just use a separate call to JSObjectSetPrototype. - - - Removed the JSClassRef argument to JSClassCreate because it was unnecessary, - and you need to be able to make the global object's class before you've - created a JSContext. - - - Added an optional exception parameter to JSFunctionMakeWithBody because anything - less would be uncivilized. - - - Made the return value parameter to JSObjectGetProperty optional to match - all other return value parameters in the API. - - - Made JSObjectSetPrivate/JSObjectGetPrivate work on JSCallbackFunctions - and JSCallbackConstructors. You could use an abstract base class or strategic - placement of m_privateData in the class structure to implement this, but - the former seemed like overkill, and the latter seemed too dangerous. - - - Fixed a bug where JSPropertyEnumeratorGetNext would skip the first property. - - Cosmetic Changes: - - Reversed the logic of the JSChar #ifdef to avoid confusing headerdoc - - - Removed function names from @function declarations because headeroc - can parse them automatically, and I wanted to rule out manual mismatch. - - - Changed Error::create to take a const UString& instead of a UString* - because it was looking at me funny. - - - Renamed JSStringBufferCreateWithCFString to JSStringBufferCreateCF - because the latter is more concise and it matches JSStringBufferCreateUTF8. - - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::getOwnPropertySlot): - (KJS::JSCallbackObject::put): - (KJS::JSCallbackObject::deleteProperty): - (KJS::JSCallbackObject::getPropertyList): - (KJS::JSCallbackObject::toBoolean): - (KJS::JSCallbackObject::toNumber): - (KJS::JSCallbackObject::toString): - * API/JSClassRef.cpp: - (JSClassCreate): - * API/JSContextRef.cpp: - (JSContextCreate): - (JSContextSetException): - * API/JSContextRef.h: - * API/JSNode.c: - (JSNodePrototype_class): - (JSNode_class): - * API/JSNodeList.c: - (JSNodeListPrototype_class): - (JSNodeList_class): - * API/JSObjectRef.cpp: - (JSObjectGetProperty): - (JSObjectGetPrivate): - (JSObjectSetPrivate): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - (JSPropertyEnumeratorGetNext): - * API/JSObjectRef.h: - * API/JSStringBufferRef.cpp: - (JSStringBufferCreateCF): - * API/JSStringBufferRef.h: - * API/JSValueRef.cpp: - (JSValueIsInstanceOf): - * API/JSValueRef.h: - * API/minidom.c: - (main): - * API/minidom.js: - * API/testapi.c: - (MyObject_hasProperty): - (MyObject_setProperty): - (MyObject_deleteProperty): - (MyObject_getPropertyList): - (MyObject_convertToType): - (MyObject_class): - (main): - * JavaScriptCore.exp: - -2006-07-07 Geoffrey Garen - - Reviewed by John. - - - Fixed a few crashes resulting from NULL parameters to JSClassCreate. - - * API/JSClassRef.cpp: - (JSClassCreate): - (JSClassRelease): - * API/testapi.c: Added test for NULL parameters. - (main): - -2006-07-07 Geoffrey Garen - - Reviewed by John, mocked by Darin. - - - Changed JSEvaluate to take a JSObjectRef instead of a JSValueRef as - "this," since "this" must be an object. - - * API/JSContextRef.cpp: - (JSEvaluate): - * API/JSContextRef.h: - -2006-07-07 Geoffrey Garen - - Reviewed by John. - - - More headerdoc - - * API/JSBase.h: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-07-05 Geoffrey Garen - - RS by Beth. - - Renamed JSCharBufferRef, which was universally unpopular, to JSStringBufferRef, - which, hopefully, will be less unpopular. - - * API/APICast.h: - (toJS): - (toRef): - * API/JSBase.h: - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::getOwnPropertySlot): - (KJS::JSCallbackObject::put): - (KJS::JSCallbackObject::deleteProperty): - (KJS::JSCallbackObject::staticValueGetter): - (KJS::JSCallbackObject::callbackGetter): - * API/JSCharBufferRef.cpp: Removed. - * API/JSCharBufferRef.h: Removed. - * API/JSContextRef.cpp: - (JSEvaluate): - (JSCheckSyntax): - * API/JSContextRef.h: - * API/JSNode.c: - (JSNodePrototype_appendChild): - (JSNode_getNodeType): - (JSNode_getChildNodes): - (JSNode_getFirstChild): - * API/JSNodeList.c: - (JSNodeList_length): - (JSNodeList_getProperty): - * API/JSObjectRef.cpp: - (JSFunctionMakeWithBody): - (JSObjectGetDescription): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectDeleteProperty): - (JSPropertyEnumeratorGetNext): - (JSPropertyListAdd): - * API/JSObjectRef.h: - * API/JSStringBufferRef.cpp: Added. - (JSStringMake): - (JSStringBufferCreate): - (JSStringBufferCreateUTF8): - (JSStringBufferRetain): - (JSStringBufferRelease): - (JSValueCopyStringValue): - (JSStringBufferGetLength): - (JSStringBufferGetCharactersPtr): - (JSStringBufferGetCharacters): - (JSStringBufferGetMaxLengthUTF8): - (JSStringBufferGetCharactersUTF8): - (JSStringBufferIsEqual): - (JSStringBufferIsEqualUTF8): - (JSStringBufferCreateWithCFString): - (CFStringCreateWithJSStringBuffer): - * API/JSStringBufferRef.h: Added. - * API/JSValueRef.h: - * API/JavaScriptCore.h: - * API/minidom.c: - (main): - (print): - * API/testapi.c: - (assertEqualsAsUTF8String): - (assertEqualsAsCharactersPtr): - (assertEqualsAsCharacters): - (MyObject_hasProperty): - (MyObject_getProperty): - (MyObject_setProperty): - (MyObject_deleteProperty): - (MyObject_getPropertyList): - (print_callAsFunction): - (myConstructor_callAsConstructor): - (main): - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-07-05 Geoffrey Garen - - RS by Beth. - - Moved some code around for more logical file separation. - - * API/JSBase.h: - * API/JSContextRef.h: - * API/JSObjectRef.cpp: - * API/JSValueRef.cpp: - (JSValueToObject): - * API/JSValueRef.h: - -2006-07-03 Geoffrey Garen - - Reviewed by Maciej. - - Implemented JSFunctionMakeWithBody, which parses a script as a function body - in the global scope, and returns the resulting anonymous function. - - I also removed private data from JSCallbackFunction. It never worked, - since JSCallbackFunction doesn't inherit from JSCallbackObject. - - * API/JSCallbackConstructor.cpp: Removed. - * API/JSCallbackConstructor.h: Removed. - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::JSCallbackFunction): - (KJS::JSCallbackFunction::implementsConstruct): - (KJS::JSCallbackFunction::construct): - (KJS::JSCallbackFunction::implementsCall): - (KJS::JSCallbackFunction::callAsFunction): - * API/JSCallbackFunction.h: - * API/JSCallbackObject.cpp: - (KJS::JSCallbackObject::staticFunctionGetter): - * API/JSObjectRef.cpp: - (JSFunctionMake): - (JSFunctionMakeWithCallbacks): - * API/JSObjectRef.h: - * API/JSValueRef.h: - * API/minidom.c: - (main): - * API/testapi.c: - (main): - * JavaScriptCore.exp: Programmatically added all symbols exported by - API object files, and sorted results - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-07-03 Geoffrey Garen - - Reviewed by Maciej. - - - Return syntax error in JSCheckSyntax through a JSValueRef* exception - argument - - * API/JSBase.h: - * API/JSContextRef.cpp: - (JSCheckSyntax): - * API/testapi.c: - (main): - * JavaScriptCore.exp: - * kjs/interpreter.cpp: - (KJS::Interpreter::checkSyntax): - * kjs/interpreter.h: - -2006-07-04 Darin Adler - - - fixed build - - * wtf/MathExtras.h: Oops. Added missing #endif. - -2006-07-04 Bjoern Graf - - Reviewed by Maciej. - Tweaked a bit by Darin. - - - http://bugs.webkit.org/show_bug.cgi?id=9678 - work around MSVCRT's fmod function returning NaN for fmod(x, infinity) instead of x - - * wtf/MathExtras.h: Added include of . - (isinf): Fix to return false for NAN. - (wtf_fmod): Added. An inline that works around the bug. - - * kjs/nodes.cpp: - * kjs/number_object.cpp: - * kjs/operations.cpp: - * kjs/value.cpp: - Added includes of MathExtras.h to all files using fmod. - - * JavaScriptCore.xcodeproj/project.pbxproj: Let Xcode 2.3 have its way with - the project. - -2006-07-01 Geoffrey Garen - - Reviewed by Darin. - - - Refined value conversions in the API: - - failed toNumber returns NaN - - failed toObject returns NULL - - failed toString returns empty string - - - Refined excpetion handling in the API: - - failed value conversions do not throw exceptions - - uncaught exceptions in JSEvaluate, JSObjectCallAsFunction, and - JSObjectCallAsConstructor are returned through a JSValueRef* exception - argument - - removed JSContextHasException, because JSContextGetException does - the same job - - * API/JSBase.h: - * API/JSCharBufferRef.cpp: - (JSValueCopyStringValue): - * API/JSContextRef.cpp: - (JSEvaluate): - * API/JSContextRef.h: - * API/JSNodeList.c: Added test code demonstrating how you would use - toNumber, and why you probably don't need toUInt32, etc. - (JSNodeListPrototype_item): - (JSNodeList_getProperty): - * API/JSObjectRef.cpp: - (JSValueToObject): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - * API/JSObjectRef.h: - * API/JSValueRef.cpp: - (JSValueToNumber): - * API/JSValueRef.h: - * API/minidom.c: - (main): - * API/testapi.c: - (main): Added tests for new rules, and call to JSGCProtect to fix Intel - crash - * JavaScriptCore.exp: - -2006-07-03 Darin Adler - - - Rolled out HashMap implementation of NPRuntime, at least temporarily. - - Fixes hang in the bindings section of layout tests seen on the - buildbot. - - This code was using HashMap. - But that hashes based on pointer identity, not string value. - The default hash for any pointer type is to hash based on the pointer. - And WTF doesn't currently have a string hash for char*. - We'll need to fix that before re-landing this patch. - - (Formatting was also incorrect -- extra spaces in parentheses.) - - * bindings/npruntime.cpp: Rolled out last change. - -2006-07-02 Justin Haygood - - Reviewed, tweaked, landed by ggaren. - - - Port NPRuntime from CFDictionary to HashMap. - - * bindings/npruntime.cpp: - (getStringIdentifierDictionary): - (getIntIdentifierDictionary): - (_NPN_GetStringIdentifier): - (_NPN_GetIntIdentifier): - * bindings/npruntime.h: - -2006-07-01 Geoffrey Garen - - Reviewed by Adele. - - - Fixed REGRESSION: Liveconnect with Java test - fails at http://www-sor.inria.fr/~dedieu/notes/liveconnect/simple_example.html - - * JavaScriptCore.exp: Export symbols used by liveconnect - -2006-06-29 Geoffrey Garen - - Reviewed by Maciej. - - - Phase 2 in the JS API. - - - Added support for specifying static tables of values -- this should - obviate the need for using complicated callbacks for most lookups. - - - API objects are now created with classes (JSClassRef) -- in order to support - static values, and in order to prevent API objects from storing their - data inline, and thus falling into the oversized (read: slow and prone to - giving Maciej the frowny face) heap. - - - Added two specialized JSObject subclasses -- JSCallbackFunction and JSCallbackConstructor -- - to allow JSFunctionMake and JSConstructorMake to continue to work with - the new class model. Another solution to this problem would be to create - a custom class object for each function and constructor you make. This - solution is more code but also more efficient. - - - Substantially beefed up the minidom example to demonstrate and test a - lot of these techniques. Its output is still pretty haphazard, though. - - - Gave the - - Reviewed and tweaked by Darin. - - - Compile fixes for wx port / gcc 4.0.2 - - * kjs/array_object.cpp: - Added missing headers. - - * kjs/ExecState.h: - gcc needs class prototypes before defining those classes as friend classes - -2006-06-30 Mike Emmel - - Reviewed by Darin. - - Compilation fixes for Linux/Gdk. - - * JavaScriptCore/kjs/interpreter.cpp: added include of signal.h - * JavaScriptCore/kjs/ExecState.h: added missing class declaration - * JavaScriptCore/kjs/ExecState.cpp: case wrong on include of context.h - * JavaScriptCore/JavaScriptCoreSources.bkl: added Context.cpp and ExecState.cpp - -=== Safari-521.14 === - -2006-06-29 Maciej Stachowiak - - Reviewed by Geoff. - - - add headerdoc comments to some of the new JS API headers - - * API/JSBase.h: - * API/JSValueRef.h: - -2006-06-28 Timothy Hatcher - - Prefer the Stabs debugging symbols format until DWARF bugs are fixed. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-06-27 Timothy Hatcher - - Reviewed by Tim O. - - Deprecated ObjC language API used in JavaScriptCore, WebCore, WebKit and WebBrowser - - Switch to the new ObjC 2 API, ifdefed the old code around OBJC_API_VERSION so it still works on Tiger. - Removed the use of the old stringWithCString, switched to the new Tiger version that accepts an encoding. - Lots of code style cleanup. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/objc/objc_class.h: - * bindings/objc/objc_class.mm: - (KJS::Bindings::ObjcClass::~ObjcClass): - (KJS::Bindings::_createClassesByIsAIfNecessary): - (KJS::Bindings::ObjcClass::classForIsA): - (KJS::Bindings::ObjcClass::name): - (KJS::Bindings::ObjcClass::methodsNamed): - (KJS::Bindings::ObjcClass::fieldNamed): - (KJS::Bindings::ObjcClass::fallbackObject): - * bindings/objc/objc_header.h: - * bindings/objc/objc_instance.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::ObjcInstance): - (ObjcInstance::~ObjcInstance): - (ObjcInstance::operator=): - (ObjcInstance::begin): - (ObjcInstance::end): - (ObjcInstance::getClass): - (ObjcInstance::invokeMethod): - (ObjcInstance::invokeDefaultMethod): - (ObjcInstance::setValueOfField): - (ObjcInstance::supportsSetValueOfUndefinedField): - (ObjcInstance::setValueOfUndefinedField): - (ObjcInstance::getValueOfField): - (ObjcInstance::getValueOfUndefinedField): - (ObjcInstance::defaultValue): - (ObjcInstance::stringValue): - (ObjcInstance::numberValue): - (ObjcInstance::booleanValue): - (ObjcInstance::valueOf): - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcMethod::ObjcMethod): - (ObjcMethod::name): - (ObjcMethod::getMethodSignature): - (ObjcMethod::setJavaScriptName): - (ObjcField::name): - (ObjcField::type): - (ObjcField::valueFromInstance): - (convertValueToObjcObject): - (ObjcField::setValueToInstance): - (ObjcArray::operator=): - (ObjcArray::setValueAt): - (ObjcArray::valueAt): - (ObjcFallbackObjectImp::ObjcFallbackObjectImp): - (ObjcFallbackObjectImp::callAsFunction): - (ObjcFallbackObjectImp::defaultValue): - -2006-06-28 Anders Carlsson - - Reviewed by Geoff. - - http://bugs.webkit.org/show_bug.cgi?id=8636 - REGRESSION: JavaScript access to Java applet causes hang (_webViewURL not implemented) - - * bindings/jni/jni_objc.mm: - (KJS::Bindings::dispatchJNICall): - Just pass nil as the calling URL. This will cause the Java plugin to use the URL of the page - containing the applet (which is what we used to do). - -2006-06-27 Timothy Hatcher - - Reviewed by Darin. - - Add an export file to TOT JavaScriptCore like the Safari-2-0-branch - - * JavaScriptCore.exp: Added. - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-06-25 Geoffrey Garen - - Reviewed by Adele. - - - Added JSConstructorMake to match JSFunctionMake, along with test code. - - [ I checked in the ChangeLog before without the actual files. ] - - * API/JSObjectRef.cpp: - (JSConstructorMake): - * API/JSObjectRef.h: - * API/testapi.c: - (myConstructor_callAsConstructor): - (main): - * API/testapi.js: - * ChangeLog: - * JavaScriptCore.xcodeproj/project.pbxproj: Moved testapi.c to the testapi - target -- this was an oversight in my earlier check-in. - -2006-06-25 Timothy Hatcher - - Reviewed by Darin. - - Bug 9574: Drosera should show inline scripts within the original HTML - http://bugs.webkit.org/show_bug.cgi?id=9574 - - Pass the starting line number and error message to the debugger. - - * kjs/debugger.cpp: - (Debugger::sourceParsed): - * kjs/debugger.h: - * kjs/function.cpp: - (KJS::GlobalFuncImp::callAsFunction): - * kjs/function_object.cpp: - (FunctionObjectImp::construct): - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - -2006-06-24 Alexey Proskuryakov - - Rubber-stamped by Eric. - - Add a -h (do not follow symlinks) option to ln in derived sources build script (without it, - a symlink was created inside the source directory on second build). - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-06-24 David Kilzer - - Reviewed by Timothy. - - * Info.plist: Fixed copyright to include 2003-2006. - -2006-06-24 Alexey Proskuryakov - - Reviewed by Darin. - - - http://bugs.webkit.org/show_bug.cgi?id=9418 - WebKit will not build when Space exists in path - - * JavaScriptCore.xcodeproj/project.pbxproj: Enclose search paths in quotes; create symlinks to - avoid passing paths with spaces to make. - -2006-06-23 Timothy Hatcher - - Reviewed by Darin. - - Adding more operator[] overloads for long and short types. - - * wtf/Vector.h: - (WTF::Vector::operator[]): - -=== JavaScriptCore-521.13 === - -2006-06-22 Alexey Proskuryakov - - Build fix. - - - http://bugs.webkit.org/show_bug.cgi?id=9539 - Another case error preventing build - - * API/JSObjectRef.cpp: Changed "identifier.h" to "Identifier.h" - -2006-06-22 David Kilzer - - Build fix. - - http://bugs.webkit.org/show_bug.cgi?id=9539 - Another case error preventing build - - * API/APICast.h: Changed "UString.h" to "ustring.h". - -2006-06-21 Geoffrey Garen - - Fixed release build, fixed accidental infinite recursion due to - last minute global replace gone awry. - - * API/APICast.h: - (toRef): - * API/testapi.c: - (assertEqualsAsBoolean): - (assertEqualsAsNumber): - (assertEqualsAsUTF8String): - (assertEqualsAsCharactersPtr): - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-06-21 Geoffrey Garen - - Reviewed by Anders. - - - First cut at C API to JavaScript. Includes a unit test, 'testapi.c', - and the outline of a test app, 'minidom.c'. - - Includes one change to JSC internals: Rename propList to getPropertyList and have it - take its target property list by reference so that subclasses can - add properties to the list before calling through to their superclasses. - - Also, I just ran prepare-ChangeLog in about 10 seconds, and I would like - to give a shout-out to that. - - * API/APICast.h: Added. - (toJS): - (toRef): - * API/JSBase.h: Added. - * API/JSCallbackObject.cpp: Added. - (KJS::): - (KJS::JSCallbackObject::JSCallbackObject): - (KJS::JSCallbackObject::~JSCallbackObject): - (KJS::JSCallbackObject::className): - (KJS::JSCallbackObject::getOwnPropertySlot): - (KJS::JSCallbackObject::put): - (KJS::JSCallbackObject::deleteProperty): - (KJS::JSCallbackObject::implementsConstruct): - (KJS::JSCallbackObject::construct): - (KJS::JSCallbackObject::implementsCall): - (KJS::JSCallbackObject::callAsFunction): - (KJS::JSCallbackObject::getPropertyList): - (KJS::JSCallbackObject::toBoolean): - (KJS::JSCallbackObject::toNumber): - (KJS::JSCallbackObject::toString): - (KJS::JSCallbackObject::setPrivate): - (KJS::JSCallbackObject::getPrivate): - (KJS::JSCallbackObject::cachedValueGetter): - (KJS::JSCallbackObject::callbackGetter): - * API/JSCallbackObject.h: Added. - (KJS::JSCallbackObject::classInfo): - * API/JSCharBufferRef.cpp: Added. - (JSStringMake): - (JSCharBufferCreate): - (JSCharBufferCreateUTF8): - (JSCharBufferRetain): - (JSCharBufferRelease): - (JSValueCopyStringValue): - (JSCharBufferGetLength): - (JSCharBufferGetCharactersPtr): - (JSCharBufferGetCharacters): - (JSCharBufferGetMaxLengthUTF8): - (JSCharBufferGetCharactersUTF8): - (JSCharBufferIsEqual): - (JSCharBufferIsEqualUTF8): - (JSCharBufferCreateWithCFString): - (CFStringCreateWithJSCharBuffer): - * API/JSCharBufferRef.h: Added. - * API/JSContextRef.cpp: Added. - (JSContextCreate): - (JSContextDestroy): - (JSContextGetGlobalObject): - (JSEvaluate): - (JSCheckSyntax): - (JSContextHasException): - (JSContextGetException): - (JSContextClearException): - (JSContextSetException): - * API/JSContextRef.h: Added. - * API/JSObjectRef.cpp: Added. - (JSValueToObject): - (JSObjectMake): - (JSFunctionMake): - (JSObjectGetDescription): - (JSObjectGetPrototype): - (JSObjectSetPrototype): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectDeleteProperty): - (JSObjectGetPrivate): - (JSObjectSetPrivate): - (JSObjectIsFunction): - (JSObjectCallAsFunction): - (JSObjectIsConstructor): - (JSObjectCallAsConstructor): - (__JSPropertyListEnumerator::__JSPropertyListEnumerator): - (JSObjectCreatePropertyEnumerator): - (JSPropertyEnumeratorGetNext): - (JSPropertyEnumeratorRetain): - (JSPropertyEnumeratorRelease): - (JSPropertyListAdd): - * API/JSObjectRef.h: Added. - * API/JSValueRef.cpp: Added. - (JSValueGetType): - (JSValueIsUndefined): - (JSValueIsNull): - (JSValueIsBoolean): - (JSValueIsNumber): - (JSValueIsString): - (JSValueIsObject): - (JSValueIsEqual): - (JSValueIsStrictEqual): - (JSUndefinedMake): - (JSNullMake): - (JSBooleanMake): - (JSNumberMake): - (JSValueToBoolean): - (JSValueToNumber): - (JSGCProtect): - (JSGCUnprotect): - (JSGCCollect): - * API/JSValueRef.h: Added. - * API/JavaScriptCore.h: Added. - * API/minidom.c: Added. - (main): - * API/minidom.html: Added. - * API/minidom.js: Added. - * API/testapi.c: Added. - (assertEqualsAsBoolean): - (assertEqualsAsNumber): - (assertEqualsAsUTF8String): - (assertEqualsAsCharactersPtr): - (assertEqualsAsCharacters): - (MyObject_initialize): - (MyObject_copyDescription): - (MyObject_hasProperty): - (MyObject_getProperty): - (MyObject_setProperty): - (MyObject_deleteProperty): - (MyObject_getPropertyList): - (MyObject_callAsFunction): - (MyObject_callAsConstructor): - (MyObject_convertToType): - (MyObject_finalize): - (print_callAsFunction): - (main): - (createStringWithContentsOfFile): - * API/testapi.js: Added. - * ChangeLog: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/npruntime_impl.h: - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstance::getPropertyList): - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - * kjs/nodes.cpp: - (ForInNode::execute): - * kjs/object.cpp: - (KJS::JSObject::put): - (KJS::JSObject::canPut): - (KJS::JSObject::deleteProperty): - (KJS::JSObject::propertyIsEnumerable): - (KJS::JSObject::getPropertyAttributes): - (KJS::JSObject::getPropertyList): - * kjs/object.h: - * kjs/property_map.cpp: - (KJS::PropertyMap::get): - * kjs/property_map.h: - * kjs/scope_chain.cpp: - (KJS::ScopeChain::print): - * kjs/string_object.cpp: - (StringInstance::getPropertyList): - * kjs/string_object.h: - * kjs/ustring.h: - (KJS::UString::Rep::ref): - -2006-06-20 Timothy Hatcher - - Reviewed by Geoff. - - Make sure we clear the exception before returning so - that future calls will not fail because of an earlier - exception state. Assert on entry that the WebScriptObject - is working with an ExecState that dose not have an exception. - Document that evaluateWebScript and callWebScriptMethod return - WebUndefined when an exception is thrown. - - * bindings/objc/WebScriptObject.h: - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (-[WebScriptObject evaluateWebScript:]): - (-[WebScriptObject setValue:forKey:]): - (-[WebScriptObject valueForKey:]): - (-[WebScriptObject removeWebScriptKey:]): - (-[WebScriptObject webScriptValueAtIndex:]): - (-[WebScriptObject setWebScriptValueAtIndex:value:]): - -2006-06-19 Anders Carlsson - - Reviewed by John. - - * kjs/interpreter.cpp: - (KJS::TimeoutChecker::pauseTimeoutCheck): - (KJS::TimeoutChecker::resumeTimeoutCheck): - Fix argument order in setitimer calls. - -2006-06-18 Anders Carlsson - - Reviewed by Geoff. - - * kjs/interpreter.cpp: - (KJS::TimeoutChecker::pauseTimeoutCheck): - Do nothing if the timeout check hasn't been started. - - (KJS::TimeoutChecker::resumeTimeoutCheck): - Do nothing if the timeout check hasn't been started. - Use the right signal handler when unblocking. - - (KJS::Interpreter::handleTimeout): - pause/resume the timeout check around the call to - shouldInterruptScript(). - -2006-06-16 Ben Goodger - - Reviewed by Maciej - - http://bugs.webkit.org/show_bug.cgi?id=9491 - Windows build breaks in interpreter.cpp - - * kjs/interpreter.cpp - (KJS::TimeoutChecker::pauseTimeoutCheck): - (KJS::TimeoutChecker::resumeTimeoutCheck): - Make sure to only assert equality with s_executingInterpreter when it - is being used (i.e. when HAVE(SYS_TIME_H) == true) - -2006-06-17 David Kilzer - - Reviewed by darin. - - http://bugs.webkit.org/show_bug.cgi?id=9477 - REGRESSION: fast/dom/replaceChild.html crashes on WebKit ToT in debug build - - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): Refetch the debugger after executing the function - in case the WebFrame it was running in has since been destroyed. - -2006-06-17 David Kilzer - - Reviewed by ggaren. - - http://bugs.webkit.org/show_bug.cgi?id=9476 - REGRESSION: Reproducible crash after closing window after viewing - css2.1/t0803-c5501-imrgn-t-00-b-ag.html - - * kjs/debugger.cpp: - (Debugger::detach): Call setDebugger(0) for all interpreters removed from - the 'attached to a debugger' list. - -2006-06-17 Anders Carlsson - - Reviewed by Maciej and Geoff. - - http://bugs.webkit.org/show_bug.cgi?id=7080 - Provide some way to stop a JavaScript infinite loop - - * kjs/completion.h: - (KJS::): - Add Interrupted completion type. - - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - (KJS::GlobalFuncImp::callAsFunction): - Only set the exception on the new ExecState if the current one has had one. - - * kjs/interpreter.cpp: - (KJS::TimeoutChecker::startTimeoutCheck): - (KJS::TimeoutChecker::stopTimeoutCheck): - (KJS::TimeoutChecker::alarmHandler): - (KJS::TimeoutChecker::pauseTimeoutCheck): - (KJS::TimeoutChecker::resumeTimeoutCheck): - New TimeoutChecker class which handles setting Interpreter::m_timedOut flag after a given - period of time. This currently only works on Unix platforms where setitimer and signals are used. - - (KJS::Interpreter::Interpreter): - Initialize new member variables. - - (KJS::Interpreter::~Interpreter): - Destroy the timeout checker. - - (KJS::Interpreter::startTimeoutCheck): - (KJS::Interpreter::stopTimeoutCheck): - (KJS::Interpreter::pauseTimeoutCheck): - (KJS::Interpreter::resumeTimeoutCheck): - Call the timeout checker. - - (KJS::Interpreter::handleTimeout): - Called on timeout. Resets the m_timedOut flag and calls shouldInterruptScript. - - * kjs/interpreter.h: - (KJS::Interpreter::setTimeoutTime): - New function for setting the timeout time. - - (KJS::Interpreter::shouldInterruptScript): - New function. The idea is that this should be overridden by subclasses in order to for example - pop up a dialog asking the user if the script should be interrupted. - - (KJS::Interpreter::checkTimeout): - New function which checks the m_timedOut flag and calls handleTimeout if it's set. - - * kjs/nodes.cpp: - (DoWhileNode::execute): - (WhileNode::execute): - (ForNode::execute): - Call Interpreter::checkTimeout after each iteration of the loop. - -2006-06-15 Timothy Hatcher - - Reviewed by Geoff and Darin. - - Prefer the DWARF debugging symbols format for use in Xcode 2.3. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-06-14 Geoffrey Garen - - Reviewed by Beth. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=9438 - Someone broke ToT: cannot build - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/runtime_root.h: Changed "Interpreter.h" to "interpreter.h" - -2006-06-12 Geoffrey Garen - - build fix - - * bindings/objc/WebScriptObject.mm: - (+[WebScriptObject throwException:]): Restore assignment I accidentally - deleted in previous commit - -2006-06-12 Geoffrey Garen - - Reviewed by TimO, Maciej. - - - Merged InterpreterImp code into Interpreter, which implements - all interpreter functionality now. This is part of my continuing quest - to create an external notion of JS "execution context" that is unified and simple -- - something to replace the mix of Context, ContextImp, ExecState, Interpreter, - InterpreterImp, and JSRun. - - All tests pass. Leaks test has not regressed from its baseline ~207 leaks - with ~3460 leaked nodes. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/NP_jsobject.cpp: - * bindings/objc/WebScriptObject.mm: - (+[WebScriptObject throwException:]): - * bindings/runtime_root.cpp: - * bindings/runtime_root.h: - * kjs/Context.cpp: - (KJS::Context::Context): - * kjs/ExecState.cpp: Added. - (KJS::ExecState::lexicalInterpreter): - * kjs/ExecState.h: Added. - (KJS::ExecState::dynamicInterpreter): - * kjs/SavedBuiltins.h: Added. - * kjs/bool_object.cpp: - (BooleanPrototype::BooleanPrototype): - * kjs/collector.cpp: - (KJS::Collector::collect): - (KJS::Collector::numInterpreters): - * kjs/context.h: - * kjs/debugger.cpp: - (Debugger::attach): - (Debugger::detach): - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - (KJS::GlobalFuncImp::callAsFunction): - * kjs/function_object.cpp: - (FunctionObjectImp::construct): - * kjs/internal.cpp: - * kjs/internal.h: - * kjs/interpreter.cpp: - (KJS::interpreterMap): - (KJS::Interpreter::Interpreter): - (KJS::Interpreter::init): - (KJS::Interpreter::~Interpreter): - (KJS::Interpreter::globalObject): - (KJS::Interpreter::initGlobalObject): - (KJS::Interpreter::globalExec): - (KJS::Interpreter::checkSyntax): - (KJS::Interpreter::evaluate): - (KJS::Interpreter::builtinObject): - (KJS::Interpreter::builtinFunction): - (KJS::Interpreter::builtinArray): - (KJS::Interpreter::builtinBoolean): - (KJS::Interpreter::builtinString): - (KJS::Interpreter::builtinNumber): - (KJS::Interpreter::builtinDate): - (KJS::Interpreter::builtinRegExp): - (KJS::Interpreter::builtinError): - (KJS::Interpreter::builtinObjectPrototype): - (KJS::Interpreter::builtinFunctionPrototype): - (KJS::Interpreter::builtinArrayPrototype): - (KJS::Interpreter::builtinBooleanPrototype): - (KJS::Interpreter::builtinStringPrototype): - (KJS::Interpreter::builtinNumberPrototype): - (KJS::Interpreter::builtinDatePrototype): - (KJS::Interpreter::builtinRegExpPrototype): - (KJS::Interpreter::builtinErrorPrototype): - (KJS::Interpreter::builtinEvalError): - (KJS::Interpreter::builtinRangeError): - (KJS::Interpreter::builtinReferenceError): - (KJS::Interpreter::builtinSyntaxError): - (KJS::Interpreter::builtinTypeError): - (KJS::Interpreter::builtinURIError): - (KJS::Interpreter::builtinEvalErrorPrototype): - (KJS::Interpreter::builtinRangeErrorPrototype): - (KJS::Interpreter::builtinReferenceErrorPrototype): - (KJS::Interpreter::builtinSyntaxErrorPrototype): - (KJS::Interpreter::builtinTypeErrorPrototype): - (KJS::Interpreter::builtinURIErrorPrototype): - (KJS::Interpreter::mark): - (KJS::Interpreter::interpreterWithGlobalObject): - (KJS::Interpreter::saveBuiltins): - (KJS::Interpreter::restoreBuiltins): - * kjs/interpreter.h: - (KJS::Interpreter::setCompatMode): - (KJS::Interpreter::compatMode): - (KJS::Interpreter::firstInterpreter): - (KJS::Interpreter::nextInterpreter): - (KJS::Interpreter::prevInterpreter): - (KJS::Interpreter::debugger): - (KJS::Interpreter::setDebugger): - (KJS::Interpreter::setContext): - (KJS::Interpreter::context): - * kjs/nodes.cpp: - (StatementNode::hitStatement): - (RegExpNode::evaluate): - * kjs/protect.h: - -2006-06-12 Geoffrey Garen - - Reviewed by Maciej. - - - Have *.lut.h files #include lookup.h to eliminate surprising header - include order dependency. - - * DerivedSources.make: - * kjs/array_object.cpp: - * kjs/date_object.cpp: - * kjs/date_object.h: - (KJS::DateProtoFunc::): - * kjs/lexer.cpp: - * kjs/math_object.cpp: - * kjs/number_object.cpp: - * kjs/regexp_object.cpp: - * kjs/string_object.cpp: - -2006-06-10 Geoffrey Garen - - - http://bugs.webkit.org/show_bug.cgi?id=8515 - Linux porting compile bug - - Fix by Mike Emmel, Reviewed by Darin. - - * JavaScriptCoreSources.bkl: - * jscore.bkl: - * wtf/Platform.h: - -2006-06-09 Geoffrey Garen - - Build fix -- I think :). - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/context.h: - -2006-06-09 Geoffrey Garen - - Reviewed by Eric (yay!). - - - Removed Context wrapper for ContextImp, renamed ContextImp to Context, - split Context into its own file -- Context.cpp -- renamed _var to m_var, - change ' *' to '* '. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/Context.cpp: Added. - (KJS::Context::Context): - (KJS::Context::~Context): - (KJS::Context::mark): - * kjs/context.h: - (KJS::Context::scopeChain): - (KJS::Context::variableObject): - (KJS::Context::setVariableObject): - (KJS::Context::thisValue): - (KJS::Context::callingContext): - (KJS::Context::activationObject): - (KJS::Context::currentBody): - (KJS::Context::function): - (KJS::Context::arguments): - (KJS::Context::pushScope): - (KJS::Context::seenLabels): - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - (KJS::FunctionImp::processParameters): - (KJS::FunctionImp::argumentsGetter): - (KJS::GlobalFuncImp::callAsFunction): - * kjs/internal.cpp: - (KJS::InterpreterImp::evaluate): - * kjs/internal.h: - (KJS::InterpreterImp::setContext): - (KJS::InterpreterImp::context): - * kjs/interpreter.cpp: - * kjs/interpreter.h: - (KJS::ExecState::context): - (KJS::ExecState::ExecState): - * kjs/nodes.cpp: - (currentSourceId): - (currentSourceURL): - (ThisNode::evaluate): - (ResolveNode::evaluate): - (FunctionCallResolveNode::evaluate): - (PostfixResolveNode::evaluate): - (DeleteResolveNode::evaluate): - (TypeOfResolveNode::evaluate): - (PrefixResolveNode::evaluate): - (AssignResolveNode::evaluate): - (VarDeclNode::evaluate): - (VarDeclNode::processVarDecls): - (DoWhileNode::execute): - (WhileNode::execute): - (ForNode::execute): - (ForInNode::execute): - (ContinueNode::execute): - (BreakNode::execute): - (ReturnNode::execute): - (WithNode::execute): - (SwitchNode::execute): - (LabelNode::execute): - (TryNode::execute): - (FuncDeclNode::processFuncDecl): - (FuncExprNode::evaluate): - -2006-06-07 Geoffrey Garen - - Removed API directory I prematurely/accidentally added. - - * API: Removed. - -2006-06-05 Mitz Pettel - - Reviewed and landed by Geoff. - - - fix a regression in ecma_3/String/regress-104375.js - - * kjs/string_object.cpp: - (substituteBackreferences): If a 2-digit back reference is out of range, - parse it as a 1-digit reference (followed by the other digit). This matches - Firefox's behavior. - -2006-06-05 Geoffrey Garen - - Reviewed By Maciej. - Darin already reviewed this change on the branch. See . - - - Fixed PCRE overflow in Safari JavaScriptCore - - No test case because there's no behavior change. - - * pcre/pcre_compile.c: - (read_repeat_counts): Check for integer overflow / out of bounds - -2006-06-05 Geoffrey Garen - - Reviewed by aliu. - - - Changed CString length from int to size_t. We sould probably do this - for UString, too. (Darin, if you're reading this: Maciej said so.) - - * kjs/function.cpp: - (KJS::encode): - * kjs/ustring.cpp: - (KJS::CString::CString): - (KJS::operator==): - * kjs/ustring.h: - (KJS::CString::size): - -2006-06-04 Geoffrey Garen - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=9304 - Minor cleanup in JavaScriptCore - - * kjs/value.h: Removed redundant declarations - -2006-06-04 Darin Adler - - Reviewed by Anders. - - - changed deleteAllValues so it can work on "const" collections - Deleting the values affects the values, not the pointers in the - collection, so it's legitimate to do it to a const collection, - and a case of that actually came up in the XPath code. - - * wtf/HashMap.h: - (WTF::deleteAllPairSeconds): Use const iterators. - (WTF::deleteAllValues): Take const HashMap reference as a parameter. - * wtf/HashSet.h: - (WTF::deleteAllValues): Take const HashSet reference as a parameter, - and use const iterators. - * wtf/Vector.h: - (WTF::deleteAllValues): Take const Vector reference as a parameter. - - - added more functions that are present in on some platforms, - but not on others; moved here from various files in WebCore - - * wtf/MathExtras.h: - (isinf): Added. - (isnan): Added. - (lround): Added. - (lroundf): Tweaked. - (round): Added. - (roundf): Tweaked. - (signbit): Added. - -2006-06-02 Mitz Pettel - - Reviewed by ggaren. - - - http://bugs.webkit.org/show_bug.cgi?id=9234 - Implement $&, $' and $` replacement codes in String.prototype.replace - - Test: fast/js/string-replace-3.html - - * kjs/string_object.cpp: - (substituteBackreferences): Added support for $& (matched substring), - $` (everything preceding matched substring), $' (everything following - matched substring) and 2-digit back references, and cleaned up a little. - -2006-06-02 Adele Peterson - - Reviewed by Darin. - - Set incremental linking to no. This seems to fix a build problem I was seeing - where dftables couldn't find a dll. - - * JavaScriptCore.vcproj/dftables/dftables.vcproj: - -2006-05-26 Steve Falkenburg - - Build fixes/tweaks - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -=== JavaScriptCore-521.11 === - -2006-05-24 Geoffrey Garen - - Reviewed by mjs. - - - JSC half of fix for TOT REGRESSSION: Crash - occurs when attempting to view image in slideshow mode at - http://d.smugmug.com/gallery/581716 ( KJS::IfNode::execute - (KJS::ExecState*) + 312) - - On alternate threads, DOMObjects remain in the - ScriptInterpreter's cache because they're not collected. So, they - need an opportunity to mark their children. - - I'm not particularly happy with this solution because it fails to - resolve many outstanding issues with the DOM object cache. Since none - of those issues is a crasher or a serious compatibility concern, - and since the behavior of other browsers is not much to go on in this - case, I've filed about that, and I'm moving on - with my life. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/collector.cpp: - (KJS::Collector::collect): - * kjs/internal.cpp: - (KJS::InterpreterImp::mark): - * kjs/internal.h: - * kjs/interpreter.cpp: - (KJS::Interpreter::mark): - * kjs/interpreter.h: - -=== JavaScriptCore-521.10 === - -2006-05-22 Timothy Hatcher - - Reviewed by Eric, Kevin and Geoff. - - Merge open source build fixes. - - * kjs/collector.cpp: look at the rsp register in x86_64 - (KJS::Collector::markOtherThreadConservatively): - * wtf/Platform.h: add x86_64 to the platform list - -2006-05-19 Anders Carlsson - - Reviewed by Geoff. - - http://bugs.webkit.org/show_bug.cgi?id=8993 - Support function declaration in case statements - - * kjs/grammar.y: Get rid of StatementList and use SourceElements instead. - - * kjs/nodes.cpp: - (CaseClauseNode::evalStatements): - (CaseClauseNode::processVarDecls): - (CaseClauseNode::processFuncDecl): - (ClauseListNode::processFuncDecl): - (CaseBlockNode::processFuncDecl): - (SwitchNode::processFuncDecl): - * kjs/nodes.h: - (KJS::CaseClauseNode::CaseClauseNode): - (KJS::ClauseListNode::ClauseListNode): - (KJS::ClauseListNode::getClause): - (KJS::ClauseListNode::getNext): - (KJS::ClauseListNode::releaseNext): - (KJS::SwitchNode::SwitchNode): - Add processFuncDecl for the relevant nodes. - - * kjs/nodes2string.cpp: - (CaseClauseNode::streamTo): - next got renamed to source. - -2006-05-17 George Staikos - - Reviewed by Maciej, Alexey, and Eric. - - * pcre/pcre_compile.c: - * pcre/pcre_get.c: - * pcre/pcre_exec.c: - * wtf/UnusedParam.h: - Use /**/ in .c files to compile with non-C99 and non-GCC compilers. - - * kjs/testkjs.cpp: - Change include to from "HashTraits.h" to avoid -I - - * wtf/unicode/qt4/UnicodeQt4.h: - Use correct parentheses and correct mask for utf-32 support. - -2006-05-17 Alexey Proskuryakov - - Reviewed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=8870 - Crash typing in Yahoo auto-complete widget. - - Test: fast/js/regexp-stack-overflow.html - - * pcre/pcre-config.h: Define NO_RECURSE. - -2006-05-16 George Staikos - - Reviewed by Maciej. - - Fix some warnings and strict compilation errors. - - * kjs/nodes.cpp: - * kjs/value.cpp: - -2006-05-15 Alexey Proskuryakov - - * make-generated-sources.sh: Changed to be executable and removed - text in the file generated by "svn diff". - -2006-05-15 Geoffrey Garen - - Reviewed by Maciej. - - - Fixed please do not treat "debugger" as - a reserved word while parsing JavaScript (and other ECMA reserved - words) - - AKA - - http://bugs.webkit.org/show_bug.cgi?id=6179 - We treat "char" as a reserved word in JavaScript and firefox/IE do - not - - (1) I unreserved most of the spec's "future reserved words" because - they're not reserved in IE or FF. (Most, but not all, because IE - somewhat randomly *does* reserve a few of them.) - (2) I made 'debugger' a legitimate statement that acts like an empty - statement because FF and IE support it. - - * kjs/grammar.y: - * kjs/keywords.table: - -2006-05-15 Tim Omernick - - Reviewed by John Sullivan. - - Part of Add 64-bit support to the Netscape Plugin API - - Added to the Netscape Plugin API the concept of "plugin drawing models". The drawing model - determines the kind of graphics context created by the browser for the plugin, as well as - the Mac types of various Netscape Plugin API data structures. - - There is a drawing model to represent the old QuickDraw-based API. It is used by default - if QuickDraw is available on the system, unless the plugin specifies another drawing model. - - The big change is the addition of the CoreGraphics drawing model. A plugin may request this - drawing model to obtain access to a CGContextRef for drawing, instead of a QuickDraw CGrafPtr. - - * bindings/npapi.h: - Define NP_NO_QUICKDRAW when compiling 64-bit; there is no 64-bit QuickDraw. - Added NPNVpluginDrawingModel, NPNVsupportsQuickDrawBool, and NPNVsupportsCoreGraphicsBool - variables. - Added NPDrawingModel enumeration. Currently the only drawing models are QuickDraw and - CoreGraphics. - NPRegion's type now depends on the drawing model specified by the plugin. - NP_Port is now only defined when QuickDraw is available. - Added NP_CGContext, which is the type of the NPWindow's "window" member in CoreGraphics mode. - -2006-05-13 Kevin M. Ollivier - - Reviewed by Darin, landed by ap. - - - http://bugs.webkit.org/show_bug.cgi?id=8528 - Bakefiles (and generated Makefiles) for wx and gdk ports - - * make-generated-sources.sh: - Added script to configure environment to run DerivedSources.make - - * JavaScriptCoreSources.bkl: - Added JavaScriptCore sources list for Bakefile. - - * jscore.bkl: - Bakefile used to generate JavaScriptCore project files - (currently only used by wx and gdk ports) - -2006-05-09 Steve Falkenburg - - Fix Windows build. - Minor fixes to WTF headers. - - Reviewed by kevin. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Fix include dirs, paths to files. - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Fix include dirs. - * wtf/Assertions.h: include Platform.h to get definition for COMPILER() - * wtf/Vector.h: include FastMalloc.h for definition of fastMalloc, fastFree - -2006-05-09 Maciej Stachowiak - - Rubber stamped by Anders. - - - renamed kxmlcore to wtf - - kxmlcore --> wtf - KXMLCore --> WTF - KXC --> WTF - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/c/c_instance.cpp: - * bindings/objc/WebScriptObject.mm: - * kjs/JSImmediate.h: - * kjs/Parser.cpp: - * kjs/Parser.h: - * kjs/array_object.cpp: - * kjs/collector.cpp: - (KJS::Collector::registerThread): - * kjs/collector.h: - * kjs/config.h: - * kjs/function.cpp: - (KJS::isStrWhiteSpace): - * kjs/function.h: - * kjs/identifier.cpp: - * kjs/internal.cpp: - * kjs/internal.h: - * kjs/lexer.cpp: - (Lexer::shift): - (Lexer::isWhiteSpace): - (Lexer::isIdentStart): - (Lexer::isIdentPart): - * kjs/lookup.cpp: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/number_object.cpp: - * kjs/object.h: - * kjs/property_map.cpp: - * kjs/property_map.h: - * kjs/string_object.cpp: - (StringProtoFunc::callAsFunction): - * kjs/testkjs.cpp: - (testIsInteger): - * kjs/ustring.cpp: - * kjs/ustring.h: - * kxmlcore: Removed. - * kxmlcore/AlwaysInline.h: Removed. - * kxmlcore/Assertions.cpp: Removed. - * kxmlcore/Assertions.h: Removed. - * kxmlcore/FastMalloc.cpp: Removed. - * kxmlcore/FastMalloc.h: Removed. - * kxmlcore/FastMallocInternal.h: Removed. - * kxmlcore/Forward.h: Removed. - * kxmlcore/HashCountedSet.h: Removed. - * kxmlcore/HashFunctions.h: Removed. - * kxmlcore/HashMap.h: Removed. - * kxmlcore/HashSet.h: Removed. - * kxmlcore/HashTable.cpp: Removed. - * kxmlcore/HashTable.h: Removed. - * kxmlcore/HashTraits.h: Removed. - * kxmlcore/ListRefPtr.h: Removed. - * kxmlcore/Noncopyable.h: Removed. - * kxmlcore/OwnArrayPtr.h: Removed. - * kxmlcore/OwnPtr.h: Removed. - * kxmlcore/PassRefPtr.h: Removed. - * kxmlcore/Platform.h: Removed. - * kxmlcore/RefPtr.h: Removed. - * kxmlcore/TCPageMap.h: Removed. - * kxmlcore/TCSpinLock.h: Removed. - * kxmlcore/TCSystemAlloc.cpp: Removed. - * kxmlcore/TCSystemAlloc.h: Removed. - * kxmlcore/UnusedParam.h: Removed. - * kxmlcore/Vector.h: Removed. - * kxmlcore/VectorTraits.h: Removed. - * kxmlcore/unicode: Removed. - * kxmlcore/unicode/Unicode.h: Removed. - * kxmlcore/unicode/UnicodeCategory.h: Removed. - * kxmlcore/unicode/icu: Removed. - * kxmlcore/unicode/icu/UnicodeIcu.h: Removed. - * kxmlcore/unicode/posix: Removed. - * kxmlcore/unicode/qt3: Removed. - * kxmlcore/unicode/qt4: Removed. - * kxmlcore/unicode/qt4/UnicodeQt4.h: Removed. - * pcre/pcre_get.c: - * wtf: Added. - * wtf/Assertions.cpp: - * wtf/Assertions.h: - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_ThreadCache::Scavenge): - (WTF::do_malloc): - (WTF::do_free): - (WTF::TCMallocGuard::TCMallocGuard): - (WTF::malloc): - (WTF::free): - (WTF::calloc): - (WTF::cfree): - (WTF::realloc): - * wtf/FastMalloc.h: - * wtf/FastMallocInternal.h: - * wtf/Forward.h: - * wtf/HashCountedSet.h: - * wtf/HashFunctions.h: - * wtf/HashMap.h: - * wtf/HashSet.h: - * wtf/HashTable.cpp: - * wtf/HashTable.h: - * wtf/HashTraits.h: - * wtf/ListRefPtr.h: - * wtf/Noncopyable.h: - * wtf/OwnArrayPtr.h: - * wtf/OwnPtr.h: - * wtf/PassRefPtr.h: - * wtf/RefPtr.h: - * wtf/TCSystemAlloc.cpp: - (TCMalloc_SystemAlloc): - * wtf/Vector.h: - * wtf/VectorTraits.h: - * wtf/unicode/UnicodeCategory.h: - * wtf/unicode/icu/UnicodeIcu.h: - -2006-05-08 Timothy Hatcher - - Reviewed by Tim O. - - * bindings/npapi.h: do not define #pragma options align=mac68k if we are 64-bit - -2006-05-07 Darin Adler - - Reviewed and landed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=8765 - Random crashes on TOT since the form state change - - I haven't figured out how to construct a test for this, but this does seem to fix the - problem; Mitz mentioned that a double-destroy was occurring in these functions. - - * kxmlcore/HashMap.h: (KXMLCore::HashMap::remove): Use RefCounter::deref instead of calling - ~ValueType, because ~ValueType often results in a double-destroy, since the HashTable also - destroys the element based on the storage type. The RefCounter template correctly does work - only in cases where ValueType and ValueStorageType differ and this class is what's used - elsewhere for the same purpose; I somehow missed this case when optimizing HashMap. - * kxmlcore/HashSet.h: (KXMLCore::HashSet::remove): Ditto. - -2006-05-05 Darin Adler - - - http://bugs.webkit.org/show_bug.cgi?id=8722 - IE compatibility fix in date parsing - - * kjs/date_object.cpp: (KJS::parseDate): Merged change that George Staikos provided - from KDE 3.4.3 branch that allows day values of 0 and values that are > 1000. - -2006-05-04 Anders Carlsson - - Reviewed by Maciej. - - http://bugs.webkit.org/show_bug.cgi?id=8734 - Would like a Vector::append that takes another Vector - - * kxmlcore/Vector.h: - (KXMLCore::::append): - New function that takes another array. - -2006-05-02 Steve Falkenburg - - Reviewed by eric. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: set NDEBUG for release build - * kxmlcore/FastMalloc.cpp: Prevent USE_SYSTEM_MALLOC from being defined twice - -2006-05-02 Anders Carlsson - - Reviewed by Maciej. - - * kxmlcore/HashMap.h: - (KXMLCore::::operator): - Return *this - -2006-05-01 Tim Omernick - - Reviewed by Tim Hatcher. - - Support printing for embedded Netscape plugins - - * bindings/npapi.h: - Fixed struct alignment problem in our npapi.h. Structs must be 68k-aligned on both pre-Mac OS X - and Mac OS X systems, as this is what plugins expect. - -2006-05-01 Timothy Hatcher - - Reviewed by Maciej. - - 8F36 Regression: crash in malloc_consolidate if you use a .PAC file - - The original fix missed the oversized cell case. Added a test for "currentThreadIsMainThread || - imp->m_destructorIsThreadSafe" where we collect oversized cells. - - We don't have a way to test PAC files yet, so there's no test attached. - - * kjs/collector.cpp: - (KJS::Collector::collect): test the thread when we collect oversized cells - -2006-05-01 Tim Omernick - - Reviewed by Adele. - - REGRESSION (two days ago): LOG() just prints @ for NSObject substitutions - - * kxmlcore/Assertions.cpp: - Changed sense of strstr("%@") check. I already made the same fix to the WebBrowser assertions. - -2006-04-28 Steve Falkenburg - - Reviewed by kdecker - - Actually apply the change that was reviewed insted of checking it in with an #if 0 (oops). - - * kjs/testkjs.cpp: - (main): Suppress C runtime alerts - -2006-04-28 Steve Falkenburg - - Reviewed by kdecker - - Suppress error reporting dialog that blocks Javascript tests from completing. - - Real error is due to an overflow in the date/time handling functions that needs - to be addressed, but this will prevent the hang running the Javascript tests - on the build bot (along with the related changes). - - * kjs/testkjs.cpp: - (main): Suppress C runtime alerts - -2006-04-27 Geoffrey Garen - - Reviewed by Maciej - - - Minor fixups I discovered while working on the autogenerator. - - * kjs/lookup.cpp: - (findEntry): ASSERT that size is not 0, because otherwise we'll % by 0, - compute a garbage address, and possibly crash. - * kjs/lookup.h: - (cacheGlobalObject): Don't enumerate cached objects -- ideally, they - would be hidden entirely. - -2006-04-21 Kevin M. Ollivier - - Reviewed by Darin. - - - http://bugs.webkit.org/show_bug.cgi?id=8507 - Compilation fixes for building on gcc 4.0.2, and without precomp headers - - * kjs/operations.h: - * kxmlcore/Assertions.cpp: - * kxmlcore/FastMalloc.cpp: - Added necessary headers to resolve compilation issues when not using - precompiled headers. - - * kjs/value.h: Declare the JSCell class before friend declaration - to resolve compilation issues with gcc 4.0.2. - - * kxmlcore/Platform.h: Set Unicode support to use ICU on platforms - other than KDE (previously only defined for Win and Mac OS) - -2006-04-18 Eric Seidel - - Reviewed by ggaren. - - Fix "new Function()" to correctly use lexical scoping. - Add ScopeChain::print() function for debugging. - REGRESSION (125-407): JavaScript failure on PeopleSoft REN Server - - * kjs/function_object.cpp: - (FunctionObjectImp::construct): - * kjs/scope_chain.cpp: - (KJS::ScopeChain::print): - * kjs/scope_chain.h: - -2006-04-14 James G. Speth - - Reviewed by Timothy. - - Bug 8389: support for Cocoa bindings - binding an NSTreeController to the WebView's DOM - http://bugs.webkit.org/show_bug.cgi?id=8389 - - Adds a category to WebScriptObject with array accessors for KVC/KVO. - - If super valueForKey: fails it will call valueForUndefinedKey:, which is - important because it causes the right behavior to happen with bindings using - the "Raises for Not Applicable Keys" flag and the "Not Applicable Placeholder" - - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject valueForKey:]): - (-[WebScriptObject count]): - (-[WebScriptObject objectAtIndex:]): - (-[WebUndefined description]): return "undefined" - -2006-04-13 Geoffrey Garen - - Reviewed by Darin. - - * kjs/internal.cpp: - (KJS::InterpreterImp::initGlobalObject): Add the built-in object - prototype to the end of the global object's prototype chain instead of - just blowing away its existing prototype. We need to do this because - the window object has a meaningful prototype now. - -2006-04-13 Maciej Stachowiak - - Reviewed by Geoff. - - - fix testkjs to not show false-positive KJS::Node leaks in debug builds - - * kjs/testkjs.cpp: - (doIt): - (kjsmain): - -2006-04-11 Geoffrey Garen - - Reviewed by Maciej. - - Minor code cleanup -- passes all the JS tests. - - * kjs/object_object.cpp: - (ObjectObjectImp::construct): - (ObjectObjectImp::callAsFunction): - -2006-04-11 Darin Adler - - - another attempt to fix Windows build -- Vector in Forward.h was not working - - * kxmlcore/Forward.h: Remove Vector. - * kxmlcore/Vector.h: Add back default arguments, remove include of - Forward.h. - -2006-04-11 Darin Adler - - - try to fix Windows build -- HashForward.h was not working - - * kxmlcore/HashForward.h: Removed. - - * JavaScriptCore.xcodeproj/project.pbxproj: Remove HashForward.h. - * kjs/collector.h: Remove use of HashForward.h. - * kxmlcore/HashCountedSet.h: Remove include of HashForward.h, restore - default arguments. - * kxmlcore/HashMap.h: Ditto. - * kxmlcore/HashSet.h: Ditto. - -2006-04-11 David Harrison - - Reviewed by Darin. - - - fixed clean build, broken by Darin's check-in - - * kjs/date_object.cpp: Add needed include of lookup.h. - * kjs/regexp_object.cpp: Move include of .lut.h file below other includes. - -2006-04-10 Darin Adler - - Rubber-stamped by John Sullivan. - - - switched from a shell script to a makefile for generated files - - removed lots of unneeded includes - - added new Forward.h and HashForward.h headers that allow compiling with - fewer unneeded templates - - * DerivedSources.make: Added. - * generate-derived-sources: Removed. - * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, changed to use - DerivedSources.make. - - * kxmlcore/Forward.h: Added. - * kxmlcore/HashForward.h: Added. - - * kxmlcore/HashCountedSet.h: Include HashForward for default args. - * kxmlcore/HashMap.h: Ditto. - * kxmlcore/HashSet.h: Ditto. - - * kjs/object.h: - * kjs/object.cpp: - Moved KJS_MAX_STACK into the .cpp file. - - * bindings/NP_jsobject.cpp: - * bindings/c/c_instance.h: - * bindings/jni/jni_class.h: - * bindings/jni/jni_runtime.h: - * bindings/jni/jni_utility.h: - * bindings/objc/WebScriptObject.mm: - * bindings/objc/WebScriptObjectPrivate.h: - * bindings/objc/objc_class.h: - * bindings/objc/objc_class.mm: - * bindings/objc/objc_instance.h: - * bindings/objc/objc_instance.mm: - * bindings/objc/objc_runtime.mm: - * bindings/objc/objc_utility.mm: - * bindings/runtime.h: - * bindings/runtime_array.cpp: - * bindings/runtime_array.h: - * bindings/runtime_method.cpp: - * bindings/runtime_method.h: - * bindings/runtime_object.cpp: - * bindings/runtime_root.h: - * kjs/JSImmediate.cpp: - * kjs/Parser.h: - * kjs/array_object.cpp: - * kjs/array_object.h: - * kjs/bool_object.cpp: - * kjs/bool_object.h: - * kjs/collector.h: - * kjs/context.h: - * kjs/debugger.cpp: - * kjs/error_object.h: - * kjs/function_object.h: - * kjs/internal.h: - * kjs/lexer.cpp: - * kjs/math_object.cpp: - * kjs/math_object.h: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/number_object.cpp: - * kjs/number_object.h: - * kjs/object_object.cpp: - * kjs/operations.cpp: - * kjs/protected_reference.h: - * kjs/reference.h: - * kjs/reference_list.h: - * kjs/regexp_object.h: - * kjs/string_object.cpp: - * kjs/string_object.h: - * kjs/testkjs.cpp: - * kjs/value.cpp: - * kjs/value.h: - * kxmlcore/HashTable.h: - * kxmlcore/ListRefPtr.h: - * kxmlcore/TCPageMap.h: - * kxmlcore/Vector.h: - Removed unneeded header includes. - -2006-04-09 Geoffrey Garen - - Reviewed by eric. - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=8284 - prevent unnecessary entries in the "nodes with extra refs" hash table - - This patch switches manually RefPtr exchange with use of - RefPtr::release to ensure that a node's ref count never tops 1 - (in the normal case). - - * kjs/nodes.cpp: - (BlockNode::BlockNode): - (CaseBlockNode::CaseBlockNode): - * kjs/nodes.h: - (KJS::ArrayNode::ArrayNode): - (KJS::ObjectLiteralNode::ObjectLiteralNode): - (KJS::ArgumentsNode::ArgumentsNode): - (KJS::VarStatementNode::VarStatementNode): - (KJS::ForNode::ForNode): - (KJS::CaseClauseNode::CaseClauseNode): - (KJS::FuncExprNode::FuncExprNode): - (KJS::FuncDeclNode::FuncDeclNode): - -2006-04-08 Alexey Proskuryakov - - Reviewed by Darin. - - One more attempt - use reinterpret_cast, rather than static_cast. - -2006-04-08 Alexey Proskuryakov - - Reviewed by Darin. - - An attempt to fix Win32 build - ICU uses wchar_t on Windows, so we need a type cast. - - * kxmlcore/unicode/icu/UnicodeIcu.h: - (KXMLCore::Unicode::toLower): - (KXMLCore::Unicode::toUpper): - -2006-04-08 Alexey Proskuryakov - - Reviewed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=8264 - toLowerCase and toUpperCase don't honor special mappings - - Test: fast/js/string-capitalization.html - - * JavaScriptCore.xcodeproj/project.pbxproj: Added KXMLCore::Unicode headers to the project. - * icu/unicode/putil.h: Added (copied from WebCore). - * icu/unicode/uiter.h: Ditto. - * icu/unicode/ustring.h: Ditto. - * kjs/string_object.cpp: - (StringProtoFunc::callAsFunction): Use the new KXMLCore::Unicode::toUpper() and toLower(). - * kjs/ustring.cpp: Removed unused (and evil) UChar::toLower() and toUpper(). - * kjs/ustring.h: Ditto. - - * kxmlcore/unicode/Unicode.h: Corrected capitalization of the word Unicode. - * kxmlcore/unicode/UnicodeCategory.h: Renamed include guard macro to match file name. - - * kxmlcore/unicode/icu/UnicodeIcu.h: - (KXMLCore::Unicode::toLower): Work on strings, not individual characters. Use ICU root locale. - (KXMLCore::Unicode::toUpper): Ditto. - (KXMLCore::Unicode::isFormatChar): Use int32_t, which can hold a complete code point. - (KXMLCore::Unicode::isSeparatorSpace): Ditto. - (KXMLCore::Unicode::category): Ditto. - * kxmlcore/unicode/qt4/UnicodeQt4.h: - (KXMLCore::Unicode::toLower): Work on strings, not individual characters. - (KXMLCore::Unicode::toUpper): Ditto. - (KXMLCore::Unicode::isFormatChar): Use int32_t, which can hold a complete code point. - (KXMLCore::Unicode::isSeparatorSpace): Ditto. - (KXMLCore::Unicode::category): Ditto. - - * tests/mozilla/ecma/String/15.5.4.12-1.js: Corrected expected results. - * tests/mozilla/ecma/String/15.5.4.12-5.js: Corrected expected results. - -2006-04-05 Darin Adler - - - attempt to fix Windows build - - * kxmlcore/HashMap.h: (KXMLCore::HashMap::remove): Use (*it). instead of it->. - * kxmlcore/HashSet.h: (KXMLCore::HashSet::remove): Ditto. - -2006-04-05 Darin Adler - - - attempt to fix Windows build - - * os-win32/stdint.h: Add int8_t, uint8_t, int64_t. - -2006-04-05 Darin Adler - - Reviewed by Maciej. - - - fix memory leak introduced by the previous change - - * kxmlcore/HashTable.h: Specialize NeedsRef so that it correctly returns true when - the value in question is a pair where one of the pair needs a ref and the other - of the pair does not. - -2006-04-05 Darin Adler - - Reviewed by Maciej. - - - JavaScriptCore part of fix for http://bugs.webkit.org/show_bug.cgi?id=8049 - StringImpl hash traits deleted value creates an init routine for WebCore - REGRESSION: WebCore has init routines (8049) - - Change HashMap and HashSet implementation so they fold various types together. - This allows us to implement maps and sets that use RefPtr - and WebCore::String in terms of the underlying raw pointer type, and hence use - -1 for the deleted value. - - * kxmlcore/HashTraits.h: Added a new type to HashTraits, StorageTraits, which is a - type to be used when storing a value that has the same layout as the type itself. - This is used only for non-key cases. In the case of keys, the hash function must also - be considered. Moved emptyValue out of GenericHashTraitsBase into GenericHashTraits. - Added a new bool to HashTraits, needsRef, which indicates whether the type needs - explicit reference counting. If the type itself has needsRef true, but the storage - type has needsRef false, then the HashSet or HashMap has to handle the reference - counting explicitly. Added hash trait specializations for all signed integer values - that give -1 as the deleted value. Gave all integers StorageTraits of the canonical - integer type of the same size so int and long will share code. Gave all pointers and - RefPtrs StorageTraits of the appropriately sized integer type. Removed redundant - TraitType and emptyValue definitions in the pointer specialization for HashTraits. - Added PairBaseHashTraits, which doesn't try to set up needsDestruction and deletedValue. - Useful for types where we don't want to force the existence of deletedValue, such as - the type of a pair in a HashMap which is not the actual storage type. Removed an - unneeded parameter from the DeletedValueAssigner template. Added HashKeyStorageTraits - template, which determines what type can be used to store a given hash key type with - a given hash function, and specialized it for pointers and RefPtr so that pointer - hash tables share an underlying HashTable that uses IntHash. - - * kxmlcore/HashTable.h: Added HashTableConstIteratorAdapter, HashTableIteratorAdapter, - NeedsRef, RefCountManagerBase, RefCountManager, HashTableRefCountManagerBase, and - HashTableRefCountManager. All are used by both HashSet and HashMap to handle hash - tables where the type stored is not the same as the real value type. - - * kxmlcore/HashFunctions.h: Added a new struct named IntTypes that finds an - integer type given a sizeof value. Renamed pointerHash to intHash and made it - use overloading and take integer parameters. Added an IntHash struct which is - a hash function that works for integers. Changed PtrHash to call IntHash with - an appropriately sized integer. Made IntHash the default hash function for - many integer types. Made PtrHash the default hash function for RefPtr as well - as for raw pointers. - - * kxmlcore/HashSet.h: Changed implementation to use a separate "storage type" - derived from the new traits. The HashTable will use the storage type and all - necessary translation and ref/deref is done at the HashSet level. Also reorganized - the file so that the HashSet is at the top and has no inline implementation inside - it so it's easy to read the interface to HashSet. - - * kxmlcore/HashMap.h: Changed implementation to use a separate "storage type" - derived from the new traits. The HashTable will use the storage type and all - necessary translation and ref/deref is done at the HashMap level. Also reorganized - the file so that the HashMap is at the top and has no inline implementation inside - it so it's easy to read the interface to HashMap. - - * kxmlcore/HashMapPtrSpec.h: Removed. Superceded by optimizations in HashMap itself. - - * JavaScriptCore.xcodeproj/project.pbxproj: Remove HashMapPtrSpec.h, resort files, - and also remove some unnecessary build settings from the aggregate target that - generates derived sources. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. - -2006-04-04 Timothy Hatcher - - Reviewed by Darin. - - The Debug and Release frameworks are now built with install paths relative to the build products directory. - This removes the need for other projects to build with -framework WebCore and -framework JavaScriptCore. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-04-04 Eric Seidel - - Reviewed by ggaren. - - Fix win32 build. - Disable ASSERT redefinition warnings for now. - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - * kxmlcore/Assertions.h: - -2006-04-04 Bjrn Graf - - Reviewed by ggaren & darin. Landed by eseidel. - - Integrate CURL version of gettimeofday - http://bugs.webkit.org/show_bug.cgi?id=7399 - Disable crash report dialogs for testkjs.exe in Release mode - http://bugs.webkit.org/show_bug.cgi?id=8113 - - * kjs/testkjs.cpp: - (StopWatch::start): - (StopWatch::stop): - (StopWatch::getElapsedMS): - (main): - (kjsmain): - -2006-04-04 Eric Seidel - - Reviewed by mjs. - - * kjs/number_object.cpp: - (NumberProtoFunc::callAsFunction): remove trunc() to fix win32. - -2006-03-12 Maciej Stachowiak - - Reviewed by Darin. - - - fixed "toPrecision sometimes messes up the last digit on intel Macs" - http://bugs.webkit.org/show_bug.cgi?id=7748 - - * kjs/number_object.cpp: - (intPow10): Compute integer powers of 10 using exponentiation by squaring. - (NumberProtoFunc::callAsFunction): Use intPow10(n) in place of all pow(10.0, n), - plus a bit of refactoring. - -2006-04-03 Darin Adler - - - tweak config.h and Platform.h to try to get buildbot working - (making some small changes at the same time) - - * kjs/config.h: Removed now-unneeded HAVE_ICU. - * kxmlcore/Platform.h: Tweak how platform gets set up. Move all the - USE stuff to the end. - -2006-04-03 George Staikos - - Reviewed by Maciej. - - Fix Win32 build breakage from previous commit, remove unused forward. - -2006-04-03 George Staikos - - Reviewed by Maciej. - - Implement a unicode abstraction layer to make JavaScriptCore much more - easily ported to other platforms without having to take in libicu. Also - makes the unicode related code easier to understand. - -2006-04-03 Timothy Hatcher - - Reviewed by Adele. - - Fixes JavaScriptCore fails to compile for ppc64 - Other 64 bit build fixes. - - * kjs/collector.cpp: - (KJS::Collector::markOtherThreadConservatively): test for __DARWIN_UNIX03 and use __r1 - * kjs/dtoa.cpp: - (Bigint::): cast PRIVATE_mem to unsigned to prevent warning - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::getJavaVM): cast jniError to long to prevent format warning - (KJS::Bindings::getJNIEnv): cast jniError to long to prevent format warning - * bindings/runtime_root.cpp: - (KJS::Bindings::addNativeReference): cast CFDictionaryGetValue to unsigned long to prevent warning - (KJS::Bindings::removeNativeReference): cast CFDictionaryGetValue to unsigned long to prevent warning - -2006-03-31 Darin Adler - - Reviewed by Geoff. - - - API: WebScriptObject.h incorrectly reports that -isSelectorExcludedFromWebScript returns NO by default - - * bindings/objc/WebScriptObject.h: Fixed comment. - -2006-03-31 Eric Seidel - - Reviewed by mjs. - - A bit more code cleanup. - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertValueToNPVariant): - * bindings/objc/objc_runtime.mm: - (convertValueToObjcObject): - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - * kjs/function.cpp: - (KJS::GlobalFuncImp::callAsFunction): - * kjs/interpreter.cpp: - (KJS::ExecState::lexicalInterpreter): - * kjs/interpreter.h: - * kjs/operations.cpp: - (KJS::equal): - -2006-03-30 Eric Seidel - - Reviewed by anders. - - Small code-style update. - - * kjs/operations.cpp: - (KJS::isNaN): - (KJS::isInf): - (KJS::isPosInf): - (KJS::isNegInf): - (KJS::equal): - (KJS::strictEqual): - (KJS::relation): - (KJS::maxInt): - (KJS::minInt): - (KJS::add): - (KJS::mult): - -2006-03-31 Anders Carlsson - - Reviewed by Maciej. - - Make sure the GetterSetterImp objects are marked as well. - - * kjs/internal.cpp: - (KJS::GetterSetterImp::mark): - Call JSCell::mark(). - -2006-03-30 Eric Seidel - - Reviewed by ggaren. - - * kjs/nodes.h: Some various small style fixes. - -2006-03-30 Eric Seidel - - Reviewed by ggaren. - - Clean-up style issues in node.h, remove redundant initializations. - - * kjs/nodes.h: - (KJS::StatementNode::evaluate): - (KJS::ArrayNode::ArrayNode): - (KJS::ObjectLiteralNode::ObjectLiteralNode): - (KJS::ArgumentsNode::ArgumentsNode): - (KJS::NewExprNode::NewExprNode): - (KJS::CaseClauseNode::CaseClauseNode): - (KJS::FuncDeclNode::FuncDeclNode): - -2006-03-30 Tim Omernick - - Reviewed by Geoff. - - REGRESSION: LIVECONNECT: JavaScript type for Java Strings is function, - not object - - * bindings/runtime.h: - (KJS::Bindings::Instance::implementsCall): - New method. Returns false by default. Concrete subclasses can override this return true when - the bound object may be called as a function. - (KJS::Bindings::Instance::invokeDefaultMethod): - Since bound objects are no longer treated as functions by default, we can return jsUndefined() - here instead of in concrete subclasses that decide not to implement the default method - functionality. - - * bindings/runtime_object.cpp: - (RuntimeObjectImp::implementsCall): - Don't assume that the bound object is a function; instead, let the object instance decide whether - it is callable. - - * bindings/c/c_instance.h: - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::implementsCall): - The object is callable if its class has an invokeDefault function. - - * bindings/objc/objc_instance.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::implementsCall): - The object is callable if the ObjC instance responds to -invokeDefaultMethodWithArguments:. - - * bindings/jni/jni_instance.h: - * bindings/jni/jni_instance.cpp: - Moved bogus invokeDefaultMethod() to superclass. - -2006-03-29 Geoffrey Garen - - Reviewed by Darin. - - - JavaScriptCore side of fix for 8F36 - Regression: crash in malloc_consolidate if you use a .PAC file - - The crash was a result of threaded deallocation of thread-unsafe - objects. Pure JS objects are thread-safe because all JS execution - is synchronized through JSLock. However, JS objects that wrap WebCore - objects are thread-unsafe because JS and WebCore execution are not - synchronized. That unsafety comes into play when the collector - deallocates a JS object that wraps a WebCore object, thus causing the - WebCore object to be deallocated. - - The solution here is to have each JSCell know whether it is safe to - collect on a non-main thread, and to avoid collecting unsafe cells - when on a non-main thread. - - We don't have a way to test PAC files yet, so there's no test - attached to this patch. - - * kjs/collector.cpp: - (KJS::Collector::collect): - (1) Added the test "currentThreadIsMainThread || - imp->m_destructorIsThreadSafe". - - * kjs/protect.h: - (KJS::gcProtectNullTolerant): - (KJS::gcUnprotectNullTolerant): - * kjs/value.h: - (KJS::JSCell::JSCell): The bools here must be bitfields, otherwise - m_destructorIsThreadSafe becomes another whole word, ruining the - collector optimizations we've made based on the size of a JSObject. - * kxmlcore/FastMalloc.cpp: - (KXMLCore::currentThreadIsMainThread): - (KXMLCore::fastMallocRegisterThread): - * kxmlcore/FastMalloc.h: - -2006-03-28 Darin Adler - - Reviewed by Geoff. - - - change some code that resulted in init routines on Mac OS X -- if the framework has - init routines it will use memory and slow down applications that link with WebKit - even in cases where those applications don't use WebKit - - * kjs/date_object.cpp: Changed constants that were derived by multiplying other constants - to use immediate numbers instead. Apparently, double constant expressions of the type we - had here are evaluated at load time. - - * kjs/list.cpp: Can't use OwnArrayPtr in ListImp because of the global instances of - ListImp, so go back to using a plain old pointer. - (KJS::List::List): Set overflow to 0 when initializing ListImp. - (KJS::List::release): Replace a clear call with a delete and explicit set to 0. - (KJS::List::append): Use raw pointers, and do a delete [] instead of finessing it with - a swap of OwnArrayPtr. - (KJS::List::copyFrom): Remove now-unneeded get(). - (KJS::List::copyTail): Ditto. - - * kjs/ustring.cpp: Changed UString::Rep::empty initializer a bit so that it doesn't get - a static initializer routine. Had to get rid of one level of constant to get the compiler - to understand it could initialize without any code. - - - added a build step that checks for init routines - - * JavaScriptCore.xcodeproj/project.pbxproj: Deleted now-unused custom build rule that - was replaced by the generate-derived-sources script a while back. Added a custom build - phase that invokes the check-for-global-initializers script. - -2006-03-28 Timothy Hatcher - - Reviewed by Eric. - - fixes Unable to include Security(public) and WebKit(private) headers - - * bindings/npapi.h: added #defines after the #ifndefs - -2006-03-27 Maciej Stachowiak - - Reviewed by Anders. - - - fixed REGRESSION: Safari crashes at to display http://www.lgphilips-lcd.com/ - - * kjs/nodes.cpp: - (Node::deref): take into account the case where the extra refcount table was never created - -2006-03-23 David Carson - - Reviewed by Darin. - - - JSObject in LiveConnect not working. - http://bugs.webkit.org/show_bug.cgi?id=7917 - - * bindings/jni_jsobject.cpp: - (JavaJSObject::convertJObjectToValue): Was trying to retrieve the native pointer from the wrong base - class, and the GetFieldID was using the wrong signature. - -2006-03-23 Darin Adler - - Reviewed by Maciej. - - - fix buildbot - - * JavaScriptCore.xcodeproj/project.pbxproj: Change target name to JavaScriptCore (it was "include"!?). - Also add -Y 3 option for linker. - -2006-03-23 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=7726 - REGRESSION: orbitz calendar fails (JavaScript function serialization/parsing) - - * kjs/object.h: Take function name, as well as source URL and line number, when - using the special overloaded construct for making functions. - * kjs/object.cpp: (KJS::JSObject::construct): Ditto. - * kjs/function_object.h: Ditto. - * kjs/function_object.cpp: (FunctionObjectImp::construct): Pass a name when - constructing the function rather than null. Use "anonymous" when making a - function using the default function constructor. - - * kjs/nodes2string.cpp: (FuncDeclNode::streamTo): Put a line break just before - a function declaration. - - - unrelated fix - - * kxmlcore/HashMapPtrSpec.h: Add missing needed friend declaration. - -2006-03-23 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=7805 - LEAK: method name leaks in KJS::Bindings::CInstance::invokeMethod - - * bindings/c/c_utility.h: Remove NPN_UTF16FromString declaration (not implemented). - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertValueToNPVariant): Use DOUBLE_TO_NPVARIANT, - BOOLEAN_TO_NPVARIANT, VOID_TO_NPVARIANT, NULL_TO_NPVARIANT, and - OBJECT_TO_NPVARIANT. In the case of OBJECT, call _NPN_RetainObject in - one case and remove a _NPN_ReleaseObject in another because this - should return a retained value. - (KJS::Bindings::convertNPVariantToValue): Use NPVARIANT_TO_BOOLEAN, - NPVARIANT_TO_INT32, and NPVARIANT_TO_DOUBLE. - - * bindings/c/c_runtime.h: Removed implementations of CMethod::name and - CField::name that called _NPN_UTF8FromIdentifier and hence leaked. - * bindings/c/c_runtime.cpp: - (KJS::Bindings::CMethod::name): Added. Returns the string from inside the - method object. - (KJS::Bindings::CField::name): Added. Returns the string from inside the - field object. - (KJS::Bindings::CField::valueFromInstance): Added call to _NPN_ReleaseVariantValue - on the result of getProperty after using it to fix a storage leak. - (KJS::Bindings::CField::setValueToInstance): Added call to _NPN_ReleaseVariantValue - after pasing a value to setProperty now that the conversion function does a retain. - - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::invokeMethod): Changed to use Vector for a local - stack buffer. Removed special case for NPVARIANT_IS_VOID because the - convertNPVariantToValue function handles that properly. - (KJS::Bindings::CInstance::invokeDefaultMethod): Ditto. - - * bindings/NP_jsobject.h: Formatting changes only. - * bindings/NP_jsobject.cpp: - (jsDeallocate): Changed parameter type so we don't need a function cast. - (_NPN_InvokeDefault): Use VOID_TO_NPVARIANT. - (_NPN_Invoke): Use NULL_TO_NPVARIANT and VOID_TO_NPVARIANT. - (_NPN_Evaluate): Use VOID_TO_NPVARIANT. - (_NPN_GetProperty): Use NULL_TO_NPVARIANT and VOID_TO_NPVARIANT. - - * bindings/c/c_class.cpp: Formatting changes only. - * bindings/c/c_class.h: Formatting changes only. - - * bindings/npruntime_priv.h: Removed obsolete and now-unused functions: - NPN_VariantIsVoid, NPN_VariantIsNull, NPN_VariantIsUndefined, - NPN_VariantIsBool, NPN_VariantIsInt32, NPN_VariantIsDouble, - NPN_VariantIsString, NPN_VariantIsObject, NPN_VariantToBool, - NPN_VariantToInt32, NPN_VariantToDouble, NPN_VariantToString, - NPN_VariantToStringCopy, NPN_VariantToObject, NPN_InitializeVariantAsVoid, - NPN_InitializeVariantAsNull, NPN_InitializeVariantAsUndefined, - NPN_InitializeVariantWithBool, NPN_InitializeVariantWithInt32, - NPN_InitializeVariantWithDouble, NPN_InitializeVariantWithString, - NPN_InitializeVariantWithObject, and NPN_InitializeVariantWithVariant. - * bindings/npruntime.cpp: - (getIntIdentifierDictionary): Don't bother creating custom callbacks for the - integer dictionary since the default behavior is fine for integers. - -2006-03-23 Mark Rowe - - Reviewed and landed by Maciej. - - - WebKit no longer builds with bison 2.1 - http://bugs.webkit.org/show_bug.cgi?id=7923 - - * generate-derived-sources: Handle generated header named either grammar.cpp.h - or grammar.hpp. - -2006-03-22 Maciej Stachowiak - - - fix the build - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-03-21 Maciej Stachowiak - - * kjs/generate-derived-sources: Set executable property. - -2006-03-21 Maciej Stachowiak - - Reviewed by Darin. - - Ensure that generated source dependencies are handled properly, as follows: - - - Made an external script that generates the sources into a - DerivedSources dir in the build products directory. - - Added a new build target that builds all the generated sources - if needed. Sadly it has to be a target, not a phase for Xcode to notice changes. - - Added the DerivedSources dir in question to the include path. - - Added the new DerivedSources dir and its contents to the project as build-relative. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/generate-derived-sources: Added. Based on the windows version - maybe someday they - can share more. - -2006-03-11 Maciej Stachowiak - - Reviewed by Darin. - - - fixed "charAt layout test fails on intel macs; some NaNs are printed as -NaN" - http://bugs.webkit.org/show_bug.cgi?id=7745 - - * kjs/ustring.cpp: - (KJS::UString::from): Use "NaN" for all NaN values, regardless of sign. - -2006-03-16 Maciej Stachowiak - - Reviewed by Darin. - - - tweaks to my change to redo KJS::Node refcounting - - * kjs/nodes.cpp: - (Node::ref): - (Node::deref): - (Node::refcount): - (Node::clearNewNodes): - * kjs/nodes.h: - -2006-03-16 Darin Adler - - Reviewed by Maciej. - - - fixed Vector so that you can pass a reference to something in the vector - to the append or insert functions - - * kxmlcore/Vector.h: - (KXMLCore::Vector::expandCapacity): Added new overloads that take a pointer to adjust - and return the adjusted value of the pointer. - (KXMLCore::Vector::append): Pass a pointer when expanding the vector, and use it when - adding the new element. Makes the case where the element moves when the vector - is expanded work. - (KXMLCore::Vector::insert): Ditto. - -2006-03-15 Eric Seidel - - Reviewed by adele. - - Build fix. - - * kjs/date_object.cpp: - (KJS::DateProtoFunc::callAsFunction): use size() not "len()" - -2006-03-15 Eric Seidel - - Reviewed by mjs. - - Fix CString copy constructor, fixes Date.parse("") on Win32. - - * kjs/date_object.cpp: - (KJS::DateProtoFunc::callAsFunction): - * kjs/ustring.cpp: - (KJS::CString::CString): - (KJS::CString::operator=): - -2006-03-13 Maciej Stachowiak - - Reviewed by Anders. - - - KJS::Node and KJS::StatementNode are bigger than they need to be - http://bugs.webkit.org/show_bug.cgi?id=7775 - - The memory usage of Node was reduced by 2 machine words per node: - - - sourceURL was removed and only kept on FunctionBodyNode. The - source URL can only be distinct per function or top-level program node, - and you always have one. - - - refcount was removed and kept in a separate hashtable when - greater than 1. newNodes set represents floating nodes with - refcount of 0. This helps because almost all nodes have a refcount of 1 - for almost all of their lifetime. - - * bindings/runtime_method.cpp: - (RuntimeMethod::RuntimeMethod): Pass null body, added FIXME. - * kjs/Parser.cpp: - (KJS::clearNewNodes): New nodes are tracked in nodes.cpp now, but still clear - them at the appropriate time. - * kjs/context.h: - (KJS::ContextImp::currentBody): added; used to retrieve source URL and sid - for current code. - (KJS::ContextImp::pushIteration): moved here from LabelStack - (KJS::ContextImp::popIteration): ditto - (KJS::ContextImp::inIteration): ditto - (KJS::ContextImp::pushSwitch): ditto - (KJS::ContextImp::popSwitch): ditto - (KJS::ContextImp::inSwitch): ditto - * kjs/function.cpp: - (KJS::FunctionImp::FunctionImp): Add FunctionBodyNode* parameter. - (KJS::FunctionImp::callAsFunction): Pass body to ContextImp. - (KJS::FunctionImp::argumentsGetter): _context renamed to m_context. - (KJS::DeclaredFunctionImp::DeclaredFunctionImp): Pass body to superclass - constructor. - (KJS::GlobalFuncImp::callAsFunction): Pass progNode as body for ContextImp in - eval. - * kjs/function.h: Move body field from DeclaredFunctionImp to - FunctionImp. - * kjs/grammar.y: Change DBG; statements no longer have a sourceid. - * kjs/internal.cpp: - (KJS::ContextImp::ContextImp): Initialize new m_currentBody, m_iterationDepth - and m_switchDepth data members. New FunctionBodyNode* parameter - the - function body provides source URL and SourceId. - (KJS::InterpreterImp::mark): Use exception() function, not _exception directly. - (KJS::InterpreterImp::evaluate): Pass progNode to ContextImp constructor - to use as the body. - * kjs/internal.h: - (KJS::LabelStack::LabelStack): Remove iteration depth and switch depth; - statement label stacks don't need these and it bloats their size. Put them - in the ContextImp instead. - * kjs/interpreter.cpp: - (KJS::ExecState::lexicalInterpreter): Renamed _context to m_context. - * kjs/interpreter.h: - (KJS::ExecState::dynamicInterpreter): Renamed _context to m_context. - (KJS::ExecState::context): ditto - (KJS::ExecState::setException): Renamed _exception to m_exception - (KJS::ExecState::clearException): ditto - (KJS::ExecState::exception): ditto - (KJS::ExecState::hadException): ditto - (KJS::ExecState::ExecState): ditto both above renames - * kjs/nodes.cpp: - (Node::Node): Removed initialization of line, source URL and refcount. Add to - local newNodes set instead of involving parser. - (Node::ref): Instead of managing refcount directly, story refcount over 1 in a - HashCountedSet, and keep a separate HashSet of "floating" nodes with refcount - 0. - (Node::deref): ditto - (Node::refcount): ditto - (Node::clearNewNodes): Destroy anything left in the new nodes set. - (currentSourceId): Inline helper to get sourceId from function body via context. - (currentSourceURL): ditto for sourceURL. - (Node::createErrorCompletion): use new helper - (Node::throwError): ditto - (Node::setExceptionDetailsIfNeeded): ditto - (StatementNode::StatementNode): remove initialization of l0 and sid, rename - l1 to m_lastLine. - (StatementNode::setLoc): Set own m_lastLine and Node's m_line. - (StatementNode::hitStatement): Get sid, first line, last line in the proper new ways. - (StatListNode::StatListNode): updated for setLoc changes - (BlockNode::BlockNode): ditto - (DoWhileNode::execute): excpect iteraton counts on ContextImp, not LabelStack - (WhileNode::execute): ditto - (ForNode::execute): ditto - (ForInNode::execute): ditto - (ContinueNode::execute): excpect inIteration on ContextImp, not LabelStack - (BreakNode::execute): excpect inIteration and inSwitch on ContextImp, not LabelStack - (SwitchNode::execute): expect switch counts on ContextImp, not LabelStack - (FunctionBodyNode::FunctionBodyNode): update for new setLoc - (FunctionBodyNode::processFuncDecl): reindent - (SourceElementsNode::SourceElementsNode): update for new setLoc - * kjs/nodes.h: - (KJS::Node::lineNo): Renamed _line to m_line - (KJS::StatementNode::firstLine): Use lineNo() - (KJS::StatementNode::lastLine): Renamed l1 to m_lastLine - (KJS::FunctionBodyNode::sourceId): added - (KJS::FunctionBodyNode::sourceURL): added - * kjs/testkjs.cpp: - -2006-03-14 Geoffrey Garen - - - Fixed string sort puts "closed" before - "close" - - Reviewed by Eric. - - * kjs/ustring.cpp: - (KJS::compare): Inverted a < in order to treat the longer string as > - the shorter string. - -2006-03-12 Alexey Proskuryakov - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=7708 - REGRESSION: Flash callback to JavaScript function not working. - - Test: plugins/invoke.html - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertUTF8ToUTF16): Return a correct string length. - -2006-03-08 Eric Seidel - - Reviewed by darin. - - Partially fix JS on win32 by fixing hash table generation. - - * kjs/create_hash_table: limit << results to 32 bits. - * kjs/testkjs.cpp: - (TestFunctionImp::callAsFunction): - -2006-03-07 Darin Adler - - * kxmlcore/Vector.h: Quick fix to try to get Windows compiling again. - -2006-03-07 Darin Adler - - Reviewed by Anders. - - - fix http://bugs.webkit.org/show_bug.cgi?id=7655 - unwanted output while running layout tests - - * kjs/lexer.cpp: (Lexer::lex): Turn off the "yylex: ERROR" message. - * kjs/regexp.cpp: (KJS::RegExp::RegExp): Remove the code to log errors from PCRE - to standard output. I think we should arrange for the error text to be in JavaScript - exceptions instead at some point. - * kxmlcore/Vector.h: Add a check for overflow so that we'll abort if we pass a - too-large size rather than allocating a buffer smaller than requested. - -2006-03-06 David Carson - - Reviewed by Darin, landed by ap. - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=7582 - c_utility.cpp contains CFString OS X platform-dependent code; should use ICU - - Tested with test case from: - http://bugs.webkit.org/show_bug.cgi?id=5163 - - * bindings/c_utility.cpp - (convertUTF8ToUTF16): Changed to using Unicode converter from ICU, and manual Latin-1 conversion. - * icu/unicode/ucnv.h: Copied from WebCore. - * icu/unicode/ucnv_err.h: Ditto. - * icu/unicode/uenum.h: Ditto. - -2006-03-05 Darin Adler - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Updated. - -2006-03-06 Mitz Pettel - - Fix suggested by Alexey Proskuryakov , reviewed by Maciej and Hyatt. - - - fix http://bugs.webkit.org/show_bug.cgi?id=7601 - REGRESSION (r13089): Reproducible crash dereferencing a deallocated element on google image search - - * kxmlcore/Platform.h: Corrected the define to enable USE(MULTIPLE_THREADS) on Mac OS X. - -2006-03-05 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=7616 - get all references to KJS::Node out of internal.h - - * JavaScriptCore.xcodeproj/project.pbxproj: Updated for file changes. - - * kjs/Parser.cpp: Added. - * kjs/Parser.h: Added. - - * kjs/internal.cpp: Removed the Parser class. - * kjs/internal.h: Ditto. Also removed unnecessary declarations of classes - not used in this header. - - * kjs/nodes.h: Added an include of "Parser.h". - * kjs/function.h: Added a declaration of FunctionBodyNode. - -2006-03-05 Geoffrey Garen - - Reviewed by Maciej. - - - JSC support for the fix for JavaScript - enumeration of HTML element properties skips DOM node properties - - * kjs/lookup.h: - (1) Added the KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE macro. The - class definiton macro needs to know about the prototype's prototype so - that the class constructor properly sets it. - (2) Removed the KJS_IMPLEMENT_PROTOTYPE_WITH_PARENT macro. The class - implementation macro does not need to know about the prototype's - prototype, since getOwnPropertySlot should only look in the current - object's property map, and not its prototype's. - -2006-03-05 Andrew Wellington - - Reviewed by Eric, landed by ap. - - - Remove unused breakpoint bool from StatementNodes. No test provided as - there is no functionality change. - - * kjs/nodes.cpp: - (StatementNode::StatementNode): - * kjs/nodes.h: - -2006-03-03 Geoffrey Garen - - Reviewed by Darin. - - - Fixed REGRESSION (TOT): Crash occurs at - http://maps.google.com/?output=html ( KJS::Identifier::add(KJS::UString::Rep*) - - This regression was caused by my fix for 4448098. I failed to account for the - deleted entry sentinel in the mehtod that saves the contents of a property map to - the back/forward cache. - - Manual test in WebCore/manual-tests/property-map-save-crash.html - - * kjs/property_map.cpp: - (KJS::deletedSentinel): Use 1 instead of -1 to facilitate an easy bit mask - (KJS::isValid): New function: checks if a key is null or the deleted sentinel - (KJS::PropertyMap::~PropertyMap): Fixed up the branch logic here for readability - and a slight performance win - (KJS::PropertyMap::clear): - (KJS::PropertyMap::rehash): - (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): - (KJS::PropertyMap::save): Check keys with isValid() - -2006-03-02 Maciej Stachowiak - - - now fix mac build again - - * kjs/identifier.cpp: - -2006-03-02 Maciej Stachowiak - - Rubber stamped by Anders and Eric. - - - add fpconst.cpp to win32 build, it is now needed - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * kjs/fpconst.cpp: - -2006-03-02 Maciej Stachowiak - - Reviewed by Eric. - - - fix windows build, broken by my last patch - - * kjs/JSImmediate.cpp: - * kjs/identifier.cpp: - * kxmlcore/FastMalloc.cpp: - * kxmlcore/Platform.h: - -2006-03-01 Maciej Stachowiak - - Reviewed by Darin. - - - Set up new prototype macros and avoid using #if without defined() in JSC - - Added new PLATFORM macros and related, to make sure #if's all check if relevant macros - are defined, and to separate core OS-level dependencies from operating environment - dependencies so you can, e.g., build KDE on Mac or Windows. - - * kxmlcore/Platform.h: Added. - - - deploy them everywhere in JavaScriptCore - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::convertValueToJValue): - * bindings/objc/WebScriptObject.mm: - * bindings/objc/objc_instance.mm: - (ObjcInstance::end): - * bindings/softlinking.h: - * bindings/testbindings.mm: - (main): - * kjs/JSLock.cpp: - * kjs/collector.cpp: - (KJS::Collector::markCurrentThreadConservatively): - (KJS::Collector::markOtherThreadConservatively): - (KJS::Collector::markStackObjectsConservatively): - * kjs/config.h: - * kjs/date_object.cpp: - (gmtoffset): - (KJS::formatTime): - (KJS::DateProtoFunc::callAsFunction): - (KJS::DateObjectImp::construct): - (KJS::makeTime): - * kjs/dtoa.cpp: - * kjs/fpconst.cpp: - (KJS::sizeof): - (KJS::): - * kjs/grammar.y: - * kjs/identifier.cpp: - * kjs/internal.cpp: - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - (KJS::Interpreter::createLanguageInstanceForValue): - * kjs/interpreter.h: - * kjs/lookup.cpp: - * kjs/lookup.h: - * kjs/math_object.cpp: - * kjs/object.cpp: - * kjs/object.h: - * kjs/operations.cpp: - (KJS::isNaN): - (KJS::isInf): - (KJS::isPosInf): - (KJS::isNegInf): - * kjs/operations.h: - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): - (KJS::RegExp::~RegExp): - (KJS::RegExp::match): - * kjs/regexp.h: - * kjs/testkjs.cpp: - (StopWatch::start): - (StopWatch::stop): - (StopWatch::getElapsedMS): - * kjs/ustring.cpp: - * kjs/ustring.h: - * kxmlcore/AlwaysInline.h: - * kxmlcore/Assertions.cpp: - * kxmlcore/Assertions.h: - * kxmlcore/FastMalloc.cpp: - (KXMLCore::): - * kxmlcore/FastMalloc.h: - * kxmlcore/FastMallocInternal.h: - * kxmlcore/HashTable.h: - * kxmlcore/TCPageMap.h: - * kxmlcore/TCSpinLock.h: - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SlowLock): - * kxmlcore/TCSystemAlloc.cpp: - (TCMalloc_SystemAlloc): - * os-win32/stdint.h: - -2006-02-28 Geoffrey Garen - - Reviewed by Darin. - - - Fixed Switch PropertyMap deleted entry - placeholder to -1 from UString::Rep::null - - This turned out to be only a small speedup (.12%). That's within the - margin of error for super accurate JS iBench, but Shark confirms the - same, so I think it's worth landing. - - FYI, I also confirmed that the single entry optimization in - PropertyMap is a 3.2% speedup. - - * kjs/property_map.cpp: - (KJS::PropertyMap::~PropertyMap): - (KJS::PropertyMap::clear): - (KJS::PropertyMap::put): - (KJS::PropertyMap::insert): - (KJS::PropertyMap::rehash): - (KJS::PropertyMap::remove): - (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): - (KJS::PropertyMap::checkConsistency): - * kjs/property_map.h: - (KJS::PropertyMap::deletedSentinel): - -2006-02-27 Eric Seidel - - Rubber-stamped by darin. - - Remove fpconst.cpp, unused on win32 and the cause of linker warnings. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2006-02-27 Eric Seidel - - Reviewed by mjs. - - Fix Assertions.cpp to compile on win32. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * kxmlcore/Assertions.cpp: - -2006-02-27 Eric Seidel - - Reviewed by mjs. - - Made Assertions.cpp platform independent. - Moved mac-specific logging logic up into WebCore. - http://bugs.webkit.org/show_bug.cgi?id=7503 - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kxmlcore/Assertions.cpp: Added. - * kxmlcore/Assertions.h: - * kxmlcore/Assertions.mm: Removed. - -2006-02-27 Darin Adler - - - fixed Mac Debug build, there was an unused parameter - - * kxmlcore/FastMalloc.cpp: (KXMLCore::fastMallocRegisterThread): - Remove parameter name. - - * kjs/debugger.h: Fixed comment. - -2006-02-27 Eric Seidel - - Reviewed by darin. - - * kxmlcore/Vector.h: - (KXMLCore::deleteAllValues): fix unused variable warning - -2006-02-21 Maciej Stachowiak - - Reviewed by Darin. - - - Turn off -Wno-unused-param for JavaScriptCore and get rid of unused params - http://bugs.webkit.org/show_bug.cgi?id=7384 - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/NP_jsobject.cpp: - (jsAllocate): - (_NPN_InvokeDefault): - (_NPN_Evaluate): - (_NPN_GetProperty): - (_NPN_SetProperty): - (_NPN_RemoveProperty): - (_NPN_HasProperty): - (_NPN_HasMethod): - * bindings/c/c_class.h: - (KJS::Bindings::CClass::constructorAt): - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertNPVariantToValue): - * bindings/jni/jni_class.cpp: - (JavaClass::methodsNamed): - (JavaClass::fieldNamed): - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeDefaultMethod): - * bindings/jni/jni_jsobject.cpp: - * bindings/jni/jni_objc.mm: - (-[NSObject KJS::Bindings::]): - * bindings/objc/WebScriptObject.mm: - (+[WebUndefined allocWithZone:]): - (-[WebUndefined initWithCoder:]): - (-[WebUndefined encodeWithCoder:]): - (-[WebUndefined copyWithZone:]): - * bindings/objc/objc_class.h: - (KJS::Bindings::ObjcClass::constructorAt): - * bindings/objc/objc_class.mm: - (KJS::Bindings::ObjcClass::methodsNamed): - (KJS::Bindings::ObjcClass::fallbackObject): - * bindings/objc/objc_instance.mm: - (ObjcInstance::getValueOfUndefinedField): - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::getOwnPropertySlot): - (ObjcFallbackObjectImp::put): - (ObjcFallbackObjectImp::canPut): - (ObjcFallbackObjectImp::deleteProperty): - (ObjcFallbackObjectImp::toBoolean): - * bindings/runtime.cpp: - (KJS::Bindings::Instance::createLanguageInstanceForValue): - * bindings/runtime.h: - (KJS::Bindings::Instance::getValueOfUndefinedField): - (KJS::Bindings::Instance::setValueOfUndefinedField): - * bindings/runtime_array.cpp: - (RuntimeArray::lengthGetter): - (RuntimeArray::indexGetter): - (RuntimeArray::put): - (RuntimeArray::deleteProperty): - * bindings/runtime_method.cpp: - (RuntimeMethod::lengthGetter): - (RuntimeMethod::execute): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::fallbackObjectGetter): - (RuntimeObjectImp::fieldGetter): - (RuntimeObjectImp::methodGetter): - (RuntimeObjectImp::put): - (RuntimeObjectImp::canPut): - (RuntimeObjectImp::deleteProperty): - (RuntimeObjectImp::defaultValue): - (RuntimeObjectImp::callAsFunction): - * bindings/runtime_root.cpp: - (performJavaScriptAccess): - * kjs/array_object.cpp: - (ArrayInstance::lengthGetter): - (ArrayInstance::getOwnPropertySlot): - (ArrayPrototype::ArrayPrototype): - (ArrayPrototype::getOwnPropertySlot): - * kjs/bool_object.cpp: - (BooleanObjectImp::BooleanObjectImp): - * kjs/date_object.cpp: - (KJS::DateObjectFuncImp::DateObjectFuncImp): - (KJS::DateObjectFuncImp::callAsFunction): - * kjs/error_object.cpp: - (ErrorObjectImp::ErrorObjectImp): - (NativeErrorPrototype::NativeErrorPrototype): - (NativeErrorImp::NativeErrorImp): - * kjs/function.cpp: - (KJS::FunctionImp::argumentsGetter): - (KJS::FunctionImp::lengthGetter): - (KJS::Arguments::mappedIndexGetter): - (KJS::ActivationImp::argumentsGetter): - (KJS::ActivationImp::put): - * kjs/function_object.cpp: - (FunctionObjectImp::FunctionObjectImp): - * kjs/internal.cpp: - (KJS::GetterSetterImp::toPrimitive): - (KJS::GetterSetterImp::toBoolean): - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - * kjs/interpreter.h: - (KJS::Interpreter::isGlobalObject): - (KJS::Interpreter::interpreterForGlobalObject): - (KJS::Interpreter::isSafeScript): - * kjs/lexer.cpp: - (Lexer::makeIdentifier): - (Lexer::makeUString): - * kjs/lookup.h: - (KJS::staticFunctionGetter): - (KJS::staticValueGetter): - * kjs/nodes.cpp: - (StatementNode::processFuncDecl): - (PropertyNode::evaluate): - (PropertyNameNode::evaluate): - * kjs/number_object.cpp: - (NumberObjectImp::NumberObjectImp): - (NumberObjectImp::getOwnPropertySlot): - * kjs/object.cpp: - (KJS::JSObject::defineGetter): - (KJS::JSObject::defineSetter): - (KJS::JSObject::hasInstance): - (KJS::JSObject::propertyIsEnumerable): - * kjs/object_object.cpp: - (ObjectObjectImp::ObjectObjectImp): - * kjs/property_slot.cpp: - (KJS::PropertySlot::undefinedGetter): - (KJS::PropertySlot::functionGetter): - * kjs/reference.cpp: - (KJS::Reference::getPropertyName): - * kjs/reference_list.cpp: - (ReferenceListIterator::operator++): - * kjs/regexp_object.cpp: - (RegExpObjectImp::RegExpObjectImp): - (RegExpObjectImp::getValueProperty): - (RegExpObjectImp::putValueProperty): - * kjs/string_object.cpp: - (StringInstance::lengthGetter): - (StringInstance::indexGetter): - (StringPrototype::StringPrototype): - * kxmlcore/Assertions.mm: - * kxmlcore/FastMalloc.cpp: - (KXMLCore::TCMalloc_PageHeap::CheckList): - * kxmlcore/HashTable.h: - (KXMLCore::HashTableConstIterator::checkValidity): - (KXMLCore::IdentityHashTranslator::translate): - * pcre/pcre_get.c: - (pcre_get_stringnumber): - -2006-02-23 Darin Adler - - - try to fix buildbot failure - - * bindings/c/c_utility.cpp: Touch this file, which seems to not have been - recompiled after additional inlining was introduced (Xcode bug?). - -2006-02-23 Geoffrey Garen - - Reviewed by Darin, Maciej. - - - Inline some functions suggested by Shark. 2.9% speedup on super - accurate JS iBench. - - http://bugs.webkit.org/show_bug.cgi?id=7411 - - - * kjs/nodes.h: - (KJS::ArgumentsNode::evaluateList): - * kjs/object.cpp: - * kjs/object.h: - (KJS::ScopeChain::release): - (KJS::JSObject::toPrimitive): - * kjs/scope_chain.cpp: - * kjs/ustring.cpp: - * kjs/ustring.h: - (KJS::UString::toArrayIndex): - * kjs/value.cpp: - * kjs/value.h: - (KJS::JSValue::toObject): - * kxmlcore/FastMalloc.cpp: - (KXMLCore::TCMalloc_ThreadCache_FreeList::Push): - (KXMLCore::TCMalloc_ThreadCache_FreeList::Pop): - -2006-02-21 Eric Seidel - - Added *.user to ignore list. - -2006-02-21 Eric Seidel - - Reviewed by ggaren. - - Add grammarWrapper.cpp to work around visual studio bug plaguing buildbot. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/grammarWrapper.cpp: Added. - -2006-02-21 Eric Seidel - - Reviewed by ggaren. - - * kjs/testkjs.cpp: #if out timeval code on win32 - -2006-02-21 Michael Emmel - - Reviewed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=7397 - TCPageMap.h would not compile for me because string.h was missing - - * kxmlcore/TCPageMap.h: Added include. - -2006-02-21 Darin Adler - - Reviewed by John Sullivan. - - - http://bugs.webkit.org/show_bug.cgi?id=7404 - remove a bunch of extra implementsCall overrides - - * JavaScriptCore.xcodeproj/project.pbxproj: Sorted files. - - * kjs/internal.h: Made InternalFunctionImp::callAsFunction pure virtual so that - we'll get a compile error if some derived class neglects to implement it. - - * kjs/function.cpp: (KJS::FunctionImp::FunctionImp): Remove unneeded initialization - of param, which is an OwnPtr so it gets initialized by default. - - * bindings/runtime_method.cpp: - * bindings/runtime_method.h: - * kjs/array_object.cpp: - * kjs/array_object.h: - * kjs/bool_object.cpp: - * kjs/bool_object.h: - * kjs/date_object.cpp: - * kjs/date_object.h: - * kjs/error_object.cpp: - * kjs/error_object.h: - * kjs/function.cpp: - * kjs/function.h: - * kjs/function_object.cpp: - * kjs/function_object.h: - * kjs/math_object.cpp: - * kjs/math_object.h: - * kjs/number_object.cpp: - * kjs/number_object.h: - * kjs/object_object.cpp: - * kjs/object_object.h: - * kjs/regexp_object.cpp: - * kjs/regexp_object.h: - * kjs/string_object.cpp: - * kjs/string_object.h: - Removed many rendundant implementations of implementsCall from subclasses of - InternalFunctionImp. - -2006-02-21 Darin Adler - - - fixed build - - * kjs/internal.cpp: (KJS::InternalFunctionImp::implementsCall): - Oops, fixed name. - -2006-02-21 Darin Adler - - Change suggested by Mitz. - - - http://bugs.webkit.org/show_bug.cgi?id=7402 - REGRESSION: Methods do not execute - - * kjs/internal.h: Add implementsHasCall to InternalFunctionImp. - * kjs/internal.cpp: (KJS::InternalFunctionImp::implementsHasCall): - Return true. All the classes derived from InternalFunctionImp need - to return true from this -- later we can remove all the extra - implementations too. - -2006-02-21 Maciej Stachowiak - - - fix build breakage caused by last-minute change to my patch - - * kjs/lookup.h: - -2006-02-20 Maciej Stachowiak - - Reviewed by Geoff and Darin. - - Patch from Maks Orlovich, based on work by David Faure, hand-applied and - significantly reworked by me. - - - Patch: give internal function names (KJS merge) - http://bugs.webkit.org/show_bug.cgi?id=6279 - - * tests/mozilla/expected.html: Updated for newly fixed test. - - * kjs/array_object.cpp: - (ArrayProtoFunc::ArrayProtoFunc): - * kjs/array_object.h: - * kjs/bool_object.cpp: - (BooleanPrototype::BooleanPrototype): - (BooleanProtoFunc::BooleanProtoFunc): - * kjs/bool_object.h: - * kjs/date_object.cpp: - (KJS::DateProtoFunc::DateProtoFunc): - (KJS::DateObjectImp::DateObjectImp): - (KJS::DateObjectFuncImp::DateObjectFuncImp): - * kjs/error_object.cpp: - (ErrorPrototype::ErrorPrototype): - (ErrorProtoFunc::ErrorProtoFunc): - * kjs/error_object.h: - * kjs/function.cpp: - (KJS::FunctionImp::FunctionImp): - (KJS::GlobalFuncImp::GlobalFuncImp): - * kjs/function.h: - * kjs/function_object.cpp: - (FunctionPrototype::FunctionPrototype): - (FunctionProtoFunc::FunctionProtoFunc): - (FunctionProtoFunc::callAsFunction): - * kjs/function_object.h: - * kjs/internal.cpp: - (KJS::InterpreterImp::initGlobalObject): - (KJS::InternalFunctionImp::InternalFunctionImp): - * kjs/internal.h: - (KJS::InternalFunctionImp::functionName): - * kjs/lookup.h: - (KJS::staticFunctionGetter): - (KJS::HashEntryFunction::HashEntryFunction): - (KJS::HashEntryFunction::implementsCall): - (KJS::HashEntryFunction::toBoolean): - (KJS::HashEntryFunction::implementsHasInstance): - (KJS::HashEntryFunction::hasInstance): - * kjs/math_object.cpp: - (MathFuncImp::MathFuncImp): - * kjs/math_object.h: - * kjs/number_object.cpp: - (NumberPrototype::NumberPrototype): - (NumberProtoFunc::NumberProtoFunc): - * kjs/number_object.h: - * kjs/object.cpp: - (KJS::JSObject::putDirectFunction): - (KJS::Error::create): - * kjs/object.h: - * kjs/object_object.cpp: - (ObjectPrototype::ObjectPrototype): - (ObjectProtoFunc::ObjectProtoFunc): - * kjs/object_object.h: - * kjs/regexp_object.cpp: - (RegExpPrototype::RegExpPrototype): - (RegExpProtoFunc::RegExpProtoFunc): - * kjs/regexp_object.h: - * kjs/string_object.cpp: - (StringProtoFunc::StringProtoFunc): - (StringObjectImp::StringObjectImp): - (StringObjectFuncImp::StringObjectFuncImp): - * kjs/string_object.h: - -2006-02-20 Geoffrey Garen - - Reviewed by Darin, with help from Eric, Maciej. - - - More changes to support super-accurate JS iBench. Doesn't work on - Windows. (Doesn't break Windows, either.) I've filed - [http://bugs.webkit.org/show_bug.cgi?id=7399] about that. - - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): Print line numbers with exception output - * kjs/testkjs.cpp: Changed " *" to "* " because Eric says that's the - way we roll with .cpp files. - (StopWatch::StopWatch): New class. Provides microsecond-accurate - timings. - (StopWatch::~StopWatch): - (StopWatch::start): - (StopWatch::stop): - (StopWatch::getElapsedMS): - (TestFunctionImp::callAsFunction): Added missing return statement. - Fixed up "run" to use refactored helper functions. Removed bogus - return statement from "quit" case. Made "print" output to stdout - instead of stderr because that makes more sense, and PERL handles - stdout better. - (main): Factored out KXMLCore unit tests. Removed custom exception - printing code because the interpreter prints exceptions for you. Added - a "delete" call for the GlobalImp we allocate. - (testIsInteger): New function, result of refacotring. - (createStringWithContentsOfFile): New function, result of refactoring. - Renamed "code" to "buffer" to match factored-out-ness. - -2006-02-20 Eric Seidel - - Reviewed by hyatt. - - Fix "Copy ICU DLLs..." phase. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: - -2006-02-19 Darin Adler - - - renamed ERROR to LOG_ERROR to fix build - presumably Maciej had this change and forgot to land it - - * kjs/collector.cpp: Removed now-unneeded #undef ERROR. - * kxmlcore/Assertions.h: Renamed ERROR to LOG_ERROR. - * kxmlcore/FastMalloc.cpp: Changed MESSAGE macro to use LOG_ERROR. - -2006-02-18 Mitz Pettel - - Test: fast/js/toString-exception.html - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=7343 - REGRESSION: fast/js/toString-overrides.html fails when run multiple times - - * kjs/array_object.cpp: - (ArrayProtoFunc::callAsFunction): Remove the object from the visited elements set before - returning an error. - -2006-02-18 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=7345 - add insert and remove to KXMLCore::Vector - - * kxmlcore/Vector.h: Added "moveOverlapping", which is used in both - insert and remove to slide elements within the vector. Also added - "insert" and "remove" functions. - -2006-02-16 Geoffrey Garen - - Reviewed by John. - - - Fixed TOT REGRESSION: crash in KJS:: - Bindings::Instance::deref when leaving page @ gigaom.com - - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::~CInstance): Since we cache the class object - globally, we shouldn't delete it, so don't. - -2006-02-16 Timothy Hatcher - - Added -Wno-deprecated-declarations to all the ObjC binding files to prevent deprecation - warnings. Using to track this. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/objc/objc_jsobject.h: Removed empty file. - * bindings/objc/objc_jsobject.mm: Removed empty file. - -2006-02-16 Tim Omernick - - Reviewed by Geoff. - - Flash Player 8.0.22 can crash Safari (and WebKit apps) with - javascript disabled (7015) - - * bindings/NP_jsobject.cpp: - (_NPN_CreateNoScriptObject): - Returns an NPObject which is not bound to a JavaScript object. This kind of NPObject - can be given to a plugin as the "window script object" when JavaScript is disabled. - The object has a custom NPClass, NPNoScriptObjectClass, which has no defined methods. - Because of this, none of the NPN_* functions called by the plugin on this "no script - object" will cause entry into JavaScript code. - (_NPN_InvokeDefault): - Make sure the NPVariant is filled before returning from this function. This never - mattered before because we never reached this case, having only created NPObjects of - the class NPScriptObjectClass. - (_NPN_Invoke): - ditto - (_NPN_Evaluate): - ditto - (_NPN_GetProperty): - ditto - - * bindings/NP_jsobject.h: - Declared _NPN_CreateNoScriptObject(). - -2006-02-16 Darin Adler - - Reviewed by me, change by Peter Kuemmel. - - * kjs/operations.cpp: (KJS::isNegInf): Fix Windows code, which was - checking for positive infinity (rolling in fix from KDE side). - -2006-02-15 Geoffrey Garen - - Reviewed by Maciej, Eric. - - - JavaScriptCore half of fix for CrashTracer: 6569 - crashes in DashboardClient at com.apple.JavaScriptCore: - KJS::Bindings::ObjcFallbackObjectImp::type() - - WebCore and JavaScriptCore weren't sharing Instance objects very - nicely. I made them use RefPtrs, and sent them to bed without dessert. - - * bindings/jni/jni_instance.cpp: Made _instance a RefPtr - (JavaInstance::~JavaInstance): - (JObjectWrapper::JObjectWrapper): - * bindings/jni/jni_instance.h: - (KJS::Bindings::JObjectWrapper::ref): - (KJS::Bindings::JObjectWrapper::deref): - * bindings/jni/jni_runtime.cpp: Made _array a RefPtr - (JavaArray::~JavaArray): - (JavaArray::JavaArray): - * bindings/jni/jni_runtime.h: - (KJS::Bindings::JavaArray::operator=): - * bindings/objc/objc_runtime.h: - - Prohibited copying because that would muss the ref count. - - Prohibited construction without instance because an instance wrapper - without an instance is almost certainly a bug. - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::ObjcFallbackObjectImp): - * bindings/runtime.cpp: - (KJS::Bindings::Instance::Instance): - (KJS::Bindings::Instance::createBindingForLanguageInstance): - (KJS::Bindings::Instance::createRuntimeObject): - * bindings/runtime.h: - (KJS::Bindings::Instance::ref): - (KJS::Bindings::Instance::deref): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::RuntimeObjectImp): - (RuntimeObjectImp::fallbackObjectGetter): - (RuntimeObjectImp::fieldGetter): - (RuntimeObjectImp::methodGetter): - (RuntimeObjectImp::getOwnPropertySlot): - (RuntimeObjectImp::put): - (RuntimeObjectImp::canPut): - * bindings/runtime_object.h: - - Removed ownsInstance data member because RefPtr takes care of - instance lifetime now. - - Prohibited copying because that would muss the ref count. - - Prohibited construction without instance because an instance wrapper - without an instance is almost certainly a bug. - (KJS::RuntimeObjectImp::getInternalInstance): - -2006-02-15 Geoffrey Garen - - Reviewed by John. - - - Applied the 4330457 change to CClass and ObjcClass as well. - - Once plugins work in DumpRenderTree, running run-webkit-tests --leaks - will catch this. - - This change isn't as critical because CClass and ObjcClass objects get - cached globally and never deleted, but it's good practice, in case we - ever do decide to delete CClass and ObjcClass objects. - - This change requires prohibiting copying, because we don't do any - intelligent ref-counting -- when a Class is destroyed, it destroys its - methods and fields unconditionally. (Java classes already prohibited - copying.) - - * bindings/c/c_class.cpp: - - Merged _commonInit and _commonDelete into constructor and destructor. - (CClass::CClass): - (CClass::~CClass): - (CClass::methodsNamed): Added delete callbacks - (CClass::fieldNamed): Added delete callbacks - * bindings/c/c_class.h: Prohibited copying - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::getClass): Changed to use the preferred - class factory method, to take advantage of the global cache. - - [ Repeated changes applied to CClass for ObjcClass: ] - - * bindings/objc/objc_class.h: - * bindings/objc/objc_class.mm: - (KJS::Bindings::ObjcClass::ObjcClass): - (KJS::Bindings::ObjcClass::~ObjcClass): - (KJS::Bindings::ObjcClass::methodsNamed): - (KJS::Bindings::ObjcClass::fieldNamed): - * bindings/objc/objc_runtime.h: - (KJS::Bindings::ObjcMethod::ObjcMethod): Initialized uninitialized - variable to prevent bad CFRelease. - (KJS::Bindings::ObjcMethod::~ObjcMethod): Removed erroneous ';' from - if statement to prevent bad CFRelease. - * bindings/objc/objc_runtime.cpp: Changed to use the preferred - ObjectStructPtr, for clarity. - -2006-02-14 Geoffrey Garen - - Reviewed by John. - - - Fixed CrashTracer: [REGRESSION] 3763 crashes - in Safari at com.apple.JavaScriptCore: KJS::Bindings::JavaInstance:: - getClass const + 56 - - Once plugins work in DumpRenderTree, running run-webkit-tests --leaks - will catch this. - - This was a memory leak in the bindings code. The leak was so extreme - that it would cause Safari or the JVM to abort from lack of memory. - Upon construction, Class objects create field and method objects, - storing them in CFDictionaries. The bug was that upon destruction, the - class objects released the dictionaries but didn't destroy the stored - objects. - - The fix is to supply CFDictionary callbacks for destroying the values - added to the dictionary. - - * bindings/jni/jni_class.cpp: - (JavaClass::JavaClass): Added delete callbacks - * bindings/runtime.cpp: Added definitions for delete callbacks - (KJS::Bindings::deleteMethodList): - (KJS::Bindings::deleteMethod): - (KJS::Bindings::deleteField): - * bindings/runtime.h: Added declarations for delete callbacks - -2006-02-14 Timothy Hatcher - - Reviewed by Justin. - - Fixed STD: WebCore build steps use echo -n, which will change - behavior due to POSIX version of sh - - * JavaScriptCore.xcodeproj/project.pbxproj: removed the use of echo -n, replaced with printf "" - -2006-02-13 Dave Hyatt - - Fix Win32 bustage in JavaScriptCore. - - Reviewed by darin - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Add JSImmediate to the Win32 project. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::fromDouble): - (KJS::JSImmediate::toDouble): - (KJS::JSImmediate::NanAsBits): - (KJS::JSImmediate::oneAsBits): - Win32 needs explicit returns after abort() for non-void functions. - - * kjs/testkjs.cpp: - (run): - Win32 catches a bug in testkjs! The "return 2" should actually - have been a return false. - - * kjs/value.h: - The extern decls of NaN and Inf need to be const. - -=== JavaScriptCore-521.7 === - -2006-02-13 Timothy Hatcher - - Reviewed by Darin. - - Replaced the old NS_DURING exception blocking with @try/@catch. - - * JavaScriptCorePrefix.h: undef try and catch to workaround a C++ conflict - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - (ObjcInstance::invokeDefaultMethod): - (ObjcInstance::setValueOfUndefinedField): - (ObjcInstance::getValueOfUndefinedField): - * bindings/objc/objc_runtime.mm: - (ObjcField::valueFromInstance): - (ObjcField::setValueToInstance): - (ObjcArray::setValueAt): - (ObjcArray::valueAt): - -2006-02-13 Darin Adler - - - fix a couple problems building on Windows, based on requests - from Krzysztof Kowalczyk - - * kjs/JSImmediate.h: Change code using non-standard u_int32/64_t types - to the standard uint32/64_t. Also removed curious "isIEEE()" function - that checked the sizes of some types (and type sizes alone don't tell you if - the floating point conforms to the IEEE-standard). Added missing include - of . - - * kjs/property_slot.h: Added missing include of . - -2006-02-12 Geoffrey Garen - - Reviewed by darin. - - Cleaned up testkjs, added new "run" functionality to allow scripting - tests from within JS. ("run" is a part of my new super-accurate - JS iBench.) - - No regressions in run-javascriptcore-tests. - - * kjs/testkjs.cpp: - (GlobalImp::className): - (TestFunctionImp::): - (TestFunctionImp::callAsFunction): - (main): - (run): - -2006-02-11 Alexey Proskuryakov - - Reviewed by Darin. - - - improve fix for http://bugs.webkit.org/show_bug.cgi?id=5163 - RealPlayer.GetTitle() Crashes Safari/Dashboard - - * bindings/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16): - Use kCFStringEncodingISOLatin1 rather than kCFStringEncodingWindowsLatin1, - because the latter encoding has holes, and conversion can still fail. - -2006-02-10 Geoffrey Garen - - Reviewed by Darin. - - - Inlined RefPtr assignment operators. .7% performance win on - super-accurate JS iBench. - - * kxmlcore/RefPtr.h: - (KXMLCore::::operator): - -2006-02-10 Geoffrey Garen - - No review needed, just a build fix. This time for sure. - - * kjs/JSType.h: - -2006-02-10 Geoffrey Garen - - Reviewed by eric. - - - Fixed build. As it goes without saying, I will not mention that I - blame Kevin. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/JSImmediate.cpp: - (KJS::JSImmediate::toObject): - -2006-02-09 Geoffrey Garen - - Reviewed by mjs. - - - Fixed Should switch ConstantValues (null, - undefined, true, false) from JS objects to immediate values similar to - SimpleNumber - - 2.0% performance gain on my new super-accurate version of JS iBench. - (I promise to land a version of it soon.) - - The gist of the change: - (1) The SimpleNumber class (simple_number.h) is now the JSImmediate - class (JSImmediate.h/.cpp), and it handles not only numbers but also - null, undefined, true, and false. - (2) JSImmediate provides convenience methods for the bit masking - necessary to encode and decode immediate values. - (3) ConstantValues, BooleanImp, NullImp, and UndefinedImp are gone. - (4) JSCell no longer implements functions like getBoolean, because - only a JSImmediate can be a boolean. - (5) JSImmediate no longer uses ALWAYS_INLINE because there's no need, - and ALWAYS_INLINE is a non-portable option of last resort. - (6) Type is now JSType, and it resides in its own file, JSType.h. - Since I was there, I did some header include sorting as part of this - change. - - The rest pretty much explains itself. - - * JavaScriptCore.xcodeproj/project.pbxproj: Removed simple_number.h, - added JSImmediate.h/.cpp. - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::defaultValue): - * bindings/c/c_instance.h: - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertValueToNPVariant): - * bindings/jni/jni_instance.cpp: - (JavaInstance::defaultValue): - * bindings/jni/jni_instance.h: - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::convertValueToJObject): - * bindings/objc/WebScriptObject.mm: - (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]): - Standardized calls to use getXXX instead of hand-rolling JSValue - functionality. - * bindings/objc/objc_instance.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::getValueOfUndefinedField): - (ObjcInstance::defaultValue): - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::type): - (ObjcFallbackObjectImp::defaultValue): - * bindings/runtime.h: - (KJS::Bindings::Instance::getValueOfUndefinedField): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::defaultValue): - * bindings/runtime_object.h: - * kjs/JSImmediate.h: Added. - (KJS::JSImmediate::isImmediate): - (KJS::JSImmediate::isNumber): - (KJS::JSImmediate::isBoolean): - (KJS::JSImmediate::isUndefinedOrNull): - (KJS::JSImmediate::fromDouble): - (KJS::JSImmediate::toDouble): - (KJS::JSImmediate::toBoolean): - (KJS::JSImmediate::trueImmediate): - (KJS::JSImmediate::falseImmediate): - (KJS::JSImmediate::NaNImmediate): - (KJS::JSImmediate::undefinedImmediate): - (KJS::JSImmediate::nullImmediate): - (KJS::JSImmediate::tag): - (KJS::JSImmediate::unTag): - (KJS::JSImmediate::getTag): - (KJS::JSImmediate::): - (KJS::JSImmediate::isIEEE): - (KJS::JSImmediate::is32bit): - (KJS::JSImmediate::is64bit): - (KJS::JSImmediate::NanAsBits): - (KJS::JSImmediate::zeroAsBits): - (KJS::JSImmediate::oneAsBits): - * kjs/JSLock.cpp: - (KJS::JSLock::lock): Removed hack-o-rama to initialize ConstantValues. - * kjs/JSType.h: Added. - * kjs/collector.cpp: - (KJS::Collector::protect): - (KJS::Collector::unprotect): - (KJS::Collector::collect): - * kjs/internal.cpp: - (KJS::StringImp::toPrimitive): - (KJS::NumberImp::toPrimitive): - (KJS::NumberImp::toBoolean): - (KJS::GetterSetterImp::toPrimitive): - * kjs/internal.h: - (KJS::StringImp::type): - (KJS::NumberImp::type): - * kjs/object.cpp: - (KJS::JSObject::type): - (KJS::tryGetAndCallProperty): Replaced "Are you one of the six things - I'm looking for?" test with "Are you not the one thing I'm not looking - for" test. - (KJS::JSObject::defaultValue): - (KJS::JSObject::toPrimitive): - * kjs/object.h: - (KJS::GetterSetterImp::type): - (KJS::JSValue::isObject): - * kjs/operations.cpp: - (KJS::equal): - (KJS::strictEqual): - (KJS::add): - * kjs/reference.cpp: - (KJS::Reference::deleteValue): - * kjs/simple_number.h: Removed. - * kjs/string_object.cpp: - (StringInstance::getOwnPropertySlot): fixed indentation - * kjs/value.cpp: - (KJS::JSValue::toObject): - (KJS::jsNumberCell): New function to quarantine a PIC branch -- allows - us to inline jsNumber without adding PIC branches to callers. - * kjs/value.h: - (KJS::jsUndefined): - (KJS::jsNull): - (KJS::jsNaN): - (KJS::jsBoolean): - (KJS::jsNumber): - (KJS::JSValue::downcast): - (KJS::JSValue::isUndefinedOrNull): - (KJS::JSValue::isBoolean): - (KJS::JSValue::isNumber): - (KJS::JSValue::isString): - (KJS::JSValue::isObject): - (KJS::JSValue::getBoolean): - (KJS::JSValue::getNumber): - (KJS::JSValue::getString): - (KJS::JSValue::getObject): - (KJS::JSValue::getUInt32): - (KJS::JSValue::mark): Replaced !JSImmediate::is() test with assertion, - resulting in a slight performance gain. Callers should always check - !marked() before calling mark(), so it's impossible to call mark on - a JSImmediate. - (KJS::JSValue::marked): - (KJS::JSValue::type): - (KJS::JSValue::toPrimitive): - (KJS::JSValue::toBoolean): - (KJS::JSValue::toNumber): - (KJS::JSValue::toString): - -2006-02-06 Eric Seidel - - Add svn:ignore properties for visual studio internals. - -2006-02-06 Alexey Proskuryakov - - Reviewed by Darin. - - - Refactor DateInstance to provide direct access to data. Several WIN32 modifications. - http://bugs.webkit.org/show_bug.cgi?id=7107 - - - No tests added - only changed functionality on WIN32, which should be covered by - existing tests. - - * kjs/date_object.cpp: - (gmtoffset): On WIN32, use the recommended global (_timezone rather than timezone). - Updated comments. - (KJS::timeZoneOffset): Removed, was basically the same as the above. - (KJS::formatTime): Pass an UTC flag - UTC/local cannot be correctly selected on - Windows based on struct tm itself. - (KJS::DateInstance::getTime): Added. - (KJS::DateInstance::getUTCTime): Added. - (KJS::millisecondsToTM): Factored out from DateProtoFunc::callAsFunction(). - (KJS::DateObjectImp::callAsFunction): Use the new parameter to formatTime(). - (KJS::DateProtoFunc::callAsFunction): Updated for the other changes. The code for - GetTimezoneOffset was incorrect on WIN32 - _daylight global has nothing to do - with daylight savings time being in effect. - - * kjs/date_object.h: Added prototypes for new functions. - -2006-02-05 Maciej Stachowiak - - Reviewed by Anders. - - - fixed ~1100 KJS::Node leaked on layout tests - http://bugs.webkit.org/show_bug.cgi?id=7097 - - * kjs/internal.cpp: - (KJS::Parser::noteNodeCycle): - (KJS::Parser::removeNodeCycle): - (KJS::clearNewNodes): - * kjs/internal.h: - * kjs/nodes.cpp: - (ElementNode::breakCycle): - (PropertyListNode::breakCycle): - (ArgumentListNode::breakCycle): - (StatListNode::StatListNode): - (StatListNode::breakCycle): - (VarDeclListNode::breakCycle): - (BlockNode::BlockNode): - (ClauseListNode::breakCycle): - (CaseBlockNode::CaseBlockNode): - (ParameterNode::breakCycle): - (SourceElementsNode::SourceElementsNode): - (SourceElementsNode::breakCycle): - * kjs/nodes.h: - (KJS::Node::breakCycle): - (KJS::ElementNode::ElementNode): - (KJS::ArrayNode::ArrayNode): - (KJS::PropertyListNode::PropertyListNode): - (KJS::ObjectLiteralNode::ObjectLiteralNode): - (KJS::ArgumentListNode::ArgumentListNode): - (KJS::ArgumentsNode::ArgumentsNode): - (KJS::VarDeclListNode::VarDeclListNode): - (KJS::VarStatementNode::VarStatementNode): - (KJS::ForNode::ForNode): - (KJS::CaseClauseNode::CaseClauseNode): - (KJS::ClauseListNode::ClauseListNode): - (KJS::ParameterNode::ParameterNode): - (KJS::FuncExprNode::FuncExprNode): - (KJS::FuncDeclNode::FuncDeclNode): - -2006-02-05 Maciej Stachowiak - - Reviewed by Hyatt. - - - fix default traits for classes to make sure default constructors get called - - * kxmlcore/VectorTraits.h: - (KXMLCore::): - -2006-02-04 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=5210 - REGRESSION: for/in loop with var changes global variable instead of making local - - Test: fast/js/for-in-var-scope.html - - * kjs/nodes.cpp: - (valueForReadModifyAssignment): Use ALWAYS_INLINE macro. - (ForInNode::execute): Break out of the scope chain loop once we find and set the - loop variable. We don't want to set multiple loop variables. - (ForInNode::processVarDecls): Process the declaration of the loop variable. - - - other cleanup - - * kjs/object.cpp: (KJS::tryGetAndCallProperty): Use ALWAYS_INLINE macro. - * kxmlcore/FastMalloc.cpp: Change to use ALWAYS_INLINE macro from AlwaysInline.h - instead of defining it here a second time. - -2006-02-04 Maciej Stachowiak - - Reviewed by Hyatt. - - - change JavaScript collector statistics calls to use HashCountedSet instead - of CFSet; other misc cleanup - http://bugs.webkit.org/show_bug.cgi?id=7072 - - * kjs/collector.cpp: - (KJS::Collector::numProtectedObjects): renamed from numReferencedObjects - (KJS::typeName): - (KJS::Collector::rootObjectTypeCounts): renamed from rootObjectClasses, - use HashSet - * kjs/collector.h: - (KJS::Collector::isOutOfMemory): Renamed from outOfMemory. - * kjs/nodes.cpp: - -2006-02-03 Timothy Hatcher - - Reviewed by Justin. - - Renamed configuration names to Debug, Release and Production. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-02-02 George Staikos - - Reviewed by Maciej. - - * kjs/lookup.h: Fix compile, merged from KDE. - -2006-02-02 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=7005 - add Noncopyable, OwnPtr, OwnArrayPtr to KXMLCore - - * kxmlcore/Noncopyable.h: Added. - * kxmlcore/OwnArrayPtr.h: Added. - * kxmlcore/OwnPtr.h: Added. - - * JavaScriptCore.xcodeproj/project.pbxproj: Added new files. - - * kjs/function.h: - * kjs/function.cpp: Use OwnPtr for Parameter pointers. - - * kjs/internal.h: Use Noncopyable for LabelStack. - - * kjs/list.cpp: Use OwnArrayPtr for overflow. - - * kjs/property_map.h: - * kjs/property_map.cpp: Use OwnArrayPtr for SavedProperties. - Use Vector for some stack buffers. - - * kjs/regexp_object.h: - * kjs/regexp_object.cpp: Use OwnArrayPtr for lastOvector. - -2006-01-31 Maciej Stachowiak - - Reviewed by Darin. - - - fixed leak of hundreds of thousands of JS parser nodes on the layout tests, and added an exit counter - that would catch them - - * kjs/nodes.cpp: - (NodeCounter::~NodeCounter): Added debug-only node counter. - (Node::Node): - (Node::~Node): - * kxmlcore/VectorTraits.h: Simple classes like RefPtr do in fact need destruction. - -2006-01-31 Darin Adler - - Reviewed by Maciej. - - - added deleteAllValues for HashSet as well as HashMap - - fixed conversion from const_iterator to iterator, which I broke a while back - - * kxmlcore/HashMap.h: Updated copyright date. - * kxmlcore/HashSet.h: (KXMLCore::deleteAllValues): Added. - * kxmlcore/HashTable.h: (KXMLCore::HashTableIterator::operator const_iterator): Added. - -2006-01-31 Tim Omernick - - Reviewed by Geoff Garen. - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertUTF8ToUTF16): - Fixed an invalid assertion that UTF8Chars is not NULL. It is valid for it to be NULL as long as - UTF8Length is 0. - This fixes an assertion failure on TOT at , - where JavaScript is getting a NULL string back from some call on the Real Player plugin. - -2006-01-30 Anders Carlsson - - Reviewed by Darin. - - Fix http://bugs.webkit.org/show_bug.cgi?id=6907 - REGRESSION: United.com menus messed up due to document.all/MSIE sniff - - * kjs/nodes.cpp: - (typeStringForValue): - Return "undefined" if the given object should masquerade as undefined. - - * kjs/object.h: - (KJS::JSObject::masqueradeAsUndefined): - Rename from isEqualToNull. - - * kjs/operations.cpp: - (KJS::equal): - Update for name change. - -2006-01-29 Maciej Stachowiak - - Reviewed by Darin. - - - properly define Vector assignment operator; the private version was accidentally left - in, and the template version is not enough to replace the default - - * kxmlcore/Vector.h: - (KXMLCore::Vector::operator=): - -2006-01-29 Eric Seidel - - Reviewed by darin. - - Fix the build by applying a GCC-specific namespace hack. - - * kjs/lookup.h: - -2006-01-29 Eric Seidel - - Reviewed by hyatt. - - Fix build on Win32. - - * kjs/lookup.h: fixed ::cacheGlobalObject - * kxmlcore/Vector.h: - (KXMLCore::Vector::operator[]): use unsigned long - -2006-01-29 Maciej Stachowiak - - Reviewed by Dave Hyatt. - - * kxmlcore/Vector.h: - (KXMLCore::Vector::operator[]): Add unsigned overload - -2006-01-28 Darin Adler - - Reviewed by John Sullivan. - - - http://bugs.webkit.org/show_bug.cgi?id=6895 - include exception names in JavaScript form of DOM exception - - * khtml/ecma/kjs_binding.cpp: (KJS::setDOMException): Include the name of the - exception in the error message. - -2006-01-28 Maciej Stachowiak - - Reviewed by Darin. - - - miscellaneous Vector improvements - - * kxmlcore/Vector.h: - (KXMLCore::Vector::at): Add range-checking asserts. - (KXMLCore::Vector::first): Added as a convenience. - (KXMLCore::Vector::last): Convenience for stack-style use. - (KXMLCore::Vector::removeLast): ditto - -2006-01-28 Darin Adler - - Reviewed by John Sullivan - - - fix http://bugs.webkit.org/show_bug.cgi?id=6870 - REGRESSION: JavaScript Date constructor won't accept another Date object - - Test: fast/js/date-constructor.html - - * kjs/date_object.cpp: (KJS::DateObjectImp::construct): - Added a special case for constructing one date from another (to avoid losing - milliseconds, which are not in the text form, to match Firefox), and changed - the base code to convert to primitive before checking for string to match - the standard. Also corrected a couple silly things in the "construct from - current time" code path (removed a floor that does no good, and changed - the constant used to convert microseconds to milliseconds to be a 1000 - rather than "msPerSecond"). - -2006-01-28 Darin Adler - - * kjs/create_hash_table: Added missing license. - -2006-01-28 Maciej Stachowiak - - Reviewed by Dave Hyatt. - - - added a Vector class - http://bugs.webkit.org/show_bug.cgi?id=6894 - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/internal.cpp: - (KJS::Parser::saveNewNode): Apply Vector. - (KJS::clearNewNodes): ditto - * kjs/number_object.cpp: - (integer_part_noexp): ditto - (char_sequence): ditto - * kjs/ustring.cpp: - (KJS::UString::UTF8String): ditto - * kxmlcore/HashMap.h: - (KXMLCore::deleteAllValues): Tweaked this to only apply to HashMap, - other versions are useful for other containers. - * kxmlcore/Vector.h: Added. Implemented a Vector class, which should - be usable for all Array/QVector style purposes, and also as a stack buffer - with oversize handling. Also some helper classes to make vector operations - as efficient as possible for POD types and for simple non-PODs like RefPtr. - (KXMLCore::): - (KXMLCore::VectorTypeOperations::destruct): - (KXMLCore::VectorTypeOperations::initialize): - (KXMLCore::VectorTypeOperations::move): - (KXMLCore::VectorTypeOperations::uninitializedCopy): - (KXMLCore::VectorTypeOperations::uninitializedFill): - (KXMLCore::VectorBuffer::VectorBuffer): - (KXMLCore::VectorBuffer::~VectorBuffer): - (KXMLCore::VectorBuffer::deallocateBuffer): - (KXMLCore::VectorBuffer::inlineBuffer): - (KXMLCore::Vector::Vector): - (KXMLCore::Vector::~Vector): - (KXMLCore::Vector::size): - (KXMLCore::Vector::capacity): - (KXMLCore::Vector::isEmpty): - (KXMLCore::Vector::at): - (KXMLCore::Vector::operator[]): - (KXMLCore::Vector::data): - (KXMLCore::Vector::operator T*): - (KXMLCore::Vector::operator const T*): - (KXMLCore::Vector::begin): - (KXMLCore::Vector::end): - (KXMLCore::Vector::clear): - (KXMLCore::Vector::fill): - (KXMLCore::Vector::operator=): - (KXMLCore::::Vector): - (KXMLCore::::operator): - (KXMLCore::::fill): - (KXMLCore::::expandCapacity): - (KXMLCore::::resize): - (KXMLCore::::reserveCapacity): - (KXMLCore::::append): - (KXMLCore::deleteAllValues): - * kxmlcore/VectorTraits.h: Added. - (KXMLCore::VectorTraits): Traits to enable making Vector efficient for - simple types. - -2006-01-28 Alexey Proskuryakov - - Reviewed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=5163 - RealPlayer.GetTitle() Crashes Safari/Dashboard - - * bindings/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16): - Fallback to kCFStringEncodingWindowsLatin1 if the passed buffer is not valid UTF-8, preventing crashes. - -2006-01-25 George Staikos - - Reviewed by Darin. - - * kxmlcore/HashFunctions.h: Merge build fix from KDE. - -2006-01-25 Darin Adler - - - removed an unused source file - - * kjs/pointer_hash.h: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed reference to pointer_hash.h. - -2006-01-23 Anders Carlsson - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=6737 - KJS_DEFINE_PROTOTYPE should work outside of the KJS namespace - - * kjs/lookup.h: - Prefix all KJS types with KJS:: in KJS_DEFINE_PROTOTYPE. - - (cacheGlobalObject): - Move this out of the KJS namespace. - -2006-01-23 Maciej Stachowiak - - Reviewed by Eric. - - - renamed PointerHash to PtrHash - - made PtrHash the default hash function for int and pointer types that aren't further specialized - - added an AtomicStringImpl class to make it easier and more typesafe to identity hash atomic strings - - did appropriate consequent cleanup (very few places now need to declare a hash function) - http://bugs.webkit.org/show_bug.cgi?id=6752 - - * kjs/array_object.cpp: - (ArrayProtoFunc::callAsFunction): no need to mention PointerHash - * kjs/collector.cpp: ditto - * kjs/identifier.cpp: - (KXMLCore::): declare DefaultHash the new way - * kjs/internal.cpp: no need to mention PointerHash - * kjs/ustring.h: - * kxmlcore/HashCountedSet.h: change how we get the default hash to make it - easier to specialize on PtrHash - * kxmlcore/HashFunctions.h: - (KXMLCore::): renamed PointerHash to PtrHash; changed DefaultHash so that it has - a Hash typedef rather than being a hash function class itself; declared DefaultHash - for int and partializy specialized for pointer types - * kxmlcore/HashMapPtrSpec.h: - (KXMLCore::PtrHashIteratorAdapter::PtrHashIteratorAdapter): Slight tweaks for new - way of handling pointer hash - (KXMLCore::PtrHashConstIteratorAdapter::PtrHashConstIteratorAdapter): ditto - (KXMLCore::): ditto - * kxmlcore/HashMap.h: ditto - * kxmlcore/HashSet.h: ditto - -2006-01-23 Maciej Stachowiak - - Reviewed by Tim Omernick. - - - use classes instead of free functions for extractors, this better matches how other - things work and should avoid the need for hacky workarounds on other compilers - http://bugs.webkit.org/show_bug.cgi?id=6748 - - * kjs/array_object.cpp: - * kjs/identifier.cpp: - * kjs/internal.cpp: - * kxmlcore/HashMap.h: - (KXMLCore::PairFirstExtractor::extract): - * kxmlcore/HashMapPtrSpec.h: - (KXMLCore::): - * kxmlcore/HashSet.h: - (KXMLCore::IdentityExtractor::extract): - * kxmlcore/HashTable.h: - (KXMLCore::addIterator): - (KXMLCore::removeIterator): - (KXMLCore::HashTable::add): - (KXMLCore::HashTable::isEmptyBucket): - (KXMLCore::HashTable::isDeletedBucket): - (KXMLCore::HashTable::HashTable): - (KXMLCore::HashTable::lookup): - (KXMLCore::HashTable::add): - (KXMLCore::HashTable::reinsert): - (KXMLCore::HashTable::find): - (KXMLCore::HashTable::contains): - (KXMLCore::HashTable::remove): - (KXMLCore::HashTable::allocateTable): - (KXMLCore::HashTable::deallocateTable): - (KXMLCore::HashTable::expand): - (KXMLCore::HashTable::rehash): - (KXMLCore::HashTable::clear): - (KXMLCore::HashTable::swap): - (KXMLCore::HashTable::operator): - (KXMLCore::HashTable::checkTableConsistency): - (KXMLCore::HashTable::checkTableConsistencyExceptSize): - (KXMLCore::HashTable::invalidateIterators): - -2006-01-23 Maciej Stachowiak - - Rubber stamped by Tim Hatcher. - - - renamed inert() operation on HashSet, HashCountedSet and HashTable to add() - for consistency with HashMap - - * kjs/array_object.cpp: - (ArrayProtoFunc::callAsFunction): - * kjs/collector.cpp: - (KJS::Collector::protect): - * kjs/identifier.cpp: - (KJS::Identifier::add): - * kxmlcore/HashCountedSet.h: - (KXMLCore::::add): - * kxmlcore/HashMap.h: - (KXMLCore::::inlineAdd): - * kxmlcore/HashSet.h: - (KXMLCore::::add): - * kxmlcore/HashTable.h: - (KXMLCore::HashTable::add): - (KXMLCore::::add): - (KXMLCore::::HashTable): - -2006-01-23 Justin Garcia - - Reviewed by thatcher - - Turned on -O2 for B&I build. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-01-23 Maciej Stachowiak - - Reviewed by Tim Hatcher. - - - it's "Franklin Street", not "Franklin Steet" - - * kjs/array_instance.h: - * kjs/array_object.cpp: - * kjs/array_object.h: - * kjs/bool_object.cpp: - * kjs/bool_object.h: - * kjs/collector.cpp: - * kjs/collector.h: - * kjs/completion.h: - * kjs/context.h: - * kjs/date_object.cpp: - * kjs/date_object.h: - * kjs/debugger.cpp: - * kjs/debugger.h: - * kjs/dtoa.h: - * kjs/error_object.cpp: - * kjs/error_object.h: - * kjs/function.cpp: - * kjs/function.h: - * kjs/function_object.cpp: - * kjs/function_object.h: - * kjs/grammar.y: - * kjs/identifier.cpp: - * kjs/identifier.h: - * kjs/internal.cpp: - * kjs/internal.h: - * kjs/interpreter.cpp: - * kjs/interpreter.h: - * kjs/lexer.cpp: - * kjs/lexer.h: - * kjs/list.cpp: - * kjs/list.h: - * kjs/lookup.cpp: - * kjs/lookup.h: - * kjs/math_object.cpp: - * kjs/math_object.h: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - * kjs/number_object.cpp: - * kjs/number_object.h: - * kjs/object.cpp: - * kjs/object.h: - * kjs/object_object.cpp: - * kjs/object_object.h: - * kjs/operations.cpp: - * kjs/operations.h: - * kjs/property_map.cpp: - * kjs/property_map.h: - * kjs/property_slot.cpp: - * kjs/property_slot.h: - * kjs/reference.cpp: - * kjs/reference.h: - * kjs/reference_list.cpp: - * kjs/reference_list.h: - * kjs/regexp.cpp: - * kjs/regexp.h: - * kjs/regexp_object.cpp: - * kjs/regexp_object.h: - * kjs/scope_chain.cpp: - * kjs/scope_chain.h: - * kjs/simple_number.h: - * kjs/string_object.cpp: - * kjs/string_object.h: - * kjs/testkjs.cpp: - * kjs/types.h: - * kjs/ustring.cpp: - * kjs/ustring.h: - * kjs/value.cpp: - * kjs/value.h: - * kxmlcore/AlwaysInline.h: - * kxmlcore/ListRefPtr.h: - * kxmlcore/PassRefPtr.h: - * kxmlcore/RefPtr.h: - -2006-01-23 Darin Adler - - Reviewed by John Sullivan. - - - change needed for fix to http://bugs.webkit.org/show_bug.cgi?id=6617 - REGRESSION: Crash in cloneChildNodes when clicking element - - * kxmlcore/PassRefPtr.h: Fix assignment operator from RefPtr of a different - type by calling get() instead of going directly at m_ptr. - * kxmlcore/RefPtr.h: Ditto. - - - other changes - - * JavaScriptCore.xcodeproj/project.pbxproj: Xcode decided to change this file. - It's just a resorted list of keys in a dictionary. - - * kjs/fpconst.cpp: Wrap this file in #if __APPLE__ since the alternate version - in internal.cpp is in #if !__APPLE__. This file is to give us the "no init - routine" property we want to have on OS X. - -2006-01-22 Maciej Stachowiak - - Reviewed by Darin. - - - Set up Page class and invert Frame / WebCoreFrameBridge ownership - http://bugs.webkit.org/show_bug.cgi?id=6577 - - * kjs/interpreter.h: make globalExec virtual so ScriptInterpreter can - override it - -2006-01-23 George Staikos - - Reviewed by Maciej and Darin. - - * kxmlcore/Assertions.h: This file only works with __APPLE__ right now - * kjs/interpreter.cpp: ditto - * kjs/simple_number.h: Add assert.h and remove from config.h - * kjs/array_object.cpp: Use relative paths for kxmlcore includes - * kjs/testkjs.cpp: Use relative paths for kxmlcore includes - -2006-01-23 George Staikos - - Reviewed by Maciej. - - * kjs/config.h: unbreak preprocessor change - -2006-01-23 George Staikos - - Approved by Maciej and Darin. - - * kjs/: - * kxmlcore/: - Update FSF address in license to make merging easier - -2006-01-22 George Staikos - - Reviewed by Maciej. - - * kjs/collector.cpp: merge major speedup from KDE on Linux - patch by Maks Orlovich, bug #6145 - Also unify cpu detection - * kjs/config.h: define simpler CPU macros - -2006-01-22 George Staikos - - Reviewed by Maciej. - - * kjs/collector.cpp: merge FreeBSD compile fix from KDE - -> requires build magic for use - -2006-01-21 George Staikos - - Reviewed by Maciej. - - * kjs/nodes2string.cpp - * kjs/operations.h - * kjs/debugger.h - Fix pedantic compile with some gcc versions (Merge from KDE) - - * kjs/create_hash_table: - Fix build with Perl 5.8.0 (Merge from KDE) - -2006-01-18 Darin Adler - - Reviewed by Hyatt. - - - hash table fixes needed for my WebCore changes - - * kxmlcore/HashTable.h: (KXMLCore::HashTableConstIterator::operator=): - Added a missing return statement. - - * kxmlcore/HashTraits.h: Fix traits so they work properly for classes where you - can't instantiate with a 0 by using traits rather than ? : to select the default - emtpy value of hash table keys. - - - small cleanup of "runtime" code left over from recent JavaScript crash fix - - * bindings/runtime_root.h: - (KJS::Bindings::RootObject::RootObject): No explicit initialization of _imp needed - since it's now a ProtectedPtr. - (KJS::Bindings::RootObject::setRootObjectImp): Remove old code that relied on the - fact that _imp was 0 and replaced with use of ProtectedPtr. - (KJS::Bindings::RootObject::rootObjectImp): Updated since _imp is a ProtectedPtr. - -2006-01-17 Darin Adler - - Reviewed by Anders. - - - http://bugs.webkit.org/show_bug.cgi?id=6611 - add assertions to check correct use of hash table iterators - - * kxmlcore/HashTable.h: - (KXMLCore::addIterator): Added. Helper function that adds an iterator to the list - maintained by the specified hash table. - (KXMLCore::removeIterator): Added. Helper function that removes an iterator from - the list maintained by the hash table it's in. - (KXMLCore::HashTableConstIterator::HashTableConstIterator): Added a HashTable - parameter, ignored when not debugging. Call addIterator. - (KXMLCore::HashTableConstIterator::~HashTableConstIterator): - (KXMLCore::HashTableConstIterator::operator=): Call removeIterator. - (KXMLCore::HashTableConstIterator::operator*): Call checkValidity. - (KXMLCore::HashTableConstIterator::operator->): Ditto. - (KXMLCore::HashTableConstIterator::operator++): Ditto. - (KXMLCore::HashTableConstIterator::operator==): Ditto. - (KXMLCore::HashTableConstIterator::operator!=): Ditto. - (KXMLCore::HashTableConstIterator::checkValidity): Checks that the hash table - pointer is not 0 and if there are two iterators that both point at the same table. - (KXMLCore::HashTableIterator::HashTableIterator): Changed to use the const iterator - as an implementation detail, to avoid having two separate iterator implementations. - (KXMLCore::HashTableIterator::operator*): Ditto. - (KXMLCore::HashTableIterator::operator->): Ditto. - (KXMLCore::HashTableIterator::operator++): Ditto. - (KXMLCore::HashTableIterator::operator==): Ditto. - (KXMLCore::HashTableIterator::operator!=): Ditto. - (KXMLCore::HashTable::HashTable): Initialize pointer to head of iterators list. - (KXMLCore::HashTable::~HashTable): Added call to invalidateIterators. - (KXMLCore::HashTable::makeIterator): Pass this pointer. - (KXMLCore::HashTable::makeConstIterator): Ditto. - (KXMLCore::HashTable::insert): Call invalidateIterators, since this is a public - entry point that modifies the hash table. - (KXMLCore::HashTable::remove): Ditto. - (KXMLCore::HashTable::clear): Ditto. - (KXMLCore::HashTable::swap): Ditto. - (KXMLCore::HashTable::invalidateIterators): Added. Walks the iterators list and - clears out the table, next, and previous pointers in all of them, and then clears - the head so we have an empty list. - (KXMLCore::addIterator): Added. Adds the iterator the the linked list in the - passed-in table, and points the iterator at the table. - (KXMLCore::removeIterator): Added. Removes the iterator from the linked list in - the passed-in table. - - * kxmlcore/HashTraits.h: A bit of tweaking and formatting. - -2006-01-17 Justin Garcia - - Reviewed by eric - - Deployment builds now use -O2 - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2006-01-17 Darin Adler - - Reviewed by Anders. - - - fix http://bugs.webkit.org/show_bug.cgi?id=6610 - change RefPtr so that it works when deref ends up deleting the RefPtr - - * kxmlcore/PassRefPtr.h: Always set m_ptr before calling deref. - * kxmlcore/RefPtr.h: Ditto. - -2006-01-16 Geoffrey Garen - - Reviewed by darin. - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=6322 - DateProtoFuncImp::callAsFunction can crash due to lack of type checking - - * kjs/date_object.cpp: - (KJS::DateProtoFunc::callAsFunction): Type check calls to all methods. - This matches section 15.9.5 in the spec. - -2006-01-16 Tim Omernick - - Reviewed by John Sullivan. - - JavaScriptCore part of NPAPI ref count behavior differs with Mozilla - - * bindings/npruntime.cpp: - (_NPN_ReleaseObject): - Refactored part of this function out into _NPN_DeallocateObject. - (_NPN_DeallocateObject): - Forcibly deallocates the passed object, even if its refcount is - greater than zero. - - * bindings/npruntime_impl.h: - Declared _NPN_DeallocateObject(). - -2006-01-16 Darin Adler - - Reviewed by Maciej. - - - fix problem with ++, ==, and != on const iterators in - HashMaps that are using the pointer specialization - - * kxmlcore/HashMapPtrSpec.h: - (KXMLCore::PointerHashConstIteratorAdapter::operator++): Change type to const_iterator. - (KXMLCore::PointerHashConstIteratorAdapter::operator==): Ditto. - (KXMLCore::PointerHashConstIteratorAdapter::operator!=): Ditto. - -2006-01-15 Alexey Proskuryakov - - Reviewed by Anders. - - - fix http://bugs.webkit.org/show_bug.cgi?id=6561 - run-javascriptcore-tests doesn't work - - * JavaScriptCore/tests/mozilla/Getopt/Mixed.pm: - Changed revision number to 1.8 (broken by svn migration). - -2006-01-14 David Kilzer - - Reviewed and landed by Anders. - - * kjs/create_hash_table: Fixed comment typo. - -2006-01-13 Maks Orlovich - - Mostly merging work by Peter Kelly. Reviewed by Maciej, landed by ap. - - - fix http://bugs.webkit.org/show_bug.cgi?id=6261 - Misc. array object fixes from KJS - - * kjs/array_object.cpp: Don't treat 2^32-1 as a real array index property. - (ArrayInstance::getOwnPropertySlot): Ditto. - (ArrayInstance::deleteProperty): Ditto. - (ArrayInstance::put): Ditto. - (ArrayInstance::propList): Added a FIXME comment. - (ArrayInstance::put): Throw exception on trying to set invalid array length. - (ArrayProtoFunc::callAsFunction): Do not use a separator argument when doing toString/toLocalString. - * kjs/array_object.h: Added MAX_ARRAY_INDEX. - -2006-01-13 Darin Adler - - - Replaced tabs with spaces in source files that had less than 10 lines with tabs. - - Set allow-tabs Subversion property in source files that have more than 10 lines with tabs. - -2006-01-13 Anders Carlsson - - Reviewed by Eric. - - * kjs/create_hash_table: - Use correct size variables. - -2006-01-13 Anders Carlsson - - Reviewed by Darin. - - * kjs/create_hash_table: - Don't create an empty entry array, instead add a entry with all fields - set to null and set the hash table size to 1. - - * kjs/lookup.cpp: - (findEntry): - Remove the hash table size check - -2006-01-12 Anders Carlsson - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=6494 - Crash when assigning a new function to a DOMParser object - - * JavaScriptCore.xcodeproj/project.pbxproj: - Move lookup.cpp before lookup.h - - * kjs/lookup.cpp: - (findEntry): - If the hash table is empty, return 0 early. - -2006-01-12 George Staikos - - Reviewed by Darin. - - * kjs/interpreter.cpp: - * kjs/testkjs.cpp: - * kjs/interpreter.h: - Add helper to interpreter to call the collector in order to facilitate - visibility rules in KDE. - -2006-01-12 George Staikos - - Reviewed by Maciej. - - * kjs/kjs.pro: Updates to build the whole thing on Linux at least. - - * kxmlcore/HashTable.h: Add missing assert.h - -2006-01-12 Darin Adler - - Reviewed by Geoff. - - - fix http://bugs.webkit.org/show_bug.cgi?id=6505 - retire APPLE_CHANGES from JavaScriptCore - - * JavaScriptCore.xcodeproj/project.pbxproj: Removed both - APPLE_CHANGES and HAVE_CONFIG_H from all targets. - - * README: Removed. This had obsolete information in it - and it wasn't clear what to replace it with. - - * kjs/collector.h: Removed an APPLE_CHANGES if around something - that's not really platform-specific (although it does use a - platform-specific API at the moment). - * kjs/collector.cpp: Removed a mistaken comment. - - * kjs/grammar.y: - * kjs/internal.cpp: - * kjs/object.h: - * kjs/operations.cpp: - * kjs/operations.h: - * kjs/ustring.h: - Use __APPLE__ instead of APPLE_CHANGES for code that should be - used only on Mac OS X. - - * kjs/interpreter.cpp: Removed APPLE_CHANGES ifdef around the include - of the runtime.h header. Even though that header isn't needed at the - moment on platforms other than Mac OS X, the conditional stuff should - be in the header itself, not in this one client. - - * kjs/math_object.cpp: (MathFuncImp::callAsFunction): Removed some - code inside APPLE_CHANGES. I'm pretty sure this code isn't needed on - any platform where pow is implemented corrrectly according to the IEEE - standard. If it is needed on some, we can add it back with an appropriate - #if for the platforms where it is needed. - -2006-01-12 Justin Haygood - - Reviewed, tweaked, and landed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=6416 - lexer.cpp, grammar.y protect include of config.h with "HAVE_CONFIG_H" - - * kjs/dtoa.cpp: Removed HAVE_CONFIG_H, changed config.h to use - quotes instead of angle brackets. Moved dtoa.h include to the top. - Changed system header includes to use angle brackets instead of quotes. - * kjs/grammar.y: Removed HAVE_CONFIG_H, changed config.h to use - quotes instead of angle brackets. - * kjs/lexer.cpp: Removed HAVE_CONFIG_H, changed config.h to use - quotes instead of angle brackets. Moved lexer.h include to the top. - * kjs/ustring.cpp: Removed HAVE_CONFIG_H, changed config.h to use - quotes instead of angle brackets. Moved ustring.h include to the top. - -2006-01-12 George Staikos - - Reviewed by Maciej - - - Import initial QMake file. Doesn't fully work yet. - -2006-01-11 Ricci Adams - - Reviewed by Maciej and Darin, landed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=5939 - final comma in javascript object prevents parsing - - * kjs/grammar.y: Added rule to allow trailing comma in - object construction. - -2006-01-11 Ricci Adams - - Reviewed by Geoff, landed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=5308 - Number.toFixed doesn't include leading 0 - - * kjs/number_object.cpp: (NumberProtoFunc::callAsFunction): - Fixed a "<" that should have been a "<=". - -2006-01-11 Ricci Adams - - Reviewed by Geoff, landed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=5307 - Number.toFixed doesn't round 0.5 up - - * kjs/number_object.cpp: (NumberProtoFunc::callAsFunction): - Fixed a ">" that should have been a ">=". - -2006-01-11 Justin Haygood - - Reviewed and landed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=6486 - JavaScriptCore should use system malloc on Windows - - * kjs/config.h: Add USE_SYSTEM_MALLOC to the Win32 section. - -2006-01-10 Darin Adler - - * Makefile: Took out unneeded "export" line. - * : Changed a lot of flags (cleared bogus executable bits, set - MIME types, other small corrections). - -2006-01-09 Darin Adler - - * Makefile.am: Removed. - -2006-01-07 Anders Carlsson - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=6373 - REGRESSION: JavaScript hang when comparing large array to null - - * kjs/object.h: - (KJS::JSObject::isEqualToNull): - Add new function which returns true if an object should be treated as null when - doing comparisons. - - * kjs/operations.cpp: - (KJS::equal): - Use isEqualToNull. - -2006-01-07 Alexey Proskuryakov - - Reviewed by Maciej. - - - Fix WebCore development build - http://bugs.webkit.org/show_bug.cgi?id=6408 - - * kxmlcore/Assertions.h: Use __VA_ARGS__ in variadic macros. - -2006-01-06 Maciej Stachowiak - - Reviewed by Darin. - - - miscellaneous changes for 4% speedup on the JavaScript iBench - http://bugs.webkit.org/show_bug.cgi?id=6396 - - Changes mostly thanks to Maks Orlovich, tweaked a little by me. - - * kjs/create_hash_table: Use the same hash as the one used by Identifier. - * kjs/function.cpp: - (KJS::FunctionImp::processParameters): Use the new List::copyFrom - (KJS::ActivationImp::ActivationImp): track variable while iterating - * kjs/internal.cpp: - (KJS::StringImp::toObject): create StringInstance directly - * kjs/list.cpp: - (KJS::List::copy): implement in terms of copyFrom - (KJS::List::copyFrom): more efficient way to copy in another list - * kjs/list.h: - * kjs/lookup.cpp: - (keysMatch): updated to work with identifier hash - (findEntry): ditto - (Lookup::findEntry): ditto - (Lookup::find): ditto - * kjs/lookup.h: - -2006-01-06 Maciej Stachowiak - - - fix development build failure from the previous checkin - - * kjs/function.cpp: - (KJS::ActivationImp::put): Use prototype() accessor in assert. - -2006-01-05 Maciej Stachowiak - - Reviewed by Eric. - - - fix remaining performance regression from Getter/Setter change - http://bugs.webkit.org/show_bug.cgi?id=6249 - - - Activation objects should not have __proto__ property - http://bugs.webkit.org/show_bug.cgi?id=6395 - - * kjs/function.cpp: - (KJS::ActivationImp::getOwnPropertySlot): Implement directly, thus - skipping getter/setter handling and __proto__ handling, as well - as inlining needed superclass stuff. - (KJS::ActivationImp::put): Implement directly, skipping getter/setter, - __proto__, and do canPut directly in PropertyMap::put since there's no - static property table either. - * kjs/function.h: - * kjs/property_map.cpp: - (KJS::PropertyMap::put): Allow optionally inlining canPut check. - * kjs/property_map.h: - -2006-01-04 Geoffrey Garen - - Patch by kimmo.t.kinnunen@nokia.com, reviewed by darin, tweaked by me. - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=4921 - \u escape sequences in JavaScript identifiers - - * kjs/function_object.cpp: - (FunctionObjectImp::construct): - * kjs/lexer.cpp: - (Lexer::shift): - (Lexer::lex): - (Lexer::isWhiteSpace): - (Lexer::isLineTerminator): - (Lexer::isIdentStart): - (Lexer::isIdentPart): - (isDecimalDigit): - (Lexer::scanRegExp): - * kjs/lexer.h: - (KJS::Lexer::): - - * tests/mozilla/expected.html: Updated test results. - -2005-12-30 Maciej Stachowiak - - No review, just test result update. - - * tests/mozilla/expected.html: Updated for newly passing test from recent fixes. - -2005-12-30 Anders Carlsson - - Reviewed by Maciej. - - - Fix http://bugs.webkit.org/show_bug.cgi?id=6298 - Getter setter test is failing - - * kjs/object.cpp: - (KJS::JSObject::put): - Rework the getter setter part. We now walk the prototype chain, checking for - getter/setter properties and only take the slow path if any are found. - -2005-12-30 Maks Orlovich - - Reviewed and committed by Maciej. - - - Handle negative, FP numbers with non-10 radix in toString - http://bugs.webkit.org/show_bug.cgi?id=6259 - - (Merged from KJS, original work by Harri Porten) - - * kjs/number_object.cpp: - (NumberProtoFunc::callAsFunction): rewrote Number.toString(radix) to work with - negative numbers, floating point and very large numbers. - -2005-12-29 Geoffrey Garen - - Patch by Maks Orlovich, reviewed and landed by me. - - - http://bugs.webkit.org/show_bug.cgi?id=6267 - Fix Number.prototype.toFixed/toExponential(undefined) - - * kjs/number_object.cpp: - (NumberProtoFunc::callAsFunction): - -2005-12-29 Geoffrey Garen - - Patch by Maks Orlovich, Reviewed and landed by me. - - - http://bugs.webkit.org/show_bug.cgi?id=6266 - Minor object naming updates (to match Mozilla, KJS) - - * kjs/number_object.cpp: - * kjs/regexp_object.cpp: - -2005-12-29 Geoffrey Garen - - Patch by Maks Orlovich, reviewed by mjs. - - This has 2 very minor fixes, covered by KJS testsuite: - 1. Enumerates string indices in property list (with the same bug as array - object has in corresponding code). This is a mozilla emulation thing. - 2. Permits properties with integer names in prototypes to be found - - * kjs/string_object.cpp: - (StringInstance::getOwnPropertySlot): - (StringInstanceImp::propList): - * kjs/string_object.h: - -2005-12-26 Geoffrey Garen - - Reviewed by mjs. - - - Fixed run-javascriptcore-tests crashes in - KJS::BlockNode::deref - AKA - http://bugs.webkit.org/show_bug.cgi?id=6233 - Reproducible stack-overflow crash in ~RefPtr due to RefPtr use in - linked lists - - This patch does four things: - (1) Standardizes all our linked list nodes to use "next" as their next - pointers. - (2) Creates the ListRefPtr class, a subclass of RefPtr specialized - to iteratively deref "next" pointers. - (3) Standardizes our linked list nodes to use ListRefPtr and - implement the releaseNext() function used by ~ListRefPtr(). - (4) Adds to RefPtr the release() method used by releaseNext(). - - - Modified existing mozilla test to ensure it would make deployment - builds crash as well. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/nodes.cpp: - (ElementNode::evaluate): - (PropertyListNode::evaluate): - (ArgumentListNode::evaluateList): - (StatListNode::StatListNode): - (StatListNode::execute): - (StatListNode::processVarDecls): - (VarDeclListNode::evaluate): - (VarDeclListNode::processVarDecls): - (VarStatementNode::execute): - (VarStatementNode::processVarDecls): - (BlockNode::BlockNode): - (CaseClauseNode::evalStatements): - (CaseClauseNode::processVarDecls): - (ClauseListNode::processVarDecls): - (CaseBlockNode::CaseBlockNode): - (CaseBlockNode::evalBlock): - (SourceElementsNode::SourceElementsNode): - (SourceElementsNode::execute): - (SourceElementsNode::processFuncDecl): - (SourceElementsNode::processVarDecls): - * kjs/nodes.h: - (KJS::ElementNode::ElementNode): - (KJS::ElementNode::releaseNext): - (KJS::ArrayNode::ArrayNode): - (KJS::PropertyListNode::PropertyListNode): - (KJS::PropertyListNode::releaseNext): - (KJS::ObjectLiteralNode::ObjectLiteralNode): - (KJS::ArgumentListNode::ArgumentListNode): - (KJS::ArgumentListNode::releaseNext): - (KJS::ArgumentsNode::ArgumentsNode): - (KJS::StatListNode::releaseNext): - (KJS::VarDeclListNode::VarDeclListNode): - (KJS::VarDeclListNode::releaseNext): - (KJS::VarStatementNode::VarStatementNode): - (KJS::ForNode::ForNode): - (KJS::CaseClauseNode::CaseClauseNode): - (KJS::ClauseListNode::ClauseListNode): - (KJS::ClauseListNode::getClause): - (KJS::ClauseListNode::getNext): - (KJS::ClauseListNode::releaseNext): - (KJS::ParameterNode::ParameterNode): - (KJS::ParameterNode::releaseNext): - (KJS::SourceElementsNode::releaseNext): - * kjs/nodes2string.cpp: - (ElementNode::streamTo): - (PropertyListNode::streamTo): - (ArgumentListNode::streamTo): - (StatListNode::streamTo): - (VarDeclListNode::streamTo): - (VarStatementNode::streamTo): - (CaseClauseNode::streamTo): - (ClauseListNode::streamTo): - (CaseBlockNode::streamTo): - (SourceElementsNode::streamTo): - * kxmlcore/ListRefPtr.h: Added. - (KXMLCore::ListRefPtr::ListRefPtr): - (KXMLCore::ListRefPtr::~ListRefPtr): - (KXMLCore::ListRefPtr::operator=): - * kxmlcore/RefPtr.h: - (KXMLCore::RefPtr::release): - -2005-12-29 Geoffrey Garen - - Reviewed by mjs. - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=4026 - Math.random() not seeded. - - Added call to sranddev() -- it executes the first time a process - calls Math.random(). - - * kjs/math_object.cpp: - (MathFuncImp::callAsFunction): - -2005-12-29 Geoffrey Garen - - Reviewed by darin. - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=6265 - Name change regression: Java doesn't know what JavaJSObject is - - Changed strings passed to Java back to original "JSObject". - - * bindings/jni/jni_jsobject.cpp: - (JavaJSObject::convertValueToJObject): - (JavaJSObject::convertJObjectToValue): - -2005-12-28 Anders Carlsson - - Reviewed by Maciej. - - - The JSC part of http://bugs.webkit.org/show_bug.cgi?id=6268 - Add undetectable document.all - - * kjs/operations.cpp: - (KJS::equal): - When comparing an object with null or undefined, call toPrimitive with - NullType as the preferred type. - -2005-12-27 Anders Carlsson - - Reviewed by Darin. - - * kjs/array_object.cpp: - (ArrayProtoFunc::callAsFunction): - Implement filter and map. Also, make the existing - array iteration functions not invoke the callback for - non-existing properties, just as Mozilla does now. - - * kjs/array_object.h: - (KJS::ArrayProtoFunc::): - Add filter and map. - - * tests/mozilla/expected.html: - Update, two 1.6 tests now pass. - -2005-12-27 Maciej Stachowiak - - - updated test results for new JS 1.6 tests - - * tests/mozilla/expected.html: - -2005-12-27 Anders Carlsson - - Reviewed by Maciej. - - Add Mozilla JS 1.6 tests. - - * tests/mozilla/js1_6/Array/browser.js: Added. - * tests/mozilla/js1_6/Array/regress-290592.js: Added. - * tests/mozilla/js1_6/Array/regress-304828.js: Added. - * tests/mozilla/js1_6/Array/regress-305002.js: Added. - * tests/mozilla/js1_6/Array/regress-310425-01.js: Added. - * tests/mozilla/js1_6/Array/regress-310425-02.js: Added. - * tests/mozilla/js1_6/Array/regress-320887.js: Added. - * tests/mozilla/js1_6/Array/shell.js: Added. - * tests/mozilla/js1_6/README: Added. - * tests/mozilla/js1_6/Regress/browser.js: Added. - * tests/mozilla/js1_6/Regress/regress-301574.js: Added. - * tests/mozilla/js1_6/Regress/regress-309242.js: Added. - * tests/mozilla/js1_6/Regress/regress-311157-01.js: Added. - * tests/mozilla/js1_6/Regress/regress-311157-02.js: Added. - * tests/mozilla/js1_6/Regress/regress-314887.js: Added. - * tests/mozilla/js1_6/Regress/regress-320172.js: Added. - * tests/mozilla/js1_6/Regress/shell.js: Added. - * tests/mozilla/js1_6/String/browser.js: Added. - * tests/mozilla/js1_6/String/regress-306591.js: Added. - * tests/mozilla/js1_6/String/shell.js: Added. - * tests/mozilla/js1_6/browser.js: Added. - * tests/mozilla/js1_6/shell.js: Added. - * tests/mozilla/js1_6/template.js: Added. - -2005-12-27 Maks Orlovich - - Reviewed and landed by Maciej. - - - fixed 6234: Can delete array index property incorrectly. - http://bugs.webkit.org/show_bug.cgi?id=6234 - - * kjs/array_object.cpp: - (ArrayInstance::deleteProperty): use toArrayIndex instead of toUInt32 when - looking for array properties. - -2005-12-27 Anders Carlsson - - Reviewed by Maciej. - - * kjs/object.cpp: - (KJS::JSObject::defineSetter): - Remove duplicate call to putDirect. - -2005-12-26 Maciej Stachowiak - - Reviewed by Darin and Geoff. - - Changes by me and Anders. - - - mostly fixed REGRESSION: 5-10% performance regression on JS iBench from getter/setter change - http://bugs.webkit.org/show_bug.cgi?id=6083 - - - also fixed some warnings reported by -Winline - - * JavaScriptCorePrefix.h: Move new and delete definitions higher so there - aren't conflicts with use in standard C++ headers - * kjs/object.cpp: - (KJS::throwSetterError): Moved this piece of put into a seprate function - to avoid the PIC branch. - (KJS::JSObject::put): Use hasGetterSetterProperties to avoid expensive stuff - when not needed. Also use GetterSetter properties attribute. - (KJS::JSObject::deleteProperty): Recompute whether any properties are getter/setter - properties any more, if this one was one. - (KJS::JSObject::defineGetter): Let the PropertyMap know that it has getter/setter - properties now (and use the new attribute). - (KJS::JSObject::defineSetter): Ditto. - (KJS::JSObject::fillGetterPropertySlot): Out-of-line helper for getOwnPropertySlot, - to avoid global variable access in the hot code path. - * kjs/object.h: - (KJS::): Added GetterSetter attribute. - (KJS::JSCell::isObject): Moved lower to be after inline methods it uses. - (KJS::JSValue::isObject): ditto - (KJS::JSObject::getOwnPropertySlot): try to avoid impact of getters and setters - as much as possible in the case where they are not being used - * kjs/property_map.cpp: - (KJS::PropertyMap::containsGettersOrSetters): New method to help with this - * kjs/property_map.h: - (KJS::PropertyMap::hasGetterSetterProperties): Ditto - (KJS::PropertyMap::setHasGetterSetterProperties): Ditto - (KJS::PropertyMap::PropertyMap): Added a crazy hack to store the - global "has getter/setter properties" flag in the property map - single entry, to avoid making objects any bigger. - * kjs/value.h: Moved some things to object.h to make -Winline happier - -2005-12-24 Maciej Stachowiak - - Reviewed by Eric and Dave Hyatt. - - - make even const PassRefPtrs give transfer of ownership semantics - http://bugs.webkit.org/show_bug.cgi?id=6238 - - This is a somewhat cheesy change. Having to use PassRefPtr_Ref creates ambiguities - in assignment and copy construction. And this makes life way easier and removes - the need for pass(). It is not really correct, but we pretty much never need a real - const PassRefPtr, and this takes care of things for PassRefPtr temporaries. - - * kjs/identifier.cpp: - (KJS::Identifier::add): No more need for pass() - * kjs/property_map.cpp: - (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): No more need for pass() - * kjs/ustring.cpp: - (KJS::UString::Rep::create): Use adoptRef - (KJS::UString::UString): No more need for pass - (KJS::UString::append): No more need for pass - (KJS::UString::substr): No more need for pass - * kxmlcore/PassRefPtr.h: made m_ptr mutable (ugh) - (KXMLCore::PassRefPtr::PassRefPtr): Take a const PassRefPtr reference - (KXMLCore::PassRefPtr::release): Made this a const method (ugh) - (KXMLCore::PassRefPtr::operator=): clean up appropriately - (KXMLCore::adoptRef): Added this to use instead of PassRefPtr::adopt, I think - it makes the behavior more clear and it is less verbose. - (KXMLCore::static_pointer_cast): use adoptRef - (KXMLCore::const_pointer_cast): use adoptRef - * kxmlcore/RefPtr.h: - (KXMLCore::RefPtr::RefPtr): take const PassRefPtr& - (KXMLCore::PassRefPtr::operator=): take const PassRefPtr& - -2005-12-25 Eric Seidel - - Reviewed by mjs. - - Unbreak HashTableConstIterator++ by returning const_iterator - - * kxmlcore/HashTable.h: - (KXMLCore::HashTableConstIterator::operator++): use const_iterator - -2005-12-25 Eric Seidel - - Reviewed by mjs. - - Un-break HashTable copy constructor. - - * kxmlcore/HashTable.h: - (KXMLCore::::HashTable): use const_iterator instead - -2005-12-23 Maciej Stachowiak - - Reviewed by Eric. - - - fixed "HashMap does not work with const pointer keys or values" - http://bugs.webkit.org/show_bug.cgi?id=6222 - - * kxmlcore/HashMapPtrSpec.h: - (KXMLCore::HashMap): In all methods, explicitly cast all pointers - to void * before passing to internal implementation. Use C-style - casts instead of new-style casts, because the real solution would - require a combo of reinterpret_cast anc const_cast. - - -2005-12-23 Maciej Stachowiak - - - this time for sure - - * kxmlcore/RefPtr.h: - (KXMLCore::::swap): - -2005-12-22 Maciej Stachowiak - - - fix build problem from last commit. - - * kxmlcore/RefPtr.h: - (KXMLCore::::swap): - -2005-12-21 Maciej Stachowiak - - Reviewed by Darin. - - - Make HashMap/HashSet support non-POD types - http://bugs.webkit.org/show_bug.cgi?id=5332 - - The changes for support are relatively simple, but I also made extensive changes to - avoid copying, so that there isn't refcount thrash when you put RefPtrs into a HashMap. - - * kxmlcore/HashTable.h: - (KXMLCore::swap): specialize swap for pairs, to swap elements individually, - so that excess copies can be avoided. - (KXMLCore::Mover::move): Template function to either copy or swap, used - when transferring elements from old table to new. - (KXMLCore::IdentityHashTranslator::hash): The old "converting lookup" templates - that took two or three function parameters now take a class parameter, this is - the class used to do a normal lookup. - (KXMLCore::IdentityHashTranslator::equal): Ditto. - (KXMLCore::IdentityHashTranslator::translate): Ditto. Translate now takes a reference - to write into instead of returning a value to avoid redundant copies. - (KXMLCore::HashTable::~HashTable): Use deallocateTable instead of freeing directly. - (KXMLCore::HashTable::insert): Based on HashTranslator now instead of separate - functions. Added a FIXME about a remaining rare excess copy. - (KXMLCore::HashTable::isEmptyBucket): Use KeyTraits directly instead of unwrapping - the key from Traits, to avoid creating and destroying pair, which copies. - (KXMLCore::HashTable::isDeletedBucket): ditto - (KXMLCore::HashTable::lookup): Use HashTranslator now instead of separate functions. - (KXMLCore::HashTable::initializeBucket): Renamed from emptyBucket. Use placement new to - work right for non-POD types. - (KXMLCore::HashTable::deleteBucket): Use assignDeleted to avoid excess copies. - (KXMLCore::HashTable::reinsert): use Mover template to copy or swap as appropriate - (KXMLCore::HashTable::allocateTable): Initialize every bucket if calloc won't do. - (KXMLCore::HashTable::deallocateTable): Destruct every bucket if needed. - (KXMLCore::HashTable::rehash): Avoid copy before reinserting, so that swap can do its magic. - (KXMLCore::HashTable::clear): use deallocateTable instead of freeing directly. - (KXMLCore::HashTable::HashTable): be more dumb when copying to ensure that non-POD types - work right - * kxmlcore/HashFunctions.h: - (KXMLCore::PointerHash): Specialize PointerHash for RefPtr - * kxmlcore/HashMap.h: - (KXMLCore::extractFirst): Return a reference not a full object to avoid - copies. - (KXMLCore::HashMapTranslator::hash): Use a special translator for insertion - to defer making the pair as long as possible, thus avoiding needless copies. - (KXMLCore::HashMapTranslator::equal): ditto - (KXMLCore::HashMapTranslator::translate): ditto - (KXMLCore::::inlineAdd): Shared by set and add to insert using HashMapTranslator - (KXMLCore::::set): Use inlineAdd - (KXMLCore::::add): Use inlineAdd - * kxmlcore/HashMapPtrSpec.h: - (KXMLCore::): Pass KeyTraits along - * kxmlcore/HashSet.h: - (KXMLCore::identityExtract): Return a reference not a full object to avoid copies. - (KXMLCore::HashSetTranslatorAdapter::hash): Redo adapter stuff to work with - the new HashTranslator approach. - (KXMLCore::HashSetTranslatorAdapter::equal): ditto - (KXMLCore::HashSetTranslatorAdapter::translate): ditto - (KXMLCore::::insert): ditto - * kxmlcore/HashTraits.h: - (KXMLCore::GenericHashTraits): This is intended be used as a base class for - customized traits: sensible defaults. - (KXMLCore::): Use it a bunch - (KXMLCore::assignDeleted): template function to allow pairs to be assigned the - deleted value w/o excess copies. - (KXMLCore::PairHashTraits::emptyValue): Updated - (KXMLCore::PairHashTraits::deletedValue): Updated - (KXMLCore::PairHashTraits::assignDeletedValue): part of assignDeleted hack - (KXMLCore::DeletedValueAssigner::assignDeletedValue): Use template magic - to either use use deletedValue or assignDeletedValue for the cases where we care. - * kxmlcore/RefPtr.h: - (KXMLCore::RefPtr::swap): Added swap method. - (KXMLCore::swap): Added swap free function. - * kjs/identifier.cpp: - (KJS::CStringTranslator::hash): Use new HashTranslator class approach to - alternate type based insertion. - (KJS::CStringTranslator::equal): ditto - (KJS::CStringTranslator::translate): ditto - (KJS::Identifier::add): ditto - (KJS::UCharBufferTranslator::hash): ditto - (KJS::UCharBufferTranslator::equal): ditto - (KJS::UCharBufferTranslator::translate): ditto - - - irrelevant change: - - * kjs/array_object.cpp: - (ArrayProtoFunc::callAsFunction): Removed a stray space. - -2005-12-22 Anders Carlsson - - Reviewed by Eric and Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=6196 - Would like to be able to define prototypes in headers - - * kjs/lookup.h: - Move ClassName from KJS_DECLARE_PROTOTYPE to KJS_IMPLEMENT_PROTOTYPE. - Also, namespace all macros by prefixing them with KJS_. - -2005-12-22 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=6191 - RefPtr/PassRefPtr have a leak issue, operator== issues - - * kxmlcore/PassRefPtr.h: - (KXMLCore::PassRefPtr::PassRefPtr): Remove non-template constructor that takes RefPtr - since the constructor template that takes RefPtr should be sufficient. Add a constructor - template that takes PassRefPtr&. - (KXMLCore::PassRefPtr::adopt): Use PassRefPtr_Ref to avoid setting pointer first to - 0 and then to the pointer. - (KXMLCore::PassRefPtr::operator=): Added template versions that take PassRefPtr& and - RefPtr parameters. - (KXMLCore::PassRefPtr::operator PassRefPtr): Changed to fix leak -- old version - would release and then ref. - (KXMLCore::operator==): Make templates have two parameters so you can mix types. - Also remove unneeded const in raw pointer versions. - (KXMLCore::operator!=): Ditto. - - * kxmlcore/RefPtr.h: - (KXMLCore::RefPtr::RefPtr): Add constructor template that takes PassRefPtr. - (KXMLCore::RefPtr::operator=): Add assignment operator templates that take - RefPtr and PassRefPtr. - (KXMLCore::operator==): Make templates have two parameters so you can mix types. - Also remove unneeded const in raw pointer versions. - (KXMLCore::operator!=): Ditto. - -2005-12-21 Timothy Hatcher - - * JavaScriptCore.xcodeproj/project.pbxproj: - Set tab width to 8, indent width to 4 and uses tabs to false per file. - -2005-12-21 Geoffrey Garen - - Reviewed by Darin. - - Removed evil hack for determining if a type is an integer, replaced - with template metaprogramming. - - * JavaScriptCore.xcodeproj/project.pbxproj: Set tab size to 2 for - testkjs.cpp - * kjs/testkjs.cpp: - (main): Inserted asserts to test IsInteger. FIXME: Move these to - KXMLCore unit tests directory when we create one. - * kxmlcore/HashTraits.h: - (KXMLCore::): Added IsInteger class for querying types. - -2005-12-20 Maciej Stachowiak - - Reviewed by Darin. - - - made ALWAYS_INLINE declare things inline as well as __attribute__((always_inline)) - http://bugs.webkit.org/show_bug.cgi?id=6159 - - * kxmlcore/AlwaysInline.h: - -2005-12-19 Maciej Stachowiak - - Reviewed by Darin. - - - fixed a leak in the assignment operator from PassRefPtr to RefPtr - http://bugs.webkit.org/show_bug.cgi?id=6158 - - * kxmlcore/RefPtr.h: - (KXMLCore::RefPtr::operator=): - - - fix problem with PassRefPtr that darin spotted - it lacked a copy constructor - and therefore was using the default one, which can lead to excess derefs - - I fixed this by adding a copy constructor from non-const - reference, and by adding a template pass() function that you have - to use when raw pointer or RefPtr are passed where PassRefPtr is - expected. - - * kjs/identifier.cpp: - (KJS::Identifier::add): Changed to have PassRefPtr return type and - pass() the results. - * kjs/identifier.h: - * kjs/property_map.cpp: - (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): Use pass() - where required. - * kjs/ustring.cpp: - (KJS::UString::UString): Use pass() as needed. - (KJS::UString::append): ditto - (KJS::UString::substr): ditto - * kjs/ustring.h: - (KJS::UString::UString): Use initializer instead of assignment - * kxmlcore/PassRefPtr.h: - (KXMLCore::PassRefPtr::PassRefPtr): Added copy constructor - (KXMLCore::pass): new template function to make it convenient to pass - a PassRefPtr - -2005-12-19 Geoffrey Garen - - Reviewed by Maciej. - - Fixed Missing return statement in - JSMethodNameToObjcMethodName. - - JSMethodNameToObjcMethodName had a check for a name being too long, but - the check was missing a return statement. - - A lot of this code was confusing and some of it was wrong, so I fixed - it up, added some asserts to catch this type of bug in the future, - changed some comments, and renamed some variables. - - The two advantages of the new algorithm are (1) It makes writing past - the end of the buffer virtually impossible because the test on the main - loop is "while (not past end of buffer)" and (2) It's twice as fast - because it doesn't call strlen. (There's no need to call strlen when - we're walking the string ourselves.) - - methodsNamed also supports arbitrary-length method names now. Just in - case the AppKit folks start getting REALLY verbose... - - * bindings/objc/objc_class.mm: - (KJS::Bindings::ObjcClass::methodsNamed): - * bindings/objc/objc_utility.h: - * bindings/objc/objc_utility.mm: - (KJS::Bindings::JSMethodNameToObjcMethodName): - -2005-12-19 Darin Adler - - Originally done by both George Staikos and Alexey Proskuryakov. - - - fix http://bugs.webkit.org/show_bug.cgi?id=5706 - Sharedptr dependency can be removed - - Our coding guidelines say "use 0 instead of NULL" and both RefPtr and - PassRefPtr were using NULL, which required including a header that - defines NULL. - - * kxmlcore/PassRefPtr.h: - (KXMLCore::PassRefPtr::PassRefPtr): Use 0 instead of NULL. - (KXMLCore::PassRefPtr::operator!): Use ! instead of == NULL. - * kxmlcore/RefPtr.h: - (KXMLCore::RefPtr::RefPtr): Use 0 instead of NULL. - (KXMLCore::RefPtr::operator!): Use ! instead of == NULL. - Also did some reformatting. - -2005-12-19 Darin Adler - - Reviewed by Geoff Garen and Eric Seidel. - - - fix http://bugs.webkit.org/show_bug.cgi?id=4923 - stop using in WebCore, eliminating the troubles it causes - - * kjs/simple_number.h: Removed many unnecessary includes, including - the one to work around GCC library header bugs. We may have to - add some includes elsewhere for platforms other than OS X, since our - prefix header takes care of some things. - - * kxmlcore/AlwaysInline.h: Added. Now clients that don't include - simple_number.h can still get the ALWAYS_INLINE macro. - * JavaScriptCore.xcodeproj/project.pbxproj: Added AlwaysInline.h. - - * bindings/NP_jsobject.h: Removed a lot of unnecessary includes - and removed C-specific stuff from this C++-only header. - * bindings/jni/jni_jsobject.h: Removed a lot of unnecessary includes - and did some reformatting. - * bindings/objc/objc_runtime.h: Removed an unnecessary include. - * bindings/runtime.h: Removed some unneeded includes. Reformatted. - * bindings/runtime.cpp: Updated to compile with header changes, - including a lot of reformatting. - * bindings/runtime_object.h: Removed an unnecessary include. - -2005-12-13 Maciej Stachowiak - - Reviewed by Geoff and Adele - - - replaced custom Identifier hashtable with HashSet - - * kjs/identifier.cpp: - (KXMLCore::): - (KJS::identifierTable): - (KJS::Identifier::equal): - (KJS::hash): - (KJS::equal): - (KJS::convert): - (KJS::Identifier::add): - (KJS::Identifier::remove): - * kjs/identifier.h: - * kjs/internal.cpp: - (KJS::InterpreterImp::initGlobalObject): - -2005-12-18 Justin Haygood - - Reviewed, tweaked, and landed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=5227 - Array indexOf() extension for JavaScript 1.5 Core - - * kjs/array_object.h: - * kjs/array_object.cpp: (ArrayProtoFunc::callAsFunction): Added implementation of indexOf. - -2005-12-18 Anders Carlsson - - Reviewed by Darin and Geoffrey. - - - fix for - Object.prototype is missing isPrototypeOf - - * kjs/object_object.cpp: - (ObjectPrototype::ObjectPrototype): - Add isPrototypeOf to object prototype. - - (ObjectProtoFunc::callAsFunction): - Implement isPrototypeOf - - * kjs/object_object.h: - (KJS::ObjectProtoFunc::): - Add id for isPrototypeOf. - -2005-12-17 Geoffrey Garen - - Reviewed by Darin. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=6119 - split() function ignores case insensitive modifier. - - Glossary: - RegExpImp: The C++ object you get when JavaScript executes - "new RegExp()". - RegExp: A C++ wrapper object that performs regular expression - matching on behalf of a RegExpImp. - - Instead of unnecessarily constructing a RegExp which (wrongly) lacks - any modifiers, String.split() now uses the RegExp built in to the - RegExpImp passed to it, which has the right modifiers already. - - I also cleaned up other bits of the string code to standardized how - we handle RegExpImp arguments. - - * ChangeLog: - * kjs/string_object.cpp: - (replace): - (StringProtoFunc::callAsFunction): - -2005-12-16 David Hyatt - - Remove unused RefPtr constructors that can create an ambiguity in ustring on some platforms. - - Reviewed by mjs - - * kxmlcore/RefPtr.h: - (KXMLCore::RefPtr::RefPtr): - -2005-12-15 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=5688 - speed up JavaScript parsing by not creating a UString just to parse - - * kjs/internal.h: - * kjs/internal.cpp: (KJS::InterpreterImp::evaluate): Change to take a character pointer - and length rather than a UString. - - * kjs/interpreter.h: - * kjs/interpreter.cpp: (Interpreter::evaluate): Ditto. - - * kjs/protect.h: Remove uneeded "convert to bool" operator since we already have a - "convert to raw pointer" operator in this class. - -=== Safari-521~5 === - -2005-12-13 Geoffrey Garen - - Updated test results to match Anders's last fix. - - * tests/mozilla/expected.html: - -2005-12-13 Anders Carlsson - - * ChangeLog: Add titles for my bugzilla bugs. - -2005-12-13 Anders Carlsson - - Reviewed by Darin. - - - Fixes - Support property getters and setters. - - * bindings/runtime_array.cpp: - (RuntimeArray::lengthGetter): - (RuntimeArray::indexGetter): - * bindings/runtime_array.h: - * bindings/runtime_method.cpp: - (RuntimeMethod::lengthGetter): - * bindings/runtime_method.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::fallbackObjectGetter): - (RuntimeObjectImp::fieldGetter): - (RuntimeObjectImp::methodGetter): - * bindings/runtime_object.h: - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstance::lengthGetter): - (getProperty): - Update for changes to PropertySlot::getValue and - PropertySlot::GetValueFunc. - - * kjs/collector.cpp: - (KJS::className): - Handle GetterSetterType. - - * kjs/function.cpp: - (KJS::FunctionImp::argumentsGetter): - (KJS::FunctionImp::lengthGetter): - (KJS::Arguments::mappedIndexGetter): - (KJS::ActivationImp::argumentsGetter): - * kjs/function.h: - Update for changes to PropertySlot::getValue and - PropertySlot::GetValueFunc. - - * kjs/grammar.y: - Rework grammar parts for get set declarations directly - in the object literal. - - * kjs/internal.cpp: - (KJS::GetterSetterImp::mark): - (KJS::GetterSetterImp::toPrimitive): - (KJS::GetterSetterImp::toBoolean): - (KJS::GetterSetterImp::toNumber): - (KJS::GetterSetterImp::toString): - (KJS::GetterSetterImp::toObject): - Add type conversion functions. These aren't meant to be called. - - (KJS::printInfo): - Handle GetterSetterType. - - * kjs/lookup.h: - (KJS::staticFunctionGetter): - (KJS::staticValueGetter): - Update for changes to PropertySlot::GetValueFunc. - - * kjs/nodes.cpp: - Refactor they way properties nodes are implemented. - We now have a PropertyListNode which is a list of PropertyNodes. - Each PropertyNode has a name (which is a PropertyNameNode) and an associated - value node. PropertyNodes can be of different types. The Constant type is the - old constant declaration and the Getter and Setter types are for property getters - and setters. - (ResolveNode::evaluate): - Update for changes to PropertySlot::getValue. - - (PropertyListNode::evaluate): - Go through all property nodes and set them on the newly created object. If the - property nodes are of type Getter or Setter, define getters and setters. Otherwise, - just add the properties like before. - - (PropertyNode::evaluate): - This should never be called directly. - - (PropertyNameNode::evaluate): - Rename from PropertyNode::evaluate. - - (FunctionCallResolveNode::evaluate): - (FunctionCallBracketNode::evaluate): - (FunctionCallDotNode::evaluate): - (PostfixResolveNode::evaluate): - (PostfixBracketNode::evaluate): - (PostfixDotNode::evaluate): - (TypeOfResolveNode::evaluate): - (PrefixResolveNode::evaluate): - (PrefixBracketNode::evaluate): - (PrefixDotNode::evaluate): - (AssignResolveNode::evaluate): - (AssignDotNode::evaluate): - (AssignBracketNode::evaluate): - Update for changes to PropertySlot::getValue. - - * kjs/nodes.h: - (KJS::PropertyNameNode::PropertyNameNode): - Rename from PropertyNode. - - (KJS::PropertyNode::): - (KJS::PropertyNode::PropertyNode): - New class, representing a single property. - - (KJS::PropertyListNode::PropertyListNode): - Rename from PropertyValueNode. - - (KJS::FuncExprNode::FuncExprNode): - Put ParameterNode parameter last, and make it optional. - - (KJS::ObjectLiteralNode::ObjectLiteralNode): - Use a PropertyListNode here now. - - * kjs/nodes2string.cpp: - (PropertyListNode::streamTo): - Iterate through all property nodes. - - (PropertyNode::streamTo): - Print out the name and value. Doesn't handle getters and setters currently. - - (PropertyNameNode::streamTo): - Rename from PropertyNode::streamTo. - - * kjs/object.cpp: - (KJS::JSObject::get): - Update for changes to PropertySlot::getValue. - - (KJS::JSObject::put): - If the property already exists and has a Setter, invoke - the setter function instead of setting the property directly. - - (KJS::JSObject::defineGetter): - (KJS::JSObject::defineSetter): - New functions for defining property getters and setters on the object. - - * kjs/object.h: - (KJS::GetterSetterImp::type): - (KJS::GetterSetterImp::GetterSetterImp): - (KJS::GetterSetterImp::getGetter): - (KJS::GetterSetterImp::setGetter): - (KJS::GetterSetterImp::getSetter): - (KJS::GetterSetterImp::setSetter): - New class for properties which have getters and setters defined. - This class is only used internally and should never be seen from the outside. - - (KJS::JSObject::getOwnPropertySlot): - If the property is a getter, call setGetterSlot on the property slot. - - * kjs/object_object.cpp: - (ObjectPrototype::ObjectPrototype): - Add __defineGetter__, __defineSetter, __lookupGetter__, __lookupSetter__ - to prototype. - - (ObjectProtoFunc::callAsFunction): - Implement handlers for new functions. - - * kjs/object_object.h: - (KJS::ObjectProtoFunc::): - Add ids for new functions. - - * kjs/property_slot.cpp: - (KJS::PropertySlot::undefinedGetter): - Update for changes to PropertySlot::GetValueFunc. - - (KJS::PropertySlot::functionGetter): - Call the function getter object and return its value. - - * kjs/property_slot.h: - (KJS::PropertySlot::getValue): - Add a new argument which is the original object that - getPropertySlot was called on. - - (KJS::PropertySlot::setGetterSlot): - (KJS::PropertySlot::): - New function which sets a getter slot. When getValue is called on a - getter slot, the getter function object is invoked. - - * kjs/string_object.cpp: - (StringInstance::lengthGetter): - (StringInstance::indexGetter): - * kjs/string_object.h: - Update for changes to PropertySlot::GetValueFunc. - - * kjs/value.h: - (KJS::): - Add GetterSetterType and make GetterSetterImp a friend class of JSCell. - -2005-12-12 Maciej Stachowiak - - Reviewed by Eric. - - - added a new HashCountedSet class for the common pattern of mapping items to counts that can change - - * kxmlcore/HashCountedSet.h: Added. - (KXMLCore::HashCountedSet::*): Implemented, on top of HashMap. - * kxmlcore/HashMap.h: - (KXMLCore::HashMap::add): New method - does not replace existing value if key already present - but otherwise like set(). - (KXMLCore::HashMap::set): Improved comments. - * kxmlcore/HashMapPtrSpec.h: - (KXMLCore::HashMap::add): Added to specializations too. - * JavaScriptCore.xcodeproj/project.pbxproj: Add new file. - * kxmlcore/HashFunctions.h: Added include of stdint.h - - - replaced the custom hashtable for values protected from GC with HashCountedSet - - * kjs/collector.cpp: - (KJS::Collector::protect): Moved code here from ProtectedValues::increaseProtectCount - since the code is so simple now. - (KJS::Collector::unprotect): Ditto for ProtectedValues::decreaseProtectCount. - (KJS::Collector::markProtectedObjects): Updated for new way of doing things, now - simpler and safer. - (KJS::Collector::numReferencedObjects): ditto - (KJS::Collector::rootObjectClasses): ditto - * kjs/collector.h: Added protect and unprotect static methods - * kjs/protect.h: - (KJS::gcProtect): Updated for removal of ProtectedValues class - (KJS::gcUnprotect): likewise - * kjs/protected_values.cpp: Removed. - * kjs/protected_values.h: Removed. - -2005-12-10 Darin Adler - - Rubber stamped by Maciej. - - - did long-promised KJS renaming: - - ValueImp -> JSValue - ObjectImp -> JSObject - AllocatedValueImp -> JSCell - - A renaming to get a class out of the way - - KJS::Bindings::JSObject -> JavaJSObject - - and some other "imp-reduction" renaming - - *InstanceImp -> *Instance - *ProtoFuncImp -> *ProtoFunc - *PrototypeImp -> *Prototype - ArgumentsImp -> Arguments - RuntimeArrayImp -> RuntimeArray - RuntimeMethodImp -> RuntimeMethod - - * most files and functions - -2005-12-10 Darin Adler - - Reviewed by Maciej. - - - eliminated the old Undefined(), Null(), Boolean(), Number(), and String() - - Code now uses jsUndefined(), jsNull(), jsBoolean(), jsNumber(), and jsString(). - - * bindings/NP_jsobject.cpp: - (_NPN_Evaluate): - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::invokeMethod): - (KJS::Bindings::CInstance::invokeDefaultMethod): - * bindings/c/c_runtime.cpp: - (CField::valueFromInstance): - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertNPVariantToValue): - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - (JavaInstance::invokeDefaultMethod): - * bindings/jni/jni_jsobject.cpp: - (JSObject::eval): - (JSObject::convertJObjectToValue): - * bindings/jni/jni_runtime.cpp: - (JavaArray::convertJObjectToArray): - (JavaField::valueFromInstance): - (JavaArray::valueAt): - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (-[WebScriptObject evaluateWebScript:]): - (-[WebScriptObject valueForKey:]): - (-[WebScriptObject webScriptValueAtIndex:]): - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - (ObjcInstance::invokeDefaultMethod): - (ObjcInstance::getValueOfUndefinedField): - * bindings/objc/objc_runtime.mm: - (ObjcField::valueFromInstance): - (ObjcFallbackObjectImp::callAsFunction): - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertNSStringToString): - (KJS::Bindings::convertObjcValueToValue): - * bindings/runtime.h: - (KJS::Bindings::Class::fallbackObject): - (KJS::Bindings::Instance::getValueOfUndefinedField): - (KJS::Bindings::Instance::valueOf): - * bindings/runtime_array.cpp: - (RuntimeArrayImp::lengthGetter): - * bindings/runtime_method.cpp: - (RuntimeMethodImp::lengthGetter): - (RuntimeMethodImp::callAsFunction): - (RuntimeMethodImp::execute): - * kjs/array_object.cpp: - (ArrayInstanceImp::lengthGetter): - (CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments): - (ArrayPrototypeImp::ArrayPrototypeImp): - (ArrayProtoFuncImp::ArrayProtoFuncImp): - (ArrayProtoFuncImp::callAsFunction): - (ArrayObjectImp::ArrayObjectImp): - * kjs/bool_object.cpp: - (BooleanPrototypeImp::BooleanPrototypeImp): - (BooleanProtoFuncImp::callAsFunction): - (BooleanObjectImp::BooleanObjectImp): - (BooleanObjectImp::callAsFunction): - * kjs/error_object.cpp: - (ErrorPrototypeImp::ErrorPrototypeImp): - (ErrorProtoFuncImp::ErrorProtoFuncImp): - (ErrorProtoFuncImp::callAsFunction): - (ErrorObjectImp::ErrorObjectImp): - (NativeErrorImp::NativeErrorImp): - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - (KJS::FunctionImp::processParameters): - (KJS::FunctionImp::argumentsGetter): - (KJS::FunctionImp::lengthGetter): - (KJS::DeclaredFunctionImp::execute): - (KJS::encode): - (KJS::decode): - (KJS::GlobalFuncImp::callAsFunction): - * kjs/function_object.cpp: - (FunctionPrototypeImp::FunctionPrototypeImp): - (FunctionPrototypeImp::callAsFunction): - (FunctionProtoFuncImp::callAsFunction): - (FunctionObjectImp::FunctionObjectImp): - * kjs/internal.cpp: - (KJS::InterpreterImp::initGlobalObject): - * kjs/interpreter.h: - * kjs/lookup.h: - * kjs/math_object.cpp: - (MathObjectImp::getValueProperty): - (MathFuncImp::callAsFunction): - * kjs/nodes.cpp: - (Node::setExceptionDetailsIfNeeded): - (NullNode::evaluate): - (PropertyNode::evaluate): - (FunctionCallBracketNode::evaluate): - (FunctionCallDotNode::evaluate): - (PostfixBracketNode::evaluate): - (PostfixDotNode::evaluate): - (VoidNode::evaluate): - (PrefixBracketNode::evaluate): - (PrefixDotNode::evaluate): - (ShiftNode::evaluate): - (valueForReadModifyAssignment): - (AssignDotNode::evaluate): - (AssignBracketNode::evaluate): - (VarDeclNode::evaluate): - (VarDeclNode::processVarDecls): - (VarDeclListNode::evaluate): - (ReturnNode::execute): - (CaseClauseNode::evalStatements): - (ParameterNode::evaluate): - (FuncDeclNode::processFuncDecl): - * kjs/nodes.h: - (KJS::StatementNode::evaluate): - * kjs/number_object.cpp: - (NumberPrototypeImp::NumberPrototypeImp): - (NumberProtoFuncImp::callAsFunction): - (NumberObjectImp::NumberObjectImp): - (NumberObjectImp::getValueProperty): - (NumberObjectImp::callAsFunction): - * kjs/object.cpp: - (KJS::ObjectImp::get): - (KJS::Error::create): - * kjs/object_object.cpp: - (ObjectPrototypeImp::ObjectPrototypeImp): - (ObjectProtoFuncImp::callAsFunction): - (ObjectObjectImp::ObjectObjectImp): - * kjs/property_slot.cpp: - (KJS::PropertySlot::undefinedGetter): - * kjs/regexp_object.cpp: - (RegExpPrototypeImp::RegExpPrototypeImp): - (RegExpProtoFuncImp::callAsFunction): - (RegExpObjectImp::RegExpObjectImp): - (RegExpObjectImp::arrayOfMatches): - (RegExpObjectImp::getBackref): - (RegExpObjectImp::getLastMatch): - (RegExpObjectImp::getLastParen): - (RegExpObjectImp::getLeftContext): - (RegExpObjectImp::getRightContext): - (RegExpObjectImp::getValueProperty): - (RegExpObjectImp::construct): - * kjs/string_object.cpp: - (StringInstanceImp::StringInstanceImp): - (StringPrototypeImp::StringPrototypeImp): - (replace): - (StringProtoFuncImp::callAsFunction): - (StringObjectImp::StringObjectImp): - (StringObjectImp::callAsFunction): - (StringObjectFuncImp::StringObjectFuncImp): - (StringObjectFuncImp::callAsFunction): - * kjs/testkjs.cpp: - (TestFunctionImp::callAsFunction): - (VersionFunctionImp::callAsFunction): - * kjs/value.h: - -2005-12-10 Oliver Hunt - - Reviewed by Maciej, landed by Darin. - - - fix http://bugs.webkit.org/show_bug.cgi?id=3539 - Array join and toString methods do not support circular references - - * kjs/array_object.cpp: (ArrayProtoFuncImp::callAsFunction): - Added set of visited objects -- don't recurse if item is already in the set. - -2005-12-08 Maciej Stachowiak - - Reviewed by John. - - - fix major memory leak and resultant slowdown on JavaScript iBench from - my PassRefPtr changes - - * kjs/ustring.cpp: - (KJS::UString::Rep::create): I forgot to change one of the two overloads to create - with a refcount of 0 instead of 1 (the smart pointer then bumps it. But instead of - changing it, I changed both to start with a refcounter of 1 and use PassRefPtr::adopt - to adopt the initial refcount, this may be a hair more efficient. - - - made the assignment operators for smart pointers inline because Shark said so - - * kxmlcore/PassRefPtr.h: - (KXMLCore::::operator=): - * kxmlcore/RefPtr.h: - (KXMLCore::::operator=): - -2005-12-06 Anders Carlsson - - Reviewed by Darin. - - - fix build when using gcc 4 - - * kjs/ustring.h: - Make Rep public. - - * kxmlcore/PassRefPtr.h: - (KXMLCore::::operator): - Fix a typo. - -2005-12-05 Maciej Stachowiak - - Reviewed by Eric. - - - add PassRefPtr, a smart pointer class that works in conjunction - with RefPtr but has transfer-of-ownership semantics - - apply RefPtr and PassRefPtr to UString - - cleaned up UString a little so that it doesn't need to have so many friend classes - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/identifier.cpp: - (KJS::Identifier::add): - * kjs/identifier.h: - (KJS::Identifier::Identifier): - (KJS::Identifier::equal): - * kjs/property_map.cpp: - (KJS::PropertyMap::get): - (KJS::PropertyMap::getLocation): - (KJS::PropertyMap::put): - (KJS::PropertyMap::remove): - * kjs/ustring.cpp: - (KJS::UCharReference::operator=): - (KJS::UCharReference::ref): - (KJS::UString::Rep::createCopying): - (KJS::UString::Rep::create): - (KJS::UString::usedCapacity): - (KJS::UString::usedPreCapacity): - (KJS::UString::expandCapacity): - (KJS::UString::expandPreCapacity): - (KJS::UString::UString): - (KJS::UString::spliceSubstringsWithSeparators): - (KJS::UString::append): - (KJS::UString::operator=): - (KJS::UString::toStrictUInt32): - (KJS::UString::substr): - (KJS::UString::copyForWriting): - (KJS::operator==): - * kjs/ustring.h: - (KJS::UString::UString): - (KJS::UString::~UString): - (KJS::UString::data): - (KJS::UString::isNull): - (KJS::UString::isEmpty): - (KJS::UString::size): - (KJS::UString::rep): - * kxmlcore/RefPtr.h: - (KXMLCore::RefPtr::RefPtr): - (KXMLCore::RefPtr::operator*): - (KXMLCore::::operator): - (KXMLCore::operator==): - (KXMLCore::operator!=): - (KXMLCore::static_pointer_cast): - (KXMLCore::const_pointer_cast): - -2005-12-04 Geoffrey Garen - - Update test results to match Anders's last checkin. - - * tests/mozilla/expected.html: - -2005-12-04 Anders Carlsson - - Reviewed by Geoffrey. - - - Fixes - Object.prototype is missing propertyIsEnumerable - - * kjs/object.cpp: - (KJS::ObjectImp::canPut): - Refactor to use getPropertyAttributes. - - (KJS::ObjectImp::propertyIsEnumerable): - New function which checks if a property is enumerable. - - (KJS::ObjectImp::getPropertyAttributes): - * kjs/object.h: - Add getPropertyAttributes and propertyIsEnumerable. - - * kjs/object_object.cpp: - (ObjectPrototypeImp::ObjectPrototypeImp): - (ObjectProtoFuncImp::callAsFunction): - * kjs/object_object.h: - (KJS::ObjectProtoFuncImp::): - Add propertyIsEnumerable to the Object prototype. - -2005-12-01 Maciej Stachowiak - - Reviewed by Tim Hatcher. - - - removed deprecated reset, isNull and nonNull methods - - * kxmlcore/RefPtr.h: - -2005-12-01 Anders Carlsson - - Reviewed by Darin. - - - Fixes - nodes2strings.cpp fails to print left expression of ForInNode when 'var' is not used - - Patch by Mark Rowe. - - * kjs/nodes2string.cpp: - (ForInNode::streamTo): - Add lexpr if there's no varDecl. - -2005-12-01 Maciej Stachowiak - - Rubber stamped by Eric. - - - renamed SharedPtr to RefPtr via script - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/function.cpp: - (KJS::GlobalFuncImp::callAsFunction): - * kjs/function.h: - * kjs/function_object.cpp: - (FunctionObjectImp::construct): - * kjs/internal.cpp: - (KJS::Parser::parse): - (KJS::InterpreterImp::checkSyntax): - (KJS::InterpreterImp::evaluate): - * kjs/internal.h: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - (KJS::SourceStream::operator<<): - * kjs/protect.h: - * kxmlcore/RefPtr.h: Added. - (KXMLCore::RefPtr::RefPtr): - (KXMLCore::RefPtr::~RefPtr): - (KXMLCore::RefPtr::isNull): - (KXMLCore::RefPtr::notNull): - (KXMLCore::RefPtr::reset): - (KXMLCore::RefPtr::get): - (KXMLCore::RefPtr::operator*): - (KXMLCore::RefPtr::operator->): - (KXMLCore::RefPtr::operator!): - (KXMLCore::RefPtr::operator UnspecifiedBoolType): - (KXMLCore::::operator): - (KXMLCore::operator==): - (KXMLCore::operator!=): - (KXMLCore::static_pointer_cast): - (KXMLCore::const_pointer_cast): - * kxmlcore/SharedPtr.h: Removed. - -2005-11-30 Maciej Stachowiak - - Reviewed by Dave Hyatt. - - - change idiom used for implicit bool conversion of smart pointers, because the old one gives weird error messages sometimes - - * kjs/protect.h: - (KJS::ProtectedPtr::operator UnspecifiedBoolType): - * kxmlcore/SharedPtr.h: - (KXMLCore::SharedPtr::operator UnspecifiedBoolType): - -2005-11-29 Mitz Pettel - - Reviewed by ggaren. Committed by eseidel. - - Date conversion to local time gets the DST flag wrong sometimes - http://bugs.webkit.org/show_bug.cgi?id=5514 - - * kjs/date_object.cpp: - (KJS::isTime_tSigned): - (KJS::DateProtoFuncImp::callAsFunction): - -2005-11-26 Maciej Stachowiak - - Rubber stamped by Eric. - - - renamed InterpreterLock to JSLock - - * bindings/NP_jsobject.cpp: - (_NPN_Invoke): - (_NPN_Evaluate): - (_NPN_GetProperty): - (_NPN_SetProperty): - (_NPN_RemoveProperty): - (_NPN_HasProperty): - (_NPN_HasMethod): - (_NPN_SetException): - * bindings/jni/jni_jsobject.cpp: - (JSObject::call): - (JSObject::eval): - (JSObject::getMember): - (JSObject::setMember): - (JSObject::removeMember): - (JSObject::getSlot): - (JSObject::setSlot): - (JSObject::toString): - (JSObject::convertJObjectToValue): - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (-[WebScriptObject evaluateWebScript:]): - (-[WebScriptObject setValue:forKey:]): - (-[WebScriptObject valueForKey:]): - (-[WebScriptObject removeWebScriptKey:]): - (-[WebScriptObject stringRepresentation]): - (-[WebScriptObject webScriptValueAtIndex:]): - (-[WebScriptObject setWebScriptValueAtIndex:value:]): - (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]): - * bindings/runtime.cpp: - (Instance::createRuntimeObject): - * bindings/runtime_root.cpp: - (KJS::Bindings::addNativeReference): - (KJS::Bindings::removeNativeReference): - (RootObject::removeAllNativeReferences): - * bindings/runtime_root.h: - (KJS::Bindings::RootObject::~RootObject): - (KJS::Bindings::RootObject::setRootObjectImp): - * bindings/testbindings.cpp: - (main): - * bindings/testbindings.mm: - (main): - * kjs/JSLock.cpp: - (KJS::initializeJSLock): - (KJS::JSLock::lock): - (KJS::JSLock::unlock): - (KJS::JSLock::lockCount): - (KJS::JSLock::DropAllLocks::DropAllLocks): - (KJS::JSLock::DropAllLocks::~DropAllLocks): - * kjs/JSLock.h: - (KJS::JSLock::JSLock): - (KJS::JSLock::~JSLock): - * kjs/collector.cpp: - (KJS::Collector::allocate): - (KJS::Collector::collect): - * kjs/internal.cpp: - (KJS::InterpreterImp::InterpreterImp): - (KJS::InterpreterImp::clear): - (KJS::InterpreterImp::checkSyntax): - (KJS::InterpreterImp::evaluate): - * kjs/interpreter.cpp: - (Interpreter::evaluate): - * kjs/protect.h: - (KJS::::ProtectedPtr): - (KJS::::~ProtectedPtr): - (KJS::::operator): - * kjs/protected_reference.h: - (KJS::ProtectedReference::ProtectedReference): - (KJS::ProtectedReference::~ProtectedReference): - (KJS::ProtectedReference::operator=): - * kjs/protected_values.cpp: - (KJS::ProtectedValues::getProtectCount): - (KJS::ProtectedValues::increaseProtectCount): - (KJS::ProtectedValues::decreaseProtectCount): - * kjs/testkjs.cpp: - (TestFunctionImp::callAsFunction): - (main): - -2005-11-26 Darin Adler - - Reviewed by eseidel. Committed by eseidel. - - Inline ScopeChain functions for speed. - http://bugs.webkit.org/show_bug.cgi?id=5687 - - * kjs/object.h: - (KJS::ScopeChain::mark): - * kjs/scope_chain.cpp: - * kjs/scope_chain.h: - (KJS::ScopeChain::ref): - (KJS::ScopeChain::operator=): - (KJS::ScopeChain::bottom): - (KJS::ScopeChain::push): - (KJS::ScopeChain::pop): - -2005-11-21 Maciej Stachowiak - - Reviewed by Geoff. - - Seed: WebKit: hang when sending XMLHttpRequest if automatic proxy config is used - - Also factored locking code completely into a separate class, and - added a convenient packaged way to temporarily drop locks. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/JSLock.cpp: Added. - (KJS::initializeInterpreterLock): - (KJS::InterpreterLock::lock): - (KJS::InterpreterLock::unlock): - (KJS::InterpreterLock::lockCount): - (KJS::InterpreterLock::DropAllLocks::DropAllLocks): - (KJS::InterpreterLock::DropAllLocks::~DropAllLocks): - * kjs/JSLock.h: Added. - (KJS::InterpreterLock::InterpreterLock): - (KJS::InterpreterLock::~InterpreterLock): - * kjs/internal.cpp: - * kjs/internal.h: - * kjs/interpreter.cpp: - * kjs/interpreter.h: - * kjs/protect.h: - * kjs/testkjs.cpp: - (TestFunctionImp::callAsFunction): - -2005-11-21 Eric Seidel - - Rubber-stamped by hyatt. - - Removed JavaScriptCore+SVG target. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2005-11-15 Geoffrey Garen - - Reviewed by mjs. - - - Fixed Installer crash in - KJS::ValueImp::marked() when garbage collector runs inside call to - ConstantValues::init() - - I took responsibility for initializing and marking ConstantValues away - from InterpreterImp, since it's possible to reference such a value - before any interpreter has been created and after the last interpreter - has been destroyed. - - InterpreterImp::lock now initializes ConstantValues. It's a good - place for the initialization because you have to call it before - creating any objects. Since ::lock can be called more than once, - I added a check in ConstantValues::init to ensure that it executes - only once. - - Collector:collect is now responsible for marking ConstantValues. - - We no longer clear the ConstantValues since we can't guarantee that no - one has a reference to them. - - FIXME: This is hackery. The long-term plan is to make ConstantValues - use immediate values that require no initialization. - - * ChangeLog: - * kjs/collector.cpp: - (KJS::Collector::collect): - * kjs/internal.cpp: - (KJS::InterpreterImp::InterpreterImp): - (KJS::InterpreterImp::lock): - (KJS::InterpreterImp::clear): - (KJS::InterpreterImp::mark): - * kjs/internal.h: - * kjs/value.cpp: - (KJS::ConstantValues::initIfNeeded): - * kjs/value.h: - -2005-11-08 Geoffrey Garen - - Reviewed by Darin. - - This patch fixes some naughty naughty code -- 5 crashes and 2 - may-go-haywire-in-the-futures. - - One such crash is 8C46 Crash with with - incomplete parameter list to webScript object function. - - I replaced early returns from within NS_DURINGs with calls to - NS_VALUERETURN because the doc says, "You cannot use goto or - return to exit an exception handling domain -- errors will result." - - I replaced hard-coded analyses of -[NSMethodSignature - methodReturnType] with more abstracted alternatives, since - the documentation says "This encoding is implementation-specific, - so applications should use it with caution," and then emits an - evil cackle. - - I removed the early return in the case where a JavaScript caller - supplies an insufficient number of arguments, because the right - thing to do in such a case is to use JavaScript's defined behavior - of supplying "undefined" for any missing arguments. - - I also changed ObjcInstance::invokeMethod so that it no longer - deletes the method passed to it. It doesn't create the method, - so it shouldn't delete it. A friend of mine named - KERNEL_PROTECTION_FAILURE agrees with me on this point. - - Finally, I changed an assert(true) to assert(false) because - all the other asserts were making fun of it. - - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - (ObjcInstance::invokeDefaultMethod): - -2005-11-06 Geoffrey Garen - - Reviewed by Darin. - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=5571 - REGRESSION (412.5-TOT): duplicated words/sentences at - shakespeer.sourceforge.net - - Our UTF16-modified PCRE didn't work with extended character classes - (classes involving characters > 255) because it used the GETCHARINC - macro to read through them. In UTF16 mode, GETCHARINC expects UTF16 - input, but PCRE encodes character classes in UTF8 regardless of the - input mode of the subject string. - - The fix is to explicitly define GETUTF8CHARINC, and to use it, - rather than GETCHARINC, when reading extended character classes. - - In UTF8 mode, we simply define GETCHARINC to be GETUTF8CHARINC. - - * pcre/pcre_internal.h: - * pcre/pcre_xclass.c: - (_pcre_xclass): - -2005-11-05 Geoffrey Garen - - Patch by Mitz Pettel, reviewed by Maciej. - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=5357 - REGRESSION: Scriptable plugin hides properties of OBJECT element - - * bindings/objc/objc_class.mm: - (KJS::Bindings::ObjcClass::fallbackObject): - -2005-11-05 Geoffrey Garen - - Reviewed by Darin. - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=5409 - slice() testcase doesn't pass - - Modified String.slice to deal with funky values. - Updated test results. We now pass . - - * kjs/string_object.cpp: - (StringProtoFuncImp::callAsFunction): - * tests/mozilla/expected.html: - -2005-11-04 Darin Adler - - Reviewed by Tim Hatcher. - - * kxmlcore/HashSet.h: Fixed case of "hashfunctions.h" -- needs to be "HashFunctions.h". - -2005-11-03 Timothy Hatcher - - Reviewed by Darin and Vicki. - - * JavaScriptCore.xcodeproj/project.pbxproj: - Change to use $(SYSTEM_LIBRARY_DIR) consistently and place - $(NEXT_ROOT) in a few spots to make build-root work. - -2005-11-03 Geoffrey Garen - - - Updated JavaScriptCore test results to reflect recent fixes. - - * tests/mozilla/expected.html: - -2005-11-03 Geoffrey Garen - - Reviewed by darin. - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=5602 - REGRESSION: RegExp("[^\\s$]+", "g") returns extra matches - - We now update lastIndex relative to the start of the last match, - rather than the start of the last search. We used to assume that - the two were equal, but that is not the case when a pattern - matches at a character after the first in the string. - - * kjs/regexp_object.cpp: - (RegExpProtoFuncImp::callAsFunction): - -2005-10-24 John Sullivan - - Reviewed by Darin Adler. Code changes by Alexey Proskuryakov. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4931 - Unicode format characters (Cf) should be removed from JavaScript source - - * kjs/lexer.cpp: - include - (Lexer::Lexer): - use KJS::UChar instead of UChar to avoid ambiguity caused by new include - (Lexer::setCode): - ditto; also, use shift(4) to skip first 4 chars to take advantage of new - logic there. - (Lexer::shift): - skip chars of type U_FORMAT_CHAR - (Lexer::convertUnicode): - use KJS::UChar instead of UChar to avoid ambiguity caused by new include - (Lexer::record16): - ditto - (Lexer::makeIdentifier): - ditto - (Lexer::makeUString): - ditto - - * tests/mozilla/ecma/Array/15.4.5.1-1.js: - updated to skip soft hyphens - -2005-10-24 John Sullivan - - Reviewed by Darin Adler. Code changes by George Staikos/Geoff Garen. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4142 - Date object does not always adjust daylight savings correctly - - * kjs/date_object.cpp: - (KJS::makeTime): - Fix the case where a time change crosses the daylight savings start/end dates. - -2005-10-17 Maciej Stachowiak - - Reviewed by Geoff. Code changes by Darin. - - - some micro-optimizations to FastMalloc to reduce math and branches. - - * kxmlcore/FastMalloc.cpp: - (KXMLCore::TCMalloc_Central_FreeList::Populate): - (KXMLCore::fastMallocRegisterThread): - (KXMLCore::TCMalloc_ThreadCache::GetCache): - (KXMLCore::TCMalloc_ThreadCache::GetCacheIfPresent): - -2005-10-15 Maciej Stachowiak - - Reverted fix for this bug, because it was part of a time range that caused a performance - regression: - - Remove Reference type from JavaScriptCore - -2005-10-15 Darin Adler - - * kxmlcore/HashTable.cpp: Fixed build failure (said hashtable.h instead of HashTable.h). - -2005-10-14 Geoffrey Garen - - Style changes recommended by Darin. - - Changed to camelCase, changed ValueImp* to ValueImp *. - - * kjs/simple_number.h: - (KJS::SimpleNumber::make): - (KJS::SimpleNumber::value): - -2005-10-11 Geoffrey Garen - - Added regexp_object.lut.h build phase from JavaScriptCore - to JavaScriptCore+SVG. - - Reviewed by mitz. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2005-10-11 Geoffrey Garen - - Fixed build bustage from last checkin (stray characters - in the project file). - - Reviewed by mitz. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2005-10-11 Geoffrey Garen - - New JavaScriptCore test results to reflect the last change. - - * tests/mozilla/expected.html: - -2005-10-10 Geoffrey Garen - - - Implemented caching of match state inside the global RegExp object - (lastParen, leftContext, rightContext, lastMatch, input). - - exec(), test(), match(), search(), and replace() now dipatch regular - expression matching through the RegExp object's performMatch function, - to facilitate caching. This replaces registerRegexp and - setSubPatterns. - - - Implemented the special '$' aliases (e.g. RegExp.input aliases to - RegExp.$_). - - - Moved support for backreferences into the new static hash table - used for other special RegExp properties. Truncated backreferences - at $9 to match IE, FF, and the "What's New in Netscape 1.2?" doc. - (String.replace still supports double-digit backreferences.) - - - Tweaked RegExp.prototype.exec to handle ginormous values in lastIndex. - - Fixes 11 -- count em, 11 -- JavaScriptCore tests. - - * fast/js/regexp-caching-expected.txt: Added. - * fast/js/regexp-caching.html: Added. - - Reviewed by mjs. - - * JavaScriptCore.xcodeproj/project.pbxproj: Added regexp_object.lut.h - * kjs/create_hash_table: Tweaked to allow for more exotic characters. - We now rely on the compiler to catch illegal - identifiers. - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): - * kjs/regexp_object.cpp: - (RegExpProtoFuncImp::callAsFunction): - (RegExpObjectImp::RegExpObjectImp): - (RegExpObjectImp::performMatch): - (RegExpObjectImp::arrayOfMatches): - (RegExpObjectImp::backrefGetter): - (RegExpObjectImp::getLastMatch): - (RegExpObjectImp::getLastParen): - (RegExpObjectImp::getLeftContext): - (RegExpObjectImp::getRightContext): - (RegExpObjectImp::getOwnPropertySlot): - (RegExpObjectImp::getValueProperty): - (RegExpObjectImp::put): - (RegExpObjectImp::putValueProperty): - * kjs/regexp_object.h: - (KJS::RegExpObjectImp::): - * kjs/string_object.cpp: - (substituteBackreferences): - (replace): - (StringProtoFuncImp::callAsFunction): - -2005-10-09 Darin Adler - - Reviewed by Maciej; some changes done after review. - - - fixed hanging loading page; rte.ie (works in IE and Firefox) - - fixed http://bugs.webkit.org/show_bug.cgi?id=5280 - Date.setMonth fails with negative values - - fixed http://bugs.webkit.org/show_bug.cgi?id=5154 - JSC should switch to _r variants of unix time/date functions - - fixed a few possible overflow cases - - Retested all tests to be sure nothing broke; added layout test for bug 5280. - - * kjs/config.h: Removed TIME_WITH_SYS_TIME define. Also set HAVE_SYS_TIMEB_H - for the __APPLE__ case (the latter is accurate but irrelevant). - - * kjs/date_object.h: Reformatted. Removed unnecessary include of "function_object.h". - Moved declarations of helper classes and functions into the cpp file. - - * kjs/date_object.cpp: Removed code at top to define macros to use CoreFoundation instead of - POSIX date functions. - (KJS::styleFromArgString): Tweaked to return early instead of using a variable. - (KJS::formatLocaleDate): Tweaked to check for undefined rather than checking argument count. - (KJS::formatDate): Made parameter const. - (KJS::formatDateUTCVariant): Ditto. - (KJS::formatTime): Ditto. - (KJS::DateProtoFuncImp::callAsFunction): Use gmtime_r and localtime_r instead of gmtime and - localtime. - (KJS::DateObjectImp::callAsFunction): Use localtime_r instead of localtime. - (KJS::ymdhmsToSeconds): Renamed from ymdhms_to_seconds. Changed computation to avoid possible - overflow if year is an extremely large or small number. - (KJS::makeTime): Removed code to move large month numbers from tm_mon to tm_year; this was - to accomodate CFGregorianDate, which is no longer used (and didn't handle negative values). - (KJS::parseDate): Renamed from KRFCDate_parseDate; changed to return a value in milliseconds - rather than in seconds. Reformatted the code. Changed to use UTF8String() instead of ascii(), - since ascii() is not thread safe. Changed some variables back from int to long to avoid - trouble if the result of strtol does not fit in an int (64-bit issue only). - -2005-10-08 Mitz Pettel - - Reviewed by Geoff. - Tweaked and landed by Darin. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=5266 - Support parenthesized comments in Date.parse() - - * kjs/date_object.cpp: - (KJS::skipSpacesAndComments): Take a pointer, and advance it past spaces, - and also past anything enclosed in parentheses. - (KJS::KRFCDate_parseDate): Use skipSpacesAndComments wherever we formerly had - code to skip spaces. - -2005-10-08 Justin Haygood - - Reviewed, tweaked, and landed by Darin. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=5189 - pcre_exec.c fails to compile using MSVC - - fixed http://bugs.webkit.org/show_bug.cgi?id=5190 - KJS config.h adjustment for Win32 - - * kjs/config.h: Make sure HAVE_MMAP and HAVE_SBRK are off for Win32. - Turn HAVE_ERRNO_H on for Mac OS X. Sort defines so they are easy to compare - with each other. Remove #undef of DEBUG_COLLECTOR. - * pcre/pcre_exec.c: (match): Work around strange MSVC complaint by splitting - the definition of a local variable into a separate declaration and - initialization. - -2005-10-05 Geoffrey Garen - - - Darin and I rewrote our implementation of the SimpleNumber class - to store number bit patterns in their floating point formats. - - My tweaks reviewed by Darin. - - ~1% speedup on JS iBench. - - * kjs/internal.h: removed obsolete jsNumber declarations. - * kjs/math_object.cpp: - (MathFuncImp::callAsFunction): changed KJS::isNaN to isNaN - * kjs/nodes.cpp: - (PostfixResolveNode::evaluate): removed obsolete knownToBeInteger - (PostfixBracketNode::evaluate): ditto - (PostfixDotNode::evaluate): ditto - (PrefixResolveNode::evaluate): ditto - (PrefixBracketNode::evaluate): ditto - (PrefixDotNode::evaluate): ditto - (NegateNode::evaluate): ditto - (valueForReadModifyAssignment): ditto - * kjs/number_object.cpp: removed obsolete comment - * kjs/operations.cpp: - (KJS::equal): removed unnecessary isNaN checks - (KJS::strictEqual): ditto - (KJS::add): removed obsolete knownToBeInteger - (KJS::mult): ditto - * kjs/operations.h: removed include of "value.h" to prevent circular reference - * kjs/simple_number.h: removed unnecessary #includes - (KJS::SimpleNumber::make): see above - (KJS::SimpleNumber::is): ditto - (KJS::SimpleNumber::value): ditto - * kjs/string_object.cpp: - (StringProtoFuncImp::callAsFunction): changed KJS::isNaN to isNaN - * kjs/ustring.cpp: removed unnecessary isNaN check - (KJS::UString::toUInt32): ditto - * kjs/value.cpp: - (KJS::jsNumber): removed obsolete jsNumber definitions - (KJS::ConstantValues::init): NaN is no longer a ConstantValue - (KJS::ConstantValues::clear): ditto - (KJS::ConstantValues::mark): ditto - * kjs/value.h: removed obsolete knownToBeInteger - (KJS::jsNaN): now returns a SimpleNumber - (KJS::ValueImp::getUInt32): changed to account for NaN being a SimpleNumber - (KJS::ValueImp::toBoolean): ditto - (KJS::ValueImp::toString): changed to account for +/- 0.0 - (KJS::jsZero): changed to reflect that SimpleNumber::make takes a double - (KJS::jsOne): ditto - (KJS::jsTwo): ditto - (KJS::Number): removed obsolete non-double constructor declarations - -2005-10-05 Maciej Stachowiak - - Reviewed by Eric. - - - fixed Remove Reference type from JavaScriptCore - - Also fixed some bugs with for..in enumeration while I was at it. object - properties now come before prototype properties and duplicates - between object and prototype are listed only once. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/IdentifierSequencedSet.cpp: Added. - (KJS::IdentifierSequencedSet::IdentifierSequencedSet): - (KJS::IdentifierSequencedSet::deallocateVector): - (KJS::IdentifierSequencedSet::~IdentifierSequencedSet): - (KJS::IdentifierSequencedSet::insert): - * kjs/IdentifierSequencedSet.h: Added. - (KJS::IdentifierSequencedSetIterator::IdentifierSequencedSetIterator): - (KJS::IdentifierSequencedSetIterator::operator*): - (KJS::IdentifierSequencedSetIterator::operator->): - (KJS::IdentifierSequencedSetIterator::operator++): - (KJS::IdentifierSequencedSetIterator::operator==): - (KJS::IdentifierSequencedSetIterator::operator!=): - (KJS::IdentifierSequencedSet::begin): - (KJS::IdentifierSequencedSet::end): - (KJS::IdentifierSequencedSet::size): - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstanceImp::getPropertyNames): - (ArrayInstanceImp::setLength): - (ArrayInstanceImp::pushUndefinedObjectsToEnd): - * kjs/nodes.cpp: - (ForInNode::execute): - * kjs/nodes.h: - * kjs/object.cpp: - (KJS::ObjectImp::getPropertyNames): - * kjs/object.h: - * kjs/property_map.cpp: - (KJS::PropertyMap::getEnumerablePropertyNames): - (KJS::PropertyMap::getSparseArrayPropertyNames): - * kjs/property_map.h: - * kjs/protect.h: - * kjs/protected_reference.h: Removed. - * kjs/reference.cpp: Removed. - * kjs/reference.h: Removed. - * kjs/reference_list.cpp: Removed. - * kjs/reference_list.h: Removed. - * kjs/ustring.h: - (KJS::UString::impl): - * kxmlcore/HashSet.h: - -2005-10-04 Eric Seidel - - Reviewed by mjs. - - Code cleanup, which resulted in a small win on iBench. - - * kjs/object.cpp: - (KJS::tryGetAndCallProperty): new static inline - (KJS::ObjectImp::defaultValue): code cleanup - -2005-10-03 Maciej Stachowiak - - Patch from George Staikos , reviewed and tweaked a bit by me. - - - more Linux build fixes - - * kjs/operations.cpp: - * kxmlcore/FastMalloc.h: - * kxmlcore/TCSystemAlloc.cpp: - (TCMalloc_SystemAlloc): - -2005-10-03 Maciej Stachowiak - - Patch from George Staikos , reviewed and tweaked a bit by me. - - http://bugs.webkit.org/show_bug.cgi?id=5174 - Add support for compiling on Linux (likely to help for other POSIX systems too) - - * kjs/collector.cpp: - (KJS::Collector::markCurrentThreadConservatively): - (KJS::Collector::markOtherThreadConservatively): - * kjs/config.h: - * kjs/date_object.cpp: - (KJS::formatDate): - (KJS::formatDateUTCVariant): - (KJS::formatTime): - (KJS::timeZoneOffset): - (KJS::DateProtoFuncImp::callAsFunction): - (KJS::DateObjectImp::construct): - (KJS::DateObjectImp::callAsFunction): - (KJS::makeTime): - * kjs/identifier.cpp: - * kjs/internal.cpp: - (KJS::initializeInterpreterLock): - (KJS::lockInterpreter): - (KJS::unlockInterpreter): - (KJS::UndefinedImp::toPrimitive): - (KJS::UndefinedImp::toBoolean): - (KJS::UndefinedImp::toNumber): - (KJS::UndefinedImp::toString): - (KJS::NullImp::toPrimitive): - (KJS::NullImp::toBoolean): - (KJS::NullImp::toNumber): - (KJS::NullImp::toString): - (KJS::BooleanImp::toPrimitive): - (KJS::BooleanImp::toBoolean): - (KJS::BooleanImp::toNumber): - (KJS::BooleanImp::toString): - (KJS::StringImp::toPrimitive): - (KJS::StringImp::toBoolean): - (KJS::StringImp::toNumber): - (KJS::StringImp::toString): - * kjs/internal.h: - * kjs/protected_values.cpp: - -2005-10-03 Maciej Stachowiak - - - fix Development build after last checkin - - * kxmlcore/FastMalloc.cpp: - (KXMLCore::fastMallocRegisterThread): - -2005-10-02 Maciej Stachowiak - - Reviewed by Darin. - - REGRESSION: 3% regression on PLT from new FastMalloc - http://bugs.webkit.org/show_bug.cgi?id=5243 - - A number of optimizations to the new threadsafe malloc that make it actually as fast - as dlmalloc (I measured wrong before) and as memory-efficient as the system malloc. - - - use fastMalloc for everything - it now gets applied to all new/delete allocations - via a private inline operator new that is now included into every file via config.h. - - - tweaked some of the numeric parameters for size classes and amount of wasted memory - allowed per allocation - this saves on memory use and consequently improves speed. - - - so long as the allocator is not being used on background threads, get the per-thread - cache from a global variable instead of from pthread_getspecific, since the latter is slow. - - - inline more functions, and force the ones GCC refuses to inline with - attribute(always_inline), nearly all of these have one call site so inlining them has - to be a win. - - - use some tricks to calculate allocation size more efficiently and fewer times for small - allocations, to avoid hitting the huge size table array. - - - avoid hitting the per-thread cache on code paths that don't need it. - - - implement inline assembly version of spinlock for PowerPC (was already done for x86) - - * bindings/NP_jsobject.cpp: - * bindings/c/c_class.cpp: - * bindings/c/c_instance.cpp: - * bindings/c/c_runtime.cpp: - * bindings/c/c_utility.cpp: - * bindings/jni/jni_class.cpp: - * bindings/jni/jni_instance.cpp: - * bindings/jni/jni_jsobject.cpp: - * bindings/jni/jni_objc.mm: - * bindings/jni/jni_runtime.cpp: - * bindings/jni/jni_utility.cpp: - * bindings/npruntime.cpp: - * bindings/objc/WebScriptObject.mm: - * bindings/objc/objc_class.mm: - * bindings/objc/objc_instance.mm: - * bindings/objc/objc_runtime.mm: - * bindings/objc/objc_utility.mm: - * bindings/runtime.cpp: - * bindings/runtime_array.cpp: - * bindings/runtime_method.cpp: - * bindings/runtime_object.cpp: - * bindings/runtime_root.cpp: - * bindings/testbindings.cpp: - * bindings/testbindings.mm: - * kjs/array_object.cpp: - (ArrayInstanceImp::ArrayInstanceImp): - (ArrayInstanceImp::~ArrayInstanceImp): - (ArrayInstanceImp::resizeStorage): - * kjs/bool_object.cpp: - * kjs/collector.cpp: - (KJS::Collector::registerThread): - * kjs/config.h: - * kjs/debugger.cpp: - * kjs/error_object.cpp: - * kjs/function.cpp: - * kjs/function_object.cpp: - * kjs/identifier.cpp: - (KJS::Identifier::rehash): - * kjs/internal.cpp: - (KJS::Parser::saveNewNode): - (KJS::clearNewNodes): - * kjs/interpreter.cpp: - * kjs/lexer.cpp: - (Lexer::doneParsing): - (Lexer::makeIdentifier): - (Lexer::makeUString): - * kjs/list.cpp: - * kjs/math_object.cpp: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - * kjs/number_object.cpp: - (integer_part_noexp): - (char_sequence): - * kjs/object.cpp: - * kjs/object_object.cpp: - * kjs/property_map.cpp: - * kjs/property_slot.cpp: - * kjs/protected_values.cpp: - (KJS::ProtectedValues::rehash): - * kjs/reference.cpp: - * kjs/reference_list.cpp: - * kjs/regexp.cpp: - * kjs/regexp_object.cpp: - * kjs/scope_chain.cpp: - * kjs/scope_chain.h: - * kjs/string_object.cpp: - * kjs/testkjs.cpp: - * kjs/ustring.h: - * kjs/value.cpp: - * kxmlcore/Assertions.mm: - * kxmlcore/FastMalloc.cpp: - (KXMLCore::InitSizeClasses): - (KXMLCore::DLL_IsEmpty): - (KXMLCore::DLL_Prepend): - (KXMLCore::TCMalloc_Central_FreeList::Insert): - (KXMLCore::TCMalloc_Central_FreeList::Remove): - (KXMLCore::TCMalloc_Central_FreeList::Populate): - (KXMLCore::TCMalloc_ThreadCache::Allocate): - (KXMLCore::TCMalloc_ThreadCache::FetchFromCentralCache): - (KXMLCore::fastMallocRegisterThread): - (KXMLCore::TCMalloc_ThreadCache::GetCache): - (KXMLCore::TCMalloc_ThreadCache::GetCacheIfPresent): - (KXMLCore::TCMalloc_ThreadCache::CreateCacheIfNecessary): - (KXMLCore::do_malloc): - (KXMLCore::do_free): - (KXMLCore::realloc): - * kxmlcore/FastMalloc.h: - (operator new): - (operator delete): - (operator new[]): - (operator delete[]): - * kxmlcore/HashTable.cpp: - * kxmlcore/TCSpinLock.h: - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SlowLock): - * kxmlcore/TCSystemAlloc.cpp: - -2005-09-30 Geoffrey Garen - - - Second cut at fixing Denver Regression: Seed: - Past Editions of Opinions display "NAN/Undefined" for www.washingtonpost.com - - Reviewed by john. - - * kjs/date_object.cpp: - (KJS::KRFCDate_parseDate): Intead of creating a timezone when one isn't specified, - just rely on the fallback logic, which will do it for you. Also, return invalidDate - if the date includes trailing garbage. (Somewhat accidentally, the timezone logic - used to catch trailing garbage.) - - Added test case to fast/js/date-parse-test.html. - -2005-09-29 Eric Seidel - Fix from Mitz Pettel - - Reviewed by darin. - - Fix JSC memory smasher in TOT. - http://bugs.webkit.org/show_bug.cgi?id=5176 - - * pcre/pcre_exec.c: - (match): - -2005-09-29 Eric Seidel - Fix from Mitz Pettel - - Reviewed by mjs. - - * JavaScriptCore.xcodeproj/project.pbxproj: - Build fix for JSC+SVG after 5161. - http://bugs.webkit.org/show_bug.cgi?id=5179 - -2005-09-28 Geoffrey Garen - - - Fixed Denver Regression: Seed: Past Editions of Opinions display - "NAN/Undefined" for www.washingtonpost.com - - Reviewed by darin. - - * kjs/date_object.cpp: - (KJS::KRFCDate_parseDate): If the timezone isn't specified, rather than returning - invalidDate, substitute the local timezone. This matches the behavior of FF/IE. - -2005-09-28 Maciej Stachowiak - - Patch from George Staikos, reviewed by me. - - - fixed some compile issues on Linux - - * kjs/property_slot.h: - * kjs/simple_number.h: - -2005-09-27 Maciej Stachowiak - - Reviewed by Eric. - - - move HashMap/HashSet code down to JavaScriptCore - http://bugs.webkit.org/show_bug.cgi?id=5161 - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/internal.cpp: - (KJS::interpreterMap): Function that fetches the interpreter map on demand. - (KJS::InterpreterImp::InterpreterImp): Replace use of InterpreterMap - class with an appropriate HashMap. - (KJS::InterpreterImp::clear): ditto - (KJS::InterpreterImp::interpreterWithGlobalObject): ditto - * kjs/interpreter_map.cpp: Removed. - * kjs/interpreter_map.h: Removed. - - The HashMap/HashSet code (copied and slightly tweaked from WebCore) - - * kxmlcore/HashFunctions.h: Added. - (KXMLCore::4): - (KXMLCore::8): - (KXMLCore::): - (KXMLCore::PointerHash::hash): - (KXMLCore::PointerHash::equal): - * kxmlcore/HashMap.h: Added. - (KXMLCore::extractFirst): - (KXMLCore::HashMap::HashMap): - (KXMLCore::::size): - (KXMLCore::::capacity): - (KXMLCore::::isEmpty): - (KXMLCore::::begin): - (KXMLCore::::end): - (KXMLCore::::find): - (KXMLCore::::contains): - (KXMLCore::::set): - (KXMLCore::::get): - (KXMLCore::::remove): - (KXMLCore::::clear): - (KXMLCore::deleteAllValues): - * kxmlcore/HashMapPtrSpec.h: Added. - (KXMLCore::PointerHashIteratorAdapter::PointerHashIteratorAdapter): - (KXMLCore::PointerHashIteratorAdapter::operator*): - (KXMLCore::PointerHashIteratorAdapter::operator->): - (KXMLCore::PointerHashIteratorAdapter::operator++): - (KXMLCore::PointerHashIteratorAdapter::operator==): - (KXMLCore::PointerHashIteratorAdapter::operator!=): - (KXMLCore::PointerHashConstIteratorAdapter::PointerHashConstIteratorAdapter): - (KXMLCore::PointerHashConstIteratorAdapter::operator*): - (KXMLCore::PointerHashConstIteratorAdapter::operator->): - (KXMLCore::PointerHashConstIteratorAdapter::operator++): - (KXMLCore::PointerHashConstIteratorAdapter::operator==): - (KXMLCore::PointerHashConstIteratorAdapter::operator!=): - (KXMLCore::): - * kxmlcore/HashSet.h: Added. - (KXMLCore::identityExtract): - (KXMLCore::convertAdapter): - (KXMLCore::HashSet::HashSet): - (KXMLCore::::size): - (KXMLCore::::capacity): - (KXMLCore::::isEmpty): - (KXMLCore::::begin): - (KXMLCore::::end): - (KXMLCore::::find): - (KXMLCore::::contains): - (KXMLCore::::insert): - (KXMLCore::::remove): - (KXMLCore::::clear): - * kxmlcore/HashTable.cpp: Added. - (KXMLCore::HashTableStats::~HashTableStats): - (KXMLCore::HashTableStats::recordCollisionAtCount): - * kxmlcore/HashTable.h: Added. - (KXMLCore::HashTableIterator::skipEmptyBuckets): - (KXMLCore::HashTableIterator::HashTableIterator): - (KXMLCore::HashTableIterator::operator*): - (KXMLCore::HashTableIterator::operator->): - (KXMLCore::HashTableIterator::operator++): - (KXMLCore::HashTableIterator::operator==): - (KXMLCore::HashTableIterator::operator!=): - (KXMLCore::HashTableConstIterator::HashTableConstIterator): - (KXMLCore::HashTableConstIterator::operator*): - (KXMLCore::HashTableConstIterator::operator->): - (KXMLCore::HashTableConstIterator::skipEmptyBuckets): - (KXMLCore::HashTableConstIterator::operator++): - (KXMLCore::HashTableConstIterator::operator==): - (KXMLCore::HashTableConstIterator::operator!=): - (KXMLCore::HashTable::HashTable): - (KXMLCore::HashTable::~HashTable): - (KXMLCore::HashTable::begin): - (KXMLCore::HashTable::end): - (KXMLCore::HashTable::size): - (KXMLCore::HashTable::capacity): - (KXMLCore::HashTable::insert): - (KXMLCore::HashTable::isEmptyBucket): - (KXMLCore::HashTable::isDeletedBucket): - (KXMLCore::HashTable::isEmptyOrDeletedBucket): - (KXMLCore::HashTable::hash): - (KXMLCore::HashTable::equal): - (KXMLCore::HashTable::identityConvert): - (KXMLCore::HashTable::extractKey): - (KXMLCore::HashTable::lookup): - (KXMLCore::HashTable::shouldExpand): - (KXMLCore::HashTable::mustRehashInPlace): - (KXMLCore::HashTable::shouldShrink): - (KXMLCore::HashTable::shrink): - (KXMLCore::HashTable::clearBucket): - (KXMLCore::HashTable::deleteBucket): - (KXMLCore::HashTable::makeLookupResult): - (KXMLCore::HashTable::makeIterator): - (KXMLCore::HashTable::makeConstIterator): - (KXMLCore::::lookup): - (KXMLCore::::insert): - (KXMLCore::::reinsert): - (KXMLCore::::find): - (KXMLCore::::contains): - (KXMLCore::::remove): - (KXMLCore::::allocateTable): - (KXMLCore::::expand): - (KXMLCore::::rehash): - (KXMLCore::::clear): - (KXMLCore::::HashTable): - (KXMLCore::::swap): - (KXMLCore::::operator): - (KXMLCore::::checkTableConsistency): - (KXMLCore::::checkTableConsistencyExceptSize): - * kxmlcore/HashTraits.h: Added. - (KXMLCore::HashTraits::emptyValue): - (KXMLCore::): - (KXMLCore::PairHashTraits::emptyValue): - (KXMLCore::PairHashTraits::deletedValue): - -2005-09-27 Darin Adler - - Reviewed by Maciej. - - - update grammar to fix conflicts; fixes one of our test cases - because it resolves the relationship between function expressions - and declarations in the way required by the ECMA specification - - * kjs/grammar.y: Added lots of new grammar rules so we have no conflicts. - A new set of rules for "no bracket or function at start of expression" and - another set of rules for "no in anywhere in expression". Also simplified the - handling of try to use only a single node and used operator precedence to - get rid of the conflict in handling of if and else. Also used a macro to - streamline the handling of automatic semicolons and changed parenthesis - handling to use a virtual function. - - * kjs/nodes.h: Added nodeInsideAllParens, removed unused abortStatement. - (KJS::TryNode::TryNode): Updated to hold catch and finally blocks directly instead - of using a special node for each. - * kjs/nodes.cpp: - (Node::createErrorCompletion): Added. Used instead of throwError when creating errors - that should not be in a completion rather than an ExecState. - (Node::throwUndefinedVariableError): Added. Sets source location unlike the call it - replaces. - (Node::nodeInsideAllParens): Added. - (GroupNode::nodeInsideAllParens): Added. - (StatListNode::execute): Removed code to move exceptions into completion objects; - that's now done solely by the KJS_CHECKEXCEPTION macro. - (TryNode::execute): Include execution of catch and finally here rather than using - separate nodes. - (FuncDeclNode::execute): Moved here, no longer inline. - * kjs/nodes2string.cpp: - (TryNode::streamTo): Updated for change. - (FuncDeclNode::streamTo): Ditto. - (FuncExprNode::streamTo): Ditto. - - * kjs/kjs-test: Removed. Was part of "make check". - * kjs/kjs-test.chk: Ditto. - * kjs/test.js: Ditto. - - * tests/mozilla/expected.html: Updated because one more test succeeds. - -2005-09-27 Adele Peterson - - Reviewed by Maciej. - - Changed ints to size_t where appropriate. - - * kjs/collector.cpp: - (KJS::Collector::allocate): - (KJS::Collector::markStackObjectsConservatively): - (KJS::Collector::collect): - (KJS::Collector::size): - (KJS::Collector::numInterpreters): - (KJS::Collector::numGCNotAllowedObjects): - (KJS::Collector::numReferencedObjects): - * kjs/collector.h: - -2005-09-27 Eric Seidel - - Reviewed by kevin. - - * JavaScriptCore.xcodeproj/project.pbxproj: fix after malloc changes. - -2005-09-27 Eric Seidel - - Reviewed by mjs. - - * kjs/nodes.cpp: - (FuncExprNode::evaluate): Now sets .constructor properly. - Test cases added to WebCore/layout-tests. - http://bugs.webkit.org/show_bug.cgi?id=3537 - -2005-09-26 Maciej Stachowiak - - Reviewed by John. - - - replace dlmalloc with tcmalloc - http://bugs.webkit.org/show_bug.cgi?id=5145 - - I also moved SharedPtr and the assertion code from WebCore into a - new kxmlcore directory. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/collector.cpp: - (KJS::Collector::allocate): - (KJS::Collector::collect): - * kjs/config.h: - * kjs/fast_malloc.cpp: Removed. - * kjs/fast_malloc.h: Removed. - * kjs/function.cpp: - * kjs/function.h: - * kjs/function_object.cpp: - * kjs/identifier.cpp: - (KJS::Identifier::add): - * kjs/internal.cpp: - * kjs/internal.h: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - * kjs/property_map.cpp: - (KJS::PropertyMap::~PropertyMap): - (KJS::PropertyMap::rehash): - * kjs/scope_chain.h: - * kjs/shared_ptr.h: Removed. - * kjs/string_object.cpp: - (StringObjectFuncImp::callAsFunction): - * kjs/ustring.cpp: - (KJS::UString::Rep::createCopying): - (KJS::UString::Rep::destroy): - (KJS::UString::expandCapacity): - (KJS::UString::expandPreCapacity): - (KJS::UString::UString): - (KJS::UString::spliceSubstringsWithSeparators): - (KJS::UString::append): - (KJS::UString::operator=): - (KJS::UString::detach): - * kjs/ustring.h: - * kxmlcore/Assertions.h: Added. - * kxmlcore/Assertions.mm: Added. - * kxmlcore/FastMalloc.cpp: Added. - (KXMLCore::LgFloor): - (KXMLCore::SizeClass): - (KXMLCore::ByteSizeForClass): - (KXMLCore::InitSizeClasses): - (KXMLCore::MetaDataAlloc): - (KXMLCore::PageHeapAllocator::Init): - (KXMLCore::PageHeapAllocator::New): - (KXMLCore::PageHeapAllocator::Delete): - (KXMLCore::PageHeapAllocator::inuse): - (KXMLCore::pages): - (KXMLCore::AllocationSize): - (KXMLCore::Event): - (KXMLCore::NewSpan): - (KXMLCore::DeleteSpan): - (KXMLCore::DLL_Init): - (KXMLCore::DLL_Remove): - (KXMLCore::DLL_IsEmpty): - (KXMLCore::DLL_Length): - (KXMLCore::DLL_Print): - (KXMLCore::DLL_Prepend): - (KXMLCore::DLL_InsertOrdered): - (KXMLCore::): - (KXMLCore::TCMalloc_PageHeap::GetDescriptor): - (KXMLCore::TCMalloc_PageHeap::SystemBytes): - (KXMLCore::TCMalloc_PageHeap::FreeBytes): - (KXMLCore::TCMalloc_PageHeap::RecordSpan): - (KXMLCore::TCMalloc_PageHeap::TCMalloc_PageHeap): - (KXMLCore::TCMalloc_PageHeap::New): - (KXMLCore::TCMalloc_PageHeap::Split): - (KXMLCore::TCMalloc_PageHeap::Carve): - (KXMLCore::TCMalloc_PageHeap::Delete): - (KXMLCore::TCMalloc_PageHeap::RegisterSizeClass): - (KXMLCore::TCMalloc_PageHeap::Dump): - (KXMLCore::TCMalloc_PageHeap::GrowHeap): - (KXMLCore::TCMalloc_PageHeap::Check): - (KXMLCore::TCMalloc_PageHeap::CheckList): - (KXMLCore::TCMalloc_ThreadCache_FreeList::Init): - (KXMLCore::TCMalloc_ThreadCache_FreeList::length): - (KXMLCore::TCMalloc_ThreadCache_FreeList::empty): - (KXMLCore::TCMalloc_ThreadCache_FreeList::lowwatermark): - (KXMLCore::TCMalloc_ThreadCache_FreeList::clear_lowwatermark): - (KXMLCore::TCMalloc_ThreadCache_FreeList::Push): - (KXMLCore::TCMalloc_ThreadCache_FreeList::Pop): - (KXMLCore::TCMalloc_ThreadCache::freelist_length): - (KXMLCore::TCMalloc_ThreadCache::Size): - (KXMLCore::TCMalloc_Central_FreeList::length): - (KXMLCore::TCMalloc_Central_FreeList::Init): - (KXMLCore::TCMalloc_Central_FreeList::Insert): - (KXMLCore::TCMalloc_Central_FreeList::Remove): - (KXMLCore::TCMalloc_Central_FreeList::Populate): - (KXMLCore::TCMalloc_ThreadCache::SampleAllocation): - (KXMLCore::TCMalloc_ThreadCache::Init): - (KXMLCore::TCMalloc_ThreadCache::Cleanup): - (KXMLCore::TCMalloc_ThreadCache::Allocate): - (KXMLCore::TCMalloc_ThreadCache::Deallocate): - (KXMLCore::TCMalloc_ThreadCache::FetchFromCentralCache): - (KXMLCore::TCMalloc_ThreadCache::ReleaseToCentralCache): - (KXMLCore::TCMalloc_ThreadCache::Scavenge): - (KXMLCore::TCMalloc_ThreadCache::GetCache): - (KXMLCore::TCMalloc_ThreadCache::GetCacheIfPresent): - (KXMLCore::TCMalloc_ThreadCache::PickNextSample): - (KXMLCore::TCMalloc_ThreadCache::InitModule): - (KXMLCore::TCMalloc_ThreadCache::InitTSD): - (KXMLCore::TCMalloc_ThreadCache::CreateCacheIfNecessary): - (KXMLCore::TCMalloc_ThreadCache::DeleteCache): - (KXMLCore::TCMalloc_ThreadCache::RecomputeThreadCacheSize): - (KXMLCore::TCMalloc_ThreadCache::Print): - (KXMLCore::ExtractStats): - (KXMLCore::DumpStats): - (KXMLCore::PrintStats): - (KXMLCore::DumpStackTraces): - (KXMLCore::TCMallocImplementation::GetStats): - (KXMLCore::TCMallocImplementation::ReadStackTraces): - (KXMLCore::TCMallocImplementation::GetNumericProperty): - (KXMLCore::TCMallocImplementation::SetNumericProperty): - (KXMLCore::DoSampledAllocation): - (KXMLCore::do_malloc): - (KXMLCore::do_free): - (KXMLCore::do_memalign): - (KXMLCore::TCMallocGuard::TCMallocGuard): - (KXMLCore::TCMallocGuard::~TCMallocGuard): - (KXMLCore::malloc): - (KXMLCore::free): - (KXMLCore::calloc): - (KXMLCore::cfree): - (KXMLCore::realloc): - (KXMLCore::memalign): - (KXMLCore::posix_memalign): - (KXMLCore::valloc): - (KXMLCore::pvalloc): - (KXMLCore::malloc_stats): - (KXMLCore::mallopt): - (KXMLCore::mallinfo): - * kxmlcore/FastMalloc.h: Added. - (KXMLCore::FastAllocated::operator new): - (KXMLCore::FastAllocated::operator delete): - (KXMLCore::FastAllocated::operator new[]): - (KXMLCore::FastAllocated::operator delete[]): - * kxmlcore/SharedPtr.h: Added. - (KXMLCore::SharedPtr::SharedPtr): - (KXMLCore::SharedPtr::~SharedPtr): - (KXMLCore::SharedPtr::isNull): - (KXMLCore::SharedPtr::notNull): - (KXMLCore::SharedPtr::reset): - (KXMLCore::SharedPtr::get): - (KXMLCore::SharedPtr::operator*): - (KXMLCore::SharedPtr::operator->): - (KXMLCore::SharedPtr::operator!): - (KXMLCore::SharedPtr::operator bool): - (KXMLCore::::operator): - (KXMLCore::operator==): - (KXMLCore::operator!=): - (KXMLCore::static_pointer_cast): - (KXMLCore::const_pointer_cast): - * kxmlcore/TCPageMap.h: Added. - (TCMalloc_PageMap1::TCMalloc_PageMap1): - (TCMalloc_PageMap1::Ensure): - (TCMalloc_PageMap1::get): - (TCMalloc_PageMap1::set): - (TCMalloc_PageMap2::TCMalloc_PageMap2): - (TCMalloc_PageMap2::get): - (TCMalloc_PageMap2::set): - (TCMalloc_PageMap2::Ensure): - (TCMalloc_PageMap3::NewNode): - (TCMalloc_PageMap3::TCMalloc_PageMap3): - (TCMalloc_PageMap3::get): - (TCMalloc_PageMap3::set): - (TCMalloc_PageMap3::Ensure): - * kxmlcore/TCSpinLock.h: Added. - (TCMalloc_SpinLock::Init): - (TCMalloc_SpinLock::Finalize): - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SlowLock): - (TCMalloc_SpinLockHolder::TCMalloc_SpinLockHolder): - (TCMalloc_SpinLockHolder::~TCMalloc_SpinLockHolder): - * kxmlcore/TCSystemAlloc.cpp: Added. - (TrySbrk): - (TryMmap): - (TryDevMem): - (TCMalloc_SystemAlloc): - * kxmlcore/TCSystemAlloc.h: Added. - -2005-09-23 Maciej Stachowiak - - Reviewed by Darin. - - Finish deploying PropertySlot in the interpreter - http://bugs.webkit.org/show_bug.cgi?id=5112 - - Convert postfix, prefix, delete, prefix, and for..in expressions to use - PropertySlot-based lookup instead of evaluateReference. - - 3% speedup on JS iBench. - - Fixed two of the JS tests: - * tests/mozilla/expected.html: - - * kjs/grammar.y: - * kjs/nodes.cpp: - (PostfixResolveNode::evaluate): - (PostfixBracketNode::evaluate): - (PostfixDotNode::evaluate): - (DeleteResolveNode::evaluate): - (DeleteBracketNode::evaluate): - (DeleteDotNode::evaluate): - (DeleteValueNode::evaluate): - (typeStringForValue): - (TypeOfResolveNode::evaluate): - (TypeOfValueNode::evaluate): - (PrefixResolveNode::evaluate): - (PrefixBracketNode::evaluate): - (PrefixDotNode::evaluate): - (ForInNode::execute): - * kjs/nodes.h: - (KJS::PostfixResolveNode::PostfixResolveNode): - (KJS::PostfixBracketNode::PostfixBracketNode): - (KJS::PostfixDotNode::PostfixDotNode): - (KJS::DeleteResolveNode::DeleteResolveNode): - (KJS::DeleteBracketNode::DeleteBracketNode): - (KJS::DeleteDotNode::DeleteDotNode): - (KJS::DeleteValueNode::DeleteValueNode): - (KJS::TypeOfResolveNode::TypeOfResolveNode): - (KJS::TypeOfValueNode::TypeOfValueNode): - (KJS::PrefixResolveNode::PrefixResolveNode): - (KJS::PrefixBracketNode::PrefixBracketNode): - (KJS::PrefixDotNode::PrefixDotNode): - * kjs/nodes2string.cpp: - (PostfixResolveNode::streamTo): - (PostfixBracketNode::streamTo): - (PostfixDotNode::streamTo): - (DeleteResolveNode::streamTo): - (DeleteBracketNode::streamTo): - (DeleteDotNode::streamTo): - (DeleteValueNode::streamTo): - (TypeOfValueNode::streamTo): - (TypeOfResolveNode::streamTo): - (PrefixResolveNode::streamTo): - (PrefixBracketNode::streamTo): - (PrefixDotNode::streamTo): - * kjs/reference.cpp: - (KJS::Reference::Reference): - (KJS::Reference::getPropertyName): - (KJS::Reference::getValue): - (KJS::Reference::deleteValue): - * kjs/reference.h: - -2005-09-23 Krzysztof Kowalczyk - - Reviewed and landed by Darin. - - - a Windows-specific file - - * os-win32/stdint.h: Added. We plan to remove dependency on the types, - and if we do so, we will remove this file. - -2005-09-22 Geoffrey Garen - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=5053 - Need to restore int/long changes to simple_number.h - - Reviewed by darin and mjs. - - * kjs/simple_number.h: changed enums to indenpendent constants to clarify types - (KJS::isNegativeZero): changed to static function - no reason to export - (KJS::SimpleNumber::rightShiftSignExtended): new function for clarity - (KJS::SimpleNumber::make): specified cast as reinterpret_cast - (KJS::SimpleNumber::is): changed to use uintptr_t for portability - (KJS::SimpleNumber::value): changed to use uintptr_t and rightShiftSignExtended - (KJS::SimpleNumber::fits): inverted tests - probably only a performance win for double - (KJS::SimpleNumber::integerFits): ditto - -2005-09-20 Maciej Stachowiak - - Reviewed by Geoff and partly by Darin. - - - fixed http://bugs.webkit.org/post_bug.cgi - (Reduce conflicts in JavaScriptCore grammar) - - This change gets us down from over 200 shift/reduce and 45 reduce/reduce to - 9 shift/reduce and 45 reduce/reduce. - - * kjs/grammar.y: - * kjs/grammar_types.h: Removed. - * kjs/lexer.cpp: - * kjs/nodes.h: - (KJS::Node::isGroupNode): - (KJS::Node::isLocation): - (KJS::Node::isResolveNode): - (KJS::Node::isBracketAccessorNode): - (KJS::Node::isDotAccessorNode): - (KJS::ResolveNode::isLocation): - (KJS::ResolveNode::isResolveNode): - (KJS::ResolveNode::identifier): - (KJS::GroupNode::isGroupNode): - (KJS::GroupNode::leafNode): - (KJS::BracketAccessorNode::isLocation): - (KJS::BracketAccessorNode::isBracketAccessorNode): - (KJS::BracketAccessorNode::base): - (KJS::BracketAccessorNode::subscript): - (KJS::DotAccessorNode::isLocation): - (KJS::DotAccessorNode::isDotAccessorNode): - (KJS::DotAccessorNode::base): - (KJS::DotAccessorNode::identifier): - (KJS::FuncExprNode::FuncExprNode): - (KJS::FuncExprNode::identifier): - (KJS::FuncDeclNode::FuncDeclNode): - (KJS::FuncDeclNode::execute): - -2005-09-20 Geoffrey Garen - - - Oops. The 4263434 change was only appropriate on the branch. Rolling out. - - Reviewed by eric. - - * kjs/internal.cpp: - (KJS::InterpreterImp::mark): - -2005-09-20 Geoffrey Garen - - - More changes needed to fix 8F29 REGRESSION(Denver/Chardonnay): - kjs_fast_malloc crash due to lack of locking on multiple threads (seen selecting volumes in - the installer) - - Added InterpreterLocks in some places in the bindings we missed before. - - Reviewed by john. - - * bindings/runtime_root.cpp: - (KJS::Bindings::addNativeReference): - (KJS::Bindings::removeNativeReference): - (RootObject::removeAllNativeReferences): - * bindings/runtime_root.h: - (KJS::Bindings::RootObject::~RootObject): - (KJS::Bindings::RootObject::setRootObjectImp): - -2005-09-20 Geoffrey Garen - - - Fixed Denver 8F29 Regression: - KJS::InterpreterImp::mark() crash - - Fix by mjs, review by me. - - * kjs/internal.cpp: - (KJS::InterpreterImp::mark): Added a null check on globExec in case a - garbage collection occurs inside InterpreterImp::globalInit (called - from InterpreterImp::InterpreterImp), at which point globExec has not yet been initialized. - -2005-09-20 Geoffrey Garen - - - Rolled in fix for http://bugs.webkit.org/show_bug.cgi?id=4892 - Date constructor has problems with months larger than 11 - - Test cases added: - - * layout-tests/fast/js/date-big-constructor-expected.txt: Added. - * layout-tests/fast/js/date-big-constructor.html: Added. - - Reviewed by darin. - - * kjs/date_object.cpp: - (KJS::fillStructuresUsingDateArgs): - (KJS::makeTime): - -2005-09-19 Geoffrey Garen - - - Fixed http://bugs.webkit.org/show_bug.cgi?id=5028 - 9 layout tests fail following the change from long to int - - - Rolled out changes to simple_number.h, and added fits(long long) - and SimpleNumber::fits(unsigned long long) to the old system. - - Reviewed by mjs. - - * kjs/simple_number.h: - (KJS::SimpleNumber::): - (KJS::SimpleNumber::value): - (KJS::SimpleNumber::fits): - (KJS::SimpleNumber::integerFits): - (KJS::SimpleNumber::make): - -2005-09-14 Maciej Stachowiak - - Reviewed by Geoff. - - - fixed REGRESSION: kjs_fast_malloc crash due to lack of locking on multiple threads (seen selecting volumes in the installer) - - Make sure to lock using the InterpreterLock class in all places that need it - (including anything that uses the collector, the parser, the protect count hash table, - and anything that allocates via fast_malloc). - - Also added assertions to ensure that the locking rules are followed for the relevant - resources. - - * Makefile.am: - * bindings/NP_jsobject.cpp: - (identifierFromNPIdentifier): - (_NPN_Invoke): - (_NPN_Evaluate): - (_NPN_GetProperty): - (_NPN_SetProperty): - (_NPN_RemoveProperty): - (_NPN_HasProperty): - (_NPN_HasMethod): - (_NPN_SetException): - * bindings/jni/jni_jsobject.cpp: - (JSObject::call): - (JSObject::eval): - (JSObject::getMember): - (JSObject::setMember): - (JSObject::removeMember): - (JSObject::getSlot): - (JSObject::setSlot): - (JSObject::toString): - (JSObject::convertJObjectToValue): - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (-[WebScriptObject evaluateWebScript:]): - (-[WebScriptObject setValue:forKey:]): - (-[WebScriptObject valueForKey:]): - (-[WebScriptObject removeWebScriptKey:]): - (-[WebScriptObject stringRepresentation]): - (-[WebScriptObject webScriptValueAtIndex:]): - (-[WebScriptObject setWebScriptValueAtIndex:value:]): - (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): - * bindings/runtime.cpp: - (Instance::createRuntimeObject): - * bindings/runtime_root.h: - * bindings/testbindings.cpp: - (main): - * bindings/testbindings.mm: - (main): - * kjs/fast_malloc.cpp: - (KJS::kjs_fast_malloc): - (KJS::kjs_fast_calloc): - (KJS::kjs_fast_free): - (KJS::kjs_fast_realloc): - * kjs/fast_malloc.h: - * kjs/identifier.h: - * kjs/internal.cpp: - (InterpreterImp::InterpreterImp): - (InterpreterImp::clear): - (InterpreterImp::mark): - (InterpreterImp::checkSyntax): - (InterpreterImp::evaluate): - * kjs/internal.h: - (KJS::InterpreterImp::globalObject): - * kjs/interpreter.cpp: - (Interpreter::evaluate): - * kjs/interpreter.h: - (KJS::InterpreterLock::InterpreterLock): - (KJS::InterpreterLock::~InterpreterLock): - * kjs/nodes.h: - * kjs/protect.h: - (KJS::ProtectedValue::ProtectedValue): - (KJS::ProtectedValue::~ProtectedValue): - (KJS::ProtectedValue::operator=): - (KJS::ProtectedObject::ProtectedObject): - (KJS::ProtectedObject::~ProtectedObject): - (KJS::ProtectedObject::operator=): - (KJS::ProtectedReference::ProtectedReference): - (KJS::ProtectedReference::~ProtectedReference): - (KJS::ProtectedReference::operator=): - * kjs/protected_object.h: - * kjs/protected_values.cpp: - (KJS::ProtectedValues::getProtectCount): - (KJS::ProtectedValues::increaseProtectCount): - (KJS::ProtectedValues::decreaseProtectCount): - * kjs/string_object.cpp: - (StringObjectImp::StringObjectImp): - * kjs/testkjs.cpp: - (main): - -2005-09-16 Adele Peterson - - Change by Darin, reviewed by me and Maciej. - - Fixes http://bugs.webkit.org/show_bug.cgi?id=4547 - use int instead of long for 32-bit (to prepare for LP64 compiling) - - * bindings/c/c_class.h: - (KJS::Bindings::CClass::constructorAt): - (KJS::Bindings::CClass::numConstructors): - * bindings/c/c_runtime.h: - (KJS::Bindings::CMethod::numParameters): - * bindings/jni/jni_class.cpp: - (JavaClass::JavaClass): - * bindings/jni/jni_class.h: - (KJS::Bindings::JavaClass::constructorAt): - (KJS::Bindings::JavaClass::numConstructors): - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_jsobject.cpp: - (JSObject::convertJObjectToValue): - (JSObject::listFromJArray): - * bindings/jni/jni_runtime.cpp: - (JavaMethod::JavaMethod): - * bindings/jni/jni_runtime.h: - (KJS::Bindings::JavaConstructor::_commonCopy): - (KJS::Bindings::JavaConstructor::parameterAt): - (KJS::Bindings::JavaConstructor::numParameters): - (KJS::Bindings::JavaMethod::_commonCopy): - (KJS::Bindings::JavaMethod::parameterAt): - (KJS::Bindings::JavaMethod::numParameters): - * bindings/npapi.h: - * bindings/objc/WebScriptObject.mm: - (listFromNSArray): - * bindings/objc/objc_class.h: - (KJS::Bindings::ObjcClass::constructorAt): - (KJS::Bindings::ObjcClass::numConstructors): - * bindings/objc/objc_instance.h: - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcMethod::numParameters): - * bindings/runtime.h: - * kjs/identifier.h: - * kjs/internal.h: - * kjs/property_slot.h: - (KJS::PropertySlot::setCustomIndex): - (KJS::PropertySlot::index): - (KJS::PropertySlot::): - * kjs/regexp_object.cpp: - (RegExpObjectImp::backrefGetter): - (RegExpObjectImp::getOwnPropertySlot): - * kjs/simple_number.h: - (KJS::SimpleNumber::): - (KJS::SimpleNumber::value): - (KJS::SimpleNumber::fits): - (KJS::SimpleNumber::integerFits): - (KJS::SimpleNumber::make): - * kjs/string_object.cpp: - (substituteBackreferences): - * kjs/ustring.cpp: - (KJS::UString::from): - (KJS::UString::toUInt32): - (KJS::UString::find): - (KJS::UString::rfind): - * kjs/ustring.h: - * kjs/value.cpp: - (KJS::jsNumber): - * kjs/value.h: - -2005-09-11 Eric Seidel - - No review requested, build fix affects only SVG. - - * JavaScriptCore.xcodeproj/project.pbxproj: Fixed JSC+SVG - Fixed JavaScriptCore+SVG after PCRE 6.1 merger. - http://bugs.webkit.org/show_bug.cgi?id=4932 - -2005-09-10 Krzysztof Kowalczyk - - Reviewed and landed by Darin. - - * Makefile.vc: Added. - * README-Win32.txt: Added. - -2005-09-10 Darin Adler - - - fixed compilation for WebCore (another try) - - * kjs/simple_number.h: Added more "using" lines. - -2005-09-10 Darin Adler - - - fixed compilation for WebCore - - * kjs/simple_number.h: Have to include here to work around a bug in the GCC - standard C++ library headers. - -2005-09-10 Darin Adler - - Windows changes by Krzysztof Kowalczyk . - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4870 - win portability: fix IS_NEGATIVE_ZERO macro in simple_number.h - - * kjs/simple_number.h: - (KJS::isNegativeZero): Added. Inline function. Has a case for Windows that - uses _fpclass and a case for other platforms that uses signbit. - (KJS::SimpleNumber::fits): Use inline isNegativeZero instead of macro IS_NEGATIVE_ZERO. - - * kjs/internal.cpp: Remove definition of now-unneeded negZero global. - - * kjs/value.cpp: Touched the file because Xcode didn't know it needed to - recompile it. - - - improved test engine - - * tests/mozilla/jsDriver.pl: Sort tests in numeric order instead of using - a plain-ASCII sort; now test 33 will be after test 5 in any given set of - numbered tests. - -2005-09-08 Darin Adler - - - fixed overloaded versions of throwError so that they substitute *all* - expected parameters into the message string -- some versions used to - skip parameters, resulting in "%s" being printed in the error message. - - Reviewed by Geoff. - - * kjs/nodes.h: Updated declarations to use "const &" and not to name parameters - * kjs/nodes.cpp: (Node::throwError): Updated to match above and add one missing - call to substitute. - -2005-09-08 Darin Adler - - Reviewed by Geoff. - - - updated to PCRE 6.1 - - The original PCRE 6.1 sources are checked into the tree with the tag - "pcre-6-1" for reference. What we're checking in right now is the original - plus our changes to make it support UTF-16 and at least one other tweak - (vertical tab considered whitespace). Our work to get our changes was - done on "pcre-6-1-branch", with an anchor at "pcre-6-1-anchor" so you can - see the evolution of the UTF-16 changes. - - Note also that there was one small change made here that's not on the branch - in pcre_compile.c. - - * Info.plist: Updated the part of the copyright message that's about PCRE. - - * JavaScriptCore.xcodeproj/project.pbxproj: Added new PCRE source files, - removed obsolete ones. - - * pcre/AUTHORS: Updated to PCRE 6.1. Includes credits for Apple's UTF-16 - changes, but not the credits for Google's C++ wrapper, since we don't include that. - * pcre/COPYING: Updated to PCRE 6.1. - * pcre/LICENCE: Ditto. - * pcre/dftables.c: Ditto. - * pcre/pcre-config.h: Ditto. - * pcre/pcre.h: Ditto. - - * pcre/pcre_compile.c: Added for PCRE 6.1. - * pcre/pcre_config.c: Ditto. - * pcre/pcre_exec.c: Ditto. - * pcre/pcre_fullinfo.c: Ditto. - * pcre/pcre_get.c: Ditto. - * pcre/pcre_globals.c: Ditto. - * pcre/pcre_info.c: Ditto. - * pcre/pcre_internal.h: Ditto. - * pcre/pcre_maketables.c: Ditto. - * pcre/pcre_ord2utf8.c: Ditto. - * pcre/pcre_printint.c: Ditto. - * pcre/pcre_refcount.c: Ditto. - * pcre/pcre_study.c: Ditto. - * pcre/pcre_tables.c: Ditto. - * pcre/pcre_try_flipped.c: Ditto. - * pcre/pcre_ucp_findchar.c: Ditto. - * pcre/pcre_version.c: Ditto. - * pcre/pcre_xclass.c: Ditto. - * pcre/ucp.h: Ditto. - * pcre/ucp_findchar.c: Ditto. - * pcre/ucpinternal.h: Ditto. - * pcre/ucptable.c: Ditto. - - * pcre/get.c: Removed. - * pcre/internal.h: Removed. - * pcre/maketables.c: Removed. - * pcre/pcre.c: Removed. - * pcre/study.c: Removed. - -2005-09-07 Geoffrey Garen - - -fixed http://bugs.webkit.org/show_bug.cgi?id=4781 - Date.setMonth fails with big values due to overflow - - Reviewed by darin. - - * kjs/date_object.cpp: - (timetUsingCF): for consistency, changed return statement to invalidDate instead of LONG_MAX - (KJS::fillStructuresUsingTimeArgs): modified for readability - (KJS::fillStructuresUsingDateArgs): new function analogous to fillStructuresUsingTimeArgs - (KJS::DateProtoFuncImp::callAsFunction): modified to use fillStructuresUsingDateArgs - (KJS::DateObjectImp::construct): moved variable declaration to proper scope - (KJS::DateObjectFuncImp::callAsFunction): moved variable declaration to proper scope - -2005-09-07 Geoffrey Garen - -updated expected test results to reflect fix for - http://bugs.webkit.org/show_bug.cgi?id=4698 - kjs does not allow named functions in function expressions - - * tests/mozilla/expected.html: - -2005-09-04 Darin Adler - - * kjs/identifier.cpp: Fix comment, add missing include. - (Follow-on to changes from yesterday.) - -2005-09-03 Krzysztof Kowalczyk - - Reviewed, tweaked and landed by Darin. - - - another try at some of the Windows compilation fixes - should fix these bugs: 4546, 4831, 4834, 4643, 4830, 4832, 4833, 4835 - - * kjs/collector.cpp: Add missing include. - * kjs/date_object.cpp: Fix broken copysign macro. - * kjs/dtoa.cpp: Move macro definitions down after all header includes. - * kjs/fast_malloc.cpp: Add missing and includes. - * kjs/function.cpp: Remove broken isxdigit definition. - * kjs/grammar.y: Add a missing semicolon (and remove an excess one). - * kjs/identifier.cpp: Turn off AVOID_STATIC_CONSTRUCTORS because the placement new syntax - doesn't seem to work in Visual C++ (I'm surprised to hear that, by the way). - * kjs/value.h: Made ValueImp's destructor virtual because otherwise pointers to ValueImp - on the stack aren't right for garbage collection on Windows (don't think it works that - way with gcc's virtual table scheme, but it's a harmless change). - -2005-09-03 Krzysztof Kowalczyk - - Reviewed, tweaked and landed by Darin. - - - some Windows compilation fixes, hoping to fix the problems reported in these bugs: - 4627, 4629, 4630, 4631, 4632, 4633, 4634, 4635, 4636, 4637, 4639, 4640, 4641, 4644, 4645 - - * kjs/collector.cpp: Include on WIN32. Put thread-related code inside - KJS_MULTIPLE_THREADS #if directives. - (KJS::Collector::markCurrentThreadConservatively): Use NT_TIB to find the stack base on Win32. - - * kjs/config.h: Define HAVE_SYS_TIMEB_H for Win32. - - * kjs/date_object.cpp: Add include of . Add definitions of strncasecmp, isfinite, and - copysign for Win32. - (KJS::KRFCDate_parseDate): Move "errno = 0" line down closer to the first call to strol -- I believe - that on Win32 there's some other call before that setting errno. - - * kjs/date_object.h: Remove unneeded include of . - - * kjs/dtoa.cpp: Add an undef of strtod, needed on Win32. - - * kjs/fast_malloc.cpp: Put #if !WIN32 around some customization that's not appropriate on Win32. - (KJS::region_list_append): Add a missing cast so this Win32-specific function compiles in C++. - (KJS::sbrk): Change parameter type to match the declaration. - - * kjs/function.cpp: (isxdigit): Define a locale-independent isxdigit on Win32. - - * kjs/function.h: Remove unneeded friend class Function for FunctionImp. - - * kjs/identifier.cpp: Took out the APPLE_CHANGES from around the AVOID_STATIC_CONSTRUCTORS - define. We ultimately intend to phase out APPLE_CHANGES entirely. Also fix the - non-AVOID_STATIC_CONSTRUCTORS code path. - - * kjs/internal.cpp: Remove uneeded include of , which was confused with ! - Add a Win32 implementation of copysign. Put the threads code inside KJS_MULTIPLE_THREADS. - - * kjs/internal.h: Define a KJS_MULTIPLE_THREADS macro on non-Win32 only. Later we can make this - specific to Mac OS X if we like. - - * kjs/interpreter_map.cpp: Add missing include of . - - * kjs/list.cpp: - (KJS::ListImp::markValues): Use std::min instead of MIN. - (KJS::List::copy): Ditto. - (KJS::List::copyTail): Ditto. - - * kjs/math_object.cpp: (signbit): Add a Win32 implementation of signbit. - - * kjs/nodes.cpp: (Node::finalCheck): Use unsigned instead of uint. - Put the use of always_inline inside __GNUC__. - - * kjs/number_object.cpp: (NumberProtoFuncImp::callAsFunction): Use "10.0" instead of "10" - inside all the calls to pow to avoid ambiguity caused by overloading of pow on Win32, seen - when passing an int rather than a double or float. - - * kjs/operations.cpp: - (KJS::isInf): Add Win32 implementation. - (KJS::isPosInf): Add Win32 implementation. - (KJS::isNegInf): Add Win32 implementation. - - * kjs/regexp.cpp: Use unsigned instead of uint. - * kjs/regexp.h: Ditto. - * kjs/regexp_object.cpp: Ditto. - * kjs/regexp_object.h: Ditto. - -2005-09-02 Beth Dakin - - Fix for Denver Regression: Safari crash in KWQStringData::makeUnicode - The other half of the fix is in WebCore. - - Fix written by Maciej and Darin. - Reviewed by me/Maciej - - As Maciej said in Radar: These problems was caused by a conflict between some of our custom - allocators, causing them to return null. Symptom is typically a null pointer dereference in - a place where it might be expected an allocation has just occurred. - - * kjs/fast_malloc.cpp: Added #define for MORECORE_CONTIGUOUS, MORECORE_CANNOT_TRIM, - and MALLOC_FAILURE_ACTION. - -2005-08-31 Geoffrey Garen - - -rolled in fix for http://bugs.webkit.org/show_bug.cgi?id=4698 - kjs does not allow named functions in function expressions - - Fix by Arthur Langereis. - - Reviewed by darin. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (FuncExprNode::evaluate): - * kjs/nodes.h: - (KJS::FuncExprNode::FuncExprNode): - - Test cases added: - - * layout-tests/fast/js/named-function-expression-expected.txt: Added. - * layout-tests/fast/js/named-function-expression.html: Added. - -2005-08-31 Justin Haygood - - Reviewed, tweaked, and landed by Darin. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4085 - - fixed http://bugs.webkit.org/show_bug.cgi?id=4087 - - fixed http://bugs.webkit.org/show_bug.cgi?id=4096 - Some fixes for compiling on windows. - - * kjs/config.h: Added a WIN32 case in here, with suitable defines. - (To be tweaked as necessary.) - * kjs/function.cpp: Took out APPLE_CHANGES around use of ICU. - * kjs/operations.cpp: Removed some bogus code that always set HAVE_FLOAT_H. - -2005-08-30 Darin Adler - - Reviewed by John Sullivan. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4758 - unify SharedPtr in WebCore and JavaScriptCore - - * kjs/shared_ptr.h: Updated namespace to KXMLCore instead of kxhmlcore. - Made a few small improvements to use local variables a bit more and added - an "operator int" to reduce the chance that we'll convert a SharedPtr to - an int by accident. Also made the == operators normal functions rather than - friend functions, added a couple of comemnts. - - * kjs/function.h: Updated for namespace change. - * kjs/function.cpp: Ditto. - * kjs/function_object.cpp: Ditto. - * kjs/internal.h: Ditto. - * kjs/internal.cpp: Ditto. - * kjs/nodes.h: Ditto. - * kjs/nodes2string.cpp: Ditto. - -2005-08-26 Maciej Stachowiak - - Reviewed by John. - - many many leaks in kjsyyparse with malformed Javascript - - Record all nodes that are created during parsing, and delete any - that are left floating with a refcount of 0. - - * kjs/internal.cpp: - (KJS::Parser::saveNewNode): - (KJS::clearNewNodes): - (KJS::Parser::parse): - * kjs/internal.h: - * kjs/nodes.cpp: - (Node::Node): - * kjs/nodes.h: - (KJS::Node::refcount): - -2005-08-26 Maciej Stachowiak - - Reviewed by John. - - - fixed many many leaks in kjsyyparse on some well-formed JavaScript (can repro on sony.com, webkit tests) - - Fixed by changing the refcounting scheme for nodes. Instead of each node implementing a custom ref and - deref for all its children (and being responsible for deleting them), nodes use a smart pointer to - hold their children, and smart pointers are used outside the node tree as well. This change mostly - removes code. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/function.cpp: - (KJS::DeclaredFunctionImp::DeclaredFunctionImp): - (KJS::GlobalFuncImp::callAsFunction): - * kjs/function.h: - * kjs/function_object.cpp: - (FunctionObjectImp::construct): - * kjs/grammar.y: - * kjs/internal.cpp: - (KJS::Parser::parse): - (KJS::Parser::accept): - (KJS::InterpreterImp::checkSyntax): - (KJS::InterpreterImp::evaluate): - * kjs/internal.h: - * kjs/nodes.cpp: - (Node::Node): - (Node::~Node): - (ElementNode::evaluate): - (PropertyValueNode::evaluate): - (ArgumentListNode::evaluateList): - (NewExprNode::evaluate): - (FunctionCallValueNode::evaluate): - (FunctionCallBracketNode::evaluate): - (FunctionCallDotNode::evaluate): - (RelationalNode::evaluate): - (StatListNode::execute): - (StatListNode::processVarDecls): - (VarDeclListNode::evaluate): - (VarDeclListNode::processVarDecls): - (ForInNode::ForInNode): - (ClauseListNode::processVarDecls): - (CaseBlockNode::evalBlock): - (FuncDeclNode::processFuncDecl): - (FuncExprNode::evaluate): - (SourceElementsNode::execute): - (SourceElementsNode::processFuncDecl): - (SourceElementsNode::processVarDecls): - * kjs/nodes.h: - (KJS::Node::ref): - (KJS::Node::deref): - (KJS::NumberNode::NumberNode): - (KJS::GroupNode::GroupNode): - (KJS::ElementNode::ElementNode): - (KJS::ArrayNode::ArrayNode): - (KJS::PropertyValueNode::PropertyValueNode): - (KJS::ObjectLiteralNode::ObjectLiteralNode): - (KJS::BracketAccessorNode::BracketAccessorNode): - (KJS::DotAccessorNode::DotAccessorNode): - (KJS::ArgumentListNode::ArgumentListNode): - (KJS::ArgumentsNode::ArgumentsNode): - (KJS::NewExprNode::NewExprNode): - (KJS::FunctionCallValueNode::FunctionCallValueNode): - (KJS::FunctionCallResolveNode::FunctionCallResolveNode): - (KJS::FunctionCallBracketNode::FunctionCallBracketNode): - (KJS::FunctionCallDotNode::FunctionCallDotNode): - (KJS::PostfixNode::PostfixNode): - (KJS::DeleteNode::DeleteNode): - (KJS::VoidNode::VoidNode): - (KJS::TypeOfNode::TypeOfNode): - (KJS::PrefixNode::PrefixNode): - (KJS::UnaryPlusNode::UnaryPlusNode): - (KJS::NegateNode::NegateNode): - (KJS::BitwiseNotNode::BitwiseNotNode): - (KJS::LogicalNotNode::LogicalNotNode): - (KJS::MultNode::MultNode): - (KJS::AddNode::AddNode): - (KJS::ShiftNode::ShiftNode): - (KJS::RelationalNode::RelationalNode): - (KJS::EqualNode::EqualNode): - (KJS::BitOperNode::BitOperNode): - (KJS::BinaryLogicalNode::BinaryLogicalNode): - (KJS::ConditionalNode::ConditionalNode): - (KJS::AssignResolveNode::AssignResolveNode): - (KJS::AssignBracketNode::AssignBracketNode): - (KJS::AssignDotNode::AssignDotNode): - (KJS::CommaNode::CommaNode): - (KJS::AssignExprNode::AssignExprNode): - (KJS::VarDeclListNode::VarDeclListNode): - (KJS::VarStatementNode::VarStatementNode): - (KJS::ExprStatementNode::ExprStatementNode): - (KJS::IfNode::IfNode): - (KJS::DoWhileNode::DoWhileNode): - (KJS::WhileNode::WhileNode): - (KJS::ForNode::ForNode): - (KJS::ReturnNode::ReturnNode): - (KJS::WithNode::WithNode): - (KJS::CaseClauseNode::CaseClauseNode): - (KJS::ClauseListNode::ClauseListNode): - (KJS::ClauseListNode::clause): - (KJS::ClauseListNode::next): - (KJS::SwitchNode::SwitchNode): - (KJS::LabelNode::LabelNode): - (KJS::ThrowNode::ThrowNode): - (KJS::CatchNode::CatchNode): - (KJS::FinallyNode::FinallyNode): - (KJS::TryNode::TryNode): - (KJS::ParameterNode::ParameterNode): - (KJS::ParameterNode::nextParam): - (KJS::FuncDeclNode::FuncDeclNode): - (KJS::FuncExprNode::FuncExprNode): - * kjs/nodes2string.cpp: - (KJS::SourceStream::operator<<): - (ElementNode::streamTo): - (PropertyValueNode::streamTo): - (ArgumentListNode::streamTo): - (StatListNode::streamTo): - (VarDeclListNode::streamTo): - (CaseBlockNode::streamTo): - (ParameterNode::streamTo): - (SourceElementsNode::streamTo): - * kjs/shared_ptr.h: Added. - (kxmlcore::SharedPtr::SharedPtr): - (kxmlcore::SharedPtr::~SharedPtr): - (kxmlcore::SharedPtr::isNull): - (kxmlcore::SharedPtr::notNull): - (kxmlcore::SharedPtr::reset): - (kxmlcore::SharedPtr::get): - (kxmlcore::SharedPtr::operator*): - (kxmlcore::SharedPtr::operator->): - (kxmlcore::SharedPtr::operator!): - (kxmlcore::SharedPtr::operator bool): - (kxmlcore::SharedPtr::operator==): - (kxmlcore::::operator): - (kxmlcore::operator!=): - (kxmlcore::static_pointer_cast): - (kxmlcore::const_pointer_cast): - -2005-08-26 Geoff Garen - - Reviewed by John. - Landed by Darin. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4664 - TOT Crash from backwards null check in WebScriptObject.mm - - * bindings/objc/WebScriptObject.mm: - (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]): - Remove bogus !. - -2005-08-25 Darin Adler - - Reviewed by John Sullivan. - - - rename KJS::UString::string() to KJS::UString::domString() - - rename KJS::Identifier::string() to KJS::Identifier::domString() - - * kjs/identifier.h: Renamed. - * kjs/ustring.h: Ditto. - -2005-08-19 Darin Adler - - Reviewed by Maciej. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4435 - speed up JavaScript by tweaking the Identifier class - - * kjs/identifier.h: Add a new global nullIdentifier and make Identifier::null a function - that returns it. - * kjs/identifier.cpp: (KJS::Identifier::init): Initialize a global for the null identifier - as well as all the other globals for special identifiers. - - * kjs/ustring.h: (KJS::UString::UString): Make this empty constructor inline. - * kjs/ustring.cpp: Remove the old non-inline version. - -2005-08-19 Mitz Pettel - - Reviewed by Maciej. - Revised and landed by Darin. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4474 - REGRESSION: Crash when using in-place operator on uninitialized array element - - * kjs/nodes.cpp: - (AssignResolveNode::evaluate): Remove unneeded "isSet" assertion. - (AssignBracketNode::evaluate): Replace code that tested "isSet" with code that - tests the return value of getPropertySlot. - - * kjs/property_slot.h: Removed unneeded "isSet" function. Property slots are - either uninitialized or set. There's no "initialized and not set" state. - -2005-08-18 Adele Peterson - - Checked "Inline Functions Hidden" box - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2005-08-16 Darin Adler - - Reviewed by Geoff. - - - fixed crash in one of the JavaScript tests (introduced by my throwError change) - - * kjs/nodes.cpp: (Node::setExceptionDetailsIfNeeded): Check if the exception is an - object before setting the file and line number properties on it. Something to think - about in the future -- do we really want to do this on any object that's thrown? - How about limiting it to error objects that were created by the JavaScript engine? - - - changed kjs_fast_malloc so we don't have two conflicting versions of the same function - - * kjs/fast_malloc.h: Took out all the ifdefs from this header. - * kjs/fast_malloc.cpp: Added non-NDEBUG versions of the functions that just call - the system malloc, and put the NDEBUG versions in an #else. - -2005-08-16 Darin Adler - - Reviewed by Geoff. - - - clean up exported symbols that are not in a "KJS" namespace - - * bindings/NP_jsobject.cpp: (identiferFromNPIdentifier): Marked this function static - so it no longer has external linkage. - * bindings/c/c_utility.h: Put all this stuff inside the KJS namespace. - * bindings/c/c_utility.cpp: Also marked some globals static so they don't have external - linkage; not as important given the namespace. - * bindings/npruntime.cpp: Marked functions static so they no longer have internal linkage. - Also removed unused _NPN_SetExceptionWithUTF8 function (not in header, had C++ linkage!). - - * bindings/jni/jni_utility.cpp: (KJS::Bindings::getJavaVM): Call KJS_GetCreatedJavaVMs - using the soft linking header, instead of calling the JNI call. This allows processes - to link both JavaScriptCore and JavaVM without a symbol conflict. - * bindings/softlinking.c: - (loadFramework): Marked this function static so it no longer has external linkage. - (getFunctionPointer): Ditto. - (KJS_GetCreatedJavaVMs): Renamed this so it has a KJS prefix. - - * JavaScriptCore.xcodeproj/project.pbxproj: Added softlinking.h. - * bindings/softlinking.h: Added. - - * kjs/nodes2string.cpp: (streamAssignmentOperatorTo): Marked this function static so it - no longer has external linkage. - -2005-08-15 Darin Adler - - Reviewed by Geoff. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4437 - clean up error creation with new throwError function - - * bindings/NP_jsobject.cpp: - (_NPN_SetException): - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_runtime.cpp: - (JavaField::dispatchValueFromInstance): - (JavaField::dispatchSetValueToInstance): - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject _initializeWithObjectImp:originExecutionContext:executionContext:]): - (-[WebScriptObject _initWithObjectImp:originExecutionContext:executionContext:]): - (+[WebScriptObject throwException:]): - (-[WebScriptObject setException:]): - (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]): - * bindings/objc/objc_class.h: - (KJS::Bindings::ObjcClass::~ObjcClass): - (KJS::Bindings::ObjcClass::ObjcClass): - (KJS::Bindings::ObjcClass::operator=): - (KJS::Bindings::ObjcClass::constructorAt): - (KJS::Bindings::ObjcClass::numConstructors): - * bindings/objc/objc_header.h: - * bindings/objc/objc_runtime.h: - (KJS::Bindings::ObjcField::~ObjcField): - (KJS::Bindings::ObjcField::ObjcField): - (KJS::Bindings::ObjcField::operator=): - (KJS::Bindings::ObjcMethod::ObjcMethod): - (KJS::Bindings::ObjcMethod::~ObjcMethod): - (KJS::Bindings::ObjcMethod::operator=): - * bindings/objc/objc_runtime.mm: - (ObjcField::valueFromInstance): - (ObjcField::setValueToInstance): - (ObjcArray::setValueAt): - (ObjcArray::valueAt): - * bindings/objc/objc_utility.h: - * bindings/objc/objc_utility.mm: - (KJS::Bindings::JSMethodNameToObjCMethodName): - (KJS::Bindings::convertValueToObjcValue): - (KJS::Bindings::convertNSStringToString): - (KJS::Bindings::convertObjcValueToValue): - (KJS::Bindings::objcValueTypeForType): - (KJS::Bindings::createObjcInstanceForValue): - (KJS::Bindings::throwError): - * bindings/runtime.h: - (KJS::Bindings::Parameter::~Parameter): - (KJS::Bindings::Method::~Method): - (KJS::Bindings::Instance::Instance): - (KJS::Bindings::Instance::begin): - (KJS::Bindings::Instance::end): - (KJS::Bindings::Instance::getValueOfUndefinedField): - (KJS::Bindings::Instance::supportsSetValueOfUndefinedField): - (KJS::Bindings::Instance::setValueOfUndefinedField): - (KJS::Bindings::Instance::valueOf): - * bindings/runtime_array.cpp: - (RuntimeArrayImp::put): - * bindings/runtime_object.h: - (KJS::RuntimeObjectImp::setInternalInstance): - (KJS::RuntimeObjectImp::getInternalInstance): - * kjs/array_object.cpp: - (getProperty): - (ArrayProtoFuncImp::callAsFunction): - (ArrayObjectImp::construct): - * kjs/bool_object.cpp: - (BooleanProtoFuncImp::callAsFunction): - * kjs/date_object.cpp: - (KJS::DateProtoFuncImp::callAsFunction): - * kjs/function.cpp: - (KJS::decode): - (KJS::GlobalFuncImp::callAsFunction): - * kjs/function_object.cpp: - (FunctionProtoFuncImp::callAsFunction): - (FunctionObjectImp::construct): - * kjs/internal.cpp: - (KJS::UndefinedImp::toObject): - (KJS::NullImp::toObject): - (KJS::InterpreterImp::evaluate): - (KJS::InternalFunctionImp::hasInstance): - * kjs/nodes.cpp: - (Node::throwError): - (substitute): - (Node::setExceptionDetailsIfNeeded): - (undefinedVariableError): - (ProgramNode::ProgramNode): - * kjs/number_object.cpp: - (NumberProtoFuncImp::callAsFunction): - * kjs/object.cpp: - (KJS::ObjectImp::call): - (KJS::ObjectImp::defaultValue): - (KJS::Error::create): - (KJS::throwError): - * kjs/object.h: - (KJS::ObjectImp::clearProperties): - (KJS::ObjectImp::getPropertySlot): - (KJS::ObjectImp::getOwnPropertySlot): - * kjs/object_object.cpp: - (ObjectProtoFuncImp::callAsFunction): - * kjs/reference.cpp: - (KJS::Reference::getBase): - (KJS::Reference::getValue): - (KJS::Reference::putValue): - (KJS::Reference::deleteValue): - * kjs/regexp_object.cpp: - (RegExpProtoFuncImp::callAsFunction): - (RegExpObjectImp::construct): - * kjs/string_object.cpp: - (StringProtoFuncImp::callAsFunction): - -2005-08-15 Anders Carlsson - - Reviewed by Darin. - - * tests/mozilla/ecma_3/Date/15.9.5.5.js: - Remove the code which tests that Date.toLocaleString should be parsable - by Date.parse. That is not true according to the spec. - -2005-08-15 Darin Adler - - Reviewed by Geoff. - - * kjs/collector.cpp: (KJS::Collector::allocate): Use a local instead of a global in one - more place; slight speedup. - -2005-08-14 Darin Adler - - Reviewed by Maciej. - - - fixed crash observed on one of the Apple-only layout tests - - * kjs/property_map.cpp: (KJS::PropertyMap::mark): Change code to understand that deleted - entries have a value of NULL, so the deleted sentinel count doesn't need to be included - in the count of things to mark since we're ignoring the keys. - -2005-08-14 Darin Adler - - Reviewed by Maciej. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4421 - speed up JavaScript by inlining some label stack functions - - * kjs/internal.h: Removed the copy constructor and assignment operator for LabelStack. - They were unused, and the implementations had bugs; I removed them rather than fixing them. - Also removed the clear function, since that was only needed to help the assignment operator - share code with the destructor, and was not efficient enough for the destructor. - (KJS::LabelStack::~LabelStack): Made this inline. Also used an efficient implementation - that's nice and fast when the stack is empty, better than the old clear() function which - used to keep updating and refetching "tos" each time through the loop. - (KJS::LabelStack::pop): Made this inline. - - * kjs/internal.cpp: Deleted the now-inline functions and the obsolete functions. Also - deleted a commented-out line of code. - -2005-08-14 Darin Adler - - Reviewed by Maciej. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4419 - speed up JavaScript by improving KJS::List - - my measurements show an improvement of 1% on iBench JavaScript - - * kjs/list.cpp: Rearrange list to make the values and free list share the same storage, - which saves 4 bytes per list. Also remove the pointers used only on the heap from the - lists that are in the pool, which saves 8 bytes per list. Moving the free list pointer - closer to the start of the list object also speeds up access to the free list. New - "HeapListImp" struct is used only for the lists on the heap. - (KJS::List::markProtectedLists): Shadowed global variable in local and updated for the - new terminology ("heap" instead of "outside pool"). - (KJS::allocateListImp): Updated for new terminology. - (KJS::List::release): Moved the code from deallocateListImp in here -- it wasn't being - inlined and didn't need to be in a separate function. - -2005-08-14 Darin Adler - - Reviewed by Maciej. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4417 - speed up JavaScript with some small changes to the property map code - - my measurements show an improvement of 2% on iBench JavaScript - - * kjs/property_map.h: (KJS::PropertyMap::PropertyMap): Made the default constructor inline. - * kjs/property_map.cpp: - (KJS::PropertyMap::~PropertyMap): Changed loop to exit early once we know we've processed - all the hash table entries, based on the count. - (KJS::PropertyMap::mark): Ditto. - - * kjs/object.h: Made an arbitrary change here to force recompiling so we pick up changes to - property_map.h. Works around what seems to be an Xcode header dependency bug. - -2005-08-14 Darin Adler - - Reviewed by Maciej. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4416 - speed up JavaScript with some improvements to the garbage collector - - my measurements show an improvement of 2% on iBench JavaScript - - * kjs/collector.cpp: - (KJS::Collector::allocate): Use local variables to shadow globals instead of repeatedly - going at global variables. Tighten up loop implementations to make the common case fast. - (KJS::Collector::markStackObjectsConservatively): Use local variables to shadow globals. - Used a goto to eliminate a boolean since it was showing up in the profile. - (KJS::Collector::markProtectedObjects): Iterate through the table using pointer rather - than an index since the profile showed that generating better code. - (KJS::Collector::collect): Added a special case for blocks where all cells are used, - Use local variables to shadow globals. Eliminated a boolean by computing it another - way (checking to see if the number of live objects changed). Also used local variables - to shadow fields in the current cell when sweeping. - (KJS::Collector::numReferencedObjects): Use AllocatedValueImp instead of ValueImp - in one place -- means we get faster versions of various functions that don't worry - about SimpleNumber. - (KJS::className): Ditto. - (KJS::Collector::rootObjectClasses): Ditto. - -2005-08-14 Darin Adler - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4344 - REGRESSION: JavaScript crash when going back from viewing a thread (NULL protoype) - - * kjs/error_object.cpp: (NativeErrorImp::NativeErrorImp): Set proto in a more - straightforward way. The old code set the proto to 0 and then to the correct value. - This showed up as a "false positive" when searching for places that set prototype - to NULL/0 so I fixed it. - - * kjs/function_object.cpp: (FunctionPrototypeImp::FunctionPrototypeImp): Change to - not pass an explicit "0" to the base class (InternalFunctionImp) constructor. - - * kjs/internal.h: Added a default constructor for InternalFunctionImp. - * kjs/internal.cpp: (KJS::InternalFunctionImp::InternalFunctionImp): Added the - default constructor (empty body, just calls base class's default constructor). - - * kjs/object.h: - (KJS::ObjectImp::ObjectImp): Add an assertion to catch NULL prototypes earlier - in Development builds. - (KJS::ObjectImp::setPrototype): Ditto. - -2005-08-12 Maciej Stachowiak - - Reviewed by John. - - - two simple speed improvements for a 3% speed gain - - * JavaScriptCore.xcodeproj/project.pbxproj: turn on -fstrict-aliasing - - * kjs/scope_chain.h: - (KJS::ScopeChainIterator::ScopeChainIterator): Add a scope chain iterator - so you can walk a scope chain without having to make a copy that you then mutate. - (KJS::ScopeChainIterator::operator*): standard iterator operation - (KJS::ScopeChainIterator::operator->): ditto - (KJS::ScopeChainIterator::operator++): ditto - (KJS::ScopeChainIterator::operator==): ditto - (KJS::ScopeChainIterator::operator!=): ditto - (KJS::ScopeChain::begin): Iterator for the top of the scope chain - (KJS::ScopeChain::end): Iterator for one past the bottom (i.e. null) - * kjs/nodes.cpp: - (ResolveNode::evaluate): Use scope chain iterator instead of copying - a scope chain and then modifying the copy - (ResolveNode::evaluateReference): ditto - (FunctionCallResolveNode::evaluate): ditto - (AssignResolveNode::evaluate): ditto - -2005-08-12 Maciej Stachowiak - - Patch from Anders Carlsson, reviewed by me. - - * kjs/nodes.h: Fix build breakage. - -2005-08-12 Maciej Stachowiak - - Reviewed by hyatt. - - - refactor function calls, 3% speedup on JS iBench. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (Node::throwError): Added new useful variants. - (FunctionCallValueNode::evaluate): New node to handle calls on expressions - that are strictly values, not references. - (FunctionCallValueNode::ref): ditto - (FunctionCallValueNode::deref): ditto - (FunctionCallResolveNode::evaluate): New node to handle calls on identifier - expressions, so that they are looked up in the scope chain. - (FunctionCallResolveNode::ref): ditto - (FunctionCallResolveNode::deref): ditto - (FunctionCallBracketNode::evaluate): New node to handle calls on bracket - dereferences, so that the expression before brackets is used as the this - object. - (FunctionCallBracketNode::ref): ditto - (FunctionCallBracketNode::deref): ditto - (FunctionCallDotNode::evaluate): New node to handle calls on dot - dereferences, so that the expression before the dot is used as the this - object. - (FunctionCallDotNode::ref): ditto - (FunctionCallDotNode::deref): ditto - (dotExprNotAnObjectString): helper function to avoid global variable access. - (dotExprDoesNotAllowCallsString): ditto - * kjs/nodes.h: Declared new classes. - * kjs/nodes2string.cpp: - (FunctionCallValueNode::streamTo): Added - serializes the appropriate function call - (FunctionCallResolveNode::streamTo): ditto - (FunctionCallBracketNode::streamTo): ditto - (FunctionCallParenBracketNode::streamTo): ditto - (FunctionCallDotNode::streamTo): ditto - (FunctionCallParenDotNode::streamTo): ditto - * kjs/object.h: - (KJS::ObjectImp::isActivation): Change how activation objects are - detected in the scope chain, a virtual function is cheaper than the - old inheritance test. - * kjs/function.h: - (KJS::ActivationImp::isActivation): Ditto. - -2005-08-11 Maciej Stachowiak - - - added missing file from earlier checkin - - * kjs/grammar_types.h: Added. - (KJS::makeNodePair): - (KJS::makeNodeWithIdent): - -2005-08-11 Maciej Stachowiak - - Reviewed by Geoff. - - * kjs/date_object.cpp: - (timetUsingCF): Fix one of the date tests my making the CF version of mktime - have the same quirk about the DST field as the real mktime. - * tests/mozilla/expected.html: Updated for newly fixed test. - -2005-08-11 Maciej Stachowiak - - - updated for one of the tests that Darin incidentally fixed. - - * tests/mozilla/expected.html: - -2005-08-10 Maciej Stachowiak - - Reviewed by Geoff. - - Refactor assignment grammar to avoid Reference type, and to later - be able to take advantage of writeable PropertySlots, when those - are added. I also fixed a minor bug, turning a function to a - string lost parentheses, I made sure they are printed at least - where semantically significant. - - Test cases: see WebCore - - * kjs/grammar.y: Change grammar so that assignment expressions are parsed - directly to nodes that know how to set the kind of location being assigned, instead - of having a generic assign node that counts on evaluateReference. - * kjs/lexer.cpp: Include grammar_types.h. - * kjs/nodes.cpp: - (BracketAccessorNode): Renamed from AccessorNode1 for clarity. - (DotAccessorNode): Renamed from AccessorNode2 for clarity. - (combineForAssignment): Inline function for doing the proper kind of - operation for various update assignments like += or *=. - (AssignResolveNode): Node that handles assignment to a bare identifier. - (AssignDotNode): Node that handles assignments of the form EXPR . IDENT = EXPR - (AssignBracketNode): EXPR [ IDENT ] = EXPR - * kjs/nodes.h: Updated for declarations/renames of new classes. - * kjs/nodes2string.cpp: - (GroupNode::streamTo): Fixed to print parens around the expression. - (BracketAccessorNode::streamTo): Renamed. - (DotAccessorNode::streamTo): Renamed. - (AssignResolveNode::streamTo): Added. - (AssignBracketNode::streamTo): Added. - (AssignDotNode::streamTo): Added. - (streamAssignmentOperatorTo): helper function for the above - * kjs/property_slot.h: - (KJS::PropertySlot::isSet): Made this const. - -2005-08-10 Adele Peterson - - Bumping version to 420+ - - * Info.plist: - -2005-08-10 Geoffrey Garen - - -fixed REGRESSION: Some applet liveconnect calls - throws privilege exception. - - Reviewed by richard and mjs. - - -I removed the global static JavaClass cache, since it violated Java - security to cache classes between websites and applets. - - * bindings/jni/jni_class.cpp: - -removed global static cache dictionary - -instance constructor and destructor now do the work that used to - be done by static factory methods - -removed obsolete functions - (JavaClass::JavaClass): - (JavaClass::~JavaClass): - * bindings/jni/jni_class.h: - -removed obsolete function declarations - -made copying private since it's unused and it's also not clear - excatly how copying would work with Java security - -made default construction private since it's meaningless - * bindings/jni/jni_instance.cpp: - -removed obsolete functions - (JavaInstance::~JavaInstance): - (JavaInstance::getClass): - * bindings/jni/jni_instance.h: - -made copying private since it's unused and it's also not clear - excatly how copying would work with Java security - -made default construction private since it's meaningless - -2005-08-08 Geoffrey Garen - - -fixed crash caused by fix for http://bugs.webkit.org/show_bug.cgi?id=4313 - - - exceptionDescription now gets explicitly initialized to NULL in all - the places listed below -- our wrapper classes used to take care of this - automagically - - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_runtime.cpp: - (JavaField::dispatchValueFromInstance): - (JavaField::dispatchSetValueToInstance): - -2005-08-08 Darin Adler - - Reviewed by John Sullivan. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4325 - Mozilla Date tests have an unnecessary loop that runs 1970 times before each test - - * tests/mozilla/ecma/shell.js: Added TIME_YEAR_0 constant. - - * tests/mozilla/ecma/Date/15.9.5.10-1.js: Removed the loop and changed code to use the constant. - * tests/mozilla/ecma/Date/15.9.5.10-10.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.10-11.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.10-12.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.10-13.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.10-2.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.10-3.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.10-4.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.10-5.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.10-6.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.10-7.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.10-8.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.10-9.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.11-2.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.12-1.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.12-2.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.12-3.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.12-4.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.12-5.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.12-6.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.12-7.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.12-8.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.13-2.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.13-8.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.14.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.15.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.16.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.17.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.18.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.19.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.20.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.21-1.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.21-2.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.21-3.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.21-4.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.21-5.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.21-6.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.21-7.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.21-8.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.22-1.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.22-2.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.22-3.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.22-4.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.22-5.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.22-6.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.22-7.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.22-8.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.23-4.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.23-5.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.23-6.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.23-7.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.23-8.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.23-9.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.5.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.6.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.7.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.8.js: Ditto. - * tests/mozilla/ecma/Date/15.9.5.9.js: Ditto. - -2005-08-08 Darin Adler - - - forgot to delete an obsolete file - - * kjs/object_wrapper.h: Deleted. - -2005-08-07 Darin Adler - - - fixed two problems compiling with gcc 4.0 - - * kjs/array_object.cpp: (ArrayProtoFuncImp::callAsFunction): Initialized a - variable to quiet an erroneous warning. - * kjs/date_object.cpp: (KJS::makeTime): Removed extraneous KJS:: prefix. - -2005-08-07 Darin Adler - - Rubber stamped by Maciej. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4313 - eliminate KJS::Value and KJS::Object smart pointer wrappers (for simplicity and speed) - - * JavaScriptCore.xcodeproj/project.pbxproj: Removed object_wrapper.h. - - Global replaces and other wonderful stuff. - - * bindings/NP_jsobject.cpp: - (_NPN_Invoke): - (_NPN_Evaluate): - (_NPN_GetProperty): - (_NPN_SetProperty): - (_NPN_HasMethod): - (_NPN_SetException): - * bindings/c/c_instance.cpp: - (KJS::Bindings::CInstance::CInstance): - (KJS::Bindings::CInstance::invokeMethod): - (KJS::Bindings::CInstance::invokeDefaultMethod): - (KJS::Bindings::CInstance::defaultValue): - (KJS::Bindings::CInstance::stringValue): - (KJS::Bindings::CInstance::numberValue): - (KJS::Bindings::CInstance::booleanValue): - (KJS::Bindings::CInstance::valueOf): - * bindings/c/c_instance.h: - * bindings/c/c_runtime.cpp: - (CField::valueFromInstance): - (CField::setValueToInstance): - * bindings/c/c_runtime.h: - * bindings/c/c_utility.cpp: - (convertNPStringToUTF16): - (convertUTF8ToUTF16): - (coerceValueToNPVariantStringType): - (convertValueToNPVariant): - (convertNPVariantToValue): - * bindings/c/c_utility.h: - * bindings/jni/jni_instance.cpp: - (JavaInstance::stringValue): - (JavaInstance::numberValue): - (JavaInstance::booleanValue): - (JavaInstance::invokeMethod): - (JavaInstance::invokeDefaultMethod): - (JavaInstance::defaultValue): - (JavaInstance::valueOf): - * bindings/jni/jni_instance.h: - * bindings/jni/jni_jsobject.cpp: - (JSObject::invoke): - (JSObject::call): - (JSObject::eval): - (JSObject::getMember): - (JSObject::getSlot): - (JSObject::toString): - (JSObject::convertValueToJObject): - (JSObject::convertJObjectToValue): - (JSObject::listFromJArray): - * bindings/jni/jni_jsobject.h: - * bindings/jni/jni_objc.mm: - (KJS::Bindings::dispatchJNICall): - * bindings/jni/jni_runtime.cpp: - (JavaArray::convertJObjectToArray): - (JavaField::dispatchValueFromInstance): - (JavaField::valueFromInstance): - (JavaField::dispatchSetValueToInstance): - (JavaField::setValueToInstance): - (JavaArray::setValueAt): - (JavaArray::valueAt): - * bindings/jni/jni_runtime.h: - (KJS::Bindings::JavaString::ustring): - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::getJavaVM): - (KJS::Bindings::getJNIEnv): - (KJS::Bindings::getMethodID): - (KJS::Bindings::callJNIVoidMethod): - (KJS::Bindings::callJNIObjectMethod): - (KJS::Bindings::callJNIBooleanMethod): - (KJS::Bindings::callJNIStaticBooleanMethod): - (KJS::Bindings::callJNIByteMethod): - (KJS::Bindings::callJNICharMethod): - (KJS::Bindings::callJNIShortMethod): - (KJS::Bindings::callJNIIntMethod): - (KJS::Bindings::callJNILongMethod): - (KJS::Bindings::callJNIFloatMethod): - (KJS::Bindings::callJNIDoubleMethod): - (KJS::Bindings::callJNIVoidMethodA): - (KJS::Bindings::callJNIObjectMethodA): - (KJS::Bindings::callJNIByteMethodA): - (KJS::Bindings::callJNICharMethodA): - (KJS::Bindings::callJNIShortMethodA): - (KJS::Bindings::callJNIIntMethodA): - (KJS::Bindings::callJNILongMethodA): - (KJS::Bindings::callJNIFloatMethodA): - (KJS::Bindings::callJNIDoubleMethodA): - (KJS::Bindings::callJNIBooleanMethodA): - (KJS::Bindings::callJNIVoidMethodIDA): - (KJS::Bindings::callJNIObjectMethodIDA): - (KJS::Bindings::callJNIByteMethodIDA): - (KJS::Bindings::callJNICharMethodIDA): - (KJS::Bindings::callJNIShortMethodIDA): - (KJS::Bindings::callJNIIntMethodIDA): - (KJS::Bindings::callJNILongMethodIDA): - (KJS::Bindings::callJNIFloatMethodIDA): - (KJS::Bindings::callJNIDoubleMethodIDA): - (KJS::Bindings::callJNIBooleanMethodIDA): - (KJS::Bindings::getCharactersFromJString): - (KJS::Bindings::releaseCharactersForJString): - (KJS::Bindings::getCharactersFromJStringInEnv): - (KJS::Bindings::releaseCharactersForJStringInEnv): - (KJS::Bindings::getUCharactersFromJStringInEnv): - (KJS::Bindings::releaseUCharactersForJStringInEnv): - (KJS::Bindings::JNITypeFromClassName): - (KJS::Bindings::signatureFromPrimitiveType): - (KJS::Bindings::JNITypeFromPrimitiveType): - (KJS::Bindings::getJNIField): - (KJS::Bindings::convertValueToJValue): - * bindings/jni/jni_utility.h: - * bindings/objc/WebScriptObject.mm: - (_didExecute): - (-[WebScriptObject _initializeWithObjectImp:originExecutionContext:Bindings::executionContext:Bindings::]): - (-[WebScriptObject _initWithObjectImp:originExecutionContext:Bindings::executionContext:Bindings::]): - (-[WebScriptObject _imp]): - (-[WebScriptObject _executionContext]): - (-[WebScriptObject _setExecutionContext:]): - (-[WebScriptObject _originExecutionContext]): - (-[WebScriptObject _setOriginExecutionContext:]): - (+[WebScriptObject throwException:]): - (listFromNSArray): - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (-[WebScriptObject evaluateWebScript:]): - (-[WebScriptObject setValue:forKey:]): - (-[WebScriptObject valueForKey:]): - (-[WebScriptObject removeWebScriptKey:]): - (-[WebScriptObject stringRepresentation]): - (-[WebScriptObject webScriptValueAtIndex:]): - (-[WebScriptObject setException:]): - (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:Bindings::]): - * bindings/objc/WebScriptObjectPrivate.h: - * bindings/objc/objc_class.h: - * bindings/objc/objc_class.mm: - (KJS::Bindings::ObjcClass::fallbackObject): - * bindings/objc/objc_instance.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - (ObjcInstance::invokeDefaultMethod): - (ObjcInstance::setValueOfField): - (ObjcInstance::setValueOfUndefinedField): - (ObjcInstance::getValueOfField): - (ObjcInstance::getValueOfUndefinedField): - (ObjcInstance::defaultValue): - (ObjcInstance::stringValue): - (ObjcInstance::numberValue): - (ObjcInstance::booleanValue): - (ObjcInstance::valueOf): - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcField::valueFromInstance): - (convertValueToObjcObject): - (ObjcField::setValueToInstance): - (ObjcArray::setValueAt): - (ObjcArray::valueAt): - (ObjcFallbackObjectImp::put): - (ObjcFallbackObjectImp::callAsFunction): - (ObjcFallbackObjectImp::defaultValue): - * bindings/objc/objc_utility.h: - * bindings/objc/objc_utility.mm: - (Bindings::JSMethodNameToObjCMethodName): - (Bindings::convertValueToObjcValue): - (Bindings::convertNSStringToString): - (Bindings::convertObjcValueToValue): - (Bindings::objcValueTypeForType): - (Bindings::createObjcInstanceForValue): - * bindings/runtime.cpp: - (Instance::getValueOfField): - (Instance::setValueOfField): - (Instance::createRuntimeObject): - (Instance::createLanguageInstanceForValue): - * bindings/runtime.h: - (KJS::Bindings::Constructor::~Constructor): - (KJS::Bindings::Field::~Field): - (KJS::Bindings::MethodList::MethodList): - (KJS::Bindings::Class::fallbackObject): - (KJS::Bindings::Class::~Class): - (KJS::Bindings::Instance::Instance): - (KJS::Bindings::Instance::getValueOfUndefinedField): - (KJS::Bindings::Instance::supportsSetValueOfUndefinedField): - (KJS::Bindings::Instance::setValueOfUndefinedField): - (KJS::Bindings::Instance::valueOf): - (KJS::Bindings::Instance::setExecutionContext): - (KJS::Bindings::Instance::~Instance): - (KJS::Bindings::Array::~Array): - * bindings/runtime_array.cpp: - (RuntimeArrayImp::RuntimeArrayImp): - (RuntimeArrayImp::lengthGetter): - (RuntimeArrayImp::indexGetter): - (RuntimeArrayImp::put): - * bindings/runtime_array.h: - * bindings/runtime_method.cpp: - (RuntimeMethodImp::lengthGetter): - (RuntimeMethodImp::callAsFunction): - * bindings/runtime_method.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::fallbackObjectGetter): - (RuntimeObjectImp::fieldGetter): - (RuntimeObjectImp::methodGetter): - (RuntimeObjectImp::getOwnPropertySlot): - (RuntimeObjectImp::put): - (RuntimeObjectImp::defaultValue): - (RuntimeObjectImp::callAsFunction): - * bindings/runtime_object.h: - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstanceImp::ArrayInstanceImp): - (ArrayInstanceImp::lengthGetter): - (ArrayInstanceImp::getOwnPropertySlot): - (ArrayInstanceImp::put): - (ArrayInstanceImp::propList): - (ArrayInstanceImp::setLength): - (compareByStringForQSort): - (compareWithCompareFunctionForQSort): - (ArrayInstanceImp::sort): - (ArrayInstanceImp::pushUndefinedObjectsToEnd): - (ArrayPrototypeImp::ArrayPrototypeImp): - (ArrayProtoFuncImp::ArrayProtoFuncImp): - (ArrayProtoFuncImp::callAsFunction): - (ArrayObjectImp::ArrayObjectImp): - (ArrayObjectImp::construct): - (ArrayObjectImp::callAsFunction): - * kjs/array_object.h: - * kjs/bool_object.cpp: - (BooleanPrototypeImp::BooleanPrototypeImp): - (BooleanProtoFuncImp::BooleanProtoFuncImp): - (BooleanProtoFuncImp::callAsFunction): - (BooleanObjectImp::BooleanObjectImp): - (BooleanObjectImp::construct): - (BooleanObjectImp::callAsFunction): - * kjs/bool_object.h: - * kjs/collector.cpp: - (KJS::Collector::markStackObjectsConservatively): - (KJS::Collector::collect): - (KJS::className): - * kjs/completion.h: - (KJS::Completion::Completion): - (KJS::Completion::value): - (KJS::Completion::isValueCompletion): - * kjs/context.h: - (KJS::ContextImp::variableObject): - (KJS::ContextImp::setVariableObject): - (KJS::ContextImp::thisValue): - (KJS::ContextImp::activationObject): - (KJS::ContextImp::pushScope): - * kjs/date_object.cpp: - (formatLocaleDate): - (KJS::timeFromArgs): - (KJS::DatePrototypeImp::DatePrototypeImp): - (KJS::DateProtoFuncImp::DateProtoFuncImp): - (KJS::DateProtoFuncImp::callAsFunction): - (KJS::DateObjectImp::DateObjectImp): - (KJS::DateObjectImp::construct): - (KJS::DateObjectImp::callAsFunction): - (KJS::DateObjectFuncImp::DateObjectFuncImp): - (KJS::DateObjectFuncImp::callAsFunction): - (KJS::parseDate): - (KJS::KRFCDate_parseDate): - (KJS::timeClip): - * kjs/date_object.h: - * kjs/debugger.cpp: - (Debugger::exception): - (Debugger::callEvent): - (Debugger::returnEvent): - * kjs/debugger.h: - * kjs/error_object.cpp: - (ErrorPrototypeImp::ErrorPrototypeImp): - (ErrorProtoFuncImp::ErrorProtoFuncImp): - (ErrorProtoFuncImp::callAsFunction): - (ErrorObjectImp::ErrorObjectImp): - (ErrorObjectImp::construct): - (ErrorObjectImp::callAsFunction): - (NativeErrorPrototypeImp::NativeErrorPrototypeImp): - (NativeErrorImp::NativeErrorImp): - (NativeErrorImp::construct): - (NativeErrorImp::callAsFunction): - * kjs/error_object.h: - * kjs/function.cpp: - (KJS::FunctionImp::FunctionImp): - (KJS::FunctionImp::callAsFunction): - (KJS::FunctionImp::processParameters): - (KJS::FunctionImp::argumentsGetter): - (KJS::FunctionImp::lengthGetter): - (KJS::FunctionImp::put): - (KJS::DeclaredFunctionImp::DeclaredFunctionImp): - (KJS::DeclaredFunctionImp::construct): - (KJS::ArgumentsImp::ArgumentsImp): - (KJS::ArgumentsImp::mappedIndexGetter): - (KJS::ArgumentsImp::put): - (KJS::ActivationImp::argumentsGetter): - (KJS::GlobalFuncImp::GlobalFuncImp): - (KJS::encode): - (KJS::decode): - (KJS::GlobalFuncImp::callAsFunction): - * kjs/function.h: - * kjs/function_object.cpp: - (FunctionPrototypeImp::FunctionPrototypeImp): - (FunctionPrototypeImp::callAsFunction): - (FunctionProtoFuncImp::FunctionProtoFuncImp): - (FunctionProtoFuncImp::callAsFunction): - (FunctionObjectImp::FunctionObjectImp): - (FunctionObjectImp::construct): - (FunctionObjectImp::callAsFunction): - * kjs/function_object.h: - * kjs/internal.cpp: - (KJS::UndefinedImp::toPrimitive): - (KJS::UndefinedImp::toObject): - (KJS::NullImp::toPrimitive): - (KJS::NullImp::toObject): - (KJS::BooleanImp::toPrimitive): - (KJS::BooleanImp::toObject): - (KJS::StringImp::toPrimitive): - (KJS::StringImp::toObject): - (KJS::NumberImp::toPrimitive): - (KJS::NumberImp::toObject): - (KJS::NumberImp::getUInt32): - (KJS::LabelStack::push): - (KJS::ContextImp::ContextImp): - (KJS::InterpreterImp::globalInit): - (KJS::InterpreterImp::globalClear): - (KJS::InterpreterImp::InterpreterImp): - (KJS::InterpreterImp::initGlobalObject): - (KJS::InterpreterImp::clear): - (KJS::InterpreterImp::mark): - (KJS::InterpreterImp::evaluate): - (KJS::InternalFunctionImp::hasInstance): - (KJS::roundValue): - (KJS::printInfo): - * kjs/internal.h: - (KJS::InterpreterImp::builtinObject): - (KJS::InterpreterImp::builtinFunction): - (KJS::InterpreterImp::builtinArray): - (KJS::InterpreterImp::builtinBoolean): - (KJS::InterpreterImp::builtinString): - (KJS::InterpreterImp::builtinNumber): - (KJS::InterpreterImp::builtinDate): - (KJS::InterpreterImp::builtinRegExp): - (KJS::InterpreterImp::builtinError): - (KJS::InterpreterImp::builtinObjectPrototype): - (KJS::InterpreterImp::builtinFunctionPrototype): - (KJS::InterpreterImp::builtinArrayPrototype): - (KJS::InterpreterImp::builtinBooleanPrototype): - (KJS::InterpreterImp::builtinStringPrototype): - (KJS::InterpreterImp::builtinNumberPrototype): - (KJS::InterpreterImp::builtinDatePrototype): - (KJS::InterpreterImp::builtinRegExpPrototype): - (KJS::InterpreterImp::builtinErrorPrototype): - (KJS::InterpreterImp::builtinEvalError): - (KJS::InterpreterImp::builtinRangeError): - (KJS::InterpreterImp::builtinReferenceError): - (KJS::InterpreterImp::builtinSyntaxError): - (KJS::InterpreterImp::builtinTypeError): - (KJS::InterpreterImp::builtinURIError): - (KJS::InterpreterImp::builtinEvalErrorPrototype): - (KJS::InterpreterImp::builtinRangeErrorPrototype): - (KJS::InterpreterImp::builtinReferenceErrorPrototype): - (KJS::InterpreterImp::builtinSyntaxErrorPrototype): - (KJS::InterpreterImp::builtinTypeErrorPrototype): - (KJS::InterpreterImp::builtinURIErrorPrototype): - * kjs/interpreter.cpp: - (Context::variableObject): - (Context::thisValue): - (Interpreter::Interpreter): - (Interpreter::globalObject): - (Interpreter::evaluate): - (Interpreter::builtinObject): - (Interpreter::builtinFunction): - (Interpreter::builtinArray): - (Interpreter::builtinBoolean): - (Interpreter::builtinString): - (Interpreter::builtinNumber): - (Interpreter::builtinDate): - (Interpreter::builtinRegExp): - (Interpreter::builtinError): - (Interpreter::builtinObjectPrototype): - (Interpreter::builtinFunctionPrototype): - (Interpreter::builtinArrayPrototype): - (Interpreter::builtinBooleanPrototype): - (Interpreter::builtinStringPrototype): - (Interpreter::builtinNumberPrototype): - (Interpreter::builtinDatePrototype): - (Interpreter::builtinRegExpPrototype): - (Interpreter::builtinErrorPrototype): - (Interpreter::builtinEvalError): - (Interpreter::builtinRangeError): - (Interpreter::builtinReferenceError): - (Interpreter::builtinSyntaxError): - (Interpreter::builtinTypeError): - (Interpreter::builtinURIError): - (Interpreter::builtinEvalErrorPrototype): - (Interpreter::builtinRangeErrorPrototype): - (Interpreter::builtinReferenceErrorPrototype): - (Interpreter::builtinSyntaxErrorPrototype): - (Interpreter::builtinTypeErrorPrototype): - (Interpreter::builtinURIErrorPrototype): - (Interpreter::createLanguageInstanceForValue): - * kjs/interpreter.h: - (KJS::Interpreter::isGlobalObject): - (KJS::ExecState::setException): - (KJS::ExecState::clearException): - (KJS::ExecState::exception): - (KJS::ExecState::hadException): - (KJS::ExecState::ExecState): - * kjs/list.cpp: - (KJS::List::at): - * kjs/list.h: - (KJS::List::operator[]): - (KJS::ListIterator::operator->): - (KJS::ListIterator::operator*): - (KJS::ListIterator::operator++): - (KJS::ListIterator::operator--): - * kjs/lookup.h: - (KJS::staticFunctionGetter): - (KJS::staticValueGetter): - (KJS::lookupPut): - (KJS::cacheGlobalObject): - * kjs/math_object.cpp: - (MathObjectImp::getValueProperty): - (MathFuncImp::MathFuncImp): - (MathFuncImp::callAsFunction): - * kjs/math_object.h: - * kjs/nodes.cpp: - (Node::evaluateReference): - (Node::throwError): - (Node::setExceptionDetailsIfNeeded): - (NullNode::evaluate): - (BooleanNode::evaluate): - (NumberNode::evaluate): - (StringNode::evaluate): - (RegExpNode::evaluate): - (ThisNode::evaluate): - (ResolveNode::evaluate): - (ResolveNode::evaluateReference): - (GroupNode::evaluate): - (ElementNode::evaluate): - (ArrayNode::evaluate): - (ObjectLiteralNode::evaluate): - (PropertyValueNode::evaluate): - (PropertyNode::evaluate): - (AccessorNode1::evaluate): - (AccessorNode1::evaluateReference): - (AccessorNode2::evaluate): - (AccessorNode2::evaluateReference): - (ArgumentListNode::evaluate): - (ArgumentListNode::evaluateList): - (ArgumentsNode::evaluate): - (NewExprNode::evaluate): - (FunctionCallNode::evaluate): - (PostfixNode::evaluate): - (DeleteNode::evaluate): - (VoidNode::evaluate): - (TypeOfNode::evaluate): - (PrefixNode::evaluate): - (UnaryPlusNode::evaluate): - (NegateNode::evaluate): - (BitwiseNotNode::evaluate): - (LogicalNotNode::evaluate): - (MultNode::evaluate): - (AddNode::evaluate): - (ShiftNode::evaluate): - (RelationalNode::evaluate): - (EqualNode::evaluate): - (BitOperNode::evaluate): - (BinaryLogicalNode::evaluate): - (ConditionalNode::evaluate): - (AssignNode::evaluate): - (CommaNode::evaluate): - (StatListNode::execute): - (AssignExprNode::evaluate): - (VarDeclNode::evaluate): - (VarDeclNode::processVarDecls): - (VarDeclListNode::evaluate): - (ExprStatementNode::execute): - (IfNode::execute): - (DoWhileNode::execute): - (WhileNode::execute): - (ForNode::execute): - (ForInNode::execute): - (ContinueNode::execute): - (BreakNode::execute): - (ReturnNode::execute): - (WithNode::execute): - (CaseClauseNode::evaluate): - (ClauseListNode::evaluate): - (CaseBlockNode::evaluate): - (CaseBlockNode::evalBlock): - (SwitchNode::execute): - (ThrowNode::execute): - (CatchNode::execute): - (TryNode::execute): - (ParameterNode::evaluate): - (FuncDeclNode::processFuncDecl): - (FuncExprNode::evaluate): - (SourceElementsNode::execute): - * kjs/nodes.h: - (KJS::StatementNode::evaluate): - * kjs/number_object.cpp: - (NumberPrototypeImp::NumberPrototypeImp): - (NumberProtoFuncImp::NumberProtoFuncImp): - (NumberProtoFuncImp::callAsFunction): - (NumberObjectImp::NumberObjectImp): - (NumberObjectImp::getValueProperty): - (NumberObjectImp::construct): - (NumberObjectImp::callAsFunction): - * kjs/number_object.h: - * kjs/object.cpp: - (KJS::ObjectImp::call): - (KJS::ObjectImp::mark): - (KJS::ObjectImp::classInfo): - (KJS::ObjectImp::get): - (KJS::ObjectImp::getProperty): - (KJS::ObjectImp::getPropertySlot): - (KJS::ObjectImp::put): - (KJS::ObjectImp::hasOwnProperty): - (KJS::ObjectImp::defaultValue): - (KJS::ObjectImp::findPropertyHashEntry): - (KJS::ObjectImp::construct): - (KJS::ObjectImp::callAsFunction): - (KJS::ObjectImp::hasInstance): - (KJS::ObjectImp::propList): - (KJS::ObjectImp::toPrimitive): - (KJS::ObjectImp::toNumber): - (KJS::ObjectImp::toString): - (KJS::ObjectImp::toObject): - (KJS::ObjectImp::putDirect): - (KJS::Error::create): - (KJS::error): - * kjs/object.h: - (KJS::): - (KJS::ObjectImp::getPropertySlot): - (KJS::AllocatedValueImp::isObject): - (KJS::ObjectImp::ObjectImp): - (KJS::ObjectImp::internalValue): - (KJS::ObjectImp::setInternalValue): - (KJS::ObjectImp::prototype): - (KJS::ObjectImp::setPrototype): - (KJS::ObjectImp::inherits): - * kjs/object_object.cpp: - (ObjectPrototypeImp::ObjectPrototypeImp): - (ObjectProtoFuncImp::ObjectProtoFuncImp): - (ObjectProtoFuncImp::callAsFunction): - (ObjectObjectImp::ObjectObjectImp): - (ObjectObjectImp::construct): - (ObjectObjectImp::callAsFunction): - * kjs/object_object.h: - * kjs/operations.cpp: - (KJS::equal): - (KJS::strictEqual): - (KJS::relation): - (KJS::add): - (KJS::mult): - * kjs/operations.h: - * kjs/property_map.cpp: - (KJS::PropertyMap::mark): - (KJS::PropertyMap::addEnumerablesToReferenceList): - (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): - (KJS::PropertyMap::save): - (KJS::PropertyMap::restore): - * kjs/property_map.h: - * kjs/property_slot.cpp: - (KJS::PropertySlot::undefinedGetter): - * kjs/property_slot.h: - (KJS::PropertySlot::getValue): - * kjs/protect.h: - (KJS::gcUnprotectNullTolerant): - (KJS::ProtectedValue::ProtectedValue): - (KJS::ProtectedValue::~ProtectedValue): - (KJS::ProtectedValue::operator=): - (KJS::ProtectedValue::operator ValueImp *): - (KJS::ProtectedValue::operator->): - * kjs/protected_object.h: - (KJS::ProtectedObject::ProtectedObject): - (KJS::ProtectedObject::operator=): - (KJS::ProtectedObject::operator ValueImp *): - (KJS::ProtectedObject::operator ObjectImp *): - (KJS::ProtectedObject::operator->): - (KJS::ProtectedReference::ProtectedReference): - (KJS::ProtectedReference::~ProtectedReference): - (KJS::ProtectedReference::operator=): - * kjs/protected_values.cpp: - (KJS::ProtectedValues::getProtectCount): - (KJS::ProtectedValues::increaseProtectCount): - (KJS::ProtectedValues::insert): - (KJS::ProtectedValues::decreaseProtectCount): - * kjs/protected_values.h: - * kjs/reference.cpp: - (KJS::Reference::Reference): - (KJS::Reference::makeValueReference): - (KJS::Reference::getBase): - (KJS::Reference::getValue): - (KJS::Reference::putValue): - (KJS::Reference::deleteValue): - * kjs/reference.h: - (KJS::Reference::baseIfMutable): - * kjs/regexp_object.cpp: - (RegExpPrototypeImp::RegExpPrototypeImp): - (RegExpProtoFuncImp::RegExpProtoFuncImp): - (RegExpProtoFuncImp::callAsFunction): - (RegExpObjectImp::RegExpObjectImp): - (RegExpObjectImp::arrayOfMatches): - (RegExpObjectImp::backrefGetter): - (RegExpObjectImp::construct): - (RegExpObjectImp::callAsFunction): - * kjs/regexp_object.h: - * kjs/string_object.cpp: - (StringInstanceImp::lengthGetter): - (StringInstanceImp::indexGetter): - (StringInstanceImp::getOwnPropertySlot): - (StringInstanceImp::put): - (StringPrototypeImp::StringPrototypeImp): - (StringProtoFuncImp::StringProtoFuncImp): - (regExpIsGlobal): - (replace): - (StringProtoFuncImp::callAsFunction): - (StringObjectImp::StringObjectImp): - (StringObjectImp::construct): - (StringObjectImp::callAsFunction): - (StringObjectFuncImp::StringObjectFuncImp): - (StringObjectFuncImp::callAsFunction): - * kjs/string_object.h: - * kjs/testkjs.cpp: - (TestFunctionImp::callAsFunction): - (VersionFunctionImp::callAsFunction): - (main): - * kjs/value.cpp: - (KJS::AllocatedValueImp::operator new): - (KJS::AllocatedValueImp::getUInt32): - (KJS::ValueImp::toInteger): - (KJS::ValueImp::toInt32): - (KJS::ValueImp::toUInt32): - (KJS::ValueImp::toUInt16): - (KJS::ValueImp::toObject): - (KJS::AllocatedValueImp::getBoolean): - (KJS::AllocatedValueImp::getNumber): - (KJS::AllocatedValueImp::getString): - (KJS::AllocatedValueImp::getObject): - (KJS::jsString): - (KJS::jsNumber): - (KJS::ConstantValues::init): - (KJS::ConstantValues::clear): - (KJS::ConstantValues::mark): - * kjs/value.h: - (KJS::): - (KJS::jsUndefined): - (KJS::jsNull): - (KJS::jsBoolean): - (KJS::jsNaN): - (KJS::ValueImp::ValueImp): - (KJS::ValueImp::~ValueImp): - (KJS::AllocatedValueImp::AllocatedValueImp): - (KJS::AllocatedValueImp::~AllocatedValueImp): - (KJS::AllocatedValueImp::isBoolean): - (KJS::AllocatedValueImp::isNumber): - (KJS::AllocatedValueImp::isString): - (KJS::AllocatedValueImp::isObject): - (KJS::AllocatedValueImp::marked): - (KJS::AllocatedValueImp::mark): - (KJS::ValueImp::downcast): - (KJS::ValueImp::isUndefined): - (KJS::ValueImp::isNull): - (KJS::ValueImp::isUndefinedOrNull): - (KJS::ValueImp::isBoolean): - (KJS::ValueImp::isNumber): - (KJS::ValueImp::isString): - (KJS::ValueImp::isObject): - (KJS::ValueImp::getBoolean): - (KJS::ValueImp::getNumber): - (KJS::ValueImp::getString): - (KJS::ValueImp::getObject): - (KJS::ValueImp::getUInt32): - (KJS::ValueImp::mark): - (KJS::ValueImp::marked): - (KJS::ValueImp::type): - (KJS::ValueImp::toPrimitive): - (KJS::ValueImp::toBoolean): - (KJS::ValueImp::toNumber): - (KJS::ValueImp::toString): - (KJS::jsZero): - (KJS::jsOne): - (KJS::jsTwo): - (KJS::Undefined): - (KJS::Null): - (KJS::Boolean): - (KJS::Number): - (KJS::String): - -2005-08-06 Maciej Stachowiak - - Reviewed by Darin. - - Change over to the new PropertySlot mechanism for property - lookup. This allows the elimination of hasOwnProperty - methods. Also did some of the performance tuning enabled by this - (but not yet all the possible improvements for function calls, - assignment, ++, and so forth). And also much code cleanup. - - Net result is about a 2% speedup on the JS iBench. - - Also redid Geoff's fix for the chrashing applet by avoiding a NULL - prototype in the bindings code and using the default of Null() - instead. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::ObjcFallbackObjectImp): - (ObjcFallbackObjectImp::getOwnPropertySlot): - * bindings/runtime_array.cpp: - (RuntimeArrayImp::lengthGetter): - (RuntimeArrayImp::indexGetter): - (RuntimeArrayImp::getOwnPropertySlot): - * bindings/runtime_array.h: - * bindings/runtime_method.cpp: - (RuntimeMethodImp::lengthGetter): - (RuntimeMethodImp::getOwnPropertySlot): - * bindings/runtime_method.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::RuntimeObjectImp): - (RuntimeObjectImp::fallbackObjectGetter): - (RuntimeObjectImp::fieldGetter): - (RuntimeObjectImp::methodGetter): - (RuntimeObjectImp::getOwnPropertySlot): - * bindings/runtime_object.h: - * bindings/runtime_root.h: - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstanceImp::lengthGetter): - (ArrayInstanceImp::getOwnPropertySlot): - (ArrayPrototypeImp::getOwnPropertySlot): - * kjs/array_object.h: - * kjs/date_object.cpp: - (DatePrototypeImp::getOwnPropertySlot): - * kjs/date_object.h: - * kjs/function.cpp: - (KJS::FunctionImp::argumentsGetter): - (KJS::FunctionImp::lengthGetter): - (KJS::FunctionImp::getOwnPropertySlot): - (KJS::FunctionImp::put): - (KJS::FunctionImp::deleteProperty): - (KJS::ArgumentsImp::mappedIndexGetter): - (KJS::ArgumentsImp::getOwnPropertySlot): - (KJS::ActivationImp::argumentsGetter): - (KJS::ActivationImp::getArgumentsGetter): - (KJS::ActivationImp::getOwnPropertySlot): - (KJS::ActivationImp::deleteProperty): - * kjs/function.h: - * kjs/internal.cpp: - (InterpreterImp::InterpreterImp): - (InterpreterImp::initGlobalObject): - (InterpreterImp::~InterpreterImp): - (InterpreterImp::evaluate): - * kjs/internal.h: - (KJS::InterpreterImp::globalExec): - * kjs/interpreter.cpp: - (Interpreter::Interpreter): - (Interpreter::createLanguageInstanceForValue): - * kjs/interpreter.h: - (KJS::Interpreter::argumentsIdentifier): - (KJS::Interpreter::specialPrototypeIdentifier): - * kjs/lookup.h: - (KJS::staticFunctionGetter): - (KJS::staticValueGetter): - (KJS::getStaticPropertySlot): - (KJS::getStaticFunctionSlot): - (KJS::getStaticValueSlot): - * kjs/math_object.cpp: - (MathObjectImp::getOwnPropertySlot): - * kjs/math_object.h: - * kjs/nodes.cpp: - (ResolveNode::evaluate): - (ResolveNode::evaluateReference): - (AccessorNode1::evaluate): - (AccessorNode2::evaluate): - * kjs/number_object.cpp: - (NumberObjectImp::getOwnPropertySlot): - * kjs/number_object.h: - * kjs/object.cpp: - (KJS::ObjectImp::get): - (KJS::ObjectImp::getProperty): - (KJS::ObjectImp::getPropertySlot): - (KJS::ObjectImp::getOwnPropertySlot): - (KJS::ObjectImp::put): - (KJS::ObjectImp::hasProperty): - (KJS::ObjectImp::hasOwnProperty): - * kjs/object.h: - (KJS::ObjectImp::getDirectLocation): - (KJS::ObjectImp::getPropertySlot): - (KJS::ObjectImp::getOwnPropertySlot): - * kjs/object_wrapper.h: Added. - (KJS::): - (KJS::Object::Object): - (KJS::Object::operator ObjectImp *): - * kjs/property_map.cpp: - (KJS::PropertyMap::getLocation): - * kjs/property_map.h: - * kjs/property_slot.cpp: Added. - (KJS::PropertySlot::undefinedGetter): - * kjs/property_slot.h: Added. - (KJS::PropertySlot::isSet): - (KJS::PropertySlot::getValue): - (KJS::PropertySlot::setValueSlot): - (KJS::PropertySlot::setStaticEntry): - (KJS::PropertySlot::setCustom): - (KJS::PropertySlot::setCustomIndex): - (KJS::PropertySlot::setUndefined): - (KJS::PropertySlot::slotBase): - (KJS::PropertySlot::staticEntry): - (KJS::PropertySlot::index): - (KJS::PropertySlot::): - * kjs/protect.h: - * kjs/protected_object.h: Added. - (KJS::ProtectedObject::ProtectedObject): - (KJS::ProtectedObject::~ProtectedObject): - (KJS::ProtectedObject::operator=): - (KJS::ProtectedReference::ProtectedReference): - (KJS::ProtectedReference::~ProtectedReference): - (KJS::ProtectedReference::operator=): - * kjs/reference.h: - * kjs/reference_list.cpp: - * kjs/regexp_object.cpp: - (RegExpObjectImp::backrefGetter): - (RegExpObjectImp::getOwnPropertySlot): - * kjs/regexp_object.h: - * kjs/string_object.cpp: - (StringInstanceImp::lengthGetter): - (StringInstanceImp::indexGetter): - (StringInstanceImp::getOwnPropertySlot): - (StringPrototypeImp::getOwnPropertySlot): - * kjs/string_object.h: - -2005-08-05 Adele Peterson - - Reviewed by Darin. - - * JavaScriptCore.xcodeproj/project.pbxproj: Unchecked 'statics are thread safe' option. - -2005-08-05 Geoffrey Garen - - -fixed REGRESSION (DENVER): Crash occurs - after clicking on Hangman applet - - Reviewed by darin. - - * kjs/object.cpp: - (KJS::ObjectImp::hasProperty): added check for null prototype. - - FIXME: The long-term plan is to make runtime objects use JS Null() - instead of null pointers, which will allow us to eliminate null - checks, improving performance. - -2005-08-05 Geoffrey Garen - - Fix by darin, reviewed by me. - - - rolled in fix for: JavaScript regular - expressions with certain ranges of Unicode characters cause a crash - - Test cases added: - - * layout-tests/fast/js/regexp-big-unicode-ranges-expected.txt: Added. - * layout-tests/fast/js/regexp-big-unicode-ranges.html: Added. - - * pcre/pcre.c: - (compile_branch): added checks for characters > 255 - -2005-08-04 Maciej Stachowiak - - - updated expected test results now that we no longer exlude the - date tests (apparently this was overlooked) - - * tests/mozilla/expected.html: - -2005-07-31 Darin Adler - - Reviewed by Maciej. - - - remove uses of Mac-OS-X-specific MAX macro - - remove one of the many excess "APPLE_CHANGES" ifdefs - - * kjs/collector.cpp: (KJS::Collector::allocate): Use std::max instead of MAX. - * kjs/property_map.cpp: (KJS::PropertyMap::rehash): Ditto. - * kjs/ustring.cpp: - (KJS::UChar::toLower): Take out non-ICU code path. - (KJS::UChar::toUpper): Ditto. - (KJS::UString::spliceSubstringsWithSeparators): Use std::max instead of MAX. - -2005-07-27 Geoffrey Garen - - - fixed http://bugs.webkit.org/show_bug.cgi?id=4147 - Array.toString() and toLocaleString() improvements from KDE KJS - (rolled in KDE changes) - - Test cases added: - - * layout-tests/fast/js/toString-overrides-expected.txt: Added. - * layout-tests/fast/js/toString-overrides.html: Added. - - * kjs/array_object.cpp: - (ArrayProtoFuncImp::call): - -2005-07-27 Maciej Stachowiak - - Changes by Michael Kahl, reviewed by me. - - - fixed Need better debugging support in JavaScriptCore - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/debugger.cpp: - (KJS::AttachedInterpreter::AttachedInterpreter): - (KJS::AttachedInterpreter::~AttachedInterpreter): - (Debugger::~Debugger): - (Debugger::attach): - (Debugger::detach): - (Debugger::sourceParsed): - * kjs/debugger.h: - * kjs/function.cpp: - (KJS::FunctionImp::call): - (KJS::GlobalFuncImp::call): - * kjs/function_object.cpp: - (FunctionObjectImp::construct): - * kjs/grammar.y: - * kjs/internal.cpp: - (Parser::parse): - (InterpreterImp::evaluate): - * kjs/internal.h: - (KJS::InterpreterImp::setDebugger): - * kjs/interpreter.cpp: - * kjs/interpreter.h: - (KJS::Interpreter::imp): - * kjs/nodes.cpp: - -2005-07-27 Geoffrey Garen - - - fixed http://bugs.webkit.org/show_bug.cgi?id=3381 - Date.prototype.setDate() incorrect for values >=128 - - - Test cases added: - - * layout-tests/fast/js/date-big-setdate-expected.txt: Added. - * layout-tests/fast/js/date-big-setdate.html: Added. - - Reviewed by darin. - - * kjs/date_object.cpp: - (DateProtoFuncImp::call): - -2005-07-27 Geoffrey Garen - - -rolled in patch by Carsten Guenther - for http://bugs.webkit.org/show_bug.cgi?id=3759 - Date object enhancements - - Test cases added: - - * layout-tests/fast/js/date-preserve-milliseconds-expected.txt: Added. - * layout-tests/fast/js/date-preserve-milliseconds.html: Added. - - Reviewed by darin. - - * kjs/date_object.cpp: - (timeFromArgs): - (DateProtoFuncImp::call): - (DateObjectImp::construct): - (DateObjectFuncImp::call): - (KJS::makeTime): - * kjs/date_object.h: - * tests/mozilla/expected.html: - -2005-07-26 Justin Garcia - - Added a forward declaration to fix gcc4 build error - - * kjs/function.h: - -2005-07-25 Geoffrey Garen - - fixed mistake in my last checkin -- the expected results included - results from a patch that hasn't landed yet. - - * tests/mozilla/expected.html: - -2005-07-25 Maciej Stachowiak - - - fix mistake in last change that leads to assertion failure in the Development build - - * kjs/lookup.h: - (KJS::lookupGetOwnValue): - -2005-07-24 Maciej Stachowiak - - Reviewed by Darin. - - - http://bugs.webkit.org/show_bug.cgi?id=4124 - (change JavaScript property access to avoid double lookup) - - - 10% speedup on JavaScript iBench - - 5% speedup on 24fun BenchJS benchmark - - Changed all get methods to getOwnProperty - they are no longer - responsible for prototype lookup, and determine if the property - was found as a side efect. - - get() is now a nonvirtual ObjectImp method which calls the virtual - getOwnProperty and walks the prototype chain. A few selected - methods were inlined. - - Changed ResolveNode::evaluate plus some other places to use - getProperty which does get() and hasProperty() in one lookup. - - Also miscellaneous code cleanup. - - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::ObjcFallbackObjectImp): - (ObjcFallbackObjectImp::getOwnProperty): - * bindings/runtime_array.cpp: - (RuntimeArrayImp::RuntimeArrayImp): - (RuntimeArrayImp::getOwnProperty): - * bindings/runtime_array.h: - * bindings/runtime_method.cpp: - (RuntimeMethodImp::getOwnProperty): - * bindings/runtime_method.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::getOwnProperty): - * bindings/runtime_object.h: - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstanceImp::getOwnProperty): - (ArrayPrototypeImp::getOwnProperty): - (ArrayProtoFuncImp::call): - * kjs/array_object.h: - * kjs/date_object.cpp: - (DatePrototypeImp::getOwnProperty): - * kjs/date_object.h: - * kjs/function.cpp: - (KJS::FunctionImp::getOwnProperty): - (KJS::ArgumentsImp::getOwnProperty): - (KJS::ActivationImp::getOwnProperty): - * kjs/function.h: - * kjs/lookup.h: - (KJS::lookupGetOwnProperty): - (KJS::lookupGetOwnFunction): - (KJS::lookupGetOwnValue): - * kjs/math_object.cpp: - (MathObjectImp::getOwnProperty): - (MathObjectImp::getValueProperty): - * kjs/math_object.h: - * kjs/nodes.cpp: - (ResolveNode::evaluate): - * kjs/number_object.cpp: - (NumberObjectImp::getOwnProperty): - * kjs/number_object.h: - * kjs/object.cpp: - (KJS::ObjectImp::get): - (KJS::ObjectImp::getOwnProperty): - (KJS::ObjectImp::getProperty): - * kjs/object.h: - (KJS::ObjectImp::getProperty): - (KJS::ObjectImp::getOwnProperty): - * kjs/object_object.cpp: - (ObjectProtoFuncImp::call): - * kjs/regexp_object.cpp: - (RegExpObjectImp::getOwnProperty): - * kjs/regexp_object.h: - * kjs/string_object.cpp: - (StringInstanceImp::getOwnProperty): - (StringPrototypeImp::getOwnProperty): - * kjs/string_object.h: - -2005-07-25 Geoffrey Garen - - - fixed http://bugs.webkit.org/show_bug.cgi?id=3971 - JS test suite depends on JS 1.2 behavior - - Reviewed by darin. - - * tests/mozilla/js1_2/Array/tostring_1.js: now tests only for JS 1.5 behavior - * tests/mozilla/js1_2/Array/tostring_2.js: ditto - * tests/mozilla/expected.html: - -2005-07-24 Justin Garcia - - Reviewed by kevin. - - Fixes make clean problem introduced in xcode2.1 transition - - * Makefile.am: - -2005-07-22 Geoffrey Garen - - Reviewed by darin. - - * kjs/date_object.cpp: DatePrototypeImp now identifies itself as a - child class of DateInstanceImp -- this enables calls to Date.ValueOf(). - - fixes: ecma/Date/15.9.5.js (once we enable the date tests). - -2005-07-22 Geoffrey Garen - - - Reviewed by darin. - - * tests/mozilla/jsDriver.pl: now takes the path to testkjs as a command-line argument - * tests/mozilla/run-mozilla-tests: Removed. - -2005-07-21 Geoffrey Garen - - * JavaScriptCore.xcodeproj/.cvsignore: Added. - -2005-07-21 Geoffrey Garen - - * JavaScriptCore.pbproj/project.pbxproj: Removed. - * JavaScriptCore.xcodeproj/ggaren.pbxuser: Added. - * JavaScriptCore.xcodeproj/ggaren.perspective: Added. - * JavaScriptCore.xcodeproj/project.pbxproj: Added. - * Makefile.am: - -2005-07-20 Maciej Stachowiak - - Patch from Trey Matteson , reviewed by me. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=3956 - some of WebKit builds with symbols, some doesn't - - * JavaScriptCore.pbproj/project.pbxproj: Generate symbols even for - Deployment. - -2005-07-19 Geoffrey Garen - - -fixed http://bugs.webkit.org/show_bug.cgi?id=3991 - JSC doesn't implement Array.prototype.toLocaleString() - - -test failure: ecma_3/Array/15.4.4.3-1.js - - Reviewed by mjs. - - * kjs/array_object.cpp: - (ArrayProtoFuncImp::call): now searches for toString and - toLocaleString overrides in the array's elements - - * tests/mozilla/expected.html: failures are under 100! woohoo! - -2005-07-19 Darin Adler - - - fixed the build - - * kjs/lookup.h: (KJS::lookupPut): Remove bogus const; was preventing WebCore from - compiling (not sure why this didn't affect my other build machine). - - - one other tiny tweak (so sue me) - - * bindings/runtime_root.cpp: Remove unneeded declaration. - -2005-07-19 Darin Adler - - Reviewed by Geoff Garen. - - - eliminated try wrappers for get/put/call since we don't use C++ exceptions any more - - * kjs/lookup.h: Changed tryCall in IMPLEMENT_PROTOFUNC here to call. It doesn't make - sense for this macro to use the name tryCall anyway, since that's specific to how - WebCore used this, so this is good anyway. On the other hand, it might be a problem - for KDOM or KSVG, in which case we'll need another macro for them, since JavaScriptCore - should presumably not have the C++ exception support. - -2005-07-18 Geoffrey Garen - - -fixed http://bugs.webkit.org/show_bug.cgi?id=4008 - Error objects report incorrect length - - Reviewed by darin. - - * kjs/error_object.cpp: Error objects now include a length property - (ErrorObjectImp::ErrorObjectImp): - - * tests/mozilla/expected.html: updated expected results to reflect fix - * tests/mozilla/js1_5/Exceptions/regress-123002.js: test now expects - ecma compliant results - -2005-07-15 Geoffrey Garen - - -rolled in KDE fixes for http://bugs.webkit.org/show_bug.cgi?id=3601 - Error instance type info - - Reviewed by mjs. - - * kjs/error_object.cpp: - - Created ErrorInstanceImp class for Error() objects. - - Changed parent object for Native Errors to "Function" (matches - ECMA spec). - (ErrorInstanceImp::ErrorInstanceImp): - (ErrorProtoFuncImp::call): - (ErrorObjectImp::construct): - (NativeErrorImp::construct): - - * kjs/error_object.h: - (KJS::ErrorInstanceImp::classInfo): - * kjs/object.h: made comment more informative about ClassInfo - - * tests/mozilla/expected.html: - -2005-07-14 Geoffrey Garen - - - fixed: JS test suite expects an out of memory error - that our memory efficiency avoids - - Reviewed by mjs. - - * tests/mozilla/js1_5/Array/regress-157652.js: - test now expects normal execution - - * tests/mozilla/expected.html: - -2005-07-14 Geoffrey Garen - - fixed http://bugs.webkit.org/show_bug.cgi?id=4006 - testkjs doesn't implement gc() - - - test failure: - ecma_3/Function/regress-104584.js - - Reviewed by mjs. - - * kjs/interpreter.cpp: - (Interpreter::finalCheck): removed misleading while && comment - - * kjs/testkjs.cpp: added "gc" function to global object - (TestFunctionImp::): - (TestFunctionImp::call): - (main): - - * tests/mozilla/expected.html: - -2005-07-14 Geoffrey Garen - - -rolled in patches for http://bugs.webkit.org/show_bug.cgi?id=3945 - [PATCH] Safe merges of comments and other trivialities from KDE's kjs - - -patch by Martijn Klingens - - * kjs/array_instance.h: - * kjs/array_object.cpp: - * kjs/array_object.h: - * kjs/bool_object.cpp: - * kjs/bool_object.h: - * kjs/collector.cpp: - * kjs/collector.h: - * kjs/completion.h: - * kjs/context.h: - * kjs/date_object.cpp: - * kjs/date_object.h: - * kjs/debugger.cpp: - * kjs/debugger.h: - * kjs/dtoa.h: - * kjs/error_object.cpp: - * kjs/error_object.h: - * kjs/function.cpp: - * kjs/function.h: - * kjs/function_object.cpp: - * kjs/function_object.h: - * kjs/grammar.y: - * kjs/identifier.cpp: - * kjs/identifier.h: - * kjs/internal.cpp: - * kjs/internal.h: - * kjs/interpreter.cpp: - * kjs/interpreter.h: - * kjs/interpreter_map.cpp: - * kjs/interpreter_map.h: - * kjs/lexer.cpp: - * kjs/lexer.h: - * kjs/list.cpp: - * kjs/list.h: - * kjs/lookup.cpp: - * kjs/lookup.h: - * kjs/math_object.cpp: - * kjs/math_object.h: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - * kjs/number_object.cpp: - * kjs/number_object.h: - * kjs/object.cpp: - * kjs/object.h: - * kjs/object_object.cpp: - * kjs/object_object.h: - * kjs/operations.cpp: - * kjs/operations.h: - * kjs/property_map.cpp: - * kjs/property_map.h: - * kjs/reference.cpp: - * kjs/reference.h: - * kjs/reference_list.cpp: - * kjs/reference_list.h: - * kjs/regexp.cpp: - * kjs/regexp.h: - * kjs/regexp_object.cpp: - * kjs/regexp_object.h: - * kjs/scope_chain.cpp: - * kjs/scope_chain.h: - * kjs/simple_number.h: - * kjs/string_object.cpp: - * kjs/string_object.h: - * kjs/testkjs.cpp: - * kjs/types.h: - * kjs/ustring.cpp: - * kjs/ustring.h: - * kjs/value.cpp: - * kjs/value.h: - -2005-07-14 Geoffrey Garen - - -fixed http://bugs.webkit.org/show_bug.cgi?id=3970 - throw statements fail inside eval statements - - Reviewed by mjs. - - * kjs/function.cpp: - (KJS::GlobalFuncImp::call): - Big change since I fixed the tabbing. The important part is: - if (c.complType() == Throw) - exec->setException(c.value()); - - * kjs/nodes.cpp: - (ThrowNode::execute): removed duplicate KJS_CHECKEXCEPTION - (TryNode::execute): - try now clears the exception state before the finally block executes, - and checks the state after the block executes, so that exceptions in - finally code get caught. - - * tests/mozilla/expected.html: - -2005-07-14 Geoffrey Garen - - -landed fix for http://bugs.webkit.org/show_bug.cgi?id=3412 - Object.prototype is missing toLocaleString - - - patch by Mark Rowe (bdash) - - -layout test info in webcore changelog - - Reviewed by mjs. - - * kjs/object_object.cpp: - (ObjectPrototypeImp::ObjectPrototypeImp): - (ObjectProtoFuncImp::call): - * kjs/object_object.h: - (KJS::ObjectProtoFuncImp::): - -2005-07-12 Geoffrey Garen - - Reviewed by mjs. - - * kjs/function.cpp: - (KJS::IndexToNameMap::operator[]): fixed infinite recursion - bug in last checkin - -2005-07-12 Geoffrey Garen - - -fixed http://bugs.webkit.org/show_bug.cgi?id=3881 - arguments object should share values with function parameters - - Reviewed by mjs. - - ArgumentsImp now uses a simple hash lookup to share values - with the activation object. - - * kjs/function.cpp: - (KJS::FunctionImp::getParameterName): - (KJS::IndexToNameMap::IndexToNameMap): - (KJS::IndexToNameMap::~IndexToNameMap): - (KJS::IndexToNameMap::isMapped): - (KJS::IndexToNameMap::unMap): - (KJS::IndexToNameMap::operator[]): - (KJS::ArgumentsImp::ArgumentsImp): - (KJS::ArgumentsImp::mark): - (KJS::ArgumentsImp::get): - (KJS::ArgumentsImp::put): - (KJS::ArgumentsImp::deleteProperty): - (KJS::ArgumentsImp::hasOwnProperty): - (KJS::ActivationImp::createArgumentsObject): - * kjs/function.h: - * tests/mozilla/expected.html: updated results - -2005-07-09 Maciej Stachowiak - - - backing out my earlier collector change, it causes a performance regression in TOT - - * kjs/collector.cpp: - (KJS::Collector::allocate): - -2005-07-08 Eric Seidel - - Reviewed by mjs/hyatt (only in concept). - - * JavaScriptCore.pbproj/project.pbxproj: Added JavaScriptCore+SVG - Turns on RTTI support for JavaScriptCore.framework when - building the JavaScriptCore+SVG target. This is needed as - kdom (part of WebCore+SVG) requires RTTI for the time being. - -2005-07-08 Maciej Stachowiak - - Reviewed by hyatt. - - - When there are many live objects, GC less often, to try to make - GC cost proportional to garbage, not proportional to total memory used. - - * kjs/collector.cpp: - (KJS::Collector::allocate): - -2005-07-08 Vicki Murley - - Fix from Carsten Guenther, reviewed by Maciej - - - fixed http://bugs.webkit.org/show_bug.cgi?id=3644 (Error string representation) - - Switch from "-" to ":" in error strings. - - * kjs/error_object.cpp: - (ErrorProtoFuncImp::call): - * tests/mozilla/expected.html: - -2005-07-08 Geoffrey Garen - - -rolled in patch for http://bugs.webkit.org/show_bug.cgi?id=3878 - arguments object should be an object not an array - - Reviewed by mjs. - - * kjs/function.cpp: - (KJS::ArgumentsImp::ArgumentsImp): now manually handles initialization - we used to get for free by inheriting from ArrayInstanceImp - * kjs/function.h: ArgumentsImp now inherits from ObjectImp - * tests/mozilla/expected.html: updated expected test results - -2005-07-07 Eric Seidel - - Reviewed by mjs. - - * kjs/grammar.y: removed #define YYMAXDEPTH 0 for bison 2.0 - http://bugs.webkit.org/show_bug.cgi?id=3882 - -2005-07-03 Maciej Stachowiak - - Original patch from Mark Rowe , reviewed by me. - Fixes to patch by me, reviewed by John Sullivan. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=3293 - - Test cases added: - * tests/mozilla/expected.html: Two tests newly pass. - - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::hasOwnProperty): - * bindings/runtime_array.cpp: - (RuntimeArrayImp::hasOwnProperty): - * bindings/runtime_array.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::hasOwnProperty): - * bindings/runtime_object.h: - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstanceImp::hasOwnProperty): - * kjs/function.cpp: - (KJS::FunctionImp::hasOwnProperty): - (KJS::ActivationImp::hasOwnProperty): - * kjs/function.h: - * kjs/lookup.h: - * kjs/object.cpp: - (KJS::ObjectImp::hasProperty): - (KJS::ObjectImp::hasOwnProperty): - * kjs/object.h: - (KJS::Object::hasOwnProperty): - * kjs/object_object.cpp: - (ObjectPrototypeImp::ObjectPrototypeImp): - (ObjectProtoFuncImp::call): - * kjs/object_object.h: - (KJS::ObjectProtoFuncImp::): - * kjs/string_object.cpp: - (StringInstanceImp::hasOwnProperty): - * kjs/string_object.h: - -2005-07-01 Geoffrey Garen - - -landed patch by Eric Seidel - - -for http://bugs.webkit.org/show_bug.cgi?id=3657 - GroundWork: Moving some functions from khtml->jsc following kjs TOT - - - no layout test necessary yet - only groundwork - - Reviewed by darin. - - * kjs/lookup.h: - (KJS::cacheGlobalObject): - -2005-07-01 Geoffrey Garen - - -landed patch by Carsten Guenther - - -fixes http://bugs.webkit.org/show_bug.cgi?id=3477 - some US-centric date formats not parsed by JavaScript (clock at news8austin.com) - - -relevant tests: - mozilla/ecma_3/Date/15.9.5.5.js - layout-tests/fast/js/date-parse-test.html - - Reviewed by darin. - - * kjs/date_object.cpp: - (formatLocaleDate): - (day): - (dayFromYear): - (daysInYear): - (timeFromYear): - (yearFromTime): - (weekDay): - (timeZoneOffset): - (DateProtoFuncImp::call): - (DateObjectImp::construct): - (KJS::parseDate): - (ymdhms_to_seconds): - (KJS::makeTime): - (findMonth): - (KJS::KRFCDate_parseDate): - * kjs/date_object.h: - * tests/mozilla/expected.html: updated expected results to reflect fix - -2005-07-01 Geoffrey Garen - - -fixed JavaScript fails to throw exceptions - for invalid return statements - - relevant tests: - ecma/Statements/12.9-1-n.js - ecma_2/Exceptions/lexical-052.js - ecma_2/Exceptions/statement-009.js - - Reviewed by sullivan. - - * kjs/nodes.cpp: - (ReturnNode::execute): now throws exception if return is not inside - a function. - - * tests/mozilla/expected.html: updated to reflect fix - -2005-07-01 Geoffrey Garen - - Reviewed by sullivan. - - * tests/mozilla/expected.html: Updated test results for last fix. - -2005-07-01 Geoffrey Garen - - -fixed JavaScript fails to throw an exception - for invalid function calls - - Reviewed by sullivan. - - Relevant mozilla test: ecma_3/Exceptions/regress-95101.js - - * kjs/nodes.cpp: - (FunctionCallNode::evaluate): evaluate now checks for an exception - after resolving a function name (in case the function is undefined) - -2005-07-01 Eric Seidel - - Reviewed by darin. - - * kjs/interpreter.h: - (KJS::Context::curStmtFirstLine): stub for compatibility with KDE - * kjs/value.h: - (KJS::Value::isValid): compatibility with KDE - http://bugs.webkit.org/show_bug.cgi?id=3687 - -2005-07-01 Eric Seidel - - Reviewed by darin. - - * kjs/create_hash_table: rolled in changes from KDE, including - -n support from KDOM and support for newer comments - http://bugs.webkit.org/show_bug.cgi?id=3771 - -2005-06-30 Geoffrey Garen - - -rolled in KDE fix to JavaScript fails to - throw exceptions for invalid break/continue statements - - No layout tests because it's already covered by the Mozilla suite - - Reviewed by mjs. - - * kjs/internal.h: LabelStack now tracks where you are relative to - switch and iteration (loop) statements - - (KJS::LabelStack::LabelStack): - (KJS::LabelStack::pushIteration): - (KJS::LabelStack::popIteration): - (KJS::LabelStack::inIteration): - (KJS::LabelStack::pushSwitch): - (KJS::LabelStack::popSwitch): - (KJS::LabelStack::inSwitch): - - * kjs/nodes.cpp: - These files were updated to use the new LabelStack: - (DoWhileNode::execute): - (WhileNode::execute): - (ForNode::execute): - (ForInNode::execute): - (SwitchNode::execute): - - These files were updated to throw exceptions for invalid - break/continue statements: - (BreakNode::execute): - (ContinueNode::execute): - - * tests/mozilla/expected.html: Updated expected results to reflect fix - -2005-06-30 Kevin Decker - - Reviewed by rjw. - - fixed: failed assertion in`Interpreter::lockCount() > 0 - - no layout test added; this is in the bindings code. - - * bindings/objc/WebScriptObject.mm: - (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): make sure to lock and unlock the interpreter around allocations. - -2005-06-29 Geoffrey Garen - - Patch by Francisco Tolmasky - - - fixes http://bugs.webkit.org/show_bug.cgi?id=3667 - Core JavaScript 1.5 Reference:Objects:Array:forEach - - See WebCore Changelog for layout tests added. - - Reviewed by darin. - - * kjs/array_object.cpp: - (ArrayProtoFuncImp::call): - * kjs/array_object.h: - (KJS::ArrayProtoFuncImp::): - -2005-06-29 Geoffrey Garen - - Patch contributed by Oliver Hunt - - -fixed http://bugs.webkit.org/show_bug.cgi?id=3743 - Incorrect error message given for certain calls - - See WebCore Changelog for layout test added. - - Reviewed by mjs. - - * kjs/object.cpp: - (KJS::ObjectImp::defaultValue): - -2005-06-29 Geoffrey Garen - - Rolling out date patch from 6-28-05 because it breaks - fast/js/date-parse-test - - * kjs/date_object.cpp: - (formatLocaleDate): - (DateProtoFuncImp::call): - (DateObjectImp::construct): - (KJS::parseDate): - (ymdhms_to_seconds): - (isSpaceOrTab): - (KJS::KRFCDate_parseDate): - * kjs/date_object.h: - * tests/mozilla/expected.html: - -2005-06-29 Geoffrey Garen - - Reviewed by Darin. - - -fixes http://bugs.webkit.org/show_bug.cgi?id=3750 - build fails with KJS_VERBOSE set - - * kjs/nodes.cpp: changed debug print statement to use UString - (VarDeclNode::evaluate): - * kjs/reference.cpp: ditto - (KJS::Reference::putValue): - -2005-06-28 Geoffrey Garen - - Patch contributed by Carsten Guenther . - - -fixes http://bugs.webkit.org/show_bug.cgi?id=3477 - some US-centric date formats not parsed by JavaScript (clock at news8austin.com) - - Reviewed by darin. - - * kjs/date_object.cpp: - (formatLocaleDate): - (day): - (dayFromYear): - (daysInYear): - (timeFromYear): - (yearFromTime): - (weekDay): - (timeZoneOffset): - (DateProtoFuncImp::call): - (DateObjectImp::construct): - (KJS::parseDate): - (ymdhms_to_seconds): - (KJS::makeTime): - (findMonth): - (KJS::KRFCDate_parseDate): - * kjs/date_object.h: - * tests/mozilla/expected.html: updated expected test results to reflect fix - -2005-06-26 Maciej Stachowiak - - Reviewed by Darin. - - - replace hash functions with better ones - - * JavaScriptCore.pbproj/project.pbxproj: Add new file to build. - * kjs/interpreter_map.cpp: - (KJS::InterpreterMap::computeHash): Use shared pointer hash. - * kjs/pointer_hash.h: Added. - (KJS::pointerHash): Pointer hash based on 32-bit mix and 64-bit mix hashes. - * kjs/protected_values.cpp: - (KJS::ProtectedValues::computeHash): Use shared pointer hash. - * kjs/ustring.cpp: - (KJS::UString::Rep::computeHash): Use SuperFastHash algorithm. - -2005-06-22 Darin Adler - - Change by Anders Carlsson. - Reviewed by me. - - - fixed - String.prototype.replace() fails with function as second param - - * kjs/string_object.cpp: (replace): Added code to handle functions. - - * tests/mozilla/expected.html: Updated since ecma_3/RegExp/regress-209067.js is fixed now. - - * tests/mozilla/run-mozilla-tests: Fix a minor coding style issue that leads to a warning each - time we run the tests. - -2005-06-21 Adele Peterson - - rolling out fix for http://bugs.webkit.org/show_bug.cgi?id=3293, since it caused layout test failures. - fast/forms/element-by-name - fast/loader/loadInProgress - - * ChangeLog: - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::hasProperty): - * bindings/runtime_array.cpp: - (RuntimeArrayImp::hasProperty): - * bindings/runtime_array.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::hasProperty): - * bindings/runtime_object.h: - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstanceImp::hasProperty): - * kjs/function.cpp: - (KJS::FunctionImp::hasProperty): - (KJS::ActivationImp::hasProperty): - * kjs/function.h: - * kjs/object.cpp: - (KJS::ObjectImp::hasProperty): - * kjs/object.h: - * kjs/object_object.cpp: - (ObjectPrototypeImp::ObjectPrototypeImp): - (ObjectProtoFuncImp::call): - * kjs/object_object.h: - (KJS::ObjectProtoFuncImp::): - * kjs/string_object.cpp: - (StringInstanceImp::hasProperty): - * kjs/string_object.h: - * tests/mozilla/expected.html: - -2005-06-21 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Switched to a build rule rather than a build phase for - .y files -- this gets rid of the problem where modifying the .y file would not cause sufficient - compilation. - - * kjs/grammar_wrapper.cpp: Removed. - -2005-06-21 Adele Peterson - - Patch from Anders Carlsson , reviewed by Darin. - - Fixed: - String.replace() method not working when regex pattern contains {n, m} - - * pcre/pcre.c: (pcre_compile): Remember the last char length so it can be subtracted correctly if needed. - -2005-06-21 Geoffrey Garen - - - fixed 'delete' succeeds on functions - - fixed javascript function named as "opener" doesn't get called because of window.opener property - - Reviewed by cblu. - - * kjs/nodes.cpp: - (FuncDeclNode::processFuncDecl): Functions now have DontDelete and Internal attributes set when appropriate. - - Test cases: - * tests/mozilla/expected.html: Updated for one new success. - - see also test case added in WebCore. - -2005-06-20 Maciej Stachowiak - - Reviewed by Darin(first pass) and Hyatt. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=3576 - (roll in support for "const" keyword from KDE tree) - - make processVarDecls handle deletability of variables declared - in an eval block the same as evaluate would - - make eval() call processVarDecls - needed to match mozilla and - to make the second change testable - - I started with the KDE implementation of const but I ended up changing it a bit - to avoid the use of a global variable. Now instead of the global variable it distinguishes - const and var at the grammar level so the appropriate node can know the right kind of - declaration. - - Test cases: - * tests/mozilla/expected.html: Updated for one new test that is - failing - we used to bail on it entirely because it checks for - const support before starting. - - see also test cases added in WebCore - - * kjs/grammar.y: Add rules for const declarations. - * kjs/keywords.table: Add const keyword. - * kjs/nodes.cpp: - (VarDeclNode::VarDeclNode): Add parameter. - (VarDeclNode::evaluate): Add const support. - (VarDeclNode::processVarDecls): Add const support. - (VarStatementNode::execute): Irrelevant change. - (ForInNode::ForInNode): Tell our variable node that it's a variable. - * kjs/nodes.h: - (KJS::VarDeclNode::): Add declaration of type enum, extra constructor parameter. - (KJS::VarStatementNode::VarStatementNode): Irrelevant change. - * kjs/function.cpp: - (KJS::GlobalFuncImp::call): Process var decls before evaluating. - -2005-06-20 Maciej Stachowiak - - Patch from Mark Rowe , reviewed by me. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=3293 - - Test cases added: - * tests/mozilla/expected.html: Updated for two fixed tests. - - also added a layout test - - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::hasOwnProperty): - * bindings/runtime_array.cpp: - (RuntimeArrayImp::hasOwnProperty): - * bindings/runtime_array.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::hasOwnProperty): - * bindings/runtime_object.h: - * kjs/array_instance.h: - * kjs/array_object.cpp: - (ArrayInstanceImp::hasOwnProperty): - * kjs/function.cpp: - (KJS::FunctionImp::hasOwnProperty): - (KJS::ActivationImp::hasOwnProperty): - * kjs/function.h: - * kjs/object.cpp: - (KJS::ObjectImp::hasProperty): - (KJS::ObjectImp::hasOwnProperty): - * kjs/object.h: - (KJS::Object::hasOwnProperty): - * kjs/object_object.cpp: - (ObjectPrototypeImp::ObjectPrototypeImp): - (ObjectProtoFuncImp::call): - * kjs/object_object.h: - (KJS::ObjectProtoFuncImp::): - * kjs/string_object.cpp: - (StringInstanceImp::hasOwnProperty): - * kjs/string_object.h: - -2005-06-18 Darin Adler - - Reviewed by Eric Seidel. - - * pcre/get.c: (pcre_get_substring): Fix some computations so this works for UTF-16. - This is unused in the current JavaScriptCore, but still good to fix. - -2005-06-18 Darin Adler - - Change by Finlay Dobbie. - Reviewed by me. - - - fixed - 10.3.9 Build Failure: NSString may not respond to `+stringWithCString:encoding:' - - * bindings/objc/WebScriptObject.mm: (-[WebScriptObject stringRepresentation]): - Undo change we did a while back to work around the gcc 3.3 compiler error. - It no longer seems to happen, and the workaround code was 10.4-specific. - -2005-06-16 Geoffrey Garen - - Fixed: 'delete' fails on variables declared inside 'eval' statements. - - Reviewed by cblu. - - * kjs/context.h: - (KJS::ContextImp::codeType): Added code type accessor for execution context objects. - * kjs/internal.cpp: - (ContextImp::ContextImp): Reflects change to ContextImp::codeType. - * kjs/nodes.cpp: - (VarDeclNode::evaluate): Added separate code path for variable declarations inside 'eval' statements. - * tests/mozilla/expected.html: Updated expected test results to reflect fix. - -2005-06-14 Geoffrey Garen - - Updated expected.html to reflect fix to . - - Reviewed by cblu. - - * tests/mozilla/expected.html: - -2005-06-14 Geoffrey Garen - - Fixed: JavaScript discards locally defined "arguments" property - - No layout tests added because this change fixes existing tests: - ecma/ExecutionContexts/10.1.6.js - ecma_3/Function/regress-94506.js - js1_4/Functions/function-001.js - - Reviewed by cblu. - - * kjs/function.cpp: - (KJS::ActivationImp::get): get now checks for an "arguments" property defined in the local variable object - before trying to return the built-in arguments array. - - * kjs/function.h: ActivationImp::put no longer overrides ObjectImp::put - -2005-06-10 Darin Adler - - Change by Mark Rowe . - Reviewed by me. - - - further improvements to exception file/line number fix - - * kjs/nodes.h: Added setExceptionDetailsIfNeeded function. - * kjs/nodes.cpp: Updated macros to call the new setExceptionDetailsIfNeeded function. - (Node::setExceptionDetailsIfNeeded): Added. - -2005-06-09 Darin Adler - - Change by Mark Rowe - Reviewed by me. - - * kjs/nodes.cpp: Get rid of unneeded this->. - -2005-06-08 Maciej Stachowiak - - Change by Mark Rowe - Reviewed by me. - - - fixed http://bugs.webkit.org/show_bug.cgi?id=3327 - (Exception When Setting Style to Invalid Value Lacks Line/File Information) - - * kjs/nodes.cpp: Include source file and line number when making exception in - KJS_CHECKEXCEPTIONVALUE. - -2005-06-07 Darin Adler - - Change by Toby Peterson . - Reviewed by me. - - * JavaScriptCore.pbproj/project.pbxproj: Allow bison 2.0, which generates the file - with a different name. - -2005-06-07 Darin Adler - - Change by Toby Peterson . - Reviewed by me. - - * kjs/grammar.y: Remove bogus extra line from grammar.y. Toby got this change from KDE KJS. - -2005-06-06 Darin Adler - - * tests/mozilla/run-mozilla-tests: Wrote a perl version of this so we don't require - the "jst" tool to run the tests. - -2005-06-04 Darin Adler - - Reviewed by Maciej. - - - add libicu headers - - * JavaScriptCore.pbproj/project.pbxproj: Added icu directory to header search path. - - * icu/README: Added. - * icu/unicode/platform.h: Added. - * icu/unicode/uchar.h: Added. - * icu/unicode/uconfig.h: Added. - * icu/unicode/umachine.h: Added. - * icu/unicode/urename.h: Added. - * icu/unicode/utf.h: Added. - * icu/unicode/utf16.h: Added. - * icu/unicode/utf8.h: Added. - * icu/unicode/utf_old.h: Added. - * icu/unicode/utypes.h: Added. - * icu/unicode/uversion.h: Added. - -2005-05-19 Darin Adler - - Reviewed by Maciej. - - - turned off exceptions and RTTI; seems to cut JavaScriptCore code size by about 22% - - * JavaScriptCore.pbproj/project.pbxproj: Turn off exceptions and RTTI for both - the framework and testkjs tool. - -2005-05-18 Darin Adler - - Reviewed by Maciej. - - - got rid of code that depended on RTTI - - * kjs/collector.cpp: - (KJS::className): Added. Gets class name in a KJS way, rather than a C++ RTTI way. - (KJS::Collector::rootObjectClasses): Use className instead of typeid names. - -2005-05-18 Darin Adler - - Reviewed by Maciej. - - - fix a failure seen in the Mozilla JavaScript tests where a live object was garbage-collected - when the only reference to it was in an argList on the stack - - * kjs/list.h: Moved the operator= function into the .cpp file since it's too big to be - a good choice to inline. - * kjs/list.cpp: (KJS::List::operator=): Moved this formerly-inline function into a separate - file and added missing code to update valueRefCount. It's the latter that fixes the bug. - -2005-05-16 Darin Adler - - Reviewed by Adele. - - - fixed issues preventing us from compiling with newer versions of gcc 4.0 - - * kjs/ustring.cpp: - (KJS::operator==): Remove redundant and illegal KJS:: prefix on this function's definition. - (KJS::operator<): Ditto. - (KJS::compare): Ditto. - -2005-05-09 Darin Adler - - Reviewed by John. - - - turn on conservative GC unconditionally and start on SPI changes to - eliminate the now-unneeded smart pointers since we don't ref count any more - - * kjs/value.h: Removed macros to turn conservative GC on and off. - Removed ref and deref functions. - (KJS::ValueImp::ValueImp): Removed non-conservative-GC code path. - (KJS::ValueImp::isUndefined): Added. New SPI to make it easier to deal with ValueImp directly. - (KJS::ValueImp::isNull): Ditto. - (KJS::ValueImp::isBoolean): Ditto. - (KJS::ValueImp::isNumber): Ditto. - (KJS::ValueImp::isString): Ditto. - (KJS::ValueImp::isObject): Ditto. - (KJS::Value::Value): Removed non-conservative-GC code path and made constructor no - longer explicit so we can quietly create Value wrappers from ValueImp *; inexpensive with - conservative GC and eases the transition. - (KJS::Value::operator ValueImp *): Added. Quietly creates ValueImp * from Value. - (KJS::ValueImp::marked): Removed non-conservative-GC code path. - - * kjs/value.cpp: - (KJS::ValueImp::mark): Removed non-conservative-GC code path. - (KJS::ValueImp::isUndefinedOrNull): Added. New SPI to make it easier to deal with ValueImp directly. - (KJS::ValueImp::isBoolean): Ditto. - (KJS::ValueImp::isNumber): Ditto. - (KJS::ValueImp::isString): Ditto. - (KJS::ValueImp::asString): Ditto. - (KJS::ValueImp::isObject): Ditto. - (KJS::undefined): Ditto. - (KJS::null): Ditto. - (KJS::boolean): Ditto. - (KJS::string): Ditto. - (KJS::zero): Ditto. - (KJS::one): Ditto. - (KJS::two): Ditto. - (KJS::number): Ditto. - - * kjs/object.h: Made constructor no longer explicit so we can quietly create Object - wrappers from ObjectImp *; inexpensive with conservative GC and eases the transition. - (KJS::Object::operator ObjectImp *): Added. Quietly creates ObjectImp * from Object. - (KJS::ValueImp::isObject): Added. Implementation of new object-related ValueImp function. - (KJS::ValueImp::asObject): Ditto. - - * kjs/object.cpp: - (KJS::ObjectImp::setInternalValue): Remove non-conservative-GC code path. - (KJS::ObjectImp::putDirect): Ditto. - (KJS::error): Added. Function in the new SPI style to create an error object. - - * kjs/internal.h: Added the new number-constructing functions as friends of NumberImp. - There may be a more elegant way to do this later; what's important now is the new SPI. - - * kjs/collector.h: Remove non-conservative-GC code path and also take out some - unneeded APPLE_CHANGES. - - * bindings/runtime_root.cpp: - (KJS::Bindings::addNativeReference): Remove non-conservative-GC code path. - (KJS::Bindings::removeNativeReference): Ditto. - (RootObject::removeAllNativeReferences): Ditto. - * bindings/runtime_root.h: - (KJS::Bindings::RootObject::~RootObject): Ditto. - (KJS::Bindings::RootObject::setRootObjectImp): Ditto. - * kjs/collector.cpp: - (KJS::Collector::allocate): Ditto. - (KJS::Collector::collect): Ditto. - (KJS::Collector::numGCNotAllowedObjects): Ditto. - (KJS::Collector::numReferencedObjects): Ditto. - (KJS::Collector::rootObjectClasses): Ditto. - * kjs/internal.cpp: - (NumberImp::create): Ditto. - (InterpreterImp::globalInit): Ditto. - (InterpreterImp::globalClear): Ditto. - * kjs/list.cpp: - (KJS::List::markProtectedLists): Ditto. - (KJS::List::clear): Ditto. - (KJS::List::append): Ditto. - * kjs/list.h: - (KJS::List::List): Ditto. - (KJS::List::deref): Ditto. - (KJS::List::operator=): Ditto. - * kjs/protect.h: - (KJS::gcProtect): Ditto. - (KJS::gcUnprotect): Ditto. - -2005-05-09 Chris Blumenberg - - Workaround gcc 3.3 internal compiler errors. - - Reviewed by darin. - - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject stringRepresentation]): call [NSString stringWithCString:encoding] rather than using @"" - -2005-05-09 Darin Adler - - * Makefile.am: Don't set up PBXIntermediatesDirectory explicitly; - Not needed to make builds work, spews undesirable error messages too. - -2005-05-06 Darin Adler - - Reviewed by Maciej. - - - make building multiple trees with make work better - - * Makefile.am: Set up Xcode build directory before invoking xcodebuild. - -2005-05-04 Maciej Stachowiak - - Reviewed by Darin. - - Crash in JavaScriptCore with RSS Visualizer - - * kjs/internal.cpp: - (InterpreterImp::mark): mark staticNaN, it is usually protected by the Number - prototype but there is a small window where it can get collected. - -2005-05-04 Darin Adler - - Reviewed by Dave Hyatt. - - - another gcc-4.0-related fix - - * bindings/runtime_root.h: Take off extra namespace prefixes that apparently cause problems - compiling with gcc 4.0, although I have not observed the problems. - -2005-05-04 Darin Adler - - Reviewed by Dave Hyatt. - - - fixed build rules to match other projects - - * JavaScriptCore.pbproj/project.pbxproj: Set deployment target to 10.3 in the build styles. - When built without a build style (by Apple B&I) we want to get the target from the - environment. But when built with a build style (by Safari engineers and others), we want - to use 10.3. - - * Makefile.am: Took out extra parameters that make command-line building different from - Xcode building. Now that this is fixed, you should not get a full rebuild if you switch - from command line to Xcode or back. - -2005-05-04 Maciej Stachowiak - - - revert presumably accidental change to mozilla JS test expected results, this - was making the tests fail. - - * tests/mozilla/expected.html: - -2005-05-03 Richard Williamson - - Fixed Crash in LiveConnect below KJS::Bindings::JavaInstance::stringValue() const - - Correctly handle accessing nil objects from a Java object array. - - Reviewed by John. - - * bindings/jni/jni_runtime.cpp: - (JavaArray::valueAt): - -2005-05-01 Darin Adler - - - move to Xcode native targets and stop checking in generated files - - * JavaScriptCore.pbproj/project.pbxproj: Updated to use native targets and generate all the generated - files, so we don't have to check them in any more. - * Info.plist: Added. Native targets use a separate file for this. - - * Makefile.am: Removed pcre and kjs SUBDIRS. Also removed code that deleted the embedded copy of this - framework, since we haven't been embedding it for some time. - - * kjs/grammar_wrapper.cpp: Added. Shell used to compile grammar.cpp since we can't add a generated file - easily to the list of files to be compiled. - - * kjs/.cvsignore: Removed. - * kjs/Makefile.am: Removed. - * kjs/array_object.lut.h: Removed. - * kjs/date_object.lut.h: Removed. - * kjs/grammar.cpp: Removed. - * kjs/grammar.cpp.h: Removed. - * kjs/grammar.h: Removed. - * kjs/lexer.lut.h: Removed. - * kjs/math_object.lut.h: Removed. - * kjs/number_object.lut.h: Removed. - * kjs/string_object.lut.h: Removed. - * pcre/.cvsignore: Removed. - * pcre/Makefile.am: Removed. - * pcre/chartables.c: Removed. - -2005-04-28 Darin Adler - - Reviewed by Dave Harrison. - - - fixed problems preventing us from compiling with gcc 4.0 - - * JavaScriptCore.pbproj/project.pbxproj: Removed -Wmissing-prototypes from - WARNING_CPLUSPLUSFLAGS since it's now a C-only warning. - - * bindings/jni/jni_jsobject.cpp: - (JSObject::getSlot): Changed some %d to %ld where the parameters where long ints. - (JSObject::setSlot): Ditto. - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::getJavaVM): Ditto. - (KJS::Bindings::getJNIEnv): Ditto. - * bindings/objc/objc_utility.mm: Fixed include of that needed the - letter "S" capitalized. - * kjs/bool_object.cpp: (BooleanProtoFuncImp::call): Rearranged how this function returns to - avoid incorrect gcc 4.0 warning. - * kjs/collector.cpp: (KJS::Collector::markStackObjectsConservatively): Changed code to check - the alignment of the passed-in pointers to only require pointer-level alignment, not 8-byte alignment. - Prevents a crash on garbage collect when compiled with gcc 4.0. - * kjs/nodes.cpp: - (WhileNode::execute): Added a redundant return after an infinite loop to work around incorrect gcc 4.0 warning. - (ForNode::execute): Ditto. - (SwitchNode::execute):Rearranged how this function returns to avoid incorrect gcc 4.0 warning. - (LabelNode::execute): Ditto. - * kjs/string_object.cpp: (replace): Ditto. - -2005-04-26 Richard Williamson - - Fixed Scripting API is incompatible with Mozilla - - We were incompatible with Mozilla's implementation of the scripting APIs in - two ways: - - Their NPN_SetException has the following signature: - - void NPN_SetException(NPObject *npobj, const NPUTF8 *message); - - ours has: - - void NPN_SetException (NPObject * npobj, const NPString *message); - - Also, they expect the string returned from NPN_UTF8FromIdentifier() to be freed by caller. - We do not. - - I changed both behaviors to match Mozilla. - - Reviewed by Chris. - - * bindings/NP_jsobject.cpp: - (_NPN_SetException): - * bindings/npruntime.cpp: - (_NPN_UTF8FromIdentifier): - (_NPN_IntFromIdentifier): - (_NPN_SetExceptionWithUTF8): - * bindings/npruntime.h: - * bindings/npruntime_impl.h: - -2005-04-26 Maciej Stachowiak - - Reviewed by Chris. - - reproducible crash in KJS::kjs_fast_realloc loading maps.google.com - - * kjs/string_object.cpp: - (StringObjectFuncImp::call): Allocate adopted ustring buffer properly. - -2005-04-22 Darin Adler - - Reviewed by Maciej. - - * kjs/ustring.cpp: (KJS::UString::UTF8String): Fix off-by-one error in surrogate pair logic. - -2005-04-22 Darin Adler - - Reviewed by John. - - - fixed JavaScript throw statement causes parse error when no semicolon is present - - * kjs/grammar.y: Added an additional rule for throw like the ones we have for all the other semicolon rules. - Not sure why we missed this one earlier. - - * kjs/grammar.cpp: Regenerated. - -=== JavaScriptCore-412.1 === - -2005-04-20 Darin Adler - - Reviewed by Maciej. - - - speedups, total 12% on JavaScript iBench - - I ran the benchmark under Shark and followed its advice a lot, mainly. - - * kjs/collector.cpp: - (KJS::Collector::allocate): Take out special case for 0; costing speed but unexercised. - Use numLiveObjectsAtLastCollect instead of numAllocationsSinceLastCollect so we don't - have to bump it each time we call allocate. Put numLiveObjects into a local variable to - cut down on global variable accesses. Make "next" cell pointer be a byte offset rather - than a pointer so we don't need a special case for NULL. Allow freeList to point to some - bogus item when the entire block is full rather than going out of our way to make it - point to NULL. - (KJS::Collector::markProtectedObjects): Get table size and pointer into locals outside - the loop to avoid re-loading them over and over again. - (KJS::Collector::collect): Put numLiveObjects into a local variable to cut down on global - variable accesses. Make "next" cell pointer be a byte offset as above. Put numLiveObjects - into a local variable to cut down on global variable accesses. Set numLiveObjectsAtLastCollect - rather than numAllocationsSinceLastCollect. - (KJS::Collector::numReferencedObjects): Get table size and pointer into locals outside - the loop to avoid re-loading them over and over again. - (KJS::Collector::rootObjectClasses): Ditto. - - * kjs/internal.h: Make Value be a friend of NumberImp so it can construct number objects - directly, avoiding the conversion from Number to Value. - - * kjs/internal.cpp: (StringImp::toObject): Don't use Object::dynamicCast, because we know - the thing is an object and we don't want to do all the extra work; just cast directly. - - * kjs/list.cpp: (KJS::List::List): Construct valueRefCount in a way that avoids the need for - a branch -- in the hot case this just meant avoiding checking a variable we just set to false. - - * kjs/lookup.cpp: (keysMatch): Marked this inline. - - * kjs/nodes.cpp: Disabled KJS_BREAKPOINT, to avoid calling hitStatement all the time. - (BooleanNode::evaluate): Make a Value directly, rather than making a Boolean which is converted - into a Value. - (NumberNode::evaluate): Ditto. - (StringNode::evaluate): Ditto. - (ArrayNode::evaluate): Ditto. - (FunctionCallNode::evaluate): Use new inline baseIfMutable to avoid unnecessary getBase function. - Also just use a pointer for func, rather than an Object. - (PostfixNode::evaluate): Change code so that it doesn't make an excess Number, and so that it - passes a "known to be integer" boolean in, often avoiding a conversion from floating point to - integer and back. - (DeleteNode::evaluate): Make a Value directly. - (TypeOfNode::evaluate): Use new inline baseIfMutable and make Value directly. - (PrefixNode::evaluate): Change code so that it doesn't make an excess Number, and so that it - passes a "known to be integer" boolean in, often avoiding a conversion from floating point to - integer and back. - (UnaryPlusNode::evaluate): Make a Value directly. - (NegateNode::evaluate): Change code so that it doesn't make an excess Number, and so that it - passes a "known to be integer" boolean in, often avoiding a conversion from floating point to - integer and back. - (BitwiseNotNode::evaluate): Make a Value directly. - (LogicalNotNode::evaluate): Ditto. - (ShiftNode::evaluate): Don't convert to a double before making a Value. - (RelationalNode::evaluate): Make a Value directly. - (EqualNode::evaluate): Ditto. - (BitOperNode::evaluate): Ditto. - (AssignNode::evaluate): Make a Value directly. Change code so that it passes a "known to be integer" - boolean in, often avoiding a conversion from floating point to integer and back. - (VarDeclNode::evaluate): Make a Value directly. - (ForNode::execute): Remove unused local variable. - - * kjs/operations.h: - (KJS::isNaN): Inlined. - (KJS::isInf): Ditto. - (KJS::isPosInf): Ditto. - (KJS::isNegInf): Ditto. - - * kjs/operations.cpp: Change isNaN, isInf, isPosInf, and isNegInf to be inlines. - (KJS::equal): Rewrite to avoid creating values and recursing back into the function. - (KJS::relation): Rearranged code so that we don't need explicit isNaN checks. - (KJS::add): Changed code to make Value directly, and so that it passes a "known to be integer" - boolean in, often avoiding a conversion from floating point to integer and back. - (KJS::mult): Ditto. - - * kjs/property_map.cpp: - (KJS::PropertyMap::~PropertyMap): Get size and entries pointer outside loop to avoid - re-getting them inside the loop. - (KJS::PropertyMap::clear): Ditto. Clear value pointer in addition to key, so we can just - look at the value pointer in the mark function. - (KJS::PropertyMap::get): Get sizeMask and entries pointer outside loop to avoid - re-getting them inside the loop. - (KJS::PropertyMap::put): Ditto. - (KJS::PropertyMap::insert): Ditto. - (KJS::PropertyMap::remove): Ditto. - (KJS::PropertyMap::mark): Get size and entries pointer outside loop to avoid - re-getting them inside the loop. Don't bother checking key for 0, since we already have - to check value for 0. (Also had to change clear() to set value to 0.) - (KJS::PropertyMap::addEnumerablesToReferenceList): Get size and entries pointer outside - loop to avoid re-getting them inside the loop. - (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): Ditto. - (KJS::PropertyMap::save): Ditto. - - - other changes - - * kjs/protected_values.h: Remove unneeded class name qualifiers. - - * kjs/reference.h: - (KJS::Reference::baseIfMutable): New inline function: replaces isMutable(). - (KJS::Reference::Reference): Inlined. - * kjs/reference.cpp: - (KJS::Reference::getValue): Rewrite to not use getBase. - (KJS::Reference::putValue): Ditto. - (KJS::Reference::deleteValue): Dittol - - * kjs/simple_number.h: - (KJS::SimpleNumber::integerFits): Added. For use when the parameter is known to be integral. - - * kjs/string_object.cpp: (StringProtoFuncImp::call): Create the number without first converting - to double in various cases that involve integers. - - * kjs/ustring.h: - (KJS::UString::attach): Inlined. - (KJS::UString::release): Inlined. - * kjs/ustring.cpp: - (KJS::UString::find): Get first character outside the loop instead of re-fetching it each time. - - * kjs/value.cpp: - (Value::Value): Added overloads for all the various specific types of values, so you don't have - to convert from, say, Number to Value, just to create one. - (Number::Number): Added an overload that takes a boolean to indicate the number is already - known to be an integer. - - * kjs/value.h: Added more Value constructors, added a version of toNumber that returns - a boolean to indicate if the number is known to be an integer (because it was a "simple number"). - (KJS::ValueImp::marked): Inlined. - (KJS::ValueImp::dispatchType): Inlined. - (KJS::ValueImp::dispatchToPrimitive): Inlined. - (KJS::ValueImp::dispatchToBoolean): Inlined. - (KJS::ValueImp::dispatchToNumber): Inlined. - (KJS::ValueImp::dispatchToString): Inlined. - (KJS::ValueImp::dispatchToUInt32): Inlined. - -2005-04-14 Maciej Stachowiak - - - make fast_malloc.h a private header, not project - - * JavaScriptCore.pbproj/project.pbxproj: - -2005-04-12 Maciej Stachowiak - - Reviewed by Richard. - - JavaScript iBench can be sped up ~10% with custom allocator - - - use custom single-threaded malloc for all non-GC JavaScriptCore - allocations, for a 9.1% speedup on JavaScript iBench - - * JavaScriptCore.pbproj/project.pbxproj: - * kjs/collector.cpp: - (KJS::Collector::allocate): Use dlmalloc to allocate the collector blocks. - (KJS::Collector::collect): And dlfree to free it. - * kjs/fast_malloc.cpp: Added, just the standard dlmalloc here. - * kjs/fast_malloc.h: Added. Declarations for the functions. Also added a handy - macro to give a class custom operator new/delete - * kjs/identifier.cpp: - (KJS::Identifier::add): Use dlmalloc/dlfree. - * kjs/nodes.h: make nodes KJS_FAST_ALLOCATED. - * kjs/property_map.cpp: - (KJS::PropertyMap::~PropertyMap): Use dlmalloc/dlfree. - (KJS::PropertyMap::rehash): ditto - * kjs/scope_chain.h: - * kjs/ustring.cpp: - (KJS::UString::Rep::createCopying): New named constructor that copies a passed-in - buffer, to hide allocation details from webcore. - (KJS::UString::UString): use createCopying when appropriate. - (KJS::UString::Rep::destroy): Use dlmalloc/dlfree. - (KJS::UString::expandedSize): likewise - (KJS::UString::expandCapacity): likewise - (KJS::UString::expandPreCapacity): likewise - (KJS::UString::spliceSubstringsWithSeparators): likewise - (KJS::UString::append): likewise - (KJS::UString::operator=): likewise - (KJS::UString::detach): likewise - * kjs/ustring.h: make UString and UString::Rep KJS_FAST_ALLOCATED. - -2005-04-11 Maciej Stachowiak - - Reviewed by John. - - Avoid using protect count hash table so much for 5.6% JS iBench speedup - - - Avoid using protected values hash for the two most common cases - - Bump up ListImp high water mark, new testing shows 508 ListImps are - created during JS iBench. - - Net result is a 5.6% speedup on JavaScript iBench - - * kjs/collector.cpp: - (KJS::Collector::collect): mark protected lists as appropriate. - * kjs/context.h: - * kjs/list.cpp: - (KJS::ListImp::markValues): Moved implementation from List::markValues - (KJS::List::markProtectedLists): Implemented - scan pool and overflow - list. - (KJS::allocateListImp): link lists outside the pool into a separate - doubly linked list to be able to mark protected lists - (KJS::deallocateListImp): do the corresponding delinking - (KJS::List::derefValues): do nothing in conservative GC mode - (KJS::List::refValues): do nothing in conservative GC mode - (KJS::List::markValues): call ListImp version - (KJS::List::append): - * kjs/list.h: - -=== Safari-412 === - -=== Safari-411 === - -=== Safari-410 === - -=== Safari-409 === - -=== Safari-408 === - -=== Safari-407 === - -2005-03-16 Jens Alfke - - Reviewed by Kevin. - - Fix for "REGRESSION (163-164): search not performed correctly; united.com" - JavaScript unescape("") was returning a messed-up String object that appeared identical to an empty string, but would in some cases act as 'null' when passed to native functions, in this case the Option() constructor. - In the implementation of unescape, the UString holding the result was not initialized to "", so it started out as a null string. If nothing was appended to it, it remained null, resulting in a JavaScript String object with some bad behaviors (namely, converting it to a DOMStringImpl results in a NULL pointer.) - Darin says this regression occurred when we replaced our own implementation of unescape() with code from KJS. - - * kjs/function.cpp: - (KJS::GlobalFuncImp::call): - -2005-03-15 Richard Williamson - - Fixed WebScripting protocol in WebKit cannot convert Boolean in Javascript to BOOL in Objective-C - - Added JavaScript boolean to type that can be converted to - ObjC scalar parameters. - - Reviewed by Ken Kocienda. - - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - -=== Safari-406 === - -=== Safari-405 === - -=== Safari-403 === - -=== Safari-402 === - -=== Safari-401 === - -=== Safari-400 === - -=== Safari-188 === - -2005-02-21 Darin Adler - - * kjs/date_object.cpp: (timetUsingCF): Fixed indenting. - -2005-02-17 Richard Williamson - - Fixed Safari crashed at www.icelandair.com in LiveConnect code converting a Java object to a string - - Added nil check. - - Reviewed by John Sullivan. - - * bindings/jni/jni_runtime.cpp: - (JavaField::valueFromInstance): - -=== Safari-187 === - -2005-02-11 Richard Williamson - - Fixed DOM objects not being marshaled on JS->native calls - - Re-factored how 'native' wrappers for JS objects are created. The interpreter now - creates these wrappers. The WebCore subclass of the interpreter now overrides - createLanguageInstanceForValue() and creates a DOM ObjC wrapper for DOM objects. - - Reviewed by Ken. - - * bindings/c/c_utility.cpp: - (convertValueToNPVariant): - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_objc.mm: - (KJS::Bindings::dispatchJNICall): - * bindings/jni/jni_runtime.cpp: - (JavaField::valueFromInstance): - (JavaArray::valueAt): - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject _setExecutionContext:KJS::Bindings::]): - (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): - * bindings/objc/WebScriptObjectPrivate.h: - * bindings/objc/objc_utility.h: - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertObjcValueToValue): - (KJS::Bindings::createObjcInstanceForValue): - * bindings/runtime.cpp: - (Instance::createBindingForLanguageInstance): - (Instance::createRuntimeObject): - (Instance::createLanguageInstanceForValue): - * bindings/runtime.h: - * kjs/interpreter.cpp: - (Interpreter::createLanguageInstanceForValue): - * kjs/interpreter.h: - -=== Safari-186 === - -2005-02-10 Darin Adler - - "Reviewed" by Richard (he told me the file was obsolete). - - - got rid of an obsolete file - - * bindings/npsap.h: Removed. - -=== Safari-185 === - -=== Safari-183 === - -2005-02-03 Richard Williamson - - Fixed CrashTracer: ...36 crashes at com.apple.WebCore: khtml::CSSStyleSelector::applyDeclarations + 120 - - Revert to old (and correct) behavior of returning runtime object - when passed as a parameter, rather than it's corresponding DOM - object. - - Reviewed by Chris. - - * bindings/objc/WebScriptObject.mm: - (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): - -=== Safari-182 === - -2005-01-28 Richard Williamson - - Fixed JavaScript bindings access incorrect runtime object - - Only use special 'back door' property to get the runtime object if thisObj isn't - already a runtime object. - - Cleaned up a couple of strcmp on ClassInfo name. Used == on - ClassInfo pointer instead. - - Reviewed by Chris. - - * bindings/c/c_utility.cpp: - (convertValueToNPVariant): - * bindings/objc/WebScriptObject.mm: - (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): - * bindings/runtime_method.cpp: - (RuntimeMethodImp::call): - -=== Safari-181 === - -2005-01-26 Richard Williamson - - Fixed (179-180) 40% slowdown on iBench JavaScript test - - I added a member variable to ObjectImp. This changed it's size and consequently - hampered the optimizations built into the garbage collector. Objects no longer - fit within the allocators cell size, and thus allocation fell back to a slower - allocator. - - As a result of this fix I also dramatically cleaned up how runtime objects are - accessed. The path mostly *removes* code. - - Reviewed by Chris. - - * bindings/runtime_method.cpp: - (RuntimeMethodImp::call): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - (RuntimeObjectImp::put): - (RuntimeObjectImp::canPut): - (RuntimeObjectImp::hasProperty): - (RuntimeObjectImp::defaultValue): - * bindings/runtime_object.h: - * kjs/object.cpp: - (KJS::ObjectImp::ObjectImp): - * kjs/object.h: - -2005-01-20 Darin Adler - - Reviewed by me, changes by Han Ming Ong. - - - SWB: A few files need to be updated to be compilable under GCC 4.0 - - * bindings/objc/WebScriptObjectPrivate.h: Make members public. - * kjs/lookup.h: Change "value.h" to "object.h" because we need KJS::Object to compile a template. - -2005-01-20 Richard Williamson - - Fixed undefined property value from binding seems to evaluate to true in an if statement - - The comprehensive fix for this problem requires new API, as described in 3965326. However, - given that we can't add new API at this point, the 'ObjcFallbackObjectImp' will behave - like and Undefined object if invokeUndefinedMethodFromWebScript:withArguments: isn't - implemented on the bound object. - - Reviewed by Chris. - - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::type): - (ObjcFallbackObjectImp::implementsCall): - (ObjcFallbackObjectImp::toBoolean): - * bindings/testbindings.mm: - (+[MyFirstInterface isSelectorExcludedFromWebScript:]): - (+[MyFirstInterface isKeyExcludedFromWebScript:]): - -=== Safari-180 === - -2005-01-19 Richard Williamson - - Fixed Browser Crash when accessing CCWeb Progress Page - KJS::Bindings::convertValueToJValue - - Fixed the following problems with LiveConnect that are demonstrated by the application - described in 3853676. - - 1. If a nil object is passed in an array from Java to JavaScript we will crash. - 2. We sometimes will incorrectly attempt to access a generic JavaScript as a Java runtime object wrapper. - 3. We will sometimes fail to find the correct static method ID. - - Reviewed by Maciej. - - * bindings/jni/jni_jsobject.cpp: - (JSObject::convertJObjectToValue): - (JSObject::listFromJArray): - * bindings/jni/jni_runtime.cpp: - (JavaField::valueFromInstance): - (JavaField::setValueToInstance): - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::getMethodID): - (KJS::Bindings::convertValueToJValue): - * bindings/runtime_array.h: - -2005-01-18 Richard Williamson - - Fixed several issues all arising from analysis of plugin detection code at ifilm.com: - - Fixed can't script plug-ins if plug-in is invoked with element instead of - Fixed elements with IDs do not show up as named properties of the document - Fixed DOM objects for plugin elements are not accessible - Fixed need an additional class ID in WebCore for the Real plug-in - - We now support accessing scriptable plugin objects that are specified with , , or - tags. Also, if any of these elements are named they can be accessed from the document or window objects. - Finally, DOM methods are properties will be forwarded appropriately for the plugin's root scriptable object. - - Reviewed by Chris. - - * bindings/objc/objc_instance.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::supportsSetValueOfUndefinedField): - * bindings/runtime.h: - (KJS::Bindings::Instance::supportsSetValueOfUndefinedField): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::RuntimeObjectImp): - (RuntimeObjectImp::get): - (RuntimeObjectImp::put): - (RuntimeObjectImp::canPut): - (RuntimeObjectImp::hasProperty): - (RuntimeObjectImp::defaultValue): - * bindings/runtime_object.h: - (KJS::RuntimeObjectImp::fallbackObject): - * kjs/object.cpp: - (KJS::ObjectImp::ObjectImp): - * kjs/object.h: - (KJS::ObjectImp::forwardingScriptMessage): - (KJS::ObjectImp::setForwardingScriptMessage): - -2005-01-18 Richard Williamson - - Back out a change that was incorrectly committed yesterday. - - Reviewed by Chris. - - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - -2005-01-17 Richard Williamson - - Fixed Need to ensure same origin for plugin binding invocations (origin security rules) - - Keep track of originating execution context and target execution - context for native JS object wrappers, and perform appropriate - security checks. - - Reviewed by David Harrison. - - * bindings/NP_jsobject.cpp: - (_isSafeScript): - (_NPN_CreateScriptObject): - (_NPN_Invoke): - (_NPN_Evaluate): - (_NPN_GetProperty): - (_NPN_SetProperty): - (_NPN_RemoveProperty): - (_NPN_HasProperty): - (_NPN_HasMethod): - (_NPN_SetException): - * bindings/NP_jsobject.h: - * bindings/c/c_instance.cpp: - (CInstance::CInstance): - (CInstance::stringValue): - * bindings/c/c_instance.h: - * bindings/c/c_utility.cpp: - (convertValueToNPVariant): - * bindings/jni/jni_instance.cpp: - (JavaInstance::JavaInstance): - (JavaInstance::valueOf): - * bindings/jni/jni_instance.h: - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject _initializeWithObjectImp:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): - (-[WebScriptObject _initWithObjectImp:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): - (-[WebScriptObject KJS::Bindings::]): - (-[WebScriptObject _setOriginExecutionContext:KJS::Bindings::]): - (-[WebScriptObject _isSafeScript]): - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (-[WebScriptObject evaluateWebScript:]): - (-[WebScriptObject setValue:forKey:]): - (-[WebScriptObject valueForKey:]): - (-[WebScriptObject removeWebScriptKey:]): - (-[WebScriptObject stringRepresentation]): - (-[WebScriptObject webScriptValueAtIndex:]): - (-[WebScriptObject setWebScriptValueAtIndex:value:]): - (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): - * bindings/objc/WebScriptObjectPrivate.h: - * bindings/objc/objc_instance.h: - * bindings/objc/objc_runtime.mm: - (convertValueToObjcObject): - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - * bindings/runtime.cpp: - (Instance::Instance): - (Instance::operator=): - * bindings/runtime.h: - (KJS::Bindings::Instance::Instance): - (KJS::Bindings::Instance::setExecutionContext): - (KJS::Bindings::Instance::executionContext): - * bindings/runtime_root.cpp: - (RootObject::setInterpreter): - * bindings/runtime_root.h: - * kjs/interpreter.h: - (KJS::Interpreter::isGlobalObject): - (KJS::Interpreter::interpreterForGlobalObject): - (KJS::Interpreter::isSafeScript): - -=== Safari-179 === - -2005-01-13 Vicki Murley - - Reviewed by Adele. - - - fix Safari about box lists 2004 instead of 2005 - - * JavaScriptCore.pbproj/project.pbxproj: bump "2004" to "2005" - -2005-01-12 Richard Williamson - - Avoid additional work on dealloc by adding early out to - removeNativeReference(). (This will save time on dealloc - for all ObjC DOM objects.) - - Reviewed by Darin. - - * bindings/runtime_root.cpp: - (KJS::Bindings::removeNativeReference): - -2005-01-12 Richard Williamson - - Fixed REGRESSION: Java/JavaScript security checks working incorrectly - - We were always returning the first "root" object for all runtime - objects. Changed 0 in loop to i, the index. - - Reviewed by David Harrison. - - * bindings/runtime_root.cpp: - (KJS::Bindings::rootForImp): - -2005-01-11 Richard Williamson - - Fixed Must use new Java plug-in API to get/set fields so exception handling works (fixes many LiveConnect crashes) - - Use the new dispatching API to invoke JNI, rather than calling JNI - directly. - - Reviewed by David Harrison. - - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_runtime.cpp: - (JavaField::dispatchValueFromInstance): - (JavaField::valueFromInstance): - (JavaField::dispatchSetValueToInstance): - (JavaField::setValueToInstance): - * bindings/jni/jni_runtime.h: - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::convertValueToJValue): - -=== Safari-178 === - -=== Safari-177 === - -=== Safari-176 === - -2004-12-17 Maciej Stachowiak - - Reviewed by Kevin. - - Opening caches window after running PLT causes crash - - * kjs/protected_values.cpp: - (KJS::ProtectedValues::getProtectCount): Don't include simple numbers in - the protected value table. - (KJS::ProtectedValues::increaseProtectCount): Ditto. - (KJS::ProtectedValues::decreaseProtectCount): Ditto. - -2004-12-16 Darin Adler - - Reviewed by Maciej. - - - fixed Unimplemented String methods toLocaleLowerCase and toLocaleUpperCase - - * kjs/string_object.h: Added toLocaleLowerCase and toLocaleUpperCase. - * kjs/string_object.cpp: (StringProtoFuncImp::call): Made locale versions be synonmyms for the - non-locale-specific versions. - * kjs/string_object.lut.h: Regenerated. - -2004-12-14 Richard Williamson - - Pass URL of plugin view when call into JNI. - - Reviewed by Chris. - - * bindings/jni/jni_objc.mm: - (KJS::Bindings::dispatchJNICall): - -2004-12-13 Richard Williamson - - Fixed repro. crash with IBM Rational ClearCase Web under Safari (Java/LiveConnect-related) - - Add support for calling static Java methods from JavaScript. - - Reviewed by Maciej. - - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_runtime.cpp: - (JavaMethod::JavaMethod): - * bindings/jni/jni_runtime.h: - (KJS::Bindings::JavaMethod::isStatic): - * bindings/jni/jni_utility.cpp: - (callJNIStaticMethod): - (KJS::Bindings::callJNIBooleanMethod): - (KJS::Bindings::callJNIStaticBooleanMethod): - * bindings/jni/jni_utility.h: - -2004-12-13 Richard Williamson - - Fixed LiveConnect doesn't propagate Java exceptions back to JavaScript (prevents security suite from running) - - Reviewed by John. - - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_objc.mm: - (KJS::Bindings::dispatchJNICall): - * bindings/jni/jni_runtime.h: - * bindings/jni/jni_utility.h: - -=== Safari-175 === - -2004-12-07 Maciej Stachowiak - - Reviewed by Darin. - - REGRESSION (172-173): assertion in ObjectImp::construct trying to create JS error (24hourfitness.com) - - The fix was to implement copy constructor and assignment operator, - the ones that worked on the base class did not replace the - defaults apparently! - - * kjs/protect.h: - (KJS::ProtectedValue::ProtectedValue): - (KJS::ProtectedValue::operator=): - (KJS::ProtectedObject::ProtectedObject): - (KJS::ProtectedObject::operator=): - - Also fixed a bug in the GC test mode that compares the results of - the old collector and the new collector. - - * kjs/value.cpp: - (ValueImp::mark): - -=== Safari-173 === - -2004-11-23 Richard Williamson - - Fixed field and method cache incorrectly capped (c bindings) - - Reviewed by Ken. - - * bindings/c/c_class.cpp: - (CClass::_commonInit): - -2004-11-21 Maciej Stachowiak - - Reviewed by Ken. - - Enable conservative garbage collection for JavaScript - - * kjs/collector.cpp: - (KJS::Collector::Thread::Thread): - (KJS::destroyRegisteredThread): - (KJS::initializeRegisteredThreadKey): - (KJS::Collector::registerThread): - (KJS::Collector::markStackObjectsConservatively): - (KJS::Collector::markCurrentThreadConservatively): - (KJS::Collector::markOtherThreadConservatively): - * kjs/collector.h: - * kjs/internal.cpp: - (lockInterpreter): - * kjs/value.h: - -=== Safari-172 === - -2004-11-15 Richard Williamson - - Fixed Default string value of ObjC object in JS should be [obj description]. - - Reviewed by Hyatt. - - * bindings/objc/objc_instance.mm: - (ObjcInstance::stringValue): - * bindings/objc/objc_utility.h: - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertNSStringToString): - (KJS::Bindings::convertObjcValueToValue): - -=== Safari-171 === - -2004-11-09 Chris Blumenberg - - Fixed: soft link against JavaVM to save ~2MB RSHRD - - Reviewed by rjw. - - * ChangeLog: - * JavaScriptCore.pbproj/project.pbxproj: don't link against JavaVM - * bindings/softlinking.c: Added. - (loadFramework): new - (getFunctionPointer): new - (JNI_GetCreatedJavaVMs): load JavaVM if not already loaded, get _JNI_GetCreatedJavaVMs symbol if we don't already have it, call JNI_GetCreatedJavaVMs - -=== Safari-170 === - -2004-11-04 Darin Adler - - Reviewed by Ken. - - - fixed since -[WebScriptObject dealloc] does not call [super dealloc], the build will fail due to a warning - - fixed behavior so that [[WebScriptObject alloc] initWithCoder:] doesn't leak WebUndefined instances - and incidentally so that [[WebScriptObject alloc] init] returns the single shared instance rather - than allocating a new one - - * bindings/objc/WebScriptObject.mm: Removed some stray semicolons. - (+[WebUndefined allocWithZone:]): Made this the common bottleneck that returns the single instance - of WebUndefined, since it's the single method that normally allocates new instances. Calls super to - actually allocate only the very first time it's called. - (-[WebUndefined initWithCoder:]): Simplified to just return self (no reason to re-lookup the single - shared instance since there can be only one). - (-[WebUndefined copyWithZone:]): Ditto. - (-[WebUndefined retain]): Ditto. - (-[WebUndefined retainCount]): Use UINT_MAX constant here (matches usage in NSObject.m for retain count - of class). - (-[WebUndefined autorelease]): Simplified to just return self (see above). - (-[WebUndefined copy]): No need to override this since it just turns around and calls copyWithZone:. - (-[WebUndefined dealloc]): Added an assertion since this method should never be called. Also added - a call to [super dealloc] after return; to make the new -Wdealloc-check compiler happy (fixing the - bug mentioned above). - (+[WebUndefined undefined]): Reimplemented; calls allocWithZone:NULL to get to the shared instance. - No need to call init, since that's a no-op for this class. - -2004-11-03 David Harrison - - Reviewed by Darin. - - Eliminate the use of a marker file to determine how to build. - - * .cvsignore: - * Makefile.am: - -2004-11-01 Richard Williamson - - Fixed Latest Real player crashes Safari on some sites. - - Reviewed by Ken. - - * bindings/c/c_instance.cpp: - (CInstance::invokeMethod): - (CInstance::invokeDefaultMethod): - Initialize out parameters to void type. - - * bindings/c/c_runtime.cpp: - (CField::valueFromInstance): - (CField::setValueToInstance): - Initialize out parameters to void type. - Also added additional checks to protect against classes that - don't implement all functions. - -2004-11-01 Richard Williamson - - Fixed WebUndefined should be returned for undefined values - - Reviewed by John. - - * ChangeLog: - * bindings/objc/WebScriptObject.mm: - (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]): - Added additional conversion Undefined -> WebUndefined. - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertObjcValueToValue): - Added additional conversion WebUndefined -> Undefined. - -2004-11-01 Darin Adler - - - fixed Remove reference to "WebScriptMethods" from WebScriptObject.h comments - - * bindings/objc/WebScriptObject.h: Removed unneeded #ifdef protection for multiple includes (since - this is an Objective-C header and we use #import for those). Fixed comments as requested in the bug - report to match the contents of the file. - -=== Safari-169 === - -=== Safari-168 === - -2004-10-22 Ken Kocienda - - Reviewed by me - - * JavaScriptCore.pbproj/project.pbxproj: - Add GCC_ENABLE_OBJC_GC and GCC_FAST_OBJC_DISPATCH flags. - -=== Safari-167 === - -2004-10-13 Richard Williamson - - Moved boolean checks prior to NSNumber checks. booleans are - NSNumbers. - - Follow on to binding layer needs to convert NSNumber-bools to js type boolean not number. - - Reviewed by John. - - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertObjcValueToValue): - -2004-10-12 Richard Williamson - - Fixed access to DOM object via WebScriptObject API. - The execution context for DOM objects wasn't being found. - The valueForKey method for @"offsetLeft" on a paragraph element causes a crash. - - Reviewed by Chris. - - * bindings/objc/WebScriptObject.mm: - (_didExecute): - (-[WebScriptObject KJS::Bindings::]): - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (-[WebScriptObject evaluateWebScript:]): - (-[WebScriptObject setValue:forKey:]): - (-[WebScriptObject valueForKey:]): - (-[WebScriptObject stringRepresentation]): - * bindings/objc/WebScriptObjectPrivate.h: - -2004-10-09 Darin Adler - - Reviewed by Kevin. - - - fixed REGRESSION: JavaScriptCore framework now has two init routines - - * bindings/NP_jsobject.cpp: Fixed unnecessarily-complex globals set up that was - creating an init routine. - - * kjs/ustring.cpp: Changed around the UString::Rep::empty construction to not - require a global constructor that creates an init routine. - -2004-10-09 Darin Adler - - Reviewed by Kevin. - - - fixed REGRESSION (164-165): expedia.com's popup help doesn't work - - * kjs/reference.cpp: (Reference::putValue): Change so that references not found in any object - work with the window object of the page the function is in, not the page of the caller. This - is what all other browsers do. This code was hidden before by the "everything is defined on - window object" hack in WebCore. - -2004-10-07 Richard Williamson - - Added simple JavaScript call tracing. Very useful for - debugging complex pages. - - Tracing is only available in development builds and is - enabled by: - - (gdb) set traceJavaScript = 1 - - or programatically - - setTraceJavaScript(true) - - Function, args, and return values are printed to console. Very - verbose. - - Reviewed by Ken. - - * kjs/function_object.cpp: - (FunctionProtoFuncImp::call): - * kjs/object.cpp: - (KJS::Object::call): - -=== Safari-166 === - -2004-10-05 Richard Williamson - - Fixed NPN_SetException (and throwException:) isn't implemented - - Reviewed by Chris. - - * bindings/NP_jsobject.cpp: - (_NPN_SetException): - * bindings/npruntime.cpp: - (_NPN_SetExceptionWithUTF8): - * bindings/objc/WebScriptObject.mm: - (+[WebScriptObject throwException:]): - * kjs/internal.h: - (KJS::InterpreterImp::context): - -2004-10-05 Richard Williamson - - Fixed binding layer needs to convert NSNumber-bools to js type boolean not number - - Reviewed by Ken. - - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertObjcValueToValue): - -2004-10-04 Darin Adler - - Reviewed by Ken. - - - rolled in a fix the KDE folks did for the operations that generate HTML fragments - - * kjs/string_object.cpp: (StringProtoFuncImp::call): Added quote marks to generated HTML. - - - rolled out an old workaround we don't need any more - - * JavaScriptCore.pbproj/project.pbxproj: Remove -Wno-long-double because the issue that - required it is no longer there. - -2004-09-30 Richard Williamson - - Fixed NPN hasMethod and hasProperty functions should take NPObjects, not NPClass - - Reviewed by Chris. - - * bindings/NP_jsobject.cpp: - (_NPN_GetProperty): - (_NPN_HasProperty): - (_NPN_HasMethod): - * bindings/c/c_class.cpp: - (CClass::methodsNamed): - (CClass::fieldNamed): - * bindings/c/c_class.h: - * bindings/c/c_instance.cpp: - (CInstance::invokeMethod): - * bindings/jni/jni_class.cpp: - (JavaClass::methodsNamed): - * bindings/jni/jni_class.h: - * bindings/npruntime.h: - * bindings/objc/objc_class.h: - * bindings/objc/objc_class.mm: - (ObjcClass::methodsNamed): - * bindings/runtime.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - (RuntimeObjectImp::hasProperty): - -2004-09-29 Chris Blumenberg - - Prepended underscores to NPN methods so that when the QT plug-in loads these symbols, it uses the non-underscore versions in WebKit. Without this, the QT plug-in was failing to load when launching Safari from the command-line. - - Reviewed by rjw. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/NP_jsobject.cpp: - (_NPN_CreateScriptObject): - (_NPN_InvokeDefault): - (_NPN_Invoke): - (_NPN_Evaluate): - (_NPN_GetProperty): - (_NPN_SetProperty): - (_NPN_RemoveProperty): - (_NPN_HasProperty): - (_NPN_HasMethod): - * bindings/c/c_class.cpp: - (CClass::methodsNamed): - (CClass::fieldNamed): - * bindings/c/c_instance.cpp: - (CInstance::CInstance): - (CInstance::~CInstance): - (CInstance::operator=): - (CInstance::invokeMethod): - (CInstance::invokeDefaultMethod): - * bindings/c/c_runtime.cpp: - * bindings/c/c_runtime.h: - (KJS::Bindings::CField::name): - (KJS::Bindings::CMethod::name): - * bindings/npruntime.cpp: - (_NPN_GetStringIdentifier): - (_NPN_GetStringIdentifiers): - (_NPN_GetIntIdentifier): - (_NPN_IdentifierIsString): - (_NPN_UTF8FromIdentifier): - (_NPN_IntFromIdentifier): - (NPN_InitializeVariantWithObject): - (_NPN_ReleaseVariantValue): - (_NPN_CreateObject): - (_NPN_RetainObject): - (_NPN_ReleaseObject): - (_NPN_SetExceptionWithUTF8): - (_NPN_SetException): - -2004-09-26 Darin Adler - - * kjs/string_object.cpp: (StringProtoFuncImp::call): Remove strange use of high() and - low() to get Unicode value of character, and just use unicode(). - -2004-09-26 Darin Adler - - - refine charAt/charCodeAt fix slightly - - * kjs/string_object.cpp: (StringProtoFuncImp::call): Treat undefined the same was as an - omitted parameter, as we do everywhere else, and as other browsers do here. - -2004-09-26 Darin Adler - - Reviewed by Kevin. - - - fixed REGRESSION: mailblocks, and presumably many other pages, failing because variable not found - - * kjs/internal.cpp: (InterpreterImp::evaluate): Process variable declarations before executing - the program. We were doing this properly for functions, but not entire programs. - - - fixed REGRESSION: text fields in mailblocks wizards do not accept keystrokes due to use of charCodeAt() - - * kjs/string_object.cpp: (StringProtoFuncImp::call): Changed the implementation of charAt - and charCodeAt to treat a missing parameter as an index of 0, rather than an invalid index. - - * tests/mozilla/expected.html: Update for two tests that now pass with these changes. - -=== Safari-165 === - -=== Safari-164 === - -2004-09-14 Richard Williamson - - 1. Add class parameter to object allocation function. This is somewhat redundant, given that - the allocation function is in the class function vector, but people wanted to use the same - allocation function for different classes. - - 2. Renamed NPN_Class to NPN_Invoke to match the name in the function vector. - - 3. Add support for a default function on an object. This is a feature that ActiveX supports, - and will allow JavaScript code to be written that will look exactly the same for both ActiveX - plugins and Netscape or WebKit plugins. There are implementations included for the 'C' and - 'Objective-C' bindings. - - There bugs are covered by - - Support for default functions in the JavaScript bindings - NPN_Call needs to be renamed to NPN_Invoke - Need to implement latest npruntime.h - - Reviewed by John. - - * bindings/NP_jsobject.cpp: - (jsAllocate): - (NPN_InvokeDefault): - (NPN_Invoke): - * bindings/c/c_class.cpp: - * bindings/c/c_instance.cpp: - (CInstance::CInstance): - (CInstance::operator=): - (CInstance::invokeMethod): - (CInstance::invokeDefaultMethod): - * bindings/c/c_instance.h: - * bindings/c/c_runtime.cpp: - * bindings/c/c_runtime.h: - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeDefaultMethod): - * bindings/jni/jni_instance.h: - * bindings/npruntime.cpp: - (NPN_CreateObject): - * bindings/npruntime.h: - * bindings/objc/WebScriptObject.h: - * bindings/objc/objc_class.mm: - (ObjcClass::fallbackObject): - * bindings/objc/objc_instance.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeDefaultMethod): - * bindings/objc/objc_runtime.h: - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::ObjcFallbackObjectImp): - (ObjcFallbackObjectImp::get): - (ObjcFallbackObjectImp::put): - (ObjcFallbackObjectImp::canPut): - (ObjcFallbackObjectImp::implementsCall): - (ObjcFallbackObjectImp::call): - (ObjcFallbackObjectImp::hasProperty): - (ObjcFallbackObjectImp::deleteProperty): - (ObjcFallbackObjectImp::defaultValue): - * bindings/runtime.h: - (KJS::Bindings::Class::fallbackObject): - (KJS::Bindings::Instance::getValueOfUndefinedField): - (KJS::Bindings::Instance::setValueOfUndefinedField): - (KJS::Bindings::Instance::valueOf): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::implementsCall): - (RuntimeObjectImp::call): - * bindings/runtime_object.h: - -2004-09-13 Maciej Stachowiak - - Reviewed by Darin. - - Gmail- sending a very long message with Safari is so slow it seems like a hang - - * kjs/string_object.cpp: - (StringProtoFuncImp::call): Replaced implementation of replace() - method with function below... - (replace): In order to avoid excessive allocation and copying, - figure out the ranges of the original string and replacement - strings to be assembled, instead of constantly creating new - strings at each substitution. The old behavior is basically O(N^2) - for a global replace on a pattern that matches many places in the - string. - (regExpIsGlobal): Helper function for the above. - (expandSourceRanges): ditto - (pushSourceRange): ditto - (expandReplacements): ditto - (pushReplacement): ditto - * kjs/ustring.cpp: - (KJS::UString::spliceSubstringsWithSeparators): New method that - pieces together substring ranges of this string together with - specified separators, all at one go. - * kjs/ustring.h: - (KJS::UString::Range::Range): Added new helper class to represent - substring choices. - -2004-09-14 Maciej Stachowiak - - Reviewed by Darin. - - - fixed encode-URI-test layout test is failing - - * kjs/function.cpp: - (KJS::GlobalFuncImp::call): Make sure to escape null - characters. This is a bug in the new code that made part of the - test fail. - -2004-09-13 Darin Adler - - Reviewed by Kevin and Maciej. - - - new function to support fix for DIG bug in WebCore - - * kjs/scope_chain.h: Added new push function that pushes another entire scope chain. - * kjs/scope_chain.cpp: (KJS::ScopeChain::push): Ditto. - -2004-09-12 Darin Adler - - * tests/mozilla/expected.html: Updated test results for 3 more tests that pass with the new version - of escape and unescape. - -2004-09-12 Darin Adler - - Reviewed by Maciej. - - - fixed any non-ASCII characters are garbled in the result of toLocaleString - - * kjs/date_object.cpp: - (formatLocaleDate): Replaced two old functions that used LongDateTime with this one new function that - uses CFDateFormatter. - (DateProtoFuncImp::call): Call the new formatLocaleDate instead of both formatLocaleDate and formatLocaleTime. - -2004-09-09 Maciej Stachowiak - - Reviewed by Richard. - - REGRESSION (85-100): cedille displays %-escaped in JavaScript message at hotmail.com - - * kjs/function.cpp: - (KJS::GlobalFuncImp::call): Replace our escape() and unescape() implementations with - ones from KDE KJS, which have the proper latin-1 behavior to match Win IE. - * kjs/lexer.cpp: - (Lexer::isHexDigit): Made static and non-const. - * kjs/lexer.h: - -=== Safari-163 === - -2004-09-06 Darin Adler - - * JavaScriptCore.pbproj/project.pbxproj: Bump MACOSX_DEPLOYMENT_TARGET to 10.3. - -=== Safari-162 === - -2004-09-01 Richard Williamson - - Add pid to exception messages (to help debug dashboard clients). - - Reviewed by Chris. - - * kjs/interpreter.cpp: - (Interpreter::evaluate): - -=== Safari-161 === - -2004-08-20 Richard Williamson - - Implemented new JNI abstraction. We no longer invoke Java methods - directly with JNI, rather we call into the plugin. This allows the - plugin to dispatch the call to the appropriate VM thread. This - change should (will?) fix a whole class of threading related problems with - the Java VM. - - Reviewed by Hyatt. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/c/c_instance.h: - (KJS::Bindings::CInstance::setExecutionContext): - (KJS::Bindings::CInstance::executionContext): - * bindings/jni/jni_instance.cpp: - (JavaInstance::JavaInstance): - (JavaInstance::invokeMethod): - (JavaInstance::setExecutionContext): - (JavaInstance::executionContext): - * bindings/jni/jni_instance.h: - * bindings/jni/jni_jsobject.cpp: - (JSObject::convertJObjectToValue): - * bindings/jni/jni_runtime.cpp: - (JavaField::JavaField): - (JavaArray::convertJObjectToArray): - (JavaField::valueFromInstance): - (JavaArray::JavaArray): - (JavaArray::valueAt): - * bindings/jni/jni_runtime.h: - (KJS::Bindings::JavaArray::operator=): - (KJS::Bindings::JavaArray::executionContext): - * bindings/jni/jni_utility.h: - * bindings/objc/objc_instance.h: - (KJS::Bindings::ObjcInstance::setExecutionContext): - (KJS::Bindings::ObjcInstance::executionContext): - * bindings/runtime.cpp: - (Instance::createBindingForLanguageInstance): - * bindings/runtime.h: - * bindings/runtime_root.h: - (KJS::Bindings::RootObject::nativeHandle): - -=== Safari-158 === - -2004-08-19 Vicki Murley - - Reviewed by John. - - * kjs/property_map.cpp: - (KJS::PropertyMap::put): initialize deletedElementIndex to zero, to make the compiler happy - -2004-08-17 Darin Adler - - Reviewed by Adele. - - - fixed SAP WebDynpro app hangs inside JavaScript property map hash table code (deleted sentinel problem) - - * kjs/property_map.h: Added some private functions. - * kjs/property_map.cpp: - (KJS::PropertyMap::clear): Set sentinelCount to 0. - (KJS::PropertyMap::put): Complete search for the element before choosing to use the deleted-element sentinel. - Also keep sentinel count up to date when we destroy a sentinel by overwriting with a new added element. - (KJS::PropertyMap::expand): Added. Calls rehash with a size 2x the old size, or 16. - (KJS::PropertyMap::rehash): Added. Refactored the rehash code into a separate function. - (KJS::PropertyMap::remove): Add one to sentinelCount, and rehash if 1/4 or more of the elements are - deleted-element sentinels. - (KJS::PropertyMap::checkConsistency): Check the sentinelCount. - -2004-08-16 Maciej Stachowiak - - Code change by Eric Albert, reviewd by me. - - washingtonpost.com claims I don't have cookies enabled and won't let me read articles - - * kjs/date_object.cpp: - (timetUsingCF): Clamp time to LONG_MAX (getting rid of time_t - entirely would be even better, but is not required to fix this bug. - -=== Safari-157 === - -2004-08-16 Richard Williamson - - Fixed cash in KJS::Bindings::JSObject::eval at tcvetantcvetkov.com - - Adds bullet proofing to protect against evaluation of bogus JS in all the flavors of bindings (Java, C, and ObjC). - - Reviewed by Chris. - - * bindings/NP_jsobject.cpp: - (NPN_Evaluate): - * bindings/jni/jni_jsobject.cpp: - (JSObject::eval): - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject evaluateWebScript:]): - -2004-08-15 Richard Williamson - - More updates to np headers. Implemented new NPN functions. - - Reviewed by Darin. - - * bindings/NP_jsobject.cpp: - (NPN_HasProperty): - (NPN_HasMethod): - * bindings/npapi.h: - * bindings/npruntime.h: - -2004-08-13 Darin Adler - - - fix build so we can compile again - - * bindings/npapi.h: Added. Richard forgot to check this in. The one I'm checking in here - is good enough so that we can compile, but it's only a stopgap measure, because I think - Richard has a newer one he wants to check in. - -2004-08-12 Richard Williamson - - Bring npruntime.h and friends closer to compliance with - latest spec. - - Reviewed by Maciej. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/NP_jsobject.cpp: - (jsAllocate): - (_NPN_CreateScriptObject): - (NPN_Call): - (NPN_Evaluate): - (NPN_GetProperty): - (NPN_SetProperty): - (NPN_RemoveProperty): - * bindings/NP_jsobject.h: - * bindings/c/c_instance.cpp: - (CInstance::invokeMethod): - * bindings/c/c_utility.cpp: - (convertNPVariantToValue): - * bindings/npruntime.cpp: - (NPN_IdentifierIsString): - (NPN_VariantIsVoid): - (NPN_VariantIsNull): - (NPN_VariantIsUndefined): - (NPN_VariantIsBool): - (NPN_VariantIsInt32): - (NPN_VariantIsDouble): - (NPN_VariantIsString): - (NPN_VariantIsObject): - (NPN_VariantToBool): - (NPN_VariantToString): - (NPN_VariantToInt32): - (NPN_VariantToDouble): - (NPN_VariantToObject): - (NPN_InitializeVariantAsVoid): - (NPN_InitializeVariantAsNull): - (NPN_InitializeVariantAsUndefined): - (NPN_InitializeVariantWithBool): - (NPN_InitializeVariantWithInt32): - (NPN_InitializeVariantWithDouble): - (NPN_InitializeVariantWithString): - (NPN_InitializeVariantWithStringCopy): - (NPN_InitializeVariantWithObject): - (NPN_InitializeVariantWithVariant): - (NPN_ReleaseVariantValue): - (NPN_CreateObject): - * bindings/npruntime.h: - (_NPString::): - (_NPString::_NPVariant::): - * bindings/npruntime_priv.h: Added. - -2004-08-12 Darin Adler - - Reviewed by Adele. - - - fixed 3 problems with parse functions that I just wrote, fixing 3 more Mozilla JavaScript tests - - * kjs/function.cpp: - (KJS::parseDigit): Fix typo, 'Z' instead of 'z', that prevented lowercase hex digits from working. - (KJS::parseInt): Add octal support. Specification says it's optional, but I guess not. - (KJS::parseFloat): Fix check for "0x" in parseFloat to return 0 rather than NaN. Also add code - to skip leading "+" or "-". - -=== Safari-156 === - -2004-08-12 Darin Adler - - Reviewed by Ken. - - - fixed 43 Mozilla JavaScript tests - - * kjs/date_object.h: Change parseDate and timeClip to take and return doubles. - * kjs/date_object.cpp: - (DateObjectImp::construct): Change to use a timeClip function that takes and returns a double rather - than constructing a number object to pass to it. - (DateObjectFuncImp::call): Change to use a parseDate function that returns a double. - (KJS::parseDate): Change to return a double instead of creating the Number object here. - (KJS::timeClip): Implement this as specified in the language standard. - - * kjs/error_object.cpp: (NativeErrorImp::NativeErrorImp): Set the DontDelete, ReadOnly, and DontEnum - flags on the prototype property. - - * kjs/function.cpp: - (KJS::FunctionImp::get): Return null rather than undefined for arguments when the function is not - currently in scope. - (KJS::isStrWhiteSpace): Added. Matches specification for StrWhiteSpace. Could move it to some utility - file later. - (KJS::parseDigit): Added. Helper function for parseInt. - (KJS::parseInt): Added. Integer parser that puts result in a double so we're not limited to what - strtoll can handle. Also matches standard more closely. - (KJS::parseFloat): Added. Handles "0x" properly and passes flag to make empty string turn into NaN - instead of 0. - (KJS::GlobalFuncImp::call): Use the new parseInt and parseFloat. - - * kjs/function_object.cpp: (FunctionPrototypeImp::FunctionPrototypeImp): Add a length property. - - * kjs/lexer.h: Added error flag and sawError() function for detecting errors. - * kjs/lexer.cpp: - (Lexer::setCode): Clear error state. - (Lexer::lex): Set error state if the lexer encounters an error - - * kjs/internal.cpp: - (NumberImp::toString): Roll in change from KDE version to special case 0 so we handle -0 correctly. - (Parser::parse): Use new lexer error method so those errors are treated like parser errors. - - * kjs/math_object.cpp: (MathFuncImp::call): Change min and max to treat -0 as less than +0. - Change round to round values between -0.5 and -0 to -0 instead of +0. - - * kjs/nodes.h: Add evaluateReference function to GroupNode. - * kjs/nodes.cpp: (GroupNode::evaluateReference): Pass references through groups (parenthesized - expressions) properly so that expressions like "delete (x.y)" work. Before, the parentheses - would change x.y into a value that can't be deleted as a side effect. - - * kjs/string_object.cpp: Change parameter count for indexOf and lastIndexOf from 2 to 1 to match - the specification. - - * kjs/testkjs.cpp: Rolled in changes from KDE to add a "quit" function to the test tool and - get rid of the fixed size limit for code. - - * kjs/ustring.cpp: (KJS::UString::substr): Added optimized case for substr(0, length) so it just - returns the string without creating a new Rep, since I'm using substr in a place where it will - often be passed a 0. - - * tests/mozilla/ecma/String/15.5.4.11-1.js: Fixed one wrong entry in the Unicode table I added to - the other day that was making a couple tests fail. - * tests/mozilla/ecma/String/15.5.4.12-1.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.12-2.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.12-3.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.12-4.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.12-5.js: Ditto. - - * kjs/string_object.lut.h: Regenerated. - -2004-08-11 Darin Adler - - - fixed a tiny problem with the UTF-16 PCRE check-in - - * pcre/maketables.c: (pcre_maketables): Fix mistake in table-generating code that sometimes caused - the ctype_meta flag to get set in items that should not have it. - - * pcre/chartables.c: Regenerated. - -2004-08-10 Richard Williamson - - Fixed Need to implement invokeUndefinedMethodFromWebScript:withArguments: - - The following WebScripting methods are now supported on bound - objects: - - - (id)invokeUndefinedMethodFromWebScript:(NSString *)name withArguments:(NSArray *)args; - - (void)setValue:(id)value forUndefinedKey:(NSString *)key - - (id)valueForUndefinedKey:(NSString *)key - - Reviewed by Chris. - - * bindings/c/c_class.cpp: - (CClass::fieldNamed): - * bindings/c/c_class.h: - * bindings/jni/jni_class.cpp: - (JavaClass::fieldNamed): - * bindings/jni/jni_class.h: - * bindings/objc/objc_class.h: - (KJS::Bindings::ObjcClass::isa): - * bindings/objc/objc_class.mm: - (ObjcClass::methodsNamed): - (ObjcClass::fieldNamed): - (ObjcClass::fallbackObject): - * bindings/objc/objc_instance.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - (ObjcInstance::setValueOfField): - (ObjcInstance::setValueOfUndefinedField): - (ObjcInstance::getValueOfField): - (ObjcInstance::getValueOfUndefinedField): - * bindings/objc/objc_runtime.h: - (KJS::Bindings::ObjcField::~ObjcField): - (KJS::Bindings::ObjcField::ObjcField): - (KJS::Bindings::ObjcField::operator=): - (KJS::Bindings::FallbackObjectImp::classInfo): - * bindings/objc/objc_runtime.mm: - (ObjcField::ObjcField): - (ObjcField::name): - (ObjcField::type): - (ObjcField::valueFromInstance): - (ObjcField::setValueToInstance): - (FallbackObjectImp::FallbackObjectImp): - (FallbackObjectImp::get): - (FallbackObjectImp::put): - (FallbackObjectImp::canPut): - (FallbackObjectImp::implementsCall): - (FallbackObjectImp::call): - (FallbackObjectImp::hasProperty): - (FallbackObjectImp::deleteProperty): - (FallbackObjectImp::defaultValue): - * bindings/runtime.h: - (KJS::Bindings::Class::fallbackObject): - (KJS::Bindings::Instance::getValueOfUndefinedField): - (KJS::Bindings::Instance::setValueOfUndefinedField): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - (RuntimeObjectImp::put): - (RuntimeObjectImp::canPut): - (RuntimeObjectImp::hasProperty): - * bindings/testbindings.mm: - (-[MyFirstInterface valueForUndefinedKey:]): - (-[MyFirstInterface setValue:forUndefinedKey:]): - -2004-08-10 Darin Adler - - Reviewed by Dave. - - - switch PCRE to do UTF-16 directly instead of converting to/from UTF-8 for speed - - * pcre/pcre.h: Added PCRE_UTF16 switch, set to 1. Added pcre_char typedef, which is char - or uint16_t depending on the mode, and used appropriate in the 7 public functions - that need to use it. - * pcre/pcre.c: Add UTF-16 support to all functions. - * pcre/study.c: Ditto. - - * pcre/internal.h: Added ichar typedef, which is unsigned char or uint16_t depending on - the mode. Changed declarations to use symbolic constants and typedefs so we size - things to ichar when needed. - - * pcre/maketables.c: (pcre_maketables): Change code to make tables that are - sized to 16-bit characters instead of 8-bit. - - * pcre/get.c: - (pcre_copy_substring): Use pcre_char instead of char. - (pcre_get_substring_list): Ditto. - (pcre_free_substring_list): Ditto. - (pcre_get_substring): Ditto. - (pcre_free_substring): Ditto. - - * pcre/dftables.c: (main): Used a bit more const, and use ICHAR sizes instead - of hard-coding 8-bit table sizes. - - * pcre/chartables.c: Regenerated. - - * kjs/ustring.h: Remove functions that convert UTF-16 to/from UTF-8 offsets. - * kjs/ustring.cpp: Change the shared empty string to have a unicode pointer that - is not null. The null string still has a null pointer. This prevents us from - passing a null through to the regular expression engine (which results in a null - error even when the string length is 0). - - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): Null-terminate the pattern and pass it. - (KJS::RegExp::match): Use the 16-bit string directly, no need to convert to UTF-8. - -2004-08-09 Darin Adler - - Reviewed by Maciej. - - - fixed 28 Mozilla JavaScript tests - - * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Check for undefined rather than - checking the number of arguments for the join method. - - * kjs/lexer.cpp: (Lexer::lex): Parse hexadecimal and octal constants in doubles rather - than integers, so we aren't limited to 32 bits. - - * kjs/math_object.cpp: (MathFuncImp::call): Get rid of many unneeded special cases in - the implementation of the pow operation. Also simplied a case that was handling positive - and negative infinity separately. - - * kjs/nodes.cpp: (ShiftNode::evaluate): Keep the result of shifts in a double instead of - putting them in a long, so that unsigned shift will work properly. - - * kjs/number_object.cpp: Add the DontDelete and ReadOnly flags to the numeric constants. - - * kjs/operations.cpp: - (KJS::isPosInf): Added an implementation inside APPLE_CHANGES that does not depend on the - sign of isinf; our isinf function returns +1 even for negative infinity. - (KJS::isNegInf): And again. - (KJS::relation): Put in a nice simple implementation of comparison inside APPLE_CHANGES. - Our floating point already handles the various infinity cases correctly. - - * kjs/regexp_object.cpp: - (RegExpProtoFuncImp::call): Add missing return before Null() in Exec method. - (RegExpObjectImp::arrayOfMatches): Put undefined rather than an empty string into the - array in cases where we did not match. - (RegExpObjectImp::construct): Set the DontDelete, ReadOnly, and DontEnum flags for - "global", "ignoreCase", "multiline", and "source". - - * kjs/string_object.cpp: (StringProtoFuncImp::call): For the match method, turn a null - string into undefined rather than an empty string. For the slice method, handle an - undefined parameter for the limit properly as decribed in the specification, and add - the limit to one case that didn't have the limit at all. For the methods that generate - HTML strings, use lowercase tags instead of uppercase. - - * kjs/ustring.cpp: - (KJS::UChar::toLower): Use u_tolower from the ICU library. - (KJS::UChar::toUpper): Use u_toupper from the ICU library. - (KJS::UString::append): Fix some math that caused a buffer overflow. - (KJS::convertUTF16OffsetsToUTF8Offsets): Ignore negative numbers (-1 is used as a special - flag) rather than converting them all to 0. - (KJS::convertUTF8OffsetsToUTF16Offsets): Ditto. - - * tests/mozilla/jsDriver.pl: Fixed the relative links to point to our actual test files. - - * tests/mozilla/ecma/String/15.5.4.11-1.js: Fixed the Unicode table in this test to match - the Unicode specification in a few cases where it was wrong before. - * tests/mozilla/ecma/String/15.5.4.11-2.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.11-3.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.11-5.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.11-6.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.12-1.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.12-2.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.12-3.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.12-4.js: Ditto. - * tests/mozilla/ecma/String/15.5.4.12-5.js: Ditto. - - * JavaScriptCore.pbproj/project.pbxproj: Link to libicu. - - * kjs/number_object.lut.h: Regenerated. - -2004-08-09 Darin Adler - - Reviewed by Maciej. - - - fixed REGRESSION (137-138): reproducible buffer overrun in UString manipulation code - - * kjs/ustring.cpp: (KJS::UString::append): Fix incorrect size computation. Without it - we get a buffer overflow. - -=== Safari-155 === - -2004-08-05 Richard Williamson - - Fixed part of 3674747. The QT guys need this for feature freeze. - - This patch implements support for the - - - (id)invokeUndefinedMethodFromWebScript:(NSString *)name withArguments:(NSArray *)args - - method of objects bound to JavaScript. - - Reviewed by John. - - * ChangeLog: - * bindings/objc/objc_class.mm: - (ObjcClass::methodsNamed): - (ObjcClass::fieldNamed): - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - * bindings/objc/objc_runtime.h: - (KJS::Bindings::ObjcMethod::~ObjcMethod): - (KJS::Bindings::ObjcMethod::isFallbackMethod): - (KJS::Bindings::ObjcMethod::javaScriptName): - * bindings/objc/objc_runtime.mm: - (ObjcMethod::ObjcMethod): - (ObjcMethod::getMethodSignature): - (ObjcMethod::setJavaScriptName): - * bindings/testbindings.mm: - -2004-08-04 Vicki Murley - - Reviewed by mjs. - - - fix SAP WebGUI has problems loading first page because of parse error - - * kjs/lexer.cpp: - (Lexer::lex): if the current character is a '\' and the next character is a line terminator, - go to the next line and continue parsing the string (instead of failing). This matches - behavior in Mac IE and Mozilla. - -2004-08-03 Kevin Decker - - Reviewed by Darin. - - Rolled in changes from the latest KJS sources that support additional - Number.prototype functions. - - Specifically this patch covers the follow parts of the ECMA 3 spec: - 15.7.4.5, 15.7.4.6, and 15.7.4.7 - - Fixes: - missing Number.toFixed (and toPrecision, toExponential) - missing Number.toPrecision prototype implementation - missing Number.toExponential prototype implementation - - * kjs/identifier.h: Added toFixed, toPrecision, and toExponential to the - list of supported identifiers (a macro). - * kjs/number_object.cpp: Implemented support for toFixed(), toPrecision(), - and toExponential(). - (NumberPrototypeImp::NumberPrototypeImp): - (NumberProtoFuncImp::call): - * kjs/number_object.h: Added property names for toFixed, toPrecision, - and toExponential. - (KJS::NumberProtoFuncImp::): - * tests/mozilla/expected.html: Update results. - -2004-08-03 Darin Adler - - Reviewed by Ken. - - - added support for copying RegExp objects so 7 more Mozilla regexp tests pass - - * kjs/regexp_object.cpp: (RegExpObjectImp::construct): Check for case where - we are supposed to just copy the regular expression object, and do so. - Also tighten up arguments check to handle case where an actual "undefined" - is passed rather than just omitting an argument. - - * tests/mozilla/expected.html: Update results. - -2004-08-02 Darin Adler - - * tests/mozilla/.cvsignore: Added. - * tests/mozilla/expected.html: Update results. - -2004-08-02 Darin Adler - - Reviewed by Ken. - - - fixed RegExp.toString so 3 more Mozilla regexp tests pass - - * kjs/regexp_object.cpp: (RegExpProtoFuncImp::call): - Append the flags here so more tests paseed. - -2004-08-02 Darin Adler - - Reviewed by Ken. - - - fixed a couple things making 5 Mozilla regexp tests pass - - * kjs/regexp_object.cpp: (RegExpProtoFuncImp::call): Implement toString - for the prototype. - (RegExpObjectImp::construct): Fix bug where the string "undefined" would - be used as the flags string when no parameter was passed. - - * kjs/regexp_object.h: (KJS::RegExpPrototypeImp::classInfo): - Added a class info object for RegExp prototype so it can return - a string instead of raising an exception when converting to a string. - - * tests/mozilla/expected.html: Update results. - -2004-08-02 Darin Adler - - Reviewed by Kevin. - - - fix crashes in mozilla tests due to mishandling NaN - - * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Rerranged range checks after - calls to toInteger so that NaN will get turned into something that fits in an integer. - These were the ones John already fixed, but his fix used isnan and the new fix is - more efficient. - - * kjs/number_object.cpp: (NumberProtoFuncImp::call): Rearranged radix range checks - after a call to toInteger to handle NaN properly. Also removed separate check - for undefined that's not needed. - - * kjs/string_object.cpp: (StringProtoFuncImp::call): More of the same kinds of changes - as in the above two files, but for a lot more functions. Also changed one place with - an explicit check for undefined to instead just check isNaN. - - * tests/mozilla/run-mozilla-tests: Changed to invoke jst using $SYMROOTS for people - like me who don't keep $SYMROOTS in their $PATH. - -=== Safari-154 === - -=== Safari-153 === - -2004-07-26 Kevin Decker - - Changes done by Darin, reviewed by Kevin. - - - changed testkjs to build in Xcode rather than from Makefile - - * .cvsignore: Removed obsolete files from this list. - * Makefile.am: Removed code to build testkjs; we do this in Xcode now. - Changed to build target "All" rather than default target. This makes us - build the testkjs test tool. - * dummy.cpp: Removed. - * kjs/.cvsignore: Removed obsolete files from this list, including - the testkjs tool, which is now built in the symroots directory. - * kjs/testkjs.cpp: Added copyright notice that was missing, since we have - changed this file. Also this has the nice side effect of causing the tool - to be rebuilt in the new location even if there are no other changes in - your tree when you check this out. - * tests/mozilla/run-mozilla-tests: Invoke perl explicitly so this works - without setting the execute bit on jsDriver.pl. - -2004-07-22 Kevin Decker - - Reviewed by Darin - - Fixed (error console does not include source urls or line numbers of event exceptions). - - * kjs/function_object.cpp: - (FunctionObjectImp::construct): - * kjs/function_object.h: - * kjs/object.cpp: - (KJS::ObjectImp::construct): - * kjs/object.h: - (KJS::Object::construct): - -2004-07-21 Darin Adler - - * bindings/npruntime.h: Fixed typo. - -2004-07-19 John Sullivan - - Reviewed by Maciej. - - - bulletproofed array.slice() against NAN arguments. Harri noticed this - vulnerability in my patch for 3714644 - - * kjs/array_object.cpp: - (ArrayProtoFuncImp::call): - handle NAN parameters passed to slice() by clamping to 0 and length. - -2004-07-19 Richard Williamson - - Fixed 3733349. Prevent Java applet callbacks into JavaScript after applet - has been destroyed. - - Reviewed by John. - - * bindings/jni/jni_jsobject.cpp: - (JSObject::invoke): - (JSObject::JSObject): - -2004-07-16 John Sullivan - - Reviewed by Maciej. - - - fixed REGRESSION (125.8-146): bugzilla submit link - hangs browser with javascript - - * kjs/array_object.cpp: - (ArrayProtoFuncImp::call): - Check for undefined type for args[0] the same way we were already checking - for args[1]. In this case, args was zero-length, but we were treating - args[0] like an integer anyway. Resulted in some code looping from a NAN - value to 4, taking approximately forever. - - * JavaScriptCore.pbproj/project.pbxproj: - version wars - -=== Safari-152 === - -2004-07-14 Maciej Stachowiak - - Reviewed by John. - - : (REGRESSION (125-146): JavaScript 'toString(16)' is broken) - : (REGRESSION (125-140u): secondary list doesn't fill in at Southwest.com) - - * kjs/number_object.cpp: - (NumberProtoFuncImp::call): Initialize radix from dradix, not from itself! - -2004-07-13 Kevin Decker - - Reviewed by kocienda. - - - made testkjs and JavaScriptCore a subtarget of 'All' - - testkjs now builds in $SYMROOTS - - * JavaScriptCore.pbproj/project.pbxproj: - -=== Safari-151 === - -2004-06-24 Chris Blumenberg - - Ignore .mode1 files in JavaScriptCore.pbproj - - Reviewed by kocienda. - - * JavaScriptCore.pbproj/.cvsignore: - -2004-06-23 Richard Williamson - - Implemented changes for latest npruntime.h. - - Reviewed by Chris. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/NP_jsobject.cpp: - (listFromVariantArgs): - (identiferFromNPIdentifier): - (_NPN_CreateScriptObject): - (NPN_Call): - (NPN_Evaluate): - (NPN_GetProperty): - (NPN_SetProperty): - (NPN_RemoveProperty): - * bindings/NP_jsobject.h: - * bindings/c/c_class.cpp: - (CClass::methodsNamed): - (CClass::fieldNamed): - * bindings/c/c_instance.cpp: - (CInstance::invokeMethod): - * bindings/c/c_utility.cpp: - (convertNPVariantToValue): - * bindings/c/c_utility.h: - * bindings/npruntime.cpp: - (stringIdentifierEqual): - (stringIdentifierHash): - (getStringIdentifierDictionary): - (intIdentifierEqual): - (intIdentifierHash): - (getIntIdentifierDictionary): - (NPN_GetStringIdentifier): - (NPN_GetStringIdentifiers): - (NPN_GetIntIdentifier): - (NPN_IdentifierIsString): - (NPN_UTF8FromIdentifier): - (NPN_VariantToInt32): - (NPN_VariantToDouble): - (NPN_SetException): - * bindings/npruntime.h: - * bindings/objc/WebScriptObject.mm: - (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::~RuntimeObjectImp): - * bindings/runtime_root.cpp: - (KJS::Bindings::rootForInterpreter): - * bindings/testbindings.cpp: - (initializeIdentifiers): - (logMessage): - (setDoubleValue): - (setIntValue): - (setBooleanValue): - -=== JavaScriptCore-146.1 === - -2004-06-16 Richard Williamson - - Fixed Crash returning nil from bound ObjC - - This turned out to be a show stopper for Dashboard. Accessing a nil - ObjC property from JS caused a crash. Similar to the problem - 3696112 fixed below. - - Reviewed by Trey. - - * bindings/objc/objc_runtime.mm: - (KJS::Bindings::ObjcField::valueFromInstance): - -=== Safari-146 === - -2004-06-16 Richard Williamson - - Fixed : nil from an Objective-C class seems to get wrapped as a JavaScript proxy that will not print. - - This turned out to be a show stopper for Dashboard. We now - return Undefined() when nil is returned from a ObjC method - that returns an object type. - - Reviewed by Maciej. - - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertObjcValueToValue): - -=== Safari-145 === - -2004-06-15 Richard Williamson - - Fixed : Objective-C instances that are exported to JavaScript are too promiscuous - - No longer need to check respondsToSelector: for - isSelectorExcludedFromWebScript: and isKeyExcludedFromWebScript: - because these now have a default implementation on NSObject. - - Reviewed by Trey. - - * bindings/objc/objc_class.mm: - (ObjcClass::methodsNamed): - (ObjcClass::fieldNamed): - -2004-06-14 Darin Adler - - Reviewed by Maciej. - - - fixed some things for GC that Patrick missed, or that happened after the branch - - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject dealloc]): Moved removeNativeReference call here from private object. - (-[WebScriptObject finalize]): Added. - - - added some missing nil checks - - * bindings/objc/objc_instance.mm: - (ObjcInstance::ObjcInstance): Check for nil. - (ObjcInstance::~ObjcInstance): Check for nil. - (ObjcInstance::operator=): Check for nil. - -2004-06-14 Darin Adler - - Reviewed by me, code changes by Patrick Beard. - - - fixed : (WebKit should adopt GC changes and compile with GC enabled) - - * bindings/objc/objc_instance.mm: - (ObjcInstance::ObjcInstance): Use CFRetain instead of retain. - (ObjcInstance::~ObjcInstance): Use CFRelease instead of release. - (ObjcInstance::operator=): More of the same. - (ObjcInstance::end): Use [pool drain] if compiling on Tiger. - - * bindings/objc/objc_runtime.mm: - (ObjcArray::ObjcArray): Use CFRetain instead of retain. - (ObjcArray::~ObjcArray): Use CFRelease instead of release. - (ObjcArray::operator=): More of the same. - - * bindings/testbindings.mm: Fixed incorrect license. - (main): Use [pool drain] if compiling on Tiger. - -=== Safari-144 === - -2004-06-10 Kevin Decker - - Reviewed by John. - - * kjs/lexer.cpp: - (Lexer::setCode): - - fixed : (error console line numbers are offset by 1) - * kjs/lexer.h: - (KJS::Lexer::lineNo): - - fixed : (error console line numbers are offset by 1) - -=== JavaScriptCore-143.2 === - -2004-06-07 Darin Adler - - - fixed : (JavaScriptGlue no longer compiles because Interpreter::evaluate parameters changed) - - * kjs/interpreter.h: Added an overload to make JavaScriptGlue compile. - * kjs/interpreter.cpp: (KJS::Interpreter::evaluate): Implemented the overload. - -=== JavaScriptCore-143.1 === - -2004-06-04 Kevin Decker - - Reviewed by Darin - - - fixed - - * kjs/object.cpp: - (KJS::Error::create): - -=== Safari-143 === - -2004-06-04 Darin Adler - - * kjs/testkjs.cpp: (main): Fix build breakage by adding URL and line number parameters. - -2004-06-04 Kevin Decker - - Reviewed by Dave. - - - ObjC bindings do not (yet) pass along sourceurl or line numbers - - we don't have a way as of yet to accomidate line numbers and urls for dynamic javascript - - changed the wording of an error message - - the lexer, parser, and interpreter have been made "sourceURL aware" - - stored the url into Error - - * bindings/NP_jsobject.cpp: - (NPN_Evaluate): - * bindings/jni/jni_jsobject.cpp: - (JSObject::eval): - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject evaluateWebScript:]): - * kjs/function.cpp: - (GlobalFuncImp::call): - * kjs/function_object.cpp: - (FunctionObjectImp::construct): - * kjs/internal.cpp: - (Parser::parse): - (InterpreterImp::checkSyntax): - (InterpreterImp::evaluate): - * kjs/internal.h: - * kjs/interpreter.cpp: - (Interpreter::evaluate): - * kjs/interpreter.h: - * kjs/lexer.cpp: - (Lexer::setCode): - * kjs/lexer.h: - (KJS::Lexer::sourceURL): - * kjs/nodes.cpp: - (Node::Node): - (Node::throwError): - (FunctionCallNode::evaluate): - * kjs/nodes.h: - * kjs/object.cpp: - (KJS::Error::create): - * kjs/object.h: - -2004-06-04 Richard Williamson - - Fixed crash when attempting to access properties on nil - object. - - Reviewed by John. - - * bindings/objc/objc_instance.mm: - (ObjcInstance::getClass): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - * bindings/testM.js: - * bindings/testbindings.mm: - (-[MyFirstInterface getString]): - -2004-05-27 Kevin Decker - - Reviewed by Ken. - - -revised generated error message content - - * kjs/error_object.cpp: - (ErrorProtoFuncImp::call): - * kjs/internal.cpp: - (Parser::parse): - * kjs/object.cpp: - (KJS::Error::create): - -=== Safari-142 === - -2004-05-27 Richard Williamson - - Renamed WebScriptMethods to WebScripting based on feedback from Nancy. - - Reviewed by Chris. - - * bindings/objc/WebScriptObject.h: - -2004-05-27 Darin Adler - - Reviewed by Maciej. - - - moved to new symlink technique for embedding frameworks - - * JavaScriptCore.pbproj/project.pbxproj: Get rid of embed-frameworks build step - because we don't need it any more. - -2004-05-24 Richard Williamson - - Changed RuntimeArrayImp to inherit from ArrayInstanceImp and - fixed ClassInfo to correctly reflect inheritance. This is required - because of the runtime checks in JSC for arrays, i.e. in - the Function objects apply method. - - Reviewed by Ken. - - * bindings/jni/jni_runtime.cpp: - (JavaArray::convertJObjectToArray): - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertObjcValueToValue): - * bindings/runtime_array.cpp: - (RuntimeArrayImp::RuntimeArrayImp): - * bindings/runtime_array.h: - * bindings/testM.js: Added. - * bindings/testbindings.mm: - (+[MyFirstInterface webScriptNameForSelector:]): - (-[MyFirstInterface logMessages:]): - (-[MyFirstInterface logMessage:prefix:]): - (-[MyFirstInterface callJSObject::]): - -2004-05-22 Darin Adler - - Reviewed by Maciej. - - - fixed : (JS needs to listen to timezone change notifications) - - * kjs/date_object.cpp: (CopyLocalTimeZone): As per Chris Kane and Jordan Hubbard, use - with a hardcoded string of "com.apple.system.timezone", and do CFTimeZoneResetSystem since - CoreFoundation doesn't do this itself. Turns out this affects the default time zone as long as - it hasn't been set explicitly. - -=== Safari-141 === - -2004-05-20 Richard Williamson - - Implemented WebScriptObject/DOM wrapper voodoo. DOM wrappers - can now be referenced like any other WebScriptObject, meaning - you can do JS operations on them. - - All added implementation of finalizeForWebScript. - - Reviewed by Ken. - - * bindings/objc/WebScriptObject.h: - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject _initializeWithObjectImp:KJS::root:Bindings::]): - (-[WebScriptObject _initWithObjectImp:KJS::root:Bindings::]): - (-[WebScriptObject KJS::]): - (-[WebScriptObject dealloc]): - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (-[WebScriptObject evaluateWebScript:]): - (-[WebScriptObject setValue:forKey:]): - (-[WebScriptObject valueForKey:]): - (-[WebScriptObject stringRepresentation]): - * bindings/objc/WebScriptObjectPrivate.h: - * bindings/objc/objc_instance.mm: - (ObjcInstance::~ObjcInstance): - -2004-05-19 Richard Williamson - - Removed extraneous tabs that were added (by XCode?). - - * bindings/objc/WebScriptObject.h: - -2004-05-19 Darin Adler - - - fixed headers with licenses mangled by Xcode auto-indenting - - * bindings/jni/jni_jsobject.cpp: - * bindings/jni/jni_jsobject.h: - * bindings/runtime_array.h: - * bindings/runtime_root.cpp: - * bindings/runtime_root.h: - -2004-05-18 Richard Williamson - - Added exception logging. Also check for exception and - set results as appropriate. - - Reviewed by Maciej (partially reviewed). - - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (-[WebScriptObject evaluateWebScript:]): - (-[WebScriptObject setValue:forKey:]): - (-[WebScriptObject valueForKey:]): - -2004-05-18 Richard Williamson - - Finsished implementing support for windowScriptObject. - Had to make WebScriptObjectPrivate.h accessible from - WebCore. - - Reviewed by Maciej. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/objc/WebScriptObjectPrivate.h: - -2004-05-18 Richard Williamson - - Use KVC to set/get values instead of directly accessing - ivars. - - Reviewed by Maciej. - - * bindings/objc/WebScriptObject.mm: - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]): - * bindings/objc/objc_runtime.mm: - (ObjcField::valueFromInstance): - (convertValueToObjcObject): - (ObjcField::setValueToInstance): - -2004-05-17 Richard Williamson - - Implemented new API for WebScriptObject. - - Fixed : (objc to javascript method calls do not cause updates.) - Fixed : (Update to JSC to refer to new JSObject LiveConnect object) (w/ help from Vicki) - - Reviewed by Hyatt. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/c/c_instance.cpp: - (CInstance::invokeMethod): - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_jsobject.cpp: - (JSObject::convertValueToJObject): - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::getJNIField): - * bindings/objc/WebScriptObject.mm: - (_didExecute): - (-[WebScriptObject _initWithObjectImp:KJS::root:Bindings::]): - (-[WebScriptObject KJS::]): - (-[WebScriptObject dealloc]): - (+[WebScriptObject throwException:]): - (listFromNSArray): - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (-[WebScriptObject evaluateWebScript:]): - (-[WebScriptObject setValue:forKey:]): - (-[WebScriptObject valueForKey:]): - (-[WebScriptObject stringRepresentation]): - (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]): - (+[WebUndefined undefined]): - (-[WebUndefined initWithCoder:]): - (-[WebUndefined encodeWithCoder:]): - (-[WebUndefined copyWithZone:]): - (-[WebUndefined retain]): - (-[WebUndefined release]): - (-[WebUndefined retainCount]): - (-[WebUndefined autorelease]): - (-[WebUndefined dealloc]): - (-[WebUndefined copy]): - (-[WebUndefined replacementObjectForPortCoder:]): - * bindings/objc/WebScriptObjectPrivate.h: Added. - * bindings/objc/objc_class.mm: - (ObjcClass::methodsNamed): - (ObjcClass::fieldNamed): - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - * bindings/objc/objc_jsobject.h: - * bindings/objc/objc_jsobject.mm: - * bindings/objc/objc_runtime.mm: - (ObjcField::valueFromInstance): - * bindings/objc/objc_utility.mm: - (KJS::Bindings::JSMethodNameToObjCMethodName): - (KJS::Bindings::convertValueToObjcValue): - (KJS::Bindings::convertObjcValueToValue): - * bindings/runtime.cpp: - (Instance::setDidExecuteFunction): - (Instance::didExecuteFunction): - (Instance::setValueOfField): - * bindings/runtime.h: - * bindings/testbindings.mm: - (+[MyFirstInterface webScriptNameForSelector:]): - (-[MyFirstInterface callJSObject::]): - -2004-05-14 Vicki Murley - - Reviewed by mjs. - - : framework marketing number should be 2.0 for DoubleBarrel release - - * JavaScriptCore.pbproj/project.pbxproj: change CFBundleShortVersionString to 2.0 - -=== Safari-140 === - -2004-05-13 Richard Williamson - - Fixed indentation. - - Reviewed by Chris. - - * ChangeLog: - * bindings/objc/WebScriptObject.h: - -2004-05-13 Richard Williamson - - Approved API changes. Currently unimplemented. - - Reviewed by Chris. - - * ChangeLog: - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/objc/WebScriptObject.h: Added. - * bindings/objc/WebScriptObject.mm: Added. - (+[WebScriptObject throwException:]): - (-[WebScriptObject callWebScriptMethod:withArguments:]): - (-[WebScriptObject evaluateWebScript:]): - (-[WebScriptObject stringRepresentation]): - (+[WebUndefined undefined]): - (-[WebUndefined initWithCoder:]): - (-[WebUndefined encodeWithCoder:]): - (-[WebUndefined copyWithZone:]): - -2004-05-07 Vicki Murley - - Reviewed by darin. - - Turn off GC since it uses ppc only instructions (which breaks - the B&I build). - - * kjs/value.h: set USE_CONSERVATIVE_GC to 0 - -=== Safari-139 === - -2004-05-07 Maciej Stachowiak - - Reviewed by Darin. - - - add -funroll-loops=16 compiler option for approx .5% speedup on - HTML iBench and .5-1% speedup on JS iBench. - - * JavaScriptCore.pbproj/project.pbxproj: - -2004-04-25 Maciej Stachowiak - - Reviewed by Darin. - - Enable full conservative GC mode in addition to test mode. When - conservative GC is enabled, we now get an 11% speed improvement on - the iBench. Also fix some spots I missed before. - - Specific noteworth changes: - - * kjs/collector.cpp: - (KJS::Collector::markStackObjectsConservatively): Check possible - cell pointers for 8-byte aligment and verify they are not 0. - - * kjs/protected_values.cpp: - (KJS::ProtectedValues::increaseProtectCount): Move null-tolerance from here... - (KJS::ProtectedValues::decreaseProtectCount): ...and here... - * kjs/protect.h: - (KJS::gcProtectNullTolerant): ...to here... - (KJS::gcUnprotectNullTolerant): ...and here, because not all callers need the null - tolerance, and doing the check is expensive. - - * kjs/protected_values.cpp: - (KJS::ProtectedValues::computeHash): Replace hash function with a much faster one - that is still very good. - - * kjs/protect.h: - (KJS::gcProtect): - (KJS::gcUnprotect): - (KJS::ProtectedValue::ProtectedValue): - (KJS::ProtectedValue::~ProtectedValue): - (KJS::ProtectedValue::operator=): - (KJS::ProtectedObject::ProtectedObject): - (KJS::ProtectedObject::~ProtectedObject): - (KJS::ProtectedObject::operator=): - (KJS::ProtectedReference::ProtectedReference): - (KJS::ProtectedReference::~ProtectedReference): - (KJS::ProtectedReference::operator=): - * kjs/protected_values.cpp: - (KJS::ProtectedValues::getProtectCount): - (KJS::ProtectedValues::increaseProtectCount): - (KJS::ProtectedValues::decreaseProtectCount): - (KJS::ProtectedValues::computeHash): - * bindings/runtime_root.cpp: - (KJS::Bindings::addNativeReference): - (KJS::Bindings::removeNativeReference): - (RootObject::removeAllNativeReferences): - * bindings/runtime_root.h: - (KJS::Bindings::RootObject::~RootObject): - (KJS::Bindings::RootObject::setRootObjectImp): - * kjs/collector.cpp: - (KJS::Collector::allocate): - (KJS::Collector::collect): - * kjs/collector.h: - * kjs/internal.cpp: - (NumberImp::create): - (InterpreterImp::globalInit): - (InterpreterImp::globalClear): - (InterpreterImp::mark): - * kjs/list.cpp: - (KJS::List::derefValues): - (KJS::List::refValues): - (KJS::List::append): - * kjs/object.cpp: - (KJS::ObjectImp::setInternalValue): - (KJS::ObjectImp::putDirect): - * kjs/value.cpp: - (ValueImp::mark): - (ValueImp::marked): - * kjs/value.h: - (KJS::ValueImp::ValueImp): - (KJS::ValueImp::~ValueImp): - (KJS::ValueImp::): - (KJS::Value::Value): - (KJS::Value::~Value): - (KJS::Value::operator=): - -2004-04-30 Richard Williamson - - Asking an NSInvocation for it's return value when return type - is void throws an exception. Added check for void return types - to avoid this exception. - - Reviewed by Ken. - - * bindings/objc/objc_instance.mm: - (ObjcInstance::invokeMethod): - -2004-04-29 Richard Williamson - - Fixed several bad problems with the ObjC bindings. In particular, conversion - to/from JavaScriptObject (soon to be WebScriptObject) was completely broken. - - Reviewed by Chris. - - * bindings/objc/objc_jsobject.h: - * bindings/objc/objc_jsobject.mm: - (-[JavaScriptObject initWithObjectImp:KJS::root:Bindings::]): - (-[JavaScriptObject KJS::]): - (+[JavaScriptObject _convertValueToObjcValue:KJS::root:Bindings::]): - (-[JavaScriptObject call:arguments:]): - (-[JavaScriptObject evaluate:]): - (-[JavaScriptObject getMember:]): - (-[JavaScriptObject getSlot:]): - * bindings/objc/objc_runtime.mm: - (ObjcField::valueFromInstance): - (ObjcField::setValueToInstance): - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - (KJS::Bindings::convertObjcValueToValue): - * bindings/runtime.h: - * bindings/runtime_root.cpp: - (KJS::Bindings::rootForInterpreter): - (KJS::Bindings::addNativeReference): - (KJS::Bindings::removeNativeReference): - * bindings/runtime_root.h: - * bindings/testbindings.mm: - (-[MyFirstInterface logMessage:]): - (-[MyFirstInterface setJSObject:]): - (-[MyFirstInterface callJSObject::]): - -2004-04-24 Darin Adler - - Reviewed by Dave. - - * kjs/ustring.cpp: (KJS::UString::append): Fix one case that was allocating a buffer - that is 2x too big. - -2004-04-23 Maciej Stachowiak - - Reviewed by Darin. - - Implementation of conservative GC, based partly on code from - Darin. It's turned off for now, so it shouldn't have any effect on - the normal build. - - * JavaScriptCore.pbproj/project.pbxproj: - * kjs/collector.cpp: - (KJS::Collector::markStackObjectsConservatively): - (KJS::Collector::markProtectedObjects): - (KJS::Collector::collect): - * kjs/collector.h: - * kjs/protect.h: - (KJS::gcProtect): - (KJS::gcUnprotect): - * kjs/protected_values.cpp: Added. - (KJS::ProtectedValues::getProtectCount): - (KJS::ProtectedValues::increaseProtectCount): - (KJS::ProtectedValues::insert): - (KJS::ProtectedValues::decreaseProtectCount): - (KJS::ProtectedValues::expand): - (KJS::ProtectedValues::shrink): - (KJS::ProtectedValues::rehash): - (KJS::ProtectedValues::computeHash): - * kjs/protected_values.h: Added. - * kjs/value.cpp: - (ValueImp::useConservativeMark): - (ValueImp::mark): - (ValueImp::marked): - * kjs/value.h: - (KJS::ValueImp::): - -=== Safari-138 === - -2004-04-22 Richard Williamson - - Fixed build snafu (re-declaration of NPBool in npruntime.h and - npapi.h). - - * bindings/npruntime.h: - -2004-04-22 Richard Williamson - - Updated plugin binding API to reflect latest revision from - working group. - - Biggest change is the introduction of NPVariant used to represent - value types. NPVariant replaces the use of NPObject for the - exchange of values between scripting environment and native code. - - Reviewed by John. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/NP_jsobject.cpp: - (identiferFromNPIdentifier): - (NPN_Call): - (NPN_Evaluate): - (NPN_GetProperty): - (NPN_SetProperty): - (NPN_ToString): - (NPN_GetPropertyAtIndex): - (NPN_SetPropertyAtIndex): - * bindings/c/c_class.cpp: - (CClass::methodsNamed): - (CClass::fieldNamed): - * bindings/c/c_instance.cpp: - (CInstance::invokeMethod): - (CInstance::defaultValue): - * bindings/c/c_runtime.cpp: - (CField::valueFromInstance): - (CField::setValueToInstance): - * bindings/c/c_utility.cpp: - (convertNPStringToUTF16): - (convertUTF8ToUTF16): - (coerceValueToNPVariantStringType): - (convertValueToNPVariant): - (convertNPVariantToValue): - * bindings/c/c_utility.h: - * bindings/npruntime.cpp: - (NPN_GetIdentifier): - (NPN_GetIdentifiers): - (NPN_UTF8FromIdentifier): - (NPN_VariantIsVoid): - (NPN_VariantIsNull): - (NPN_VariantIsUndefined): - (NPN_VariantIsBool): - (NPN_VariantIsInt32): - (NPN_VariantIsDouble): - (NPN_VariantIsString): - (NPN_VariantIsObject): - (NPN_VariantToBool): - (NPN_VariantToString): - (NPN_VariantToInt32): - (NPN_VariantToDouble): - (NPN_VariantToObject): - (NPN_InitializeVariantAsVoid): - (NPN_InitializeVariantAsNull): - (NPN_InitializeVariantAsUndefined): - (NPN_InitializeVariantWithBool): - (NPN_InitializeVariantWithInt32): - (NPN_InitializeVariantWithDouble): - (NPN_InitializeVariantWithString): - (NPN_InitializeVariantWithStringCopy): - (NPN_InitializeVariantWithObject): - (NPN_InitializeVariantWithVariant): - (NPN_ReleaseVariantValue): - (NPN_CreateObject): - (NPN_RetainObject): - (NPN_ReleaseObject): - (NPN_IsKindOfClass): - (NPN_SetExceptionWithUTF8): - (NPN_SetException): - * bindings/npruntime.h: - (_NPString::): - (_NPString::_NPVariant::): - * bindings/testbindings.cpp: - (logMessage): - (setDoubleValue): - (setIntValue): - (setStringValue): - (setBooleanValue): - (getDoubleValue): - (getIntValue): - (getStringValue): - (getBooleanValue): - (myGetProperty): - (mySetProperty): - (myInvoke): - (myAllocate): - -2004-04-22 Darin Adler - - Reviewed by Maciej. - - - fixed : "REGRESSION (125-137): memory trasher in UString::append, causing many different crashes" - - * kjs/ustring.cpp: - (KJS::UString::expandCapacity): Fix sizeof(UChar *) that should be sizeof(UChar). - Was resulting in a buffer 2x the needed size. - (KJS::UString::expandPreCapacity): Ditto. - (KJS::UString::append): Fix malloc that is missing a sizeof(UChar). - -2004-04-21 Maciej Stachowiak - - Reviewed by Darin. - - Preliminary change for conservative GC. Create "protected" - subclasses to GC-protect objects when on heap, since we will soon - remove the built-in refcounting of the normal wrapper classes. Use - them where needed. - - * JavaScriptCore.pbproj/project.pbxproj: - * kjs/context.h: - * kjs/internal.h: - (KJS::InterpreterImp::globalObject): - * kjs/interpreter.h: - * kjs/property_map.cpp: - * kjs/reference.h: - * kjs/reference_list.cpp: - -2004-04-19 Maciej Stachowiak - - Reviewed by Dave. - - Optimize prepend using the shared substring optimization. Also, - limit the applicability of shared append and shared prepend. If - you overdo it, it does more harm than good, because you create a - bunch of strings that are disqualified from future shared - append/prepend, for not much immediate savings in allocate/copy - expense. - - * kjs/ustring.cpp: - (KJS::): - (KJS::UString::Rep::create): - (KJS::UString::expandedSize): - (KJS::UString::usedPreCapacity): - (KJS::UString::expandCapacity): - (KJS::UString::expandPreCapacity): - (KJS::UString::UString): - (KJS::UString::append): - (KJS::UString::operator=): - * kjs/ustring.h: - (KJS::UString::Rep::data): - -2004-04-16 Maciej Stachowiak - Reviewed by Richard. - - No more need for Completion or Reference to privately inherit from - Value, none of the superclass functionality is used. - - * kjs/completion.h: - * kjs/reference.h: - -=== Safari-137 === - -2004-04-16 Richard Williamson - - Added interpreter lock protection around object creation. - - Reviewed by Chris. - - * bindings/runtime.cpp: - (Instance::createRuntimeObject): - -2004-04-16 Maciej Stachowiak - - Reviewed by Ken. - - Another JavaScript speed improvement: use the mechanism from - string append optimization to make taking a substring fast, again - sharing the buffer. - - A further 22% improvement on the 24fun string speed test. - - * kjs/ustring.cpp: - (KJS::): - (KJS::UString::Rep::create): - (KJS::UString::UString): - (KJS::UString::append): - (KJS::UString::operator=): - (KJS::UString::substr): - * kjs/ustring.h: - (KJS::UString::Rep::data): - -2004-04-13 Maciej Stachowiak - - Reviewed by Darin. - - - fixed : String manipulation in JavaScript 24fun test is very slow (slow) - - fixed : Table generation test is really slow - - fixed : 24fun date test is really slow - - 80% speedup on the string test, lesser speedups on the other two. - - Two different optimizations here: - - 1) Avoid large overhead of scanning strings to see if they are all - ASCII before numeric conversion. - - * kjs/nodes.cpp: - (AssignNode::evaluate): Don't convert to integer until we know for - sure the operation will need it. Attempting to convert strings to - numbers is a waste when they are being appended with +=. - - 2) Avoid huge cost of appending strings. - - This is done by allowing multiple strings to share a buffer but - actually use different ranges of it. The first time a string is - appended to, we start leaving at least 10% extra space in the - buffer, so doing N appends to the same string takes O(log N) - mallocs instead of O(N). - - * kjs/identifier.cpp: - (KJS::Identifier::equal): - (KJS::Identifier::add): - * kjs/ustring.cpp: - (KJS::): - (KJS::UCharReference::operator=): - (KJS::UCharReference::ref): - (KJS::UString::Rep::create): - (KJS::UString::Rep::destroy): - (KJS::UString::expandedSize): - (KJS::UString::usedCapacity): - (KJS::UString::expandCapacity): - (KJS::UString::UString): - (KJS::UString::null): - (KJS::UString::append): - (KJS::UString::operator=): - (KJS::UString::toStrictUInt32): - (KJS::UString::detach): - (KJS::KJS::operator==): - * kjs/ustring.h: - (KJS::UString::Rep::data): - (KJS::UString::Rep::hash): - -2004-04-09 Maciej Stachowiak - - Reviewed by John. - - - fix deployment build by avoiding deployment-only warning. - - * kjs/scope_chain.cpp: - (KJS::ScopeChain::bottom): - -2004-04-09 Maciej Stachowiak - - Reviewed by John. - - Changed things so that newly created objects get a prototype based - on the scope chain of the current function, rather than the - interpreter that started execution. This fixes the following bugs: - - : ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com) - : ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly) - - * JavaScriptCore.pbproj/project.pbxproj: - * kjs/array_object.cpp: - (CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments): - (ArrayProtoFuncImp::ArrayProtoFuncImp): - (ArrayProtoFuncImp::call): - (ArrayObjectImp::construct): - * kjs/bool_object.cpp: - (BooleanObjectImp::construct): - * kjs/date_object.cpp: - (DateProtoFuncImp::DateProtoFuncImp): - (DateProtoFuncImp::call): - (DateObjectImp::construct): - * kjs/error_object.cpp: - (ErrorObjectImp::construct): - * kjs/function.cpp: - (FunctionImp::FunctionImp): - (FunctionImp::call): - (DeclaredFunctionImp::construct): - (ArgumentsImp::ArgumentsImp): - (GlobalFuncImp::call): - * kjs/function_object.cpp: - (FunctionProtoFuncImp::call): - (FunctionObjectImp::construct): - * kjs/internal.cpp: - (BooleanImp::toObject): - (StringImp::toObject): - (NumberImp::toObject): - (InterpreterImp::InterpreterImp): - (InterpreterImp::clear): - (InterpreterImp::interpreterWithGlobalObject): - * kjs/internal.h: - * kjs/interpreter.cpp: - (ExecState::lexicalInterpreter): - * kjs/interpreter.h: - (KJS::ExecState::dynamicInterpreter): - (KJS::ExecState::interpreter): - * kjs/math_object.cpp: - (MathFuncImp::MathFuncImp): - * kjs/nodes.cpp: - (StatementNode::hitStatement): - (StatementNode::abortStatement): - (RegExpNode::evaluate): - (ElementNode::evaluate): - (ArrayNode::evaluate): - (ObjectLiteralNode::evaluate): - (PropertyValueNode::evaluate): - (FunctionCallNode::evaluate): - (FuncDeclNode::processFuncDecl): - (FuncExprNode::evaluate): - * kjs/number_object.cpp: - (NumberObjectImp::construct): - * kjs/object.cpp: - (KJS::ObjectImp::defaultValue): - (KJS::Error::create): - * kjs/object_object.cpp: - (ObjectObjectImp::construct): - * kjs/reference.cpp: - (Reference::putValue): - * kjs/regexp_object.cpp: - (RegExpProtoFuncImp::call): - (RegExpObjectImp::arrayOfMatches): - (RegExpObjectImp::construct): - * kjs/scope_chain.cpp: - (KJS::ScopeChain::bottom): - * kjs/scope_chain.h: - * kjs/string_object.cpp: - (StringProtoFuncImp::StringProtoFuncImp): - (StringProtoFuncImp::call): - (StringObjectImp::construct): - -=== Safari-136 === - -=== Safari-135 === - -2004-03-31 Richard Williamson - - Tedious renames based on feedback from plugin-futures list. - NP_ functions are renamed with NPN_ prefix. - Types prefix renamed from NP_ to NP. - NPN_CreateStringWithUTF8 and NPN_SetExceptionWithUTF8 now take a length, optionally -1 if string is null terminated. - - No review because this was just a renaming patch. - - * bindings/NP_jsobject.cpp: - (listFromNPArray): - (jsAllocate): - (identiferFromNPIdentifier): - (NPN_Call): - (NPN_Evaluate): - (NPN_GetProperty): - (NPN_SetProperty): - (NPN_RemoveProperty): - (NPN_ToString): - (NPN_GetPropertyAtIndex): - (NPN_SetPropertyAtIndex): - * bindings/NP_jsobject.h: - * bindings/c/c_class.cpp: - (CClass::_commonInit): - (CClass::classForIsA): - (CClass::CClass): - (CClass::methodsNamed): - (CClass::fieldNamed): - * bindings/c/c_class.h: - * bindings/c/c_instance.cpp: - (CInstance::CInstance): - (CInstance::~CInstance): - (CInstance::operator=): - (CInstance::invokeMethod): - (CInstance::defaultValue): - * bindings/c/c_instance.h: - (KJS::Bindings::CInstance::getObject): - * bindings/c/c_runtime.cpp: - (CField::valueFromInstance): - (CField::setValueToInstance): - * bindings/c/c_runtime.h: - (KJS::Bindings::CField::CField): - (KJS::Bindings::CField::name): - (KJS::Bindings::CMethod::CMethod): - (KJS::Bindings::CMethod::name): - * bindings/c/c_utility.cpp: - (coerceValueToNPString): - (convertValueToNPValueType): - (convertNPValueTypeToValue): - * bindings/c/c_utility.h: - * bindings/npruntime.cpp: - (NPN_IdentifierFromUTF8): - (NPN_IsValidIdentifier): - (NPN_GetIdentifiers): - (NPN_UTF8FromIdentifier): - (NPN_CreateObject): - (NPN_RetainObject): - (NPN_ReleaseObject): - (NPN_IsKindOfClass): - (NPN_SetExceptionWithUTF8): - (NPN_SetException): - (numberAllocate): - (NPN_CreateNumberWithInt): - (NPN_CreateNumberWithFloat): - (NPN_CreateNumberWithDouble): - (NPN_IntFromNumber): - (NPN_FloatFromNumber): - (NPN_DoubleFromNumber): - (stringAllocate): - (NPN_CreateStringWithUTF8): - (NPN_CreateStringWithUTF16): - (NPN_DeallocateUTF8): - (NPN_UTF8FromString): - (NPN_UTF16FromString): - (NPN_StringLength): - (booleanAllocate): - (NPN_CreateBoolean): - (NPN_BoolFromBoolean): - (nullAllocate): - (NPN_GetNull): - (undefinedAllocate): - (NPN_GetUndefined): - (arrayAllocate): - (arrayDeallocate): - (NPN_CreateArray): - (NPN_CreateArrayV): - (NPN_ObjectAtIndex): - * bindings/npruntime.h: - * bindings/runtime.cpp: - (Instance::createBindingForLanguageInstance): - * bindings/testbindings.cpp: - (initializeIdentifiers): - (myHasProperty): - (myHasMethod): - (myGetProperty): - (mySetProperty): - (logMessage): - (setDoubleValue): - (setIntValue): - (setStringValue): - (setBooleanValue): - (getDoubleValue): - (getIntValue): - (getStringValue): - (getBooleanValue): - (myInvoke): - (myAllocate): - (myInvalidate): - (myDeallocate): - (main): - -2004-03-31 Richard Williamson - - Changed references to NP_runtime.h to npruntime.h - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/NP_jsobject.h: - * bindings/c/c_class.h: - * bindings/c/c_instance.h: - * bindings/c/c_runtime.h: - * bindings/c/c_utility.h: - * bindings/npruntime.cpp: - -2004-03-31 Richard Williamson - - Renamed NP_runtime.h to npruntime.h to match Netscape SDK. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/NP_jsobject.h: - * bindings/npruntime.cpp: - -=== Safari-134 === - -2004-03-23 Richard Williamson - - Added implementation of KJS::Value <-> NP_Object conversion functions. - Augmented test program for 'C' bindings. - Added asserts and parameter checking to all public API. - - Reviewed by Ken. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/NP_jsobject.cpp: - (NP_ToString): - * bindings/NP_jsobject.h: Added. - * bindings/NP_runtime.cpp: - (NP_IdentifierFromUTF8): - (NP_IsValidIdentifier): - (NP_GetIdentifiers): - (NP_CreateObject): - (NP_RetainObject): - (NP_ReleaseObject): - (NP_IsKindOfClass): - (NP_SetExceptionWithUTF8): - (NP_SetException): - (NP_IntFromNumber): - (NP_FloatFromNumber): - (NP_DoubleFromNumber): - (NP_CreateStringWithUTF8): - (NP_CreateStringWithUTF16): - (NP_DeallocateUTF8): - (NP_UTF8FromString): - (NP_UTF16FromString): - (NP_StringLength): - (NP_BoolFromBoolean): - * bindings/NP_runtime.h: - * bindings/c/c_instance.cpp: - (CInstance::invokeMethod): - * bindings/c/c_utility.cpp: - (coerceValueToNPString): - (convertValueToNPValueType): - (convertNPValueTypeToValue): - * bindings/c/c_utility.h: - * bindings/test.js: - * bindings/testC.js: Added. - * bindings/testbindings.cpp: - (logMessage): - (setDoubleValue): - (setIntValue): - (setStringValue): - (setBooleanValue): - (getDoubleValue): - (getIntValue): - (getStringValue): - (getBooleanValue): - (myInterfaceInvoke): - (myInterfaceAllocate): - -=== Safari-133 === - -2004-03-19 Darin Adler - - Reviewed by Ken. - - - fixed problem with methods like setUTCHour - - * kjs/date_object.cpp: (DateProtoFuncImp::call): Fix conversion back to time_t to use the appropriate - GMT vs. local time function based on the utc flag. - -2004-03-17 Richard Williamson - - Added a context parameter to result callbacks use by JavaScriptObject functions. This was a change requested by Eric Carlson on the QT plugin team. - - Reviewed by Ken. - - * bindings/NP_jsobject.cpp: - (NP_Call): - (NP_Evaluate): - (NP_GetProperty): - (NP_ToString): - (NP_GetPropertyAtIndex): - * bindings/NP_runtime.h: - -2004-03-16 Richard Williamson - - Fixed 3590169. Regression (crash) caused by the switch to MethodLists. Crash when attempting to invoke a method from JavaScript to Java that is not implemented. - - Reviewed by John. - - * bindings/jni/jni_class.cpp: - (JavaClass::methodsNamed): - -2004-03-15 Richard Williamson - - Fixed 3570854. Don't attempt to convert Null to strings. We - were incorrectly converting to "Null". - - Actually fixed by Scott Kovatch. - - Reviewed by Richard. - - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::convertValueToJValue): - -=== Safari-132 === - -2004-03-11 Richard Williamson - - Stitched together the NP stuff to our language independent - JavaScript binding stuff. Very close to being done. - - Added program to test C bindings (and NP stuff). Just tests - properties. Will add methods and JavaScript access, etc. - - Updated Makefile.am to account for new bindings/c directory. - - Change NP_UTF8 from "const char *" to "char" to allow for - declarations like "const NP_UTF8 *" and "NP_UTF8 *". Ditto - for NP_UTF16. - - Added NP_IsValidIdentifier(). - - Reviewed by Chris. - - * JavaScriptCore.pbproj/project.pbxproj: - * Makefile.am: - * bindings/NP_jsobject.cpp: - (identiferFromNPIdentifier): - (NP_Evaluate): - * bindings/NP_runtime.cpp: - (NP_IdentifierFromUTF8): - (NP_IsValidIdentifier): - (NP_GetIdentifiers): - (NP_UTF8FromIdentifier): - (NP_SetExceptionWithUTF8): - (NP_SetException): - (NP_CreateStringWithUTF8): - (NP_CreateStringWithUTF16): - (NP_UTF8FromString): - (NP_UTF16FromString): - * bindings/NP_runtime.h: - * bindings/c/c_class.cpp: Added. - (CClass::_commonDelete): - (CClass::_commonCopy): - (CClass::_commonInit): - (_createClassesByIsAIfNecessary): - (CClass::classForIsA): - (CClass::CClass): - (CClass::name): - (CClass::methodsNamed): - (CClass::fieldNamed): - * bindings/c/c_class.h: Added. - (KJS::Bindings::CClass::~CClass): - (KJS::Bindings::CClass::CClass): - (KJS::Bindings::CClass::operator=): - (KJS::Bindings::CClass::constructorAt): - (KJS::Bindings::CClass::numConstructors): - * bindings/c/c_instance.cpp: Added. - (CInstance::CInstance): - (CInstance::~CInstance): - (CInstance::operator=): - (CInstance::getClass): - (CInstance::begin): - (CInstance::end): - (CInstance::invokeMethod): - (CInstance::defaultValue): - (CInstance::stringValue): - (CInstance::numberValue): - (CInstance::booleanValue): - (CInstance::valueOf): - * bindings/c/c_instance.h: Added. - (KJS::Bindings::CInstance::getObject): - * bindings/c/c_runtime.cpp: Added. - (CField::valueFromInstance): - (CField::setValueToInstance): - * bindings/c/c_runtime.h: Added. - (KJS::Bindings::CField::CField): - (KJS::Bindings::CField::name): - (KJS::Bindings::CField::type): - (KJS::Bindings::CMethod::CMethod): - (KJS::Bindings::CMethod::name): - (KJS::Bindings::CMethod::numParameters): - * bindings/c/c_utility.cpp: Added. - (coerceValueToNPValueType): - (convertValueToNPValueType): - (convertNPValueTypeToValue): - * bindings/c/c_utility.h: Added. - * bindings/make_testbindings: - * bindings/runtime.cpp: - (Instance::createBindingForLanguageInstance): - * bindings/runtime.h: - (KJS::Bindings::Instance::): - * bindings/testbindings.cpp: Added. - (initializeIdentifiers): - (myInterfaceHasProperty): - (myInterfaceHasMethod): - (myInterfaceGetProperty): - (myInterfaceSetProperty): - (myInterfaceInvoke): - (myInterfaceAllocate): - (myInterfaceInvalidate): - (myInterfaceDeallocate): - (GlobalImp::className): - (readJavaScriptFromFile): - (main): - -2004-03-10 Richard Williamson - - Made changes to support new asychronous approach to calls from - plugin to JavaScript - - Reviewed by Chris. - - * bindings/NP_jsobject.cpp: - (NP_Call): - (NP_Evaluate): - (NP_GetProperty): - (NP_ToString): - (NP_GetPropertyAtIndex): - * bindings/NP_runtime.h: - * bindings/make_testbindings: - * bindings/runtime.cpp: - (Instance::createBindingForLanguageInstance): - -2004-03-10 Richard Williamson - - Updated header to include proposed changes from - plugin-futures list. Calls from plugin to JavaScript - are now asynchronous. - - Reviewed by Chris. - - * bindings/NP_runtime.h: - -=== Safari-131 === - -2004-03-04 Richard Williamson - - Implementation of NP_JavaScriptObject. This is the 'C' class - that wraps a JavaScript object. - - Reviewed by Chris. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/NP_jsobject.cpp: Added. - (coerceValueToNPValueType): - (convertValueToNPValueType): - (convertNPValueTypeToValue): - (listFromNPArray): - (jsAllocate): - (jsDeallocate): - (identiferFromNPIdentifier): - (NP_Call): - (NP_Evaluate): - (NP_GetProperty): - (NP_SetProperty): - (NP_RemoveProperty): - (NP_ToString): - (NP_GetPropertyAtIndex): - (NP_SetPropertyAtIndex): - * bindings/NP_runtime.cpp: - (NP_ObjectAtIndex): - * bindings/NP_runtime.h: - * bindings/runtime_object.h: - -2004-03-04 Richard Williamson - - Added NP_Array implementation. - - Changed NP_Boolean to just depend on two static instances, no - space is required for values. - - Reviewed by Chris. - - * bindings/NP_runtime.cpp: - (NP_CreateBoolean): - (NP_BoolFromBoolean): - (arrayAllocate): - (arrayDeallocate): - (NP_CreateArray): - (NP_CreateArrayV): - (NP_ObjectAtIndex): - * bindings/NP_runtime.h: - -2004-03-03 Darin Adler - - Reviewed by Vicki. - - * English.lproj/InfoPlist.strings: Removed. No need to localize the version and - copyright string, and that's all that was in here. - * JavaScriptCore.pbproj/project.pbxproj: Removed InfoPlist.strings from build. - -2004-03-03 Richard Williamson - - More 'C' binding implementation. Fleshed out all the - 'primitive' data types. - - Reviewed by Chris. - - * bindings/NP_runtime.cpp: - (NP_ReleaseObject): - (numberAllocate): - (stringAllocate): - (stringDeallocate): - (NP_CreateStringWithUTF8): - (NP_CreateStringWithUTF16): - (NP_UTF8FromString): - (NP_UTF16FromString): - (NP_StringLength): - (booleanAllocate): - (booleanDeallocate): - (NP_CreateBoolean): - (NP_BoolFromBoolean): - (nullAllocate): - (nullDeallocate): - (NP_GetNull): - (undefinedAllocate): - (undefinedDeallocate): - (NP_GetUndefined): - * bindings/NP_runtime.h: - -2004-03-03 Richard Williamson - - More 'C' binding implementation. - - Reviewed by Chris. - - * bindings/NP_runtime.cpp: - (identifierEqual): - (identifierHash): - (getIdentifierDictionary): - (NP_IdentifierFromUTF8): - (NP_UTF8FromIdentifier): - (NP_CreateObject): - (NP_ReleaseObject): - (NP_IsKindOfClass): - (numberCreate): - (NP_CreateNumberWithInt): - (NP_CreateNumberWithFloat): - (NP_CreateNumberWithDouble): - (NP_IntFromNumber): - (NP_FloatFromNumber): - (NP_DoubleFromNumber): - * bindings/NP_runtime.h: - -2004-03-02 Richard Williamson - - Removed retain/release from NP_Class. Classes will not be allowed to implement their - own customer retain/release scheme. - - Reviewed by Chris. - - * bindings/NP_runtime.cpp: - (NP_RetainObject): - (NP_ReleaseObject): - * bindings/NP_runtime.h: - -2004-03-02 Richard Williamson - - C binding API. Partial implementation. - - Completed ObjectiveC bindings (not based on the C API). These will re-implemented over the C binding API, but I wanted to get this code in the tree. - - Factored root object reference counting scheme. It is now useful independent - of LiveConnect. - - Reviewed by Chris. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/NP_runtime.cpp: Added. - (NP_IdentifierFromUTF8): - (NP_GetIdentifiers): - (NP_UTF8FromIdentifier): - (NP_CreateObject): - (NP_RetainObject): - (NP_ReleaseObject): - (NP_IsKindOfClass): - (NP_SetException): - (NP_Call): - (NP_Evaluate): - (NP_GetProperty): - (NP_SetProperty): - (NP_RemoveProperty): - (NP_ToString): - (NP_GetPropertyAtIndex): - (NP_SetPropertyAtIndex): - (NP_CreateNumberWithInt): - (NP_CreateNumberWithFloat): - (NP_CreateNumberWithDouble): - (NP_IntFromNumber): - (NP_FloatFromNumber): - (NP_DoubleFromNumber): - (NP_CreateStringWithUTF8): - (NP_CreateStringWithUTF16): - (NP_UTF8FromString): - (NP_UTF16FromString): - (NP_CreateBoolean): - (NP_BoolFromBoolean): - (NP_GetNull): - (NP_GetUndefined): - (NP_CreateArray): - (NP_CreateArrayV): - (NP_ObjectAtIndex): - * bindings/NP_runtime.h: Added. - * bindings/jni/jni_jsobject.cpp: - (JSObject::invoke): - (JSObject::finalize): - (JSObject::createNative): - (JSObject::convertValueToJObject): - * bindings/jni/jni_jsobject.h: - * bindings/objc/objc_jsobject.h: - * bindings/objc/objc_jsobject.mm: - (rootForView): - (windowJavaScriptObject): - (-[JavaScriptObject initWithObjectImp:KJS::root:Bindings::]): - (-[JavaScriptObject dealloc]): - (-[JavaScriptObject _convertValueToObjcValue:KJS::]): - (-[JavaScriptObject call:arguments:]): - (-[JavaScriptObject evaluate:]): - (-[JavaScriptObject getMember:]): - (-[JavaScriptObject setMember:value:]): - (-[JavaScriptObject removeMember:]): - (-[JavaScriptObject toString]): - (-[JavaScriptObject getSlot:]): - (-[JavaScriptObject setSlot:value:]): - * bindings/objc/objc_utility.h: - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - * bindings/runtime_root.cpp: Added. - (getReferencesByRootDictionary): - (getReferencesDictionary): - (KJS::Bindings::findReferenceDictionary): - (KJS::Bindings::rootForImp): - (KJS::Bindings::addNativeReference): - (KJS::Bindings::removeNativeReference): - (completedJavaScriptAccess): - (initializeJavaScriptAccessLock): - (lockJavaScriptAccess): - (unlockJavaScriptAccess): - (RootObject::dispatchToJavaScriptThread): - (performJavaScriptAccess): - (RootObject::setFindRootObjectForNativeHandleFunction): - (RootObject::removeAllNativeReferences): - * bindings/runtime_root.h: Added. - (KJS::Bindings::RootObject::RootObject): - (KJS::Bindings::RootObject::~RootObject): - (KJS::Bindings::RootObject::setRootObjectImp): - (KJS::Bindings::RootObject::rootObjectImp): - (KJS::Bindings::RootObject::setInterpreter): - (KJS::Bindings::RootObject::interpreter): - (KJS::Bindings::RootObject::findRootObjectForNativeHandleFunction): - (KJS::Bindings::RootObject::runLoop): - (KJS::Bindings::RootObject::performJavaScriptSource): - -=== Safari-130 === - -=== Safari-129 === - -2004-02-18 Richard Williamson - - Added NSNumber/Number conversion. - - Removed some unnecessary KJS:: namespace specifiers. - - Reviewed by Ken. - - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - (KJS::Bindings::convertObjcValueToValue): - * bindings/runtime_array.h: - -2004-02-18 Richard Williamson - - Added support for export NSArrays. - - Updated valueAt() to take an ExecState so we can throw - JS exceptions. - - Implemented excludeSelectorFromJavaScript: in ObjcClass. This allows - ObjectiveC classes to control the visibility of their methods in - JavaScript. - - Reviewed by Ken. - - * bindings/jni/jni_runtime.cpp: - (JavaField::valueFromInstance): - (JavaArray::valueAt): - * bindings/jni/jni_runtime.h: - * bindings/objc/objc_class.mm: - (ObjcClass::methodsNamed): - * bindings/objc/objc_runtime.h: - (KJS::Bindings::ObjcArray::getObjcArray): - * bindings/objc/objc_runtime.mm: - (ObjcField::valueFromInstance): - (ObjcField::setValueToInstance): - (ObjcArray::ObjcArray): - (ObjcArray::~ObjcArray): - (ObjcArray::operator=): - (ObjcArray::setValueAt): - (ObjcArray::valueAt): - (ObjcArray::getLength): - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - (KJS::Bindings::convertObjcValueToValue): - * bindings/runtime.cpp: - (Instance::getValueOfField): - * bindings/runtime.h: - * bindings/runtime_array.cpp: - (RuntimeArrayImp::get): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - -2004-02-17 Richard Williamson - - Added String <-> NSString conversion. - Added tests of String <-> NSString conversion to test program. - - Reviewed by Chris. - - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - (KJS::Bindings::convertObjcValueToValue): - * bindings/test.js: - * bindings/testbindings.mm: - (-[MyFirstInterface getString]): - -2004-02-15 Darin Adler - - Reviewed by Dave. - - * JavaScriptCore.pbproj/project.pbxproj: Tweak build styles a bit, fixing OptimizedWithSymbols, - and removing redundant settings of things that match defaults in other build styles. - -2004-02-13 Richard Williamson - - Work towards the JavaScript ObjC bindings. The bindings now work for - simple scalar types. testbindings.mm is an illustration of how the - bindings work. - - Reviewed by Ken. - - * JavaScriptCore.pbproj/project.pbxproj: - * Makefile.am: - * bindings/jni/jni_class.cpp: - (JavaClass::methodsNamed): - * bindings/jni/jni_class.h: - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_instance.h: - * bindings/jni/jni_runtime.h: - (KJS::Bindings::JavaMethod::returnType): - * bindings/make_testbindings: Added. - * bindings/objc/objc_class.h: Added. - (KJS::Bindings::ObjcClass::~ObjcClass): - (KJS::Bindings::ObjcClass::ObjcClass): - (KJS::Bindings::ObjcClass::operator=): - (KJS::Bindings::ObjcClass::constructorAt): - (KJS::Bindings::ObjcClass::numConstructors): - * bindings/objc/objc_class.mm: Added. - (ObjcClass::_commonDelete): - (ObjcClass::_commonCopy): - (ObjcClass::_commonInit): - (_createClassesByIsAIfNecessary): - (ObjcClass::classForIsA): - (ObjcClass::ObjcClass): - (ObjcClass::name): - (ObjcClass::methodsNamed): - (ObjcClass::fieldNamed): - * bindings/objc/objc_header.h: Added. - * bindings/objc/objc_instance.h: Added. - (KJS::Bindings::ObjcInstance::getObject): - * bindings/objc/objc_instance.mm: Added. - (ObjcInstance::ObjcInstance): - (ObjcInstance::~ObjcInstance): - (ObjcInstance::operator=): - (ObjcInstance::begin): - (ObjcInstance::end): - (ObjcInstance::getClass): - (ObjcInstance::invokeMethod): - (ObjcInstance::defaultValue): - (ObjcInstance::stringValue): - (ObjcInstance::numberValue): - (ObjcInstance::booleanValue): - (ObjcInstance::valueOf): - * bindings/objc/objc_jsobject.h: Added. - * bindings/objc/objc_jsobject.mm: Added. - * bindings/objc/objc_runtime.h: - (KJS::Bindings::ObjcField::~ObjcField): - (KJS::Bindings::ObjcField::ObjcField): - (KJS::Bindings::ObjcField::operator=): - (KJS::Bindings::ObjcMethod::ObjcMethod): - (KJS::Bindings::ObjcMethod::~ObjcMethod): - (KJS::Bindings::ObjcMethod::operator=): - * bindings/objc/objc_runtime.mm: Added. - (ObjcMethod::ObjcMethod): - (ObjcMethod::name): - (ObjcMethod::numParameters): - (ObjcMethod::getMethodSignature): - (ObjcField::ObjcField): - (ObjcField::name): - (ObjcField::type): - (ObjcField::valueFromInstance): - (ObjcField::setValueToInstance): - * bindings/objc/objc_utility.h: Added. - (KJS::Bindings::): - * bindings/objc/objc_utility.mm: Added. - (KJS::Bindings::JSMethodNameToObjCMethodName): - (KJS::Bindings::convertValueToObjcValue): - (KJS::Bindings::convertObjcValueToValue): - (KJS::Bindings::objcValueTypeForType): - * bindings/runtime.cpp: - (MethodList::MethodList): - (MethodList::operator=): - (Instance::setValueOfField): - (Instance::createBindingForLanguageInstance): - (Instance::createRuntimeObject): - * bindings/runtime.h: - * bindings/runtime_method.cpp: - (RuntimeMethodImp::RuntimeMethodImp): - (RuntimeMethodImp::get): - (RuntimeMethodImp::call): - * bindings/runtime_method.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - (RuntimeObjectImp::hasProperty): - * bindings/test.js: Added. - * bindings/testbindings.mm: Added. - (-[MySecondInterface init]): - (-[MyFirstInterface init]): - (-[MyFirstInterface dealloc]): - (+[MyFirstInterface JavaScriptNameForSelector:]): - (-[MyFirstInterface getInt]): - (-[MyFirstInterface setInt:]): - (-[MyFirstInterface getMySecondInterface]): - (-[MyFirstInterface logMessage:]): - (GlobalImp::className): - (readJavaScriptFromFile): - (main): - -=== Safari-128 === - -2004-02-08 Darin Adler - - Reviewed by Dave. - - - fixed things seen in the profile, for a total speedup of 4% on cvs-base (including changes across all projects) - - * JavaScriptCorePrefix.h: Add a workaround for a bug in our system headers that prevents the - macros from working right in C++ code that uses the header. - - * kjs/ustring.cpp: - (KJS::inlineUTF8SequenceLengthNonASCII): Added. - (KJS::UTF8SequenceLengthNonASCII): Added. - (KJS::inlineUTF8SequenceLength): Added. - (KJS::UTF8SequenceLength): Calls inlineUTF8SequenceLengthNonASCII now. - (KJS::decodeUTF8Sequence): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII. - (KJS::createSortedOffsetsArray): Add special case for 1, 2, and 3 offsets, so we don't do qsort for those. - (KJS::convertUTF16OffsetsToUTF8Offsets): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII. - (KJS::convertUTF8OffsetsToUTF16Offsets): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII. - - - fixed the test program so it won't hit the interpreter lock assertion - - * kjs/testkjs.cpp: (main): Just lock around the whole thing, since the test is singly threaded. - -=== Safari-127 === - -2004-02-06 Richard Williamson - - Fixed 3550242 and 3546977. The first diff prevents an assert from firing. The second diff prevents a JavaScript exception, caused be an invalid conversion, which has a downstream consequence of preventing a valid conversion. - - Reviewed by John. - - * bindings/jni/jni_jsobject.cpp: - (JSObject::toString): - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::convertValueToJValue): - -2004-02-02 Darin Adler - - Reviewed by Maciej. - - - fixed : array of negative size leads to crash (test page at oscar.the-rileys.net) - - * kjs/array_object.cpp: - (ArrayInstanceImp::ArrayInstanceImp): If the length is greater than 10,000, don't allocate an array until - we start putting values in. This prevents new Array(2147483647) from causing trouble. - (ArrayObjectImp::construct): Check number as described in specification, and raise a range error if the - number is out of range. This prevents new Array(-1) from causing trouble. - - - fixed : Math.round screws up on numbers bigger than 2^31 (incorrect results on HP-35 calculator page) - - * kjs/math_object.cpp: (MathFuncImp::call): Change implementation to be much simpler and not involve - casting to int. Results now match those in other browsers. - -2004-02-02 Darin Adler - - Reviewed by Maciej. - - - fixed : integer operations on large negative numbers yield bad results (discovered with "HTMLCrypt") - - fixed other related overflow issues - - * kjs/value.h: Changed return types of toInteger, toInt32, toUInt32, and toUInt16. - * kjs/value.cpp: - (ValueImp::toInteger): Change to return a double, since this operation, from the ECMA specification, - must not restrict values to the range of a particular integer type. - (ValueImp::toInt32): Used a sized integer type for the result of this function, and also added - proper handling for negative results from fmod. - (ValueImp::toUInt32): Ditto. - (ValueImp::toUInt16): Ditto. - (ValueImp::dispatchToUInt32): Changed result type from unsigned to uint32_t. - - * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Use a double instead of an int to handle - out-of-integer-range values better in the slice function. - * kjs/internal.cpp: (KJS::roundValue): Streamline the function, handling NAN and infinity properly. - * kjs/number_object.cpp: (NumberProtoFuncImp::call): Use a double instead of an int to handle - out-of-integer-range values better in the toString function. - * kjs/string_object.cpp: (StringProtoFuncImp::call): Use a double instead of an int to handle - out-of-integer-range values better in the charAt, charCodeAt, indexOf, lastIndexOf, slice, - and substr functions. - -=== Safari-126 === - -2004-01-30 Richard Williamson - - Fixed 3542044. Create KJS::String using UString constructor instead of passing UTF8 string to char* constructor. - - Reviewed by Darin. - - * bindings/jni/jni_instance.cpp: - (JavaInstance::stringValue): - -2004-01-26 Darin Adler - - * Makefile.am: Switch from pbxbuild to xcodebuild. - -2004-01-22 Richard Williamson - - Added stubs for ObjC language binding to JavaScript. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/jni/jni_runtime.h: - * bindings/objc/objc_runtime.h: Added. - (KJS::Bindings::ObjcParameter::ObjcParameter): - (KJS::Bindings::ObjcParameter::~ObjcParameter): - (KJS::Bindings::ObjcParameter::operator=): - (KJS::Bindings::ObjcParameter::type): - (KJS::Bindings::ObjcConstructor::ObjcConstructor): - (KJS::Bindings::ObjcConstructor::~ObjcConstructor): - (KJS::Bindings::ObjcConstructor::_commonCopy): - (KJS::Bindings::ObjcConstructor::operator=): - (KJS::Bindings::ObjcConstructor::value): - (KJS::Bindings::ObjcConstructor::parameterAt): - (KJS::Bindings::ObjcConstructor::numParameters): - (KJS::Bindings::ObjcField::ObjcField): - (KJS::Bindings::ObjcField::~ObjcField): - * bindings/runtime.h: - -2004-01-22 Richard Williamson - - Simplified JavaString by using UString as backing store. This - revealed a bug in CString's assignment operator which I fixed. - - Removed some dead code. - - Reviewed by John. - - * bindings/jni/jni_runtime.h: - (KJS::Bindings::JavaString::JavaString): - (KJS::Bindings::JavaString::_commonInit): - (KJS::Bindings::JavaString::UTF8String): - (KJS::Bindings::JavaString::uchars): - (KJS::Bindings::JavaString::length): - (KJS::Bindings::JavaString::ustring): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::RuntimeObjectImp): - * bindings/runtime_object.h: - * kjs/ustring.cpp: - (KJS::CString::CString): - (KJS::CString::operator=): - -=== Safari-125 === - -=== Safari-124 === - -2004-01-16 Richard Williamson - - Fixed 3525853. We weren't handling mapping to overloaded Java - methods very well. Even though this is undefined the other - browsers support it. Also fixed a bug with returning arrays - from Java functions. - - Reviewed by John. - - * bindings/jni/jni_class.cpp: - (JavaClass::_commonInit): - (JavaClass::methodsNamed): - * bindings/jni/jni_class.h: - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_instance.h: - * bindings/jni/jni_runtime.cpp: - (JavaArray::convertJObjectToArray): - (JavaField::valueFromInstance): - (JavaMethod::signature): - (JavaArray::valueAt): - * bindings/jni/jni_runtime.h: - * bindings/jni_jsobject.cpp: - (JSObject::call): - (JSObject::convertJObjectToValue): - * bindings/runtime.cpp: - (MethodList::addMethod): - (MethodList::length): - (MethodList::methodAt): - (MethodList::~MethodList): - * bindings/runtime.h: - (KJS::Bindings::MethodList::MethodList): - * bindings/runtime_method.cpp: - (RuntimeMethodImp::RuntimeMethodImp): - (RuntimeMethodImp::get): - (RuntimeMethodImp::call): - * bindings/runtime_method.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - (RuntimeObjectImp::hasProperty): - -2004-01-16 Richard Williamson - - Fixed 3531229. Another place that needs the Push/PopLocalFrame - protection implemented for 3530401. - - Reviewed by John. - - * bindings/runtime_method.cpp: - (RuntimeMethodImp::call): - -2004-01-15 Richard Williamson - - Fixed 3530401. JNI doesn't cleanup local refs created on the - main thread. IMO this is a bad bug in our JMI implementation. - - To work-around the problem I explicitly delete all local refs. - Further, I've added Push/PopLocalFrame calls to catch any refs - that I may have missed. This will guarantee that we don't leak - any Java references. - - Reviewed by John. - - * bindings/jni/jni_class.cpp: - (JavaClass::_commonInit): - (JavaClass::JavaClass): - * bindings/jni/jni_instance.cpp: - (JavaInstance::begin): - (JavaInstance::end): - * bindings/jni/jni_instance.h: - * bindings/jni/jni_runtime.cpp: - (JavaConstructor::JavaConstructor): - (JavaMethod::JavaMethod): - * bindings/jni_jsobject.cpp: - (JSObject::listFromJArray): - * bindings/runtime.h: - (KJS::Bindings::Instance::begin): - (KJS::Bindings::Instance::end): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - (RuntimeObjectImp::put): - (RuntimeObjectImp::canPut): - (RuntimeObjectImp::hasProperty): - (RuntimeObjectImp::defaultValue): - -2004-01-15 Vicki Murley - - Reviewed by Darin. - - * JavaScriptCore.pbproj/project.pbxproj: Update copyright date to 2004. - -2004-01-14 Richard Williamson - - Fixed 3529466. With recent changes to Java plugin we must no - longer call DeleteLocalRef(). Not a problem, it was an optimization anyway. - - Reviewed by John. - - * bindings/jni/jni_instance.cpp: - (JObjectWrapper::JObjectWrapper): - -=== Safari-122 === - -2004-01-14 Richard Williamson - - Fixed 3529010. - - Finalize may be called on an JSObject after we've already remove all our references. The assert in this case is firing because we've received a finalize call from Java for an instance that we no longer know about. The fix is to check in finalize that we're getting a call on an instance that we still care about. - - Reviewed by John. - - * bindings/jni_jsobject.cpp: - (addJavaReference): - (removeJavaReference): - (RootObject::removeAllJavaReferencesForRoot): - (JSObject::invoke): - -2004-01-13 Richard Williamson - - Fixed 3528324. - - The run loop that is used to execute JavaScript (in practice, always the main run loop) is held in a class variable. It is set and retained once and should not be released. Unfortunately is it being released when the 'root' object on a LiveConnect applet is released. This has the symptom of eventually causing an deallocation of the main run loop! Usually after about 5 instantiations/destructions of a LiveConnect applet. The CFRelease of the run loop was removed. - - Reviewed by Hyatt. - - * bindings/jni_jsobject.h: - (KJS::Bindings::RootObject::~RootObject): - -=== Safari-121 === - -=== Safari-120 === - -2004-01-06 Richard Williamson - - Fixed 3521814. Finalize messages weren't being dispatched! - - Reviewed by John. - - * bindings/jni_jsobject.cpp: - (JSObject::invoke): - -2004-01-05 Richard Williamson - - Added cache of JNI method IDs to minimize allocations. This mitigates the problem - described by 3515579. - - Also cleanup up logging of Java exceptions. - - Reviewed by John. - - * bindings/jni/jni_class.cpp: - (JavaClass::classForInstance): - * bindings/jni/jni_instance.cpp: - (JavaInstance::JavaInstance): - (JavaInstance::getClass): - (JavaInstance::invokeMethod): - (JObjectWrapper::JObjectWrapper): - (JObjectWrapper::~JObjectWrapper): - * bindings/jni/jni_instance.h: - (KJS::Bindings::JavaInstance::operator=): - * bindings/jni/jni_runtime.cpp: - (JavaMethod::JavaMethod): - (JavaMethod::methodID): - * bindings/jni/jni_runtime.h: - (KJS::Bindings::JavaMethod::JavaMethod): - * bindings/jni/jni_utility.cpp: - (callJNIMethod): - (callJNIMethodIDA): - (callJNIMethodA): - (KJS::Bindings::getMethodID): - (KJS::Bindings::callJNIVoidMethodIDA): - (KJS::Bindings::callJNIObjectMethodIDA): - (KJS::Bindings::callJNIByteMethodIDA): - (KJS::Bindings::callJNICharMethodIDA): - (KJS::Bindings::callJNIShortMethodIDA): - (KJS::Bindings::callJNIIntMethodIDA): - (KJS::Bindings::callJNILongMethodIDA): - (KJS::Bindings::callJNIFloatMethodIDA): - (KJS::Bindings::callJNIDoubleMethodIDA): - (KJS::Bindings::callJNIBooleanMethodIDA): - (KJS::Bindings::getCharactersFromJStringInEnv): - (KJS::Bindings::getUCharactersFromJStringInEnv): - (KJS::Bindings::getJNIField): - * bindings/jni/jni_utility.h: - -l2003-12-23 John Sullivan - - * JavaScriptCore.pbproj/project.pbxproj: - Xcode version wars, harmless - -2003-12-23 Darin Adler - - Reviewed by John (concept, not code, which is just the old code coming back). - - - fixed 3518092: REGRESSION (100-119): getting NaN instead of HH:MM times - - * kjs/date_object.cpp: Added back our CF-based implementations of gmtime, localtime, - mktime, timegm, and time, because mktime, at least, won't handle a year of 0. - -2003-12-19 Richard Williamson - - Fixed 3515597. When an error occurs we need - to make sure result values are zeroed. - - Cleaned up logs by adding a newline. - - Reviewed by John. - - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::getJavaVM): - (KJS::Bindings::getJNIEnv): - (callJNIMethod): - (callJNIMethodA): - (KJS::Bindings::getJNIField): - * bindings/jni_jsobject.cpp: - (JSObject::convertValueToJObject): - -=== Safari-119 === - -2003-12-17 Richard Williamson - - Ensure that all the symbols we export are in the KJS - namespace (3512245). - - Also renamed JavaString.characters() to JavaString.UTF8String() - for enhanced clarity. - - Added some sanity checking to constructor of JObjectWrapper. - - Reviewed by Dave. - - * ChangeLog: - * bindings/jni/jni_class.cpp: - * bindings/jni/jni_class.h: - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - (JObjectWrapper::JObjectWrapper): - * bindings/jni/jni_instance.h: - * bindings/jni/jni_runtime.cpp: - (JavaParameter::JavaParameter): - (JavaField::JavaField): - (JavaMethod::JavaMethod): - (JavaMethod::signature): - * bindings/jni/jni_runtime.h: - (KJS::Bindings::JavaString::ascii): - (KJS::Bindings::JavaString::UTF8String): - (KJS::Bindings::JavaString::JavaString): - (KJS::Bindings::JavaString::_commonInit): - (KJS::Bindings::JavaString::uchars): - (KJS::Bindings::JavaString::length): - (KJS::Bindings::JavaString::ustring): - (KJS::Bindings::JavaParameter::type): - (KJS::Bindings::JavaField::name): - (KJS::Bindings::JavaField::type): - (KJS::Bindings::JavaMethod::name): - (KJS::Bindings::JavaMethod::returnType): - * bindings/jni/jni_utility.cpp: - (KJS::Bindings::getJavaVM): - (KJS::Bindings::getJNIEnv): - (KJS::Bindings::callJNIVoidMethod): - (KJS::Bindings::callJNIObjectMethod): - (KJS::Bindings::callJNIBooleanMethod): - (KJS::Bindings::callJNIByteMethod): - (KJS::Bindings::callJNICharMethod): - (KJS::Bindings::callJNIShortMethod): - (KJS::Bindings::callJNIIntMethod): - (KJS::Bindings::callJNILongMethod): - (KJS::Bindings::callJNIFloatMethod): - (KJS::Bindings::callJNIDoubleMethod): - (KJS::Bindings::callJNIVoidMethodA): - (KJS::Bindings::callJNIObjectMethodA): - (KJS::Bindings::callJNIByteMethodA): - (KJS::Bindings::callJNICharMethodA): - (KJS::Bindings::callJNIShortMethodA): - (KJS::Bindings::callJNIIntMethodA): - (KJS::Bindings::callJNILongMethodA): - (KJS::Bindings::callJNIFloatMethodA): - (KJS::Bindings::callJNIDoubleMethodA): - (KJS::Bindings::callJNIBooleanMethodA): - (KJS::Bindings::getCharactersFromJString): - (KJS::Bindings::releaseCharactersForJString): - (KJS::Bindings::getCharactersFromJStringInEnv): - (KJS::Bindings::releaseCharactersForJStringInEnv): - (KJS::Bindings::getUCharactersFromJStringInEnv): - (KJS::Bindings::releaseUCharactersForJStringInEnv): - (KJS::Bindings::JNITypeFromClassName): - (KJS::Bindings::signatureFromPrimitiveType): - (KJS::Bindings::JNITypeFromPrimitiveType): - (KJS::Bindings::getJNIField): - (KJS::Bindings::convertValueToJValue): - * bindings/jni/jni_utility.h: - * bindings/jni_jsobject.cpp: - (KJS::Bindings::JSObject::invoke): - (KJS::Bindings::JSObject::JSObject): - (KJS::Bindings::JSObject::call): - (KJS::Bindings::JSObject::eval): - (KJS::Bindings::JSObject::getMember): - (KJS::Bindings::JSObject::setMember): - (KJS::Bindings::JSObject::removeMember): - (KJS::Bindings::JSObject::getSlot): - (KJS::Bindings::JSObject::setSlot): - (KJS::Bindings::JSObject::toString): - (KJS::Bindings::JSObject::finalize): - (KJS::Bindings::JSObject::createNative): - (KJS::Bindings::JSObject::convertValueToJObject): - (KJS::Bindings::JSObject::convertJObjectToValue): - (KJS::Bindings::JSObject::listFromJArray): - * bindings/jni_jsobject.h: - * bindings/runtime.cpp: - * bindings/runtime.h: - * bindings/runtime_method.cpp: - * bindings/runtime_method.h: - -=== Safari-118 === - -2003-12-16 Richard Williamson - - Ack! More assertions. Lock ALL entry points into the interpreter! - (3511733). - - Reviewed by Ken. - - * bindings/jni_jsobject.cpp: - (Bindings::JSObject::call): - (Bindings::JSObject::eval): - (Bindings::JSObject::getMember): - (Bindings::JSObject::setMember): - (Bindings::JSObject::removeMember): - (Bindings::JSObject::getSlot): - (Bindings::JSObject::setSlot): - (Bindings::JSObject::convertJObjectToValue): - -2003-12-15 Richard Williamson - - Fixed a couple of snafus and removed some logging. - - Reviewed by Maciej. - - * bindings/jni_jsobject.cpp: - (Bindings::performJavaScriptAccess): - (Bindings::completedJavaScriptAccess): - (Bindings::dispatchToJavaScriptThread): - Removed some annoying JS_LOG clutter. - - (Bindings::RootObject::removeAllJavaReferencesForRoot): - Fixed allocation of key buffer that was called after it was needed. - - (Bindings::JSObject::invoke): - (Bindings::JSObject::JSObject): - (Bindings::JSObject::getMember): - (Bindings::JSObject::getSlot): - Added additional interpreter locks around getMember and getSlot. - These functions may cause allocation of JS impls. - -2003-12-15 Richard Williamson - - args weren't passed to 'call' invocation. d'oh. - lock interpreter when we create instances of JS impls. - - Reviewed by Maciej. - - * bindings/jni_jsobject.cpp: - (Bindings::JSObject::call): - (Bindings::JSObject::eval): - (Bindings::JSObject::getMember): - (Bindings::JSObject::setMember): - (Bindings::JSObject::getSlot): - (Bindings::JSObject::convertValueToJObject): - (Bindings::JSObject::convertJObjectToValue): - (Bindings::JSObject::listFromJArray): - * bindings/jni_jsobject.h: - -2003-12-15 Richard Williamson - - Last piece of LiveConnect! This checkin adds implementation - of the Java to JavaScript object conversion functions. - - Reviewed by John. - - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_utility.cpp: - * bindings/jni/jni_utility.h: - * bindings/jni_jsobject.cpp: - (Bindings::JSObject::invoke): - (Bindings::JSObject::call): - (Bindings::JSObject::eval): - (Bindings::JSObject::getMember): - (Bindings::JSObject::setMember): - (Bindings::JSObject::getSlot): - (Bindings::JSObject::setSlot): - (Bindings::JSObject::createNative): - (Bindings::JSObject::convertValueToJObject): - (Bindings::JSObject::convertJObjectToValue): - (Bindings::JSObject::listFromJArray): - * bindings/jni_jsobject.h: - (Bindings::): - * bindings/runtime_method.cpp: - (RuntimeMethodImp::get): - (RuntimeMethodImp::codeType): - (RuntimeMethodImp::execute): - -2003-12-12 Richard Williamson - - Added implementation of stubs in JSObject. All that - remains is a couple of simple conversion functions stubs and - we're done with LiveConnect. Also, changed string passing to - JS to use uchars instead of chars. - - Reviewed by Maciej. - - * bindings/jni/jni_runtime.h: - (Bindings::JavaString::JavaString): - (Bindings::JavaString::_commonInit): - (Bindings::JavaString::_commonCopy): - (Bindings::JavaString::_commonDelete): - (Bindings::JavaString::~JavaString): - (Bindings::JavaString::operator=): - (Bindings::JavaString::uchars): - (Bindings::JavaString::length): - (Bindings::JavaString::ustring): - * bindings/jni/jni_utility.cpp: - (getUCharactersFromJStringInEnv): - (releaseUCharactersForJStringInEnv): - (convertValueToJObject): - (convertJObjectToValue): - * bindings/jni/jni_utility.h: - * bindings/jni_jsobject.cpp: - (Bindings::JSObject::invoke): - (Bindings::JSObject::call): - (Bindings::JSObject::eval): - (Bindings::JSObject::getMember): - (Bindings::JSObject::setMember): - (Bindings::JSObject::removeMember): - (Bindings::JSObject::getSlot): - (Bindings::JSObject::setSlot): - * bindings/jni_jsobject.h: - -2003-12-12 Richard Williamson - - Ensure that all calls from Java into JavaScript are - performed on a designated thread (the main thread). - - Reviewed by Ken. - - * bindings/jni_jsobject.cpp: - (isJavaScriptThread): - (rootForImp): - (Bindings::performJavaScriptAccess): - (Bindings::completedJavaScriptAccess): - (Bindings::initializeJavaScriptAccessLock): - (Bindings::lockJavaScriptAccess): - (Bindings::unlockJavaScriptAccess): - (Bindings::dispatchToJavaScriptThread): - (Bindings::RootObject::setFindRootObjectForNativeHandleFunction): - (Bindings::RootObject::removeAllJavaReferencesForRoot): - (Bindings::JSObject::invoke): - (Bindings::JSObject::JSObject): - (Bindings::JSObject::call): - (Bindings::JSObject::eval): - (Bindings::JSObject::getMember): - (Bindings::JSObject::setMember): - (Bindings::JSObject::removeMember): - (Bindings::JSObject::getSlot): - (Bindings::JSObject::setSlot): - (Bindings::JSObject::toString): - (Bindings::JSObject::finalize): - (Bindings::JSObject::getWindow): - * bindings/jni_jsobject.h: - (Bindings::RootObject::~RootObject): - (Bindings::RootObject::findRootObjectForNativeHandleFunction): - (Bindings::RootObject::runLoop): - (Bindings::RootObject::performJavaScriptSource): - (Bindings::): - -2003-12-11 Richard Williamson - - Added support for calling a JavaScript function from - Java. Right now this only works for void func(void) - functions, but the conversion of args and return values - will come shortly. - - Cleaned up and verified reference counting scheme, and - dereferencing of vended JavaScript objects when applet is - destroyed (actually when part is destroyed). - - Removed link hack for testkjs now that the Java folks think - they have a solution for the 1.4.2 JavaVM link problem. Although - Greg B. thinks his solution may cause problems for the 1.3.1 - version of the VM!?! - - Reviewed by Ken. - - * Makefile.am: - * bindings/jni/jni_runtime.h: - (Bindings::JavaString::JavaString): - * bindings/jni/jni_utility.cpp: - (convertValueToJValue): - (convertValueToJObject): - (listFromJArray): - * bindings/jni/jni_utility.h: - * bindings/jni_jsobject.cpp: - (KJS_setFindRootObjectForNativeHandleFunction): - (KJS_findRootObjectForNativeHandleFunction): - (getReferencesByRootDictionary): - (getReferencesDictionary): - (findReferenceDictionary): - (rootForImp): - (addJavaReference): - (removeJavaReference): - * bindings/jni_jsobject.h: - (Bindings::RootObject::RootObject): - (Bindings::RootObject::~RootObject): - (Bindings::RootObject::setRootObjectImp): - (Bindings::RootObject::rootObjectImp): - (Bindings::RootObject::setInterpreter): - (Bindings::RootObject::interpreter): - -=== Safari-117 === - -2003-12-10 Darin Adler - - Reviewed by Maciej. - - - fixed regression in JavaScript tests reported by the KDE guys - - fixed 3506345: REGRESSION (115-116): VIP: chordfind.com no longer displays chords - - * kjs/ustring.h: Add tolerateEmptyString parameter to toDouble and toULong. - * kjs/ustring.cpp: - (KJS::UString::toDouble): Separate the "tolerant" parameter into two separate ones: - tolerateTrailingJunk and tolerateEmptyString. Add new overloads; better for code size - and binary compatibility than default parameter values. - (KJS::UString::toULong): Pass tolerateEmptyString down to toDouble. Add new overload. - - * kjs/string_object.cpp: (StringProtoFuncImp::call): Pass false for the new - "tolerate empty string" parameter. - -2003-12-10 Richard Williamson - - Added code to manage reference counting of JavaScript - objects passed to Java. Also added implementation of - KJS_JSCreateNativeJSObject. This is the function that - provides the root object to Java (KJS::Window). - - Reviewed by Hyatt. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/jni_jsobject.cpp: - (KJS_setFindObjectForNativeHandleFunction): - (KJS_findObjectForNativeHandleFunction): - (getReferencesByOwnerDictionary): - (getReferencesDictionary): - (findReferenceDictionary): - (addJavaReference): - (removeJavaReference): - (removeAllJavaReferencesForOwner): - * bindings/jni_jsobject.h: - -2003-12-09 Richard Williamson - - LiveConnect stubs that correspond to the native methods - on JSObject. These will be called from the new Java plugin - when an instance of JSObject is instantiated and messaged. - When these are implemented the Java will be able to originate - calls into JavaScript. - - Also a temporary work-around added to Makefile.am to solve - a link problem. The 1.4.2 JavaVM accidentally links against - libobjc. This call a failure linking testkjs. Mike Hay is - working with someone to fix the problem (3505587). - - Reviewed by Chris. - - * JavaScriptCore.pbproj/project.pbxproj: - * Makefile.am: - * bindings/jni_jsobject.cpp: Added. - (KJS_JSCreateNativeJSObject): - (KJS_JSObject_JSFinalize): - (KJS_JSObject_JSObjectCall): - (KJS_JSObject_JSObjectEval): - (KJS_JSObject_JSObjectGetMember): - (KJS_JSObject_JSObjectSetMember): - (KJS_JSObject_JSObjectRemoveMember): - (KJS_JSObject_JSObjectGetSlot): - (KJS_JSObject_JSObjectSetSlot): - (KJS_JSObject_JSObjectToString): - * bindings/jni_jsobject.h: Added. - -2003-12-09 Maciej Stachowiak - - Reviewed by John. - - : JavaScriptCore should assert that interpreter is locked in collector - - * kjs/collector.cpp: - (KJS::Collector::allocate): Assert that interpreter lock count is not 0. - (KJS::Collector::collect): likewise - -2003-12-08 Richard Williamson - - LiveConnect: The last piece of the JavaScript side of the - LiveConnect implementation. This change adds support for - setting/getting values from Java arrays in JavaScript. - - Reviewed by John. - - * bindings/jni/jni_instance.h: - * bindings/jni/jni_runtime.cpp: - (JavaField::JavaField): - (convertJObjectToArray): - (JavaArray::JavaArray): - (JavaArray::~JavaArray): - (JavaArray::setValueAt): - (JavaArray::valueAt): - (JavaArray::getLength): - * bindings/jni/jni_runtime.h: - (Bindings::JavaArray::operator=): - (Bindings::JavaArray::javaArray): - * bindings/jni/jni_utility.cpp: - (JNITypeFromPrimitiveType): - (convertValueToJValue): - * bindings/jni/jni_utility.h: - * bindings/runtime.h: - * bindings/runtime_array.cpp: - (RuntimeArrayImp::RuntimeArrayImp): - (RuntimeArrayImp::~RuntimeArrayImp): - (RuntimeArrayImp::get): - (RuntimeArrayImp::put): - (RuntimeArrayImp::hasProperty): - * bindings/runtime_array.h: - (KJS::RuntimeArrayImp::getLength): - (KJS::RuntimeArrayImp::getConcreteArray): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - (RuntimeObjectImp::canPut): - (RuntimeObjectImp::hasProperty): - -2003-12-05 Richard Williamson - - LiveConnect: Part 1 of supporting JS bindings to - native language arrays. - - Reviewed by Chris. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/jni/jni_runtime.cpp: - (JavaField::JavaField): - (convertJObjectToArray): - (JavaField::valueFromInstance): - (JavaField::setValueToInstance): - * bindings/jni/jni_runtime.h: - * bindings/runtime.cpp: - (Instance::setValueOfField): - * bindings/runtime.h: - (Bindings::Array::~Array): - -2003-12-04 Richard Williamson - - LiveConnect: Moved defaultValue into concrete implementation because - more intelligent conversion can be perform with knowledge - of the class of the original instance. - - Reviewed by Chris. - - * bindings/jni/jni_class.cpp: - (JavaClass::isNumberClass): - (JavaClass::isBooleanClass): - (JavaClass::isStringClass): - * bindings/jni/jni_class.h: - * bindings/jni/jni_instance.cpp: - (JavaInstance::defaultValue): - (JavaInstance::valueOf): - * bindings/jni/jni_instance.h: - (Bindings::JavaInstance::javaInstance): - * bindings/runtime.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::defaultValue): - -2003-12-04 Richard Williamson - - LiveConnect: Added support for setting the value of Java - fields. - - Reviewed by Chris. - - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_runtime.cpp: - (JavaParameter::JavaParameter): - (JavaField::JavaField): - (JavaField::valueFromInstance): - (JavaField::setValueToInstance): - (JavaMethod::JavaMethod): - * bindings/jni/jni_runtime.h: - (Bindings::JavaField::getJNIType): - * bindings/jni/jni_utility.cpp: - (JNITypeFromClassName): - (convertValueToJValue): - * bindings/jni/jni_utility.h: - * bindings/runtime.cpp: - (Instance::setValueOfField): - * bindings/runtime.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - (RuntimeObjectImp::put): - (RuntimeObjectImp::defaultValue): - -2003-12-04 Richard Williamson - - Added support for string conversions. - Changed various JavaString member variables to be inline. - Implemented defaultValue for context relevant type coercion. - - Reviewed by Chris. - - * bindings/jni/jni_class.cpp: - (JavaClass::JavaClass): - (JavaClass::setClassName): - (JavaClass::classForInstance): - * bindings/jni/jni_class.h: - * bindings/jni/jni_instance.cpp: - (JavaInstance::stringValue): - (JavaInstance::numberValue): - (JavaInstance::booleanValue): - (JavaInstance::invokeMethod): - * bindings/jni/jni_instance.h: - * bindings/jni/jni_runtime.cpp: - (JavaParameter::JavaParameter): - (JavaField::JavaField): - (JavaMethod::JavaMethod): - (appendClassName): - (JavaMethod::signature): - * bindings/jni/jni_runtime.h: - (Bindings::JavaString::JavaString): - (Bindings::JavaString::~JavaString): - (Bindings::JavaString::operator=): - (Bindings::JavaString::characters): - (Bindings::JavaParameter::JavaParameter): - (Bindings::JavaParameter::~JavaParameter): - (Bindings::JavaParameter::operator=): - (Bindings::JavaParameter::type): - (Bindings::JavaField::JavaField): - (Bindings::JavaField::~JavaField): - (Bindings::JavaField::operator=): - (Bindings::JavaField::name): - (Bindings::JavaField::type): - (Bindings::JavaMethod::JavaMethod): - (Bindings::JavaMethod::_commonDelete): - (Bindings::JavaMethod::name): - (Bindings::JavaMethod::returnType): - * bindings/jni/jni_utility.cpp: - (convertValueToJValue): - * bindings/runtime.h: - (Bindings::Instance::valueOf): - * bindings/runtime_method.cpp: - (RuntimeMethodImp::call): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::RuntimeObjectImp): - (RuntimeObjectImp::get): - (RuntimeObjectImp::defaultValue): - * bindings/runtime_object.h: - (KJS::RuntimeObjectImp::classInfo): - -=== Safari-116 === - -2003-12-03 Richard Williamson - - LiveConnect: Added support for parameter passing to Java and conversion - of return values. - - Reviewed by Chris. - - * bindings/jni/jni_instance.cpp: - (JavaInstance::invokeMethod): - * bindings/jni/jni_instance.h: - * bindings/jni/jni_runtime.cpp: - (JavaParameter::JavaParameter): - (JavaMethod::JavaMethod): - (JavaMethod::signature): - * bindings/jni/jni_runtime.h: - (Bindings::JavaParameter::JavaParameter): - (Bindings::JavaParameter::operator=): - (Bindings::JavaParameter::getJNIType): - * bindings/jni/jni_utility.cpp: - (callJNIBooleanMethodA): - (convertValueToJValue): - * bindings/jni/jni_utility.h: - * bindings/runtime.h: - * bindings/runtime_method.cpp: - (RuntimeMethodImp::call): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - -2003-12-02 Richard Williamson - - Added support for calling simple methods in Java from JavaScript. - (void return and no parameters). Yay, LiveConnect lives. - - Still need write argument and return value conversion code. - - Reviewed by Chris. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/jni/jni_instance.cpp: - (JavaInstance::getClass): - (JavaInstance::invokeMethod): - * bindings/jni/jni_instance.h: - * bindings/jni/jni_runtime.cpp: - (JavaMethod::JavaMethod): - (JavaMethod::signature): - (JavaMethod::JNIReturnType): - * bindings/jni/jni_runtime.h: - (Bindings::JavaMethod::_commonDelete): - (Bindings::JavaMethod::_commonCopy): - (Bindings::JavaMethod::name): - * bindings/jni/jni_utility.cpp: - (signatureFromPrimitiveType): - * bindings/jni/jni_utility.h: - * bindings/runtime.h: - * bindings/runtime_method.cpp: Added. - (RuntimeMethodImp::RuntimeMethodImp): - (RuntimeMethodImp::~RuntimeMethodImp): - (RuntimeMethodImp::get): - (RuntimeMethodImp::implementsCall): - (RuntimeMethodImp::call): - (RuntimeMethodImp::codeType): - (RuntimeMethodImp::execute): - * bindings/runtime_method.h: Added. - * bindings/runtime_object.cpp: - (RuntimeObjectImp::RuntimeObjectImp): - (RuntimeObjectImp::get): - * bindings/runtime_object.h: - * kjs/function.cpp: - (FunctionImp::FunctionImp): - * kjs/interpreter.h: - -2003-12-01 Darin Adler - - Reviewed by Maciej. - - - fixed 3493799: JavaScript string.replace expands $ if it's the last character in replacement string - - * kjs/ustring.cpp: (KJS::UString::toDouble): Fix backwards handling of the "tolerant" boolean. - This indirectly caused the string.replace bug. - -2003-12-02 Maciej Stachowiak - - Merged patches from Harri Porten and David Faure to fix: - - : reproducible crash printing self-referential array - - * kjs/array_object.cpp: - (ArrayProtoFuncImp::call): Break out of the loop if an exception was thrown. - * kjs/nodes.cpp: - (FunctionCallNode::evaluate): Move function call depth check from here... - * kjs/object.cpp: - (KJS::Object::call): ...to here. - * kjs/object.h: Un-inline Object::call now that it does more. - -2003-12-01 Richard Williamson - - Fixed mistake in method signatures used to get boolean and integer fields. - - Reviewed by Chris. - - * bindings/jni/jni_runtime.cpp: - (JavaField::valueFromInstance): - -2003-12-01 Richard Williamson - -Fixed parameter passing to applet. Child elements are NOT valid in setStyle(). So we now create the widget before needed with createWidgetIfNecessary. This either happens when doing the first layout, or when JavaScript first references the applet element. - -Fixed early delete of the the main applet instance. When the JS collector cleaned up the last JS object referring to the applet instance we were deleting the java instance. This caused the applet instance cached on the applet element to be invalid. The applet instance is the only Java object not to be cleaned up by the JS collector. - -Added support for getting at Java object fields. - - Reviewed by Chris. - - * JavaScriptCore.pbproj/project.pbxproj: - * Makefile.am: - * bindings/jni/jni_instance.cpp: - (JObjectWrapper::JObjectWrapper): - * bindings/jni/jni_instance.h: - (Bindings::JObjectWrapper::~JObjectWrapper): - * bindings/jni/jni_runtime.cpp: - (JavaField::valueFromInstance): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::~RuntimeObjectImp): - (RuntimeObjectImp::RuntimeObjectImp): - (RuntimeObjectImp::get): - (RuntimeObjectImp::deleteProperty): - * bindings/runtime_object.h: - -=== Safari-115 === - -2003-11-21 Maciej Stachowiak - - Patch from Harri Porten, reviewed by me. - - - fixed 3491712 - String slice with negative arguments does not offset from end of string - - * kjs/string_object.cpp: - (StringProtoFuncImp::call): Handle negative arguments as offsets from end by - adding length and clamping to [0,length-1]. - -2003-11-21 Maciej Stachowiak - - Patch from Harri Porten, reviewed by me. - - - fixed 3491709 - using Function.apply with a primitive type as the arg list causes crash - - * kjs/function_object.cpp: - (FunctionProtoFuncImp::call): Nest parentheses properly. - -2003-11-20 Richard Williamson - - More LiveConnect stuff. Primitive Java fields are now - accessible from JavaScript! Yay! - - Reviewed by Maciej. - - * bindings/jni/jni_class.cpp: - (JavaClass::methodNamed): - (JavaClass::fieldNamed): - * bindings/jni/jni_class.h: - (Bindings::JavaClass::_commonDelete): - * bindings/jni/jni_instance.cpp: - (JavaInstance::JavaInstance): - (JavaInstance::~JavaInstance): - (JavaInstance::getClass): - * bindings/jni/jni_instance.h: - (Bindings::JavaInstance::javaInstance): - * bindings/jni/jni_runtime.cpp: - (JavaField::JavaField): - (JavaField::valueFromInstance): - * bindings/jni/jni_runtime.h: - (Bindings::JavaField::JavaField): - (Bindings::JavaField::~JavaField): - (Bindings::JavaField::operator=): - * bindings/jni/jni_utility.cpp: - (callJNIMethod): - (callJNIMethodA): - (callJNIVoidMethod): - (callJNIObjectMethod): - (callJNIBooleanMethod): - (callJNIByteMethod): - (callJNICharMethod): - (callJNIShortMethod): - (callJNIIntMethod): - (callJNILongMethod): - (callJNIFloatMethod): - (callJNIDoubleMethod): - (callJNIVoidMethodA): - (callJNIObjectMethodA): - (callJNIByteMethodA): - (callJNICharMethodA): - (callJNIShortMethodA): - (callJNIIntMethodA): - (callJNILongMethodA): - (callJNIFloatMethodA): - (callJNIDoubleMethodA): - (releaseCharactersForJStringInEnv): - (primitiveTypeFromClassName): - (getJNIField): - * bindings/jni/jni_utility.h: - * bindings/runtime.cpp: - (Instance::createBindingForLanguageInstance): - (Instance::getValueOfField): - * bindings/runtime.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::get): - -2003-11-20 Richard Williamson - - More LiveConnect stuff. - - Reviewed by Chris. - - * bindings/jni/jni_class.cpp: - (JavaClass::classForName): - (JavaClass::classForInstance): - * bindings/jni/jni_instance.cpp: - (JavaInstance::getValueOfField): - * bindings/jni/jni_instance.h: - (Bindings::JObjectWrapper::JObjectWrapper): - * bindings/jni/jni_runtime.h: - (Bindings::JavaConstructor::~JavaConstructor): - (Bindings::JavaConstructor::operator=): - (Bindings::JavaMethod::JavaMethod): - (Bindings::JavaMethod::_commonDelete): - (Bindings::JavaMethod::signature): - * bindings/jni/jni_utility.cpp: - (getJNIEnv): - (attachToJavaVM): - * bindings/jni/jni_utility.h: - * bindings/runtime.h: - * bindings/runtime_object.cpp: - (RuntimeObjectImp::~RuntimeObjectImp): - (RuntimeObjectImp::get): - * bindings/runtime_object.h: - -2003-11-19 Richard Williamson - - More LiveConnect stuff. - - Reviewed by Ken. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/jni/jni_class.cpp: Added. - (JavaClass::_commonInit): - (JavaClass::JavaClass): - (_createClassesByNameIfNecessary): - (JavaClass::classForName): - (JavaClass::classForInstance): - (JavaClass::methodNamed): - (JavaClass::fieldNamed): - * bindings/jni/jni_class.h: Added. - (Bindings::JavaClass::_commonDelete): - (Bindings::JavaClass::~JavaClass): - (Bindings::JavaClass::_commonCopy): - (Bindings::JavaClass::JavaClass): - (Bindings::JavaClass::operator=): - (Bindings::JavaClass::name): - (Bindings::JavaClass::constructorAt): - (Bindings::JavaClass::numConstructors): - * bindings/jni/jni_instance.cpp: Added. - (JavaInstance::JavaInstance): - (JavaInstance::~JavaInstance): - * bindings/jni/jni_instance.h: Added. - (Bindings::JObjectWrapper::JObjectWrapper): - (Bindings::JObjectWrapper::~JObjectWrapper): - (Bindings::JObjectWrapper::ref): - (Bindings::JObjectWrapper::deref): - (Bindings::JavaInstance::getClass): - (Bindings::JavaInstance::operator=): - * bindings/jni/jni_runtime.cpp: - (JavaMethod::JavaMethod): - * bindings/jni/jni_runtime.h: - (Bindings::JavaString::JavaString): - (Bindings::JavaString::~JavaString): - (Bindings::JavaString::operator=): - * bindings/jni/jni_utility.cpp: - (getJavaVM): - (getJNIEnv): - (getCharactersFromJString): - (releaseCharactersForJString): - (getCharactersFromJStringInEnv): - (releaseCharactersForJStringInEnv): - * bindings/jni/jni_utility.h: - * bindings/runtime.cpp: - (Instance::createBindingForLanguageInstance): - * bindings/runtime.h: - (Bindings::Instance::): - -2003-11-18 Richard Williamson - - More live connect stubs. We're getting close. - - Reviewed by Chris. - - * JavaScriptCore.pbproj/project.pbxproj: - * bindings/jni/jni_runtime.cpp: - (JavaClass::JavaClass): - (JavaInstance::JavaInstance): - (JavaInstance::~JavaInstance): - * bindings/jni/jni_runtime.h: - (Bindings::JavaConstructor::value): - (Bindings::JavaField::value): - (Bindings::JavaMethod::value): - (Bindings::JavaClass::_commonDelete): - (Bindings::JavaClass::_commonCopy): - (Bindings::JavaClass::methodNamed): - (Bindings::JavaClass::fieldNamed): - (Bindings::JavaInstance::getClass): - * bindings/runtime.cpp: Added. - * bindings/runtime.h: - (Bindings::Instance::~Instance): - * bindings/runtime_object.cpp: Added. - (RuntimeObjectImp::classInfo): - (RuntimeObjectImp::RuntimeObjectImp): - (RuntimeObjectImp::get): - (RuntimeObjectImp::put): - (RuntimeObjectImp::canPut): - (RuntimeObjectImp::hasProperty): - (RuntimeObjectImp::deleteProperty): - (RuntimeObjectImp::defaultValue): - (RuntimeObjectImp::_initializeClassInfoFromInstance): - * bindings/runtime_object.h: Added. - (KJS::RuntimeObjectImp::setInternalInstance): - (KJS::RuntimeObjectImp::getInternalInstance): - * kjs/object.cpp: - (KJS::ObjectImp::get): - (KJS::ObjectImp::hasProperty): - * kjs/value.h: - (KJS::): - -2003-11-17 Maciej Stachowiak - - Patch from Harri, reviewed by me. - - - fixed 3487375 - backwards array slice causes infinite loop - - * kjs/array_object.cpp: - (ArrayProtoFuncImp::call): - -2003-11-17 Maciej Stachowiak - - Patch from Harri Porten reviewed by me. - - - fixed 3487371 - operator precedence for bitwise or, xor and and is wrong - - * kjs/grammar.y: Correct the precedence. - -2003-11-16 Maciej Stachowiak - - Reviewed by John. - - - fixed 3483829 - JavaScriptCore needs workaround to compile on Merlot - - * JavaScriptCore.pbproj/project.pbxproj: Add -Wno-long-double to - warning flags. - -=== Safari-114 === - -2003-11-13 Richard Williamson - - Factored common code between copy constructor and assignment operator. - - Reviewed by Chris. - - * ChangeLog: - * bindings/jni/jni_runtime.h: - (Bindings::JavaConstructor::_commonCopy): - (Bindings::JavaConstructor::JavaConstructor): - (Bindings::JavaConstructor::operator=): - (Bindings::JavaField::type): - * bindings/runtime.h: - -2003-11-13 Richard Williamson - - More LiveConnect stuff. This checkin adds abstract classes to model - language runtimes and a JNI based set of concrete implementations for - Java. - - Reviewed by Chris. - - * JavaScriptCore.pbproj/project.pbxproj: - * Makefile.am: - * bindings/Makefile.am: Removed. - * bindings/jni/Makefile.am: Removed. - * bindings/jni/jni_runtime.cpp: Added. - (JavaField::JavaField): - (JavaConstructor::JavaConstructor): - (JavaMethod::JavaMethod): - (JavaClass::JavaClass): - * bindings/jni/jni_runtime.h: Added. - (Bindings::JavaString::JavaString): - (Bindings::JavaString::~JavaString): - (Bindings::JavaString::operator=): - (Bindings::JavaString::characters): - (Bindings::JavaParameter::JavaParameter): - (Bindings::JavaParameter::~JavaParameter): - (Bindings::JavaParameter::operator=): - (Bindings::JavaParameter::type): - (Bindings::JavaConstructor::JavaConstructor): - (Bindings::JavaConstructor::~JavaConstructor): - (Bindings::JavaConstructor::operator=): - (Bindings::JavaConstructor::parameterAt): - (Bindings::JavaConstructor::numParameters): - (Bindings::JavaField::JavaField): - (Bindings::JavaField::~JavaField): - (Bindings::JavaField::operator=): - (Bindings::JavaField::name): - (Bindings::JavaField::type): - (Bindings::JavaMethod::JavaMethod): - (Bindings::JavaMethod::_commonDelete): - (Bindings::JavaMethod::~JavaMethod): - (Bindings::JavaMethod::_commonCopy): - (Bindings::JavaMethod::operator=): - (Bindings::JavaMethod::name): - (Bindings::JavaMethod::returnType): - (Bindings::JavaMethod::parameterAt): - (Bindings::JavaMethod::numParameters): - (Bindings::JavaClass::_commonDelete): - (Bindings::JavaClass::~JavaClass): - (Bindings::JavaClass::_commonCopy): - (Bindings::JavaClass::JavaClass): - (Bindings::JavaClass::operator=): - (Bindings::JavaClass::name): - (Bindings::JavaClass::methodAt): - (Bindings::JavaClass::numMethods): - (Bindings::JavaClass::constructorAt): - (Bindings::JavaClass::numConstructors): - (Bindings::JavaClass::fieldAt): - (Bindings::JavaClass::numFields): - * bindings/jni/jni_utility.cpp: - (callJNIMethod): - (callJNIMethodA): - (callJNIObjectMethod): - (callJNIByteMethod): - (callJNICharMethod): - (callJNIShortMethod): - (callJNIIntMethod): - (callJNILongMethod): - (callJNIFloatMethod): - (callJNIDoubleMethod): - (callJNIVoidMethodA): - (callJNIObjectMethodA): - (callJNIByteMethodA): - (callJNICharMethodA): - (callJNIShortMethodA): - (callJNIIntMethodA): - (callJNILongMethodA): - (callJNIFloatMethodA): - (callJNIDoubleMethodA): - (getCharactersFromJString): - (releaseCharactersForJString): - * bindings/jni/jni_utility.h: - * bindings/objc/Makefile.am: Removed. - * bindings/runtime.h: Added. - (Bindings::Parameter::~Parameter): - (Bindings::Constructor::~Constructor): - (Bindings::Field::~Field): - (Bindings::Method::~Method): - (Bindings::Class::~Class): - -2003-11-13 Maciej Stachowiak - - Reviewed by John. - - - fixed 3472562 - Null or Undefined variables passed to IN operator cause javascript exceptions - - * kjs/nodes.cpp: - (ForInNode::execute): If the in value is null or undefined, bail - out early, since attempting to iterate its properties will throw - an exception. - -2003-11-12 Darin Adler - - - fixed the build - - * Makefile.am: Fix the build by removing the bindings directory from SUBDIRS. - Later, we can either add this back and add the Makefile.am files to the top - level configure.in or leave it out and remove the Makefile.am files. - -2003-11-12 Richard Williamson - - Added utility functions for calling JNI methods. - - Reviewed by Chris. - - * JavaScriptCore.pbproj/project.pbxproj: - * Makefile.am: - * bindings/Makefile.am: Added. - * bindings/jni/Makefile.am: Added. - * bindings/jni/jni_utility.cpp: Added. - (attachToJavaVM): - (callJNIMethod): - (callJNIVoidMethod): - (callJNIObjectMethod): - (callJNIByteMethod): - (callJNICharMethod): - (callJNIShortMethod): - (callJNIIntMethod): - (callJNILongMethod): - (callJNIFloatMethod): - (callJNIDoubleMethod): - * bindings/jni/jni_utility.h: Added. - * bindings/objc/Makefile.am: Added. - -2003-11-08 Darin Adler - - Reviewed by John. - - - fixed 3477528 -- array.sort(function) fails if the function returns a non-zero value that rounds to zero - - * kjs/array_object.cpp: - (compareByStringForQSort): Added checks for undefined values to match what the specification calls for. - (compareWithCompareFunctionForQSort): Added checks for undefined values as above, and also changed the - code that looks at the compare function result to look at the number returned without rounding to an integer. - (ArrayProtoFuncImp::call): Changed the code that looks at the compare function result to look at the number - returned without rounding to an integer. - -=== Safari-113 === - -2003-11-03 Vicki Murley - - Reviewed by kocienda. - - - fixed : non-B&I builds should not use order files, because they cause false "regressions" in perf. - - * JavaScriptCore.pbproj/project.pbxproj: added empty SECTORDER_FLAGS variables to the Development and Deployment build styles - -2003-11-02 Darin Adler - - Reviewed by Maciej. - - - changed list manipulation to use Harri Porten's idea of a circular - linked list that is built from head to tail rather than building the - list backwards and reversing the list when done - - * kjs/grammar.y: Handle CatchNode and FinallyNode in a type-safe way. - Change many places that passed 0L to pass nothing at all, or to pass 0. - - * kjs/nodes.h: - (KJS::ElementNode::ElementNode): Build a circular list instead of a 0-terminated - backwards list. - (KJS::ArrayNode::ArrayNode): Break the circular list instead of reversing the list. - (KJS::PropertyValueNode::PropertyValueNode): Moved before ObjectLiteralNode so the - inline code in ObjectLiteralNode works. Build a circular list instead of a 0-terminated - backwards list. Made the case for the first node separate so we don't need a nil check. - (KJS::ObjectLiteralNode::ObjectLiteralNode): Break the circular list instead of - reversing the list. - (KJS::ArgumentListNode::ArgumentListNode): Build a circular list instead of a 0-terminated - backwards list. Also, made the constructors inline (moved here from .cpp file). - (KJS::ArgumentsNode::ArgumentsNode): Break the circular list instead of - reversing the list. - (KJS::NewExprNode::NewExprNode): Changed a 0L to 0. - (KJS::StatListNode::StatListNode): Make this constructor no longer inline (moved into - .cpp file). The one in the .cpp file builds a circular list instead of a 0-terminated - backwards list. - (KJS::VarDeclListNode::VarDeclListNode): Build a circular list instead of a 0-terminated - backwards list. - (KJS::VarStatementNode::VarStatementNode): Break the circular list instead of reversing - the list. - (KJS::BlockNode::BlockNode): Make this constructor no longer inline (moved into .cpp file). - The one in the .cpp file breaks the list instead of reversing it. - (KJS::ForNode::ForNode): Break the circular list instead of reversing the list. - (KJS::CaseClauseNode::CaseClauseNode): Break the circular list instead of reversing the - list. - (KJS::ClauseListNode::ClauseListNode): Build a circular list instead of a 0-terminated - backwards list. - (KJS::CaseBlockNode::CaseBlockNode): Make this constructor no longer inline (moved into - .cpp file). The one in the .cpp file breaks the list instead of reversing it. - (KJS::TryNode::TryNode): Changed constructor to take typed parameters for the catch and - finally nodes rather than just Node. - (KJS::ParameterNode::ParameterNode): Build a circular list instead of a 0-terminated - backwards list. - (KJS::FuncDeclNode::FuncDeclNode): Break the circular list instead of reversing the - list. - (KJS::FuncExprNode::FuncExprNode): Break the circular list instead of reversing the - list. - - * kjs/nodes.cpp: - (StatListNode::StatListNode): Moved this constructor here, no longer inline. - Did the "break circular list" thing instead of the "reverse list" thing. - Added setLoc calls to match KJS in the KDE tree; since we don't currently - use the JavaScript debugging support, it's unclear whether there's any benefit, but - later we might be using it and it's good to be as close as possible. - (BlockNode::BlockNode): Moved this constructor here, no longer inline. - Did the "break circular list" thing instead of the "reverse list" thing. - Added setLoc calls. - (CaseBlockNode::CaseBlockNode): Moved this constructor here, no longer inline. - Did the "break circular list" thing instead of the "reverse list" thing. - (SourceElementsNode::SourceElementsNode): Moved this constructor here, no longer inline. - Did the "break circular list" thing instead of the "reverse list" thing. - Added setLoc calls. - - * kjs/grammar.cpp: Regenerated. - * kjs/grammar.cpp.h: Regenerated. - * kjs/grammar.h: Regenerated. - -=== Safari-112 === - -2003-10-30 Maciej Stachowiak - - Reviewed by Ken. - - - fixed 3427069 - browsing mp3.com causes leaks (KJS) - - * kjs/string_object.cpp: - (StringProtoFuncImp::call): Don't do an early return, since that - could leak a temporary regexp. - -2003-10-29 Maciej Stachowiak - - Reviewed by Darin. - - - fixed 3426076 - Leak of JS lexer data visiting http://www.ebay.com - - * kjs/grammar.cpp: - (yyerror): Updated the commented code. - * kjs/grammar.y: Don't delete string and identifier tokens when done - with them any more, they'll get cleaned up by the lexer now. - * kjs/internal.cpp: - (Parser::parse): Tell lexer when done parsing. - * kjs/lexer.cpp: - (Lexer::Lexer): Initialize new data members. - (Lexer::lex): Use new methods to make strings and identifiers, and - save them. - (Lexer::makeIdentifier): Make a new Identifier and save it in an - auto-growing array. - (Lexer::makeUString): Likewise for UStrings. - (Lexer::doneParsing): Clean up arrays of Ifentifiers and UStrings. - * kjs/lexer.h: - -2003-10-28 Maciej Stachowiak - - Reviewed by Ken. - - - fixed 3413962 - malicious web pages can kill all future JavaScript execution by breaking recursion limit check - - * kjs/nodes.cpp: - (FunctionCallNode::evaluate): If we're going to return early due - to breaking the recursion limit, make sure to lower it again, or - it will creep up by one each time it's exceeded. - -2003-10-26 Darin Adler - - * JavaScriptCorePrefix.h: Added a C case to the NULL definition since we use C as well - as C++ in this project. - -2003-10-26 Darin Adler - - - rolled in some CString changes Harri Porten did on the KDE side - - * kjs/ustring.cpp: - (KJS::CString::CString): Use memcpy instead of strcpy for speed. Fix an off by one error - in the copy constructor. - (KJS::CString::operator=): Use memcpy instead of strcpy for speed. - - * JavaScriptCorePrefix.h: Add a definition of NULL here that takes advantage of the GNU - __null feature even if the system C library doesn't. - -== Rolled over to ChangeLog-2003-10-25 == diff --git a/ChangeLog-2008-08-10 b/ChangeLog-2008-08-10 deleted file mode 100644 index 0912aec..0000000 --- a/ChangeLog-2008-08-10 +++ /dev/null @@ -1,31482 +0,0 @@ -2008-08-10 Jan Michael Alonzo - - Reviewed (and updated) by Alp Toker. - - https://bugs.webkit.org/show_bug.cgi?id=16620 - [GTK] Autotools make dist and make check support - - Get make dist working. - - Note that not all possible configurations have been tested yet. - - * GNUmakefile.am: - -2008-08-09 Alexey Proskuryakov - - Reviewed by Sam Weinig. - - Added same heap debug checks to more code paths. - - * kjs/JSActivation.cpp: - (KJS::JSActivation::put): - (KJS::JSActivation::putWithAttributes): - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::putWithAttributes): - * kjs/JSObject.h: - (KJS::JSObject::putDirect): - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTablePut): - (KJS::JSVariableObject::symbolTablePutWithAttributes): - -2008-08-09 Cameron Zwarich - - Reviewed by Maciej. - - Fix some style issues in the sampling tool. - - * VM/SamplingTool.cpp: - (KJS::sleepForMicroseconds): - (KJS::SamplingTool::dump): - -2008-08-09 Cameron Zwarich - - Reviewed by Oliver. - - Revision 35651, despite being a rather trivial change, introduced a - large regression on the regexp-dna SunSpider test. This regression - stemmed from an increase in the size of CodeBlock::dump(). There is - no reason for this method (and several related methods) to be compiled - in non-debug builds with the sampling tool disabled. This patch - conditionally compiles them, reversing the regression on SunSpider. - - * JavaScriptCore.exp: - * VM/CodeBlock.cpp: - * VM/CodeBlock.h: - * VM/Machine.cpp: - -2008-08-08 Cameron Zwarich - - Reviewed by Oliver. - - Bug 20330: JSCore crash loading any filehurricane media page - - - Fix a typo in the constant loading patch. Also, add a case for - op_unexpected_load to CodeBlock::dump(). - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::addUnexpectedConstant): - -2008-08-08 Matt Lilek - - Not reviewed, build fix. - - * JavaScriptCore.exp: - -2008-08-08 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Improve performance of arithmetic operators - - Added a fast (non-virtual) mechanism to determine if a non-immediate JSValue* - is a JSNumberCell. We then use this to allow improved specialisation in many - arithmetic operators. SunSpider reports a 2.5% progression overall, with greater - than 10% progressions on a number of arithmetic heavy tests. - - * VM/Machine.cpp: - (KJS::fastIsNumber): - (KJS::fastToInt32): - (KJS::fastToUInt32): - (KJS::jsLess): - (KJS::jsLessEq): - (KJS::jsAdd): - (KJS::Machine::privateExecute): - * kjs/JSNumberCell.h: - (KJS::JSNumberCell::fastToInt32): - (KJS::JSNumberCell::fastToUInt32): - * kjs/collector.cpp: - (KJS::allocateBlock): - (KJS::Heap::heapAllocate): - * kjs/collector.h: - (KJS::Heap::fastIsNumber): - -2008-08-06 Adam Roben - - Try to fix the Windows build bots - - * API/JSBase.cpp: Touch this to force JSC to rebuild and re-copy the - WTF headers. - -2008-08-06 Tor Arne Vestbø - - Revert change 35595. - - * wtf/RetainPtr.h: - -2008-08-06 Ariya Hidayat - - Fix non-Mac build. - - * wtf/RetainPtr.h: CoreFoundation only for PLATFORM(MAC) - -2008-08-06 Ariya Hidayat - - Fix non-Mac build. - - * wtf/RetainPtr.h: CoreFoundation only for PLATFORM(MAC) - -2008-08-06 Csaba Osztrogonac - - Reviewed by Darin. Landed by Cameron. - - Bug 20272: typo in JavaScriptCore - - - Correct the documentation for op_not. (typo) - Fix #undef. (typo) - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-08-06 Cameron Zwarich - - Reviewed by Maciej. - - Bug 20286: Load constants all at once instead of using op_load - - - Load constants all at once into temporary registers instead of using - individual instances of op_load. - - This is a 2.6% speedup on SunSpider. - - * JavaScriptCore.exp: - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - (KJS::CodeBlock::mark): - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::newTemporary): - (KJS::CodeGenerator::addConstant): - (KJS::CodeGenerator::addUnexpectedConstant): - (KJS::CodeGenerator::emitLoad): - (KJS::CodeGenerator::emitUnexpectedLoad): - (KJS::CodeGenerator::emitNewError): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::slideRegisterWindowForCall): - (KJS::Machine::unwindCallFrame): - (KJS::Machine::throwException): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * VM/Machine.h: - * VM/Opcode.h: - * VM/RegisterID.h: - (KJS::RegisterID::RegisterID): - (KJS::RegisterID::makeConstant): - (KJS::RegisterID::isTemporary): - * kjs/NodeInfo.h: - * kjs/Parser.cpp: - (KJS::Parser::didFinishParsing): - * kjs/Parser.h: - (KJS::Parser::parse): - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::NullNode::emitCode): - (KJS::BooleanNode::emitCode): - (KJS::NumberNode::emitCode): - (KJS::StringNode::emitCode): - (KJS::ArrayNode::emitCode): - (KJS::DeleteResolveNode::emitCode): - (KJS::DeleteValueNode::emitCode): - (KJS::VoidNode::emitCode): - (KJS::ConstDeclNode::emitCodeSingle): - (KJS::ReturnNode::emitCode): - (KJS::ScopeNode::ScopeNode): - (KJS::ProgramNode::ProgramNode): - (KJS::ProgramNode::create): - (KJS::EvalNode::EvalNode): - (KJS::EvalNode::create): - (KJS::FunctionBodyNode::FunctionBodyNode): - (KJS::FunctionBodyNode::create): - (KJS::FunctionBodyNode::emitCode): - * kjs/nodes.h: - (KJS::ScopeNode::neededConstants): - -2008-08-05 Maciej Stachowiak - - Reviewed by Cameron. - - - add fast path for immediates to % operator, as we have for many other math ops - - This fixes handling for a 0 divisor relative to the last patch. Only an 0.2% speedup on SunSpider but - still a 1.4x win on Oliver's prime test. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-08-05 Cameron Zwarich - - Reviewed by Darin. - - Bug 20293: Crash in JavaScript codegen for eval("const a;") - - - Correctly handle constant declarations in eval code with no initializer. - - * kjs/nodes.cpp: - (KJS::ConstDeclNode::emitCodeSingle): - -2008-08-05 Cameron Zwarich - - Reviewed by Oliver. - - Roll out r35555 because of correctness issues. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-08-05 Maciej Stachowiak - - Reviewed by Geoff. - - - add fast path for immediates to % operator, as we have for many other math ops - - 0.6% speedup on SunSpider. 1.4x speedup on a prime testing torture test that Oliver whipped up. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-07-31 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Bug 19359: JavaScriptCore behaves differently from FF2/3 and IE when handling context in catch statement - - - Make our catch behave like Firefox and IE, we do this by using a StaticScopeObject - instead of a generic JSObject for the scope node. We still don't make use of the - fact that we have a static scope inside the catch block, so the internal performance - of the catch block is not improved, even though technically it would be possible to - do so. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitPushNewScope): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::createExceptionScope): - (KJS::Machine::privateExecute): - * VM/Machine.h: - * VM/Opcode.h: - * kjs/JSStaticScopeObject.cpp: - (KJS::JSStaticScopeObject::toThisObject): - (KJS::JSStaticScopeObject::put): - * kjs/JSStaticScopeObject.h: - * kjs/nodes.cpp: - (KJS::TryNode::emitCode): - -2008-08-02 Rob Gowin - - Reviewed by Eric Seidel. - - Added JavaScriptCore/API/WebKitAvailability to list of files in - javascriptcore_h_api. - - * GNUmakefile.am: - -2008-08-01 Alexey Proskuryakov - - Rubber-stamped by Maciej. - - Remove JSGlobalData::DataInstance. It was only needed when we had per-thread JSGlobalData - instances. - - * kjs/JSGlobalData.h: - -2008-07-31 Kevin Ollivier - - Second attempt at Windows/wx build fix. Instead of avoiding inclusion of windows.h, - use defines, etc. to avoid conflicts in each affected file. Also, change PLATFORM(WIN) - to PLATFORM(WIN_OS) so that other ports using Windows headers get the right impls. - - * VM/SamplingTool.cpp: - * wtf/Threading.h: - -2008-07-31 Anders Carlsson - - Reviewed by Adam. - - Fix Windows build. - - * kjs/collector.h: - * wtf/FastMalloc.cpp: - -2008-07-31 Csaba Osztrogonac - - Reviewed by Simon. - - Bug 20170: [Qt] missing namespace defines in JavaScriptCore.pro - - - * JavaScriptCore.pro: Added missing define. - -2008-07-31 Alexey Proskuryakov - - Rubber-stamped by Maciej. - - Eliminate JSLock (it was already disabled, removing the stub implementaion and all - call sites now). - - * API/JSBase.cpp: - (JSEvaluateScript): - (JSCheckScriptSyntax): - (JSGarbageCollect): - * API/JSCallbackConstructor.cpp: - (KJS::constructJSCallback): - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::call): - * API/JSCallbackObjectFunctions.h: - (KJS::::init): - (KJS::::getOwnPropertySlot): - (KJS::::put): - (KJS::::deleteProperty): - (KJS::::construct): - (KJS::::hasInstance): - (KJS::::call): - (KJS::::getPropertyNames): - (KJS::::toNumber): - (KJS::::toString): - (KJS::::staticValueGetter): - (KJS::::callbackGetter): - * API/JSContextRef.cpp: - (JSGlobalContextCreateInGroup): - (JSGlobalContextRetain): - (JSGlobalContextRelease): - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeConstructor): - (JSObjectMakeFunction): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - (JSObjectDeleteProperty): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - (JSObjectCopyPropertyNames): - (JSPropertyNameArrayRelease): - (JSPropertyNameAccumulatorAddName): - * API/JSStringRef.cpp: - (JSStringRelease): - * API/JSValueRef.cpp: - (JSValueIsEqual): - (JSValueIsInstanceOfConstructor): - (JSValueMakeNumber): - (JSValueMakeString): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - (JSValueUnprotect): - * ForwardingHeaders/JavaScriptCore/JSLock.h: Removed. - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.order: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::JSGlobalData): - * kjs/JSGlobalData.h: - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::~JSGlobalObject): - (KJS::JSGlobalObject::init): - * kjs/JSLock.cpp: Removed. - * kjs/JSLock.h: Removed. - * kjs/Shell.cpp: - (functionGC): - (jscmain): - * kjs/collector.cpp: - (KJS::Heap::~Heap): - (KJS::Heap::heapAllocate): - (KJS::Heap::setGCProtectNeedsLocking): - (KJS::Heap::protect): - (KJS::Heap::unprotect): - (KJS::Heap::collect): - * kjs/identifier.cpp: - * kjs/interpreter.cpp: - (KJS::Interpreter::checkSyntax): - (KJS::Interpreter::evaluate): - -2008-07-31 Alexey Proskuryakov - - Rubber-stamped by Oliver Hunt. - - Fix the Mac project to not display "test/" as part of file name for tests. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-07-31 Eric Seidel - - Reviewed by Alexey Proskuryakov. - - Rename USE(MULTIPLE_THREADS) to ENABLE(JSC_MULTIPLE_THREADS) - to better match the use/enable pattern (and better describe - the usage of the feature in question.) - - I also fixed a couple other ENABLE_ macros to be pre-processor - definition override-able to match the rest of the ENABLE_ macros - since it seems to be our convention that build systems can set - ENABLE_ macros in Makefiles. - - * kjs/InitializeThreading.cpp: - (KJS::initializeThreadingOnce): - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::JSGlobalData): - (KJS::JSGlobalData::~JSGlobalData): - * kjs/MathObject.cpp: - * kjs/collector.cpp: - (KJS::Heap::Heap): - (KJS::Heap::~Heap): - (KJS::allocateBlock): - (KJS::Heap::markStackObjectsConservatively): - * kjs/collector.h: - * kjs/dtoa.cpp: - (KJS::pow5mult): - (KJS::rv_alloc): - (KJS::freedtoa): - (KJS::dtoa): - * wtf/FastMalloc.cpp: - * wtf/Platform.h: - * wtf/RefCountedLeakCounter.cpp: - -2008-07-30 Eric Seidel - - Reviewed by Mark Rowe. - - Try to clean up our usage of USE(MULTIPLE_THREADS) vs. USE(PTHREADS) a little. - It looks like JSC assumes that if MULTIPLE_THREADS is defined, then pthreads will always be available - I'm not sure that's always the case for gtk, certainly not for Windows. We should eventually go back - and fix wtf/Threading.h to cover all these cases some day. - - * kjs/JSLock.cpp: - * kjs/collector.h: - * wtf/Platform.h: - -2008-07-30 Eric Seidel - - Reviewed by Oliver. - - MSVC warns when structs are called classes or vice versa. - Make all the source refer to JSGlobalData as a class. - - * kjs/CommonIdentifiers.h: - * kjs/JSGlobalData.h: - * kjs/Parser.h: - * kjs/lexer.h: - -2008-07-30 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - Add consistency checks to UString to document and enforce its design. - - * kjs/ustring.cpp: - (KJS::UString::Rep::create): - (KJS::UString::Rep::destroy): - (KJS::UString::Rep::checkConsistency): - (KJS::UString::expandCapacity): - (KJS::UString::expandPreCapacity): - (KJS::UString::UString): - (KJS::UString::spliceSubstringsWithSeparators): - (KJS::UString::append): - * kjs/ustring.h: - (KJS::UString::Rep::checkConsistency): - -2008-07-30 Gavin Barraclough - - Reviewed by Geoff Garen. - - Fixes for Windows and non-AllInOne file build with SamplingTool, plus review fixes. - - * GNUmakefile.am: Adding SamplingTool.cpp to build. - * JavaScriptCore.exp: Export hooks to init & control SamplingTool. - * JavaScriptCore.pri: Adding SamplingTool.cpp to build. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Adding SamplingTool.cpp to build. - * JavaScriptCore.xcodeproj/project.pbxproj: Adding SamplingTool.cpp to build. - * JavaScriptCoreSources.bkl: Adding SamplingTool.cpp to build. - * VM/Machine.cpp: MACHINE_SAMPLING_callingNativeFunction renamed MACHINE_SAMPLING_callingHostFunction - * VM/Machine.h: - * VM/Opcode.cpp: SamplingTool moved to SamplingTool.cpp/.h, opcodeNames generated from FOR_EACH_OPCODE_ID. - * VM/Opcode.h: - * VM/SamplingTool.cpp: Added .cpp/.h for SamplingTool. - * VM/SamplingTool.h: - * kjs/Shell.cpp: Switched SAMPLING_TOOL_ENABLED to ENABLE_SAMPLING_TOOL. - * wtf/Platform.h: Added ENABLE_SAMPLING_TOOL config option. - * kjs/nodes.cpp: Header include to fix non-AllInOne builds. - -2008-07-30 Ariya Hidayat - - Reviewed by Alexey Proskuryakov. - - Fix compilation without multi-threading support. - - * kjs/collector.cpp: - (KJS::Heap::Heap): - -2008-07-30 Anders Carlsson - - Add WebKitAvailability.h forwarding header. - - * ForwardingHeaders/JavaScriptCore/WebKitAvailability.h: Added. - -2008-07-30 Anders Carlsson - - Fix the else. - - * API/WebKitAvailability.h: - -2008-07-30 Anders Carlsson - - * API/WebKitAvailability.h: - Fix Windows (and other non-Mac builds). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Add WebKitAvailability.h to the project. - -2008-07-30 Anders Carlsson - - One step closer towards fixing the Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - Make sure to copy WebKitAvailability.h - -2008-07-29 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 20209: Atomize constant strings - - - Prevents significant performance degradation seen when a script contains multiple - identical strings that are used as keys to identify properties on objects. - - No performance change on SunSpider. - - * kjs/nodes.cpp: Atomize constant strings. - -2008-07-30 Oliver Hunt - - Reviewed by Alexey Proskuryakov. - - JavaScript exceptions fail if the scope chain includes the global object - - In an attempt to remove the branch I just added to KJS::depth I - used the existence of a Variable Object at a point in the scope - chain as an indicator of function or global scope activation. - However this assumption results in incorrect behaviour if the - global object is injected into the scope chain with 'with'. - - * VM/Machine.cpp: - (KJS::depth): - -2008-07-30 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - Don't call JSGarbageCollect() on a released context. - - * API/testapi.c: (main): - -2008-07-29 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - Implement JSContextGroup APIs to make concurrent execution possible for - JavaScriptCore clients. - - This changes the behavior of JSGlobalContextCreate(), so that it now uses a private context - group for each context, making JSlock implicit locking unnecessary. - - * API/JSContextRef.h: - * API/JSContextRef.cpp: - (JSContextGroupCreate): - (JSContextGroupRetain): - (JSContextGroupRelease): - (JSGlobalContextCreate): - (JSGlobalContextCreateInGroup): - (JSGlobalContextRelease): - (JSContextGetGroup): - Added new methods. JSGlobalContextCreate() calls JSGlobalContextCreateInGroup() now. - - * API/APICast.h: (toJS): (toRef): Added converters for JSContextGroupRef. - * API/JSBase.cpp: (JSGarbageCollect): JSGarbageCollect(0) is now a no-op, and the passed in - context is actually used. - - * API/JSBase.h: Aded a typedef for JSContextGroupRef. Updated documentation for - JSGarbageCollect(). - - * JavaScriptCore.exp: Removed JSGlobalData::sharedInstance(). - - * kjs/JSGlobalData.cpp: - * kjs/JSGlobalData.h: - Removed support for JSGlobalData shared instance. JSGlobalData::isSharedInstance member - variable still remains, to be deleted in a followup patch. - - * kjs/JSLock.cpp: (KJS::JSLock::JSLock): Disabled JSLock, to be deleted in a follow-up patch. - - * kjs/collector.cpp: - (KJS::Heap::markOtherThreadConservatively): Removed an assertion that referenced - JSGlobalData::sharedInstance. - - * kjs/collector.h: Made Heap destructor public, so that JSContextRelease can use it. - -2008-07-29 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - Fix a leak of ThreadRegistrar objects. - - As the heap is usually deleted when registered threads still exist, ThreadSpecific doesn't - have a chance to clean up per-thread object. Switched to native pthread calls, storing a - plain pointer that doesn't require cleanup. - - * kjs/collector.cpp: - (KJS::PlatformThread::PlatformThread): - (KJS::Heap::Thread::Thread): - (KJS::Heap::Heap): - (KJS::Heap::~Heap): - (KJS::Heap::registerThread): - (KJS::Heap::unregisterThread): - * kjs/collector.h: - -2008-07-29 Alexey Proskuryakov - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=20169 - Memory allocated with fastMalloc is freed with delete - - * VM/JSPropertyNameIterator.cpp: - (KJS::JSPropertyNameIterator::invalidate): Free the array properly. - (KJS::JSPropertyNameIterator::~JSPropertyNameIterator): Delete the array by calling - invalidate(). - -2008-07-29 Mark Rowe - - Attempt to fix the Qt build. - - * wtf/ThreadingQt.cpp: Add the extra argument to createThread. - -2008-07-29 Adam Roben - - Change Vector::find to return an index instead of an iterator - - Indices are more natural than iterators when working with Vector. - - Reviewed by John Sullivan. - - * wtf/Vector.h: - (WTF::Vector::find): Changed to iterate the Vector manually and return - the index of the found item, rather than an iterator. When the item - could not be found, we return WTF::notFound. - -2008-07-29 Adam Roben - - Windows build fix - - * wtf/ThreadingWin.cpp: - (WTF::setThreadName): Move a misplaced assertion to here... - (WTF::createThread): ...from here. - -2008-07-29 Adam Roben - - Add support for setting thread names on Windows - - These thread names make it much easier to identify particular threads - in Visual Studio's Threads panel. - - WTF::createThread now takes a const char* representing the thread's - name. On Windows, we throw a special exception to set this string as - the thread's name. Other platforms do nothing with this name for now. - - Reviewed by Anders Carlsson. - - * JavaScriptCore.exp: Export the new version of createThread that - takes 3 arguments (the old one continues to be exported for backward - compatibility). - * wtf/Threading.h: Add a threadName argument to createThread. - - * wtf/ThreadingGtk.cpp: - (WTF::createThread): - * wtf/ThreadingNone.cpp: - (WTF::createThread): - Updated for function signature change. - - * wtf/ThreadingPthreads.cpp: - (WTF::createThread): Updated for function signature change. We keep - around the old 2-argument version of createThread for backward - compatibility. - - * wtf/ThreadingWin.cpp: - (WTF::setThreadName): Added. This function's implementation came from - MSDN. - (WTF::initializeThreading): Set the name of the main thread. - (WTF::createThread): Call setThreadName. We keep around the old - 2-argument version of createThread for backward compatibility. - -2008-07-29 Alexey Proskuryakov - - Reviewed by Oliver Hunt. - - Store UString::Rep::isStatic bit in identifierTable pointer instead of reportedCost for - slightly nicer code and a 0.5% SunSpider improvement. - - * API/JSClassRef.cpp: - (OpaqueJSClass::~OpaqueJSClass): - (OpaqueJSClassContextData::OpaqueJSClassContextData): - * API/JSStringRef.cpp: - (JSStringRelease): - * kjs/PropertyNameArray.cpp: - (KJS::PropertyNameArray::add): - * kjs/identifier.cpp: - (KJS::IdentifierTable::~IdentifierTable): - (KJS::IdentifierTable::add): - (KJS::Identifier::addSlowCase): - (KJS::Identifier::remove): - * kjs/identifier.h: - (KJS::Identifier::add): - * kjs/ustring.cpp: - (KJS::): - (KJS::UString::Rep::create): - (KJS::UString::Rep::destroy): - * kjs/ustring.h: - (KJS::UString::Rep::identifierTable): - (KJS::UString::Rep::setIdentifierTable): - (KJS::UString::Rep::isStatic): - (KJS::UString::Rep::setStatic): - (KJS::UString::cost): - -2008-07-28 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed "ConstructTypeNative" => "ConstructTypeHost". - -2008-07-26 Mark Rowe - - Speculative fix for the wx build. - - * JavaScriptCoreSources.bkl: Add JSStaticScopeObject.cpp to the list of source files. - -2008-07-25 Oliver Hunt - - RS=Cameron Zwarich. - - Whoops, forgot to save style correction. - - * kjs/JSStaticScopeObject.h: - -2008-07-25 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Bug 19718: Named anonymous functions are slow accessing global variables - - - To fix this we switch over to an activation-like scope object for - on which we attach the function name property, and add logic to - prevent cross scope assignment to read only properties. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::findScopedProperty): - (KJS::CodeGenerator::emitResolve): - * VM/CodeGenerator.h: - * kjs/AllInOneFile.cpp: - * kjs/JSStaticScopeObject.cpp: Added. - (KJS::JSStaticScopeObject::putWithAttributes): - (KJS::JSStaticScopeObject::isDynamicScope): - (KJS::JSStaticScopeObject::~JSStaticScopeObject): - (KJS::JSStaticScopeObject::getOwnPropertySlot): - * kjs/JSStaticScopeObject.h: Added. - (KJS::JSStaticScopeObject::JSStaticScopeObjectData::JSStaticScopeObjectData): - (KJS::JSStaticScopeObject::JSStaticScopeObject): - * kjs/nodes.cpp: - (KJS::FunctionCallResolveNode::emitCode): - (KJS::PostfixResolveNode::emitCode): - (KJS::PrefixResolveNode::emitCode): - (KJS::ReadModifyResolveNode::emitCode): - (KJS::AssignResolveNode::emitCode): - (KJS::FuncExprNode::makeFunction): - -2008-07-25 kevino - - wx build fix for Win. - - On wx/Win, including windows.h in Threading.h causes multiply-defined symbol errors - for libjpeg and wx, and also wx needs to include windows.h itself first for wx - includes to work right. So until we can find a better solution to this problem, - on wx, we work around the need to include windows.h here. - - * wtf/Threading.h: - -2008-07-25 Adam Roben - - Windows build fix - - * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add API/ to the - include path. - -2008-07-25 Simon Hausmann - - Fix the build of jsc on Qt/Windows, make sure os-win32 is in the - include search path (added by WebKit.pri). - - * kjs/jsc.pro: - -2008-07-25 Alexey Proskuryakov - - Reviewed by Simon Hausmann. - - Move JavaScriptCore API tests into a subdirectory of their own to avoid header name - conflicts and developer confusion. - - * API/JSNode.c: Removed. - * API/JSNode.h: Removed. - * API/JSNodeList.c: Removed. - * API/JSNodeList.h: Removed. - * API/Node.c: Removed. - * API/Node.h: Removed. - * API/NodeList.c: Removed. - * API/NodeList.h: Removed. - * API/minidom.c: Removed. - * API/minidom.html: Removed. - * API/minidom.js: Removed. - * API/testapi.c: Removed. - * API/testapi.js: Removed. - * API/tests: Added. - * API/tests/JSNode.c: Copied from JavaScriptCore/API/JSNode.c. - * API/tests/JSNode.h: Copied from JavaScriptCore/API/JSNode.h. - * API/tests/JSNodeList.c: Copied from JavaScriptCore/API/JSNodeList.c. - * API/tests/JSNodeList.h: Copied from JavaScriptCore/API/JSNodeList.h. - * API/tests/Node.c: Copied from JavaScriptCore/API/Node.c. - * API/tests/Node.h: Copied from JavaScriptCore/API/Node.h. - * API/tests/NodeList.c: Copied from JavaScriptCore/API/NodeList.c. - * API/tests/NodeList.h: Copied from JavaScriptCore/API/NodeList.h. - * API/tests/minidom.c: Copied from JavaScriptCore/API/minidom.c. - * API/tests/minidom.html: Copied from JavaScriptCore/API/minidom.html. - * API/tests/minidom.js: Copied from JavaScriptCore/API/minidom.js. - * API/tests/testapi.c: Copied from JavaScriptCore/API/testapi.c. - * API/tests/testapi.js: Copied from JavaScriptCore/API/testapi.js. - * GNUmakefile.am: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-07-25 Simon Hausmann - - Prospective WX build fix, add JavaScriptCore/API to the include search - path. - - * jscore.bkl: - -2008-07-25 Simon Hausmann - - Rubber-stamped by Lars. - - Fix the build on Windows. operator new for ArgList is implemented using fastMalloc() - but operator delete was not implemented. Unfortunately MSVC decides to call/reference - the function, so a simple implementation using fastFree() fixes the build. - - * kjs/ArgList.h: - (KJS::ArgList::operator delete): - -2008-07-25 Simon Hausmann - - Discussed with and rubber-stamped by Lars. - - Fix the build system for the Qt port. - - Recent JavaScriptCore changes require the addition of JavaScriptCore/API to the - include search path. With a build process that combines JavaScriptCore and - WebCore in one build process/Makefile the existance of - JavaScriptCore/API/Node.h and WebCore/dom/Node.h causes include conflicts. - - This commit solves this by introducing a separate build of JavaScriptCore into - a static library. - - As a result of the split-up a race-condition due to broken dependencies of - regular source files to header files of generated sources showed up very - frequently when doing parallel builds (which the buildbot does). This commit at - the same time tries to address the dependency problem by making the - addExtraCompiler() function also generate a pseudo extra compiler that - represents the header file output, so that qmake is aware of the creation of - the header file for dependency calculation. - - At the same time I removed a lot of cruft from the pro files to ease maintenance. - - * JavaScriptCore.pri: - * JavaScriptCore.pro: Added. - * kjs/jsc.pro: - -2008-07-24 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed a strict aliasing violation, which caused hash tables with floating - point keys not to find items that were indeed in the tables - (intermittently, and only in release builds, of course). - - SunSpider reports no change. - - This bug doesn't seem to affect any existing code, but it causes obvious - crashes in some new code I'm working on. - - * wtf/HashFunctions.h: - (WTF::FloatHash::hash): Use a union when punning between a float / double - and an unsigned (bucket of bits). With strict aliasing enabled, unions - are the only safe way to do this kind of type punning. - - * wtf/HashTable.h: When rehashing, ASSERT that the item we just added to - the table is indeed in the table. In the buggy case described above, this - ASSERT fires. - -2008-07-24 Oliver Hunt - - Reviewed by Alexey Proskuryakov. - - Bug 20142: REGRESSION(r35245): /=/ weirdness - - - When adding all the meta data needed for exception error messages - I accidentally clobbered the handling of regex beginning with /=. - - * kjs/grammar.y: - -2008-07-23 Alp Toker - - Build fix after r35293: Add API/ to the include path. - - * GNUmakefile.am: - -2008-07-23 Adam Roben - - Windows build fixes - - Build fix after r35293: - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add API/ - to the include path. - - Build fix after r35305: - - * VM/Machine.cpp: - * VM/Machine.h: - * VM/Opcode.cpp: - * VM/Opcode.h: - Completely compile out all sampler-related code when - SAMPLING_TOOL_ENABLED is 0. The sampler code can't be compiled 1) on - non-AllInOne configurations due to circular header dependencies, and - 2) on platforms that don't have a usleep() function, such as Windows. - -2008-07-23 Oliver Hunt - - Reviewed by Geoff Garen and Sam Weinig. - - Improve switch performance. - - Improve switch performance by converting to a hashmap based jump - table to avoid the sequence of dispatches that would otherwise be - needed. This results in a 9-19x performance win for string switches - based on ad hoc testing, and a 6x improvement for integer switch - statements. SunSpider reports a 1.2% progression. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - (KJS::SimpleJumpTable::offsetForValue): - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::beginSwitch): - (KJS::prepareJumpTableForImmediateSwitch): - (KJS::prepareJumpTableForCharacterSwitch): - (KJS::prepareJumpTableForStringSwitch): - (KJS::CodeGenerator::endSwitch): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::offsetForStringSwitch): - (KJS::Machine::privateExecute): - * VM/Opcode.cpp: - (KJS::): - * VM/Opcode.h: - * kjs/JSImmediate.h: - * kjs/nodes.cpp: - (KJS::): - (KJS::processClauseList): - (KJS::CaseBlockNode::tryOptimisedSwitch): - (KJS::CaseBlockNode::emitCodeForBlock): - * kjs/nodes.h: - (KJS::SwitchInfo::): - -2008-07-23 Gavin Barraclough - - Reviewed by Geoff Garen. - - Sampling tool to analyze cost of instruction execution and identify hot regions of JS code. - Enable Switches by setting SAMPLING_TOOL_ENABLED in Opcode.h. - - * JavaScriptCore.exp: Export symbols for Shell.cpp. - * VM/Machine.cpp: Added sampling hooks. - * VM/Machine.h: Machine contains a pointer to a sampler, when sampling. - * VM/Opcode.cpp: Tool implementation. - * VM/Opcode.h: Tool declaration. - * kjs/Shell.cpp: Initialize the sampler, if enabled. - * kjs/nodes.cpp: Added sampling hooks. - -2008-07-23 Gabor Loki - - Bug 20097: [Qt] 20% Sunspider slow-down - - - - Reviewed by Simon Hausmann. - - * kjs/jsc.pro: Added missing NDEBUG define for release builds. - -2008-07-23 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - JSClassRef is created context-free, but gets infatuated with the first context it sees. - - The implicit API contract is that JSClassRef can be used with any context on any thread. - This no longer worked, because UStrings in the class were turned into per-context - identifiers, and the cached JSObject prototype was tied to JSGlobalData, too. - - * API/JSClassRef.h: Made a separate struct for context-dependent parts of OpaqueJSClass. - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): Updated for renames and changed member variable order. - (OpaqueJSClass::~OpaqueJSClass): Assert that string members are not identifiers. - (clearReferenceToPrototype): Update for the new reference location. - (OpaqueJSClassContextData::OpaqueJSClassContextData): Make a deep copy of all strings. - (OpaqueJSClass::contextData): Added a function that finds the per-context part of - OpaqueJSClass in JSGlobalData, or creates it if not found. - (OpaqueJSClass::className): Always make a deep copy. Callers of this function do not have - a way to access JSGlobalData, so a per-context copy could not be made. - (OpaqueJSClass::staticValues): Updated for new data location. - (OpaqueJSClass::staticFunctions): Ditto. - (OpaqueJSClass::prototype): Changed to take an internal type for consistency. - - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::JSGlobalData): - (KJS::JSGlobalData::~JSGlobalData): - * kjs/JSGlobalData.h: - Keep a HashMap to access per-context JSClass data given a pointr to the shared part. - - * API/JSCallbackObjectFunctions.h: - (KJS::::className): - (KJS::::getOwnPropertySlot): - (KJS::::put): - (KJS::::deleteProperty): - (KJS::::getPropertyNames): - (KJS::::staticValueGetter): - (KJS::::staticFunctionGetter):j - Use function accessors instead of accessing OpaqueJSClass members directly. - - * API/JSContextRef.cpp: (JSGlobalContextCreate): Updated for the change in - OpaqueJSClass::prototype() argument type. - - * API/JSObjectRef.cpp: - (JSObjectMake): Updated for the change in OpaqueJSClass::prototype() argument type. - (JSObjectMakeConstructor): Ditto. - -2008-07-23 Alexey Proskuryakov - - Build fix. - - * kjs/ArgList.h: (KJS::ArgList::operator new): removed an extraneous "ArgList::" inside the - class definition. - -2008-07-22 Geoffrey Garen - - Reviewed by Oliver Hunt and Sam Weinig. - - Next step toward putting doubles in registers: Prepare the Register class - and its clients for registers that don't contain JSValue*s. - - This means a few things: - - 1. Register::jsValue() clients, including ArgList clients, must now supply - an ExecState* when accessing an entry in an ArgList, in case the entry - will need to create a JSValue* on the fly. - - 2. Register clients that definitely don't want to create a JSValue* on - the fly now use different APIs: getJSValue() for clients that know - the register contains a JSValue*, and v() for clients who just want a - void*. - - 3. I had to change some headers around in order to resolve dependency - problems created by using a Register in the ArgList header. - - SunSpider reports no change. - -2008-07-22 Gavin Barraclough - - Reviewed by Alexey Proskuryakov. - - Prevent integer overflow when reallocating storage vector for arrays. - - Sunspider reports 1.005x as fast (no change expected). - - * kjs/JSArray.cpp: - -2008-07-21 Mark Rowe - - Reviewed by Sam Weinig. - - Revamp the handling of CFBundleShortVersionString to be fixed at the major component of the version number. - - * Configurations/Version.xcconfig: - * Info.plist: - -2008-07-21 Adam Roben - - Add Vector::find - - This is a convenience wrapper around std::find. - - Reviewed by Anders Carlsson. - - * wtf/Vector.h: - -2008-07-19 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Bug 20104: Exception in tables/mozilla_expected_failures/bugs/bug92868_1.html includes the equals operator in the quoted expression - - - To make this correct we make the dot and bracket assign nodes emit the information to indicate - the failure range is the dot/bracket accessor. - - * kjs/grammar.y: - -2008-07-18 Steve Falkenburg - - Windows build fix. - - * kjs/JSGlobalObjectFunctions.cpp: - (KJS::isStrWhiteSpace): - -2008-07-18 Steve Falkenburg - - Windows build fix. - - * kjs/nodes.h: - (KJS::ThrowableExpressionData::ThrowableExpressionData): - -2008-07-18 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Bug 18774: SQUIRRELFISH: print meaningful error messages - SQUIRRELFISH: JavaScript error messages are missing informative text - - Add support for decent error messages in JavaScript. This patch achieves this by providing - ensuring the common errors and exceptions have messages that provide the text of expression - that trigger the exception. In addition it attaches a number of properties to the exception - object detailing where in the source the expression came from. - - * JavaScriptCore.exp: - * VM/CodeBlock.cpp: - (KJS::CodeBlock::lineNumberForVPC): - (KJS::CodeBlock::expressionRangeForVPC): - Function to recover the expression range for an instruction - that triggered an exception. - * VM/CodeBlock.h: - (KJS::ExpressionRangeInfo::): - (KJS::CodeBlock::CodeBlock): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitCall): - (KJS::CodeGenerator::emitCallEval): - Emit call needed to be modified so to place the expression range info internally, - as the CodeGenerator emits the arguments nodes itself, rather than the various call - nodes. - * VM/CodeGenerator.h: - (KJS::CodeGenerator::emitExpressionInfo): - Record the expression range info. - * VM/ExceptionHelpers.cpp: - (KJS::createErrorMessage): - (KJS::createInvalidParamError): - (KJS::createUndefinedVariableError): - (KJS::createNotAConstructorError): - (KJS::createNotAFunctionError): - (KJS::createNotAnObjectErrorStub): - (KJS::createNotAnObjectError): - Rewrite all the code for the error messages so that they make use of the newly available - information. - * VM/ExceptionHelpers.h: - * VM/Machine.cpp: - (KJS::isNotObject): Now needs vPC and codeBlock - (KJS::Machine::throwException): - New logic to handle the NotAnObjectErrorStub and to handle the absurd "no default value" edge case - (KJS::Machine::privateExecute): - * VM/Machine.h: - * kjs/DebuggerCallFrame.cpp: - (KJS::DebuggerCallFrame::evaluate): - * kjs/Error.cpp: - (KJS::Error::create): - * kjs/Error.h: - * kjs/JSGlobalObjectFunctions.cpp: - * kjs/JSImmediate.cpp: - (KJS::JSImmediate::toObject): - (KJS::JSImmediate::prototype): - My changes to the JSNotAnObject constructor needed to be handled here. - * kjs/JSNotAnObject.h: - (KJS::JSNotAnObjectErrorStub::JSNotAnObjectErrorStub): - (KJS::JSNotAnObjectErrorStub::isNull): - (KJS::JSNotAnObjectErrorStub::isNotAnObjectErrorStub): - Added a JSNotAnObjectErrorStub class to ease the handling of toObject failure exceptions, - and potentially allow even more detailed error messages in future. - * kjs/JSObject.h: - * kjs/Parser.h: - (KJS::Parser::parse): - * kjs/SourceRange.h: - * kjs/grammar.y: - Large amounts of position propagation. - * kjs/lexer.cpp: - (KJS::Lexer::Lexer): - (KJS::Lexer::shift): - (KJS::Lexer::lex): - The lexer needed a few changes to be able to correctly track token character positions. - * kjs/lexer.h: - * kjs/nodes.cpp: - (KJS::ThrowableExpressionData::emitThrowError): - (KJS::StatementNode::StatementNode): - (KJS::ResolveNode::emitCode): - (KJS::BracketAccessorNode::emitCode): - (KJS::DotAccessorNode::emitCode): - (KJS::NewExprNode::emitCode): - (KJS::EvalFunctionCallNode::emitCode): - (KJS::FunctionCallValueNode::emitCode): - (KJS::FunctionCallResolveNode::emitCode): - (KJS::FunctionCallBracketNode::emitCode): - (KJS::FunctionCallDotNode::emitCode): - (KJS::PostfixResolveNode::emitCode): - (KJS::PostfixBracketNode::emitCode): - (KJS::PostfixDotNode::emitCode): - (KJS::DeleteResolveNode::emitCode): - (KJS::DeleteBracketNode::emitCode): - (KJS::DeleteDotNode::emitCode): - (KJS::PrefixResolveNode::emitCode): - (KJS::PrefixBracketNode::emitCode): - (KJS::PrefixDotNode::emitCode): - (KJS::ThrowableBinaryOpNode::emitCode): - (KJS::ReadModifyResolveNode::emitCode): - (KJS::AssignResolveNode::emitCode): - (KJS::AssignDotNode::emitCode): - (KJS::ReadModifyDotNode::emitCode): - (KJS::AssignBracketNode::emitCode): - (KJS::ReadModifyBracketNode::emitCode): - (KJS::ForInNode::ForInNode): - (KJS::ForInNode::emitCode): - (KJS::WithNode::emitCode): - (KJS::LabelNode::emitCode): - (KJS::ThrowNode::emitCode): - (KJS::ProgramNode::ProgramNode): - (KJS::ProgramNode::create): - (KJS::EvalNode::generateCode): - (KJS::FunctionBodyNode::create): - (KJS::FunctionBodyNode::generateCode): - (KJS::ProgramNode::generateCode): - All of these methods were handling the position information. - Constructors and create methods were modified to store the information. - All the emitCall implementations listed needed to be updated to actually - record the position information we have so carefully collected. - * kjs/nodes.h: - (KJS::ThrowableExpressionData::ThrowableExpressionData): - (KJS::ThrowableExpressionData::setExceptionSourceRange): - (KJS::ThrowableExpressionData::divot): - (KJS::ThrowableExpressionData::startOffset): - (KJS::ThrowableExpressionData::endOffset): - (KJS::ThrowableSubExpressionData::ThrowableSubExpressionData): - (KJS::ThrowableSubExpressionData::setSubexpressionInfo): - (KJS::ThrowablePrefixedSubExpressionData::ThrowablePrefixedSubExpressionData): - (KJS::ThrowablePrefixedSubExpressionData::setSubexpressionInfo): - ThrowableExpressionData is just a uniform mechanism for storing the position - information. - (KJS::ResolveNode::): - (KJS::PrePostResolveNode::): - (KJS::ThrowableBinaryOpNode::): - (KJS::WithNode::): - -2008-07-18 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Three renames: - - "CallTypeNative" => "CallTypeHost" - "code" => "byteCode" - "generatedCode" => "generatedByteCode" - -2008-07-18 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Optimized <= for immediate number cases. - - SunSpider reports no overall change, but a 10% speedup on access-nsieve. - -2008-07-18 Mark Rowe - - Rubber-stamped by Sam Weinig. - - Fix some casts added in a previous build fix to match the style used - throughout WebKit. - - * VM/Machine.cpp: - (KJS::Machine::initializeCallFrame): - * VM/Register.h: - (KJS::Register::Register): - -2008-07-18 Landry Breuil - - Bug 19975: [OpenBSD] Patches to enable build of WebKit - - - - Reviewed by David Kilzer. - - Support for OpenBSD, mostly threading and libm tweaks. - - * kjs/collector.cpp: #include - (KJS::currentThreadStackBase): use pthread_stackseg_np() to get stack base - * kjs/config.h: OpenBSD also provides - * wtf/MathExtras.h: #include and - (isfinite), (signbit): as long as we don't have those functions provide fallback implementations - * wtf/Platform.h: Add support for PLATFORM(OPENBSD) and PLATFORM(SPARC64) macro - -2008-07-17 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Next step toward putting doubles in registers: Store constant pool - entries as registers, not JSValue*s. - - SunSpider reports no change. - -2008-07-17 Geoffrey Garen - - Reviewed by John Sullivan and Oliver Hunt. - - A tiny bit of tidying in function call register allocation. - - This patch saves one register when invoking a function expression and/or - a new expression that is stored in a temporary. - - Since it's just one register, I can't make a testcase for it. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitCall): No need to ref the function we're calling - or its base. We'd like the call frame to overlap with them, if possible. - op_call will read the function and its base before writing the call frame, - so this is safe. - - * kjs/nodes.cpp: - (KJS::NewExprNode::emitCode): No need to ref the function we're new-ing, - for the same reasons stated above. - - (KJS::FunctionCallValueNode::emitCode): ditto - -2008-07-17 Steve Falkenburg - - Build fix. - - * kjs/InternalFunction.cpp: - -2008-07-17 Sam Weinig - - Roll out r35199 as it is causing failures on the PPC build. - -2008-07-17 Geoffrey Garen - - Reviewed by David Kilzer. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=20067 - Support function.name (Firefox extension) - - Pretty straight-forward. - -2008-07-17 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed Functions calls use more temporary - registers than necessary - - Holding a reference to the last statement result register caused each - successive statement to output its result to an even higher register. - - Happily, statements don't actually need to return a result register - at all. I hope to make this clearer in a future cleanup patch, - but this change will fix the major bug for now. - - * kjs/nodes.cpp: - (KJS::statementListEmitCode): - -2008-07-17 Gavin Barraclough - - Reviewed by Sam Weinig. - - Merge pre&post dot nodes to simplify the parse tree. - Sunspider results show 0.6% progression (no performance change expected). - - * kjs/grammar.y: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - -2008-07-17 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Merge pre&post resolve nodes to simplify the parse tree. - Sunspider results show no performance change. - - * kjs/grammar.y: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - -2008-07-17 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Merge logical nodes to simplify the parse tree. - Sunspider results show 0.6% progression (no performance change expected). - - * kjs/grammar.y: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - -2008-07-17 Ariya Hidayat - - Reviewed by Simon. - - Fix MinGW build (broken in r35198) and simplify getLocalTime(). - - * kjs/DateMath.cpp: - (KJS::getLocalTime): - -2008-07-17 Gavin Barraclough - - Reviewed by Sam Weinig. - - Merge pre&post bracket nodes to simplify the parse tree. - Sunspider results show no performance change. - - * kjs/grammar.y: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - -2008-07-17 Ariya Hidayat - - Reviewed by Simon. - - Fix the 32-bit gcc builds, conversion from "long int" to Register is - ambiguous. Explicitly choose the intptr_t constructor. - - * VM/Machine.cpp: - (KJS::Machine::initializeCallFrame): - * VM/Register.h: - (KJS::Register::Register): - -2008-07-16 Mark Rowe - - Rubber-stamped by Geoff Garen. - - Fix JavaScript in 64-bit by using a pointer-sized integer - type in the Register union. Also includes a rename of - the intType constant to IntType. - - * VM/Machine.cpp: - (KJS::Machine::initializeCallFrame): - * VM/Register.h: - (KJS::Register::): - (KJS::Register::Register): - -2008-07-17 Geoffrey Garen - - Reviewed by Oliver Hunt. - - First step toward putting doubles in registers: Turned Register into a - proper abstraction layer. It is no longer possible to cast a Register - to a JSValue*, or a Register& to a JSValue*&, or to access the union - inside a Register directly. - - SunSpider reports no change. - - In support of this change, I had to make the following mechanical changes - in a lot of places: - - 1. Clients now use explicit accessors to read data out of Registers, and - implicit copy constructors to write data into registers. - - So, assignment that used to look like - - x.u.jsValue = y; - - now looks like - - x = y; - - And access that used to look like - - x = y.u.jsValue; - - now looks like - - x = y.jsValue(); - - 2. I made generic flow control specific in opcodes that made their flow - control generic by treating a Register& as a JSValue*&. This had the - added benefit of removing some exception checking branches from immediate - number code. - - 3. I beefed up PropertySlot to support storing a Register* in a property - slot. For now, only JSVariableObject's symbolTableGet and symbolTablePut - use this functionality, but I expect more clients to use it in the future. - - 4. I changed ArgList to be a buffer of Registers, not JSValue*'s, and I - changed ArgList iterator clients to iterate Registers, not JSValue*'s. - -2008-07-16 Ada Chan - - Fixed build. - - * kjs/JSGlobalObject.cpp: - -2008-07-16 Kevin McCullough - - Reviewed by Sam and Geoff. - - Navigating to another page while profiler is - attached results in slow JavaScript for all time. - - - The UNLIKELY keeps this from being a sunspider performance regression. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::~JSGlobalObject): Stop the profiler associated - with this exec state. - -2008-07-16 Sam Weinig - - Reviewed by Steve Falkenburg. - - Replace adopting UString constructor in favor of explicit - static adopt method. - - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): - * kjs/StringConstructor.cpp: - (KJS::stringFromCharCode): - * kjs/StringPrototype.cpp: - (KJS::stringProtoFuncToLowerCase): - (KJS::stringProtoFuncToUpperCase): - (KJS::stringProtoFuncToLocaleLowerCase): - (KJS::stringProtoFuncToLocaleUpperCase): - * kjs/ustring.cpp: - (KJS::UString::adopt): - * kjs/ustring.h: - (KJS::UString::UString): - (KJS::UString::~UString): - -2008-07-16 Ariya Hidayat - - Reviewed by Simon. - - http://trolltech.com/developer/task-tracker/index_html?method=entry&id=216179 - Fix potential crash (on Qt for Windows port) when performing JavaScript date - conversion. - - * kjs/DateMath.cpp: - (KJS::getLocalTime): For the Qt port, prefer to use Windows code, i.e. - localtime_s() instead of localtime() since the latter might crash (on Windows) - given a non-sensible, e.g. NaN, argument. - -2008-07-16 Alexey Proskuryakov - - Reviewed by Anders and Geoff. - - https://bugs.webkit.org/show_bug.cgi?id=20023 - Failed assertion in PropertyNameArray.cpp - - This is already tested by testapi. - - * API/JSObjectRef.cpp: (JSPropertyNameAccumulatorAddName): Add the string to identifier - table to appease PropertyNameArray. - -2008-07-16 Alexey Proskuryakov - - Reviewed by Geoff. - - Dereference identifiers when deleting a hash table (fixes leaks with private JSGlobalData - objects). - - * kjs/JSGlobalData.cpp: (KJS::JSGlobalData::~JSGlobalData): - * kjs/lookup.cpp: (KJS::HashTable::deleteTable): - * kjs/lookup.h: - * kjs/lexer.cpp: (KJS::Lexer::~Lexer) - HashTable cannot have a destructor, because check-for-global-initializers complains about - having a global constructor then. - -2008-07-16 Alexey Proskuryakov - - Reviewed by Geoff. - - Check pthread_key_create return value. - - This check was helpful when debugging a crash in run-webkit-tests --threaded that happened - because JSGlobalData objects were not deleted, and we were running out of pthread keys soon. - It also looks useful for production builds. - - * wtf/ThreadSpecific.h: (WTF::::ThreadSpecific): - -2008-07-15 Kevin McCullough - - Reviewed by Geoff. - - Rename pageGroupIdentifier to profileGroup to keep mention of a - pageGroup out of JavaScriptCore. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::init): - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::setProfileGroup): - (KJS::JSGlobalObject::profileGroup): - * profiler/ProfileGenerator.cpp: - (KJS::ProfileGenerator::create): - (KJS::ProfileGenerator::ProfileGenerator): - * profiler/ProfileGenerator.h: - (KJS::ProfileGenerator::profileGroup): - * profiler/Profiler.cpp: - (KJS::Profiler::startProfiling): - (KJS::dispatchFunctionToProfiles): - (KJS::Profiler::willExecute): - (KJS::Profiler::didExecute): - -2008-07-14 Mark Rowe - - Reviewed by Sam Weinig. - - Fix https://bugs.webkit.org/show_bug.cgi?id=20037 - Bug 20037: GCC 4.2 build broken due to strict aliasing violation. - - * kjs/ustring.cpp: - (KJS::UString::Rep::computeHash): Add a version of computeHash that takes a char* and explicit length. - * kjs/ustring.h: - * profiler/CallIdentifier.h: - (WTF::): Use new version of computeHash that takes a char* and explicit length to avoid unsafe aliasing. - -2008-07-14 David Hyatt - - Fix a crashing bug in ListHashSet's -- operator. Make sure that end() can be -- by special-casing the null - position. - - Reviewed by Maciej - - * wtf/ListHashSet.h: - (WTF::ListHashSetConstIterator::operator--): - -2008-07-14 David Hyatt - - Buidl fix. Make sure the second insertBefore method returns a value. - - * wtf/ListHashSet.h: - (WTF::::insertBefore): - -2008-07-14 Adam Roben - - Windows build fix - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Added include/pthreads to the - include path. - -2008-07-14 Alexey Proskuryakov - - Reviewed by Kevin McCullough. - - Make JSGlobalData refcounted in preparation to adding a way to create contexts that share - global data. - - * JavaScriptCore.exp: - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::create): - * kjs/JSGlobalData.h: - Made contructor private, and added a static create() method. Made the class inherit from - RefCounted. - - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::globalData): - JSGlobalData is now owned by JSGlobalObject (except for the shared one, and the common - WebCore one, which are never deleted). - - * kjs/Shell.cpp: (main): Create JSGlobalData with create() method. - -2008-07-14 Simon Hausmann - - Fix the single-threaded build. - - * kjs/JSLock.cpp: Removed undeclared registerThread() function. - * kjs/collector.cpp: - (KJS::Heap::registerThread): Added dummy implementation. - -2008-07-14 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - Eliminate per-thread JavaScript global data instance support and make arbitrary - global data/global object combinations possible. - - * kjs/collector.cpp: - (KJS::Heap::Heap): Store a JSGlobalData pointer instead of multiple pointers to its members. - This allows for going from any JS object to its associated global data, currently used in - JSGlobalObject constructor to initialize its JSGlobalData pointer. - (KJS::Heap::registerThread): Changed thread registration data to be per-heap. Previously, - only the shared heap could be used from multiple threads, so it was the only one that needed - thread registration, but now this can happen to any heap. - (KJS::Heap::unregisterThread): Ditto. - (KJS::Heap::markStackObjectsConservatively): Adapt for the above changes. - (KJS::Heap::setGCProtectNeedsLocking): Ditto. - (KJS::Heap::protect): Ditto. - (KJS::Heap::unprotect): Ditto. - (KJS::Heap::collect): Ditto. - (KJS::Heap::globalObjectCount): Use global object list associated with the current heap, - not the late per-thread one. - (KJS::Heap::protectedGlobalObjectCount): Ditto. - - * kjs/collector.h: - (KJS::Heap::ThreadRegistrar): Added a helper object that unregisters a thread when it is - destroyed. - - * kjs/JSLock.cpp: - (KJS::JSLock::JSLock): - * kjs/JSLock.h: - (KJS::JSLock::JSLock): - Don't use JSLock to implicitly register threads. I've added registerThread() calls to most - places that use JSLock - we cannot guarantee absolute safety unless we always mark all - threads in the process, but these implicit registration calls should cover reasonable usage - scenarios, I hope. - - * API/JSBase.cpp: - (JSEvaluateScript): Explicitly register the current thread. - (JSCheckScriptSyntax): Explicitly register the current thread. - (JSGarbageCollect): Changed to use the passed in context. Unfortunately, this creates a race - condition for clients that pass an already released context to JSGarbageCollect - but it is - unlikely to create real life problems. - To maintain compatibility, the shared heap is collected if NULL is passed. - - * API/JSContextRef.cpp: - (JSGlobalContextCreate): Use a new syntax for JSGlobalObject allocation. - (JSGlobalContextRetain): Register the thread. - (JSContextGetGlobalObject): Register the thread. - - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeConstructor): - (JSObjectMakeFunction): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - (JSObjectDeleteProperty): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - (JSObjectCopyPropertyNames): - (JSPropertyNameAccumulatorAddName): - * API/JSValueRef.cpp: - (JSValueIsEqual): - (JSValueIsInstanceOfConstructor): - (JSValueMakeNumber): - (JSValueMakeString): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - (JSValueUnprotect): - Register the thread. - - * API/JSStringRef.cpp: (JSStringRelease): Changed a comment to not mention per-thread contexts. - - * API/JSStringRefCF.cpp: Removed an unnecessary include of JSLock.h. - - * JavaScriptCore.exp: Export JSGlobalData constructor/destructor, now that anyone can have - their own instances. Adapt to other changes, too. - - * JavaScriptCore.xcodeproj/project.pbxproj: Made ThreadSpecific.h private, as it is now - included by collector.h and is thus needed in other projects. - - * kjs/InitializeThreading.cpp: (KJS::initializeThreadingOnce): Don't initialize per-thread - global data, as it no longer exists. - - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::JSGlobalData): - (KJS::JSGlobalData::~JSGlobalData): - * kjs/JSGlobalData.h: - Removed support for per-thread instance. Made constructor and destructor public. - - * kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::init): Get to now arbitrary JSGlobalData - via the heap. - (KJS::JSGlobalObject::operator new): Changed ot take JSGlobalDatra pointer. - * kjs/JSGlobalObject.h: - - * kjs/Shell.cpp: - (main): - (jscmain): - Changed to maintain a custom JSGlobalData pointer instead of a per-thread one. - -2008-07-13 Ada Chan - - Windows build fix: Add wtf/RefCountedLeakCounter to the project. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2008-07-12 Jan Michael Alonzo - - Gtk, Qt and Wx build fix: Add wtf/RefCountedLeakCounter in the - build scripts - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCoreSources.bkl: - -2008-07-11 Stephanie Lewis - - Reviewed by Darin Adler and Oliver Hunt. - - Refactor RefCounting Leak counting code into a common class. - - In order to export the symbols I needed to put the debug defines inside the function names - - Before we had a separate channel for each Logging each Leak type. Since the leak channels were only used in one location, and only at quit for simplicity I combined them all into one leak channel. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: add new class - * kjs/nodes.cpp: remove old leak counting code - * wtf/RefCountedLeakCounter.cpp: Added. create a common leak counting class - * wtf/RefCountedLeakCounter.h: Added. - -2008-07-11 David Hyatt - - Add an insertBefore method to ListHashSet to allow for insertions in the middle of the list (rather than just - at the end). - - Reviewed by Anders - - * wtf/ListHashSet.h: - (WTF::::insertBefore): - (WTF::::insertNodeBefore): - -2008-07-11 Sam Weinig - - Rubber-stamped by Darin Adler. - - Move call function to CallData.cpp and construct to ConstructData.cpp. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/CallData.cpp: Copied from kjs/JSValue.cpp. - * kjs/ConstructData.cpp: Copied from kjs/JSValue.cpp. - * kjs/JSValue.cpp: - -2008-07-10 Mark Rowe - - Reviewed by Sam Weinig. - - Define WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST when building WebKit to ensure that no symbols end up with the weak_import attribute. - - * Configurations/Base.xcconfig: - -2008-07-10 Mark Rowe - - Reviewed by Sam Weinig. - - Fix the Tiger build by omitting annotations from methods declared in categories when using old versions of GCC. - - * API/WebKitAvailability.h: - -2008-07-10 Kevin McCullough - - Reviewed by Darin. - - -Minor cleanup. Renamed callTree() to head() and no longer use m_head - directly but instead keep it private and access via a method(). - - * profiler/HeavyProfile.cpp: - (KJS::HeavyProfile::HeavyProfile): - (KJS::HeavyProfile::generateHeavyStructure): - (KJS::HeavyProfile::addNode): - * profiler/Profile.h: - (KJS::Profile::head): - * profiler/ProfileGenerator.cpp: - (KJS::ProfileGenerator::ProfileGenerator): - -2008-07-10 Alexey Proskuryakov - - Reviewed by Mark Rowe. - - Eliminate CollectorHeapIntrospector. - - CollectorHeapIntrospector was added primarily in the hopes to improve leaks tool output, - a result that it didn't deliver. Also, it helped by labeling JSC heap regions as reported by - vmmap tool, but at the same time, it made them mislabeled as malloc'd ones - the correct - way to label mapped regions is to use a VM tag. - - So, it makes more sense to remove it completely than to make it work with multiple heaps. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/AllInOneFile.cpp: - * kjs/InitializeThreading.cpp: - (KJS::initializeThreading): - * kjs/collector.cpp: - * kjs/collector.h: - * kjs/CollectorHeapIntrospector.cpp: Removed. - * kjs/CollectorHeapIntrospector.h: Removed. - -2008-07-09 Kevin McCullough - - Reviewed by Darin. - - JSProfiler: Implement heavy (or bottom-up) - view (19228) - - Implemented the time and call count portionof heavy. Now all that we - need is some UI. - - * profiler/CallIdentifier.h: Removed an unused constructor. - * profiler/HeavyProfile.cpp: - (KJS::HeavyProfile::HeavyProfile): Set the initial time of the head - node so that percentages work correctly. - (KJS::HeavyProfile::mergeProfiles): Sum the times and call count of - nodes being merged. - * profiler/ProfileNode.cpp: Set the intital values of time and call - count when copying ProfileNodes. - (KJS::ProfileNode::ProfileNode): - -2008-07-10 Jan Michael Alonzo - - Gtk build fix. - - * GNUmakefile.am: Add HeavyProfile.cpp - -2008-07-09 Mark Rowe - - Reviewed by Geoff Garen. - - Don't warn about deprecated functions in production builds. - - * Configurations/Base.xcconfig: - * Configurations/DebugRelease.xcconfig: - -2008-07-09 Darin Adler - - * JavaScriptCore.pri: Fix Qt build by adding HeavyProfile.cpp. - -2008-07-09 Kevin Ollivier - - wx biuld fix. Add HeavyProfile.cpp to build files. - - * JavaScriptCoreSources.bkl: - -2008-07-09 Kevin McCullough - - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-07-09 Kevin McCullough - - - Build fix. - - * profiler/HeavyProfile.cpp: - (KJS::HeavyProfile::mergeProfiles): - -2008-07-09 Kevin McCullough - - Reviewed by Geoff and Adam. - - JSProfiler: Implement Bottom-Up view (19228) - - This is the plumbing for bottom-up, but does not include calculating - time, mostly because I'm still undclear about what the end result should - look like. - - This, obviously, does not include the UI to expose this in the - inspector yet. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * profiler/CallIdentifier.h: - (KJS::CallIdentifier::CallIdentifier): - (WTF::): Added HashTraits for CallIdentifiers to be used by a HashMap. - * profiler/HeavyProfile.cpp: Added. - (KJS::HeavyProfile::HeavyProfile): - (KJS::HeavyProfile::generateHeavyStructure): - (KJS::HeavyProfile::addNode): - (KJS::HeavyProfile::mergeProfiles): - (KJS::HeavyProfile::addAncestorsAsChildren): - * profiler/HeavyProfile.h: Added. - (KJS::HeavyProfile::create): - (KJS::HeavyProfile::heavyProfile): - (KJS::HeavyProfile::treeProfile): - * profiler/Profile.cpp: Removed old commented out includes. - * profiler/Profile.h: The m_head is needed by the HeavyProfile so it - is now protected as opposed to private. - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::ProfileNode): Created a constructor to copy - ProfileNodes. - (KJS::ProfileNode::findChild): Added a null check to make HeavyProfile - children finding easier and avoid a potential crasher. - * profiler/ProfileNode.h: Mostly moved things around but also added some - functionality needed by HeavyProfile. - (KJS::ProfileNode::create): - (KJS::ProfileNode::functionName): - (KJS::ProfileNode::url): - (KJS::ProfileNode::lineNumber): - (KJS::ProfileNode::head): - (KJS::ProfileNode::setHead): - (KJS::ProfileNode::setNextSibling): - (KJS::ProfileNode::actualTotalTime): - (KJS::ProfileNode::actualSelfTime): - * profiler/TreeProfile.cpp: Implemented the ability to get a - HeavyProfile. - (KJS::TreeProfile::heavyProfile): - * profiler/TreeProfile.h: - -2008-07-08 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Added support for checking if an object has custom properties in its - property map. WebCore uses this to optimize marking DOM wrappers. - -2008-07-08 Simon Hausmann - - Prospective Gtk/Wx build fixes, add ProfileGenerator.cpp to the build. - - * GNUmakefile.am: - * JavaScriptCoreSources.bkl: - -2008-07-08 Simon Hausmann - - Fix the Qt build, add ProfileGenerator.cpp to the build. - - * JavaScriptCore.pri: - -2008-07-07 David Kilzer - - releaseFastMallocFreeMemory() should always be defined - - Reviewed by Darin. - - * JavaScriptCore.exp: Changed to export C++ binding for - WTF::releaseFastMallocFreeMemory() instead of C binding for - releaseFastMallocFreeMemory(). - * wtf/FastMalloc.cpp: Moved definitions of - releaseFastMallocFreeMemory() to be in the WTF namespace - regardless whether FORCE_SYSTEM_MALLOC is defined. - * wtf/FastMalloc.h: Moved releaseFastMallocFreeMemory() from - extern "C" binding to WTF::releaseFastMallocFreeMemory(). - -2008-07-07 Cameron Zwarich - - Reviewed by Geoff. - - Bug 19926: URL causes crash within a minute - - - Add a check that lastGlobalObject is non-null in Machine::execute() - before copying its globals to the current register file. - - In theory, it is possible to make a test case for this, but it will - take a while to get it right. - - * VM/Machine.cpp: - (KJS::Machine::execute): - -2008-07-07 Darin Adler - - Rubber stamped by Adele. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Fix a typo in a comment. - -2008-07-07 Steve Falkenburg - - Build fixes. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - -2008-07-07 Kevin McCullough - - Reviewed by Darin. - - When the profiler is running it gathers information and creates a - Profile. After it finishes the Profile can be sorted and have other - data refinements run over it. Both of these were done in the same class - before. Now I split the gathering operations into a new class called - ProfileGenerator. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * profiler/Profile.cpp: Removed code related to the gather stage of a - Profile's creation. - (KJS::Profile::create): - (KJS::Profile::Profile): - * profiler/Profile.h: Ditto. - (KJS::Profile::title): - (KJS::Profile::callTree): - (KJS::Profile::setHead): - * profiler/ProfileGenerator.cpp: Added. This is the class that will - handle the stage of creating a Profile. Once the Profile is finished - being created, this class goes away. - (KJS::ProfileGenerator::create): - (KJS::ProfileGenerator::ProfileGenerator): - (KJS::ProfileGenerator::title): - (KJS::ProfileGenerator::willExecute): - (KJS::ProfileGenerator::didExecute): - (KJS::ProfileGenerator::stopProfiling): - (KJS::ProfileGenerator::didFinishAllExecution): - (KJS::ProfileGenerator::removeProfileStart): - (KJS::ProfileGenerator::removeProfileEnd): - * profiler/ProfileGenerator.h: Added. - (KJS::ProfileGenerator::profile): - (KJS::ProfileGenerator::originatingGlobalExec): - (KJS::ProfileGenerator::pageGroupIdentifier): - (KJS::ProfileGenerator::client): - (KJS::ProfileGenerator::stoppedProfiling): - * profiler/Profiler.cpp: Now operates with the ProfileGenerator instead - of the Profile. - (KJS::Profiler::startProfiling): - (KJS::Profiler::stopProfiling): - (KJS::Profiler::didFinishAllExecution): It is here that the Profile is - handed off to its client and the Profile Generator is no longer needed. - (KJS::dispatchFunctionToProfiles): - (KJS::Profiler::willExecute): - (KJS::Profiler::didExecute): - * profiler/Profiler.h: Cleaned up the includes and subsequently the - forward declarations. Also use the new ProfileGenerator. - (KJS::ProfilerClient::~ProfilerClient): - (KJS::Profiler::currentProfiles): - * profiler/TreeProfile.cpp: Use Profile's new interface. - (KJS::TreeProfile::create): - (KJS::TreeProfile::TreeProfile): - * profiler/TreeProfile.h: - -2008-07-07 Sam Weinig - - Reviewed by Cameron Zwarich. - - Third step in broad cleanup effort. - - [ File list elided ] - -2008-07-06 Sam Weinig - - Reviewed by Cameron Zwarich. - - Second step in broad cleanup effort. - - [ File list elided ] - -2008-07-05 Sam Weinig - - Reviewed by Cameron Zwarich. - - First step in broad cleanup effort. - - [ File list elided ] - -2008-07-05 Sam Weinig - - Rubber-stamped by Cameron Zwarich. - - Rename list.h/cpp to ArgList.h/cpp. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/Machine.h: - * kjs/AllInOneFile.cpp: - * kjs/ArgList.cpp: Copied from JavaScriptCore/kjs/list.cpp. - * kjs/ArgList.h: Copied from JavaScriptCore/kjs/list.h. - * kjs/IndexToNameMap.cpp: - * kjs/JSGlobalData.cpp: - * kjs/JSGlobalData.h: - * kjs/JSObject.h: - * kjs/collector.cpp: - * kjs/list.cpp: Removed. - * kjs/list.h: Removed. - -2008-07-05 Sam Weinig - - Fix non-AllInOne builds again. - - * kjs/BooleanPrototype.cpp: - * kjs/ErrorPrototype.cpp: - * kjs/FunctionPrototype.cpp: - * kjs/NumberPrototype.cpp: - * kjs/ObjectPrototype.cpp: - -2008-07-05 Sam Weinig - - Fix build on case-sensitive build systems. - - * kjs/IndexToNameMap.cpp: - -2008-07-05 Sam Weinig - - Fix build. - - * kjs/Arguments.cpp: - * kjs/BooleanPrototype.cpp: - * kjs/DateConstructor.cpp: - * kjs/ErrorPrototype.cpp: - * kjs/FunctionPrototype.cpp: - * kjs/NumberPrototype.cpp: - * kjs/ObjectPrototype.cpp: - * kjs/RegExpPrototype.cpp: - * kjs/StringConstructor.cpp: - * kjs/lookup.cpp: - -2008-07-05 Sam Weinig - - Fix non-AllInOne build. - - * kjs/JSGlobalObject.cpp: - -2008-07-05 Sam Weinig - - Rubber-stamped by Cameron Zwarich. - - Split Arguments, IndexToNameMap, PrototypeFunction, GlobalEvalFunction and - the functions on the global object out of JSFunction.h/cpp. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/Machine.cpp: - * kjs/AllInOneFile.cpp: - * kjs/Arguments.cpp: Copied from JavaScriptCore/kjs/JSFunction.cpp. - * kjs/Arguments.h: Copied from JavaScriptCore/kjs/JSFunction.h. - * kjs/GlobalEvalFunction.cpp: Copied from JavaScriptCore/kjs/JSFunction.cpp. - * kjs/GlobalEvalFunction.h: Copied from JavaScriptCore/kjs/JSFunction.h. - * kjs/IndexToNameMap.cpp: Copied from JavaScriptCore/kjs/JSFunction.cpp. - * kjs/IndexToNameMap.h: Copied from JavaScriptCore/kjs/JSFunction.h. - * kjs/JSActivation.cpp: - * kjs/JSFunction.cpp: - * kjs/JSFunction.h: - * kjs/JSGlobalObject.cpp: - * kjs/JSGlobalObjectFunctions.cpp: Copied from JavaScriptCore/kjs/JSFunction.cpp. - * kjs/JSGlobalObjectFunctions.h: Copied from JavaScriptCore/kjs/JSFunction.h. - The functions on the global object should be in JSGlobalObject.cpp, but putting them there - was a 0.5% regression. - - * kjs/PrototypeFunction.cpp: Copied from JavaScriptCore/kjs/JSFunction.cpp. - * kjs/PrototypeFunction.h: Copied from JavaScriptCore/kjs/JSFunction.h. - * kjs/Shell.cpp: - * kjs/lexer.cpp: - * kjs/ustring.cpp: - -2008-07-04 Sam Weinig - - Really fix the mac build. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-07-04 Sam Weinig - - Fix mac build. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-07-04 Sam Weinig - - Fix non-AllInOne builds. - - * kjs/Error.cpp: - * kjs/GetterSetter.cpp: - * kjs/JSImmediate.cpp: - * kjs/operations.cpp: - -2008-07-04 Sam Weinig - - Rubber-stamped by Dan Bernstein. - - Split Error and GetterSetter out of JSObject.h. - - * API/JSCallbackObjectFunctions.h: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/ClassInfo.h: Copied from JavaScriptCore/kjs/JSObject.h. - * kjs/Error.cpp: Copied from JavaScriptCore/kjs/JSObject.cpp. - * kjs/Error.h: Copied from JavaScriptCore/kjs/JSObject.h. - * kjs/GetterSetter.cpp: - * kjs/GetterSetter.h: Copied from JavaScriptCore/kjs/JSObject.h. - * kjs/JSObject.cpp: - * kjs/JSObject.h: - * kjs/nodes.h: - -2008-07-04 Simon Hausmann - - Fix the Wx build, added TreeProfile.cpp to the build. - - * JavaScriptCoreSources.bkl: - -2008-07-03 Mark Rowe - - Reviewed by Oliver Hunt. - - Fix output path of recently-added script phase to reference the correct file. - This prevents Xcode from running the script phase unnecessarily, which caused - the generated header to be recreated and lead to AllInOneFile.cpp rebuilding. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-07-03 Mark Rowe - - Follow-up to the 64-bit build fix. Use intptr_t rather than ssize_t as - the latter is non-standard and does not exist on Windows. - - * kjs/JSLock.cpp: - (KJS::JSLock::lockCount): - (KJS::JSLock::lock): - (KJS::JSLock::unlock): - (KJS::JSLock::DropAllLocks::DropAllLocks): - * kjs/JSLock.h: - -2008-07-02 Mark Rowe - - Fix the 64-bit build. pthread_getspecific works with pointer-sized values, - so use ssize_t rather than int to track the lock count to avoid warnings about - truncating the result of pthread_getspecific. - - * kjs/JSLock.cpp: - (KJS::JSLock::lockCount): - (KJS::JSLock::lock): - (KJS::JSLock::unlock): - (KJS::JSLock::DropAllLocks::DropAllLocks): - * kjs/JSLock.h: - -2008-07-03 Geoffrey Garen - - Reviewed by Sam Weinig. - - Removed checking for the array get/put fast case from the array code. - Callers who want the fast case should call getIndex and/or setIndex - instead. (get_by_val and put_by_val already do this.) - - SunSpider reports no change overall, but a 1.4% speedup on fannkuch and - a 3.6% speedup on nsieve. - -2008-07-03 Dan Bernstein - - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added TreeProfile.{h,cpp}. - -2008-07-03 Dan Bernstein - - Reviewed by Anders Carlsson. - - - Windows build fix - - * VM/Machine.cpp: - (KJS::Machine::Machine): - -2008-07-03 Simon Hausmann - - Reviewed by Alexey Proskuryakov. - - Fix the non-threaded build. - - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::threadInstanceInternal): - -2008-07-03 Simon Hausmann - - Fix the Qt build, added TreeProfile to the build. - - * JavaScriptCore.pri: - -2008-07-02 Alexey Proskuryakov - - Reviewed by Geoff. - - Don't create unnecessary JSGlobalData instances. - - * kjs/JSGlobalData.h: - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::threadInstanceExists): - (KJS::JSGlobalData::sharedInstanceExists): - (KJS::JSGlobalData::threadInstance): - (KJS::JSGlobalData::sharedInstance): - (KJS::JSGlobalData::threadInstanceInternal): - (KJS::JSGlobalData::sharedInstanceInternal): - Added methods to query instance existence. - - * kjs/InitializeThreading.cpp: - (KJS::initializeThreadingOnce): - Initialize thread instance static in a new way. - - * API/JSBase.cpp: - (JSGarbageCollect): - * kjs/collector.cpp: - (KJS::Heap::collect): - Check for instance existence before accessing it. - -2008-07-02 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=19862 - REGRESSION (r34907): Gmail crashes in JavaScriptCore code while editing drafts - - I was never able to reproduce this issue, but Cameron could, and he says - that this patch fixes it. - - The crash seems tied to a timer or event handler callback. In such a case, - the sole reference to the global object may be in the current call frame, - so we can't depend on the global object to mark the call frame area in - the register file. - - The new GC marking rule is: the global object is not responsible for - marking the whole register file -- it's just responsible for the globals - section it's tied to. The heap is responsible for marking the call frame area. - -2008-07-02 Mark Rowe - - Reviewed by Sam Weinig. - - Add the ability to trace JavaScriptCore garabge collections using dtrace. - - * JavaScriptCore.xcodeproj/project.pbxproj: Generate the dtrace probe header - file when building on a new enough version of Mac OS X. - * JavaScriptCorePrefix.h: Add our standard Mac OS X version detection macros. - * kjs/Tracing.d: Declare three dtrace probes. - * kjs/Tracing.h: Include the generated dtrace macros if dtrace is available, - otherwise provide versions that do nothing. - * kjs/collector.cpp: - (KJS::Heap::collect): Fire dtrace probes when starting a collection, after the - mark phase has completed, and when the collection is complete. - * wtf/Platform.h: Define HAVE_DTRACE when building on a new enough version of Mac OS X. - -2008-07-02 Geoffrey Garen - - Rubber stamped by Oliver Hunt. - - Reduced the max register file size from 8MB to 2MB. - - We still allow about 20,000 levels of recursion. - -2008-07-02 Alp Toker - - Build fix for r34960. Add TreeProfile.cpp to build. - - * GNUmakefile.am: - -2008-07-02 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Optimized a[n] get for cases when a is an array or a string. When a is - an array, we optimize both get and put. When a is a string, we only - optimize get, since you can't put to a string. - - SunSpider says 3.4% faster. - -2008-07-02 Kevin McCullough - - Reviewed by Darin. - - -Small cleanup in preparation for implementing Bottom-up. - - * profiler/CallIdentifier.h: Rename debug function to make it clear of - its output and intention to be debug only. - (KJS::CallIdentifier::operator const char* ): Implement in terms of - c_str. - (KJS::CallIdentifier::c_str): - * profiler/ProfileNode.cpp: Impelment findChild() which will be needed - by the bottom-up implementation. - (KJS::ProfileNode::findChild): - * profiler/ProfileNode.h: Added comments to make the collections of - functions more clear. - (KJS::ProfileNode::operator==): - (KJS::ProfileNode::c_str): - -2008-07-02 Cameron Zwarich - - Reviewed by Darin. - - Bug 19776: Number.toExponential() is incorrect for numbers between 0.1 and 1 - - - Perform the sign check for the exponent on the actual exponent value, - which is 1 less than the value of decimalPoint, instead of on the value - of decimalPoint itself. - - * kjs/NumberPrototype.cpp: - (KJS::exponentialPartToString): - -2008-07-02 Kevin McCullough - - Reviewed by Darin. - - JSProfiler: Implement Bottom-Up view (19228) - - Subclass TreeProfile as I prepare for a HeavyProfile to be comming - later. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * profiler/Profile.cpp: By default we create a TreeProfile. - (KJS::Profile::create): - * profiler/Profile.h: Changes to the Profile class to make it amenable - to be inherited from. - (KJS::Profile::~Profile): - * profiler/TreeProfile.cpp: Added. - (KJS::TreeProfile::create): - (KJS::TreeProfile::TreeProfile): - (KJS::TreeProfile::heavyProfile): - * profiler/TreeProfile.h: Added. - (KJS::TreeProfile::treeProfile): - -2008-07-02 Kevin McCullough - - Reviewed by Dan. - - Broke CallIdentifier out into its own file. I did this because it's - going to grow a lot soon and I wanted this to be a separate patch. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * profiler/CallIdentifier.h: Added. - (KJS::CallIdentifier::CallIdentifier): - (KJS::CallIdentifier::operator==): - (KJS::CallIdentifier::operator!=): - (KJS::CallIdentifier::operator const char* ): - (KJS::CallIdentifier::toString): - * profiler/ProfileNode.h: - -2008-07-02 Simon Hausmann - - Build fix. Implemented missing functions for single-threaded build. - - * kjs/JSLock.cpp: - (KJS::JSLock::JSLock): - (KJS::JSLock::lock): - (KJS::JSLock::unlock): - (KJS::JSLock::DropAllLocks::DropAllLocks): - -2008-07-02 Alexey Proskuryakov - - Another non-AllInOne build fix. - - * kjs/JSGlobalObject.cpp: Include JSLock.h here, too. - -2008-07-02 Alexey Proskuryakov - - Non-AllInOne build fix. - - * kjs/interpreter.cpp: Include JSLock.h. - -2008-06-30 Alexey Proskuryakov - - Reviewed by Darin. - - Disable JSLock for per-thread contexts. - - No change on SunSpider. - - * kjs/JSGlobalData.h: - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::JSGlobalData): - (KJS::JSGlobalData::sharedInstance): - Added isSharedInstance as a better way to tell whether the instance is shared (legacy). - - * kjs/JSLock.cpp: - (KJS::createJSLockCount): - (KJS::JSLock::lockCount): - (KJS::setLockCount): - (KJS::JSLock::JSLock): - (KJS::JSLock::lock): - (KJS::JSLock::unlock): - (KJS::JSLock::currentThreadIsHoldingLock): - (KJS::JSLock::DropAllLocks::DropAllLocks): - (KJS::JSLock::DropAllLocks::~DropAllLocks): - * kjs/JSLock.h: - (KJS::JSLock::JSLock): - (KJS::JSLock::~JSLock): - Made JSLock and JSLock::DropAllLocks constructors take a parameter to decide whether to - actually lock a mutex, or only to increment recursion count. We cannot turn it into no-op - if we want to keep existing assertions working. - Made recursion count per-thread, now that locks may not lock. - - * API/JSBase.cpp: - (JSEvaluateScript): Take JSLock after casting JSContextRef to ExecState* (which doesn't need - locking in any case), so that a decision whether to actually lock can be made. - (JSCheckScriptSyntax): Ditto. - (JSGarbageCollect): Only lock while collecting the shared heap, not the per-thread one. - - * API/JSObjectRef.cpp: - (JSClassCreate): Don't lock, as there is no reason to. - (JSClassRetain): Ditto. - (JSClassRelease): Ditto. - (JSPropertyNameArrayRetain): Ditto. - (JSPropertyNameArrayRelease): Only lock while deleting the array, as that may touch - identifier table. - (JSPropertyNameAccumulatorAddName): Adding a string also involves an identifier table - lookup, and possibly modification. - - * API/JSStringRef.cpp: - (JSStringCreateWithCharacters): - (JSStringCreateWithUTF8CString): - (JSStringRetain): - (JSStringRelease): - (JSStringGetUTF8CString): - (JSStringIsEqual): - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): - JSStringRef operations other than releasing do not need locking. - - * VM/Machine.cpp: Don't include unused JSLock.h. - - * kjs/CollectorHeapIntrospector.cpp: (KJS::CollectorHeapIntrospector::statistics): - Don't take the lock for real, as heap introspection pauses the process anyway. It seems that - the existing code could cause deadlocks. - - * kjs/Shell.cpp: - (functionGC): - (main): - (jscmain): - The test tool uses a per-thread context, so no real locking is required. - - * kjs/collector.h: - (KJS::Heap::setGCProtectNeedsLocking): Optionally protect m_protectedValues access with a - per-heap mutex. This is only needed for WebCore Database code, which violates the "no data - migration between threads" by using ProtectedPtr on a background thread. - (KJS::Heap::isShared): Keep a shared flag here, as well. - - * kjs/protect.h: - (KJS::::ProtectedPtr): - (KJS::::~ProtectedPtr): - (KJS::::operator): - (KJS::operator==): - (KJS::operator!=): - ProtectedPtr is ony used from WebCore, so it doesn't need to take JSLock. An assertion in - Heap::protect/unprotect guards agains possible future unlocked uses of ProtectedPtr in JSC. - - * kjs/collector.cpp: - (KJS::Heap::Heap): Initialize m_isShared. - (KJS::Heap::~Heap): No need to lock for real during destruction, but must keep assertions - in sweep() working. - (KJS::destroyRegisteredThread): Registered thread list is only accessed for shared heap, - so locking is always needed here. - (KJS::Heap::registerThread): Ditto. - (KJS::Heap::markStackObjectsConservatively): Use m_isShared instead of comparing to a shared - instance for a small speedup. - (KJS::Heap::setGCProtectNeedsLocking): Create m_protectedValuesMutex. There is currently no - way to undo this - and ideally, Database code will be fixed to lo longer require this quirk. - (KJS::Heap::protect): Take m_protectedValuesMutex (if it exists) while accessing - m_protectedValues. - (KJS::Heap::unprotect): Ditto. - (KJS::Heap::markProtectedObjects): Ditto. - (KJS::Heap::protectedGlobalObjectCount): Ditto. - (KJS::Heap::protectedObjectCount): Ditto. - (KJS::Heap::protectedObjectTypeCounts): Ditto. - - * kjs/ustring.cpp: - * kjs/ustring.h: - Don't include JSLock.h, which is no longer used here. As a result, an explicit include had - to be added to many files in JavaScriptGlue, WebCore and WebKit. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::init): - * API/JSCallbackConstructor.cpp: - (KJS::constructJSCallback): - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::call): - * API/JSCallbackObjectFunctions.h: - (KJS::::init): - (KJS::::getOwnPropertySlot): - (KJS::::put): - (KJS::::deleteProperty): - (KJS::::construct): - (KJS::::hasInstance): - (KJS::::call): - (KJS::::getPropertyNames): - (KJS::::toNumber): - (KJS::::toString): - (KJS::::staticValueGetter): - (KJS::::callbackGetter): - * API/JSContextRef.cpp: - (JSGlobalContextCreate): - (JSGlobalContextRetain): - (JSGlobalContextRelease): - * API/JSValueRef.cpp: - (JSValueIsEqual): - (JSValueIsStrictEqual): - (JSValueIsInstanceOfConstructor): - (JSValueMakeNumber): - (JSValueMakeString): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - (JSValueUnprotect): - * JavaScriptCore.exp: - * kjs/PropertyNameArray.h: - (KJS::PropertyNameArray::globalData): - * kjs/interpreter.cpp: - (KJS::Interpreter::checkSyntax): - (KJS::Interpreter::evaluate): - Pass a parameter to JSLock/JSLock::DropAllLocks to decide whether the lock needs to be taken. - -2008-07-01 Alexey Proskuryakov - - Reviewed by Darin. - - https://bugs.webkit.org/show_bug.cgi?id=19834 - Failed assertion in JavaScriptCore/VM/SegmentedVector.h:82 - - Creating a global object with a custom prototype resets it twice (wasteful!). - So, addStaticGlobals() was called twice, but JSGlobalObject::reset() didn't reset - the register array. - - * kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::reset): Call setRegisterArray(0, 0). - - * kjs/JSVariableObject.h: Changed registerArray to OwnArrayPtr. Also, added private copy - constructor and operator= to ensure that no one attempts to copy this object (for whatever - reason, I couldn't make Noncopyable work). - - * kjs/JSGlobalObject.h: (KJS::JSGlobalObject::addStaticGlobals): Allocate registerArray - with new[]. - - * kjs/JSVariableObject.cpp: - (KJS::JSVariableObject::copyRegisterArray): Allocate registerArray with new[]. - (KJS::JSVariableObject::setRegisterArray): Avoid hitting an assertion in OwnArrayPtr when - "changing" the value from 0 to 0. - -2008-07-01 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Removed and/or reordered exception checks in array-style a[n] access. - - SunSpider says 1.4% faster. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): No need to check for exceptions before - calling toString, toNumber and/or get. If the call ends up being observable - through toString, valueOf, or a getter, we short-circuit it there, instead. - In the op_del_by_val case, I removed the incorrect comment without actually - removing the code, since I didn't want to tempt the GCC fates! - - * kjs/JSObject.cpp: - (KJS::callDefaultValueFunction): Added exception check to prevent - toString and valueOf functions from observing execution after an exception - has been thrown. This removes some of the burden of exception checking - from the machine. - - (KJS::JSObject::defaultValue): Removed redundant exception check here. - - * kjs/PropertySlot.cpp: - (KJS::PropertySlot::functionGetter): Added exception check to prevent - getter functions from observing execution after an exception has been - thrown. This removes some of the burden of exception checking from the - machine. - -2008-07-01 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Optimized a[n] get and put for cases where n is an immediate unsigned - value. - - SunSpider says 3.5% faster. - -2008-07-01 Cameron Zwarich - - Reviewed by Darin. - - Bug 19844: JavaScript Switch statement modifies "this" - - - Use a temporary when generating code for switch clauses to avoid - overwriting 'this' or a local variable. - - * kjs/nodes.cpp: - (KJS::CaseBlockNode::emitCodeForBlock): - -2008-07-01 Christian Dywan - - Gtk+ build fix. - - * kjs/list.cpp: Include "JSCell.h" - -2008-07-01 Kevin McCullough - - Build fix. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-07-01 Dan Bernstein - - Reviewed by Anders Carlsson. - - - Mac release build fix - - * JavaScriptCore.exp: - -2008-07-01 Sam Weinig - - Try and fix mac builds. - - * JavaScriptCore.exp: - -2008-07-01 Sam Weinig - - Fix non-AllInOne builds. - - * kjs/DateMath.cpp: - -2008-07-01 Sam Weinig - - Reviewed by Darin Adler. - - Split JSCell and JSNumberCell class declarations out of JSValue.h - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/JSPropertyNameIterator.h: - * kjs/AllInOneFile.cpp: - * kjs/JSCell.cpp: Copied from JavaScriptCore/kjs/JSValue.cpp. - * kjs/JSCell.h: Copied from JavaScriptCore/kjs/JSValue.h. - (KJS::JSValue::getJSNumber): - * kjs/JSNumberCell.cpp: - * kjs/JSNumberCell.h: Copied from JavaScriptCore/kjs/JSValue.h. - * kjs/JSObject.h: - * kjs/JSString.cpp: - (KJS::jsString): - (KJS::jsOwnedString): - * kjs/JSString.h: - (KJS::JSValue::toThisJSString): - * kjs/JSValue.cpp: - * kjs/JSValue.h: - -2008-07-01 Anders Carlsson - - Build fixes. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::addStaticGlobals): - -2008-07-01 Simon Hausmann - - Build fix, include OwnPtr.h. - - * kjs/RegExpConstructor.h: - -2008-06-30 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed a global object leak caused by the switch to one register file. - - Don't unconditionally mark the register file, since that logically - makes all global variables GC roots, even when their global object is - no longer reachable. - - Instead, make the global object associated with the register file - responsible for marking the register file. - -2008-06-30 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Removed the "registerBase" abstraction. Since the register file never - reallocates, we can keep direct pointers into it, instead of - tuples. - - SunSpider says 0.8% faster. - -2008-06-30 Oliver Hunt - - Reviewed by NOBODY (build fix). - - Fix build by adding all (hopefully) the missing includes. - - * kjs/BooleanPrototype.cpp: - * kjs/DateConstructor.cpp: - * kjs/ErrorPrototype.cpp: - * kjs/FunctionPrototype.cpp: - * kjs/NativeErrorConstructor.cpp: - * kjs/NumberPrototype.cpp: - * kjs/ObjectPrototype.cpp: - * kjs/RegExpConstructor.cpp: - * kjs/StringConstructor.cpp: - * kjs/StringPrototype.cpp: - -2008-06-30 Cameron Zwarich - - Reviewed by Oliver. - - Bug 19830: REGRESSION (r34883): Google Reader doesn't show up feed list on sidebar - - - Ensure that we do not eliminate a write to a local register when doing - peephole optimizations. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitJumpIfTrue): - (KJS::CodeGenerator::emitJumpIfFalse): - -2008-06-30 Sam Weinig - - Rubber-stamped by Darin Alder. - - Split InternalFunction into its own header file. - - * API/JSCallbackFunction.h: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/ArrayConstructor.h: - * kjs/BooleanConstructor.h: - * kjs/DateConstructor.h: - * kjs/ErrorConstructor.h: - * kjs/FunctionConstructor.h: - * kjs/FunctionPrototype.h: - * kjs/InternalFunction.h: Copied from kjs/JSFunction.h. - * kjs/JSFunction.h: - * kjs/NativeErrorConstructor.h: - * kjs/NumberConstructor.h: - * kjs/ObjectConstructor.h: - * kjs/RegExpConstructor.h: - * kjs/StringConstructor.h: - * profiler/Profiler.cpp: - -2008-06-30 Sam Weinig - - Reviewed by Kevin McCullough. - - Remove empty files Instruction.cpp, LabelID.cpp, Register.cpp and RegisterID.cpp. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/Instruction.cpp: Removed. - * VM/LabelID.cpp: Removed. - * VM/Register.cpp: Removed. - * VM/RegisterID.cpp: Removed. - -2008-06-30 Sam Weinig - - Rubber-stamped (reluctantly) by Kevin McCullough. - - Rename date_object.h/cpp to DateInstance.h/cpp - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/DateConstructor.cpp: - * kjs/DateInstance.cpp: Copied from kjs/date_object.cpp. - * kjs/DateInstance.h: Copied from kjs/date_object.h. - * kjs/DatePrototype.cpp: - * kjs/DatePrototype.h: - * kjs/date_object.cpp: Removed. - * kjs/date_object.h: Removed. - -2008-06-30 Sam Weinig - - Rubber-stamped by Darin Adler. - - Remove internal.cpp and move its contents to there own .cpp files. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/GetterSetter.cpp: Copied from kjs/internal.cpp. - * kjs/InternalFunction.cpp: Copied from kjs/internal.cpp. - * kjs/JSNumberCell.cpp: Copied from kjs/internal.cpp. - * kjs/JSString.cpp: Copied from kjs/internal.cpp. - * kjs/JSString.h: - * kjs/LabelStack.cpp: Copied from kjs/internal.cpp. - * kjs/NumberConstructor.cpp: - * kjs/NumberObject.cpp: - (KJS::constructNumber): - (KJS::constructNumberFromImmediateNumber): - * kjs/internal.cpp: Removed. - -2008-06-30 Adam Roben - - Fix Assertion failure due to HashTable's use of - operator& - - HashTable was passing &value to constructDeletedValue, which in - classes like WebCore::COMPtr would cause an assertion. We now pass - value by reference instead of by address so that the HashTraits - implementations have more flexibility in constructing the deleted - value. - - Reviewed by Ada Chan. - - * VM/CodeGenerator.h: Updated for changes to HashTraits. - * wtf/HashTable.h: - (WTF::::deleteBucket): Changed to pass bucket by reference instead of - by address. - (WTF::::checkKey): Ditto. - * wtf/HashTraits.h: - (WTF::): Updated HashTraits for HashTable change. - -2008-07-01 Alexey Proskuryakov - - Reviewed by Cameron Zwarich. - - Make RegisterFile really unmap memory on destruction. - - This fixes run-webkit-tests --threaded, which ran out of address space in a few seconds. - - * VM/RegisterFile.cpp: (KJS::RegisterFile::~RegisterFile): Unmap all the memory, not just - 1/4 of it. - - * kjs/JSGlobalObject.h: Don't include RegisterFile.h, so that changes to it don't make - half of WebCore rebuild. - - * VM/Machine.h: Don't forward declare RegisterFile, as RegisterFile.h is included already. - - * VM/RegisterFile.h: (KJS::RegisterFile::RegisterFile): Assert that the allocation succeeded. - -2008-06-30 Cameron Zwarich - - Rubber-stamped by Oliver. - - Correct the documentation for op_put_by_index. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-06-29 Cameron Zwarich - - Reviewed by Oliver. - - Bug 19821: Merge the instruction pair (less, jfalse) - - - This is a 2.4% win on SunSpider. I needed to add an ALWAYS_INLINE - intrinisc to CodeGenerator::rewindBinaryOp() to avoid a massive - regression in regexp-dna. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::rewindBinaryOp): - (KJS::CodeGenerator::emitJumpIfFalse): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.cpp: - (KJS::): - * VM/Opcode.h: - -2008-06-29 Sam Weinig - - Fix non-AllInOne builds. - - * kjs/JSObject.cpp: - * kjs/JSValue.cpp: - -2008-06-29 Sam Weinig - - Build fix for Qt. - - * kjs/DateMath.cpp: - * kjs/DatePrototype.cpp: - -2008-06-29 Sam Weinig - - Rubber-stamped by Cameron Zwarich. - - Splits ErrorConstructor, ErrorPrototype, NativeErrorConstructor and - NativeErrorPrototype out of error_object.h/cpp and renames it ErrorInstance. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/ArrayConstructor.cpp: - * kjs/ArrayPrototype.cpp: - * kjs/BooleanPrototype.cpp: - * kjs/DatePrototype.cpp: - * kjs/ErrorConstructor.cpp: Copied from kjs/error_object.cpp. - * kjs/ErrorConstructor.h: Copied from kjs/error_object.h. - * kjs/ErrorInstance.cpp: Copied from kjs/error_object.cpp. - * kjs/ErrorInstance.h: Copied from kjs/error_object.h. - * kjs/ErrorPrototype.cpp: Copied from kjs/error_object.cpp. - * kjs/ErrorPrototype.h: Copied from kjs/error_object.h. - * kjs/JSGlobalObject.cpp: - * kjs/JSObject.cpp: - * kjs/JSValue.cpp: - * kjs/NativeErrorConstructor.cpp: Copied from kjs/error_object.cpp. - * kjs/NativeErrorConstructor.h: Copied from kjs/error_object.h. - * kjs/NativeErrorPrototype.cpp: Copied from kjs/error_object.cpp. - * kjs/NativeErrorPrototype.h: Copied from kjs/error_object.h. - * kjs/NumberPrototype.cpp: - * kjs/RegExpConstructor.cpp: - * kjs/RegExpObject.cpp: - * kjs/RegExpPrototype.cpp: - * kjs/StringPrototype.cpp: - * kjs/error_object.cpp: Removed. - * kjs/error_object.h: Removed. - * kjs/internal.cpp: - -2008-06-29 Sam Weinig - - Fix non-AllInOne build. - - * kjs/DateConstructor.cpp: - * kjs/DateMath.cpp: - * kjs/JSObject.cpp: - -2008-06-29 Sam Weinig - - Rubber-stamped by Oliver Hunt. - - Splits DateConstructor and DatePrototype out of date_object.h/cpp - Moves shared Date code into DateMath. - - * DerivedSources.make: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/DateConstructor.cpp: Copied from kjs/date_object.cpp. - * kjs/DateConstructor.h: Copied from kjs/date_object.h. - * kjs/DateMath.cpp: - (KJS::ymdhmsToSeconds): - (KJS::): - (KJS::skipSpacesAndComments): - (KJS::findMonth): - (KJS::parseDate): - (KJS::timeClip): - (KJS::formatDate): - (KJS::formatDateUTCVariant): - (KJS::formatTime): - * kjs/DateMath.h: - (KJS::gmtoffset): - * kjs/DatePrototype.cpp: Copied from kjs/date_object.cpp. - * kjs/DatePrototype.h: Copied from kjs/date_object.h. - * kjs/JSGlobalObject.cpp: - * kjs/JSObject.cpp: - * kjs/date_object.cpp: - * kjs/date_object.h: - * kjs/internal.cpp: - -2008-06-29 Jan Michael Alonzo - - Rubber-stamped by Cameron Zwarich - - Fix Gtk non-AllInOne build - - * GNUmakefile.am: include JSVariableObject.cpp - * kjs/RegExpConstructor.cpp: include RegExpObject.h - * kjs/RegExpObject.h: forward declare RegExpPrototype - -2008-06-28 Darin Adler - - Reviewed by Sam and Cameron. - - - fix https://bugs.webkit.org/show_bug.cgi?id=19805 - Array.concat turns missing array elements into "undefined" - - Test: fast/js/array-holes.html - - * JavaScriptCore.exp: No longer export JSArray::getItem. - - * kjs/ArrayPrototype.cpp: - (KJS::arrayProtoFuncConcat): Changed to use getProperty instead of - JSArray::getItem -- need to handle properties from the prototype chain - instead of ignoring them. - - * kjs/JSArray.cpp: Removed getItem. - * kjs/JSArray.h: Ditto. - -2008-06-28 Darin Adler - - Reviewed by Cameron. - - - https://bugs.webkit.org/show_bug.cgi?id=19804 - optimize access to arrays without "holes" - - SunSpider says 1.8% faster. - - * kjs/JSArray.cpp: - (KJS::JSArray::JSArray): Initialize m_fastAccessCutoff when creating - arrays. Also updated for new location of m_vectorLength. - (KJS::JSArray::getItem): Updated for new location of m_vectorLength. - (KJS::JSArray::getSlowCase): Added. Broke out the non-hot parts of - getOwnPropertySlot to make the hot part faster. - (KJS::JSArray::getOwnPropertySlot): Added a new faster case for - indices lower than m_fastAccessCutoff. We can do theese with no - additional checks or branches. - (KJS::JSArray::put): Added a new faster case for indices lower than - m_fastAccessCutoff. We can do theese with no additional checks or - branches. Moved the maxArrayIndex handling out of this function. - Added code to set m_fastAccessCutoff when the very last hole in - an array is filled; this is how the cutoff gets set for most arrays. - (KJS::JSArray::putSlowCase): Moved the rest of the put function logic - in here, to make the hot part of the put function faster. - (KJS::JSArray::deleteProperty): Added code to lower m_fastAccessCutoff - when a delete makes a new hole in the array. - (KJS::JSArray::getPropertyNames): Updated for new location of - m_vectorLength. - (KJS::JSArray::increaseVectorLength): Ditto. - (KJS::JSArray::setLength): Added code to lower m_fastAccessCutoff - when setLength makes the array smaller. - (KJS::JSArray::mark): Updated for new location of m_vectorLength. - (KJS::JSArray::sort): Ditto. Set m_fastAccessCutoff after moving - all the holes to the end of the array. - (KJS::JSArray::compactForSorting): Ditto. - (KJS::JSArray::checkConsistency): Added consistency checks fro - m_fastAccessCutoff and updated for the new location of m_vectorLength. - - * kjs/JSArray.h: Added declarations for slow case functions. - Replaced m_vectorLength with m_fastAccessCutoff. - -2008-06-28 Cameron Zwarich - - Reviewed by Sam. - - When executing a native call, check for an exception before writing the - return value. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-06-28 Mark Rowe - - Build fix. Flag headers as private or public as is appropriate. - These settings were accidentally removed during some project file cleanup. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-06-28 Sam Weinig - - Rubber-stamped by Darin Adler. - - Splits RegExpConstructor and RegExpPrototype out of RegExpObject.h/cpp - - * DerivedSources.make: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/Machine.cpp: - * kjs/AllInOneFile.cpp: - * kjs/JSGlobalObject.cpp: - * kjs/RegExpConstructor.cpp: Copied from kjs/RegExpObject.cpp. - * kjs/RegExpConstructor.h: Copied from kjs/RegExpObject.h. - * kjs/RegExpObject.cpp: - * kjs/RegExpObject.h: - * kjs/RegExpPrototype.cpp: Copied from kjs/RegExpObject.cpp. - * kjs/RegExpPrototype.h: Copied from kjs/RegExpObject.h. - * kjs/StringPrototype.cpp: - * kjs/internal.cpp: - -2008-06-28 Sam Weinig - - Fix non-AllInOne builds. - - * kjs/StringConstructor.cpp: - -2008-06-28 Sam Weinig - - Rubber-stamped by Darin Adler. - - Rename string_object.h/cpp to StringObject.h/cpp and split out StringObjectThatMasqueradesAsUndefined, - StringConstructor and StringPrototype. - - * DerivedSources.make: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/JSGlobalObject.cpp: - * kjs/StringConstructor.cpp: Copied from JavaScriptCore/kjs/string_object.cpp. - * kjs/StringConstructor.h: Copied from JavaScriptCore/kjs/string_object.h. - * kjs/StringObject.cpp: Copied from JavaScriptCore/kjs/string_object.cpp. - * kjs/StringObject.h: Copied from JavaScriptCore/kjs/string_object.h. - * kjs/StringObjectThatMasqueradesAsUndefined.h: Copied from JavaScriptCore/kjs/string_object.h. - * kjs/StringPrototype.cpp: Copied from JavaScriptCore/kjs/string_object.cpp. - * kjs/StringPrototype.h: Copied from JavaScriptCore/kjs/string_object.h. - * kjs/internal.cpp: - * kjs/string_object.cpp: Removed. - * kjs/string_object.h: Removed. - -2008-06-28 Jan Michael Alonzo - - Gtk build fix: JSVariableObject is now part of AllInOne - - * GNUmakefile.am: - -2008-06-28 Darin Adler - - Reviewed by Oliver. - - - https://bugs.webkit.org/show_bug.cgi?id=19801 - add a feature so we can tell what regular expressions are taking time - - * pcre/pcre_compile.cpp: - (jsRegExpCompile): Compile in the string if REGEXP_HISTOGRAM is on. - - * pcre/pcre_exec.cpp: - (jsRegExpExecute): Add hook to time execution. - (Histogram::~Histogram): Print a sorted list of what took time. - (Histogram::add): Accumulate records of what took time. - (HistogramTimeLogger::~HistogramTimeLogger): Hook that calls - Histogram::add at the right moment and creates the global histogram - object. - - * pcre/pcre_internal.h: Define REGEXP_HISTOGRAM. - - * pcre/pcre_tables.cpp: Added missing include of "config.h". Not needed - any more, but an omissions an earlier version of this patch detected. - * pcre/pcre_ucp_searchfuncs.cpp: Ditto. - * pcre/pcre_xclass.cpp: Ditto. - -2008-06-28 Sam Weinig - - Try and fix the Windows build again. - - * kjs/RegExpObject.cpp: - * kjs/date_object.cpp: - * kjs/error_object.cpp: - -2008-06-28 Sam Weinig - - Rubber-stamped by Darin Adler. - - Remove unused StringConstructorFunction class. - - * kjs/string_object.h: - -2008-06-28 Sam Weinig - - Fix windows build. - - * kjs/ArrayPrototype.cpp: - * kjs/BooleanPrototype.cpp: - * kjs/BooleanPrototype.h: - * kjs/FunctionPrototype.cpp: - * kjs/JSImmediate.cpp: - * kjs/JSObject.cpp: - * kjs/MathObject.cpp: - * kjs/NumberPrototype.cpp: - * kjs/NumberPrototype.h: - * kjs/ObjectConstructor.cpp: - * kjs/RegExpObject.h: - * kjs/error_object.h: - * kjs/string_object.cpp: - -2008-06-28 Sam Weinig - - Rubber-stamped by Oliver Hunt. - - Splits FunctionConstructor out of FunctionPrototype.h/cpp - Splits NumberConstructor and NumberPrototype out of NumberObject.h/cpp - Rename object_object.h/cpp to ObjectPrototype.h/cpp and split out ObjectConstructor. - - * API/JSCallbackConstructor.cpp: - * API/JSClassRef.cpp: - * API/JSObjectRef.cpp: - * DerivedSources.make: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/Machine.cpp: - * kjs/AllInOneFile.cpp: - * kjs/ArrayConstructor.cpp: - * kjs/ArrayConstructor.h: - * kjs/FunctionConstructor.cpp: Copied from JavaScriptCore/kjs/FunctionPrototype.cpp. - * kjs/FunctionConstructor.h: Copied from JavaScriptCore/kjs/FunctionPrototype.h. - * kjs/FunctionPrototype.cpp: - * kjs/FunctionPrototype.h: - * kjs/JSFunction.cpp: - * kjs/JSGlobalObject.cpp: - * kjs/JSImmediate.cpp: - * kjs/MathObject.h: - * kjs/NumberConstructor.cpp: Copied from JavaScriptCore/kjs/NumberObject.cpp. - * kjs/NumberConstructor.h: Copied from JavaScriptCore/kjs/NumberObject.h. - * kjs/NumberObject.cpp: - * kjs/NumberObject.h: - * kjs/NumberPrototype.cpp: Copied from JavaScriptCore/kjs/NumberObject.cpp. - * kjs/NumberPrototype.h: Copied from JavaScriptCore/kjs/NumberObject.h. - * kjs/ObjectConstructor.cpp: Copied from JavaScriptCore/kjs/object_object.cpp. - * kjs/ObjectConstructor.h: Copied from JavaScriptCore/kjs/object_object.h. - * kjs/ObjectPrototype.cpp: Copied from JavaScriptCore/kjs/object_object.cpp. - * kjs/ObjectPrototype.h: Copied from JavaScriptCore/kjs/object_object.h. - * kjs/RegExpObject.h: - * kjs/Shell.cpp: - * kjs/error_object.h: - * kjs/internal.cpp: - * kjs/nodes.cpp: - * kjs/object_object.cpp: Removed. - * kjs/object_object.h: Removed. - * kjs/string_object.h: - -2008-06-28 Darin Adler - - Reviewed by Oliver. - - - fix https://bugs.webkit.org/show_bug.cgi?id=19796 - optimize expressions with ignored results (especially post-increment) - - SunSpider says 0.9% faster. - - * VM/CodeGenerator.h: - (KJS::CodeGenerator::tempDestination): Create a new temporary for - ignoredResult() too, just as we would for 0. - (KJS::CodeGenerator::finalDestination): Use the temporary if the - register passed in is ignoredResult() too, just as we would for 0. - (KJS::CodeGenerator::destinationForAssignResult): Return 0 if the - passed in register is ignoredResult(), just as we would for 0. - (KJS::CodeGenerator::moveToDestinationIfNeeded): Return 0 if the - register passed in is ignoredResult(). What matters is that we - don't want to emit a move. The return value won't be looked at. - (KJS::CodeGenerator::emitNode): Allow ignoredResult() and pass it - through to the node's emitCode function. - - * VM/RegisterID.h: - (KJS::ignoredResult): Added. Special value to indicate the result of - a node will be ignored and need not be put in any register. - - * kjs/nodes.cpp: - (KJS::NullNode::emitCode): Do nothing if dst == ignoredResult(). - (KJS::BooleanNode::emitCode): Ditto. - (KJS::NumberNode::emitCode): Ditto. - (KJS::StringNode::emitCode): Ditto. - (KJS::RegExpNode::emitCode): Ditto. - (KJS::ThisNode::emitCode): Ditto. - (KJS::ResolveNode::emitCode): Do nothing if dst == ignoredResult() and - the identifier resolves to a local variable. - (KJS::ObjectLiteralNode::emitCode): Do nothing if dst == ignoredResult() - and the object is empty. - (KJS::PostIncResolveNode::emitCode): If dst == ignoredResult(), then do - nothing for the local constant case, and do a pre-increment in all the - other cases. - (KJS::PostDecResolveNode::emitCode): Ditto. - (KJS::PostIncBracketNode::emitCode): Ditto. - (KJS::PostDecBracketNode::emitCode): Ditto. - (KJS::PostIncDotNode::emitCode): Ditto. - (KJS::PostDecDotNode::emitCode): Ditto. - (KJS::DeleteValueNode::emitCode): Pass ignoredResult() when evaluating - the expression. - (KJS::VoidNode::emitCode): Ditto. - (KJS::TypeOfResolveNode::emitCode): If dst == ignoredResult(), do nothing - if the identifier resolves to a local variable, and don't bother generating - a typeof opcode in the other case. - (KJS::TypeOfValueNode::emitCode): Ditto. - (KJS::PreIncResolveNode::emitCode): Do nothing if dst == ignoredResult() and - the identifier resolves to a local constant. - (KJS::PreDecResolveNode::emitCode): Ditto. - (KJS::AssignResolveNode::emitCode): Turn ignoredResult() into 0 in a couple - places, because we need to put the result into a register so we can assign - it. At other sites this is taken care of by functions like finalDestination. - (KJS::CommaNode::emitCode): Pass ignoredResult() when evaluating the first - expression. - (KJS::ForNode::emitCode): Pass ignoredResult() when evaluating the first and - third expressions. - (KJS::ForInNode::emitCode): Pass ignoredResult() when evaluating the first - expression. - -2008-06-28 Darin Adler - - Reviewed by Oliver. - - - https://bugs.webkit.org/show_bug.cgi?id=19787 - create most arrays from values in registers rather than with multiple put operations - - SunSpider says 0.8% faster. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): Added argv and argc parameters to new_array. - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Ditto. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitNewArray): Added. - * VM/CodeGenerator.h: Added ElementNode* argument to emitNewArray. - - * kjs/nodes.cpp: - (KJS::ArrayNode::emitCode): Pass the ElementNode to emitNewArray so it can be - initialized with as many elements as possible. If the array doesn't have any - holes in it, that's all that's needed. If there are holes, then emit some separate - put operations for the other values in the array and for the length as needed. - - * kjs/nodes.h: Added some accessors to ElementNode so the code generator can - iterate through elements and generate code to evaluate them. Now ArrayNode does - not need to be a friend. Also took out some unused PlacementNewAdoptType - constructors. - -2008-06-28 Darin Adler - - Reviewed by Oliver. - - * kjs/nodes.h: Remove obsolete PlacementNewAdopt constructors. - We no longer mutate the AST in place. - -2008-06-28 Jan Michael Alonzo - - Reviewed by Oliver Hunt. - - Build fix - - * VM/Machine.cpp: include stdio.h for printf - -2008-06-27 Sam Weinig - - Reviewed by Oliver Hunt. - - Fix platforms that don't use AllInOne.cpp - - * kjs/BooleanConstructor.h: - * kjs/BooleanPrototype.h: - * kjs/FunctionPrototype.cpp: - -2008-06-27 Sam Weinig - - Rubber-stamped by Oliver Hunt. - - Splits ArrayConstructor out of ArrayPrototype.h/cpp - Splits BooleanConstructor and BooleanPrototype out of BooleanObject.h/cpp - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/Machine.cpp: - * kjs/AllInOneFile.cpp: - * kjs/ArrayConstructor.cpp: Copied from kjs/ArrayPrototype.cpp. - * kjs/ArrayConstructor.h: Copied from kjs/ArrayPrototype.h. - * kjs/ArrayPrototype.cpp: - * kjs/ArrayPrototype.h: - * kjs/BooleanConstructor.cpp: Copied from kjs/BooleanObject.cpp. - * kjs/BooleanConstructor.h: Copied from kjs/BooleanObject.h. - * kjs/BooleanObject.cpp: - * kjs/BooleanObject.h: - * kjs/BooleanPrototype.cpp: Copied from kjs/BooleanObject.cpp. - * kjs/BooleanPrototype.h: Copied from kjs/BooleanObject.h. - * kjs/CommonIdentifiers.h: - * kjs/FunctionPrototype.cpp: - * kjs/JSArray.cpp: - * kjs/JSGlobalObject.cpp: - * kjs/JSImmediate.cpp: - * kjs/Shell.cpp: - * kjs/internal.cpp: - * kjs/nodes.cpp: - * kjs/string_object.cpp: - -2008-06-27 Oliver Hunt - - Reviewed by Sam. - - Bug 18626: SQUIRRELFISH: support the "slow script" dialog - Slow script dialog needs to be reimplemented for squirrelfish - - Adds support for the slow script dialog in squirrelfish. This requires the addition - of three new op codes, op_loop, op_loop_if_true, and op_loop_if_less which have the - same behaviour as their simple jump equivalents but have an additional time out check. - - Additional assertions were added to other jump instructions to prevent accidentally - creating loops with jump types that do not support time out checks. - - Sunspider does not report a regression, however this appears very sensitive to code - layout and hardware, so i would expect up to a 1% regression on other systems. - - Part of this required moving the old timeout logic from JSGlobalObject and into Machine - which is the cause of a number of the larger diff blocks. - - * JavaScriptCore.exp: - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitJumpIfTrue): - (KJS::CodeGenerator::emitJumpScopes): - * VM/ExceptionHelpers.cpp: - (KJS::InterruptedExecutionError::isWatchdogException): - (KJS::createInterruptedExecutionException): - * VM/ExceptionHelpers.h: - * VM/LabelID.h: - * VM/Machine.cpp: - (KJS::Machine::Machine): - (KJS::Machine::throwException): - (KJS::Machine::resetTimeoutCheck): - (KJS::getCurrentTime): - (KJS::Machine::checkTimeout): - (KJS::Machine::privateExecute): - * VM/Machine.h: - (KJS::Machine::setTimeoutTime): - (KJS::Machine::startTimeoutCheck): - (KJS::Machine::stopTimeoutCheck): - (KJS::Machine::initTimeout): - * VM/Opcode.cpp: - (KJS::): - * VM/Opcode.h: - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::init): - (KJS::JSGlobalObject::setTimeoutTime): - (KJS::JSGlobalObject::startTimeoutCheck): - * kjs/JSGlobalObject.h: - * kjs/JSObject.h: - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - -2008-06-27 Jan Michael Alonzo - - Gtk and Qt build fix: Remove RegisterFileStack from the build - scripts. - - * GNUmakefile.am: - * JavaScriptCore.pri: - -2008-06-27 Adele Peterson - - Reviewed by Geoff. - - Build fixes. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * VM/RegisterFile.h: - (KJS::RegisterFile::RegisterFile): - * kjs/JSGlobalObject.cpp: - * kjs/collector.cpp: - -2008-06-27 Geoffrey Garen - - Reviewed by Oliver Hunt. - - One RegisterFile to rule them all! - - SunSpider reports a 0.2% speedup. - - This patch removes the RegisterFileStack abstraction and replaces it with - a single register file that - - (a) allocates a fixed storage area, including a fixed area for global - vars, so that no operation may cause the register file to reallocate - - and - - (b) swaps between global storage areas when executing code in different - global objects. - - This patch also changes the layout of the register file so that all call - frames, including call frames for global code, get a header. This is - required to support re-entrant global code. It also just makes things simpler. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::addGlobalVar): New function. Differs from addVar in - that - - (a) global vars don't contribute to a CodeBlock's numLocals count, since - global storage is fixed and allocated at startup - - and - - (b) references to global vars get shifted to elide intermediate stack - between "r" and the global storage area. - - * VM/Machine.cpp: - (KJS::Machine::dumpRegisters): Updated this function to match the new - register file layout, and added the ability to dump exact identifiers - for the different parts of a call frame. - - (KJS::Machine::unwindCallFrame): Updated this function to match the new - register file layout. - - (KJS::Machine::execute): Updated this function to initialize a call frame - header for global code, and to swap global storage areas when switching - to execution in a new global object. - - (KJS::Machine::privateExecute): Got rid of "safeForReentry" and re-reading - of registerBase because the register file is always safe for reentry now, - and registerBase never changes. - - * VM/Machine.h: Moved the call frame header enum from Machine to RegisterFile, - to resolve a header dependency problem (a good sign that the enum belonged - in RegisterFile all along!) - - * VM/RegisterFile.cpp: - * VM/RegisterFile.h: Changed RegisterFile to mmap a fixed size register - area. This allows us to avoid re-allocting the register file later on. - Instead, we rely on the OS to allocate physical pages to the register - file as necessary. - - * VM/RegisterFileStack.cpp: Removed. Tada! - * VM/RegisterFileStack.h: Removed. Tada! - - * kjs/DebuggerCallFrame.cpp: Updated this class to match the new - register file layout, greatly simplifying it in the process. - - * kjs/JSActivation.h: - * kjs/JSActivation.cpp: Moved some of this logic up to JSVariableObject, - since the global object now needs to be able to tear off its registers - just like the activation object. - - * kjs/JSFunction.cpp: No need to fiddle with the register file anymore. - - * kjs/JSGlobalObject.h: - * kjs/JSGlobalObject.cpp: Updated JSGlobalObject to support moving its - global storage area into and out of the register file. - - * kjs/PropertySlot.cpp: No need to fiddle with the register file anymore. - - * kjs/collector.cpp: Renamed markStackObjectConservatively to - markConservatively, since we don't just mark stack objects this way. - - Also, added code to mark the machine's register file. - - * kjs/config.h: Moved some platforms #defines from here... - * wtf/Platform.h: ...to here, to support mmap/VirtualAlloc detection - in RegisterFile.h. - -2008-06-26 Mark Rowe - - Speculative fix for the Windows build. - - * kjs/JSImmediate.cpp: - -2008-06-26 Mark Rowe - - Reviewed by Darin Adler and Geoff Garen. - - Fix the malloc zone introspection functions so that malloc_zone_statistics does not give - bogus output in an application that uses JavaScriptCore. - - * kjs/CollectorHeapIntrospector.cpp: - (KJS::CollectorHeapIntrospector::statistics): Return statistics about memory allocated by the collector. - * kjs/CollectorHeapIntrospector.h: - * wtf/FastMalloc.cpp: Zero out the statistics. FastMalloc doesn't track this information at present. - Returning zero for all values is preferable to returning bogus data. - -2008-06-26 Darin Adler - - Reviewed by Geoff. - - - https://bugs.webkit.org/show_bug.cgi?id=19721 - speed up JavaScriptCore by not wrapping strings in objects just - to call functions on them - - - optimize UString append and the replace function a bit - - SunSpider says 1.8% faster. - - * JavaScriptCore.exp: Updated. - - * VM/JSPropertyNameIterator.cpp: Added include of JSString.h, now needed - because jsString returns a JSString*. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Removed the toObject call from native - function calls. Also removed code to put the this value into a register. - - * kjs/BooleanObject.cpp: - (KJS::booleanProtoFuncToString): Rewrite to handle false and true - separately. - - * kjs/FunctionPrototype.cpp: - (KJS::constructFunction): Use single-character append rather than building - a string for each character. - * kjs/JSFunction.cpp: - (KJS::globalFuncUnescape): Ditto. - - * kjs/JSImmediate.cpp: - (KJS::JSImmediate::prototype): Added. Gets the appropriate prototype for - use with an immediate value. To be used instead of toObject when doing a - get on an immediate value. - * kjs/JSImmediate.h: Added prototype. - - * kjs/JSObject.cpp: - (KJS::JSObject::toString): Tweaked formatting. - - * kjs/JSObject.h: - (KJS::JSValue::get): Use prototype instead of toObject to avoid creating - an object wrapper just to search for properties. This also saves an - unnecessary hash table lookup since the object wrappers themselves don't - have any properties. - - * kjs/JSString.h: Added toThisString and toThisJSString. - - * kjs/JSValue.cpp: - (KJS::JSCell::toThisString): Added. - (KJS::JSCell::toThisJSString): Added. - (KJS::JSCell::getJSNumber): Added. - (KJS::jsString): Changed return type to JSString*. - (KJS::jsOwnedString): Ditto. - - * kjs/JSValue.h: - (KJS::JSValue::toThisString): Added. - (KJS::JSValue::toThisJSString): Added. - (KJS::JSValue::getJSNumber): Added. - - * kjs/NumberObject.cpp: - (KJS::NumberObject::getJSNumber): Added. - (KJS::integer_part_noexp): Append C string directly rather than first - turning it into a UString. - (KJS::numberProtoFuncToString): Use getJSNumber to check if the value - is a number rather than isObject(&NumberObject::info). This works for - immediate numbers, number cells, and NumberObject instances. - (KJS::numberProtoFuncToLocaleString): Ditto. - (KJS::numberProtoFuncValueOf): Ditto. - (KJS::numberProtoFuncToFixed): Ditto. - (KJS::numberProtoFuncToExponential): Ditto. - (KJS::numberProtoFuncToPrecision): Ditto. - * kjs/NumberObject.h: Added getJSNumber. - - * kjs/PropertySlot.cpp: Tweaked comment. - - * kjs/internal.cpp: - (KJS::JSString::toThisString): Added. - (KJS::JSString::toThisJSString): Added. - (KJS::JSString::getOwnPropertySlot): Changed code that searches the - prototype chain to start with the string prototype and not create a - string object. - (KJS::JSNumberCell::toThisString): Added. - (KJS::JSNumberCell::getJSNumber): Added. - - * kjs/lookup.cpp: - (KJS::staticFunctionGetter): Moved here, because there's no point in - having a function that's only used for a function pointer be inline. - (KJS::setUpStaticFunctionSlot): New function for getStaticFunctionSlot. - - * kjs/lookup.h: - (KJS::staticValueGetter): Don't mark this inline. It doesn't make sense - to have a function that's only used for a function pointer be inline. - (KJS::getStaticFunctionSlot): Changed to get properties from the parent - first before doing any handling of functions. This is the fastest way - to return the function once the initial setup is done. - - * kjs/string_object.cpp: - (KJS::StringObject::getPropertyNames): Call value() instead of getString(), - avoiding an unnecessary virtual function call (the call to the type() - function in the implementation of the isString() function). - (KJS::StringObject::toString): Added. - (KJS::StringObject::toThisString): Added. - (KJS::StringObject::toThisJSString): Added. - (KJS::substituteBackreferences): Rewrote to use a appending algorithm - instead of a the old one that tried to replace in place. - (KJS::stringProtoFuncReplace): Merged this function and the replace function. - Replaced the hand-rolled dynamic arrays for source ranges and replacements - with Vector. - (KJS::stringProtoFuncToString): Handle JSString as well as StringObject. - Removed the separate valueOf implementation, since it can just share this. - (KJS::stringProtoFuncCharAt): Use toThisString, which handles JSString as - well as StringObject, and is slightly more efficient than the old code too. - (KJS::stringProtoFuncCharCodeAt): Ditto. - (KJS::stringProtoFuncConcat): Ditto. - (KJS::stringProtoFuncIndexOf): Ditto. - (KJS::stringProtoFuncLastIndexOf): Ditto. - (KJS::stringProtoFuncMatch): Ditto. - (KJS::stringProtoFuncSearch): Ditto. - (KJS::stringProtoFuncSlice): Ditto. - (KJS::stringProtoFuncSplit): Ditto. - (KJS::stringProtoFuncSubstr): Ditto. - (KJS::stringProtoFuncSubstring): Ditto. - (KJS::stringProtoFuncToLowerCase): Use toThisJSString. - (KJS::stringProtoFuncToUpperCase): Ditto. - (KJS::stringProtoFuncToLocaleLowerCase): Ditto. - (KJS::stringProtoFuncToLocaleUpperCase): Ditto. - (KJS::stringProtoFuncLocaleCompare): Ditto. - (KJS::stringProtoFuncBig): Use toThisString. - (KJS::stringProtoFuncSmall): Ditto. - (KJS::stringProtoFuncBlink): Ditto. - (KJS::stringProtoFuncBold): Ditto. - (KJS::stringProtoFuncFixed): Ditto. - (KJS::stringProtoFuncItalics): Ditto. - (KJS::stringProtoFuncStrike): Ditto. - (KJS::stringProtoFuncSub): Ditto. - (KJS::stringProtoFuncSup): Ditto. - (KJS::stringProtoFuncFontcolor): Ditto. - (KJS::stringProtoFuncFontsize): Ditto. - (KJS::stringProtoFuncAnchor): Ditto. - (KJS::stringProtoFuncLink): Ditto. - - * kjs/string_object.h: Added toString, toThisString, and toThisJSString. - - * kjs/ustring.cpp: - (KJS::UString::append): Added a version that takes a character pointer and - size, so we don't have to create a UString just to append to another UString. - * kjs/ustring.h: - -2008-06-26 Alexey Proskuryakov - - Reviewed by Maciej. - - Make JSGlobalData per-thread. - - No change on SunSpider total. - - * wtf/ThreadSpecific.h: Re-enabled the actual implementation. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::~JSGlobalObject): Re-added a JSLock-related assertion. We'll probably - want to preserve these somehow to keep legacy behavior in working condition. - (KJS::JSGlobalObject::init): Initialize globalData pointer earlier, so that it is ready - when updating JSGlobalObject linked list. - - * kjs/JSGlobalObject.h: (KJS::JSGlobalObject::head): Changed head() to be non-static, and - to use JSGlobalData associated with the current object. - - * kjs/InitializeThreading.cpp: (KJS::initializeThreadingOnce): Removed a no longer needed - Heap::registerAsMainThread() call. - - * kjs/JSGlobalData.h: Removed a lying lie comment - parserObjectExtraRefCounts is not - transient, and while newParserObjects may conceptually be such, there is still some node - manipulation going on outside Parser::parse which touches it. - - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::~JSGlobalData): Delete recently added members. - (KJS::JSGlobalData::sharedInstance): Actually use a separate instance. - - * kjs/collector.cpp: - (KJS::Heap::Heap): - (KJS::Heap::~Heap): Added a destructor, which unconditionally deletes everything. - (KJS::Heap::sweep): Removed code related to "collect on main thread only" logic. - (KJS::Heap::collect): Ditto. - (KJS::Heap::globalObjectCount): Explicitly use per-thread instance of JSGlobalObject linked - list now that JSGlobalObject::head() is not static. Curently, WebCoreStatistics methods only - work with the main thread currently anyway. - (KJS::Heap::protectedGlobalObjectCount): Ditto. - - * kjs/collector.h: Removed code related to "collect on main thread only" logic. - - * JavaScriptCore.exp: Removed Heap::collectOnMainThreadOnly. - -2008-06-26 Alexey Proskuryakov - - Reviewed by Darin. - - https://bugs.webkit.org/show_bug.cgi?id=19767 - REGRESSION: Crash in sort() when visiting http://www.onnyturf.com/subway/ - - * kjs/JSArray.cpp: (KJS::AVLTreeAbstractorForArrayCompare::set_balance_factor): - Made changing balance factor from -1 to +1 work correctly. - - * wtf/AVLTree.h: (KJS::AVLTreeDefaultBSet::operator[]): Added an assertion that catches - this slightly earlier. - -2008-06-25 Timothy Hatcher - - Fixes an ASSERT in the profiler when starting multiple profiles - with the same name inside the same function/program. - - Reviewed by Kevin McCullough. - - * profiler/Profile.cpp: - (KJS::Profile::Profile): Initialize m_stoppedCallDepth to zero. - (KJS::Profile::stopProfiling): Set the current node to the parent, - because we are in a call that will not get a didExecute call. - (KJS::Profile::removeProfile): Increment m_stoppedCallDepth to - account for didExecute not being called for profile. - (KJS::Profile::willExecute): Increment m_stoppedCallDepth if stopped. - (KJS::Profile::didExecute): Decrement m_stoppedCallDepth if stopped and - greater than zero, and return early. - * profiler/Profile.h: Added stoppedProfiling(). - * profiler/Profiler.cpp: - (KJS::Profiler::findProfile): Removed. - (KJS::Profiler::startProfiling): Don't return early for stopped profiles. - (KJS::Profiler::stopProfiling): Skipp stopped profiles. - (KJS::Profiler::didFinishAllExecution): Code clean-up. - * profiler/Profiler.h: Removed findProfile. - -2008-06-25 Cameron Zwarich - - Reviewed by Alexey Proskuryakov. - - Attempt to fix Windows debug build. The compiler gives a warning when - Structured Exception Handling and destructors are used in the same - function. Using manual locking and unlocking instead of constructors - and destructors should fix the warning. - - * kjs/Shell.cpp: - (main): - -2008-06-25 Alexey Proskuryakov - - Forgot to address a review comment about better names for tracked objects, doing it now. - - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::JSGlobalData): - * kjs/JSGlobalData.h: - * kjs/nodes.cpp: - (KJS::ParserRefCounted::ParserRefCounted): - (KJS::ParserRefCounted::ref): - (KJS::ParserRefCounted::deref): - (KJS::ParserRefCounted::hasOneRef): - (KJS::ParserRefCounted::deleteNewObjects): - -2008-06-25 Alexey Proskuryakov - - Reviewed by Geoff. - - Remove more threadInstance() calls. - - * kjs/JSFunction.cpp: - (KJS::JSFunction::getParameterName): - (KJS::IndexToNameMap::unMap): - (KJS::Arguments::deleteProperty): - * kjs/JSFunction.h: - Access nullIdentifier without going to thread specific storage. - - * JavaScriptCore.exp: - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::JSGlobalData): - * kjs/JSGlobalData.h: - * kjs/Parser.cpp: - (KJS::Parser::parse): - * kjs/Parser.h: - (KJS::ParserRefCountedData::ParserRefCountedData): - (KJS::Parser::parse): - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::ParserRefCounted::ParserRefCounted): - (KJS::ParserRefCounted::ref): - (KJS::ParserRefCounted::deref): - (KJS::ParserRefCounted::hasOneRef): - (KJS::ParserRefCounted::deleteNewObjects): - (KJS::Node::Node): - (KJS::StatementNode::StatementNode): - (KJS::BreakpointCheckStatement::BreakpointCheckStatement): - (KJS::ConstDeclNode::ConstDeclNode): - (KJS::BlockNode::BlockNode): - (KJS::ForInNode::ForInNode): - (KJS::ScopeNode::ScopeNode): - (KJS::ProgramNode::ProgramNode): - (KJS::ProgramNode::create): - (KJS::EvalNode::EvalNode): - (KJS::EvalNode::create): - (KJS::FunctionBodyNode::FunctionBodyNode): - (KJS::FunctionBodyNode::create): - * kjs/nodes.h: - (KJS::ExpressionNode::): - (KJS::NullNode::): - (KJS::BooleanNode::): - (KJS::NumberNode::): - (KJS::ImmediateNumberNode::): - (KJS::StringNode::): - (KJS::RegExpNode::): - (KJS::ThisNode::): - (KJS::ResolveNode::): - (KJS::ElementNode::): - (KJS::ArrayNode::): - (KJS::PropertyNode::): - (KJS::PropertyListNode::): - (KJS::ObjectLiteralNode::): - (KJS::BracketAccessorNode::): - (KJS::DotAccessorNode::): - (KJS::ArgumentListNode::): - (KJS::ArgumentsNode::): - (KJS::NewExprNode::): - (KJS::EvalFunctionCallNode::): - (KJS::FunctionCallValueNode::): - (KJS::FunctionCallResolveNode::): - (KJS::FunctionCallBracketNode::): - (KJS::FunctionCallDotNode::): - (KJS::PrePostResolveNode::): - (KJS::PostIncResolveNode::): - (KJS::PostDecResolveNode::): - (KJS::PostfixBracketNode::): - (KJS::PostIncBracketNode::): - (KJS::PostDecBracketNode::): - (KJS::PostfixDotNode::): - (KJS::PostIncDotNode::): - (KJS::PostDecDotNode::): - (KJS::PostfixErrorNode::): - (KJS::DeleteResolveNode::): - (KJS::DeleteBracketNode::): - (KJS::DeleteDotNode::): - (KJS::DeleteValueNode::): - (KJS::VoidNode::): - (KJS::TypeOfResolveNode::): - (KJS::TypeOfValueNode::): - (KJS::PreIncResolveNode::): - (KJS::PreDecResolveNode::): - (KJS::PrefixBracketNode::): - (KJS::PreIncBracketNode::): - (KJS::PreDecBracketNode::): - (KJS::PrefixDotNode::): - (KJS::PreIncDotNode::): - (KJS::PreDecDotNode::): - (KJS::PrefixErrorNode::): - (KJS::UnaryOpNode::UnaryOpNode): - (KJS::UnaryPlusNode::): - (KJS::NegateNode::): - (KJS::BitwiseNotNode::): - (KJS::LogicalNotNode::): - (KJS::BinaryOpNode::BinaryOpNode): - (KJS::ReverseBinaryOpNode::ReverseBinaryOpNode): - (KJS::MultNode::): - (KJS::DivNode::): - (KJS::ModNode::): - (KJS::AddNode::): - (KJS::SubNode::): - (KJS::LeftShiftNode::): - (KJS::RightShiftNode::): - (KJS::UnsignedRightShiftNode::): - (KJS::LessNode::): - (KJS::GreaterNode::): - (KJS::LessEqNode::): - (KJS::GreaterEqNode::): - (KJS::InstanceOfNode::): - (KJS::InNode::): - (KJS::EqualNode::): - (KJS::NotEqualNode::): - (KJS::StrictEqualNode::): - (KJS::NotStrictEqualNode::): - (KJS::BitAndNode::): - (KJS::BitOrNode::): - (KJS::BitXOrNode::): - (KJS::LogicalAndNode::): - (KJS::LogicalOrNode::): - (KJS::ConditionalNode::): - (KJS::ReadModifyResolveNode::): - (KJS::AssignResolveNode::): - (KJS::ReadModifyBracketNode::): - (KJS::AssignBracketNode::): - (KJS::AssignDotNode::): - (KJS::ReadModifyDotNode::): - (KJS::AssignErrorNode::): - (KJS::CommaNode::): - (KJS::VarDeclCommaNode::): - (KJS::ConstStatementNode::): - (KJS::SourceElements::SourceElements): - (KJS::EmptyStatementNode::): - (KJS::DebuggerStatementNode::): - (KJS::ExprStatementNode::): - (KJS::VarStatementNode::): - (KJS::IfNode::): - (KJS::IfElseNode::): - (KJS::DoWhileNode::): - (KJS::WhileNode::): - (KJS::ForNode::): - (KJS::ContinueNode::): - (KJS::BreakNode::): - (KJS::ReturnNode::): - (KJS::WithNode::): - (KJS::LabelNode::): - (KJS::ThrowNode::): - (KJS::TryNode::): - (KJS::ParameterNode::): - (KJS::FuncExprNode::): - (KJS::FuncDeclNode::): - (KJS::CaseClauseNode::): - (KJS::ClauseListNode::): - (KJS::CaseBlockNode::): - (KJS::SwitchNode::): - Changed ParserRefCounted to hold a JSGlobalData pointer, and used it to replace - threadInstance calls. - -2008-06-24 Cameron Zwarich - - Reviewed by Alexey Proskuryakov. - - Make the JavaScript shell collect the heap from main() instead of - jscmain() to suppress leak messages in debug builds. - - * kjs/Shell.cpp: - (main): - (jscmain): - -2008-06-24 Cameron Zwarich - - Reviewed by Maciej. - - Make the conversion of the pair (less, jtrue) to jless use register - reference counting information for safety instead of requiring callers - to decide whether it is safe. - - No changes on SunSpider codegen. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitJumpIfTrue): - * VM/CodeGenerator.h: - * kjs/nodes.cpp: - (KJS::DoWhileNode::emitCode): - (KJS::WhileNode::emitCode): - (KJS::ForNode::emitCode): - (KJS::CaseBlockNode::emitCodeForBlock): - -2008-06-24 Kevin McCullough - - Reviewed by Tim. - - JSProfiler: Profiler goes into an infinite - loop sometimes. - JSProfiler: Profiler asserts in debug and - give the wrong times in release - - Fixed two issues found by Tim in the same test. - - * profiler/Profile.cpp: - (KJS::Profile::removeProfileStart): No longer take profile's time from - all ancestors, but instead attribute it to its parent. Also add an - Assert to ensure we only delete the child we mean to. - (KJS::Profile::removeProfileEnd): Ditto for profileEnd. - (KJS::Profile::didExecute): Cleaned up the execution order and correctly - attribute all of the parent's time to the new node. - * profiler/ProfileNode.cpp: If this node does not have a startTime it - should not get a giant total time, but instead be 0. - (KJS::ProfileNode::endAndRecordCall): - * profiler/ProfileNode.h: - (KJS::ProfileNode::removeChild): Should reset the sibling pointers since - one of them has been removed. - -2008-06-24 Darin Adler - - Reviewed by Cameron. - - - fix https://bugs.webkit.org/show_bug.cgi?id=19739 - REGRESSION: fast/js/property-getters-and-setters.html fails - - * kjs/JSObject.cpp: - (KJS::JSObject::put): Remove an untested optimization I checked in by accident. - The two loops up the prototype chain both need to start from this; instead the - second loop was starting where the first loop left off. - -2008-06-24 Steve Falkenburg - - Build fix. - - * kjs/nodes.cpp: - -2008-06-24 Joerg Bornemann - - Reviewed by Simon. - - For the Qt build on Windows don't depend on the presence of GNU CPP - but use MSVC's preprocessor instead. - dftables accepts a --preprocessor option which is set in pcre.pri for MSVC platforms. - - * pcre/dftables: Added support for specifying the preprocessor command - to use via --preprocessor, similar to - WebCore/bindings/scripts/generate-bindings.pl. - * pcre/pcre.pri: Pass --preprocessor='cl /e' to dftables, or more - generally speaking QMAKE_CC /E for the win32-msvc buildspecs. - -2008-06-24 Simon Hausmann - - Fix the Qt build, added missing include. - - * kjs/PropertySlot.cpp: - -2008-06-24 Alexey Proskuryakov - - Reviewed by Cameron Zwarich. - - Make ParserRefCountedCounter actually perform a leak check. - - * kjs/nodes.cpp: - (KJS::ParserRefCountedCounter::~ParserRefCountedCounter): Check for leaks in destructor, - not in constructor. - (KJS::ParserRefCountedCounter::increment): - (KJS::ParserRefCountedCounter::decrement): - (KJS::ParserRefCounted::ParserRefCounted): - (KJS::ParserRefCounted::~ParserRefCounted): - While at it, also made counting thread-safe. - -2008-06-24 Cameron Zwarich - - Reviewed by Oliver. - - Bug 19730: REGRESSION (r34497): Text in alerts in "Leisure suit Larry" is not wrapped - - - Do not convert the pair (less, jtrue) to jless when jtrue is a jump - target. An example of this is when the condition of a while loop is a - LogicalOrNode. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitLabel): - -2008-06-20 Ariya Hidayat - - Reviewed by Adam Roben. - - Fix compile with MinGW. - - * kjs/Shell.cpp: - * wtf/Threading.h: - (WTF::atomicIncrement): - (WTF::atomicDecrement): - -2008-06-23 Mark Rowe - - Reviewed by Oliver Hunt. - - Prepration for returning memory to the OS on Windows. Track whether a portion of a span of memory was returned to the OS. - If it was, ask that it be recommitted before returning it to the application as an allocated region. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::New): If the span was decommitted, ask that it be recommitted before returning it. - (WTF::TCMalloc_PageHeap::AllocLarge): Ditto. - (WTF::TCMalloc_PageHeap::Carve): When splitting a span, ensure that the decommitted state propogates to the two new spans. - (WTF::TCMalloc_PageHeap::Delete): When merging a span, ensure that the resulting span is marked as decommitted if any of the - spans being merged were marked as decommitted. - (WTF::TCMalloc_PageHeap::IncrementalScavenge): Mark as decommitted after releasing the span. - (WTF::TCMalloc_Central_FreeList::FetchFromSpans): Add an assertion to catch a decommitted span being returned to the application - without first being recommitted. - (WTF::TCMalloc_Central_FreeList::Populate): Ditto. - * wtf/TCSystemAlloc.cpp: Stub out TCMalloc_SystemCommit. - * wtf/TCSystemAlloc.h: - -2008-06-23 Mark Rowe - - Reviewed by Sam Weinig. - - Remove the sample member of Span when NO_TCMALLOC_SAMPLES is defined. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::Delete): Only update Span::sample if NO_TCMALLOC_SAMPLES is not defined. - (WTF::TCMallocStats::do_free): Ditto. - -2008-06-23 Darin Adler - - Reviewed by Geoff. - - - work toward https://bugs.webkit.org/show_bug.cgi?id=19721 - - More preparation toward making functions work on primitive types without - creating wrapper objects. No speedup this time, but prepares for a future - speedup without slowing things down. - - SunSpider reports no change. - - - Eliminated the implementsCall, callAsFunction and construct virtual - functions from JSObject. Instead, the CallData and ConstructData for - a native function includes a function pointer that the caller can use - directly. Changed all call sites to use CallData and ConstructData. - - - Changed the "this" argument to native functions to be a JSValue rather - than a JSObject. This prepares us for passing primitives into these - functions. The conversion to an object now must be done inside the - function. Critically, if it's a function that can be called on a DOM - window object, then we have to be sure to call toThisObject on the - argument before we use it for anything even if it's already an object. - - - Eliminated the practice of using constructor objects in the global - object to make objects of the various basic types. Since these - constructors can't be replaced by script, there's no reason to involve - a constructor object at all. Added functions to do the construction - directly. - - - Made some more class members private and protected, including virtual - function overrides. This can catch code using unnecessarily slow virtual - function code paths when the type of an object is known statically. If we - later find a new reason use the members outside the class it's easy to - make them public again. - - - Moved the declarations of the native implementations for functions out - of header files. These can have internal linkage and be declared inside - the source file. - - - Changed PrototypeFunction to take function pointers with the right - arguments to be put directly into CallData. This eliminates the - need to have a separate PrototypeReflexiveFunction, and reveals that the - real purpose of that class included something else specific to eval -- - storage of a cached global object. So renamed PrototypeReflexiveFunction - to GlobalEvalFunction. - - * API/JSCallbackConstructor.cpp: - (KJS::constructJSCallback): - (KJS::JSCallbackConstructor::getConstructData): - * API/JSCallbackConstructor.h: - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::implementsHasInstance): - (KJS::JSCallbackFunction::call): - (KJS::JSCallbackFunction::getCallData): - * API/JSCallbackFunction.h: - (KJS::JSCallbackFunction::classInfo): - * API/JSCallbackObject.h: - (KJS::JSCallbackObject::classRef): - (KJS::JSCallbackObject::classInfo): - * API/JSCallbackObjectFunctions.h: - (KJS::::getConstructData): - (KJS::::construct): - (KJS::::getCallData): - (KJS::::call): - * API/JSObjectRef.cpp: - (JSObjectMakeFunction): - (JSObjectIsFunction): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - * JavaScriptCore.exp: - * VM/Machine.cpp: - (KJS::jsTypeStringForValue): - (KJS::Machine::privateExecute): - * kjs/ArrayPrototype.cpp: - (KJS::arrayProtoFuncToString): - (KJS::arrayProtoFuncToLocaleString): - (KJS::arrayProtoFuncJoin): - (KJS::arrayProtoFuncConcat): - (KJS::arrayProtoFuncPop): - (KJS::arrayProtoFuncPush): - (KJS::arrayProtoFuncReverse): - (KJS::arrayProtoFuncShift): - (KJS::arrayProtoFuncSlice): - (KJS::arrayProtoFuncSort): - (KJS::arrayProtoFuncSplice): - (KJS::arrayProtoFuncUnShift): - (KJS::arrayProtoFuncFilter): - (KJS::arrayProtoFuncMap): - (KJS::arrayProtoFuncEvery): - (KJS::arrayProtoFuncForEach): - (KJS::arrayProtoFuncSome): - (KJS::arrayProtoFuncIndexOf): - (KJS::arrayProtoFuncLastIndexOf): - (KJS::ArrayConstructor::ArrayConstructor): - (KJS::constructArrayWithSizeQuirk): - (KJS::constructWithArrayConstructor): - (KJS::ArrayConstructor::getConstructData): - (KJS::callArrayConstructor): - (KJS::ArrayConstructor::getCallData): - * kjs/ArrayPrototype.h: - * kjs/BooleanObject.cpp: - (KJS::booleanProtoFuncToString): - (KJS::booleanProtoFuncValueOf): - (KJS::constructBoolean): - (KJS::constructWithBooleanConstructor): - (KJS::BooleanConstructor::getConstructData): - (KJS::callBooleanConstructor): - (KJS::BooleanConstructor::getCallData): - (KJS::constructBooleanFromImmediateBoolean): - * kjs/BooleanObject.h: - * kjs/CallData.h: - (KJS::): - * kjs/ConstructData.h: - (KJS::): - * kjs/FunctionPrototype.cpp: - (KJS::callFunctionPrototype): - (KJS::FunctionPrototype::getCallData): - (KJS::functionProtoFuncToString): - (KJS::functionProtoFuncApply): - (KJS::functionProtoFuncCall): - (KJS::constructWithFunctionConstructor): - (KJS::FunctionConstructor::getConstructData): - (KJS::callFunctionConstructor): - (KJS::FunctionConstructor::getCallData): - (KJS::constructFunction): - * kjs/FunctionPrototype.h: - * kjs/JSArray.cpp: - (KJS::AVLTreeAbstractorForArrayCompare::compare_key_key): - (KJS::JSArray::sort): - (KJS::constructEmptyArray): - (KJS::constructArray): - * kjs/JSArray.h: - (KJS::JSArray::classInfo): - * kjs/JSFunction.cpp: - (KJS::JSFunction::call): - (KJS::globalFuncEval): - (KJS::globalFuncParseInt): - (KJS::globalFuncParseFloat): - (KJS::globalFuncIsNaN): - (KJS::globalFuncIsFinite): - (KJS::globalFuncDecodeURI): - (KJS::globalFuncDecodeURIComponent): - (KJS::globalFuncEncodeURI): - (KJS::globalFuncEncodeURIComponent): - (KJS::globalFuncEscape): - (KJS::globalFuncUnescape): - (KJS::globalFuncKJSPrint): - (KJS::PrototypeFunction::PrototypeFunction): - (KJS::PrototypeFunction::getCallData): - (KJS::GlobalEvalFunction::GlobalEvalFunction): - (KJS::GlobalEvalFunction::mark): - * kjs/JSFunction.h: - (KJS::InternalFunction::classInfo): - (KJS::InternalFunction::functionName): - (KJS::JSFunction::classInfo): - (KJS::GlobalEvalFunction::cachedGlobalObject): - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::reset): - (KJS::JSGlobalObject::mark): - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::JSGlobalObject): - (KJS::JSGlobalObject::evalFunction): - * kjs/JSImmediate.cpp: - (KJS::JSImmediate::toObject): - * kjs/JSNotAnObject.cpp: - * kjs/JSNotAnObject.h: - * kjs/JSObject.cpp: - (KJS::JSObject::put): - (KJS::callDefaultValueFunction): - (KJS::JSObject::defaultValue): - (KJS::JSObject::lookupGetter): - (KJS::JSObject::lookupSetter): - (KJS::JSObject::hasInstance): - (KJS::JSObject::fillGetterPropertySlot): - (KJS::Error::create): - (KJS::constructEmptyObject): - * kjs/JSObject.h: - (KJS::GetterSetter::GetterSetter): - (KJS::GetterSetter::getter): - (KJS::GetterSetter::setGetter): - (KJS::GetterSetter::setter): - (KJS::GetterSetter::setSetter): - * kjs/JSValue.cpp: - (KJS::JSCell::deleteProperty): - (KJS::call): - (KJS::construct): - * kjs/JSValue.h: - * kjs/MathObject.cpp: - (KJS::mathProtoFuncAbs): - (KJS::mathProtoFuncACos): - (KJS::mathProtoFuncASin): - (KJS::mathProtoFuncATan): - (KJS::mathProtoFuncATan2): - (KJS::mathProtoFuncCeil): - (KJS::mathProtoFuncCos): - (KJS::mathProtoFuncExp): - (KJS::mathProtoFuncFloor): - (KJS::mathProtoFuncLog): - (KJS::mathProtoFuncMax): - (KJS::mathProtoFuncMin): - (KJS::mathProtoFuncPow): - (KJS::mathProtoFuncRandom): - (KJS::mathProtoFuncRound): - (KJS::mathProtoFuncSin): - (KJS::mathProtoFuncSqrt): - (KJS::mathProtoFuncTan): - * kjs/MathObject.h: - * kjs/NumberObject.cpp: - (KJS::numberProtoFuncToString): - (KJS::numberProtoFuncToLocaleString): - (KJS::numberProtoFuncValueOf): - (KJS::numberProtoFuncToFixed): - (KJS::numberProtoFuncToExponential): - (KJS::numberProtoFuncToPrecision): - (KJS::NumberConstructor::NumberConstructor): - (KJS::constructWithNumberConstructor): - (KJS::NumberConstructor::getConstructData): - (KJS::callNumberConstructor): - (KJS::NumberConstructor::getCallData): - (KJS::constructNumber): - (KJS::constructNumberFromImmediateNumber): - * kjs/NumberObject.h: - (KJS::NumberObject::classInfo): - (KJS::NumberConstructor::classInfo): - * kjs/PropertySlot.cpp: - (KJS::PropertySlot::functionGetter): - * kjs/RegExpObject.cpp: - (KJS::regExpProtoFuncTest): - (KJS::regExpProtoFuncExec): - (KJS::regExpProtoFuncCompile): - (KJS::regExpProtoFuncToString): - (KJS::callRegExpObject): - (KJS::RegExpObject::getCallData): - (KJS::constructRegExp): - (KJS::constructWithRegExpConstructor): - (KJS::RegExpConstructor::getConstructData): - (KJS::callRegExpConstructor): - (KJS::RegExpConstructor::getCallData): - * kjs/RegExpObject.h: - (KJS::RegExpConstructor::classInfo): - * kjs/Shell.cpp: - (GlobalObject::GlobalObject): - (functionPrint): - (functionDebug): - (functionGC): - (functionVersion): - (functionRun): - (functionLoad): - (functionReadline): - (functionQuit): - * kjs/date_object.cpp: - (KJS::gmtoffset): - (KJS::formatLocaleDate): - (KJS::fillStructuresUsingDateArgs): - (KJS::DateInstance::getTime): - (KJS::DateInstance::getUTCTime): - (KJS::DateConstructor::DateConstructor): - (KJS::constructDate): - (KJS::DateConstructor::getConstructData): - (KJS::callDate): - (KJS::DateConstructor::getCallData): - (KJS::dateParse): - (KJS::dateNow): - (KJS::dateUTC): - (KJS::dateProtoFuncToString): - (KJS::dateProtoFuncToUTCString): - (KJS::dateProtoFuncToDateString): - (KJS::dateProtoFuncToTimeString): - (KJS::dateProtoFuncToLocaleString): - (KJS::dateProtoFuncToLocaleDateString): - (KJS::dateProtoFuncToLocaleTimeString): - (KJS::dateProtoFuncValueOf): - (KJS::dateProtoFuncGetTime): - (KJS::dateProtoFuncGetFullYear): - (KJS::dateProtoFuncGetUTCFullYear): - (KJS::dateProtoFuncToGMTString): - (KJS::dateProtoFuncGetMonth): - (KJS::dateProtoFuncGetUTCMonth): - (KJS::dateProtoFuncGetDate): - (KJS::dateProtoFuncGetUTCDate): - (KJS::dateProtoFuncGetDay): - (KJS::dateProtoFuncGetUTCDay): - (KJS::dateProtoFuncGetHours): - (KJS::dateProtoFuncGetUTCHours): - (KJS::dateProtoFuncGetMinutes): - (KJS::dateProtoFuncGetUTCMinutes): - (KJS::dateProtoFuncGetSeconds): - (KJS::dateProtoFuncGetUTCSeconds): - (KJS::dateProtoFuncGetMilliSeconds): - (KJS::dateProtoFuncGetUTCMilliseconds): - (KJS::dateProtoFuncGetTimezoneOffset): - (KJS::dateProtoFuncSetTime): - (KJS::setNewValueFromTimeArgs): - (KJS::setNewValueFromDateArgs): - (KJS::dateProtoFuncSetMilliSeconds): - (KJS::dateProtoFuncSetUTCMilliseconds): - (KJS::dateProtoFuncSetSeconds): - (KJS::dateProtoFuncSetUTCSeconds): - (KJS::dateProtoFuncSetMinutes): - (KJS::dateProtoFuncSetUTCMinutes): - (KJS::dateProtoFuncSetHours): - (KJS::dateProtoFuncSetUTCHours): - (KJS::dateProtoFuncSetDate): - (KJS::dateProtoFuncSetUTCDate): - (KJS::dateProtoFuncSetMonth): - (KJS::dateProtoFuncSetUTCMonth): - (KJS::dateProtoFuncSetFullYear): - (KJS::dateProtoFuncSetUTCFullYear): - (KJS::dateProtoFuncSetYear): - (KJS::dateProtoFuncGetYear): - * kjs/date_object.h: - (KJS::DateInstance::internalNumber): - (KJS::DateInstance::classInfo): - * kjs/error_object.cpp: - (KJS::errorProtoFuncToString): - (KJS::constructError): - (KJS::constructWithErrorConstructor): - (KJS::ErrorConstructor::getConstructData): - (KJS::callErrorConstructor): - (KJS::ErrorConstructor::getCallData): - (KJS::NativeErrorConstructor::construct): - (KJS::constructWithNativeErrorConstructor): - (KJS::NativeErrorConstructor::getConstructData): - (KJS::callNativeErrorConstructor): - (KJS::NativeErrorConstructor::getCallData): - * kjs/error_object.h: - (KJS::NativeErrorConstructor::classInfo): - * kjs/internal.cpp: - (KJS::JSNumberCell::toObject): - (KJS::JSNumberCell::toThisObject): - (KJS::GetterSetter::mark): - (KJS::GetterSetter::toPrimitive): - (KJS::GetterSetter::toBoolean): - (KJS::GetterSetter::toNumber): - (KJS::GetterSetter::toString): - (KJS::GetterSetter::toObject): - (KJS::InternalFunction::InternalFunction): - (KJS::InternalFunction::implementsHasInstance): - * kjs/lookup.h: - (KJS::HashEntry::): - * kjs/nodes.cpp: - (KJS::FuncDeclNode::makeFunction): - (KJS::FuncExprNode::makeFunction): - * kjs/object_object.cpp: - (KJS::objectProtoFuncValueOf): - (KJS::objectProtoFuncHasOwnProperty): - (KJS::objectProtoFuncIsPrototypeOf): - (KJS::objectProtoFuncDefineGetter): - (KJS::objectProtoFuncDefineSetter): - (KJS::objectProtoFuncLookupGetter): - (KJS::objectProtoFuncLookupSetter): - (KJS::objectProtoFuncPropertyIsEnumerable): - (KJS::objectProtoFuncToLocaleString): - (KJS::objectProtoFuncToString): - (KJS::ObjectConstructor::ObjectConstructor): - (KJS::constructObject): - (KJS::constructWithObjectConstructor): - (KJS::ObjectConstructor::getConstructData): - (KJS::callObjectConstructor): - (KJS::ObjectConstructor::getCallData): - * kjs/object_object.h: - * kjs/string_object.cpp: - (KJS::replace): - (KJS::stringProtoFuncToString): - (KJS::stringProtoFuncValueOf): - (KJS::stringProtoFuncCharAt): - (KJS::stringProtoFuncCharCodeAt): - (KJS::stringProtoFuncConcat): - (KJS::stringProtoFuncIndexOf): - (KJS::stringProtoFuncLastIndexOf): - (KJS::stringProtoFuncMatch): - (KJS::stringProtoFuncSearch): - (KJS::stringProtoFuncReplace): - (KJS::stringProtoFuncSlice): - (KJS::stringProtoFuncSplit): - (KJS::stringProtoFuncSubstr): - (KJS::stringProtoFuncSubstring): - (KJS::stringProtoFuncToLowerCase): - (KJS::stringProtoFuncToUpperCase): - (KJS::stringProtoFuncToLocaleLowerCase): - (KJS::stringProtoFuncToLocaleUpperCase): - (KJS::stringProtoFuncLocaleCompare): - (KJS::stringProtoFuncBig): - (KJS::stringProtoFuncSmall): - (KJS::stringProtoFuncBlink): - (KJS::stringProtoFuncBold): - (KJS::stringProtoFuncFixed): - (KJS::stringProtoFuncItalics): - (KJS::stringProtoFuncStrike): - (KJS::stringProtoFuncSub): - (KJS::stringProtoFuncSup): - (KJS::stringProtoFuncFontcolor): - (KJS::stringProtoFuncFontsize): - (KJS::stringProtoFuncAnchor): - (KJS::stringProtoFuncLink): - (KJS::stringFromCharCode): - (KJS::StringConstructor::StringConstructor): - (KJS::constructWithStringConstructor): - (KJS::StringConstructor::getConstructData): - (KJS::callStringConstructor): - (KJS::StringConstructor::getCallData): - * kjs/string_object.h: - -2008-06-23 Cameron Zwarich - - Reviewed by Oliver. - - Bug 19716: REGRESSION (SquirrelFish): Reproducible crash after entering a username at mint.com - - - When unwinding callframes for exceptions, check whether the callframe - was created by a reentrant native call to JavaScript after tearing off - the local variables instead of before. - - * VM/Machine.cpp: - (KJS::Machine::unwindCallFrame): - -2008-06-23 Mark Rowe - - Reviewed by Oliver Hunt. - - Get testapi passing again in a debug build. - - * API/testapi.c: - (main): Update the expected output of calling JSValueMakeString on a function object. - -2008-06-21 Mark Rowe - - Reviewed by Sam Weinig. - - Print a blank line when exiting the jsc interactive mode to ensure that the shell - prompt will start on a new line. - - * kjs/Shell.cpp: - (runInteractive): - -2008-06-21 Mark Rowe - - Rubber-stamped by Sam Weinig. - - Tweak the paths of the items in the "tests" group to clean things up a little. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-06-21 Mark Rowe - - Rubber-stamped by Sam Weinig. - - Fix jsc to link against libedit.dylib rather than libedit.2.dylib. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-06-21 Mark Rowe - - Reviewed by Sam Weinig. - - Copy the JavaScriptCore shell (jsc) into JavaScriptCore.framework so that it will - be included in nightly builds. - https://bugs.webkit.org/show_bug.cgi?id=19691 - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-06-21 Cameron Zwarich - - Reviewed by Mark Rowe. - - Fix the build for non-Mac Darwin platforms by disabling their support - for readline in the JavaScript shell. - - * kjs/config.h: - -2008-06-20 Timothy Hatcher - - Use member function pointers for the Profile::forEach function. - Eliminating a few static functions and simplified things a little. - - Reviewed by Alexey Proskuryakov. - - * JavaScriptCore.exp: Change the symbol for forEach. - * profiler/Profile.cpp: - (KJS::Profile::forEach): Use a member function pointer. - * profiler/Profile.h: - (KJS::Profile::sortTotalTimeDescending): Pass a function pointer. - (KJS::Profile::sortTotalTimeAscending): Ditto. - (KJS::Profile::sortSelfTimeDescending): Ditto. - (KJS::Profile::sortSelfTimeAscending): Ditto. - (KJS::Profile::sortCallsDescending): Ditto. - * profiler/ProfileNode.h: - (KJS::ProfileNode::sortTotalTimeDescending): No longer static. - (KJS::ProfileNode::sortTotalTimeAscending): Ditto. - (KJS::ProfileNode::sortSelfTimeDescending): Ditto. - (KJS::ProfileNode::sortSelfTimeAscending): Ditto. - (KJS::ProfileNode::sortCallsDescending): Ditto. - -2008-06-20 Cameron Zwarich - - Reviewed by Oliver. - - Remove unused destructors. - - * kjs/nodes.cpp: - * kjs/nodes.h: - -2008-06-20 Timothy Hatcher - - Fixed an ASSERT(m_actualSelfTime <= m_actualTotalTime) when starting - and stopping a profile from the Develop menu. Also prevents - inserting an incorrect parent node as the new head after profiling - is stopped from the Develop menu. - - Reviewed by Dan Bernstein. - - * profiler/Profile.cpp: - (KJS::Profile::stopProfiling): If the current node is already the head - then there is no more need to record future nodes in didExecute. - (KJS::Profile::didExecute): Move the code of setupCurrentNodeAsStopped - into here since this was the only caller. When setting the total time - keep any current total time while adding the self time of the head. - (KJS::Profile::setupCurrentNodeAsStopped): Removed. - * profiler/Profile.h: Removed setupCurrentNodeAsStopped. - -2008-06-20 Kevin Ollivier - - !USE(MULTIPLE_THREADS) on Darwin build fix - - * kjs/InitializeThreading.cpp: - (KJS::initializeThreading): - * kjs/collector.h: - -2008-06-20 Kevin McCullough - - -Leopard Build Fix. - - * profiler/Profile.cpp: - (KJS::Profile::removeProfileStart): - (KJS::Profile::removeProfileEnd): - -2008-06-20 Kevin McCullough - - Just giving credit. - - * ChangeLog: - -2008-06-20 Kevin McCullough - - Reviewed by Tim and Dan. - - JSProfiler: ASSERT hit in Profiler. - - Because InspectorController can call startProfiling() and - stopProfiling() we cannot assert that console.profile() and - console.profileEnd() will be in the profile tree. - - * profiler/Profile.cpp: - (KJS::Profile::removeProfileStart): - (KJS::Profile::removeProfileEnd): - -2008-06-20 Kevin McCullough - - Reviewed by Tim. - - JSProfiler: Time incorrectly given to (idle) - if profiling is started and finished within the same function. (19230) - - Now we profile one more stack frame up from the last frame to allocate - the time spent in it, if it exists. - - * JavaScriptCore.exp: - * VM/Machine.cpp: We need to let the profiler know when the JS program - has finished since that is what will actually stop the profiler instead - of just calling stopProfiling(). - (KJS::Machine::execute): - * profiler/Profile.cpp: - (KJS::Profile::create): Moved from Profile.h since it was getting pretty - long. - (KJS::Profile::Profile): We now have a client, which is a listener who - we will return this profile to, once it has actually finished. - (KJS::Profile::stopProfiling): Instead of fully stopping the profiler - here, we set the flag and keep it profiling in the background. - (KJS::Profile::didFinishAllExecution): This is where the profiler - actually finishes and creates the (idle) node if one should be made. - (KJS::Profile::removeProfileStart): Don't use m_currentNode since it is - needed by the profiler as it runs silently in the background. - (KJS::Profile::removeProfileEnd): Ditto. - (KJS::Profile::willExecute): Don't profile new functions if we have - stopped profiling. - (KJS::Profile::didExecute): Only record one more return as all the - remaining time will be attributed to that function. - (KJS::Profile::setupCurrentNodeAsStopped): Sets the current node's time. - * profiler/Profile.h: Added functions and variables for the above - changes. - (KJS::Profile::client): - * profiler/ProfileNode.h: - (KJS::CallIdentifier::toString): Debug method. - * profiler/Profiler.cpp: Added support for the ProfilerClient. - (KJS::Profiler::startProfiling): - (KJS::Profiler::stopProfiling): No longer return sthe profile. - (KJS::Profiler::didFinishAllExecution): Now returns the profile to the - client instead of stopProfiling. - * profiler/Profiler.h: - (KJS::ProfilerClient::~ProfilerClient): Clients will implement this - interface. - -2008-06-19 Ariya Hidayat - - Reviewed by Simon. - - Surpress compiler warning (int vs unsigned comparison). - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::toLower): - -2008-06-19 Ariya Hidayat - - Reviewed by Timothy Hatcher. - - Introduce compiler define for MinGW, to have COMPILER(MINGW). - - * wtf/Platform.h: - -2008-06-19 Alexey Proskuryakov - - Reviewed by Geoff. - - Make Machine per-JSGlobalData. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitOpcode): - * VM/Machine.cpp: - (KJS::callEval): - (KJS::Machine::unwindCallFrame): - (KJS::Machine::throwException): - (KJS::Machine::execute): - (KJS::Machine::debug): - * VM/Machine.h: - * kjs/DebuggerCallFrame.cpp: - (KJS::DebuggerCallFrame::evaluate): - * kjs/DebuggerCallFrame.h: - (KJS::DebuggerCallFrame::DebuggerCallFrame): - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - * kjs/ExecState.h: - (KJS::ExecState::machine): - * kjs/JSFunction.cpp: - (KJS::JSFunction::callAsFunction): - (KJS::JSFunction::argumentsGetter): - (KJS::JSFunction::callerGetter): - (KJS::JSFunction::construct): - (KJS::globalFuncEval): - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::JSGlobalData): - * kjs/JSGlobalData.h: - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - -2008-06-19 Alp Toker - - GTK+/autotools build fix. JSGlobalObject.cpp in now in - AllInOneFile.cpp and shouldn't be built separately. - - * GNUmakefile.am: - -2008-06-19 Alexey Proskuryakov - - Reviewed by Darin. - - Get rid of some threadInstance calls. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::init): - * kjs/Parser.cpp: - (KJS::Parser::parse): - * kjs/Shell.cpp: - (jscmain): - -2008-06-19 Alexey Proskuryakov - - Reviewed by Sam. - - Fix an assertion failure at startup. - - * kjs/JSObject.h: (KJS::JSObject::JSObject): Allow jsNull prototype in an assertion (I had - it fixed in a wrong copy of the file, so I wasn't getting the failure). - -2008-06-19 Alexey Proskuryakov - - Build fix. - - * kjs/collector.cpp: - (KJS::Heap::Heap): - (KJS::allocateBlock): - * kjs/collector.h: - No, #if PLATFORM(UNIX) was not right. I've just moved the unsafe initialization back for now, - as the platforms that use that code path do not use multiple threads yet. - -2008-06-19 Alexey Proskuryakov - - Windows and Qt build fixes. - - * kjs/collector.h: - * kjs/collector.cpp: - (KJS::Heap::Heap): - Wrapped m_pagesize in #if PLATFORM(UNIX), which should better match the sequence of #elifs - in allocateBlock(). Changed MIN_ARRAY_SIZE to be explicitly size_t, as this type is different - on different platforms. - -2008-06-17 Alexey Proskuryakov - - Reviewed by Darin. - - Prepare JavaScript heap for being per-thread. - - * kjs/ExecState.h: Shuffle includes, making it possible to include ExecState.h in JSValue.h. - (KJS::ExecState::heap): Added an accessor. - - * API/JSBase.cpp: (JSGarbageCollect): Collect both shared and per-thread heaps. - - * API/JSContextRef.cpp: (JSGlobalContextCreate): When allocating JSGlobalObject, indicate - that it belongs to a shared heap. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/AllInOneFile.cpp: - Moved JSGlobalObject.cpp to AllInOneFile, as a build fix for inlineAllocate magic. - - * VM/CodeGenerator.h: (KJS::CodeGenerator::globalExec): Added an accessor (working via - m_scopeChain). - - * VM/RegisterFile.h: - (KJS::RegisterFile::mark): - * VM/RegisterFileStack.h: - (KJS::RegisterFileStack::mark): - Made these pseudo-mark functions take Heap*. - - * kjs/InitializeThreading.cpp: - (KJS::initializeThreading): Initialize heap introspector. - - * kjs/JSGlobalData.h: Added Heap to the structure. - - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::JSGlobalData): Initialize Heap. - (KJS::JSGlobalData::sharedInstance): Added a method to access shared global data instance - for legacy clients. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::~JSGlobalObject): Changed to work with per-thread head; fixed list - maintenance logic. - (KJS::JSGlobalObject::init): Changed to work with per-thread head. - (KJS::JSGlobalObject::put): Assert that a cross-heap operation is not being attempted. - (KJS::JSGlobalObject::reset): Pass ExecState* where now required. - (KJS::JSGlobalObject::mark): Pass the current heap to RegisterFileStack::mark. - (KJS::JSGlobalObject::operator new): Overload operator new to use per-thread or shared heap. - * kjs/JSGlobalObject.h: Removed static s_head member. - - * kjs/PropertyMap.h: (KJS::PropertyMap::PropertyMap): Removed unused SavedProperty. - - * kjs/collector.h: Turned Collector into an actual object with its own data, renamed to Heap. - (KJS::Heap::initializeHeapIntrospector): Added. - (KJS::Heap::heap): Added a method to determine which heap a JSValue is in, if any. - (KJS::Heap::allocate): Made non-static. - (KJS::Heap::inlineAllocateNumber): Ditto. - (KJS::Heap::markListSet): Ditto. - (KJS::Heap::cellBlock): Ditto. - (KJS::Heap::cellOffset): Ditto. - (KJS::Heap::isCellMarked): Ditto. - (KJS::Heap::markCell): Ditto. - (KJS::Heap::reportExtraMemoryCost): Ditto. - (KJS::CollectorBlock): Added a back-reference to Heap for Heap::heap() method. - (KJS::SmallCellCollectorBlock): Ditto. - - * kjs/collector.cpp: Changed MIN_ARRAY_SIZE to a #define to avoid a PIC branch. Removed - main thread related machinery. - (KJS::Heap::Heap): Initialize the newly added data members. - (KJS::allocateBlock): Marked NEVER_INLINE, as this is a rare case that uses a PIC branch. - Moved static pagesize to the class to make it safely initialized. - (KJS::Heap::heapAllocate): Initialize heap back reference after a new block is allocated. - (KJS::Heap::registerThread): Removed introspector initialization, as it is now performed - in InitializeThreading.cpp. - (KJS::Heap::markOtherThreadConservatively): Assert that the "other thread" case only occurs - for legacy clients using a shared heap. - (KJS::Heap::markStackObjectsConservatively): Moved fastMallocForbid/Allow down here, since - it doesn't need to be forbidden during other GC phases. - - * kjs/JSImmediate.h: - (KJS::jsUndefined): - (KJS::jsNull): - (KJS::jsBoolean): - Moved from JSvalue.h, to make these usable in files that cannot include JSValue.h (such - as list.h). - - * API/JSCallbackObjectFunctions.h: - (KJS::::staticFunctionGetter): - * API/JSClassRef.cpp: - (OpaqueJSClass::prototype): - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeConstructor): - (JSObjectMakeFunction): - * API/JSValueRef.cpp: - (JSValueMakeNumber): - (JSValueMakeString): - * JavaScriptCore.exp: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitLoad): - * VM/JSPropertyNameIterator.cpp: - (KJS::JSPropertyNameIterator::create): - (KJS::JSPropertyNameIterator::next): - * VM/Machine.cpp: - (KJS::jsAddSlowCase): - (KJS::jsAdd): - (KJS::jsTypeStringForValue): - (KJS::scopeChainForCall): - (KJS::Machine::throwException): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - (KJS::Machine::retrieveArguments): - * kjs/ArrayPrototype.cpp: - (KJS::arrayProtoFuncToString): - (KJS::arrayProtoFuncToLocaleString): - (KJS::arrayProtoFuncJoin): - (KJS::arrayProtoFuncConcat): - (KJS::arrayProtoFuncPop): - (KJS::arrayProtoFuncPush): - (KJS::arrayProtoFuncShift): - (KJS::arrayProtoFuncSlice): - (KJS::arrayProtoFuncSplice): - (KJS::arrayProtoFuncUnShift): - (KJS::arrayProtoFuncFilter): - (KJS::arrayProtoFuncMap): - (KJS::arrayProtoFuncEvery): - (KJS::arrayProtoFuncForEach): - (KJS::arrayProtoFuncSome): - (KJS::arrayProtoFuncIndexOf): - (KJS::arrayProtoFuncLastIndexOf): - (KJS::ArrayConstructor::ArrayConstructor): - (KJS::ArrayConstructor::construct): - (KJS::ArrayConstructor::callAsFunction): - * kjs/BooleanObject.cpp: - (KJS::BooleanPrototype::BooleanPrototype): - (KJS::booleanProtoFuncToString): - (KJS::BooleanConstructor::BooleanConstructor): - (KJS::BooleanConstructor::construct): - * kjs/FunctionPrototype.cpp: - (KJS::FunctionPrototype::FunctionPrototype): - (KJS::functionProtoFuncToString): - (KJS::FunctionConstructor::FunctionConstructor): - (KJS::FunctionConstructor::construct): - * kjs/JSActivation.cpp: - (KJS::JSActivation::createArgumentsObject): - * kjs/JSArray.cpp: - (KJS::JSArray::JSArray): - (KJS::JSArray::lengthGetter): - * kjs/JSFunction.cpp: - (KJS::JSFunction::lengthGetter): - (KJS::JSFunction::construct): - (KJS::Arguments::Arguments): - (KJS::encode): - (KJS::decode): - (KJS::globalFuncParseInt): - (KJS::globalFuncParseFloat): - (KJS::globalFuncEscape): - (KJS::globalFuncUnescape): - (KJS::PrototypeFunction::PrototypeFunction): - (KJS::PrototypeReflexiveFunction::PrototypeReflexiveFunction): - * kjs/JSImmediate.cpp: - (KJS::JSImmediate::toObject): - * kjs/JSLock.cpp: - (KJS::JSLock::registerThread): - * kjs/JSObject.cpp: - (KJS::JSObject::put): - (KJS::JSObject::defineGetter): - (KJS::JSObject::defineSetter): - (KJS::Error::create): - * kjs/JSObject.h: - (KJS::JSObject::putDirect): - * kjs/JSString.h: - (KJS::JSString::JSString): - * kjs/JSValue.cpp: - (KJS::JSCell::operator new): - (KJS::jsString): - (KJS::jsOwnedString): - * kjs/JSValue.h: - (KJS::JSNumberCell::operator new): - (KJS::jsNumberCell): - (KJS::jsNaN): - (KJS::jsNumber): - (KJS::JSCell::marked): - (KJS::JSCell::mark): - (KJS::JSValue::toJSNumber): - * kjs/MathObject.cpp: - (KJS::MathObject::getValueProperty): - (KJS::mathProtoFuncAbs): - (KJS::mathProtoFuncACos): - (KJS::mathProtoFuncASin): - (KJS::mathProtoFuncATan): - (KJS::mathProtoFuncATan2): - (KJS::mathProtoFuncCeil): - (KJS::mathProtoFuncCos): - (KJS::mathProtoFuncExp): - (KJS::mathProtoFuncFloor): - (KJS::mathProtoFuncLog): - (KJS::mathProtoFuncMax): - (KJS::mathProtoFuncMin): - (KJS::mathProtoFuncPow): - (KJS::mathProtoFuncRandom): - (KJS::mathProtoFuncRound): - (KJS::mathProtoFuncSin): - (KJS::mathProtoFuncSqrt): - (KJS::mathProtoFuncTan): - * kjs/NumberObject.cpp: - (KJS::NumberPrototype::NumberPrototype): - (KJS::numberProtoFuncToString): - (KJS::numberProtoFuncToLocaleString): - (KJS::numberProtoFuncToFixed): - (KJS::numberProtoFuncToExponential): - (KJS::numberProtoFuncToPrecision): - (KJS::NumberConstructor::NumberConstructor): - (KJS::NumberConstructor::getValueProperty): - (KJS::NumberConstructor::construct): - (KJS::NumberConstructor::callAsFunction): - * kjs/RegExpObject.cpp: - (KJS::RegExpPrototype::RegExpPrototype): - (KJS::regExpProtoFuncToString): - (KJS::RegExpObject::getValueProperty): - (KJS::RegExpConstructor::RegExpConstructor): - (KJS::RegExpMatchesArray::fillArrayInstance): - (KJS::RegExpConstructor::arrayOfMatches): - (KJS::RegExpConstructor::getBackref): - (KJS::RegExpConstructor::getLastParen): - (KJS::RegExpConstructor::getLeftContext): - (KJS::RegExpConstructor::getRightContext): - (KJS::RegExpConstructor::getValueProperty): - (KJS::RegExpConstructor::construct): - * kjs/RegExpObject.h: - * kjs/Shell.cpp: - (GlobalObject::GlobalObject): - (functionGC): - (functionRun): - (functionReadline): - (jscmain): - * kjs/date_object.cpp: - (KJS::formatLocaleDate): - (KJS::DatePrototype::DatePrototype): - (KJS::DateConstructor::DateConstructor): - (KJS::DateConstructor::construct): - (KJS::DateConstructor::callAsFunction): - (KJS::DateFunction::DateFunction): - (KJS::DateFunction::callAsFunction): - (KJS::dateProtoFuncToString): - (KJS::dateProtoFuncToUTCString): - (KJS::dateProtoFuncToDateString): - (KJS::dateProtoFuncToTimeString): - (KJS::dateProtoFuncToLocaleString): - (KJS::dateProtoFuncToLocaleDateString): - (KJS::dateProtoFuncToLocaleTimeString): - (KJS::dateProtoFuncValueOf): - (KJS::dateProtoFuncGetTime): - (KJS::dateProtoFuncGetFullYear): - (KJS::dateProtoFuncGetUTCFullYear): - (KJS::dateProtoFuncToGMTString): - (KJS::dateProtoFuncGetMonth): - (KJS::dateProtoFuncGetUTCMonth): - (KJS::dateProtoFuncGetDate): - (KJS::dateProtoFuncGetUTCDate): - (KJS::dateProtoFuncGetDay): - (KJS::dateProtoFuncGetUTCDay): - (KJS::dateProtoFuncGetHours): - (KJS::dateProtoFuncGetUTCHours): - (KJS::dateProtoFuncGetMinutes): - (KJS::dateProtoFuncGetUTCMinutes): - (KJS::dateProtoFuncGetSeconds): - (KJS::dateProtoFuncGetUTCSeconds): - (KJS::dateProtoFuncGetMilliSeconds): - (KJS::dateProtoFuncGetUTCMilliseconds): - (KJS::dateProtoFuncGetTimezoneOffset): - (KJS::dateProtoFuncSetTime): - (KJS::setNewValueFromTimeArgs): - (KJS::setNewValueFromDateArgs): - (KJS::dateProtoFuncSetYear): - (KJS::dateProtoFuncGetYear): - * kjs/error_object.cpp: - (KJS::ErrorPrototype::ErrorPrototype): - (KJS::errorProtoFuncToString): - (KJS::ErrorConstructor::ErrorConstructor): - (KJS::ErrorConstructor::construct): - (KJS::NativeErrorPrototype::NativeErrorPrototype): - (KJS::NativeErrorConstructor::NativeErrorConstructor): - (KJS::NativeErrorConstructor::construct): - * kjs/identifier.h: - * kjs/internal.cpp: - (KJS::StringObject::create): - (KJS::JSString::lengthGetter): - (KJS::JSString::indexGetter): - (KJS::JSString::indexNumericPropertyGetter): - * kjs/interpreter.cpp: - * kjs/list.cpp: - (KJS::ArgList::slowAppend): - * kjs/list.h: - * kjs/lookup.h: - (KJS::staticFunctionGetter): - (KJS::cacheGlobalObject): - * kjs/nodes.cpp: - (KJS::Node::emitThrowError): - (KJS::StringNode::emitCode): - (KJS::ArrayNode::emitCode): - (KJS::FuncDeclNode::makeFunction): - (KJS::FuncExprNode::makeFunction): - * kjs/nodes.h: - * kjs/object_object.cpp: - (KJS::ObjectPrototype::ObjectPrototype): - (KJS::objectProtoFuncToLocaleString): - (KJS::objectProtoFuncToString): - (KJS::ObjectConstructor::ObjectConstructor): - (KJS::ObjectConstructor::construct): - * kjs/protect.h: - (KJS::gcProtect): - (KJS::gcUnprotect): - * kjs/string_object.cpp: - (KJS::StringObject::StringObject): - (KJS::StringPrototype::StringPrototype): - (KJS::replace): - (KJS::stringProtoFuncCharAt): - (KJS::stringProtoFuncCharCodeAt): - (KJS::stringProtoFuncConcat): - (KJS::stringProtoFuncIndexOf): - (KJS::stringProtoFuncLastIndexOf): - (KJS::stringProtoFuncMatch): - (KJS::stringProtoFuncSearch): - (KJS::stringProtoFuncReplace): - (KJS::stringProtoFuncSlice): - (KJS::stringProtoFuncSplit): - (KJS::stringProtoFuncSubstr): - (KJS::stringProtoFuncSubstring): - (KJS::stringProtoFuncToLowerCase): - (KJS::stringProtoFuncToUpperCase): - (KJS::stringProtoFuncToLocaleLowerCase): - (KJS::stringProtoFuncToLocaleUpperCase): - (KJS::stringProtoFuncLocaleCompare): - (KJS::stringProtoFuncBig): - (KJS::stringProtoFuncSmall): - (KJS::stringProtoFuncBlink): - (KJS::stringProtoFuncBold): - (KJS::stringProtoFuncFixed): - (KJS::stringProtoFuncItalics): - (KJS::stringProtoFuncStrike): - (KJS::stringProtoFuncSub): - (KJS::stringProtoFuncSup): - (KJS::stringProtoFuncFontcolor): - (KJS::stringProtoFuncFontsize): - (KJS::stringProtoFuncAnchor): - (KJS::stringProtoFuncLink): - (KJS::StringConstructor::StringConstructor): - (KJS::StringConstructor::construct): - (KJS::StringConstructor::callAsFunction): - (KJS::StringConstructorFunction::StringConstructorFunction): - (KJS::StringConstructorFunction::callAsFunction): - * kjs/string_object.h: - (KJS::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined): - * kjs/ustring.h: - Updated for the above changes. - -2008-06-17 Timothy Hatcher - - Added a type to DebuggerCallFrame so the under interface can - distinguish anonymous functions and program call frames. - - https://bugs.webkit.org/show_bug.cgi?id=19585 - - Reviewed by Geoff Garen. - - * JavaScriptCore.exp: Export the DebuggerCallFrame::type symbol. - * kjs/DebuggerCallFrame.cpp: - (KJS::DebuggerCallFrame::type): Added. - * kjs/DebuggerCallFrame.h: - -2008-06-17 Eric Seidel - - Reviewed by Tim H. - - Remove bogus ASSERT which tripped every time for those who use PAC files. - - * kjs/Parser.cpp: - (KJS::Parser::parse): - -2008-06-17 Kevin McCullough - - Reviewed by Geoff. - - JSProfiler: Don't profile console.profile() - or console.profileEnd() - - * profiler/Profile.cpp: - (KJS::Profile::stopProfiling): Moved the creation of the (idle) node to - the Profile (not ProfileNode). This makes sense since the Profile - should be the one to modify the profile tree. Also each stopProfiling() - does not need to check if it's the head node anymore. Also fixed an - oddity where I was using willExecute to create the node. - (KJS::Profile::removeProfileStart): Removes the call to console.profile - that started this profile. - (KJS::Profile::removeProfileEnd): Removes the call to console.profileEnd - that ended this profile. - * profiler/Profile.h: - * profiler/ProfileNode.cpp: Moved the creation of the (idle) node to - the Profile object. - (KJS::ProfileNode::stopProfiling): - * profiler/ProfileNode.h: Added some helper functions and whitespace to - facilitate readability and the removal of profile() and profileEnd() - from the Profile tree. - (KJS::CallIdentifier::operator const char* ): - (KJS::ProfileNode::firstChild): - (KJS::ProfileNode::lastChild): - (KJS::ProfileNode::removeChild): - (KJS::ProfileNode::toString): - -2008-06-17 Ariya Hidayat - - Rubber stamped by Adam Roben. - - Include JSGlobalObject.h to fix the build. - - * kjs/ScopeChain.cpp: - -2008-06-17 Cameron Zwarich - - Reviewed by Oliver. - - Reduce code duplication in emitReadModifyAssignment(). - - * kjs/nodes.cpp: - (KJS::emitReadModifyAssignment): - -2008-06-17 Cameron Zwarich - - Reviewed by Oliver. - - Sort includes alphabetically. - - * kjs/nodes.cpp: - -2008-06-16 Cameron Zwarich - - Reviewed by Maciej. - - Bug 19596: LEAK: Gmail leaks SegmentedVector - - - When growing SegmentedVector, we start adding segments at the position - of the last segment, overwriting it. The destructor frees allocated - segments starting at the segment of index 1, because the segment of - index 0 is assumed to be the initial inline segment. This causes a leak - of the segment that is referenced by index 0. Modifying grow() so that - it starts adding segments at the position after the last segment fixes - the leak. - - Since the initial segment is a special case in the lookup code, this - bug never manifested itself via incorrect results. - - * VM/SegmentedVector.h: - (KJS::SegmentedVector::grow): - -2008-06-16 Maciej Stachowiak - - Reviewed by Alexey. - - - removed nearly unused types.h and LocalStorageEntry.h headers - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/ExecState.h: - * kjs/LocalStorageEntry.h: Removed. - * kjs/RegExpObject.cpp: - * kjs/error_object.cpp: - * kjs/grammar.y: - * kjs/nodes.cpp: - * kjs/types.h: Removed. - -2008-06-16 Alp Toker - - Rubber-stamped by Geoff. - - Change c++ to c in minidom and testapi emacs mode line comments. - - * API/Node.h: - * API/NodeList.c: - * API/NodeList.h: - * API/testapi.c: - -2008-06-16 Alexey Proskuryakov - - Trying to fix Windows build. - - * kjs/PropertyNameArray.h: - * kjs/identifier.cpp: - Include ExecState.h - -2008-06-16 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Slight cleanup to the SymbolTableEntry class. - - Renamed isEmpty to isNull, since we usually use "empty" to mean "holds - the valid, empty value", and "null" to mean "holds no value". - - Changed an "== 0" to a "!", to match our style guidelines. - - Added some ASSERTs to verify the (possibly questionable) assumption that - all register indexes will have their high two bits set. Also clarified a - comment to make that assumption clear. - -2008-06-16 Alexey Proskuryakov - - Reviewed by Darin. - - Initialize functionQueueMutex in a safe manner. - - * wtf/MainThread.cpp: - (WTF::functionQueueMutex): Made it an AtomicallyInitializedStatic. - - (WTF::dispatchFunctionsFromMainThread): - (WTF::setMainThreadCallbacksPaused): - Assert that the current thread is main, meaning that the callbacksPaused static can be - accessed. - -2008-06-16 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - Make Identifier construction use an explicitly passed IdentifierTable. - - No change on SunSpider total. - - * API/JSCallbackObjectFunctions.h: - (KJS::::getOwnPropertySlot): - (KJS::::put): - (KJS::::deleteProperty): - (KJS::::getPropertyNames): - * API/JSObjectRef.cpp: - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeFunction): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectDeleteProperty): - (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray): - (JSObjectCopyPropertyNames): - * JavaScriptCore.exp: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::registerForLocal): - (KJS::CodeGenerator::isLocal): - (KJS::CodeGenerator::addConstant): - (KJS::CodeGenerator::findScopedProperty): - * VM/CodeGenerator.h: - (KJS::CodeGenerator::globalData): - (KJS::CodeGenerator::propertyNames): - * VM/JSPropertyNameIterator.cpp: - (KJS::JSPropertyNameIterator::create): - * VM/Machine.cpp: - (KJS::Machine::throwException): - (KJS::Machine::privateExecute): - * kjs/ArrayPrototype.cpp: - (KJS::ArrayConstructor::ArrayConstructor): - * kjs/BooleanObject.cpp: - (KJS::BooleanConstructor::BooleanConstructor): - * kjs/FunctionPrototype.cpp: - (KJS::FunctionConstructor::FunctionConstructor): - (KJS::FunctionConstructor::construct): - * kjs/JSArray.cpp: - (KJS::JSArray::inlineGetOwnPropertySlot): - (KJS::JSArray::put): - (KJS::JSArray::deleteProperty): - (KJS::JSArray::getPropertyNames): - * kjs/JSFunction.cpp: - (KJS::Arguments::Arguments): - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::JSGlobalData): - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::reset): - * kjs/JSObject.cpp: - (KJS::JSObject::getOwnPropertySlot): - (KJS::JSObject::put): - (KJS::JSObject::putWithAttributes): - (KJS::JSObject::deleteProperty): - (KJS::JSObject::findPropertyHashEntry): - (KJS::JSObject::getPropertyNames): - (KJS::Error::create): - * kjs/JSVariableObject.cpp: - (KJS::JSVariableObject::getPropertyNames): - * kjs/NumberObject.cpp: - (KJS::NumberConstructor::NumberConstructor): - * kjs/PropertyNameArray.cpp: - (KJS::PropertyNameArray::add): - * kjs/PropertyNameArray.h: - (KJS::PropertyNameArray::PropertyNameArray): - (KJS::PropertyNameArray::addKnownUnique): - * kjs/PropertySlot.h: - (KJS::PropertySlot::getValue): - * kjs/RegExpObject.cpp: - (KJS::RegExpConstructor::RegExpConstructor): - * kjs/ScopeChain.cpp: - (KJS::ScopeChainNode::print): - * kjs/Shell.cpp: - (GlobalObject::GlobalObject): - * kjs/date_object.cpp: - (KJS::DateConstructor::DateConstructor): - * kjs/error_object.cpp: - (KJS::ErrorConstructor::ErrorConstructor): - (KJS::NativeErrorConstructor::NativeErrorConstructor): - * kjs/grammar.y: - * kjs/identifier.cpp: - (KJS::Identifier::add): - (KJS::Identifier::addSlowCase): - * kjs/identifier.h: - (KJS::Identifier::Identifier): - (KJS::Identifier::from): - (KJS::Identifier::equal): - (KJS::Identifier::add): - (KJS::operator==): - (KJS::operator!=): - * kjs/internal.cpp: - (KJS::JSString::getOwnPropertySlot): - * kjs/lexer.cpp: - (KJS::Lexer::Lexer): - (KJS::Lexer::lex): - (KJS::Lexer::makeIdentifier): - * kjs/lexer.h: - * kjs/lookup.cpp: - (KJS::HashTable::createTable): - * kjs/lookup.h: - (KJS::HashTable::initializeIfNeeded): - (KJS::HashTable::entry): - (KJS::getStaticPropertySlot): - (KJS::getStaticFunctionSlot): - (KJS::getStaticValueSlot): - (KJS::lookupPut): - * kjs/object_object.cpp: - (KJS::objectProtoFuncHasOwnProperty): - (KJS::objectProtoFuncDefineGetter): - (KJS::objectProtoFuncDefineSetter): - (KJS::objectProtoFuncLookupGetter): - (KJS::objectProtoFuncLookupSetter): - (KJS::objectProtoFuncPropertyIsEnumerable): - (KJS::ObjectConstructor::ObjectConstructor): - * kjs/string_object.cpp: - (KJS::StringObject::getOwnPropertySlot): - (KJS::StringObject::getPropertyNames): - (KJS::StringConstructor::StringConstructor): - Just pass ExecState or JSGlobalData everywhere. Identifier construction is now always - explicit. - - * kjs/nodes.cpp: (KJS::RegExpNode::emitCode): Here, Identifier was created from a non-literal - char*, which was incorrect, as that uses the pointer value as a key. - -2008-06-16 Thiago Macieira - - Reviewed by Darin. - - https://bugs.webkit.org/show_bug.cgi?id=19577 - - Fix compilation in C++ environments where C99 headers are not present - - The stdbool.h header is a C99 feature, defining the "_Bool" type as well as the - "true" and "false" constants. But it's completely unnecessary in C++ as the - language already defines the "bool" type and its two values. - - * API/JSBase.h: - * API/JSContextRef.h: - * API/JSObjectRef.h: - * API/JSStringRef.h: - * API/JSValueRef.h: - -2008-06-16 Kevin McCullough - - Reviewed by John. - - JSProfiler: %s are incorrect if you exclude a - top level node like (idle) - - * profiler/Profile.cpp: - (KJS::Profile::focus): - (KJS::Profile::exclude): Subtract the selfTime from the totalTime of the - head since its self time will only be non-zero when one of its children - were excluded. Since the head's totalTime is used to calculate %s when - its totalTime is the same as the sum of all its visible childrens' times - their %s will sum to 100%. - -2008-06-16 Kevin McCullough - - Reviewed by Sam Weinig. - - JSProfiler: Remove the recursion limit in the profiler. - - * profiler/Profile.cpp: - (KJS::Profile::willExecute): - -2008-06-16 Kevin McCullough - - Reviewed by Sam. - - JSProfiler: Remove the recursion limit in the - profiler. - - Remove the last of the uses of recursion in the profiler. - - * JavaScriptCore.exp: Export the new function's signature. - * profiler/Profile.cpp: - (KJS::calculateVisibleTotalTime): Added a new static method for - recalculating the visibleTotalTime of methods after focus has changed - which are visible. - (KJS::stopProfiling): - (KJS::Profile::focus): Implemented focus without recursion. - * profiler/Profile.h: Moved implementation into the definition file. - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::traverseNextNodePreOrder): Added an argument for - whether or not to process the children nodes, this allows focus to skip - sub trees which have been set as not visible. - (KJS::ProfileNode::calculateVisibleTotalTime): This function set's a - node's total visible time to the sum of its self time and its children's - total times. - (KJS::ProfileNode::focus): Implemented focus without recursion. - * profiler/ProfileNode.h: - (KJS::CallIdentifier::operator!= ): - (KJS::ProfileNode::setActualTotalTime): Expanded setting the total time - so that focus could modify only the visible total time. - (KJS::ProfileNode::setVisibleTotalTime): - -2008-06-16 Christian Dywan - - Reviewed by Sam. - - https://bugs.webkit.org/show_bug.cgi?id=19552 - JavaScriptCore headers use C++ style comments - - Replace all C++ style comments with C style multiline - comments and remove all "mode" lines. - - * API/JSBase.h: - * API/JSClassRef.h: - * API/JSContextRef.h: - * API/JSObjectRef.h: - * API/JSStringRef.h: - * API/JSStringRefBSTR.h: - * API/JSStringRefCF.h: - * API/JSValueRef.h: - * API/JavaScript.h: - * API/JavaScriptCore.h: - -2008-06-16 Christian Dywan - - Reviewed by Sam. - - https://bugs.webkit.org/show_bug.cgi?id=19557 - (JavaScriptCore) minidom uses C++ style comments - - Use only C style comments in minidom sources - - * API/JSNode.c: - (JSNode_appendChild): - (JSNode_removeChild): - * API/JSNode.h: - * API/JSNodeList.c: - (JSNodeList_getProperty): - * API/JSNodeList.h: - * API/Node.c: - * API/Node.h: - * API/NodeList.c: - (NodeList_new): - (NodeList_item): - * API/NodeList.h: - * API/minidom.c: - (createStringWithContentsOfFile): - * wtf/Assertions.h: - * wtf/UnusedParam.h: - -2008-06-16 Adriaan de Groot - - Reviewed by Simon. - - Fix compilation on Solaris - - On some systems, munmap takes a char* instead of a void* (contrary to POSIX and - Single Unix Specification). Since you can always convert from char* to void* - but not vice-versa, do the casting to char*. - - * kjs/collector.cpp: - (KJS::allocateBlock): - (KJS::freeBlock): - -2008-06-16 Cameron Zwarich - - Reviewed by Maciej. - - Make a UnaryOpNode class to reduce boilerplate code for UnaryPlusNode, - NegateNode, BitwiseNotNode, and LogicalNotNode. - - * VM/CodeGenerator.h: - (KJS::CodeGenerator::emitToJSNumber): - * kjs/nodes.cpp: - (KJS::UnaryOpNode::emitCode): - * kjs/nodes.h: - (KJS::UnaryOpNode::UnaryOpNode): - (KJS::UnaryPlusNode::): - (KJS::NegateNode::): - (KJS::NegateNode::precedence): - (KJS::BitwiseNotNode::): - (KJS::BitwiseNotNode::precedence): - (KJS::LogicalNotNode::): - (KJS::LogicalNotNode::precedence): - -2008-06-16 Jan Michael Alonzo - - Gtk build fix - - * GNUmakefile.am: - -2008-06-15 Darin Adler - - - rename KJS::List to KJS::ArgList - - * API/JSCallbackConstructor.cpp: - (KJS::JSCallbackConstructor::construct): - * API/JSCallbackConstructor.h: - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::callAsFunction): - * API/JSCallbackFunction.h: - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (KJS::::construct): - (KJS::::callAsFunction): - * API/JSObjectRef.cpp: - (JSObjectMakeFunction): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - * JavaScriptCore.exp: - * VM/Machine.cpp: - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * VM/Machine.h: - * kjs/ArrayPrototype.cpp: - (KJS::arrayProtoFuncToString): - (KJS::arrayProtoFuncToLocaleString): - (KJS::arrayProtoFuncJoin): - (KJS::arrayProtoFuncConcat): - (KJS::arrayProtoFuncPop): - (KJS::arrayProtoFuncPush): - (KJS::arrayProtoFuncReverse): - (KJS::arrayProtoFuncShift): - (KJS::arrayProtoFuncSlice): - (KJS::arrayProtoFuncSort): - (KJS::arrayProtoFuncSplice): - (KJS::arrayProtoFuncUnShift): - (KJS::arrayProtoFuncFilter): - (KJS::arrayProtoFuncMap): - (KJS::arrayProtoFuncEvery): - (KJS::arrayProtoFuncForEach): - (KJS::arrayProtoFuncSome): - (KJS::arrayProtoFuncIndexOf): - (KJS::arrayProtoFuncLastIndexOf): - (KJS::ArrayConstructor::construct): - (KJS::ArrayConstructor::callAsFunction): - * kjs/ArrayPrototype.h: - * kjs/BooleanObject.cpp: - (KJS::booleanProtoFuncToString): - (KJS::booleanProtoFuncValueOf): - (KJS::BooleanConstructor::construct): - (KJS::BooleanConstructor::callAsFunction): - * kjs/BooleanObject.h: - * kjs/CommonIdentifiers.h: - * kjs/ExecState.h: - (KJS::ExecState::emptyList): - * kjs/FunctionPrototype.cpp: - (KJS::FunctionPrototype::callAsFunction): - (KJS::functionProtoFuncToString): - (KJS::functionProtoFuncApply): - (KJS::functionProtoFuncCall): - (KJS::FunctionConstructor::construct): - (KJS::FunctionConstructor::callAsFunction): - * kjs/FunctionPrototype.h: - * kjs/JSActivation.cpp: - (KJS::JSActivation::createArgumentsObject): - * kjs/JSArray.cpp: - (KJS::JSArray::JSArray): - (KJS::AVLTreeAbstractorForArrayCompare::compare_key_key): - * kjs/JSArray.h: - * kjs/JSFunction.cpp: - (KJS::JSFunction::callAsFunction): - (KJS::JSFunction::construct): - (KJS::IndexToNameMap::IndexToNameMap): - (KJS::Arguments::Arguments): - (KJS::encode): - (KJS::decode): - (KJS::globalFuncEval): - (KJS::globalFuncParseInt): - (KJS::globalFuncParseFloat): - (KJS::globalFuncIsNaN): - (KJS::globalFuncIsFinite): - (KJS::globalFuncDecodeURI): - (KJS::globalFuncDecodeURIComponent): - (KJS::globalFuncEncodeURI): - (KJS::globalFuncEncodeURIComponent): - (KJS::globalFuncEscape): - (KJS::globalFuncUnescape): - (KJS::globalFuncKJSPrint): - (KJS::PrototypeFunction::callAsFunction): - (KJS::PrototypeReflexiveFunction::callAsFunction): - * kjs/JSFunction.h: - * kjs/JSGlobalData.h: - * kjs/JSImmediate.cpp: - (KJS::JSImmediate::toObject): - * kjs/JSNotAnObject.cpp: - (KJS::JSNotAnObject::construct): - (KJS::JSNotAnObject::callAsFunction): - * kjs/JSNotAnObject.h: - * kjs/JSObject.cpp: - (KJS::JSObject::put): - (KJS::JSObject::construct): - (KJS::JSObject::callAsFunction): - (KJS::Error::create): - * kjs/JSObject.h: - * kjs/MathObject.cpp: - (KJS::mathProtoFuncAbs): - (KJS::mathProtoFuncACos): - (KJS::mathProtoFuncASin): - (KJS::mathProtoFuncATan): - (KJS::mathProtoFuncATan2): - (KJS::mathProtoFuncCeil): - (KJS::mathProtoFuncCos): - (KJS::mathProtoFuncExp): - (KJS::mathProtoFuncFloor): - (KJS::mathProtoFuncLog): - (KJS::mathProtoFuncMax): - (KJS::mathProtoFuncMin): - (KJS::mathProtoFuncPow): - (KJS::mathProtoFuncRandom): - (KJS::mathProtoFuncRound): - (KJS::mathProtoFuncSin): - (KJS::mathProtoFuncSqrt): - (KJS::mathProtoFuncTan): - * kjs/MathObject.h: - * kjs/NumberObject.cpp: - (KJS::numberProtoFuncToString): - (KJS::numberProtoFuncToLocaleString): - (KJS::numberProtoFuncValueOf): - (KJS::numberProtoFuncToFixed): - (KJS::numberProtoFuncToExponential): - (KJS::numberProtoFuncToPrecision): - (KJS::NumberConstructor::construct): - (KJS::NumberConstructor::callAsFunction): - * kjs/NumberObject.h: - * kjs/RegExpObject.cpp: - (KJS::regExpProtoFuncTest): - (KJS::regExpProtoFuncExec): - (KJS::regExpProtoFuncCompile): - (KJS::regExpProtoFuncToString): - (KJS::RegExpObject::match): - (KJS::RegExpObject::test): - (KJS::RegExpObject::exec): - (KJS::RegExpObject::callAsFunction): - (KJS::RegExpConstructor::construct): - (KJS::RegExpConstructor::callAsFunction): - * kjs/RegExpObject.h: - * kjs/Shell.cpp: - (functionPrint): - (functionDebug): - (functionGC): - (functionVersion): - (functionRun): - (functionLoad): - (functionReadline): - (functionQuit): - * kjs/collector.cpp: - (KJS::Collector::collect): - * kjs/collector.h: - (KJS::Collector::markListSet): - * kjs/date_object.cpp: - (KJS::formatLocaleDate): - (KJS::fillStructuresUsingTimeArgs): - (KJS::fillStructuresUsingDateArgs): - (KJS::DateConstructor::construct): - (KJS::DateConstructor::callAsFunction): - (KJS::DateFunction::callAsFunction): - (KJS::dateProtoFuncToString): - (KJS::dateProtoFuncToUTCString): - (KJS::dateProtoFuncToDateString): - (KJS::dateProtoFuncToTimeString): - (KJS::dateProtoFuncToLocaleString): - (KJS::dateProtoFuncToLocaleDateString): - (KJS::dateProtoFuncToLocaleTimeString): - (KJS::dateProtoFuncValueOf): - (KJS::dateProtoFuncGetTime): - (KJS::dateProtoFuncGetFullYear): - (KJS::dateProtoFuncGetUTCFullYear): - (KJS::dateProtoFuncToGMTString): - (KJS::dateProtoFuncGetMonth): - (KJS::dateProtoFuncGetUTCMonth): - (KJS::dateProtoFuncGetDate): - (KJS::dateProtoFuncGetUTCDate): - (KJS::dateProtoFuncGetDay): - (KJS::dateProtoFuncGetUTCDay): - (KJS::dateProtoFuncGetHours): - (KJS::dateProtoFuncGetUTCHours): - (KJS::dateProtoFuncGetMinutes): - (KJS::dateProtoFuncGetUTCMinutes): - (KJS::dateProtoFuncGetSeconds): - (KJS::dateProtoFuncGetUTCSeconds): - (KJS::dateProtoFuncGetMilliSeconds): - (KJS::dateProtoFuncGetUTCMilliseconds): - (KJS::dateProtoFuncGetTimezoneOffset): - (KJS::dateProtoFuncSetTime): - (KJS::setNewValueFromTimeArgs): - (KJS::setNewValueFromDateArgs): - (KJS::dateProtoFuncSetMilliSeconds): - (KJS::dateProtoFuncSetUTCMilliseconds): - (KJS::dateProtoFuncSetSeconds): - (KJS::dateProtoFuncSetUTCSeconds): - (KJS::dateProtoFuncSetMinutes): - (KJS::dateProtoFuncSetUTCMinutes): - (KJS::dateProtoFuncSetHours): - (KJS::dateProtoFuncSetUTCHours): - (KJS::dateProtoFuncSetDate): - (KJS::dateProtoFuncSetUTCDate): - (KJS::dateProtoFuncSetMonth): - (KJS::dateProtoFuncSetUTCMonth): - (KJS::dateProtoFuncSetFullYear): - (KJS::dateProtoFuncSetUTCFullYear): - (KJS::dateProtoFuncSetYear): - (KJS::dateProtoFuncGetYear): - * kjs/date_object.h: - * kjs/debugger.h: - * kjs/error_object.cpp: - (KJS::errorProtoFuncToString): - (KJS::ErrorConstructor::construct): - (KJS::ErrorConstructor::callAsFunction): - (KJS::NativeErrorConstructor::construct): - (KJS::NativeErrorConstructor::callAsFunction): - * kjs/error_object.h: - * kjs/internal.cpp: - (KJS::JSNumberCell::toObject): - (KJS::JSNumberCell::toThisObject): - * kjs/list.cpp: - (KJS::ArgList::getSlice): - (KJS::ArgList::markLists): - (KJS::ArgList::slowAppend): - * kjs/list.h: - (KJS::ArgList::ArgList): - (KJS::ArgList::~ArgList): - * kjs/object_object.cpp: - (KJS::objectProtoFuncValueOf): - (KJS::objectProtoFuncHasOwnProperty): - (KJS::objectProtoFuncIsPrototypeOf): - (KJS::objectProtoFuncDefineGetter): - (KJS::objectProtoFuncDefineSetter): - (KJS::objectProtoFuncLookupGetter): - (KJS::objectProtoFuncLookupSetter): - (KJS::objectProtoFuncPropertyIsEnumerable): - (KJS::objectProtoFuncToLocaleString): - (KJS::objectProtoFuncToString): - (KJS::ObjectConstructor::construct): - (KJS::ObjectConstructor::callAsFunction): - * kjs/object_object.h: - * kjs/string_object.cpp: - (KJS::replace): - (KJS::stringProtoFuncToString): - (KJS::stringProtoFuncValueOf): - (KJS::stringProtoFuncCharAt): - (KJS::stringProtoFuncCharCodeAt): - (KJS::stringProtoFuncConcat): - (KJS::stringProtoFuncIndexOf): - (KJS::stringProtoFuncLastIndexOf): - (KJS::stringProtoFuncMatch): - (KJS::stringProtoFuncSearch): - (KJS::stringProtoFuncReplace): - (KJS::stringProtoFuncSlice): - (KJS::stringProtoFuncSplit): - (KJS::stringProtoFuncSubstr): - (KJS::stringProtoFuncSubstring): - (KJS::stringProtoFuncToLowerCase): - (KJS::stringProtoFuncToUpperCase): - (KJS::stringProtoFuncToLocaleLowerCase): - (KJS::stringProtoFuncToLocaleUpperCase): - (KJS::stringProtoFuncLocaleCompare): - (KJS::stringProtoFuncBig): - (KJS::stringProtoFuncSmall): - (KJS::stringProtoFuncBlink): - (KJS::stringProtoFuncBold): - (KJS::stringProtoFuncFixed): - (KJS::stringProtoFuncItalics): - (KJS::stringProtoFuncStrike): - (KJS::stringProtoFuncSub): - (KJS::stringProtoFuncSup): - (KJS::stringProtoFuncFontcolor): - (KJS::stringProtoFuncFontsize): - (KJS::stringProtoFuncAnchor): - (KJS::stringProtoFuncLink): - (KJS::StringConstructor::construct): - (KJS::StringConstructor::callAsFunction): - (KJS::StringConstructorFunction::callAsFunction): - * kjs/string_object.h: - -2008-06-15 Darin Adler - - - new names for more JavaScriptCore files - - * API/JSCallbackFunction.cpp: - * API/JSObjectRef.cpp: - * DerivedSources.make: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/Machine.cpp: - * kjs/AllInOneFile.cpp: - * kjs/ArrayPrototype.cpp: Copied from JavaScriptCore/kjs/array_object.cpp. - * kjs/ArrayPrototype.h: Copied from JavaScriptCore/kjs/array_object.h. - * kjs/BooleanObject.cpp: Copied from JavaScriptCore/kjs/bool_object.cpp. - * kjs/BooleanObject.h: Copied from JavaScriptCore/kjs/bool_object.h. - * kjs/ExecState.cpp: - * kjs/ExecState.h: - * kjs/FunctionPrototype.cpp: Copied from JavaScriptCore/kjs/function_object.cpp. - * kjs/FunctionPrototype.h: Copied from JavaScriptCore/kjs/function_object.h. - * kjs/JSArray.cpp: Copied from JavaScriptCore/kjs/array_instance.cpp. - * kjs/JSArray.h: Copied from JavaScriptCore/kjs/array_instance.h. - * kjs/JSFunction.cpp: - * kjs/JSFunction.h: - * kjs/JSGlobalObject.cpp: - * kjs/JSImmediate.cpp: - * kjs/JSObject.h: - * kjs/JSString.h: - * kjs/JSValue.h: - * kjs/JSVariableObject.cpp: - * kjs/MathObject.cpp: Copied from JavaScriptCore/kjs/math_object.cpp. - * kjs/MathObject.h: Copied from JavaScriptCore/kjs/math_object.h. - * kjs/NumberObject.cpp: Copied from JavaScriptCore/kjs/number_object.cpp. - * kjs/NumberObject.h: Copied from JavaScriptCore/kjs/number_object.h. - * kjs/PropertyMap.cpp: Copied from JavaScriptCore/kjs/property_map.cpp. - * kjs/PropertyMap.h: Copied from JavaScriptCore/kjs/property_map.h. - * kjs/PropertySlot.cpp: Copied from JavaScriptCore/kjs/property_slot.cpp. - * kjs/PropertySlot.h: Copied from JavaScriptCore/kjs/property_slot.h. - * kjs/RegExpObject.cpp: Copied from JavaScriptCore/kjs/regexp_object.cpp. - * kjs/RegExpObject.h: Copied from JavaScriptCore/kjs/regexp_object.h. - * kjs/ScopeChain.cpp: Copied from JavaScriptCore/kjs/scope_chain.cpp. - * kjs/ScopeChain.h: Copied from JavaScriptCore/kjs/scope_chain.h. - * kjs/ScopeChainMark.h: Copied from JavaScriptCore/kjs/scope_chain_mark.h. - * kjs/Shell.cpp: - * kjs/array_instance.cpp: Removed. - * kjs/array_instance.h: Removed. - * kjs/array_object.cpp: Removed. - * kjs/array_object.h: Removed. - * kjs/bool_object.cpp: Removed. - * kjs/bool_object.h: Removed. - * kjs/error_object.h: - * kjs/function_object.cpp: Removed. - * kjs/function_object.h: Removed. - * kjs/internal.cpp: - * kjs/math_object.cpp: Removed. - * kjs/math_object.h: Removed. - * kjs/nodes.cpp: - * kjs/number_object.cpp: Removed. - * kjs/number_object.h: Removed. - * kjs/object_object.cpp: - * kjs/property_map.cpp: Removed. - * kjs/property_map.h: Removed. - * kjs/property_slot.cpp: Removed. - * kjs/property_slot.h: Removed. - * kjs/regexp_object.cpp: Removed. - * kjs/regexp_object.h: Removed. - * kjs/scope_chain.cpp: Removed. - * kjs/scope_chain.h: Removed. - * kjs/scope_chain_mark.h: Removed. - * kjs/string_object.cpp: - * kjs/string_object.h: - -2008-06-15 Darin Adler - - - new names for a few key JavaScriptCore files - - * API/JSBase.cpp: - * API/JSCallbackConstructor.h: - * API/JSCallbackFunction.cpp: - * API/JSCallbackFunction.h: - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - * API/JSClassRef.h: - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - * API/JSStringRef.cpp: - * API/JSStringRefCF.cpp: - * API/JSValueRef.cpp: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/CodeBlock.cpp: - * VM/CodeGenerator.cpp: - * VM/ExceptionHelpers.cpp: - * VM/ExceptionHelpers.h: - * VM/JSPropertyNameIterator.cpp: - * VM/JSPropertyNameIterator.h: - * VM/Machine.cpp: - * kjs/AllInOneFile.cpp: - * kjs/DateMath.cpp: - * kjs/DebuggerCallFrame.cpp: - * kjs/ExecState.cpp: - * kjs/JSActivation.cpp: - * kjs/JSFunction.cpp: Copied from JavaScriptCore/kjs/function.cpp. - * kjs/JSFunction.h: Copied from JavaScriptCore/kjs/function.h. - * kjs/JSImmediate.cpp: - * kjs/JSNotAnObject.h: - * kjs/JSObject.cpp: Copied from JavaScriptCore/kjs/object.cpp. - * kjs/JSObject.h: Copied from JavaScriptCore/kjs/object.h. - * kjs/JSString.h: Copied from JavaScriptCore/kjs/internal.h. - * kjs/JSValue.cpp: Copied from JavaScriptCore/kjs/value.cpp. - * kjs/JSValue.h: Copied from JavaScriptCore/kjs/value.h. - * kjs/JSVariableObject.h: - * kjs/JSWrapperObject.h: - * kjs/Shell.cpp: - * kjs/SymbolTable.h: - * kjs/array_instance.h: - * kjs/collector.cpp: - * kjs/date_object.cpp: - * kjs/date_object.h: - * kjs/error_object.cpp: - * kjs/function.cpp: Removed. - * kjs/function.h: Removed. - * kjs/function_object.cpp: - * kjs/function_object.h: - * kjs/grammar.y: - * kjs/internal.cpp: - * kjs/internal.h: Removed. - * kjs/lexer.cpp: - * kjs/list.h: - * kjs/lookup.h: - * kjs/nodes.h: - * kjs/object.cpp: Removed. - * kjs/object.h: Removed. - * kjs/object_object.h: - * kjs/operations.cpp: - * kjs/property_map.cpp: - * kjs/property_slot.cpp: - * kjs/property_slot.h: - * kjs/protect.h: - * kjs/regexp_object.cpp: - * kjs/scope_chain.cpp: - * kjs/string_object.h: - * kjs/ustring.cpp: - * kjs/value.cpp: Removed. - * kjs/value.h: Removed. - * profiler/Profile.cpp: - * profiler/Profiler.cpp: - -2008-06-15 Darin Adler - - Rubber stamped by Sam. - - - cut down on confusing uses of "Object" and "Imp" in - JavaScriptCore class names - - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::JSCallbackFunction): - * API/JSCallbackFunction.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/ExecState.h: - (KJS::ExecState::regExpTable): - (KJS::ExecState::regExpConstructorTable): - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::JSGlobalData): - (KJS::JSGlobalData::~JSGlobalData): - * kjs/JSGlobalData.h: - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::reset): - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::objectConstructor): - (KJS::JSGlobalObject::functionConstructor): - (KJS::JSGlobalObject::arrayConstructor): - (KJS::JSGlobalObject::booleanConstructor): - (KJS::JSGlobalObject::stringConstructor): - (KJS::JSGlobalObject::numberConstructor): - (KJS::JSGlobalObject::dateConstructor): - (KJS::JSGlobalObject::regExpConstructor): - (KJS::JSGlobalObject::errorConstructor): - (KJS::JSGlobalObject::evalErrorConstructor): - (KJS::JSGlobalObject::rangeErrorConstructor): - (KJS::JSGlobalObject::referenceErrorConstructor): - (KJS::JSGlobalObject::syntaxErrorConstructor): - (KJS::JSGlobalObject::typeErrorConstructor): - (KJS::JSGlobalObject::URIErrorConstructor): - * kjs/array_object.cpp: - (KJS::ArrayConstructor::ArrayConstructor): - (KJS::ArrayConstructor::getConstructData): - (KJS::ArrayConstructor::construct): - (KJS::ArrayConstructor::callAsFunction): - * kjs/array_object.h: - * kjs/bool_object.cpp: - (KJS::BooleanObject::BooleanObject): - (KJS::BooleanPrototype::BooleanPrototype): - (KJS::booleanProtoFuncToString): - (KJS::booleanProtoFuncValueOf): - (KJS::BooleanConstructor::BooleanConstructor): - (KJS::BooleanConstructor::getConstructData): - (KJS::BooleanConstructor::construct): - (KJS::BooleanConstructor::callAsFunction): - * kjs/bool_object.h: - * kjs/date_object.cpp: - (KJS::DatePrototype::DatePrototype): - (KJS::DateConstructor::DateConstructor): - (KJS::DateConstructor::getConstructData): - (KJS::DateConstructor::construct): - (KJS::DateConstructor::callAsFunction): - (KJS::DateFunction::DateFunction): - (KJS::DateFunction::callAsFunction): - * kjs/date_object.h: - * kjs/error_object.cpp: - (KJS::ErrorPrototype::ErrorPrototype): - (KJS::ErrorConstructor::ErrorConstructor): - (KJS::ErrorConstructor::getConstructData): - (KJS::ErrorConstructor::construct): - (KJS::ErrorConstructor::callAsFunction): - (KJS::NativeErrorConstructor::NativeErrorConstructor): - (KJS::NativeErrorConstructor::getConstructData): - (KJS::NativeErrorConstructor::construct): - (KJS::NativeErrorConstructor::callAsFunction): - (KJS::NativeErrorConstructor::mark): - * kjs/error_object.h: - * kjs/function.cpp: - (KJS::JSFunction::JSFunction): - (KJS::JSFunction::mark): - (KJS::JSFunction::getOwnPropertySlot): - (KJS::JSFunction::put): - (KJS::JSFunction::deleteProperty): - (KJS::PrototypeFunction::PrototypeFunction): - (KJS::PrototypeReflexiveFunction::PrototypeReflexiveFunction): - (KJS::PrototypeReflexiveFunction::mark): - * kjs/function.h: - * kjs/function_object.cpp: - (KJS::functionProtoFuncToString): - (KJS::FunctionConstructor::FunctionConstructor): - (KJS::FunctionConstructor::getConstructData): - (KJS::FunctionConstructor::construct): - (KJS::FunctionConstructor::callAsFunction): - * kjs/function_object.h: - * kjs/internal.cpp: - (KJS::StringObject::create): - (KJS::JSString::toObject): - (KJS::JSString::toThisObject): - (KJS::JSString::getOwnPropertySlot): - (KJS::InternalFunction::InternalFunction): - (KJS::InternalFunction::getCallData): - (KJS::InternalFunction::implementsHasInstance): - * kjs/math_object.cpp: - (KJS::MathObject::MathObject): - (KJS::MathObject::getOwnPropertySlot): - (KJS::MathObject::getValueProperty): - * kjs/math_object.h: - * kjs/number_object.cpp: - (KJS::NumberObject::NumberObject): - (KJS::NumberPrototype::NumberPrototype): - (KJS::numberProtoFuncToString): - (KJS::numberProtoFuncToLocaleString): - (KJS::numberProtoFuncValueOf): - (KJS::numberProtoFuncToFixed): - (KJS::numberProtoFuncToExponential): - (KJS::numberProtoFuncToPrecision): - (KJS::NumberConstructor::NumberConstructor): - (KJS::NumberConstructor::getOwnPropertySlot): - (KJS::NumberConstructor::getValueProperty): - (KJS::NumberConstructor::getConstructData): - (KJS::NumberConstructor::construct): - (KJS::NumberConstructor::callAsFunction): - * kjs/number_object.h: - * kjs/object.cpp: - (KJS::JSObject::putDirectFunction): - * kjs/object.h: - * kjs/object_object.cpp: - (KJS::ObjectConstructor::ObjectConstructor): - (KJS::ObjectConstructor::getConstructData): - (KJS::ObjectConstructor::construct): - (KJS::ObjectConstructor::callAsFunction): - * kjs/object_object.h: - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): - * kjs/regexp_object.cpp: - (KJS::regExpProtoFuncTest): - (KJS::regExpProtoFuncExec): - (KJS::regExpProtoFuncCompile): - (KJS::regExpProtoFuncToString): - (KJS::RegExpObject::RegExpObject): - (KJS::RegExpObject::~RegExpObject): - (KJS::RegExpObject::getOwnPropertySlot): - (KJS::RegExpObject::getValueProperty): - (KJS::RegExpObject::put): - (KJS::RegExpObject::putValueProperty): - (KJS::RegExpObject::match): - (KJS::RegExpObject::test): - (KJS::RegExpObject::exec): - (KJS::RegExpObject::getCallData): - (KJS::RegExpObject::callAsFunction): - (KJS::RegExpConstructorPrivate::RegExpConstructorPrivate): - (KJS::RegExpConstructor::RegExpConstructor): - (KJS::RegExpConstructor::performMatch): - (KJS::RegExpMatchesArray::RegExpMatchesArray): - (KJS::RegExpMatchesArray::~RegExpMatchesArray): - (KJS::RegExpMatchesArray::fillArrayInstance): - (KJS::RegExpConstructor::arrayOfMatches): - (KJS::RegExpConstructor::getBackref): - (KJS::RegExpConstructor::getLastParen): - (KJS::RegExpConstructor::getLeftContext): - (KJS::RegExpConstructor::getRightContext): - (KJS::RegExpConstructor::getOwnPropertySlot): - (KJS::RegExpConstructor::getValueProperty): - (KJS::RegExpConstructor::put): - (KJS::RegExpConstructor::putValueProperty): - (KJS::RegExpConstructor::getConstructData): - (KJS::RegExpConstructor::construct): - (KJS::RegExpConstructor::callAsFunction): - (KJS::RegExpConstructor::input): - * kjs/regexp_object.h: - * kjs/string_object.cpp: - (KJS::StringObject::StringObject): - (KJS::StringObject::getOwnPropertySlot): - (KJS::StringObject::put): - (KJS::StringObject::deleteProperty): - (KJS::StringObject::getPropertyNames): - (KJS::StringPrototype::StringPrototype): - (KJS::StringPrototype::getOwnPropertySlot): - (KJS::replace): - (KJS::stringProtoFuncToString): - (KJS::stringProtoFuncValueOf): - (KJS::stringProtoFuncCharAt): - (KJS::stringProtoFuncCharCodeAt): - (KJS::stringProtoFuncConcat): - (KJS::stringProtoFuncIndexOf): - (KJS::stringProtoFuncLastIndexOf): - (KJS::stringProtoFuncMatch): - (KJS::stringProtoFuncSearch): - (KJS::stringProtoFuncReplace): - (KJS::stringProtoFuncSlice): - (KJS::stringProtoFuncSplit): - (KJS::stringProtoFuncSubstr): - (KJS::stringProtoFuncSubstring): - (KJS::stringProtoFuncToLowerCase): - (KJS::stringProtoFuncToUpperCase): - (KJS::stringProtoFuncToLocaleLowerCase): - (KJS::stringProtoFuncToLocaleUpperCase): - (KJS::stringProtoFuncLocaleCompare): - (KJS::stringProtoFuncBig): - (KJS::stringProtoFuncSmall): - (KJS::stringProtoFuncBlink): - (KJS::stringProtoFuncBold): - (KJS::stringProtoFuncFixed): - (KJS::stringProtoFuncItalics): - (KJS::stringProtoFuncStrike): - (KJS::stringProtoFuncSub): - (KJS::stringProtoFuncSup): - (KJS::stringProtoFuncFontcolor): - (KJS::stringProtoFuncFontsize): - (KJS::stringProtoFuncAnchor): - (KJS::stringProtoFuncLink): - (KJS::StringConstructor::StringConstructor): - (KJS::StringConstructor::getConstructData): - (KJS::StringConstructor::construct): - (KJS::StringConstructor::callAsFunction): - (KJS::StringConstructorFunction::StringConstructorFunction): - (KJS::StringConstructorFunction::callAsFunction): - * kjs/string_object.h: - (KJS::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined): - * profiler/Profiler.cpp: - (KJS::createCallIdentifier): - -2008-06-15 Darin Adler - - Rubber stamped by Sam. - - - use JS prefix and simpler names for basic JavaScriptCore types, - to complement JSValue and JSObject - - * JavaScriptCore.exp: - * VM/Machine.cpp: - (KJS::jsLess): - (KJS::jsLessEq): - (KJS::jsAdd): - (KJS::callEval): - (KJS::Machine::execute): - (KJS::Machine::retrieveArguments): - (KJS::Machine::retrieveCaller): - (KJS::Machine::getCallFrame): - (KJS::Machine::getFunctionAndArguments): - * VM/Machine.h: - * VM/Register.h: - * kjs/DebuggerCallFrame.cpp: - (KJS::DebuggerCallFrame::functionName): - * kjs/ExecState.h: - * kjs/JSActivation.cpp: - (KJS::JSActivation::createArgumentsObject): - * kjs/array_instance.cpp: - (KJS::JSArray::checkConsistency): - (KJS::JSArray::JSArray): - (KJS::JSArray::~JSArray): - (KJS::JSArray::getItem): - (KJS::JSArray::lengthGetter): - (KJS::JSArray::inlineGetOwnPropertySlot): - (KJS::JSArray::getOwnPropertySlot): - (KJS::JSArray::put): - (KJS::JSArray::deleteProperty): - (KJS::JSArray::getPropertyNames): - (KJS::JSArray::increaseVectorLength): - (KJS::JSArray::setLength): - (KJS::JSArray::mark): - (KJS::JSArray::sort): - (KJS::JSArray::compactForSorting): - (KJS::JSArray::lazyCreationData): - (KJS::JSArray::setLazyCreationData): - * kjs/array_instance.h: - * kjs/array_object.cpp: - (KJS::ArrayPrototype::ArrayPrototype): - (KJS::ArrayPrototype::getOwnPropertySlot): - (KJS::arrayProtoFuncToString): - (KJS::arrayProtoFuncToLocaleString): - (KJS::arrayProtoFuncConcat): - (KJS::arrayProtoFuncSort): - (KJS::ArrayObjectImp::construct): - * kjs/array_object.h: - * kjs/completion.h: - * kjs/function.cpp: - (KJS::JSFunction::JSFunction): - (KJS::JSFunction::mark): - (KJS::JSFunction::getCallData): - (KJS::JSFunction::callAsFunction): - (KJS::JSFunction::argumentsGetter): - (KJS::JSFunction::callerGetter): - (KJS::JSFunction::lengthGetter): - (KJS::JSFunction::getOwnPropertySlot): - (KJS::JSFunction::put): - (KJS::JSFunction::deleteProperty): - (KJS::JSFunction::getParameterName): - (KJS::JSFunction::getConstructData): - (KJS::JSFunction::construct): - (KJS::IndexToNameMap::IndexToNameMap): - (KJS::Arguments::Arguments): - * kjs/function.h: - * kjs/function_object.cpp: - (KJS::functionProtoFuncToString): - (KJS::functionProtoFuncApply): - (KJS::FunctionObjectImp::construct): - * kjs/internal.cpp: - (KJS::JSString::toPrimitive): - (KJS::JSString::getPrimitiveNumber): - (KJS::JSString::toBoolean): - (KJS::JSString::toNumber): - (KJS::JSString::toString): - (KJS::StringInstance::create): - (KJS::JSString::toObject): - (KJS::JSString::toThisObject): - (KJS::JSString::lengthGetter): - (KJS::JSString::indexGetter): - (KJS::JSString::indexNumericPropertyGetter): - (KJS::JSString::getOwnPropertySlot): - (KJS::JSNumberCell::type): - (KJS::JSNumberCell::toPrimitive): - (KJS::JSNumberCell::getPrimitiveNumber): - (KJS::JSNumberCell::toBoolean): - (KJS::JSNumberCell::toNumber): - (KJS::JSNumberCell::toString): - (KJS::JSNumberCell::toObject): - (KJS::JSNumberCell::toThisObject): - (KJS::JSNumberCell::getUInt32): - (KJS::JSNumberCell::getTruncatedInt32): - (KJS::JSNumberCell::getTruncatedUInt32): - (KJS::GetterSetter::mark): - (KJS::GetterSetter::toPrimitive): - (KJS::GetterSetter::getPrimitiveNumber): - (KJS::GetterSetter::toBoolean): - (KJS::GetterSetter::toNumber): - (KJS::GetterSetter::toString): - (KJS::GetterSetter::toObject): - (KJS::GetterSetter::getOwnPropertySlot): - (KJS::GetterSetter::put): - (KJS::GetterSetter::toThisObject): - * kjs/internal.h: - (KJS::JSString::JSString): - (KJS::JSString::getStringPropertySlot): - * kjs/nodes.cpp: - (KJS::FuncDeclNode::makeFunction): - (KJS::FuncExprNode::makeFunction): - * kjs/nodes.h: - * kjs/object.cpp: - (KJS::JSObject::put): - (KJS::JSObject::deleteProperty): - (KJS::JSObject::defineGetter): - (KJS::JSObject::defineSetter): - (KJS::JSObject::lookupGetter): - (KJS::JSObject::lookupSetter): - (KJS::JSObject::fillGetterPropertySlot): - * kjs/object.h: - (KJS::GetterSetter::GetterSetter): - * kjs/operations.cpp: - (KJS::equal): - (KJS::strictEqual): - * kjs/property_map.cpp: - (KJS::PropertyMap::containsGettersOrSetters): - * kjs/regexp_object.cpp: - (KJS::RegExpMatchesArray::getOwnPropertySlot): - (KJS::RegExpMatchesArray::put): - (KJS::RegExpMatchesArray::deleteProperty): - (KJS::RegExpMatchesArray::getPropertyNames): - (KJS::RegExpMatchesArray::RegExpMatchesArray): - (KJS::RegExpMatchesArray::fillArrayInstance): - * kjs/string_object.cpp: - (KJS::StringInstance::StringInstance): - (KJS::replace): - (KJS::stringProtoFuncReplace): - (KJS::stringProtoFuncToLowerCase): - (KJS::stringProtoFuncToUpperCase): - (KJS::stringProtoFuncToLocaleLowerCase): - (KJS::stringProtoFuncToLocaleUpperCase): - * kjs/string_object.h: - (KJS::StringInstance::internalValue): - * kjs/value.cpp: - (KJS::JSCell::getNumber): - (KJS::JSCell::getString): - (KJS::JSCell::getObject): - (KJS::jsString): - (KJS::jsOwnedString): - * kjs/value.h: - (KJS::JSNumberCell::JSNumberCell): - (KJS::jsNumberCell): - (KJS::JSValue::uncheckedGetNumber): - * profiler/Profiler.cpp: - (KJS::createCallIdentifier): - (KJS::createCallIdentifierFromFunctionImp): - -2008-06-15 Maciej Stachowiak - - Reviewed by Alexey. - - - add emitUnaryOp, emitNullaryOp and emitUnaryOpNoDst; use them - - This removes some boilerplate code and also reduces the number of - places that will need to be changed to do on-demand emit of - loads (and thus support k operands). - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitUnaryOp): - (KJS::CodeGenerator::emitNullaryOp): - (KJS::CodeGenerator::emitUnaryOpNoDst): - (KJS::CodeGenerator::emitPushScope): - * VM/CodeGenerator.h: - (KJS::CodeGenerator::emitNewObject): - (KJS::CodeGenerator::emitNewArray): - (KJS::CodeGenerator::emitNot): - (KJS::CodeGenerator::emitBitNot): - (KJS::CodeGenerator::emitToJSNumber): - (KJS::CodeGenerator::emitNegate): - (KJS::CodeGenerator::emitInstanceOf): - (KJS::CodeGenerator::emitTypeOf): - (KJS::CodeGenerator::emitIn): - (KJS::CodeGenerator::emitReturn): - (KJS::CodeGenerator::emitEnd): - (KJS::CodeGenerator::emitGetPropertyNames): - -2008-06-15 Alp Toker - - Rubber-stamped by Maciej. - - Install 'jsc' application by default. - - * GNUmakefile.am: - -2008-06-15 Maciej Stachowiak - - Reviewed by Oliver. - - - rename testkjs to jsc - - * GNUmakefile.am: - * JavaScriptCore.vcproj/JavaScriptCore.sln: - * JavaScriptCore.vcproj/jsc: Added. - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Copied from JavaScriptCore.vcproj/testkjs/testkjs.vcproj. - * JavaScriptCore.vcproj/testkjs: Removed. - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Removed. - * JavaScriptCore.xcodeproj/project.pbxproj: - * jscore.bkl: - * kjs/Shell.cpp: Copied from kjs/testkjs.cpp. - (main): - (printUsageStatement): - (jscmain): - * kjs/jsc.pro: Copied from kjs/testkjs.pro. - * kjs/testkjs.cpp: Removed. - * kjs/testkjs.pro: Removed. - * tests/mozilla/expected.html: - * tests/mozilla/js1_2/Array/tostring_1.js: - * tests/mozilla/js1_2/Array/tostring_2.js: - * tests/mozilla/jsDriver.pl: - -2008-06-15 Cameron Zwarich - - Reviewed by Maciej. - - Mac build fix. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/nodes.h: - -2008-06-15 Cameron Zwarich - - Reviewed by Maciej. - - Change the spelling of PrecMultiplicitave to PrecMultiplicative. - - * kjs/nodes.h: - (KJS::MultNode::precedence): - (KJS::DivNode::precedence): - (KJS::ModNode::precedence): - -2008-06-15 Cameron Zwarich - - Reviewed by Maciej. - - Remove unused preprocessor macros related to exceptions in the old - interpreter. - - * kjs/nodes.cpp: - -2008-06-15 Cameron Zwarich - - Reviewed by Maciej. - - Bug 19484: More instructions needs to use temporary registers - - - Fix codegen for all binary operations so that temporaries are used if - necessary. This was done by making BinaryOpNode and ReverseBinaryOpNode - subclasses of ExpressionNode, and eliminating the custom emitCode() - methods for the individual node classes. - - This only adds 3 new instructions to SunSpider code, and there is no - difference in SunSpider execution time. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitBitNot): - (KJS::CodeGenerator::emitBinaryOp): - * VM/CodeGenerator.h: - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::PreIncResolveNode::emitCode): - (KJS::PreDecResolveNode::emitCode): - (KJS::BinaryOpNode::emitCode): - (KJS::ReverseBinaryOpNode::emitCode): - (KJS::emitReadModifyAssignment): - (KJS::CaseBlockNode::emitCodeForBlock): - * kjs/nodes.h: - (KJS::BinaryOpNode::BinaryOpNode): - (KJS::ReverseBinaryOpNode::ReverseBinaryOpNode): - (KJS::MultNode::): - (KJS::DivNode::): - (KJS::DivNode::precedence): - (KJS::ModNode::): - (KJS::ModNode::precedence): - (KJS::AddNode::): - (KJS::AddNode::precedence): - (KJS::SubNode::): - (KJS::SubNode::precedence): - (KJS::LeftShiftNode::): - (KJS::LeftShiftNode::precedence): - (KJS::RightShiftNode::): - (KJS::RightShiftNode::precedence): - (KJS::UnsignedRightShiftNode::): - (KJS::UnsignedRightShiftNode::precedence): - (KJS::LessNode::): - (KJS::LessNode::precedence): - (KJS::GreaterNode::): - (KJS::GreaterNode::precedence): - (KJS::LessEqNode::): - (KJS::LessEqNode::precedence): - (KJS::GreaterEqNode::): - (KJS::GreaterEqNode::precedence): - (KJS::InstanceOfNode::): - (KJS::InstanceOfNode::precedence): - (KJS::InNode::): - (KJS::InNode::precedence): - (KJS::EqualNode::): - (KJS::EqualNode::precedence): - (KJS::NotEqualNode::): - (KJS::NotEqualNode::precedence): - (KJS::StrictEqualNode::): - (KJS::StrictEqualNode::precedence): - (KJS::NotStrictEqualNode::): - (KJS::NotStrictEqualNode::precedence): - (KJS::BitAndNode::): - (KJS::BitAndNode::precedence): - (KJS::BitOrNode::): - (KJS::BitOrNode::precedence): - (KJS::BitXOrNode::): - (KJS::BitXOrNode::precedence): - * kjs/nodes2string.cpp: - (KJS::LessNode::streamTo): - (KJS::GreaterNode::streamTo): - (KJS::LessEqNode::streamTo): - (KJS::GreaterEqNode::streamTo): - (KJS::InstanceOfNode::streamTo): - (KJS::InNode::streamTo): - (KJS::EqualNode::streamTo): - (KJS::NotEqualNode::streamTo): - (KJS::StrictEqualNode::streamTo): - (KJS::NotStrictEqualNode::streamTo): - (KJS::BitAndNode::streamTo): - (KJS::BitXOrNode::streamTo): - (KJS::BitOrNode::streamTo): - -2008-06-14 Darin Adler - - Rubber stamped by Sam. - - - rename a bunch of local symbols within the regular expression code to - follow our usual coding style, and do a few other name tweaks - - * pcre/pcre_compile.cpp: - (CompileData::CompileData): - (checkEscape): - (readRepeatCounts): - (compileBranch): - (compileBracket): - (calculateCompiledPatternLength): - (returnError): - (jsRegExpCompile): - * pcre/pcre_exec.cpp: - (MatchStack::MatchStack): - (MatchStack::canUseStackBufferForNextFrame): - (MatchStack::popCurrentFrame): - (match): - (tryFirstByteOptimization): - (tryRequiredByteOptimization): - (jsRegExpExecute): - * pcre/pcre_internal.h: - -2008-06-14 Cameron Zwarich - - Reviewed by Darin. - - Remove redundant uses of get(). - - * kjs/nodes.cpp: - (KJS::BracketAccessorNode::emitCode): - (KJS::AddNode::emitCode): - (KJS::SubNode::emitCode): - (KJS::ReadModifyResolveNode::emitCode): - (KJS::AssignDotNode::emitCode): - (KJS::ReadModifyDotNode::emitCode): - (KJS::AssignBracketNode::emitCode): - (KJS::ReadModifyBracketNode::emitCode): - -2008-06-14 Cameron Zwarich - - Reviewed by Maciej. - - Make code generation not use a temporary for the left-hand side of an - expression if the right-hand side is a local variable. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::isLocal): - * VM/CodeGenerator.h: - (KJS::CodeGenerator::leftHandSideNeedsCopy): - (KJS::CodeGenerator::emitNodeForLeftHandSide): - * kjs/nodes.cpp: - (KJS::ResolveNode::isPure): - (KJS::BracketAccessorNode::emitCode): - (KJS::AddNode::emitCode): - (KJS::SubNode::emitCode): - (KJS::ReadModifyResolveNode::emitCode): - (KJS::AssignDotNode::emitCode): - (KJS::ReadModifyDotNode::emitCode): - (KJS::AssignBracketNode::emitCode): - (KJS::ReadModifyBracketNode::emitCode): - * kjs/nodes.h: - (KJS::ExpressionNode::): - (KJS::BooleanNode::): - (KJS::NumberNode::): - (KJS::StringNode::): - -2008-06-14 Darin Adler - - Reviewed by Sam. - - - more of https://bugs.webkit.org/show_bug.cgi?id=17257 - start ref counts at 1 instead of 0 for speed - - * kjs/nodes.cpp: - (KJS::ParserRefCounted::hasOneRef): Added. Replaces refcount. - * kjs/nodes.h: Replaced refcount with hasOneRef. - - * wtf/ListRefPtr.h: - (WTF::ListRefPtr::~ListRefPtr): Changed to use hasOneRef instead of - refcount, so this class can be used with the RefCounted template. - - * wtf/RefCounted.h: - (WTF::RefCounted::hasOneRef): Made const, since there's no reason for - it to be non-const. - -2008-06-14 Maciej Stachowiak - - Reviewed by Oliver. - - - initialize local vars as side effect of call instead of in bytecode - 1.004x speedup on SunSpider. - - This removes just the dispatch overhead for these loads - in the - future, dead store elimination might be able to eliminate them - entirely. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): For function blocks, don't - emit loads of undefined for var initialization. - * VM/Machine.cpp: - (KJS::slideRegisterWindowForCall): Instead, initialize locals - as part of the call. - -2008-06-14 Cameron Zwarich - - Reviewed by Oliver. - - Remove helper functions in the parser that are no longer needed. - - * kjs/grammar.y: - -2008-06-14 Cameron Zwarich - - Reviewed by Oliver. - - Bug 19484: More instructions needs to use temporary registers - - - Make code generation for AddNode and SubNode use temporaries when - necessary. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::AddNode::emitCode): - (KJS::SubNode::emitCode): - * kjs/nodes.h: - (KJS::AddNode::): - (KJS::SubNode::): - -2008-06-13 Cameron Zwarich - - Reviewed by Maciej. - - Combine TrueNode and FalseNode to make BooleanNode, and remove the - unused class PlaceholderTrueNode. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::BooleanNode::emitCode): - * kjs/nodes.h: - (KJS::BooleanNode::): - (KJS::BooleanNode::precedence): - * kjs/nodes2string.cpp: - (KJS::BooleanNode::streamTo): - -2008-06-13 Cameron Zwarich - - Reviewed by Maciej. - - Eliminate the use of temporaries to store the left hand side of an - expression when the right hand side is a constant. This slightly - improves the generated bytecode for a few SunSpider tests, but it is - mostly in preparation for fixing - - Bug 19484: More instructions needs to use temporary registers - - - * VM/CodeGenerator.h: - (KJS::CodeGenerator::leftHandSideNeedsCopy): - (KJS::CodeGenerator::emitNodeForLeftHandSide): - * kjs/nodes.cpp: - (KJS::BracketAccessorNode::emitCode): - (KJS::ReadModifyResolveNode::emitCode): - (KJS::AssignDotNode::emitCode): - (KJS::ReadModifyDotNode::emitCode): - (KJS::AssignBracketNode::emitCode): - (KJS::ReadModifyBracketNode::emitCode): - * kjs/nodes.h: - (KJS::ExpressionNode::): - (KJS::FalseNode::): - (KJS::TrueNode::): - (KJS::NumberNode::): - (KJS::StringNode::): - -2008-06-13 Maciej Stachowiak - - Reviewed by Oliver. - - - prettify opcode stats output - - I changed things to be a bit more aligned, also there is a new - section listing most common opcodes and most common sequences that - include them. - - * VM/Opcode.cpp: - (KJS::OpcodeStats::~OpcodeStats): - * VM/Opcode.h: - -2008-06-13 Kevin McCullough - - Reviewed by Geoff. - - JSProfiler: Remove the recursion limit in the - profiler. - - Remove recursion from exclude(). This leaves only focus() to fix. - - * JavaScriptCore.exp: Change the signatures of the exported functions. - * profiler/Profile.cpp: - (KJS::Profile::forEach): I added a traverseNextNodePreOrder() function - and so needed to distinguish the other function by labeling it - traverseNextNodePostOrder(). - (KJS::Profile::exclude): All new exclude that iteratively walks the tree - * profiler/Profile.h: - (KJS::Profile::focus): Add a null check for m_head. - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::traverseNextNodePostOrder): Renamed - (KJS::ProfileNode::traverseNextNodePreOrder): Walks the tree in pre- - order, where the parent is processed before the children. - (KJS::ProfileNode::setTreeVisible): Iterate over the sub-tree and set - all of the nodes visible value. This changes another function that used - recursion. - (KJS::ProfileNode::exclude): Remove recursion from this function. - Because we now check for m_visible and we are walking the tree in pre- - order we do not need to check if an excluded node is in an excluded - sub-tree. - * profiler/ProfileNode.h: Added specific selfTime functions to - facilitate exclude(). - (KJS::ProfileNode::setSelfTime): - (KJS::ProfileNode::setActualSelfTime): - (KJS::ProfileNode::setVisibleSelfTime): - -2008-06-12 Darin Adler - - Reviewed by Maciej. - - - https://bugs.webkit.org/show_bug.cgi?id=19434 - speed up SunSpider by avoiding some string boxing - - Speeds up SunSpider by 1.1%. - - Optimized code path for getting built-in properties from strings -- avoid - boxing with a string object in that case. We can make further changes to avoid - even more boxing, but this change alone is a win. - - * API/JSCallbackObjectFunctions.h: - (KJS::JSCallbackObject::staticValueGetter): Use isObject instead of inherits - in asssert, since the type of slotBase() is now JSValue, not JSObject. - (KJS::JSCallbackObject::staticFunctionGetter): Ditto. - (KJS::JSCallbackObject::callbackGetter): Ditto. - - * kjs/internal.cpp: - (KJS::StringImp::getPrimitiveNumber): Updated for change of data member name. - (KJS::StringImp::toBoolean): Ditto. - (KJS::StringImp::toNumber): Ditto. - (KJS::StringImp::toString): Ditto. - (KJS::StringInstance::create): Added; avoids a bit of cut and paste code. - (KJS::StringImp::toObject): Use StringInstance::create. - (KJS::StringImp::toThisObject): Ditto. - (KJS::StringImp::lengthGetter): Added. Replaces the getter that used to live in - the StringInstance class. - (KJS::StringImp::indexGetter): Ditto. - (KJS::StringImp::indexNumericPropertyGetter): Ditto. - (KJS::StringImp::getOwnPropertySlot): Added. Deals with built in properties of - the string class without creating a StringInstance. - - * kjs/internal.h: - (KJS::StringImp::getStringPropertySlot): Added. To be used by both the string - and string object getOwnPropertySlot function. - - * kjs/lookup.h: - (KJS::staticFunctionGetter): Updated since slotBase() is now a JSValue rather - than a JSObject. - - * kjs/object.h: Removed PropertySlot::slotBase() function, which can now move - back into property_slot.h where it belongs since it doesn't have to cast to - JSObject*. - - * kjs/property_slot.cpp: - (KJS::PropertySlot::functionGetter): Updated since slot.slotBase() is now a JSValue* - instead of JSObject*. setGetterSlot still guarantees the base is a JSObject*. - * kjs/property_slot.h: - (KJS::PropertySlot::PropertySlot): Changed base to JSValue* intead of JSCell*. - (KJS::PropertySlot::setStaticEntry): Ditto. - (KJS::PropertySlot::setCustom): Ditto. - (KJS::PropertySlot::setCustomIndex): Ditto. - (KJS::PropertySlot::setCustomNumeric): Ditto. - (KJS::PropertySlot::slotBase): Moved inline here since it no longer involves a - downcast to JSObject*. - (KJS::PropertySlot::setBase): Changed to JSValue*. - - * kjs/string_object.cpp: - (KJS::StringInstance::getOwnPropertySlot): Changed to use getStringPropertySlot - instead of coding the properties here. This allows sharing the code with StringImp. - - * kjs/string_object.h: Removed inlineGetOwnPropertySlot, lengthGetter, and indexGetter. - Made one of the constructors protected. - - * kjs/value.h: Made getOwnPropertySlot private in the JSCell class -- this is better - since it's not the real JSObject getOwnPropertySlot semantic and most callers shouldn't - use it. - -2008-06-12 Alexey Proskuryakov - - Reviewed by Maciej. - - Preparation to making JavaScript heap per-thread. - - * kjs/collector.cpp: - (KJS::Collector::collect): - * kjs/collector.h: - (KJS::Collector::markListSet): - The collector now holds the list of protected lists itself, to be made per-instance. - - * kjs/list.h: Changed to hold a pointer to a mark set this list is in, if any. - (KJS::List::List): Explicitly initialize m_size with zero, as m_vector.size() is - guaranteed to be such anyway. - (KJS::List::append): Changed the fast case to only be executed as long as inline buffer - is used, because otherwise, we now do more expensive checks. - - * kjs/list.cpp: - (KJS::List::markLists): Renamed from markProtectedListsSlowCase, made it take the list set - as a parameter. - (KJS::List::slowAppend): If a non-immediate value is appended, the list needs to be added - to an appropriate Heap's protected list. For now, a static Collector::markListSet() is - used, but the code is layed out in preparation to making the switch to multiple heaps. - - * JavaScriptCore.exp: Updated export list. - -2008-06-12 Cameron Zwarich - - Reviewed by Maciej. - - Bug 19510: CodeBlock::needsFullScopeChain not always set for global code - - - This fixes the symptoms by using CodeGenerator::m_codeType to determine - when to use temporaries instead of CodeBlock::needsFullScopeChain, but - it does not fix the problem itself. - - * VM/CodeGenerator.h: - (KJS::CodeGenerator::leftHandSideNeedsCopy): - -2008-06-11 Cameron Zwarich - - Reviewed by Maciej. - - Bug 19498: REGRESSION (r34497): crash while loading GMail - - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitJumpIfTrueMayCombine): - (KJS::CodeGenerator::emitJumpIfTrue): - * VM/CodeGenerator.h: - * kjs/nodes.cpp: - (KJS::DoWhileNode::emitCode): - (KJS::WhileNode::emitCode): - (KJS::ForNode::emitCode): - (KJS::CaseBlockNode::emitCodeForBlock): - -2008-06-11 Darin Adler - - Reviewed by Maciej. - - - a little bit of cleanup and prep for some upcoming optimizations - - * JavaScriptCore.exp: Re-sorted this file (with sort command line tool). - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): Fixed printf to avoid warnings -- to use %lu we - need to make sure the type is unsigned long. - * kjs/object.cpp: - (KJS::Error::create): Eliminated unused error names array, and also put - the strings into the code since there was already a switch statment. - This also avoids having to contemplate a hypothetical access past the - end of the array. - * kjs/object.h: Got rid of errorNames. - * kjs/property_slot.cpp: Deleted unused ungettableGetter. - * kjs/property_slot.h: Ditto. - * wtf/AlwaysInline.h: Added LIKELY alongside UNLIKELY. - -2008-06-11 Cameron Zwarich - - Reviewed by Darin. - - Bug 19457: Create fused opcodes for tests and conditional jumps - - - Add a new jless instruction, and modify the code generator to emit it - instead of the pair (less, jtrue). - - Gives a 3.6% improvement on SunSpider. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::emitOpcode): - (KJS::CodeGenerator::retrieveLastBinaryOp): - (KJS::CodeGenerator::rewindBinaryOp): - (KJS::CodeGenerator::emitJump): - (KJS::CodeGenerator::emitJumpIfTrue): - (KJS::CodeGenerator::emitJumpIfFalse): - (KJS::CodeGenerator::emitMove): - (KJS::CodeGenerator::emitNot): - (KJS::CodeGenerator::emitEqual): - (KJS::CodeGenerator::emitNotEqual): - (KJS::CodeGenerator::emitStrictEqual): - (KJS::CodeGenerator::emitNotStrictEqual): - (KJS::CodeGenerator::emitLess): - (KJS::CodeGenerator::emitLessEq): - (KJS::CodeGenerator::emitPreInc): - (KJS::CodeGenerator::emitPreDec): - (KJS::CodeGenerator::emitPostInc): - (KJS::CodeGenerator::emitPostDec): - (KJS::CodeGenerator::emitToJSNumber): - (KJS::CodeGenerator::emitNegate): - (KJS::CodeGenerator::emitAdd): - (KJS::CodeGenerator::emitMul): - (KJS::CodeGenerator::emitDiv): - (KJS::CodeGenerator::emitMod): - (KJS::CodeGenerator::emitSub): - (KJS::CodeGenerator::emitLeftShift): - (KJS::CodeGenerator::emitRightShift): - (KJS::CodeGenerator::emitUnsignedRightShift): - (KJS::CodeGenerator::emitBitAnd): - (KJS::CodeGenerator::emitBitXOr): - (KJS::CodeGenerator::emitBitOr): - (KJS::CodeGenerator::emitBitNot): - (KJS::CodeGenerator::emitInstanceOf): - (KJS::CodeGenerator::emitTypeOf): - (KJS::CodeGenerator::emitIn): - (KJS::CodeGenerator::emitLoad): - (KJS::CodeGenerator::emitNewObject): - (KJS::CodeGenerator::emitNewArray): - (KJS::CodeGenerator::emitResolve): - (KJS::CodeGenerator::emitGetScopedVar): - (KJS::CodeGenerator::emitPutScopedVar): - (KJS::CodeGenerator::emitResolveBase): - (KJS::CodeGenerator::emitResolveWithBase): - (KJS::CodeGenerator::emitResolveFunction): - (KJS::CodeGenerator::emitGetById): - (KJS::CodeGenerator::emitPutById): - (KJS::CodeGenerator::emitPutGetter): - (KJS::CodeGenerator::emitPutSetter): - (KJS::CodeGenerator::emitDeleteById): - (KJS::CodeGenerator::emitGetByVal): - (KJS::CodeGenerator::emitPutByVal): - (KJS::CodeGenerator::emitDeleteByVal): - (KJS::CodeGenerator::emitPutByIndex): - (KJS::CodeGenerator::emitNewFunction): - (KJS::CodeGenerator::emitNewRegExp): - (KJS::CodeGenerator::emitNewFunctionExpression): - (KJS::CodeGenerator::emitCall): - (KJS::CodeGenerator::emitReturn): - (KJS::CodeGenerator::emitEnd): - (KJS::CodeGenerator::emitConstruct): - (KJS::CodeGenerator::emitPushScope): - (KJS::CodeGenerator::emitPopScope): - (KJS::CodeGenerator::emitDebugHook): - (KJS::CodeGenerator::emitComplexJumpScopes): - (KJS::CodeGenerator::emitJumpScopes): - (KJS::CodeGenerator::emitNextPropertyName): - (KJS::CodeGenerator::emitGetPropertyNames): - (KJS::CodeGenerator::emitCatch): - (KJS::CodeGenerator::emitThrow): - (KJS::CodeGenerator::emitNewError): - (KJS::CodeGenerator::emitJumpSubroutine): - (KJS::CodeGenerator::emitSubroutineReturn): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.cpp: - * VM/Opcode.h: - -2008-06-11 Darin Adler - - Reviewed by Alexey. - - - fix https://bugs.webkit.org/show_bug.cgi?id=19442 - JavaScript array implementation doesn't maintain m_numValuesInVector when sorting - - * kjs/array_instance.cpp: - (KJS::ArrayInstance::checkConsistency): Added. Empty inline version for when - consistency checks are turned off. - (KJS::ArrayInstance::ArrayInstance): Check consistency after construction. - (KJS::ArrayInstance::~ArrayInstance): Check consistency before destruction. - (KJS::ArrayInstance::put): Check consistency before and after. - (KJS::ArrayInstance::deleteProperty): Ditto. - (KJS::ArrayInstance::setLength): Ditto. - (KJS::compareByStringPairForQSort): Use typedef for clarity. - (KJS::ArrayInstance::sort): Check consistency before and after. Also broke the loop - to set up sorting into two separate passes. Added FIXMEs about various exception - safety issues. Added code to set m_numValuesInVector after sorting. - (KJS::ArrayInstance::compactForSorting): Ditto. - - * kjs/array_instance.h: Added a definition of an enum for the types of consistency - check and a declaration of the consistency checking function. - -2008-06-10 Kevin Ollivier - - wx build fix. Link against libedit on Mac since HAVE(READLINE) is defined there. - - * jscore.bkl: - -2008-06-10 Alexey Proskuryakov - - Reviewed by Darin. - - https://bugs.webkit.org/show_bug.cgi?id=16503 - match limit takes at least 13% of the time on the SunSpider regexp-dna test - - Make the limit test slightly more efficient. It is not clear how much of a win it is, - as the improvement on regexp-dna varies from 2.3% to 0.6% depending on what revision I - apply the patch to. Today, the win on regexp-dna was minimal, but the total win was whopping - 0.5%, due to random code generation changes. - - * pcre/pcre_exec.cpp: (match): Avoid loading a constant on each iteration. - -2008-06-09 Alp Toker - - gcc3/autotools build fix. Add explicit -O2 -fno-strict-aliasing to - each of the tools since these are no longer set globally. - - * GNUmakefile.am: - -2008-06-09 Cameron Zwarich - - Reviewed by Sam. - - Add an include for readline/history.h to fix the build for Darwin users - with the GNU readline library installed. Also, clean up the style of - the HAVE(READLINE) check. - - * kjs/testkjs.cpp: - (runInteractive): - -2008-06-09 Cameron Zwarich - - Reviewed by Darin. - - Bug 17531: Add interactive mode to testkjs - - - This is a cleaned up version of Sam's earlier patch to add an - interactive mode to testkjs. - - Readline support is only enabled on Darwin platforms for now, but - other ports can enable it by defining HAVE_READLINE in kjs/config.h. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/config.h: - * kjs/testkjs.cpp: - (Options::Options): - (runWithScripts): - (runInteractive): - (printUsageStatement): - (parseArguments): - (kjsmain): - -2008-06-08 Cameron Zwarich - - Reviewed by Darin. - - Bug 19346: REGRESSION: Mootools 1.2 Class inheritance broken in post-SquirrelFish merge - - - A check for whether a function's caller is eval code accidentally included - the case where the caller's caller is native code. Add a CodeType field to - CodeBlock and use this for the eval caller test instead. - - * VM/CodeBlock.h: - (KJS::CodeBlock::CodeBlock): - (KJS::ProgramCodeBlock::ProgramCodeBlock): - (KJS::EvalCodeBlock::EvalCodeBlock): - * VM/Machine.cpp: - (KJS::getCallerFunctionOffset): - * kjs/nodes.cpp: - (KJS::FunctionBodyNode::generateCode): - (KJS::ProgramNode::generateCode): - -2008-06-07 Cameron Zwarich - - Reviewed by Dan Bernstein. - - Bug 17928: testkjs shouldn't require "-f" - - - * kjs/testkjs.cpp: - (printUsageStatement): - (parseArguments): - -2008-06-07 Cameron Zwarich - - Reviewed by Eric. - - Bug 17548: JavaScriptCore print(a, b) differs from Spidermonkey Behavior - - - * kjs/testkjs.cpp: - (functionPrint): - -2008-06-07 Cameron Zwarich - - Reviewed by Sam. - - Bug 17547: JavaScriptCore print() differs from Spidermonkey Behavior - - - * kjs/testkjs.cpp: - (functionPrint): - -2008-06-07 Alexey Proskuryakov - - More build fixes. - - * kjs/JSGlobalData.cpp: Fixed an included file name for case-sensitive file systems, fixed - JSGlobalData::threadInstance() for non-multithreaded builds. - -2008-06-07 Alexey Proskuryakov - - Build fix - actually adding JSGlobalData.cpp to non-Mac builds! - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCoreSources.bkl: - -2008-06-07 Alexey Proskuryakov - - Try to fix Gtk/gcc 4.3 build. - - * kjs/JSGlobalData.h: Include ustring.h instead of forward-declaring UString::Rep. - -2008-06-06 Alexey Proskuryakov - - Reviewed by Darin. - - Combine per-thread objects into one, to make it easier to support legacy clients (for - which they shouldn't be really per-thread). - - No change on SunSpider total. - - * JavaScriptCore.xcodeproj/project.pbxproj: Added JSGlobalData.{h,cpp} - - * kjs/JSGlobalData.cpp: Added. - (KJS::JSGlobalData::JSGlobalData): - (KJS::JSGlobalData::~JSGlobalData): - (KJS::JSGlobalData::threadInstance): - * kjs/JSGlobalData.h: Added. - This class encapsulates all data that should be per-thread (or shared between legacy clients). - It will also keep a Heap pointer, but right now, Heap (Collector) methods are all static. - - * kjs/identifier.h: - (KJS::Identifier::Identifier): - Added a constructor explicitly taking JSGlobalData to access IdentifierTable. Actually, - all of them should, but this will be a separate patch. - - * kjs/identifier.cpp: - (KJS::IdentifierTable::literalTable): - (KJS::createIdentifierTable): - (KJS::deleteIdentifierTable): - (KJS::Identifier::add): - (KJS::Identifier::addSlowCase): - Combined IdentifierTable and LiteralIdentifierTable into a single class for simplicity. - - * kjs/grammar.y: kjsyyparse now takes JSGlobalData, not just a Lexer. - - * kjs/nodes.cpp: - (KJS::Node::Node): - (KJS::EvalFunctionCallNode::emitCode): - (KJS::ScopeNode::ScopeNode): - Changed to access Lexer and Parser via JSGlobalData::threadInstance(). This is also a - temporary measure, they will need to use JSGlobalData explicitly. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::callEval): - * kjs/CommonIdentifiers.cpp: - (KJS::CommonIdentifiers::CommonIdentifiers): - * kjs/CommonIdentifiers.h: - * kjs/DebuggerCallFrame.cpp: - (KJS::DebuggerCallFrame::evaluate): - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - * kjs/ExecState.h: - (KJS::ExecState::globalData): - (KJS::ExecState::identifierTable): - (KJS::ExecState::propertyNames): - (KJS::ExecState::emptyList): - (KJS::ExecState::lexer): - (KJS::ExecState::parser): - (KJS::ExecState::arrayTable): - (KJS::ExecState::dateTable): - (KJS::ExecState::mathTable): - (KJS::ExecState::numberTable): - (KJS::ExecState::RegExpImpTable): - (KJS::ExecState::RegExpObjectImpTable): - (KJS::ExecState::stringTable): - * kjs/InitializeThreading.cpp: - (KJS::initializeThreadingOnce): - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::init): - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (KJS::JSGlobalObject::head): - (KJS::JSGlobalObject::globalData): - * kjs/Parser.cpp: - (KJS::Parser::parse): - * kjs/Parser.h: - * kjs/function.cpp: - (KJS::FunctionImp::getParameterName): - (KJS::IndexToNameMap::unMap): - (KJS::globalFuncEval): - * kjs/function_object.cpp: - (KJS::FunctionObjectImp::construct): - * kjs/interpreter.cpp: - (KJS::Interpreter::checkSyntax): - (KJS::Interpreter::evaluate): - * kjs/lexer.cpp: - (kjsyylex): - * kjs/lexer.h: - * kjs/testkjs.cpp: - (prettyPrintScript): - Updated for the above changes. Most of threadInstance uses here will need to be replaced with - explicitly passed pointers to support legacy JSC clients. - - * JavaScriptCore.exp: Removed KJS::parser(). - -2008-06-06 Cameron Zwarich - - Reviewed by Oliver. - - Bug 19424: Add support for logging opcode pair counts - - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.cpp: - (KJS::OpcodeStats::OpcodeStats): - (KJS::compareOpcodeIndices): - (KJS::compareOpcodePairIndices): - (KJS::OpcodeStats::~OpcodeStats): - (KJS::OpcodeStats::recordInstruction): - (KJS::OpcodeStats::resetLastInstruction): - * VM/Opcode.h: - -2008-06-06 Kevin McCullough - - Reviewed by Adam. - - JSProfiler: Remove the recursion limit in the - profiler. - - Change the remaining functions that do not take arguments, from using - recursion to using iteration. - - * JavaScriptCore.exp: - * profiler/Profile.cpp: - (KJS::stopProfiling): - (KJS::restoreAll): - (KJS::Profile::stopProfiling): Use foreach instead of recursion. - (KJS::Profile::restoreAll): Ditto. - * profiler/Profile.h: - * profiler/ProfileNode.cpp: Remove recursion. - (KJS::ProfileNode::stopProfiling): - (KJS::ProfileNode::restore): - * profiler/ProfileNode.h: - -2008-06-05 Oliver Hunt - - Reviewed by Alexey. - - Fix Greater and GreaterEq nodes to emit code for the left - and right sub-expressions in the correct order. - - * kjs/nodes.cpp: - (KJS::GreaterNode::emitCode): - (KJS::GreaterEqNode::emitCode): - -2008-06-05 Antti Koivisto - - Reviewed by Alp Toker. - - Fix whitespaces. - - * kjs/collector.cpp: - (KJS::getPlatformThreadRegisters): - -2008-06-05 Antti Koivisto - - Reviewed by Darin. - - Support compiling JavaScriptCore for ARM. - - * kjs/collector.cpp: - (KJS::getPlatformThreadRegisters): - (KJS::otherThreadStackPointer): - -2008-06-05 Kevin McCullough - - Reviewed by Jon. - - - Name changes. - - * JavaScriptCore.exp: - * profiler/Profile.cpp: - (KJS::Profile::Profile): - (KJS::Profile::stopProfiling): - (KJS::Profile::didExecute): - (KJS::Profile::forEach): - (KJS::Profile::debugPrintData): - (KJS::Profile::debugPrintDataSampleStyle): - * profiler/Profile.h: - (KJS::Profile::callTree): - (KJS::Profile::totalTime): - (KJS::Profile::sortTotalTimeDescending): - (KJS::Profile::sortTotalTimeAscending): - (KJS::Profile::sortSelfTimeDescending): - (KJS::Profile::sortSelfTimeAscending): - (KJS::Profile::sortCallsDescending): - (KJS::Profile::sortCallsAscending): - (KJS::Profile::sortFunctionNameDescending): - (KJS::Profile::sortFunctionNameAscending): - (KJS::Profile::focus): - (KJS::Profile::exclude): - (KJS::Profile::restoreAll): - -2008-06-05 Geoffrey Garen - - Reviewed by Stephanie Lewis. - - Added the -fno-move-loop-invariants flag to the pcre_exec.cpp build, to - tell GCC not to perform loop invariant motion, since GCC's loop - invariant motion doesn't do very well with computed goto code. - - SunSpider reports no change. - -2008-06-05 Geoffrey Garen - - Reviewed by Stephanie Lewis. - - Added the -fno-tree-pre flag to the Machine.cpp build, to tell GCC not - to perform Partial Redundancy Elimination (PRE) on trees in Machine.cpp, - since GCC's PRE doesn't do very well with computed goto code. - - SunSpider reports a .7% speedup. - -2008-06-05 Geoffrey Garen - - Reviewed by Stephanie Lewis (or maybe the other way around). - - Minor change to PCRE to help out certain compilers. - - SunSpider reports no change, maybe a small speedup. - - * pcre/pcre_exec.cpp: - (match): Use instructionPtr++ a little less, to avoid confusing the - optimizer. - -2008-06-05 Alexey Proskuryakov - - Re-landing an independent part of a previously rolled out threading patch. - - * wtf/ThreadSpecific.h: Make sure to initialize POD thread-specific varaibles, too - (replaced "new T" with "new T()"). - -2008-06-05 Maciej Stachowiak - - Reviewed by Hyatt. - - - force inlining of a template function that only has one call site per specialization - 1.3% speedup on SunSpider - - * kjs/collector.cpp: - (KJS::Collector::heapAllocate): This template function is only - called from allocate() and allocateNumber() (once per - specialization) and the extra call overhead for GC allocation - shows up, so force inlining. - -2008-06-05 Maciej Stachowiak - - Reviewed by Alexey and Oliver. - - - remove profiler fetch hack - I measure an 0.5% progression from this, others show a wash. It seems not needed any more. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-06-05 Cameron Zwarich - - Reviewed by Maciej. - - Bug 19400: subscript operator does not protect base when necessary - - - Use a temporary for the base in BracketAccessorNode if the subscript - might possibly modify it. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::BracketAccessorNode::emitCode): - * kjs/nodes.h: - (KJS::BracketAccessorNode::): - -2008-06-04 Sam Weinig - - Reviewed by Maciej Stachowiak. - - Big cleanup of formatting and whitespace. - -2008-06-04 Cameron Zwarich - - Reviewed by Oliver. - - Add an option to dump statistics on executed instructions. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.cpp: - (KJS::OpcodeStats::~OpcodeStats): - (KJS::OpcodeStats::recordInstruction): - * VM/Opcode.h: - -2008-06-04 Kevin McCullough - - Reviewed by Geoff. - - JSProfiler: Remove the recursion limit in the - profiler. - - This patch removes the use of recursion for the sort functions. - - * JavaScriptCore.exp: Change the signatures of the functions being - exported. - * profiler/Profile.cpp: - (KJS::Profile::sort): This generic function will accept any of the - static sort functions and apply them to the whole tree. - * profiler/Profile.h: All of the sorting functions now call the new - sort() function. - (KJS::Profile::sortTotalTimeDescending): - (KJS::Profile::sortTotalTimeAscending): - (KJS::Profile::sortSelfTimeDescending): - (KJS::Profile::sortSelfTimeAscending): - (KJS::Profile::sortCallsDescending): - (KJS::Profile::sortCallsAscending): - (KJS::Profile::sortFunctionNameDescending): - (KJS::Profile::sortFunctionNameAscending): - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::ProfileNode): m_head used to point to the head node - if this was the head node. It now points to null to make iteration easy - (KJS::ProfileNode::willExecute): Now must check if m_head is null, this - check used to happend in the constructor. - (KJS::ProfileNode::stopProfiling): Again the check is slightly different - to determine if this is the head. - (KJS::ProfileNode::traverseNextNode): This function returns the next - node in post order. - (KJS::ProfileNode::sort): This generic function will sort according to - the comparator passed in, then reset the children pointers to macth the - new order. - * profiler/ProfileNode.h: The sorting function were removed from the - definition file and instead use the new generic sort() function - (KJS::ProfileNode::totalPercent): because the head can now be empty we - need to check here too for the head node. - (KJS::ProfileNode::selfPercent): Ditto - (KJS::ProfileNode::firstChild): This function is necessary for the - iterative algorithm in Profile.cpp. - (KJS::ProfileNode::sortTotalTimeDescending): - (KJS::ProfileNode::sortTotalTimeAscending): - (KJS::ProfileNode::sortSelfTimeDescending): - (KJS::ProfileNode::sortSelfTimeAscending): - (KJS::ProfileNode::sortCallsDescending): - (KJS::ProfileNode::sortCallsAscending): - (KJS::ProfileNode::sortFunctionNameDescending): - (KJS::ProfileNode::sortFunctionNameAscending): - (KJS::ProfileNode::childrenBegin): - (KJS::ProfileNode::childrenEnd): - (KJS::ProfileNode::totalTimeDescendingComparator): - (KJS::ProfileNode::totalTimeAscendingComparator): - (KJS::ProfileNode::selfTimeDescendingComparator): - (KJS::ProfileNode::selfTimeAscendingComparator): - (KJS::ProfileNode::callsDescendingComparator): - (KJS::ProfileNode::callsAscendingComparator): - (KJS::ProfileNode::functionNameDescendingComparator): - (KJS::ProfileNode::functionNameAscendingComparator): - -2008-06-04 Alexey Proskuryakov - - Reviewed by Darin. - - Fix JSClassCreate to work with old JSCore API threading model. - - No change on SunSpider. - - * API/JSClassRef.cpp: (OpaqueJSClass::OpaqueJSClass): Since JSClass is constructed without - a context, there is no way for it to create Identifiers. - Also, added initializeThreading(), just for good measure. - - * API/JSCallbackObjectFunctions.h: (KJS::::getPropertyNames): Make an Identifier out of the - string here, because propertyNames.add() needs that. - - * kjs/identifier.cpp: - * kjs/identifier.h: - (KJS::Identifier::equal): - * kjs/ustring.cpp: - (KJS::equal): - Moved equal() from identifier.h to ustring.h, because it's not really about Identifiers, - and to make it possible to use it from StrHash. - Include StrHash.h from ustring.h to avoid having the behavior depend on headers that happen - to be included. - - * wtf/StrHash.h: Removed. - * kjs/ustring.h: Made RefPtr use the same default hash as UString::Rep* (it - used to default to pointer equality). Moved the whole StrHash header into ustring.h. - - * JavaScriptCore.exp: Export equal() for WebCore use (this StrHash is used in c_class.cpp, - jni_class.cpp, and npruntime.cpp). - -2008-06-04 Alexey Proskuryakov - - Rubber-stamped by Darin. - - Fix spacing in collector.{h,cpp}. - - * kjs/collector.cpp: - * kjs/collector.h: - -2008-06-03 Cameron Zwarich - - Reviewed by Maciej. - - Build fix. The cleanup in r34355 missed a method. - - * kjs/nodes.cpp: - * kjs/nodes.h: - -2008-06-03 Darin Adler - - Reviewed by Geoff. - - - https://bugs.webkit.org/show_bug.cgi?id=19269 - speed up SunSpider by eliminating the toObject call for most get/put/delete - - Makes standalone SunSpider 1.025x as fast as before. - - The getOwnPropertySlot virtual function now takes care of the toObject call - for get. Similarly, the put function (and later deleteProperty) does the - same for those operations. To do this, the virtual functions were moved from - the JSObject class to the JSCell class. Also, since the caller no longer knows - the identity of the "original object", which is used by JavaScript-function - based getters, changed the PropertySlot class so the original object is - already stored in the slot when getOwnPropertySlot is called, if the caller - intends to call getValue. - - This affected the old interpreter code enough that the easiest thing for me - was to just delete it. While I am not certain the mysterious slowdown is not - still occurring, the net change is definitely a significant speedup. - - * JavaScriptCore.exp: Updated. - - * VM/Machine.cpp: Moved the UNLIKELY macro into AlwaysInline.h. - (KJS::resolve): Set up the originalObject in the PropertySlot before - calling getPropertySlot. Also removed the originalObject argument from - getValue. - (KJS::resolve_skip): Ditto. - (KJS::resolveBaseAndProperty): Ditto. - (KJS::resolveBaseAndFunc): Ditto. - (KJS::Machine::privateExecute): Removed the toObject calls from the get and - put functions where possible, instead calling directly with JSValue and letting - the JSValue and JSCell calls handle toObject. Same for toThisObject. - - * kjs/ExecState.h: Removed OldInterpreterExecState. - - * API/JSBase.cpp: Updated includes. - - * kjs/LocalStorageEntry.h: Removed contents. Later we can remove the file too. - - * kjs/array_instance.cpp: - (KJS::ArrayInstance::lengthGetter): Removed originalObject argumet. - (KJS::ArrayInstance::inlineGetOwnPropertySlot): Don't pass a base value to - setValueSlot. Also use UNLIKELY around the "getting elements past the end of - the array" code path; less common than successfully getting an element. - - * kjs/array_object.cpp: - (KJS::getProperty): Initialize the PropertySlot with the original object. - Don't pass the original object to the get function. - (KJS::arrayProtoFuncFilter): Ditto. - (KJS::arrayProtoFuncMap): Ditto. - (KJS::arrayProtoFuncEvery): Ditto. - (KJS::arrayProtoFuncForEach): Ditto. - (KJS::arrayProtoFuncSome): Ditto. - - * kjs/function_object.cpp: - (KJS::FunctionObjectImp::construct): Removed an obsolete comment. - - * kjs/grammar.y: Eliminated support for some of the node types that were - used to optimize executing from the syntax tree. - - * kjs/internal.cpp: - (KJS::StringImp::toThisObject): Added. Same as toObject. - (KJS::NumberImp::toThisObject): Ditto. - (KJS::GetterSetterImp::getOwnPropertySlot): Added. Not reached. - (KJS::GetterSetterImp::put): Ditto. - (KJS::GetterSetterImp::toThisObject): Ditto. - - * kjs/internal.h: Added toThisObject to NumberImp for speed. - - * kjs/lexer.cpp: - (KJS::Lexer::shift): Changed shift to just do a single character, to unroll - the loop and especially to make the one character case faster. - (KJS::Lexer::setCode): Call shift multiple times instead of passing a number. - (KJS::Lexer::lex): Ditto. - (KJS::Lexer::matchPunctuator): Ditto. Also removed unneeded elses after returns. - (KJS::Lexer::scanRegExp): Ditto. - * kjs/lexer.h: Removed the count argument from shift. - - * kjs/math_object.cpp: - (KJS::mathProtoFuncPow): Call jsNaN instead of jsNumber(NaN). - - * kjs/nodes.cpp: Removed some of the things needed only for the pre-SquirrelFish - execution model. - (KJS::ForNode::emitCode): Handle cases where some expressions are missing by - not emitting any code at all. The old way was to emit code for "true", but - this is an unnecessary remnant of the old way of doing things. - - * kjs/nodes.h: Removed some of the things needed only for the pre-SquirrelFish - execution model. - - * kjs/object.cpp: - (KJS::JSObject::fillGetterPropertySlot): Changed to only pass in the getter - function. The old code passed in a base, but it was never used when - actually getting the property; the toThisObject call was pointless. Also - changed to not pass a base for setUndefined. - - * kjs/object.h: Added the new JSCell operations to GetterSetterImp. - Never called. - (KJS::JSObject::get): Initialize the object in the PropertySlot and don't - pass it in getValue. - (KJS::JSObject::getOwnPropertySlotForWrite): Removed the base argument - in calls to setValueSlot. - (KJS::JSObject::getOwnPropertySlot): Ditto. - (KJS::JSValue::get): Added. Here because it calls through to JSObject. - A version of JSObject::get that also handles the other types of JSValue - by creating the appropriate wrapper. Saves the virtual call to toObject. - (KJS::JSValue::put): Ditto. - (KJS::JSValue::deleteProperty): Ditto. - - * kjs/property_slot.cpp: - (KJS::PropertySlot::undefinedGetter): Removed the originalObject argument. - (KJS::PropertySlot::ungettableGetter): Ditto. - (KJS::PropertySlot::functionGetter): Ditto. Use the value in the base - as the "this" object, which will be set to the original object by the new - PropertySlot initialization code. Also call toThisObject. The old code did - not do this, but needed to so we can properly handle the activation object - like the other similar code paths. - - * kjs/property_slot.h: - (KJS::PropertySlot::PropertySlot): Added a constructor that takes a base - object. In debug builds, set the base to 0 if you don't pass one. - (KJS::PropertySlot::getValue): Don't take or pass the originalObject. - (KJS::PropertySlot::setValueSlot): Don't take a base object, and clear the - base object in debug builds. - (KJS::PropertySlot::setGetterSlot): Ditto. - (KJS::PropertySlot::setUndefined): Ditto. - (KJS::PropertySlot::setUngettable): Ditto. - (KJS::PropertySlot::slotBase): Assert that a base object is present. - This will fire if someone actually calls the get function without having - passed in a base object and the getter needs it. - (KJS::PropertySlot::setBase): Added. Used by the code that implements - toObject so it can supply the original object after the fact. - (KJS::PropertySlot::clearBase): Added. Clears the base, but is debug-only - code because it's an error to fetch the base if you don't have a guarantee - it was set. - - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (KJS::JSCallbackObject::cachedValueGetter): - (KJS::JSCallbackObject::staticValueGetter): - (KJS::JSCallbackObject::staticFunctionGetter): - (KJS::JSCallbackObject::callbackGetter): - * kjs/JSActivation.cpp: - (KJS::JSActivation::getOwnPropertySlot): - (KJS::JSActivation::argumentsGetter): - * kjs/JSActivation.h: - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTableGet): - * kjs/array_instance.h: - * kjs/function.cpp: - (KJS::FunctionImp::argumentsGetter): - (KJS::FunctionImp::callerGetter): - (KJS::FunctionImp::lengthGetter): - (KJS::Arguments::mappedIndexGetter): - * kjs/function.h: - * kjs/lookup.h: - (KJS::staticFunctionGetter): - (KJS::staticValueGetter): - * kjs/string_object.cpp: - (KJS::StringInstance::lengthGetter): - (KJS::StringInstance::indexGetter): - (KJS::stringInstanceNumericPropertyGetter): - * kjs/string_object.h: - Removed originalObject arguments from getters. Don't pass base values to - the various PropertySlot functions that no longer take them. - - * kjs/value.cpp: - (KJS::JSCell::getOwnPropertySlot): Added. Calls toObject and then sets the slot. - This function has to always return true, because the caller can't walk the prototype - chain. Because of that, we do a getPropertySlot, not getOwnPropertySlot, which works - for the caller. This is private, only called by getOwnPropertySlotInternal. - (KJS::JSCell::put): Added. Calls toObject and then put. - (KJS::JSCell::toThisObject): Added. Calls toObject. - - * kjs/value.h: Added get, put, and toThisObject to both JSValue - and JSCell. These take care of the toObject operation without an additional virtual - function call, and so make the common "already an object" case faster. - - * wtf/AlwaysInline.h: Moved the UNLIKELY macro here for now. Maybe we can find a - better place later, or rename this header. - -2008-06-03 Oliver Hunt - - Reviewed by Tim. - - Bug 12983: Web Inspector break on the debugger keyword - - - Added a DebuggerStatementNode to handle codegen, and added a new - DidReachBreakPoint debug event (which will hopefully be useful - if we ever move breakpoint management into JSC proper). Also - added didReachBreakpoint to Debugger to allow us to actually respond - to this event. - - * VM/CodeBlock.cpp: - (KJS::debugHookName): - * VM/Machine.cpp: - (KJS::Machine::debug): - * VM/Machine.h: - * kjs/debugger.h: - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::DebuggerStatementNode::emitCode): - (KJS::DebuggerStatementNode::execute): - * kjs/nodes.h: - (KJS::DebuggerStatementNode::): - * kjs/nodes2string.cpp: - (KJS::DebuggerStatementNode::streamTo): - -2008-06-03 Maciej Stachowiak - - Reviewed by Oliver. - - - document remaining opcodes. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Document call, call_eval, - construct, ret and end opcodes. - -2008-06-03 Maciej Stachowiak - - Reviewed by Oliver. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Document throw and catch opcodes. - -2008-06-02 Geoffrey Garen - - Reviewed by Alexey Proskuryakov. - - Removed JSObject::call, since it just called JSObject::callAsFunction. - - SunSpider reports no change. - -2008-06-02 Geoffrey Garen - - Reviewed by Darin Adler. - - A little cleanup in the CodeGenerator. - - * VM/CodeGenerator.cpp: A few changes here. - - (1) Removed remaining cases of the old hack of putting "this" into the - symbol table; replaced with explicit tracking of m_thisRegister. - - (2) Made m_thisRegister behave the same for function, eval, and program - code, removing the static programCodeThis() function. - - (3) Added a feature to nix a ScopeNode's declaration stacks when done - compiling, to save memory. - - (4) Removed code that copied eval declarations into special vectors: we - just use the originals in the ScopeNode now. - - * VM/CodeGenerator.h: Removed unneded parameters from the CodeGenerator - constructor: we just use get that data from the ScopeNode now. - - * VM/Machine.cpp: - (KJS::Machine::execute): When executing an eval node, don't iterate a - special copy of its declarations; iterate the originals, instead. - - * kjs/nodes.cpp: Moved responsibility for knowing what AST data to throw - away into the CodeGenerator. Nodes no longer call shrinkCapacity on - their data directly. - - * kjs/nodes.h: Changed FunctionStack to ref its contents, so declaration - data stays around even after we've thrown away the AST, unless we explicitly - throw away the declaration data, too. This is useful for eval code, which - needs to reference its declaration data at execution time. (Soon, it will - be useful for program code, too, since program code should do the same.) - -2008-06-02 Adam Roben - - Build fix for non-AllInOne builds - - * kjs/array_object.cpp: Added a missing #include. - -2008-06-02 Kevin McCullough - - Took out accidental confilct lines I checked in. - - * ChangeLog: - -2008-06-02 Kevin McCullough - - Reviewed by Darin. - - JSProfiler: Remove the recursion limit in the - profiler - Implement Next Sibling pointers as groundwork for removing the recursion - limit in the profiler. - - * profiler/ProfileNode.cpp: Also I renamed parentNode and headNode since - 'node' is redundant. - (KJS::ProfileNode::ProfileNode): Initialize the nextSibling. - (KJS::ProfileNode::willExecute): If there are already children then the - new child needs to be the nextSibling of the last child. - (KJS::ProfileNode::didExecute): - (KJS::ProfileNode::addChild): Ditto. - (KJS::ProfileNode::stopProfiling): - (KJS::ProfileNode::sortTotalTimeDescending): For all of the sorting - algorithms once the children are sorted their nextSibling pointers need - to be reset to reflect the new order. - (KJS::ProfileNode::sortTotalTimeAscending): - (KJS::ProfileNode::sortSelfTimeDescending): - (KJS::ProfileNode::sortSelfTimeAscending): - (KJS::ProfileNode::sortCallsDescending): - (KJS::ProfileNode::sortCallsAscending): - (KJS::ProfileNode::sortFunctionNameDescending): - (KJS::ProfileNode::sortFunctionNameAscending): - (KJS::ProfileNode::resetChildrensSiblings): This new function simply - loops over all of the children and sets their nextSibling pointers to - the next child in the Vector - (KJS::ProfileNode::debugPrintData): - * profiler/ProfileNode.h: - (KJS::ProfileNode::parent): - (KJS::ProfileNode::setParent): - (KJS::ProfileNode::nextSibling): - (KJS::ProfileNode::setNextSibling): - (KJS::ProfileNode::totalPercent): - (KJS::ProfileNode::selfPercent): - -2008-06-02 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Removed the recursion limit from JSObject::call, since the VM does - recursion checking now. - - This should allow us to remove JSObject::call entirely, netting a small - speedup. - - * kjs/object.cpp: - (KJS::JSObject::call): - -2008-06-02 Geoffrey Garen - - Reviewed by Adele Peterson. - - Added a specific affordance for avoiding stack overflow when converting - recursive arrays to string, in preparation for removing generic stack - overflow checking from JSObject::call. - - Tested by fast/js/toString-stack-overflow.html. - -2008-06-02 Geoffrey Garen - - Reviewed by Alice Liu. - - Refactored some hand-rolled code to call ScopeChain::globalObject instead. - -2008-06-02 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed ASSERT due to execution continuing after an exception is thrown - during array sort. - - * kjs/array_instance.cpp: - (KJS::AVLTreeAbstractorForArrayCompare::compare_key_key): Don't call the - custom comparator function if an exception has been thrown. Just return - 1 for everything, so the sort completes quickly. (The result will be - thrown away.) - -2008-05-30 Timothy Hatcher - - Made the starting line number of scripts be 1-based throughout the engine. - This cleans up script line numbers so they are all consistent now and fixes - some cases where script execution was shown as off by one line in the debugger. - - No change in SunSpider. - - Reviewed by Oliver Hunt. - - * API/minidom.c: - (main): Pass a line number of 1 instead of 0 to parser().parse(). - * API/testapi.c: - (main): Ditto. And removes a FIXME and changed an assertEqualsAsNumber - to use 1 instead of 2 for the line number. - * VM/Machine.cpp: - (KJS::callEval): Pass a line number of 1 instead of 0. - (KJS::Machine::debug): Use firstLine for WillExecuteProgram instead of - lastLine. Use lastLine for DidExecuteProgram instead of firstLine. - * kjs/DebuggerCallFrame.cpp: - (KJS::DebuggerCallFrame::evaluate): Pass a line number of 1 instead of - 0 to parser().parse(). - * kjs/Parser.cpp: - (KJS::Parser::parse): ASSERT startingLineNumber is greatter than 0. Change - the startingLineNumber to be 1 if it was less than or equal to 0. This is needed - for release builds to maintain compatibility with the JavaScriptCore API. - * kjs/function.cpp: - (KJS::globalFuncEval): Pass a line number of 1 instead of 0 to parser().parse(). - * kjs/function_object.cpp: - (FunctionObjectImp::construct): Pass a line number of 1 instead of 0 to construct(). - * kjs/lexer.cpp: - (Lexer::setCode): Made yylineno = startingLineNumber instead of adding 1. - * kjs/testkjs.cpp: - (functionRun): Pass a line number of 1 instead of 0 to Interpreter::evaluate(). - (functionLoad): Ditto. - (prettyPrintScript): Ditto. - (runWithScripts): Ditto. - * profiler/Profiler.cpp: - (WebCore::createCallIdentifier): Removed a plus 1 of startingLineNumber. - -2008-05-30 Alexey Proskuryakov - - Reviewed by Darin. - - https://bugs.webkit.org/show_bug.cgi?id=19180 - speed up SunSpider by optimizing immediate number cases - - Also fixed a JavaScriptCore regression seen on PowerPC - we didn't clip left shift - parameter to 0...31. - - 0.5% improvement on SunSpider overall, although a 8.5 regression on bitops-3bit-bits-in-byte. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - - * kjs/JSImmediate.h: - (KJS::JSImmediate::toTruncatedUInt32): Added. Same as getTruncatedInt32, but casts the result - to unsigned. - -2008-05-30 Alexey Proskuryakov - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=19180 - speed up SunSpider by optimizing immediate number cases - - Also fixed two JavaScriptCore regressions seen on PowerPC - we didn't clip right shift - parameter to 0...31. - - 1.6% improvement on SunSpider, without significant regressions on any tests. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - Added fast paths for >>, ==, ===, !=, !==. Changed order of memory accesses in many - cases, making them less dependent on gcc's ability to properly assign registers. With this, - I could move exception checks back into slow code paths, and saw less randomness in general. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::rightShiftImmediateNumbers): - Added. - -2008-05-29 Maciej Stachowiak - - Reviewed by Oliver. - - - fixed REGRESSION(r33979): Flash clips do not play on cnn.com - - Finally blocks could clobber registers that had to remain live - until they returned. This patch takes a conservative approach and - makes sure that finally blocks do not reuse any registers that - were previously allocated for the function. In the future this - could probably be tightened up to be less profligate with the - register allocation. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::highestUsedRegister): - * VM/CodeGenerator.h: - * kjs/nodes.cpp: - (KJS::TryNode::emitCode): - -2008-05-29 Steve Falkenburg - - Build fix. - - * kjs/array_instance.cpp: - -2008-05-29 Alexey Proskuryakov - - Reviewed by Darin. - - https://bugs.webkit.org/show_bug.cgi?id=19294 - A crash when iterating over a sparse array backwards. - - * kjs/array_instance.cpp: Turned sparseArrayCutoff into a macro, so that using max() on it - doesn't cause a PIC branch. - (KJS::ArrayInstance::increaseVectorLength): Added a comment about this function not - preserving class invariants. - (KJS::ArrayInstance::put): Update m_storage after reallocation. Move values that fit to - the vector from the map in all code paths. - -2008-05-29 Thiago Macieira - - Reviewed by Simon. - - Fix compilation in Solaris with Sun CC - - Lots of WebKit code uses C99 functions that, strict as it - is, the Solaris system doesn't provide in C++. So we must define them - for both GCC and the Sun CC. - - * wtf/MathExtras.h: - -2008-05-28 Oliver Hunt - - Reviewed by Anders. - - Fix codegen for assignment being used as a function. - - FunctionCallValueNode::emitCode failed to account for the - potential of the function expression to allocate arbitrary - registers. - - * kjs/nodes.cpp: - (KJS::FunctionCallValueNode::emitCode): - -2008-05-27 Geoffrey Garen - - Reviewed by Tim Hatcher. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=19183 - REGRESSION (r33979): Crash in DebuggerCallFrame::functionName when - clicking button in returnEvent-crash.html - - Added two new debugger hooks, willExecuteProgram and didExecuteProgram, - along with code to generate them, code to invoke them when unwinding - due to an exception, and code to dump them. - - SunSpider reports no change. - - * VM/CodeBlock.cpp: - (KJS::debugHookName): I had to mark this function NEVER_INLINE to avoid - a .4% performance regression. The mind boggles. - -2008-05-28 Adam Roben - - Fix JavaScriptCore tests on OS X - - We were quoting the path to testkjs too late, after it had already - been combined with spaces and other options. - - * tests/mozilla/jsDriver.pl: - (top level): Move path quoting from here... - (sub get_kjs_engine_command): ...to here. - -2008-05-28 Anders Carlsson - - Reviewed by Oliver. - - "const f" crashes in JavaScriptCore - - Make sure to null check the initializer. - - * kjs/nodes.cpp: - (KJS::ConstDeclNode::emitCodeSingle): - -2008-05-28 Adam Roben - - Make run-javascriptcore-tests work with a space in the path to testkjs - - Reviewed by Alexey Proskuryakov. - - * tests/mozilla/jsDriver.pl: Quote the path to the engine so that - spaces will be interpreted correctly. - -2008-05-28 Alexey Proskuryakov - - Fixed a misguiding comment - my measurement for negative numbers only included cases - where both operands were negative, which is not very interesting. - - * VM/Machine.cpp: - -2008-05-28 Alexey Proskuryakov - - Reviewed by Maciej. - - Based on a patch by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=19180 - speed up SunSpider by optimizing immediate number cases - - 1.4% speedup on SunSpider. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/JSImmediate.h: - (KJS::JSImmediate::incImmediateNumber): - (KJS::JSImmediate::decImmediateNumber): - Added fast paths for ++ and --. - - (KJS::JSImmediate::canDoFastAdditiveOperations): Corrected a comment. - -2008-05-28 Alexey Proskuryakov - - Reviewed by Darin. - - https://bugs.webkit.org/show_bug.cgi?id=19180 - speed up SunSpider by optimizing immediate number cases - - 2% speedup overall, maximum 10% on controlflow-recursive and bitops-3bit-bits-in-byte, - but a 4% regression on bitops-bits-in-byte and bitops-bitwise-and. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::canDoFastAdditiveOperations): - (KJS::JSImmediate::addImmediateNumbers): - (KJS::JSImmediate::subImmediateNumbers): - Added fast cases that work with positive values less than 2^30. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Use the above operations. Also updated SunSpider frequencies - with my results (looks like tag values have changed, not sure what caused the minor variation - in actual frequencies). - -2008-05-27 Adam Roben - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - Remove code that appended Cygwin's /bin directory to PATH. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - Prepend Cygwin's /bin directory to PATH. We prepend instead of append - so that Cygwin's utilities will win out over Win32 versions of the - same utilities (particularly perl). We do the prepend here instead of - in the Makefile because nmake doesn't seem to like prepending to PATH - inside the Makefile. This also matches the way WebCoreGenerated works. - -2008-05-27 Adam Roben - - Roll out r34163 - - A better fix is on the way. - - * DerivedSources.make: - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: - -2008-05-27 Adam Roben - - Windows build fix - - * DerivedSources.make: Don't generate the bytecode docs if - OMIT_BYTECODE_DOCS is set to 1. - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Set - OMIT_BYTECODE_DOCS for production builds. - -2008-05-27 Anders Carlsson - - Reviewed by Geoff and Maciej. - - - https://bugs.webkit.org/show_bug.cgi?id=17925 - Crash in KJS::JSObject::put after setting this.__proto__ - - Set slotIsWriteable to false for __proto__, we want setting __proto__ to go through JSObject::put instead. - - * kjs/object.h: - (KJS::JSObject::getOwnPropertySlotForWrite): - -2008-05-27 Kevin Ollivier - - wx build fixes to catch up with SquirrelFish, etc. - - * JavaScriptCoreSources.bkl: - * jscore.bkl: - * wtf/Platform.h: - -2008-05-27 Darin Adler - - Reviewed by Tim Hatcher. - - - https://bugs.webkit.org/show_bug.cgi?id=19180 - speed up SunSpider by optimizing immediate number cases - - Add immediate number cases for the &, |, and ^ operators. - Makes standalone SunSpider 1.010x faster. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Add areBothImmediateNumbers special cases - for the &, |, and ^ operators. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::xorImmediateNumbers): Added. - (KJS::JSImmediate::orImmediateNumbers): Added. - -2008-05-26 Stephanie Lewis - - Windows build fix. - - * kjs/testkjs.cpp: - -2008-05-26 Maciej Stachowiak - - Reviewed by Anders. - - - make addStaticGlobals protected instead of private so subclasses can use it - - * JavaScriptCore.exp: - * kjs/JSGlobalObject.h: - -2008-05-26 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed After an eval of a non-string or a syntax - error, all profile stack frames are incorrect - - SunSpider reports a .3% speedup, possibly because eval of a string is a - little more efficient now. - - * VM/Machine.cpp: - (KJS::callEval): Make sure to call didExecute when returning early. I - simplified this function to remove one early return, making the job - of adding special code to early returns easier. - - (KJS::Machine::execute): Use the new function ExecState when notifying - the profiler. (This doesn't change behavior now, but it might prevent - subtle errors in the future.) - -2008-05-23 Tor Arne Vestbø - - Reviewed by Simon. - - Fixed toLower and toUpper implementations to allow being called - with a null result pointer and resultLength, to determine the - number of characters needed for the case conversion. - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - -2008-05-25 Alexey Proskuryakov - - Fixing a typo in the previous commit made as a last minute change. - - * kjs/regexp_object.cpp: - -2008-05-24 Alexey Proskuryakov - - Reviewed by Darin. - - Changed regular expression matching result array to be lazily filled, because many callers - only care about it being non-null. - - 2% improvement on Acid3 test 26. - - * kjs/array_instance.cpp: Added a void* member to ArrayStorage for ArrayInstance subclasses - to use. - * kjs/array_instance.h: - (KJS::ArrayInstance::lazyCreationData): - (KJS::ArrayInstance::setLazyCreationData): - Added methods to access it from subclasses. - - * kjs/regexp_object.cpp: - (KJS::RegExpMatchesArray::RegExpMatchesArray): - (KJS::RegExpMatchesArray::getOwnPropertySlot): - (KJS::RegExpMatchesArray::put): - (KJS::RegExpMatchesArray::deleteProperty): - (KJS::RegExpMatchesArray::getPropertyNames): - (KJS::RegExpMatchesArray::fillArrayInstanceIfNeeded): - (KJS::RegExpMatchesArray::~RegExpMatchesArray): - (KJS::RegExpObjectImp::arrayOfMatches): - RegExpMatchesArray is a subclass of ArrayInstance that isn't filled until - accessed for the first time. - -2008-05-24 Alp Toker - - Win32/gcc build fix. Remove MSVC assumption. - - * wtf/TCSpinLock.h: - (TCMalloc_SlowLock): - -2008-05-24 Oleg Finkelshteyn - - Rubber-stamped, tweaked and landed by Alexey. - - Build fix for gcc 4.3. - - * JavaScriptCore/kjs/testkjs.cpp: - * JavaScriptCore/VM/CodeBlock.cpp: - Add missing standard includes. - -2008-05-23 Anders Carlsson - - Reviewed by Geoff. - - REGRESSION: Assertion failure in JSImmediate::toString when loading GMail (19217) - - Change List to store a JSValue*** pointer + an offset instead of a JSValue** pointer to protect against the case where - a register file changes while a list object points to its buffer. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/JSActivation.cpp: - (KJS::JSActivation::createArgumentsObject): - * kjs/list.cpp: - (KJS::List::getSlice): - * kjs/list.h: - (KJS::List::List): - (KJS::List::at): - (KJS::List::append): - (KJS::List::begin): - (KJS::List::end): - (KJS::List::buffer): - -2008-05-23 Kevin McCullough - - Reviewed by Sam. - - JSProfiler: Stack overflow if recursion is - too deep. - -Use a simple depth limit to restrict too deep of recursion. - - * profiler/Profile.cpp: - (KJS::Profile::willExecute): - (KJS::Profile::didExecute): - * profiler/Profile.h: - -2008-05-23 Geoffrey Garen - - Rolling back in r34085, with performance resolved. - - Apparently, passing the eval function to callEval gave GCC a hernia. - - Reviewed by Darin Adler, Kevin McCullough, and Oliver Hunt. - - Fixed Crashes and incorrect reporting in the - JavaScript profiler - - * VM/Machine.cpp: - (KJS::Machine::unwindCallFrame): Fixed incorrect reporting / a crash - when unwinding from inside eval and/or program code: detect the - difference, and do the right thing. Also, be sure to notify the profiler - *before* deref'ing the scope chain, since the profiler uses the scope chain. - - (KJS::Machine::execute): Fixed incorrect reporting / crash when calling - a JS function re-entrently: Machine::execute(FunctionBodyNode*...) - should not invoke the didExecute hook, because op_ret already does that. - Also, use the new function's ExecState when calling out to the profiler. - (Not important now, but could have become a subtle bug later.) - - (KJS::Machine::privateExecute): Fixed a hard to reproduce crash when - profiling JS functions: notify the profiler *before* deref'ing the scope - chain, since the profiler uses the scope chain. - - * kjs/object.cpp: - (KJS::JSObject::call): Removed these hooks, because they are now unnecessary. - - * profiler/Profile.cpp: Added a comment to explain a subtlety that only - Kevin and I understood previously. (Now, the whole world can understand!) - - * profiler/Profiler.cpp: - (KJS::shouldExcludeFunction): Don't exclude .call and .apply. That was - a hack to fix bugs that no longer exist. - - Finally, sped things up a little bit by changing the "Is the profiler - running?" check into an ASSERT, since we only call into the profiler - when it's running: - - (KJS::Profiler::willExecute): - (KJS::Profiler::didExecute): - -2008-05-23 Geoffrey Garen - - Reviewed by Oliver Hunt. - - - fixed REGRESSION(r33943-r33980): Can't send email , attach file or save as draft from hotmail.com - - SunSpider reports no change. - - This is a reworking of r34073, which I rolled out because it caused - lots of crashes. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): Use removeDirect to nix old - properties whose names collide with new functions. (Don't use putWithAttributes - because that tries to write to the register file, which hasn't grown to - fit this program yet.) - -2008-05-23 Darin Adler - - Reviewed by Mark Rowe. - - As allocateNumber is used via jsNumberCell outside of JavaScriptCore, - we need to provide a non-inlined version of it to avoid creating a - weak external symbol. - - * JavaScriptCore.exp: - * kjs/AllInOneFile.cpp: - * kjs/collector.cpp: - (KJS::Collector::allocate): - (KJS::Collector::allocateNumber): - * kjs/collector.h: - (KJS::Collector::allocate): - (KJS::Collector::inlineAllocateNumber): - * kjs/value.h: - (KJS::NumberImp::operator new): - -2008-05-23 Geoffrey Garen - - Rolled out r34073 because it caused lots of layout test crashes. - -2008-05-23 Geoffrey Garen - - Rolled out r34085 because it measured as a 7.6% performance regression. - -2008-05-23 Adam Roben - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add the - profiler directory to the include path. - -2008-05-23 Oliver Hunt - - Reviewed by Anders. - - SQUIRRELFISH: JavaScript error messages are missing informative text - - Partial fix. - Tidy up error messages, makes a couple of them provide slightly more info. - Inexplicably leads to a 1% SunSpider Progression. - - * VM/ExceptionHelpers.cpp: - (KJS::createError): - (KJS::createInvalidParamError): - (KJS::createNotAConstructorError): - (KJS::createNotAFunctionError): - * VM/ExceptionHelpers.h: - * VM/Machine.cpp: - (KJS::isNotObject): - -2008-05-23 Oliver Hunt - - Reviewed by Tim H. - - Fix call stack reported by profiler when entering event handlers. - - JSObject::call was arbitrarily notifying the profiler when it was - called, even if it was JS code, which notifies the profile on entry - in any case. - - * kjs/object.cpp: - (KJS::JSObject::call): - -2008-05-16 Alp Toker - - Build fix for gcc 3. Default constructor required in ExecState, - used by OldInterpreterExecState. - - * kjs/ExecState.h: - (KJS::ExecState::ExecState): - -2008-05-23 Mark Rowe - - Reviewed by Oliver Hunt. - - Fix global-recursion-on-full-stack.html crashes under guardmalloc. - - Growing the register file with uncheckedGrow from within Machine::execute is not safe as the - register file may be too close to its maximum size to grow successfully. By using grow, - checking the result and throwing a stack overflow error we can avoid crashing. - - * VM/Machine.cpp: - (KJS::Machine::execute): - * VM/RegisterFile.h: Remove the now-unused uncheckedGrow. - -2008-05-23 Oliver Hunt - - RS=Kevin McCullough - - Remove JAVASCRIPT_PROFILER define - - * VM/Machine.cpp: - (KJS::callEval): - (KJS::Machine::unwindCallFrame): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * kjs/config.h: - * kjs/object.cpp: - (KJS::JSObject::call): - -2008-05-23 Oliver Hunt - - Turn on JavaScript Profiler - - Reviewed by Kevin McCullough. - - Flipped the switch on the profiler, rearranged how we - signal the the profiler is active so that calls aren't - needed in the general case. - - Also fixed the entry point for Machine::execute(FunctionBodyNode..) - to correctly indicate function exit. - - Results in a 0.7-1.0% regression in SunSpider :-( - - * VM/Machine.cpp: - (KJS::callEval): - (KJS::Machine::unwindCallFrame): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * kjs/config.h: - * profiler/Profiler.cpp: - (KJS::Profiler::profiler): - (KJS::Profiler::startProfiling): - (KJS::Profiler::stopProfiling): - * profiler/Profiler.h: - (KJS::Profiler::enabledProfilerReference): - -2008-05-23 Simon Hausmann - - Fix the Qt build by adding profiler/ to the include search path. - - * JavaScriptCore.pri: - -2008-05-22 Kevin McCullough - - Reviewed by Adam. - - Fix a bug in the profiler where time in the current function is given to - (idle). - - * profiler/Profile.cpp: - (KJS::Profile::didExecute): Set the start time and then call didExecute - to calculate the time spent in this function. - * profiler/ProfileNode.cpp: Remove confusing calculations that are no - longer necessary. - (KJS::ProfileNode::insertNode): - * profiler/ProfileNode.h: Expose access to the start time to allow the - simpler time calculations above. - (KJS::ProfileNode::startTime): - (KJS::ProfileNode::setStartTime): - -2008-05-22 Adam Roben - - Show "(Function object)" instead of "(JSInpectorCallbackWrapper - object)" in profiles - - Reviewed by Kevin McCullough. - - * profiler/Profiler.cpp: - (KJS::createCallIdentifier): Use JSObject::className instead of - getting the class name from the ClassInfo directly. JSObject - subclasses can override className to provide a custom class name, and - it seems like we should honor that. - -2008-05-22 Timothy Hatcher - - Added Profile::restoreAll and added ProfileNode::restoreAll - to the export file. - - Reviewed by Adam Roben. - - * JavaScriptCore.exp: - * profiler/Profile.h: - -2008-05-22 Alp Toker - - GTK+ build fix. Add JavaScriptCore/profiler to include path. - - * GNUmakefile.am: - -2008-05-22 Adam Roben - - Implement sub-millisecond profiling on Windows - - Reviewed by Kevin McCullough. - - * profiler/ProfileNode.cpp: - (KJS::getCount): Added. On Windows, we use QueryPerformanceCounter. On - other platforms, we use getCurrentUTCTimeWithMicroseconds. - (KJS::ProfileNode::endAndRecordCall): Use getCount instead of - getCurrentUTCTimeWithMicroseconds. - (KJS::ProfileNode::startTimer): Ditto. - -2008-05-22 Adam Roben - - Fix a profiler assertion when calling a NodeList as a function - - Reviewed by Kevin McCullough. - - * profiler/Profiler.cpp: - (KJS::createCallIdentifier): Don't assert when a non-function object - is called as a function. Instead, build up a CallIdentifier using the - object's class name. - -2008-05-22 Kevin McCullough - - Reviewed by Darin. - - JSProfiler: Allow the profiler to "Exclude" a - profile node. - -Implement 'exclude'; where the excluded node attributes its time to its - parent's self time. - - * JavaScriptCore.exp: Export the exclude function. - * profiler/Profile.h: - (KJS::Profile::exclude): - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::setTreeVisible): New function that allows a change in - visiblitiy to be propogated to all the children of a node. - (KJS::ProfileNode::exclude): If the node matches the callIdentifier then - set the visiblity of this node and all of its children to false and - attribute it's total time to it's caller's self time. - * profiler/ProfileNode.h: - -2008-05-22 Mark Rowe - - Reviewed by Oliver Hunt. - - Fix access to static global variables in Windows release builds. - - * kjs/JSGlobalObject.h: Don't store a reference to an Identifier - in GlobalPropertyInfo as the Identifier is likely to be a temporary - and therefore may be destroyed before the GlobalPropertyInfo. - -2008-05-22 Kevin McCullough - - Build fix. - - * VM/Machine.cpp: - (KJS::callEval): - -2008-05-22 Kevin McCullough - - Reviewed by Sam. - - Turn on JavaScript Profiler - Get basic JS profiling working. - Even with this patch the profiler will not be compiled in because we do - not know the extend, if any, of the performance regression it would cause - when it is not in use. However with these changes, if the profiler were - on, it would not crash and show good profiling data. - - * VM/Machine.cpp: Instrument the calls sites that are needed for profiling. - (KJS::callEval): - (KJS::Machine::unwindCallFrame): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * kjs/function.cpp: Ditto. - (KJS::globalFuncEval): - * kjs/interpreter.cpp: Ditto. - (KJS::Interpreter::evaluate): - * profiler/Profile.cpp: - (KJS::Profile::willExecute): - (KJS::Profile::didExecute): Because we do not get a good context when - startProfiling is called it is possible that m_currentNode will be at the - top of the known stack when a didExecute() is called. What we then do is - create a new node that represents the function being exited and insert - it between the head and the currently known children, since they should - be children of this new node. - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::ProfileNode): - (KJS::ProfileNode::willExecute): Rename the add function for consistency. - (KJS::ProfileNode::addChild): Appends the child to this node but also - sets the parent pointer of the children to this node. - (KJS::ProfileNode::insertNode): Insert a node between this node and its - children. Also set the time for the new node since it is now exiting - and we don't really know when it started. - (KJS::ProfileNode::stopProfiling): - (KJS::ProfileNode::startTimer): - * profiler/ProfileNode.h: - (KJS::CallIdentifier::toString): Added for debugging. - (KJS::ProfileNode::setParent): - (KJS::ProfileNode::setSelfTime): Fixed an old bug where we set the - visibleTotalTime not the visibleSelfTime. - (KJS::ProfileNode::children): - (KJS::ProfileNode::toString): Added for debugging. - * profiler/Profiler.cpp: remove unecessary calls. - (KJS::Profiler::startProfiling): - -2008-05-22 Sam Weinig - - Reviewed by Oliver Hunt. - - Rename register arguments for op_call, op_call_eval, op_end, and op_construct - to document what they are for. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitCall): - (KJS::CodeGenerator::emitCallEval): - (KJS::CodeGenerator::emitEnd): - (KJS::CodeGenerator::emitConstruct): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-05-22 Oliver Hunt - - Reviewed by Darin. - - Bug 19116: SquirrelFish shouldn't regress on variable lookups - - - Last of the multiscope look up optimisations. This is a wash overall on SunSpider - but is a factor of 5-10 improvement in multiscope read/write/modify (eg. ++, --, +=, - ... applied to any non-local var). - - * kjs/nodes.cpp: - (KJS::PostIncResolveNode::emitCode): - (KJS::PostDecResolveNode::emitCode): - (KJS::PreIncResolveNode::emitCode): - (KJS::PreDecResolveNode::emitCode): - (KJS::ReadModifyResolveNode::emitCode): - -2008-05-22 David Kilzer - - Add method to release free memory from FastMalloc - - Patch suggested by Mark Rowe. Rubber-stamped by Maciej. - - * JavaScriptCore.exp: Export _releaseFastMallocFreeMemory. - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::): Added releaseFastMallocFreeMemory() for both - system malloc and FastMalloc code paths. - * wtf/FastMalloc.h: Define releaseFastMallocFreeMemory(). - -2008-05-22 Oliver Hunt - - RS=Maciej. - - Roll out r34020 as it causes recursion tests to fail. - - * kjs/object.cpp: - (KJS::JSObject::call): - -2008-05-22 Oliver Hunt - - Reviewed by Mark. - - Don't leak the SymbolTable when compiling eval code. - - * kjs/nodes.cpp: - (KJS::EvalNode::generateCode): - -2008-05-22 Simon Hausmann - - Reviewed by Oliver. - - Qt build fix. - - * JavaScriptCore.pri: Added DebuggerCallFrame to the build. - * VM/LabelID.h: Include limits.h for UINT_MAX. - * wtf/VectorTraits.h: Include memory for std::auto_ptr. - -2008-05-22 Geoffrey Garen - - Reviewed by Adam Roben. - - Removed the old recursion guard mechanism, since squirrelfish has its - own mechanism. Also removed some old JS call tracing code, since we - have other ways to do that, too. - - SunSpider reports no change. - - * kjs/object.cpp: - (KJS::JSObject::call): - -2008-05-22 Maciej Stachowiak - - Reviewed by Oliver. - - - fixed crash on celtic kane JS benchmark - - * kjs/nodes.cpp: - (KJS::WithNode::emitCode): - (KJS::TryNode::emitCode): - -2008-05-21 Kevin McCullough - - Reviewed by Maciej and Geoff. - - Turn on JavaScript Profiler - -As part of the effort to turn on the profiler it would be helpful if it - did not need ExecStates to represent the stack location of the currently - executing statement. - -We now create each node as necessary with a reference to the current - node and each node knows its parent so that the tree can be made without - the entire stack. - - * profiler/Profile.cpp: - (KJS::Profile::Profile): The current node starts at the head. - (KJS::Profile::stopProfiling): The current node is cleared when profiling - stops. - (KJS::Profile::willExecute): The current node either adds a new child or - starts and returns a reference to an already existing child if the call - ID that is requested already exists. - (KJS::Profile::didExecute): The current node finishes and returns its - parent. - * profiler/Profile.h: Use a single callIdentifier instead of a vector - since we no longer use the whole stack. - * profiler/ProfileNode.cpp: Now profile nodes keep a reference to their - parent. - (KJS::ProfileNode::ProfileNode): Initialize the parent. - (KJS::ProfileNode::didExecute): Record the time and return the parent. - (KJS::ProfileNode::addOrStartChild): If the given callIdentifier is - already a child, start it and return it, otherwise create a new one and - return that. - (KJS::ProfileNode::stopProfiling): Same logic, just use the new function. - * profiler/ProfileNode.h: Utilize the parent. - (KJS::ProfileNode::create): - (KJS::ProfileNode::parent): - * profiler/Profiler.cpp: - (KJS::Profiler::startProfiling): Here is the only place where the - ExecState is used to figure out where in the stack the profiler is - currently profiling. - (KJS::dispatchFunctionToProfiles): Only send one CallIdentifier instead - of a vector of them. - (KJS::Profiler::willExecute): Ditto. - (KJS::Profiler::didExecute): Ditto. - (KJS::createCallIdentifier): Create only one CallIdentifier. - (KJS::createCallIdentifierFromFunctionImp): Ditto. - * profiler/Profiler.h: - -2008-05-21 Darin Adler - - Reviewed by Maciej. - - - https://bugs.webkit.org/show_bug.cgi?id=19180 - speed up the < operator for the case when both values are integers - - Makes standalone SunSpider 1.022x faster. - - * VM/Machine.cpp: - (KJS::jsLess): Add a special case for when both are numbers that fit in a JSImmediate. - -2008-05-21 Maciej Stachowiak - - Reviewed by Oliver and Sam. - - - fixed REGRESSION (r31239): Multiscope optimisation of function calls results in incorrect this value (breaks tvtv.de) - - Track global this value in the scope chain so we can retrieve it - efficiently but it follows lexical scope properly. - - * kjs/ExecState.h: - (KJS::ExecState::globalThisValue): - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - * kjs/function_object.cpp: - (KJS::FunctionObjectImp::construct): - * kjs/scope_chain.h: - (KJS::ScopeChainNode::ScopeChainNode): - (KJS::ScopeChainNode::globalThisObject): - (KJS::ScopeChainNode::push): - (KJS::ScopeChain::ScopeChain): - -2008-05-21 Kevin McCullough - - Sadness :( - - * kjs/config.h: - -2008-05-21 Kevin McCullough - - Reviewed by Maciej. - - JSProfiler: Allow the profiler to "Focus" a - profile node. - - This patch updatest the times of the visible nodes correctly, but to do - so, some of the design of the ProfileNode changed. - - * JavaScriptCore.exp: export focus' symbol. - * profiler/Profile.cpp: ProfileNodes now take a reference to the head of - the profile tree to get up-to-date accurate total profile time. - (KJS::Profile::Profile): Pass 0 for the head node. - (KJS::Profile::stopProfiling): stopProfiling no longer needs the time - passed into it, since it can get it from the head and it does not need to - be told it is the head because it can figure it out on it's own. - (KJS::Profile::willExecute): Set the head node for each created node. - * profiler/Profile.h: - (KJS::Profile::focus): Instead of taking a CallIdentifier that the caller - would have to create, now focus() takes a ProfileNode that they should - already have a reference to and focus() can extract the CallIdentifier - from it. - * profiler/ProfileNode.cpp: Create actual and visible versions fo the - total and self times for focus and exclude. Also add a head node - reference so that nodes can get information from their head. - (KJS::ProfileNode::ProfileNode): - (KJS::ProfileNode::stopProfiling): Rename the total and self time - variables and set the visual ones to the actual ones, so that without any - changes to the visual versions of these variables, their times will match - the actual times. - (KJS::ProfileNode::focus): Now focus() has a bool to force it's children - to be visible if this node is visible. If this node does not match the - CallIdentifier being focused then the visibleTotalTime is only updated if - one or more of it's children is the CallIdentifier being focused. - (KJS::ProfileNode::restoreAll): Restores all variables with respect to - the visible data in the ProfileNode. - (KJS::ProfileNode::endAndRecordCall): Name change. - (KJS::ProfileNode::debugPrintData): Dump the new variables. - (KJS::ProfileNode::debugPrintDataSampleStyle): Name change. - * profiler/ProfileNode.h: Use the new variables and reference to the head - node. - (KJS::ProfileNode::create): - (KJS::ProfileNode::totalTime): - (KJS::ProfileNode::setTotalTime): - (KJS::ProfileNode::selfTime): - (KJS::ProfileNode::setSelfTime): - (KJS::ProfileNode::totalPercent): - (KJS::ProfileNode::selfPercent): - (KJS::ProfileNode::setVisible): - -2008-05-21 Alp Toker - - GTK+/UNIX testkjs build fix. Include signal.h. - - * kjs/testkjs.cpp: - -2008-05-21 Oliver Hunt - - Yet more windows build fixes - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-05-21 Oliver Hunt - - Yet more windows build fixes - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-05-21 Alp Toker - - GTK+ build fix. Add DebuggerCallFrame.cpp and take AllInOneFile.cpp - changes into account. - - * GNUmakefile.am: - -2008-05-21 Oliver Hunt - - Add DebuggerCallFrame.{h,cpp} to the project file - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-05-21 Alp Toker - - GTK+ port build fixes following squirrelfish merge r33979. - - * GNUmakefile.am: - -2008-05-21 Maciej Stachowiak - - Reviewed by Darin. - - - save a hash lookup wne writing to global properties - 0.3% speedup on SunSpider, 7% on bitops-bitwise-and - - * VM/Machine.cpp: - (KJS::resolveBase): Check for being a the end of the scope chain - before hash lookup. - -2008-05-21 Alp Toker - - Rubber-stamped by Maciej. - - Replace non-standard #pragma marks with comments to avoid compiler - warnings. - - * profiler/ProfileNode.cpp: - -2008-05-21 Geoffrey Garen - - Reviewed by Mark Rowe. - - Fix layout test failure in fast/dom/getter-on-window-object2 introduced in r33961. - - * JavaScriptCore.exp: - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::defineGetter): - (KJS::JSGlobalObject::defineSetter): - * kjs/JSGlobalObject.h: - -=== End merge of squirrelfish === - -2008-05-21 Geoffrey Garen - - Reviewed by Tim Hatcher. - - Merged with trunk WebCore's new debugger. - - * kjs/DebuggerCallFrame.cpp: - (KJS::DebuggerCallFrame::evaluate): Changed this function to separate - the exception value from the return value. The WebKit debugger treats - them as one, but the WebCore debugger doesn't. - - * kjs/DebuggerCallFrame.h: - (KJS::DebuggerCallFrame::dynamicGlobalObject): Added a new accessor for - the dynamic global object, since the debugger doesn't want the lexical - global object. - -2008-05-21 Oliver Hunt - - Reviewed by Maciej. - - Bug 19116: SquirrelFish shouldn't regress on variable lookups - - - Optimise cross scope assignment, 0.4% progression in sunspider. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitPutScopedVar): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::AssignResolveNode::emitCode): - -2008-05-21 Maciej Stachowiak - - Reviewed by Oliver. - - - check property map before symbol table in JSGlobalObject::getOwnPropertySlot - 0.5% speedup on SunSpider - - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::getOwnPropertySlot): Check property map before symbol table - because symbol table access is likely to have been optimized. - -2008-05-21 Oliver Hunt - - Reviewed by Maciej. - - Bug 19116: SquirrelFish shouldn't regress on variable lookups - - - Optimise multiscope lookup of statically resolvable function calls. - SunSpider reports a 1.5% improvement, including 37% on - controlflow-recursive for some reason :D - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitResolve): - * VM/CodeGenerator.h: - * kjs/nodes.cpp: - (KJS::FunctionCallResolveNode::emitCode): - -2008-05-21 Maciej Stachowiak - - Reviewed by Oliver. - - - give JSGlobalObject a special version of getOwnPropertySlot that tells you if the slot is directly writable - (WebCore change using this is a 2.6% speedup on in-browser SunSpider). - - * JavaScriptCore.exp: - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::getOwnPropertySlot): - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTableGet): - * kjs/object.h: - (KJS::JSObject::getDirectLocation): - (KJS::JSObject::getOwnPropertySlotForWrite): - * kjs/property_map.cpp: - (KJS::PropertyMap::getLocation): - * kjs/property_map.h: - * kjs/property_slot.h: - (KJS::PropertySlot::putValue): - -2008-05-20 Oliver Hunt - - Reviewed by Maciej. - - Bug 19116: SquirrelFish shouldn't regress on variable lookups - - - This restores multiscope optimisation to simple resolve, producing - a 2.6% progression in SunSpider. Have verified that none of the - sites broken by the multiscope optimisation in trunk were effected - by this change. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeBlock.h: - (KJS::CodeBlock::CodeBlock): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::findScopedProperty): - (KJS::CodeGenerator::emitResolve): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::resolve_n): - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/JSVariableObject.h: - -2008-05-20 Oliver Hunt - - Fixerate the windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * VM/CodeGenerator.cpp: - * VM/RegisterFile.h: - * kjs/JSGlobalObject.h: - * kjs/Parser.cpp: - * kjs/interpreter.h: - -2008-05-20 Oliver Hunt - - Reviewed by Geoff. - - Bug 19110: SquirrelFish: Google Maps - no maps - - - Correct a comedy of errors present in my original patch to "fix" - exceptions occurring midway through pre and post increment. This - solution is cleaner than the original, doesn't need the additional - opcodes, and as an added benefit does not break Google Maps. - - Sunspider reports a 0.4% progression. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::PreIncResolveNode::emitCode): - (KJS::PreDecResolveNode::emitCode): - (KJS::PreIncBracketNode::emitCode): - (KJS::PreDecBracketNode::emitCode): - (KJS::PreIncDotNode::emitCode): - (KJS::PreDecDotNode::emitCode): - -2008-05-20 Maciej Stachowiak - - Reviewed by Oliver. - - - inline JSGlobalObject::getOwnPropertySlot - 1% improvement on in-browser SunSpider (a wash command-line) - - * kjs/JSGlobalObject.cpp: - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::getOwnPropertySlot): - -2008-05-18 Oliver Hunt - - Reviewed by Maciej. - - Bug 18752: SQUIRRELFISH: exceptions are not always handled by the vm - - - Handle exceptions thrown by toString conversion in subscript operators, - this should basically complete exception handling in SquirrelFish. - - Sunspider reports no regression. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-05-17 Geoffrey Garen - - Reviewed by Oliver Hunt. - - [Reapplying patch with previously missing files from r33553 -- Oliver] - - Behold: debugging. - - SunSpider reports no change. - - * JavaScriptCore.xcodeproj/project.pbxproj: Added DebuggerCallFrame.h/.cpp, - and created a debugger folder. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::generate): If the debugger is attached, always - generate full scope chains for its sake. - - * VM/Machine.cpp: - (KJS::Machine::unwindCallFrame): Notify the debugger when unwinding - due to an exception, so it doesn't keep stale call frames around. - - (KJS::Machine::execute): Set Callee to 0 in eval frames, so the - debugger can distinguish them from function call frames. - - (KJS::Machine::debug): Simplified this function, since the debugger - doesn't actually need all the information we used to provide. - - (KJS::Machine::privateExecute): Treat debugging hooks like other function - calls, so the code we hook into (the debugger UI) can be optimized. - - * kjs/debugger.cpp: Nixed these default callback implementations and - made the callbacks pure virtual instead, so the compiler could tell me - if I made a mistake in one of the subclasses. - - * kjs/debugger.h: Removed a bunch of irrelevent data from the debugger - callbacks. Changed from passing an ExecState* to passing a - DebuggerCallFrame*, since an ExecState* doesn't contain sufficient - information anymore. - - * kjs/function.cpp: - (KJS::globalFuncEval): Easiest bug fix evar! - - [Previously missing files from r33553] - * kjs/DebuggerCallFrame.cpp: Copied from JavaScriptCore/profiler/FunctionCallProfile.h. - (KJS::DebuggerCallFrame::functionName): - (KJS::DebuggerCallFrame::thisObject): - (KJS::DebuggerCallFrame::evaluateScript): - * kjs/DebuggerCallFrame.h: Copied from JavaScriptCore/VM/Register.h. - (KJS::DebuggerCallFrame::DebuggerCallFrame): - (KJS::DebuggerCallFrame::scopeChain): - (KJS::DebuggerCallFrame::exception): - -2008-05-17 Cameron Zwarich - - Reviewed by Oliver. - - Bug 18991: SquirrelFish: Major codegen issue in a.b=expr, a[b]=expr - - - Fix the last remaining blocking cases of this bug. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::ReadModifyResolveNode::emitCode): - -2008-05-17 Cameron Zwarich - - Reviewed by Oliver. - - Partial fix for: - - Bug 18991: SquirrelFish: Major codegen issue in a.b=expr, a[b]=expr - - - Ensure that the code generated for assignments uses temporaries whenever - necessary. This patch covers the vast majority of situations, but there - are still a few left. - - This patch also adds some missing cases to CodeBlock::dump(). - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.h: - (KJS::CodeGenerator::destinationForAssignResult): - (KJS::CodeGenerator::leftHandSideNeedsCopy): - (KJS::CodeGenerator::emitNodeForLeftHandSide): - * kjs/NodeInfo.h: - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::AssignDotNode::emitCode): - (KJS::ReadModifyDotNode::emitCode): - (KJS::AssignBracketNode::emitCode): - (KJS::ReadModifyBracketNode::emitCode): - (KJS::ForInNode::ForInNode): - * kjs/nodes.h: - (KJS::ReadModifyResolveNode::): - (KJS::AssignResolveNode::): - (KJS::ReadModifyBracketNode::): - (KJS::AssignBracketNode::): - (KJS::AssignDotNode::): - (KJS::ReadModifyDotNode::): - -2008-05-17 Oliver Hunt - - Reviewed by Maciej. - - Bug 19106: SquirrelFish: Activation is not marked correctly - - - We can't rely on the symbol table for a count of the number of globals - we need to mark as that misses duplicate parameters and 'this'. Now we - use the actual local register count from the codeBlock. - - * kjs/JSActivation.cpp: - (KJS::JSActivation::mark): - -2008-05-16 Oliver Hunt - - Reviewed by Geoff. - - Bug 19076: SquirrelFish: RegisterFile can be corrupted if implictly reenter global scope with no declared vars - - - Don't delay allocation of initial global RegisterFile, as we can't guarantee we will be able - to allocate the global 'this' register safely at any point after initialisation of the Global - Object. - - Unfortunately this initial allocation caused a regression of 0.2-0.3%, however this patch adds - support for the static slot optimisation for the global Math object which brings it to a 0.3% - progression. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::programCodeThis): - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::addParameter): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::execute): - * kjs/ExecState.h: - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::reset): - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::GlobalPropertyInfo::GlobalPropertyInfo): - (KJS::JSGlobalObject::addStaticGlobals): - * kjs/nodes.cpp: - -2008-05-16 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 19098: SquirrelFish: Ref'd temporaries can be clobbered - - - When doing code generation for a statement list, increase the reference - count on a register that might eventually be returned, so that it doesn't - get clobbered by a request for a new temporary. - - * kjs/nodes.cpp: - (KJS::statementListEmitCode): - -2008-05-16 Maciej Stachowiak - - Reviewed by Oliver. - - - fixed Bug 19044: SquirrelFish: Bogus values enter evaluation when closing over scope with parameter and var with same name - https://bugs.webkit.org/show_bug.cgi?id=19044 - - * kjs/JSActivation.cpp: - (KJS::JSActivation::copyRegisters): Use numLocals from the code - block rather than the size of the symbol table for the number of - registers to copy, to account for duplicate parameters and vars - with the same name as parameters (we still have potentially - suboptimal codegen in that we allocate a local register for the - var in the latter case but it is never used). - -2008-05-15 Geoffrey Garen - - Not reviewed. - - We regret to inform you that your program is crashing because you were - stupid. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Math is hard. - -2008-05-14 Geoffrey Garen - - Reviewed by Oliver Hunt. - - A little more debugger action: filled in op_debug. All debugger control - flow works now, but variable inspection and backtraces still don't. - - SunSpider reports no change. - - * VM/CodeGenerator.cpp: Changed op_debug to accept line number parameters. - - * VM/Machine.cpp: - (KJS::Machine::getFunctionAndArguments): Moved op_debug into a - NEVER_INLINE function to avoid a stunning 10% performance regression. - Also factored out a common function for retrieving the function and - arguments from a call frame. - - * kjs/JSActivation.cpp: - (KJS::JSActivation::createArgumentsObject): Use the new factored out - function mentioned above. - - * kjs/Parser.cpp: - (KJS::Parser::parse): Increment m_sourceId before assigning it, so the - sourceId we send to the debugger matches the sourceId recorded in the - node. - - * kjs/nodes.cpp: Emit debugging hooks. - -2008-05-14 Oliver Hunt - - Reviewed by Maciej. - - Bug 19024: SQUIRRELFISH: ASSERTION FAILED: activation->isActivationObject() in Machine::unwindCallFrame - - - This fixes a number of issues. The most important is that we now check every register - file for tainting rather than just looking for function register files as that was - insufficient. Additionally guarded against implicit re-entry into Eval code. - - Also added a few additional assertions to reduce the amout of time between something - going wrong and us seeing the error. - - * VM/Machine.cpp: - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * VM/RegisterFile.cpp: - (KJS::RegisterFile::growBuffer): - (KJS::RegisterFile::addGlobalSlots): - * VM/RegisterFileStack.cpp: - (KJS::RegisterFileStack::pushGlobalRegisterFile): - (KJS::RegisterFileStack::pushFunctionRegisterFile): - * VM/RegisterFileStack.h: - (KJS::RegisterFileStack::inImplicitCall): - -2008-05-14 Geoffrey Garen - - Reviewed by Oliver Hunt. - - A little more debugger action: emit opcodes for debugger hooks. Right - now, the opcode implementation is just a stub. - - SunSpider reports no change. - - Some example codegen for "function f() { 1; }": - - [ 0] dbg DidEnterCallFrame - [ 2] dbg WillExecuteStatement - [ 4] load tr0, 1(@k0) - [ 7] load tr0, undefined(@k1) - [ 10] dbg WillLeaveCallFrame - [ 12] ret tr0 - -2008-05-14 Oliver Hunt - - Reviewed by Geoff. - - Bug 19025: SQUIRRELFISH: malformed syntax in onload handler causes crash - - - Simple fix -- move the use of functionBodyNode to after the null check. - - * kjs/function_object.cpp: - (KJS::FunctionObjectImp::construct): - -2008-05-13 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed a codegen crash with run-time parse errors. - - SunSpider reports no change. - - emitThrowError needs to return the temporary holding the error, not dst, - since dst may be NULL. In fact, emitThrowError shouldn't take a dst - parameter at all, since exceptions should not modify the destination - register. - -2008-05-13 Oliver Hunt - - Reviewed by Geoff. - - Bug 19027: SquirrelFish: Incorrect codegen for pre-increment - - - This fixes the codegen issues for the pre-inc/decrement operators - to prevent incorrectly clobbering the destination in the event of - an exception. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitPreInc): - (KJS::CodeGenerator::emitPreDec): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::PreIncResolveNode::emitCode): - (KJS::PreDecResolveNode::emitCode): - (KJS::PreIncBracketNode::emitCode): - (KJS::PreDecBracketNode::emitCode): - (KJS::PreIncDotNode::emitCode): - (KJS::PreDecDotNode::emitCode): - -2008-05-13 Geoffrey Garen - - Reviewed by Oliver Hunt. - - A little more debugger action: supply a real line number, sourceId, - and sourceURL in op_new_error. - - SunSpider reports a .2% speedup. Not sure what that's about. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Use the new good stuff in op_new_error. - - * kjs/nodes.cpp: - (KJS::RegExpNode::emitCode): Use the shared emitThrowError instead of - rolling our own. - -2008-05-13 Geoffrey Garen - - Reviewed by Oliver Hunt. - - A little more debugger action: implemented the exception callback. - - SunSpider reports a .2% speedup. Not sure what that's about. - - * VM/CodeBlock.h: A little refactoring here. Store a pointer to our - owner ScopeNode so we can retrieve data from it. This allows us to - stop storing copies of the data ourselves. Also, store a "this" register - instead of a code type, since we were only using the code type to - calculate the "this" register. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::generate): Calculate the "this" register mentioned - above. Also, take care of removing "this" from the symbol table after - codegen is done, since relying on the timing of a destructor for correct - behavior is not so good. - - * VM/Machine.cpp: - (KJS::Machine::throwException): Invoke the debugger's exception callback. - (KJS::Machine::privateExecute): Use the "this" register mentioned above. - -2008-05-13 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Removed some unused exception machinery. - - SunSpider reports a .3% speedup. - - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - * JavaScriptCore.exp: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/internal.cpp: - * kjs/object.cpp: - * kjs/object.h: - * kjs/value.h: - -2008-05-13 Geoffrey Garen - - Reviewed by Oliver Hunt. - - A little more debugger action. - - * kjs/debugger.cpp: - * kjs/debugger.h: Removed debuggersPresent because it was unused. - Replaced AttachedGlobalObject linked list with a HashSet because HashSet - is faster and simpler. Changed all functions to return void instead of - bool, because no clients ever return false, and we don't want to support - it. - - * kjs/nodes.cpp: Did some up-keep to avoid build bustage. - (KJS::Node::handleException): - (KJS::BreakpointCheckStatement::execute): - (KJS::FunctionBodyNodeWithDebuggerHooks::execute): - -2008-05-13 Oliver Hunt - - Reviewed by Darin. - - Bug 18752: SQUIRRELFISH: exceptions are not always handled by the vm - - - Replace old attempt at "branchless" exceptions as the extra information - being passed made gcc an unhappy compiler, replacing these custom toNumber - calls with ordinary toNumber logic (by relying on toNumber now preventing - side effects after an exception has been thrown) provided sufficient leeway - to add the additional checks for the remaining unchecked cases. - - This leaves only toString conversions in certain contexts as possibly - misbehaving. - - * VM/Machine.cpp: - (KJS::jsAdd): - (KJS::resolve): - (KJS::resolveBaseAndProperty): - (KJS::resolveBaseAndFunc): - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/value.h: - (KJS::JSValue::safeGetNumber): - -2008-05-13 Geoffrey Garen - - Reviewed by Oliver Hunt. - - First steps toward supporting the debugger API: support the sourceParsed - callback; plus some minor fixups. - - SunSpider reports no regression. - - * VM/CodeGenerator.h: Removed a misleading comment. - - * kjs/Parser.h: Changed the parser to take an ExecState*, so it can - implement the sourceParsed callback -- that way, we only have to - implement the callback in one place. - - * kjs/debugger.cpp: Nixed DebuggerImp, because its sole purpose in life - was to demonstrate the misapplication of design patterns. - - * kjs/debugger.h: Changed sourceParsed to take a SourceProvider, to - reduce copying, and not to return a value, because pausing execution - after parsing is complicated, and no clients needed that ability, anyway. - - * kjs/grammar.y: Make sure never to pass a NULL SourceElements* to - didFinishParsing -- that simplifies some code down the road. - - * kjs/nodes.cpp: Don't generate special AST nodes just because the - debugger is attached -- that's a relic of the old AST execution model, - and those nodes haven't been maintained. - -2008-05-13 Oliver Hunt - - Reviewed by Geoff. - - Bug 18752: SQUIRRELFISH: exceptions are not always handled by the vm - - - First step: prevent incorrect evaluation of valueOf/toString conversion - in right hand side of expression after earlier conversion throws. - - * API/JSCallbackObjectFunctions.h: - (KJS::::toNumber): - * kjs/object.cpp: - (KJS::JSObject::defaultValue): - -2008-05-12 Oliver Hunt - - Reviewed by Geoff. - - Bug 18934: SQUIRRELFISH: ASSERT @ nytimes.com due to RegisterFile being clobbered - - - Unfortunately we cannot create new statically optimised globals if there are any - tainted RegisterFiles on the RegisterFileStack. To handle this we re-introduce - (in a slightly cleaner form) the inImplicitCall concept to the RegisterFileStack. - - * VM/Machine.cpp: - (KJS::Machine::execute): - * VM/RegisterFileStack.cpp: - (KJS::RegisterFileStack::pushFunctionRegisterFile): - * VM/RegisterFileStack.h: - -2008-05-12 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Introduced support for function.caller. - - Improved support for walking interesting scopes for function introspection. - - This fixes all remaining layout tests not blocked by rebasing to trunk. - - SunSpider reports no change. - - * VM/Machine.cpp: - (KJS::Machine::dumpRegisters): Fixed a spacing issue. - -2008-05-11 Cameron Zwarich - - Reviewed by Oliver. - - Bug 18961: SQUIRRELFISH: Gmail doesn't load - - - Fix codegen for logical nodes so that they don't use their destination - as a temporary. - - * kjs/nodes.cpp: - (KJS::LogicalAndNode::emitCode): - (KJS::LogicalOrNode::emitCode): - -2008-05-10 Maciej Stachowiak - - Reviewed by Oliver. - - - JavaScriptCore part of fix for: "SQUIRRELFISH: function toString broken after calling" - https://bugs.webkit.org/show_bug.cgi?id=18869 - - Three layout tests are fixed: - fast/js/toString-elision-trailing-comma.html - fast/js/toString-prefix-postfix-preserve-parens.html - fast/js/kde/lval-exceptions.html - - Functions now save a shared subrange of the original source used - to make them (so in the common case this adds no storage above the - memory cache). - - * kjs/SourceProvider.h: Added. - (KJS::SourceProvider): New abstract base class for classes that provide on-demand access - to the source for a JavaScript program. This allows function objects to have access to their - original source without copying. - (KJS::UStringSourceProvider): SourceProvider subclass backed by a KJS::UString. - (KJS::UStringSourceProvider::create): - (KJS::UStringSourceProvider::getRange): - (KJS::UStringSourceProvider::data): - (KJS::UStringSourceProvider::length): - (KJS::UStringSourceProvider::UStringSourceProvider): - * kjs/SourceRange.h: Added. - (KJS::SourceRange::SourceRange): Class that holds a SourceProvider and a character range into - the source, to encapsulate on-demand access to the source of a function. - (KJS::SourceRange::toString): - * VM/Machine.cpp: - (KJS::eval): Pass a UStringSourceProvider to the parser. - * kjs/Parser.cpp: - (KJS::Parser::parse): Take a SourceProvider and pass it on to the lexer. - * kjs/Parser.h: - (KJS::Parser::parse): Take a SourceProvider. - * kjs/lexer.cpp: - (KJS::Lexer::setCode): Take a SourceProvider; keep it around, and - use it to get the raw buffer and length. - * kjs/lexer.h: - (KJS::Lexer::sourceRange): Convenience function to get a source - range based on the lexer's source provieder, and char offsets - right before and after the desired range. - * kjs/function.cpp: - (KJS::globalFuncEval): Pass a UStringSourceProvider to the parser. - * kjs/function_object.cpp: - (KJS::functionProtoFuncToString): Use toSourceString to get the source. - (KJS::FunctionObjectImp::construct): Give the parser a UStringSourceProvider. - * kjs/grammar.y: When parsing a function declaration, function - expression, or getter or setter, tell the function body about its - SourceRange. - * kjs/interpreter.cpp: - (KJS::Interpreter::checkSyntax): Pass a SourceProvider to the parser. - (KJS::Interpreter::evaluate): Pass a SourceProvider to the parser. - * kjs/interpreter.h: - * kjs/nodes.h: - (KJS::FunctionBodyNode::setSource): Establish a SourceRange for this function. - (KJS::FunctionBodyNode::toSourceString): Get the source string out - of the SourceRange. - (KJS::FuncExprNode::): Take a SourceRange and set it on the body. - (KJS::FuncDeclNode::): ditto - * kjs/testkjs.cpp: - (prettyPrintScript): Use a SourceProvider appropriately. - * JavaScriptCore.exp: Export new symbols. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add new files. - * JavaScriptCore.xcodeproj/project.pbxproj: Add new files. - -2008-05-09 Oliver Hunt - - Reviewed by Maciej. - - Bring back RegisterFile tainting in order to correctly handle - natively implemented getters and setters that re-enter JavaScript - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/RegisterFile.h: - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - * kjs/object.cpp: - (KJS::JSObject::put): - (KJS::tryGetAndCallProperty): - * kjs/property_slot.cpp: - (KJS::PropertySlot::functionGetter): - -2008-05-09 Maciej Stachowiak - - Reviewed by Oliver. - - - track character offsets of open and close braces, in preparation for saving function source - - I verified that there is no performance regression from this change. - - * kjs/grammar.y: - * kjs/lexer.cpp: - (KJS::Lexer::lex): - (KJS::Lexer::matchPunctuator): - * kjs/lexer.h: - -2008-05-09 Oliver Hunt - - Debug build fix - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::restoreLocalStorage): - -2008-05-09 Oliver Hunt - - Reviewed by Geoff. - - Build fixes for SquirrelFish on windows. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - * VM/Register.h: - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::restoreLocalStorage): - * kjs/collector.cpp: - (KJS::Collector::allocate): - (KJS::Collector::allocateNumber): - * kjs/collector.h: - (KJS::Collector::allocate): - (KJS::Collector::allocateNumber): - * kjs/property_slot.cpp: - -2008-05-08 Maciej Stachowiak - - Reviewed by Geoff. - - - fix activation tearoff in the case where functions are called with too many arguments - - Fixes: - fast/canvas/patternfill-repeat.html - fast/dom/SelectorAPI/bug-17313.html - - * VM/Machine.cpp: - (KJS::slideRegisterWindowForCall): - (KJS::scopeChainForCall): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - -2008-05-08 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed failure in fast/canvas/canvas-pattern-behaviour.html. - - SunSpider reports a small speedup. Not sure what that's about. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): Fixed op_call_eval to dump as "op_call_eval". - This helped me while debugging. - - * VM/Machine.cpp: - (KJS::Machine::unwindCallFrame): When looking for an activation to tear - off, don't use the scope chain. Inside eval, the scope chain doesn't - belong to us; it belongs to our calling function. - - Also, don't use the needsFullScopeChain flag to decide whether to tear - off the activation. "function.arguments" can create an activation - for a function whose needsFullScopeChain flag is set to false. - -2008-05-08 Maciej Stachowiak - - Reviewed by Oliver. - - - fix function.call for calls of more than 8 arguments - - Fixes svg/carto.net/button.svg - - * kjs/list.cpp: - (KJS::List::getSlice): properly set up the m_buffer of the target list. - -2008-05-08 Maciej Stachowiak - - Reviewed by Oliver. - - - don't return a null RegisterID from RegExpNode in the exception case, since the caller may need a real register - - Fixes: - - fast/regex/early-acid3-86.html - - http/tests/misc/acid3.html - - * kjs/nodes.cpp: - (KJS::RegExpNode::emitCode): - -2008-05-07 Cameron Zwarich - - Reviewed by Oliver. - - Fix a performance regression caused by the introduction of property - attributes to SymbolTable in r32859 by encoding the attributes and the - register index into a single field of SymbolTableEntry. - - This leaves Node::optimizeVariableAccess() definitely broken, although - it was probably not entirely correct in SquirrelFish before this change. - - * VM/CodeBlock.h: - (KJS::missingThisObjectMarker): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::addVar): - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::registerForLocal): - (KJS::CodeGenerator::registerForLocalConstInit): - (KJS::CodeGenerator::isLocalConstant): - (KJS::CodeGenerator::addConstant): - (KJS::CodeGenerator::emitCall): - * VM/CodeGenerator.h: - (KJS::CodeGenerator::IdentifierMapIndexHashTraits::emptyValue): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::saveLocalStorage): - * kjs/JSVariableObject.cpp: - (KJS::JSVariableObject::getPropertyNames): - (KJS::JSVariableObject::getPropertyAttributes): - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTableGet): - (KJS::JSVariableObject::symbolTablePut): - (KJS::JSVariableObject::symbolTablePutWithAttributes): - * kjs/SymbolTable.h: - (KJS::SymbolTableEntry::SymbolTableEntry): - (KJS::SymbolTableEntry::isEmpty): - (KJS::SymbolTableEntry::getIndex): - (KJS::SymbolTableEntry::getAttributes): - (KJS::SymbolTableEntry::setAttributes): - (KJS::SymbolTableEntry::isReadOnly): - * kjs/nodes.cpp: - (KJS::getSymbolTableEntry): - (KJS::PostIncResolveNode::optimizeVariableAccess): - (KJS::PostDecResolveNode::optimizeVariableAccess): - (KJS::DeleteResolveNode::optimizeVariableAccess): - (KJS::TypeOfResolveNode::optimizeVariableAccess): - (KJS::PreIncResolveNode::optimizeVariableAccess): - (KJS::PreDecResolveNode::optimizeVariableAccess): - (KJS::ReadModifyResolveNode::optimizeVariableAccess): - (KJS::AssignResolveNode::optimizeVariableAccess): - (KJS::ProgramNode::initializeSymbolTable): - -2008-05-06 Maciej Stachowiak - - Rubber stamped by Oliver. - - - add missing ! in an assert that I failed to reverse - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): - -2008-05-06 Maciej Stachowiak - - Reviewed by Oliver. - - - fixed "SQUIRRELFISH: window.this shows up as a property, but it shouldn't" - https://bugs.webkit.org/show_bug.cgi?id=18868 - - The basic approach is to have "this" only be present in the symbol - table at compile time, not runtime. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::~CodeGenerator): Remove "this" from symbol table. - (KJS::CodeGenerator::CodeGenerator): Add "this" back when re-using - a symbol table. - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::execute): Don't assert that "this" is in the symbol table. - -2008-05-06 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Trivial support for function.arguments: Currently, we only support - function.arguments from within the scope of function. - - This fixes the remaining Mozilla JS test failures. - - SunSpider reports no change. - - * JavaScriptCore.exp: - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Separated scope chain deref from - activation register copying: since it is now possible for client code - to create an activation on behalf of a function that otherwise wouldn't - need one, having an activation no longer necessarily means that you need - to deref the scope chain. - - (KJS::Machine::getCallFrame): For now, this function only examines the - current scope. Walking parent scopes requires some refactoring in the - way we track execution stacks. - - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): We use a negative call frame offset to - indicate that a given scope is not a function call scope. - -2008-05-05 Oliver Hunt - - Reviewed by Geoff. - - Fix call frame set up for native -> JS function calls. - - * VM/Machine.cpp: - (KJS::Machine::execute): - -2008-05-05 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed ecma_3/Object/8.6.2.6-001.js, and similar bugs. - - SunSpider reports a .4% speedup. Not sure what that's about. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Check for exception return from equal, - since toPrimitive can throw. - - * kjs/operations.cpp: - (KJS::strictEqual): In response to an error I made in an earlier version - of this patch, I changed strictEqual to make clear the fact that it - performs no conversions and can't throw, making it slightly more efficient - in the process. - -2008-05-05 Maciej Stachowiak - - Reviewed by Oliver. - - - fix some dumb mistakes in my last patch - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitPushScope): - (KJS::CodeGenerator::emitGetPropertyNames): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-05-05 Maciej Stachowiak - - Reviewed by Oliver. - - - document opcodes relating to jumps, scopes, and property name iteration - - Documented jmp, jtrue, false, push_scope, pop_scope, get_pnames, - next_pname and jmp_scopes. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitJump): - (KJS::CodeGenerator::emitJumpIfTrue): - (KJS::CodeGenerator::emitJumpIfFalse): - (KJS::CodeGenerator::emitPushScope): - (KJS::CodeGenerator::emitNextPropertyName): - (KJS::CodeGenerator::emitGetPropertyNames): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/nodes.cpp: - (KJS::LogicalAndNode::emitCode): - (KJS::LogicalOrNode::emitCode): - (KJS::ConditionalNode::emitCode): - (KJS::IfNode::emitCode): - (KJS::IfElseNode::emitCode): - (KJS::DoWhileNode::emitCode): - (KJS::WhileNode::emitCode): - (KJS::ForNode::emitCode): - (KJS::ForInNode::emitCode): - (KJS::WithNode::emitCode): - -2008-05-05 Cameron Zwarich - - Reviewed by Oliver. - - Bug 18749: SQUIRRELFISH: const support is broken - - - Adds support for const during code generation. - - Fixes 2 layout tests. - - * ChangeLog: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::addVar): - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::isLocalConstant): - * VM/CodeGenerator.h: - (KJS::CodeGenerator::addVar): - * kjs/nodes.cpp: - (KJS::PostIncResolveNode::emitCode): - (KJS::PostDecResolveNode::emitCode): - (KJS::PreIncResolveNode::emitCode): - (KJS::PreDecResolveNode::emitCode): - (KJS::ReadModifyResolveNode::emitCode): - (KJS::AssignResolveNode::emitCode): - -2008-05-04 Maciej Stachowiak - - Reviewed by Geoff. - - - document some more opcodes (and fix argument names) - - Added docs for eq, neq, stricteq, nstriceq, less and lesseq. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitEqual): - (KJS::CodeGenerator::emitNotEqual): - (KJS::CodeGenerator::emitStrictEqual): - (KJS::CodeGenerator::emitNotStrictEqual): - (KJS::CodeGenerator::emitLess): - (KJS::CodeGenerator::emitLessEq): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/nodes.cpp: - (KJS::LessNode::emitCode): - (KJS::GreaterNode::emitCode): - (KJS::LessEqNode::emitCode): - (KJS::GreaterEqNode::emitCode): - (KJS::EqualNode::emitCode): - (KJS::NotEqualNode::emitCode): - (KJS::StrictEqualNode::emitCode): - (KJS::NotStrictEqualNode::emitCode): - (KJS::CaseBlockNode::emitCodeForBlock): - -2008-05-04 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - More scaffolding for f.arguments. - - Track the offset of the last call frame in the ExecState, so we can - produce a backtrace at any time. - - Also, record numLocals, the sum of numVars + numParameters, in each code - block, to make updates to the ExecState a little cheaper than they - would be otherwise. - - We now use numLocals in a bunch of places where we used to calculate - numVars + numParameters or -numVars - numParameters. - - Reports are mixed, but all in all, this seems to be a wash on SunSpider. - -2008-05-04 Oliver Hunt - - Reviewed by Geoff. - - Whoops, correctly handle properties that don't exist in the - symbol table. - - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTablePutWithAttributes): - -2008-05-04 Oliver Hunt - - Reviewed by Geoff. - - Add attribute information to SymbolTable as ground work for - various DontEnum and ReadOnly issues. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::addVar): - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::registerForLocal): - (KJS::CodeGenerator::registerForLocalConstInit): - (KJS::CodeGenerator::addConstant): - * VM/Machine.cpp: - (KJS::Machine::execute): - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::saveLocalStorage): - * kjs/JSVariableObject.cpp: - (KJS::JSVariableObject::getPropertyNames): - (KJS::JSVariableObject::getPropertyAttributes): - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTablePut): - (KJS::JSVariableObject::symbolTablePutWithAttributes): - * kjs/SymbolTable.h: - (KJS::SymbolTableEntry::SymbolTableEntry): - (KJS::SymbolTableIndexHashTraits::emptyValue): - * kjs/nodes.cpp: - (KJS::getSymbolTableEntry): - (KJS::ReadModifyResolveNode::optimizeVariableAccess): - (KJS::AssignResolveNode::optimizeVariableAccess): - (KJS::ProgramNode::initializeSymbolTable): - -2008-05-04 Geoffrey Garen - - Reviewed by Oliver Hunt. - - More scaffolding for f.arguments. - - Store the register file associated with an ExecState in the ExecState. - - SunSpider reports no change. - - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): Moved - registerFileStack above globalExec, so it gets initialized first. - Removed remnants of old activation scheme. - -2008-05-04 Maciej Stachowiak - - Rubber stamped by Oliver. - - - renamed a few opcodes and fixed assembly formatting to accomodate the longest opcode - - equal --> eq - nequal --> neq - resolve_base_and_property --> resolve_with_base - resolve_base_and_func --> resolve_func - get_prop_id --> get_by_id - put_prop_id --> put_by_id - delete_prop_id --> del_by_id - get_prop_val --> get_by_val - put_prop_val --> put_by_val - delete_prop_val --> del_by_val - put_prop_index --> put_by_index - - * VM/CodeBlock.cpp: - (KJS::printUnaryOp): - (KJS::printBinaryOp): - (KJS::printConditionalJump): - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitEqual): - (KJS::CodeGenerator::emitNotEqual): - (KJS::CodeGenerator::emitResolveWithBase): - (KJS::CodeGenerator::emitResolveFunction): - (KJS::CodeGenerator::emitGetById): - (KJS::CodeGenerator::emitPutById): - (KJS::CodeGenerator::emitDeleteById): - (KJS::CodeGenerator::emitGetByVal): - (KJS::CodeGenerator::emitPutByVal): - (KJS::CodeGenerator::emitDeleteByVal): - (KJS::CodeGenerator::emitPutByIndex): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::ArrayNode::emitCode): - (KJS::PropertyListNode::emitCode): - (KJS::BracketAccessorNode::emitCode): - (KJS::DotAccessorNode::emitCode): - (KJS::EvalFunctionCallNode::emitCode): - (KJS::FunctionCallResolveNode::emitCode): - (KJS::FunctionCallBracketNode::emitCode): - (KJS::FunctionCallDotNode::emitCode): - (KJS::PostIncResolveNode::emitCode): - (KJS::PostDecResolveNode::emitCode): - (KJS::PostIncBracketNode::emitCode): - (KJS::PostDecBracketNode::emitCode): - (KJS::PostIncDotNode::emitCode): - (KJS::PostDecDotNode::emitCode): - (KJS::DeleteResolveNode::emitCode): - (KJS::DeleteBracketNode::emitCode): - (KJS::DeleteDotNode::emitCode): - (KJS::TypeOfResolveNode::emitCode): - (KJS::PreIncResolveNode::emitCode): - (KJS::PreDecResolveNode::emitCode): - (KJS::PreIncBracketNode::emitCode): - (KJS::PreDecBracketNode::emitCode): - (KJS::PreIncDotNode::emitCode): - (KJS::PreDecDotNode::emitCode): - (KJS::ReadModifyResolveNode::emitCode): - (KJS::AssignResolveNode::emitCode): - (KJS::AssignDotNode::emitCode): - (KJS::ReadModifyDotNode::emitCode): - (KJS::AssignBracketNode::emitCode): - (KJS::ReadModifyBracketNode::emitCode): - (KJS::ConstDeclNode::emitCodeSingle): - (KJS::ForInNode::emitCode): - (KJS::TryNode::emitCode): - -2008-05-04 Oliver Hunt - - Reviewed by Maciej. - - Fix assertion when accessing arguments object with too many arguments provided - - The arguments constructor was assuming that the register offset given for argv - was an absolute offset into the registerfile, rather than the offset from the - frame. This patches corrects that issue. - - * kjs/JSActivation.cpp: - (KJS::JSActivation::createArgumentsObject): - -2008-05-04 Geoffrey Garen - - Rubber stamped by Sam Weinig. - - Cleaned up Machine.cpp according to our style guidelines: moved static - data to the top of the file; moved stand-alone functions below that; - moved the Machine constructor above other Machine member functions. - -2008-05-03 Maciej Stachowiak - - Reviewed by Sam. - - - fix accidental breakage from last patch - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-05-03 Maciej Stachowiak - - Reviewed by Geoff. - - - a bunch more opcode documentation and corresponding parameter name fixes - - I renamed a few opcodes: - - type_of --> typeof (that's what the JS operator is named) - instance_of --> instanceof (ditto) - create_error --> new_error (for consistency with other new_* opcodes) - - I documented the following opcodes: - - - load - - new_object - - new_array - - new_regexp - - mov - - pre_inc - - pre_dec - - post_inc - - post_dec - - to_jsnumber - - negate - - bitnot - - not - - instanceof - - typeof - - in - - new_func - - new_funcexp - - new_error - - I also fixed formatting on some existing opcode docs. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitMove): - (KJS::CodeGenerator::emitNot): - (KJS::CodeGenerator::emitPreInc): - (KJS::CodeGenerator::emitPreDec): - (KJS::CodeGenerator::emitPostInc): - (KJS::CodeGenerator::emitPostDec): - (KJS::CodeGenerator::emitToJSNumber): - (KJS::CodeGenerator::emitNegate): - (KJS::CodeGenerator::emitBitNot): - (KJS::CodeGenerator::emitInstanceOf): - (KJS::CodeGenerator::emitTypeOf): - (KJS::CodeGenerator::emitIn): - (KJS::CodeGenerator::emitLoad): - (KJS::CodeGenerator::emitNewObject): - (KJS::CodeGenerator::emitNewArray): - (KJS::CodeGenerator::emitNewRegExp): - (KJS::CodeGenerator::emitNewError): - * VM/CodeGenerator.h: - (KJS::CodeGenerator::scopeDepth): - (KJS::CodeGenerator::addVar): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::Node::emitThrowError): - (KJS::RegExpNode::emitCode): - (KJS::TypeOfValueNode::emitCode): - (KJS::UnaryPlusNode::emitCode): - (KJS::NegateNode::emitCode): - (KJS::BitwiseNotNode::emitCode): - (KJS::LogicalNotNode::emitCode): - (KJS::InstanceOfNode::emitCode): - (KJS::InNode::emitCode): - -2008-05-03 Maciej Stachowiak - - Reviewed by Geoff and Sam. - - - generate HTML bytecode docs at build time - - * DerivedSources.make: - * docs: Added. - * docs/make-bytecode-docs.pl: Added. - -2008-05-03 Geoffrey Garen - - Reviewed by Sam Weinig. - - Update ExecState::m_scopeChain when switching scope chains inside the - machine. - - This fixes uses of lexicalGlobalObject, such as, in a subframe - - alert(top.makeArray() instanceof Array ? "FAIL" : "PASS"); - - and a bunch of the security failures listed in - https://bugs.webkit.org/show_bug.cgi?id=18870. (Those tests still fail, - seemingly because of regressions in exception messages). - - SunSpider reports no change. - - * VM/Machine.cpp: Factored out scope chain updating into a common - function that takes care to update ExecState::m_scopeChain, too. - - * kjs/ExecState.h: I made Machine a friend of ExecState so that Machine - could update ExecState::m_scopeChain, even though that value is - read-only for everyone else. - - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): Changed - this client to be a little friendlier to ExecState's internal - storage type for scope chain data. - -2008-05-03 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=18876 - Squirrelfish: ScopeChainNode leak in op_jmp_scopes. - - SunSpider reports no change. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Don't construct a ScopeChain object, - since the direct threaded interpreter will goto across its destructor. - -2008-05-03 Geoffrey Garen - - Reviewed by Oliver Hunt. - - A bit more efficient fix than r32832: Don't copy globals into function - register files; instead, have the RegisterFileStack track only the base - of the last *global* register file, so the global object's register - references stay good. - - SunSpider reports a .3% speedup. Not sure what that's about. - -2008-05-03 Oliver Hunt - - Reviewed by Maciej. - - Bug 18864: SquirrelFish: Support getter and setter definition in object literals - - - Add new opcodes to allow us to add getters and setters to an object. These are - only used by the codegen for object literals. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitPutGetter): - (KJS::CodeGenerator::emitPutSetter): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::PropertyListNode::emitCode): - -2008-05-02 Maciej Stachowiak - - Reviewed by Oliver. - - - properly copy globals into and out of implicit call register - files, otherwise they will fail at global lookup - - Fixes fast/js/array-tostring-and-join.html layout test. - - * VM/RegisterFileStack.cpp: - (KJS::RegisterFileStack::pushGlobalRegisterFile): - (KJS::RegisterFileStack::popGlobalRegisterFile): - (KJS::RegisterFileStack::pushFunctionRegisterFile): - (KJS::RegisterFileStack::popFunctionRegisterFile): - -2008-05-02 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=18822 - SQUIRRELFISH: incorrect eval used in some cases - - Changed all code inside the machine to fetch the lexical global object - directly from the scope chain, instead of from the ExecState. - - Clients who fetch the lexical global object through the ExecState - still don't work. - - SunSpider reports no change. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Fetch the lexical global object from - the scope chain. - - * kjs/ExecState.h: - (KJS::ExecState::ExecState::lexicalGlobalObject): Moved the logic for - this function into ScopeChainNode, but kept this function around to - support existing clients. - -2008-05-02 Geoffrey Garen - - Rubber stamped by Oliver Hunt. - - Removed ExecState.cpp from AllInOneFile.cpp, for a .2% speedup. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/AllInOneFile.cpp: - -2008-05-01 Oliver Hunt - - Reviewed by Geoff and Maciej. - - Bug 18827: SquirrelFish: Prevent getters and setters from destroying the current RegisterFile - - - Remove safe/unsafe RegisterFile concept, and instead just add additional - logic to ensure we always push/pop RegisterFiles when executing getters - and setters, similar to the logic for valueOf and toString. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/RegisterFile.h: - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - * kjs/object.cpp: - (KJS::JSObject::put): - * kjs/property_slot.cpp: - (KJS::PropertySlot::functionGetter): - -2008-05-01 Oliver Hunt - - RS=Geoff - - Rename unsafeForReentry to safeForReentry to avoid double negatives. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/RegisterFile.h: - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - -2008-05-01 Oliver Hunt - - Reviewed by Maciej. - - Bug 18827: SquirrelFish: Prevent getters and setters from destroying the current RegisterFile - - - This patch makes getters and setters work. It does this by - tracking whether the RegisterFile is "safe", that is whether - the interpreter is in a state that in which it can handle - the RegisterFile being reallocated. - - * VM/Machine.cpp: - (KJS::resolve): - (KJS::Machine::privateExecute): - * VM/RegisterFile.h: - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - -2008-04-30 Geoffrey Garen - - Release build fix: Always compile in "isGlobalObject", since it's - listed in our .exp file. - - * kjs/ExecState.cpp: - (KJS::ExecState::isGlobalObject): - * kjs/ExecState.h: - -2008-04-30 Oliver Hunt - - Reviewed by Maciej. - - Minor code restructuring to prepare for getters and setters, - also helps exception semantics a bit. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-30 Geoffrey Garen - - Fixed tyop. - - * kjs/ExecState.h: - -2008-04-30 Geoffrey Garen - - Debug build fix: export a missing symbol. - - * JavaScriptCore.exp: - -2008-04-30 Geoffrey Garen - - Reviewed by Oliver Hunt. - - A little more ExecState refactoring: Now, only the global object creates - an ExecState. - - Also inlined ExecState::lexicalGlobalObject(). - - SunSpider reports no change. - -2008-04-30 Geoffrey Garen - - WebCore build fix: forward-declare ScopeChain. - - * kjs/interpreter.h: - -2008-04-30 Geoffrey Garen - - Build fix for JavaScriptGlue: export a missing symbol. - - * JavaScriptCore.exp: - -2008-04-30 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Removed a lot of unused bits from ExecState, moving them into - OldInterpreterExecState, the fake scaffolding class. - - The clutter was making it hard to see the forest from the trees. - - .4% SunSpider speedup, probably because ExecState::lexicalGlobalObject() - is faster now. - -2008-04-29 Oliver Hunt - - Reviewed by Maciej. - - Bug 18643: SQUIRRELFISH: need to support implicit function calls (valueOf, toString, getters/setters) - - - Prevent static slot optimisation for new variables and functions in - globally re-entrant code called from an an implicit function call. - - This is necessary to prevent us from needing to resize the global - slot portion of the root RegisterFile during an implicit (and hence - unguarded) function call. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::execute): - * VM/RegisterFile.h: - * VM/RegisterFileStack.cpp: - (KJS::RegisterFileStack::pushGlobalRegisterFile): - (KJS::RegisterFileStack::popGlobalRegisterFile): - (KJS::RegisterFileStack::pushFunctionRegisterFile): - (KJS::RegisterFileStack::popFunctionRegisterFile): - * VM/RegisterFileStack.h: - (KJS::RegisterFileStack::inImplicitFunctionCall): - (KJS::RegisterFileStack::lastGlobal): - * kjs/nodes.cpp: - (KJS::ProgramNode::generateCode): - * kjs/nodes.h: - (KJS::ProgramNode::): - -2008-04-29 Geoffrey Garen - - Reviewed by Oliver Hunt. - - In nested program code, don't propogate "this" back to the parent - register file. ("this" should remain constant in the parent register - file, regardless of the scripts it invokes.) - - * VM/RegisterFile.cpp: - (KJS::RegisterFile::copyGlobals): - -2008-04-28 Oliver Hunt - - Reviewed by Geoff. - - Restore base pointer when popping a global RegisterFile - - * VM/RegisterFileStack.cpp: - (KJS::RegisterFileStack::popGlobalRegisterFile): - -2008-04-28 Oliver Hunt - - Reviewed by Geoff. - - Bug 18643: SQUIRRELFISH: need to support implicit function calls (valueOf, toString, getters/setters) - - - Partial fix. This results in all implicit calls to toString or valueOf - executing in a separate RegisterFile, so ensuring that the the pointers - in the triggering interpreter don't get trashed. This still leaves the - task of preventing new global re-entry from toString and valueOf from - clobbering the RegisterFile. - - * VM/Machine.cpp: - (KJS::Machine::execute): - * VM/RegisterFileStack.cpp: - (KJS::RegisterFileStack::pushFunctionRegisterFile): - (KJS::RegisterFileStack::popFunctionRegisterFile): - * VM/RegisterFileStack.h: - * kjs/object.cpp: - (KJS::tryGetAndCallProperty): - -2008-04-28 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Simplified activation object a bit: No need to store the callee - in the activation object -- we can pull it out of the call frame - when needed, instead. - - SunSpider reports no change. - -2008-04-28 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - RS by Oliver Hunt on moving JSArguments.cpp out of AllInOneFile.cpp. - - Substantially more handling of "arguments": "arguments" works fully - now, but "f.arguments" still doesn't work. - - Fixes 10 regression tests. - - SunSpider reports no regression. - - * kjs/JSActivation.cpp: - (KJS::JSActivation::createArgumentsObject): Reconstruct an arguments - List to pass to the arguments object constructor. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/AllInOneFile.cpp: Removed JSActivation.cpp from AllInOneFile.cpp - because that seems to make GCC happy. (Previously, I had added - JSActivation.cpp to AllInOneFile.cpp because *that* seemed to make GCC - happy. So it goes.) - -2008-04-28 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Groundwork for more handling of "arguments". I'm not checking in the - actual handling of "arguments" yet, because it still needs a little - fiddling to avoid a performance regression. - - SunSpider reports no change. - - * VM/Machine.cpp: - (KJS::initializeCallFrame): Put argc in the register file, so the - arguments object can find it later, to determine arguments.length. - - * kjs/nodes.h: - (KJS::FunctionBodyNode::): Added a special code accessor for when you - know the code has already been generated, and you don't have a scopeChain - to supply for potential code generation. (This is the case when the - activation object creates the arguments object.) - -2008-04-28 Oliver Hunt - - Reviewed by Geoff. - - Replace unsafe use of auto_ptr in Vector with manual memory - management. - - * VM/RegisterFileStack.cpp: - (KJS::RegisterFileStack::~RegisterFileStack): - (KJS::RegisterFileStack::popRegisterFile): - * VM/RegisterFileStack.h: - -2008-04-27 Cameron Zwarich - - Reviewed by Maciej. - - Bug 18746: SQUIRRELFISH: indirect eval used when direct eval should be used - - - Change the base to the correct value of the 'this' object after the direct - eval test instead of before. - - Fixes 5 layout tests. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/nodes.cpp: - (KJS::EvalFunctionCallNode::emitCode): - -2008-04-26 Maciej Stachowiak - - Reviewed by Oliver. - - - document all property getting, setting and deleting opcodes - - (And fix function parameter names to match corresponding opcode parameter names.) - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitResolve): - (KJS::CodeGenerator::emitResolveBase): - (KJS::CodeGenerator::emitResolveBaseAndProperty): - (KJS::CodeGenerator::emitResolveBaseAndFunc): - (KJS::CodeGenerator::emitGetPropId): - (KJS::CodeGenerator::emitPutPropId): - (KJS::CodeGenerator::emitDeletePropId): - (KJS::CodeGenerator::emitPutPropVal): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::resolve): - (KJS::resolveBase): - (KJS::resolveBaseAndProperty): - (KJS::resolveBaseAndFunc): - (KJS::Machine::privateExecute): - * kjs/nodes.cpp: - (KJS::ResolveNode::emitCode): - (KJS::ArrayNode::emitCode): - (KJS::PropertyListNode::emitCode): - (KJS::BracketAccessorNode::emitCode): - (KJS::EvalFunctionCallNode::emitCode): - (KJS::FunctionCallResolveNode::emitCode): - (KJS::FunctionCallBracketNode::emitCode): - (KJS::PostIncResolveNode::emitCode): - (KJS::PostDecResolveNode::emitCode): - (KJS::PostIncBracketNode::emitCode): - (KJS::PostDecBracketNode::emitCode): - (KJS::PostIncDotNode::emitCode): - (KJS::PostDecDotNode::emitCode): - (KJS::DeleteResolveNode::emitCode): - (KJS::TypeOfResolveNode::emitCode): - (KJS::PreIncResolveNode::emitCode): - (KJS::PreDecResolveNode::emitCode): - (KJS::PreIncBracketNode::emitCode): - (KJS::PreDecBracketNode::emitCode): - (KJS::AssignResolveNode::emitCode): - (KJS::AssignDotNode::emitCode): - (KJS::ReadModifyDotNode::emitCode): - (KJS::AssignBracketNode::emitCode): - (KJS::ReadModifyBracketNode::emitCode): - (KJS::ConstDeclNode::emitCodeSingle): - -2008-04-26 Oliver Hunt - - Reviewed by Maciej. - - Bug 18628: SQUIRRELFISH: need to support recursion limit - - - Basically completes recursion limiting. There is still some - tuning we may want to do to make things better in the face of - very bad code, but certainly nothing worse than anything already - possible in trunk. - - Also fixes a WebKit test by fixing the exception text :D - - * JavaScriptCore.exp: - * VM/ExceptionHelpers.cpp: - * VM/Machine.cpp: - (KJS::Machine::execute): - * VM/RegisterFile.cpp: - (KJS::RegisterFile::growBuffer): - (KJS::RegisterFile::addGlobalSlots): - * VM/RegisterFile.h: - (KJS::RegisterFile::grow): - (KJS::RegisterFile::uncheckedGrow): - * VM/RegisterFileStack.cpp: - (KJS::RegisterFileStack::pushRegisterFile): - * VM/RegisterFileStack.h: - -2008-04-25 Oliver Hunt - - Reviewed by Geoff. - - Bug 18628: SQUIRRELFISH: need to support recursion limit - - - Put a limit on the level of reentry recursion. 128 levels of re-entrant recursion - seems reasonable as it is greater than the old eval limit, and a long way short of - the reentry depth needed to overflow the stack. - - * VM/Machine.cpp: - (KJS::Machine::execute): - * VM/Machine.h: - -2008-04-25 Geoffrey Garen - - Reviewed by Sam Weinig. - - A tiny bit of cleanup to the regexp code. - - Removed some static_cast. - - Removed createRegExpImp because it's no longer used. - -2008-04-25 Oliver Hunt - - Reviewed by Maciej. - - Bug 18736: SQUIRRELFISH: switch statements with no default have incorrect codegen - - - Ensure the "default" target is correct in the absence of an explicit default handler. - - * kjs/nodes.cpp: - (KJS::CaseBlockNode::emitCodeForBlock): - -2008-04-25 Oliver Hunt - - Reviewed by Maciej. - - Bug 18628: SQUIRRELFISH: need to support recursion limit - - - More bounds checking. - - * VM/Machine.cpp: - (KJS::Machine::execute): - * VM/RegisterFile.cpp: - (KJS::RegisterFile::growBuffer): - * VM/RegisterFile.h: - -2008-04-25 Maciej Stachowiak - - Reviewed by Oliver. - - - fix signal catching magic - - The signal handlers are restored to _exit but are only set when - running under run-javascriptcore-tests. fprintf from a signal - handler is not safe. - - * kjs/testkjs.cpp: - (main): - (parseArguments): - * tests/mozilla/jsDriver.pl: - -2008-04-25 Cameron Zwarich - - Reviewed by Maciej. - - Bug 18732: SQUIRRELFISH: exceptions thrown by native constructors are ignored - - - Fixes another regression test. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-25 Cameron Zwarich - - Reviewed by Maciej. - - Bug 18728: SQUIRRELFISH: invalid regular expression constants should throw exceptions - - - Fixes another regression test. - - * kjs/nodes.cpp: - (KJS::RegExpNode::emitCode): - -2008-04-24 Cameron Zwarich - - Reviewed by Geoffrey Garen. - - Bug 18735: SQUIRRELFISH: closures are sometimes given an incorrect 'this' value when called - - - The overloaded toThisObject method was not copied over to JSActivation. - - Fixes two regression tests. - - * kjs/JSActivation.cpp: - (KJS::JSActivation::toThisObject): - * kjs/JSActivation.h: - -2008-04-24 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Added support for arguments.callee. - -2008-04-24 Oliver Hunt - - Reviewed by Maciej. - - Bug 18628: SQUIRRELFISH: need to support recursion limit - - - Partial fix -- this gets us some of the required bounds checking, but not - complete coverage. But it does manage to do them without regressing :D - - * VM/ExceptionHelpers.cpp: - (KJS::createError): - (KJS::createStackOverflowError): - * VM/ExceptionHelpers.h: - * VM/Machine.cpp: - (KJS::slideRegisterWindowForCall): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * VM/RegisterFile.cpp: - * VM/RegisterFile.h: - (KJS::RegisterFile::): - (KJS::RegisterFile::RegisterFile): - (KJS::RegisterFile::grow): - -2008-04-24 Geoffrey Garen - - Reviewed by Oliver Hunt. - - A tiny bit more handling of "arguments": create a real, but mostly - hollow, arguments object. - - Fixes 2 regression tests. - -2008-04-24 Cameron Zwarich - - Reviewed by Oliver. - - Bug 18717: SQUIRRELFISH: eval returns the wrong value for a variable declaration statement - - - Fixes a regression test, but exposes the failure of another due to the - lack of getters and setters. - - * kjs/nodes.cpp: - (KJS::ConstDeclNode::emitCodeSingle): - (KJS::ConstDeclNode::emitCode): - (KJS::ConstStatementNode::emitCode): - (KJS::VarStatementNode::emitCode): - * kjs/nodes.h: - -2008-04-24 Geoffrey Garen - - Reviewed by Sam Weinig. - - Print a CRASH statement when crashing, so test failures are not a - mystery. - - * kjs/testkjs.cpp: - (handleCrash): - (main): - -2008-04-24 Cameron Zwarich - - Reviewed by Geoffrey Garen. - - Bug 18716: SQUIRRELFISH: typeof should return undefined for an undefined variable reference - - - This fixes 2 more regression tests. - - * kjs/nodes.cpp: - (KJS::TypeOfResolveNode::emitCode): - -2008-04-24 Geoffrey Garen - - Reviewed by Sam Weinig. - - Put the callee in the call frame. - - Necessary in order to support "arguments" and "arguments.callee". - - Also fixes a latent GC bug, where an executing function could be - subject to GC if the register holding it were overwritten. Here's - an example that would have caused problems: - - function f() - { - // Flood the machine stack to eliminate any old pointers to f. - g.call({}); - - // Overwrite f in the register file. - f = 1; - - // Force a GC. - for (var i = 0; i < 5000; ++i) { - ({}); - } - - // Welcome to crash-ville. - } - - function g() - { - } - - f(); - - * VM/Machine.h: Changed the order of arguments to - execute(FunctionBodyNode*...) to match the other execute functions. - * kjs/function.cpp: Updated to match new argument requirements from - execute(FunctionBodyNode*...). Renamed newObj to thisObj to match the - rest of JavaScriptCore. - - SunSpider reports no change. - -2008-04-23 Cameron Zwarich - - Reviewed by Maciej. - - Bug 18707: SQUIRRELFISH: eval always performs toString() on its argument - - - This fixes 4 more regression tests. - - * VM/Machine.cpp: - (KJS::eval): - -2008-04-23 Maciej Stachowiak - - Reviewed by Oliver. - - - fix logic bug in SegmentedVector::grow which would sometimes fail to resize a segment when needed - - Fixes 3 JSC tests. - - * VM/SegmentedVector.h: - (KJS::SegmentedVector::grow): - -2008-04-23 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Degenerate handling of "arguments" as a property of the activation - object. Currently, we just return a vanilla object. - - SunSpider reports no change. - - Fixes: - - ecma_3/Function/regress-94506.js. - - Reveals to have been secretly broken: - - ecma_3/Function/15.3.4.3-1.js - ecma_3/Function/15.3.4.4-1.js - - These tests were passing incorrectly. testkjs creates a global array - named "arguments" to hold command-line arguments. That array was - tricking these tests into thinking that an arguments object with length - 0 had been created. Since our new vanilla object shadows the global - property named arguments, that object no longer fools these tests into - passing. - - Net change: +1 failing test. - - * kjs/AllInOneFile.cpp: Had to put JSActivation.cpp into AllInOneFile.cpp - to solve a surprising 8.6% regression in bitops-3bit-bits-in-byte. - -2008-04-23 Maciej Stachowiak - - Reviewed by Oliver. - - - save and restore callFrame - - * VM/Machine.cpp: - (KJS::slideRegisterWindowForCall): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * kjs/testkjs.cpp: - (main): - -2008-04-23 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed scopes for named function expressions. - - Fixes one regression test. - - Two changes here: - - (1) The function's name is supposed to have attributes DontDelete, - ReadOnly, regardless of the type of code executing. - - (2) Push the name object on the function's scope chain, rather than - the ExecState's scope chain because, well, that's where it belongs. - -2008-04-23 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Inlined JSObject::putDirect, for a .4% SunSpider speedup. - - I did this as a first step toward removing nodes.cpp from - AllInOneFile.cpp, but I'm putting that larger project aside for now. - -2008-04-23 Maciej Stachowiak - - Rubber stamped by Geoff. - - - add OldInterpreterExecState class and use it in dead code - - This will allow removing things from the real ExecState class - without having to figure out how to remove all this code without - getting a perf regression. - - * kjs/nodes.cpp: - (KJS::ExpressionNode::evaluateToNumber): - (KJS::ExpressionNode::evaluateToBoolean): - (KJS::ExpressionNode::evaluateToInt32): - (KJS::ExpressionNode::evaluateToUInt32): - (KJS::Node::setErrorCompletion): - (KJS::Node::throwError): - (KJS::Node::throwUndefinedVariableError): - (KJS::Node::handleException): - (KJS::Node::rethrowException): - (KJS::BreakpointCheckStatement::execute): - (KJS::BreakpointCheckStatement::optimizeVariableAccess): - (KJS::NullNode::evaluate): - (KJS::FalseNode::evaluate): - (KJS::TrueNode::evaluate): - (KJS::NumberNode::evaluate): - (KJS::NumberNode::evaluateToNumber): - (KJS::NumberNode::evaluateToBoolean): - (KJS::NumberNode::evaluateToInt32): - (KJS::NumberNode::evaluateToUInt32): - (KJS::ImmediateNumberNode::evaluate): - (KJS::ImmediateNumberNode::evaluateToInt32): - (KJS::ImmediateNumberNode::evaluateToUInt32): - (KJS::StringNode::evaluate): - (KJS::StringNode::evaluateToNumber): - (KJS::StringNode::evaluateToBoolean): - (KJS::RegExpNode::evaluate): - (KJS::ThisNode::evaluate): - (KJS::ResolveNode::inlineEvaluate): - (KJS::ResolveNode::evaluate): - (KJS::ResolveNode::evaluateToNumber): - (KJS::ResolveNode::evaluateToBoolean): - (KJS::ResolveNode::evaluateToInt32): - (KJS::ResolveNode::evaluateToUInt32): - (KJS::getSymbolTableEntry): - (KJS::ResolveNode::optimizeVariableAccess): - (KJS::LocalVarAccessNode::inlineEvaluate): - (KJS::LocalVarAccessNode::evaluate): - (KJS::LocalVarAccessNode::evaluateToNumber): - (KJS::LocalVarAccessNode::evaluateToBoolean): - (KJS::LocalVarAccessNode::evaluateToInt32): - (KJS::LocalVarAccessNode::evaluateToUInt32): - (KJS::getNonLocalSymbol): - (KJS::ScopedVarAccessNode::inlineEvaluate): - (KJS::ScopedVarAccessNode::evaluate): - (KJS::ScopedVarAccessNode::evaluateToNumber): - (KJS::ScopedVarAccessNode::evaluateToBoolean): - (KJS::ScopedVarAccessNode::evaluateToInt32): - (KJS::ScopedVarAccessNode::evaluateToUInt32): - (KJS::NonLocalVarAccessNode::inlineEvaluate): - (KJS::NonLocalVarAccessNode::evaluate): - (KJS::NonLocalVarAccessNode::evaluateToNumber): - (KJS::NonLocalVarAccessNode::evaluateToBoolean): - (KJS::NonLocalVarAccessNode::evaluateToInt32): - (KJS::NonLocalVarAccessNode::evaluateToUInt32): - (KJS::ElementNode::optimizeVariableAccess): - (KJS::ElementNode::evaluate): - (KJS::ArrayNode::optimizeVariableAccess): - (KJS::ArrayNode::evaluate): - (KJS::ObjectLiteralNode::optimizeVariableAccess): - (KJS::ObjectLiteralNode::evaluate): - (KJS::PropertyListNode::optimizeVariableAccess): - (KJS::PropertyListNode::evaluate): - (KJS::PropertyNode::optimizeVariableAccess): - (KJS::PropertyNode::evaluate): - (KJS::BracketAccessorNode::optimizeVariableAccess): - (KJS::BracketAccessorNode::inlineEvaluate): - (KJS::BracketAccessorNode::evaluate): - (KJS::BracketAccessorNode::evaluateToNumber): - (KJS::BracketAccessorNode::evaluateToBoolean): - (KJS::BracketAccessorNode::evaluateToInt32): - (KJS::BracketAccessorNode::evaluateToUInt32): - (KJS::DotAccessorNode::optimizeVariableAccess): - (KJS::DotAccessorNode::inlineEvaluate): - (KJS::DotAccessorNode::evaluate): - (KJS::DotAccessorNode::evaluateToNumber): - (KJS::DotAccessorNode::evaluateToBoolean): - (KJS::DotAccessorNode::evaluateToInt32): - (KJS::DotAccessorNode::evaluateToUInt32): - (KJS::ArgumentListNode::optimizeVariableAccess): - (KJS::ArgumentListNode::evaluateList): - (KJS::ArgumentsNode::optimizeVariableAccess): - (KJS::NewExprNode::optimizeVariableAccess): - (KJS::NewExprNode::inlineEvaluate): - (KJS::NewExprNode::evaluate): - (KJS::NewExprNode::evaluateToNumber): - (KJS::NewExprNode::evaluateToBoolean): - (KJS::NewExprNode::evaluateToInt32): - (KJS::NewExprNode::evaluateToUInt32): - (KJS::ExpressionNode::resolveAndCall): - (KJS::EvalFunctionCallNode::optimizeVariableAccess): - (KJS::EvalFunctionCallNode::evaluate): - (KJS::FunctionCallValueNode::optimizeVariableAccess): - (KJS::FunctionCallValueNode::evaluate): - (KJS::FunctionCallResolveNode::optimizeVariableAccess): - (KJS::FunctionCallResolveNode::inlineEvaluate): - (KJS::FunctionCallResolveNode::evaluate): - (KJS::FunctionCallResolveNode::evaluateToNumber): - (KJS::FunctionCallResolveNode::evaluateToBoolean): - (KJS::FunctionCallResolveNode::evaluateToInt32): - (KJS::FunctionCallResolveNode::evaluateToUInt32): - (KJS::LocalVarFunctionCallNode::inlineEvaluate): - (KJS::LocalVarFunctionCallNode::evaluate): - (KJS::LocalVarFunctionCallNode::evaluateToNumber): - (KJS::LocalVarFunctionCallNode::evaluateToBoolean): - (KJS::LocalVarFunctionCallNode::evaluateToInt32): - (KJS::LocalVarFunctionCallNode::evaluateToUInt32): - (KJS::ScopedVarFunctionCallNode::inlineEvaluate): - (KJS::ScopedVarFunctionCallNode::evaluate): - (KJS::ScopedVarFunctionCallNode::evaluateToNumber): - (KJS::ScopedVarFunctionCallNode::evaluateToBoolean): - (KJS::ScopedVarFunctionCallNode::evaluateToInt32): - (KJS::ScopedVarFunctionCallNode::evaluateToUInt32): - (KJS::NonLocalVarFunctionCallNode::inlineEvaluate): - (KJS::NonLocalVarFunctionCallNode::evaluate): - (KJS::NonLocalVarFunctionCallNode::evaluateToNumber): - (KJS::NonLocalVarFunctionCallNode::evaluateToBoolean): - (KJS::NonLocalVarFunctionCallNode::evaluateToInt32): - (KJS::NonLocalVarFunctionCallNode::evaluateToUInt32): - (KJS::FunctionCallBracketNode::optimizeVariableAccess): - (KJS::FunctionCallBracketNode::evaluate): - (KJS::FunctionCallDotNode::optimizeVariableAccess): - (KJS::FunctionCallDotNode::inlineEvaluate): - (KJS::FunctionCallDotNode::evaluate): - (KJS::FunctionCallDotNode::evaluateToNumber): - (KJS::FunctionCallDotNode::evaluateToBoolean): - (KJS::FunctionCallDotNode::evaluateToInt32): - (KJS::FunctionCallDotNode::evaluateToUInt32): - (KJS::PostIncResolveNode::optimizeVariableAccess): - (KJS::PostIncResolveNode::evaluate): - (KJS::PostIncLocalVarNode::evaluate): - (KJS::PostDecResolveNode::optimizeVariableAccess): - (KJS::PostDecResolveNode::evaluate): - (KJS::PostDecLocalVarNode::evaluate): - (KJS::PostDecLocalVarNode::inlineEvaluateToNumber): - (KJS::PostDecLocalVarNode::evaluateToNumber): - (KJS::PostDecLocalVarNode::evaluateToBoolean): - (KJS::PostDecLocalVarNode::evaluateToInt32): - (KJS::PostDecLocalVarNode::evaluateToUInt32): - (KJS::PostfixBracketNode::optimizeVariableAccess): - (KJS::PostIncBracketNode::evaluate): - (KJS::PostDecBracketNode::evaluate): - (KJS::PostfixDotNode::optimizeVariableAccess): - (KJS::PostIncDotNode::evaluate): - (KJS::PostDecDotNode::evaluate): - (KJS::PostfixErrorNode::evaluate): - (KJS::DeleteResolveNode::optimizeVariableAccess): - (KJS::DeleteResolveNode::evaluate): - (KJS::LocalVarDeleteNode::evaluate): - (KJS::DeleteBracketNode::optimizeVariableAccess): - (KJS::DeleteBracketNode::evaluate): - (KJS::DeleteDotNode::optimizeVariableAccess): - (KJS::DeleteDotNode::evaluate): - (KJS::DeleteValueNode::optimizeVariableAccess): - (KJS::DeleteValueNode::evaluate): - (KJS::VoidNode::optimizeVariableAccess): - (KJS::VoidNode::evaluate): - (KJS::TypeOfValueNode::optimizeVariableAccess): - (KJS::TypeOfResolveNode::optimizeVariableAccess): - (KJS::LocalVarTypeOfNode::evaluate): - (KJS::TypeOfResolveNode::evaluate): - (KJS::TypeOfValueNode::evaluate): - (KJS::PreIncResolveNode::optimizeVariableAccess): - (KJS::PreIncLocalVarNode::evaluate): - (KJS::PreIncResolveNode::evaluate): - (KJS::PreDecResolveNode::optimizeVariableAccess): - (KJS::PreDecLocalVarNode::evaluate): - (KJS::PreDecResolveNode::evaluate): - (KJS::PreIncConstNode::evaluate): - (KJS::PreDecConstNode::evaluate): - (KJS::PostIncConstNode::evaluate): - (KJS::PostDecConstNode::evaluate): - (KJS::PrefixBracketNode::optimizeVariableAccess): - (KJS::PreIncBracketNode::evaluate): - (KJS::PreDecBracketNode::evaluate): - (KJS::PrefixDotNode::optimizeVariableAccess): - (KJS::PreIncDotNode::evaluate): - (KJS::PreDecDotNode::evaluate): - (KJS::PrefixErrorNode::evaluate): - (KJS::UnaryPlusNode::optimizeVariableAccess): - (KJS::UnaryPlusNode::evaluate): - (KJS::UnaryPlusNode::evaluateToBoolean): - (KJS::UnaryPlusNode::evaluateToNumber): - (KJS::UnaryPlusNode::evaluateToInt32): - (KJS::UnaryPlusNode::evaluateToUInt32): - (KJS::NegateNode::optimizeVariableAccess): - (KJS::NegateNode::evaluate): - (KJS::NegateNode::evaluateToNumber): - (KJS::BitwiseNotNode::optimizeVariableAccess): - (KJS::BitwiseNotNode::inlineEvaluateToInt32): - (KJS::BitwiseNotNode::evaluate): - (KJS::BitwiseNotNode::evaluateToNumber): - (KJS::BitwiseNotNode::evaluateToBoolean): - (KJS::BitwiseNotNode::evaluateToInt32): - (KJS::BitwiseNotNode::evaluateToUInt32): - (KJS::LogicalNotNode::optimizeVariableAccess): - (KJS::LogicalNotNode::evaluate): - (KJS::LogicalNotNode::evaluateToBoolean): - (KJS::MultNode::optimizeVariableAccess): - (KJS::MultNode::inlineEvaluateToNumber): - (KJS::MultNode::evaluate): - (KJS::MultNode::evaluateToNumber): - (KJS::MultNode::evaluateToBoolean): - (KJS::MultNode::evaluateToInt32): - (KJS::MultNode::evaluateToUInt32): - (KJS::DivNode::optimizeVariableAccess): - (KJS::DivNode::inlineEvaluateToNumber): - (KJS::DivNode::evaluate): - (KJS::DivNode::evaluateToNumber): - (KJS::DivNode::evaluateToInt32): - (KJS::DivNode::evaluateToUInt32): - (KJS::ModNode::optimizeVariableAccess): - (KJS::ModNode::inlineEvaluateToNumber): - (KJS::ModNode::evaluate): - (KJS::ModNode::evaluateToNumber): - (KJS::ModNode::evaluateToBoolean): - (KJS::ModNode::evaluateToInt32): - (KJS::ModNode::evaluateToUInt32): - (KJS::throwOutOfMemoryErrorToNumber): - (KJS::addSlowCase): - (KJS::addSlowCaseToNumber): - (KJS::add): - (KJS::addToNumber): - (KJS::AddNode::optimizeVariableAccess): - (KJS::AddNode::evaluate): - (KJS::AddNode::inlineEvaluateToNumber): - (KJS::AddNode::evaluateToNumber): - (KJS::AddNode::evaluateToInt32): - (KJS::AddNode::evaluateToUInt32): - (KJS::AddNumbersNode::inlineEvaluateToNumber): - (KJS::AddNumbersNode::evaluate): - (KJS::AddNumbersNode::evaluateToNumber): - (KJS::AddNumbersNode::evaluateToInt32): - (KJS::AddNumbersNode::evaluateToUInt32): - (KJS::AddStringsNode::evaluate): - (KJS::AddStringLeftNode::evaluate): - (KJS::AddStringRightNode::evaluate): - (KJS::SubNode::optimizeVariableAccess): - (KJS::SubNode::inlineEvaluateToNumber): - (KJS::SubNode::evaluate): - (KJS::SubNode::evaluateToNumber): - (KJS::SubNode::evaluateToInt32): - (KJS::SubNode::evaluateToUInt32): - (KJS::LeftShiftNode::optimizeVariableAccess): - (KJS::LeftShiftNode::inlineEvaluateToInt32): - (KJS::LeftShiftNode::evaluate): - (KJS::LeftShiftNode::evaluateToNumber): - (KJS::LeftShiftNode::evaluateToInt32): - (KJS::LeftShiftNode::evaluateToUInt32): - (KJS::RightShiftNode::optimizeVariableAccess): - (KJS::RightShiftNode::inlineEvaluateToInt32): - (KJS::RightShiftNode::evaluate): - (KJS::RightShiftNode::evaluateToNumber): - (KJS::RightShiftNode::evaluateToInt32): - (KJS::RightShiftNode::evaluateToUInt32): - (KJS::UnsignedRightShiftNode::optimizeVariableAccess): - (KJS::UnsignedRightShiftNode::inlineEvaluateToUInt32): - (KJS::UnsignedRightShiftNode::evaluate): - (KJS::UnsignedRightShiftNode::evaluateToNumber): - (KJS::UnsignedRightShiftNode::evaluateToInt32): - (KJS::UnsignedRightShiftNode::evaluateToUInt32): - (KJS::lessThan): - (KJS::lessThanEq): - (KJS::LessNode::optimizeVariableAccess): - (KJS::LessNode::inlineEvaluateToBoolean): - (KJS::LessNode::evaluate): - (KJS::LessNode::evaluateToBoolean): - (KJS::LessNumbersNode::inlineEvaluateToBoolean): - (KJS::LessNumbersNode::evaluate): - (KJS::LessNumbersNode::evaluateToBoolean): - (KJS::LessStringsNode::inlineEvaluateToBoolean): - (KJS::LessStringsNode::evaluate): - (KJS::LessStringsNode::evaluateToBoolean): - (KJS::GreaterNode::optimizeVariableAccess): - (KJS::GreaterNode::inlineEvaluateToBoolean): - (KJS::GreaterNode::evaluate): - (KJS::GreaterNode::evaluateToBoolean): - (KJS::LessEqNode::optimizeVariableAccess): - (KJS::LessEqNode::inlineEvaluateToBoolean): - (KJS::LessEqNode::evaluate): - (KJS::LessEqNode::evaluateToBoolean): - (KJS::GreaterEqNode::optimizeVariableAccess): - (KJS::GreaterEqNode::inlineEvaluateToBoolean): - (KJS::GreaterEqNode::evaluate): - (KJS::GreaterEqNode::evaluateToBoolean): - (KJS::InstanceOfNode::optimizeVariableAccess): - (KJS::InstanceOfNode::evaluate): - (KJS::InstanceOfNode::evaluateToBoolean): - (KJS::InNode::optimizeVariableAccess): - (KJS::InNode::evaluate): - (KJS::InNode::evaluateToBoolean): - (KJS::EqualNode::optimizeVariableAccess): - (KJS::EqualNode::inlineEvaluateToBoolean): - (KJS::EqualNode::evaluate): - (KJS::EqualNode::evaluateToBoolean): - (KJS::NotEqualNode::optimizeVariableAccess): - (KJS::NotEqualNode::inlineEvaluateToBoolean): - (KJS::NotEqualNode::evaluate): - (KJS::NotEqualNode::evaluateToBoolean): - (KJS::StrictEqualNode::optimizeVariableAccess): - (KJS::StrictEqualNode::inlineEvaluateToBoolean): - (KJS::StrictEqualNode::evaluate): - (KJS::StrictEqualNode::evaluateToBoolean): - (KJS::NotStrictEqualNode::optimizeVariableAccess): - (KJS::NotStrictEqualNode::inlineEvaluateToBoolean): - (KJS::NotStrictEqualNode::evaluate): - (KJS::NotStrictEqualNode::evaluateToBoolean): - (KJS::BitAndNode::optimizeVariableAccess): - (KJS::BitAndNode::evaluate): - (KJS::BitAndNode::inlineEvaluateToInt32): - (KJS::BitAndNode::evaluateToNumber): - (KJS::BitAndNode::evaluateToBoolean): - (KJS::BitAndNode::evaluateToInt32): - (KJS::BitAndNode::evaluateToUInt32): - (KJS::BitXOrNode::optimizeVariableAccess): - (KJS::BitXOrNode::inlineEvaluateToInt32): - (KJS::BitXOrNode::evaluate): - (KJS::BitXOrNode::evaluateToNumber): - (KJS::BitXOrNode::evaluateToBoolean): - (KJS::BitXOrNode::evaluateToInt32): - (KJS::BitXOrNode::evaluateToUInt32): - (KJS::BitOrNode::optimizeVariableAccess): - (KJS::BitOrNode::inlineEvaluateToInt32): - (KJS::BitOrNode::evaluate): - (KJS::BitOrNode::evaluateToNumber): - (KJS::BitOrNode::evaluateToBoolean): - (KJS::BitOrNode::evaluateToInt32): - (KJS::BitOrNode::evaluateToUInt32): - (KJS::LogicalAndNode::optimizeVariableAccess): - (KJS::LogicalAndNode::evaluate): - (KJS::LogicalAndNode::evaluateToBoolean): - (KJS::LogicalOrNode::optimizeVariableAccess): - (KJS::LogicalOrNode::evaluate): - (KJS::LogicalOrNode::evaluateToBoolean): - (KJS::ConditionalNode::optimizeVariableAccess): - (KJS::ConditionalNode::evaluate): - (KJS::ConditionalNode::evaluateToBoolean): - (KJS::ConditionalNode::evaluateToNumber): - (KJS::ConditionalNode::evaluateToInt32): - (KJS::ConditionalNode::evaluateToUInt32): - (KJS::valueForReadModifyAssignment): - (KJS::ReadModifyResolveNode::optimizeVariableAccess): - (KJS::AssignResolveNode::optimizeVariableAccess): - (KJS::ReadModifyLocalVarNode::evaluate): - (KJS::AssignLocalVarNode::evaluate): - (KJS::ReadModifyConstNode::evaluate): - (KJS::AssignConstNode::evaluate): - (KJS::ReadModifyResolveNode::evaluate): - (KJS::AssignResolveNode::evaluate): - (KJS::AssignDotNode::optimizeVariableAccess): - (KJS::AssignDotNode::evaluate): - (KJS::ReadModifyDotNode::optimizeVariableAccess): - (KJS::ReadModifyDotNode::evaluate): - (KJS::AssignErrorNode::evaluate): - (KJS::AssignBracketNode::optimizeVariableAccess): - (KJS::AssignBracketNode::evaluate): - (KJS::ReadModifyBracketNode::optimizeVariableAccess): - (KJS::ReadModifyBracketNode::evaluate): - (KJS::CommaNode::optimizeVariableAccess): - (KJS::CommaNode::evaluate): - (KJS::ConstDeclNode::optimizeVariableAccess): - (KJS::ConstDeclNode::handleSlowCase): - (KJS::ConstDeclNode::evaluateSingle): - (KJS::ConstDeclNode::evaluate): - (KJS::ConstStatementNode::optimizeVariableAccess): - (KJS::ConstStatementNode::execute): - (KJS::statementListExecute): - (KJS::BlockNode::optimizeVariableAccess): - (KJS::BlockNode::execute): - (KJS::EmptyStatementNode::execute): - (KJS::ExprStatementNode::optimizeVariableAccess): - (KJS::ExprStatementNode::execute): - (KJS::VarStatementNode::optimizeVariableAccess): - (KJS::VarStatementNode::execute): - (KJS::IfNode::optimizeVariableAccess): - (KJS::IfNode::execute): - (KJS::IfElseNode::optimizeVariableAccess): - (KJS::IfElseNode::execute): - (KJS::DoWhileNode::optimizeVariableAccess): - (KJS::DoWhileNode::execute): - (KJS::WhileNode::optimizeVariableAccess): - (KJS::WhileNode::execute): - (KJS::ForNode::optimizeVariableAccess): - (KJS::ForNode::execute): - (KJS::ForInNode::optimizeVariableAccess): - (KJS::ForInNode::execute): - (KJS::ContinueNode::execute): - (KJS::BreakNode::execute): - (KJS::ReturnNode::optimizeVariableAccess): - (KJS::ReturnNode::execute): - (KJS::WithNode::optimizeVariableAccess): - (KJS::WithNode::execute): - (KJS::CaseClauseNode::optimizeVariableAccess): - (KJS::CaseClauseNode::evaluate): - (KJS::CaseClauseNode::executeStatements): - (KJS::ClauseListNode::optimizeVariableAccess): - (KJS::CaseBlockNode::optimizeVariableAccess): - (KJS::CaseBlockNode::executeBlock): - (KJS::SwitchNode::optimizeVariableAccess): - (KJS::SwitchNode::execute): - (KJS::LabelNode::optimizeVariableAccess): - (KJS::LabelNode::execute): - (KJS::ThrowNode::optimizeVariableAccess): - (KJS::ThrowNode::execute): - (KJS::TryNode::optimizeVariableAccess): - (KJS::TryNode::execute): - (KJS::ProgramNode::initializeSymbolTable): - (KJS::ScopeNode::optimizeVariableAccess): - (KJS::ProgramNode::processDeclarations): - (KJS::EvalNode::processDeclarations): - (KJS::ProgramNode::execute): - (KJS::EvalNode::execute): - (KJS::FunctionBodyNodeWithDebuggerHooks::execute): - (KJS::FuncDeclNode::execute): - (KJS::FuncExprNode::evaluate): - * kjs/nodes.h: - (KJS::Node::): - (KJS::FalseNode::): - (KJS::TrueNode::): - (KJS::ArgumentsNode::): - -2008-04-23 Oliver Hunt - - Reviewed by Geoff. - - Bug 18672: SQUIRRELFISH: codegen fails with a large number of temporaries - - - Add a SegmentedVector type, which provides a Vector which maintains - existing memory locations during resize. This allows dynamically sizing - local, temporary and label "vectors" in CodeGenerator. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::addVar): - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::newTemporary): - (KJS::CodeGenerator::newLabel): - * VM/CodeGenerator.h: - * VM/SegmentedVector.h: Added. - (KJS::SegmentedVector::SegmentedVector): - (KJS::SegmentedVector::~SegmentedVector): - (KJS::SegmentedVector::last): - (KJS::SegmentedVector::append): - (KJS::SegmentedVector::removeLast): - (KJS::SegmentedVector::size): - (KJS::SegmentedVector::operator[]): - (KJS::SegmentedVector::resize): - (KJS::SegmentedVector::shrink): - (KJS::SegmentedVector::grow): - -2008-04-23 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - A little refactoring in preparation for supporting 'arguments'. - - Fixes 2 regression tests. - - SunSpider reports no change. - - We now check the activation register, instead of the codeBlock, to - determine whether we need to tear off the activation. This is to support - "f.arguments", which will create an activation/arguments pair for f, - even though the needsFullScopeChain flag is false for f's codeBlock. - - The test fixes resulted from calling initializeCallFrame for re-entrant - function code, instead of initializing (not enough) parts of the call - frame by hand. - -2008-04-22 Maciej Stachowiak - - Reviewed by Sam. - - - propagate the "this" value properly to local eval - - (fixes a measly one regression test) - - * VM/CodeBlock.h: - (KJS::CodeBlock::CodeBlock): - (KJS::ProgramCodeBlock::ProgramCodeBlock): - (KJS::EvalCodeBlock::EvalCodeBlock): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-22 Cameron Zwarich - - Reviewed by Maciej. - - Add support for function declarations in eval code. - - (this fixes 12 more regression tests) - - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::execute): - * kjs/nodes.cpp: - (KJS::EvalNode::generateCode): - -2008-04-22 Cameron Zwarich - - Reviewed by Oliver. - - Implement LabelNode. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::pushJumpContext): - (KJS::CodeGenerator::jumpContextForContinue): - (KJS::CodeGenerator::jumpContextForBreak): - * VM/CodeGenerator.h: - * kjs/nodes.cpp: - (KJS::DoWhileNode::emitCode): - (KJS::WhileNode::emitCode): - (KJS::ForNode::emitCode): - (KJS::ForInNode::emitCode): - (KJS::ContinueNode::emitCode): - (KJS::BreakNode::emitCode): - (KJS::SwitchNode::emitCode): - (KJS::LabelNode::emitCode): - -2008-04-22 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed crash when unwinding from exceptions inside eval. - - * VM/Machine.cpp: - (KJS::Machine::unwindCallFrame): Don't assume that the top of the - current call frame's scope chain is an activation: it can be the global - object, instead. - -2008-04-22 Maciej Stachowiak - - Reviewed by Geoff. - - * kjs/testkjs.cpp: - (main): Convert signals to exit codes, so that crashing tests are - detected as regression test failures. - -2008-04-22 Geoffrey Garen - - Reviewed by Oliver Hunt and Maciej Stachowiak. - - Renamed "needsActivation" to "needsFullScopeChain" because lying will - make hair grow on the backs of your hands. - -2008-04-21 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed ScopeChainNode lifetime problems: - - (1) In "with" and "catch" scopes, we would construct a ScopeChain - object and then jump across its destructor, leaking the ScopeChainNode - we had pushed. - - (2) In global and eval scopes, we would fail to initially ref - "scopeChain", causing us to overrelease it later. Now that we ref - "scopeChain" properly, we also need to deref it when the script - terminates. - - SunSpider reports a .2% regression, but an earlier round of ScopeChain - refactoring was a .4% speedup, so there. - -2008-04-22 Maciej Stachowiak - - Reviewed by Alexey. - - - use global object instead of null for "this" on unqualified calls - - This fixes 10 more JSC test regressions. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-22 Maciej Stachowiak - - Reviewed by Oliver. - - - throw proper exceptions for objects that don't implement call or construct - - This fixes 21 more JSC test regressions. It is also seemingly an - 0.5% progression. - - * VM/ExceptionHelpers.cpp: - (KJS::createNotAnObjectError): - (KJS::createNotAConstructorError): - (KJS::createNotAFunctionError): - * VM/ExceptionHelpers.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-21 Oliver Hunt - - Reviewed by Geoff. - - Implement emitCode for ConstDeclNode. - - This fixes the crash (assertion) in js1_5/Scope/scope-001.js - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::registerForLocalConstInit): - * VM/CodeGenerator.h: - * kjs/nodes.cpp: - (KJS::AssignResolveNode::emitCode): - (KJS::ConstDeclNode::emitCodeSingle): - (KJS::ConstDeclNode::emitCode): - (KJS::ConstStatementNode::emitCode): - * kjs/nodes.h: - -2008-04-21 Maciej Stachowiak - - Reviewed by Sam. - - - add some support for the split window object - - This fixes many layout tests. - - * VM/Machine.cpp: - (KJS::resolveBaseAndFunc): Use toThisObject() to ensure we get the - wrapper global, if one exists, as the "this" object. - * kjs/function.cpp: - (KJS::globalFuncEval): Use toGlobalObject() to handle the wrapper - case properly. - -2008-04-21 Maciej Stachowiak - - Reviewed by Oliver. - - - restore ScopeChain::operator= to avoid crash on many layout tests - - Otherwise, FunctionImp::setScope would cause a reference - underflow. I implemented using the copy construct and swap idiom. - - * kjs/scope_chain.h: - (KJS::ScopeChain::swap): - (KJS::ScopeChain::operator=): - -2008-04-21 Oliver Hunt - - Reviewed by Geoff. - - Bug 18649: SQUIRRELFISH: correctly handle exceptions in eval code - - - Allocate a callframe for eval() and initialise with a null codeBlock to - indicate native code. This prevents the unwinder from clobbering the - register stack. - - * VM/Machine.cpp: - (KJS::Machine::execute): - -2008-04-21 Geoffrey Garen - - Reviewed by Sam Weinig. - - Removed ScopeChain::push(ScopeChain&) because it was unused. Moved - ScopeChain::print to ScopeChainNode. - - ScopeChain is now nothing more than a resource-handling wrapper around - ScopeChainNode. - -2008-04-21 Cameron Zwarich - - Reviewed by Maciej. - - Bug 18671: SquirrelFish: continue inside switch fails - - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::jumpContextForLabel): - * VM/CodeGenerator.h: - * kjs/nodes.cpp: - (KJS::ContinueNode::emitCode): - -2008-04-21 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved push(JSObject*) and pop() from ScopeChain to ScopeChainNode, - rearranging scope_chain.h a bit. - - SunSpider reports no change. - -2008-04-21 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved bottom() from ScopeChain to ScopeChainNode, simplifying it based - on the knowledge that the ScopeChain is never empty. - - SunSpider reports no change. - -2008-04-21 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Moved begin() and end() from ScopeChain to ScopeChainNode. - - Also marked a few methods "const". - - SunSpider reports no change. - -2008-04-21 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Turned ScopeChain::depth into a stand-alone function, and simplified it - a bit. - - I also moved ScopeChain::depth to Machine.cpp because it doesn't report - the true depth of the ScopeChain -- just the Machine's perspective of - its depth within a given call frame. - - SunSpider reports no change. - -2008-04-21 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Removed indirection in ScopeChain::ref / ScopeChain::deref. - - SunSpider reports no change. - - * kjs/scope_chain.h: - (KJS::ScopeChain::ScopeChain): - (KJS::ScopeChain::~ScopeChain): - (KJS::ScopeChain::clear): - -2008-04-21 Oliver Hunt - - Fix debug build - - * kjs/nodes.cpp: - (KJS::ConstDeclNode::evaluateSingle): - -2008-04-21 Cameron Zwarich - - Reviewed by Oliver. - - Bug 18664: SQUIRRELFISH: correctly throw a SyntaxError when parsing of eval code fails - - - Correctly throw a SyntaxError when parsing of eval code fails. - - * VM/Machine.cpp: - (KJS::eval): - -2008-04-21 Oliver Hunt - - Reviewed by Geoff. - - Partial fix for Bug 18649: SQUIRRELFISH: correctly handle exceptions in eval code - - Make sure we correct the register state before jumping to vm_throw. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-21 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Simplified ScopeChain ref/deref. - - SunSpider reports a .4% speedup. - - * kjs/scope_chain.h: - (KJS::ScopeChainNode::ref): Removed this function because it was nonsense. - ScopeChainNodes are initialized with a refCount of 1, so the loop was - guaranteed to iterate exactly once. - -2008-04-21 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Removed support for empty ScopeChains. - - SunSpider reports no change. - -2008-04-21 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Removed some completely unused ScopeChain member functions. - - SunSpider reports no change. - -2008-04-21 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Avoid creating unnecessary ScopeChain objects, to reduce refcount churn. - - SunSpider reports no change. - -2008-04-21 Maciej Stachowiak - - Rubber stamped by Alexey. - - Add some braces.x - - * kjs/testkjs.cpp: - (runWithScripts): - -2008-04-21 Maciej Stachowiak - - Reviewed by Oliver. - - - only print "End:" output when -d flag is passed. - - This fixes half of our failing JSC regression tests. - - * kjs/testkjs.cpp: - (runWithScripts): - -2008-04-21 Cameron Zwarich - - Reviewed by Maciej. - - Add support for variable declarations in eval code. - - * VM/CodeBlock.h: - (KJS::EvalCodeBlock::EvalCodeBlock): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::execute): - * VM/Machine.h: - * kjs/function.cpp: - (KJS::globalFuncEval): - * kjs/nodes.cpp: - (KJS::EvalNode::generateCode): - * kjs/nodes.h: - (KJS::EvalNode::): - -2008-04-20 Oliver Hunt - - Reviewed by Maciej. - - Throw exceptions for invalid continue, break, and return statements. - - Simple refactoring and extension of Cameron's AssignErrorNode, etc patch - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::pushJumpContext): - (KJS::CodeGenerator::popJumpContext): - (KJS::CodeGenerator::jumpContextForLabel): - * VM/CodeGenerator.h: - * kjs/nodes.cpp: - (KJS::Node::emitThrowError): - (KJS::ContinueNode::emitCode): - (KJS::BreakNode::emitCode): - (KJS::ReturnNode::emitCode): - * kjs/nodes.h: - -2008-04-20 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Removed Machine.cpp from AllInOneFile.cpp, and manually inlined a few - things that used to be inlined automatically. - - 1.9% speedup on SunSpider. - - My hope is that we'll face fewer surprises in Machine.cpp codegen, now - that GCC is making fewer decisions. The speedup seems to confirm that. - -2008-04-20 Oliver Hunt - - Reviewed by Maciej. - - Bug 18642: Iterator context may get placed into the return register, leading to much badness - - - To prevent incorrectly reusing what will become the result register for - eval and global code execution, we need to request and ref the destination - in advance of codegen. Unfortunately this may lead to unnecessary copying, - although in future we can probably limit this. Curiously SunSpider shows - a progression in a number of tests, although it comes out as a wash overall. - - * kjs/nodes.cpp: - (KJS::EvalNode::emitCode): - (KJS::ProgramNode::emitCode): - -2008-04-20 Cameron Zwarich - - Reviewed by Maciej. - - Add support for AssignErrorNode, PrefixErrorNode, and PostfixErrorNode. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitCreateError): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::PostfixErrorNode::emitCode): - (KJS::PrefixErrorNode::emitCode): - (KJS::AssignErrorNode::emitCode): - * kjs/nodes.h: - -2008-04-20 Oliver Hunt - - Reviewed by Geoff and Mark. - - Provide line number information in exceptions - - Simple patch, adds line number information metadata to CodeBlock - and a simple method to get the line number responsible for a given - Instruction*. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::lineNumberForVPC): - * VM/CodeBlock.h: - * VM/CodeGenerator.h: - (KJS::CodeGenerator::emitNode): - * VM/Machine.cpp: - (KJS::Machine::throwException): - -2008-04-20 Oliver Hunt - - Reviewed by Maciej. - - Provide "sourceURL" in exceptions - - * VM/CodeBlock.h: - * VM/Machine.cpp: - (KJS::Machine::throwException): - * kjs/nodes.cpp: - (KJS::EvalNode::generateCode): - (KJS::ProgramNode::generateCode): - -2008-04-19 Oliver Hunt - - Reviewed by Maciej. - - Don't call emitCode directly on subnodes, instead use CodeGenerator::emitNode - - This patch just a preparation for tracking line numbers. - - * kjs/nodes.cpp: - (KJS::ObjectLiteralNode::emitCode): - (KJS::PropertyListNode::emitCode): - (KJS::ArgumentListNode::emitCode): - (KJS::TryNode::emitCode): - -2008-04-19 Oliver Hunt - - Reviewed by Maciej. - - Bug 18619: Support continue, break, and return in try .. finally blocks - - - This patch replaces the current partial finally support (which uses code - duplication to achieve what it does) with a subroutine based approach. - This has a number of advantages over code duplication: - * Reduced code size - * Simplified exception handling as the finaliser code only exists in - one place, so no "magic" is needed to get the correct handler for a - finaliser. - * When we support instruction to line number mapping we won't need to - worry about the dramatic code movement caused by duplication - - On the downside it is necessary to add two new opcodes, op_jsr and op_sret - to enter and exit the finaliser subroutines, happily SunSpider reports - a performance progression (gcc amazes me) and ubench reports a wash. - - While jsr and sret provide a mechanism that allows us to enter and exit - any arbitrary finaliser we need to, it was still necessary to increase - the amount of information tracked when entering and exiting both finaliser - scopes and dynamic scopes ("with"). This means "scopeDepth" is now - the combination of "finaliserDepth" and "dynamicScopeDepth". We also - now use a scopeContextStack to ensure that we pop scopes and execute - finalisers in the correct order. This increases the cost of "with" nodes - during codegen, but it should not be significant enough to effect real - world performance and greatly simplifies codegen for return, break and - continue when interacting with finalisers. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - Pretty printing of jsr/sret opcodes - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::emitPushScope): - (KJS::CodeGenerator::emitPopScope): - Dynamic scopes need to be tracked on the scopeContextStack now - - (KJS::CodeGenerator::pushFinallyContext): - (KJS::CodeGenerator::popFinallyContext): - Handle entry and exit from code regions with finalisers. This is - needed solely to support return, continue and break inside finaliser - regions. - - (KJS::CodeGenerator::emitComplexJumpScopes): - Helper function for emitJumpScopes to handle the complex codegen - needed to handle return, continue and break inside a finaliser region - - (KJS::CodeGenerator::emitJumpScopes): - Updated to be aware of finalisers, if a cross-scope jump occurs inside - a finaliser we hand off codegen to emitComplexJumpScopes, otherwise - we can handle the normal (trivial) case with a single instruction. - - (KJS::CodeGenerator::emitJumpSubroutine): - (KJS::CodeGenerator::emitSubroutineReturn): - Trivial opcode emitter functions. - - * VM/CodeGenerator.h: - (KJS::CodeGenerator::scopeDepth): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - Implement op_jsr and op_sret. - - * VM/Opcode.h: - Ad op_jsr and op_sret - - * kjs/nodes.cpp: - (KJS::TryNode::emitCode): - Fix codegen for new finaliser model. - -2008-04-17 Mark Rowe - - Rubber-stamped by Oliver Hunt. - - Remove unnecessary files from testkjs, testapi and minidom targets. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-04-17 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed ASSERT seen during run-sunspider of a debug build. - - * VM/CodeGenerator.h: Made the default codegen buffers bigger. SunSpider - runs all tests in one global environment, so you end up with more than - 128 locals. This is just a stop-gap until we code up a real - solution to arbitrary symbol and label limits. - -2008-04-17 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed a bug in exception unwinding, where we wouldn't deref the scope - chain in global scope, so we would leak ScopeChainNodes when exceptions - were thrown inside "with" and "catch" scopes. - - Also did some cleanup of the unwinding code along the way. - - Scope chain reference counting is still wrong in a few ways. I thought - I would fix this portion of it first. - - run-sunspider shows no change. - - * VM/Machine.cpp: - (KJS::Machine::unwindCallFrame): - (KJS::Machine::throwException): - (KJS::Machine::privateExecute): - * VM/Machine.h: - -2008-04-17 Oliver Hunt - - Reviewed by Maciej. - - Add more exception checking to toNumber conversions - - This corrects op_pre_dec, op_negate, op_mod and op_sub. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-17 Geoffrey Garen and Cameron Zwarich - - Reviewed by Oliver Hunt. - - Behold: eval. - - Introduced a new opcode: op_call_eval. In the normal case, it performs - an eval. In the case where eval has been overridden in some way, it - performs a function call. - - * VM/CodeGenerator.h: Added a feature so the code generator knows not - to optimized locals in eval code. - -2008-04-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added some ASSERTs to document codegen failures in - run-javascriptcore-tests. - - For all tests, program-level codegen now either succeeds, or fails with - an ASSERT. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::addVar): - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::newTemporary): - (KJS::CodeGenerator::newLabel): - -2008-04-17 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed another case of a dst register being an unreferenced temporary - (caused an ASSERT when running the full sunspider suite). - - * kjs/nodes.cpp: - (KJS::CaseBlockNode::emitCodeForBlock): - -2008-04-16 Maciej Stachowiak - - Reviewed by Geoff. - - - add documentation (and meaningful parameter names) for arithmetic and bitwise binary ops - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitMul): - (KJS::CodeGenerator::emitDiv): - (KJS::CodeGenerator::emitMod): - (KJS::CodeGenerator::emitSub): - (KJS::CodeGenerator::emitLeftShift): - (KJS::CodeGenerator::emitRightShift): - (KJS::CodeGenerator::emitUnsignedRightShift): - (KJS::CodeGenerator::emitBitAnd): - (KJS::CodeGenerator::emitBitXOr): - (KJS::CodeGenerator::emitBitOr): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::MultNode::emitCode): - (KJS::DivNode::emitCode): - (KJS::ModNode::emitCode): - (KJS::SubNode::emitCode): - (KJS::LeftShiftNode::emitCode): - (KJS::RightShiftNode::emitCode): - (KJS::UnsignedRightShiftNode::emitCode): - (KJS::BitAndNode::emitCode): - (KJS::BitXOrNode::emitCode): - (KJS::BitOrNode::emitCode): - (KJS::emitReadModifyAssignment): - (KJS::ReadModifyResolveNode::emitCode): - -2008-04-16 Oliver Hunt - - Reviewed by Geoff. - - Exception checks for toNumber in op_pre_inc - - This is somewhat more convoluted than the simple hadException checks - we currently use. Instead we use special toNumber conversions that - select between the exception and ordinary vPC. This allows us to - remove any branches in the common case (incrementing a number). - - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (KJS::::toNumber): - * ChangeLog: - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/JSPropertyNameIterator.cpp: - (KJS::JSPropertyNameIterator::toNumber): - * VM/JSPropertyNameIterator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - * kjs/ExecState.h: - * kjs/JSNotAnObject.cpp: - (KJS::JSNotAnObject::toNumber): - * kjs/JSNotAnObject.h: - * kjs/internal.cpp: - (KJS::StringImp::toNumber): - (KJS::NumberImp::toNumber): - (KJS::GetterSetterImp::toNumber): - * kjs/internal.h: - * kjs/object.cpp: - (KJS::JSObject::toNumber): - * kjs/object.h: - * kjs/value.h: - (KJS::JSValue::toNumber): - -2008-04-16 Maciej Stachowiak - - Reviewed by Geoff. - - - ensure that activations are kept in a register to protect them from GC - - Also renamed OptionalCalleeScopeChain constant to OptionalCalleeActivation, since - that is what is now kept there, and there is no more need to keep the scope chain in - the register file. - - * VM/Machine.cpp: - (KJS::initializeCallFrame): - (KJS::scopeChainForCall): - * VM/Machine.h: - (KJS::Machine::): - -2008-04-16 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Made "this" work in program code / global scope. - - The machine can initialize "this" prior to execution because it knows - that, for program code, "this" is always stored in lr1. - - * VM/Machine.cpp: - (KJS::Machine::execute): - * VM/Machine.h: - (KJS::Machine::): - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - -2008-04-16 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed a codegen bug when returning from inside a dynamic scope (a with - or catch block): we need to pop any dynamic scope(s) that have been - added so op_ret can find the activation object at the top of the scope - chain. - - * kjs/nodes.cpp: - (KJS::ReturnNode::emitCode): If we're returning from inside a dynamic - scope, emit a jmp_scopes to take care of popping any dynamic scope(s) - and then branching to the return instruction. - -2008-04-16 Maciej Stachowiak - - Reviewed by Geoff. - - - document the add and get_prop_id opcodes - - In addition to adding documentation in comments, I changed - references to register IDs or indices relating to these opcodes to - have meaningful names instead of r0 r1 r2. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitAdd): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/nodes.cpp: - (KJS::DotAccessorNode::emitCode): - (KJS::FunctionCallDotNode::emitCode): - (KJS::PostIncDotNode::emitCode): - (KJS::PostDecDotNode::emitCode): - (KJS::PreIncDotNode::emitCode): - (KJS::PreDecDotNode::emitCode): - (KJS::AddNode::emitCode): - (KJS::ReadModifyDotNode::emitCode): - -2008-04-15 Geoffrey Garen - - Reviewed by Oliver Hunt and Maciej Stachowiak. - - Fixed a codegen bug in with and switch, and added an ASSERT to - make sure it doesn't happen again. - - emitCode() assumes that dst, if non-zero, is either referenced or - non-temporary (i.e., it assumes that newTemporary() will return a - register not equal to dst). Certain callers to emitCode() weren't - guaranteeing that to be so, so temporary register values were being - overwritten. - - * VM/CodeGenerator.h: - (KJS::CodeGenerator::emitNode): ASSERT that dst is referenced or non-temporary. - - * kjs/nodes.cpp: - (KJS::CommaNode::emitCode): Reference the dst we pass. - - (KJS::WithNode::emitCode): No need to pass an explicit dst register. - - (KJS::CaseBlockNode::emitCodeForBlock): No need to pass an explicit dst register. - (KJS::SwitchNode::emitCode): No need to pass an explicit dst register. - - * kjs/nodes.h: Made dst the last parameter to emitCodeForBlock, to match - emitCode. - -2008-04-15 Oliver Hunt - - Reviewed by Maciej. - - Bug 18526: Throw exceptions when resolve fails for op_resolve_base_and_func. - - - Very simple fix, sunspider shows a 0.7% progression, ubench shows a 0.4% regression. - - * VM/Machine.cpp: - (KJS::resolveBaseAndFunc): - (KJS::Machine::privateExecute): - -2008-04-15 Maciej Stachowiak - - Reviewed by Oliver. - - - fix incorrect result on 3d-raytrace test - - Oliver found and tracked down this bug, I just typed in the fix. - - * VM/Machine.cpp: - (KJS::slideRegisterWindowForCall): When setting omitted parameters to undefined, - account for the space for local variables. - -2008-04-15 Maciej Stachowiak - - Reviewed by Oliver. - - - fix codegen handling of dst registers - - 1.006x speedup (not sure why). - - Most emitCode functions take an optional "dst" parameter that says - where the output of the instruction should be written. I made some - functions for convenient handling of the dst register: - - * VM/CodeGenerator.h: - (KJS::CodeGenerator::tempDestination): Takes the dst register. Returns it if - it is not null and is a temporary, otherwise allocates a new temporary. This is - intended for cases where an intermediate value might be written into the dst - - (KJS::CodeGenerator::finalDestination): Takes the dst register and an optional - register that was used as a temp destination. Picks the right thing for the final - output. Intended to be used as the output register for the instruction that generates - the final value of a particular node. - - (KJS::CodeGenerator::moveToDestinationIfNeeded): Takes dst and a - RegisterID; moves from the register to dst if dst is defined and - different from the register. This is intended for cases where the - result of a node is already in a specific register (likely a - local), and so no code needs to be generated unless a specific - destination has been requested, in which case a move is needed. - - I also applied these methods throughout emitCode functions. In - some cases this was just cleanup, in other cases I fixed actual - codegen bugs. Below I have given specific comments for the cases - where I believe I fixed a codegen bug, or improved quality of codegen. - - * kjs/nodes.cpp: - (KJS::NullNode::emitCode): - (KJS::FalseNode::emitCode): - (KJS::TrueNode::emitCode): - (KJS::NumberNode::emitCode): - (KJS::StringNode::emitCode): - (KJS::RegExpNode::emitCode): - (KJS::ThisNode::emitCode): Now avoids emitting a mov when dst is - the same as the this register (the unlikely case of "this = this"); - (KJS::ResolveNode::emitCode): Now avoids emitting a mov when dst - is the same as the local regiester, in the local var case (the - unlikely case of "x = x"); - (KJS::ArrayNode::emitCode): Fixed a codegen bug where array - literal element expressions may have observed an intermediate - value of constructing the array. - (KJS::ObjectLiteralNode::emitCode): - (KJS::PropertyListNode::emitCode): Fixed a codegen bug where object literal - property definition expressions may have obesrved an intermediate value of - constructing the object. - (KJS::BracketAccessorNode::emitCode): - (KJS::DotAccessorNode::emitCode): - (KJS::NewExprNode::emitCode): - (KJS::FunctionCallValueNode::emitCode): - (KJS::FunctionCallBracketNode::emitCode): - (KJS::FunctionCallDotNode::emitCode): - (KJS::PostIncResolveNode::emitCode): - (KJS::PostDecResolveNode::emitCode): - (KJS::PostIncBracketNode::emitCode): - (KJS::PostDecBracketNode::emitCode): - (KJS::PostIncDotNode::emitCode): - (KJS::PostDecDotNode::emitCode): - (KJS::DeleteResolveNode::emitCode): - (KJS::DeleteBracketNode::emitCode): - (KJS::DeleteDotNode::emitCode): - (KJS::DeleteValueNode::emitCode): - (KJS::VoidNode::emitCode): - (KJS::TypeOfResolveNode::emitCode): - (KJS::TypeOfValueNode::emitCode): - (KJS::PreIncResolveNode::emitCode): Fixed a codegen bug where the final - value would not be output to the dst register in the local var case. - (KJS::PreDecResolveNode::emitCode): Fixed a codegen bug where the final - value would not be output to the dst register in the local var case. - (KJS::PreIncBracketNode::emitCode): - (KJS::PreDecBracketNode::emitCode): - (KJS::PreIncDotNode::emitCode): - (KJS::PreDecDotNode::emitCode): - (KJS::UnaryPlusNode::emitCode): - (KJS::NegateNode::emitCode): - (KJS::BitwiseNotNode::emitCode): - (KJS::LogicalNotNode::emitCode): - (KJS::MultNode::emitCode): - (KJS::DivNode::emitCode): - (KJS::ModNode::emitCode): - (KJS::AddNode::emitCode): - (KJS::SubNode::emitCode): - (KJS::LeftShiftNode::emitCode): - (KJS::RightShiftNode::emitCode): - (KJS::UnsignedRightShiftNode::emitCode): - (KJS::LessNode::emitCode): - (KJS::GreaterNode::emitCode): - (KJS::LessEqNode::emitCode): - (KJS::GreaterEqNode::emitCode): - (KJS::InstanceOfNode::emitCode): - (KJS::InNode::emitCode): - (KJS::EqualNode::emitCode): - (KJS::NotEqualNode::emitCode): - (KJS::StrictEqualNode::emitCode): - (KJS::NotStrictEqualNode::emitCode): - (KJS::BitAndNode::emitCode): - (KJS::BitXOrNode::emitCode): - (KJS::BitOrNode::emitCode): - (KJS::LogicalAndNode::emitCode): - (KJS::LogicalOrNode::emitCode): - (KJS::ConditionalNode::emitCode): - (KJS::emitReadModifyAssignment): Allow an out argument separate from the operands, - needed for fixes below. - (KJS::ReadModifyResolveNode::emitCode): Fixed a codegen bug where the right side of - the expression may observe an intermediate value. - (KJS::AssignResolveNode::emitCode): Fixed a codegen bug where the right side of the - expression may observe an intermediate value. - (KJS::ReadModifyDotNode::emitCode): Fixed a codegen bug where the right side of the - expression may observe an intermediate value. - (KJS::ReadModifyBracketNode::emitCode): Fixed a codegen bug where the right side of the - expression may observe an intermediate value. - (KJS::CommaNode::emitCode): Avoid writing temporary value to dst register. - (KJS::ReturnNode::emitCode): Void return should return undefined, not null. - (KJS::FuncExprNode::emitCode): - -2008-04-15 Maciej Stachowiak - - Reviewed by Geoff. - - - fix huge performance regression (from trunk) in string-unpack-code - - This restores string-unpack-code performance to parity with - trunk (2.27x speedup relative to previous SquirrelFish) - - * VM/Machine.cpp: - (KJS::Machine::execute): Shrink register file after call to avoid - growing repeatedly. - -2008-04-15 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed dumpCallFrame to match our new convention of passing around a - ScopeChainNode* instead of a ScopeChain*. - - * JavaScriptCore.exp: - * VM/Machine.cpp: - (KJS::Machine::dumpCallFrame): - * VM/Machine.h: - -2008-04-15 Oliver Hunt - - Reviewed by Maciej. - - Bug 18436: Need to throw exception on read/modify/write or similar resolve for nonexistent property - - - Add op_resolve_base_and_property for read/modify/write operations, - this adds a "superinstruction" to resolve the base and value of a - property simultaneously. Just using resolveBase and resolve results - in an 5% regression in ubench, 30% in loop-empty-resolve (which is - expected). 1.3% progression in sunspider, 2.1% in ubench, with a - 21% gain in loop-empty-resolve. The only outlier is function-missing-args - which gets a 3% regression that I could never resolve. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitResolveBaseAndProperty): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::resolveBaseAndProperty): - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::PostIncResolveNode::emitCode): - (KJS::PostDecResolveNode::emitCode): - (KJS::PreIncResolveNode::emitCode): - (KJS::PreDecResolveNode::emitCode): - (KJS::ReadModifyResolveNode::emitCode): - -2008-04-15 Maciej Stachowiak - - Reviewed by Oliver. - - - fixed "SquirrelFish crashes due to bad scope chain on some SunSpider tests" - https://bugs.webkit.org/show_bug.cgi?id=18508 - - 3d-raytrace and string-unpack-code now run. - - The basic approach is to pass around ScopeChainNode* instead of - ScopeChain*, which in addition to not becoming suddenly an invalid - pointer also saves an indirection. - - This is an 0.4% speedup on SunSpider --squirrelfish (1.8% on --ubench) - - * VM/Machine.cpp: - (KJS::resolve): - (KJS::resolveBase): - (KJS::resolveBaseAndFunc): - (KJS::initializeCallFrame): - (KJS::scopeChainForCall): - (KJS::Machine::unwindCallFrame): - (KJS::Machine::throwException): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * VM/Machine.h: - * VM/Register.h: - (KJS::Register::): - * kjs/nodes.cpp: - (KJS::EvalNode::generateCode): - (KJS::FunctionBodyNode::generateCode): - (KJS::ProgramNode::generateCode): - (KJS::ProgramNode::processDeclarations): - (KJS::EvalNode::processDeclarations): - (KJS::FuncDeclNode::makeFunction): - (KJS::FuncExprNode::makeFunction): - * kjs/nodes.h: - (KJS::ProgramNode::): - (KJS::EvalNode::): - (KJS::FunctionBodyNode::): - * kjs/object.h: - * kjs/scope_chain.h: - (KJS::ScopeChainNode::ScopeChainNode): - (KJS::ScopeChainNode::deref): - (KJS::ScopeChainIterator::ScopeChainIterator): - (KJS::ScopeChainIterator::operator*): - (KJS::ScopeChainIterator::operator->): - (KJS::ScopeChain::ScopeChain): - (KJS::ScopeChain::node): - (KJS::ScopeChain::deref): - (KJS::ScopeChain::ref): - (KJS::ScopeChainNode::ref): - (KJS::ScopeChainNode::release): - (KJS::ScopeChainNode::begin): - (KJS::ScopeChainNode::end): - -2008-04-14 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed crash when accessing registers in a torn-off activation object. - - * kjs/JSActivation.cpp: - (KJS::JSActivation::copyRegisters): Update our registerOffset after - copying our registers, since our offset should now be relative to - our private register array, not the shared register file. - -2008-04-14 Maciej Stachowiak - - Reviewed by Oliver. - - - fix a codegen flaw that makes some tests run way too fast or way too slow - - The basic problem was that FunctionCallResolveNode results in - codegen which can incorrectly write an intermediate value into the - dst register even when that is a local. I added convenience - functions to CodeGenerator for getting this right, but for now I - only fixed FunctionCallResolve. - - * VM/CodeGenerator.h: - (KJS::CodeGenerator::tempDestination): - (KJS::CodeGenerator::): - * kjs/nodes.cpp: - (KJS::FunctionCallResolveNode::emitCode): - -2008-04-14 Gabor Loki - - Reviewed and slightly tweaked by Geoffrey Garen. - - Bug 18489: Squirrelfish doesn't build on linux - - - * JavaScriptCore.pri: Add VM into include path and its files into - source set - * VM/JSPropertyNameIterator.cpp: Fix include name - * VM/Machine.cpp: Add UNLIKELY macro for GCC - * VM/Machine.h: Add missing includes - * VM/RegisterFile.cpp: Add missing include - * kjs/testkjs.pro: Add VM into include path - -2008-04-14 Geoffrey Garen - - Reviewed by Sam Weinig. - - Restored OwnPtr in some places where I had removed it previously. We - can have an OwnPtr to an undefined class in a header as long as the - class's destructor isn't in the header. - -2008-04-14 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed access to "this" inside dynamic scopes. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::registerForLocal): Always return a register for - "this", even if we're not optimizing access to other locals. Because - "this" is a keyword, it's always in a register and always accessible. - - * VM/CodeGenerator.h: - (KJS::CodeGenerator::shouldOptimizeLocals): Factored out a function - for determining whether we should optimize access to locals, since - eval will need to make this test a little more complicated. - -2008-04-14 Maciej Stachowiak - - Reviewed by Adam. - - - fix crash when running SunSpider full harness - - When growing the register file's buffer to make space for new globals, - make sure to copy accounting for the fact that the new space is logically - at the beginning of the buffer in this case, instead of at the end as when - growing for a new call frame. - - * VM/RegisterFile.cpp: - (KJS::RegisterFile::newBuffer): - (KJS::RegisterFile::growBuffer): - (KJS::RegisterFile::addGlobalSlots): - * VM/RegisterFile.h: - -2008-04-11 Geoffrey Garen - - Reviewed by Sam Weinig. - - Mark constant pools for global and eval code (collectively known as - "program code"). (Constant pools for function code are already marked by - their functions.) - - The global object is responsible for marking program code constant - pools. Code blocks add themselves to the mark set at creation time, and - remove themselves from the mark set at destruction time. - - sunspider --squirrelfish reports a 1% speedup, perhaps because - generateCode() is now non-virtual. - - * kjs/nodes.cpp: I had to use manual init and delete in this file - because putting an OwnPtr into the header would have created a circular - header dependency. - -2008-04-10 Cameron Zwarich - - Reviewed by Maciej. - - Bug 18231: Improve support for function call nodes in SquirrelFish - - - Use correct value of 'this' for function calls. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitResolveBaseAndFunc): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::resolveBaseAndFunc): - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::FunctionCallResolveNode::emitCode): - -2008-04-10 Geoffrey Garen - - This time for sure. - - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - -2008-04-10 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed Interpreter::execute to honor the new model for returning non-NULL - values when an exception is thrown. - - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - -2008-04-10 Oliver Hunt - - Reviewed by Geoff. - - Fix SquirrelFish interpreter to pass internal exceptions back to - native code correctly. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-10 Sam Weinig - - Reviewed by Geoffrey Garen. - - Replace the use of getCallData in op_construct with the new - getConstructData function that replaces implementsConstruct. - - * API/JSCallbackConstructor.cpp: - (KJS::JSCallbackConstructor::getConstructData): - * API/JSCallbackConstructor.h: - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (KJS::::getConstructData): - (KJS::::construct): - * API/JSObjectRef.cpp: - (JSObjectIsConstructor): - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/CallData.h: - * kjs/ConstructData.h: Copied from JavaScriptCore/kjs/CallData.h. - * kjs/array_object.cpp: - (KJS::ArrayObjectImp::getConstructData): - * kjs/array_object.h: - * kjs/bool_object.cpp: - (KJS::BooleanObjectImp::getConstructData): - * kjs/bool_object.h: - * kjs/date_object.cpp: - (KJS::DateObjectImp::getConstructData): - * kjs/date_object.h: - * kjs/error_object.cpp: - (KJS::ErrorObjectImp::getConstructData): - (KJS::NativeErrorImp::getConstructData): - * kjs/error_object.h: - * kjs/function.cpp: - (KJS::FunctionImp::getCallData): - (KJS::FunctionImp::getConstructData): - (KJS::FunctionImp::construct): - * kjs/function.h: - * kjs/function_object.cpp: - (KJS::FunctionObjectImp::getConstructData): - * kjs/function_object.h: - * kjs/nodes.cpp: - (KJS::NewExprNode::inlineEvaluate): - * kjs/number_object.cpp: - (KJS::NumberObjectImp::getConstructData): - * kjs/number_object.h: - * kjs/object.cpp: - * kjs/object.h: - * kjs/object_object.cpp: - (KJS::ObjectObjectImp::getConstructData): - * kjs/object_object.h: - * kjs/regexp_object.cpp: - (KJS::RegExpObjectImp::getConstructData): - * kjs/regexp_object.h: - * kjs/string_object.cpp: - (KJS::StringObjectImp::getConstructData): - * kjs/string_object.h: - * kjs/value.cpp: - (KJS::JSCell::getConstructData): - * kjs/value.h: - (KJS::JSValue::getConstructData): - -2008-04-10 Oliver Hunt - - Reviewed by Geoff. - - Bug 18420: SquirrelFish: need to throw Reference and Type errors - when attempting invalid operations on JSValues - - Add validation and exception checks to SquirrelFish so that the - correct exceptions are thrown for undefined variables, type errors - and toObject failure. Also handle exceptions thrown by native - function calls. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/ExceptionHelpers.cpp: Added. - (KJS::substitute): - (KJS::createError): - (KJS::createUndefinedVariableError): - * VM/ExceptionHelpers.h: Added. - Helper functions - * VM/Machine.cpp: - (KJS::resolve): - Modified to signal failure - (KJS::isNotObject): - Wrapper for JSValue::isObject and exception creation (these need - to be merged, lest GCC go off the deep end) - (KJS::Machine::privateExecute): - Adding the many exception and validity checks. - - * kjs/JSNotAnObject.cpp: Added. - Stub object used to reduce the need for multiple exception checks - when toObject fails. - (KJS::JSNotAnObject::toPrimitive): - (KJS::JSNotAnObject::getPrimitiveNumber): - (KJS::JSNotAnObject::toBoolean): - (KJS::JSNotAnObject::toNumber): - (KJS::JSNotAnObject::toString): - (KJS::JSNotAnObject::toObject): - (KJS::JSNotAnObject::mark): - (KJS::JSNotAnObject::getOwnPropertySlot): - (KJS::JSNotAnObject::put): - (KJS::JSNotAnObject::deleteProperty): - (KJS::JSNotAnObject::defaultValue): - (KJS::JSNotAnObject::construct): - (KJS::JSNotAnObject::callAsFunction): - (KJS::JSNotAnObject::getPropertyNames): - * kjs/JSNotAnObject.h: Added. - (KJS::JSNotAnObject::JSNotAnObject): - * kjs/JSImmediate.cpp: - (KJS::JSImmediate::toObject): - modified to create an JSNotAnObject rather than throwing an exception - directly. - -2008-04-10 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Pass a function body node its function's scope chain, rather than the - current execution context's scope chain, when compiling it. - - This doesn't matter yet, but it will once we start using the scope - chain during compilation. - - sunspider --squirrelfish notes a tiny speedup. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-10 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fix two bugs when throwing exceptions from re-entrant JS calls: - - (1) Don't shrink the register file to 0, since our caller may still - be using it. - - (2) In case of exception, return jsNull() instead of 0 because, - surprisingly, some JavaScriptCore clients rely on a function's return - value being safe to operate on even if the function threw an exception. - - Also: - - - Changed FunctionImp::callAsFunction to honor the new semantics of - exceptions not returning 0. - - - Renamed "handlerPC" to "handlerVPC" to match other uses of "VPC". - - - Renamed "exceptionData" to "exceptionValue", because "data" seemed to - imply something more than just a JSValue. - - - Merged prepareException into throwException, since throwException was - its only caller, and it seemed weird that throwException didn't take - an exception as an argument. - - sunspider --squirrelfish does not seem to complain on my machine, but it - complains a little (.6%) on Oliver's. - -2008-04-10 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed op_construct for CallTypeNative to reacquire "r" before setting - its return value, since registerBase can theoretically change during the - execution of arbitrary code. (Not sure if any native constructors - actually make this possible.) - - sunspider --squirrelfish does not seem to complain. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-10 Geoffrey Garen - - Reviewed by Oliver Hunt and Sam Weinig. - - Re-entrant execution of function code (global code -> built-in function - -> JS function): - - Miraculously, sunspider --squirrelfish does not seem to complain. - - A re-entrant function call is the same as a normal function call with - one exception: the re-entrant call leaves everything except for - CallerCodeBlock in the call frame header uninitialized, since the call - doesn't need to return to JS code. (It sets CallerCodeBlock to 0, to - indicate that the call shouldn't return to JS code.) - - Also fixed a few issues along the way: - - - Fixed two bugs in the read-write List implementation that caused - m_size and m_buffer to go stale. - - - Changed native call code to update "r" *before* setting the return - value, since the call may in turn call JS code, which changes the value - of "r". - - - Migrated initialization of "r" outside of Machine::privateExecute, - because global code and function code initialize "r" differently. - - - Migrated a codegen warning from Machine::privateExecute to the wiki. - - - Removed unnecessary "r" parameter from slideRegisterWindowForCall - - * VM/Machine.cpp: - (KJS::slideRegisterWindowForCall): - (KJS::scopeChainForCall): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * VM/Machine.h: - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - * kjs/list.cpp: - (KJS::List::getSlice): - * kjs/list.h: - (KJS::List::clear): - -2008-04-10 Maciej Stachowiak - - Reviewed by Oliver. - - - fix problem with code generation for return with no argument - - 3d-cube now runs - - * kjs/nodes.cpp: - (KJS::ReturnNode::emitCode): - -2008-04-10 Maciej Stachowiak - - Reviewed by Oliver. - - - Implement support for JS constructors - - access-binary-trees and access-nbody now run. - - Inexplicably a 1% speedup. - - * VM/Machine.cpp: - (KJS::initializeCallFrame): - (KJS::Machine::privateExecute): - * VM/Machine.h: - (KJS::Machine::): - -2008-04-10 Maciej Stachowiak - - Reviewed by Oliver. - - - More code cleanup in preparation for JS constructors - - Factor the remaining interesting parts of JS function calls into - slideRegisterWindowForCall and scopeChainForCall. - - * VM/Machine.cpp: - (KJS::slideRegisterWindowForCall): - (KJS::scopeChainForCall): - (KJS::Machine::privateExecute): - -2008-04-10 Maciej Stachowiak - - Reviewed by Geoff. - - - Code cleanup in preparation for JS constructors - - - Renamed returnInfo to callFrame. - - Made an enum which defines what goes where in the call frame. - - Factored out initializeCallFrame function from op_call - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitCall): - (KJS::CodeGenerator::emitConstruct): - * VM/Machine.cpp: - (KJS::Machine::dumpRegisters): - (KJS::initializeCallFrame): - (KJS::Machine::unwindCallFrame): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * VM/Machine.h: - (KJS::Machine::): - -2008-04-10 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed two bugs in register allocation for function calls: - - (1) op_call used to allocate codeBlock->numVars too many registers for - each call frame, due to duplicated math. Fixing this revealed... - - (2) By unconditionally calling resize(), op_call used to truncate the - register file when calling a function whose registers fit wholly within - the register file already allocated by its caller. - - sunspider --squirrelfish reports no regression. - - I also threw in a little extra formatting to dumpCallFrame, because it - helped me debug these issues. - - * VM/Machine.cpp: - (KJS::Machine::dumpRegisters): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * VM/RegisterFile.h: - (KJS::RegisterFile::shrink): - (KJS::RegisterFile::grow): - * VM/RegisterFileStack.cpp: - (KJS::RegisterFileStack::popRegisterFile): - -2008-04-09 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Next step toward re-entrant execution of function code (global code -> - built-in function -> JS function): - - Made op_ret return from Machine::privateExecute if its calling codeBlock - is NULL. - - I'm checking this in by itself to demonstrate that a more clever - mechanism is not necessary for performance. - - sunspider --squirrelfish reports no regression. - - * ChangeLog: - * VM/Machine.cpp: - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - -2008-04-09 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Next step toward re-entrant execution of function code (global code -> - built-in function -> JS function): - - Made Machine::execute return a value. - - Sketched out some code for Machine::execute for functions -- still - doesn't work yet, though. - - sunspider --squirrelfish reports no regression. - - * VM/Machine.cpp: - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * VM/Machine.h: - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - * kjs/testkjs.cpp: - (runWithScripts): - -2008-04-09 Geoffrey Garen - - Reviewed by Sam Weinig. - - First step toward re-entrant execution of function code (global code -> - built-in function -> JS function): - - Tiny bit of refactoring in the Machine class. - - sunspider --squirrelfish reports no regression. - - * VM/Machine.cpp: - (KJS::Machine::dumpRegisters): - (KJS::Machine::unwindCallFrame): - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - * VM/Machine.h: - (KJS::Machine::isGlobalCallFrame): - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - -2008-04-08 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Support for re-entrant execution of global code (global code -> built-in - function -> global code). - - Keep a stack of register files instead of just one. Globals propogate - between register files as the register files enter and exit the stack. - - An activation still uses its own register file's base as its - registerBase, but the global object uses the register file *stack*'s - registerBase, which updates dynamically to match the register file at - the top of the stack. - - sunspider --squirrelfish reports no regression. - -2008-04-08 Maciej Stachowiak - - Reviewed by Geoff. - - - initial preparatory work for JS constructors - - 1) Allocate registers for the returnInfo block and "this" value when generating code for - op_construct. These are not used yet, but the JS branch of op_construct will use them. - - 2) Adjust argc and argv appropriately for native constructor calls. - - 3) Assign return value in a more straightforward way in op_ret since this is actually - a bit faster (and makes up for the allocation of extra registers above). - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitConstruct): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-07 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed crashing SunSpider tests. - - Let's just pretend this never happened, bokay? - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): - * VM/CodeGenerator.h: - * VM/RegisterFile.cpp: - (KJS::RegisterFile::addGlobals): - -2008-04-07 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Restored dumping of generated code as a command-line switch: - run-testkjs -d will do it. - -2008-04-07 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Next step toward supporting re-entrant evaluation: Moved register file - maintenance code into a proper "RegisterFile" class. - - There's a subtle change to the register file's internal layout: for - global code / the global object, registerOffset is always 0 now. In - other words, all register counting starts at 0, not 0 + (number of - global variables). The helps simplify accounting when the number of - global variables changes. - -2008-04-07 Oliver Hunt - - Reviewed by Geoff. - - Bug 18338: Support exceptions in SquirrelFish - - Initial support for exceptions in SquirrelFish, only supports finalisers in the - simple cases (eg. exceptions and non-goto/return across finaliser boundaries). - This doesn't add the required exception checks to existing code, it merely adds - support for throw, catch, and the required stack unwinding. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - (KJS::CodeBlock::getHandlerForVPC): - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitCatch): - (KJS::CodeGenerator::emitThrow): - * VM/CodeGenerator.h: - * VM/JSPropertyNameIterator.cpp: - (KJS::JSPropertyNameIterator::create): - * VM/Machine.cpp: - (KJS::prepareException): - (KJS::Machine::unwindCallFrame): - (KJS::Machine::throwException): - (KJS::Machine::privateExecute): - * VM/Machine.h: - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::ThrowNode::emitCode): - (KJS::TryNode::emitCode): - * kjs/nodes.h: - * kjs/scope_chain.cpp: - (KJS::ScopeChain::depth): - * kjs/scope_chain.h: - -2008-04-06 Geoffrey Garen - - Reviewed by Oliver Hunt. - - First step toward supporting re-entrant evaluation: Switch register - clients from using "registers", a pointer to a register vector, to - "registerBase", an indirect pointer to the logical first entry in the - register file. (The logical first entry is the first entry that is not - a global variable). - - With a vector, offsets into the register file remain good when the - underlying buffer reallocates, but they go bad when the logical - first entry moves. (The logical first entry moves when new global - variables get added to the beginning of the register file.) With an - indirect pointer to the logical first entry, offsets will remain good - regardless. - - 1.4% speedup on sunspider --squirrelfish. I suspect this is due to - reduced allocation when creating closures, and reduced indirection - through the register vector. - - * wtf/Vector.h: Added an accessor for an indirect pointer to the vector's - buffer, which we currently use (incorrectly) for registerBase. This is - temporary scaffolding to allow us to change client code without - changing behavior. - -2008-04-06 Sam Weinig - - Reviewed by Oliver Hunt. - - Implement codegen for ReadModifyDotNode. - - * kjs/nodes.cpp: - (KJS::ReadModifyDotNode::emitCode): - * kjs/nodes.h: - -2008-04-06 Sam Weinig - - Reviewed by Oliver Hunt. - - Fix codegen for PostIncDotNode and implement codegen for PostIncBracketNode, - PostDecBracketNode and PostDecDotNode. - - * kjs/nodes.cpp: - (KJS::PostIncBracketNode::emitCode): - (KJS::PostDecBracketNode::emitCode): - (KJS::PostIncDotNode::emitCode): - (KJS::PostDecDotNode::emitCode): - * kjs/nodes.h: - -2008-04-06 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implement codegen for PreDecResolveNode, PreIncBracketNode, PreDecBracketNode, - PreIncDotNode and PreDecDotNode. This required adding one new op code, op_pre_dec. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitPreDec): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::PreDecResolveNode::emitCode): - (KJS::PreIncBracketNode::emitCode): - (KJS::PreDecBracketNode::emitCode): - (KJS::PreIncDotNode::emitCode): - (KJS::PreDecDotNode::emitCode): - * kjs/nodes.h: - -2008-04-06 Geoffrey Garen - - Reviewed by Sam Weinig. - - Improved register dumping, plus a liberal smattering of "const". Here's - what the new format looks like: - - (gdb) call (void)dumpCallFrame(codeBlock, scopeChain, registers->begin(), r) - 4 instructions; 48 bytes at 0x509210; 3 locals (2 parameters); 1 temporaries - - [ 0] load lr1, undefined(@k0) - [ 3] load lr1, 2(@k1) - [ 6] add tr0, lr2, lr1 - [ 10] ret tr0 - - Constants: - k0 = undefined - k1 = 2 - - Register frame: - - ---------------------------------------- - use | address | value - ---------------------------------------- - [return info] | 0x80ac08 | 0x5081c0 - [return info] | 0x80ac0c | 0x508e90 - [return info] | 0x80ac10 | 0x504acc - [return info] | 0x80ac14 | 0x2 - [return info] | 0x80ac18 | 0x0 - [return info] | 0x80ac1c | 0x7 - [return info] | 0x80ac20 | 0x0 - ---------------------------------------- - [param] | 0x80ac24 | 0x1 - [param] | 0x80ac28 | 0x7 - [var] | 0x80ac2c | 0xb - [temp] | 0x80ac30 | 0xf - -2008-04-06 Geoffrey Garen - - Reviewed by Sam Weinig. - - Support for evaluating multiple scripts in the same global environment. - (Still don't support re-entrant evaluation yet.) - - The main changes here are: - - (1) Obey the ECMA 10.1.3 rules regarding how to resolve collisions when - a given symbol is declared more than once. (This patch fixes the same - issue for function code, too.) - - (2) In the case of var and/or function collisions, reuse the existing - storage slot. For global code, this is required for previously - generated instructions to continue to work. For function code, it's - more of a "nice to have": it makes register layout in the case of - collisions easier to understand, and has the added benefit of saving - memory. - - (3) Allocate slots in the CodeGenerator's m_locals vector in parallel - to register indexes in the symbol table. This ensures that, given an - index in the symbol table, we can find the corresponding RegisterID - without hashing, which speeds up codegen. - - I moved responsibility for emitting var and function initialization - instructions into the CodeGenerator, because bookkeeping in cases where - var, function, and/or parameter names collide requires a lot of - internal knowledge about the CodeGenerator. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::addVar): Removed responsibility for checking whether - a var declaration overwrites "arguments", because the check is - inappropriate for global code, which may not have a pre-existing - "arguments" symbol in scope. Also changed this function to return a - boolean indicating whether addVar actually created a new RegisterID, - or just reused an old one. - - (KJS::CodeGenerator::CodeGenerator): Split out the constructors for - function code and global code, since they're quite different now. - - (KJS::CodeGenerator::registerForLocal): This function does its job - without any hashing now. - - * VM/Machine.cpp: Move old globals and update "r" before executing a - new script. That way, old globals stay at a constant offset from "r", - and previously optimized code still works. - - * VM/RegisterID.h: Added the ability to allocate a RegisterID before - initializing its index field. We use this for parameters now. - - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTableGet): Changed the ungettable getter - ASSERT to account for the fact that symbol indexes are all negative. - -2008-04-05 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implement codegen for InNode. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitIn): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::InNode::emitCode): - * kjs/nodes.h: - -2008-04-05 Sam Weinig - - Reviewed by Oliver Hunt. - - - Implement codegen for DeleteResolveNode, DeleteBracketNode, DeleteDotNode and DeleteValueNode. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitGetPropId): - (KJS::CodeGenerator::emitPutPropId): - (KJS::CodeGenerator::emitDeletePropId): - (KJS::CodeGenerator::emitDeletePropVal): - (KJS::CodeGenerator::emitPutPropIndex): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::DeleteResolveNode::emitCode): - (KJS::DeleteBracketNode::emitCode): - (KJS::DeleteDotNode::emitCode): - (KJS::DeleteValueNode::emitCode): - * kjs/nodes.h: - -2008-04-04 Sam Weinig - - Reviewed by Oliver Hunt. - - - Implement codegen for Switch statements. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::pushJumpContext): - (KJS::CodeGenerator::popJumpContext): - (KJS::CodeGenerator::jumpContextForLabel): - * VM/CodeGenerator.h: - Rename LoopContext to JumpContext now that it used of Switch statements in addition - to loops. - - * kjs/nodes.cpp: - (KJS::DoWhileNode::emitCode): - (KJS::WhileNode::emitCode): - (KJS::ForNode::emitCode): - (KJS::ForInNode::emitCode): - (KJS::ContinueNode::emitCode): - (KJS::BreakNode::emitCode): - (KJS::CaseBlockNode::emitCodeForBlock): - (KJS::SwitchNode::emitCode): - * kjs/nodes.h: - (KJS::CaseClauseNode::expr): - (KJS::CaseClauseNode::children): - (KJS::CaseBlockNode::): - -2008-04-03 Maciej Stachowiak - - Reviewed by Sam. - - - fix crash in codegen from new nodes - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitConstruct): - * kjs/nodes.h: - -2008-04-03 Maciej Stachowiak - - Reviewed by Geoff. - - * kjs/nodes.cpp: - (KJS::ReadModifyResolveNode::emitCode): - (KJS::ReadModifyBracketNode::emitCode): - * kjs/nodes.h: - -2008-04-02 Maciej Stachowiak - - Reviewed by Geoff. - - - take a shot at marking constant pools for global and eval code - - Geoff says this won't really work in all cases but is an ok stopgap. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::mark): - -2008-04-02 Maciej Stachowiak - - Reviewed by Geoff. - - - fix 2x perf regression in 3d-morph - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): If we subbed in null for the global object, - don't toObject it, since that will throw an exception (very slowly). - -2008-04-02 Maciej Stachowiak - - Rubber stamped by Geoff - - - fix Release build - - * kjs/nodes.cpp: - (KJS::getNonLocalSymbol): - -2008-04-02 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Removed the last vestiges of LocalStorage from JSVariableObject and - JSGlobalObject. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::saveLocalStorage): Save and restore from/to - registers. Use stub isReadOnly and isDontEnum methods for now, until - we really implement attributes in the symbol table. - (KJS::JSGlobalObject::restoreLocalStorage): - (KJS::JSGlobalObject::reset): - - * kjs/JSVariableObject.cpp: - (KJS::JSVariableObject::getPropertyNames): Use stub isDontEnum method - for now, as above. - (KJS::JSVariableObject::getPropertyAttributes): ditto - - * kjs/JSVariableObject.h: Removed LocalStorage from JSVariableObjectData. - Removed mark method, because subclasses implement different strategies for - marking registers. - (KJS::JSVariableObject::isReadOnly): Stub method - (KJS::JSVariableObject::isDontEnum): ditto - - Changed the code below to ASSERT_NOT_REACHED() and return 0, since it - can no longer retrieve LocalStorage from the ExecState. (Eventually, - we'll just remove this code and all its friends, but that's a task for - later.) - - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - * kjs/function.cpp: - (KJS::ActivationImp::markChildren): - * kjs/function.h: - * kjs/nodes.cpp: - (KJS::getNonLocalSymbol): - (KJS::ScopeNode::optimizeVariableAccess): - (KJS::ProgramNode::processDeclarations): - -2008-04-01 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Got globals? - - To get things working, I had to roll out - http://trac.webkit.org/projects/webkit/changeset/31226 for the time - being. - - * VM/CodeBlock.h: Removed obsolete function. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): For the sake of re-entrancy, we track - and restore the global object's old rOffset value. (No way to test this - yet, but I think it will work.) - -2008-04-01 Maciej Stachowiak - - Reviewed by Geoff. - - - mark the constant pool (at least for function code blocks) - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::mark): - * VM/CodeBlock.h: - * kjs/function.cpp: - (KJS::FunctionImp::mark): - * kjs/nodes.cpp: - (KJS::ScopeNode::mark): - * kjs/nodes.h: - (KJS::FuncExprNode::body): - (KJS::FuncDeclNode::body): - -2008-04-01 Geoffrey Garen - - Reviewed by Beth Dakin. - - Cleaned up a few loose ends. - - * JavaScriptCore.exp: Export dumpRegisters, so it's visible to gdb even - if we don't explicitly call it in the source text. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): No need to call dumpRegisters anymore, - since that was just a hack for gdb's sake. - - * kjs/JSActivation.h: Removed obsolete comment. - - * VM/CodeGenerator.cpp: Added ASSERTs to verify that the localCount - we're given matches the number of locals actually allocated. - - * VM/CodeGenerator.h: - (KJS::CodeGenerator::CodeGenerator): Changed "localCount" to include - the parameter count, since we're using the word "local" to mean - parameter, var, function, or "this". Renamed "m_nextLocal" to - "m_nextVar", since "m_nextLocal" doesn't contrast well with - "m_nextParameter". - - Also moved tracking of implicit "this" parameter from here... - - * kjs/nodes.cpp: - (KJS::FunctionBodyNode::generateCode): ... to here - (KJS::ProgramNode::generateCode): ... and here - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): Added missing "\n". - -2008-04-01 Cameron Zwarich - - Reviewed by Oliver. - - Bug 18274: ResolveNode::emitCode() doesn't make a new temporary when dst - is 0, leading to incorrect codegen - - - * kjs/nodes.cpp: - (KJS::FunctionCallBracketNode::emitCode): - (KJS::FunctionCallDotNode::emitCode): - -2008-04-01 Maciej Stachowiak - - Reviewed by Oliver. - - - fix bug in for..in codegen (gotta use ident, not m_ident) - - * kjs/nodes.cpp: - (KJS::ForInNode::emitCode): - -2008-04-01 Maciej Stachowiak - - Reviewed by Oliver. - - - Add suport for regexp literals - - * VM/CodeBlock.cpp: - (KJS::regexpToSourceString): - (KJS::regexpName): - (KJS::CodeBlock::dump): - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::addRegExp): - (KJS::CodeGenerator::emitNewRegExp): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::RegExpNode::emitCode): - * kjs/nodes.h: - -2008-04-01 Oliver Hunt - - Reviewed by Geoff - - Add support for for..in nodes - - Added two new opcodes to get_pnames and next_pname to handle iterating - over the set of properties on an object. This iterator is explicitly - invalidated and the property name array is released on standard exit - from the loop, otherwise we rely on GC to do the clean up for us. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitNextPropertyName): - (KJS::CodeGenerator::emitGetPropertyNames): - * VM/CodeGenerator.h: - * VM/JSPropertyNameIterator.cpp: Added. - (KJS::JSPropertyNameIterator::JSPropertyNameIterator): - (KJS::JSPropertyNameIterator::type): - (KJS::JSPropertyNameIterator::toPrimitive): - (KJS::JSPropertyNameIterator::getPrimitiveNumber): - (KJS::JSPropertyNameIterator::toBoolean): - (KJS::JSPropertyNameIterator::toNumber): - (KJS::JSPropertyNameIterator::toString): - (KJS::JSPropertyNameIterator::toObject): - (KJS::JSPropertyNameIterator::mark): - (KJS::JSPropertyNameIterator::next): - (KJS::JSPropertyNameIterator::invalidate): - (KJS::JSPropertyNameIterator::~JSPropertyNameIterator): - (KJS::JSPropertyNameIterator::create): - * VM/JSPropertyNameIterator.h: Added. - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * VM/Register.h: - (KJS::Register::): - * kjs/PropertyNameArray.h: - * kjs/nodes.cpp: - (KJS::ForInNode::emitCode): - * kjs/nodes.h: - * kjs/value.h: - -2008-04-01 Cameron Zwarich - - Reviewed by Maciej. - - Change CodeGenerator::emitCall() so it increments the reference count of - registers passed to it, and change its callers so they don't needlessly - increment the reference count of the registers they are passing. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitCall): - * kjs/nodes.cpp: - (KJS::FunctionCallResolveNode::emitCode): - (KJS::FunctionCallDotNode::emitCode): - -2008-04-01 Maciej Stachowiak - - Reviewed by Oliver. - - - generate call for PostIncDotNode - - * kjs/nodes.cpp: - (KJS::PostIncDotNode::emitCode): - * kjs/nodes.h: - -2008-04-01 Maciej Stachowiak - - Build fix. - - - fix build (not sure how this ever worked?) - - * kjs/nodes.cpp: - (KJS::FunctionCallBracketNode::emitCode): - -2008-04-01 Maciej Stachowiak - - Reviewed by Geoff. - - - generate code for FunctionCallBracketNode - - * kjs/nodes.cpp: - (KJS::FunctionCallBracketNode::emitCode): - * kjs/nodes.h: - -2008-04-01 Maciej Stachowiak - - Reviewed by Geoff. - - - Fix two crashing SunSpider tests - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): set up 'this' properly for native calls. - * kjs/list.h: - (KJS::List::List): Fix intialization of buffer and size from - vector, the initialization order was wrong. - -2008-04-01 Geoffrey Garen - - Build fix: marked ASSERT-only variables as UNUSED_PARAMs. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTableInitializeVariable): - -2008-04-01 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Next step toward global code: Moved get, put, and initializeVariable - functionality up into JSVariableObject, and changed JSActivation to - rely on it. - - * kjs/JSActivation.cpp: - (KJS::JSActivation::JSActivation): - (KJS::JSActivation::getOwnPropertySlot): - (KJS::JSActivation::put): - (KJS::JSActivation::initializeVariable): - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::valueAt): - (KJS::JSVariableObject::isReadOnly): - (KJS::JSVariableObject::symbolTableGet): - (KJS::JSVariableObject::symbolTablePut): - (KJS::JSVariableObject::symbolTableInitializeVariable): - -2008-04-01 Maciej Stachowiak - - Reviewed by Sam. - - - fix HashTable assertion on some SunSpider tests - - Don't use -1 as the deleted value for JSValue*-keyed hashtables, - since it is a valid value (it's the immediate for -1). - - * VM/CodeGenerator.h: - (KJS::CodeGenerator::JSValueHashTraits::emptyValue): - (KJS::CodeGenerator::JSValueHashTraits::deletedValue): - * kjs/JSImmediate.h: - (KJS::JSImmediate::impossibleValue): - -2008-04-01 Sam Weinig - - Reviewed by Maciej Stachowiak. - - Add support for calling Native constructors like new Array(). - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitConstruct): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::NewExprNode::emitCode): - * kjs/nodes.h: - -2008-04-01 Maciej Stachowiak - - Reviewed by Sam. - - - add some missing toOpbject calls to avoid crashing when calling methods on primitives - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-04-01 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Changed Machine::dumpRegisters to take a pointer instead of a reference, - so gdb understands how to call it. - - * VM/Machine.cpp: - (KJS::Machine::dumpRegisters): - (KJS::Machine::privateExecute): - * VM/Machine.h: - -2008-03-31 Cameron Zwarich - - Reviewed by Maciej. - - Fix CodeGenerator::addConstant() so it uses the functionExpressions - counter for function expressions, not the functions counter. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::addConstant): - -2008-03-31 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add emitCode support for TypeOfResolveNode and TypeOfValueNode. - Added new opcode op_type_of to handle them. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitNot): - (KJS::CodeGenerator::emitInstanceOf): - (KJS::CodeGenerator::emitTypeOf): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::jsTypeStringForValue): - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::TypeOfResolveNode::emitCode): - (KJS::TypeOfValueNode::emitCode): - * kjs/nodes.h: - -2008-03-31 Sam Weinig - - Reviewed by Oliver Hunt. - - Fix non-computed goto version of isOpcode. op_end is a valid opcode. - - * VM/Machine.cpp: - (KJS::Machine::isOpcode): - -2008-03-31 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Added op_post_dec. - -2008-03-31 Cameron Zwarich - - Reviewed by Geoffrey Garen. - - Add support for FunctionCallDotNode. - - * kjs/nodes.cpp: - (KJS::FunctionCallDotNode::emitCode): - * kjs/nodes.h: - -2008-03-31 Geoffrey Garen - - Reviewed by Beth Dakin. - - Next step toward global code: Removed more obsolete API, moved - saveLocalStorage and restoreLocalStorage to JSGlobalObject subclass, - since it's only intended for use there. - - * ChangeLog: - * JavaScriptCore.exp: - * kjs/Activation.h: - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::saveLocalStorage): - (KJS::JSGlobalObject::restoreLocalStorage): - * kjs/JSGlobalObject.h: - * kjs/JSVariableObject.cpp: - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::JSVariableObjectData::JSVariableObjectData): - * kjs/function.cpp: - (KJS::ActivationImp::ActivationImp): - -2008-03-31 Geoffrey Garen - - Reviewed by Beth Dakin. - - Next step toward global code: subclass JSActivation + JSActivationData - from JSVariableObject + JSVariableObjectData. - - JSActivation now relies on JSVariableObject for access to registers and - symbol table, and for some delete functionality, but not for anything - else yet. - - (KJS::JSActivation::mark): Cleaned up the style here a little bit. - -2008-03-31 Geoffrey Garen - - Reviewed by Beth Dakin. - - Next step toward global code: store "rOffset" in JSVariableObjectData. - - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::JSVariableObjectData::JSVariableObjectData): - -2008-03-31 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Next steps toward global code: - - * Moved access to the register file into JSVariableObject. - - * Added more ASSERTs to indicate obsolete APIs there are just hanging - around to stave off build failures. - - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::registers): - (KJS::JSVariableObject::JSVariableObjectData::JSVariableObjectData): - (KJS::JSVariableObject::JSVariableObject): - -2008-03-31 Sam Weinig - - Reviewed by Oliver. Tweaked somewhat by Maciej. - - - implement codegen for ReadModifyResolveNode - - * kjs/nodes.cpp: - (KJS::emitReadModifyAssignment): - (KJS::ReadModifyResolveNode::emitCode): - * kjs/nodes.h: - -2008-03-31 Cameron Zwarich - - Reviewed by Geoff. - - Fix the build -- r31492 removed activation tear-off, but r31493 used it. - - * kjs/nodes.cpp: - (KJS::FuncExprNode::makeFunction): - -2008-03-31 Cameron Zwarich - - Reviewed by Maciej. - - Add support for FuncExprNode to SquirrelFish. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::addConstant): - (KJS::CodeGenerator::emitNewFunctionExpression): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::FuncExprNode::emitCode): - (KJS::FuncExprNode::makeFunction): - * kjs/nodes.h: - -2008-03-31 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - First step toward global code: removed some obsolete JSGlobalObject - APIs, changing clients to ASSERT_NOT_REACHED. - - Activation tear-off and scope chain pushing is obsolete because we - statically detect whether an activation + scope node is required. - - The variableObject() and activationObject() accessors are obsolete - because they haven't been maintained, and they're mostly used by - node evaluation code, anyway. - - The localStorage() accessor is obsolete because everything is in - registers now, and it's mostly used by node evaluation code, anyway. - -2008-03-31 Maciej Stachowiak - - Reviewed by Darin. - - - implement codegen for bracket accessor and bracket assign - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitGetPropVal): - (KJS::CodeGenerator::emitPutPropVal): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::BracketAccessorNode::emitCode): - (KJS::AssignBracketNode::emitCode): - * kjs/nodes.h: - -2008-03-31 Geoffrey Garen - - Not reviewed. - - Removed FIXME that I just fixed. - - Added ASSERT to cover an error previously only covered by a FIXME. - - * kjs/JSActivation.cpp: - (KJS::JSActivation::getOwnPropertySlot): - -2008-03-31 Geoffrey Garen - - Not reviewed. - - Fixed indentation inside op_call. (I had left this code badly indented - to make the behavior-changing diff clearer.) - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-03-31 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed up logging of jump instructions to follow the following style: - - jump offset(->absoluteTarget) - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - -2008-03-31 Geoffrey Garen - - Reviewed by Sam Weinig. - - Changed the SymbolTable API to use int instead of size_t. It has been - using int internally for a while now (since squirrelfish symbols can - have negative indices). - -2008-03-31 Cameron Zwarich - - Reviewed by Maciej. - - Add support for FunctionCallValueNode. - - * kjs/nodes.cpp: - (KJS::FunctionCallValueNode::emitCode): - * kjs/nodes.h: - -2008-03-31 Maciej Stachowiak - - Reviewed by Oliver. - - 1) Implemented array literals - - 2) Renamed op_object_get and op_object_put to op_get_prop_id and - op_put_prop_id in preparation for new variants. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitNewArray): - (KJS::CodeGenerator::emitGetPropId): - (KJS::CodeGenerator::emitPutPropId): - (KJS::CodeGenerator::emitPutPropIndex): - * VM/CodeGenerator.h: - (KJS::CodeGenerator::CodeGenerator): - (KJS::CodeGenerator::propertyNames): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::ArrayNode::emitCode): - (KJS::PropertyListNode::emitCode): - (KJS::DotAccessorNode::emitCode): - (KJS::PostIncResolveNode::emitCode): - (KJS::PreIncResolveNode::emitCode): - (KJS::AssignResolveNode::emitCode): - (KJS::AssignDotNode::emitCode): - * kjs/nodes.h: - -2008-03-30 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Implemented native function calls. (Re-entering from native code back - to JS doesn't work yet, though.) - - 0.2% speedup overall, due to some inlining tweaks. 3.6% regression on - function-empty.js, since we're making a new virtual call and taking a - new branch inside every op_call. - - I adjusted the JavaScriptCore calling convention to minimize overhead, - like so: - - The machine calls a single virtual function, "getCallData", to get all - the data it needs for a function call. Native code still uses the old - "isObject()" check followed by an "implementsCall()" check, which - aliases to "getCallData". (We can optimize native code to use getCallData - at our leisure.) - - To supply a list of arguments, the machine calls a new List constructor - that just takes a pointer and a length, without copying. Native code - still appends to the list one argument at a time. (We can optimize - native code to use the new List constructor at our leisure.) - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Changed resize() call to grow() call, - to encourage the compiler to inline the Vector code. - - * kjs/CallData.h: Added. - (KJS::): CallData is a union because eventually native calls will stuff - a function pointer into it, to eliminate the callAsFunction virtual call. - - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): Changed this to an ASSERT since - it's not implemented yet. - - * kjs/list.h: Made the List class two-faced, to support the old way and - the new way during this transition phase: lists can be made read-only - with just a pointer and a legnth, or you can append to them one item - at a time. - - * kjs/value.h: - (KJS::jsUndefined): Marked this function ALWAYS_INLINE for the benefit - of a certain compiler that doesn't know what's best for it. - -2008-03-30 Maciej Stachowiak - - Reviewed by Oliver. - - Dump code that codegen can't handle yet, so it's easier to prioritize missing nodes. - - * kjs/nodes.h: - (KJS::Node::emitCode): - -2008-03-30 Maciej Stachowiak - - Reviewed by Oliver. - - Improve dumping of bytecode and fix coding style accordingly. - - Registers are printed as lr1 for locals, tr1 for temp registers. Identifiers print as - foobar(@id0) and constants print as "foo"(@k1) or 312.4(@k2) or the like. Constant and - identifier tables are dumped for reference. - - * VM/CodeBlock.cpp: - (KJS::escapeQuotes): - (KJS::valueToSourceString): - (KJS::registerName): - (KJS::constantName): - (KJS::idName): - (KJS::printUnaryOp): - (KJS::printBinaryOp): - (KJS::CodeBlock::dump): - * VM/Machine.cpp: - (KJS::resolve): - (KJS::resolveBase): - (KJS::Machine::privateExecute): - -2008-03-30 Maciej Stachowiak - - Reviewed by Oliver. - - Implement StringNode and VoidNode (both pretty trivial). - - * kjs/nodes.cpp: - (KJS::StringNode::emitCode): - (KJS::VoidNode::emitCode): - * kjs/nodes.h: - -2008-03-30 Maciej Stachowiak - - Reviewed by Sam. - - Implement CommaNode. - - * kjs/nodes.cpp: - (KJS::CommaNode::emitCode): - * kjs/nodes.h: - -2008-03-30 Cameron Zwarich - - Reviewed by Maciej. - - Adds support for dot notation and object literals. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitNewObject): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::ObjectLiteralNode::emitCode): - (KJS::PropertyListNode::emitCode): - (KJS::DotAccessorNode::emitCode): - (KJS::AssignDotNode::emitCode): - * kjs/nodes.h: - -2008-03-29 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Mark the register file. - - It's a conservative mark for now, but once registers are typed, we can - do an exact mark. - - 1.4% regression regardless of whether we actually do the marking. - GCC is is worth every penny. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Most of the changes here are just for - the fact that "registers" is a pointer now. - - * kjs/JSGlobalObject.cpp: The global object owns the register file now. - -2008-03-28 Oliver Hunt - - Reviewed by Maciej. - - Bug 18204: SquirrelFish: continue/break do not correctly handle scope popping - - - We now track the scope depth as part of a loop context, and add an - extra instruction op_jump_scopes that is used to perform a jump across - dynamic scope boundaries. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitJumpScopes): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::ContinueNode::emitCode): - (KJS::BreakNode::emitCode): - -2008-03-28 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add emitCode support for ConditionalNode. - - * kjs/nodes.cpp: - (KJS::ConditionalNode::emitCode): - * kjs/nodes.h: - -2008-03-28 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Responding to feedback, added some comments, fixed up a few names, and - clarified that "locals" always means all local variables, functions, - and parameters. - -2008-03-28 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Added support for "this". - - Supply an implicit "this" value as the first argument to every function. - Alias the "this" keyword to that argument. - - 1% regression overall, 2.5% regression on empty function calls. Seems - like a reasonable cost for now, since we're doing more work. - (Eventually, we might decide to create a version of op_call specialized - for a known null "this" value.) - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitCall): - * VM/CodeGenerator.h: - (KJS::CodeGenerator::CodeGenerator): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/CommonIdentifiers.cpp: - (KJS::CommonIdentifiers::CommonIdentifiers): - * kjs/CommonIdentifiers.h: - * kjs/nodes.cpp: - (KJS::ThisNode::emitCode): - (KJS::FunctionCallResolveNode::emitCode): - * kjs/nodes.h: - -2008-03-28 Oliver Hunt - - Reviewed by Geoff. - - Bug 18192: Squirrelfish needs support for break and continue - - - Added a loop context stack to the code generator to provide the - correct jump labels for continue and goto. Added logic to the - currently implemented loop constructs to manage entry and exit - from the loop contexts. Finally, implemented codegen for break - and continue (and a pass through for LabelNode) - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::pushLoopContext): - (KJS::CodeGenerator::popLoopContext): - (KJS::CodeGenerator::loopContextForIdentifier): - (KJS::CodeGenerator::labelForContinue): - (KJS::CodeGenerator::labelForBreak): - * VM/CodeGenerator.h: - * kjs/nodes.cpp: - (KJS::DoWhileNode::emitCode): - (KJS::WhileNode::emitCode): - (KJS::ForNode::emitCode): - (KJS::ContinueNode::emitCode): - (KJS::BreakNode::emitCode): - (KJS::LabelNode::emitCode): - * kjs/nodes.h: - -2008-03-27 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add emitCode support for UnaryPlusNode, NegateNode, BitwiseNotNode and LogicalNotNode. - - * VM/CodeBlock.cpp: - (KJS::printUnaryOp): - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitToJSNumber): - (KJS::CodeGenerator::emitNegate): - (KJS::CodeGenerator::emitBitNot): - (KJS::CodeGenerator::emitNot): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::UnaryPlusNode::emitCode): - (KJS::NegateNode::emitCode): - (KJS::BitwiseNotNode::emitCode): - (KJS::LogicalNotNode::emitCode): - * kjs/nodes.h: - -2008-03-27 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Add support for LogicalAndNode and LogicalOrNode. - - * kjs/nodes.cpp: - (KJS::LogicalAndNode::emitCode): - (KJS::LogicalOrNode::emitCode): - * kjs/nodes.h: - -2008-03-27 Sam Weinig - - Clean up code and debug output. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-03-27 Geoffrey Garen - - Moved an ASSERT to a more logical place. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-03-27 Sam Weinig - - Reviewed by Oliver Hunt. - - Add emitCode support for InstanceOfNode. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitInstanceOf): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::InstanceOfNode::emitCode): - * kjs/nodes.h: - -2008-03-27 Oliver Hunt - - Reviewed by Maciej. - - Bug 18142: squirrelfish needs to support dynamic scoping/with - - - Add support for dynamic scoping and add code to handle 'with' - statements. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeBlock.h: - (KJS::CodeBlock::CodeBlock): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::getRegister): - (KJS::CodeGenerator::emitPushScope): - (KJS::CodeGenerator::emitPopScope): - * VM/CodeGenerator.h: - (KJS::CodeGenerator::CodeGenerator): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::WithNode::emitCode): - * kjs/nodes.h: - -2008-03-27 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add emitCode support for NullNode, FalseNode, TrueNode, IfNode, IfElseNode, DoWhileNode and WhileNode - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): Dump op_jfalse opcode. - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitJumpIfFalse): Identical to emitJumpIfTrue except it emits the op_jfalse opcode. - (KJS::CodeGenerator::emitLoad): Add and emitLoad override for booleans. - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): Adds execution of op_jfalse. It is identical to op_jtrue, except the - the condition is reversed. - * VM/Opcode.h: Add op_jfalse. - * kjs/nodes.cpp: - (KJS::NullNode::emitCode): Added. - (KJS::FalseNode::emitCode): Added. - (KJS::TrueNode::emitCode): Added. - (KJS::IfNode::emitCode): Added. - (KJS::IfElseNode::emitCode): Added. - (KJS::DoWhileNode::emitCode): Added. - (KJS::WhileNode::emitCode): Added. - * kjs/nodes.h: - -2008-03-26 Geoffrey Garen - - Nixed an unused List. - - The calm before my stormy war against the List class. - - * kjs/function_object.cpp: - (KJS::FunctionObjectImp::construct): - -2008-03-26 Cameron Zwarich - - Reviewed by Geoffrey Garen. - - Adds support for EqualNode, NotEqualNode, StrictEqualNode, NotStrictEqualNode, - LessEqNode, GreaterNode, GreaterEqNode, MultNode, DivNode, ModNode, SubNode, - LeftShiftNode, RightShiftNode, UnsignedRightShiftNode, BitAndNode, BitXOrNode, - and BitOrNode. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitEqual): - (KJS::CodeGenerator::emitNotEqual): - (KJS::CodeGenerator::emitStrictEqual): - (KJS::CodeGenerator::emitNotStrictEqual): - (KJS::CodeGenerator::emitLessEq): - (KJS::CodeGenerator::emitMult): - (KJS::CodeGenerator::emitDiv): - (KJS::CodeGenerator::emitMod): - (KJS::CodeGenerator::emitSub): - (KJS::CodeGenerator::emitLeftShift): - (KJS::CodeGenerator::emitRightShift): - (KJS::CodeGenerator::emitUnsignedRightShift): - (KJS::CodeGenerator::emitBitAnd): - (KJS::CodeGenerator::emitBitXOr): - (KJS::CodeGenerator::emitBitOr): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::jsLessEq): - (KJS::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (KJS::MultNode::emitCode): - (KJS::DivNode::emitCode): - (KJS::ModNode::emitCode): - (KJS::SubNode::emitCode): - (KJS::LeftShiftNode::emitCode): - (KJS::RightShiftNode::emitCode): - (KJS::UnsignedRightShiftNode::emitCode): - (KJS::GreaterNode::emitCode): - (KJS::LessEqNode::emitCode): - (KJS::GreaterEqNode::emitCode): - (KJS::EqualNode::emitCode): - (KJS::NotEqualNode::emitCode): - (KJS::StrictEqualNode::emitCode): - (KJS::NotStrictEqualNode::emitCode): - (KJS::BitAndNode::emitCode): - (KJS::BitXOrNode::emitCode): - (KJS::BitOrNode::emitCode): - * kjs/nodes.h: - -2008-03-26 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Only print debug dumps in debug builds. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::generate): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-03-26 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Moved a few files around in the XCode project. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-03-26 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Made closures work. - - An activation object aliases to the register file until its associated - function returns, at which point it copies the registers for locals and - parameters into an independent storage buffer. - -2008-03-24 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed recent 25% regression on simple for loop test. GCC seems to be - very finicky about the code that gets inlined into - Machine::privateExecute. - - Everything in this patch is simply the result of experiment. - - The resolve and resolve_base opcodes do not seem to have gotten slower - from this change. - - * VM/Machine.cpp: - (KJS::resolve): - (KJS::resolveBase): - (KJS::Machine::privateExecute): - * kjs/nodes.h: - -2008-03-24 Oliver Hunt - - Reviewed by Geoff Garen. - - Bug 18059: squirrelfish needs to compile on platforms without computed goto - - - "Standard" macro style support for conditionalising the use of computed goto. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/Machine.cpp: - (KJS::Machine::isOpcode): - (KJS::Machine::privateExecute): - * VM/Machine.h: - (KJS::Machine::getOpcode): - (KJS::Machine::getOpcodeID): - * VM/Opcode.h: - * wtf/Platform.h: - -2008-03-24 Geoffrey Garen - - Moved my notes from nodes.h to the wiki. - - * kjs/nodes.h: - -2008-03-24 Geoffrey Garen - - SquirrelFish lives. - - Initial check-in of the code I've been carrying around. Lots of stuff - doesn't work. Plus a bunch of empty files. - -=== Start merge of squirrelfish === - -2008-05-21 Darin Adler - - - try to fix the Windows build - - * profiler/Profiler.cpp: - (KJS::Profiler::stopProfiling): Use ptrdiff_t instead of the less-common but incredibly - similar ssize_t type. - * wtf/AVLTree.h: - (KJS::AVLTree::search): Added a typename for a dependent name that's a type. - -2008-05-21 Darin Adler - - Reviewed by Anders. - - - fix bug in JavaScript arguments object property lookup - - Test: fast/js/arguments-bad-index.html - - * kjs/function.cpp: - (KJS::IndexToNameMap::IndexToNameMap): Use unsigned instead of int. - (KJS::IndexToNameMap::isMapped): Use unsigned instead of int, and also use the - strict version of the numeric conversion function, since we don't want to allow - trailing junk. - (KJS::IndexToNameMap::unMap): Ditto. - (KJS::IndexToNameMap::operator[]): Ditto. - * kjs/function.h: Changed IndexToNameMap::size type from int to unsigned. - -2008-05-21 Timothy Hatcher - - Change the Profiler to allow multiple profiles to be running at - the same time. This can happen when you have nested console.profile() - calls. This required two changes. First, the Profiler needed to keep a - Vector of current profiles, instead of one. Second, a Profile needs - to keep track of the global ExecState it started in and the page group - identifier it is tracking. - - The stopProfiling call now takes the same arguments as startProfiling. - This makes sure the correct profile is stopped. Passing a null UString - as the title will stop the last profile for the matching ExecState. - - Multiple pages profiling can interfere with each other - - Reviewed by Kevin McCullough. - - * JavaScriptCore.exp: Added new exports. Removed old symbols. - * profiler/Profile.cpp: - (KJS::Profile::Profile): New constructor arguments for the - originatingGlobalExec and pageGroupIdentifier. - (KJS::Profile::stopProfiling): Set the m_originatingGlobalExec to null. - * profiler/Profile.h: - (KJS::Profile::create): Additional arguments. - (KJS::Profile::originatingGlobalExec): Return m_originatingGlobalExec. - (KJS::Profile::pageGroupIdentifier): Return m_pageGroupIdentifier. - * profiler/Profiler.cpp: - (KJS::Profiler::findProfile): Added. Finds a Profile that matches - the ExecState and title. - (KJS::Profiler::startProfiling): Return early if there is already - a Profile with the ExecState and title. If not, create a new profile - and append it to m_currentProfiles. - (KJS::Profiler::stopProfiling): Loops through m_currentProfiles - and find the one matching the ExecState and title. If one is found - call stopProfiling and return the Profile after removing it - from m_currentProfiles. - (KJS::dispatchFunctionToProfiles): Helper inline function to loop through - m_currentProfiles and call a Profile function. - (KJS::Profiler::willExecute): Call dispatchFunctionToProfiles. - (KJS::Profiler::didExecute): Ditto. - * profiler/Profiler.h: - -2008-05-21 Alexey Proskuryakov - - Reviewed by Darin. - - REGRESSION (3.1.1-r33033): Crash in WebKit when opening or - refreshing page on people.com - - The problem was that STL algorithms do not work with non-conformant comparators, and the - site used sort(function() { return 0.5 - Math.random(); } to randomly shuffle an array. - - https://bugs.webkit.org/show_bug.cgi?id=18687 - REGRESSION(r32220): ecma/Array/15.4.4.5-3.js test now fails in GMT(BST) - - Besides relying on sort stability, this test was just broken, and kept failing with the - new stable sort. - - Tests: fast/js/sort-randomly.html - fast/js/sort-stability.html - fast/js/comparefn-sort-stability.html - - * kjs/avl_tree.h: Added an AVL tree implementation. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/AVLTree.h: Added. - Added an AVL tree implementation. - - * kjs/array_instance.cpp: - (KJS::ArrayInstance::increaseVectorLength): - (KJS::ArrayInstance::sort): - (KJS::AVLTreeAbstractorForArrayCompare::get_less): - (KJS::AVLTreeAbstractorForArrayCompare::set_less): - (KJS::AVLTreeAbstractorForArrayCompare::get_greater): - (KJS::AVLTreeAbstractorForArrayCompare::set_greater): - (KJS::AVLTreeAbstractorForArrayCompare::get_balance_factor): - (KJS::AVLTreeAbstractorForArrayCompare::set_balance_factor): - (KJS::AVLTreeAbstractorForArrayCompare::compare_key_key): - (KJS::AVLTreeAbstractorForArrayCompare::compare_key_node): - (KJS::AVLTreeAbstractorForArrayCompare::compare_node_node): - (KJS::AVLTreeAbstractorForArrayCompare::null): - (KJS::ArrayInstance::compactForSorting): - - * kjs/array_instance.h: increaseVectorLength() now returns a bool to indicate whether it was - successful. - - * wtf/Vector.h: - (WTF::Vector::Vector): - (WTF::::operator=): - (WTF::::fill): - Make these methods fail instead of crash when allocation fails, matching resize() and - reserveCapacity(), which already had this behavior. Callers need to check for null buffer - after making any Vector call that can try to allocate. - - * tests/mozilla/ecma/Array/15.4.4.5-3.js: Fixed the test to use a consistent sort function, - as suggested in comments to a Mozilla bug filed about it (I'll keep tracking the bug to see - what the final resolution is). - -2008-05-20 Kevin McCullough - - Reviewed by Tim. - - JSProfiler: Allow the profiler to "Focus" a - profile node. - - Implements focus by adding the idea of a profileNode being visible and - adding the ability to reset all of the visible flags. - - * profiler/Profile.h: - (KJS::Profile::focus): - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::ProfileNode): Initialize the visible flag. - (KJS::ProfileNode::setTreeVisible): Set the visibility of this node and - all of its descendents. - (KJS::ProfileNode::focus): Determine if this node should be visible when - focusing, if the functionName matches this node's function name or if any - of this node's children are visible. - (KJS::ProfileNode::restoreAll): Restore all nodes' visible flag. - (KJS::ProfileNode::debugPrintData): - * profiler/ProfileNode.h: - (KJS::ProfileNode::visible): - (KJS::ProfileNode::setVisible): - -2008-05-20 Timothy Hatcher - - Fixes a couple performance issues with the profiler. Also fixes - a regression where some nodes wouldn't be added to the tree. - - Reviewed by Kevin McCullough. - - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::addChild): Compare callIdentifier instead - of functionName. - * profiler/ProfileNode.h: - (CallIdentifier.operator==): Compare the CallIdentifiers in - an order that fails sooner for non-matches. - (CallIdentifier.callIdentifier): Return the CallIdentifier by - reference to prevent making a new copy each time. - -2008-05-20 Kevin McCullough - - Reviewed by Darin. - - JSProfiler: dump functions are in the code - Removed dump and logging functions from the Release version of the code - and renamed them to be obviously for debugging only. - - * JavaScriptCore.exp: - * profiler/Profile.cpp: - (KJS::Profile::debugPrintData): - (KJS::Profile::debugPrintDataSampleStyle): - * profiler/Profile.h: - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::debugPrintData): - (KJS::ProfileNode::debugPrintDataSampleStyle): - * profiler/ProfileNode.h: - * profiler/Profiler.cpp: - * profiler/Profiler.h: - -2008-05-20 Kevin McCullough - - Reviewed by Adam. - - JSProfiler: Keep track of non-JS execution time - We now have an extra node that represents the excess non-JS time. - - Also changed "SCRIPT" and "anonymous function" to be more consistent - with the debugger. - - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::stopProfiling): If this ProfileNode is the head node - create a new child that has the excess execution time. - (KJS::ProfileNode::calculatePercentages): Moved calculation of the - percentages into a function since it's called from multiple places. - * profiler/ProfileNode.h: Add the newly needed functions used above. - (KJS::ProfileNode::setTotalTime): - (KJS::ProfileNode::setSelfTime): - (KJS::ProfileNode::setNumberOfCalls): - * profiler/Profiler.cpp: renamed "SCRIPT" and "anonymous function" to be - consistent with the debugger and use constants that can be localized - more easily. - (KJS::getCallIdentifiers): - (KJS::getCallIdentifierFromFunctionImp): - -2008-05-20 Kevin McCullough - - Reviewed by Tim. - - JavaScript profiler (10928) - Removed only profiler-internal use of currentProfile since that concept - is changing. - - * profiler/Profile.h: Now stopProfiling takes a time and bool as - arguments. The time is used to calculate %s from and the bool tells - if this node is the head node and should be the one calculating the time. - (KJS::Profile::stopProfiling): - * profiler/ProfileNode.cpp: Ditto. - (KJS::ProfileNode::stopProfiling): - * profiler/ProfileNode.h: Ditto. - -2008-05-20 Kevin McCullough - - Accidentally turned on the profiler. - - * kjs/config.h: - - -2008-05-20 Kevin McCullough - - Reviewed by Tim. - - JavaScript profiler (10928) - Split function name into 3 parts so that the Web Inspector can link it to - the resource location from whence it came. - - * kjs/ustring.cpp: Implemented operator> for UStrings - (KJS::operator>): - * kjs/ustring.h: - * profiler/Profile.cpp: - (KJS::Profile::Profile): Initialize all 3 values. - (KJS::Profile::willExecute): Use CallIdentifier struct. - (KJS::Profile::didExecute): Ditto. - * profiler/Profile.h: Ditto and remove unused function. - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::ProfileNode): Use CallIdentifier struct. - (KJS::ProfileNode::willExecute): Ditto and fix an issue where we - restarted the m_startTime even though it was already started. - (KJS::ProfileNode::didExecute): Ditto. - (KJS::ProfileNode::findChild): Ditto. - (KJS::functionNameDescendingComparator): Ditto and use new comparator. - (KJS::functionNameAscendingComparator): Ditto. - (KJS::ProfileNode::printDataInspectorStyle): Use CallIdentifier struct. - (KJS::ProfileNode::printDataSampleStyle): Ditto. - * profiler/ProfileNode.h: - (KJS::CallIdentifier::CallIdentifier): Describe the CallIdentifier struct - (KJS::CallIdentifier::operator== ): - (KJS::ProfileNode::create): Use the CallIdentifier struct. - (KJS::ProfileNode::callIdentifier): - (KJS::ProfileNode::functionName): Now only return the function name, not - the url and line number too. - (KJS::ProfileNode::url): - (KJS::ProfileNode::lineNumber): - * profiler/Profiler.cpp: Use the CallIdentifier struct. - (KJS::Profiler::startProfiling): - (KJS::Profiler::willExecute): - (KJS::Profiler::didExecute): - (KJS::getCallIdentifiers): - (KJS::getCallIdentifierFromFunctionImp): - -2008-05-20 Timothy Hatcher - - Rename sortFileName{Ascending,Descending} to - sortFunctionName{Ascending,Descending}. - - Reviewed by Kevin McCullough. - - * JavaScriptCore.exp: - * kjs/config.h: - * profiler/Profile.h: - * profiler/ProfileNode.cpp: - (KJS::functionNameDescendingComparator): - (KJS::ProfileNode::sortFunctionNameDescending): - (KJS::functionNameAscendingComparator): - (KJS::ProfileNode::sortFunctionNameAscending): - * profiler/ProfileNode.h: - -2008-05-19 Timothy Hatcher - - Make the profiler use higher than millisecond resolution time-stamps. - - Reviewed by Kevin McCullough. - - * kjs/DateMath.cpp: - (KJS::getCurrentUTCTime): Call getCurrentUTCTimeWithMicroseconds and - floor the result. - (KJS::getCurrentUTCTimeWithMicroseconds): Copied from the previous - implementation of getCurrentUTCTime without the floor call. - * kjs/DateMath.h: Addded getCurrentUTCTimeWithMicroseconds. - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::ProfileNode): Use getCurrentUTCTimeWithMicroseconds. - -2008-05-19 Timothy Hatcher - - Fixes a bug in the profiler where call and apply would show up - and double the time spent in a function. We don't want to show call - and apply at all in the profiles. This change excludes them. - - Reviewed by Kevin McCullough. - - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::stopProfiling): Remove a second for loop and - calculate self time in the existing loop. - * profiler/Profiler.cpp: - (KJS::shouldExcludeFunction): Helper inline function that returns - true in the current function in an InternalFunctionImp and it is - has the functionName call or apply. - (KJS::Profiler::willExecute): Call shouldExcludeFunction and return - early if if returns true. - (KJS::Profiler::didExecute): Ditto. - -2008-05-19 Kevin McCullough - - Reviewed by Tim. - - JavaScript profiler (10928) - - Implement sorting by function name. - - * JavaScriptCore.exp: - * profiler/Profile.h: - (KJS::Profile::sortFileNameDescending): - (KJS::Profile::sortFileNameAscending): - * profiler/ProfileNode.cpp: - (KJS::fileNameDescendingComparator): - (KJS::ProfileNode::sortFileNameDescending): - (KJS::fileNameAscendingComparator): - (KJS::ProfileNode::sortFileNameAscending): - * profiler/ProfileNode.h: - -2008-05-19 Kevin McCullough - - Reviewed by Adam. - - JavaScript profiler (10928) - - Pass the exec state to profiler when calling startProfiling so that if - profiling is started within an execution context that location is - recorded correctly. - - * JavaScriptCore.exp: - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::printDataInspectorStyle): Dump more info for debugging - purposes. - * profiler/Profiler.cpp: - (KJS::Profiler::startProfiling): - * profiler/Profiler.h: - -2008-05-19 Kevin McCullough - - Rubberstamped by Geoff. - - Turn off the profiler because it is a performance regression. - - * kjs/config.h: - -2008-05-19 Alp Toker - - Reviewed by Anders and Beth. - - http://bugs.webkit.org/show_bug.cgi?id=16495 - [GTK] Accessibility support with ATK/AT-SPI - - Initial ATK/AT-SPI accessibility support for the GTK+ port. - - * wtf/Platform.h: - -2008-05-19 Kevin McCullough - - Reviewed by Tim. - - JavaScript profiler (10928) - -In an effort to make the profiler as efficient as possible instead of - prepending to a vector we keep the vector in reverse order and operate - over it backwards. - - * profiler/Profile.cpp: - (KJS::Profile::willExecute): - (KJS::Profile::didExecute): - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::didExecute): - (KJS::ProfileNode::endAndRecordCall): - * profiler/ProfileNode.h: - * profiler/Profiler.cpp: - (KJS::getStackNames): - -2008-05-16 Kevin McCullough - - Reviewed by Tim. - - JavaScript profiler (10928) - Implement sorting for the profiler. - I chose to sort the profileNodes in place since there is no reason they - need to retain their original order. - - * JavaScriptCore.exp: Export the symbols. - * profiler/Profile.h: Add the different ways a profile can be sorted. - (KJS::Profile::sortTotalTimeDescending): - (KJS::Profile::sortTotalTimeAscending): - (KJS::Profile::sortSelfTimeDescending): - (KJS::Profile::sortSelfTimeAscending): - (KJS::Profile::sortCallsDescending): - (KJS::Profile::sortCallsAscending): - * profiler/ProfileNode.cpp: Implement those ways. - (KJS::totalTimeDescendingComparator): - (KJS::ProfileNode::sortTotalTimeDescending): - (KJS::totalTimeAscendingComparator): - (KJS::ProfileNode::sortTotalTimeAscending): - (KJS::selfTimeDescendingComparator): - (KJS::ProfileNode::sortSelfTimeDescending): - (KJS::selfTimeAscendingComparator): - (KJS::ProfileNode::sortSelfTimeAscending): - (KJS::callsDescendingComparator): - (KJS::ProfileNode::sortCallsDescending): - (KJS::callsAscendingComparator): - (KJS::ProfileNode::sortCallsAscending): - * profiler/ProfileNode.h: No longer use a Deque since it cannot be - sorted by std::sort and there was no reason not to use a Vector. I - previously had though I would do prepending but am not. - (KJS::ProfileNode::selfTime): - (KJS::ProfileNode::totalPercent): - (KJS::ProfileNode::selfPercent): - (KJS::ProfileNode::children): - * profiler/Profiler.cpp: Removed these functions as they can be called - directoy on the Profile object after getting the Vector of them. - (KJS::getStackNames): - * profiler/Profiler.h: - -2008-05-15 Ariya Hidayat - - Reviewed by Simon. - - Since WebKitGtk is fully using autotools now, clean-up the .pro/.pri files - from gtk-port. - - * JavaScriptCore.pro: - * kjs/testkjs.pro: - -2008-05-15 Kevin McCullough - - - Build fix. - - * JavaScriptCore.exp: - -2008-05-15 Kevin McCullough - - Reviewed by Tim. - - JavaScript profiler (10928) - - Cache some values to save on computing them repetitively. This will be - a big savings when we sort since we won't have to walk the tree for - every comparison! - - We cache these values when we end profiling because otherwise we won't - know which profile to get the totalTime for the whole profile from without - retaining a reference to the head profile or looking up the profile from - the list of all profiles. - - Also it's safe to assume we won't be asked for these values while we - are still profiling since the WebInspector only get's profileNodes from - profiles that are in the allProfiles() list and a profile is only added - to that list after it has finished and these values will no longer - change. - - * JavaScriptCore.exp: - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::ProfileNode): - (KJS::ProfileNode::stopProfiling): - (KJS::ProfileNode::printDataInspectorStyle): - (KJS::ProfileNode::printDataSampleStyle): - (KJS::ProfileNode::endAndRecordCall): - * profiler/ProfileNode.h: - (KJS::ProfileNode::totalTime): - (KJS::ProfileNode::selfTime): - (KJS::ProfileNode::totalPercent): - (KJS::ProfileNode::selfPercent): - * profiler/Profiler.cpp: - (KJS::Profiler::stopProfiling): - -2008-05-15 Simon Hausmann - - Reviewed by Holger. - - Fix compilation when compiling with MSVC and wchar_t support. - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::foldCase): - (WTF::Unicode::umemcasecmp): - -2008-05-14 Kevin McCullough - - Reviewed by Tim. - - JavaScript profiler (10928) - - Turn on the profiler. - - * kjs/config.h: - -2008-05-14 Kevin McCullough - - Reviewed by Tim. - - JavaScript profiler (10928) - - Expose the new profiler functions to the WebInspector. - - * JavaScriptCore.exp: - -2008-05-14 Kevin McCullough - - Giving credit where credit is due. - - * ChangeLog: - -2008-05-14 Kevin McCullough - - Reviewed by Geoff and Sam. - - JavaScript profiler (10928) - Add the ability to get percentages of total and self time for displaying - in the WebInspector. - - * profiler/Profile.h: - (KJS::Profile::totalProfileTime): - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::totalPercent): - (KJS::ProfileNode::selfPercent): - * profiler/ProfileNode.h: - * profiler/Profiler.h: - (KJS::Profiler::currentProfile): - -2008-05-14 Kevin McCullough - - Reviewed by Sam. - - JavaScript profiler (10928) - - Rename FunctionCallProfile to ProfileNode. - - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * profiler/FunctionCallProfile.cpp: Removed. - * profiler/FunctionCallProfile.h: Removed. - * profiler/Profile.cpp: - (KJS::Profile::Profile): - (KJS::Profile::willExecute): - * profiler/Profile.h: - (KJS::Profile::callTree): - * profiler/ProfileNode.cpp: Copied from profiler/FunctionCallProfile.cpp. - (KJS::ProfileNode::ProfileNode): - (KJS::ProfileNode::willExecute): - (KJS::ProfileNode::didExecute): - (KJS::ProfileNode::addChild): - (KJS::ProfileNode::findChild): - (KJS::ProfileNode::stopProfiling): - (KJS::ProfileNode::selfTime): - (KJS::ProfileNode::printDataInspectorStyle): - (KJS::ProfileNode::printDataSampleStyle): - (KJS::ProfileNode::endAndRecordCall): - * profiler/ProfileNode.h: Copied from profiler/FunctionCallProfile.h. - (KJS::ProfileNode::create): - (KJS::ProfileNode::children): - * profiler/Profiler.cpp: - -2008-05-14 Kevin McCullough - - Reviewed by John. - - JavaScript profiler (10928) - - Have each FunctionCallProfile be able to return it's total and self time. - - * JavaScriptCore.exp: - * profiler/FunctionCallProfile.cpp: - (KJS::FunctionCallProfile::selfTime): - * profiler/FunctionCallProfile.h: - (KJS::FunctionCallProfile::totalTime): - -2008-05-14 Alexey Proskuryakov - - Reviewed by Darin. - - REGRESSION: A script fails because of a straw BOM character in it. - - - Unicode format characters (Cf) should be removed from JavaScript source - - Of all Cf characters, we are only removing BOM, because this is what Firefox trunk has - settled upon, after extensive discussion and investigation. - - Based on Darin's work on this bug. - - Test: fast/js/removing-Cf-characters.html - - * kjs/lexer.cpp: - (KJS::Lexer::setCode): Tweak formatting. Use a call to shift(4) to read in the - first characters, instead of having special case code here. - (KJS::Lexer::shift): Add a loop when reading a character to skip BOM characters. - -2008-05-13 Matt Lilek - - Not reviewed, build fix. - - * kjs/date_object.cpp: - (KJS::DateObjectFuncImp::callAsFunction): - -2008-05-13 Anders Carlsson - - Reviewed by Sam. - - Implement Date.now - - Implement Date.now which returns the number of milliseconds since the epoch. - - * kjs/CommonIdentifiers.h: - * kjs/date_object.cpp: - (KJS::DateObjectFuncImp::): - (KJS::DateObjectImp::DateObjectImp): - (KJS::DateObjectFuncImp::callAsFunction): - -2008-05-13 Kevin McCullough - - Giving credit where credit is due. - - * ChangeLog: - -2008-05-13 Kevin McCullough - - Reviewed by Adam and Geoff. - - JavaScript profiler (10928) - Use PassRefPtrs instead of RefPtrs when appropriate. - - * profiler/FunctionCallProfile.cpp: - (KJS::FunctionCallProfile::addChild): - * profiler/FunctionCallProfile.h: - * profiler/Profile.h: - (KJS::Profile::callTree): - -2008-05-13 Kevin McCullough - - Reviewed by Sam. - - JavaScript profiler (10928) - - Made some functions static (as per Adam) and changed from using raw - pointers to RefPtr for making these JavaScript Objects. - - * profiler/FunctionCallProfile.cpp: - (KJS::FunctionCallProfile::addChild): - (KJS::FunctionCallProfile::findChild): - * profiler/FunctionCallProfile.h: - (KJS::FunctionCallProfile::create): - * profiler/Profile.cpp: - (KJS::Profile::Profile): - (KJS::Profile::willExecute): - (KJS::Profile::didExecute): - (KJS::functionNameCountPairComparator): - * profiler/Profile.h: - (KJS::Profile::create): - (KJS::Profile::title): - (KJS::Profile::callTree): - * profiler/Profiler.cpp: - (KJS::Profiler::startProfiling): - * profiler/Profiler.h: - (KJS::Profiler::allProfiles): - (KJS::Profiler::clearProfiles): - -2008-05-13 Alexey Proskuryakov - - Reviewed by Geoffrey Garen. - - JavaScriptCore API claims to work with UTF8 strings, but only works - with ASCII strings - - * kjs/ustring.h: - * kjs/ustring.cpp: - (KJS::UString::Rep::createFromUTF8): - Added. Implementation adapted from JSStringCreateWithUTF8CString(). - - * API/JSStringRef.cpp: - (JSStringCreateWithUTF8CString): - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - Use UString::Rep::createFromUTF8(). - -2008-05-12 Mark Rowe - - Reviewed by Tim Hatcher. - - WebKit needs availability macros in order to deprecate APIs - - Create WebKit availability macros that key off the Mac OS X version being targeted to - determine the WebKit version being targeted. Applications can define - WEBKIT_VERSION_MIN_REQUIRED before including WebKit headers in order to target a specific - version of WebKit. - - The availability header is being added to JavaScriptCore rather than WebKit as JavaScriptCore - is the lowest-level portion of the public WebKit API. - - * API/WebKitAvailability.h: Added. - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-05-12 Alexey Proskuryakov - - Reviewed by Maciej. - - https://bugs.webkit.org/show_bug.cgi?id=18828 - Reproducible crash with PAC file - - Naively moving JavaScriptCore into thread-specific data was inappropriate in the face of - exiting JavaScriptCore API clients, which expect a different therading model. Temporarily - disabling ThreadSpecific implementation until this can be sorted out. - - * wtf/ThreadSpecific.h: - (WTF::::ThreadSpecific): - (WTF::::~ThreadSpecific): - (WTF::::get): - (WTF::::set): - -2008-05-12 Alexey Proskuryakov - - Roll out recent threading changes (r32807, r32810, r32819, r32822) to simplify - SquirrelFish merging. - - * API/JSBase.cpp: - (JSGarbageCollect): - * API/JSCallbackObjectFunctions.h: - (KJS::::staticFunctionGetter): - * API/JSClassRef.cpp: - (OpaqueJSClass::prototype): - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeConstructor): - (JSObjectMakeFunction): - * API/JSValueRef.cpp: - (JSValueMakeNumber): - (JSValueMakeString): - * JavaScriptCore.exp: - * kjs/ExecState.h: - * kjs/InitializeThreading.cpp: - (KJS::initializeThreadingOnce): - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::~JSGlobalObject): - (KJS::JSGlobalObject::init): - (KJS::JSGlobalObject::put): - (KJS::JSGlobalObject::reset): - (KJS::JSGlobalObject::tearOffActivation): - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::head): - (KJS::JSGlobalObject::perThreadData): - * kjs/JSLock.cpp: - (KJS::JSLock::registerThread): - * kjs/JSLock.h: - (KJS::JSLock::JSLock): - * kjs/array_instance.cpp: - (KJS::ArrayInstance::ArrayInstance): - (KJS::ArrayInstance::lengthGetter): - * kjs/array_object.cpp: - (KJS::arrayProtoFuncToString): - (KJS::arrayProtoFuncToLocaleString): - (KJS::arrayProtoFuncJoin): - (KJS::arrayProtoFuncConcat): - (KJS::arrayProtoFuncPop): - (KJS::arrayProtoFuncPush): - (KJS::arrayProtoFuncShift): - (KJS::arrayProtoFuncSlice): - (KJS::arrayProtoFuncSplice): - (KJS::arrayProtoFuncUnShift): - (KJS::arrayProtoFuncFilter): - (KJS::arrayProtoFuncMap): - (KJS::arrayProtoFuncEvery): - (KJS::arrayProtoFuncForEach): - (KJS::arrayProtoFuncSome): - (KJS::arrayProtoFuncIndexOf): - (KJS::arrayProtoFuncLastIndexOf): - (KJS::ArrayObjectImp::ArrayObjectImp): - (KJS::ArrayObjectImp::construct): - * kjs/bool_object.cpp: - (KJS::BooleanPrototype::BooleanPrototype): - (KJS::booleanProtoFuncToString): - (KJS::BooleanObjectImp::BooleanObjectImp): - (KJS::BooleanObjectImp::construct): - * kjs/collector.cpp: - (KJS::allocateBlock): - (KJS::Collector::recordExtraCost): - (KJS::Collector::heapAllocate): - (KJS::Collector::allocate): - (KJS::Collector::allocateNumber): - (KJS::Collector::registerAsMainThread): - (KJS::onMainThread): - (KJS::PlatformThread::PlatformThread): - (KJS::getCurrentPlatformThread): - (KJS::Collector::Thread::Thread): - (KJS::destroyRegisteredThread): - (KJS::initializeRegisteredThreadKey): - (KJS::Collector::registerThread): - (KJS::Collector::markStackObjectsConservatively): - (KJS::Collector::markCurrentThreadConservativelyInternal): - (KJS::Collector::markCurrentThreadConservatively): - (KJS::suspendThread): - (KJS::resumeThread): - (KJS::getPlatformThreadRegisters): - (KJS::otherThreadStackPointer): - (KJS::Collector::markOtherThreadConservatively): - (KJS::protectedValues): - (KJS::Collector::protect): - (KJS::Collector::unprotect): - (KJS::Collector::collectOnMainThreadOnly): - (KJS::Collector::markProtectedObjects): - (KJS::Collector::markMainThreadOnlyObjects): - (KJS::Collector::sweep): - (KJS::Collector::collect): - (KJS::Collector::size): - (KJS::Collector::globalObjectCount): - (KJS::Collector::protectedGlobalObjectCount): - (KJS::Collector::protectedObjectCount): - (KJS::Collector::protectedObjectTypeCounts): - (KJS::Collector::isBusy): - (KJS::Collector::reportOutOfMemoryToAllExecStates): - * kjs/collector.h: - (KJS::Collector::cellBlock): - (KJS::Collector::cellOffset): - (KJS::Collector::isCellMarked): - (KJS::Collector::markCell): - (KJS::Collector::reportExtraMemoryCost): - * kjs/date_object.cpp: - (KJS::formatLocaleDate): - (KJS::DatePrototype::DatePrototype): - (KJS::DateObjectImp::DateObjectImp): - (KJS::DateObjectImp::construct): - (KJS::DateObjectImp::callAsFunction): - (KJS::DateObjectFuncImp::DateObjectFuncImp): - (KJS::DateObjectFuncImp::callAsFunction): - (KJS::dateProtoFuncToString): - (KJS::dateProtoFuncToUTCString): - (KJS::dateProtoFuncToDateString): - (KJS::dateProtoFuncToTimeString): - (KJS::dateProtoFuncToLocaleString): - (KJS::dateProtoFuncToLocaleDateString): - (KJS::dateProtoFuncToLocaleTimeString): - (KJS::dateProtoFuncValueOf): - (KJS::dateProtoFuncGetTime): - (KJS::dateProtoFuncGetFullYear): - (KJS::dateProtoFuncGetUTCFullYear): - (KJS::dateProtoFuncToGMTString): - (KJS::dateProtoFuncGetMonth): - (KJS::dateProtoFuncGetUTCMonth): - (KJS::dateProtoFuncGetDate): - (KJS::dateProtoFuncGetUTCDate): - (KJS::dateProtoFuncGetDay): - (KJS::dateProtoFuncGetUTCDay): - (KJS::dateProtoFuncGetHours): - (KJS::dateProtoFuncGetUTCHours): - (KJS::dateProtoFuncGetMinutes): - (KJS::dateProtoFuncGetUTCMinutes): - (KJS::dateProtoFuncGetSeconds): - (KJS::dateProtoFuncGetUTCSeconds): - (KJS::dateProtoFuncGetMilliSeconds): - (KJS::dateProtoFuncGetUTCMilliseconds): - (KJS::dateProtoFuncGetTimezoneOffset): - (KJS::dateProtoFuncSetTime): - (KJS::setNewValueFromTimeArgs): - (KJS::setNewValueFromDateArgs): - (KJS::dateProtoFuncSetYear): - (KJS::dateProtoFuncGetYear): - * kjs/error_object.cpp: - (KJS::ErrorPrototype::ErrorPrototype): - (KJS::errorProtoFuncToString): - (KJS::ErrorObjectImp::ErrorObjectImp): - (KJS::ErrorObjectImp::construct): - (KJS::NativeErrorPrototype::NativeErrorPrototype): - (KJS::NativeErrorImp::NativeErrorImp): - (KJS::NativeErrorImp::construct): - * kjs/function.cpp: - (KJS::FunctionImp::lengthGetter): - (KJS::FunctionImp::construct): - (KJS::Arguments::Arguments): - (KJS::ActivationImp::createArgumentsObject): - (KJS::encode): - (KJS::decode): - (KJS::globalFuncParseInt): - (KJS::globalFuncParseFloat): - (KJS::globalFuncEscape): - (KJS::globalFuncUnescape): - (KJS::PrototypeFunction::PrototypeFunction): - (KJS::PrototypeReflexiveFunction::PrototypeReflexiveFunction): - * kjs/function_object.cpp: - (KJS::FunctionPrototype::FunctionPrototype): - (KJS::functionProtoFuncToString): - (KJS::FunctionObjectImp::FunctionObjectImp): - (KJS::FunctionObjectImp::construct): - * kjs/internal.cpp: - (KJS::StringImp::toObject): - * kjs/internal.h: - (KJS::StringImp::StringImp): - (KJS::NumberImp::operator new): - * kjs/list.cpp: - (KJS::List::markSet): - (KJS::List::markProtectedListsSlowCase): - (KJS::List::expandAndAppend): - * kjs/list.h: - (KJS::List::List): - (KJS::List::~List): - (KJS::List::markProtectedLists): - * kjs/lookup.h: - (KJS::staticFunctionGetter): - (KJS::cacheGlobalObject): - * kjs/math_object.cpp: - (KJS::MathObjectImp::getValueProperty): - (KJS::mathProtoFuncAbs): - (KJS::mathProtoFuncACos): - (KJS::mathProtoFuncASin): - (KJS::mathProtoFuncATan): - (KJS::mathProtoFuncATan2): - (KJS::mathProtoFuncCeil): - (KJS::mathProtoFuncCos): - (KJS::mathProtoFuncExp): - (KJS::mathProtoFuncFloor): - (KJS::mathProtoFuncLog): - (KJS::mathProtoFuncMax): - (KJS::mathProtoFuncMin): - (KJS::mathProtoFuncPow): - (KJS::mathProtoFuncRandom): - (KJS::mathProtoFuncRound): - (KJS::mathProtoFuncSin): - (KJS::mathProtoFuncSqrt): - (KJS::mathProtoFuncTan): - * kjs/nodes.cpp: - (KJS::ParserRefCounted::ParserRefCounted): - (KJS::ParserRefCounted::ref): - (KJS::ParserRefCounted::deref): - (KJS::ParserRefCounted::refcount): - (KJS::ParserRefCounted::deleteNewObjects): - (KJS::Node::handleException): - (KJS::NumberNode::evaluate): - (KJS::StringNode::evaluate): - (KJS::ArrayNode::evaluate): - (KJS::PostIncResolveNode::evaluate): - (KJS::PostIncLocalVarNode::evaluate): - (KJS::PostDecResolveNode::evaluate): - (KJS::PostDecLocalVarNode::evaluate): - (KJS::PostDecLocalVarNode::inlineEvaluateToNumber): - (KJS::PostIncBracketNode::evaluate): - (KJS::PostDecBracketNode::evaluate): - (KJS::PostIncDotNode::evaluate): - (KJS::PostDecDotNode::evaluate): - (KJS::typeStringForValue): - (KJS::LocalVarTypeOfNode::evaluate): - (KJS::TypeOfResolveNode::evaluate): - (KJS::TypeOfValueNode::evaluate): - (KJS::PreIncLocalVarNode::evaluate): - (KJS::PreIncResolveNode::evaluate): - (KJS::PreDecLocalVarNode::evaluate): - (KJS::PreDecResolveNode::evaluate): - (KJS::PreIncConstNode::evaluate): - (KJS::PreDecConstNode::evaluate): - (KJS::PostIncConstNode::evaluate): - (KJS::PostDecConstNode::evaluate): - (KJS::PreIncBracketNode::evaluate): - (KJS::PreDecBracketNode::evaluate): - (KJS::PreIncDotNode::evaluate): - (KJS::PreDecDotNode::evaluate): - (KJS::NegateNode::evaluate): - (KJS::BitwiseNotNode::evaluate): - (KJS::MultNode::evaluate): - (KJS::DivNode::evaluate): - (KJS::ModNode::evaluate): - (KJS::addSlowCase): - (KJS::add): - (KJS::AddNumbersNode::evaluate): - (KJS::AddStringsNode::evaluate): - (KJS::AddStringLeftNode::evaluate): - (KJS::AddStringRightNode::evaluate): - (KJS::SubNode::evaluate): - (KJS::LeftShiftNode::evaluate): - (KJS::RightShiftNode::evaluate): - (KJS::UnsignedRightShiftNode::evaluate): - (KJS::BitXOrNode::evaluate): - (KJS::BitOrNode::evaluate): - (KJS::valueForReadModifyAssignment): - (KJS::ForInNode::execute): - (KJS::TryNode::execute): - (KJS::FuncDeclNode::makeFunction): - (KJS::FuncExprNode::evaluate): - * kjs/nodes.h: - * kjs/number_object.cpp: - (KJS::NumberPrototype::NumberPrototype): - (KJS::numberProtoFuncToString): - (KJS::numberProtoFuncToLocaleString): - (KJS::numberProtoFuncToFixed): - (KJS::numberProtoFuncToExponential): - (KJS::numberProtoFuncToPrecision): - (KJS::NumberObjectImp::NumberObjectImp): - (KJS::NumberObjectImp::getValueProperty): - (KJS::NumberObjectImp::construct): - (KJS::NumberObjectImp::callAsFunction): - * kjs/object.cpp: - (KJS::JSObject::call): - (KJS::JSObject::get): - (KJS::JSObject::put): - (KJS::JSObject::defineGetter): - (KJS::JSObject::defineSetter): - (KJS::JSObject::putDirect): - (KJS::Error::create): - * kjs/object.h: - * kjs/object_object.cpp: - (KJS::ObjectPrototype::ObjectPrototype): - (KJS::objectProtoFuncToLocaleString): - (KJS::objectProtoFuncToString): - (KJS::ObjectObjectImp::ObjectObjectImp): - (KJS::ObjectObjectImp::construct): - * kjs/property_map.h: - (KJS::SavedProperty::SavedProperty): - (KJS::SavedProperty::init): - (KJS::SavedProperty::~SavedProperty): - (KJS::SavedProperty::name): - (KJS::SavedProperty::value): - (KJS::SavedProperty::attributes): - * kjs/protect.h: - (KJS::gcProtect): - (KJS::gcUnprotect): - * kjs/regexp_object.cpp: - (KJS::RegExpPrototype::RegExpPrototype): - (KJS::regExpProtoFuncToString): - (KJS::RegExpImp::getValueProperty): - (KJS::RegExpObjectImp::RegExpObjectImp): - (KJS::RegExpObjectImp::arrayOfMatches): - (KJS::RegExpObjectImp::getBackref): - (KJS::RegExpObjectImp::getLastParen): - (KJS::RegExpObjectImp::getLeftContext): - (KJS::RegExpObjectImp::getRightContext): - (KJS::RegExpObjectImp::getValueProperty): - (KJS::RegExpObjectImp::createRegExpImp): - * kjs/regexp_object.h: - * kjs/string_object.cpp: - (KJS::StringInstance::StringInstance): - (KJS::StringInstance::lengthGetter): - (KJS::StringInstance::indexGetter): - (KJS::stringInstanceNumericPropertyGetter): - (KJS::StringPrototype::StringPrototype): - (KJS::replace): - (KJS::stringProtoFuncCharAt): - (KJS::stringProtoFuncCharCodeAt): - (KJS::stringProtoFuncConcat): - (KJS::stringProtoFuncIndexOf): - (KJS::stringProtoFuncLastIndexOf): - (KJS::stringProtoFuncMatch): - (KJS::stringProtoFuncSearch): - (KJS::stringProtoFuncReplace): - (KJS::stringProtoFuncSlice): - (KJS::stringProtoFuncSplit): - (KJS::stringProtoFuncSubstr): - (KJS::stringProtoFuncSubstring): - (KJS::stringProtoFuncToLowerCase): - (KJS::stringProtoFuncToUpperCase): - (KJS::stringProtoFuncToLocaleLowerCase): - (KJS::stringProtoFuncToLocaleUpperCase): - (KJS::stringProtoFuncLocaleCompare): - (KJS::stringProtoFuncBig): - (KJS::stringProtoFuncSmall): - (KJS::stringProtoFuncBlink): - (KJS::stringProtoFuncBold): - (KJS::stringProtoFuncFixed): - (KJS::stringProtoFuncItalics): - (KJS::stringProtoFuncStrike): - (KJS::stringProtoFuncSub): - (KJS::stringProtoFuncSup): - (KJS::stringProtoFuncFontcolor): - (KJS::stringProtoFuncFontsize): - (KJS::stringProtoFuncAnchor): - (KJS::stringProtoFuncLink): - (KJS::StringObjectImp::StringObjectImp): - (KJS::StringObjectImp::construct): - (KJS::StringObjectImp::callAsFunction): - (KJS::StringObjectFuncImp::StringObjectFuncImp): - (KJS::StringObjectFuncImp::callAsFunction): - * kjs/string_object.h: - (KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined): - * kjs/testkjs.cpp: - (GlobalObject::GlobalObject): - (functionGC): - (functionRun): - (functionReadline): - (kjsmain): - * kjs/ustring.h: - * kjs/value.cpp: - (KJS::JSCell::operator new): - (KJS::jsString): - (KJS::jsOwnedString): - (KJS::jsNumberCell): - * kjs/value.h: - (KJS::jsNaN): - (KJS::jsNumber): - (KJS::jsNumberFromAnd): - (KJS::JSCell::marked): - (KJS::JSCell::mark): - (KJS::JSValue::toJSNumber): - * wtf/ThreadSpecific.h: - (WTF::T): - -2008-05-10 Julien Chaffraix - - Qt & wx build fix. - - * JavaScriptCore.pri: Add profiler/Profile.cpp. - * JavaScriptCoreSources.bkl: Ditto. - -2008-05-10 Jan Michael Alonzo - - Reviewed by Maciej. - - Gtk+ build fix - - * GNUmakefile.am: Add Profile.cpp in _sources - -2008-05-09 Brady Eidson - - Build Fix. Kevin is an idiot. - ("My name is Kevin McCullough and I approve this message.") - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-05-09 Kevin McCullough - - Reviewed by Tim. - - - JavaScript profiler (10928) - -Add Profile class so that all profiles can be stored and retrieved by - the WebInspector when that time comes. - - * JavaScriptCore.exp: Export the new function signatures. - * JavaScriptCore.xcodeproj/project.pbxproj: Add the new files to the - project - * profiler/Profile.cpp: Added. This class represents a single run of the - profiler. - (KJS::Profile::Profile): - (KJS::Profile::willExecute): - (KJS::Profile::didExecute): - (KJS::Profile::printDataInspectorStyle): - (KJS::functionNameCountPairComparator): - (KJS::Profile::printDataSampleStyle): - * profiler/Profile.h: Added. Ditto - (KJS::Profile::stopProfiling): - * profiler/Profiler.cpp: Now the profiler keeps track of many profiles - but only runs one at a time. - (KJS::Profiler::startProfiling): - (KJS::Profiler::stopProfiling): - (KJS::Profiler::willExecute): - (KJS::Profiler::didExecute): - (KJS::Profiler::printDataInspectorStyle): - (KJS::Profiler::printDataSampleStyle): - * profiler/Profiler.h: Ditto. - (KJS::Profiler::~Profiler): - (KJS::Profiler::allProfiles): - (KJS::Profiler::clearProfiles): - -2008-05-08 Anders Carlsson - - Reviewed by Mark. - - Enable NPAPI plug-ins on 64-bit. - - * wtf/Platform.h: - -2008-05-07 Julien Chaffraix - - Reviewed by Adam Roben. - - wx & Gtk build fix. - - Add SIZE_MAX definition for the wx port. - - * os-win32/stdint.h: - -2008-05-07 Ariya Hidayat - - Reviewed by Simon. - - Support for isMainThread in the Qt port. - - * wtf/ThreadingQt.cpp: - (WTF::initializeThreading): Adjusted. - (WTF::isMainThread): Added. - -2008-05-05 Darin Adler - - Reviewed by John Sullivan. - - - fix debug-only leak seen on buildbot - - * wtf/HashTable.h: - (WTF::HashTable::checkKey): After writing an empty value in, but before constructing a - deleted value on top of it, call the destructor so the empty value doesn't leak. - -2008-05-02 Alexey Proskuryakov - - Reviewed by Geoffrey Garen. - - Get rid of static data in nodes.cpp (well, at least of non-debug one). - - No measurable change on SunSpider. - - * kjs/InitializeThreading.cpp: - (KJS::initializeThreadingOnce): - * kjs/nodes.cpp: - (KJS::newTrackedObjects): - (KJS::trackedObjectExtraRefCounts): - (KJS::initializeNodesThreading): - (KJS::ParserRefCounted::ParserRefCounted): - (KJS::ParserRefCounted::ref): - (KJS::ParserRefCounted::deref): - (KJS::ParserRefCounted::refcount): - (KJS::ParserRefCounted::deleteNewObjects): - * kjs/nodes.h: - Made newTrackedObjects and trackedObjectExtraRefCounts per-thread. - -2008-05-02 Alexey Proskuryakov - - Reviewed by Darin. - - Move call stack depth counter to global object. - - * kjs/ExecState.h: (KJS::ExecState::functionCallDepth): Added a recursion depth counter to - per-thread data. - * kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::init): Initialize PerThreadData.functionCallDepth. - * kjs/JSGlobalObject.h: (KJS::JSGlobalObject::perThreadData): Made the result non-const. - - * kjs/object.cpp: - (KJS::throwStackSizeExceededError): Moved throwError to a separate function, since it is now - the only thing in JSObject::call that needs a PIC branch. - (KJS::JSObject::call): Use a per-thread variable instead of local static for recursion depth - tracking. - -2008-05-02 Alexey Proskuryakov - - Reviewed by Darin. - - Make JavaScriptGlue and JavaScriptCore API functions implicitly call initializeThreading - for the sake of non-WebKit clients. - - * API/JSBase.cpp: - (JSGarbageCollect): - * API/JSContextRef.cpp: - (JSGlobalContextCreate): - These are the JavaScriptCore API bottlenecks. There are a few other JSStringRef - and JSClassRef functions that can be called earlier, but they do not do anything that - requires initializeThreading. - - * kjs/InitializeThreading.cpp: - (KJS::doInitializeThreading): - (KJS::initializeThreading): - On Darwin, make the initialization happen under pthread_once, since there is no guarantee - that non-WebKit clients won't try to call this function re-entrantly. - - * kjs/InitializeThreading.h: - * wtf/Threading.h: - Spell out initializeThreading contract. - - * wtf/ThreadingPthreads.cpp: (WTF::isMainThread): Make sure that results are correct on - Darwin, even if threading was initialized from a secondary thread. - -2008-05-02 Alexey Proskuryakov - - Reviewed by Geoffrey Garen. - - https://bugs.webkit.org/show_bug.cgi?id=18826 - Make JavaScript heap per-thread - - * wtf/ThreadSpecific.h: Make sure to initialize POD thread-specific varaibles, too - (replaced "new T" with "new T()"). - - * kjs/collector.h: Renamed Collector to Heap, made the heap per-thread. Removed support for - multithreaded access to a heap. - (KJS::CollectorBlock): Removed collectOnMainThreadOnly bitmap, added a reference to owner heap. - (KJS::SmallCellCollectorBlock): Ditto. - (KJS::Heap::markListSet): Moved from a static variable in List.cpp to a per-thread one here. - (KJS::Heap::heap): Added a method to find which heap a JSValue is allocated in. - - * kjs/collector.cpp: Changed "const size_t" constants to #defines, to avoid a PIC branch - (gcc was using one to access a constant used in std::max(), because it takes a reference, - even though std::max() itself was inlined). - (KJS::Heap::threadHeap): JS heap is now per-thread. - (KJS::Heap::Heap): Zero-initialize the heap. - (KJS::allocateBlock): Added NEVER_INLINE, because this function uses a PIC branch, so - inlining it in Heap::heapAllocate() is bad for performance, now that the latter doesn't - use any global data. - (KJS::Heap::heapAllocate): Initialize Block::heap. - (KJS::Heap::markCurrentThreadConservatively): Moved into markStackObjectsConservatively(), - as GC only works with a current thread's heap now. - (KJS::Heap::sweep): Removed collectOnMainThreadOnly checks. - (KJS::Heap::collect): Ditto. - - * kjs/JSLock.cpp: - * kjs/JSLock.h: - (KJS::JSLock::JSLock): - Removed registerThread(), as the heap no longer cares. - - * kjs/InitializeThreading.cpp: (KJS::initializeThreading): Initialize new per-thread - variables in Heap and JSGlobalObject. - - * kjs/ExecState.h: (KJS::ExecState::heap): Added a heap pointer for faster access to - per-thread heap, and an accessor for it. - - * kjs/JSGlobalObject.h: Made JSGlobalObject linked list per-thread. - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::~JSGlobalObject): Fixed a bug in linked list handling. It only worked - right if the removed object was the head one! - (KJS::JSGlobalObject::head): Return a per-thread list head. - (KJS::JSGlobalObject::init): Store a reference to per-thread heap. - (KJS::JSGlobalObject::reset): Pass ExecState to functions that need it. - (KJS::JSGlobalObject::tearOffActivation): Ditto. - (KJS::JSGlobalObject::operator new): JSGlobalObject allocation cannot use an ExecState, - so it needs a custom operator new that directly accesses per-thread heap. - - * kjs/list.h: - (KJS::List::List): Replaced m_isInMarkSet boolean with an actual pointer to the set, since it - is no longer a single static object. - (KJS::List::~List): Ditto. - * kjs/list.cpp: - (KJS::List::markSet): Removed, this is now stored in Heap. - (KJS::List::markProtectedLists): Take a reference to the list. - (KJS::List::expandAndAppend): Ask the current thread heap for a mark set reference. - - * kjs/protect.h: - (KJS::gcProtect): - (KJS::gcUnprotect): - Use the newly added Heap::heap() method to find out which heap the value to be (un)protected - belongs to. - - * kjs/property_map.h: Removed unused SavedProperty class. - - * JavaScriptCore.exp: - * API/JSBase.cpp: - (JSGarbageCollect): - * API/JSCallbackObjectFunctions.h: - (KJS::::staticFunctionGetter): - * API/JSClassRef.cpp: - (OpaqueJSClass::prototype): - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeConstructor): - (JSObjectMakeFunction): - * API/JSValueRef.cpp: - (JSValueMakeNumber): - (JSValueMakeString): - * kjs/array_instance.cpp: - (KJS::ArrayInstance::ArrayInstance): - (KJS::ArrayInstance::lengthGetter): - * kjs/array_object.cpp: - (KJS::arrayProtoFuncToString): - (KJS::arrayProtoFuncToLocaleString): - (KJS::arrayProtoFuncJoin): - (KJS::arrayProtoFuncConcat): - (KJS::arrayProtoFuncPop): - (KJS::arrayProtoFuncPush): - (KJS::arrayProtoFuncShift): - (KJS::arrayProtoFuncSlice): - (KJS::arrayProtoFuncSplice): - (KJS::arrayProtoFuncUnShift): - (KJS::arrayProtoFuncFilter): - (KJS::arrayProtoFuncMap): - (KJS::arrayProtoFuncEvery): - (KJS::arrayProtoFuncForEach): - (KJS::arrayProtoFuncSome): - (KJS::arrayProtoFuncIndexOf): - (KJS::arrayProtoFuncLastIndexOf): - (KJS::ArrayObjectImp::ArrayObjectImp): - (KJS::ArrayObjectImp::construct): - * kjs/bool_object.cpp: - (KJS::BooleanPrototype::BooleanPrototype): - (KJS::booleanProtoFuncToString): - (KJS::BooleanObjectImp::BooleanObjectImp): - (KJS::BooleanObjectImp::construct): - * kjs/date_object.cpp: - (KJS::formatLocaleDate): - (KJS::DatePrototype::DatePrototype): - (KJS::DateObjectImp::DateObjectImp): - (KJS::DateObjectImp::construct): - (KJS::DateObjectImp::callAsFunction): - (KJS::DateObjectFuncImp::DateObjectFuncImp): - (KJS::DateObjectFuncImp::callAsFunction): - (KJS::dateProtoFuncToString): - (KJS::dateProtoFuncToUTCString): - (KJS::dateProtoFuncToDateString): - (KJS::dateProtoFuncToTimeString): - (KJS::dateProtoFuncToLocaleString): - (KJS::dateProtoFuncToLocaleDateString): - (KJS::dateProtoFuncToLocaleTimeString): - (KJS::dateProtoFuncValueOf): - (KJS::dateProtoFuncGetTime): - (KJS::dateProtoFuncGetFullYear): - (KJS::dateProtoFuncGetUTCFullYear): - (KJS::dateProtoFuncToGMTString): - (KJS::dateProtoFuncGetMonth): - (KJS::dateProtoFuncGetUTCMonth): - (KJS::dateProtoFuncGetDate): - (KJS::dateProtoFuncGetUTCDate): - (KJS::dateProtoFuncGetDay): - (KJS::dateProtoFuncGetUTCDay): - (KJS::dateProtoFuncGetHours): - (KJS::dateProtoFuncGetUTCHours): - (KJS::dateProtoFuncGetMinutes): - (KJS::dateProtoFuncGetUTCMinutes): - (KJS::dateProtoFuncGetSeconds): - (KJS::dateProtoFuncGetUTCSeconds): - (KJS::dateProtoFuncGetMilliSeconds): - (KJS::dateProtoFuncGetUTCMilliseconds): - (KJS::dateProtoFuncGetTimezoneOffset): - (KJS::dateProtoFuncSetTime): - (KJS::setNewValueFromTimeArgs): - (KJS::setNewValueFromDateArgs): - (KJS::dateProtoFuncSetYear): - (KJS::dateProtoFuncGetYear): - * kjs/error_object.cpp: - (KJS::ErrorPrototype::ErrorPrototype): - (KJS::errorProtoFuncToString): - (KJS::ErrorObjectImp::ErrorObjectImp): - (KJS::ErrorObjectImp::construct): - (KJS::NativeErrorPrototype::NativeErrorPrototype): - (KJS::NativeErrorImp::NativeErrorImp): - (KJS::NativeErrorImp::construct): - * kjs/function.cpp: - (KJS::FunctionImp::lengthGetter): - (KJS::FunctionImp::construct): - (KJS::Arguments::Arguments): - (KJS::ActivationImp::createArgumentsObject): - (KJS::encode): - (KJS::decode): - (KJS::globalFuncParseInt): - (KJS::globalFuncParseFloat): - (KJS::globalFuncEscape): - (KJS::globalFuncUnescape): - (KJS::PrototypeFunction::PrototypeFunction): - (KJS::PrototypeReflexiveFunction::PrototypeReflexiveFunction): - * kjs/function_object.cpp: - (KJS::FunctionPrototype::FunctionPrototype): - (KJS::functionProtoFuncToString): - (KJS::FunctionObjectImp::FunctionObjectImp): - (KJS::FunctionObjectImp::construct): - * kjs/internal.cpp: - (KJS::StringImp::toObject): - * kjs/internal.h: - (KJS::StringImp::StringImp): - (KJS::NumberImp::operator new): - * kjs/lookup.h: - (KJS::staticFunctionGetter): - (KJS::cacheGlobalObject): - * kjs/math_object.cpp: - (KJS::MathObjectImp::getValueProperty): - (KJS::mathProtoFuncAbs): - (KJS::mathProtoFuncACos): - (KJS::mathProtoFuncASin): - (KJS::mathProtoFuncATan): - (KJS::mathProtoFuncATan2): - (KJS::mathProtoFuncCeil): - (KJS::mathProtoFuncCos): - (KJS::mathProtoFuncExp): - (KJS::mathProtoFuncFloor): - (KJS::mathProtoFuncLog): - (KJS::mathProtoFuncMax): - (KJS::mathProtoFuncMin): - (KJS::mathProtoFuncPow): - (KJS::mathProtoFuncRandom): - (KJS::mathProtoFuncRound): - (KJS::mathProtoFuncSin): - (KJS::mathProtoFuncSqrt): - (KJS::mathProtoFuncTan): - * kjs/nodes.cpp: - (KJS::Node::handleException): - (KJS::NumberNode::evaluate): - (KJS::StringNode::evaluate): - (KJS::ArrayNode::evaluate): - (KJS::PostIncResolveNode::evaluate): - (KJS::PostIncLocalVarNode::evaluate): - (KJS::PostDecResolveNode::evaluate): - (KJS::PostDecLocalVarNode::evaluate): - (KJS::PostDecLocalVarNode::inlineEvaluateToNumber): - (KJS::PostIncBracketNode::evaluate): - (KJS::PostDecBracketNode::evaluate): - (KJS::PostIncDotNode::evaluate): - (KJS::PostDecDotNode::evaluate): - (KJS::typeStringForValue): - (KJS::LocalVarTypeOfNode::evaluate): - (KJS::TypeOfResolveNode::evaluate): - (KJS::TypeOfValueNode::evaluate): - (KJS::PreIncLocalVarNode::evaluate): - (KJS::PreIncResolveNode::evaluate): - (KJS::PreDecLocalVarNode::evaluate): - (KJS::PreDecResolveNode::evaluate): - (KJS::PreIncConstNode::evaluate): - (KJS::PreDecConstNode::evaluate): - (KJS::PostIncConstNode::evaluate): - (KJS::PostDecConstNode::evaluate): - (KJS::PreIncBracketNode::evaluate): - (KJS::PreDecBracketNode::evaluate): - (KJS::PreIncDotNode::evaluate): - (KJS::PreDecDotNode::evaluate): - (KJS::NegateNode::evaluate): - (KJS::BitwiseNotNode::evaluate): - (KJS::MultNode::evaluate): - (KJS::DivNode::evaluate): - (KJS::ModNode::evaluate): - (KJS::addSlowCase): - (KJS::add): - (KJS::AddNumbersNode::evaluate): - (KJS::AddStringsNode::evaluate): - (KJS::AddStringLeftNode::evaluate): - (KJS::AddStringRightNode::evaluate): - (KJS::SubNode::evaluate): - (KJS::LeftShiftNode::evaluate): - (KJS::RightShiftNode::evaluate): - (KJS::UnsignedRightShiftNode::evaluate): - (KJS::BitXOrNode::evaluate): - (KJS::BitOrNode::evaluate): - (KJS::valueForReadModifyAssignment): - (KJS::ForInNode::execute): - (KJS::TryNode::execute): - (KJS::FuncDeclNode::makeFunction): - (KJS::FuncExprNode::evaluate): - * kjs/number_object.cpp: - (KJS::NumberPrototype::NumberPrototype): - (KJS::numberProtoFuncToString): - (KJS::numberProtoFuncToLocaleString): - (KJS::numberProtoFuncToFixed): - (KJS::numberProtoFuncToExponential): - (KJS::numberProtoFuncToPrecision): - (KJS::NumberObjectImp::NumberObjectImp): - (KJS::NumberObjectImp::getValueProperty): - (KJS::NumberObjectImp::construct): - (KJS::NumberObjectImp::callAsFunction): - * kjs/object.cpp: - (KJS::JSObject::defineGetter): - (KJS::JSObject::defineSetter): - (KJS::JSObject::putDirect): - (KJS::Error::create): - * kjs/object.h: - * kjs/object_object.cpp: - (KJS::ObjectPrototype::ObjectPrototype): - (KJS::objectProtoFuncToLocaleString): - (KJS::objectProtoFuncToString): - (KJS::ObjectObjectImp::ObjectObjectImp): - (KJS::ObjectObjectImp::construct): - * kjs/regexp_object.cpp: - (KJS::RegExpPrototype::RegExpPrototype): - (KJS::regExpProtoFuncToString): - (KJS::RegExpImp::getValueProperty): - (KJS::RegExpObjectImp::RegExpObjectImp): - (KJS::RegExpObjectImp::arrayOfMatches): - (KJS::RegExpObjectImp::getBackref): - (KJS::RegExpObjectImp::getLastParen): - (KJS::RegExpObjectImp::getLeftContext): - (KJS::RegExpObjectImp::getRightContext): - (KJS::RegExpObjectImp::getValueProperty): - (KJS::RegExpObjectImp::createRegExpImp): - * kjs/regexp_object.h: - * kjs/string_object.cpp: - (KJS::StringInstance::StringInstance): - (KJS::StringInstance::lengthGetter): - (KJS::StringInstance::indexGetter): - (KJS::stringInstanceNumericPropertyGetter): - (KJS::StringPrototype::StringPrototype): - (KJS::replace): - (KJS::stringProtoFuncCharAt): - (KJS::stringProtoFuncCharCodeAt): - (KJS::stringProtoFuncConcat): - (KJS::stringProtoFuncIndexOf): - (KJS::stringProtoFuncLastIndexOf): - (KJS::stringProtoFuncMatch): - (KJS::stringProtoFuncSearch): - (KJS::stringProtoFuncReplace): - (KJS::stringProtoFuncSlice): - (KJS::stringProtoFuncSplit): - (KJS::stringProtoFuncSubstr): - (KJS::stringProtoFuncSubstring): - (KJS::stringProtoFuncToLowerCase): - (KJS::stringProtoFuncToUpperCase): - (KJS::stringProtoFuncToLocaleLowerCase): - (KJS::stringProtoFuncToLocaleUpperCase): - (KJS::stringProtoFuncLocaleCompare): - (KJS::stringProtoFuncBig): - (KJS::stringProtoFuncSmall): - (KJS::stringProtoFuncBlink): - (KJS::stringProtoFuncBold): - (KJS::stringProtoFuncFixed): - (KJS::stringProtoFuncItalics): - (KJS::stringProtoFuncStrike): - (KJS::stringProtoFuncSub): - (KJS::stringProtoFuncSup): - (KJS::stringProtoFuncFontcolor): - (KJS::stringProtoFuncFontsize): - (KJS::stringProtoFuncAnchor): - (KJS::stringProtoFuncLink): - (KJS::StringObjectImp::StringObjectImp): - (KJS::StringObjectImp::construct): - (KJS::StringObjectImp::callAsFunction): - (KJS::StringObjectFuncImp::StringObjectFuncImp): - (KJS::StringObjectFuncImp::callAsFunction): - * kjs/string_object.h: - (KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined): - * kjs/testkjs.cpp: - (GlobalObject::GlobalObject): - (functionGC): - (functionRun): - (functionReadline): - (kjsmain): - * kjs/ustring.h: - * kjs/value.cpp: - (KJS::JSCell::operator new): - (KJS::jsString): - (KJS::jsOwnedString): - (KJS::jsNumberCell): - * kjs/value.h: - (KJS::jsNaN): - (KJS::jsNumber): - (KJS::jsNumberFromAnd): - (KJS::JSCell::marked): - (KJS::JSCell::mark): - (KJS::JSValue::toJSNumber): - Removed collectOnMainThreadOnly, as this is the only way to collect now. Replaced calls to - static Collector methods with calls to per-thread Heap ones. - -2008-05-02 Dan Bernstein - - Reviewed by Maciej Stachowiak. - - - Mac build fix - - * wtf/StrHash.h: Added header guards and removed #include "config.h". - -2008-05-01 Ada Chan - - #include in identifier.cpp. - - Reviewed by Maciej. - - * kjs/identifier.cpp: - -2008-05-01 Steve Falkenburg - - Build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-05-01 Sam Weinig - - Fix build. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-05-01 Kevin McCullough - - Reviewed by Darin. - - JavaScript profiler (10928) - - Fix "sample" output so that it can be imported into Instruments - - Also keep track of number of times a function is profiled. - - * JavaScriptCore.xcodeproj/project.pbxproj: Add StrHash.h which needed - to be pulled out of identifier.cpp so that it could be used by the - profiler and identifiers. - * kjs/identifier.cpp: Ditto. - * profiler/FunctionCallProfile.cpp: - (KJS::FunctionCallProfile::printDataInspectorStyle): Inspector style - printing should show microseconds. - (KJS::FunctionCallProfile::printDataSampleStyle): Sample style printing - now counts the number of times a function is in the stack tree and does - not print microseconds since that does not make sense for a sampler. - * profiler/FunctionCallProfile.h: Keep track of number of times a - function is profiled. - (KJS::FunctionCallProfile::numberOfCalls): - * profiler/Profiler.cpp: - (KJS::functionNameCountPairComparator): Comparator for sort function in - printDataSampleStyle. - (KJS::Profiler::printDataSampleStyle): Print the number of times that a - function is listed in the stack tree in order of most times listed. - * wtf/HashCountedSet.h: Added copyToVector since it didn't exist and is - a more standard way to copy a HashSet to a Vector. I added on variant - that takes a pair as the Vector's type and so the HashCountedSet simply - fills in that pair with its internal pair, and another variant that - takes a Vector of the type of the HashCountedSet and only fills in the - Vector with the first element of the pair. - (WTF::copyToVector): - * wtf/StrHash.h: Added. - (WTF::): - -2008-04-29 David Kilzer - - BUILD FIX for ENABLE(DASHBOARD_SUPPORT) - - * wtf/Platform.h: Defined ENABLE(DASHBOARD_SUPPORT) to 1 only for - PLATFORM(MAC) and PLATFORM(WIN). Changed default to 0 for other - ports. - -2008-04-29 Greg Bolsinga - - Reviewed by Darin. - - Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT) - - * wtf/Platform.h: - -2008-04-29 Kevin McCullough - - Reviewed by Geoff. - - - JavaScript profiler (10928) - -Keep call count. - - * profiler/FunctionCallProfile.cpp: - (KJS::FunctionCallProfile::FunctionCallProfile): - (KJS::FunctionCallProfile::didExecute): Implements call count and fixed a bug where a stackIndex - of 0 was causing the assert to be hit. - (KJS::FunctionCallProfile::stopProfiling): - (KJS::FunctionCallProfile::endAndRecordCall): - * profiler/FunctionCallProfile.h: - -2008-04-29 Simon Hausmann - - Qt/Windows build fix. The externally declared hash tables are actually - declared const and the const is mangled in the symbol name, so when - importing they also need to be marked const. - - When compiling without MULTIPLE_THREADS use a const HashTable& - instead of a HashTable& in ThreadClassInfoHashTables to avoid - initializing the latter with a const reference. - - * kjs/JSGlobalObject.cpp: - -2008-04-28 Alexey Proskuryakov - - Windows build fix. - - * kjs/ExecState.h: For whatever reason, MSVC couldn't generate a default constructor for - a struct that had a "const List" member. Removing the const qulifier makes the problem go away. - -2008-04-28 Alexey Proskuryakov - - Reviewed by Darin. - - Fix run-webkit-tests --threading - and provisionally fix - Proxy server issue in Sunday's Nightly - - Changed ClassInfo objects for built-in objects to hold a getter function returning - a per-thread instance. This makes it safe to share these ClassInfo objects between threads - - and these are the only ones that need to be shared. - - * kjs/lexer.cpp: - (KJS::Lexer::Lexer): - (KJS::Lexer::~Lexer): - * kjs/lexer.h: - Made mainTable a member of Lexer, so that it no longer needs to be shared between threads. - - * kjs/object.cpp: - (KJS::JSObject::deleteProperty): - (KJS::JSObject::findPropertyHashEntry): - (KJS::JSObject::propertyIsEnumerable): - (KJS::JSObject::getPropertyAttributes): - (KJS::JSObject::getPropertyNames): - * kjs/object.h: - (KJS::ClassInfo::propHashTable): - Added a new classPropHashTableGetterFunction field to ClassInfo. If it is non-zero, the - static table is not used. - - * kjs/JSGlobalObject.cpp: - (KJS::ThreadClassInfoHashTables::ThreadClassInfoHashTables): This new class holds per-thread - HashTables for built-in classes. The old static structs are copied to create per-thread - instances. - (KJS::JSGlobalObject::threadClassInfoHashTables): An accessor/initializer for the above. - (KJS::JSGlobalObject::init): Copy per-thread data into a single structure for faster access. - Also, construct globalExec. - (KJS::JSGlobalObject::reset): Adapted for globalExec now being an OwnPtr. - (KJS::JSGlobalObject::mark): Ditto. - (KJS::JSGlobalObject::globalExec): Ditto. - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): Made JSGlobalObject::JSGlobalObjectData::globalExec an OwnPtr, so that it can - be initialized from JSGlobalObject::init() after them. Otherwise, ExecState constructor was - trying to access half-initialized JSGlobalObject to make its own copy of these table - references, and failed. - (KJS::JSGlobalObject::JSGlobalObject): Pass "this" value to init() to create globalExec. - (KJS::JSGlobalObject::perThreadData): An accessor for per-thread data. - - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - * kjs/ExecState.h: - (KJS::ExecState::propertyNames): - (KJS::ExecState::emptyList): - (KJS::ExecState::arrayTable): - (KJS::ExecState::dateTable): - (KJS::ExecState::mathTable): - (KJS::ExecState::numberTable): - (KJS::ExecState::RegExpImpTable): - (KJS::ExecState::RegExpObjectImpTable): - (KJS::ExecState::stringTable): - * kjs/ExecStateInlines.h: - (KJS::ExecState::ExecState): - Each ExecState holds its own reference to per-thread data, for even faster access. Moved - m_emptyList and m_propertyNames to the same structure, making ExecState faster to construct - and take less space on the stack. - - * kjs/InitializeThreading.cpp: (KJS::initializeThreading): Initialize thread-static data - added to JSGlobalObject. - - * API/JSCallbackConstructor.cpp: - * API/JSCallbackFunction.cpp: - * API/JSCallbackObject.cpp: - * JavaScriptCore.exp: - * kjs/JSVariableObject.cpp: - (KJS::JSVariableObject::getPropertyAttributes): - * kjs/JSVariableObject.h: - * kjs/array_instance.cpp: - * kjs/array_object.cpp: - (KJS::ArrayPrototype::getOwnPropertySlot): - * kjs/bool_object.cpp: - * kjs/create_hash_table: - * kjs/date_object.cpp: - (KJS::DatePrototype::getOwnPropertySlot): - (KJS::DateObjectImp::DateObjectImp): - * kjs/error_object.cpp: - * kjs/function.cpp: - * kjs/function_object.cpp: - (KJS::FunctionPrototype::FunctionPrototype): - * kjs/internal.cpp: - * kjs/lookup.h: - * kjs/math_object.cpp: - (KJS::MathObjectImp::getOwnPropertySlot): - * kjs/number_object.cpp: - (KJS::NumberObjectImp::getOwnPropertySlot): - * kjs/object_object.cpp: - (KJS::ObjectPrototype::ObjectPrototype): - * kjs/regexp_object.cpp: - (KJS::RegExpPrototype::RegExpPrototype): - (KJS::RegExpImp::getOwnPropertySlot): - (KJS::RegExpImp::put): - (KJS::RegExpObjectImp::getOwnPropertySlot): - (KJS::RegExpObjectImp::put): - * kjs/string_object.cpp: - (KJS::StringPrototype::getOwnPropertySlot): - Adjust for the above changes. - -2008-04-28 Darin Adler - - Reviewed by Adam. - - - make sure RefPtr's default hash doesn't ref/deref when computing the hash - - remove remnants of the hash table storage type optimization - - * wtf/HashFunctions.h: Used "using" to get the hash and equal functions - from PtrHash into PtrHash>. - - * wtf/HashMap.h: Replaced uses of PairBaseHashTraits with PairHashTraits. - Eliminated storage-related typedefs. Removed constructor, destructor, - copy constructor, and destructor since the compiler-generated ones are - fine. Removed refAll and derefAll. Took out unnnecessary typecasts. - Removed use of RefCounter. - - * wtf/HashSet.h: Eliminated storage-related typedefs. Removed constructor, - destructor, copy constructor, and destructor since the compiler-generated - ones are fine. Removed refAll and derefAll. Removed unneeded template - arguents from HashSetTranslatorAdapter. Eliminated unneeded HashSetTranslator - template. - - * wtf/HashTable.h: Tweaked formatting. Removed NeedsRef, RefCounterBase, - RefCounter, HashTableRefCounterBase, HashTableRefCounter, and Assigner - class templates. - - * wtf/HashTraits.h: Removed StorageTraits, needsRef, PairBaseHashTraits, - and HashKeyStorageTraits. - - * wtf/RefPtrHashMap.h: Made all the same fixes as in HashMap. Also made - the corresponding changes to RefPtrHashMapRawKeyTranslator. - -2008-04-28 Darin Adler - - Reviewed by Mitz. - - - fix assertion hit every time you view www.apple.com - - * kjs/PropertyNameArray.cpp: - (KJS::PropertyNameArray::add): Changed assertion to allow null and empty strings. - Now to find out why we have a property named "" and if that's a bug! - -2008-04-27 Mark Rowe - - Reviewed by Maciej Stachowiak. - - Fix crash inside PtrHash::hash when loading a page. - - * wtf/HashFunctions.h: Explicitly use the superclass implementation of hash to avoid infinite recursion. - -2008-04-27 Darin Adler - - Reviewed by Maciej. - - - fix REGRESSION: JavaScriptCore no longer builds with - GCC 4.2 due to pointer aliasing warnings - - Fix this by removing the HashTable optimizations that allowed us to share a back end - implementation between hash tables with integers, pointers, RefPtr, and String objects - as keys. The way it worked was incompatible with strict aliasing. - - This increases code size. On Mac OS X we'll have to regenerate .order files to avoid - slowing down Safari startup times. - - This creates a slight slowdown in SunSpider, mitigated by the following four speedups: - - - speed up array put slightly by moving a branch (was already done for get) - - - speed up symbol table access by adding a function named inlineGet to HashMap - and using that in symbolTableGet/Put - - - speed up PropertyNameArray creation by reducing the amount of reference count - churn and uniqueness checking when adding names and not doing any allocation at - all when building small arrays - - - speed up conversion of strings to floating point numbers by eliminating the - malloc/free of the buffer for the ASCII copy of the string; a way to make - things even faster would be to change strtod to take a UTF-16 string - - Note that there is considerable unused complexity now in HashSet/Map/Table to support - "storage types", which is no longer used. Will do in a separate patch. - - * API/JSCallbackObjectFunctions.h: - (KJS::JSCallbackObject::getPropertyNames): Removed explicit cast to Identifier to - take advantage of the new PropertyNameArray::add overload and avoid reference count churn. - * API/JSObjectRef.cpp: - (JSPropertyNameAccumulatorAddName): Ditto. - * JavaScriptCore.exp: Updated PropertyNameArray::add entry point name. - - * kjs/JSVariableObject.cpp: Removed now-unneeded IdentifierRepHashTraits::nullRepPtr - definition (see below). - (KJS::JSVariableObject::getPropertyNames): Removed explicit cast to Identifier. - - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTableGet): Use inlineGet for speed. Also changed to do - early exit instead of nesting the body inside an if. - (KJS::JSVariableObject::symbolTablePut): Ditto. - - * kjs/PropertyNameArray.cpp: - (KJS::PropertyNameArray::add): Changed implementation to take a raw pointer instead of - a reference to an identifier. Do uniqueness checking by searching the vector when the - vector is short, only building the set once the vector is large enough. - - * kjs/PropertyNameArray.h: Added an overload of add for a raw pointer, and made the old - add function call that one. Added an addKnownUnique function for use when the new - name is known to be different from any other in the array. Changed the vector to have - an inline capacity of 20. - - * kjs/SymbolTable.h: Changed IdentifierRepHash to inherit from the default hash for - a RefPtr so we don't have to define so much. Added an overload of the hash function for - a raw pointer as required by the new RefPtrHashMap. Got rid of the now-unneeded - IdentifierRepHashTraits -- the default traits now work fine. Added a definition of - empthValueIsZero to SymbolTableIndexHashTraits; not having it was incorrect, but harmless. - - * kjs/array_instance.cpp: - (KJS::ArrayInstance::put): Move the maxArrayIndex check inside the branch that checks - the index against the length, as done in the get function. - - * kjs/function.cpp: - (KJS::globalFuncKJSPrint): Changed to use the new getCString instead of cstring. - - * kjs/internal.cpp: Removed printInfo debugging function, a client of cstring. - If we need a debugging function we can easily make a better one and we haven't - used this one in a long time. - * kjs/internal.h: Ditto. - - * kjs/object.cpp: - (KJS::JSObject::getPropertyNames): Removed explicit cast to Identifier. - * kjs/property_map.cpp: - (KJS::PropertyMap::getEnumerablePropertyNames): Ditto. Also added a special case for - the case where the propertyNames array is empty -- in that case we know we're adding - a set of names that are non-overlapping so we can use addKnownUnique. - * kjs/ustring.cpp: - (KJS::UString::getCString): Replaces cstring. Puts the C string into a CStringBuffer, - which is a char Vector with an inline capacity. Also returns a boolean to indicate if - the converion was lossy, which eliminates the need for a separate is8Bit call. - (KJS::UString::toDouble): Changed to call getCString instead of cstring. - * kjs/ustring.h: Ditto. - - * wtf/HashFunctions.h: Overload the hash and equal functions for RefPtr's default - hash to take raw pointers. This works with the changes to RefPtrHashMap to avoid - introducing refcount churn. - - * wtf/HashMap.h: Removed special code to convert the deleted value to the empty value - when writing a new value into the map. This is now handled elsewhere. - (WTF::HashMap::get): Removed code that checks for an empty hash table before calling - HashTable::lookup; it's slightly more efficient to do this check inside lookup. - - * wtf/HashTable.h: - (WTF::HashTable::isDeletedBucket): Changed to use isDeletedValue instead of using - deletedValue and the equality operator. - (WTF::HashTable::deleteBucket): Changed to use constructDeletedValue instead of - using deletedValue and the assignment operator. - (WTF::HashTable::checkKey): Added. Factors out the check for values that are empty - or deleted keys that's used in various functions below. - (WTF::HashTable::lookup): Changed to use checkKey, check for a 0 table, and also - made public for use by RefPtrHashMap. - (WTF::HashTable::lookupForWriting): Changed to use checkKey. - (WTF::HashTable::fullLookupForWriting): Changed to use checkKey. - (WTF::HashTable::add): Changed to use checkKey, and call initializeBucket on a - deleted bucket before putting a new entry into it. - (WTF::HashTable::addPassingHashCode): Ditto. - (WTF::HashTable::deallocateTable): Check isDeletedBucket before calling ~ValueType. - - * wtf/HashTraits.h: Got ridd of all the HashTraits specialization for the integer - types, since GeneicHashTraitsBase already deals with integers separately. Put the - deleted value support into GenericHashTraitsBase. Changed FloatHashTraits to - inherit from GenericHashTraits, and define construct/isDeletedValue rather than - deletedValue. Removed the ref and deref functions from RefPtr's HashTraits, and - defined construct/isDeletedValue. Eliminated DeletedValueAssigner. Changed - PairHashTraits to define construct/isDeletedValue, and also merged - PairBaseHashTraits in with PairHashTraits. Got rid of all specialization of - HashKeyStorageTraits. We'll remove that, and the needsRef data member, later. - - * wtf/RefPtr.h: Added HashTableDeletedValueType, an enum type with a single value, - HashTableDeletedValue. Used that type to make a new constructor to construct - deleted values and also added an isHashTableDeletedValue function. - - * wtf/RefPtrHashMap.h: Added RefPtrHashMapRawKeyTranslator and used it to implement - the raw pointer functions. This is a way to continue to avoid refcount thrash. We - can't use the old way because it depended on the underlying map using a non-RefPtr - type. - (WTF::HashMap::find): Use find with RefPtrHashMapRawKeyTranslator. - (WTF::HashMap::contains): Use contains with RefPtrHashMapRawKeyTranslator. - (WTF::HashMap::inlineAdd): Use add with RefPtrHashMapRawKeyTranslator. - (WTF::HashMap::get): Removed code that checks for an empty hash table before calling - HashTable::lookup; it's slightly more efficient to do this check inside lookup. - (WTF::HashMap::inlineGet): Added. Just like get, but marked inline for use in the - symbol table code. - -2008-04-25 Sam Weinig - - Rubber-stamped by Mark Rowe. - - Remove SavedBuiltins and SavedProperties classes and the methods used to - save data to them. The CachedPage now stores a the JSGlobalObject in full. - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/JSGlobalObject.cpp: - * kjs/JSGlobalObject.h: - * kjs/JSVariableObject.cpp: - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::localStorage): - * kjs/SavedBuiltins.h: Removed. - * kjs/object.h: - * kjs/property_map.cpp: - * kjs/property_map.h: - -2008-04-25 Mark Rowe - - Rubber-stamped by Sam Weinig. - - Add some content to an empty ICU header file to prevent verification errors. - - * icu/unicode/utf_old.h: - -2008-04-25 David Kilzer - - REGRESSION: Wrong line number passed to -willLeaveCallFrame - - Patch by George Dicker and Michael Kahl. Reviewed by Darin. - - When -[NSObject(WebScriptDebugDelegate) webView:willLeaveCallFrame:sourceId:line:forWebFrame:] - is invoked, the first line number of the function is returned instead of the last - line number. This regressed in r28458. - - * kjs/nodes.cpp: - (KJS::FunctionBodyNodeWithDebuggerHooks::execute): Pass lastLine() instead of lineNo() - when calling Debugger::returnEvent(). - -2008-04-25 Darin Adler - - Done with Stephanie Lewis. - - * JavaScriptCore.xcodeproj/project.pbxproj: Prepare for compilation with gcc 4.2 by - adding -fno-strict-aliasing to CollatorICU.cpp. - -2008-04-24 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add a #define to easily enable collecting on every allocation to aid - debugging GC bugs. - - * kjs/collector.cpp: - (KJS::Collector::heapAllocate): - -2008-04-24 Kevin McCullough - - Reviewed by Adam and Sam. - - - JavaScript profiler (10928) - -Only profile the page group that starts profiling to avoid profiling - tools that shouldn't be profiled unless explicitly requested to. - - * JavaScriptCore.exp: Export new signature. - * kjs/JSGlobalObject.cpp: Add unique identifiers to the JSGlobalObject. - (KJS::JSGlobalObject::init): - * kjs/JSGlobalObject.h: Ditto. - (KJS::JSGlobalObject::setPageGroupIdentifier): - (KJS::JSGlobalObject::pageGroupIdentifier): - * profiler/Profiler.cpp: Check the identifier of the page group of the - lexical global exec state and only profile if it matches the given page - group identifier. - (KJS::Profiler::startProfiling): - (KJS::Profiler::willExecute): - (KJS::Profiler::didExecute): - * profiler/Profiler.h: Ditto. - (KJS::Profiler::Profiler): - -2008-04-24 Julien Chaffraix - - Reviewed by Simon. - - Bug 15940: Implement threading API for Qt - https://bugs.webkit.org/show_bug.cgi?id=15940 - - Original patch by Justin Haygood, tweaked by me. - - * JavaScriptCore.pri: - * wtf/ThreadingQt.cpp: Added. - (WTF::threadMapMutex): - (WTF::threadMap): - (WTF::establishIdentifierForThread): - (WTF::clearThreadForIdentifier): - (WTF::threadForIdentifier): - (WTF::initializeThreading): - (WTF::ThreadPrivate::getReturnValue): - (WTF::ThreadPrivate::ThreadPrivate): - (WTF::ThreadPrivate::run): - (WTF::createThread): - (WTF::waitForThreadCompletion): return !res to return - 0 on success (to match the pthreads implementation). - (WTF::detachThread): - (WTF::identifierByQthreadHandle): - (WTF::currentThread): - (WTF::Mutex::Mutex): - (WTF::Mutex::~Mutex): - (WTF::Mutex::lock): - (WTF::Mutex::tryLock): - (WTF::Mutex::unlock): - (WTF::ThreadCondition::ThreadCondition): - (WTF::ThreadCondition::~ThreadCondition): - (WTF::ThreadCondition::wait): - (WTF::ThreadCondition::timedWait): - (WTF::ThreadCondition::signal): - -2008-04-22 Darin Adler - - Reviewed by Anders. - - - simplify use of HashTraits to prepare for some upcoming hash table changes - - * kjs/SymbolTable.h: Made SymbolTableIndexHashTraits derive from HashTraits - and specialize only the empty value. - -2008-04-23 Holger Hans Peter Freyther - - Reviewed by Simon. - - Removed the #define for USE_SYSTEM_MALLOC that we set in WebKit.pri - already. - - * wtf/Platform.h: - -2008-04-21 Kevin McCullough - - Reviewed by Adam. - - JavaScript profiler (10928) - - When stop profiling is called we need to stop the timers on all the - functions that are still running. - - * profiler/FunctionCallProfile.cpp: - (KJS::FunctionCallProfile::didExecute): - (KJS::FunctionCallProfile::stopProfiling): - * profiler/FunctionCallProfile.h: - * profiler/Profiler.cpp: - (KJS::Profiler::stopProfiling): - -2008-04-21 Alexey Proskuryakov - - Reviewed by Darin. - - Move collector main thread initialization from WebKit/win to KJS::initializeThreading. - - * kjs/InitializeThreading.cpp: - (KJS::initializeThreading): - -2008-04-21 Adam Roben - - MSVC build fix - - Reviewed by Alexey Proskuryakov. - - * kjs/ustring.h: - (KJS::UString::cost): Disable a warning about assigning a 32-bit - size_t into a 31-bit size_t. - -2008-04-21 Simon Hausmann - - Reviewed by Lars. - - Made convertValueToQVariant accessible from within WebKit/qt/Api - - * bindings/qt/qt_runtime.h: - -2008-04-21 Holger Hans Peter Freyther - - Reviewed by Simon. - - Build fix for Qt 4.3 - - * When building WebCore/internal make sure the QT_[BEGIN,END]_NAMESPACE is - always defined. Do this by adding defines to the compiler line - * For users of our API this is not feasible. Every public header file should - include qwebkitglobal.h. Define the QT_BEGIN_NAMESPACE and QT_END_NAMESPACE - when we are building everything < 4.4.0 and don't have them defined. - - * kjs/testkjs.pro: - -2008-04-19 Matt Lilek - - Not reviewed, Windows build fix - copy the profiler headers in all - configurations, not just Debug_Internal. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-04-19 Mike Hommey - - Reviewed by Alp Toker. - - Don't build testkjs with rpath. - - * GNUmakefile.am: - -2008-04-18 Kevin Ollivier - - wx build fixes. Rename LocalStorage.h to LocalStorageEntry.h - to avoid header detection issues between WebCore/storage/LocalStorage.h - and it, and add $(PROFILER_SOURCES) to the wx JSCore build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * jscore.bkl: - * kjs/ExecState.h: - * kjs/JSVariableObject.h: - * kjs/LocalStorage.h: Removed. - * kjs/LocalStorageEntry.h: Copied from JavaScriptCore/kjs/LocalStorage.h. - * kjs/function.h: - -2008-04-18 Jan Michael Alonzo - - Reviewed by Alp Toker. - - http://bugs.webkit.org/show_bug.cgi?id=16620 - [GTK] Autotools make dist and make check support - - Cleanups. - - * GNUmakefile.am: - -2008-04-18 Jon Honeycutt - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Windows - build fix. - -2008-04-11 Mark Rowe - - Rubber-stamped by Antti Koivisto. - - Silence GCC 4.3 warnings by removing extraneous consts. - - * kjs/ustring.cpp: - * kjs/ustring.h: - -2008-04-18 Kevin McCullough - - Reviewed by Sam. - - - JavaScript profiler (10928) - - Use Deque instead of Vector since the profiler uses prepend a lot - and deque is faster at that. - - * profiler/FunctionCallProfile.h: - (KJS::FunctionCallProfile::milliSecs): Corrected the name to match - its output. - * wtf/Deque.h: - (WTF::deleteAllValues): - -2008-04-18 Kevin McCullough - - Reviewed by Sam and Adam. - - - JavaScript profiler (10928) - - Cleaned up the header file and made some functions static, added - a new, sane, printing function, and fixed a few minor bugs. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * profiler/FunctionCallProfile.cpp: - (KJS::FunctionCallProfile::didExecute): Removed assertion that time is - > 0 because at ms resolution that may not be true and only cross- - platform way to get time differences is in ms. - (KJS::FunctionCallProfile::printDataInspectorStyle): Added a new - printing function for dumping data in a sane style. - (KJS::FunctionCallProfile::printDataSampleStyle): Fixed a bug where we - displayed too much precision when printing our floats. Also added logic - to make sure we don't display 0 because that doesn't make sense for a - sampling profile. - * profiler/FunctionCallProfile.h: - * profiler/Profiler.cpp: Moved functions that could be static into the - implementation, and chaned the ASSERTs to early returns. I did this - because console.profile() is a JS function and so was being profiled - but asserting because the profiler had not been started! In the future - I would like to put the ASSERTs back and not profile the calls to - console.profile() and console.profileEnd(). - (KJS::Profiler::willExecute): - (KJS::Profiler::didExecute): - (KJS::getStackNames): Fixed a bug where the wrong ExecState was being - used. - (KJS::getFunctionName): - (KJS::Profiler::printDataInspectorStyle): - * profiler/Profiler.h: - -2008-04-18 Alexey Proskuryakov - - Reviewed by Darin. - - Fix leaks during plugin tests (which actually excercise background JS), and potential - PAC brokenness that was not reported, but very likely. - - The leaks shadowed a bigger problem with Identifier destruction. Identifier::remove involves - an IdentifierTable lookup, which is now a per-thread instance. Since garbage collection can - currently happen on a different thread than allocation, a wrong table was used. - - No measurable change on SunSpider total, ~1% variation on individual tests. - - * kjs/ustring.cpp: - (KJS::UString::Rep::create): - (KJS::UString::Rep::destroy): - * kjs/ustring.h: - Replaced isIdentifier with a pointer to IdentifierTable, so that destruction can be done - correctly. Took one bit from reportedCost, to avoid making UString::Rep larger (performance - effect was measurable on SunSpider). - - * kjs/identifier.cpp: - (KJS::IdentifierTable::IdentifierTable): - (KJS::IdentifierTable::~IdentifierTable): - (KJS::IdentifierTable::add): - (KJS::IdentifierTable::remove): - Make IdentifierTable a real class. Its destructor needs to zero out outstanding references, - because some identifiers may briefly outlive it during thread destruction, and we don't want - them to use their stale pointers. - - (KJS::LiteralIdentifierTable): - (KJS::Identifier::add): - Now that LiteralIdentifierTable is per-thread and can be destroyed not just during application - shutdown, it is not appropriate to simply bump refcount for strings that get there; changed - the table to hold RefPtrs. - - (KJS::CStringTranslator::translate): - (KJS::UCharBufferTranslator::translate): - (KJS::Identifier::addSlowCase): - (KJS::Identifier::remove): - * kjs/identifier.h: - (KJS::Identifier::add): - Use and update UString::Rep::identifierTable as appropriate. Updating it is now done in - IdentifierTable::add, not in translators. - -2008-04-18 Alexey Proskuryakov - - Reviewed by Darin. - - Get rid of static compareWithCompareFunctionArguments in array_instance.cpp. - - No change on SunSpider, CelticKane or iBench JavaScript. It is probable that in some cases, - merge sort is still faster, but more investigation is needed to determine a new cutoff. - Or possibly, it would be better to do what FIXME says (change to tree sort). - - Also, made arguments a local variable - not sure why it was a member of - CompareWithCompareFunctionArguments. - - * kjs/array_instance.cpp: - (KJS::CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments): - (KJS::CompareWithCompareFunctionArguments::operator()): - (KJS::ArrayInstance::sort): - -2008-04-18 Simon Hausmann - - Build fix for gcc 4.3. Include stdio.h for printf. - - * profiler/FunctionCallProfile.cpp: - * profiler/Profiler.cpp: - -2008-04-17 Jon Honeycutt - - Reviewed by mrowe. - - * wtf/Platform.h: Add HAVE_ACCESSIBILITY to Platform.h. - -2008-04-17 Alexey Proskuryakov - - Reviewed by Maciej. - - Thread static data destructors are not guaranteed to be called in any particular order; - turn ThreadSpecific into a phoenix-style singleton to avoid accessing freed memory when - deleted objects are interdependent (e.g. CommonIdentifiers and internal identifier tables). - - No change on SunSpider. - - * wtf/ThreadSpecific.h: - (WTF::ThreadSpecific::Data::Data): - (WTF::::get): - (WTF::::set): - (WTF::::destroy): - -2008-04-15 Srinivas Rao. M Hamse - - Reviewed by Maciej Stachowiak. - - - gcc 3.x build fix - - * kjs/nodes.h: CallerType definition made public for gcc 3.x compilation - -2008-04-16 Brady Eidson - - Reviewed by Sam Weinig - - Change ThreadSafeShared to act like RefCounted by starting out with a single ref by default - - * wtf/Threading.h: - (WTF::ThreadSafeShared::ThreadSafeShared): - -2008-04-16 Sam Weinig - - Reviewed by Geoffrey Garen. - - - To keep the behavior of the WebKit and JavaScriptCore API's the same, - we need to hide the fact that the global object and the window object - are no longer the same thing, and the the global object now changes on - navigations. To do this, only the wrapper should ever be exposed. This - fixes the two remaining spots where the internal global object is exposed, - the windowScriptObject returned from [WebFrame windowObject] and the object - return by calling JSContextGetGlobalObject on [WebFrame globalContext]. - - * API/JSContextRef.cpp: - (JSContextGetGlobalObject): - This is a bit of a hack, this returns the "this" representation of the globalObject - which will be the WrapperWindow for WebCore and the globalObject for non-WebCore. - - * API/JSObjectRef.cpp: - (JSObjectSetProperty): - Call the new putWithAttributes method instead of relying on lower-level calls. - This is needed so that the window wrapper can forward the calls. - - * JavaScriptCore.exp: - * kjs/Activation.h: - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::putWithAttributes): - * kjs/JSGlobalObject.h: - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTablePutWithAttributes): - * kjs/function.cpp: - (KJS::ActivationImp::putWithAttributes): - * kjs/nodes.cpp: - (KJS::ConstDeclNode::handleSlowCase): - (KJS::ConstDeclNode::evaluateSingle): - (KJS::EvalNode::processDeclarations): - * kjs/object.cpp: - (KJS::JSObject::putWithAttributes): - * kjs/object.h: - Rename initializeVariable to putWithAttributes and move it down to JSObject so it - can be used for JSObjectSetProperty. - -2008-04-16 Kevin McCullough - - Reviewed by Sam and Geoff. - - - JavaScript profiler (10928) - Inital profiler prototype - - * GNUmakefile.am: Added new files to project - * JavaScriptCore.pri: Ditto - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto - * JavaScriptCoreSources.bkl: Ditto - * kjs/config.h: Put compiling flag in here. - * kjs/function.cpp: Instrument calling the function eval(). - (KJS::eval): - * kjs/interpreter.cpp: Instrument evaluating global scopes. - (KJS::Interpreter::evaluate): - * kjs/object.cpp: Instrument JS function calls. - (KJS::JSObject::call): - * profiler: Added. - * profiler/FunctionCallProfile.cpp: Added. - (KJS::FunctionCallProfile::FunctionCallProfile): - (KJS::FunctionCallProfile::~FunctionCallProfile): - (KJS::FunctionCallProfile::willExecute): Call right before the JS function or executing context is executed to start the profiler's timer. - (KJS::FunctionCallProfile::didExecute): Call right after the JS function or executing context is executed to stop the profiler's timer. - (KJS::FunctionCallProfile::addChild): Add a child to the current FunctionCallProfile if it isn't already a child of the current FunctionalCallProfile. - (KJS::FunctionCallProfile::findChild): Return the child that matches the given name if there is one. - (KJS::FunctionCallProfile::printDataSampleStyle): Print the current profiled information in a format that matches sample's output. - * profiler/FunctionCallProfile.h: Added. - (KJS::FunctionCallProfile::FunctionCallProfile): - (KJS::FunctionCallProfile::~FunctionCallProfile): - (KJS::FunctionCallProfile::functionName): - (KJS::FunctionCallProfile::microSecs): - * profiler/Profiler.cpp: Added. - (KJS::Profiler::profiler): - (KJS::Profiler::sharedProfiler): Return global singleton (may change due to multi-threading concerns) - (KJS::Profiler::startProfiling): Don't start collecting profiling information until the user starts the profiler. Also don't clear old prfiled data until the profiler is restarted. - (KJS::Profiler::stopProfiling): Stop collecting profile information. - (KJS::Profiler::willExecute): Same as above. - (KJS::Profiler::didExecute): Same as above. - (KJS::Profiler::insertStackNamesInTree): Follow the stack of the given names and if a sub-stack is not in the current tree, add it. - (KJS::Profiler::getStackNames): Get the names from the different passed in parameters and order them as a stack. - (KJS::Profiler::getFunctionName): Get the function name from the given parameter. - (KJS::Profiler::printDataSampleStyle): Print the current profiled information in a format that matches sample's output. - (KJS::Profiler::debugLog): - * profiler/Profiler.h: Added. - (KJS::Profiler::Profiler): - -2008-04-16 Sam Weinig - - Reviewed by Darin Adler. - - - Remove kjs_ prefix from strtod, dtoa, and freedtoa and put it - in the KJS namespace. - - Make strtod, dtoa, and freedtoa c++ functions instead of extern "C". - - Remove mode switching from dtoa. ~2% improvement on test 26. - - Removes all unnecessary #defines from dtoa code. - - * JavaScriptCore.exp: - * kjs/dtoa.cpp: - (KJS::ulp): - (KJS::b2d): - (KJS::d2b): - (KJS::ratio): - (KJS::strtod): - (KJS::freedtoa): - (KJS::dtoa): - * kjs/dtoa.h: - * kjs/function.cpp: - (KJS::parseInt): - * kjs/lexer.cpp: - (KJS::Lexer::lex): - * kjs/number_object.cpp: - (KJS::integer_part_noexp): - (KJS::numberProtoFuncToExponential): - * kjs/ustring.cpp: - (KJS::UString::from): - (KJS::UString::toDouble): - -2008-04-16 Alexey Proskuryakov - - Reviewed by Darin. - - Get rid of static execForCompareByStringForQSort in array_instance.cpp. - - No change on SunSpider, CelticKane or iBench JavaScript. - - * kjs/array_instance.cpp: - (KJS::ArraySortComparator::ArraySortComparator): - (KJS::ArraySortComparator::operator()): - (KJS::ArrayInstance::sort): - Switch slow case to std::sort, so that ExecState can be passed in a comparator. - -2008-04-16 Alexey Proskuryakov - - Reviewed by Adam Roben. - - MSVC build fix. - - * kjs/CommonIdentifiers.cpp: - * kjs/CommonIdentifiers.h: - * kjs/Parser.cpp: - * kjs/Parser.h: - * kjs/identifier.cpp: - * kjs/lexer.h: - * wtf/ThreadSpecific.h: - -2008-04-16 Alexey Proskuryakov - - Build fix. - - * kjs/date_object.cpp: - * kjs/date_object.h: - Don't include DateMath.h from date_object.h, as the latter is used from WebCore, while - where the former is not available. - -2008-04-16 Holger Hans Peter Freyther - - Unreviewed build fix for MSVC. It does not want to have - WTF in the KJS namespace. - - * kjs/CommonIdentifiers.h: - -2008-04-16 Holger Hans Peter Freyther - - Unreviewed build fix for gcc. - - ::msToGregorianDateTime is not known to it. - - * kjs/date_object.cpp: - (KJS::DateInstance::msToGregorianDateTime): - -2008-04-16 Alexey Proskuryakov - - Reviewed by Oliver Hunt. - - Initialize threadMapMutex safely (as already done in ThreadingWin). - - * wtf/ThreadingGtk.cpp: - (WTF::threadMapMutex): - (WTF::initializeThreading): - * wtf/ThreadingPthreads.cpp: - (WTF::threadMapMutex): - (WTF::initializeThreading): - -2008-04-16 Alexey Proskuryakov - - Reviewed by Adam Roben. - - Cache Gregorian date/time structure on DateInstance objects for 1.027x SunSpider speedup - (1.65x on date-format-xparb, 1.13x on date-format-tofte). - - * kjs/DateMath.h: - (KJS::GregorianDateTime::copyFrom): Added. It presumably makes sense to keep GregorianDateTime - Noncopyable, so it's not just operator=. - - * kjs/date_object.h: Added a per-object cache. - - * kjs/date_object.cpp: - (KJS::DateInstance::DateInstance): - (KJS::DateInstance::msToGregorianDateTime): - (KJS::dateProtoFuncToString): - (KJS::dateProtoFuncToUTCString): - (KJS::dateProtoFuncToDateString): - (KJS::dateProtoFuncToTimeString): - (KJS::dateProtoFuncToLocaleString): - (KJS::dateProtoFuncToLocaleDateString): - (KJS::dateProtoFuncToLocaleTimeString): - (KJS::dateProtoFuncGetFullYear): - (KJS::dateProtoFuncGetUTCFullYear): - (KJS::dateProtoFuncToGMTString): - (KJS::dateProtoFuncGetMonth): - (KJS::dateProtoFuncGetUTCMonth): - (KJS::dateProtoFuncGetDate): - (KJS::dateProtoFuncGetUTCDate): - (KJS::dateProtoFuncGetDay): - (KJS::dateProtoFuncGetUTCDay): - (KJS::dateProtoFuncGetHours): - (KJS::dateProtoFuncGetUTCHours): - (KJS::dateProtoFuncGetMinutes): - (KJS::dateProtoFuncGetUTCMinutes): - (KJS::dateProtoFuncGetSeconds): - (KJS::dateProtoFuncGetUTCSeconds): - (KJS::dateProtoFuncGetTimezoneOffset): - (KJS::setNewValueFromTimeArgs): - (KJS::setNewValueFromDateArgs): - (KJS::dateProtoFuncSetYear): - (KJS::dateProtoFuncGetYear): - Use the cache when converting. - -2008-04-16 Alexey Proskuryakov - - Reviewed by Darin. - - Implement an abstraction for thread-specific storage, use it to get rid of some static objects. - - SunSpider results were not conclusive, possibly up to 0.2% slowdown. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - Added ThreadSpecific.h - - * wtf/ThreadSpecific.h: Added. - (WTF::::ThreadSpecific): - (WTF::::~ThreadSpecific): - (WTF::::get): - (WTF::::set): - (WTF::::destroy): - (WTF::T): - (WTF::::operator): - Only implemented for platforms that use pthreads. - - * kjs/CommonIdentifiers.cpp: - (KJS::CommonIdentifiers::shared): - * kjs/CommonIdentifiers.h: - * kjs/InitializeThreading.cpp: - (KJS::initializeThreading): - * kjs/Parser.cpp: - (KJS::parser): - * kjs/Parser.h: - * kjs/identifier.cpp: - (KJS::identifierTable): - (KJS::literalIdentifierTable): - (KJS::Identifier::initializeIdentifierThreading): - * kjs/identifier.h: - * kjs/lexer.cpp: - (KJS::lexer): - * kjs/lexer.h: - Make static instances per-thread. - -2008-04-15 Anders Carlsson - - Reviewed by Adam. - - Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES. - - * Configurations/JavaScriptCore.xcconfig: - -2008-04-15 Andre Poenitz - - Reviewed by Simon. - - Fix compilation with Qt namespaces - - Qt can be configured to have all of its classes inside a specified namespaces. - This is for example used in plugin/component environments like Eclipse. - - This change makes it possible to let the Qt port compile against a namespaced - Qt by the use of macros Qt provides to properly forward declare Qt classes in - the namespace. - - * wtf/unicode/qt4/UnicodeQt4.h: - -2008-04-14 Anders Carlsson - - Reviewed by Adam. - - Don't leak the prototype class. - - * API/JSClassRef.cpp: - (OpaqueJSClass::create): - -2008-04-14 Steve Falkenburg - - Fix build. - - * wtf/ThreadingWin.cpp: - -2008-04-14 Alexey Proskuryakov - - Reviewed by Adam Roben. - - https://bugs.webkit.org/show_bug.cgi?id=18488 - FastMalloc doesn't release thread-specific data on Windows - - * wtf/ThreadingWin.cpp: - (WTF::threadMapMutex): (WTF::initializeThreading): Call threadMapMutex once to initialize the static safely. - (WTF::ThreadFunctionInvocation::ThreadFunctionInvocation): Added a structure to wrap thread entry point and arguments. - (WTF::wtfThreadEntryPoint): Make sure to end all WTF threads with pthread_exit(), to give pthreads-win32 a chance to call - destructors of thread-specific data. - (WTF::createThread): Use _beginthreadex instead of CreateThread, because MSDN says so. Also removed a call to CreateEvent, - for which I could see no reason at all. - -2008-04-14 Alexey Proskuryakov - - Touched a file to make JavaScriptCore.vcproj rebuild. - - * wtf/MathExtras.h: - -2008-04-14 Adam Roben - - Windows build fix - - Rubberstamped by Alexey Proskuryakov. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Disable - the "potentially uninitialized variable" warning for grammar.cpp, as - it seems to be incorrect. yylval gets initialized by the lexer, but - MSVC doesn't seem to understand this. - -2008-04-11 Antti Koivisto - - Reviewed by Maciej. - - Add default hash for pairs of hashable types. - - * wtf/HashFunctions.h: - (WTF::PairHash::hash): - (WTF::PairHash::equal): - (WTF::): - -2008-04-11 Alexey Proskuryakov - - Reviewed by Geoff. - - Make DateMath.cpp thread safe. - - No measurable change on SunSpider (should be a very small speedup). - - * kjs/DateMath.cpp: - (KJS::mimimumYearForDST): (KJS::equivalentYearForDST): Got rid of double caching of the - same precomputed value. - (KJS::calculateUTCOffset): (KJS::getUTCOffset): Factored actual UTC offset calculation code - out of getUTCOffset(), and notification setup into initDateMath(). - - (KJS::initDateMath): Added. - - * kjs/DateMath.h: - * kjs/InitializeThreading.cpp: - (KJS::initializeThreading): - Added initDateMath(). - -2008-04-11 Alexey Proskuryakov - - Windows build fix. - - * kjs/grammar.y: - -2008-04-11 Alexey Proskuryakov - - Tiger build fix. Forward declaring a union didn't work for whatever reason, make the - parameters void*. - - * kjs/grammar.y: - * kjs/lexer.cpp: - (kjsyylex): - (KJS::Lexer::lex): - * kjs/lexer.h: - -2008-04-11 Alexey Proskuryakov - - Reviewed by Geoff. - - Generate a pure (re-entrant) parser with Bison. - - No change on SunSpider. - - * kjs/Parser.cpp: - (KJS::Parser::parse): - * kjs/grammar.y: - * kjs/lexer.cpp: - (kjsyylex): - (KJS::Lexer::lex): - * kjs/lexer.h: - Pass state as function arguments, instead of global data. Don't call lexer() as often as - before, as this function is about to become slower due to thread-specific storage. - - * kjs/function.cpp: - (KJS::isStrWhiteSpace): Don't call isSeparatorSpace() for 8-bit characters, as these are - already taken care of. This is a small speedup, compensating for a small slowdown caused - by switching Bison mode. - -2008-04-10 Alexey Proskuryakov - - Reviewed by Geoff. - - https://bugs.webkit.org/show_bug.cgi?id=18402 - REGRESSION: visited element handling is incorrect in nested join/toString calls - - No change on SunSpider total, possibly a tiny improvement (about 0.1%). - - Test: fast/js/array-tostring-and-join.html - - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::visitedElements): Store visited elements HashSet here, making it - common to toString/toLocalizedString/join again. - - * kjs/array_object.cpp: - (KJS::arrayProtoFuncToString): - (KJS::arrayProtoFuncToLocaleString): - (KJS::arrayProtoFuncJoin): - Got rid of static variables. Replaced UString with Vector to avoid O(n^2) behavior and - regain performance. - - * wtf/Vector.h: - (WTF::::resize): - (WTF::::grow): - (WTF::::reserveCapacity): - (WTF::::append): - (WTF::::insert): - Added null checks, so that Vector methods don't crash when out of memory. The caller should - check that data pointer is not null before proceeding. - -2008-04-10 Mark Rowe - - Reviewed by Maciej Stachowiak. - - Fix https://bugs.webkit.org/show_bug.cgi?id=18367 and the many dupes. - Bug 18367: Crash during celtic kane js speed 2007 test - - GCC 4.2 on x86_64 Linux decided to reorder the local variables in markCurrentThreadConservatively's - stack frame. This lead to the range of addresses the collector treated as stack to exclude the - contents of volatile registers that markCurrentThreadConservatively forces onto the stack. This was - leading to objects being prematurely collected if the only reference to them was via a register at - the time a collection occurred. - - The fix for this is to move the calculation of the top of the stack into a NEVER_INLINE function - that is called from markCurrentThreadConservatively. This forces the dummy variable we use for - determining the top of stack to be in a different stack frame which prevents the compiler from - reordering it relative to the registers that markCurrentThreadConservatively forces onto the stack. - - * kjs/collector.cpp: - (KJS::Collector::markCurrentThreadConservativelyInternal): - (KJS::Collector::markCurrentThreadConservatively): - * kjs/collector.h: - -2008-04-10 Adam Roben - - VC++ Express build fix - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Link against user32.lib so - that anyone who links against WTF.lib will get user32.lib - automatically. - -2008-04-09 Adam Roben - - VC++ Express build fix - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Link against - user32.lib. - -2008-04-09 Adam Roben - - Build fix - - * JavaScriptCore.exp: Export isMainThread. - -2008-04-09 Adam Roben - - Build fix - - * wtf/AlwaysInline.h: Make sure to #include Platform.h before using - the macros it defines. - -2008-04-08 Mark Rowe - - Export WTF::initializeThreading() from JavaScriptCore. - - * JavaScriptCore.exp: - -2008-04-04 Sam Weinig - - Reviewed by Geoffrey Garen. - - First step in implementing the "split window" - - - Add a GlobalThisValue to ExecState which should be used - in places that used to implement the "use the global object - as this if null" rule. - - Factor out lookupGetter/lookupSetter into virtual methods - on JSObject so that they can be forwarded. - - Make defineGetter/defineSetter virtual methods for the same - reason. - - Have PrototypeReflexiveFunction store the globalObject used - to create it so that it can be used to get the correct thisObject - for eval. - - * API/JSObjectRef.cpp: - (JSObjectCallAsFunction): - * JavaScriptCore.exp: - * kjs/Activation.h: - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - (KJS::GlobalExecState::GlobalExecState): - * kjs/ExecState.h: - (KJS::ExecState::globalThisValue): - * kjs/ExecStateInlines.h: - (KJS::ExecState::ExecState): - (KJS::FunctionExecState::FunctionExecState): - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::reset): - (KJS::JSGlobalObject::toGlobalObject): - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (KJS::JSGlobalObject::JSGlobalObject): - * kjs/array_instance.cpp: - (KJS::CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments): - (KJS::compareWithCompareFunctionForQSort): - * kjs/array_object.cpp: - (KJS::arrayProtoFuncSort): - (KJS::arrayProtoFuncFilter): - (KJS::arrayProtoFuncMap): - (KJS::arrayProtoFuncEvery): - (KJS::arrayProtoFuncForEach): - (KJS::arrayProtoFuncSome): - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - (KJS::ActivationImp::toThisObject): - (KJS::globalFuncEval): - (KJS::PrototypeReflexiveFunction::PrototypeReflexiveFunction): - (KJS::PrototypeReflexiveFunction::mark): - * kjs/function.h: - (KJS::PrototypeReflexiveFunction::cachedGlobalObject): - * kjs/function_object.cpp: - (KJS::functionProtoFuncApply): - (KJS::functionProtoFuncCall): - * kjs/nodes.cpp: - (KJS::ExpressionNode::resolveAndCall): - (KJS::FunctionCallValueNode::evaluate): - (KJS::LocalVarFunctionCallNode::inlineEvaluate): - (KJS::ScopedVarFunctionCallNode::inlineEvaluate): - (KJS::FunctionCallBracketNode::evaluate): - (KJS::FunctionCallDotNode::inlineEvaluate): - * kjs/object.cpp: - (KJS::JSObject::call): - (KJS::JSObject::put): - (KJS::tryGetAndCallProperty): - (KJS::JSObject::lookupGetter): - (KJS::JSObject::lookupSetter): - (KJS::JSObject::toThisObject): - (KJS::JSObject::toGlobalObject): - (KJS::JSObject::fillGetterPropertySlot): - * kjs/object.h: - * kjs/object_object.cpp: - (KJS::objectProtoFuncLookupGetter): - (KJS::objectProtoFuncLookupSetter): - * kjs/string_object.cpp: - (KJS::replace): - -2008-04-08 Brady Eidson - - Encourage Windows to rebuild - AGAIN... - - * kjs/DateMath.cpp: - -2008-04-08 Adam Roben - - Mac build fix - - * JavaScriptCore.exp: Add callOnMainThread, and sorted the list. - -2008-04-08 Brady Eidson - - Rubberstamped by Adam Roben - - Touch some files to *strongly* encourage Windows to rebuilt with DOM_STORAGE enabled - - * kjs/DateMath.cpp: - -2008-04-08 Adam Roben - - Move callOnMainThread to WTF - - Reviewed by Alexey Proskuryakov. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - Added new files. - - * wtf/MainThread.cpp: - * wtf/MainThread.h: - * wtf/gtk/MainThreadGtk.cpp: - * wtf/mac/MainThreadMac.mm: - * wtf/qt/MainThreadQt.cpp: - * wtf/win/MainThreadWin.cpp: - * wtf/wx/MainThreadWx.cpp: - Moved here from WebCore/platform. Replaced all instances of "WebCore" - with "WTF". - - * kjs/bool_object.cpp: Touched to force JavaScriptCore.vcproj to - build. - to the WTF namespace. - * wtf/ThreadingWin.cpp: - (WTF::initializeThreading): Call initializeMainThread. - -2008-04-07 Brady Eidson - - Add "ENABLE_DOM_STORAGE" to keep in sync with the rest of the project - - * Configurations/JavaScriptCore.xcconfig: - -2008-04-07 Adam Roben - - Windows build fix - - * wtf/ThreadingWin.cpp: Back out some changes I didn't mean to land. - -2008-04-07 Adam Roben - - Add WTF::isMainThread - - Reviewed by Alexey Proskuryakov. - - * wtf/Threading.h: Declare the new function. - * wtf/ThreadingGtk.cpp: - (WTF::initializeThreading): Initialize the main thread identifier. - (WTF::isMainThread): Added. - * wtf/ThreadingNone.cpp: Ditto ThreadingGtk.cpp. - (WTF::initializeThreading): - (WTF::isMainThread): - * wtf/ThreadingPthreads.cpp: Ditto. - (WTF::initializeThreading): - (WTF::isMainThread): - * wtf/ThreadingWin.cpp: Ditto. - (WTF::initializeThreading): - (WTF::isMainThread): - -2008-04-06 Alexey Proskuryakov - - Reviewed by Darin. - - Make UString thread-safe. - - No change on SunSpider total, although individual tests have changed a lot, up to 3%. - - * kjs/InitializeThreading.cpp: (KJS::initializeThreading): Call UString::null() to initialize - a static. - - * kjs/identifier.cpp: - (KJS::CStringTranslator::translate): - (KJS::UCharBufferTranslator::translate): - Use "true" for a boolean value instead of 1, because it's C++. - - * kjs/ustring.h: - (KJS::CString::adopt): Added a method to create from a char* buffer without copying. - (KJS::UString::Rep::ref): Removed an assertion for JSLock::lockCount, as it's no longer - necessary to hold JSLock when working with strings. - (KJS::UString::Rep::deref): Ditto. - (KJS::UString::Rep::isStatic): Added a field to quickly determine that this is an empty - or null static string. - - * kjs/ustring.cpp: - (KJS::): Removed normalStatBufferSize and statBufferSize, as there is no reason to have such - an advanced implementation of a debug-only ascii() method. Removed a long-obsolete comment - about UChar. - (KJS::UString::Rep::createCopying): Removed an assertion for JSLock::lockCount. - (KJS::UString::Rep::create): Ditto. - (KJS::UString::Rep::destroy): Ditto. Do not do anything for static null and empty strings, - as refcounting is not reliable for those. Reordered branches for a noticeable speed gain - - apparently this functiton is hot enough for SunSpider to see an effect from this! - (KJS::UString::null): Moved a star, added a comment. - (KJS::UString::cstring): Reimplemented to not call ascii(), which is not thread-safe. - (KJS::UString::ascii): Simplified statBuffer handling logic. - (KJS::UString::toDouble): Use cstring() instead of ascii(). - -2008-04-02 Mark Rowe - - Reviewed by Oliver Hunt. - - Ensure that debug symbols are generated for x86_64 and ppc64 builds. - - * Configurations/Base.xcconfig: - -2008-04-01 Christian Dywan - - Build fix for GCC 4.3. - - * wtf/unicode/icu/CollatorICU.cpp: include string.h - -2008-04-01 Alexey Proskuryakov - - Rubber-stamped by Darin. - - Turn off using 64-bit arithmetic on 32-bit hardware, as dtoa own code is faster than - compiler-provided emulation. - - 1% speedup on Acid3 test 26. - - * kjs/dtoa.cpp: - -2008-04-01 Alexey Proskuryakov - - Reviewed by Darin. - - Make MathExtras.h thread safe. - - * kjs/math_object.cpp: - (KJS::mathProtoFuncRandom): If threading is enabled, rely on initializeThreading to call - wtf_random_init(). - - * wtf/Threading.h: - * wtf/ThreadingGtk.cpp: - (WTF::initializeThreading): - * wtf/ThreadingNone.cpp: - (WTF::initializeThreading): - * wtf/ThreadingPthreads.cpp: - (WTF::initializeThreading): - * wtf/ThreadingWin.cpp: - (WTF::initializeThreading): - Call wtf_random_init(); made the function non-inline to avoid having to include too many - headers in Threading.h. - -2008-03-31 Eric Seidel - - Reviewed by darin. - - Make matching of regexps using ^ much faster - http://bugs.webkit.org/show_bug.cgi?id=18086 - - * pcre/pcre_compile.cpp: - (compileBranch): - (branchNeedsLineStart): - * pcre/pcre_exec.cpp: - (match): - (jsRegExpExecute): - * pcre/pcre_internal.h: - -2008-03-29 Alexey Proskuryakov - - Reviewed by Oliver Hunt. - - REGRESSION: Leak in KJS::initializeThreading() - - * kjs/InitializeThreading.cpp: (KJS::initializeThreading): There is no guarantee that - initializeThreading() is called only once; check that the mutex hasn't been already allocated. - -2008-03-29 Oliver Hunt - - Reviewed by Geoff. - - Bug 17924: Crash in KJS::ConstDeclNode::evaluate with |with| and |const| - - - - It turns out this is trivially avoidable if we just match firefox's - semantics and ensure that an assignment in a const declaration always - writes to the variable object. - - * kjs/nodes.cpp: - (KJS::ConstDeclNode::handleSlowCase): - -2008-03-28 Alexey Proskuryakov - - Reviewed by Sam Weinig. - - Fix a dtoa thread safety issue. - - WebCore can call kjs_strtod without holding JS lock, but we didn't have thread safety - compiled in for dtoa. - - This is a 0.5% regression on SunSpider, which Sam Weinig has volunteered to cover with - his recent improvement. - - * kjs/dtoa.cpp: - (Bigint::Balloc): - (Bigint::Bfree): - Changed to use fastMalloc/fastDelete - they are much faster than the dtoa custom version was - in the presence of locking (but somewhat slower in single-threaded case). - (Bigint::pow5mult): Got rid of the dreaded double-checked locking anti-pattern (had to - restructure the code to avoid significant performance implications). - (Bigint::lshift): Rewrote to avoid an allocation, if possible. - - (Bigint::rv_alloc): - (Bigint::kjs_freedtoa): - (Bigint::kjs_dtoa): - Check for USE(MULTIPLE_THREADS), not dtoa legacy MULTIPLE_THREADS. - - * kjs/InitializeThreading.cpp: Added. - (KJS::initializeThreading): - * kjs/InitializeThreading.h: Added. - Initialize threading at KJS level, if enabled. - - * kjs/dtoa.h: Expose dtoa mutex for KJS::initializeThreading. - - * kjs/testkjs.cpp: (kjsmain): Call initializeThreading. - - * JavaScriptCore.exp: Export KJS::initializeThreading. - - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCoreSources.bkl: - * JavaScriptCore.xcodeproj/project.pbxproj: - Added InitializeThreading.{h,cpp}. - - * wtf/Threading.h: Removed a using directive for WTF::initializeThreading - it is only - to be called from KJS::initializeThreading, and having it in the global namespace is useless. - -2008-03-28 Brady Eidson - - Reviewed by Darin - - Export Unicode/UTF8.h and convertUTF16ToUTF8() for more flexible conversion in WebCore - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-03-27 Darin Adler - - Reviewed by Mark Rowe. - - Regular expressions with large nested repetition counts can have their - compiled length calculated incorrectly. - - * pcre/pcre_compile.cpp: - (multiplyWithOverflowCheck): - (calculateCompiledPatternLength): Check for overflow when dealing with nested repetition counts - and bail with an error rather than returning incorrect results. - -2008-03-26 Mark Rowe - - Rubber-stamped by Brady Eidson. - - Update FEATURE_DEFINES to be consistent with the other locations in which it is defined. - - * Configurations/JavaScriptCore.xcconfig: - -2008-03-26 Adam Roben - - Fix Bug 18060: Assertion failure (JSLock not held) beneath - JSCallbackObject::toString - - - - Reviewed by Geoff Garen. - - Bug fix: - - * API/JSCallbackObjectFunctions.h: - (KJS::JSCallbackObject::toString): Make the DropAllLocks - instance only be in scope while calling convertToType. - - Test: - - * API/testapi.c: - (MyObject_convertToType): Implement type conversion to string. - * API/testapi.js: Add a test for type conversion to string. - -2008-03-26 Adam Roben - - Windows build fix - - * kjs/array_instance.cpp: Touched this. - * wtf/HashFunctions.h: - (WTF::intHash): Added 8- and 16-bit versions of intHash. - -2008-03-26 Adam Roben - - Force JSC headers to be copied by touching a file - - * kjs/array_instance.cpp: - (KJS::ArrayInstance::getPropertyNames): - -2008-03-26 Adam Roben - - Windows build fix after r31324 - - Written with Darin. - - Added HashTable plumbing to support using wchar_t as a key type. - - * wtf/HashFunctions.h: - * wtf/HashTraits.h: - (WTF::): - -2008-03-26 Maciej Stachowiak - - Reviewed by Darin. - - - JSC part of fix for "SVG multichar glyph matching matches longest instead of first (affects Acid3 test 79)" - http://bugs.webkit.org/show_bug.cgi?id=18118 - - * wtf/HashFunctions.h: - (WTF::): - * wtf/HashTraits.h: - (WTF::): - -2008-03-26 Alexey Proskuryakov - - Reviewed by Darin. - - Cache C string identifiers by address, not value, assuming that C strings can only - be literals. - - 1% speedup on Acid3 test 26. - - * kjs/identifier.cpp: - (KJS::literalIdentifierTable): - (KJS::Identifier::add): - Added a new table to cache UString::Reps created from C strings by address. Elements are - never removed from this cache, as only predefined identifiers can get there. - - * kjs/identifier.h: - (KJS::Identifier::Identifier): Added a warning. - -2008-03-26 Alexey Proskuryakov - - Rubber-stamped by Maciej. - - An assertion was failing in function-toString-object-literals.html when parsing 1e-500. - The condition existed before, and got uncovered by turning compiled-out dtoa checks into - ASSERTs. - - The assertion was verifying that the caller wasn't constructing a Bigint from 0. - This might have had some reason behind it originally, but I couldn't find any, - and this doesn't look like a reasonable requirement. - - * kjs/dtoa.cpp: (d2b): Removed the assertion (two copies in different code paths). - -2008-03-25 Adam Roben - - Fix Bug 18077: Integrate testapi.c into the Windows build - - - - Reviewed by Steve Falkenburg. - - * JavaScriptCore.vcproj/testapi/testapi.vcproj: Added. - -2008-03-25 Adam Roben - - Make testapi.c compile under MSVC - - Currently you must compile testapi.c as C++ code since MSVC does not - support many C features that GCC does. - - Reviewed by Steve Falkenburg. - - * API/testapi.c: - (nan): Added an implementation of this for MSVC. - (assertEqualsAsUTF8String): Use malloc instead of dynamically-sized - stack arrays. - (assertEqualsAsCharactersPtr): Ditto. - (print_callAsFunction): Ditto. - (main): Ditto, and explicitly cast from UniChar* to JSChar*. - -2008-03-25 Adam Roben - - Stop using JavaScriptCore's custom stdbool.h and stdint.h on Windows - - We can't remove the os-win32 directory yet because other ports (at - least wx) are still relying on it. - - Reviewed by Steve Falkenburg. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - - Made all the include paths match the one for the Debug - configuration (these got out of sync in r30797) - - Removed os-win32 from the include path - - Removed os-win32 from the directories we copy to $WebKitOutputDir. - - Removed stdint.h from the project - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - Delete the files that we may have previously copied from the os-win32 - directory. - -2008-03-25 Alexey Proskuryakov - - Windows build fix. - - * kjs/dtoa.cpp: Include stdint.h. - -2008-03-25 Alexey Proskuryakov - - Rubber-stamped by Darin. - - Cleanup dtoa.cpp style. - - * kjs/dtoa.cpp: - (Bigint::Balloc): - (Bigint::Bfree): - (Bigint::multadd): - (Bigint::s2b): - (Bigint::hi0bits): - (Bigint::lo0bits): - (Bigint::i2b): - (Bigint::mult): - (Bigint::pow5mult): - (Bigint::lshift): - (Bigint::cmp): - (Bigint::diff): - (Bigint::ulp): - (Bigint::b2d): - (Bigint::d2b): - (Bigint::ratio): - (Bigint::): - (Bigint::match): - (Bigint::hexnan): - (Bigint::kjs_strtod): - (Bigint::quorem): - (Bigint::rv_alloc): - (Bigint::nrv_alloc): - (Bigint::kjs_freedtoa): - (Bigint::kjs_dtoa): - * kjs/dtoa.h: - -2008-03-24 Darin Adler - - Reviewed by Sam. - - - convert a JavaScript immediate number to a string more efficiently - - 2% speedup of Acid3 test 26 - - * kjs/JSImmediate.cpp: - (KJS::JSImmediate::toString): Take advantage of the fact that all immediate - numbers are integers, and use the faster UString function for formatting integers - instead of the slower one that works for floating point. I think this is a leftover - from when immediate numbers were floating point. - -2008-03-23 Sam Weinig - - Reviewed by Darin Adler. - - Fix http://bugs.webkit.org/show_bug.cgi?id=18048 - The "thisObject" parameter to JSEvaluateScript is not used properly - - Making passing a thisObject to JSEvaluateScript actually set the thisObject of the created - ExecState. - - * API/testapi.c: - (main): Add tests for setting the thisObject when calling JSEvaluateScript. - - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): Assign the thisObject to m_thisValue and remove the comment. - -2008-03-22 Jesse Ruderman - - Reviewed by Sam Weinig. Landed by eseidel. - - Make testkjs flush stdout after printing. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/testkjs.cpp: - (functionPrint): - -2008-03-21 Oliver Hunt - - Reviewed by Maciej. - - Optimise lookup of Math, undefined, NaN and Infinity - - Added a method to JSVariableObject to allow us to inject DontDelete properties - into the symbol table and localStorage. This results in a 0.4% progression in - SunSpider, with a 8% gain in math-partial-sums. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::reset): - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTableInsert): - -2008-03-21 Oliver Hunt - - Reviewed by Geoff Garen. - - Global properties that use LocalStorage are not correctly listed as enumerable. - - The problem was caused by JSObject::getPropertyAttributes not being aware - of the JSVariableObject SymbolTable. The fix is to make getPropertyAttributes - virtual and override in JSVariableObject. This does not produce any performance - regression. - - * JavaScriptCore.exp: - * kjs/JSVariableObject.cpp: - (KJS::JSVariableObject::getPropertyNames): - (KJS::JSVariableObject::getPropertyAttributes): - * kjs/JSVariableObject.h: - * kjs/object.h: - -2008-03-21 Arkadiusz Miskiewicz - - Webkit does not build on linux powerpc - - - - Reviewed by David Kilzer. - - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::Unlock): - -2008-03-21 Rodney Dawes - - Reviewed by Holger. - - http://bugs.webkit.org/show_bug.cgi?id=17981 - - Add javascriptcore_cppflags to Programs_minidom_CPPFLAGS. - - * GNUmakefile.am: - -2008-03-21 Alexey Proskuryakov - - Reviewed by Oliver Hunt. - - Consolidate static identifier initializers within CommonIdentifiers. - - No reliably measurable change on SunSpider; maybe a tiny improvement (within 0.2%). - - * kjs/CommonIdentifiers.h: Added static identifiers that were lazily initialized - throughout the code. - - * kjs/date_object.cpp: - (KJS::DateObjectImp::DateObjectImp): - * kjs/function_object.cpp: - (KJS::FunctionPrototype::FunctionPrototype): - * kjs/object_object.cpp: - (KJS::ObjectPrototype::ObjectPrototype): - * kjs/regexp_object.cpp: - (KJS::RegExpPrototype::RegExpPrototype): - Use the values from CommonIdentifiers. - - * kjs/lookup.h: Caching the identifier in a static wasn't a win on SunSpider, removed it. - - * kjs/value.h: - (KJS::jsNaN): We already have a shared NaN value, no need for a duplicate here. - - * wtf/MathExtras.h: - (wtf_atan2): Having local variables for numeric_limits constants is good for readability, - but there is no reason to keep them static. - - * JavaScriptCore.exp: Don't needlessly export JSGlobalObject::s_head. - -2008-03-20 Oliver Hunt - - Reviewed by Maciej. - - Fix for leak introduced by inline ScopeChainNode use - - To avoid any extra branches when managing an inline ScopeChainNode - in the ScopeChain the inline node gets inserted with a refcount of - 2. This meant than when the ScopeChain was destroyed the ScopeChainNodes - above the inline node would be leaked. - - We resolve this by manually popping the inline node in the - FunctionExecState destructor. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/ExecStateInlines.h: - (KJS::FunctionExecState::~FunctionExecState): - * kjs/scope_chain.h: - (KJS::ScopeChain::popInlineScopeNode): - -2008-03-20 Mark Rowe - - Reviewed by Sam Weinig. - - Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit. - This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the - command-line. - - * Configurations/JavaScriptCore.xcconfig: - -2008-03-20 David Krause - - Reviewed by David Kilzer. - - Fix http://bugs.webkit.org/show_bug.cgi?id=17923 - Bug 17923: ARM platform endian defines inaccurate - - * wtf/Platform.h: - Replaced !defined(__ARMEL__) check with !defined(__VFP_FP__) - for PLATFORM(MIDDLE_ENDIAN) - -2008-03-20 Maciej Stachowiak - - - fix build - - * JavaScriptCore.xcodeproj/project.pbxproj: install Activation.h as private - -2008-03-20 Maciej Stachowiak - - Reviewed by Oliver. - - - reduce function call overhead for 1.014x speedup on SunSpider - - I moved some functions from ExecState.cpp to ExecStateInline.h and - from JSGlobalObject.cpp to JSGlobalObject.h, and declared them - inline; machine function call overhead for these was hurting JS - funcion call overhead. - - * kjs/ExecState.cpp: - * kjs/ExecStateInlines.h: Added. - (KJS::ExecState::ExecState): - (KJS::ExecState::~ExecState): - (KJS::FunctionExecState::FunctionExecState): - (KJS::FunctionExecState::~FunctionExecState): - * kjs/JSGlobalObject.cpp: - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::pushActivation): - (KJS::JSGlobalObject::checkActivationCount): - (KJS::JSGlobalObject::popActivation): - * kjs/function.cpp: - -2008-03-19 Oliver Hunt - - Reviewed by Maciej. - - Avoid heap allocating the root scope chain node for eval and closure free functions - - Maciej suggested using an inline ScopeChainNode for functions that don't use eval - or closures as they are unable to ever capture the scope chain. This gives us a 2.4% - win in sunspider, a 15% win in controlflow-recursive, and big (>5%) wins in a number - of other tests. - - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - * kjs/ExecState.h: - * kjs/scope_chain.h: - (KJS::ScopeChain::push): - -2008-03-19 Mark Rowe - - Reviewed by Sam Weinig. - - Fix release build. - - * kjs/JSGlobalObject.cpp: Add missing #include. - -2008-03-19 Sam Weinig - - Reviewed by Anders Carlsson. - - Fix for - Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file - - Make the activeExecStates stack per JSGlobalObject instead of static to ensure - thread safety. - - * JavaScriptCore.exp: - * kjs/ExecState.cpp: - (KJS::InterpreterExecState::InterpreterExecState): - (KJS::InterpreterExecState::~InterpreterExecState): - (KJS::EvalExecState::EvalExecState): - (KJS::EvalExecState::~EvalExecState): - (KJS::FunctionExecState::FunctionExecState): - (KJS::FunctionExecState::~FunctionExecState): - * kjs/ExecState.h: - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::mark): - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::activeExecStates): - * kjs/collector.cpp: - (KJS::Collector::collect): - (KJS::Collector::reportOutOfMemoryToAllExecStates): Iterate all JSGlobalObjects and report - the OutOfMemory condition to all the ExecStates in each. - -2008-03-19 Jasper Bryant-Greene - - Reviewed by Maciej Stachowiak. - - Fix http://bugs.webkit.org/show_bug.cgi?id=17941 - Bug 17941: C++-style comments in JavaScriptCore API - - * API/JSBase.h: - Remove C++-style comments from public JavaScriptCore API, replacing - with standard C90 block comments. - -2008-03-19 Mark Rowe - - Reviewed by Oliver Hunt. - - Fix http://bugs.webkit.org/show_bug.cgi?id=17939 - Bug 17939: Crash decompiling "const a = 1, b;" - - * kjs/nodes2string.cpp: - (KJS::ConstDeclNode::streamTo): Null-check the correct variable. - -2008-03-18 Oliver Hunt - - Reviewed by Mark Rowe. - - Bug 17929: Incorrect decompilation with |const|, comma - http://bugs.webkit.org/show_bug.cgi?id=17929 - - There were actually two bugs here. First we weren't correctly handling const - nodes with multiple declarations. The second issue was caused by us not - giving the correct precedence to the initialisers. - - * kjs/nodes2string.cpp: - (KJS::ConstDeclNode::streamTo): - -2008-03-18 Darin Adler - - Reviewed by Maciej. - - - Speed up JavaScript built-in properties by changing the - hash table to take advantage of the identifier objects - - 5% speedup for Acid3 test 26 - - * JavaScriptCore.exp: Updated. - * kjs/create_hash_table: Compute size of hash table large enough so that there - are no collisions, but don't generate the hash table. - * kjs/identifier.h: Made the add function that returns a PassRefPtr public. - * kjs/lexer.cpp: - (KJS::Lexer::lex): Updated for change to HashTable interface. - * kjs/lookup.cpp: - (KJS::HashTable::changeKeysToIdentifiers): Added. Finds the identifier for - each property so the equality comparision can be done with pointer comparision. - * kjs/lookup.h: Made the key be a union of char* with UString::Rep* so it can - hold identifiers. Added a keysAreIdentifiers flag to the HashTable. Changed - the Lookup functions to be member functions of HashTable instead. - * kjs/object.cpp: - (KJS::JSObject::deleteProperty): Update for change to HashTable. - (KJS::JSObject::findPropertyHashEntry): Ditto. - (KJS::JSObject::getPropertyAttributes): Ditto. - (KJS::JSObject::getPropertyNames): Ditto. - -2008-03-18 Mark Rowe - - Reviewed by Oliver Hunt. - - Fix http://bugs.webkit.org/show_bug.cgi?id=17925 and http://bugs.webkit.org/show_bug.cgi?id=17927. - - Bug 17925: Crash in KJS::JSObject::put after setting this.__proto__ - - Bug 17927: Hang after attempting to create circular __proto__ - - * kjs/object.cpp: - (KJS::JSObject::put): Silently ignore attempts to set __proto__ to a non-object, non-null value. - Return after setting the exception when an attempt to set a cyclic __proto__ is detected so that - the cyclic value is not set. - -2008-03-18 Maciej Stachowiak - - Reviewed by Oliver. - - - inline ActivationImp::init for 0.8% SunSpider speedup - - * kjs/Activation.h: - (KJS::ActivationImp::init): Moved here from function.cpp - * kjs/function.cpp: - -2008-03-18 Simon Hausmann - - Fix the Qt build. - - Including config.h like in the other .cpp files gets the #ifdeffery - correct for rand_s. - - * kjs/JSWrapperObject.cpp: - -2008-03-17 Darin Adler - - Reviewed by Maciej. - - JavaScriptCore changes to support a WebCore speedup. - - * JavaScriptCore.exp: Export the UString::Rep::computeHash function. - * wtf/HashSet.h: Added a find and contains function that take a translator, - like the add function. - -2008-03-18 Maciej Stachowiak - - Reviewed by Oliver. - - - a few micro-optimizations for 1.2% SunSpider speedup - - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): check for Return completion before Throw, - it is more likely. - * kjs/object.cpp: - (KJS::JSObject::put): When walking prototype chain, instead of - checking isObject (a virtual call), compare to jsNull (compare to - a constant) since null is the only non-object that can be in a - prototype chain. - -2008-03-17 Oliver Hunt - - Reviewed by Geoff. - - Optimise multi-scope function call resolution - - Refactor multiscope variable resolution and use to add - optimised FunctionCallResolveNode subclasses. - - 2.6% gain in sunspider performance, *25%* gain in controlflow-recursive - - * kjs/nodes.cpp: - (KJS::getSymbolTableEntry): - (KJS::ResolveNode::optimizeVariableAccess): - (KJS::getNonLocalSymbol): - (KJS::ExpressionNode::resolveAndCall): - (KJS::FunctionCallResolveNode::optimizeVariableAccess): - (KJS::FunctionCallResolveNode::inlineEvaluate): - (KJS::ScopedVarFunctionCallNode::inlineEvaluate): - (KJS::ScopedVarFunctionCallNode::evaluate): - (KJS::ScopedVarFunctionCallNode::evaluateToNumber): - (KJS::ScopedVarFunctionCallNode::evaluateToBoolean): - (KJS::ScopedVarFunctionCallNode::evaluateToInt32): - (KJS::ScopedVarFunctionCallNode::evaluateToUInt32): - (KJS::NonLocalVarFunctionCallNode::inlineEvaluate): - (KJS::NonLocalVarFunctionCallNode::evaluate): - (KJS::NonLocalVarFunctionCallNode::evaluateToNumber): - (KJS::NonLocalVarFunctionCallNode::evaluateToBoolean): - (KJS::NonLocalVarFunctionCallNode::evaluateToInt32): - (KJS::NonLocalVarFunctionCallNode::evaluateToUInt32): - * kjs/nodes.h: - (KJS::ScopedVarFunctionCallNode::): - (KJS::NonLocalVarFunctionCallNode::): - -2008-03-17 David Kilzer - - Don't define PLATFORM(MIDDLE_ENDIAN) on little endian ARM. - - Reviewed by Darin. - - See . - - * wtf/Platform.h: Added check for !defined(__ARMEL__) when defining - PLATFORM(MIDDLE_ENDIAN). - -2008-03-17 Oliver Hunt - - Reviewed by Geoff, Darin and Weinig. - - Add fast multi-level scope lookup - - Add logic and AST nodes to provide rapid variable resolution across - static scope boundaries. This also adds logic that allows us to skip - any static scopes that do not contain the variable to be resolved. - - This results in a ~2.5% speedup in SunSpider, and gives a 25-30% speedup - in some simple and ad hoc closure and global variable access tests. - - * JavaScriptCore.exp: - * kjs/Activation.h: - * kjs/JSGlobalObject.cpp: - * kjs/JSGlobalObject.h: - * kjs/JSVariableObject.cpp: - * kjs/JSVariableObject.h: - * kjs/function.cpp: - (KJS::ActivationImp::isDynamicScope): - * kjs/nodes.cpp: - (KJS::ResolveNode::optimizeVariableAccess): - (KJS::ScopedVarAccessNode::inlineEvaluate): - (KJS::ScopedVarAccessNode::evaluate): - (KJS::ScopedVarAccessNode::evaluateToNumber): - (KJS::ScopedVarAccessNode::evaluateToBoolean): - (KJS::ScopedVarAccessNode::evaluateToInt32): - (KJS::ScopedVarAccessNode::evaluateToUInt32): - (KJS::NonLocalVarAccessNode::inlineEvaluate): - (KJS::NonLocalVarAccessNode::evaluate): - (KJS::NonLocalVarAccessNode::evaluateToNumber): - (KJS::NonLocalVarAccessNode::evaluateToBoolean): - (KJS::NonLocalVarAccessNode::evaluateToInt32): - (KJS::NonLocalVarAccessNode::evaluateToUInt32): - (KJS::IfElseNode::optimizeVariableAccess): - (KJS::ScopeNode::optimizeVariableAccess): - * kjs/nodes.h: - (KJS::ScopedVarAccessNode::): - (KJS::NonLocalVarAccessNode::): - * kjs/object.h: - - 2008-03-16 weihongzeng - - Reviewed by Darin Adler. - - http://bugs.webkit.org/show_bug.cgi?id=15416 - Add support for mixed-endian processors - - * kjs/dtoa.cpp: Add IEEE_ARM, triggered by PLATFORM(MIDDLE_ENDIAN). - -2008-03-16 Kevin Ollivier - - Rubber stamped by Darin. - - Add set-webkit-configuration support for wx port, and centralize - build dir location setting. - - http://bugs.webkit.org/show_bug.cgi?id=17790 - - * jscore.bkl: - -2008-03-14 Steve Falkenburg - - PGO build fixes. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-03-14 Oliver Hunt - - Reviewed by Maciej. - - Add logic to track whether a function uses a locally scoped eval or requires a closure - - Now that we limit eval we can track those uses of eval that operate - in the local scope and functions that require a closure. We track - this information during initial parsing to avoid yet another tree - walk. - - * JavaScriptCore.exp: - * kjs/NodeInfo.h: - * kjs/Parser.cpp: - (KJS::Parser::didFinishParsing): - * kjs/Parser.h: - (KJS::Parser::parse): - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::ScopeNode::ScopeNode): - (KJS::ProgramNode::ProgramNode): - (KJS::ProgramNode::create): - (KJS::EvalNode::EvalNode): - (KJS::EvalNode::create): - (KJS::FunctionBodyNode::FunctionBodyNode): - (KJS::FunctionBodyNode::create): - * kjs/nodes.h: - (KJS::ScopeNode::): - (KJS::ScopeNode::usesEval): - (KJS::ScopeNode::needsClosure): - -2008-03-14 Geoffrey Garen - - Reviewed by Beth Dakin. - - Fixed another problem with Vector::shrinkCapacity. - - moveOverlapping isn't good enough for the case where the buffer hasn't - changed, because it still destroys the contents of the buffer. - - * wtf/Vector.h: - (WTF::::shrinkCapacity): Changed to explicitly check whether the call - to allocateBuffer produced a new buffer. If it didn't, there's no need - to move. - -2008-03-14 Geoffrey Garen - - Reviewed by Beth Dakin. - - Fixed a few problems with Vector::shrinkCapacity that I noticed in testing. - - * wtf/Vector.h: - (WTF::VectorBufferBase::deallocateBuffer): Clear our m_buffer pointer - when we deallocate m_buffer, in case we're not asked to reallocate a new - buffer. (Otherwise, we would use a stale m_buffer if we were asked to - perform any operations after shrinkCapacity was called.) - - (WTF::VectorBuffer::allocateBuffer): Made VectorBuffer with inline - capacity aware that calls to allocateBuffer might be shrinks, rather - than grows, so we shouldn't allocate a new buffer on the heap unless - our inline buffer is too small. - - (WTF::::shrinkCapacity): Call resize() instead of just setting m_size, - so destructors run. Call resize before reallocating the buffer to make - sure that we still have access to the objects we need to destroy. Call - moveOverlapping instead of move, since a call to allocateBuffer on an - inline buffer may produce identical storage. - -2008-03-14 Alexey Proskuryakov - - Reviewed by Darin. - - Get rid of a localime() call on platforms that have better alternatives. - - * kjs/DateMath.h: Added getLocalTime(); - - * kjs/DateMath.cpp: - (KJS::getLocalTime): - (KJS::getDSTOffsetSimple): - Implementation moved from getDSTOffsetSimple(). - - * kjs/date_object.cpp: - (KJS::DateObjectImp::callAsFunction): Switched to getLocalTime(). - -2008-03-14 David D. Kilzer - - Unify concept of enabling the Mac Java bridge. - - Reviewed by Darin and Anders. - - * wtf/Platform.h: Define ENABLE_MAC_JAVA_BRIDGE here. - -2008-03-13 Mark Mentovai - - Reviewed by eseidel. Landed by eseidel. - - * wtf/FastMalloc.cpp: #include outside of any - namespaces. - -2008-03-13 Mark Mentovai - - Reviewed by eseidel. Landed by eseidel. - - * pcre/pcre_exec.cpp: Fix misnamed variable, allowing -DDEBUG build - to succeed. - * wtf/ThreadingPthreads.cpp: #include for gettimeofday - in non-pch build. - -2008-03-13 Steve Falkenburg - - PGO build fixes. - - Disable PGO for normal release builds. - Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-03-13 Beth Dakin - - Reviewed by Geoff. - - Adding new functionality to Vector. Currently all of the shrink and - resize functions on Vector only shrink the size of the Vector, not - the capacity. For the Vector to take up as little memory as - possible, though, it is necessary to be able to shrink the capacity - as well. So this patch adds that functionality. - - I need this for a speed up I am working on, and Geoff wants to use - it in a speed up he is working on also, so he asked me to commit it - now. - - * wtf/Vector.h: - (WTF::VectorBufferBase::allocateBuffer): - (WTF::::shrinkCapacity): - -2008-03-13 Simon Hausmann - - Reviewed by Adam Roben. - - Attempt at fixing the Qt/Windows build bot. Quote using double-quotes - instead of single quotes. - - * pcre/dftables: - -2008-03-12 Steve Falkenburg - - Build fix. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2008-03-12 Alp Toker - - Another autotools testkjs build fix attempt. - - * GNUmakefile.am: - -2008-03-12 Alp Toker - - Attempt to fix the autotools testkjs build on systems with - non-standard include paths. - - * GNUmakefile.am: - -2008-03-11 Alexey Proskuryakov - - Reviewed by Darin. - - REGRESSION: Crash at WTF::Collator::CreateCollator() running fast/js/kde/StringObject.html on Windows - - * wtf/unicode/icu/CollatorICU.cpp: - (WTF::Collator::createCollator): Check for null (== user default) m_locale before calling strcmp. - -2008-03-11 Steve Falkenburg - - Disable LTCG/PGO for grammar.cpp and nodes.cpp. - PGO on these files causes us to hang. - - Copy newer vsprops files from relative WebKitLibraries path to environment variable based path. - - Reviewed by Oliver. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - -2008-03-10 Darin Adler - - - Windows build fix - - * kjs/function.cpp: (KJS::decode): Initialize variable. - -2008-03-10 Brent Fulgham - - Windows build fix - - Reviewed by Adam. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - Set the PATH to include Cygwin before running touch. - -2008-03-10 Eric Seidel - - Build fix for JSC on windows. - - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): - * kjs/function.cpp: - (KJS::decode): - * kjs/nodes2string.cpp: - (KJS::escapeStringForPrettyPrinting): - -2008-03-10 Eric Seidel - - No review, build fix only. - - Attempt to fix the windows build? - - * kjs/ustring.h: change unsigned short to UChar - -2008-03-10 Eric Seidel - - Reviewed by Darin. - - Remove KJS::UChar, use ::UChar instead - http://bugs.webkit.org/show_bug.cgi?id=17017 - - * API/JSStringRef.cpp: - (JSStringCreateWithCharacters): - (JSStringCreateWithUTF8CString): - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): - * JavaScriptCore.exp: - * kjs/Parser.h: - * kjs/function.cpp: - (KJS::decode): - (KJS::parseInt): - (KJS::parseFloat): - (KJS::globalFuncEscape): - (KJS::globalFuncUnescape): - * kjs/function_object.cpp: - (KJS::FunctionObjectImp::construct): - * kjs/identifier.cpp: - (KJS::Identifier::equal): - (KJS::CStringTranslator::translate): - * kjs/interpreter.h: - * kjs/lexer.cpp: - (KJS::Lexer::setCode): - (KJS::Lexer::shift): - (KJS::Lexer::lex): - (KJS::Lexer::convertUnicode): - (KJS::Lexer::makeIdentifier): - * kjs/lookup.cpp: - (KJS::keysMatch): - * kjs/nodes2string.cpp: - (KJS::escapeStringForPrettyPrinting): - (KJS::SourceStream::operator<<): - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): - (KJS::RegExp::match): - * kjs/string_object.cpp: - (KJS::substituteBackreferences): - (KJS::stringProtoFuncCharCodeAt): - (KJS::stringProtoFuncToLowerCase): - (KJS::stringProtoFuncToUpperCase): - (KJS::stringProtoFuncToLocaleLowerCase): - (KJS::stringProtoFuncToLocaleUpperCase): - * kjs/ustring.cpp: - (KJS::UString::Rep::computeHash): - (KJS::UString::UString): - (KJS::UString::append): - (KJS::UString::ascii): - (KJS::UString::operator=): - (KJS::UString::is8Bit): - (KJS::UString::toStrictUInt32): - (KJS::UString::find): - (KJS::operator==): - (KJS::operator<): - (KJS::compare): - (KJS::UString::UTF8String): - * kjs/ustring.h: - * pcre/pcre.h: - -2008-03-09 Steve Falkenburg - - Stop Windows build if an error occurs in a prior project. - - Rubber stamped by Darin. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2008-03-09 J¸rg Billeter - - Reviewed by Alp Toker. - - Conditionalise ICU for Unicode in the GTK+ port. - - * wtf/Platform.h: - -2008-03-07 David D. Kilzer - - Unify concept of enabling Netscape Plug-in API (NPAPI). - - Reviewed by Darin. - - * wtf/Platform.h: Define ENABLE_NETSCAPE_PLUGIN_API here. - -2008-03-07 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed Stricter (ES4) eval semantics - - The basic rule is: - - - "eval(s)" is treated as an operator that gives the ES3 eval behavior. - ... but only if there is no overriding declaration of "eval" in scope. - - All other invocations treat eval as a function that evaluates a - script in the context of its "this" object. - ... but if its "this" object is not the global object it was - originally associated with, eval throws an exception. - - Because only expressions of the form "eval(s)" have access to local - scope, the compiler can now statically determine whether a function - needs local scope to be dynamic. - - * kjs/nodes.h: Added FunctionCallEvalNode. It works just like - FuncationCallResolveNode, except it statically indicates that the node - may execute eval in the ES3 way. - * kjs/nodes.cpp: - * kjs/nodes2string.cpp: - - * tests/mozilla/expected.html: This patch happens to fix a Mozilla JS - test, but it's a bit of a pyrrhic victory. The test intends to test - Mozilla's generic API for calling eval on any object, but, in reality, - we only support calling eval on the global object. - -2008-03-06 Steve Falkenburg - - Build fix. - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2008-03-06 Steve Falkenburg - - Build fix. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2008-03-06 Alp Toker - - Fix the build fix in r30845 to support out-of-tree builds. - - * GNUmakefile.am: - -2008-03-06 Steve Falkenburg - - Build fix. - - * wtf/ThreadingWin.cpp: - (WTF::ThreadCondition::timedWait): - -2008-03-06 Darin Adler - - - another small step towards fixing the Qt build - - * JavaScriptCore.pri: Remove more references to the now-obsolete bindings directory. - -2008-03-06 Darin Adler - - - a small step towards fixing the Qt build - - * JavaScriptCore.pri: Remove references to files no longer present in JavaScriptCore/bindings. - -2008-03-06 Brady Eidson - - Gtk Build fix - - * wtf/ThreadingGtk.cpp: - (WTF::ThreadCondition::timedWait): - -2008-03-06 Alexey Proskuryakov - - Wx build fix. - - * wtf/unicode/icu/CollatorICU.cpp: - (WTF::Collator::userDefault): Put ICU workaround under both PLATFORM(DARWIN) and - PLATFORM(CF) checks, so that each port can decide if it wants to use CF on Mac for it. - -2008-03-06 Brady Eidson - - Reviewed by Darin - - Add a timedWait() method to ThreadCondition - - * JavaScriptCore.exp: - - * wtf/Threading.h: - - * wtf/ThreadingGtk.cpp: - (WTF::ThreadCondition::timedWait): - - * wtf/ThreadingNone.cpp: - (WTF::ThreadCondition::timedWait): - - * wtf/ThreadingPthreads.cpp: - (WTF::ThreadCondition::timedWait): - - * wtf/ThreadingWin.cpp: - (WTF::ThreadCondition::timedWait): Needs implementation - -2008-03-06 Alexey Proskuryakov - - More build fixes. - - * jscore.bkl: Add the wtf/unicode directory. - * wtf/unicode/CollatorDefault.cpp: - (WTF::Collator::userDefault): Use a constructor that does exist. - * wtf/unicode/icu/CollatorICU.cpp: Mac build fix for case-sensitive file systems. - -2008-03-06 Darin Adler - - - try to fix the Qt build - - * JavaScriptCore.pri: Add the wtf/unicode directory. - -2008-03-06 Darin Adler - - - try to fix the GTK build - - * GNUmakefile.am: Add a -I for the wtf/unicode directory. - -2008-03-06 Darin Adler - - - try to fix the Mac build - - * icu/unicode/parseerr.h: Copied from ../WebCore/icu/unicode/parseerr.h. - * icu/unicode/ucol.h: Copied from ../WebCore/icu/unicode/ucol.h. - * icu/unicode/uloc.h: Copied from ../WebCore/icu/unicode/uloc.h. - * icu/unicode/unorm.h: Copied from ../WebCore/icu/unicode/unorm.h. - * icu/unicode/uset.h: Copied from ../WebCore/icu/unicode/uset.h. - -2008-03-06 Alexey Proskuryakov - - Reviewed by Darin. - - Need to create a Collator abstraction for WebCore and JavaScriptCore - - * wtf/Threading.h: - (WTF::initializeThreading): - * wtf/ThreadingGtk.cpp: - (WTF::initializeThreading): - * wtf/ThreadingNone.cpp: - * wtf/ThreadingPthreads.cpp: - * wtf/ThreadingWin.cpp: - Added AtomicallyInitializedStatic. - - * kjs/string_object.cpp: (KJS::localeCompare): Changed to use Collator. - - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - Added new fiiles to projects. - - * wtf/unicode/Collator.h: Added. - (WTF::Collator::): - * wtf/unicode/CollatorDefault.cpp: Added. - (WTF::Collator::Collator): - (WTF::Collator::~Collator): - (WTF::Collator::setOrderLowerFirst): - (WTF::Collator::collate): - * wtf/unicode/icu/CollatorICU.cpp: Added. - (WTF::cachedCollatorMutex): - (WTF::Collator::Collator): - (WTF::Collator::~Collator): - (WTF::Collator::setOrderLowerFirst): - (WTF::Collator::collate): - (WTF::Collator::createCollator): - (WTF::Collator::releaseCollator): - -2008-03-05 Kevin Ollivier - - Fix the wx build after the bindings move. - - * JavaScriptCoreSources.bkl: - * jscore.bkl: - -2008-03-05 Alp Toker - - GTK+ build fix for breakage introduced in r30800. - - Track moved bridge sources from JavaScriptCore to WebCore. - - * GNUmakefile.am: - -2008-03-05 Brent Fulgham - - Reviewed by Adam Roben. - - Remove definition of WTF_USE_SAFARI_THEME from wtf/Platform.h - because the PLATFORM(CG) flag is not set until config.h has - already included this file. - - * wtf/Platform.h: Remove useless definition of WTF_USE_SAFARI_THEME - -2008-03-05 Brady Eidson - - Reviewed by Alexey and Mark Rowe - - Fix for - Reproducible crash on storage/execute-sql-args.html - - DatabaseThread::unscheduleDatabaseTasks() manually filters through a MessageQueue, - removing particular items for Databases that were shutting down. - - This filtering operation is not atomic, and therefore causes a race condition with the - MessageQueue waking up and reading from the message queue. - - The end result was an attempt to dereference a null DatabaseTask. Timing-wise, this never - seemed to happen in a debug build, otherwise an assertion would've caught it. Replacing that - assertion with a crash in a release build is what revealed this bug. - - * wtf/MessageQueue.h: - (WTF::::waitForMessage): Tweak the waiting logic to check the queue's empty state then go back - to sleep if the queue was empty - checking m_killed each time it wakes up. - -2008-03-05 David D. Kilzer - - Remove unused header includes from interpreter.cpp. - - Reviewed by Darin. - - * kjs/interpreter.cpp: Remove unused header includes. - -2008-03-05 Anders Carlsson - - Reviewed by Sam. - - Remove bindings/. - - * bindings: Removed. - -2008-03-05 Anders Carlsson - - Don't build bindings/ anymore. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-03-05 Anders Carlsson - - Reviewed by Geoff. - - Don't build JavaScriptCore/bindings. - - * JavaScriptCore.exp: - Export a couple of new functions. - - * JavaScriptCore.xcodeproj/project.pbxproj: - Remove bindings/ - - * kjs/config.h: - No need to define HAVE_JNI anymore. - - * kjs/interpreter.cpp: - Remove unnecessary include. - -2008-03-05 David D. Kilzer - - Allow override of default script file name using command-line argument. - - Reviewed by Adele. - - * API/minidom.c: - (main): Allow first command-line argument to override the default script - file name of "minidom.js". - * API/testapi.c: - (main): Allow first command-line argument to override the default script - file name of "testapi.js". - -2008-03-04 Mark Rowe - - Mac build fix. - - * JavaScriptCore.exp: Add new symbol to exports file. - -2008-03-03 Oliver Hunt - - Reviewed by Anders. - - Make ForInNode check for the timeout interrupt - - * kjs/nodes.cpp: - (KJS::ForInNode::execute): - -2008-03-02 Brent Fulgham - - Reviewed by Alp Toker. - - http://bugs.webkit.org/show_bug.cgi?id=17415 - GTK Build (using autotools) on Mac OS (DarwinPorts) Fails - - Add -lstdc++ to link flags for minidom program. This corrects - a build error for the GTK+ on Mac OS. - - * GNUmakefile.am: - -2008-03-01 Mark Rowe - - Reviewed by Tim Hatcher. - - Update Xcode configuration to support building debug and release from the mysterious future. - - * Configurations/Base.xcconfig: - * Configurations/DebugRelease.xcconfig: - -2008-02-29 Brent Fulgham - - http://bugs.webkit.org/show_bug.cgi?id=17483 - Implement scrollbars on Windows (Cairo) - - Reviewed by Adam Roben. - - * wtf/Platform.h: - -2008-02-29 Adam Roben - - Remove unused DebuggerImp::abort and DebuggerImp::aborted - - Reviewed by Tim and Sam. - - * kjs/function_object.cpp: - (KJS::FunctionObjectImp::construct): - * kjs/internal.h: - (KJS::DebuggerImp::DebuggerImp): - * kjs/nodes.cpp: - (KJS::Node::handleException): - (KJS::FunctionBodyNodeWithDebuggerHooks::execute): - -2008-02-28 Eric Christopher - - Reviewed by Geoffrey Garen. - - ** TOTAL **: 1.005x as fast 2867.6ms +/- 0.4% 2853.2ms +/- 0.3% significant - - * kjs/nodes.cpp: Tell the compiler that exceptions are unexpected (for - the sake of branch prediction and code organization). - -2008-02-27 Alexey Proskuryakov - - Reviewed by Sam Weinig. - - http://bugs.webkit.org/show_bug.cgi?id=17030 - Small buffer overflow within initialization - - * kjs/date_object.cpp: - (KJS::DateObjectFuncImp::callAsFunction): - (KJS::parseDate): - Remove unnecessary and incorrect memset() calls - GregorianDateTime can initialize itself. - -2008-02-25 Sam Weinig - - Reviewed by Dan Bernstein. - - - Add a variant of remove that takes a position and a length. - - * wtf/Vector.h: - (WTF::Vector::remove): - -2008-02-25 Mark Mentovai - - Reviewed by Mark Rowe. - - Enable CollectorHeapIntrospector to build by itself, as well as in an AllInOneFile build. - http://bugs.webkit.org/show_bug.cgi?id=17538 - - * kjs/CollectorHeapIntrospector.cpp: Provide "using" declaration for - WTF::RemoteMemoryReader. - * kjs/collector.h: Move CollectorHeap declaration here... - * kjs/collector.cpp: ... from here. - -2008-02-25 Darin Adler - - Reviewed by Adam. - - * JavaScriptCore.exp: Sort the contents of this file. - -2008-02-25 Adam Roben - - MSVC build fix - - * kjs/testkjs.cpp: - (functionQuit): Don't add a return statement after exit(0) for MSVC. - -2008-02-24 Sam Weinig - - Reviewed by Mark Rowe. - - http://bugs.webkit.org/show_bug.cgi?id=17529 - Add support for reading from stdin from testkjs - - * kjs/testkjs.cpp: - (GlobalObject::GlobalObject): Add readline function to global object. - (functionReadline): Added. Reads characters from stdin until a '\n' or - EOF is encountered. The input is returned as a String to the caller. - -2008-02-24 Sam Weinig - - Reviewed by Mark Rowe. - - http://bugs.webkit.org/show_bug.cgi?id=17528 - Give testkjs a bath - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: Make the testkjs.cpp use 4 space indentation. - * kjs/testkjs.cpp: - (StopWatch::getElapsedMS): - (GlobalObject::className): - (GlobalObject::GlobalObject): - Rename GlobalImp to GlobalObject and setup the global functions - in the GlobalObject's constructor. Also, use static functions for - the implementation so we can use the standard PrototypeFunction - class and remove TestFunctionImp. - (functionPrint): Move print() functionality here. - (functionDebug): Move debug() functionality here. - (functionGC): Move gc() functionality here. - (functionVersion): Move version() functionality here. - (functionRun): Move run() functionality here. - (functionLoad): Move load() functionality here. - (functionQuit): Move quit() functionality here. - (prettyPrintScript): Fix indentation. - (runWithScripts): Since all the functionality of createGlobalObject is - now in the GlobalObject constructor, just call new here. - (parseArguments): Fix indentation. - (kjsmain): Ditto - (fillBufferWithContentsOfFile): Ditto. - -2008-02-24 Sam Weinig - - Reviewed by Oliver Hunt and Mark Rowe. - - http://bugs.webkit.org/show_bug.cgi?id=17505 - Add support for getting command line arguments in testkjs - - - This slightly changes the behavior of parsing arguments by requiring - a '-f' before all files. - - * kjs/testkjs.cpp: - (createGlobalObject): Add a global property called 'arguments' which - contains an array with the parsed arguments as strings. - (runWithScripts): Pass in the arguments vector so that it can be passed - to the global object. - (parseArguments): Change parsing rules to require a '-f' before any script - file. After all '-f' and '-p' arguments have been parsed, the remaining - are added to the arguments vector and exposed to the script. If there is a - chance of ambiguity (the user wants to pass the string '-f' to the script), - the string '--' can be used separate the options from the pass through - arguments. - (kjsmain): - -2008-02-24 Dan Bernstein - - Reviewed by Darin Adler. - - - fix http://bugs.webkit.org/show_bug.cgi?id=17511 - REGRESSION: Reproducible crash in SegmentedSubstring::SegmentedSubstring(SegmentedSubstring const&) - - * wtf/Deque.h: - (WTF::::expandCapacityIfNeeded): Fixed the case where m_start and m_end - are both zero but the buffer capacity is non-zero. - (WTF::::prepend): Added validity checks. - -2008-02-23 Jan Michael Alonzo - - Rubber stamped by Darin. - - Add separator '\' after libJavaScriptCore_la_LIBADD and cleanup - whitespaces introduced in the previous commit. - - * GNUmakefile.am: - -2008-02-23 Jan Michael Alonzo - - * GNUmakefile.am: Add GLOBALDEPS for testkjs and minidom. - -2008-02-23 Darin Adler - - Reviewed by Anders. - - - http://bugs.webkit.org/show_bug.cgi?id=17496 - make Deque use a circular array; add iterators - - * wtf/Deque.h: Wrote an all-new version of this class that uses a circular - buffer. Growth policy is identical to vector. Added iterators. - - * wtf/Vector.h: Made two small refinements while using this to implement - Deque: Made VectorBufferBase derive from Noncopyable, which would have - saved me some debugging time if it had been there. Renamed Impl and - m_impl to Buffer and m_buffer. - -2008-02-23 Darin Adler - - Reviewed by Anders. - - - http://bugs.webkit.org/show_bug.cgi?id=17067 - eliminate attributes parameter from JSObject::put for speed/clarity - - * API/JSCallbackObject.h: Removed attribute arguments. - * API/JSCallbackObjectFunctions.h: - (KJS::JSCallbackObject::put): Ditto. - * API/JSObjectRef.cpp: - (JSObjectSetProperty): Use initializeVariable or putDirect when necessary - to set attribute values. - * JavaScriptCore.exp: Updated. - * bindings/objc/objc_runtime.h: Removed attribute arguments. - * bindings/objc/objc_runtime.mm: - (ObjcFallbackObjectImp::put): Ditto. - * bindings/runtime_array.cpp: - (RuntimeArray::put): Ditto. - * bindings/runtime_array.h: Ditto. - * bindings/runtime_object.cpp: - (RuntimeObjectImp::put): Ditto. - * bindings/runtime_object.h: Ditto. Also removed canPut which was only - called from one place in WebCore that can use hasProperty instead. - - * kjs/Activation.h: Removed attribute argument from put and added the new - initializeVariable function that's used to put variables in variable objects. - Also made isActivationObject a const member. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::put): Removed attribute argument. - (KJS::JSGlobalObject::initializeVariable): Added. Used to give variables - their initial values, which can include the read-only property. - (KJS::JSGlobalObject::reset): Removed obsolete comments about flags. - Removed Internal flag, which is no longer needed. - * kjs/JSGlobalObject.h: More of the same. - - * kjs/JSVariableObject.h: Added pure virtual initializeVariable function. - (KJS::JSVariableObject::symbolTablePut): Removed checkReadOnly flag; we always - check read-only. - (KJS::JSVariableObject::symbolTableInitializeVariable): Added. - - * kjs/array_instance.cpp: - (KJS::ArrayInstance::put): Removed attribute argument. - * kjs/array_instance.h: Ditto. - - * kjs/function.cpp: - (KJS::FunctionImp::put): Ditto. - (KJS::Arguments::put): Ditto. - (KJS::ActivationImp::put): Ditto. - (KJS::ActivationImp::initializeVariable): Added. - * kjs/function.h: Removed attribute arguments. - - * kjs/function_object.cpp: - (KJS::FunctionObjectImp::construct): Removed Internal flag. - - * kjs/lookup.h: - (KJS::lookupPut): Removed attributes argument. Also changed to use putDirect - instead of calling JSObject::put. - (KJS::cacheGlobalObject): Ditto. - - * kjs/nodes.cpp: - (KJS::ConstDeclNode::handleSlowCase): Call initializeVariable to initialize - the constant. - (KJS::ConstDeclNode::evaluateSingle): Ditto. - (KJS::TryNode::execute): Use putDirect to set up the new object. - (KJS::FunctionBodyNode::processDeclarations): Removed Internal. - (KJS::ProgramNode::processDeclarations): Ditto. - (KJS::EvalNode::processDeclarations): Call initializeVariable to initialize - the variables and functions. - (KJS::FuncDeclNode::makeFunction): Removed Internal. - (KJS::FuncExprNode::evaluate): Ditto. - - * kjs/object.cpp: Removed canPut, which was only being used in one code path, - not the normal high speed one. - (KJS::JSObject::put): Removed attribute argument. Moved the logic from - canPut here, in the one code ath that was still using it. - * kjs/object.h: Removed Internal attribute, ad canPut function. Removed the - attributes argument to the put function. Made isActivationObject const. - - * kjs/regexp_object.cpp: - (KJS::RegExpImp::put): Removed attributes argument. - (KJS::RegExpImp::putValueProperty): Ditto. - (KJS::RegExpObjectImp::put): Ditto. - (KJS::RegExpObjectImp::putValueProperty): Ditto. - * kjs/regexp_object.h: Ditto. - - * kjs/string_object.cpp: - (KJS::StringInstance::put): Removed attributes argument. - * kjs/string_object.h: Ditto. - -2008-02-23 Jan Michael Alonzo - - Not reviewed, Gtk build fix. - - * kjs/testkjs.pro: - -2008-02-23 Alexey Proskuryakov - - Windows build fix - move ThreadCondition implementation from WebCore to WTF. - - * wtf/ThreadingWin.cpp: - (WTF::ThreadCondition::ThreadCondition): - (WTF::ThreadCondition::~ThreadCondition): - (WTF::ThreadCondition::wait): - (WTF::ThreadCondition::signal): - (WTF::ThreadCondition::broadcast): - -2008-02-23 Alexey Proskuryakov - - Touch some files, hoping that Windows build bot will create JSC headers. - - * kjs/AllInOneFile.cpp: - * kjs/array_instance.cpp: - * wtf/HashTable.cpp: - -2008-02-23 Alexey Proskuryakov - - Qt/Wx build fix - this file was still in a wrong namespace, too. - - * wtf/ThreadingNone.cpp: - -2008-02-23 Alexey Proskuryakov - - More build fixing - fix mismatched braces. - - * JavaScriptCore.pri: - -2008-02-23 Alexey Proskuryakov - - Wx and Gtk build fixes. - - * JavaScriptCore.pri: Don't try to compile ThreadingPthreads. - * wtf/ThreadingGtk.cpp: Use a correct namespace. - -2008-02-23 Alexey Proskuryakov - - Reviewed by Darin. - - Move basic threading support from WebCore to WTF. - - Added mutex protection to MessageQueue::killed() for paranoia sake. - - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * wtf/Locker.h: Copied from WebCore/platform/Locker.h. - * wtf/MessageQueue.h: Copied from WebCore/platform/MessageQueue.h. - (WTF::::killed): - * wtf/Threading.h: Copied from WebCore/platform/Threading.h. - * wtf/ThreadingGtk.cpp: Copied from WebCore/platform/gtk/ThreadingGtk.cpp. - (WebCore::createThread): - * wtf/ThreadingNone.cpp: Copied from WebCore/platform/ThreadingNone.cpp. - * wtf/ThreadingPthreads.cpp: Copied from WebCore/platform/pthreads/ThreadingPthreads.cpp. - (WTF::createThread): - * wtf/ThreadingWin.cpp: Copied from WebCore/platform/win/ThreadingWin.cpp. - (WTF::createThread): - (WTF::Mutex::Mutex): - (WTF::Mutex::~Mutex): - (WTF::Mutex::lock): - (WTF::Mutex::tryLock): - (WTF::Mutex::unlock): - -2008-02-22 Geoffrey Garen - - Reviewed by Sam Weinig. - - Partial fix for Gmail out of memory (17455) - - I'm removing KJS_MEM_LIMIT for the following reasons: - - - We have a few reports of KJS_MEM_LIMIT breaking important web - applications, like GMail and Google Reader. (For example, if you - simply open 12 GMail tabs, tab #12 will hit the limit.) - - - Firefox has no discernable JS object count limit, so any limit, even - a large one, is a potential compatibility problem. - - - KJS_MEM_LIMIT does not protect against malicious memory allocation, - since there are many ways to maliciously allocate memory without - increasing the JS object count. - - - KJS_MEM_LIMIT is already mostly broken, since it only aborts the - script that breaches the limit, not any subsequent scripts. - - - We've never gotten bug reports about websites that would have - benefited from an unbroken KJS_MEM_LIMIT. The initial check-in of - KJS_MEM_LIMIT (KJS revision 80061) doesn't mention a website that - needed it. - - - Any website that brings you anywhere close to crashing due to the - number of live JS objects will almost certainly put up the "slow - script" dialog at least 20 times beforehand. - - * kjs/collector.cpp: - (KJS::Collector::collect): - * kjs/collector.h: - * kjs/nodes.cpp: - (KJS::TryNode::execute): - -2008-02-22 Oliver Hunt - - Reviewed by Alexey P. - - REGRESSION: while(NaN) acts like while(true) - - Fix yet another case where we incorrectly relied on implicit double - to bool coercion. - - * kjs/nodes.cpp: - (KJS::PostDecLocalVarNode::evaluateToBoolean): - -2008-02-20 Michael Knaup - - Reviewed by Darin. - - Fix for Bug 16753: date set methods with no args should result in NaN (Acid3 bug) - The set values result in NaN now when called with no args, NaN or +/- inf values. - The setYear, setFullYear and setUTCFullYear methods used on NaN dates work as - descripted in the standard. - - * kjs/date_object.cpp: - (KJS::fillStructuresUsingTimeArgs): - (KJS::fillStructuresUsingDateArgs): - (KJS::setNewValueFromTimeArgs): - (KJS::setNewValueFromDateArgs): - (KJS::dateProtoFuncSetYear): - -2008-02-19 Anders Carlsson - - Reviewed by Darin. - - Change OpaqueJSClass and RootObject to start with a ref count of 1. - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - (OpaqueJSClass::createNoAutomaticPrototype): - (OpaqueJSClass::create): - * API/JSClassRef.h: - * API/JSObjectRef.cpp: - (JSClassCreate): - * bindings/runtime_root.cpp: - (KJS::Bindings::RootObject::create): - (KJS::Bindings::RootObject::RootObject): - -2008-02-19 Darin Adler - - Rubber stamped by Anders. - - - removed explicit initialization to 1 for RefCounted; that's now the default - - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): Removed RefCounted initializer. - -2008-02-19 Darin Adler - - Reviewed by Anders. - - - next step for http://bugs.webkit.org/show_bug.cgi?id=17257 - start ref counts at 1 instead of 0 for speed - - * wtf/RefCounted.h: - (WTF::RefCounted::RefCounted): Have refcounts default to 1. This allows us to start - removing the explicit initialization of RefCounted from classes and eventually we - can remove the ability to have the initial count of 0 entirely. - -2008-02-18 Samuel Weinig - - Reviewed by Geoff Garen. - - Fix for http://bugs.webkit.org/show_bug.cgi?id=17419 - Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::init): - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::setDebugger): - * kjs/date_object.cpp: - (KJS::dateProtoFuncGetYear): - -2008-02-18 Darin Adler - - Reviewed by Sam. - - * wtf/ASCIICType.h: - (WTF::toASCIIHexValue): Added. - -2008-02-17 Darin Adler - - * wtf/ListHashSet.h: (WTF::swap): Removed stray return statement. - -2008-02-15 Adam Roben - - Make JavaScriptCore's FEATURE_DEFINES match WebCore's - - Reviewed by Mark. - - * Configurations/JavaScriptCore.xcconfig: - -2008-02-14 Stephanie Lewis - - Reviewed by Geoff. - - Update order files. - - * JavaScriptCore.order: - -2008-02-14 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed nee http://bugs.webkit.org/show_bug.cgi?id=17329 - Crash in JSGlobalObject::popActivation when inserting hyperlink in Wordpress (17329) - - Don't reset the "activations" stack in JSGlobalObject::reset, since we - might be executing a script during the call to reset, and the script - needs to safely run to completion. - - Instead, initialize the "activations" stack when the global object is - created, and subsequently rely on pushing and popping during normal - execution to maintain the stack's state. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::init): - (KJS::JSGlobalObject::reset): - -2008-02-13 Bernhard Rosenkraenzer - - Reviewed by Darin. - - - http://bugs.webkit.org/show_bug.cgi?id=17339 - JavaScriptCore does not build with gcc 4.3 - - * kjs/interpreter.cpp: Add include of , since that's where - getpid() comes from. - -2008-02-13 Oliver Hunt - - Reviewed by Alexey P. - - REGRESSION (r27747): can't browse pictures on fastcupid.com - - When converting numeric values to booleans we need to account for NaN - - * kjs/nodes.cpp: - (KJS::MultNode::evaluateToBoolean): - (KJS::ModNode::evaluateToBoolean): - -2008-02-08 Samuel Weinig - - Reviewed by Brady Eidson. - - REGRESSION: PLT 0.3% slower due to r28868 (caching ClassNodeList and NamedNodeList) - - - Tweak the statements in isASCIISpace to account for the statistical distribution of - usage in the PLT. - - .4% speedup on my machine. Stephanie's machine shows this as .3% speedup. - - * wtf/ASCIICType.h: - (WTF::isASCIISpace): - -2008-02-11 Sam Weinig - - Reviewed by Anders Carlsson. - - Fixes for: - Match Firefox's cross-domain model more accurately by return the built-in version of functions even if they have been overridden - Crash when setting the Window objects prototype to a custom Object and then calling a method on it - - - Expose the native Object.prototype.toString implementation so that it can be used for cross-domain - toString calling. - - * JavaScriptCore.exp: - * kjs/object_object.cpp: - * kjs/object_object.h: - -2008-02-10 Darin Adler - - Rubber stamped by Eric. - - * kjs/ExecState.h: - (KJS::ExecState::takeException): Added. - -2008-02-10 Darin Adler - - Reviewed by Eric. - - - http://bugs.webkit.org/show_bug.cgi?id=17256 - eliminate default ref. count of 0 in RefCounted class - - * wtf/RefCounted.h: - (WTF::RefCounted::RefCounted): Remove default of 0. - -2008-02-10 Darin Adler - - Reviewed by Eric. - - - http://bugs.webkit.org/show_bug.cgi?id=17256 - Make clients of RefCounted explicitly set the count to 0. - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - * bindings/runtime_root.cpp: - (KJS::Bindings::RootObject::RootObject): - -2008-02-09 Darin Adler - - Reviewed by Mitz. - - - http://bugs.webkit.org/show_bug.cgi?id=17256 - Change RegExp to start its ref count at 1, not 0 - - We'll want to do this to every RefCounted class, one at a time. - - * kjs/nodes.h: - (KJS::RegExpNode::RegExpNode): Use RegExp::create instead of new RegExp. - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): Marked inline, set initial ref count to 1. - (KJS::RegExp::create): Added. Calls new RegExp then adopts the initial ref. - * kjs/regexp.h: Reformatted. Made the constructors private. Added static - create functions that return objects already wrapped in PassRefPtr. - * kjs/regexp_object.cpp: - (KJS::regExpProtoFuncCompile): Use RegExp::create instead of new RegExp. - (KJS::RegExpObjectImp::construct): Ditto. - * kjs/string_object.cpp: - (KJS::stringProtoFuncMatch): Ditto. - (KJS::stringProtoFuncSearch): Ditto. - -2008-02-08 Oliver Hunt - - Reviewed by Maciej. - - REGRESSION (r28973): Extraneous parentheses in function.toString() - https://bugs.webkit.org/show_bug.cgi?id=17214 - - Make a subclass of CommaNode to provide the correct precedence for each expression in - a variable declaration list. - - * kjs/grammar.y: - * kjs/nodes.h: - (KJS::VarDeclCommaNode::): - -2008-02-08 Darin Adler - - Reviewed by Oliver. - - - fix http://bugs.webkit.org/show_bug.cgi?id=17247 - Labelled continue/break can fail in some cases - - Test: fast/js/continue-break-multiple-labels.html - - * kjs/nodes.h: - (KJS::StatementNode::pushLabel): Made this virtual. - (KJS::LabelNode::pushLabel): Forward pushLabel calls to the statement inside. - -2008-02-08 Darin Adler - - Reviewed by Eric. - - - fix http://bugs.webkit.org/show_bug.cgi?id=15003 - Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug) - - Test: fast/js/constructor-attributes.html - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::reset): Remove unwanted attributes from "constructor". - * kjs/function_object.cpp: - (KJS::FunctionObjectImp::construct): Ditto. - * kjs/nodes.cpp: - (KJS::FuncDeclNode::makeFunction): Ditto. - (KJS::FuncExprNode::evaluate): Ditto. - -2008-02-06 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Added an ASSERT to catch refCount underflow, since it caused a leak in - my last check-in. - - * wtf/RefCounted.h: - (WTF::RefCounted::deref): - -2008-02-06 Geoffrey Garen - - Reviewed by Darin Adler. - - PLT speedup related to REGRESSION: PLT .4% - slower due to r28884 (global variable symbol table optimization) - - Tweaked RefCounted::deref() to be a little more efficient. - - 1% - 1.5% speedup on my machine. .7% speedup on Stephanie's machine. - - * wtf/RefCounted.h: - (WTF::RefCounted::deref): Don't modify m_refCount if we're just going - to delete the object anyway. Also, use a simple == test, which might be - faster than <= on some hardware. - -2008-02-06 Darin Adler - - Reviewed by Sam. - - - fix http://bugs.webkit.org/show_bug.cgi?id=17094 - Array.prototype functions create length properties with DontEnum/DontDelete - - Test results match Gecko with very few obscure exceptions that seem to be - bugs in Gecko. - - Test: fast/js/array-functions-non-arrays.html - - * kjs/array_object.cpp: - (KJS::arrayProtoFuncConcat): Removed DontEnum and DontDelete from the call - to set length. - (KJS::arrayProtoFuncPop): Ditto. Also added missing call to deleteProperty, - which is not needed for real arrays, but is needed for non-arrays. - (KJS::arrayProtoFuncPush): Ditto. - (KJS::arrayProtoFuncShift): Ditto. - (KJS::arrayProtoFuncSlice): Ditto. - (KJS::arrayProtoFuncSort): Removed incorrect call to set length when - the array has no elements. - (KJS::arrayProtoFuncSplice): Removed DontEnum and DontDelete from the call - to set length. - (KJS::arrayProtoFuncUnShift): Ditto. Also added a check for 0 arguments to - make behavior match the specification in that case. - * kjs/nodes.cpp: - (KJS::ArrayNode::evaluate): Removed DontEnum and DontDelete from the call - to set length. - -2008-02-06 Darin Adler - - Reviewed by Sam. - - - replace calls to put to set up properties with calls to putDirect, to - prepare for a future change where put won't take attributes any more, - and for a slight performance boost - - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): Use putDirect instead of put. - * kjs/CommonIdentifiers.h: Removed lastIndex. - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::reset): Use putDirect instead of put. - * kjs/array_object.cpp: - (KJS::arrayProtoFuncConcat): Took out extra call to get length (unused). - (KJS::ArrayObjectImp::ArrayObjectImp): Use putDirect instead of put. - * kjs/error_object.cpp: - (KJS::ErrorPrototype::ErrorPrototype): Use putDirect instead of put. - * kjs/function.cpp: - (KJS::Arguments::Arguments): Use putDirect instead of put. - (KJS::PrototypeFunction::PrototypeFunction): Use putDirect instead of put. - * kjs/function_object.cpp: - (KJS::FunctionObjectImp::construct): Use putDirect instead of put. - * kjs/nodes.cpp: - (KJS::FuncDeclNode::makeFunction): Use putDirect instead of put. - (KJS::FuncExprNode::evaluate): Use putDirect instead of put. - * kjs/regexp_object.cpp: - (KJS::regExpProtoFuncCompile): Use setLastIndex instead of put(lastIndex). - (KJS::RegExpImp::match): Get and set lastIndex by using m_lastIndex instead of - calling get and put. - * kjs/regexp_object.h: - (KJS::RegExpImp::setLastIndex): Added. - * kjs/string_object.cpp: - (KJS::stringProtoFuncMatch): Use setLastIndex instead of put(lastIndex). - -2008-02-05 Sam Weinig - - Reviewed by Anders Carlsson. - - Fix for http://bugs.webkit.org/show_bug.cgi?id=8080 - NodeList (and other DOM lists) items are not enumeratable using for..in - - * JavaScriptCore.exp: - -2008-02-05 Mark Rowe - - Reviewed by Oliver Hunt. - - Update versioning to support the mysterious future. - - * Configurations/Version.xcconfig: Add SYSTEM_VERSION_PREFIX_1060. - -2008-02-04 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Fixes Bug 16889: REGRESSION (r29425): Canvas-based graphing calculator fails to run - Bug 17015: REGRESSION (r29414-29428): www.fox.com "shows" menu fails to render - Bug 17164: REGRESSION: JavaScript pop-up menu appears at wrong location when hovering image at http://news.chinatimes.com/ - - - - - - - - - - The ActivationImp tear-off (r29425) introduced a problem with ReadModify - nodes that first resolve a slot, call valueForReadModifyNode(), and then - store a value in the previously resolved slot. Since valueForReadModifyNode() - may cause a tear-off, the slot needs to be resolved again, but this was - not happening with the existing code. - - * kjs/nodes.cpp: - (KJS::ReadModifyLocalVarNode::evaluate): - (KJS::ReadModifyResolveNode::evaluate): - -2008-02-04 Cameron McCormack - - Reviewed by Geoff Garen. - - Remove some unneccesary UNUSED_PARAMs. Clarify ownership rule of return value of JSObjectCopyPropertyNames. - - * API/JSNode.c: - (JSNode_appendChild): - (JSNode_removeChild): - (JSNode_replaceChild): - (JSNode_getNodeType): - (JSNode_getFirstChild): - * API/JSNodeList.c: - (JSNodeList_length): - * API/JSObjectRef.h: - -2008-02-04 Rodney Dawes - - Reviewed by Alp Toker and Mark Rowe. - - Fix http://bugs.webkit.org/show_bug.cgi?id=17175. - Bug 17175: Use of C++ compiler flags in CFLAGS - - * GNUmakefile.am: Use global_cxxflags as well as global_cflags in CXXFLAGS. - -2008-02-04 Alp Toker - - Rubber-stamped by Mark Rowe. - - Remove all trailing whitespace in the GTK+ port and related - components. - - * GNUmakefile.am: - -2008-02-02 Darin Adler - - Reviewed by Geoff Garen. - - PLT speedup related to REGRESSION: PLT .4% - slower due to r28884 (global variable symbol table optimization) - - Geoff's theory is that the slowdown was due to copying hash tables when - putting things into the back/forward cache. If that's true, then this - should fix the problem. - - (According to Geoff's measurements, in a PLT that exaggerates the - importance of symbol table saving during cached page creation, this - patch is a ~3X speedup in cached page creation, and a 9% speedup overall.) - - * JavaScriptCore.exp: Updated. - - * kjs/JSVariableObject.cpp: - (KJS::JSVariableObject::saveLocalStorage): Updated for changes to SavedProperty, - which has been revised to avoid initializing each SavedProperty twice when building - the array. Store the property names too, so we don't have to store the symbol table - separately. Do this by iterating the symbol table instead of the local storage vector. - (KJS::JSVariableObject::restoreLocalStorage): Ditto. Restore the symbol table as - well as the local storage vector. - - * kjs/JSVariableObject.h: Removed save/restoreSymbolTable and do that work inside - save/restoreLocalStorage instead. Made restoreLocalStorage a non-const member function - that takes a const reference to a SavedProperties object. - - * kjs/LocalStorage.h: Changed attributes to be unsigned instead of int to match - other declarations of attributes elsewhere. - - * kjs/property_map.cpp: - (KJS::SavedProperties::SavedProperties): Updated for data member name change. - (KJS::PropertyMap::save): Updated for data member name change and to use the new - inline init function instead of setting the fields directly. This allows us to - skip initializing the SavedProperty objects when first allocating the array, and - just do it when we're actually setting up the individual elements. - (KJS::PropertyMap::restore): Updated for SavedProperty changes. - - * kjs/property_map.h: Changed SavedProperty from a struct to a class. Set it up so - it does not get initialized at construction time to avoid initializing twice when - creating an array of SavedProperty. Removed the m_ prefixes from the members of - the SavedProperties struct. Generally we use m_ for class members and not struct. - -2008-02-02 Tony Chang - - Reviewed by darin. Landed by eseidel. - - Add #define guards for WIN32_LEAN_AND_MEAN and _CRT_RAND_S. - - * kjs/config.h: - * wtf/FastMalloc.cpp: - * wtf/TCSpinLock.h: - -2008-01-28 Sam Weinig - - Rubber-stamped by Darin Adler. - - - Fix whitespace in nodes.h/cpp and nodes2string.cpp. - - (NOTE: Specific changed functions elided for space and clarity) - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - -2008-01-27 Sam Weinig - - Reviewed by Oliver Hunt. - - Patch for http://bugs.webkit.org/show_bug.cgi?id=17025 - nodes.h/cpp has been rolling around in the mud - lets hose it down - - - Rename member variables to use the m_ prefix. - - (NOTE: Specific changed functions elided for space and clarity) - * kjs/grammar.y: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - -2008-01-27 Darin Adler - - Reviewed by Oliver. - - - fix REGRESSION: const is broken - - Test: fast/js/const.html - - SunSpider said this was 0.3% slower. And I saw some Shark samples in - JSGlobalObject::put -- not a lot but a few. We may be able to regain the - speed, but for now we will take that small hit for correctness sake. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::put): Pass the checkReadOnly flag in to symbolTablePut - instead of passing attributes. - - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTablePut): Removed the code to set attributes - here, since we only set attributes when creating a property. Added the code - to check read-only here, since we need that to implement const! - - * kjs/function.cpp: - (KJS::ActivationImp::put): Pass the checkReadOnly flag in to symbolTablePut - instead of passing attributes. - - * kjs/nodes.cpp: - (KJS::isConstant): Added. - (KJS::PostIncResolveNode::optimizeVariableAccess): Create a PostIncConstNode - if optimizing for a local variable and the variable is constant. - (KJS::PostDecResolveNode::optimizeVariableAccess): Ditto. But PostDecConstNode. - (KJS::PreIncResolveNode::optimizeVariableAccess): Ditto. But PreIncConstNode. - (KJS::PreDecResolveNode::optimizeVariableAccess): Ditto. But PreDecConstNode. - (KJS::PreIncConstNode::evaluate): Return the value + 1. - (KJS::PreDecConstNode::evaluate): Return the value - 1. - (KJS::PostIncConstNode::evaluate): Return the value converted to a number. - (KJS::PostDecConstNode::evaluate): Ditto. - (KJS::ReadModifyResolveNode::optimizeVariableAccess): Create a ReadModifyConstNode - if optimizing for a local variable and the variable is constant. - (KJS::AssignResolveNode::optimizeVariableAccess): Ditto. But AssignConstNode. - (KJS::ScopeNode::optimizeVariableAccess): Pass the local storage to the - node optimizeVariableAccess functions, since that's where we need to look to - figure out if a variable is constant. - (KJS::FunctionBodyNode::processDeclarations): Moved the call to - optimizeVariableAccess until after localStorage is set up. - (KJS::ProgramNode::processDeclarations): Ditto. - - * kjs/nodes.h: Fixed the IsConstant and HasInitializer values. They are used - as flag masks, so a value of 0 will not work for IsConstant. Changed the - first parameter to optimizeVariableAccess to be a const reference to a symbol - table and added a const reference to local storage. Added classes for const - versions of local variable access: PostIncConstNode, PostDecConstNode, - PreIncConstNode, PreDecConstNode, ReadModifyConstNode, and AssignConstNode. - - * kjs/object.cpp: - (KJS::JSObject::put): Tweaked comments a bit, and changed the checkReadOnly - expression to match the form used at the two other call sites. - -2008-01-27 Darin Adler - - Reviewed by Oliver. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16498 - ''.constructor.toString() gives [function] - - Test: fast/js/function-names.html - - * kjs/array_object.cpp: - (KJS::ArrayObjectImp::ArrayObjectImp): Use the class name as the constructor's function name. - * kjs/bool_object.cpp: - (KJS::BooleanObjectImp::BooleanObjectImp): Ditto. - * kjs/date_object.cpp: - (KJS::DateObjectImp::DateObjectImp): Ditto. - * kjs/error_object.cpp: - (KJS::ErrorPrototype::ErrorPrototype): Make the error object be an Error. - (KJS::ErrorObjectImp::ErrorObjectImp): Use the class name as the constructor's function name. - (KJS::NativeErrorPrototype::NativeErrorPrototype): Take const UString&. - (KJS::NativeErrorImp::NativeErrorImp): Use the prototype's name as the constructor's function - name. - * kjs/error_object.h: Change ErrorPrototype to inherit from ErrorInstance. Change the - NativeErrorImp constructor to take a NativeErrorPrototype pointer for its prototype. - * kjs/function.h: Removed unneeded constructor for internal functions without names. - We want to avoid those! - * kjs/function_object.cpp: - (KJS::functionProtoFuncToString): Removed code that writes out just [function] for functions - that have no names. There's no reason to do that. - (KJS::FunctionObjectImp::FunctionObjectImp): Use the class name as the constructor's - function name. - * kjs/internal.cpp: Removed the unused constructor. - * kjs/number_object.cpp: - (KJS::fractionalPartToString): Marked static for internal linkage. - (KJS::exponentialPartToString): Ditto. - (KJS::numberProtoFuncToPrecision): Removed an unneeded else. - (KJS::NumberObjectImp::NumberObjectImp): Use the class name as the constructor's - function name. - (KJS::NumberObjectImp::getValueProperty): Tweaked formatting. - * kjs/object_object.cpp: - (KJS::ObjectObjectImp::ObjectObjectImp): Use "Object" for the function name. - * kjs/regexp_object.cpp: - (KJS::RegExpObjectImp::RegExpObjectImp): Use "RegExp" for the function name. - * kjs/string_object.cpp: - (KJS::StringObjectImp::StringObjectImp): Use the class name as the constructor's - function name. - -2008-01-26 Darin Adler - - Reviewed by Oliver. - - - fix http://bugs.webkit.org/show_bug.cgi?id=17027 - Incorrect Function.toString behaviour with read/modify/write operators performed on negative numbers - - Test: fast/js/function-toString-parentheses.html - - The problem here was that a NumberNode with a negative number in it had the wrong - precedence. It's not a primary expression, it's a unary operator with a primary - expression after it. - - Once the precedence of NumberNode was fixed, the cases from bug 17020 were also - fixed without trying to treat bracket nodes like dot nodes. That wasn't needed. - The reason we handle numbers before dot nodes specially is that the dot is a - legal character in a number. The same is not true of a bracket. Eventually we - could get smarter, and only add the parentheses when there is actual ambiguity. - There is none if the string form of the number already has a dot in it, or if - it's a number with a alphabetic name like infinity or NAN. - - * kjs/nodes.h: Renamed back from ObjectAccess to DotExpr. - (KJS::NumberNode::precedence): Return PrecUnary for negative numbers, since - they serialize as a unary operator, not a primary expression. - * kjs/nodes2string.cpp: - (KJS::SourceStream::operator<<): Clear m_numberNeedsParens if this adds - parens; one set is enough. - (KJS::bracketNodeStreamTo): Remove unneeded special flag here. Normal - operator precedence suffices. - (KJS::NewExprNode::streamTo): Ditto. - -2008-01-26 Oliver Hunt - - Reviewed by Maciej and Darin. - - Fix for http://bugs.webkit.org/show_bug.cgi?id=17020 - Function.toString does not parenthesise numbers for the bracket accessor - - It turns out that logic was there for all of the dot accessor nodes to make numbers be - parenthesised properly, so it was a trivial extension to extend that to the bracket nodes. - I renamed the enum type to reflect the fact that it is now used for both dot and bracket - accessors. - - * kjs/nodes2string.cpp: - (KJS::bracketNodeStreamTo): - (KJS::BracketAccessorNode::streamTo): - -2008-01-26 Oliver Hunt - - Reviewed by Darin. - - Fix Bug 17018: Incorrect code generated from Function.toString for get/setters in object literals - - Don't quote getter and setter names during output, as that is simply wrong. - - * kjs/nodes2string.cpp: - (KJS::PropertyNode::streamTo): - -2008-01-26 Darin Adler - - Reviewed by Eric Seidel. - - - http://bugs.webkit.org/show_bug.cgi?id=16860 - a bit of cleanup after the Activation optimization - - * JavaScriptCore.exp: Export the GlobalExecState constructor instead of - the global flavor of the ExecState constructor. It'd probably be cleaner - to not export either one, but JSGlobalObject inlines the code that - constructs the ExecState. If we changed that, we could remove this export. - - * JavaScriptCore.xcodeproj/project.pbxproj: Re-sorted a few things and - put the new source files into the kjs group rather than at the top level. - - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): Marked inline and updated for data member - name changes. This is now only for use for the derived classes. Also removed - code that sets the unused m_savedExec data member for the global case. That - data member is only used for the other two types. - (KJS::ExecState::~ExecState): Marked inline and removed all the code. - The derived class destructors now inclde the appropriate code. - (KJS::ExecState::lexicalGlobalObject): Removed unneeded special case for - an empty scope chain. The bottom function already returns 0 for that case, - so the general case code handles it fine. Also changed to use data members - directly rather than calling functions. - (KJS::GlobalExecState::GlobalExecState): Added. Calls through to the base - class constructor. - (KJS::GlobalExecState::~GlobalExecState): Added. - (KJS::InterpreterExecState::InterpreterExecState): Added. Moved code to - manipulate activeExecStates here since we don't want to have to check for the - special case of globalExec. - (KJS::InterpreterExecState::~InterpreterExecState): Added. - (KJS::EvalExecState::EvalExecState): Added. - (KJS::EvalExecState::~EvalExecState): Added. - (KJS::FunctionExecState::FunctionExecState): Added. - (KJS::FunctionExecState::~FunctionExecState): Added. - - * kjs/ExecState.h: Tweaked the header, includes, and declarations a bit. - Made ExecState inherit from Noncopyable. Reformatted some comments and - made them a bit more brief. Rearranged declarations a little bit and removed - unused savedExec function. Changed seenLabels function to return a reference - rather than a pointer. Made constructors and destructor protected, and also - did the same with all data members. Renamed m_thisVal to m_thisValue and - ls to m_labelStack. Added three new derived classes for each of the - types of ExecState. The primary goal here was to remove a branch from the - code in the destructor, but it's also clearer than overloading the arguments - to the ExecState constructor. - - * kjs/JSGlobalObject.cpp: - (KJS::getCurrentTime): Fixed formatting. - (KJS::JSGlobalObject::pushActivation): Removed parentheses that don't make - the expression clearer -- other similar sites didn't have these parentheses, - even the one a couple lines earlier that sets stackEntry. - (KJS::JSGlobalObject::tearOffActivation): Got rid of unneeded static_cast - (I think I mentioned this during patch review) and used an early exit so that - the entire contents of the function aren't nested inside an if statement. - Also removed the check of codeType, instead checking Activation for 0. - For now, I kept the codeType check, but inside an assertion. - - * kjs/JSGlobalObject.h: Changed type of globalExec to GlobalExecState. - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): Changed type to FunctionExecState. - (KJS::GlobalFuncImp::callAsFunction): Changed type to EvalExecState. - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): Changed type to GlobalExecState. - - * kjs/nodes.cpp: - (KJS::ContinueNode::execute): Changed code since seenLabels() returns a - reference now instead of a pointer. - (KJS::BreakNode::execute): Ditto. - (KJS::LabelNode::execute): Ditto. - -2008-01-26 Sam Weinig - - Reviewed by Mark Rowe. - - Cleanup node2string a little. - - Remove some unnecessary branching. - - Factor out bracket and dot streaming into static inline functions. - - * kjs/nodes.h: - * kjs/nodes2string.cpp: - (KJS::bracketNodeStreamTo): - (KJS::dotNodeStreamTo): - (KJS::FunctionCallBracketNode::streamTo): - (KJS::FunctionCallDotNode::streamTo): - (KJS::PostIncBracketNode::streamTo): - (KJS::PostDecBracketNode::streamTo): - (KJS::PostIncDotNode::streamTo): - (KJS::PostDecDotNode::streamTo): - (KJS::DeleteBracketNode::streamTo): - (KJS::DeleteDotNode::streamTo): - (KJS::PreIncBracketNode::streamTo): - (KJS::PreDecBracketNode::streamTo): - (KJS::PreIncDotNode::streamTo): - (KJS::PreDecDotNode::streamTo): - (KJS::ReadModifyBracketNode::streamTo): - (KJS::AssignBracketNode::streamTo): - (KJS::ReadModifyDotNode::streamTo): - (KJS::AssignDotNode::streamTo): - (KJS::WhileNode::streamTo): - -2008-01-26 Mark Rowe - - Reviewed by Darin Adler. - - Fix http://bugs.webkit.org/show_bug.cgi?id=17001 - Bug 17001: Build error with Gtk port on Mac OS X - - If both XP_MACOSX and XP_UNIX are defined then X11.h and Carbon.h will both be included. - These provide conflicting definitions for a type named 'Cursor'. As XP_UNIX is set by - the build system when targeting X11, it doesn't make sense for XP_MACOSX to also be set - in this instance. - - * bindings/npapi.h: Don't define XP_MACOSX if XP_UNIX is defined. - -2008-01-26 Darin Adler - - Reviewed by Oliver. - - - fix http://bugs.webkit.org/show_bug.cgi?id=17013 - JSC can't round trip certain for-loops - - Test: fast/js/toString-for-var-decl.html - - * kjs/nodes.h: Added PlaceholderTrueNode so we can put nodes into - for loops without injecting the word "true" into them (nice, but not - the bug fix). Fixed ForNode constructor so expr1WasVarDecl is set - only when there is an expression, since it's common for the actual - variable declaration to be moved by the parser. - - * kjs/nodes2string.cpp: - (KJS::PlaceholderTrueNode::streamTo): Added. Empty. - -2008-01-25 Oliver Hunt - - Reviewed by Maciej. - - Fix for bug 17012: REGRESSION: JSC can't round trip an object literal - - Add logic to ensure that object literals and function expressions get - parentheses when necessary. - - * kjs/nodes.h: - * kjs/nodes2string.cpp: - (KJS::SourceStream::operator<<): - -2008-01-24 Steve Falkenburg - - Build fix. - - * JavaScriptCore.vcproj/JavaScriptCore.sln: - -2008-01-24 Steve Falkenburg - - Build fix. - - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: - -2008-01-24 Michael Goddard - - Reviewed by Simon. - - Fix QDateTime to JS Date conversion. - Several conversion errors (some UTC related, some month - offset related) and the conversion distance for Date - to DateTime conversion weights were fixed (it should never - be better to convert a JS Number into a Date rather than - an int). - - * bindings/qt/qt_runtime.cpp: - (KJS::Bindings::convertValueToQVariant): - (KJS::Bindings::convertQVariantToValue): - -2008-01-24 Michael Goddard - - Reviewed by Simon. - - Add support for calling QObjects. - Add support for invokeDefaultMethod (via a call to - a specific slot), and also allow using it as a - constructor, like QtScript. - - - * bindings/qt/qt_class.cpp: - (KJS::Bindings::QtClass::fallbackObject): - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtRuntimeObjectImp::construct): - (KJS::Bindings::QtInstance::QtInstance): - (KJS::Bindings::QtInstance::~QtInstance): - (KJS::Bindings::QtInstance::implementsCall): - (KJS::Bindings::QtInstance::invokeDefaultMethod): - * bindings/qt/qt_instance.h: - * bindings/qt/qt_runtime.cpp: - (KJS::Bindings::findMethodIndex): - (KJS::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): - (KJS::Bindings::QtRuntimeMetaMethod::callAsFunction): - * bindings/qt/qt_runtime.h: - -2008-01-24 Michael Goddard - - Reviewed by Simon. - - Code style cleanups. - Add spaces before/after braces in inline function. - - * bindings/qt/qt_instance.h: - -2008-01-24 Michael Goddard - - Reviewed by Simon. - - Code style cleanups. - Remove spaces and unneeded declared parameter names. - - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtRuntimeObjectImp::removeFromCache): - -2008-01-24 Michael Goddard - - Reviewed by Simon. - - Clear stale RuntimeObjectImps. - Since other objects can have refs to the QtInstance, - we can't rely on the QtInstance being deleted when the - RuntimeObjectImp is invalidate or deleted. This - could result in a stale JSObject being returned for - a valid Instance. - - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp): - (KJS::Bindings::QtRuntimeObjectImp::~QtRuntimeObjectImp): - (KJS::Bindings::QtRuntimeObjectImp::invalidate): - (KJS::Bindings::QtRuntimeObjectImp::removeFromCache): - (KJS::Bindings::QtInstance::getRuntimeObject): - * bindings/runtime.cpp: - (KJS::Bindings::Instance::createRuntimeObject): - * bindings/runtime.h: - -2008-01-23 Alp Toker - - Rubber-stamped by Mark Rowe. - - Remove whitespace after -I in automake include lists. - - * GNUmakefile.am: - -2008-01-23 Michael Goddard - - Reviewed by Lars Knoll . - - Reworked the JavaScriptCore Qt bindings: - - * Add initial support for string and variant arrays, as well - as sub QObjects in the JS bindings. - - * Don't expose fields marked as not scriptable by moc. - - * Add support for dynamic properties and accessing named - QObject children of an object (like QtScript and older - IE DOM style JS). - * Add support for custom toString methods. - - * Fine tune some bindings to be closer to QtScript. - Make void functions return undefined, and empty/ - null QStrings return a zero length string. - - * Create framework for allowing more direct method calls. - Since RuntimeMethod doesn't allow us to add additional - methods/properties to a function, add these classes. - Start prototyping object.signal.connect(...). - - * Add signal support to the Qt bindings. - Allow connecting to signals (object.signal.connect(slot)), - disconnecting, and emitting signals. Currently chooses - the first signal that matches the name, so this will need - improvement. - - * Add property names, and resolve signals closer to use. - Enumerating properties now returns some of the Qt properties - and signals. Slots and methods aren't quite present. Also, - resolve signal connections etc. closer to the time of use, so - we can do more dynamic resolution based on argument type etc. - Still picks the first one with the same name, at the moment. - - * Make signature comparison code consistent. - Use the same code for checking meta signatures in - the method and fallback getters, and avoid a - QByteArray construction when we can. - - * Fix minor memory leak, and handle pointers better. - Delete the private object in the dtors, and use RefPtrs - for holding Instances etc. - - * Handle method lookup better. - Allow invocation time method lookup based on the arguments, - which is closer to QtScript behaviour. Also, cache the - method lists and delete them in the QtClass dtor (stops - a memory leak). - - * Improve JS to Qt data type conversions. - Add some support for Date & RegExp JS objects, - and provide some metrics on the quality of the - conversion. - - * A couple of fixes for autotest failures. - Better support for converting lists, read/write only - QMetaProperty support, modified slot search order...) - - * bindings/qt/qt_class.cpp: - (KJS::Bindings::QtClass::QtClass): - (KJS::Bindings::QtClass::~QtClass): - (KJS::Bindings::QtClass::name): - (KJS::Bindings::QtClass::fallbackObject): - (KJS::Bindings::QtClass::methodsNamed): - (KJS::Bindings::QtClass::fieldNamed): - * bindings/qt/qt_class.h: - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtInstance::QtInstance): - (KJS::Bindings::QtInstance::~QtInstance): - (KJS::Bindings::QtInstance::getRuntimeObject): - (KJS::Bindings::QtInstance::getClass): - (KJS::Bindings::QtInstance::implementsCall): - (KJS::Bindings::QtInstance::getPropertyNames): - (KJS::Bindings::QtInstance::invokeMethod): - (KJS::Bindings::QtInstance::invokeDefaultMethod): - (KJS::Bindings::QtInstance::stringValue): - (KJS::Bindings::QtInstance::booleanValue): - (KJS::Bindings::QtInstance::valueOf): - (KJS::Bindings::QtField::name): - (KJS::Bindings::QtField::valueFromInstance): - (KJS::Bindings::QtField::setValueToInstance): - * bindings/qt/qt_instance.h: - (KJS::Bindings::QtInstance::getBindingLanguage): - (KJS::Bindings::QtInstance::getObject): - * bindings/qt/qt_runtime.cpp: - (KJS::Bindings::QWKNoDebug::QWKNoDebug): - (KJS::Bindings::QWKNoDebug::~QWKNoDebug): - (KJS::Bindings::QWKNoDebug::operator<<): - (KJS::Bindings::): - (KJS::Bindings::valueRealType): - (KJS::Bindings::convertValueToQVariant): - (KJS::Bindings::convertQVariantToValue): - (KJS::Bindings::QtRuntimeMethod::QtRuntimeMethod): - (KJS::Bindings::QtRuntimeMethod::~QtRuntimeMethod): - (KJS::Bindings::QtRuntimeMethod::codeType): - (KJS::Bindings::QtRuntimeMethod::execute): - (KJS::Bindings::QtRuntimeMethodData::~QtRuntimeMethodData): - (KJS::Bindings::QtRuntimeMetaMethodData::~QtRuntimeMetaMethodData): - (KJS::Bindings::QtRuntimeConnectionMethodData::~QtRuntimeConnectionMethodData): - (KJS::Bindings::QtMethodMatchType::): - (KJS::Bindings::QtMethodMatchType::QtMethodMatchType): - (KJS::Bindings::QtMethodMatchType::kind): - (KJS::Bindings::QtMethodMatchType::isValid): - (KJS::Bindings::QtMethodMatchType::isVariant): - (KJS::Bindings::QtMethodMatchType::isMetaType): - (KJS::Bindings::QtMethodMatchType::isUnresolved): - (KJS::Bindings::QtMethodMatchType::isMetaEnum): - (KJS::Bindings::QtMethodMatchType::enumeratorIndex): - (KJS::Bindings::QtMethodMatchType::variant): - (KJS::Bindings::QtMethodMatchType::metaType): - (KJS::Bindings::QtMethodMatchType::metaEnum): - (KJS::Bindings::QtMethodMatchType::unresolved): - (KJS::Bindings::QtMethodMatchType::typeId): - (KJS::Bindings::QtMethodMatchType::name): - (KJS::Bindings::QtMethodMatchData::QtMethodMatchData): - (KJS::Bindings::QtMethodMatchData::isValid): - (KJS::Bindings::QtMethodMatchData::firstUnresolvedIndex): - (KJS::Bindings::indexOfMetaEnum): - (KJS::Bindings::findMethodIndex): - (KJS::Bindings::findSignalIndex): - (KJS::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): - (KJS::Bindings::QtRuntimeMetaMethod::mark): - (KJS::Bindings::QtRuntimeMetaMethod::callAsFunction): - (KJS::Bindings::QtRuntimeMetaMethod::getOwnPropertySlot): - (KJS::Bindings::QtRuntimeMetaMethod::lengthGetter): - (KJS::Bindings::QtRuntimeMetaMethod::connectGetter): - (KJS::Bindings::QtRuntimeMetaMethod::disconnectGetter): - (KJS::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): - (KJS::Bindings::QtRuntimeConnectionMethod::callAsFunction): - (KJS::Bindings::QtRuntimeConnectionMethod::getOwnPropertySlot): - (KJS::Bindings::QtRuntimeConnectionMethod::lengthGetter): - (KJS::Bindings::QtConnectionObject::QtConnectionObject): - (KJS::Bindings::QtConnectionObject::~QtConnectionObject): - (KJS::Bindings::QtConnectionObject::metaObject): - (KJS::Bindings::QtConnectionObject::qt_metacast): - (KJS::Bindings::QtConnectionObject::qt_metacall): - (KJS::Bindings::QtConnectionObject::execute): - (KJS::Bindings::QtConnectionObject::match): - (KJS::Bindings::::QtArray): - (KJS::Bindings::::~QtArray): - (KJS::Bindings::::rootObject): - (KJS::Bindings::::setValueAt): - (KJS::Bindings::::valueAt): - * bindings/qt/qt_runtime.h: - (KJS::Bindings::QtField::): - (KJS::Bindings::QtField::QtField): - (KJS::Bindings::QtField::fieldType): - (KJS::Bindings::QtMethod::QtMethod): - (KJS::Bindings::QtMethod::name): - (KJS::Bindings::QtMethod::numParameters): - (KJS::Bindings::QtArray::getLength): - (KJS::Bindings::QtRuntimeMethod::d_func): - (KJS::Bindings::QtRuntimeMetaMethod::d_func): - (KJS::Bindings::QtRuntimeConnectionMethod::d_func): - (KJS::Bindings::): - * bindings/runtime.cpp: - (KJS::Bindings::Instance::createBindingForLanguageInstance): - (KJS::Bindings::Instance::createRuntimeObject): - (KJS::Bindings::Instance::reallyCreateRuntimeObject): - * bindings/runtime.h: - -2008-01-22 Anders Carlsson - - Reviewed by Darin and Adam. - - - div element on microsoft site has wrong left offset. - - Return true even if NPN_GetProperty returns null or undefined. This matches Firefox - (and is what the Silverlight plug-in expects). - - * bindings/NP_jsobject.cpp: - (_NPN_GetProperty): - -2008-01-21 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=16909 - REGRESSION: Amazon.com crash (ActivationImp) - - (and a bunch of other crashes) - - Plus, a .7% SunSpider speedup to boot. - - Replaced the buggy currentExec and savedExec mechanisms with an - explicit ExecState stack. - - * kjs/collector.cpp: - (KJS::Collector::collect): Explicitly mark the ExecState stack. - - (KJS::Collector::reportOutOfMemoryToAllExecStates): Slight change in - behavior: We no longer throw an exception in any global ExecStates, - since global ExecStates are more like pseudo-ExecStates, and aren't - used for script execution. (It's unclear what would happen if you left - an exception waiting around in a global ExecState, but it probably - wouldn't be good.) - -2008-01-21 Jan Michael Alonzo - - Reviewed by Alp Toker. - - http://bugs.webkit.org/show_bug.cgi?id=16955 - Get errors when cross-compile webkit-gtk - - * GNUmakefile.am: removed ICU_CFLAGS - -2008-01-18 Kevin McCullough - - - Build fix. - - * kjs/ustring.h: - -2008-01-18 Kevin McCullough - - - Build fix. - - * kjs/ustring.cpp: - * kjs/ustring.h: - (KJS::UString::cost): - -2008-01-18 Kevin McCullough - - Reviewed by Geoff. - - - Correctly report cost of appended strings to trigger GC. - - * kjs/ustring.cpp: - (KJS::UString::Rep::create): - (KJS::UString::UString): Don't create unnecssary objects. - (KJS::UString::cost): Report cost if necessary but also keep track of - reported cost. - * kjs/ustring.h: - -2008-01-18 Simon Hausmann - - Reviewed by Holger. - - Fix return type conversions from Qt slots to JS values. - - This also fixes fast/dom/open-and-close-by-DOM.html, which called - layoutTestController.windowCount(). - - When constructing the QVariant that holds the return type we cannot - use the QVarian(Type) constuctor as that will create a null variant. - We have to use the QVariant(Type, void *) constructor instead, just - like in QMetaObject::read() for example. - - - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtInstance::getRuntimeObject): - -2008-01-18 Prasanth Ullattil - - Reviewed by Simon Hausmann . - - Fix compilation on Win64(2): Implemented currentThreadStackBase on X86-64 on Windows - - - * kjs/collector.cpp: - (KJS::Collector::heapAllocate): - -2008-01-18 Prasanth Ullattil - - Reviewed by Simon Hausmann . - - Fix compilation on Win64(1): Define WTF_PLATFORM_X86_64 correctly on Win64. - - - * wtf/Platform.h: - -2008-01-17 Antti Koivisto - - Fix Windows build. - - * kjs/regexp_object.cpp: - (KJS::regExpProtoFuncToString): - -2008-01-16 Sam Weinig - - Reviewed by Darin. - - Fix for http://bugs.webkit.org/show_bug.cgi?id=16901 - Convert remaining JS function objects to use the new PrototypeFunction class - - - Moves Boolean, Function, RegExp, Number, Object and Global functions to their - own static function implementations so that they can be used with the - PrototypeFunction class. SunSpider says this is 1.003x as fast. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::reset): - * kjs/array_object.h: - * kjs/bool_object.cpp: - (KJS::BooleanInstance::BooleanInstance): - (KJS::BooleanPrototype::BooleanPrototype): - (KJS::booleanProtoFuncToString): - (KJS::booleanProtoFuncValueOf): - (KJS::BooleanObjectImp::BooleanObjectImp): - (KJS::BooleanObjectImp::implementsConstruct): - (KJS::BooleanObjectImp::construct): - (KJS::BooleanObjectImp::callAsFunction): - * kjs/bool_object.h: - (KJS::BooleanInstance::classInfo): - * kjs/error_object.cpp: - (KJS::ErrorPrototype::ErrorPrototype): - (KJS::errorProtoFuncToString): - * kjs/error_object.h: - * kjs/function.cpp: - (KJS::globalFuncEval): - (KJS::globalFuncParseInt): - (KJS::globalFuncParseFloat): - (KJS::globalFuncIsNaN): - (KJS::globalFuncIsFinite): - (KJS::globalFuncDecodeURI): - (KJS::globalFuncDecodeURIComponent): - (KJS::globalFuncEncodeURI): - (KJS::globalFuncEncodeURIComponent): - (KJS::globalFuncEscape): - (KJS::globalFuncUnEscape): - (KJS::globalFuncKJSPrint): - (KJS::PrototypeFunction::PrototypeFunction): - * kjs/function.h: - * kjs/function_object.cpp: - (KJS::FunctionPrototype::FunctionPrototype): - (KJS::functionProtoFuncToString): - (KJS::functionProtoFuncApply): - (KJS::functionProtoFuncCall): - * kjs/function_object.h: - * kjs/number_object.cpp: - (KJS::NumberPrototype::NumberPrototype): - (KJS::numberProtoFuncToString): - (KJS::numberProtoFuncToLocaleString): - (KJS::numberProtoFuncValueOf): - (KJS::numberProtoFuncToFixed): - (KJS::numberProtoFuncToExponential): - (KJS::numberProtoFuncToPrecision): - * kjs/number_object.h: - (KJS::NumberInstance::classInfo): - (KJS::NumberObjectImp::classInfo): - (KJS::NumberObjectImp::): - * kjs/object_object.cpp: - (KJS::ObjectPrototype::ObjectPrototype): - (KJS::objectProtoFuncValueOf): - (KJS::objectProtoFuncHasOwnProperty): - (KJS::objectProtoFuncIsPrototypeOf): - (KJS::objectProtoFuncDefineGetter): - (KJS::objectProtoFuncDefineSetter): - (KJS::objectProtoFuncLookupGetter): - (KJS::objectProtoFuncLookupSetter): - (KJS::objectProtoFuncPropertyIsEnumerable): - (KJS::objectProtoFuncToLocaleString): - (KJS::objectProtoFuncToString): - * kjs/object_object.h: - * kjs/regexp_object.cpp: - (KJS::RegExpPrototype::RegExpPrototype): - (KJS::regExpProtoFuncTest): - (KJS::regExpProtoFuncExec): - (KJS::regExpProtoFuncCompile): - (KJS::regExpProtoFuncToString): - * kjs/regexp_object.h: - -2008-01-16 Cameron Zwarich - - Reviewed by Maciej & Darin. - - Fixes Bug 16868: Gmail crash - and Bug 16871: Crash when loading apple.com/startpage - - - - - - - - Adds ActivationImp tear-off for cross-window eval() and fixes an - existing garbage collection issue exposed by the ActivationImp tear-off - patch (r29425) that can occur when an ExecState's m_callingExec is - different than its m_savedExec. - - * kjs/ExecState.cpp: - (KJS::ExecState::mark): - * kjs/function.cpp: - (KJS::GlobalFuncImp::callAsFunction): - -2008-01-16 Sam Weinig - - Reviewed by Oliver. - - Clean up MathObjectImp, it needed a little scrubbing. - - * kjs/math_object.cpp: - (KJS::MathObjectImp::MathObjectImp): - (KJS::MathObjectImp::getOwnPropertySlot): - (KJS::MathObjectImp::getValueProperty): - (KJS::mathProtoFuncACos): - (KJS::mathProtoFuncASin): - (KJS::mathProtoFuncATan): - (KJS::mathProtoFuncATan2): - (KJS::mathProtoFuncCos): - (KJS::mathProtoFuncExp): - (KJS::mathProtoFuncLog): - (KJS::mathProtoFuncSin): - (KJS::mathProtoFuncSqrt): - (KJS::mathProtoFuncTan): - * kjs/math_object.h: - (KJS::MathObjectImp::classInfo): - (KJS::MathObjectImp::): - -2008-01-16 Sam Weinig - - Reviewed by Geoffrey Garen. - - Rename Lexer variable bol to atLineStart. - - * kjs/lexer.cpp: - (KJS::Lexer::Lexer): - (KJS::Lexer::setCode): - (KJS::Lexer::nextLine): - (KJS::Lexer::lex): - * kjs/lexer.h: - -2008-01-16 Sam Weinig - - Reviewed by Geoffrey Garen and Anders Carlsson. - - Remove uses of KJS_PURE_ECMA as we don't ever build with it defined, - and we have many features that are not included in the ECMA spec. - - * kjs/lexer.cpp: - (KJS::Lexer::Lexer): - (KJS::Lexer::setCode): - (KJS::Lexer::nextLine): - (KJS::Lexer::lex): - * kjs/lexer.h: - * kjs/string_object.cpp: - * kjs/string_object.h: - -2008-01-15 Sam Weinig - - Reviewed by Geoffrey Garen. - - Fix r27608 introduced a 20% increase in JS binary size, 4% increase in WebCore binary size - - - This changes the way JS functions that use Lookup tables are handled. Instead of using - one class per function, which allowed specialization of the virtual callAsFunction - method, we now use one class, PrototypeFunction, which takes a pointer to a static - function to use as the implementation. This significantly decreases the binary size - of JavaScriptCore (about 145k on an Intel only build) while still keeping some of the - speedup r27608 garnered (SunSpider says this is 1.005x as slow, which should leave some - wiggle room from the original 1% speedup) and keeps the functions implementations in separate - functions to help with optimizations. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/array_object.cpp: - (KJS::arrayProtoFuncToString): - (KJS::arrayProtoFuncToLocaleString): - (KJS::arrayProtoFuncJoin): - (KJS::arrayProtoFuncConcat): - (KJS::arrayProtoFuncPop): - (KJS::arrayProtoFuncPush): - (KJS::arrayProtoFuncReverse): - (KJS::arrayProtoFuncShift): - (KJS::arrayProtoFuncSlice): - (KJS::arrayProtoFuncSort): - (KJS::arrayProtoFuncSplice): - (KJS::arrayProtoFuncUnShift): - (KJS::arrayProtoFuncFilter): - (KJS::arrayProtoFuncMap): - (KJS::arrayProtoFuncEvery): - (KJS::arrayProtoFuncForEach): - (KJS::arrayProtoFuncSome): - (KJS::arrayProtoFuncIndexOf): - (KJS::arrayProtoFuncLastIndexOf): - * kjs/array_object.h: - * kjs/date_object.cpp: - (KJS::DatePrototype::getOwnPropertySlot): - (KJS::dateProtoFuncToString): - (KJS::dateProtoFuncToUTCString): - (KJS::dateProtoFuncToDateString): - (KJS::dateProtoFuncToTimeString): - (KJS::dateProtoFuncToLocaleString): - (KJS::dateProtoFuncToLocaleDateString): - (KJS::dateProtoFuncToLocaleTimeString): - (KJS::dateProtoFuncValueOf): - (KJS::dateProtoFuncGetTime): - (KJS::dateProtoFuncGetFullYear): - (KJS::dateProtoFuncGetUTCFullYear): - (KJS::dateProtoFuncToGMTString): - (KJS::dateProtoFuncGetMonth): - (KJS::dateProtoFuncGetUTCMonth): - (KJS::dateProtoFuncGetDate): - (KJS::dateProtoFuncGetUTCDate): - (KJS::dateProtoFuncGetDay): - (KJS::dateProtoFuncGetUTCDay): - (KJS::dateProtoFuncGetHours): - (KJS::dateProtoFuncGetUTCHours): - (KJS::dateProtoFuncGetMinutes): - (KJS::dateProtoFuncGetUTCMinutes): - (KJS::dateProtoFuncGetSeconds): - (KJS::dateProtoFuncGetUTCSeconds): - (KJS::dateProtoFuncGetMilliSeconds): - (KJS::dateProtoFuncGetUTCMilliseconds): - (KJS::dateProtoFuncGetTimezoneOffset): - (KJS::dateProtoFuncSetTime): - (KJS::dateProtoFuncSetMilliSeconds): - (KJS::dateProtoFuncSetUTCMilliseconds): - (KJS::dateProtoFuncSetSeconds): - (KJS::dateProtoFuncSetUTCSeconds): - (KJS::dateProtoFuncSetMinutes): - (KJS::dateProtoFuncSetUTCMinutes): - (KJS::dateProtoFuncSetHours): - (KJS::dateProtoFuncSetUTCHours): - (KJS::dateProtoFuncSetDate): - (KJS::dateProtoFuncSetUTCDate): - (KJS::dateProtoFuncSetMonth): - (KJS::dateProtoFuncSetUTCMonth): - (KJS::dateProtoFuncSetFullYear): - (KJS::dateProtoFuncSetUTCFullYear): - (KJS::dateProtoFuncSetYear): - (KJS::dateProtoFuncGetYear): - * kjs/date_object.h: - * kjs/function.cpp: - (KJS::PrototypeFunction::PrototypeFunction): - (KJS::PrototypeFunction::callAsFunction): - * kjs/function.h: - * kjs/lookup.h: - (KJS::HashEntry::): - (KJS::staticFunctionGetter): - * kjs/math_object.cpp: - (KJS::mathProtoFuncAbs): - (KJS::mathProtoFuncACos): - (KJS::mathProtoFuncASin): - (KJS::mathProtoFuncATan): - (KJS::mathProtoFuncATan2): - (KJS::mathProtoFuncCeil): - (KJS::mathProtoFuncCos): - (KJS::mathProtoFuncExp): - (KJS::mathProtoFuncFloor): - (KJS::mathProtoFuncLog): - (KJS::mathProtoFuncMax): - (KJS::mathProtoFuncMin): - (KJS::mathProtoFuncPow): - (KJS::mathProtoFuncRandom): - (KJS::mathProtoFuncRound): - (KJS::mathProtoFuncSin): - (KJS::mathProtoFuncSqrt): - (KJS::mathProtoFuncTan): - * kjs/math_object.h: - * kjs/string_object.cpp: - (KJS::stringProtoFuncToString): - (KJS::stringProtoFuncValueOf): - (KJS::stringProtoFuncCharAt): - (KJS::stringProtoFuncCharCodeAt): - (KJS::stringProtoFuncConcat): - (KJS::stringProtoFuncIndexOf): - (KJS::stringProtoFuncLastIndexOf): - (KJS::stringProtoFuncMatch): - (KJS::stringProtoFuncSearch): - (KJS::stringProtoFuncReplace): - (KJS::stringProtoFuncSlice): - (KJS::stringProtoFuncSplit): - (KJS::stringProtoFuncSubstr): - (KJS::stringProtoFuncSubstring): - (KJS::stringProtoFuncToLowerCase): - (KJS::stringProtoFuncToUpperCase): - (KJS::stringProtoFuncToLocaleLowerCase): - (KJS::stringProtoFuncToLocaleUpperCase): - (KJS::stringProtoFuncLocaleCompare): - (KJS::stringProtoFuncBig): - (KJS::stringProtoFuncSmall): - (KJS::stringProtoFuncBlink): - (KJS::stringProtoFuncBold): - (KJS::stringProtoFuncFixed): - (KJS::stringProtoFuncItalics): - (KJS::stringProtoFuncStrike): - (KJS::stringProtoFuncSub): - (KJS::stringProtoFuncSup): - (KJS::stringProtoFuncFontcolor): - (KJS::stringProtoFuncFontsize): - (KJS::stringProtoFuncAnchor): - (KJS::stringProtoFuncLink): - * kjs/string_object.h: - -2008-01-15 Geoffrey Garen - - Reviewed by Adam Roben. - - Some tweaks to our headerdoc, suggested by David Gatwood on the docs - team. - - * API/JSBase.h: - * API/JSObjectRef.h: - * API/JSStringRef.h: - * API/JSValueRef.h: - -2008-01-15 Alp Toker - - Rubber-stamped by Anders. - - Make the HTTP backend configurable in the GTK+ port. curl is currently - the only option. - - * wtf/Platform.h: Don't hard-code WTF_USE_CURL for GTK - -2008-01-15 Sam Weinig - - Reviewed by Beth Dakin. - - Remove unneeded variable. - - * kjs/string_object.cpp: - (KJS::StringProtoFuncSubstr::callAsFunction): - -2008-01-14 Steve Falkenburg - - Use shared vsprops for most vcproj properties. - - Reviewed by Darin. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add missing Debug_Internal config. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add missing Debug_Internal config. - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2008-01-14 Adam Roben - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added - some headers that were missing from the vcproj so their contents will - be included in Find in Files. - -2008-01-14 Adam Roben - - Fix Bug 16871: Crash when loading apple.com/startpage - - - - - Patch written by Darin, reviewed by me. - - * kjs/ExecState.cpp: - (KJS::ExecState::mark): Call ActivationImp::markChildren if our - m_activation is on the stack. This is what ScopeChain::mark also does, - but apparently in some cases it's possible for an ExecState's - ActivationImp to not be in any ScopeChain. - -2008-01-14 Kevin McCullough - - Reviewed by Oliver. - - - REGRESSION (Leopard-ToT): Endless loading loop - trying to view techreport.com comments - - We need to set values in the map, because if they are already in the - map they will not be reset when we use add(). - - * kjs/array_instance.cpp: - (KJS::ArrayInstance::put): - -2008-01-14 Darin Adler - - Reviewed by Adam. - - - re-speed-up the page load test (my StringImpl change slowed it down) - - * wtf/RefCounted.h: - (WTF::RefCounted::RefCounted): Allow derived classes to start with a reference - count other than 0. Eventually everyone will want to start with a 1. This is a - staged change. For now, there's a default of 0, and you can specify 1. Later, - there will be no default and everyone will have to specify. And then later, there - will be a default of 1. Eventually, we can take away even the option of starting - with 0! - - * wtf/Vector.h: - (WTF::Vector::Vector): Sped up creation of non-empty vectors by removing the - overhead of first constructing something empty and then calling resize. - (WTF::Vector::clear): Sped up the common case of calling clear on an empty - vector by adding a check for that case. - (WTF::Vector::releaseBuffer): Marked this function inline and removed a branch - in the case of vectors with no inline capacity (normal vectors) by leaving out - the code to copy the inline buffer in that case. - -2008-01-14 Alexey Proskuryakov - - Reviewed by David Kilzer. - - http://bugs.webkit.org/show_bug.cgi?id=16787 - array.splice() with 1 element not working - - Test: fast/js/array-splice.html - - * kjs/array_object.cpp: - (KJS::ArrayProtoFuncSplice::callAsFunction): Implement this Mozilla extension, and fix - some other edge cases. - -2008-01-13 Steve Falkenburg - - Share common files across projects. - - Unify vsprops files - Debug: common.vsprops, debug.vsprops - Debug_Internal: common.vsprops, debug.vsprops, debug_internal.vsprops - Release: common.vsprops, release.vsprops - - Shared properties can go into common.vsprops, shared debug settings can go into debug.vsprops. - debug_internal.vsprops will be mostly empty except for file path prefix modifiers. - - Reviewed by Adam Roben. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/debug.vsprops: Removed. - * JavaScriptCore.vcproj/debug_internal.vsprops: Removed. - * JavaScriptCore.vcproj/release.vsprops: Removed. - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2008-01-13 Marius Bugge Monsen - - Contributions and review by Adriaan de Groot, - Simon Hausmann, Eric Seidel, and Darin Adler. - - - http://bugs.webkit.org/show_bug.cgi?id=16590 - Compilation fixes for Solaris. - - * kjs/DateMath.h: - (KJS::GregorianDateTime::GregorianDateTime): Use the WIN_OS code path - for SOLARIS too, presumably because Solaris also lacks the tm_gtoff and tm_zone - fields. - (KJS::GregorianDateTime::operator tm): Ditto. - - * kjs/collector.cpp: - (KJS::currentThreadStackBase): Use thr_stksegment on Solaris. - - * wtf/MathExtras.h: - (isfinite): Implement for Solaris. - (isinf): Ditto. - (signbit): Ditto. But this one is wrong, so I added a FIXME. - - * wtf/Platform.h: Define PLATFORM(SOLARIS) when "sun" or "__sun" is defined. - -2008-01-13 Michael Goddard - - Reviewed by Anders Carlsson. - - Add binding language type to Instance. - Allows runtime determination of the type of an - Instance, to allow safe casting. Doesn't actually - add any safe casting yet, though. - - Add a helper function to get an Instance from a JSObject*. - Given an object and the expected binding language, see if - the JSObject actually wraps an Instance of the given type - and return it. Otherwise return 0. - - Move RuntimeObjectImp creations into Instance. - Make the ctor protected, and Instance a friend class, so - that all creation of RuntimeObjectImps goes through - one place. - - Remove copy ctor/assignment operator for QtInstance. - Instance itself is Noncopyable, so QtInstance doesn't - need to have these. - - Add caching for QtInstance and associated RuntimeObjectImps. - Push any dealings with QtLanguage bindings into QtInstance, - and cache them there, rather than in the Instance layer. Add - a QtRuntimeObjectImp to help with caching. - - * JavaScriptCore.exp: - * bindings/c/c_instance.h: - * bindings/jni/jni_instance.h: - * bindings/objc/objc_instance.h: - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp): - (KJS::Bindings::QtRuntimeObjectImp::~QtRuntimeObjectImp): - (KJS::Bindings::QtRuntimeObjectImp::invalidate): - (KJS::Bindings::QtRuntimeObjectImp::removeFromCache): - (KJS::Bindings::QtInstance::QtInstance): - (KJS::Bindings::QtInstance::~QtInstance): - (KJS::Bindings::QtInstance::getQtInstance): - (KJS::Bindings::QtInstance::getRuntimeObject): - * bindings/qt/qt_instance.h: - (KJS::Bindings::QtInstance::getBindingLanguage): - * bindings/runtime.cpp: - (KJS::Bindings::Instance::createBindingForLanguageInstance): - (KJS::Bindings::Instance::createRuntimeObject): - (KJS::Bindings::Instance::getInstance): - * bindings/runtime.h: - * bindings/runtime_object.h: - (KJS::RuntimeObjectImp::getInternalInstance): - -2008-01-12 Alp Toker - - Reviewed by Mark Rowe. - - Hide non-public symbols in GTK+/autotools release builds. - - * GNUmakefile.am: - -2008-01-12 Cameron Zwarich - - Reviewed by Mark Rowe. - - Fix http://bugs.webkit.org/show_bug.cgi?id=16852 - Fixes leaking of ActivationStackNode objects. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::deleteActivationStack): - (KJS::JSGlobalObject::~JSGlobalObject): - (KJS::JSGlobalObject::init): - (KJS::JSGlobalObject::reset): - * kjs/JSGlobalObject.h: - -2008-01-12 Darin Adler - - - try to fix Qt Windows build - - * pcre/dftables: Remove reliance on the list form of Perl pipes. - -2008-01-12 Darin Adler - - - try to fix Qt build - - * kjs/function.cpp: Added include of scope_chain_mark.h. - * kjs/scope_chain_mark.h: Added multiple-include guards. - -2008-01-12 Mark Rowe - - Another Windows build fix. - - * kjs/Activation.h: - -2008-01-12 Mark Rowe - - Attempted Windows build fix. Use struct consistently when forward-declaring - ActivationStackNode and StackActivation. - - * kjs/Activation.h: - * kjs/JSGlobalObject.h: - -2008-01-12 Cameron Zwarich - - Reviewed by Maciej. - - Fixes a problem with the ActivationImp tear-off patch (r29425) where - some of the calls to JSGlobalObject::tearOffActivation() were using - the wrong test to determine whether it should leave a relic behind. - - * kjs/function.cpp: - (KJS::FunctionImp::argumentsGetter): - (KJS::ActivationImp::getOwnPropertySlot): - -2008-01-11 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed REGRESSION (r28880-r28886): Global - variable access (16644) - - This bug was caused by var declarations shadowing built-in properties of - the global object. - - To match Firefox, we've decided that var declarations will never shadow - built-in properties of the global object or its prototypes. We used to - behave more like IE, which allows shadowing, but walking that line got - us into trouble with websites that sent us down the Firefox codepath. - - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTableGet): New code to support calling - hasProperty before the variable object is fully initialized (so you - can call it during initialization). - - * kjs/nodes.cpp:. - (KJS::ProgramNode::initializeSymbolTable): Always do a full hasProperty - check when looking for duplicates, not getDirect, since it only checks - the property map, and not hasOwnProperty, since it doesn't check - prototypes. - (KJS::EvalNode::processDeclarations): ditto - - * kjs/property_slot.h: - (KJS::PropertySlot::ungettableGetter): Best function name evar. - -2008-01-11 Cameron Zwarich - - Reviewed by Maciej. - - Optimized ActivationImp allocation, so that activation records are now - first allocated on an explicitly managed stack and only heap allocated - when necessary. Roughly a 5% improvement on SunSpider, and a larger - improvement on benchmarks that use more function calls. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/Activation.h: Added. - (KJS::ActivationImp::ActivationData::ActivationData): - (KJS::ActivationImp::ActivationImp): - (KJS::ActivationImp::classInfo): - (KJS::ActivationImp::isActivationObject): - (KJS::ActivationImp::isOnStack): - (KJS::ActivationImp::d): - (KJS::StackActivation::StackActivation): - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - (KJS::ExecState::~ExecState): - * kjs/ExecState.h: - (KJS::ExecState::replaceScopeChainTop): - (KJS::ExecState::setActivationObject): - (KJS::ExecState::setLocalStorage): - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::reset): - (KJS::JSGlobalObject::pushActivation): - (KJS::JSGlobalObject::checkActivationCount): - (KJS::JSGlobalObject::popActivationHelper): - (KJS::JSGlobalObject::popActivation): - (KJS::JSGlobalObject::tearOffActivation): - * kjs/JSGlobalObject.h: - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::JSVariableObjectData::JSVariableObjectData): - (KJS::JSVariableObject::JSVariableObject): - * kjs/function.cpp: - (KJS::FunctionImp::argumentsGetter): - (KJS::ActivationImp::ActivationImp): - (KJS::ActivationImp::~ActivationImp): - (KJS::ActivationImp::init): - (KJS::ActivationImp::getOwnPropertySlot): - (KJS::ActivationImp::markHelper): - (KJS::ActivationImp::mark): - (KJS::ActivationImp::ActivationData::ActivationData): - (KJS::GlobalFuncImp::callAsFunction): - * kjs/function.h: - * kjs/nodes.cpp: - (KJS::PostIncResolveNode::evaluate): - (KJS::PostDecResolveNode::evaluate): - (KJS::PreIncResolveNode::evaluate): - (KJS::PreDecResolveNode::evaluate): - (KJS::ReadModifyResolveNode::evaluate): - (KJS::AssignResolveNode::evaluate): - (KJS::WithNode::execute): - (KJS::TryNode::execute): - (KJS::FunctionBodyNode::processDeclarations): - (KJS::FuncExprNode::evaluate): - * kjs/object.h: - * kjs/scope_chain.h: - (KJS::ScopeChain::replace): - * kjs/scope_chain_mark.h: Added. - (KJS::ScopeChain::mark): - -2008-01-11 Simon Hausmann - - Reviewed by Mark Rowe. - - Fix the (clean) qmake build. For generating chartables.c we don't - depend on a separate input source file anymore, the dftables perl - script is enough. So use that instead as value for the .input - variable, to ensure that qmake also generates a rule to call dftables. - - * pcre/pcre.pri: - -2008-01-10 Geoffrey Garen - - Reviewed by John Sullivan. - - Fixed some world leak reports: - * PLT complains about world leak of 1 JavaScript - Interpreter after running cvs-base suite - - * PLT complains about world leak if browser - window is open when PLT starts - - * kjs/collector.h: Added the ability to distinguish between global - objects and GC-protected global objects, since we only consider the - latter to be world leaks. - * kjs/collector.cpp: - -2008-01-11 Mark Rowe - - Silence qmake warning about ctgen lacking input. - - Rubber-stamped by Alp Toker. - - * pcre/pcre.pri: - -2008-01-10 David Kilzer - - dftables should be rewritten as a script - - - - - Reviewed by Darin. - - Rewrote the dftables utility in Perl. Attempted to switch all - build systems to call the script directly instead of building - a binary first. Only the Xcode build was able to be tested. - - * DerivedSources.make: Added pcre directory to VPATH and changed - to invoke dftables directly. - * GNUmakefile.am: Removed build information and changed to invoke - dftables directly. - * JavaScriptCore.vcproj/JavaScriptCore.sln: Removed reference to - dftables project. - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Ditto. - * JavaScriptCore.vcproj/dftables: Removed. - * JavaScriptCore.vcproj/dftables/dftables.vcproj: Removed. - * JavaScriptCore.xcodeproj/project.pbxproj: Removed dftables target. - * jscore.bkl: Removed dftables executable definition. - * pcre/dftables: Copied from JavaScriptCore/pcre/dftables.cpp. - * pcre/dftables.cpp: Removed. - * pcre/dftables.pro: Removed. - * pcre/pcre.pri: Removed references to dftables.cpp and changed to - invoke dftables directly. - -2008-01-10 Dan Bernstein - - Reviewed by Darin Adler. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16782 - REGRESSION(r29266): Reproducible crash in fast/replaced/image-map.html - - The crash resulted from a native object (DumpRenderTree's - EventSender) causing its wrapper to be invalidated (by clicking a - link that replaced the document in the window) and consequently - deallocated. The fix is to use RefPtrs to protect the native object - from deletion by self-invalidation. - - * bindings/runtime_method.cpp: - (RuntimeMethod::callAsFunction): - * bindings/runtime_object.cpp: - (RuntimeObjectImp::fallbackObjectGetter): - (RuntimeObjectImp::fieldGetter): - (RuntimeObjectImp::methodGetter): - (RuntimeObjectImp::put): - (RuntimeObjectImp::defaultValue): - (RuntimeObjectImp::callAsFunction): - -2008-01-07 Mark Rowe - - Reviewed by Maciej Stachowiak. - - Turn testIsInteger assertions into compile-time asserts and move them into HashTraits.h - where possible. - - * kjs/testkjs.cpp: - * wtf/HashTraits.h: - -2008-01-07 Nikolas Zimmermann - - Reviewed by Mark. - - Enable SVG_FONTS by default. - - * Configurations/JavaScriptCore.xcconfig: - -2008-01-07 Darin Adler - - Rubber stamped by David Kilzer. - - - get rid of empty fpconst.cpp - - * GNUmakefile.am: Remove fpconst.cpp. - * JavaScriptCore.pri: Ditto. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - * JavaScriptCoreSources.bkl: Ditto. - - * kjs/fpconst.cpp: Removed. - -2008-01-07 Darin Adler - - Reviewed by David Kilzer. - - - fix alignment problem with NaN and Inf globals - - * kjs/fpconst.cpp: Move the contents of this file from here back to - value.cpp. The reason this was in a separate file is that the DARWIN - version of this used a declaration of the globals with a different - type to avoid creating "init routines". That's no longer necessary for - DARWIN and was never necessary for the non-DARWIN code path. - To make this patch easy to merge, I didn't actually delete this file - yet. We'll do that in a separate changeset. - - * kjs/value.cpp: If C99's NAN and INFINITY are present, then use them, - othrewise use the union trick from fpconst.cpp. I think it would be - better to eliminate KJS::NaN and KJS::Inf and just use NAN and INFINITY - directly or std::numeric_limits::quiet_nan() and - std::numeric_limits::infinity(). But when I tried that, it - slowed down SunSpider. Someone else could do that cleanup if they - could do it without slowing down the engine. - -2008-01-07 Adam Roben - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added - JavaScript.h to the project. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - Copy JavaScript.h to WEBKITOUTPUTDIR. - -2008-01-07 Timothy Hatcher - - Reviewed by Darin. - - Fix Mac build. - - * API/JSNode.c: - * API/JSNode.h: - * API/JSNodeList.c: - * API/JSNodeList.h: - * API/JavaScript.h: - * API/JavaScriptCore.h: - * API/minidom.c: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-01-07 Alp Toker - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=16029 - JavaScriptCore.h is not suitable for platforms other than Mac OS X - - Introduce a new JavaScriptCore/JavaScript.h public API header. This - should be used by all new portable code using the JavaScriptCore API. - - JavaScriptCore/JavaScriptCore.h will remain for compatibility with - existing applications that depend on it including JSStringRefCF.h - which isn't portable. - - Also add minidom to the GTK+/autotools build since we can now support - it on all platforms. - - * API/JSNode.h: - * API/JSNodeList.h: - * API/JavaScript.h: Added. - * API/JavaScriptCore.h: - * ForwardingHeaders/JavaScriptCore/JavaScript.h: Added. - * GNUmakefile.am: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-01-06 Eric Seidel - - Reviewed by Sam. - - Abstract all DateObject.set* functions in preparation for fixing: - http://bugs.webkit.org/show_bug.cgi?id=16753 - - SunSpider had random changes here and there but was overall a wash. - - * kjs/date_object.cpp: - (KJS::fillStructuresUsingTimeArgs): - (KJS::setNewValueFromTimeArgs): - (KJS::setNewValueFromDateArgs): - (KJS::DateProtoFuncSetMilliSeconds::callAsFunction): - (KJS::DateProtoFuncSetUTCMilliseconds::callAsFunction): - (KJS::DateProtoFuncSetSeconds::callAsFunction): - (KJS::DateProtoFuncSetUTCSeconds::callAsFunction): - (KJS::DateProtoFuncSetMinutes::callAsFunction): - (KJS::DateProtoFuncSetUTCMinutes::callAsFunction): - (KJS::DateProtoFuncSetHours::callAsFunction): - (KJS::DateProtoFuncSetUTCHours::callAsFunction): - (KJS::DateProtoFuncSetDate::callAsFunction): - (KJS::DateProtoFuncSetUTCDate::callAsFunction): - (KJS::DateProtoFuncSetMonth::callAsFunction): - (KJS::DateProtoFuncSetUTCMonth::callAsFunction): - (KJS::DateProtoFuncSetFullYear::callAsFunction): - (KJS::DateProtoFuncSetUTCFullYear::callAsFunction): - -2008-01-06 Nikolas Zimmermann - - Reviewed by Dan. - - Add new helper function isArabicChar - SVG Fonts support needs it. - - * wtf/unicode/icu/UnicodeIcu.h: - (WTF::Unicode::isArabicChar): - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::isArabicChar): - -2008-01-06 Alp Toker - - Reviewed by Mark Rowe. - - Use $(EXEEXT) to account for the .exe extension in the GTK+ Windows - build. (This is already done correctly in DerivedSources.make.) Issue - noticed by Mikkel when building in Cygwin. - - Add a missing slash. This was a hack from the qmake build system that - isn't necessary with autotools. - - * GNUmakefile.am: - -2008-01-05 Darin Adler - - * API/JSRetainPtr.h: One more file that needed the change below. - -2008-01-05 Darin Adler - - * wtf/OwnPtr.h: OwnPtr needs the same fix as RefPtr below. - -2008-01-05 Adam Roben - - Build fix. - - Reviewed by Maciej. - - * wtf/RetainPtr.h: Use PtrType instead of T* because of the - RemovePointer magic. - -2008-01-05 Darin Adler - - Rubber stamped by Maciej Stachowiak. - - - cut down own PIC branches by using a pointer-to-member-data instead of a - pointer-to-member-function in WTF smart pointers - - * wtf/OwnArrayPtr.h: - * wtf/OwnPtr.h: - * wtf/PassRefPtr.h: - * wtf/RefPtr.h: - * wtf/RetainPtr.h: - Use a pointer to the m_ptr member instead of the get member. - The GCC compiler generates better code for this idiom. - -2008-01-05 Henry Mason - - Reviewed by Maciej Stachowiak. - - http://bugs.webkit.org/show_bug.cgi?id=16738 - Bug 16738: Collector block offset could be stored as an cell offset instead of a byte offset - - Gives a 0.4% SunSpider boost and prettier code. - - * kjs/collector.cpp: Switched to cell offsets from byte offsets - (KJS::Collector::heapAllocate): - (KJS::Collector::sweep): - -2008-01-04 Mark Rowe - - Reviewed by Maciej Stachowiak. - - Have the two malloc zones print useful diagnostics if their free method are unexpectedly invoked. - Due to this can happen if an application attempts to free a pointer that - was not allocated by any registered malloc zone on the system. - - * kjs/CollectorHeapIntrospector.h: - * wtf/FastMalloc.cpp: - -2008-01-04 Alp Toker - - GTK+ autotools build fix. Terminate empty rules. - - * GNUmakefile.am: - -2008-01-03 Simon Hausmann - - Reviewed by Mark Rowe. - - Fix compilation with gcc 4.3: limits.h is needed for INT_MAX. - - * pcre/pcre_exec.cpp: - -2008-01-03 Darin Adler - - * tests/mozilla/expected.html: The fix for bug 16696 also fixed a test - case, ecma_3/RegExp/perlstress-002.js, so updated results to expect - that test to succeed. - -2008-01-02 Darin Adler - - Reviewed by Geoff. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16696 - JSCRE fails fails to match Acid3 regexp - - Test: fast/regex/early-acid3-86.html - - The problem was with the cutoff point between backreferences and octal - escape sequences. We need to determine the cutoff point by counting the - total number of capturing brackets, which requires an extra pass through - the expression when compiling it. - - * pcre/pcre_compile.cpp: - (CompileData::CompileData): Added numCapturingBrackets. Removed some - unused fields. - (compileBranch): Use numCapturingBrackets when calling checkEscape. - (calculateCompiledPatternLength): Use numCapturingBrackets when calling - checkEscape, and also store the bracket count at the end of the compile. - (jsRegExpCompile): Call calculateCompiledPatternLength twice -- once to - count the number of brackets and then a second time to calculate the length. - -2008-01-02 Darin Adler - - Reviewed by Geoff. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16696 - JSCRE fails fails to match Acid3 regexp - - Test: fast/regex/early-acid3-86.html - - The problem was with the cutoff point between backreferences and octal - escape sequences. We need to determine the cutoff point by counting the - total number of capturing brackets, which requires an extra pass through - the expression when compiling it. - - * pcre/pcre_compile.cpp: - (CompileData::CompileData): Added numCapturingBrackets. Removed some - unused fields. - (compileBranch): Use numCapturingBrackets when calling checkEscape. - (calculateCompiledPatternLength): Use numCapturingBrackets when calling - checkEscape, and also store the bracket count at the end of the compile. - (jsRegExpCompile): Call calculateCompiledPatternLength twice -- once to - count the number of brackets and then a second time to calculate the length. - -2008-01-02 David Kilzer - - Reviewed and landed by Darin. - - * kjs/nodes.cpp: - (KJS::DoWhileNode::execute): Added a missing return. - -2008-01-02 Darin Adler - - - try to fix Qt build - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::foldCase): Add some missing const. - -2008-01-02 Alice Liu - - Reviewed by Sam Weinig. - - need to export ASCIICType.h for use in DRT - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * wtf/ASCIICType.h: - (WTF::isASCIIUpper): - -2008-01-02 Sam Weinig - - Reviewed by Beth Dakin. - - Cleanup error_object.h/cpp. - - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::reset): - * kjs/error_object.cpp: - (KJS::ErrorInstance::ErrorInstance): - (KJS::ErrorPrototype::ErrorPrototype): - (KJS::ErrorProtoFuncToString::ErrorProtoFuncToString): - (KJS::ErrorProtoFuncToString::callAsFunction): - (KJS::ErrorObjectImp::ErrorObjectImp): - (KJS::ErrorObjectImp::implementsConstruct): - (KJS::ErrorObjectImp::construct): - (KJS::ErrorObjectImp::callAsFunction): - (KJS::NativeErrorPrototype::NativeErrorPrototype): - (KJS::NativeErrorImp::NativeErrorImp): - (KJS::NativeErrorImp::implementsConstruct): - (KJS::NativeErrorImp::construct): - (KJS::NativeErrorImp::callAsFunction): - (KJS::NativeErrorImp::mark): - * kjs/error_object.h: - (KJS::ErrorInstance::classInfo): - (KJS::NativeErrorImp::classInfo): - -2008-01-02 Mark Rowe - - Rubber-stamped by Alp Toker. - - * GNUmakefile.am: Add missing dependency on grammar.y. - -2008-01-01 Darin Adler - - Reviewed by Eric. - - - fix for http://bugs.webkit.org/show_bug.cgi?id=16695 - JSC allows non-identifier codepoints in identifiers (affects Acid3) - - Test: fast/js/kde/parse.html - - * kjs/lexer.cpp: - (KJS::Lexer::lex): Added additional states to distinguish Unicode escapes at the - start of identifiers from ones inside identifiers. Rejected characters that don't pass - the isIdentStart and isIdentPart tests. - (KJS::Lexer::convertUnicode): Removed incorrect FIXME comment. - - * kjs/lexer.h: Added new states to distinguish \u escapes at the start of identifiers - from \u escapes inside identifiers. - -2008-01-01 Darin Adler - - - rolled scope chain optimization out; it was breaking the world - -2008-01-01 Darin Adler - - Reviewed by Geoff. - - - http://bugs.webkit.org/show_bug.cgi?id=16685 - eliminate List::empty() to cut down on PIC branches - - Also included one other speed-up -- remove the call to reserveCapacity from - FunctionBodyNode::processDeclarations in all but the most unusual cases. - - Together these make SunSpider 1.016x as fast. - - * JavaScriptCore.exp: Updated. - * kjs/ExecState.cpp: - (KJS::globalEmptyList): Added. Called only when creating global ExecState - instances. - (KJS::ExecState::ExecState): Broke constructor up into three separate functions, - for the three separate node types. Also went through each of the three and - streamlined as much as possible, removing dead code. This prevents us from having - to access the global in the function body version of the constructor. - - * kjs/ExecState.h: Added emptyList(). Replaced the constructor with a set of - three that are specific to the different node types that can create new execution - state objects. - - * kjs/array_object.cpp: - (KJS::ArrayProtoFuncToLocaleString::callAsFunction): Use exec->emptyList() instead - of List::empty(). - (KJS::ArrayProtoFuncConcat::callAsFunction): Ditto. - (KJS::ArrayProtoFuncSlice::callAsFunction): Ditto. - (KJS::ArrayProtoFuncSplice::callAsFunction): Ditto. - (KJS::ArrayProtoFuncFilter::callAsFunction): Ditto. - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): Updated to call new ExecState constructor. - (KJS::GlobalFuncImp::callAsFunction): Ditto (for eval). - * kjs/function_object.cpp: - (FunctionObjectImp::construct): Use exec->emptyList() instead of List::empty(). - - * kjs/list.cpp: Removed List::empty. - * kjs/list.h: Ditto. - - * kjs/nodes.cpp: - (KJS::ElementNode::evaluate): Use exec->emptyList() instead of List::empty(). - (KJS::ArrayNode::evaluate): Ditto. - (KJS::ObjectLiteralNode::evaluate): Ditto. - (KJS::PropertyListNode::evaluate): Ditto. - (KJS::FunctionBodyNode::processDeclarations): Another speed-up. Check the capacity - before calling reserveCapacity, because it doesn't get inlined the local storage - vector is almost always big enough -- saving the function call overhead is a big - deal. - (KJS::FuncDeclNode::makeFunction): Use exec->emptyList() instead of List::empty(). - (KJS::FuncExprNode::evaluate): Ditto. - * kjs/object.cpp: - (KJS::tryGetAndCallProperty): Ditto. - * kjs/property_slot.cpp: - (KJS::PropertySlot::functionGetter): Ditto. - * kjs/string_object.cpp: - (KJS::StringProtoFuncSplit::callAsFunction): Ditto. - -2008-01-01 Darin Adler - - Reviewed by Geoff. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16648 - REGRESSION (r28165): Yuku.com navigation prints "jsRegExpExecute failed with result -2" - REGRESSION (r28165): Layout test fast/regex/test1 fails intermittently - - Fixes 34 failing test cases in the fast/regex/test1.html test. - - Restored the stack which prevents infinite loops for brackets that match the empty - string; it had been removed as an optimization. - - Unfortunately, restoring this stack causes the regular expression test in SunSpider - to be 1.095x as slow and the overall test to be 1.004x as slow. Maybe we can find - a correct optimization to restore the speed! - - It's possible the original change was on the right track but just off by one. - - * pcre/pcre_exec.cpp: Add back eptrblock, but name it BracketChainNode. - (MatchStack::pushNewFrame): Add back the logic needed here. - (startNewGroup): Ditto. - (match): Ditto. - -2008-01-01 Darin Adler - - Reviewed by Geoff. - - - http://bugs.webkit.org/show_bug.cgi?id=16683 - speed up function calls by making ScopeChain::push cheaper - - This gives a 1.019x speedup on SunSpider. - - After doing this, I realized this probably will be obsolete when the optimization - to avoid creating an activation object is done. When we do that one we should check - if rolling this out will speed things up, since this does add overhead at the time - you copy the scope chain. - - * kjs/object.h: Removed the ScopeChain::release function. It was - marked inline, and called in exactly one place, so moved it there. - No idea why it was in this header file! - - * kjs/scope_chain.cpp: Removed the overload of the ScopeChain::push - function that takes another ScopeChain. It was unused. I think we used - it over in WebCore at one point, but not any more. - - * kjs/scope_chain.h: Changed ScopeChainNode into a struct rather than - a class, got rid of its constructor so we can have one that's uninitialized, - and moved the refCount into a derived struct, ScopeChainHeapNode. Made _node - mutable so it can be changed in the moveToHeap function. Changed the copy - constructor and assignment operator to call moveToHeap, since the top node - can't be shared when it's embedded in another ScopeChain object. Updated - functions as needed to handle the case where the first object isn't on the - heap or to add casts for cases where it's guaranteed to be. Changed the push - function to always put the new node into the ScopeChain object; it will get - put onto the heap when needed later. - -2008-01-01 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed slight logic error in reserveCapacity, where we would reallocate - the storage buffer unnecessarily. - - * wtf/Vector.h: - (WTF::::reserveCapacity): No need to grow the buffer if newCapacity is - equal to capacity(). - -2008-01-01 Darin Adler - - Reviewed by Oliver. - - - http://bugs.webkit.org/show_bug.cgi?id=16684 - eliminate debugger overhead from function body execution - - Speeds SunSpider up 1.003x. That's a small amount, but measurable. - - * JavaScriptCore.exp: Updated. - * kjs/Parser.h: - (KJS::Parser::parse): Create the node with a static member function named create() instead - of using new explicitly. - - * kjs/grammar.y: Changed calls to new FunctionBodyNode to use FunctionBodyNode::create(). - - * kjs/nodes.cpp: - (KJS::ProgramNode::create): Added. Calls new. - (KJS::EvalNode::create): Ditto. - (KJS::FunctionBodyNode::create): Ditto, but creates FunctionBodyNodeWithDebuggerHooks - when a debugger is present. - (KJS::FunctionBodyNode::execute): Removed debugger hooks. - (KJS::FunctionBodyNodeWithDebuggerHooks::FunctionBodyNodeWithDebuggerHooks): Added. - (KJS::FunctionBodyNodeWithDebuggerHooks::execute): Calls the debugger, then the code, - then the debugger again. - - * kjs/nodes.h: Added create functions, made the constructors private and protected. - -2007-12-30 Eric Seidel - - Reviewed by Sam. - - More small cleanup to array_object.cpp - - * kjs/array_object.cpp: - (KJS::ArrayProtoFuncToString::callAsFunction): - (KJS::ArrayProtoFuncToLocaleString::callAsFunction): - (KJS::ArrayProtoFuncJoin::callAsFunction): - (KJS::ArrayProtoFuncConcat::callAsFunction): - (KJS::ArrayProtoFuncReverse::callAsFunction): - (KJS::ArrayProtoFuncShift::callAsFunction): - (KJS::ArrayProtoFuncSlice::callAsFunction): - (KJS::ArrayProtoFuncSort::callAsFunction): - (KJS::ArrayProtoFuncSplice::callAsFunction): - (KJS::ArrayProtoFuncUnShift::callAsFunction): - (KJS::ArrayProtoFuncFilter::callAsFunction): - (KJS::ArrayProtoFuncMap::callAsFunction): - (KJS::ArrayProtoFuncEvery::callAsFunction): - -2007-12-30 Eric Seidel - - Reviewed by Sam. - - Apply wkstyle to array_object.cpp - - * kjs/array_object.cpp: - (KJS::ArrayPrototype::ArrayPrototype): - (KJS::ArrayPrototype::getOwnPropertySlot): - (KJS::ArrayProtoFuncConcat::callAsFunction): - (KJS::ArrayProtoFuncPop::callAsFunction): - (KJS::ArrayProtoFuncReverse::callAsFunction): - (KJS::ArrayProtoFuncShift::callAsFunction): - (KJS::ArrayProtoFuncSlice::callAsFunction): - (KJS::ArrayProtoFuncSort::callAsFunction): - (KJS::ArrayProtoFuncSplice::callAsFunction): - (KJS::ArrayProtoFuncUnShift::callAsFunction): - (KJS::ArrayProtoFuncFilter::callAsFunction): - (KJS::ArrayProtoFuncMap::callAsFunction): - (KJS::ArrayProtoFuncEvery::callAsFunction): - (KJS::ArrayProtoFuncLastIndexOf::callAsFunction): - (KJS::ArrayObjectImp::ArrayObjectImp): - (KJS::ArrayObjectImp::implementsConstruct): - (KJS::ArrayObjectImp::construct): - (KJS::ArrayObjectImp::callAsFunction): - -2007-12-30 Eric Seidel - - Reviewed by Sam. - - Remove maxInt/minInt, replacing with std:max/min() - - * kjs/array_object.cpp: - (KJS::ArrayProtoFuncSplice::callAsFunction): - * kjs/operations.cpp: - * kjs/operations.h: - -2007-12-30 Eric Seidel - - Reviewed by Sam. - - Update Number.toString to properly throw exceptions. - Cleanup code in Number.toString implementation. - - * kjs/number_object.cpp: - (KJS::numberToString): - * kjs/object.cpp: - (KJS::Error::create): Remove bogus debug lines. - -2007-12-28 Eric Seidel - - Reviewed by Oliver. - - ASSERT when debugging via Drosera due to missed var lookup optimization. - http://bugs.webkit.org/show_bug.cgi?id=16634 - - No test case possible. - - * kjs/nodes.cpp: - (KJS::BreakpointCheckStatement::optimizeVariableAccess): - * kjs/nodes.h: - -2007-12-28 Eric Seidel - - Reviewed by Oliver. - - Fix (-0).toFixed() and re-factor a little - Fix (-0).toExponential() and printing of trailing 0s in toExponential - Fix toPrecision(nan) handling - http://bugs.webkit.org/show_bug.cgi?id=16640 - - * kjs/number_object.cpp: - (KJS::numberToFixed): - (KJS::fractionalPartToString): - (KJS::numberToExponential): - (KJS::numberToPrecision): - -2007-12-28 Eric Seidel - - Reviewed by Sam. - - More changes to make number code readable - - * kjs/number_object.cpp: - (KJS::integer_part_noexp): - (KJS::numberToFixed): - (KJS::numberToExponential): - -2007-12-28 Eric Seidel - - Reviewed by Sam. - - More small cleanups to toPrecision - - * kjs/number_object.cpp: - (KJS::numberToPrecision): - -2007-12-28 Eric Seidel - - Reviewed by Sam. - - More small attempts to make number code readable - - * kjs/number_object.cpp: - (KJS::exponentialPartToString): - (KJS::numberToExponential): - (KJS::numberToPrecision): - -2007-12-28 Eric Seidel - - Reviewed by Sam. - - Break out callAsFunction implementations into static functions - - * kjs/number_object.cpp: - (KJS::numberToString): - (KJS::numberToFixed): - (KJS::numberToExponential): - (KJS::numberToPrecision): - (KJS::NumberProtoFunc::callAsFunction): - -2007-12-28 Eric Seidel - - Reviewed by Sam. - - Apply wkstyle/astyle and fix placement of * - - * kjs/number_object.cpp: - (KJS::NumberInstance::NumberInstance): - (KJS::NumberPrototype::NumberPrototype): - (KJS::NumberProtoFunc::NumberProtoFunc): - (KJS::integer_part_noexp): - (KJS::intPow10): - (KJS::NumberProtoFunc::callAsFunction): - (KJS::NumberObjectImp::NumberObjectImp): - (KJS::NumberObjectImp::getOwnPropertySlot): - (KJS::NumberObjectImp::getValueProperty): - (KJS::NumberObjectImp::implementsConstruct): - (KJS::NumberObjectImp::construct): - (KJS::NumberObjectImp::callAsFunction): - * kjs/object.cpp: - (KJS::JSObject::put): - -2007-12-27 Eric Seidel - - Reviewed by Sam. - - ASSERT in JavaScriptCore while viewing WICD test case - http://bugs.webkit.org/show_bug.cgi?id=16626 - - * kjs/nodes.cpp: - (KJS::ForInNode::execute): move KJS_CHECK_EXCEPTION to proper place - -2007-12-26 Jan Michael Alonzo - - Reviewed by Alp Toker. - - http://bugs.webkit.org/show_bug.cgi?id=16390 - Use autotools or GNU make as the build system for the GTK port - - * GNUmakefile.am: Added. - -2007-12-25 Maciej Stachowiak - - Reviewed by Oliver. - - - Remove unnecessary redundant check from property setting - http://bugs.webkit.org/show_bug.cgi?id=16602 - - 1.3% speedup on SunSpider. - - * kjs/object.cpp: - (KJS::JSObject::put): Don't do canPut check when not needed; let - the PropertyMap handle it. - (KJS::JSObject::canPut): Don't check the static property - table. lookupPut does that already. - -2007-12-24 Alp Toker - - Fix builds that don't use AllInOneFile.cpp following breakage - introduced in r28973. - - * kjs/grammar.y: - -2007-12-24 Maciej Stachowiak - - Reviewed by Eric. - - - Optimize variable declarations - http://bugs.webkit.org/show_bug.cgi?id=16585 - - 3.5% speedup on SunSpider. - - var statements now result in either assignments or empty statements. - - This allows a couple of optimization opportunities: - - No need to branch at runtime to check if there is an initializer - - EmptyStatementNodes can be removed entirely (also done in this patch) - - Assignment expressions get properly optimized for local variables - - This patch also includes some code cleanup: - - Most of the old VarStatement/VarDecl logic is now only used for const declarations, - thus it is renamed appropriately - - AssignExprNode is gone - - * JavaScriptCore.exp: - * kjs/NodeInfo.h: - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::SourceElements::append): - (KJS::ConstDeclNode::ConstDeclNode): - (KJS::ConstDeclNode::optimizeVariableAccess): - (KJS::ConstDeclNode::handleSlowCase): - (KJS::ConstDeclNode::evaluateSingle): - (KJS::ConstDeclNode::evaluate): - (KJS::ConstStatementNode::optimizeVariableAccess): - (KJS::ConstStatementNode::execute): - (KJS::VarStatementNode::optimizeVariableAccess): - (KJS::VarStatementNode::execute): - (KJS::ForInNode::ForInNode): - (KJS::ForInNode::optimizeVariableAccess): - (KJS::ForInNode::execute): - (KJS::FunctionBodyNode::initializeSymbolTable): - (KJS::ProgramNode::initializeSymbolTable): - (KJS::FunctionBodyNode::processDeclarations): - (KJS::ProgramNode::processDeclarations): - (KJS::EvalNode::processDeclarations): - * kjs/nodes.h: - (KJS::DeclarationStacks::): - (KJS::StatementNode::): - (KJS::ConstDeclNode::): - (KJS::ConstStatementNode::): - (KJS::EmptyStatementNode::): - (KJS::VarStatementNode::): - (KJS::ForNode::): - * kjs/nodes2string.cpp: - (KJS::ConstDeclNode::streamTo): - (KJS::ConstStatementNode::streamTo): - (KJS::ScopeNode::streamTo): - (KJS::VarStatementNode::streamTo): - (KJS::ForNode::streamTo): - (KJS::ForInNode::streamTo): - -2007-12-21 Mark Rowe - - Reviewed by Oliver Hunt. - - * JavaScriptCore.exp: Remove unused symbol to prevent a weak external symbol - being generated in JavaScriptCore.framework. - -2007-12-21 Darin Adler - - Requested by Maciej. - - * kjs/nodes.h: Use the new NEVER_INLINE here and eliminate the old - KJS_NO_INLINE. We don't want to have two, and we figured it was better - to keep the one that's in WTF. - -2007-12-21 Darin Adler - - Reviewed by Eric. - - - http://bugs.webkit.org/show_bug.cgi?id=16561 - remove debugger overhead from non-debugged JavaScript execution - - 1.022x as fast on SunSpider. - - * JavaScriptCore.exp: Updated. - - * kjs/NodeInfo.h: Renamed SourceElementsStub to SourceElements, - since that more accurately describes the role of this object, which - is a reference-counted wrapper for a Vector. - - * kjs/Parser.cpp: - (KJS::Parser::didFinishParsing): Changed parameter type to SourceElements, - and use plain assignment instead of set. - * kjs/Parser.h: Changed parameter type of didFinishParsing to a - SourceElements. Also changed m_sourceElements; we now use a RefPtr instead - of an OwnPtr as well. - - * kjs/grammar.y: Got rid of all the calls to release() on SourceElements. - That's now handed inside the constructors for various node types, since we now - use vector swapping instead. - - * kjs/nodes.cpp: - (KJS::Node::rethrowException): Added NEVER_INLINE, because this was getting inlined - and we want exception handling out of the normal code flow. - (KJS::SourceElements::append): Moved here from the header. This now handles - creating a BreakpointCheckStatement for each statement in the debugger case. - That way we can get breakpoint handling without having it in every execute function. - (KJS::BreakpointCheckStatement::BreakpointCheckStatement): Added. - (KJS::BreakpointCheckStatement::execute): Added. Contains the code that was formerly - in the StatementNode::hitStatement function and the KJS_BREAKPOINT macro. - (KJS::BreakpointCheckStatement::streamTo): Added. - (KJS::ArgumentListNode::evaluateList): Use KJS_CHECKEXCEPTIONVOID since the return - type is void. - (KJS::VarStatementNode::execute): Removed KJS_BREAKPOINT. - (KJS::BlockNode::BlockNode): Changed parameter type to SourceElements. - Changed code to use release since the class now contains a vector rather than - a vector point. - (KJS::BlockNode::optimizeVariableAccess): Updated since member is now a vector - rather than a vector pointer. - (KJS::BlockNode::execute): Ditto. - (KJS::ExprStatementNode::execute): Removed KJS_BREAKPOINT. - (KJS::IfNode::execute): Ditto. - (KJS::IfElseNode::execute): Ditto. - (KJS::DoWhileNode::execute): Ditto. - (KJS::WhileNode::execute): Ditto. - (KJS::ContinueNode::execute): Ditto. - (KJS::BreakNode::execute): Ditto. - (KJS::ReturnNode::execute): Ditto. - (KJS::WithNode::execute): Ditto. - (KJS::CaseClauseNode::optimizeVariableAccess): Updated since member is now a vector - rather than a vector pointer. - (KJS::CaseClauseNode::executeStatements): Ditto. - (KJS::SwitchNode::execute): Removed KJS_BREAKPOINT. - (KJS::ThrowNode::execute): Ditto. - (KJS::TryNode::execute): Ditto. - (KJS::ScopeNode::ScopeNode): Changed parameter type to SourceElements. - (KJS::ProgramNode::ProgramNode): Ditto. - (KJS::EvalNode::EvalNode): Ditto. - (KJS::FunctionBodyNode::FunctionBodyNode): Ditto. - (KJS::ScopeNode::optimizeVariableAccess): Updated since member is now a vector - rather than a vector pointer. - - * kjs/nodes.h: Removed hitStatement. Renamed SourceElements to StatementVector. - Renamed SourceElementsStub to SourceElements and made it derive from - ParserRefCounted rather than from Node, hold a vector rather than a pointer to - a vector, and changed the release function to swap with another vector rather - than the pointer idiom. Updated BlockNode and CaseClauseNode to hold actual - vectors instead of pointers to vectors. Added BreakpointCheckStatement. - - * kjs/nodes2string.cpp: - (KJS::statementListStreamTo): Changed to work on a vector instead of a pointer - to a vector. - (KJS::BlockNode::streamTo): Ditto. - (KJS::CaseClauseNode::streamTo): Ditto. - - * wtf/AlwaysInline.h: Added NEVER_INLINE. - * wtf/PassRefPtr.h: Tweaked formatting. Added clear() function that matches the - ones in OwnPtr and auto_ptr. - * wtf/RefPtr.h: Ditto. - -2007-12-21 Darin Adler - - - fix broken regression tests - - The broken tests were fast/js/do-while-expression-value.html and - fast/js/while-expression-value.html. - - * kjs/nodes.cpp: Check in the correct version of this file. I had accidentally landed - an old version of my patch for bug 16471. - (KJS::statementListExecute): The logic here was backwards. Have to set the value - even for non-normal execution results. - -2007-12-20 Alexey Proskuryakov - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Copy npruntime_internal.h - to WebKitBuild. - -2007-12-20 Eric Seidel - - Reviewed by mjs. - - Split IfNode into IfNode and IfElseNode for speedup. - http://bugs.webkit.org/show_bug.cgi?id=16470 - - SunSpider claims this is 1.003x as fast as before. - (This required running with --runs 15 to get consistent enough results to tell!) - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::IfNode::optimizeVariableAccess): - (KJS::IfNode::execute): - (KJS::IfNode::getDeclarations): - (KJS::IfElseNode::optimizeVariableAccess): - (KJS::IfElseNode::execute): - (KJS::IfElseNode::getDeclarations): - * kjs/nodes.h: - (KJS::IfNode::): - (KJS::IfElseNode::): - * kjs/nodes2string.cpp: - (KJS::IfNode::streamTo): - (KJS::IfElseNode::streamTo): - -2007-12-20 Darin Adler - - Reviewed by Sam. - - * wtf/OwnPtr.h: - (WTF::operator==): Added. - (WTF::operator!=): Added. - -2007-12-20 Geoffrey Garen - - Reviewed by Oliver Hunt. - - AST optimization: Avoid NULL-checking ForNode's child nodes. - - 0.6% speedup on SunSpider. - - This is a proof of concept patch that demonstrates how to optimize - grammar productions with optional components, like - - for (optional; optional; optional) { - ... - } - - The parser emits NULL for an optional component that is not present. - - Instead of checking for a NULL child at execution time, a node that - expects an optional component to be present more often than not checks - for a NULL child at construction time, and substitutes a viable - alternative node in its place. - - (We'd like the parser to start emitting NULL a lot more once we teach - it to emit NULL for certain no-op productions like EmptyStatement and - VariableStatement, so, as a foundation, it's important for nodes with - NULL optional components to be fast.) - - * kjs/Parser.cpp: - (KJS::Parser::didFinishParsing): Check for NULL SourceElements. Also, - moved didFinishParsing into the .cpp file because adding a branch while - it was in the header file caused a substantial and inexplicable - performance regression. (Did I mention that GCC is crazy?) - - * kjs/grammar.y: - - * kjs/nodes.cpp: - (KJS::BlockNode::BlockNode): Check for NULL SourceElements. - (KJS::ForNode::optimizeVariableAccess): No need to check for NULL here. - (KJS::ForNode::execute): No need to check for NULL here. - * kjs/nodes.h: - (KJS::ForNode::): Check for NULL SourceElements. Substitute a TrueNode - because it's semantically harmless, and it evaluates to boolean in an - efficient manner. - -2007-12-20 Oliver Hunt - - Reviewed by Geoff. - - Slight logic reordering in JSImmediate::from(double) - - This gives a 0.6% improvement in SunSpider. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::from): - -2007-12-20 Eric Seidel - - Reviewed by mjs. - - Fix major Array regression introduced by 28899. - - SunSpider claims this is at least 1.37x as fast as pre-regression. :) - - * kjs/array_instance.cpp: make Arrays fast again! - -2007-12-20 Eric Seidel - - Reviewed by Geoff, then re-rubber-stamped by Geoff after final search/replace and testing. - - Small reworking of Date code for 4% speedup on Date tests (0.2% overall) - http://bugs.webkit.org/show_bug.cgi?id=16537 - - Make msToYear human-readable - Make msToDayInMonth slightly more readable and avoid recalculating msToYear - Remove use of isInLeapYear to avoid calling msToYear - Remove dayInYear call by changing msToDayInMonth to dayInMonthFromDayInYear - Remove more duplicate calls to dayInYear and getUTCOffset for further speedup - - * kjs/DateMath.cpp: - (KJS::daysFrom1970ToYear): - (KJS::msToYear): - (KJS::monthFromDayInYear): - (KJS::checkMonth): - (KJS::dayInMonthFromDayInYear): - (KJS::dateToDayInYear): - (KJS::getDSTOffsetSimple): - (KJS::getDSTOffset): - (KJS::gregorianDateTimeToMS): - (KJS::msToGregorianDateTime): - -2007-12-20 Rodney Dawes - - Reviewed by Darin Adler. - - Proxy includes of npruntime.h or npapi.h through npruntime_internal.h - Include stdio.h in npapi.h for the use of FILE with XP_UNIX defined - This is for building with X11, as some type and enum names conflict - with #define names in X11 headers. - http://bugs.webkit.org/show_bug.cgi?id=15669 - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/NP_jsobject.h: - * bindings/npapi.h: - * bindings/npruntime.cpp: - * bindings/npruntime_impl.h: - * bindings/npruntime_priv.h: - * bindings/npruntime_internal.h: - * bindings/testbindings.cpp: - * bindings/c/c_class.h: - * bindings/c/c_runtime.h: - * bindings/c/c_utility.h: - -2007-12-20 Darin Adler - - - re-fix http://bugs.webkit.org/show_bug.cgi?id=16471 - Completions need to be smaller (or not exist at all) - - Same patch as last time with the test failures problem fixed. - - * kjs/function.cpp: - (KJS::GlobalFuncImp::callAsFunction): Make sure to check the completion - type from newExec to see if the execute raised an exception. - -2007-12-20 Darin Adler - - - roll out that last change -- it was causing test failures; - I'll check it back in after fixing them - -2007-12-20 Darin Adler - - Reviewed by Eric. - - - http://bugs.webkit.org/show_bug.cgi?id=16471 - Completions need to be smaller (or not exist at all) - - SuSpider shows 2.4% speedup. - - Stop using completions in the execution engine. - Instead, the completion type and label target are both - stored in the ExecState. - - * API/JSContextRef.cpp: Removed unneeded include of "completion.h". - * bindings/runtime_method.cpp: Removed unused execute function. - * bindings/runtime_method.h: Ditto. - - * kjs/ExecState.h: Added completionType, breakOrContinueTarget, - setCompletionType, setNormalCompletion, setBreakCompletion, - setContinueCompletion, setReturnValueCompletion, setThrowCompletion, - setInterruptedCompletion, m_completionType, and m_breakOrContinueTarget. - - * kjs/completion.h: Removed constructor and getter for target - for break and continue from Completion. This class is now only - used for the public API to Interpreter and such. - - * kjs/date_object.h: Removed unused execute function. - - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): Removed some unneeded - exception processing. Updated to call the new execute function - and to get the completion type from the ExecState. Merged in - the execute function, which repeated some of the same logic and - was called only from here. - (KJS::GlobalFuncImp::callAsFunction): More of the same for eval. - * kjs/function.h: Removed execute. - - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): Added code to convert the result of - execut into a Completion. - - * kjs/nodes.cpp: - (KJS::Node::setErrorCompletion): Renamed from createErrorCompletion. - Now sets the completion type in the ExecState. - (KJS::Node::rethrowException): Now sets the completion type in the - ExecState. - (KJS::StatementNode::hitStatement): Now sets the completion type in - the ExecState. - (KJS::VarStatementNode::execute): Updated to put completion type in - the ExecState instead of a Completion object. - (KJS::statementListExecute): Ditto. Also changed the for loop to use - indices instead of iterators. - (KJS::BlockNode::execute): Updated return type. - (KJS::EmptyStatementNode::execute): Updated to put completion type in - the ExecState instead of a Completion object. - (KJS::ExprStatementNode::execute): Ditto. - (KJS::IfNode::execute): Ditto. - (KJS::DoWhileNode::execute): Ditto. Also streamlined the logic a little - to make the normal case a little faster and moved the end outside the - loop so that "break" can do a break. - (KJS::WhileNode::execute): Ditto. - (KJS::ForNode::execute): Ditto. - (KJS::ForInNode::execute): Ditto. - (KJS::ContinueNode::execute): Updated to put completion type in - the ExecState instead of a Completion object. - (KJS::BreakNode::execute): Ditto. - (KJS::ReturnNode::execute): Ditto. - (KJS::WithNode::execute): Ditto. - (KJS::CaseClauseNode::executeStatements): Ditto. Also renamed to have - execute in its name to reflect the fact that it's a member of the same - family of functions. - (KJS::CaseBlockNode::executeBlock): Ditto. - (KJS::SwitchNode::execute): Ditto. - (KJS::LabelNode::execute): Ditto. - (KJS::ThrowNode::execute): Ditto. - (KJS::TryNode::execute): Ditto. - (KJS::ProgramNode::execute): Ditto. - (KJS::EvalNode::execute): Ditto. - (KJS::FunctionBodyNode::execute): Ditto. - (KJS::FuncDeclNode::execute): Ditto. - - * kjs/nodes.h: Renamed setErrorCompletion to createErrorCompletion, made - hitStatement protected, changed return value of execute to a JSValue, - renamed evalStatements to executeStatements, and evalBlock to executeBlock. - - * kjs/number_object.h: Removed unused execute function. - -2007-12-20 Geoffrey Garen - - Added Radar number. - - * kjs/nodes.cpp: - (KJS::ProgramNode::processDeclarations): - -2007-12-20 Geoffrey Garen - - Linux build fix: config.h has to come first. - - * kjs/error_object.cpp: - -2007-12-19 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Optimized global access to global variables, using a symbol table. - - SunSpider reports a 1.5% overall speedup, a 6.2% speedup on 3d-morph, - and a whopping 33.1% speedup on bitops-bitwise-and. - - * API/JSCallbackObjectFunctions.h: Replaced calls to JSObject:: with - calls to Base::, since JSObject is not always our base class. This - was always a bug, but the bug is even more apparent after some of my - changes. - - (KJS::::staticFunctionGetter): Replaced use of getDirect with call to - getOwnPropertySlot. Global declarations are no longer stored in the - property map, so a call to getDirect is insufficient for finding - override properties. - - * API/testapi.c: - * API/testapi.js: Added test for the getDirect change mentioned above. - - * kjs/ExecState.cpp: - * kjs/ExecState.h: Dialed back the optimization to store a direct - pointer to the localStorage buffer. One ExecState can grow the global - object's localStorage without another ExecState's knowledge, so - ExecState can't store a direct pointer to the localStorage buffer - unless/until we invent a way to update all the relevant ExecStates. - - * kjs/JSGlobalObject.cpp: Inserted the symbol table into get and put - operations. - (KJS::JSGlobalObject::reset): Reset the symbol table and local storage, - too. Also, clear the property map here, removing the need for a - separate call. - - * kjs/JSVariableObject.cpp: - * kjs/JSVariableObject.h: Added support for saving localStorage and the - symbol table to the back/forward cache, and restoring them. - - * kjs/function.cpp: - (KJS::GlobalFuncImp::callAsFunction): Renamed progNode to evalNode - because it's an EvalNode, not a ProgramNode. - - * kjs/lookup.h: - (KJS::cacheGlobalObject): Replaced put with faster putDirect, since - that's how the rest of lookup.h works. putDirect is safe here because - cacheGlobalObject is only used for objects whose names are not valid - identifiers. - - * kjs/nodes.cpp: The good stuff! - - (KJS::EvalNode::processDeclarations): Replaced hasProperty with - the new hasOwnProperty, which is slightly faster. - - * kjs/object.h: Nixed clearProperties because clear() does this job now. - - * kjs/property_map.cpp: - * kjs/property_map.h: More back/forward cache support. - - * wtf/Vector.h: - (WTF::::grow): Added fast non-branching grow function. I used it in - an earlier version of this patch, even though it's not used anymore. - -2007-12-09 Mark Rowe - - Reviewed by Oliver Hunt. - - Build fix for non-Mac platforms. Move NodeInfo into its own header so that the YYTYPE - declaration in grammar.h is able to declare members of that type. - - * kjs/NodeInfo.h: Added. - (KJS::createNodeInfo): - (KJS::mergeDeclarationLists): - (KJS::appendToVarDeclarationList): - * kjs/grammar.y: - * kjs/lexer.cpp: - -2007-12-19 Oliver Hunt - - Make appendToVarDeclarationList static - - RS=Weinig. - - * kjs/grammar.y: - -2007-12-18 Oliver Hunt - - Remove dead code due to removal of post-parse declaration discovery. - - RS=Geoff. - - Due to the removal of the declaration discovery pass after parsing we - no longer need any of the logic used for that discovery. - - * kjs/nodes.cpp: - (KJS::Node::Node): - (KJS::VarDeclNode::VarDeclNode): - (KJS::BlockNode::BlockNode): - (KJS::ForInNode::ForInNode): - (KJS::CaseBlockNode::CaseBlockNode): - * kjs/nodes.h: - (KJS::VarStatementNode::): - (KJS::IfNode::): - (KJS::DoWhileNode::): - (KJS::WhileNode::): - (KJS::WithNode::): - (KJS::LabelNode::): - (KJS::TryNode::): - (KJS::FuncDeclNode::): - (KJS::CaseClauseNode::): - (KJS::ClauseListNode::): - (KJS::SwitchNode::): - -2007-12-18 Oliver Hunt - - Replace post-parse pass to find declarations with logic in the parser itself - - Reviewed by Geoff. - - Instead of finding declarations in a pass following the initial parsing of - a program, we incorporate the logic directly into the parser. This lays - the groundwork for further optimisations (such as improving performance in - declaration expressions -- var x = y; -- to match that of standard assignment) - in addition to providing a 0.4% performance improvement in SunSpider. - - * JavaScriptCore.exp: - * kjs/Parser.cpp: - (KJS::Parser::parse): - * kjs/Parser.h: - (KJS::Parser::didFinishParsing): - (KJS::Parser::parse): - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::ParserTracked::ParserTracked): - (KJS::ParserTracked::~ParserTracked): - (KJS::ParserTracked::ref): - (KJS::ParserTracked::deref): - (KJS::ParserTracked::refcount): - (KJS::ParserTracked::clearNewTrackedObjects): - (KJS::Node::Node): - (KJS::ScopeNode::ScopeNode): - (KJS::ProgramNode::ProgramNode): - (KJS::EvalNode::EvalNode): - (KJS::FunctionBodyNode::FunctionBodyNode): - (KJS::FunctionBodyNode::initializeSymbolTable): - (KJS::FunctionBodyNode::processDeclarations): - * kjs/nodes.h: - (KJS::ParserTracked::): - (KJS::Node::): - (KJS::ScopeNode::): - -2007-12-18 Xan Lopez - - Reviewed by Geoff. - - Fix http://bugs.webkit.org/show_bug.cgi?id=14521 - Bug 14521: JavaScriptCore fails to build on Linux/PPC gcc 4.1.2 - - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::Unlock): - - Use less strict memory operand constraint on inline asm generation. - PLATFORM(DARWIN) left unpatched due to Apple's GCC bug. - - Patch by David Kilzer - -2007-12-18 Mark Rowe - - Rubber-stamped by Maciej Stachowiak. - - Remove outdated and non-functioning project files for the Apollo port. - - * JavaScriptCore.apolloproj: Removed. - -2007-12-18 Darin Adler - - - fix Windows build - - * pcre/pcre_exec.cpp: - (jsRegExpExecute): Change back from false/true to 0/1 -- I probably should not have - deleted MATCH_MATCH and MATCH_NOMATCH, but I'm going to leave them out. - -2007-12-18 Darin Adler - - Reviewed by Geoff. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16458 - REGRESSION (r28164): regular expressions can now hang due to lack of a match limit - - - Test: fast/regex/slow.html - - Slows down SunSpider a bit (about 1.01x); filed a bug to follow up on that: - http://bugs.webkit.org/show_bug.cgi?id=16503 - - * pcre/pcre.h: Changed name of error code to not specifically mention "recursion". - * pcre/pcre_exec.cpp: - (match): Replaced the depth limit, MATCH_RECURSION_LIMIT, with a total match looping - limit, matchLimit. Also eliminated the constants for MATCH_MATCH and MATCH_NOMATCH, - since they are just true and false (1 and 0). - (jsRegExpExecute): More of the MATCH_MATCH change. - -2007-12-17 Darin Adler - - - speculative build fix for non-gcc platforms - - * pcre/pcre_exec.cpp: (match): Remove unused cases from return switch. - -2007-12-16 Mark Rowe - - Speculative build fix for non-Mac platforms. - - * pcre/pcre_compile.cpp: Include string.h for memset, memmove, etc. - -2007-12-16 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=16438 - - removed some more unused code - - changed quite a few more names to WebKit-style - - moved more things out of pcre_internal.h - - changed some indentation to WebKit-style - - improved design of the functions for reading and writing - 2-byte values from the opcode stream (in pcre_internal.h) - - * pcre/dftables.cpp: - (main): Added the kjs prefix a normal way in lieu of using macros. - - * pcre/pcre_compile.cpp: Moved some definitions here from pcre_internal.h. - (errorText): Name changes, fewer typedefs. - (checkEscape): Ditto. Changed uppercase conversion to use toASCIIUpper. - (isCountedRepeat): Name change. - (readRepeatCounts): Name change. - (firstSignificantOpcode): Got rid of the use of OP_lengths, which is - very lightly used here. Hard-coded the length of OP_BRANUMBER. - (firstSignificantOpcodeSkippingAssertions): Ditto. Also changed to - use the advanceToEndOfBracket function. - (getOthercaseRange): Name changes. - (encodeUTF8): Ditto. - (compileBranch): Name changes. Removed unused after_manual_callout and - the code to handle it. Removed code to handle OP_ONCE since we never - emit this opcode. Changed to use advanceToEndOfBracket in more places. - (compileBracket): Name changes. - (branchIsAnchored): Removed code to handle OP_ONCE since we never emit - this opcode. - (bracketIsAnchored): Name changes. - (branchNeedsLineStart): More fo the same. - (bracketNeedsLineStart): Ditto. - (branchFindFirstAssertedCharacter): Removed OP_ONCE code. - (bracketFindFirstAssertedCharacter): More of the same. - (calculateCompiledPatternLengthAndFlags): Ditto. - (returnError): Name changes. - (jsRegExpCompile): Ditto. - - * pcre/pcre_exec.cpp: Moved some definitions here from pcre_internal.h. - (matchRef): Updated names. - Improved macros to use the do { } while(0) idiom so they expand to single - statements rather than to blocks or multiple statements. And refeactored - the recursive match macros. - (MatchStack::pushNewFrame): Name changes. - (getUTF8CharAndIncrementLength): Name changes. - (match): Name changes. Removed the ONCE opcode. - (jsRegExpExecute): Name changes. - - * pcre/pcre_internal.h: Removed quite a few unneeded includes. Rewrote - quite a few comments. Removed the macros that add kjs prefixes to the - functions with external linkage; instead renamed the functions. Removed - the unneeded typedefs pcre_uint16, pcre_uint32, and uschar. Removed the - dead and not-all-working code for LINK_SIZE values other than 2, although - we aim to keep the abstraction working. Removed the OP_LENGTHS macro. - (put2ByteValue): Replaces put2ByteOpcodeValueAtOffset. - (get2ByteValue): Replaces get2ByteOpcodeValueAtOffset. - (put2ByteValueAndAdvance): Replaces put2ByteOpcodeValueAtOffsetAndAdvance. - (putLinkValueAllowZero): Replaces putOpcodeValueAtOffset; doesn't do the - addition, since a comma is really no better than a plus sign. Added an - assertion to catch out of range values and changed the parameter type to - int rather than unsigned. - (getLinkValueAllowZero): Replaces getOpcodeValueAtOffset. - (putLinkValue): New function that most former callers of the - putOpcodeValueAtOffset function can use; asserts the value that is - being stored is non-zero and then calls putLinkValueAllowZero. - (getLinkValue): Ditto. - (putLinkValueAndAdvance): Replaces putOpcodeValueAtOffsetAndAdvance. No - caller was using an offset, which makes sense given the advancing behavior. - (putLinkValueAllowZeroAndAdvance): Ditto. - (isBracketOpcode): Added. For use in an assertion. - (advanceToEndOfBracket): Renamed from moveOpcodePtrPastAnyAlternateBranches, - and removed comments about how it's not well designed. This function takes - a pointer to the beginning of a bracket and advances to the end of the - bracket. - - * pcre/pcre_tables.cpp: Updated names. - * pcre/pcre_ucp_searchfuncs.cpp: - (kjs_pcre_ucp_othercase): Ditto. - * pcre/pcre_xclass.cpp: - (getUTF8CharAndAdvancePointer): Ditto. - (kjs_pcre_xclass): Ditto. - * pcre/ucpinternal.h: Ditto. - - * wtf/ASCIICType.h: - (WTF::isASCIIAlpha): Added an int overload, like the one we already have for - isASCIIDigit. - (WTF::isASCIIAlphanumeric): Ditto. - (WTF::isASCIIHexDigit): Ditto. - (WTF::isASCIILower): Ditto. - (WTF::isASCIISpace): Ditto. - (WTF::toASCIILower): Ditto. - (WTF::toASCIIUpper): Ditto. - -2007-12-16 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16459 - REGRESSION: assertion failure with regexp with \B in a case-ignoring character range - - - The problem was that \B was not handled properly in character classes. - - Test: fast/js/regexp-overflow.html - - * pcre/pcre_compile.cpp: - (check_escape): Added handling of ESC_b and ESC_B in character classes here. - Allows us to get rid of the handling of \b in character classes from all the - call sites that handle it separately and to handle \B properly as well. - (compileBranch): Remove the ESC_b handling, since it's not needed any more. - (calculateCompiledPatternLengthAndFlags): Ditto. - -2007-12-16 Mark Rowe - - Reviewed by Maciej Stachowiak. - - Fix http://bugs.webkit.org/show_bug.cgi?id=16448 - Bug 16448: [GTK] Celtic Kane JavaScript performance on Array test is slow relative to Mac - - * kjs/array_instance.cpp: - (KJS::compareByStringPairForQSort): - (KJS::ArrayInstance::sort): Convert JSValue's to strings once up front and then sort the - results. This avoids calling toString twice per comparison, but requires a temporary buffer - so we only use this approach in cases where the array being sorted is not too large. - -2007-12-16 Geoffrey Garen - - Reviewed by Darin Adler and Maciej Stachowiak. - - More refactoring to support global variable optimization. - - Changed SymbolTable to use RefPtr as its key instead of - UString::Rep*. With globals, the symbol table can outlast the - declaration node for any given symbol, so the symbol table needs to ref - its symbol names. - - In support, specialized HashMaps with RefPtr keys to allow lookup - via raw pointer, avoiding refcount churn. - - SunSpider reports a .6% speedup (prolly just noise). - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added new file: wtf/RefPtrHashMap.h - * JavaScriptCore.xcodeproj/project.pbxproj: ditto - - * kjs/JSVariableObject.cpp: - (KJS::JSVariableObject::getPropertyNames): Symbol table keys are RefPtrs now. - - * kjs/SymbolTable.h: Modified key traits to match RefPtr. Added a - static Rep* for null, which helps compute the deletedValue() trait. - - * wtf/HashMap.h: #include the RefPtr specialization so everyone can use it. - - * wtf/RefPtrHashMap.h: Copied from wtf/HashMap.h. Added overloaded versions - of find(), contains(), get(), set(), add(), remove(), and take() that take - raw pointers as keys. - -2007-12-16 Alexey Proskuryakov - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=16162 - Problems with float parsing on Linux (locale-dependent parsing was used). - - * kjs/dtoa.cpp: Removed USE_LOCALE to reduce future confusion. - * kjs/lexer.cpp: (KJS::Lexer::lex): Parse with kjs_strtod, not the system one. - -2007-12-14 Alp Toker - - Reviewed by Mark Rowe. - - Enable the AllInOneFile.cpp optimization for the GTK+ port. - - * JavaScriptCore.pri: - -2007-12-14 Mark Rowe - - Unreviewed. Remove commented out fprintf's that were for debugging purposes only. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::IncrementalScavenge): - -2007-12-14 Mark Rowe - - Reviewed by Maciej Stachowiak. - - Don't use the MADV_DONTNEED code path for now as it has no effect on Mac OS X and is - currently untested on other platforms. - - * wtf/TCSystemAlloc.cpp: - (TCMalloc_SystemRelease): Return after releasing memory rather than potentially falling - through into another mechanism if multiple are supported. - -2007-12-14 Alp Toker - - Build fix for GTK+/Qt and ports that don't use AllInOneFile.cpp. - - Include UnusedParam.h. - - * wtf/TCSystemAlloc.cpp: - -2007-12-14 Oliver Hunt - - Reviewed by Stephanie. - - Fix build on windows - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::IncrementalScavenge): - -2007-12-14 Dan Bernstein - - - try again to fix the Windows build - - * wtf/TCSystemAlloc.cpp: - (TCMalloc_SystemRelease): - -2007-12-14 Dan Bernstein - - - try to fix the Windows build - - * wtf/TCSystemAlloc.cpp: - (TCMalloc_SystemRelease): - -2007-12-14 Mark Rowe - - Reviewed by Maciej and Oliver. - - Add final changes to make TCMalloc release memory to the system. - This results in a 0.4% regression against ToT, but this is offset - against the gains made by the original TCMalloc r38 merge - in fact - we retain around 0.3-0.4% progression overall. - - * wtf/FastMalloc.cpp: - (WTF::InitSizeClasses): - (WTF::TCMalloc_PageHeap::IncrementalScavenge): - * wtf/TCSystemAlloc.cpp: - (TCMalloc_SystemRelease): - -2007-12-14 Darin Adler - - Reviewed by Sam. - - - removed unnecessary includes of "Vector.h" - - * wtf/HashMap.h: - (WTF::copyKeysToVector): Make the type of the vector be a template parameter. - This allows copying keys into a vector of a base class or one with an inline capacity. - (WTF::copyValuesToVector): Ditto. - * wtf/HashSet.h: - (WTF::copyToVector): Ditto. - -2007-12-14 Anders Carlsson - - Reviewed by Darin and Geoff. - - - REGRESSION: 303-304: Embedded YouTube video fails to render- JS errors (16150) (Flash 9) - - Get rid of unnecessary and incorrect security checks for plug-ins accessing JavaScript objects. - - The way this used to work was that each NPObject that wrapped a JSObject would have a root object - corresponding to the frame object (used for managing the lifecycle) and an origin root object (used for - doing security checks). - - This would prevent a plug-in from accessing a frame's window object if it's security origin was different - (some parts of the window, such as the location object, can be accessed from frames with different security - origins, and those checks are being done in WebCore). - - Also, if a plug-in were to access a window object of a frame that later went away, it could lead to that - Window JSObject being garbage collected and the NPObject pointing to freed memory. - - How this works now is that there is no origin root object anymore, and all NPObject wrappers that are created - for a plug-in will have the root object of the containing frame of that plug-in. - - * bindings/NP_jsobject.cpp: - (jsDeallocate): - Don't free the origin root object. - - (_NPN_CreateScriptObject): - Remove the origin root object parameter. - - (_NPN_InvokeDefault): - (_NPN_Invoke): - (_NPN_Evaluate): - (_NPN_GetProperty): - (_NPN_SetProperty): - (_NPN_RemoveProperty): - (_NPN_HasProperty): - (_NPN_HasMethod): - (_NPN_Enumerate): - Get rid of all security checks. - - * bindings/NP_jsobject.h: - Remove originRootObject from the JavaScriptObject struct. - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertValueToNPVariant): - Always use the root object from the ExecState. - -2007-12-13 Steve Falkenburg - - Move source file generation into its own vcproj to fix build dependencies. - - Reviewed by Adam. - - * JavaScriptCore.vcproj/JavaScriptCore.sln: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Added. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Added. - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: - -2007-12-13 Alp Toker - - http://bugs.webkit.org/show_bug.cgi?id=16406 - [Gtk] JavaScriptCore needs -lpthread - - Build fix for Debian and any other platforms that don't implicitly - link to pthread. - - Link to pthread on non-Windows platforms until this dependency is - removed from JSC. - -2007-12-11 Geoffrey Garen - - Reviewed by Sam Weinig. - - Build fix: Note some variables that are used only for ASSERTs. - - * API/testapi.c: - (Base_finalize): - (globalObject_initialize): - (testInitializeFinalize): - -2007-12-11 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed: All JS tests crash on Windows. - - NDEBUG wasn't defined when compiling testkjs in release builds, so the - HashTable definition in HashTable.h included an extra data member. - - The solution was to add NDEBUG to the release testkjs configuration on - Windows and Mac. - - For giggles, I also added other missing #defines to testkjs on Windows. - - * Configurations/Base.xcconfig: - * Configurations/JavaScriptCore.xcconfig: - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/testkjs.cpp: - (main): - -2007-12-11 Geoffrey Garen - - Reviewed by Darin Adler. - - Removed bogus ASSERT. - - ASSERT should only be used when we know that a code path will not be - taken. This code path is taken often during the jsFunFuzz test. - - * pcre/pcre_exec.cpp: - (jsRegExpExecute): - -2007-12-11 Darin Adler - - * wtf/unicode/qt4/UnicodeQt4.h: Try to fix Qt build by adding U16_IS_SINGLE. - -2007-12-10 Darin Adler - - Reviewed by Sam Weinig. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16379 - REGRESSION(r28525): Failures in http/tests/xmlhttprequest/response-encoding.html and - fast/dom/xmlhttprequest-html-response-encoding.html - and REGRESSION (306A4-ToT): Access violation in PCRE function - find_firstassertedchar - - Test: fast/js/regexp-find-first-asserted.html - - * pcre/pcre_compile.cpp: - (compileBracket): Take out unnecessary initialization of out parameters. - (branchFindFirstAssertedCharacter): Added. Broke out the half of the function that handles - a branch. - (bracketFindFirstAssertedCharacter): Renamed from find_firstassertedchar. Also removed the - options parameter -- the caller can handle the options. - (jsRegExpCompile): Changed call site to call the appropriate bracket or branch version of - the find_firstassertedchar function. Also put the REQ_IGNORE_CASE code here instead of - passing in the options. - -2007-12-10 Geoffrey Garen - - Reviewed by Sam Weinig. - - Split this: - - FunctionBodyNode - ^ - | - ProgramNode - - into this: - - ScopeNode - ^ ^ ^ - | | | - FunctionBodyNode ProgramNode EvalNode - - in preparation for specializing each class more while optimizing global - variable access. - - Also removed some cruft from the FunctionBodyNode interface to simplify - things. - - SunSpider says this patch is a .8% speedup, which seems reasonable, - since it eliminates a few branches and adds KJS_FAST_CALL in a few - places. - - Layout tests and JS tests pass. Also, this baby builds on Windows! (Qt - mileage may vary...) - -2007-12-10 Geoffrey Garen - - RS by Mark Rowe. - - Mac build fix: added some exported symbols, now that Parser::parse is - defined in the header. - - * JavaScriptCore.exp: - -2007-12-10 Sam Weinig - - Build fix. - - Template methods need to be in the header. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * kjs/Parser.cpp: - * kjs/Parser.h: - (KJS::Parser::parse): - -2007-12-10 Geoffrey Garen - - Reviewed by Sam Weinig. - - Merged different implementations of Parser::parse into a single, - templatized implementation, in preparation for adding yet another - implementation for "eval" code. - - JS and layout tests pass. - -2007-12-10 Timothy Hatcher - - Reviewed by Mark Rowe - - Bundle versions on Tiger should be 4523.x not 523.x - - * Configurations/Version.xcconfig: Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR, - so assume Tiger and use a 4 for the SYSTEM_VERSION_PREFIX. - -2007-12-10 Mark Rowe - - Tiger build fix. - - * kjs/grammar.y: Use @1 and @0 in place of @$ where Tiger's bison chokes. - -2007-12-10 Darin Adler - - Reviewed by Mark Rowe. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16375 - REGRESSION: Safari crashes on quit - - Probably a debug-only issue. - - * kjs/Parser.cpp: - (KJS::parser): Create the parser and never destroy it by using a pointer instead - of a global object. - -2007-12-09 Darin Adler - - Reviewed by Sam Weinig. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16369 - REGRESSION (r28525): regular expression tests failing due to bad firstByte optimization - - * pcre/pcre_compile.cpp: Changed some names to use interCaps intead of under_scores. - (branchIsAnchored): Broke is_anchored into two separate functions; this one works on a - branch and the other on an anchor. The old function would only work on a bracket. - Also removed unneeded parameters; the anchored check does not require the bracket - map or the options any more because we have a reduced set of features. - (bracketIsAnchored): Ditto. - (branchNeedsLineStart): Broke canApplyFirstCharOptimization into two functions and gave - both a better name. This is the function that was returning the wrong value. The failure - was beacuse the old function would only work on a bracket. - (bracketNeedsLineStart): Ditto. - (jsRegExpCompile): Changed to call the appropriate branch or bracket flavor of the - functions based on whether we compiled an outer bracket. Also removed inaccurate comments - and unneeded parameters. - - - other small changes - - * pcre/pcre.h: Renumbered error codes, in a logical order. First, normal failure, then - the recursion limit, then running out of memory, and finally an unexpected internal error. - - * pcre/pcre_exec.cpp: Fixed indentation. - (jsRegExpExecute): Corrected an inaccurate comment. - -2007-12-09 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16370 - REGRESSION (r28540): source URL and line number no longer set for outer function/programs - - Test: fast/js/exception-linenums-in-html-1.html - Test: fast/js/exception-linenums-in-html-2.html - Test: fast/js/exception-linenums.html - - By the time the ProgramNode was constructed, the source URL was empty. - - * kjs/Parser.cpp: - (KJS::Parser::parseProgram): Added code to set and clear m_sourceURL, which is now - handled here instead of in the lexer; it needs to still be set when we create the - program node. Call setLoc to set the first and last line number. - (KJS::Parser::parseFunctionBody): Ditto, but for the body. - (KJS::Parser::parse): Removed the sourceURL argument. - - * kjs/Parser.h: Added sourceURL(), m_sourceURL, and m_lastLine. Added a lastLine - parameter to didFinishParsing, since the bison grammar knows the last line number - and we otherwise do not know it. Removed the sourceURL parameter from parse, since - that's now handled at a higher level. - - * kjs/grammar.y: Pass the last line number to didFinishParsing. - - * kjs/lexer.cpp: - (KJS::Lexer::setCode): Removed the sourceURL argument and the code to set m_sourceURL. - (KJS::Lexer::clear): Ditto. - * kjs/lexer.h: More of the same. - - * kjs/nodes.cpp: - (KJS::FunctionBodyNode::FunctionBodyNode): Get the source URL from the parser rather - than from the lexer. Removed unneeded call to setLoc, since the line numbers already - both default to -1. - -2007-12-08 Oliver Hunt - - Reviewed by Sam W. - - Split the ENABLE_SVG_EXPERIMENTAL_FEATURES flag into separate flags. - - Fixes Must disable SVG animation - Disable SVG filters on Mac to match Windows behavior - - Minor config changes. - - * Configurations/JavaScriptCore.xcconfig: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-12-07 Sam Weinig - - Reviewed by Darin. - - - Rename isSafeScript to allowsAccessFrom. - - * bindings/NP_jsobject.cpp: - (_isSafeScript): - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::allowsAccessFrom): Reverse caller/argument of allowsAccessFrom to match - the new call. - -2007-12-07 Geoffrey Garen - - Reviewed by Sam Weinig. - - Refactored variable access optimization: Removed the assumption that - the FunctionBodyNode holds the symbol table. - -2007-12-07 Geoffrey Garen - - Build fix: added #include. - - * kjs/nodes.cpp: - -2007-12-07 Geoffrey Garen - - Build fix: added #include. - - * kjs/interpreter.cpp: - -2007-12-07 Geoffrey Garen - - Build fix: added #include. - - * kjs/grammar.y: - -2007-12-07 Geoffrey Garen - - Build fix: added #include. - - * kjs/function_object.cpp: - -2007-12-07 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed crash seen running layout tests. - - Reverted a change I made earlier today. Added a comment to try to - discourage myself from making this mistake a third time. - - * kjs/function.cpp: - (KJS::ActivationImp::mark): - * kjs/function.h: - (KJS::ActivationImp::ActivationImpData::ActivationImpData): - -2007-12-07 Geoffrey Garen - - Reviewed by Sam Weinig. - - Refactored parsing of global code: Removed the assumption that - ProgramNode inherits from FunctionBodyNode from the parser. - - * kjs/Parser.cpp: - (KJS::Parser::parseProgram): - (KJS::Parser::parseFunctionBody): - (KJS::Parser::parse): - * kjs/Parser.h: - (KJS::Parser::didFinishParsing): - * kjs/function.cpp: - * kjs/grammar.y: - * kjs/nodes.h: - -2007-12-07 Geoffrey Garen - - Build fix: added JSVariableObject.cpp to the .pri file. - - * JavaScriptCore.pri: - -2007-12-07 Geoffrey Garen - - Build fix: added #include. - - * kjs/function.cpp: - -2007-12-07 Steve Falkenburg - - Re-named our B&I flag from BUILDBOT to PRODUCTION. - - Reviewed by Sam Weinig. - - * JavaScriptCore.vcproj/JavaScriptCore.make: - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: - -2007-12-07 Geoffrey Garen - - Build fix: removed stray name qualification. - - * kjs/function.h: - (KJS::ActivationImp::ActivationImp): - -2007-12-07 Geoffrey Garen - - Build fix: moved functions with qualified names outside of class - declaration. - - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::symbolTableGet): - (KJS::JSVariableObject::symbolTablePut): - -2007-12-07 Geoffrey Garen - - Reviewed by Sam Weinig. - - Next step in refactoring JSGlobalObject: Added JSVariableObject class, - and factored symbol-table-related code into it. (JSGlobalObject doesn't - use the symbol table code yet, though.) - - Layout and JS tests, and testapi, pass. SunSpider reports no regression. - -2007-12-07 Darin Adler - - Reviewed by Geoff. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16185 - jsRegExpCompile should not add implicit non-capturing bracket - - While this does not make SunSpider faster, it will make many regular - expressions a bit faster. - - * pcre/pcre_compile.cpp: Moved CompileData struct in here from the - header since it's private to this file. - (compile_branch): Updated for function name change. - (compile_bracket): Renamed from compile_regex, since, for one thing, - this does not compile an entire regular expression. - (calculateCompiledPatternLengthAndFlags): Removed unused item_count - local variable. Renamed CompileData to cd instead of compile_block - to be consistent with other functions. Added code to set the - needOuterBracket flag if there's at least one "|" at the outer level. - (jsRegExpCompile): Renamed CompileData to cd instead of compile_block - to be consistent with other functions. Removed unneeded "size" field - from the compiled regular expression. If no outer bracket is needed, - then use compile_branch to compile the regular expression. - - * pcre/pcre_internal.h: Removed the CompileData struct, which is now - private to pcre_compile.cpp. Removed the size member from JSRegExp. - -2007-12-06 Kevin Ollivier - - MSVC7 build fix due to a compiler bug with placement new and/or - templates and casting. - - Reviewed by Darin Adler. - - * wtf/Vector.h: - (WTF::::append): - -2007-12-06 Darin Adler - - Reviewed by Eric Seidel. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16321 - new RegExp("[\u0097]{4,6}", "gmy") crashes in DEBUG builds - - - Test: fast/js/regexp-oveflow.html - - * pcre/pcre_compile.cpp: - (calculateCompiledPatternLengthAndFlags): In the case where a single character - character class is optimized to not use a character class at all, the preflight - code was not setting the lastitemlength variable. - -2007-12-05 Mark Rowe - - Qt Windows build fix. Include the time-related headers in the correct place. - - * kjs/JSGlobalObject.cpp: - * kjs/interpreter.cpp: - -2007-12-05 Darin Adler - - Not reviewed; just undoing a previous commit. - - - remove earlier incorrect fix for http://bugs.webkit.org/show_bug.cgi?id=16220 - Crash opening www.news.com (CNet) - - The real bug was the backwards ?: in the compile function, which Geoff just - fixed. Rolling out the incorrect earlier fix. - - * pcre/pcre_compile.cpp: (calculateCompiledPatternLengthAndFlags): Take out - the unneeded preflight change. The regression test proves this is still working - fine, so the bug remains fixed. - -2007-12-01 Mark Rowe - - Build fix. Include headers before trying to use the things that they declare. - - * kjs/JSImmediate.cpp: - * kjs/nodes.cpp: - * kjs/object.cpp: - * kjs/object_object.cpp: - * kjs/regexp_object.cpp: - * kjs/string_object.cpp: - -2007-12-05 Geoffrey Garen - - Build fix: added some #includes. - - * kjs/JSImmediate.cpp: - -2007-12-05 Geoffrey Garen - - Build fix: added some #includes. - - * kjs/JSGlobalObject.cpp: - * kjs/JSImmediate.cpp: - -2007-12-05 Geoffrey Garen - - Build fix: Fixed #include spelling. - - * kjs/debugger.cpp: - -2007-12-05 Geoffrey Garen - - Build fix: added #include. - - * kjs/debugger.cpp: - -2007-12-05 Geoffrey Garen - - Build fix: added a forward declaration. - - * kjs/debugger.h: - -2007-12-05 Geoffrey Garen - - Build fix: added an #include. - - * kjs/error_object.cpp: - -2007-12-05 Geoffrey Garen - - Build fix: added an #include. - - * kjs/bool_object.cpp: - -2007-12-05 Geoffrey Garen - - Reviewed by Darin Adler. - - Third step in refactoring JSGlobalObject: Moved data members and - functions accessing data members from Interpreter to JSGlobalObject. - Changed Interpreter member functions to static functions. - - This resolves a bug in global object bootstrapping, where the global - ExecState could be used when uninitialized. - - This is a big change, but it's mostly code motion and renaming. - - Layout and JS tests, and testjsglue and testapi, pass. SunSpider reports - a .7% regression, but Shark sees no difference related to this patch, - and SunSpider reported a .7% speedup from an earlier step in this - refactoring, so I think it's fair to call that a wash. - -2007-12-05 Geoffrey Garen - - Reviewed by Darin Adler. (Or vice versa.) - - Fixed ASSERT during run-javascriptcore-tests. (Darin just added the - ASSERT, but the bug wasn't new.) - - * pcre/pcre_compile.cpp: - (compile_branch): The ?: operator here was backwards, causing us to - execute the loop too many times, adding stray KET opcodes to the - compiled regular expression. - -2007-12-05 Kevin McCullough - - Reviewed by Geoff. - - - Wait until local variable data is fully constructed before notifying the debugger of entering - or leaving a call frame. - - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - * kjs/nodes.cpp: - (KJS::FunctionBodyNode::execute): - -2007-12-05 Mark Rowe - - Reviewed by Oliver. - - Build fix for GCC 4.2. Cast via a union to avoid strict-aliasing issues. - - * wtf/FastMalloc.cpp: - (WTF::): - (WTF::getPageHeap): - -2007-12-05 Mark Rowe - - Reviewed by Darin. - - Fix testkjs in 64-bit. - - When built for 64-bit the TCMalloc spin lock uses pthread mutexes rather than a custom spin lock - implemented in assembly. If we fail to initialize the pthread mutex, attempts to lock or unlock - it will fail and trigger a call to abort. - - * wtf/FastMalloc.cpp: Initialize the spin lock so that we can later lock and unlock it. - * wtf/TCSpinLock.h: Add an Init method to the optimised spin lock. - -2007-12-04 Oliver Hunt - - Fix gtk build. - - * wtf/TCSystemAlloc.cpp: - -2007-12-03 Oliver Hunt - - Reviewed by Mark Rowe and Geoff Garen. - - Merge TCMalloc r38 - - It also result in a performance progression between 0.5% and - 0.9% depending on the test, however most if not all of this - gain will be consumed by the overhead involved in the later - change to release memory to the system. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/FastMalloc.cpp: - (WTF::KernelSupportsTLS): - (WTF::CheckIfKernelSupportsTLS): - (WTF::): - (WTF::ClassIndex): - (WTF::SLL_Next): - (WTF::SLL_SetNext): - (WTF::SLL_Push): - (WTF::SLL_Pop): - (WTF::SLL_PopRange): - (WTF::SLL_PushRange): - (WTF::SLL_Size): - (WTF::SizeClass): - (WTF::ByteSizeForClass): - (WTF::NumMoveSize): - (WTF::InitSizeClasses): - (WTF::AllocationSize): - (WTF::TCMalloc_PageHeap::GetSizeClassIfCached): - (WTF::TCMalloc_PageHeap::CacheSizeClass): - (WTF::TCMalloc_PageHeap::init): - (WTF::TCMalloc_PageHeap::New): - (WTF::TCMalloc_PageHeap::AllocLarge): - (WTF::TCMalloc_PageHeap::Carve): - (WTF::TCMalloc_PageHeap::Delete): - (WTF::TCMalloc_PageHeap::IncrementalScavenge): - (WTF::PagesToMB): - (WTF::TCMalloc_PageHeap::Dump): - (WTF::TCMalloc_PageHeap::GrowHeap): - (WTF::TCMalloc_PageHeap::Check): - (WTF::ReleaseFreeList): - (WTF::TCMalloc_PageHeap::ReleaseFreePages): - (WTF::TCMalloc_ThreadCache_FreeList::Push): - (WTF::TCMalloc_ThreadCache_FreeList::PushRange): - (WTF::TCMalloc_ThreadCache_FreeList::PopRange): - (WTF::TCMalloc_ThreadCache_FreeList::Pop): - (WTF::TCMalloc_Central_FreeList::length): - (WTF::TCMalloc_Central_FreeList::tc_length): - (WTF::TCMalloc_Central_FreeList::Init): - (WTF::TCMalloc_Central_FreeList::ReleaseListToSpans): - (WTF::TCMalloc_Central_FreeList::EvictRandomSizeClass): - (WTF::TCMalloc_Central_FreeList::MakeCacheSpace): - (WTF::TCMalloc_Central_FreeList::ShrinkCache): - (WTF::TCMalloc_Central_FreeList::InsertRange): - (WTF::TCMalloc_Central_FreeList::RemoveRange): - (WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe): - (WTF::TCMalloc_Central_FreeList::Populate): - (WTF::TCMalloc_ThreadCache::Init): - (WTF::TCMalloc_ThreadCache::Cleanup): - (WTF::TCMalloc_ThreadCache::Allocate): - (WTF::TCMalloc_ThreadCache::Deallocate): - (WTF::TCMalloc_ThreadCache::FetchFromCentralCache): - (WTF::TCMalloc_ThreadCache::ReleaseToCentralCache): - (WTF::TCMalloc_ThreadCache::Scavenge): - (WTF::TCMalloc_ThreadCache::PickNextSample): - (WTF::TCMalloc_ThreadCache::NewHeap): - (WTF::TCMalloc_ThreadCache::GetThreadHeap): - (WTF::TCMalloc_ThreadCache::GetCache): - (WTF::TCMalloc_ThreadCache::GetCacheIfPresent): - (WTF::TCMalloc_ThreadCache::InitTSD): - (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): - (WTF::TCMallocStats::ExtractStats): - (WTF::TCMallocStats::DumpStats): - (WTF::TCMallocStats::DumpStackTraces): - (WTF::TCMallocStats::TCMallocImplementation::MarkThreadIdle): - (WTF::TCMallocStats::TCMallocImplementation::ReleaseFreeMemory): - (WTF::TCMallocStats::TCMallocGuard::TCMallocGuard): - (WTF::TCMallocStats::TCMallocGuard::~TCMallocGuard): - (WTF::TCMallocStats::DoSampledAllocation): - (WTF::TCMallocStats::CheckCachedSizeClass): - (WTF::TCMallocStats::CheckedMallocResult): - (WTF::TCMallocStats::SpanToMallocResult): - (WTF::TCMallocStats::do_malloc): - (WTF::TCMallocStats::do_free): - (WTF::TCMallocStats::do_memalign): - (WTF::TCMallocStats::do_malloc_stats): - (WTF::TCMallocStats::do_mallopt): - (WTF::TCMallocStats::do_mallinfo): - (WTF::TCMallocStats::realloc): - (WTF::TCMallocStats::cpp_alloc): - (WTF::TCMallocStats::operator new): - (WTF::TCMallocStats::): - (WTF::TCMallocStats::operator new[]): - (WTF::TCMallocStats::malloc_stats): - (WTF::TCMallocStats::mallopt): - (WTF::TCMallocStats::mallinfo): - * wtf/TCPackedCache.h: Added. - (PackedCache::PackedCache): - (PackedCache::Put): - (PackedCache::Has): - (PackedCache::GetOrDefault): - (PackedCache::Clear): - (PackedCache::EntryToValue): - (PackedCache::EntryToUpper): - (PackedCache::KeyToUpper): - (PackedCache::UpperToPartialKey): - (PackedCache::Hash): - (PackedCache::KeyMatch): - * wtf/TCPageMap.h: - (TCMalloc_PageMap2::PreallocateMoreMemory): - * wtf/TCSystemAlloc.cpp: - (TCMalloc_SystemRelease): - * wtf/TCSystemAlloc.h: - -2007-12-04 Anders Carlsson - - Reviewed by Sam. - - Make isSafeScript const. - - * kjs/JSGlobalObject.h: - (KJS::JSGlobalObject::isSafeScript): - -2007-12-04 Darin Adler - - Reviewed by Geoff. - - - fix first part of http://bugs.webkit.org/show_bug.cgi?id=16220 - Crash opening www.news.com (CNet) - - Test: fast/js/regexp-overflow.html - - * pcre/pcre_compile.cpp: - (calculateCompiledPatternLengthAndFlags): Add room for the additional BRA/KET that - was generated in the compile code but not taken into account here. - -2007-12-03 Darin Adler - - Reviewed by Geoff. - - - fix http://bugs.webkit.org/show_bug.cgi?id=15618 - REGRESSION: Stack overflow/crash in KJS::equal (15618) - - Test: fast/js/recursion-limit-equal.html - - * kjs/operations.cpp: (KJS::equal): Check the exception from toPrimitive. - -2007-12-03 Dan Bernstein - - - fix a copy-and-paste-o - - * bindings/npruntime.cpp: - (_NPN_GetIntIdentifier): - -2007-12-03 Dan Bernstein - - Reviewed by Darin Adler. - - - fix an ASSERT when getIntIdentifier is called with 0 or -1 - - * bindings/npruntime.cpp: - (_NPN_GetIntIdentifier): We cannot use the hashmap for 0 and -1 since - they are the empty value and the deleted value. Instead, keep the - identifiers for those two integers in a static array. - -2007-12-02 Darin Adler - - Reviewed by Mitz. - - - fix http://bugs.webkit.org/show_bug.cgi?id=15848 - REGRESSION: Assertion failure viewing comments page on digg.com - - Test: fast/js/sparse-array.html - - * kjs/array_instance.cpp: - (KJS::ArrayInstance::inlineGetOwnPropertySlot): Check sparse array cutoff before looking - in hash map. Can't avoid the branch because we can't look for 0 in the hash. - (KJS::ArrayInstance::deleteProperty): Ditto. - -2007-12-02 Geoffrey Garen - - Build fix: added an #include. - - * kjs/collector.cpp: - -2007-12-02 Geoffrey Garen - - Reviewed by Eric Seidel. - - Second step in refactoring JSGlobalObject: moved virtual functions from - Interpreter to JSGlobalObject. - - Layout and JS tests pass. SunSpider reports a .7% speedup -- don't - believe his lies. - -2007-12-01 Alp Toker - - Reviewed by Adam Roben. - - http://bugs.webkit.org/show_bug.cgi?id=16228 - kJSClassDefinitionEmpty is not exported with JS_EXPORT - - Add JS_EXPORT to kJSClassDefinitionEmpty. - - Make the gcc compiler check take precedence over the WIN32||_WIN32 - check to ensure that symbols are exported on Windows when using gcc. - - Add a TODO referencing the bug about JS_EXPORT in the Win build - (http://bugs.webkit.org/show_bug.cgi?id=16227) - - Don't define JS_EXPORT as 'extern' when the compiler is unknown since - it would result in the incorrect expansion: - - extern extern const JSClassDefinition kJSClassDefinitionEmpty; - - (This was something we inherited from CFBase.h that doesn't make sense - for JSBase.h) - - * API/JSBase.h: - * API/JSObjectRef.h: - -2007-11-30 Geoffrey Garen - - Reviewed by Beth Dakin. - - Reversed the ownership relationship between Interpreter and JSGlobalObject. - Now, the JSGlobalObject owns the Interpreter, and top-level objects - that need the two to persist just protect the JSGlobalObject from GC. - - Global object bootstrapping looks a little odd right now, but it will - make much more sense soon, after further rounds of refactoring. - - * bindings/runtime_root.h: Made this class inherit from RefCounted, - to avoid code duplication. - - * kjs/collector.cpp: - (KJS::Collector::collect): No need to give special GC treatment to - Interpreters, since we mark their global objects, which mark them. - - * kjs/interpreter.cpp: - (KJS::Interpreter::mark): No need to mark our global object, since it - marks us. - * kjs/interpreter.h: Don't inherit from RefCounted -- JSGlobalObject - owns us directly. - - * kjs/testkjs.cpp: Modified to follow the new rules. - (createGlobalObject): - (runWithScripts): - -2007-11-30 Brent Fulgham - - Reviewed by Eric. - - * ChangeLog: - * pcre/pcre_compile.cpp: - (compile_branch): - -2007-11-30 Eric Seidel - - No review, build fix only. - - Fix uninitialized var warnings in release build. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * pcre/pcre_compile.cpp: - (compile_regex): - -2007-11-30 Darin Adler - - Reviewed by Adam Roben. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16207 - JavaScript regular expressions should match UTF-16 code units rather than characters - - SunSpider says this is 5.5% faster on the regexp test, 0.4% faste overall. - - Test: fast/js/regexp-non-bmp.html - - Renamed ANY_CHAR to NOT_NEWLINE to more-accurately reflect its meaning. - - * pcre/pcre_compile.cpp: - (compile_branch): Removed calls to the UTF-16 character accessor functions, replacing - them with simple pointer dereferences in some cases, and no code at all in others. - (calculateCompiledPatternLengthAndFlags): Ditto. - - * pcre/pcre_exec.cpp: - (match): Fixed indentation of some case labels (including all the BEGIN_OPCODE). - Removed calls to the UTF-16 character accessor functions, replacing them with simple - pointer dereferences in some cases, and no code at all in others. Also removed some - explicit UTF-16 support code in a few cases. Removed the unneeded "UTF-8" code path - in the ANY_CHAR repeat code, and in another case, eliminated the code to check against - end_subject in because it is already done outside the loop. - (jsRegExpExecute): - - * pcre/pcre_internal.h: Removed all the UTF-16 helper functions. - -2007-11-30 Eric Seidel - - Reviewed by darin. - - PCRE crashes under GuardMalloc - http://bugs.webkit.org/show_bug.cgi?id=16127 - check against patternEnd to make sure we don't walk off the end of the string - - * pcre/pcre_compile.cpp: - (compile_branch): - (calculateCompiledPatternLengthAndFlags): - -2007-11-30 Eric Seidel - - Reviewed by Maciej. - - Fix layout test regressions caused by r28186 - http://bugs.webkit.org/show_bug.cgi?id=16195 - change first_byte and req_byte back to shorts instead of chars - (I think PCRE stuffs information in the high bits) - - * pcre/pcre_internal.h: - -2007-11-29 Oliver Hunt - - Reviewed by Maciej and Darin. - - Make the JS collector work with multiple threads - - Under heavy contention it was possible the GC to suspend other - threads inside the pthread spinlock, which could lead to the GC - thread blocking on the pthread spinlock itself. - - We now determine and store each thread's stack base when it is - registered, thus removing the need for any calls to pthread_get_stackaddr_np - that needed the pthread spinlock. - - * kjs/collector.cpp: - (KJS::Collector::Thread::Thread): - (KJS::Collector::registerThread): - (KJS::Collector::markOtherThreadConservatively): - -2007-11-29 Adam Roben - - Windows build fix - - Removed some unreachable code (ironically, the code was some - ASSERT_NOT_REACHED()s). - - * pcre/pcre_compile.cpp: - (compile_branch): - * pcre/pcre_exec.cpp: - (match): - -2007-11-29 Eric Seidel - - Reviewed by Mark Rowe. - - Fix for --guard crash of fast/js/regexp-charclass-crash introduced by r28151. - - * pcre/pcre_compile.cpp: - (is_anchored): - -2007-11-28 Mark Rowe - - Gtk build fix. Rubber-stamped by Eric. - - * pcre/pcre_exec.cpp: - (match): Add braces around the body of the case statement to prevent - wanings about jumps across the initialization of a variable. - -2007-11-29 Eric Seidel - - Reviewed by Mark Rowe. - - Attempt to fix non-mac builds after PCRE cleanup. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCoreSources.bkl: - * pcre/pcre.pri: - -2007-11-28 Eric Seidel - - Reviewed by Maciej. - - Centralize code for subjectPtr adjustments using inlines, only ever check for a single - trailing surrogate (as UTF16 only allows one), possibly fix PCRE bugs involving char - classes and garbled UTF16 strings. - - * pcre/pcre_exec.cpp: - (match): - (jsRegExpExecute): - * pcre/pcre_internal.h: - (getPreviousChar): - (movePtrToPreviousChar): - (movePtrToNextChar): - (movePtrToStartOfCurrentChar): - -2007-11-28 Eric Seidel - - Reviewed by Maciej. - - change getChar* functions to return result and push 'c' into local scopes for clarity - - * pcre/pcre_compile.cpp: - (compile_branch): - (calculateCompiledPatternLengthAndFlags): - * pcre/pcre_exec.cpp: - (match): - * pcre/pcre_internal.h: - (getChar): - (getCharAndAdvance): - (getCharAndLength): - (getCharAndAdvanceIfSurrogate): - -2007-11-28 Eric Seidel - - Reviewed by Sam. - - Comment cleanup - - * pcre/pcre_exec.cpp: - (match): - -2007-11-26 Eric Seidel - - Reviewed by Sam. - - Further cleanups to calculateCompiledPatternLengthAndFlags - - * pcre/pcre_compile.cpp: - (calculateCompiledPatternLengthAndFlags): - * pcre/pcre_internal.h: - -2007-11-26 Eric Seidel - - Reviewed by Sam. - - Give consistent naming to the RegExp options/compile flags - - * pcre/pcre_compile.cpp: - (compile_branch): - (is_anchored): - (find_firstassertedchar): - (printCompiledRegExp): - (jsRegExpCompile): - * pcre/pcre_exec.cpp: - (jsRegExpExecute): - * pcre/pcre_internal.h: - -2007-11-26 Eric Seidel - - Reviewed by Sam. - - Pull first_byte and req_byte optimizations out into separate static funtions, SunSpider reported this as a win. - - * pcre/pcre_exec.cpp: - (tryFirstByteOptimization): - (tryRequiredByteOptimization): - (jsRegExpExecute): - * pcre/pcre_internal.h: - -2007-11-26 Eric Seidel - - Reviewed by Maciej. - - give PCRE_MULTILINE a better name: OptionMatchAcrossMultipleLines - - * pcre/pcre_compile.cpp: - (compile_branch): - (is_anchored): - (printCompiledRegExp): - (jsRegExpCompile): - * pcre/pcre_exec.cpp: - (jsRegExpExecute): - * pcre/pcre_internal.h: - -2007-11-26 Eric Seidel - - Reviewed by Oliver. - - Deprecate jsRegExpExecute's offset-vector fallback code - - * pcre/pcre_exec.cpp: - (jsRegExpExecute): - -2007-11-26 Eric Seidel - - Reviewed by Maciej. - - Make cur_is_word and prev_is_word locals, and change OP_ANY to OP_ANY_CHAR for clarity - - * pcre/pcre_compile.cpp: - (find_fixedlength): - (compile_branch): - (canApplyFirstCharOptimization): - * pcre/pcre_exec.cpp: - (match): - * pcre/pcre_internal.h: - -2007-11-26 Eric Seidel - - Reviewed by Mitz & Maciej. - - Change _NC operators to use _IGNORING_CASE for clarity - - * pcre/pcre_compile.cpp: - (find_fixedlength): - (compile_branch): - (find_firstassertedchar): - * pcre/pcre_exec.cpp: - (match): - * pcre/pcre_internal.h: - -2007-11-26 Eric Seidel - - Reviewed by Mitz. - - Remove branch from return - - * pcre/pcre_compile.cpp: - (compile_branch): - * pcre/pcre_exec.cpp: - (match): - -2007-11-26 Eric Seidel - - Reviewed by Maciej. - - Add repeatInformationFromInstructionOffset inline - - * pcre/pcre_exec.cpp: - (repeatInformationFromInstructionOffset): - (match): - -2007-11-26 Eric Seidel - - Reviewed by Maciej. - - Remove no longer used error code JSRegExpErrorMatchLimit - - * kjs/regexp.cpp: - (KJS::RegExp::match): - * pcre/pcre.h: - * pcre/pcre_internal.h: - -2007-11-26 Eric Seidel - - Reviewed by Sam. - - Make i locally scoped for better code clarity - - * pcre/pcre_exec.cpp: - (match): - -2007-11-26 Eric Seidel - - Reviewed by Maciej. - - Give subjectPtr and instructionPtr sane names, reduce size of MatchFrame for a 0.2% speedup. - - * pcre/pcre_compile.cpp: - (compile_branch): - (calculateCompiledPatternLengthAndFlags): - * pcre/pcre_exec.cpp: - (match_ref): - (MatchStack::pushNewFrame): - (getUTF8CharAndIncrementLength): - (match): - * pcre/pcre_internal.h: - (getChar): - (getCharAndAdvance): - (getCharAndLength): - (getCharAndAdvanceIfSurrogate): - * pcre/pcre_xclass.cpp: - (getUTF8CharAndAdvancePointer): - -2007-11-26 Eric Seidel - - Reviewed by Sam. - - Small speedup (0.7%) by simplifying canUseStackBufferForNextFrame() check - - * pcre/pcre_exec.cpp: - (MatchStack::MatchStack): - (MatchStack::popCurrentFrame): - -2007-11-25 Eric Seidel - - Reviewed by Sam. - - Lower MATCH_LIMIT_RECURSION to more sane levels to prevent hangs on run-javascriptcore-tests - - * pcre/pcre_internal.h: - -2007-11-25 Eric Seidel - - Reviewed by Maciej. - - Remove match_is_group variable for another 5% speedup - - * pcre/pcre_compile.cpp: - * pcre/pcre_exec.cpp: - (startNewGroup): - (match): - -2007-11-28 Eric Seidel - - Reviewed by Sam. - - Abstract frame variables into locals and args - - * pcre/pcre_compile.cpp: - (compile_branch): - * pcre/pcre_exec.cpp: - (match): - * pcre/pcre_internal.h: - -2007-11-28 Eric Seidel - - Reviewed by Sam. - - Section off MatchData arguments into args struct - - * pcre/pcre_exec.cpp: - (MatchStack::pushNewFrame): - (match): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - Remove redundant eptrblock struct - - * pcre/pcre_exec.cpp: - (MatchStack::pushNewFrame): - (match): - -2007-11-24 Eric Seidel - - Reviewed by Maciej. - - Remove redundant match_call_count and move recursion check out of super-hot code path - SunSpider says this is at least an 8% speedup for regexp. - - * pcre/pcre_exec.cpp: - (MatchStack::MatchStack): - (MatchStack::pushNewFrame): - (MatchStack::popCurrentFrame): - (MatchStack::popAllFrames): - (match): - (jsRegExpExecute): - * pcre/pcre_internal.h: - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - Get rid of GETCHAR* macros, replacing them with better named inlines - - * pcre/pcre_compile.cpp: - (compile_branch): - (calculateCompiledPatternLengthAndFlags): - * pcre/pcre_exec.cpp: - (match): - * pcre/pcre_internal.h: - (getCharAndAdvance): - (getCharAndLength): - (getCharAndAdvanceIfSurrogate): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - Further cleanup GET/PUT inlines - - * pcre/pcre_internal.h: - (putOpcodeValueAtOffset): - (getOpcodeValueAtOffset): - (putOpcodeValueAtOffsetAndAdvance): - (put2ByteOpcodeValueAtOffset): - (get2ByteOpcodeValueAtOffset): - (put2ByteOpcodeValueAtOffsetAndAdvance): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - Give GET, PUT better names, and add (poor) moveOpcodePtrPastAnyAlternateBranches - - * pcre/pcre_compile.cpp: - (firstSignificantOpCodeSkippingAssertions): - (find_fixedlength): - (complete_callout): - (compile_branch): - (compile_regex): - (is_anchored): - (canApplyFirstCharOptimization): - (find_firstassertedchar): - * pcre/pcre_exec.cpp: - (match): - * pcre/pcre_internal.h: - (putOpcodeValueAtOffset): - (getOpcodeValueAtOffset): - (putOpcodeValueAtOffsetAndAdvance): - (put2ByteOpcodeValueAtOffset): - (get2ByteOpcodeValueAtOffset): - (moveOpcodePtrPastAnyAlternateBranches): - * pcre/pcre_ucp_searchfuncs.cpp: - (_pcre_ucp_othercase): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - Add inlines for toLowerCase, isWordChar, isSpaceChar for further regexp speedup - - * pcre/pcre_compile.cpp: - (compile_branch): - (jsRegExpCompile): - * pcre/pcre_exec.cpp: - (match): - (jsRegExpExecute): - * pcre/pcre_internal.h: - (toLowerCase): - (flipCase): - (classBitmapForChar): - (charTypeForChar): - (isWordChar): - (isSpaceChar): - (CompileData::CompileData): - * pcre/pcre_xclass.cpp: - (_pcre_xclass): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - cleanup _pcre_ucp_othercase - - * pcre/pcre_ucp_searchfuncs.cpp: - (_pcre_ucp_othercase): - -2007-11-24 Eric Seidel - - Reviewed by Maciej. - - Use better variable names for case ignoring options - - * pcre/pcre_compile.cpp: - (compile_branch): - (find_firstassertedchar): - (printCompiledRegExp): - (jsRegExpCompile): - * pcre/pcre_exec.cpp: - (match_ref): - (match): - (jsRegExpExecute): - * pcre/pcre_internal.h: - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - split first_significant_code into two simpler functions - - * pcre/pcre_compile.cpp: - (firstSignificantOpCode): - (firstSignificantOpCodeSkippingAssertions): - (is_anchored): - (canApplyFirstCharOptimization): - (find_firstassertedchar): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - clean up is_counted_repeat - - * pcre/pcre_compile.cpp: - (is_counted_repeat): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - clean up check_escape - - * pcre/pcre_compile.cpp: - (check_escape): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - Reformat find_fixedlength - - * pcre/pcre_compile.cpp: - (find_fixedlength): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - reformat is_anchored - - * pcre/pcre_compile.cpp: - (is_anchored): - -2007-11-24 Eric Seidel - - Reviewed by Maciej. - - Remove unused function could_be_empty_branch - - * pcre/pcre_compile.cpp: - (first_significant_code): - (find_fixedlength): - (compile_branch): - (canApplyFirstCharOptimization): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - Pass around MatchData objects by reference - - * pcre/pcre_exec.cpp: - (pchars): - (match_ref): - (match): - (jsRegExpExecute): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - give PCRE_STARTLINE a better name and rename match_data to MatchData - - * pcre/pcre_compile.cpp: - (compile_branch): - (canApplyFirstCharOptimization): - (find_firstassertedchar): - (printCompiledRegExp): - (jsRegExpCompile): - * pcre/pcre_exec.cpp: - (pchars): - (jsRegExpExecute): - * pcre/pcre_internal.h: - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - Clean up find_firstassertedchar - - * pcre/pcre_compile.cpp: - (get_othercase_range): - (find_firstassertedchar): - (calculateCompiledPatternLengthAndFlags): - -2007-11-24 Eric Seidel - - Reviewed by Tim Hatcher. - - Pass around CompileData& instead of CompileData* - - * pcre/pcre_compile.cpp: - (compile_branch): - (jsRegExpCompile): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - Clean up compile_branch, move _pcre_ord2utf8, and rename CompileData - - * JavaScriptCore.xcodeproj/project.pbxproj: - * pcre/pcre_compile.cpp: - (_pcre_ord2utf8): - (calculateCompiledPatternLengthAndFlags): - (jsRegExpCompile): - * pcre/pcre_internal.h: - * pcre/pcre_ord2utf8.cpp: Removed. - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - removing more macros - - * pcre/pcre_compile.cpp: - (could_be_empty_branch): - (compile_branch): - (calculateCompiledPatternLengthAndFlags): - * pcre/pcre_exec.cpp: - (match): - (jsRegExpExecute): - * pcre/pcre_internal.h: - * pcre/pcre_xclass.cpp: - -2007-11-24 Eric Seidel - - Reviewed by Maciej. - - clean up formating in compile_branch - - * pcre/pcre_compile.cpp: - (compile_branch): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - Fix spacing for read_repeat_counts - - * pcre/pcre_compile.cpp: - (read_repeat_counts): - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - Get rid of PCRE custom char types - - * pcre/pcre_compile.cpp: - (check_escape): - (complete_callout): - (compile_branch): - (compile_regex): - (calculateCompiledPatternLengthAndFlags): - (jsRegExpCompile): - * pcre/pcre_exec.cpp: - (match_ref): - (match): - (jsRegExpExecute): - * pcre/pcre_internal.h: - -2007-11-24 Eric Seidel - - Reviewed by Sam. - - reformat get_othercase_range - - * pcre/pcre_compile.cpp: - (get_othercase_range): - -2007-11-24 Eric Seidel - - Reviewed by Maciej. - - Remove register keyword and more cleanup - - * pcre/pcre_compile.cpp: - (find_fixedlength): - (compile_branch): - (is_anchored): - (is_startline): - (find_firstassertedchar): - (calculateCompiledPatternLengthAndFlags): - (jsRegExpCompile): - * pcre/pcre_exec.cpp: - (MatchStack::canUseStackBufferForNextFrame): - (MatchStack::allocateNextFrame): - (MatchStack::pushNewFrame): - (MatchStack::frameIsStackAllocated): - (MatchStack::popCurrentFrame): - (MatchStack::unrollAnyHeapAllocatedFrames): - (getUTF8CharAndIncrementLength): - (match): - (jsRegExpExecute): - * pcre/pcre_internal.h: - (PUT2INC): - (isLeadingSurrogate): - (isTrailingSurrogate): - (decodeSurrogatePair): - (getChar): - * pcre/pcre_ord2utf8.cpp: - (_pcre_ord2utf8): - * pcre/pcre_xclass.cpp: - (getUTF8CharAndAdvancePointer): - (_pcre_xclass): - -2007-11-24 Eric Seidel - - Reviewed by Maciej. - - Clean up jsRegExpExecute - - * pcre/pcre_compile.cpp: - (returnError): - (jsRegExpCompile): - * pcre/pcre_exec.cpp: - (jsRegExpExecute): - * pcre/pcre_internal.h: - -2007-11-29 Oliver Hunt - - Reviewed by Geoff. - - Merging updated system alloc and spinlock code from r38 of TCMalloc. - - This is needed as a precursor to the merge of TCMalloc proper. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::GrowHeap): - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::TCMalloc_SpinLock): - (TCMalloc_SpinLock::): - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SpinLock::IsHeld): - * wtf/TCSystemAlloc.cpp: - (TrySbrk): - (TryMmap): - (TryVirtualAlloc): - (TryDevMem): - (TCMalloc_SystemAlloc): - * wtf/TCSystemAlloc.h: - -2007-11-28 Brady Eidson - - Reviewed by Geoff - - Add copyKeysToVector utility, mirroring copyValuesToVector - Also change the copyValuesToVector implementation to be a little more attractive - - * wtf/HashMap.h: - (WTF::copyKeysToVector): - (WTF::copyValuesToVector): - -2007-11-27 Alp Toker - - Reviewed by Mark Rowe. - - Add a list of public JavaScriptCore headers for installation. - - This follows the convention used for the Qt and GTK+ header lists. - - * headers.pri: Added. - -2007-11-27 Alp Toker - - Prospective MSVC build fix. - - Roll back dllexport/dllimport support for now. - - * API/JSBase.h: - -2007-11-27 Alp Toker - - Reviewed by Maciej. - - http://bugs.webkit.org/show_bug.cgi?id=15569 - [gtk] GTK JavaScriptCore needs to export symbols for JSC API and WTF - - Introduce JS_EXPORT to mark symbols to be exported as public API. - - Export all public symbols in the JavaScriptCore C API. - - This matches conventions for exporting symbols set by the CF and CG - frameworks. - - * API/JSBase.h: - * API/JSContextRef.h: - * API/JSObjectRef.h: - * API/JSStringRef.h: - * API/JSStringRefBSTR.h: - * API/JSStringRefCF.h: - * API/JSValueRef.h: - -2007-11-27 Anders Carlsson - - Reviewed by Adam. - - Make PropertyNameArray and ScopeChain COMEnumVariant friendly. - - * kjs/PropertyNameArray.cpp: - (KJS::PropertyNameArray::swap): - Implement PropertyNameArray::swap. - - * kjs/PropertyNameArray.h: - Add ValueType typedef. Replace PropertyNameArrayIterator with - PropertyNameArray::const_iterator. - - * kjs/nodes.cpp: - (KJS::ForInNode::execute): - * kjs/scope_chain.cpp: - (KJS::ScopeChain::print): - Update for changes to PropertyNameArray. - - * kjs/scope_chain.h: - Add const_iterator and ValueType typedef. - -2007-11-27 Anders Carlsson - - Reviewed by Darin. - - Add a ValueType typedef. - - * wtf/Vector.h: - -2007-11-26 Darin Adler - - Reviewed by Mitz. - - - fix http://bugs.webkit.org/show_bug.cgi?id=16096 - REGRESSION (r26653-r26699): Plaxo.com addressbook does not load in webkit nightlies - - Test: fast/js/regexp-overflow.html - - * pcre/pcre_compile.cpp: (calculateCompiledPatternLengthAndFlags): - Removed a stray "ptr++" that I added by accident when merging the - changes between PCRE 6.4 and 6.5. - -2007-11-26 Geoffrey Garen - - Reviewed by Kevin McCullough. - - Fixed REGRESSION (r27126): Drosera does not - show variables (can't enumerate ActivationImp properties) - - Implemented a custom ActivationImp::getPropertyNames, since - ActivationImp now uses a custom property storage mechanism for local - variables. - - * kjs/function.cpp: - (KJS::ActivationImp::getPropertyNames): - * kjs/function.h: - -2007-11-26 Alp Toker - - GTK+/Qt/Wx build fix for breakage introduced in r28039. - - * ForwardingHeaders/JavaScriptCore/JSRetainPtr.h: Added. - -2007-11-24 Laszlo Gombos - - Reviewed by Maciej Stachowiak. - - Fix minor compiler warning (GCC 4.1.3) - - * pcre/pcre_internal.h: - * pcre/pcre_ucp_searchfuncs.cpp: - (_pcre_ucp_othercase): - -2007-11-25 Mark Rowe - - Reviewed by Dan Bernstein. - - Fix http://bugs.webkit.org/show_bug.cgi?id=16129 - Bug 16129: REGRESSION (r27761-r27811): malloc error while visiting http://mysit.es (crashes release build) - - * pcre/pcre_compile.cpp: Change errorcode to be passed by reference so that any error code is propagated - to our caller like they expect. - -2007-11-23 Kevin Ollivier - - MSVC7 build fix. (rand_s doesn't exist there) - - Reviewed by Adam Roben. - - * kjs/config.h: - * wtf/MathExtras.h: - -2007-11-23 Kevin Ollivier - - wx build fix. Move WX_PYTHON logic into project build settings, - add WebKitLibraries dirs on Win, and explicitly include JSCore - headers in testkjs rather than getting them from a template. - (Include dir order of JSCore/WTF and ICU headers is important due - to wtf/unicode/utf8.h.) - - * jscore.bkl: - -2007-11-23 Simon Hausmann - - Reviewed by George Staikos . - - Fix make (dist)clean on Windows. - - OBJECTS_DIR_WTR does not exist anymore, use GENERATED_SOURCES_DIR. - - - * JavaScriptCore.pri: - * pcre/pcre.pri: - -2007-11-22 Simon Hausmann - - Reviewed by George. - - Make the directory of where to put the generated sources configurable through the GENERATED_SOURCE_DIR variable - - * JavaScriptCore.pri: - * pcre/pcre.pri: - -2007-11-22 Simon Hausmann - - Reviewed by George. - - Centralize the setup for all the extra compilers in a addExtraCompiler function. - - This allows adding a "generated_files" target that builds all generated files using "make generated_files". - For the build inside Qt we do not generate actual rules for the extra compilers but instead - do the variable substitution of compiler.output manually and add the generated sources to SOURCES. - - * JavaScriptCore.pri: - * pcre/pcre.pri: - -2007-11-20 Mark Rowe - - Reviewed by Tim Hatcher. - - Need to resolve new GCC 4.2 warnings - - Fix all warnings emitted by GCC 4.2 when building JavaScriptCore. This allows builds with - -Werror to succeed. At present they will crash when executed due to code that is not safe - under strict aliasing (). - - * Configurations/Base.xcconfig: Remove the -Wno-long-double flag. - * kjs/date_object.cpp: - (KJS::formatTime): Test whether the stack-allocated string is empty rather than at a non-null address. - * kjs/dtoa.cpp: - (Bigint::): Tweak formatting to silence warnings. - * pcre/pcre_exec.cpp: - (match): Tweak formatting to silence warnings - * wtf/Assertions.cpp: Add printf format attribute to functions that warrant it. - * wtf/Assertions.h: Ditto. - -2007-11-19 Kevin Ollivier - - wx port build fix (wx headers include ctype functions). - - * kjs/config.h: - -2007-11-19 Kevin Ollivier - - Remove outdated and unused Windows port files. - - Reviewed by Adam Roben. - - * Makefile.vc: Removed. - * README-Win32.txt: Removed. - -2007-11-18 Eric Seidel - - Reviewed by Oliver. - - * tests/mozilla/jsDriver.pl: exit non-0 when user aborts test run - -2007-11-17 Mark Rowe - - Reviewed by Darin Adler. - - Fix: REGRESSION: testapi exits with assertion failure in debug build - JSGlobalContextCreate throws away globalObjectClass's prototype - http://bugs.webkit.org/show_bug.cgi?id=16033 - - Split Interpreter's initialization into two distinct steps: the creation of the global prototypes - and constructors, and storing them on the global object. This allows JSClassRef's passed to - JSGlobalContextCreate to be instantiated with the correct prototype. - - * API/JSCallbackObject.cpp: Assert at compile-time that the custom global object will fit in a collector cell. - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (KJS::::JSCallbackObject): - (KJS::::init): - * API/JSContextRef.cpp: - (JSGlobalContextCreate): Construct and set the interpreter's global object separately. When globalObjectClass - is passed we need to set the interpreter's global object before doing the JSCallbackObject's initialization to - prevent any JSObjectInitializeCallback's being invoked before a global object is set. - * API/testapi.c: - (globalObject_initialize): Test the object passed in is correct and that it has the expected global properties. - (globalObject_get): - (globalObject_set): - (main): - * API/testapi.js: Test that any static properties exposed by the global object's custom class are found. - * JavaScriptCore.exp: - * bindings/testbindings.cpp: - (main): Update for changes in Interpreter method signatures. - * bindings/testbindings.mm: - (main): Ditto. - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - (KJS::ExecState::mark): - (KJS::ExecState::setGlobalObject): - * kjs/ExecState.h: Rename scope to m_scopeChain. - * kjs/interpreter.cpp: - (KJS::Interpreter::Interpreter): - (KJS::Interpreter::init): - (KJS::Interpreter::globalObject): - (KJS::Interpreter::setGlobalObject): - (KJS::Interpreter::resetGlobalObjectProperties): - (KJS::Interpreter::createObjectsForGlobalObjectProperties): - (KJS::Interpreter::setGlobalObjectProperties): Switch to using putDirect to ensure that the global object's put method - cannot interfere with setting of the global properties. This prevents a user-written JSClassRef from attempting to - call back into JavaScript from the initialization of the global object's members. - * kjs/interpreter.h: - * kjs/testkjs.cpp: - (setupInterpreter): Update for changes in Interpreter method signatures. - -2007-11-17 Mark Rowe - - Reviewed by Sam Weinig. - - Prevent testapi from reporting false leaks. Clear out local variables pointing at - JSObjectRefs to allow their values to be collected. - - * API/testapi.c: - (main): - -2007-11-17 Mark Rowe - - Reviewed by Sam Weinig. - - Prevent testapi from crashing if testapi.js can not be found by nil-checking the result of createStringWithContentsOfFile. - - * API/testapi.c: - (main): - -2007-11-17 Alp Toker - - Reviewed by Eric. - - http://bugs.webkit.org/show_bug.cgi?id=16032 - JS minidom is not portable - - Use a plain UTF-8 string instead of a CFString. - - Print to stdout, not stderr like CFShow() would have done, since that - behaviour seems unintentional. - - * API/minidom.c: - (main): - -2007-11-17 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2007-11-16 Mark Rowe - - Windows build fix. - - * kjs/lexer.cpp: - (KJS::Lexer::record8): - -2007-11-16 Mark Rowe - - Reviewed by Eric. - - Replace strings, identifier, buffer8 and buffer16 members of Lexer with vectors. - SunSpider claims this is a 0.7% speedup. - - * kjs/lexer.cpp: - (KJS::Lexer::Lexer): - (KJS::Lexer::lex): - (KJS::Lexer::record8): - (KJS::Lexer::record16): - (KJS::Lexer::scanRegExp): - (KJS::Lexer::clear): - (KJS::Lexer::makeIdentifier): - (KJS::Lexer::makeUString): - * kjs/lexer.h: - * kjs/ustring.cpp: - (KJS::UString::UString): Add a convenience constructor that takes a const Vector&. - * kjs/ustring.h: - -2007-11-16 Adam Roben - - Windows build fix - - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Add a new include path - and ignore the int -> bool conversion warning. - -2007-11-16 Alexey Proskuryakov - - Fix Windows debug build. - Rubber-stamped by Eric - - * pcre/pcre_exec.cpp: (match): Removed ASSERT_NOT_REACHED assertions that were making MSVC - complain about unreachable code. - -2007-11-15 Mark Rowe - - Gtk build fix. - - * kjs/Parser.cpp: - -2007-11-15 Mark Rowe - - Mac build and header search path sanity fix. - - Reviewed by Sam Weinig and Tim Hatcher. - - Move base setting for HEADER_SEARCH_PATHS into Base.xcconfig, and extend - it in JavaScriptCore.xcconfig. This removes the need to override it on a - per-target basis inside the .xcodeproj file. - - * Configurations/Base.xcconfig: - * Configurations/JavaScriptCore.xcconfig: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-11-15 Mark Rowe - - Qt build fix. - - * kjs/Parser.h: - -2007-11-15 Geoffrey Garen - - Reviewed by Eric Seidel. - - Another round of grammar / parsing cleanup. - - 1. Created distinct parser calls for parsing function bodies vs - programs. This will help later with optimizing global variable access. - - 2. Turned Parser into a singleton. Cleaned up Lexer's singleton - interface. - - 3. Modified Lexer to free a little more memory when done lexing. (Added - FIXMEs for similar issues that I didn't fix.) - - 4. Changed Lexer::makeIdentifier and Lexer::makeUString to start - respecting the arguments passed to them. (No behavior change, but this - problem could have caused serious problems for an unsuspecting user of - these functions.) - - 5. Removed KJS_DEBUG_MEM because it was bit-rotted. - - 6. Removed Parser::prettyPrint because the same work was simpler to do - at the call site. - - 7. Some renames: - - "Parser::accept" => "Parser::didFinishParsing" - "Parser::sid" => "Parser::m_sourceID" - "Lexer::doneParsing" => "Lexer::clear" - "sid" => "sourceId" - "lineno" => "lineNo" - - * JavaScriptCore.exp: - * kjs/Parser.cpp: - (KJS::Parser::Parser): - (KJS::Parser::parseProgram): - (KJS::Parser::parseFunctionBody): - (KJS::Parser::parse): - (KJS::Parser::didFinishParsing): - (KJS::parser): - * kjs/Parser.h: - (KJS::Parser::sourceId): - * kjs/function.cpp: - (KJS::GlobalFuncImp::callAsFunction): - * kjs/function_object.cpp: - (FunctionObjectImp::construct): - * kjs/grammar.y: - * kjs/interpreter.cpp: - (KJS::Interpreter::checkSyntax): - (KJS::Interpreter::evaluate): - * kjs/interpreter.h: - * kjs/lexer.cpp: - (kjsyylex): - (KJS::lexer): - (KJS::Lexer::Lexer): - (KJS::Lexer::~Lexer): - (KJS::Lexer::scanRegExp): - (KJS::Lexer::doneParsing): - (KJS::Lexer::makeIdentifier): - (KJS::Lexer::makeUString): - * kjs/lexer.h: - (KJS::Lexer::pattern): - (KJS::Lexer::flags): - (KJS::Lexer::sawError): - * kjs/nodes.cpp: - (KJS::Node::Node): - (KJS::FunctionBodyNode::FunctionBodyNode): - * kjs/nodes.h: - * kjs/testkjs.cpp: - (prettyPrintScript): - (kjsmain): - * kjs/ustring.cpp: - * kjs/ustring.h: - -2007-11-15 Oliver Hunt - - Reviewed by Darin. - - REGRESSION: All SourceElements and their children leak after a syntax error - - Add a stub node to maintain the Vector of SourceElements until assignment. - - * kjs/grammar.y: - * kjs/nodes.h: - (KJS::SourceElementsStub::SourceElementsStub): - (KJS::SourceElementsStub::append): - (KJS::SourceElementsStub::release): - (KJS::SourceElementsStub::): - (KJS::SourceElementsStub::precedence): - -2007-11-15 Eric Seidel - - Reviewed by Sam. - - Abstract most of RMATCH into MatchStack functions. - - SunSpider claims this, combined with the last 2 patches was a 1% speedup, 10% for dna-regexp. - - * pcre/pcre_exec.cpp: - (MatchStack::canUseStackBufferForNextFrame): - (MatchStack::allocateNextFrame): - (MatchStack::pushNewFrame): - (MatchStack::frameIsStackAllocated): - (MatchStack::popCurrentFrame): - (MatchStack::unrollAnyHeapAllocatedFrames): - (match): - -2007-11-15 Eric Seidel - - Reviewed by Sam. - - Remove RETURN_ERROR, add MatchStack - - * pcre/pcre_exec.cpp: - (MatchStack::MatchStack): - (MatchStack::unrollAnyHeapAllocatedFrames): - (matchError): - (match): - -2007-11-15 Eric Seidel - - Reviewed by Sam. - - Clean up match function to match WebKit style - - * JavaScriptCore.xcodeproj/project.pbxproj: - * pcre/pcre_exec.cpp: - (match): - -2007-11-15 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore.make: - -2007-11-14 Alexey Proskuryakov - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=15982 - Improve JSString UTF-8 decoding - - * API/JSStringRef.cpp: - (JSStringCreateWithUTF8CString): Use strict decoding, return 0 on error. - - * wtf/unicode/UTF8.cpp: - (WTF::Unicode::convertUTF16ToUTF8): - (WTF::Unicode::convertUTF8ToUTF16): - * wtf/unicode/UTF8.h: - Made these function names start with a lower case letter. - - * kjs/ustring.cpp: (KJS::UString::UTF8String): Updated for the above renaming. - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback): Renamed to highlight the difference - from convertUTF8ToUTF16 in wtf/unicode. - (KJS::Bindings::convertNPStringToUTF16): Updated for the above renaming. - (KJS::Bindings::identifierFromNPIdentifier): Ditto. - * bindings/c/c_utility.h: Made convertUTF8ToUTF16WithLatin1Fallback() a file static. - -2007-11-14 Sam Weinig - - Rubber-stamped by Anders. - - Fix the Xcode project file after it was messed up in r27402. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-11-14 Eric Seidel - - Reviewed by Oliver. - - More PCRE style cleanup. - - * pcre/pcre_compile.cpp: - (compile_regex): - -2007-11-14 Adam Roben - - Clean up the bison conflict checking script - - Reviewed by Geoff. - - * DerivedSources.make: - -2007-11-14 Eric Seidel - - Reviewed by Geoff. - - Another round of PCRE cleanups: inlines - - SunSpider claims that this, combined with my previous PCRE cleanup were a 0.7% speedup, go figure. - - * pcre/pcre_compile.cpp: - (jsRegExpCompile): - * pcre/pcre_exec.cpp: - (match): - (jsRegExpExecute): - * pcre/pcre_internal.h: - (PUT): - (GET): - (PUT2): - (GET2): - (isNewline): - -2007-11-14 Eric Seidel - - Reviewed by Sam. - - Give PCRE a (small) bath. - Fix some formating and break things off into separate functions - http://bugs.webkit.org/show_bug.cgi?id=15993 - - * pcre/pcre_compile.cpp: - (calculateCompiledPatternLengthAndFlags): - (printCompiledRegExp): - (returnError): - (jsRegExpCompile): - * pcre/pcre_internal.h: - (compile_data::compile_data): - -2007-11-14 Geoffrey Garen - - Reviewed by Eric Seidel. - - Cleaned up the JavaScript grammar a bit. - - 1. Changed BlockNode to always hold a child vector (which may be empty), - eliminating a few NULL-check branches in the common execution case. - - 2. Changed the Block production to correctly report its starting and - ending line numbers to the debugger. (It used to report its ending line - as its starting line.) Also, removed duplicate line-reporting code - inside the BlockNode constructor. - - 3. Moved curly braces up from FunctionBody production into parent - productions. (I had to move the line number reporting code, too, since - it depends on the location of the curly braces.) This matches the ECMA - spec more closely, and makes some future changes I plan easier. - - 4. Fixed statementList* convenience functions to deal appropriately with - empty Vectors. - - SunSpider reports a small and statistically insignificant speedup. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::statementListPushFIFO): - (KJS::statementListGetDeclarations): - (KJS::statementListInitializeDeclarationStack): - (KJS::statementListInitializeVariableAccessStack): - (KJS::BlockNode::BlockNode): - (KJS::BlockNode::optimizeVariableAccess): - (KJS::BlockNode::getDeclarations): - (KJS::BlockNode::execute): - (KJS::FunctionBodyNode::initializeDeclarationStacks): - (KJS::FunctionBodyNode::optimizeVariableAccess): - -2007-11-13 Anders Carlsson - - Add RefCounted.h (And remove Shared.h) - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2007-11-13 Geoffrey Garen - - Build fix. - - * kjs/regexp.h: - -2007-11-13 Geoffrey Garen - - Reviewed by Anders Carlsson. - - Renamed Shared to RefCounted. - - * API/JSClassRef.h: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/interpreter.h: - * kjs/regexp.h: - * wtf/RefCounted.h: Copied from JavaScriptCore/wtf/Shared.h. - (WTF::RefCounted::RefCounted): - * wtf/Shared.h: Removed. - -2007-11-13 Adam Roben - - Build fix - - Reviewed by Geoff. - - * kjs/regexp.h: Added a missing #include. - -2007-11-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved Shared.h into wtf so it could be used in more places. Deployed - Shared in places where JSCore previously had hand-rolled ref-counting - classes. - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - * API/JSClassRef.h: - * API/JSObjectRef.cpp: - (JSClassRetain): - (JSClassRelease): - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/interpreter.cpp: - (KJS::Interpreter::init): - * kjs/interpreter.h: - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): - * kjs/regexp.h: - * wtf/Shared.h: Copied from WebCore/platform/Shared.h. - -2007-11-13 Eric Seidel - - Reviewed by Maciej. - - Add an ASSERT to getTruncatedInt32 to enforce proper usage. - Best part about this patch? It doesn't break the web! - - * kjs/JSImmediate.h: - (KJS::JSImmediate::getTruncatedInt32): - (KJS::JSImmediate::toDouble): - (KJS::JSImmediate::getUInt32): - -2007-11-13 Alexey Proskuryakov - - Windows build fix. - - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertUTF8ToUTF16): - * kjs/ustring.cpp: - (KJS::UString::UTF8String): - * wtf/unicode/UTF8.cpp: - (WTF::Unicode::ConvertUTF8ToUTF16): - -2007-11-13 Darin Adler - - Reviewed by Geoff. - - - fix http://bugs.webkit.org/show_bug.cgi?id=11231 - RegExp bug when handling newline characters - and a number of other differences between PCRE behvior - and JavaScript regular expressions: - - + single-digit sequences like \4 should be treated as octal - character constants, unless there is a sufficient number - of brackets for them to be treated as backreferences - - + \8 turns into the character "8", not a binary zero character - followed by "8" (same for 9) - - + only the first 3 digits should be considered part of an - octal character constant (the old behavior was to decode - an arbitrarily long sequence and then mask with 0xFF) - - + if \x is followed by anything other than two valid hex digits, - then it should simply be treated a the letter "x"; that includes - not supporting the \x{41} syntax - - + if \u is followed by anything less than four valid hex digits, - then it should simply be treated a the letter "u" - - + an extra "+" should be a syntax error, rather than being treated - as the "possessive quantifier" - - + if a "]" character appears immediately after a "[" character that - starts a character class, then that's an empty character class, - rather than being the start of a character class that includes a - "]" character - - + a "$" should not match a terminating newline; we could have gotten - PCRE to handle this the way we wanted by passing an appropriate option - - Test: fast/js/regexp-no-extensions.html - - * pcre/pcre_compile.cpp: - (check_escape): Check backreferences against bracount to catch both - overflows and things that should be treated as octal. Rewrite octal - loop to not go on indefinitely. Rewrite both hex loops to match and - remove \x{} support. - (compile_branch): Restructure loops so that we don't special-case a "]" - at the beginning of a character class. Remove code that treated "+" as - the possessive quantifier. - (jsRegExpCompile): Change the "]" handling here too. - - * pcre/pcre_exec.cpp: (match): Changed CIRC to match the DOLL implementation. - Changed DOLL to remove handling of "terminating newline", a Perl concept - which we don't need. - - * tests/mozilla/expected.html: Two tests are fixed now: - ecma_3/RegExp/regress-100199.js and ecma_3/RegExp/regress-188206.js. - One test fails now: ecma_3/RegExp/perlstress-002.js -- our success before - was due to a bug (we treated all 1-character numeric escapes as backreferences). - The date tests also now both expect success -- whatever was making them fail - before was probably due to the time being close to a DST shift; maybe we need - to get rid of those tests. - -2007-11-13 Darin Adler - - * kjs/JSImmediate.h: (KJS::JSImmediate::getTruncatedInt32): - Remove too-strong assert that was firing constantly and preventing even basic - web browsing from working in a debug build. This function is used in many - cases where the immediate value is not a number; the assertion could perhaps - be added back later with a bit of reorganization. - -2007-11-13 Alp Toker - - Build fix for breakage to non-Mac builds introduced in r27746. - - * kjs/ustring.cpp: - -2007-11-13 Eric Seidel - - Reviewed by Maciej. - - Clean up evaluateToBoolean functions to use inlines instead of copy/paste code - - * kjs/JSImmediate.h: - * kjs/nodes.cpp: - (KJS::GreaterNode::inlineEvaluateToBoolean): - (KJS::GreaterNode::evaluate): - (KJS::LessEqNode::inlineEvaluateToBoolean): - (KJS::LessEqNode::evaluate): - (KJS::GreaterEqNode::inlineEvaluateToBoolean): - (KJS::GreaterEqNode::evaluate): - (KJS::InNode::evaluateToBoolean): - (KJS::EqualNode::inlineEvaluateToBoolean): - (KJS::EqualNode::evaluate): - (KJS::NotEqualNode::inlineEvaluateToBoolean): - (KJS::NotEqualNode::evaluate): - (KJS::StrictEqualNode::inlineEvaluateToBoolean): - (KJS::StrictEqualNode::evaluate): - (KJS::NotStrictEqualNode::inlineEvaluateToBoolean): - (KJS::NotStrictEqualNode::evaluate): - * kjs/nodes.h: - -2007-11-12 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=15958 - base64 spends 1.1% of total time checking for special Infinity case - - Use a fast character test instead of calling strncmp. - - 1.1% speedup on string-base64. SunSpider reports a .4% speedup overall; - Sharks reports only .1%. Who are you going to believe? Huh? - - * kjs/ustring.cpp: - (KJS::UString::toDouble): - -2007-11-12 Eric Seidel - - Reviewed by Oliver. - - Add evaluateToInt32 and evaluateUInt32 methods and deploy them. - Fix a few missing evaluateToBoolean methods - Deploy all evaluateTo* functions to more nodes to avoid slowdowns - http://bugs.webkit.org/show_bug.cgi?id=15950 - - SunSpider claims this is at least a 1.4% speedup. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::getTruncatedInt32): - (KJS::JSImmediate::toDouble): - (KJS::JSImmediate::getUInt32): - * kjs/nodes.cpp: - (KJS::ExpressionNode::evaluateToNumber): - (KJS::ExpressionNode::evaluateToInt32): - (KJS::ExpressionNode::evaluateToUInt32): - (KJS::NumberNode::evaluateToInt32): - (KJS::NumberNode::evaluateToUInt32): - (KJS::ImmediateNumberNode::evaluateToInt32): - (KJS::ImmediateNumberNode::evaluateToUInt32): - (KJS::ResolveNode::evaluate): - (KJS::ResolveNode::evaluateToNumber): - (KJS::ResolveNode::evaluateToBoolean): - (KJS::ResolveNode::evaluateToInt32): - (KJS::ResolveNode::evaluateToUInt32): - (KJS::LocalVarAccessNode::evaluateToInt32): - (KJS::LocalVarAccessNode::evaluateToUInt32): - (KJS::BracketAccessorNode::evaluateToNumber): - (KJS::BracketAccessorNode::evaluateToBoolean): - (KJS::BracketAccessorNode::evaluateToInt32): - (KJS::BracketAccessorNode::evaluateToUInt32): - (KJS::DotAccessorNode::inlineEvaluate): - (KJS::DotAccessorNode::evaluate): - (KJS::DotAccessorNode::evaluateToNumber): - (KJS::DotAccessorNode::evaluateToBoolean): - (KJS::DotAccessorNode::evaluateToInt32): - (KJS::DotAccessorNode::evaluateToUInt32): - (KJS::NewExprNode::inlineEvaluate): - (KJS::NewExprNode::evaluate): - (KJS::NewExprNode::evaluateToNumber): - (KJS::NewExprNode::evaluateToBoolean): - (KJS::NewExprNode::evaluateToInt32): - (KJS::NewExprNode::evaluateToUInt32): - (KJS::FunctionCallResolveNode::inlineEvaluate): - (KJS::FunctionCallResolveNode::evaluate): - (KJS::FunctionCallResolveNode::evaluateToNumber): - (KJS::FunctionCallResolveNode::evaluateToBoolean): - (KJS::FunctionCallResolveNode::evaluateToInt32): - (KJS::FunctionCallResolveNode::evaluateToUInt32): - (KJS::LocalVarFunctionCallNode::evaluate): - (KJS::LocalVarFunctionCallNode::evaluateToNumber): - (KJS::LocalVarFunctionCallNode::evaluateToBoolean): - (KJS::LocalVarFunctionCallNode::evaluateToInt32): - (KJS::LocalVarFunctionCallNode::evaluateToUInt32): - (KJS::FunctionCallDotNode::evaluate): - (KJS::FunctionCallDotNode::evaluateToNumber): - (KJS::FunctionCallDotNode::evaluateToBoolean): - (KJS::FunctionCallDotNode::evaluateToInt32): - (KJS::FunctionCallDotNode::evaluateToUInt32): - (KJS::PostDecLocalVarNode::inlineEvaluateToNumber): - (KJS::PostDecLocalVarNode::evaluateToNumber): - (KJS::PostDecLocalVarNode::evaluateToBoolean): - (KJS::PostDecLocalVarNode::evaluateToInt32): - (KJS::PostDecLocalVarNode::evaluateToUInt32): - (KJS::typeStringForValue): - (KJS::UnaryPlusNode::evaluate): - (KJS::UnaryPlusNode::evaluateToBoolean): - (KJS::UnaryPlusNode::evaluateToNumber): - (KJS::UnaryPlusNode::evaluateToInt32): - (KJS::BitwiseNotNode::inlineEvaluateToInt32): - (KJS::BitwiseNotNode::evaluate): - (KJS::BitwiseNotNode::evaluateToNumber): - (KJS::BitwiseNotNode::evaluateToBoolean): - (KJS::BitwiseNotNode::evaluateToInt32): - (KJS::MultNode::evaluateToBoolean): - (KJS::MultNode::evaluateToInt32): - (KJS::MultNode::evaluateToUInt32): - (KJS::DivNode::evaluateToInt32): - (KJS::DivNode::evaluateToUInt32): - (KJS::ModNode::evaluateToBoolean): - (KJS::ModNode::evaluateToInt32): - (KJS::ModNode::evaluateToUInt32): - (KJS::AddNode::evaluateToNumber): - (KJS::AddNode::evaluateToInt32): - (KJS::AddNode::evaluateToUInt32): - (KJS::AddNumbersNode::evaluateToInt32): - (KJS::AddNumbersNode::evaluateToUInt32): - (KJS::SubNode::evaluateToInt32): - (KJS::SubNode::evaluateToUInt32): - (KJS::LeftShiftNode::inlineEvaluateToInt32): - (KJS::LeftShiftNode::evaluate): - (KJS::LeftShiftNode::evaluateToNumber): - (KJS::LeftShiftNode::evaluateToInt32): - (KJS::RightShiftNode::inlineEvaluateToInt32): - (KJS::RightShiftNode::evaluate): - (KJS::RightShiftNode::evaluateToNumber): - (KJS::RightShiftNode::evaluateToInt32): - (KJS::UnsignedRightShiftNode::inlineEvaluateToUInt32): - (KJS::UnsignedRightShiftNode::evaluate): - (KJS::UnsignedRightShiftNode::evaluateToNumber): - (KJS::UnsignedRightShiftNode::evaluateToInt32): - (KJS::LessNode::inlineEvaluateToBoolean): - (KJS::LessNode::evaluate): - (KJS::LessNode::evaluateToBoolean): - (KJS::LessNumbersNode::inlineEvaluateToBoolean): - (KJS::LessNumbersNode::evaluate): - (KJS::LessNumbersNode::evaluateToBoolean): - (KJS::LessStringsNode::inlineEvaluateToBoolean): - (KJS::LessStringsNode::evaluate): - (KJS::BitAndNode::evaluate): - (KJS::BitAndNode::inlineEvaluateToInt32): - (KJS::BitAndNode::evaluateToNumber): - (KJS::BitAndNode::evaluateToBoolean): - (KJS::BitAndNode::evaluateToInt32): - (KJS::BitXOrNode::inlineEvaluateToInt32): - (KJS::BitXOrNode::evaluate): - (KJS::BitXOrNode::evaluateToNumber): - (KJS::BitXOrNode::evaluateToBoolean): - (KJS::BitXOrNode::evaluateToInt32): - (KJS::BitOrNode::inlineEvaluateToInt32): - (KJS::BitOrNode::evaluate): - (KJS::BitOrNode::evaluateToNumber): - (KJS::BitOrNode::evaluateToBoolean): - (KJS::BitOrNode::evaluateToInt32): - (KJS::ConditionalNode::evaluateToNumber): - (KJS::ConditionalNode::evaluateToInt32): - (KJS::ConditionalNode::evaluateToUInt32): - (KJS::valueForReadModifyAssignment): - (KJS::AssignExprNode::evaluate): - (KJS::AssignExprNode::evaluateToBoolean): - (KJS::AssignExprNode::evaluateToNumber): - (KJS::AssignExprNode::evaluateToInt32): - (KJS::VarDeclNode::handleSlowCase): - * kjs/nodes.h: - (KJS::FunctionCallResolveNode::precedence): - (KJS::AddNode::precedence): - (KJS::AddNode::): - (KJS::LessNumbersNode::): - (KJS::LessStringsNode::): - * kjs/value.cpp: - (KJS::JSValue::toInt32SlowCase): - (KJS::JSValue::toUInt32SlowCase): - * kjs/value.h: - (KJS::JSValue::asCell): - (KJS::JSValue::toInt32): - (KJS::JSValue::toUInt32): - -2007-11-12 Alexey Proskuryakov - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=15953 - Add UTF-8 encoding/decoding to WTF - - * kjs/ustring.h: Moved UTF8SequenceLength() and decodeUTF8Sequence() to wtf/unicode. - * kjs/ustring.cpp: (KJS::UString::UTF8String): Changed this function to take a strict/lenient - parameter. Callers are not interested in getting decoding results in strict mode, so - this allows for bailing out as soon as an error is seen. - - * kjs/function.cpp: - (KJS::encode): Updated for new UString::UTF8String() signature. - - * API/JSStringRef.cpp: - (JSStringCreateWithCharacters): Disambiguate UChar. - (JSStringCreateWithUTF8CString): Actually use UTF-8 when creating the string! - * bindings/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16): Use ConvertUTF8ToUTF16(). - - * wtf/unicode/UTF8.cpp: Added. - (WTF::Unicode::inlineUTF8SequenceLengthNonASCII): - (WTF::Unicode::inlineUTF8SequenceLength): - (WTF::Unicode::UTF8SequenceLength): - (WTF::Unicode::decodeUTF8Sequence): - (WTF::Unicode::): - (WTF::Unicode::ConvertUTF16ToUTF8): - (WTF::Unicode::isLegalUTF8): - (WTF::Unicode::ConvertUTF8ToUTF16): - * wtf/unicode/UTF8.h: Added. - (WTF::Unicode::): - Some code moved from ustring.h, some adapted from unicode.org sources. - - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - Added UTF8.{h,cpp} - -2007-11-12 Josh Aas - - Reviewed by Darin. - - - http://bugs.webkit.org/show_bug.cgi?id=15946 - add NPPValue NPPVpluginDrawingModel (Mozilla bug 403418 compat) - - * bindings/npapi.h: - -2007-11-12 Darin Adler - - Reviewed by Sam. - - - http://bugs.webkit.org/show_bug.cgi?id=15951 - REGRESSION: assertion failure in regexp match() when running JS tests - - Test: fast/js/regexp-many-brackets.html - - * pcre/pcre_exec.cpp: (match): Added back accidentally-removed case for - the BRANUMBER opcode. - -2007-11-12 Darin Adler - - Reviewed by Geoff. - - - fix use of prefix and config.h, got rid of a few unneeded things in - the PCRE code; no behavior changes - - * API/JSBase.cpp: Added include of config.h. - * API/JSCallbackConstructor.cpp: Ditto. - * API/JSCallbackFunction.cpp: Ditto. - * API/JSCallbackObject.cpp: Ditto. - * API/JSClassRef.cpp: Ditto. - * API/JSContextRef.cpp: Ditto. - * API/JSObjectRef.cpp: Ditto. - * API/JSStringRef.cpp: Ditto. - * API/JSValueRef.cpp: Ditto. - - * JavaScriptCorePrefix.h: Removed obsolete workaround. - Moved new/delete macros after includes, as they are in WebCore's prefix. - Removed "config.h". - - * pcre/dftables.cpp: (main): Changed back to not use a separate maketables - function. This is needed for PCRE, but not helpful for our use. Also changed - the tables to all be 128 entries long instead of 256, since only the first - 128 are ever used. - - * pcre/pcre_compile.cpp: Added include of config.h. Eliminated digitab, - which was only being used to check hex digits. Changed all uses of TRUE and - FALSE to use the C++ true and false instead. - (check_escape): Just the TRUE/FALSE thing. - (is_counted_repeat): Ditto. - (could_be_empty_branch): Ditto. - (get_othercase_range): Ditto. - (compile_branch): Ditto. - (compile_regex): Ditto. - (is_anchored): Ditto. - (is_startline): Ditto. - (find_firstassertedchar): Ditto. - (jsRegExpCompile): Ditto. - - * pcre/pcre_exec.cpp: Added include of config.h. Changed all uses of TRUE and - FALSE to use the C++ true and false instead. - (match_ref): Just the TRUE/FALSE thing. - (match): Ditto. Removed some unneeded braces. - (jsRegExpExecute): Just the TRUE/FALSE thing. - - * pcre/pcre_internal.h: Moved the constants needed by dftables.cpp to the top - of the file instead of the bottom, so they can be used. Also changed the table - sizes to 128 instead of 256. Removed macro definitions of FALSE and TRUE. - Set array sizes for all the const arrays. Changed _pcre_utf8_table1_size to - be a macro instead of a extern int. - - * pcre/pcre_maketables.cpp: Removed. It's all in dftables.cpp now. - - * pcre/pcre_tables.cpp: Made table sizes explicit. - - * pcre/pcre_xclass.cpp: Just the TRUE/FALSE thing. - -2007-11-12 Adam Roben - - Build fix - - * wtf/FastMalloc.h: Add missing using statement. - -2007-11-11 Oliver Hunt - - Reviewed by Darin. - - Add special fastZeroedMalloc function to replace a - number of fastCalloc calls where one argument was 1. - - This results in a 0.4% progression in SunSpider, more - than making up for the earlier regression caused by - additional overflow checks. - - * JavaScriptCore.exp: - * kjs/array_instance.cpp: - * kjs/property_map.cpp: - * wtf/FastMalloc.cpp: - * wtf/FastMalloc.h: - * wtf/HashTable.h: - -2007-11-11 Adam Roben - - Fix ASSERT in HashTable::checkTableConsistencyExceptSize beneath WebNotificationCenter - - The bug was due to a mismatch between HashMap::remove and - HashTable::checkTableConsistency. HashMap::remove can delete the value - stored in the HashTable (by derefing it), which is not normally - allowed by HashTable. It's OK in this case because the value is about - to be removed from the table, but HashTable wasn't aware of this. - - HashMap::remove now performs the consistency check itself before - derefing the value. - - Darin noticed that the same bug would occur in HashSet, so I've fixed - it there as well. - - Reviewed by Darin. - - * wtf/HashMap.h: - (WTF::HashMap::remove): Perform the HashTable consistency check - manually before calling deref. - * wtf/HashSet.h: - (WTF::HashSet::remove): Ditto. - * wtf/HashTable.h: Made checkTableConsistency public so that HashMap - and HashSet can call it. - (WTF::HashTable::removeAndInvalidateWithoutEntryConsistencyCheck): - Added. - (WTF::HashTable::removeAndInvalidate): Added. - (WTF::HashTable::remove): - (WTF::HashTable::removeWithoutEntryConsistencyCheck): Added. - -2007-11-11 Mark Rowe - - Build fix. Use the correct filename case. - - * kjs/nodes.h: - -2007-11-11 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=15902 - 15% of string-validate-input.js is spent compiling the same regular expression - - Store a compiled representation of the regular expression in the AST. - - Only a .2% SunSpider speedup overall, but a 10.6% speedup on - string-validate-input.js. - - * kjs/nodes.cpp: - (KJS::RegExpNode::evaluate): - * kjs/nodes.h: - (KJS::RegExpNode::): - * kjs/nodes2string.cpp: - (KJS::RegExpNode::streamTo): - * kjs/regexp.cpp: - (KJS::RegExp::flags): - * kjs/regexp.h: - (KJS::RegExp::pattern): - * kjs/regexp_object.cpp: - (KJS::RegExpObjectImp::construct): - (KJS::RegExpObjectImp::createRegExpImp): - * kjs/regexp_object.h: - -2007-11-11 Oliver Hunt - - Reviewed by Eric. - - Partial fix for numfuzz: integer overflows opening malformed SVG file in WebCore::ImageBuffer::create - - Unfortunately this is a very slight regression, but is unavoidable. - - * wtf/FastMalloc.cpp: - -2007-11-10 Eric Seidel - - Reviewed by darin. - - Add simple type inferencing to the parser, and create custom - AddNode and LessNode subclasses based on inferred types. - http://bugs.webkit.org/show_bug.cgi?id=15884 - - SunSpider claims this is at least a 0.5% speedup. - - * JavaScriptCore.exp: - * kjs/grammar.y: - * kjs/internal.cpp: - (KJS::NumberImp::getPrimitiveNumber): - (KJS::GetterSetterImp::getPrimitiveNumber): - * kjs/internal.h: - * kjs/lexer.cpp: - (KJS::Lexer::lex): - * kjs/nodes.cpp: - (KJS::Node::Node): - (KJS::StringNode::evaluate): - (KJS::StringNode::evaluateToNumber): - (KJS::StringNode::evaluateToBoolean): - (KJS::RegExpNode::evaluate): - (KJS::UnaryPlusNode::optimizeVariableAccess): - (KJS::AddNode::evaluate): - (KJS::AddNode::evaluateToNumber): - (KJS::AddNumbersNode::inlineEvaluateToNumber): - (KJS::AddNumbersNode::evaluate): - (KJS::AddNumbersNode::evaluateToNumber): - (KJS::AddStringsNode::evaluate): - (KJS::AddStringLeftNode::evaluate): - (KJS::AddStringRightNode::evaluate): - (KJS::lessThan): - (KJS::lessThanEq): - (KJS::LessNumbersNode::evaluate): - (KJS::LessStringsNode::evaluate): - * kjs/nodes.h: - (KJS::ExpressionNode::): - (KJS::RegExpNode::): - (KJS::RegExpNode::precedence): - (KJS::TypeOfResolveNode::): - (KJS::LocalVarTypeOfNode::): - (KJS::UnaryPlusNode::): - (KJS::UnaryPlusNode::precedence): - (KJS::AddNode::): - (KJS::AddNode::precedence): - (KJS::AddNumbersNode::): - (KJS::AddStringLeftNode::): - (KJS::AddStringRightNode::): - (KJS::AddStringsNode::): - (KJS::LessNode::): - (KJS::LessNode::precedence): - (KJS::LessNumbersNode::): - (KJS::LessStringsNode::): - * kjs/nodes2string.cpp: - (KJS::StringNode::streamTo): - * kjs/object.cpp: - * kjs/object.h: - * kjs/value.h: - (KJS::JSValue::getPrimitiveNumber): - -2007-11-11 Darin Adler - - - try another way of fixing dftables builds -- refactor pcre_internal.h a bit - - * pcre/pcre_internal.h: Make most of this header do nothing when DFTABLES is set. - Later we can break it into two files. - - * JavaScriptCore.vcproj/dftables/dftables.vcproj: Take out now-unneeded include paths. - * pcre/dftables.cpp: Set DFTABLES. Use delete instead of free. - * pcre/dftables.pro: Take out now-unneeded include paths. - * pcre/pcre_maketables.cpp: Use new instead of malloc. - -2007-11-11 Darin Adler - - * pcre/dftables.pro: Try fixing Qt builds (I looked at qt-win) by adding - another include path. - -2007-11-11 Darin Adler - - * JavaScriptCore.xcodeproj/project.pbxproj: Try fixing Mac Tiger builds - by adding another include path. - -2007-11-11 Darin Adler - - Reviewed by Sam. - - - http://bugs.webkit.org/show_bug.cgi?id=15924 - next round of changes to JSRegExp (formerly PCRE) - - This is a combination of converting to C++, tweaking the API, and adding - some additional optimizations. - - Future steps will involve getting rid of the use of UTF-8 completely - (we'll use UTF-16 exclusively instead), eliminating more source files, - and some more speed-ups. - - SunSpider says the current round is an 0.9% speed-up overall, and a - 5.3% speed-up for regexp. - - * JavaScriptCore.exp: Updated for new entry points. - - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/dftables/dftables.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * jscore.bkl: - Updated for new source file names and ForwardingHeaders. - - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): Changed to use the error message without calling - strdup on it and to pass the new types and options. - (KJS::RegExp::~RegExp): Removed the now-unneeded free of the error message. - (KJS::RegExp::match): Pass the new types and options. - * kjs/regexp.h: Update type of m_constructionError. - - * pcre/AUTHORS: Update to reflect the status of the project -- we don't include - the Google parts, and this isn't the PCRE library, per se. - * pcre/COPYING: Ditto. - - * pcre/dftables.cpp: Copied from JavaScriptCore/pcre/dftables.c. - (main): Removed unneeded ctype_digit. - - * pcre/pcre.h: Convert to C++, tweak API a bit. Use UChar instead of JSRegExpChar. - - * pcre/pcre_compile.cpp: Copied from JavaScriptCore/pcre/pcre_compile.c. - Moved a lot of private stuff used only within this file here from pcre_internal.h. - Renumbered the error codes. - (error_text): Use a single string with embedded nulls for the error text (I got - this idea from newer versions of PCRE). - (check_escape): Changed return type to be enum instead of int. Replaced ctype_digit - uses with isASCIIDigit. - (is_counted_repeat): Ditto. - (read_repeat_counts): Ditto. - (first_significant_code): Ditto. - (find_fixedlength): Ditto. - (could_be_empty_branch): Ditto. - (compile_branch): Ditto. Also removed some code that handles changing options. - JavaScript doesn't have any of the features that allow options to change. - (compile_regex): Updated for change to options parameter. - (is_anchored): Ditto. - (find_firstassertedchar): Ditto. - (jsRegExpCompile): Changed to take separate flags instead of an options int. - Also changed to call new/delete instead of pcre_malloc/free. - (jsRegExpFree): Ditto. - - * pcre/pcre_exec.cpp: Copied from JavaScriptCore/pcre/pcre_exec.c. - Added a case that uses computed goto for the opcode loop, but did not turn it on. - Changed the RMATCH macro to handle returns more efficiently by putting the where - pointer in the new frame instead of the old one, allowing us to branch to the - return with a single statement. Switched to new/delete from pcre_malloc/free. - Changed many RRETURN callers to not set the return value since it's already - set correctly. Replaced the rrc variable with an is_match variable. Values other - than "match" and "no match" are now handled differently. This allows us to remove - the code to check for those cases in various rules. - (match): All the case statements use a macro BEGIN_OPCODE instead. And all the - continue statements, or break statements that break out of the outer case use - a macro NEXT_OPCODE instead. Replaced a few if statements with assertions. - (jsRegExpExecute): Use new/delete instead of pcre_malloc/free. Removed unused - start_match field from the match block. - - * pcre/pcre_internal.h: Moved the last few configuration macros from pcre-config.h - in here. Removed various unused types. Converted from JSRegExpChar to UChar. - Eliminated pcre_malloc/free. Replaced the opcode enum with a macro that can be - used in multiple places. Unfortunately we lose the comments for each opcode; we - should find a place to put those back. Removed ctype_digit. - - * pcre/pcre_maketables.cpp: Copied from JavaScriptCore/pcre/pcre_maketables.c. - (pcre_maketables): Got rid of the conditional code that allows this to be compiled - in -- it's only used for dftables now (and soon may be obsolete entirely). - Changed code for cbit_digit to not use isdigit, and took the "_" case out of the - loop. Removed ctype_digit. - - * pcre/pcre_ord2utf8.cpp: Copied from JavaScriptCore/pcre/pcre_ord2utf8.c. - - * pcre/pcre_tables.cpp: Copied from JavaScriptCore/pcre/pcre_tables.c. - Moved _pcre_OP_lengths out of here into pcre_exec.cpp. - - * pcre/pcre_ucp_searchfuncs.cpp: Copied from JavaScriptCore/pcre/pcre_ucp_searchfuncs.c. - Updated for other file name changes. - - * pcre/pcre_xclass.cpp: Copied from JavaScriptCore/pcre/pcre_xclass.c. - - * pcre/ucpinternal.h: Updated header. - - * pcre/ucptable.cpp: Copied from JavaScriptCore/pcre/ucptable.c. - - * wtf/ASCIICType.h: (WTF::isASCIIDigit): Removed a branch by changing from && to - & for this operation. Also added an overload that takes an int because that's - useful for PCRE. Later we could optimize for int and overload other functions in - this file; stuck to this simple one for now. - - * wtf/unicode/icu/UnicodeIcu.h: Removed unused isUpper. - * wtf/unicode/qt4/UnicodeQt4.h: Ditto. - - * pcre/LICENCE: Removed. - * pcre/pcre-config.h: Removed. - * wtf/FastMallocPCRE.cpp: Removed. - - * pcre/dftables.c: Renamed to cpp. - * pcre/pcre_compile.c: Ditto. - * pcre/pcre_exec.c: Ditto. - * pcre/pcre_maketables.c: Ditto. - * pcre/pcre_ord2utf8.c: Ditto. - * pcre/pcre_tables.c: Ditto. - * pcre/pcre_ucp_searchfuncs.c: Ditto. - * pcre/pcre_xclass.c: Ditto. - * pcre/ucptable.c: Ditto. - -2007-11-11 Eric Seidel - - Reviewed by Oliver. - - Add KJS_CHECKEXCEPTIONBOOLEAN to match rest of nodes.cpp - - * kjs/nodes.cpp: - (KJS::ExpressionNode::evaluateToBoolean): - (KJS::LessNode::evaluateToBoolean): - (KJS::GreaterNode::evaluateToBoolean): - (KJS::LessEqNode::evaluateToBoolean): - (KJS::GreaterEqNode::evaluateToBoolean): - (KJS::InstanceOfNode::evaluateToBoolean): - (KJS::InNode::evaluateToBoolean): - (KJS::EqualNode::evaluateToBoolean): - (KJS::NotEqualNode::evaluateToBoolean): - (KJS::StrictEqualNode::evaluateToBoolean): - (KJS::NotStrictEqualNode::evaluateToBoolean): - (KJS::LogicalAndNode::evaluateToBoolean): - (KJS::LogicalOrNode::evaluateToBoolean): - (KJS::ConditionalNode::evaluateToBoolean): - -2007-11-10 Darin Adler - - Reviewed by Sam. - - - fix http://bugs.webkit.org/show_bug.cgi?id=15927 - REGRESSION(r27487): delete a.c followed by __defineGetter__("c", ...) incorrectly deletes another property - and REGRESSION (r27487): Can't switch out of Edit HTML Source mode on Leopard Wiki - - Test: fast/js/delete-then-put.html - - * kjs/property_map.cpp: - (KJS::PropertyMap::put): Added a missing "- 1"; code to find an empty slot was not working. - (KJS::PropertyMap::checkConsistency): Added a missing range check that would have caught this - problem before. - - - roll out a last-minute change to my evaluateToBoolean patch that was incorrect. - - * kjs/nodes.h: (KJS::ExprStatementNode::ExprStatementNode): Take out call to - optimizeForUnnecessaryResult, since the result is used in some cases. - -2007-11-10 Adam Roben - - Windows build fix - - Roll out some changes that were (seemingly accidentally) checked in - with r27664. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2007-11-10 Darin Adler - - Reviewed by Sam. - - - http://bugs.webkit.org/show_bug.cgi?id=15915 - add an evaluation path for booleans like the one we have for numbers - - Gives 1.1% on SunSpider. - - * kjs/grammar.y: Create TrueNode and FalseNode instead of BooleanNode. - - * kjs/nodes.h: Changed to use Noncopyable. Moved optimizeForUnnecessaryResult - down from Node to ExpressionNode. Changed some classes to not inherit from - ExpressionNode where not necessary, and removed unnneeded evaluate functions - as well as evaluate functions that need not be virtual. Call the - optimizeForUnnecessaryResult function on the start of a for loop too. - * kjs/nodes.cpp: - (KJS::ExpressionNode::evaluateToBoolean): Added. - (KJS::FalseNode::evaluate): Added. - (KJS::TrueNode::evaluate): Added. - (KJS::NumberNode::evaluateToBoolean): Added. - (KJS::StringNode::evaluateToBoolean): Added. - (KJS::LocalVarAccessNode::evaluateToBoolean): Added. - (KJS::BracketAccessorNode::evaluateToBoolean): Added. - (KJS::LogicalNotNode::evaluate): Changed to call evaluateToBoolean. - (KJS::LogicalNotNode::evaluateToBoolean): Added. - (KJS::lessThan): Changed to return bool. - (KJS::lessThanEq): Ditto. - (KJS::LessNode::evaluate): Changed since lessThan returns bool. - (KJS::LessNode::evaluateToBoolean): Added. - (KJS::GreaterNode::evaluate): Changed since lessThanEq returns bool. - (KJS::GreaterNode::evaluateToBoolean): Added. - (KJS::LessEqNode::evaluate): Changed since lessThanEq returns bool. - (KJS::LessEqNode::evaluateToBoolean): Added. - (KJS::GreaterEqNode::evaluate): Changed since lessThan returns bool. - (KJS::GreaterEqNode::evaluateToBoolean): Added. - (KJS::InstanceOfNode::evaluateToBoolean): Added. - (KJS::InNode::evaluateToBoolean): Added. - (KJS::EqualNode::evaluateToBoolean): Added. - (KJS::NotEqualNode::evaluateToBoolean): Added. - (KJS::StrictEqualNode::evaluateToBoolean): Added. - (KJS::NotStrictEqualNode::evaluateToBoolean): Added. - (KJS::ConditionalNode::evaluate): Changed to call evaluateToBoolean. - (KJS::IfNode::execute): Ditto. - (KJS::DoWhileNode::execute): Ditto. - (KJS::WhileNode::execute): Ditto. - (KJS::ForNode::execute): Ditto. - - * kjs/nodes2string.cpp: - (KJS::FalseNode::streamTo): Added. - (KJS::TrueNode::streamTo): Added. - -2007-11-09 Adam Roben - - Windows build fix - - Reviewed by Darin. - - * kjs/value.h: - (KJS::jsNumber): Add some explicit casts. - -2007-11-08 Darin Adler - - - fix build - - * kjs/grammar.y: - * kjs/nodes.h: - * kjs/property_map.cpp: - -2007-11-08 Darin Adler - - - roll out accidentally-checked in changes - - * kjs/nodes.cpp: Back to previous version. - * kjs/nodes.h: Ditto. - * kjs/grammar.y: Ditto. - -2007-11-08 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15912 - fasta spends a lot of time in qsort - - * kjs/property_map.cpp: - (KJS::PropertyMap::getEnumerablePropertyNames): - Use insertion sort instead of qsort for small sets of property names. - We can probably do some even-better speedups of for/in, but this nets - 0.6% overall and 6.7% on fasta. - -2007-11-08 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15906 - getting characters by indexing into a string is very slow - - This fixes one source of the slowness -- the conversion to an unused - Identifier as we call the get function from the slot -- but doesn't - fix others, such as the fact that we have to allocate a new UString::Rep - for every single character. - - Speeds up string-base64 30%, and at least 0.5% overall. - But does slow down access-fannkuch quite a bit. Might be worth - revisiting in the future to see what we can do about that (although - I did look at a profile for a while). - - * kjs/property_slot.h: Add a new marker for "numeric" property slots; - slots where we don't need to pass the identifier to the get function. - (KJS::PropertySlot::getValue): Added code to call the numeric get function. - (KJS::PropertySlot::setCustomNumeric): Added. - * kjs/string_object.cpp: - (KJS::StringInstance::indexGetter): Changed to use substr() instead - of constructing a wholly new UString each time. - (KJS::stringInstanceNumericPropertyGetter): Added. Like indexGetter, but - takes advantage of setCustomNumeric to avoid creating an Identifier. - (KJS::StringInstance::getOwnPropertySlot): Changed to use setCustomNumeric. - -2007-11-08 Darin Adler - - Reviewed by Oliver. - - - http://bugs.webkit.org/show_bug.cgi?id=15904 - more speed-ups possible by tightening up int version of JSImmediate - - 1% improvement of SunSpider - - * kjs/JSImmediate.h: Eliminate the now-unneeded FPBitValues struct template. - (KJS::JSImmediate::from): Overload for most numeric types; many types can - do fewer branches and checks. - (KJS::JSImmediate::getUInt32): Removed unneeded check for undefined. - (KJS::JSImmediate::getTruncatedInt32): Ditto. - (KJS::JSImmediate::getTruncatedUInt32): Ditto. There's no difference any more - between getUInt32 and getTruncatedUInt32, so that's worth a rename and merge later. - - * kjs/grammar.y: Update since fromDouble is now just from. - * kjs/nodes.h: Ditto. - - * kjs/value.h: (KJS::jsNumber): Overload for most numeric types. - -2007-11-08 Kevin Ollivier - - Bakefiles for building JavaScriptCore, needed by wx port. - - Reviewed by Mark Rowe. - - * JavaScriptCoreSources.bkl: Added. - * jscore.bkl: Added. - -2007-11-08 Oliver Hunt - - Reviewed by Maciej. - - Fix regression caused by earlier bitwise and optimisation. 1 & undefined != 1. - - The implementation of JSImmediate::areBothImmediateNumbers relies on - (JSImmediate::getTag(immediate1) & JSImmediate::getTag(immediate2)) having - a unique result when both immediate values are numbers. - - The regression was due to UndefinedType & NumberType returning NumberType (3 & 1). - By swapping the value of NumberType and UndefinedType this ceases to be a problem. - - * kjs/JSType.h: - -2007-11-08 Darin Adler - - - fix build - - * kjs/nodes.h: Add missing parameter name. - -2007-11-08 Eric Seidel - - Reviewed by darin. - - Add ExpressionNode subclass of Node, use it. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::ForInNode::ForInNode): - * kjs/nodes.h: - (KJS::ExpressionNode::): - (KJS::NullNode::): - (KJS::NullNode::precedence): - (KJS::BooleanNode::): - (KJS::BooleanNode::precedence): - (KJS::RegExpNode::): - (KJS::RegExpNode::precedence): - (KJS::ThisNode::): - (KJS::ThisNode::precedence): - (KJS::ResolveNode::): - (KJS::ElementNode::): - (KJS::ArrayNode::): - (KJS::PropertyNode::): - (KJS::PropertyNode::precedence): - (KJS::PropertyNode::name): - (KJS::PropertyListNode::): - (KJS::ObjectLiteralNode::): - (KJS::ObjectLiteralNode::precedence): - (KJS::BracketAccessorNode::): - (KJS::DotAccessorNode::): - (KJS::DotAccessorNode::precedence): - (KJS::ArgumentListNode::): - (KJS::ArgumentsNode::): - (KJS::NewExprNode::): - (KJS::NewExprNode::precedence): - (KJS::FunctionCallValueNode::): - (KJS::FunctionCallValueNode::precedence): - (KJS::FunctionCallResolveNode::): - (KJS::FunctionCallBracketNode::): - (KJS::FunctionCallBracketNode::precedence): - (KJS::FunctionCallDotNode::): - (KJS::FunctionCallDotNode::precedence): - (KJS::PrePostResolveNode::): - (KJS::PostfixBracketNode::): - (KJS::PostfixBracketNode::precedence): - (KJS::PostIncBracketNode::): - (KJS::PostIncBracketNode::isIncrement): - (KJS::PostDecBracketNode::): - (KJS::PostDecBracketNode::isIncrement): - (KJS::PostfixDotNode::): - (KJS::PostfixDotNode::precedence): - (KJS::PostIncDotNode::): - (KJS::PostIncDotNode::isIncrement): - (KJS::PostDecDotNode::): - (KJS::PostDecDotNode::isIncrement): - (KJS::PostfixErrorNode::): - (KJS::PostfixErrorNode::precedence): - (KJS::DeleteResolveNode::): - (KJS::DeleteBracketNode::): - (KJS::DeleteBracketNode::precedence): - (KJS::DeleteDotNode::): - (KJS::DeleteDotNode::precedence): - (KJS::DeleteValueNode::): - (KJS::DeleteValueNode::precedence): - (KJS::VoidNode::): - (KJS::VoidNode::precedence): - (KJS::TypeOfResolveNode::): - (KJS::TypeOfValueNode::): - (KJS::PrefixBracketNode::): - (KJS::PrefixBracketNode::precedence): - (KJS::PreIncBracketNode::): - (KJS::PreIncBracketNode::isIncrement): - (KJS::PreDecBracketNode::): - (KJS::PreDecBracketNode::isIncrement): - (KJS::PrefixDotNode::): - (KJS::PrefixDotNode::precedence): - (KJS::PreIncDotNode::): - (KJS::PreIncDotNode::isIncrement): - (KJS::PreDecDotNode::): - (KJS::PreDecDotNode::isIncrement): - (KJS::PrefixErrorNode::): - (KJS::PrefixErrorNode::precedence): - (KJS::UnaryPlusNode::): - (KJS::UnaryPlusNode::precedence): - (KJS::NegateNode::): - (KJS::NegateNode::precedence): - (KJS::BitwiseNotNode::): - (KJS::BitwiseNotNode::precedence): - (KJS::LogicalNotNode::): - (KJS::LogicalNotNode::precedence): - (KJS::AddNode::): - (KJS::AddNode::precedence): - (KJS::LeftShiftNode::): - (KJS::LeftShiftNode::precedence): - (KJS::RightShiftNode::): - (KJS::RightShiftNode::precedence): - (KJS::UnsignedRightShiftNode::): - (KJS::UnsignedRightShiftNode::precedence): - (KJS::LessNode::): - (KJS::LessNode::precedence): - (KJS::GreaterNode::): - (KJS::GreaterNode::precedence): - (KJS::LessEqNode::): - (KJS::LessEqNode::precedence): - (KJS::GreaterEqNode::): - (KJS::GreaterEqNode::precedence): - (KJS::InstanceOfNode::): - (KJS::InstanceOfNode::precedence): - (KJS::InNode::): - (KJS::InNode::precedence): - (KJS::EqualNode::): - (KJS::EqualNode::precedence): - (KJS::NotEqualNode::): - (KJS::NotEqualNode::precedence): - (KJS::StrictEqualNode::): - (KJS::StrictEqualNode::precedence): - (KJS::NotStrictEqualNode::): - (KJS::NotStrictEqualNode::precedence): - (KJS::BitAndNode::): - (KJS::BitAndNode::precedence): - (KJS::BitOrNode::): - (KJS::BitOrNode::precedence): - (KJS::BitXOrNode::): - (KJS::BitXOrNode::precedence): - (KJS::LogicalAndNode::): - (KJS::LogicalAndNode::precedence): - (KJS::LogicalOrNode::): - (KJS::LogicalOrNode::precedence): - (KJS::ConditionalNode::): - (KJS::ConditionalNode::precedence): - (KJS::ReadModifyResolveNode::): - (KJS::ReadModifyResolveNode::precedence): - (KJS::AssignResolveNode::): - (KJS::AssignResolveNode::precedence): - (KJS::ReadModifyBracketNode::): - (KJS::ReadModifyBracketNode::precedence): - (KJS::AssignBracketNode::): - (KJS::AssignBracketNode::precedence): - (KJS::AssignDotNode::): - (KJS::AssignDotNode::precedence): - (KJS::ReadModifyDotNode::): - (KJS::ReadModifyDotNode::precedence): - (KJS::AssignErrorNode::): - (KJS::AssignErrorNode::precedence): - (KJS::CommaNode::): - (KJS::CommaNode::precedence): - (KJS::AssignExprNode::): - (KJS::AssignExprNode::precedence): - (KJS::ExprStatementNode::): - (KJS::IfNode::): - (KJS::DoWhileNode::): - (KJS::WhileNode::): - (KJS::ReturnNode::): - (KJS::WithNode::): - (KJS::ThrowNode::): - (KJS::ParameterNode::): - (KJS::CaseClauseNode::): - (KJS::CaseClauseNode::precedence): - (KJS::ClauseListNode::): - (KJS::SwitchNode::): - -2007-11-08 Oliver Hunt - - Reviewed by Sam. - - Add a fast path for bitwise-and of two immediate numbers for a 0.7% improvement in SunSpider (4% bitop improvement). - - This only improves bitwise-and performance, as the additional logic required - for similar code paths on or, xor, and shifting requires additional operations - and branches that negate (and in certain cases, regress) any advantage we might - otherwise receive. - - This improves performance on all bitop tests, the cryptography tests, as well as - the string-base64 and string-unpack-code tests. No significant degradation on - any other tests. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::areBothImmediateNumbers): - (KJS::JSImmediate::andImmediateNumbers): - * kjs/nodes.cpp: - (KJS::BitAndNode::evaluate): - * kjs/value.h: - (KJS::jsNumberFromAnd): - -2007-11-08 Adam Roben - - Stop using KJS inside of MathExtras.h - - Reviewed by Darin. - - * wtf/MathExtras.h: Removed an unused header, and a now-unused - forward-declaration. - (wtf_atan2): Use std::numeric_limits intead of KJS. - -2007-11-08 Sam Weinig - - Windows build fix. - - * kjs/date_object.cpp: - (KJS::DateProtoFuncToLocaleString::callAsFunction): Fix unused arg warning. - (KJS::DateProtoFuncToLocaleDateString::callAsFunction): ditto - (KJS::DateProtoFuncToLocaleTimeString::callAsFunction): ditto - -2007-11-08 Mark Rowe - - Gtk build fix. - - * kjs/lookup.h: Add missing include. - -2007-11-08 Sam Weinig - - Reviewed by Darin. - - Convert JavaScript internal function objects to use one class per - function. This avoids a switch statement inside what used to be - the shared function classes and will allow Shark to better analyze - the code. - - To make this switch, the value property of the HashEntry was changed - to a union of an intptr_t (which is used to continue handle valueGetters) - and function pointer which points to a static constructor for the - individual new function objects. - - SunSpider claims this is a 1.0% speedup. - - * kjs/array_object.cpp: - (KJS::ArrayPrototype::getOwnPropertySlot): - (KJS::getProperty): - (KJS::ArrayProtoFuncToString::callAsFunction): - (KJS::ArrayProtoFuncToLocaleString::callAsFunction): - (KJS::ArrayProtoFuncJoin::callAsFunction): - (KJS::ArrayProtoFuncConcat::callAsFunction): - (KJS::ArrayProtoFuncPop::callAsFunction): - (KJS::ArrayProtoFuncPush::callAsFunction): - (KJS::ArrayProtoFuncReverse::callAsFunction): - (KJS::ArrayProtoFuncShift::callAsFunction): - (KJS::ArrayProtoFuncSlice::callAsFunction): - (KJS::ArrayProtoFuncSort::callAsFunction): - (KJS::ArrayProtoFuncSplice::callAsFunction): - (KJS::ArrayProtoFuncUnShift::callAsFunction): - (KJS::ArrayProtoFuncFilter::callAsFunction): - (KJS::ArrayProtoFuncMap::callAsFunction): - (KJS::ArrayProtoFuncEvery::callAsFunction): - (KJS::ArrayProtoFuncForEach::callAsFunction): - (KJS::ArrayProtoFuncSome::callAsFunction): - (KJS::ArrayProtoFuncIndexOf::callAsFunction): - (KJS::ArrayProtoFuncLastIndexOf::callAsFunction): - * kjs/array_object.h: - (KJS::ArrayPrototype::classInfo): - * kjs/create_hash_table: - * kjs/date_object.cpp: - (KJS::DatePrototype::getOwnPropertySlot): - (KJS::DateProtoFuncToString::callAsFunction): - (KJS::DateProtoFuncToUTCString::callAsFunction): - (KJS::DateProtoFuncToDateString::callAsFunction): - (KJS::DateProtoFuncToTimeString::callAsFunction): - (KJS::DateProtoFuncToLocaleString::callAsFunction): - (KJS::DateProtoFuncToLocaleDateString::callAsFunction): - (KJS::DateProtoFuncToLocaleTimeString::callAsFunction): - (KJS::DateProtoFuncValueOf::callAsFunction): - (KJS::DateProtoFuncGetTime::callAsFunction): - (KJS::DateProtoFuncGetFullYear::callAsFunction): - (KJS::DateProtoFuncGetUTCFullYear::callAsFunction): - (KJS::DateProtoFuncToGMTString::callAsFunction): - (KJS::DateProtoFuncGetMonth::callAsFunction): - (KJS::DateProtoFuncGetUTCMonth::callAsFunction): - (KJS::DateProtoFuncGetDate::callAsFunction): - (KJS::DateProtoFuncGetUTCDate::callAsFunction): - (KJS::DateProtoFuncGetDay::callAsFunction): - (KJS::DateProtoFuncGetUTCDay::callAsFunction): - (KJS::DateProtoFuncGetHours::callAsFunction): - (KJS::DateProtoFuncGetUTCHours::callAsFunction): - (KJS::DateProtoFuncGetMinutes::callAsFunction): - (KJS::DateProtoFuncGetUTCMinutes::callAsFunction): - (KJS::DateProtoFuncGetSeconds::callAsFunction): - (KJS::DateProtoFuncGetUTCSeconds::callAsFunction): - (KJS::DateProtoFuncGetMilliSeconds::callAsFunction): - (KJS::DateProtoFuncGetUTCMilliseconds::callAsFunction): - (KJS::DateProtoFuncGetTimezoneOffset::callAsFunction): - (KJS::DateProtoFuncSetTime::callAsFunction): - (KJS::DateProtoFuncSetMilliSeconds::callAsFunction): - (KJS::DateProtoFuncSetUTCMilliseconds::callAsFunction): - (KJS::DateProtoFuncSetSeconds::callAsFunction): - (KJS::DateProtoFuncSetUTCSeconds::callAsFunction): - (KJS::DateProtoFuncSetMinutes::callAsFunction): - (KJS::DateProtoFuncSetUTCMinutes::callAsFunction): - (KJS::DateProtoFuncSetHours::callAsFunction): - (KJS::DateProtoFuncSetUTCHours::callAsFunction): - (KJS::DateProtoFuncSetDate::callAsFunction): - (KJS::DateProtoFuncSetUTCDate::callAsFunction): - (KJS::DateProtoFuncSetMonth::callAsFunction): - (KJS::DateProtoFuncSetUTCMonth::callAsFunction): - (KJS::DateProtoFuncSetFullYear::callAsFunction): - (KJS::DateProtoFuncSetUTCFullYear::callAsFunction): - (KJS::DateProtoFuncSetYear::callAsFunction): - (KJS::DateProtoFuncGetYear::callAsFunction): - * kjs/date_object.h: - * kjs/lookup.cpp: - (KJS::Lookup::find): - * kjs/lookup.h: - (KJS::HashEntry::): - (KJS::staticFunctionGetter): - (KJS::staticValueGetter): - (KJS::getStaticPropertySlot): - (KJS::getStaticFunctionSlot): - (KJS::lookupPut): - * kjs/math_object.cpp: - (KJS::MathObjectImp::getOwnPropertySlot): - (KJS::MathProtoFuncAbs::callAsFunction): - (KJS::MathProtoFuncACos::callAsFunction): - (KJS::MathProtoFuncASin::callAsFunction): - (KJS::MathProtoFuncATan::callAsFunction): - (KJS::MathProtoFuncATan2::callAsFunction): - (KJS::MathProtoFuncCeil::callAsFunction): - (KJS::MathProtoFuncCos::callAsFunction): - (KJS::MathProtoFuncExp::callAsFunction): - (KJS::MathProtoFuncFloor::callAsFunction): - (KJS::MathProtoFuncLog::callAsFunction): - (KJS::MathProtoFuncMax::callAsFunction): - (KJS::MathProtoFuncMin::callAsFunction): - (KJS::MathProtoFuncPow::callAsFunction): - (KJS::MathProtoFuncRandom::callAsFunction): - (KJS::MathProtoFuncRound::callAsFunction): - (KJS::MathProtoFuncSin::callAsFunction): - (KJS::MathProtoFuncSqrt::callAsFunction): - (KJS::MathProtoFuncTan::callAsFunction): - * kjs/math_object.h: - (KJS::MathObjectImp::classInfo): - (KJS::MathObjectImp::): - * kjs/string_object.cpp: - (KJS::StringPrototype::getOwnPropertySlot): - (KJS::StringProtoFuncToString::callAsFunction): - (KJS::StringProtoFuncValueOf::callAsFunction): - (KJS::StringProtoFuncCharAt::callAsFunction): - (KJS::StringProtoFuncCharCodeAt::callAsFunction): - (KJS::StringProtoFuncConcat::callAsFunction): - (KJS::StringProtoFuncIndexOf::callAsFunction): - (KJS::StringProtoFuncLastIndexOf::callAsFunction): - (KJS::StringProtoFuncMatch::callAsFunction): - (KJS::StringProtoFuncSearch::callAsFunction): - (KJS::StringProtoFuncReplace::callAsFunction): - (KJS::StringProtoFuncSlice::callAsFunction): - (KJS::StringProtoFuncSplit::callAsFunction): - (KJS::StringProtoFuncSubstr::callAsFunction): - (KJS::StringProtoFuncSubstring::callAsFunction): - (KJS::StringProtoFuncToLowerCase::callAsFunction): - (KJS::StringProtoFuncToUpperCase::callAsFunction): - (KJS::StringProtoFuncToLocaleLowerCase::callAsFunction): - (KJS::StringProtoFuncToLocaleUpperCase::callAsFunction): - (KJS::StringProtoFuncLocaleCompare::callAsFunction): - (KJS::StringProtoFuncBig::callAsFunction): - (KJS::StringProtoFuncSmall::callAsFunction): - (KJS::StringProtoFuncBlink::callAsFunction): - (KJS::StringProtoFuncBold::callAsFunction): - (KJS::StringProtoFuncFixed::callAsFunction): - (KJS::StringProtoFuncItalics::callAsFunction): - (KJS::StringProtoFuncStrike::callAsFunction): - (KJS::StringProtoFuncSub::callAsFunction): - (KJS::StringProtoFuncSup::callAsFunction): - (KJS::StringProtoFuncFontcolor::callAsFunction): - (KJS::StringProtoFuncFontsize::callAsFunction): - (KJS::StringProtoFuncAnchor::callAsFunction): - (KJS::StringProtoFuncLink::callAsFunction): - * kjs/string_object.h: - -2007-11-08 Adam Roben - - Windows build fix - - Reviewed by Sam and Ada. - - * wtf/MathExtras.h: Get rid of a circular #include dependency to fix - the build. - -2007-11-08 Adam Roben - - Fix a precedence warning on Windows - - * kjs/JSImmediate.h: - (KJS::JSImmediate::toBoolean): - -2007-11-08 Mark Rowe - - Build fix for JavaScriptGlue. - - * wtf/MathExtras.h: Include stdlib.h for srand and RAND_MAX. - -2007-11-08 Darin Adler - - - Windows build fix - - * kjs/JSImmediate.h: Include MathExtras.h rather than math.h since this file uses "signbit". - -2007-11-08 Oliver Hunt - - Reviewed by Darin. - - Replace the use of floats for immediate values with the use of integers for a 4.5% improvement in SunSpider. - - Unfortunately this change results in NaN, +Inf, -Inf, and -0 being heap allocated now, but - we should now have faster array access, faster immediate to double conversion, and the - potential to further improve bitwise operators in future. - - This also removes the need for unions to avoid strict aliasing problems when extracting - a value from immediates. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::trueImmediate): - (KJS::JSImmediate::falseImmediate): - (KJS::JSImmediate::undefinedImmediate): - (KJS::JSImmediate::nullImmediate): - (KJS::JSImmediate::toBoolean): - * kjs/value.h: - (KJS::jsNaN): - -2007-11-07 Eric Seidel - - Reviewed by Darin and Oliver. - - Add evaluateToNumber parallel evaluation tree to speed up number operations. - Make ImmediateNumberNode a subclass of NumberNode. - Share evaluate logic between evaluate and evaluateToNumber using inline functions - There is still a lot of improvement to be made here. - - SunSpider claims this is a 1.0% speedup overall (nbody 7.9%), base64 slowing 2.0% - Given the huge win that this prepares us for with simple type inferencing I see the small - regression in base64 being worth the substantial overall improvement. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::Node::evaluateToNumber): - (KJS::NumberNode::evaluate): - (KJS::NumberNode::evaluateToNumber): - (KJS::StringNode::evaluateToNumber): - (KJS::LocalVarAccessNode::inlineEvaluate): - (KJS::LocalVarAccessNode::evaluate): - (KJS::LocalVarAccessNode::evaluateToNumber): - (KJS::BracketAccessorNode::inlineEvaluate): - (KJS::BracketAccessorNode::evaluate): - (KJS::BracketAccessorNode::evaluateToNumber): - (KJS::NegateNode::evaluate): - (KJS::NegateNode::evaluateToNumber): - (KJS::MultNode::inlineEvaluateToNumber): - (KJS::MultNode::evaluate): - (KJS::MultNode::evaluateToNumber): - (KJS::DivNode::inlineEvaluateToNumber): - (KJS::DivNode::evaluate): - (KJS::DivNode::evaluateToNumber): - (KJS::ModNode::inlineEvaluateToNumber): - (KJS::ModNode::evaluate): - (KJS::ModNode::evaluateToNumber): - (KJS::throwOutOfMemoryErrorToNumber): - (KJS::addSlowCaseToNumber): - (KJS::add): - (KJS::addToNumber): - (KJS::AddNode::evaluateToNumber): - (KJS::SubNode::inlineEvaluateToNumber): - (KJS::SubNode::evaluate): - (KJS::SubNode::evaluateToNumber): - (KJS::valueForReadModifyAssignment): - (KJS::ReadModifyLocalVarNode::evaluate): - (KJS::ReadModifyResolveNode::evaluate): - (KJS::ReadModifyDotNode::evaluate): - (KJS::ReadModifyBracketNode::evaluate): - * kjs/nodes.h: - (KJS::Node::): - (KJS::NumberNode::): - (KJS::ImmediateNumberNode::): - (KJS::AddNode::precedence): - * kjs/nodes2string.cpp: - (KJS::NumberNode::streamTo): - -2007-11-07 Mark Rowe - - Reviewed by Eric. - - Fix up initialization after being mangled in r27572, and remove the - ternary expression as extraCost will always be zero for the numeric - heap. - - * kjs/collector.cpp: - (KJS::Collector::heapAllocate): - -2007-11-07 Mark Rowe - - Gtk build fix. - - * kjs/regexp_object.cpp: - -2007-11-07 Geoffrey Garen - - Reviewed by Beth Dakin. - - Eliminated a bogus (though compiled-out) branch in the collector. - - * kjs/collector.cpp: - (KJS::Collector::heapAllocate): - -2007-11-06 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed part of http://bugs.webkit.org/show_bug.cgi?id=15861 - 5.8% of string-validate-input.js is spent creating RegExpImps - - Put RegExpImp properties into a static hashtable to avoid a slew of - PropertyMap churn when creating a RegExpImp. - - Factored important bits of regular expression implementation out of - RegExpImp (the JS object) and into RegExp (the PCRE wrapper class), - making RegExp a ref-counted class. (This will help later.) - - Removed PCRE_POSIX support because I didn't quite know how to test it - and keep it working with these changes. - - 1.1% SunSpider speedup. 5.8% speedup on string-validate-input.js. - - * kjs/regexp.h: A few interface changes: - 1. Renamed "subpatterns()" => "numSubpatterns()" - 2. Made flag enumeration private and replaced it with public getters for - specific flags. - 3. Made RegExp ref-counted so RegExps can be shared by RegExpImps. - 4. Made RegExp take a string of flags instead of an int, eliminating - duplicated flag parsing code elsewhere. - - * kjs/regexp_object.cpp: - (KJS::RegExpProtoFunc::callAsFunction): For RegExp.compile: - - Fixed a bug where compile(undefined) would throw an exception. - - Removed some now-redundant code. - - Used RegExp sharing to eliminate an allocation and a bunch of - PropertyMap thrash. (Not a big win since compile is a deprecated - function. I mainly did this to test the plubming.) - -2007-11-07 Simon Hausmann - - Reviewed by nobody, Qt/Windows build fix. - - JavaScriptCore.pri expects OBJECTS_DIR to be set, so set it in - testkjs.pro, too, where it's included from. - - * kjs/testkjs.pro: - -2007-11-07 Simon Hausmann - - Reviewed by Lars. - - Fix "nmake clean" for the Qt/Windows build by replacing tmp/ with a variable that ends with the correct type of slash/backslash depending on the choice of compiler/make tool. - - * JavaScriptCore.pri: - * pcre/pcre.pri: - -2007-11-07 Lars Knoll - - Reviewed by Simon. - - fix umemcasecmp - - Pretty embarrassing bug. Has the potential to fix quite a few test failures. - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::umemcasecmp): - -2007-11-06 Maciej Stachowiak - - Reviewed by Eric. - - - only collect when the heap is full, unless we have lots of extra cost garbage - - 1.1% SunSpider speedup. - - This shouldn't hit memory use much since the extra space in those - blocks hangs around either way. - - * kjs/collector.cpp: - (KJS::Collector::heapAllocate): - (KJS::Collector::collect): Fix logic error that reversed the sense of collect's - return value. - -2007-11-06 Oliver Hunt - - Reviewed by Maciej. - - Avoid unnecessarily boxing the result from post inc/decrement for 0.3% gain in sunspider - - We now convert the common 'for (...; ...; ++) ...' to the semantically identical - 'for (...; ...; ++) ...'. - - * kjs/nodes.cpp: - (KJS::PostIncResolveNode::optimizeForUnnecessaryResult): - (KJS::PostIncLocalVarNode::evaluate): - (KJS::PostIncLocalVarNode::optimizeForUnnecessaryResult): - (KJS::PostDecResolveNode::optimizeForUnnecessaryResult): - (KJS::PostDecLocalVarNode::evaluate): - (KJS::PostDecLocalVarNode::optimizeForUnnecessaryResult): - * kjs/nodes.h: - (KJS::PrePostResolveNode::): - (KJS::PostIncResolveNode::): - (KJS::PostIncLocalVarNode::): - (KJS::PostDecResolveNode::): - (KJS::PostDecLocalVarNode::): - (KJS::PreIncResolveNode::): - (KJS::PreDecResolveNode::): - (KJS::ForNode::ForNode): - -2007-11-06 Eric Seidel - - Reviewed by darin. - - This fixes a regressed layout test for string + object - - SunSpider claims this was an overall 0.3% speedup, although some individual tests were slower. - - * kjs/nodes.cpp: - (KJS::add): remove erroneous "fast path" for string + * - -2007-11-06 Geoffrey Garen - - Reviewed by Eric Seidel. - - Added toJSNumber, a fast path for converting a JSValue to a JS number, - and deployed it in postfix expressions. In the fast case this - eliminates a call to jsNumber. - - 0.4% speedup on SunSpider. - - * ChangeLog: - * kjs/nodes.cpp: - (KJS::PostIncResolveNode::evaluate): - (KJS::PostIncLocalVarNode::evaluate): - (KJS::PostDecResolveNode::evaluate): - (KJS::PostDecLocalVarNode::evaluate): - (KJS::PostIncBracketNode::evaluate): - (KJS::PostDecBracketNode::evaluate): - (KJS::PostIncDotNode::evaluate): - (KJS::PostDecDotNode::evaluate): - (KJS::UnaryPlusNode::evaluate): - * kjs/value.h: - (KJS::JSValue::toJSNumber): - -2007-11-06 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15846 - REGRESSION (r27387): Memory corruption when running fast/js/kde/delete.html - - There was a mistake in the algorithm used to find an empty slot in the property - map entries vector; when we were putting in a new property value and not overwriting - an existing deleted sentinel, we would enlarge the entries vector, but would not - overwrite the stale data that's in the new part. It was easy to pin this down by - turning on property map consistency checks -- I never would have landed with this - bug if I had run the regression tests once with consistency checks on! - - * kjs/property_map.cpp: (KJS::PropertyMap::put): Changed logic for the case where - foundDeletedElement is false to always use the item at the end of the entries vector. - Also allowed me to merge with the logic for the "no deleted sentinels at all" case. - -2007-11-06 Oliver Hunt - - RS=Darin. - - Fix previous patch to use a 3 bit shift, a 16 bit shift causes a regression in sunspider. - - * kjs/nodes.cpp: - (KJS::add): - -2007-11-06 Oliver Hunt - - Reviewed by Darin. - - Replace boolean comparisons in AddNode with mask - comparisons for a 0.2% improvement in sunspider. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/nodes.cpp: - (KJS::add): - -2007-11-06 Eric Seidel - - Reviewed by darin. - - SunSpider claims this is a 1.1% speedup. - - * kjs/nodes.cpp: - (KJS::throwOutOfMemoryError): Added, non inline. - (KJS::addSlowCase): renamed from add(), non inline. - (KJS::add): add fast path for String + String, Number + Number and String + * - -2007-11-06 Eric Seidel - - Reviewed by mjs. - - Avoid more UString creation. - - SunSpider claims this is a 0.4% speedup. - - * kjs/regexp_object.cpp: - (KJS::RegExpObjectImp::construct): use UString::find(UChar) - -2007-11-05 Mark Rowe - - Mac build fix. - - * kjs/array_object.cpp: - (KJS::ArrayProtoFunc::callAsFunction): - -2007-11-05 Adam Roben - - Windows build fix - - * kjs/list.h: - -2007-11-05 Mark Rowe - - Build fix. Add missing #include. - - * kjs/operations.cpp: - -2007-11-05 Eric Seidel - - Reviewed by mjs. - - Remove another call to toString(exec) - - SunSpider claims this is a 0.5% speedup. - - * kjs/operations.cpp: - (KJS::equal): remove another toString - -2007-11-05 Eric Seidel - - * kjs/operations.cpp: - (KJS::equal): correct broken change. - -2007-11-05 Eric Seidel - - Reviewed by mjs. - - Remove one more call to toString(exec). - - SunSpider claims this is a 0.7% speedup. - - * kjs/operations.cpp: - (KJS::equal): remove a call to toString() - -2007-11-05 Mark Rowe - - Gtk build fix. - - * pcre/pcre.pri: - -2007-11-05 Mark Rowe - - Gtk build fix. - - * kjs/list.cpp: - -2007-11-05 Geoffrey Garen - - Touched a file to test my new HTTP access. - - * kjs/scope_chain.cpp: - -2007-11-05 Alp Toker - - Unreviewed build fix for qmake-based ports. - - Someone with a better understanding of qmake still needs to sort out - the INCLUDEPATH/DEPENDPATH mess. - - * JavaScriptCore.pri: - -2007-11-05 Geoffrey Garen - - Reviewed by Darin Adler. - - http://bugs.webkit.org/show_bug.cgi?id=15835 - - Switched List implementation from a custom heap allocator to an inline - Vector, for a disappointing .5% SunSpider speedup. - - Also renamed List::slice to List::getSlice because "get" is the - conventional prefix for functions returning a value through an out - parameter. - - * kjs/array_object.cpp: - (KJS::ArrayProtoFunc::callAsFunction): Removed some redundant function - calls and memory accesses. - - * kjs/bool_object.cpp: - (BooleanObjectImp::construct): Removed questionable use of iterator. - - * kjs/list.cpp: - * kjs/list.h: New List class, implemented in terms of Vector. Two - interesting differences: - 1. The inline capacity is 8, not 5. Many of the Lists constructed - during a SunSpider run are larger than 5; almost none are larger - than 8. - - 2. The growth factor is 4, not 2. Since we can guarantee that Lists - aren't long-lived, we can grow them more aggressively, to avoid - excessive copying. - - * kjs/regexp_object.cpp: - (RegExpObjectImp::construct): Removed redundant function calls. - - * kjs/string_object.cpp: - (KJS::StringObjectImp::construct): Removed questionable use of iterator. - - * wtf/Vector.h: - (WTF::::uncheckedAppend): Added a fast, unchecked version of append. - -2007-11-05 Mark Rowe - - Reviewed by Alp Toker. - - Add DEPENDPATH to JavaScriptCore and pcre to help qmake with dependencies. - - * JavaScriptCore.pri: - * pcre/pcre.pri: - -2007-11-04 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15826 - optimize opcode loop and case insensitive ASCII compares for a 30% speedup - - SunSpider says it's 2.6% faster overall, 32.5% in the regular expression tests. - - * pcre/pcre_internal.h: Added OP_ASCII_CHAR and OP_ASCII_LETTER_NC. - - * pcre/pcre_compile.c: - (find_fixedlength): Added cases for OP_ASCII_CHAR and OP_ASCII_LETTER_NC. Also - added OP_NOT since there was no reason it should not be in here. - (could_be_empty_branch): Ditto. - (compile_branch): Streamlined all the single-character cases; there was a bit of - duplicate code. Added cases for OP_ASCII_CHAR and OP_ASCII_LETTER_NC as needed. - But in particular, compile to those opcodes when the single character match is - ASCII. - (find_firstassertedchar): Added cases for OP_ASCII_CHAR and OP_ASCII_LETTER_NC. - - * pcre/pcre_exec.c: (match): Removed the "min", "minimize", and "op" fields from - the matchframe, after I discovered that none of them needed to be saved and restored - across recursive match calls. Also eliminated the ignored result field from the - matchframe, since I discovered that rrc ("recursive result code") was already the - exact same thing. Moved the handling of opcodes higher than OP_BRA into the default - statement of the switch instead of doing them before the switch. This removes a - branch from each iteration of the opcode interpreter, just as removal of "op" - removed at least one store from each iteration. Last, but not least, add the - OP_ASCII_CHAR and OP_ASCII_LETTER_NC functions. Neither can ever match a - surrogate pair and the letter case can be handled efficiently. - -2007-11-04 Darin Adler - - * pcre/pcre_exec.c: (match): Try to fix the Windows build by removing unreachable code. - -2007-11-03 Darin Adler - - - fix non-Mac builds; remove some more unused PCRE stuff - - * pcre/pcre_compile.c: - (compile_branch): Removed branch chain and some unused ESC values. - (compile_regex): Ditto. - (jsRegExpCompile): Ditto. - * pcre/pcre_exec.c: - (match): Removed unused branch targets. Don't use macros any more. - (jsRegExpExecute): More of the same. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Update for removed files. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - * pcre/pcre.pri: Ditto. - - * pcre/MERGING: Removed. - * pcre/pcre_fullinfo.c: Removed. - * pcre/pcre_get.c: Removed. - * pcre/pcre_internal.h: - * pcre/ucp.h: Removed. - -2007-11-03 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15821 - remove unused PCRE features for speed - - A first step toward removing the PCRE features we don't use. - This gives a 0.8% speedup on SunSpider, and a 6.5% speedup on - the SunSpider regular expression test. - - Replaced the public interface with one that doesn't use the - name PCRE. Removed code we don't need for JavaScript and various - configurations we don't use. This is in preparation for still - more changes in the future. We'll probably switch to C++ and - make some even more significant changes to the regexp engine - to get some additional speed. - - There's probably additional unused stuff that I haven't - deleted yet. - - This does mean that our PCRE is now a fork, but I think that's - not really a big deal. - - * JavaScriptCore.exp: Remove the 5 old entry points and add - the 3 new entry points for WebCore's direct use of the regular - expression engine. - - * kjs/config.h: Remove the USE(PCRE16) define. I decided to flip - its sense and now there's a USE(POSIX_REGEX) instead, which should - probably not be set by anyone. Maybe later we'll just get rid of it - altogether. - - * kjs/regexp.h: - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): Switch to new jsRegExp function names and - defines. Cut down on the number of functions used. - (KJS::RegExp::~RegExp): Ditto. - (KJS::RegExp::match): Ditto. - - * pcre/dftables.c: (main): Get rid of ctype_letter and ctype_meta, - which are unused. - - * pcre/pcre-config.h: Get rid of EBCIDIC, PCRE_DATA_SCOPE, const, - size_t, HAVE_STRERROR, HAVE_MEMMOVE, HAVE_BCOPY, NEWLINE, - POSIX_MALLOC_THRESHOLD, NO_RECURSE, SUPPORT_UCP, SUPPORT_UTF8, - and JAVASCRIPT. These are all no longer configurable in our copy - of the library. - - * pcre/pcre.h: Remove the macro-based kjs prefix hack, the PCRE - version macros, PCRE_UTF16, the code to set up PCRE_DATA_SCOPE, - the include of , and most of the constants and - functions defined in this header. Changed the naming scheme to - use a JSRegExp prefix rather than a pcre prefix. In the future, - we'll probably change this to be a C++ header. - - * pcre/pcre_compile.c: Removed all unused code branches, - including many whole functions and various byte codes. - Kept changes outside of removal to a minimum. - (check_escape): - (first_significant_code): - (find_fixedlength): - (find_recurse): - (could_be_empty_branch): - (compile_branch): - (compile_regex): - (is_anchored): - (is_startline): - (find_firstassertedchar): - (jsRegExpCompile): Renamed from pcre_compile2 and changed the - parameters around a bit. - (jsRegExpFree): Added. - - * pcre/pcre_exec.c: Removed many unused opcodes and variables. - Also started tearing down the NO_RECURSE mechanism since it's - now the default. In some cases there were things in the explicit - frame that could be turned into plain old local variables and - other small like optimizations. - (pchars): - (match_ref): - (match): Changed parameters quite a bit since it's now not used - recursively. - (jsRegExpExecute): Renamed from pcre_exec. - - * pcre/pcre_internal.h: Get rid of PCRE_DEFINITION, PCRE_SPTR, - PCRE_IMS, PCRE_ICHANGED, PCRE_NOPARTIAL, PCRE_STUDY_MAPPED, - PUBLIC_OPTIONS, PUBLIC_EXEC_OPTIONS, PUBLIC_DFA_EXEC_OPTIONS, - PUBLIC_STUDY_OPTIONS, MAGIC_NUMBER, 16 of the opcodes, - _pcre_utt, _pcre_utt_size, _pcre_try_flipped, _pcre_ucp_findprop, - and _pcre_valid_utf8. Also moved pcre_malloc and pcre_free here. - - * pcre/pcre_maketables.c: Changed to only compile in dftables. - Also got rid of many of the tables that we don't use. - - * pcre/pcre_tables.c: Removed the unused Unicode property tables. - - * pcre/pcre_ucp_searchfuncs.c: Removed everything except for - _pcre_ucp_othercase. - - * pcre/pcre_xclass.c: (_pcre_xclass): Removed uneeded support - for classes based on Unicode properties. - - * wtf/FastMallocPCRE.cpp: Removed unused bits. It would be good - to eliminate this completely, but we need the regular expression - code to be C++ first. - - * pcre/pcre_fullinfo.c: - * pcre/pcre_get.c: - * pcre/ucp.h: - Files that are no longer needed. I didn't remove them with this - check-in, because I didn't want to modify all the project files. - -2007-11-03 Maciej Stachowiak - - Reviewed by Sam. - - - remove NaN check from JSImmediate::fromDouble for 0.5% SunSpider speedup - - It turns out that doing this check costs more than it saves. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::fromDouble): - -2007-11-03 Sam Weinig - - Reviewed by Oliver. - - Remove dummy variable from ClassInfo reducing the size of the struct by 1 word. - The variable had been kept around for binary compatibility, but since nothing - else is there is no point in continuing to keep it around. - - * API/JSCallbackConstructor.cpp: - * API/JSCallbackFunction.cpp: - * API/JSCallbackObject.cpp: - * bindings/objc/objc_runtime.mm: - * bindings/runtime_array.cpp: - * bindings/runtime_object.cpp: - * kjs/array_instance.cpp: - * kjs/array_object.cpp: - * kjs/bool_object.cpp: - * kjs/date_object.cpp: - * kjs/error_object.cpp: - * kjs/function.cpp: - * kjs/internal.cpp: - * kjs/lookup.h: - * kjs/math_object.cpp: - * kjs/number_object.cpp: - * kjs/object.h: - * kjs/regexp_object.cpp: - * kjs/string_object.cpp: - -2007-11-03 Kevin McCullough - - - Updated testkjs results to make the build bots green until we - can fix the tests that are failing. The new failures are in DST. - - * tests/mozilla/expected.html: - -2007-11-03 Maciej Stachowiak - - Reviewed by Adam. - - - don't print the var twice for ForInNodes with a var declaration - - * kjs/nodes2string.cpp: - (KJS::ForInNode::streamTo): - -2007-11-03 Darin Adler - - * pcre/pcre_compile.c: (check_escape): Windows build fix. Get rid of - C-incompatible declaration. - -2007-11-03 Mark Rowe - - Gtk build fix. - - * kjs/nodes.cpp: Add missing include. - -2007-11-03 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=15814 - fast/js/kde/encode_decode_uri.html fails - - These changes cause us to match the JavaScript specification and pass the - fast/js/kde/encode_decode_uri.html test. - - * kjs/function.cpp: (KJS::encode): Call the UTF-8 string conversion in its - new strict mode, throwing an exception if there are malformed UTF-16 surrogate - pairs in the text. - - * kjs/ustring.h: Added a strict version of the UTF-8 string conversion. - * kjs/ustring.cpp: - (KJS::decodeUTF8Sequence): Removed code to disallow U+FFFE and U+FFFF; while - those might be illegal in some sense, they aren't supposed to get any special - handling in the place where this function is currently used. - (KJS::UString::UTF8String): Added the strictness. - -2007-11-03 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15812 - some JavaScript tests (from the Mozilla test suite) are failing - - Two or three fixes get 7 more of the Mozilla tests passing. - This gets us down from 61 failing tests to 54. - - * kjs/interpreter.h: (KJS::Interpreter::builtinRegExp): - Made this inline and gave it a more specific type. Some day we should - probably do that for all of these -- might even get a bit of a speed - boost from it. - * kjs/interpreter.cpp: Removed Interpreter::builtinRegExp now that it's - inline in the header. - - * kjs/regexp_object.h: - * kjs/regexp_object.cpp: - (KJS::RegExpProtoFunc::callAsFunction): Moved test and exec out of the - switch statement into the RegExpImp object, so they can be shared with - RegExpImp::callAsFunction. - (KJS::RegExpImp::match): Added. Common code used by both test and exec. - (KJS::RegExpImp::test): Added. - (KJS::RegExpImp::exec): Added. - (KJS::RegExpImp::implementsCall): Added. - (KJS::RegExpImp::callAsFunction): Added. - (KJS::RegExpObjectImpPrivate::RegExpObjectImpPrivate): Initialize - lastInput to null rather than empty string -- we take advantage of the - difference in RegExpImp::match. - (KJS::RegExpObjectImp::input): Added. No reason to go through hash tables - just to get at a field like this. - - * pcre/pcre_compile.c: (check_escape): Changed the \u handling to match - the JavaScript specification. If there are not 4 hex digits after the \u, - then it's processed as if it wasn't an escape sequence at all. - - * pcre/pcre_internal.h: Added IS_NEWLINE, with the appropriate definition - for JavaScript (4 specific Unicode values). - * pcre/pcre_exec.c: - (match): Changed all call sites to use IS_NEWLINE. - (pcre_exec): Ditto. - - * tests/mozilla/expected.html: Updated to expect 7 more successful tests. - -2007-11-03 David D. Kilzer - - Sort files(...); sections of Xcode project files. - - Rubber-stamped by Darin. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-11-03 Maciej Stachowiak - - Reviewed by Oliver. - - - remove VarDeclListNode and simplify VarDeclNode evaluation for 0.4% SunSpider speedup - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::VarDeclNode::optimizeVariableAccess): - (KJS::VarDeclNode::getDeclarations): - (KJS::VarDeclNode::handleSlowCase): - (KJS::VarDeclNode::evaluateSingle): - (KJS::VarDeclNode::evaluate): - (KJS::VarStatementNode::execute): - * kjs/nodes.h: - (KJS::VarDeclNode::): - (KJS::VarStatementNode::): - * kjs/nodes2string.cpp: - (KJS::VarDeclNode::streamTo): - -2007-11-03 Alexey Proskuryakov - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=15800 - REGRESSION (r27303): RegExp leaks - - * kjs/regexp_object.h: - (KJS::RegExpImp::setRegExp): - (KJS::RegExpImp::regExp): - (KJS::RegExpImp::classInfo): - * kjs/regexp_object.cpp: - (RegExpImp::RegExpImp): - (RegExpImp::~RegExpImp): - Renamed reg member variable to m_regExp, changed it to use OwnPtr. - -2007-11-02 Maciej Stachowiak - - Reviewed by Oliver. - - - add SourceElements as a typedef for Vector >. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::statementListPushFIFO): - (KJS::statementListGetDeclarations): - (KJS::statementListInitializeDeclarationStacks): - (KJS::statementListInitializeVariableAccessStack): - (KJS::statementListExecute): - (KJS::BlockNode::BlockNode): - (KJS::FunctionBodyNode::FunctionBodyNode): - (KJS::ProgramNode::ProgramNode): - * kjs/nodes.h: - (KJS::CaseClauseNode::): - -2007-11-02 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15791 - change property map data structure for less memory use, better speed - - The property map now has an array of indices and a separate array of - property map entries. This slightly slows down lookup because of a second - memory acess, but makes property maps smaller and faster to iterate in - functions like mark(). - - SunSpider says this is 1.2% faster, although it makes the bitwise-end test - more than 10% slower. To fix that we'll need to optimize global variable lookup. - - * kjs/property_map.cpp: - (KJS::PropertyMapEntry::PropertyMapEntry): - (KJS::PropertyMapHashTable::entries): - (KJS::PropertyMapHashTable::allocationSize): - (KJS::SavedProperties::SavedProperties): - (KJS::SavedProperties::~SavedProperties): - (KJS::PropertyMap::checkConsistency): - (KJS::PropertyMap::~PropertyMap): - (KJS::PropertyMap::clear): - (KJS::PropertyMap::get): - (KJS::PropertyMap::getLocation): - (KJS::PropertyMap::put): - (KJS::PropertyMap::insert): - (KJS::PropertyMap::createTable): - (KJS::PropertyMap::rehash): - (KJS::PropertyMap::remove): - (KJS::PropertyMap::mark): - (KJS::comparePropertyMapEntryIndices): - (KJS::PropertyMap::containsGettersOrSetters): - (KJS::PropertyMap::getEnumerablePropertyNames): - (KJS::PropertyMap::save): - (KJS::PropertyMap::restore): - * kjs/property_map.h: - -2007-11-02 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15807 - HashMap needs a take() function that combines get and remove - - * wtf/HashMap.h: Added take function. Simplistic implementation for now, - but still does only one hash table lookup. - - * kjs/array_instance.cpp: (KJS::ArrayInstance::put): Use take rather than - a find followed by a remove. - -2007-11-02 David Carson - - Reviewed by Darin. - - Fix compiler warning "warning: suggest parentheses around && within ||" - http://bugs.webkit.org/show_bug.cgi?id=15764 - - * kjs/value.h: (KJS::JSValue::isNumber): Add parentheses. - -2007-11-01 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - In preparation for making List a simple stack-allocated Vector: - - Removed all instances of List copying and/or assignment, and made List - inherit from Noncopyable. - - Functions that used to return a List by copy now take List& out - parameters. - - Layout tests and JS tests pass. - - * kjs/list.cpp: - (KJS::List::slice): Replaced copyTail with a more generic slice - alternative. (JavaScriptCore only calls slice(1), but WebCore calls - slice(2)). - -2007-11-01 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=15785 - REGRESSION(r27344): Crash on load at finance.yahoo.com - - Reverted a small portion of my last check-in. (The speedup and the List - removal are still there, though.) - - ActivationImp needs to hold a pointer to its function, and mark that - pointer (rather than accessing its function through its ExecState, and - counting on the active scope to mark its function) because a closure - can cause an ActivationImp to outlive its ExecState along with any - active scope. - - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - * kjs/function.cpp: - (KJS::FunctionImp::~FunctionImp): - (KJS::ActivationImp::ActivationImp): - * kjs/function.h: - (KJS::ActivationImp::ActivationImpPrivate::ActivationImpPrivate): - - Also made HashTable a little more crash-happy in debug builds, so - problems like this will show up earlier: - - * wtf/HashTable.h: - (WTF::HashTable::~HashTable): - -2007-11-01 Geoffrey Garen - - Reviewed by Adam Roben. - - Addressed some of Darin's review comments. - - Used perl -p, which is the shorthand while(<>) {}. - - Made sure not to suppress bison's output. - - Added line to removed bison_out.txt, since this script removes other - intermediate files, too. - - * DerivedSources.make: - -2007-11-01 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Removed List from ActivationImp, in preparation for making all lists - stack-allocated. - - Tests pass. - - 1.0% speedup on SunSpider, presumably due to reduced List refcount thrash. - - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - (KJS::ExecState::~ExecState): - * kjs/function.cpp: - (KJS::ActivationImp::ActivationImp): - (KJS::ActivationImp::createArgumentsObject): - * kjs/function.h: - (KJS::ActivationImp::ActivationImpPrivate::ActivationImpPrivate): - -2007-11-01 Adam Roben - - Use jsNumberCell instead of jsNumber when converting double constants to JSValues - - This fixes fast/js/math.html, ecma/Date/15.9.5.10-1.js, and - ecma/Date/15.9.5.12-1.js, which were suffering from a bug in MSVC. - - It also gets rid of an MSVC warning that we previously had to silence. - - Reviewed by Geoff. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Turn - back on the "overflow in constant arithmetic" warning. - * kjs/number_object.cpp: - (NumberObjectImp::getValueProperty): Use jsNumberCell instead of - jsNumber. - -2007-10-31 Adam Roben - - Windows build fix - - * kjs/ExecState.h: - -2007-10-31 Maciej Stachowiak - - Reviewed by Oliver. - - - shave some cycles off of local storage access for a 1% SunSpider speedup - - Keep the LocalStorage pointer in the ExecState, instead of getting - it from the ActivationImp all the time. - - * kjs/ExecState.cpp: - (KJS::ExecState::updateLocalStorage): - * kjs/ExecState.h: - (KJS::ExecState::localStorage): - * kjs/nodes.cpp: - (KJS::LocalVarAccessNode::evaluate): - (KJS::LocalVarFunctionCallNode::evaluate): - (KJS::PostIncLocalVarNode::evaluate): - (KJS::PostDecLocalVarNode::evaluate): - (KJS::LocalVarTypeOfNode::evaluate): - (KJS::PreIncLocalVarNode::evaluate): - (KJS::PreDecLocalVarNode::evaluate): - (KJS::ReadModifyLocalVarNode::evaluate): - (KJS::AssignLocalVarNode::evaluate): - (KJS::FunctionBodyNode::processDeclarationsForFunctionCode): - -2007-10-31 Adam Roben - - Fix a crash on launch due to a static initializer race - - We now use fast inline assembler spinlocks which can be statically - initialized at compile time. - - As a side benefit, this speeds up SunSpider by 0.4%. - - Reviewed by Oliver. - - * wtf/FastMalloc.cpp: - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SlowLock): - * wtf/TCSystemAlloc.cpp: - -2007-10-31 Kevin McCullough - - Reviewed by Sam. - - - Corrected spelling. - - * wtf/HashTraits.h: - -2007-10-31 Mark Rowe - - Further Gtk build fixage. - - * kjs/regexp_object.cpp: - -2007-10-31 Mark Rowe - - Gtk build fix. - - * kjs/regexp.h: - -2007-10-31 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=15749 - RegExp/RegExpObjectImp cause needless UString creation - - Speeds things up 0.4% according to SunSpider. - - * kjs/config.h: Define USE(PCRE16) instead of HAVE(PCREPOSIX), - because this library doesn't use the real PCRE -- it uses its - own PCRE that works on UTF-16. - - * kjs/regexp.h: Removed a few unused functions. Changed the ifdef. - Use Noncopyable. Change the return value of match. - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): Call pcre_compile2, for a slight speed boost. - (KJS::RegExp::~RegExp): PCRE16 rather than PCREPOSIX. - (KJS::RegExp::match): Change to return the position as an int and the - ovector as a OwnArrayPtr for efficiency and clearer storage management. - - * kjs/regexp_object.h: Change performMatch and arrayOfMatches to no longer - require a result string. - * kjs/regexp_object.cpp: - (RegExpProtoFunc::callAsFunction): Update for new signature of performMatch. - (RegExpObjectImp::performMatch): Change so it doesn't return a string. - (RegExpObjectImp::arrayOfMatches): Simplify by unifying the handling of - the main result with the backreferences; now it doesn't need to take - a result parameter. - (RegExpObjectImp::getBackref): Minor tweaks. - (RegExpObjectImp::getLastParen): Ditto. - (RegExpObjectImp::getLeftContext): Ditto. - (RegExpObjectImp::getRightContext): Ditto. - (RegExpObjectImp::getValueProperty): Change LastMatch case to call - getBackref(0) so we don't need a separate getLastMatch function. - - * kjs/string_object.cpp: - (KJS::replace): Update to use new performMatch, including merging the - matched string section with the other substrings. - (KJS::StringProtoFunc::callAsFunction): Update functions to use the - new performMatch and match. Also change to use OwnArrayPtr. - -2007-10-31 Oliver Hunt - - * kjs/nodes.h: include OwnPtr.h - -2007-10-31 Oliver Hunt - - Reviewed by Maciej. - - Remove SourceCodeElement class and replaced with a Vector for a 0.8% gain on sunspider - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::statementListPushFIFO): - (KJS::statementListGetDeclarations): - (KJS::statementListInitializeDeclarationStacks): - (KJS::statementListInitializeVariableAccessStack): - (KJS::statementListExecute): - (KJS::BlockNode::optimizeVariableAccess): - (KJS::BlockNode::BlockNode): - (KJS::BlockNode::getDeclarations): - (KJS::BlockNode::execute): - (KJS::CaseClauseNode::optimizeVariableAccess): - (KJS::CaseClauseNode::getDeclarations): - (KJS::CaseClauseNode::evalStatements): - (KJS::FunctionBodyNode::initializeDeclarationStacks): - (KJS::FunctionBodyNode::optimizeVariableAccess): - * kjs/nodes.h: - * kjs/nodes2string.cpp: - (KJS::statementListStreamTo): - (KJS::BlockNode::streamTo): - (KJS::CaseClauseNode::streamTo): - -2007-10-30 Mark Rowe - - * kjs/property_map.cpp: Added a missing using directive to fix the build - for non-Mac ports. Mac worked only because it does the AllInOneFile compile. - -2007-10-31 Maciej Stachowiak - - * kjs/property_map.cpp: Include HashTable.h the right way to fix the build - for non-Mac ports. - -2007-10-31 Alexey Proskuryakov - - Reviewed by Darin. - - http://bugs.webkit.org/show_bug.cgi?id=11001 - WebKit doesn't support RegExp.compile method - - Test: fast/js/regexp-compile.html - - * kjs/regexp_object.cpp: - (RegExpPrototype::RegExpPrototype): - (RegExpProtoFunc::callAsFunction): - * kjs/regexp_object.h: - (KJS::RegExpProtoFunc::): - Added RegExp.compile. - - * tests/mozilla/expected.html: js1_2/regexp/compile.js now passes. - -2007-10-31 Maciej Stachowiak - - Reviewed by Oliver. - - - get rid of integer divide in PropertyMap and HashTable for 1% SunSpider speedup - - Integer divide sucks. Fortunately, a bunch of shifts and XORs - biased towards the high bits is sufficient to provide a good - double hash. Besides the SunSpider win, I used the dump statistics - mode for both to verify that collisions did not increase and that - the longest collision chain is not any longer. - - * kjs/property_map.cpp: - (KJS::doubleHash): - (KJS::PropertyMap::get): - (KJS::PropertyMap::getLocation): - (KJS::PropertyMap::put): - (KJS::PropertyMap::insert): - (KJS::PropertyMap::remove): - (KJS::PropertyMap::checkConsistency): - * wtf/HashTable.h: - (WTF::doubleHash): - (WTF::::lookup): - (WTF::::lookupForWriting): - (WTF::::fullLookupForWriting): - (WTF::::add): - -2007-10-30 Adam Roben - - * kjs/collector.h: Make HeapType public so it can be used for non-member - things like the HeapConstants struct template. Fixes the build on Windows. - -2007-10-30 Adam Roben - - Change ALWAYS_INLINE and WTF_PRIVATE_INLINE to use __forceinline on Windows - - Speeds up SunSpider by 0.4%. - - Reviewed by Steve and Maciej. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Disable - a warning during LTCG in release builds about double -> float - conversion. - * wtf/AlwaysInline.h: - * wtf/FastMalloc.h: - -2007-10-30 Adam Roben - - Use GetCurrentThreadId instead of pthread_self in FastMalloc - - Speeds up SunSpider by 0.3%. - - Reviewed by Steve. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_ThreadCache::InitTSD): - (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): - -2007-10-30 Adam Roben - - Switch to a Win32 critical section implementation of spinlocks - - Speeds up SunSpider by 0.4%. - - Reviewed by Steve. - - * wtf/FastMalloc.cpp: - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::TCMalloc_SpinLock): - (TCMalloc_SpinLock::Init): - (TCMalloc_SpinLock::Finalize): - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - * wtf/TCSystemAlloc.cpp: - -2007-10-30 Adam Roben - - Fix Bug 15586: REGRESSION (r26759-r26785): Windows nightly builds crash with Safari 3 Public Beta - - http://bugs.webkit.org/show_bug.cgi?id=15586 - - Also fixes: Cannot use regsvr32.exe to register WebKit.dll - - Use Win32 TLS functions instead of __declspec(thread), which breaks - delay-loading. - - Reviewed by Steve. - - * wtf/FastMalloc.cpp: - (WTF::getThreadHeap): - (WTF::TCMalloc_ThreadCache::InitModule): - -2007-10-30 Maciej Stachowiak - - Reviewed by Oliver. - - - allocate numbers in half-size cells, for an 0.5% SunSpider speedup - http://bugs.webkit.org/show_bug.cgi?id=15772 - - We do this by using a single mark bit per two number cells, and - tweaking marking. - - Besides being an 0.5% win overall, this is a 7.1% win on morph. - - * kjs/collector.cpp: - (KJS::Collector::heapAllocate): - (KJS::Collector::markStackObjectsConservatively): - (KJS::Collector::sweep): - * kjs/collector.h: - (KJS::SmallCollectorCell::): - -2007-10-30 Geoffrey Garen - - Reviewed by Adam Roben, Sam Weinig. - - Made conflicts in grammar.y a persistent build failure. - - * DerivedSources.make: - -2007-10-30 Kevin McCullough - - Reviewed by Adam and Geoff. - - - Added a new cast so all the casts are in the same place. - - * API/APICast.h: - (toGlobalRef): - -2007-10-30 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed shift/reduce conflict introduced in r24457 - - JS tests, including - - ecma_2/Statements/dowhile-001.js - ecma_2/Statements/dowhile-002.js - ecma_2/Statements/dowhile-003.js - ecma_2/Statements/dowhile-004.js - ecma_2/Statements/dowhile-005.js - ecma_2/Statements/dowhile-006.js - ecma_2/Statements/dowhile-007.js - js1_2/statements/do_while.js - - and layout tests, including - - do-while-expression-value.html - do-while-semicolon.html - do-while-without-semicolon.html - - pass. - - * kjs/grammar.y: Use the explicit "error" production, as we do with other - automatic semicolon insertions, to disambiguate "do { } while();" from - "do { } while()" followed by ";" (the empty statement). - -2007-10-29 Oliver Hunt - - Reviewed by Maciej. - - Debranching remaining assignment nodes, and miscellaneous cleanup - - Split read-modify code paths out of AssignBracketNode and AssignDotNode - Removed now unnecessary check for write-only assignment in ReadModifyLocalVarNode - and ReadModifyResolveNode evaluate methods - - Leads to a 1% gain in SunSpider. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::ReadModifyLocalVarNode::evaluate): - (KJS::ReadModifyResolveNode::evaluate): - (KJS::AssignDotNode::evaluate): - (KJS::ReadModifyDotNode::optimizeVariableAccess): - (KJS::ReadModifyDotNode::evaluate): - (KJS::AssignBracketNode::evaluate): - (KJS::ReadModifyBracketNode::optimizeVariableAccess): - (KJS::ReadModifyBracketNode::evaluate): - * kjs/nodes.h: - (KJS::AssignBracketNode::): - (KJS::AssignBracketNode::precedence): - (KJS::AssignDotNode::): - (KJS::AssignDotNode::precedence): - * kjs/nodes2string.cpp: - (KJS::ReadModifyBracketNode::streamTo): - (KJS::AssignBracketNode::streamTo): - (KJS::ReadModifyDotNode::streamTo): - (KJS::AssignDotNode::streamTo): - -2007-10-29 Oliver Hunt - - Debranching various Node::evaluate implementations - - Reviewed by Maciej. - - Split the read-modify-write assignment cases out of AssignResolveNode and into ReadModifyResolveNode - Split the increment and decrement cases for Prefix- and Postfix- ResolveNode, BracketNode, and DotNode - - Gains 1.6% on SunSpider - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::PostIncResolveNode::optimizeVariableAccess): - (KJS::PostIncResolveNode::evaluate): - (KJS::PostIncLocalVarNode::evaluate): - (KJS::PostDecResolveNode::optimizeVariableAccess): - (KJS::PostDecResolveNode::evaluate): - (KJS::PostDecLocalVarNode::evaluate): - (KJS::PostIncBracketNode::evaluate): - (KJS::PostDecBracketNode::evaluate): - (KJS::PostIncDotNode::evaluate): - (KJS::PostDecDotNode::evaluate): - (KJS::PreIncResolveNode::optimizeVariableAccess): - (KJS::PreIncLocalVarNode::evaluate): - (KJS::PreIncResolveNode::evaluate): - (KJS::PreDecResolveNode::optimizeVariableAccess): - (KJS::PreDecLocalVarNode::evaluate): - (KJS::PreDecResolveNode::evaluate): - (KJS::PreIncBracketNode::evaluate): - (KJS::PreDecBracketNode::evaluate): - (KJS::PreIncDotNode::evaluate): - (KJS::PreDecDotNode::evaluate): - (KJS::ReadModifyResolveNode::optimizeVariableAccess): - (KJS::AssignResolveNode::optimizeVariableAccess): - (KJS::AssignLocalVarNode::evaluate): - (KJS::AssignResolveNode::evaluate): - * kjs/nodes.h: - (KJS::PostDecResolveNode::): - (KJS::PostDecResolveNode::precedence): - (KJS::PostDecLocalVarNode::): - (KJS::PostfixBracketNode::): - (KJS::PostfixBracketNode::precedence): - (KJS::PostIncBracketNode::): - (KJS::PostIncBracketNode::isIncrement): - (KJS::PostDecBracketNode::): - (KJS::PostDecBracketNode::isIncrement): - (KJS::PostfixDotNode::): - (KJS::PostfixDotNode::precedence): - (KJS::PostIncDotNode::): - (KJS::PostIncDotNode::isIncrement): - (KJS::PostDecDotNode::): - (KJS::PreIncResolveNode::): - (KJS::PreDecResolveNode::): - (KJS::PreDecResolveNode::precedence): - (KJS::PreDecLocalVarNode::): - (KJS::PrefixBracketNode::): - (KJS::PrefixBracketNode::precedence): - (KJS::PreIncBracketNode::): - (KJS::PreIncBracketNode::isIncrement): - (KJS::PreDecBracketNode::): - (KJS::PreDecBracketNode::isIncrement): - (KJS::PrefixDotNode::): - (KJS::PrefixDotNode::precedence): - (KJS::PreIncDotNode::): - (KJS::PreIncDotNode::isIncrement): - (KJS::PreDecDotNode::): - (KJS::ReadModifyResolveNode::): - (KJS::ReadModifyLocalVarNode::): - (KJS::AssignResolveNode::): - (KJS::AssignResolveNode::precedence): - * kjs/nodes2string.cpp: - (KJS::PostIncResolveNode::streamTo): - (KJS::PostDecResolveNode::streamTo): - (KJS::PostfixBracketNode::streamTo): - (KJS::PostfixDotNode::streamTo): - (KJS::PreIncResolveNode::streamTo): - (KJS::PreDecResolveNode::streamTo): - (KJS::ReadModifyResolveNode::streamTo): - (KJS::AssignResolveNode::streamTo): - -2007-10-29 Maciej Stachowiak - - Not reviewed, build fix. - - - Include Vector.h in a way that actually works. - - * kjs/LocalStorage.h: - -2007-10-29 Maciej Stachowiak - - Not reviewed, build fix. - - - Install LocalStorage.h as a private header. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-10-29 Maciej Stachowiak - - Reviewed by Darin. - - - Define good VectorTraits for LocalStorage entry for 0.5% speed improvement on SunSpider. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/LocalStorage.h: Added. - (KJS::LocalStorageEntry::LocalStorageEntry): - (WTF::): - * kjs/function.h: - * kjs/nodes.cpp: - (KJS::FunctionBodyNode::processDeclarationsForFunctionCode): - -2007-10-29 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Some small tweaks that I notice while reviewing Oliver's last patch. - - Includes removal of an unnecessary KJS_CHECKEXCEPTIONVALUE. - - No change in SunSpider because SunSpider doesn't take the code path that - would execute the unnecessary KJS_CHECKEXCEPTIONVALUE much. - - * kjs/nodes.cpp: - (KJS::LocalVarPostfixNode::evaluate): - (KJS::TypeOfResolveNode::optimizeVariableAccess): - (KJS::LocalVarTypeOfNode::evaluate): - (KJS::PrefixResolveNode::optimizeVariableAccess): - (KJS::LocalVarPrefixNode::evaluate): - (KJS::AssignResolveNode::optimizeVariableAccess): - (KJS::LocalVarAssignNode::evaluate): - * kjs/nodes.h: - (KJS::LocalVarTypeOfNode::): - (KJS::PrefixResolveNode::): - (KJS::LocalVarPrefixNode::): - (KJS::AssignResolveNode::): - (KJS::LocalVarAssignNode::): - -2007-10-29 Eric Seidel - - Reviewed by Maciej. - - SunSpider claims this was a 0.7% speedup. - - * kjs/string_object.cpp: - (KJS::StringProtoFunc::callAsFunction): avoid mallocing a jsString in the common case - -2007-10-29 Maciej Stachowiak - - Reviewed by Mark. - - - re-enable asserts for access to empty or deleted keys - - * wtf/HashTable.h: - (WTF::::lookup): - (WTF::::lookupForWriting): - (WTF::::fullLookupForWriting): - (WTF::::add): - -2007-10-29 Eric Seidel - - Build fix only, no review. - - * JavaScriptCore.exp: Export symbol for new StringInstance::getOwnPropertySlot - -2007-10-29 Mark Rowe - - Gtk build fix. Move struct declarations into nodes.h. - - * kjs/grammar.y: - * kjs/nodes.h: - -2007-10-29 Eric Seidel - - Reviewed by darin. - - Give StringInstance a getOwnPropertySlot(ExecState, unsigned, PropertySlot) fastpath, just like Arrays. - Make it a compile time error to use toString(ExecState) on a StringInstance - - SunSpider claims this was a 6.6% speedup overall (22% on string-base64) - - * kjs/internal.h: - (KJS::StringImp::getLength): - * kjs/string_object.cpp: - (KJS::StringInstance::lengthGetter): - (KJS::StringInstance::inlineGetOwnPropertySlot): - (KJS::StringInstance::getOwnPropertySlot): - * kjs/string_object.h: - -2007-10-28 Oliver Hunt - - Reviewed by Darin. - - Add nodes to allow Assignment, TypeOf, and prefix operators to - make use of the new optimised local variable look up. - - 5% gain on sunspider - - * kjs/nodes.cpp: - (KJS::TypeOfResolveNode::optimizeVariableAccess): - (KJS::LocalTypeOfAccessNode::evaluate): - (KJS::PrefixResolveNode::optimizeVariableAccess): - (KJS::PrefixLocalAccessNode::evaluate): - (KJS::AssignResolveNode::optimizeVariableAccess): - (KJS::AssignLocalAccessNode::evaluate): - * kjs/nodes.h: - (KJS::TypeOfResolveNode::): - (KJS::TypeOfResolveNode::precedence): - (KJS::LocalTypeOfAccessNode::): - (KJS::PrefixResolveNode::): - (KJS::PrefixResolveNode::precedence): - (KJS::PrefixLocalAccessNode::): - (KJS::AssignResolveNode::): - (KJS::AssignLocalAccessNode::): - -2007-10-28 Maciej Stachowiak - - Reviewed by Darin. - - - avoid creating and then breaking circular lists in the parser, instead track head and tail pointers at parse time - http://bugs.webkit.org/show_bug.cgi?id=15748 - - Not a significant speedup or slowdown on SunSpider. - - * kjs/Parser.cpp: - (KJS::clearNewNodes): - * kjs/Parser.h: - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::BlockNode::BlockNode): - (KJS::CaseBlockNode::CaseBlockNode): - (KJS::FunctionBodyNode::FunctionBodyNode): - (KJS::SourceElementsNode::SourceElementsNode): - (KJS::ProgramNode::ProgramNode): - * kjs/nodes.h: - (KJS::ElementNode::): - (KJS::ArrayNode::): - (KJS::PropertyListNode::): - (KJS::ObjectLiteralNode::): - (KJS::ArgumentListNode::): - (KJS::ArgumentsNode::): - (KJS::VarDeclListNode::): - (KJS::VarStatementNode::): - (KJS::ForNode::): - (KJS::ParameterNode::): - (KJS::FuncExprNode::): - (KJS::FuncDeclNode::): - (KJS::SourceElementsNode::): - (KJS::CaseClauseNode::): - (KJS::ClauseListNode::): - -2007-10-28 Mark Rowe - - Disable assertions in a manner that doesn't break the Qt Windows build. - - * wtf/HashTable.h: - (WTF::::lookup): - (WTF::::lookupForWriting): - (WTF::::fullLookupForWriting): - -2007-10-28 Geoffrey Garen - - Temporarily disabling some ASSERTs I introduced in my last check-in - because of http://bugs.webkit.org/show_bug.cgi?id=15747 - Lots of layout tests fail the !HashTranslator::equal(KeyTraits::emptyValue() ASSERT - - * wtf/HashTable.h: - (WTF::::lookup): - (WTF::::lookupForWriting): - (WTF::::fullLookupForWriting): - (WTF::::add): - -2007-10-28 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=15746 - #ifndef ASSERT_DISABLED is no good! - - Replaced with #if !ASSERT_DISABLED. - - * wtf/HashTable.h: - (WTF::::lookup): - (WTF::::lookupForWriting): - (WTF::::fullLookupForWriting): - (WTF::::add): - -2007-10-28 Geoffrey Garen - - Reviewed by Darin Adler. - - Added FunctionCallResolveNode, PostfixResolveNode, and DeleteResolveNode - to the AST transfom that replaces slow resolve nodes with fast local - variable alternatives. - - 2.5% speedup on SunSpider. - - Also added some missing copyright notices. - - * kjs/nodes.cpp: - (KJS::FunctionCallResolveNode::optimizeVariableAccess): - (KJS::FunctionCallResolveNode::evaluate): - (KJS::LocalVarFunctionCallNode::evaluate): - (KJS::PostfixResolveNode::optimizeVariableAccess): - (KJS::PostfixResolveNode::evaluate): - (KJS::LocalVarPostfixNode::evaluate): - (KJS::DeleteResolveNode::optimizeVariableAccess): - (KJS::DeleteResolveNode::evaluate): - (KJS::LocalVarDeleteNode::evaluate): - * kjs/nodes.h: - (KJS::FunctionCallResolveNode::): - (KJS::LocalVarFunctionCallNode::LocalVarFunctionCallNode): - (KJS::PostfixResolveNode::): - (KJS::LocalVarPostfixNode::LocalVarPostfixNode): - (KJS::DeleteResolveNode::): - (KJS::LocalVarDeleteNode::LocalVarDeleteNode): - -2007-10-28 Eric Seidel - - Reviewed by darin. - - Inline UString::Rep::deref() for a 0.8% improvement in SunSpider - Add virtual keyword to a few virtual functions previously unmarked. - - * kjs/internal.h: - (KJS::StringImp::type): - (KJS::NumberImp::type): - * kjs/ustring.h: - (KJS::UString::Rep::deref): - -2007-10-28 Darin Adler - - - fix "broken everything" from the storage leak fix - - * wtf/RefPtr.h: (WTF::RefPtr::RefPtr): Added a PlacementNewAdopt constructor. - * kjs/ustring.h: (KJS::UString::UString): Pass PlacementNewAdopt along to RefPtr. - -2007-10-28 Darin Adler - - Reviewed by Adam. - - - turn on unused parameter waring on Mac OS X because it's already on elsewhere - - * Configurations/Base.xcconfig: Took out -wno-unused-parameter. - - * API/JSNode.c: - * API/JSNodeList.c: - * API/minidom.c: - * API/testapi.c: - Fixed unused variables by using them or marked them with UNUSED_PARAM. - - * kjs/CollectorHeapIntrospector.h: (KJS::CollectorHeapIntrospector::zoneCalloc): - Removed parameter names to indicate they are unused. - -2007-10-28 Darin Adler - - Reviewed by Maciej. - - - fix a storage leak where we ref the UString every time we replace - a ResolveNode with a LocalVarAccessNode - - * kjs/identifier.h: (KJS::Identifier::Identifier): Added a constructor - that takes PlacementNewAdopt. - - * kjs/nodes.h: (KJS::ResolveNode::ResolveNode): Initialize the ident - with PlacementNewAdopt instead of the old value of ident. - - * kjs/ustring.h: (KJS::UString::UString): Added a constructor that - takes PlacementNewAdopt. - -2007-10-28 Darin Adler - - - Windows build fix; get rid of unused parameter - - * kjs/nodes.cpp: (KJS::ResolveNode::optimizeVariableAccess): Don't pass it. - * kjs/nodes.h: (KJS::LocalVarAccessNode::LocalVarAccessNode): Remove it. - The assertions weren't all that helpful. - -2007-10-28 Mark Rowe - - Gtk build fix. Add include of MathExtras.h. - - * kjs/string_object.cpp: - -2007-10-28 Mark Rowe - - Reviewed by Maciej and Tim. - - Replace uses of isNaN and isInf with isnan and isinf, and - remove isNaN and isInf. - - * kjs/config.h: Remove unused HAVE_'s. - * kjs/date_object.cpp: - (KJS::DateInstance::getTime): - (KJS::DateInstance::getUTCTime): - (KJS::DateProtoFunc::callAsFunction): - (KJS::DateObjectImp::construct): - (KJS::DateObjectFuncImp::callAsFunction): - * kjs/function.cpp: - (KJS::GlobalFuncImp::callAsFunction): - * kjs/math_object.cpp: - (MathFuncImp::callAsFunction): - * kjs/nodes2string.cpp: - (KJS::isParserRoundTripNumber): - * kjs/number_object.cpp: - (NumberProtoFunc::callAsFunction): - * kjs/operations.cpp: - * kjs/operations.h: - * kjs/string_object.cpp: - (KJS::StringProtoFunc::callAsFunction): - * kjs/ustring.cpp: - (KJS::UString::from): - * kjs/value.cpp: - (KJS::JSValue::toInteger): - (KJS::JSValue::toInt32SlowCase): - (KJS::JSValue::toUInt32SlowCase): - -2007-10-28 Geoffrey Garen - - Build fix: use the new-fangled missingSymbolMarker(). - - * kjs/nodes.cpp: - (KJS::ResolveNode::optimizeVariableAccess): - * kjs/nodes.h: - (KJS::LocalVarAccessNode::LocalVarAccessNode): - -2007-10-28 Geoffrey Garen - - Reviewed by Maciej Stachowiak, Darin Adler. - - Much supporting work done by Maciej Stachowiak, Maks Orlovich, and - Cameron Zwarich. - - AST transfom to replace slow resolve nodes with fast local variable - alternatives that do direct memory access. Currently, only ResolveNode - provides a fast local variable alternative. 6 others are soon to come. - - 16.7% speedup on SunSpider. - - Most of this patch is just scaffolding to support iterating all the - resolve nodes in the AST through optimizeResolveNodes(). In - optimizeResolveNodes(), most classes just push their child nodes onto - the processing stack, while ResolveNodes actually replace themselves in - the tree with more optimized alternatives, if possible. - - Here are the interesting bits: - - * kjs/nodes.h: Added PlacementNewAdoptTag, along with implementations - in Node and ResolveNode. This tag allows you to use placement new to - swap out a base class Node in favor of a subclass copy that holds the - same data. (Without this tag, default initialization would NULL out - RefPtrs, change line numbers, etc.) - - * kjs/nodes.cpp: - (KJS::ResolveNode::evaluate): Since we're taking the slow path, ASSERT - that the fast path is impossible, to make sure we didn't leave anything - on the table. - - (KJS::FunctionBodyNode::optimizeResolveNodes): Here's where the AST - transformation happens. - - (KJS::ResolveNode::optimizeResolveNodes): Here's where the ResolveNode - optimization happens. - - * kjs/function.h: Added symbolTable() accessor for, for the sake of - an ASSERT. - -2007-10-28 Mark Rowe - - Reviewed by Maciej. - - Fix "AllInOneFile.o has a global initializer in it". - - Some versions of gcc generate a global initializer for std::numeric_limits::max(). - We can avoid this by moving it inside an inline function. - - * kjs/SymbolTable.h: - (KJS::missingSymbolMarker): - * kjs/function.cpp: - (KJS::ActivationImp::getOwnPropertySlot): - (KJS::ActivationImp::put): - -2007-10-28 Maciej Stachowiak - - Reviewed by Mark. - - - Added assertions to protect against adding empty or deleted keys to a HashTable - - * wtf/HashTable.h: - (WTF::HashTable::lookup): - (WTF::HashTable::lookupForWriting): - (WTF::HashTable::fullLookupForWriting): - (WTF::HashTable::add): - -2007-10-28 Darin Adler - - - fix GTK build - - * kjs/nodes2string.cpp: (KJS::isParserRoundTripNumber): - Use isNaN and isInf instead of isnan and isinf. - -2007-10-28 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15735 - remove GroupNode to simplify AST and possibly get a modest speedup - - This patch removes 4 node types: GroupNode, PropertyNameNode, - FunctionCallParenBracketNode, and FunctionCallParenDotNode. - - To remove GroupNode, we add knowledge of precedence to the tree nodes, - and use that when serializing to determine where parentheses are needed. - This means we no longer have to represent parentheses in the tree. - - The precedence values are named after productions in the grammar from the - JavaScript standard. - - SunSpider says this is an 0.4% speedup. - - * kjs/function.h: - * kjs/function.cpp: Removed escapeStringForPrettyPrinting -- it's part of - serialization, so I moved it to the file that takes care of that. - - * kjs/grammar.y: Changed makeGetterOrSetterPropertyNode to use 0 to - indicate failure instead of a separate boolean. Got rid of PropertyNameNode - by merging the PropertyName rule into the Property rule (which was easier - than figuring out how to pass the Identifier from one node to another). - Got rid of GroupNode, nodeInsideAllParens(), FunctionCallParenBracketNode, - and FunctionCallParenDotNode. - - * kjs/nodes.h: Removed unused forward declarations and Operator values. - Added Precedence enum, and precedence function to all nodes. Removed - nodeInsideAllParens. Added streamBinaryOperator function for serialization. - Removed GroupNode and PropertyNameNode. Made PropertyNode store an Identifier. - Removed FunctionCallParenBracketNode and FunctionCallParenDotNode. - - * kjs/nodes.cpp: Removed Node::nodinsideAllParens, GroupNode, and PropertyNameNode. - (KJS::PropertyListNode::evaluate): Changed code to get name directly instead - of converting it from an Identifier to a jsString then back to a UString - then into an Identifier again! - - * kjs/nodes2string.cpp: Changed special-token implementation to use a separate - function for each of Endl, Indent, Unindent, and DotExpr instead of using a - single function with a switch. Added a precedence that you can stream in, to - cause the next node serialized to add parentheses based on that precedence value. - (KJS::operatorString): Moved to the top of the file. - (KJS::escapeStringForPrettyPrinting): Moved here from function.cpp. Removed old - workaround for snprintf, since StringExtras.h takes care of that. - (KJS::operator<<): Made the char and char* versions faster by using UString's - character append functions instead of constructing a UString. Added the logic - to the Node* version to add parentheses if needed. - (KJS::Node::streamLeftAssociativeBinaryOperator): Added helper function. - (KJS::ElementNode::streamTo): Use PrecAssignment for the elements. - (KJS::BracketAccessorNode::streamTo): Use PrecCall for the expression before - the bracket. - (KJS::DotAccessorNode::streamTo): Use PrecCall for the expression before the dot. - (KJS::ArgumentListNode::streamTo): Use PrecAssignment for the arguments. - (KJS::NewExprNode::streamTo): Use PrecMember for the expression. - (KJS::FunctionCallValueNode::streamTo): Use PrecCall. - (KJS::FunctionCallBracketNode::streamTo): Ditto. - (KJS::FunctionCallDotNode::streamTo): Ditto. - (KJS::PostfixBracketNode::streamTo): Ditto. - (KJS::PostfixDotNode::streamTo): Ditto. - (KJS::PostfixErrorNode::streamTo): Use PrecLeftHandSide. - (KJS::DeleteBracketNode::streamTo): Use PrecCall. - (KJS::DeleteDotNode::streamTo): Ditto. - (KJS::DeleteValueNode::streamTo): Use PrecUnary. - (KJS::VoidNode::streamTo): Ditto. - (KJS::TypeOfValueNode::streamTo): Ditto. - (KJS::PrefixBracketNode::streamTo): Use PrecCall. - (KJS::PrefixDotNode::streamTo): Ditto. - (KJS::PrefixErrorNode::streamTo): Use PrecUnary. - (KJS::UnaryPlusNode::streamTo): Ditto. - (KJS::NegateNode::streamTo): Ditto. - (KJS::BitwiseNotNode::streamTo): Ditto. - (KJS::LogicalNotNode::streamTo): Ditto. - (KJS::MultNode::streamTo): Use streamLeftAssociativeBinaryOperator. - (KJS::DivNode::streamTo): Ditto. - (KJS::ModNode::streamTo): Ditto. - (KJS::AddNode::streamTo): Ditto. - (KJS::SubNode::streamTo): Ditto. - (KJS::LeftShiftNode::streamTo): Ditto. - (KJS::RightShiftNode::streamTo): Ditto. - (KJS::UnsignedRightShiftNode::streamTo): Ditto. - (KJS::LessNode::streamTo): Ditto. - (KJS::GreaterNode::streamTo): Ditto. - (KJS::LessEqNode::streamTo): Ditto. - (KJS::GreaterEqNode::streamTo): Ditto. - (KJS::InstanceOfNode::streamTo): Ditto. - (KJS::InNode::streamTo): Ditto. - (KJS::EqualNode::streamTo): Ditto. - (KJS::NotEqualNode::streamTo): Ditto. - (KJS::StrictEqualNode::streamTo): Ditto. - (KJS::NotStrictEqualNode::streamTo): Ditto. - (KJS::BitAndNode::streamTo): Ditto. - (KJS::BitXOrNode::streamTo): Ditto. - (KJS::BitOrNode::streamTo): Ditto. - (KJS::LogicalAndNode::streamTo): Ditto. - (KJS::LogicalOrNode::streamTo): Ditto. - (KJS::ConditionalNode::streamTo): Ditto. - (KJS::AssignResolveNode::streamTo): Use PrecAssignment for the right side. - (KJS::AssignBracketNode::streamTo): Use PrecCall for the expression before - the bracket and PrecAssignment for the right side. - (KJS::AssignDotNode::streamTo): Ditto. - (KJS::AssignErrorNode::streamTo): Use PrecLeftHandSide for the left side - and PrecAssignment for the right side. - (KJS::CommaNode::streamTo): Use PrecAssignment for both expressions. - (KJS::AssignExprNode::streamTo): Use PrecAssignment. - -2007-10-28 Kevin Ollivier - - Define wx port and set wx port USE options. - - Reviewed by Adam Roben. - - * wtf/Platform.h: - -2007-10-28 Mark Rowe - - We don't include "config.h" in headers. - - * bindings/jni/jni_instance.h: - * kjs/regexp.h: - * wtf/TCPageMap.h: - * wtf/TCSpinLock.h: - -2007-10-28 Maciej Stachowiak - - Rubber stamped by Mark. - - - avoid using non-portable SIZE_T_MAX in favor of std::numeric_limits - - * kjs/SymbolTable.h: - (KJS::SymbolTableIndexHashTraits::emptyValue): - * kjs/function.cpp: - (KJS::ActivationImp::getOwnPropertySlot): - (KJS::ActivationImp::put): - -2007-10-28 Maciej Stachowiak - - Reviewed by Eric. - - - switch SymbolTable to be a HashMap instead of a PropertyMap for 3% SunSpider speedup - - * kjs/SymbolTable.h: - (KJS::IdentifierRepHash::hash): Special hash function for identifier reps. - (KJS::IdentifierRepHash::equal): ditto - (KJS::SymbolTableIndexHashTraits::emptyValue): Special HashTraits for the index value. - (KJS::SymbolTable): change to a typedef for a HashMap. - * kjs/function.cpp: - (KJS::ActivationImp::getOwnPropertySlot): Adjusted for new SymbolTable API. - (KJS::ActivationImp::deleteProperty): ditto - (KJS::ActivationImp::put): ditto - - * kjs/nodes.cpp: - (KJS::FunctionBodyNode::initializesymbolTable): Adjusted, since - you now have to store a UString::rep, not an identifier. - -2007-10-27 Maciej Stachowiak - - Reviewed by Oliver. - - - numerous HashTable performance improvements - - This does not quite add up to a measurable win on SunSpider, but it allows a - follow-on > 3% improvement and probably helps WebCore too. - - I made the following improvements, among others: - - - Made HashFunctions note whether it is ok to compare a real value with the equal() function - to the empty or deleted value, and used this to optimize the comparisons done in hash lookup. - - - Specialized lookup so it doesn't have to do so many extra branches and build so many extra - std::pairs for cases that don't need them. There are now four versions, one for read-only access, - two for writing, and one folded directly into add() (these all were improvments). - - - Made HashMap::get() use lookup() directly instead of find() to avoid having to build iterators. - - - Made a special constructor for iterators that knows it points to - a valid filled cell and so skips updating itself. - - - Reordered memory accesses in the various lookup functions for better code generation - - - Made simple translators avoid passing a hash code around - - - Other minor tweaks - - * wtf/HashTable.h: - (WTF::): - (WTF::HashTableConstIterator::HashTableConstIterator): - (WTF::HashTableIterator::HashTableIterator): - (WTF::IdentityHashTranslator::translate): - (WTF::HashTable::end): - (WTF::HashTable::lookup): - (WTF::HashTable::lookupForWriting): - (WTF::HashTable::makeKnownGoodIterator): - (WTF::HashTable::makeKnownGoodConstIterator): - (WTF::::lookup): - (WTF::::lookupForWriting): - (WTF::::fullLookupForWriting): - (WTF::::add): - (WTF::::addPassingHashCode): - (WTF::::reinsert): - (WTF::::find): - (WTF::::contains): - * kjs/identifier.cpp: - (WTF::): - * wtf/HashFunctions.h: - (WTF::): - * wtf/HashMap.h: - (WTF::): - (WTF::::get): - * wtf/HashSet.h: - (WTF::): - (WTF::::add): - * wtf/ListHashSet.h: - (WTF::ListHashSetTranslator::translate): - -2007-10-27 Darin Adler - - Reviewed by Eric. - - - fix ASCIICType.h for some Windows compiles - - * wtf/ASCIICType.h: Check the compiler, not the OS, since it's the - compiler/library that has the wchar_t that is just a typedef. - -2007-10-27 Kevin McCullough - - - BuildFix - - Forgot to change the build step when I changed the filename. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2007-10-27 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed the rest of "ASSERTION FAILED: _hash in KJS::UString::Rep:: - computedHash()" - http://bugs.webkit.org/show_bug.cgi?id=15718 - - * kjs/identifier.cpp: Fixed more cases where an Identifier didn't get a - hash value. Also changed O(n) strlen to O(1) check for empty string. - (KJS::Identifier::add): - - * kjs/ustring.cpp: Changed O(n) strlens to O(1) checks for empty string. - (KJS::UString::UString): - (KJS::UString::operator=): - -2007-10-27 Darin Adler - - Reviewed by Eric. - - - fix pow on Windows - - * wtf/MathExtras.h: (wtf_pow): Add a special case for MSVC, which has - a "pow" function that does not properly handle the case where arg1 is - NaN and arg2 is 0. - - * kjs/math_object.cpp: (MathFuncImp::callAsFunction): Don't explicity - specify "::pow" -- just "pow" is fine. - -2007-10-27 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15711 - force JSImmediate to be inlined for roughly 1.2% SunSpider speedup - - * kjs/JSImmediate.h: Put ALWAYS_INLINE on everything. - - * kjs/object.h: Removed redundant includes. - * kjs/value.h: Ditto. - -2007-10-27 Maciej Stachowiak - - Reviewed by Mark. - - - fixed "ASSERTION FAILED: _hash in KJS::UString::Rep::computedHash()" - http://bugs.webkit.org/show_bug.cgi?id=15718 - - * kjs/identifier.cpp: - (KJS::Identifier::addSlowCase): Ensure that empty Identifiers have a hash computed, - now that we count on all Identifiers already having one. - -2007-10-27 Mark Rowe - - Silence a warning. - - * kjs/SymbolTable.h: - -2007-10-27 Mark Rowe - - Gtk build fix. - - * kjs/function.h: - -2007-10-26 Kevin McCullough - - Rubber stamp by Adam. - - - Renamed JSStringRefCOM to JSStringRefBSTR since it he only thing the - files contain are functions that operate on BSTRs. - - * API/JSStringRefBSTR.cpp: Copied from API/JSStringRefCOM.cpp. - * API/JSStringRefBSTR.h: Copied from API/JSStringRefCOM.h. - * API/JSStringRefCOM.cpp: Removed. - * API/JSStringRefCOM.h: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2007-10-26 Kevin McCullough - - Reviewed by Adam. - - - Made JSStringCreateWithBSTR capable of handling null BSTRs. - - * API/JSStringRefCOM.cpp: - (JSStringCreateWithBSTR): - -2007-10-26 Sam Weinig - - Windows build fix. - - * kjs/SymbolTable.h: Add header gaurd. - * kjs/nodes.h: #include "SymbolTable.h" - -2007-10-26 Geoffrey Garen - - Suggested by Anders Carlsson. - - Fixed tyop. - - * kjs/function.cpp: - (KJS::ActivationImp::getOwnPropertySlot): - -2007-10-26 Geoffrey Garen - - Suggested by Darin Adler. - - Use computedHash(), which is safer than just directly accessing _hash. - - * kjs/lookup.cpp: - (KJS::Lookup::findEntry): - (KJS::Lookup::find): - -2007-10-26 Geoffrey Garen - - Build fix: svn add SymbolTable.h - - * kjs/SymbolTable.h: Added. - (KJS::SymbolTable::set): - (KJS::SymbolTable::get): - -2007-10-26 Geoffrey Garen - - Build fix: export SymbolTable.h to WebCore. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2007-10-26 Geoffrey Garen - - Comment tweak suggested by Maciej. - - * kjs/function.cpp: - (KJS::ActivationImp::getOwnPropertySlot): - -2007-10-26 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Tweaked property maps to remove 2 branches. 2.5% speedup on SunSpider. - - * kjs/property_map.cpp: Use a special no branch accessor to the UString's - hash value. Also, return immediately instead of branching to the end - of the loop if the value is not found. - (KJS::PropertyMap::get): - (KJS::PropertyMap::getLocation): - (KJS::PropertyMap::put): - (KJS::PropertyMap::insert): - (KJS::PropertyMap::remove): - (KJS::PropertyMap::checkConsistency): - - * kjs/ustring.h: - (KJS::UString::Rep::computedHash): Special no branch accessor to the - UString's hash value. Used when the caller knows that the hash value - has already been computed. (For example, if the caller got the UString - from an Identifier.) - -2007-10-26 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Switched ActivationImp to using a symbol table. For now, though, all - clients take the slow path. - - Net .6% speedup on SunSpider. - - Slowdowns: - - ActivationImp now mallocs in its constructor - - Local variable hits use an extra level of indirection to retrieve - data - - Local variable misses do two lookups - - Speedups: - - Fast initialization of local variables upon function entry - - * JavaScriptCore.xcodeproj/project.pbxproj: Added SymbolTable.h - - * kjs/function.cpp: - (KJS::ActivationImp::ActivationImp): Malloc a private structure to hold - data that won't fit in a JSCell. - (KJS::ActivationImp::argumentsGetter): Use slow symbol table path for - lookup. - (KJS::ActivationImp::getOwnPropertySlot): ditto - (KJS::ActivationImp::deleteProperty): ditto - (KJS::ActivationImp::put): ditto - (KJS::ActivationImp::createArgumentsObject): ditto - - (KJS::ActivationImp::mark): Call JSObject::mark first so that one of - our properties doesn't try to recursively mark us. (This caused a crash - in earlier testing. Not sure why we haven't run into it before.) - - * kjs/nodes.cpp: Functions now build a symbol table the first time - they're called. - (KJS::VarDeclNode::evaluate): - (KJS::FunctionBodyNode::FunctionBodyNode): - (KJS::FunctionBodyNode::initializeSymbolTable): - (KJS::FunctionBodyNode::processDeclarations): - (KJS::FunctionBodyNode::processDeclarationsForFunctionCode): - (KJS::FunctionBodyNode::processDeclarationsForProgramCode): - - * kjs/nodes.h: - (KJS::FunctionBodyNode::symbolTable): - - * wtf/Forward.h: Added Vector. - -2007-10-26 Kevin McCullough - - - Corrected function name mistake in this changelog. - -2007-10-26 Kevin McCullough - Reviewed by Sam and Steve. - - - Added convenience methods for converting between BSTR and JSStringRefs - - * API/JSStringRefCOM.cpp: Added. - (JSStringCreateWithBSTR): - (JSStringCopyBSTR): - * API/JSStringRefCOM.h: Added. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2007-10-26 Mark Rowe - - Windows build fix. - - * kjs/collector.cpp: - (KJS::Collector::collect): - -2007-10-26 Oliver Hunt - - Reviewed by Maciej. - - Make the JSC GC use a separate heap for JSNumbers to get a 0.7-1.4% progression in SunSpider. - - * kjs/CollectorHeapIntrospector.cpp: - (KJS::CollectorHeapIntrospector::init): - (KJS::CollectorHeapIntrospector::enumerate): - * kjs/CollectorHeapIntrospector.h: - * kjs/collector.cpp: - (KJS::Collector::recordExtraCost): - (KJS::Collector::heapAllocate): - (KJS::Collector::allocate): - (KJS::Collector::allocateNumber): - (KJS::Collector::registerThread): - (KJS::Collector::markStackObjectsConservatively): - (KJS::Collector::markMainThreadOnlyObjects): - (KJS::Collector::sweep): - (KJS::Collector::collect): - * kjs/collector.h: - * kjs/internal.h: - (KJS::NumberImp::operator new): - Force numbers to be allocated in the secondary heap. - -2007-10-26 Maciej Stachowiak - - Reviewed by Oliver. - - - encourage GCC a little harder to inline a few hot functions for 1.5% improvement on SunSpider. - - * kjs/value.h: - (KJS::JSValue::getUInt32): - (KJS::JSValue::getTruncatedInt32): - (KJS::JSValue::toNumber): - * wtf/PassRefPtr.h: - (WTF::PassRefPtr::~PassRefPtr): - * wtf/RefPtr.h: - (WTF::RefPtr::operator->): - -2007-10-26 Mark Rowe - - Gtk build fix. - - * kjs/ExecState.h: - -2007-10-26 Maciej Stachowiak - - Reviewed by Mark. - - - Merge Context class fully into ExecState, since they are always created and used together. - - No measurable performance impact but this is a useful cleanup. - - * JavaScriptCore.pri: - * kjs/ExecState.cpp: - (KJS::ExecState::ExecState): - (KJS::ExecState::~ExecState): - (KJS::ExecState::mark): - (KJS::ExecState::lexicalInterpreter): - * kjs/ExecState.h: - (KJS::ExecState::dynamicInterpreter): - (KJS::ExecState::setException): - (KJS::ExecState::clearException): - (KJS::ExecState::exception): - (KJS::ExecState::exceptionSlot): - (KJS::ExecState::hadException): - (KJS::ExecState::scopeChain): - (KJS::ExecState::callingExecState): - (KJS::ExecState::propertyNames): - * kjs/collector.cpp: - (KJS::Collector::reportOutOfMemoryToAllInterpreters): - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - (KJS::FunctionImp::argumentsGetter): - (KJS::FunctionImp::callerGetter): - (KJS::GlobalFuncImp::callAsFunction): - * kjs/interpreter.cpp: - (KJS::Interpreter::Interpreter): - (KJS::Interpreter::init): - (KJS::Interpreter::evaluate): - (KJS::Interpreter::mark): - * kjs/interpreter.h: - (KJS::Interpreter::setCurrentExec): - (KJS::Interpreter::currentExec): - * kjs/nodes.cpp: - (KJS::currentSourceId): - (KJS::currentSourceURL): - (KJS::ThisNode::evaluate): - (KJS::ResolveNode::evaluate): - (KJS::FunctionCallResolveNode::evaluate): - (KJS::PostfixResolveNode::evaluate): - (KJS::DeleteResolveNode::evaluate): - (KJS::TypeOfResolveNode::evaluate): - (KJS::PrefixResolveNode::evaluate): - (KJS::AssignResolveNode::evaluate): - (KJS::VarDeclNode::evaluate): - (KJS::DoWhileNode::execute): - (KJS::WhileNode::execute): - (KJS::ForNode::execute): - (KJS::ForInNode::execute): - (KJS::ContinueNode::execute): - (KJS::BreakNode::execute): - (KJS::ReturnNode::execute): - (KJS::WithNode::execute): - (KJS::SwitchNode::execute): - (KJS::LabelNode::execute): - (KJS::TryNode::execute): - (KJS::FunctionBodyNode::processDeclarationsFunctionCode): - (KJS::FunctionBodyNode::processDeclarationsProgramCode): - (KJS::FunctionBodyNode::processDeclarations): - (KJS::FuncDeclNode::makeFunction): - (KJS::FuncExprNode::evaluate): - -2007-10-26 Mark Rowe - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2007-10-26 Mark Rowe - - Gtk build fix. - - * JavaScriptCore.pri: - * kjs/ExecState.cpp: - -2007-10-26 Maciej Stachowiak - - Reviewed by Oliver. - - - moved Context class into ExecState.{h,cpp} in preparation for merging - ExecState and Context classes. - - * kjs/ExecState.h: Moved CodeType enum and Context class here in - preparation for merging ExecState and Context. - * kjs/ExecState.cpp: Moved Context class here from Context.cpp. - (KJS::Context::Context): - (KJS::Context::~Context): - (KJS::Context::mark): - * kjs/context.h: Removed. - * kjs/Context.cpp: Removed. - * kjs/function.h: Removed CodeType enum. - * kjs/LabelStack.h: Added. Pulled LabelStack class out of internal.h. - * kjs/internal.h: Removed LabelStack. - * JavaScriptCore.xcodeproj/project.pbxproj: Added new file, removed ones that are gone. - * kjs/collector.cpp: Fixed includes. - * kjs/function.cpp: ditto - * kjs/internal.cpp: ditto - * kjs/interpreter.cpp: ditto - * kjs/lookup.h: ditto - * kjs/nodes.cpp: ditto - -2007-10-26 Mark Rowe - - Windows build fix. - - * kjs/string_object.cpp: - (KJS::StringObjectFuncImp::callAsFunction): - -2007-10-25 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15703 - fix numeric functions -- improve correctness and speed - - Gives about 1% gain on SunSpider. - - * kjs/value.h: Added toIntegerPreserveNan, removed toUInt16. - (KJS::JSValue::toInt32): Changed to call getTruncatedInt32 in a way that works - with both immediate and number values. - (KJS::JSValue::toUInt32): Ditto. - * kjs/value.cpp: - (KJS::JSValue::toInteger): Moved the logic from roundValue here, with a couple - differences. One is that it now correctly returns 0 for NaN, and another is that - there's no special case for 0 or infinity, since the general case already handles - those correctly. - (KJS::JSValue::toIntegerPreserveNaN): Added. Like toInteger, but without the - check for NaN. - (KJS::JSValue::toInt32SlowCase): Call toNumber instead of roundValue. The - truncation done by the typecast already does the necessary truncation that - roundValue was doing. - (KJS::JSValue::toUInt32SlowCase): Ditto. - (KJS::JSValue::toUInt16): Removed. - - * kjs/internal.h: Removed roundValue. - * kjs/internal.cpp: Ditto. - - * kjs/array_object.cpp: (KJS::ArrayProtoFunc::callAsFunction): Remove unneeded - code to handle NaN in Array.slice; toInteger now never returns NaN as specified. - - * kjs/date_object.cpp: - (KJS::fillStructuresUsingTimeArgs): Replaced call to roundValue with a call to - toNumber as specified. - (KJS::DateProtoFunc::callAsFunction): In SetTime case, replaced call to roundValue - with a call to toNumber and timeClip as specified. - (KJS::DateObjectImp::construct): Removed unnecessary checks of numArgs in cases - where the default behavior of toInt32 (returning 0) was already correct. Replaced - call to roundValue with a call to toNumber as specified. - (KJS::DateObjectFuncImp::callAsFunction): Ditto. - - * kjs/math_object.cpp: (MathFuncImp::callAsFunction): Removed unnecessary special - cases for the pow function that the library already handles correctly. - - * kjs/number_object.cpp: (NumberProtoFunc::callAsFunction): Changed ToString to - call toIntegerPreserveNaN, so we can continue to handle the NaN case differently. - The real toInteger now returns 0 for NaN. Took out unneeded special case in - ToFixed for undefined; was only needed because our toInteger was wrong. Same - thing in ToExponential. Changed ToPrecision to call toIntegerPreserveNaN. - - * kjs/string_object.cpp: - (KJS::StringProtoFunc::callAsFunction): Took out CharAt and CharCodeAt special - cases for undefined that were only needed because toInteger was wrong. Same in - IndexOf, and was able to remove some special cases. In LastIndexOf, used - toIntegerPreserveNaN, but was able to remove some special cases there too. - Changed Substr implementation to preserve correct behavior with the change - to toInteger and match the specification. Also made sure we weren't converting - an out of range double to an int. - (KJS::StringObjectFuncImp::callAsFunction): Changed constructor to just use - toUInt32, because truncating toUInt32 to 16 bits is the same thing and there's - no reason to have toUInt16 as a second, less-optimized function that's only - called at this one call site. - - * wtf/MathExtras.h: Added trunc function for Windows. - -2007-10-25 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Tweaked the inner hashtable lookup loop to remove a branch in the "not - found" case. .5% speedup on SunSpider. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/HashTable.h: - (WTF::::lookup): - -2007-10-25 Maciej Stachowiak - - Reviewed by Oliver. - - - fold together toPrimitive() and toNumber() conversions for 0.5% gain on SunSpider - - * kjs/nodes.cpp: - (KJS::SubNode::evaluate): Subtract directly, since toPrimitive() is not - adding any value over toNumber() here. - (KJS::valueForReadModifyAssignment): Ditto. - (KJS::lessThan): Use new getPrimitiveNumber() method to avoid some virtual calls - and branches. - (KJS::lessThanEq): Ditto. - * JavaScriptCore.exp: Export new functions as needed. - * kjs/value.h: - (KJS::JSValue::toPrimitive): Fixed formatting. - (KJS::JSValue::getPrimitiveNumber): New method - this simultaneously converts - to number and tells you whether a toPrimitive() conversion with a Number hint - would have given a string. - * kjs/internal.cpp: - (KJS::StringImp::getPrimitiveNumber): Implemented. - (KJS::NumberImp::getPrimitiveNumber): ditto - (KJS::GetterSetterImp::getPrimitiveNumber): ditto - (KJS::StringImp::toPrimitive): Fixed formatting. - (KJS::NumberImp::toPrimitive): ditto - (KJS::GetterSetterImp::toPrimitive): ditto - * kjs/internal.h: - * kjs/object.cpp: - (KJS::JSObject::getPrimitiveNumber): Implemented. - * kjs/object.h: - -2007-10-25 Sam Weinig - - Reviewed by Adam Roben. - - Remove JSStringRefCFHack from windows as it is no longer needed. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2007-10-25 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Rolled out my last patch. It turns out that I needed 2 words, not 1, - so it didn't help. - -2007-10-25 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=15694 - Shrink the size of an activation object by 1 word - - This is in preparation for adding a symbol table to the activation - object. - - The basic strategy here is to rely on the mutual exclusion between - the arguments object pointer and the function pointer (you only need - the latter in order to create the former), and store them in the same - place. The LazyArgumentsObject class encapsulates this strategy. - - Also inlined the ArgumentsImp constructor, for good measure. - - SunSpider reports no regression. Regression tests pass. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/Context.cpp: - (KJS::Context::~Context): - * kjs/function.cpp: - (KJS::ActivationImp::LazyArgumentsObject::createArgumentsObject): - (KJS::ActivationImp::LazyArgumentsObject::mark): - (KJS::ActivationImp::argumentsGetter): - (KJS::ActivationImp::mark): - * kjs/function.h: - (KJS::ActivationImp::LazyArgumentsObject::LazyArgumentsObject): - (KJS::ActivationImp::LazyArgumentsObject::getOrCreate): - (KJS::ActivationImp::LazyArgumentsObject::resetArguments): - (KJS::ActivationImp::LazyArgumentsObject::setArgumentsObject): - (KJS::ActivationImp::LazyArgumentsObject::argumentsObject): - (KJS::ActivationImp::LazyArgumentsObject::setFunction): - (KJS::ActivationImp::LazyArgumentsObject::function): - (KJS::ActivationImp::LazyArgumentsObject::createdArgumentsObject): - (KJS::ActivationImp::LazyArgumentsObject::): - (KJS::ActivationImp::ActivationImp::ActivationImp): - (KJS::ActivationImp::resetArguments): - -2007-10-25 Adam Roben - - Change JavaScriptCore.vcproj to use DerivedSources.make - - We were trying to emulate the logic of make in - build-generated-files.sh, but we got it wrong. We now use a - build-generated-files very much like the one that WebCore uses to - invoke make. - - We also now only have a Debug configuration of dftables which we build - even when doing a Release build of JavaScriptCore. dftables also no - longer has the "_debug" name suffix. - - Changes mostly made by Darin, reviewed by me. - - * DerivedSources.make: Add a variable to set the extension used for - the dftables executable. - * JavaScriptCore.vcproj/JavaScriptCore.sln: Updated to use Debug - dftables in Release configurations. - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Ditto. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - - Updated include path to point to the new location of the derived - sources. - - Modified pre-build event to pass the right arguments to - build-generated-files.sh and not call dftables directly. - - Added the derived source files to the project. - - Removed grammarWrapper.cpp, which isn't needed now that we're - compiling grammar.cpp directly. - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: - Slightly modified from the WebCore version. - * JavaScriptCore.vcproj/JavaScriptCore/grammarWrapper.cpp: Removed. - * JavaScriptCore.vcproj/dftables/dftables.vcproj: - - Changed the output location to match Mac. - - Removed the Release configuration. - - Removed the _debug suffix. - -2007-10-25 Geoffrey Garen - - Reviewed by Eric Seidel. - - Slightly elaborated the differences between declaration procesing in - Function Code and Program Code. - - .3% speedup on SunSpider. - - * kjs/nodes.cpp: - (KJS::FunctionBodyNode::processDeclarationsFunctionCode): - (KJS::FunctionBodyNode::processDeclarationsProgramCode): Store a - minimum set of attributes instead of recomputing all the time. Also, - ignore m_parameters, since programs don't have arguments. - -2007-10-25 Eric Seidel - - Reviewed by Maciej. - - More preparation work before adding long-running mode to testkjs. - - * kjs/testkjs.cpp: - (TestFunctionImp::callAsFunction): - (prettyPrintScript): - (runWithScripts): - (parseArguments): - (kjsmain): - (fillBufferWithContentsOfFile): - -2007-10-25 Eric Seidel - - Reviewed by Maciej. - - Bring testkjs code out of the dark ages in preparation for more - radical improvements (like long-running testing support!) - - * kjs/testkjs.cpp: - (TestFunctionImp::callAsFunction): - (setupInterpreter): - (doIt): - (fillBufferWithContentsOfFile): - -2007-10-25 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Make a fast path for declaration processing inside Function Code. - - Lifted declaration processing code up from individual declaration nodes - and into processDeclarations. - - Broke out processDeclarations into two cases, depending on the type of - code. This eliminates 2 branches, and facilitates more radical - divergeance in the future. - - 2.5% SunSpider speedup. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/nodes.cpp: - (KJS::FunctionBodyNode::initializeDeclarationStacks): - (KJS::FunctionBodyNode::processDeclarationsFunctionCode): - (KJS::FunctionBodyNode::processDeclarationsProgramCode): - (KJS::FunctionBodyNode::execute): - (KJS::FuncDeclNode::makeFunction): - * kjs/nodes.h: - -2007-10-25 Maciej Stachowiak - - Reviewed by Adam. - - - add header includes needed on platforms that don't use AllInOneFile.cpp - - * API/JSCallbackObject.cpp: - * kjs/Context.cpp: - * kjs/ExecState.cpp: - * kjs/array_instance.cpp: - * kjs/function_object.cpp: - * kjs/interpreter.cpp: - * kjs/nodes.cpp: - -2007-10-25 Eric Seidel - - Reviewed by Geoff. - - * JavaScriptCore.xcodeproj/project.pbxproj: re-mark JSGlobalObject.h as private - -2007-10-25 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=15683 - Re-order declaration initialization to avoid calling hasProperty inside - VarDeclNode::processDeclaration - - .7% speedup on SunSpider. - - * kjs/function.h: - * kjs/function.cpp: Merged parameter processing into FunctionBodyNode's - other processing of declared symbols, so the order of execution could - change. - - * kjs/nodes.cpp: - (KJS::VarDeclNode::getDeclarations): Added special case for the - "arguments" property name, explained in the comment. - - (KJS::VarDeclNode::processDeclaration): Removed call to hasProperty - in the case of function code, since we know the declared symbol - management will resolve conflicts between symbols. Yay! - - (KJS::VarDeclListNode::getDeclarations): Now that VarDeclNode's - implementation of getDeclarations is non-trivial, we can't take a - short-cut here any longer -- we need to put the VarDecl node on the - stack so it gets processed normally. - - (KJS::FunctionBodyNode::processDeclarations): Changed the order of - processing to enforce mutual exclusion rules. - - * kjs/nodes.h: - (KJS::DeclarationStacks::DeclarationStacks): Structure includes an - ExecState now, for fast access to the "arguments" property name. - -2007-10-24 Eric Seidel - - Reviewed by Maciej. - - Add a JSGlobalObject class and remove the InterpreterMap - http://bugs.webkit.org/show_bug.cgi?id=15681 - - This required making JSCallbackObject a template class to allow for - JSGlobalObjects with JSCallbackObject functionality. - - SunSpider claims this was a 0.5% speedup. - - * API/JSCallbackObject.cpp: - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: Copied from API/JSCallbackObject.cpp. - (KJS::::JSCallbackObject): - (KJS::::init): - (KJS::::~JSCallbackObject): - (KJS::::initializeIfNeeded): - (KJS::::className): - (KJS::::getOwnPropertySlot): - (KJS::::put): - (KJS::::deleteProperty): - (KJS::::implementsConstruct): - (KJS::::construct): - (KJS::::implementsHasInstance): - (KJS::::hasInstance): - (KJS::::implementsCall): - (KJS::::callAsFunction): - (KJS::::getPropertyNames): - (KJS::::toNumber): - (KJS::::toString): - (KJS::::setPrivate): - (KJS::::getPrivate): - (KJS::::inherits): - (KJS::::cachedValueGetter): - (KJS::::staticValueGetter): - (KJS::::staticFunctionGetter): - (KJS::::callbackGetter): - * API/JSClassRef.cpp: - (OpaqueJSClass::prototype): - * API/JSContextRef.cpp: - (JSGlobalContextCreate): - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectGetPrivate): - (JSObjectSetPrivate): - * API/JSValueRef.cpp: - (JSValueIsObjectOfClass): - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bindings/c/c_utility.cpp: - (KJS::Bindings::convertValueToNPVariant): - * bindings/jni/jni_jsobject.cpp: - * bindings/objc/objc_utility.mm: - (KJS::Bindings::convertValueToObjcValue): - * kjs/Context.cpp: - (KJS::Context::Context): - * kjs/ExecState.cpp: - (KJS::ExecState::lexicalInterpreter): - * kjs/JSGlobalObject.h: Added. - (KJS::JSGlobalObject::JSGlobalObject): - (KJS::JSGlobalObject::isGlobalObject): - (KJS::JSGlobalObject::interpreter): - (KJS::JSGlobalObject::setInterpreter): - * kjs/array_instance.cpp: - * kjs/context.h: - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - (KJS::GlobalFuncImp::callAsFunction): - * kjs/interpreter.cpp: - (KJS::Interpreter::Interpreter): - (KJS::Interpreter::init): - (KJS::Interpreter::~Interpreter): - (KJS::Interpreter::globalObject): - (KJS::Interpreter::initGlobalObject): - (KJS::Interpreter::evaluate): - * kjs/interpreter.h: - * kjs/lookup.h: - (KJS::cacheGlobalObject): - * kjs/object.h: - (KJS::JSObject::isGlobalObject): - * kjs/testkjs.cpp: - -2007-10-24 Eric Seidel - - Build fix for Gtk, no review. - - * kjs/collector.cpp: #include "context.h" - -2007-10-24 Eric Seidel - - Reviewed by Maciej. - - Stop checking isOutOfMemory after every allocation, instead let the collector - notify all ExecStates if we ever hit this rare condition. - - SunSpider claims this was a 2.2% speedup. - - * kjs/collector.cpp: - (KJS::Collector::collect): - (KJS::Collector::reportOutOfMemoryToAllInterpreters): - * kjs/collector.h: - * kjs/nodes.cpp: - (KJS::TryNode::execute): - -2007-10-24 Mark Rowe - - Gtk build fix. - - * kjs/identifier.h: Remove extra qualification. - -2007-10-24 Geoffrey Garen - - Reviewed by Sam Weinig. - - Disable ALWAYS_INLINE in debug builds, since it drives the debugger - crazy. - - * wtf/AlwaysInline.h: - -2007-10-24 Geoffrey Garen - - Reviewed by Sam Weinig. - - Inlined the fast path for creating an Identifier from an Identifier. - - This is a .4% speedup on SunSpider overall, but as big as a 2.5% - speedup on certain individual tests. 65% of the Identifiers creating - by SunSpider are already Identifiers. - - (The main reason I'm making this change is that it resolves a large - regression in a patch I haven't checked in yet.) - - * JavaScriptCore.exp: - * kjs/identifier.cpp: - (KJS::Identifier::addSlowCase): - * kjs/identifier.h: - (KJS::Identifier::Identifier::add): - -2007-10-24 Lars Knoll - - Reviewed by Simon. - - some changes to the way JS values are converted to Qt values in the script bindings. Added support for converting JS arrays into QStringList's. - - * bindings/qt/qt_instance.cpp: - (KJS::Bindings::QtInstance::invokeMethod): - * bindings/qt/qt_runtime.cpp: - (KJS::Bindings::convertValueToQVariant): - (KJS::Bindings::QtField::setValueToInstance): - -2007-10-24 Oliver Hunt - - Reviewed by Darin. - - Remove old relation method, replace with specialised LessThan and lessThenEq functions for a 0.5-0.6% improvement in SunSpider - - * kjs/nodes.cpp: - (KJS::lessThan): - (KJS::lessThanEq): - (KJS::LessNode::evaluate): - (KJS::GreaterNode::evaluate): - (KJS::LessEqNode::evaluate): - (KJS::GreaterEqNode::evaluate): - * kjs/operations.cpp: - * kjs/operations.h: - -2007-10-24 Eric Seidel - - Reviewed by darin. - - * kjs/nodes.h: - (KJS::ImmediateNumberNode::): Fix ASSERT correctness (and debug build!) - -2007-10-24 Darin Adler - - Reviewed by Eric. - - * kjs/object.cpp: (KJS::JSObject::defaultValue): Get rid of a little - Identifier ref/deref for what SunSpider claims is a 0.4% speedup. - -2007-10-24 Darin Adler - - Reviewed by Maciej. - - - separate out the code to create a hash table the first time from the code - to rehash - - SunSpider claims this was a 0.7% speedup. - - * kjs/property_map.cpp: - (KJS::PropertyMap::expand): Changed to call either createTable or rehash. - (KJS::PropertyMap::createTable): Added. For the case where we had no table. - (KJS::PropertyMap::rehash): Removed code needed only in the case where we - had no table. - * kjs/property_map.h: Added createTable. - -2007-10-24 Eric Seidel - - Reviewed by darin. - - Add ImmediateNumberNode to hold a JSValue* instead of a double for numbers - which can be represented by JSImmediate. - - SunSpider claims this was a 0.6% speedup. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::NumberNode::evaluate): - (KJS::ImmediateNumberNode::evaluate): - * kjs/nodes.h: - (KJS::Node::): - (KJS::ImmediateNumberNode::): - * kjs/nodes2string.cpp: - (ImmediateNumberNode::streamTo): - -2007-10-24 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15657 - change static hash tables to use powers of two for speed - - Seems to give 0.7% SunSpider speedup. - - * kjs/create_hash_table: Updated to generate new format. - * kjs/lookup.cpp: - (KJS::keysMatch): Took out unneeded typecast. - (KJS::findEntry): Updated to expect table type 3 -- changed the printf to a plain old assert. - Replaced the modulus with a bit mask. - (KJS::Lookup::findEntry): Get the hash directly, since we know identifiers already have computed - their hash -- saves a branch. - (KJS::Lookup::find): Ditto. - * kjs/lookup.h: Changed attr from 2-byte value to one-byte value. Replaced hashSize with hashSizeMask. - -2007-10-24 Maciej Stachowiak - - Reviewed by Darin. - - - remove KJS_CHECKEXCEPTIONs in places where exceptions can't happen for 0.6% SunSpider speedup - - * kjs/nodes.cpp: - (KJS::DoWhileNode::execute): - (KJS::WhileNode::execute): - (KJS::ForNode::execute): - (KJS::ForInNode::execute): - (KJS::SourceElementsNode::execute): - -2007-10-23 Darin Adler - - Reviewed by Maciej. - - * kjs/JSImmediate.h: (KJS::JSImmediate::getUInt32): - Changed an && to an & for a 1% gain in SunSpider. - -2007-10-23 Oliver Hunt - - Reviewed by Maciej. - - Reduce branching in implementations of some operator implementations, yielding 1.3% boost to SunSpider. - - * kjs/nodes.cpp: - (KJS::MultNode::evaluate): - (KJS::DivNode::evaluate): - (KJS::ModNode::evaluate): - (KJS::add): - (KJS::sub): - (KJS::AddNode::evaluate): - (KJS::SubNode::evaluate): - (KJS::valueForReadModifyAssignment): - * kjs/operations.cpp: - * kjs/operations.h: - -2007-10-23 Oliver Hunt - - Reviewed by Maciej. - - Separating all of the simple (eg. non-read-modify-write) binary operators - into separate classes in preparation for further JS optimisations. - - Happily this produces a 0.8% to 1.0% performance increase in SunSpider with - no further work. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::MultNode::evaluate): - (KJS::DivNode::evaluate): - (KJS::ModNode::evaluate): - (KJS::AddNode::evaluate): - (KJS::SubNode::evaluate): - (KJS::LeftShiftNode::evaluate): - (KJS::RightShiftNode::evaluate): - (KJS::UnsignedRightShiftNode::evaluate): - (KJS::LessNode::evaluate): - (KJS::GreaterNode::evaluate): - (KJS::LessEqNode::evaluate): - (KJS::GreaterEqNode::evaluate): - (KJS::InstanceOfNode::evaluate): - (KJS::InNode::evaluate): - (KJS::EqualNode::evaluate): - (KJS::NotEqualNode::evaluate): - (KJS::StrictEqualNode::evaluate): - (KJS::NotStrictEqualNode::evaluate): - (KJS::BitAndNode::evaluate): - (KJS::BitXOrNode::evaluate): - (KJS::BitOrNode::evaluate): - (KJS::LogicalAndNode::evaluate): - (KJS::LogicalOrNode::evaluate): - * kjs/nodes.h: - (KJS::MultNode::): - (KJS::DivNode::): - (KJS::ModNode::): - (KJS::AddNode::): - (KJS::SubNode::): - (KJS::LeftShiftNode::): - (KJS::RightShiftNode::): - (KJS::UnsignedRightShiftNode::): - (KJS::LessNode::): - (KJS::GreaterNode::): - (KJS::LessEqNode::): - (KJS::GreaterEqNode::): - (KJS::InstanceOfNode::): - (KJS::InNode::): - (KJS::EqualNode::): - (KJS::NotEqualNode::): - (KJS::StrictEqualNode::): - (KJS::NotStrictEqualNode::): - (KJS::BitAndNode::): - (KJS::BitOrNode::): - (KJS::BitXOrNode::): - (KJS::LogicalAndNode::): - (KJS::LogicalOrNode::): - * kjs/nodes2string.cpp: - (MultNode::streamTo): - (DivNode::streamTo): - (ModNode::streamTo): - (AddNode::streamTo): - (SubNode::streamTo): - (LeftShiftNode::streamTo): - (RightShiftNode::streamTo): - (UnsignedRightShiftNode::streamTo): - (LessNode::streamTo): - (GreaterNode::streamTo): - (LessEqNode::streamTo): - (GreaterEqNode::streamTo): - (InstanceOfNode::streamTo): - (InNode::streamTo): - (EqualNode::streamTo): - (NotEqualNode::streamTo): - (StrictEqualNode::streamTo): - (NotStrictEqualNode::streamTo): - (BitAndNode::streamTo): - (BitXOrNode::streamTo): - (BitOrNode::streamTo): - (LogicalAndNode::streamTo): - -2007-10-23 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=15639 - fix Math.abs(0), Math.ceil(-0), and Math.floor(-0) - - Test: fast/js/math.html - - * kjs/math_object.cpp: (MathFuncImp::callAsFunction): - Fix abs to look at the sign bit. Add a special case for values in the range - between -0 and -1 and a special case for ceil and for -0 for floor. - -2007-10-23 Darin Adler - - Reviewed by Eric. - - - streamline exception handling code for a >1% speed-up of SunSpider - - * kjs/nodes.cpp: Changed macros to use functions for everything that's not - part of normal execution. We'll take function call overhead when propagating - an exception or out of memory. - (KJS::createOutOfMemoryCompletion): Added. - (KJS::substitute): Use append instead of the relatively inefficient + operator. - (KJS::Node::rethrowException): Added. - * kjs/nodes.h: Added rethrowException. - -2007-10-22 Darin Adler - - Reviewed by Maciej. - - - fix http://bugs.webkit.org/show_bug.cgi?id=15636 - some JavaScriptCore regression tests are failing due to numeric conversion - - This should restore correctness and make speed better too, restoring some - of the optimization we lost in my last check-in. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::getTruncatedInt32): Added. Uses the range checking idiom - I used in my patch yesterday. - (KJS::JSImmediate::getTruncatedUInt32): Ditto. - - * kjs/internal.h: Removed getInt32 and added getTruncatedInt/UInt32. - * kjs/internal.cpp: - (KJS::NumberImp::getUInt32): Changed to always use double, since I can't find - a way to write this more efficiently for float. - (KJS::NumberImp::getTruncatedInt32): Added. - (KJS::NumberImp::getTruncatedUInt32): Added. - - * kjs/value.h: Removed getInt32 and added getTruncatedInt/UInt32. - (KJS::JSValue::getUInt32): - (KJS::JSValue::getTruncatedInt32): Added. - (KJS::JSValue::getTruncatedUInt32): Added. - (KJS::JSValue::toInt32): Changed getInt32 call to getTruncatedInt32. - (KJS::JSValue::toUInt32): Changed getUInt32 call to getTruncatedUInt32. - * kjs/value.cpp: - (KJS::JSCell::getTruncatedInt32): Added. - (KJS::JSCell::getTruncatedUInt32): Added. - (KJS::JSValue::toInteger): Changed getUInt32 call to getTruncatedInt32. - (KJS::JSValue::toInt32SlowCase): Removed extra getInt32 call I accidentally - had left in here. - (KJS::JSValue::toUInt32SlowCase): Ditto. - (KJS::JSValue::toUInt16): Changed getUInt32 call to getTruncatedUInt32. - - * JavaScriptCore.exp: Updated. - -2007-10-22 Darin Adler - - Reviewed by Geoff. - - - fix http://bugs.webkit.org/show_bug.cgi?id=15632 - js1_5/Array/array-001.js test failing - - One of the JavaScriptCore tests was failing; it failed because of - my change to NumberImp::getUInt32. The incorrect code I copied was - from JSImmediate::getUInt32, and was a pre-existing bug. - - This patch fixes correctness, but will surely slow down SunSpider. - We may be able to code this tighter and get the speed back. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::getInt32): Renamed from toInt32 to more accurately - reflect the fact that this function only returns true if the value is - accurate (no fractional part, etc.). Changed code so that it returns - false when the value has a fraction. - (KJS::JSImmediate::getUInt32): Ditto. - - * kjs/internal.cpp: - (KJS::NumberImp::getInt32): Changed code so that it returns false when - the value has a fraction. Restores the old behavior. - (KJS::NumberImp::getUInt32): Ditto. - - * kjs/value.h: - (KJS::JSValue::getInt32): Updated for name change. - (KJS::JSValue::getUInt32): Ditto. - (KJS::JSValue::toInt32): Ditto. - (KJS::JSValue::toUInt32): Ditto. - -2007-10-22 Darin Adler - - Reviewed by Brady. - - - fix crash seen when running JavaScriptCore tests - - * kjs/array_instance.cpp: (KJS::ArrayInstance::mark): - Copy and paste error: I accidentally had code here that was - making a copy of the HashMap -- that's illegal inside a mark - function and was unnecessary. The other callsite was modifying - the map as it iterated it, but this function is not. - -2007-10-22 Maciej Stachowiak - - Reviewed by Oliver. - - - Avoid moving floats into integer registers in jsNumber() for 3% speedup on SunSpider - http://bugs.webkit.org/show_bug.cgi?id=15627 - - * kjs/JSImmediate.h: - (KJS::JSImmediate::fromDouble): Avoid moving floats to integer - registers since this is very slow. - -2007-10-22 Darin Adler - - Reviewed by Eric Seidel. - - - http://bugs.webkit.org/show_bug.cgi?id=15617 - improve speed of integer conversions - - Makes SunSpider 6% faster. - - * kjs/JSImmediate.h: Added toInt32 and toUInt32, with separate versions for - 32-bit and 64-bit. - * kjs/value.h: - (KJS::JSValue::getUInt32): Call JSImmediate::toUInt32. - - * kjs/internal.h: Added getInt32. - * kjs/internal.cpp: - (KJS::NumberImp::getInt32): Added. - (KJS::NumberImp::getUInt32): Replaced with more-optimal implementation - stolen from JSValue. - - * kjs/value.h: - (KJS::jsNumber): Marked ALWAYS_INLINE, because this wasn't getting - inlined. - (KJS::JSValue::getInt32): Added. - (KJS::JSValue::getUInt32): Changed to call the new JSImmediate::toUInt32 - to avoid converting from float to double. - (KJS::JSValue::toInt32): Made inline, separated out the slow case. - (KJS::JSValue::toUInt32): Ditto. - * kjs/value.cpp: - (KJS::JSCell::getInt32): Added. - (KJS::JSValue::toInt32SlowCase): Renamed from toInt32. Changed to use the - new getInt32. Added a faster case for in-range numbers. - (KJS::JSValue::toUInt32SlowCase): Ditto. - (KJS::JSValue::toUInt16): Added a faster case for in-range numbers. - - * JavaScriptCore.exp: Updated for changes. - -2007-10-22 Adam Roben - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Turn off - warning about implicit conversion to bool. - -2007-10-22 Mark Rowe - - Gtk build fix. - - * kjs/array_instance.cpp: - -2007-10-22 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15606 - make cut-off for sparse vs. dense arrays smarter for speed with large arrays - - Makes the morph test in SunSpider 26% faster, and the overall - benchmark 3% faster. - - This also fixes some small problems we had with the distinction - between nonexistent and undefined values in arrays. - - * kjs/array_instance.h: Tweaked formatting and naming. - * kjs/array_instance.cpp: Copied from kjs/array_object.cpp. - (KJS::storageSize): Added. Computes the size of the storage given a vector length. - (KJS::increasedVectorLength): Added. Implements the rule for resizing the vector. - (KJS::isDenseEnoughForVector): Added. - (KJS::ArrayInstance::ArrayInstance): Initialize the new fields. - (KJS::ArrayInstance::~ArrayInstance): Since m_storage is now never 0, delete it. - (KJS::ArrayInstance::getItem): Updated for name changes. - (KJS::ArrayInstance::lengthGetter): Ditto. - (KJS::ArrayInstance::inlineGetOwnPropertySlot): Added. Allows both versions of - getOwnPropertySlot to share more code. - (KJS::ArrayInstance::getOwnPropertySlot): Just refactored, no code change. - (KJS::ArrayInstance::put): Added logic for extending the vector as long as the - array is dense enough. Also keep m_numValuesInVector up to date. - (KJS::ArrayInstance::deleteProperty): Added code to keep m_numValuesInVector - up to date. - (KJS::ArrayInstance::getPropertyNames): Fixed bug where this would omit names - for array indices with undefined values. - (KJS::ArrayInstance::increaseVectorLength): Renamed from resizeStorage. Also - simplified to only handle getting larger. - (KJS::ArrayInstance::setLength): Added code to update m_numValuesInVector, to - zero out the unused part of the vector and to delete the map if it's no longer - needed. - (KJS::ArrayInstance::mark): Tweaked formatting. - (KJS::compareByStringForQSort): Ditto. - (KJS::ArrayInstance::sort): Ditto. - (KJS::CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments): - Ditto. - (KJS::compareWithCompareFunctionForQSort): Ditto. - (KJS::ArrayInstance::compactForSorting): Fixed bug where this would turn - undefined values into nonexistent values in some cases. - - * kjs/array_object.h: Removed MAX_ARRAY_INDEX. - * kjs/array_object.cpp: Removed ArrayInstance. Moved to a separate file. - - * JavaScriptCore.pri: Added array_instance.cpp. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - * kjs/AllInOneFile.cpp: Ditto. - -2007-10-22 Andrew Wellington - - Reviewed by Mark Rowe. - - Fix for local database support after r26879 - Ensure that ENABLE_DATABASE and ENABLE_ICONDATABASE are correctly set - - * Configurations/JavaScriptCore.xcconfig: - -2007-10-22 Simon Hausmann - - Reviewed by Alp. - - Build fix for the non-qmake builds. - - * wtf/Platform.h: Default to enabling the database features unless - otherwise specified. (similar to ENABLE_ICONDATABASE) - -2007-10-22 Holger Freyther - - Reviewed by Simon Hausmann . - - * Do not build testkjs as an application bundle. This is - needed for run-javascriptcore-tests on OSX. - * Also, based on r26633, allow to test the WebKit/Qt port on OSX. - * Set DYLD_LIBRARY_PATH if it was set in the environment. It must be set - as we do not have -rpath on OSX. - - * kjs/testkjs.pro: - -2007-10-21 Mark Rowe - - Reviewed by Alp. - - http://bugs.webkit.org/show_bug.cgi?id=15575 - Bug 15575: [GTK] Implement threading using GThread - - * wtf/Platform.h: Do not enable pthreads for Gtk. - -2007-10-21 Mark Rowe - - Reviewed by Mitz. - - Fix http://bugs.webkit.org/show_bug.cgi?id=15603 - Bug 15603: Regression(r26847): Crash when sorting an empty array from JavaScript - - * kjs/array_object.cpp: - (KJS::freeStorage): Reinstate null-check that was removed in r26847. - -2007-10-21 Darin Adler - - - fix Windows build - - * kjs/array_instance.h: Removed unused ExecState parameter. - * kjs/array_object.cpp: - (KJS::ArrayInstance::put): Ditto. - (KJS::ArrayInstance::setLength): Ditto. - -2007-10-21 Darin Adler - - * kjs/array_object.cpp: (KJS::ArrayInstance::put): - Add missing assignment that was causing regression test crash. - -2007-10-21 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15585 - speed up sparse arrays by using a custom map - - Speeds up SunSpider by 10%. - - * kjs/array_object.cpp: - (allocateStorage): Leave room for an additional pointer. - (reallocateStorage): Ditto. - (freeStorage): Ditto. - (ArrayInstance::~ArrayInstance): Delete the overflow map if present. - (ArrayInstance::getItem): Read values from the overflow map if present. - Removed the check of length, since it slows down the common case. - (ArrayInstance::getOwnPropertySlot): Ditto. Also removed the fallback - to the property map. - (ArrayInstance::put): Write values into the overflow map as needed. - Also create overflow map when needed. - (ArrayInstance::deleteProperty): Remove values from the overflow map - as appropriate. - (ArrayInstance::getPropertyNames): Add a name for each identifier in - the property map. This is extremely inefficient. - (ArrayInstance::setLength): Remove any values in the overflow map - that are past the new length, as we formerly did with the property map. - (ArrayInstance::mark): Mark any values in the overflow map. - (compareByStringForQSort): Removed unneeded undefined case, since - compactForSorting guarantees we will have no undefined values. - (compareWithCompareFunctionForQSort): Ditto. - (ArrayInstance::compactForSorting): Copy all the values out of the - overflow map and destroy it. - - * kjs/property_map.h: Removed now-unused getSparseArrayPropertyNames. - * kjs/property_map.cpp: Ditto. - -2007-10-20 Darin Adler - - Reviewed by Maciej. - - - http://bugs.webkit.org/show_bug.cgi?id=15579 - stop churning identifier reference counts copying Completion objects - - * kjs/completion.h: Replace the Identifier with an Identifier*. - * kjs/nodes.cpp: - (ForInNode::execute): Update for change to Completion constructor. - (ContinueNode::execute): Ditto. - (BreakNode::execute): Ditto. - -2007-10-20 Mark Rowe - - Reviewed by Alp. - - Gtk changes needed to enable HTML 5 client-side database storage. - - * wtf/Platform.h: Have Gtk use pthreads for now. - -2007-10-20 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=15570 - Store gathered declaration nodes in the function body node. - - This means that you only have to gather the declaration nodes the first - time the function executes. Performance gain of 2.10% on SunSpider, - 0.90% on command-line JS iBench. - - * kjs/nodes.cpp: Split declaration stack initialization code off into - initializeDeclarationStacks(). - (FunctionBodyNode::FunctionBodyNode): - (FunctionBodyNode::initializeDeclarationStacks): - (FunctionBodyNode::processDeclarations): - - * kjs/nodes.h: Changed DeclarationStacks structure to hold references, - since the actual Vectors are now stored either on the stack or in the - function body node. - -2007-10-19 Geoffrey Garen - - Reviewed by Darin Adler. - - http://bugs.webkit.org/show_bug.cgi?id=15559 - Moved processDeclarations call into FunctionBodyNode::execute - - To improve encapsulation, moved processDeclarations call into - FunctionBodyNode::execute. Also marked processDeclarations - ALWAYS_INLINE, since it has only 1 caller now. This is a .71% speedup - on command-line JS iBench. - - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - (KJS::GlobalFuncImp::callAsFunction): - * kjs/function.h: - * kjs/interpreter.cpp: - (KJS::Interpreter::evaluate): - * kjs/nodes.cpp: - (FunctionBodyNode::execute): - * kjs/nodes.h: - -2007-10-19 Brady Eidson - - Reviewed by Sam - - Queue -> Deque! and small style tweaks - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj - * wtf/Deque.h: Added. - (WTF::DequeNode::DequeNode): - (WTF::Deque::Deque): - (WTF::Deque::~Deque): - (WTF::Deque::size): - (WTF::Deque::isEmpty): - (WTF::Deque::append): - (WTF::Deque::prepend): - (WTF::Deque::first): - (WTF::Deque::last): - (WTF::Deque::removeFirst): - (WTF::Deque::clear): - * wtf/Queue.h: Removed. - - -2007-10-19 Brady Eidson - - Reviewed by Oliver - - Added a simple LinkedList based Queue to wtf - We can make a better, more sophisticated an efficient one later, but have - needed one for some time, now! - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/Queue.h: Added. - (WTF::QueueNode::QueueNode): - (WTF::Queue::Queue): - (WTF::Queue::~Queue): - (WTF::Queue::size): - (WTF::Queue::isEmpty): - (WTF::Queue::append): - (WTF::Queue::prepend): - (WTF::Queue::first): - (WTF::Queue::last): - (WTF::Queue::removeFirst): - (WTF::Queue::clear): - -2007-10-19 Nikolas Zimmermann - - Reviewed by Anders. - - Try to fix Qt/Win build slave, by including windows.h also on Qt/Win. - - * kjs/testkjs.cpp: Change PLATFORM(WIN) to PLATFORM(WIN_OS) - -2007-10-19 Simon Hausmann - - Reviewed by Lars. - - Fix compilation on Windows when wchar_t is a typedef instead of a native type (triggered by -Zc:wchar_t-). - Don't provide the wchar_t overloads then as they conflict with the unsigned short ones. - - * wtf/ASCIICType.h: - (WTF::isASCIIAlpha): - (WTF::isASCIIAlphanumeric): - (WTF::isASCIIDigit): - (WTF::isASCIIHexDigit): - (WTF::isASCIILower): - (WTF::isASCIISpace): - (WTF::toASCIILower): - (WTF::toASCIIUpper): - -2007-10-19 Simon Hausmann - - Reviewed by Lars. - - Another build fix for the windows/qt build: Apply the same fix as in revision 26686 also to kjs/config.h to disable the disallowctype feature. - - * kjs/config.h: - -2007-10-18 Maciej Stachowiak - - Reviewed by Adam. - - - use __declspec(thread) for fast thread-local storage on Windows - - - 2.2% speedup on sunspider (on Windows) - - 7% speedup on the string section - - 6% speedup on JS iBench - - - fixed PLT on Windows got 2.5% slower between r25406 and r25422 - - fixed at least some of - - Reviewed by Mark Rowe. - - - fix http://bugs.webkit.org/show_bug.cgi?id=15543 - REGRESSION (r26697): - GoogleDocs: Can't create new documents or open existing ones - - Test: fast/js/regexp-non-character.html - - * pcre/pcre_compile.c: (check_escape): Take out the checks for valid characters - in the \u sequences -- not needed and actively harmful. - -2007-10-17 Anders Carlsson - - Reviewed by Oliver. - - * wtf/Platform.h: - #define USE_PTHREADS on Mac. - -2007-10-17 Geoffrey Garen - - Reviewed by Darin Adler. - - Merged DeclaredFunctionImp into FunctionImp (the base class) because - the distinction between the two was unused. - - Removed codeType() from FunctionImp because FunctionImp and its - subclasses all returned FunctionCode, so it was unused, practically - speaking. - - Removed a different codeType() from GlobalFuncImp because it was unused. - (Perhaps it was vestigial from a time when GlobalFuncImp used to - inherit from FunctionImp.) - - * bindings/runtime_method.cpp: - * bindings/runtime_method.h: - * kjs/function.cpp: - (KJS::FunctionImp::FunctionImp): - (KJS::FunctionImp::callAsFunction): - (KJS::FunctionImp::construct): - (KJS::FunctionImp::execute): - (KJS::FunctionImp::processVarDecls): - * kjs/function.h: - (KJS::FunctionImp::implementsConstruct): - (KJS::FunctionImp::scope): - * kjs/function_object.cpp: - (FunctionProtoFunc::callAsFunction): - (FunctionObjectImp::construct): - * kjs/nodes.cpp: - (FuncDeclNode::processFuncDecl): - (FuncExprNode::evaluate): - -2007-10-17 Adam Roben - - Windows build fix part 2. - - Fix was by Darin, reviewed by Anders and Adam. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add - FastMallocPCRE.cpp to the project, and let Visual Studio have its way - with the post-build step. - * pcre/pcre.h: Don't DLL export the entry points just because this - is Win32 -- this is an internal copy of PCRE and should be private. - * pcre/pcre_compile.c: Fix an uninitialized variable warning -- - there's no real problem but it's better to quiet the compiler by - tweaking the code slightly than turn off the warning entirely. - -2007-10-17 Adam Roben - - Windows build fix. - - Reviewed by Anders. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Disable - some mismatched signed/unsigned comparison warnings. - * pcre/pcre_exec.c: - (match): #if-out some labels that don't seem to exist. - -2007-10-17 Mark Rowe - - Gtk build fix. - - * JavaScriptCore.pri: Add FastMallocPCRE.cpp. - * pcre/pcre_get. #if out two functions that depend on pcre_get_stringnumber, which - is currently unavailable for UTF-16. - -2007-10-16 Darin Adler - - Reviewed by Geoff. - - - merged PCRE changes between 6.4 and 6.5 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - Removed pcre_config.c, pcre_globals.c, pcre_info.c, pcre_maketables.c, - pcre_printint.src, pcre_refcount.c, pcre_study.c, pcre_try_flipped.c, - pcre_ucp_findchar.c, pcre_version.c, and ucptable.c. Added pcre_ucp_searchfuncs.c. - - * pcre/AUTHORS: - * pcre/LICENCE: - * pcre/MERGING: - * pcre/dftables.c: - * pcre/pcre-config.h: - * pcre/pcre.h: - * pcre/pcre.pri: - * pcre/pcre_compile.c: - * pcre/pcre_exec.c: - * pcre/pcre_fullinfo.c: - * pcre/pcre_get.c: - * pcre/pcre_internal.h: - * pcre/pcre_maketables.c: - * pcre/pcre_ord2utf8.c: - * pcre/pcre_tables.c: - * pcre/pcre_ucp_searchfuncs.c: Copied from pcre/pcre_ucp_findchar.c. - * pcre/pcre_xclass.c: - * pcre/ucp.h: - * pcre/ucpinternal.h: - * pcre/ucptable.c: - Updated with new versions from the PCRE 6.5 release, merged with changes. - - * pcre/pcre_config.c: Removed. - * pcre/pcre_globals.c: Removed. - * pcre/pcre_info.c: Removed. - * pcre/pcre_printint.src: Removed. - * pcre/pcre_refcount.c: Removed. - * pcre/pcre_study.c: Removed. - * pcre/pcre_try_flipped.c: Removed. - * pcre/pcre_ucp_findchar.c: Removed. - * pcre/pcre_version.c: Removed. - -2007-10-16 Geoffrey Garen - - Reviewed by Darin Adler. - - Removed KJS_VERBOSE because it was getting in the way of readability, - and the messages didn't seem very helpful. - - * kjs/function.cpp: - (KJS::FunctionImp::callAsFunction): - (KJS::FunctionImp::passInParameters): - * kjs/lookup.h: - (KJS::lookupPut): - * kjs/object.cpp: - (KJS::JSObject::put): - * kjs/value.h: - -2007-10-16 Geoffrey Garen - - Reviewed by Darin Adler. - - Removed the Parameter class because it was a redundant wrapper around - Identifier. - - * kjs/function.cpp: - (KJS::FunctionImp::passInParameters): - (KJS::FunctionImp::getParameterName): - * kjs/nodes.cpp: - (FunctionBodyNode::addParam): - * kjs/nodes.h: - (KJS::FunctionBodyNode::): - -2007-10-16 Geoffrey Garen - - Reviewed by Darin Adler. - - Global replace of assert with ASSERT. - -2007-10-16 Adam Roben - - Make testkjs not delay-load WebKit - - Soon, delay-loading WebKit will be impossible (because we will be - using __declspec(thread) for thread-local storage). This change - prepares testkjs for the future. - - Reviewed by Sam. - - * JavaScriptCore.vcproj/JavaScriptCore.sln: Removed WebKitInitializer, - added FindSafari. - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Don't link against - WebKitInitializer, don't delay-load WebKit. - * kjs/testkjs.cpp: Don't use WebKitInitializer. - -2007-10-16 Adam Roben - - Updated testkjs for the rename of WebKit_debug.dll to WebKit.dll for the Debug configuration - - Reviewed by Kevin McCullough. - - * JavaScriptCore.vcproj/debug.vsprops: Added WebKitDLLConfigSuffix. - * JavaScriptCore.vcproj/debug_internal.vsprops: Ditto. - * JavaScriptCore.vcproj/release.vsprops: Ditto. - * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Use - WebKitDLLConfigSuffix when referring to WebKit.dll, and fixed a typo - in the name of icuuc36[_debug].dll. - -2007-10-16 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Re-structured variable and function declaration code. - - Command-line JS iBench shows no regression. - - Here are the changes: - - 1. Function declarations are now processed at the same time as var - declarations -- namely, immediately upon entry to an execution context. - This does not match Firefox, which waits to process a function - declaration until the declaration's containing block executes, but it - does match IE and the ECMA spec. (10.1.3 states that var and function - declarations should be processed at the same time -- namely, "On - entering an execution context." 12.2 states that "A Block does not - define a new execution scope.") - - 2. Declaration processing proceeds iteratively now, rather than - recursively, storing the nodes is finds in stacks. This will later - facilitate an optimization to hold on to the gathered declaration nodes, - rather than re-fetching them in every function call. - [ http://bugs.webkit.org/show_bug.cgi?id=14868 ] - - Modified these tests because they expected the incorrect Mozilla - behavior described above: - - * tests/mozilla/ecma_3/Function/scope-001.js: - * tests/mozilla/js1_5/Scope/regress-184107.js: - -2007-10-16 Darin Adler - - - try to fix the GTK build - - * kjs/ustring.cpp: Include ASCIICType.h, not ASCIICtype.h. - -2007-10-16 Darin Adler - - - try to fix the Windows build - - * kjs/date_object.cpp: (KJS::parseDate): A couple instances of isspace were - in here. Not sure why it wasn't failing elsewhere. Changed to isASCIISpace. - -2007-10-16 Darin Adler - - - try to fix the GTK build - - * kjs/ustring.cpp: Include ASCIICType.h. - -2007-10-16 Darin Adler - - Reviewed by Maciej and Geoff (and looked over by Eric). - - - http://bugs.webkit.org/show_bug.cgi?id=15519 - eliminate use of for processing ASCII - - * wtf/ASCIICType.h: Added. - * wtf/DisallowCType.h: Added. - - * kjs/config.h: Include DisallowCType.h. - - * kjs/date_object.cpp: - (KJS::skipSpacesAndComments): - (KJS::findMonth): - (KJS::parseDate): - * kjs/function.cpp: - (KJS::decode): - * kjs/ustring.cpp: - (KJS::UString::toDouble): - Use ASCIICType.h functions instead of ctype.h ones. - -2007-10-14 Maciej Stachowiak - - Reviewed by Darin. - - - fixes for "New JavaScript benchmark" - http://bugs.webkit.org/show_bug.cgi?id=15515 - - * kjs/testkjs.cpp: - (TestFunctionImp::callAsFunction): Implement "load" for compatibility - with SpiderMonkey. - (TestFunctionImp::): ditto - (doIt): ditto - (kjsmain): Drop useless --> from output. - -2007-10-15 Geoffrey Garen - - Removed unnecessary #include. - - * API/JSObjectRef.cpp: - -2007-10-15 Geoffrey Garen - - Double-reverse build fix. My tree was out of date. - - * kjs/nodes.cpp: - (NumberNode::evaluate): - -2007-10-15 Geoffrey Garen - - Build fix. - - * kjs/nodes.cpp: - (NumberNode::evaluate): - -2007-10-15 Geoffrey Garen - - Reviewed by Darin Adler. - - Removed surprising self-named "hack" that made nested functions - available as named properties of their containing functions, and placed - containing function objects in the scope chains of nested functions. - - There were a few reasons to remove this "hack:" - - 1. It contradicted FF, IE, and the ECMA spec. - - 2. It incurred a performance penalty, since merely parsing a function - required parsing its body for nested functions (and so on). - - 3. SVN history contains no explanation for why it was added. It was just - legacy code in a large merge a long, long time ago. - - [ Patch broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ] - - * kjs/nodes.cpp: - (FuncDeclNode::processFuncDecl): - -2007-10-15 Geoffrey Garen - - Reviewed by Darin Adler. - - Removed the concept of AnonymousCode. It was unused, and it doesn't - exist in the ECMA spec. - - [ Patch broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ] - - * kjs/Context.cpp: - (KJS::Context::Context): - * kjs/function.h: - * kjs/nodes.cpp: - (ReturnNode::execute): - -2007-10-15 Geoffrey Garen - - Reviewed by Darin Adler. - - Made function parameters DontDelete. This matches FF and the vague - description in ECMA 10.1.3. It's also required in order to make - symbol table based lookup of function parameters valid. (If the - parameters aren't DontDelete, you can't guarantee that you'll find - them later in the symbol table.) - - [ Patch broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ] - - * kjs/function.cpp: - (KJS::FunctionImp::passInParameters): - -2007-10-15 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Some Vector optimizations. These are especially important when using - Vector as a stack for implementing recursive algorithms iteratively. - - [ Broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ] - - 1. Added shrink(), which is a version of resize() that you can call - to save a branch / improve code generation and inlining when you know - that the vector is not getting bigger. - - 2. Changed subclassing relationship in VectorBuffer to remove a call to - fastFree() in the destructor for the inlineCapacity != 0 template - specialization. This brings inline Vectors one step closer to true - stack-allocated arrays. - - Also changed abort() to CRASH(), since the latter works better. - - * wtf/Vector.h: - (WTF::VectorBufferBase::allocateBuffer): - (WTF::VectorBufferBase::deallocateBuffer): - (WTF::VectorBufferBase::VectorBufferBase): - (WTF::VectorBufferBase::~VectorBufferBase): - (WTF::): - (WTF::VectorBuffer::VectorBuffer): - (WTF::VectorBuffer::~VectorBuffer): - (WTF::VectorBuffer::deallocateBuffer): - (WTF::VectorBuffer::releaseBuffer): - (WTF::Vector::clear): - (WTF::Vector::removeLast): - (WTF::::operator): - (WTF::::fill): - (WTF::::shrink): - -2007-10-12 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed http://bugs.webkit.org/show_bug.cgi?id=15490 - Iteration statements sometimes incorrectly evaluate to the empty value - (KDE r670547). - - [ Broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ] - - This patch is a merge of KDE r670547, with substantial modification - for performance. - - It fixes do-while statements to evaluate to a value. (They used - to evaluate to the empty value in all cases.) - - It also fixes SourceElementsNode to maintain the value of abnormal - completions like "break" and "continue." - - It also re-works the main execution loop in SourceElementsNode so that - it (1) makes a little more sense and (2) avoids unnecessary work. This - is a .28% speedup on command-line JS iBench. - - * kjs/nodes.cpp: - (DoWhileNode::execute): - (SourceElementsNode::execute): - -2007-10-15 Simon Hausmann - - Reviewed by Lars. - - Fix compilation with gcc 4.3 by including 'limits' due to the use of std::numeric_limits. - - * wtf/HashTraits.h: - -2007-10-5 Kevin Ollivier - - Reviewed by Adam. - - Add support for MSVC7, and fix cases where PLATFORM(WIN) should - be PLATFORM(WIN_OS) for other ports building on Windows. - - * kjs/DateMath.cpp: - (KJS::getDSTOffsetSimple): - * kjs/JSImmediate.h: - * wtf/Assertions.cpp: - * wtf/Assertions.h: - * wtf/Platform.h: - * wtf/StringExtras.h: - (snprintf): - (vsnprintf): - -2007-10-14 Cameron Zwarich - - Reviewed by Darin. - - Adds NegateNode optimization from KJS. The relevant revision in KDE - is 666736. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (NumberNode::evaluate): - * kjs/nodes.h: - (KJS::Node::): - (KJS::NumberNode::): - * kjs/nodes2string.cpp: - (NumberNode::streamTo): - -2007-10-14 Jason Foreman - - Reviewed by Maciej. - - Fix http://bugs.webkit.org/show_bug.cgi?id=15145 - - Ensure that if adjusting n to minimize the difference of n*intPow10(e-p+1) to x, - that the property n < intPow10(p) is maintained. - - * kjs/number_object.cpp: - (NumberProtoFunc::callAsFunction): - -== Rolled over to ChangeLog-2007-10-14 == diff --git a/ChangeLog-2009-06-16 b/ChangeLog-2009-06-16 deleted file mode 100644 index 52d3c36..0000000 --- a/ChangeLog-2009-06-16 +++ /dev/null @@ -1,39978 +0,0 @@ -2009-06-15 Gavin Barraclough - - Rubber Stamped by Sam Weinig. - - Rename PatchBuffer to LinkBuffer. Previously our terminology has been a little - mixed up, but we have decided to fix on refering to the process that takes place - at the end of code generation as 'linking', and on any modifications that take - place later (and once the code has potentially already been executed) as 'patching'. - - However, the term 'PatchBuffer' is already in use, and needs to be repurposed. - - To try to minimize confusion, we're going to switch the terminology over in stages, - so for now we'll refer to later modifications as 'repatching'. This means that the - new 'PatchBuffer' has been introduced with the name 'RepatchBuffer' instead. - - This patch renames the old 'PatchBuffer' to 'LinkBuffer'. We'll leave ToT in this - state for a week or so to try to avoid to much overlap of the meaning of the term - 'PatchBuffer', then will come back and rename 'RepatchBuffer'. - - * assembler/ARMv7Assembler.h: - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::LinkBuffer::LinkBuffer): - (JSC::AbstractMacroAssembler::LinkBuffer::~LinkBuffer): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::compile): - -2009-06-15 Gavin Barraclough - - Reviewed by Sam Weinig. - - Having moved most of their functionality into the RepatchBuffer class, - we can simplify the CodeLocation* classes. - - The CodeLocation* classes are currently a tangle of templatey and friendly - badness, burried in the middle of AbstractMacroAssembler. Having moved - the ability to repatch out into RepatchBufer they are now do-nothing wrappers - on CodePtr (MacroAssemblerCodePtr), that only exist to provide type-safety. - - Simplify the code, and move them off into their own header. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::PatchBuffer::patch): - * assembler/CodeLocation.h: Copied from assembler/AbstractMacroAssembler.h. - (JSC::CodeLocationCommon::CodeLocationCommon): - (JSC::CodeLocationInstruction::CodeLocationInstruction): - (JSC::CodeLocationLabel::CodeLocationLabel): - (JSC::CodeLocationJump::CodeLocationJump): - (JSC::CodeLocationCall::CodeLocationCall): - (JSC::CodeLocationNearCall::CodeLocationNearCall): - (JSC::CodeLocationDataLabel32::CodeLocationDataLabel32): - (JSC::CodeLocationDataLabelPtr::CodeLocationDataLabelPtr): - (JSC::CodeLocationCommon::instructionAtOffset): - (JSC::CodeLocationCommon::labelAtOffset): - (JSC::CodeLocationCommon::jumpAtOffset): - (JSC::CodeLocationCommon::callAtOffset): - (JSC::CodeLocationCommon::nearCallAtOffset): - (JSC::CodeLocationCommon::dataLabelPtrAtOffset): - (JSC::CodeLocationCommon::dataLabel32AtOffset): - * assembler/MacroAssemblerCodeRef.h: - (JSC::MacroAssemblerCodePtr::operator!): - * bytecode/CodeBlock.h: - (JSC::getStructureStubInfoReturnLocation): - (JSC::getCallLinkInfoReturnLocation): - (JSC::getMethodCallLinkInfoReturnLocation): - * bytecode/Instruction.h: - * bytecode/JumpTable.h: - (JSC::StringJumpTable::ctiForValue): - (JSC::SimpleJumpTable::ctiForValue): - * bytecode/StructureStubInfo.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitCatch): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JITStubs.cpp: - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - (JSC::JITStubs::getPolymorphicAccessStructureListSlot): - -2009-06-15 Gavin Barraclough - - Reviewed by Sam Weinig. - - Having introduced the RepatchBuffer, ProcessorReturnAddress is now a do-nothing - wrapper around ReturnAddressPtr. Remove it. In tugging on this piece of string - it made sense to roll out the use of ReturnAddressPtr a little further into - JITStubs (which had always been the intention). - - No performance impact. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::RepatchBuffer::relinkCallerToTrampoline): - (JSC::AbstractMacroAssembler::RepatchBuffer::relinkCallerToFunction): - (JSC::AbstractMacroAssembler::RepatchBuffer::relinkNearCallerToTrampoline): - * assembler/MacroAssemblerCodeRef.h: - (JSC::ReturnAddressPtr::ReturnAddressPtr): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getStubInfo): - (JSC::CodeBlock::getCallLinkInfo): - (JSC::CodeBlock::getMethodCallLinkInfo): - (JSC::CodeBlock::getBytecodeIndex): - * interpreter/Interpreter.cpp: - (JSC::bytecodeOffsetForPC): - * jit/JIT.cpp: - (JSC::ctiPatchNearCallByReturnAddress): - (JSC::ctiPatchCallByReturnAddress): - * jit/JIT.h: - (JSC::JIT::compileGetByIdProto): - (JSC::JIT::compileGetByIdChain): - (JSC::JIT::compilePutByIdTransition): - (JSC::JIT::compilePatchGetArrayLength): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::StackHack::StackHack): - (JSC::returnToThrowTrampoline): - (JSC::throwStackOverflowError): - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): - (JSC::JITStackFrame::returnAddressSlot): - * runtime/JSGlobalData.h: - -2009-06-15 Simon Fraser - - Reviewed by Mark Rowe. - - - - Define ENABLE_3D_RENDERING when building on 10.6, and move ENABLE_3D_RENDERING - switch from config.h to wtf/Platform.h. - - * Configurations/FeatureDefines.xcconfig: - * wtf/Platform.h: - -2009-06-15 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Move repatching methods into a set of methods on a class. This will allow us to - coallesce memory reprotection calls. Really, we want this class to be called - PatchBuffer, we want the class PatchBuffer to be called LinkBuffer, we want both - to be memblers of MacroAssembler rather then AbstractMacroAssembler, we don't - want the CodeLocationFoo types anymore (they are now only really there to provide - type safety, and that is completely undermined by the way we use offsets). Then - the link & patch buffers should delegate the actual patching calls to the - architecture-specific layer of the MacroAssembler. Landing all these changes as a - sequence of patches. - - No performance impact. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::CodeLocationCall::CodeLocationCall): - (JSC::AbstractMacroAssembler::CodeLocationNearCall::CodeLocationNearCall): - (JSC::AbstractMacroAssembler::CodeLocationNearCall::calleeReturnAddressValue): - (JSC::AbstractMacroAssembler::RepatchBuffer::RepatchBuffer): - (JSC::AbstractMacroAssembler::RepatchBuffer::relink): - (JSC::AbstractMacroAssembler::RepatchBuffer::repatch): - (JSC::AbstractMacroAssembler::RepatchBuffer::relinkCallerToTrampoline): - (JSC::AbstractMacroAssembler::RepatchBuffer::relinkCallerToFunction): - (JSC::AbstractMacroAssembler::RepatchBuffer::relinkNearCallerToTrampoline): - (JSC::AbstractMacroAssembler::RepatchBuffer::repatchLoadPtrToLEA): - * jit/JIT.cpp: - (JSC::ctiPatchNearCallByReturnAddress): - (JSC::ctiPatchCallByReturnAddress): - (JSC::JIT::unlinkCall): - (JSC::JIT::linkCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchMethodCallProto): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - -2009-06-15 Gavin Barraclough - - Reviewed by Geoff Hunt & Oliver Garen. - - We are currently generating two copies of the slow path for op_call for no reason. Stop that. - - Originally op_call used two slow paths since the first set up the pointer to the CallLinkInfo - for use when linking. However this is now looked up using the return address (as we do for - property accesses) so the two paths are now identical. - - No performance impact, reduces memory footprint. - - * bytecode/CodeBlock.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - (JSC::JIT::linkCall): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSlowCase): - * jit/JITStubs.cpp: - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - -2009-06-12 Dave Hyatt - - Reviewed by Anders Carlsson. - - https://bugs.webkit.org/show_bug.cgi?id=26373 - - Add a new class to Threading in wtf called ReadWriteLock that handles single writer/multiple reader locking. - Provide a pthreads-only implementation of the lock for now, as this class is only going to be used - on Snow Leopard at first. - - * wtf/Threading.h: - (WTF::ReadWriteLock::impl): - * wtf/ThreadingPthreads.cpp: - (WTF::ReadWriteLock::ReadWriteLock): - (WTF::ReadWriteLock::~ReadWriteLock): - (WTF::ReadWriteLock::readLock): - (WTF::ReadWriteLock::tryReadLock): - (WTF::ReadWriteLock::writeLock): - (WTF::ReadWriteLock::tryWriteLock): - (WTF::ReadWriteLock::unlock): - -2009-06-12 Oliver Hunt - - Reviewed by Geoff Garen. - - Make LiteralParser non-recursive - - Convert LiteralParser from using a simple recursive descent parser - to a hand rolled PDA. Relatively simple conversion, but required - modifications to MarkedArgumentBuffer to make it more suitable as - a generic marked vector. I'll refactor and rename MarkedArgumentBuffer - in future as there are many other cases where it will be useful to - have such a class. - - * runtime/ArgList.h: - (JSC::MarkedArgumentBuffer::MarkedArgumentBuffer): - (JSC::MarkedArgumentBuffer::append): - (JSC::MarkedArgumentBuffer::removeLast): - (JSC::MarkedArgumentBuffer::last): - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::parse): - * runtime/LiteralParser.h: - (JSC::LiteralParser::LiteralParser): - (JSC::LiteralParser::tryLiteralParse): - (JSC::LiteralParser::): - -2009-06-12 David Levin - - Reviewed by NOBODY (build fix for windows). - - Adjust the exports for JSC on Windows like what was done for OSX in - the previous commit. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-06-12 David Levin - - Reviewed by Darin Adler. - - UString shouldn't create sharedBuffer for SmallStrings. - https://bugs.webkit.org/show_bug.cgi?id=26360 - - The methods changed are not used by JSC, so there is no JS perf impact. However, - there is a potential DOM perf impact, so I re-ran several of the tests that - I ran previously and ensured that the perf stay the same which caused me to - adjust the minLengthToShare. - - * JavaScriptCore.exp: - * runtime/UString.cpp: - (JSC::UString::Rep::sharedBuffer): - Determines if the buffer being shared is big enough before doing so. - Previously, BaseString::sharedBuffer was called but it would only know - the length of the base string (BaseString::len) which may not be the same - as the string being shared (Rep::len). - (JSC::UString::BaseString::sharedBuffer): - This is now only be used by Rep::sharedBuffer. which does the length check. - * runtime/UString.h: - -2009-06-12 Dimitri Glazkov - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=26191 - Remove xmath include in MathExtras.h, because it is not needed and also - breaks VS2008 builds with TR1 turned on. - - * wtf/MathExtras.h: Removed xmath include. - -2009-06-12 Peter Kasting - - Reviewed by Eric Seidel. - - * ChangeLog-2007-10-14: Change pseudonym "Don Gibson" to me (was used while Google Chrome was not public); update my email address. - -2009-06-12 Kevin Ollivier - - wx build fix. Adding JSONObject.cpp to the build. - - * JavaScriptCoreSources.bkl: - -2009-06-12 Laszlo Gombos - - Reviewed by Jan Michael Alonzo. - - [Qt] Fix build break - https://bugs.webkit.org/show_bug.cgi?id=26340 - - * JavaScriptCore.pri: Add JSONObject.cpp to LUT files. - -2009-06-11 Oliver Hunt - - Reviewed by NOBODY (build fix). - - Lower stringify recursion limit to deal with small windows stack. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSONObject.cpp: - (JSC::Stringifier::): - -2009-06-11 Laszlo Gombos - - Reviewed by Holger Freyther. - - Fix compilation warnings - - - * wtf/ThreadingNone.cpp: - (WTF::ThreadCondition::wait): Fix compilation warning. - (WTF::ThreadCondition::timedWait): Ditto. - -2009-06-10 Brent Fulgham - - Build fix for Windows target. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Correct missing tag after @r44550 that prevents the - project from being loaded in the Visual Studio IDE. - -2009-06-09 Gavin Barraclough - - Rubber Stamped by Mark Rowe. - - Tidy up a couple of comments. - - * assembler/ARMv7Assembler.h: - Fix date in copyright, neaten up a couple of comments. - * assembler/MacroAssemblerARMv7.h: - Fix date in copyright. - -2009-06-07 Oliver Hunt - - Reviewed by Sam Weinig. - - Bug 26249: Support JSON.stringify - - - Implement JSON.stringify. This patch handles all the semantics of the ES5 - JSON.stringify function, including replacer functions and arrays and both - string and numeric gap arguments. - - Currently uses a clamped recursive algorithm basically identical to the spec - description but with a few minor tweaks for performance and corrected semantics - discussed in the es-discuss mailing list. - - * DerivedSources.make: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/CallFrame.h: - (JSC::ExecState::jsonTable): - * runtime/CommonIdentifiers.h: - add toJSON to the list of common identifiers - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::~JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - Add support for the JSON object lookup table - - * runtime/JSONObject.cpp: Added. - (JSC::): - (JSC::JSONObject::getOwnPropertySlot): - (JSC::Stringifier::): - (JSC::Stringifier::Stringifier): - (JSC::Stringifier::stringify): - (JSC::Stringifier::appendString): - - (JSC::Stringifier::StringKeyGenerator::StringKeyGenerator): - (JSC::Stringifier::StringKeyGenerator::getKey): - (JSC::Stringifier::IntKeyGenerator::IntKeyGenerator): - (JSC::Stringifier::IntKeyGenerator::getKey): - These KeyGenerator classes are used to abstract away the lazy evaluation of keys for - toJSON and replacer functions. - - (JSC::Stringifier::toJSONValue): - (JSC::Stringifier::stringifyArray): - (JSC::Stringifier::stringifyObject): - (JSC::JSONProtoFuncStringify): - * runtime/JSONObject.h: Added. - (JSC::JSONObject:::JSObject): - (JSC::JSONObject::classInfo): - (JSC::JSONObject::createStructure): - -2009-06-09 Gavin Barraclough - - Reviewed by Geoff Garen. - - Enable JIT_OPTIMIZE_CALL & JIT_OPTIMIZE_METHOD_CALLS on ARMv7 platforms. - - These optimizations function correctly with no further changes. - - * wtf/Platform.h: - Change to enable JIT_OPTIMIZE_CALL & JIT_OPTIMIZE_METHOD_CALLS. - -2009-06-09 Gavin Barraclough - - Not Reviewed, build fix. - - * assembler/MacroAssemblerARMv7.h: - -2009-06-09 Gavin Barraclough - - Reviewed by Geoff Garen. - - Enable JIT_OPTIMIZE_ARITHMETIC on ARMv7 platforms. - - Temporarily split support for 'branchTruncateDoubleToInt32' onto its own switch - ('supportsFloatingPointTruncate'). See comment in MacroAssemblerARMv7, we need - to work out wherther we are going to be able to support the current interface on - all platforms, or whether this should be refactored. - - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::supportsFloatingPoint): - Add implementation of supportsFloatingPointTruncate (returns true). - (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate): - Add implementation of supportsFloatingPointTruncate (returns false). - (JSC::MacroAssemblerARMv7::loadDouble): - (JSC::MacroAssemblerARMv7::storeDouble): - (JSC::MacroAssemblerARMv7::addDouble): - (JSC::MacroAssemblerARMv7::subDouble): - (JSC::MacroAssemblerARMv7::mulDouble): - (JSC::MacroAssemblerARMv7::convertInt32ToDouble): - (JSC::MacroAssemblerARMv7::branchDouble): - Implement FP code genertion operations. - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::supportsFloatingPointTruncate): - Add implementation of supportsFloatingPointTruncate (returns true). - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate): - Add implementation of supportsFloatingPointTruncate (returns true). - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_rshift): - Changed to call supportsFloatingPointTruncate(). - (JSC::JIT::emitSlow_op_rshift): - Changed to call supportsFloatingPointTruncate(). - * wtf/Platform.h: - Change to enable JIT_OPTIMIZE_ARITHMETIC. - -2009-06-09 Gavin Barraclough - - Reviewed by Mark Rowe & Geoff Garen. - - Enable JIT_OPTIMIZE_PROPERTY_ACCESS on ARMv7 platforms. - - Firm up interface for planting load intructions that will be repatched by - repatchLoadPtrToLEA(). This method should now no longer be applied to just - any loadPtr instruction. - - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::loadPtrWithPatchToLEA): - Implement loadPtrWithPatchToLEA interface (plants a load with a fixed width address). - (JSC::MacroAssemblerARMv7::move): - (JSC::MacroAssemblerARMv7::nearCall): - (JSC::MacroAssemblerARMv7::call): - (JSC::MacroAssemblerARMv7::moveWithPatch): - (JSC::MacroAssemblerARMv7::tailRecursiveCall): - Switch to use common method 'moveFixedWidthEncoding()' to perform fixed width (often patchable) loads. - (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding): - Move an immediate to a register, always plants movT3/movt instruction pair. - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::loadPtrWithPatchToLEA): - Implement loadPtrWithPatchToLEA interface (just a regular 32-bit load on x86). - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::loadPtrWithPatchToLEA): - Implement loadPtrWithPatchToLEA interface (just a regular 64-bit load on x86_64). - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::emit_op_put_by_id): - * wtf/Platform.h: - Change to enable JIT_OPTIMIZE_PROPERTY_ACCESS. - -2009-06-08 Gavin Barraclough - - Reviewed by Geoff Garen. - - Enable JS language JIT for ARM thumb2 platforms. Add ARMv7 specific - asm & constants, add appropriate configuration switches to Platform.h. - - Landing this disabled until jump linking is completed (see YARR jit patch). - - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::load32): - Fix: should load pointer with ImmPtr not Imm32. - (JSC::MacroAssemblerARMv7::store32): - Fix: should load pointer with ImmPtr not Imm32. - (JSC::MacroAssemblerARMv7::move): - Fix: When moving an Imm32 that is actually a pointer, should call movT3() - not mov(), to ensure code generation is repeatable (for exception handling). - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - Disable JIT_OPTIMIZE_NATIVE_CALL specific code generation if the optimization is not enabled. - * jit/JIT.h: - Add ARMv7 specific values of constants & register names. - * jit/JITInlineMethods.h: - (JSC::JIT::preverveReturnAddressAfterCall): - (JSC::JIT::restoreReturnAddressBeforeReturn): - (JSC::JIT::restoreArgumentReferenceForTrampoline): - Implement for ARMv7 (move value to/from lr). - * jit/JITStubs.cpp: - Add JIT entry/thow trampolines, add macro to add thunk wrapper around stub routines. - * jit/JITStubs.h: - (JSC::JITStackFrame::returnAddressSlot): - Add ARMv7 stack frame object. - * wtf/Platform.h: - Add changes necessary to allow JIT to build on this platform, disabled. - -2009-06-08 Mark Rowe - - Speculative GTK build fix. - - * wtf/DateMath.cpp: - -2009-06-08 Gavin Barraclough - - Reviewed by Mark Rowe. - - Previous patch caused a regression. - - Restructure so no new (empty, inline) function calls are added on x86. - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::makeWritable): - (JSC::ExecutableAllocator::makeExecutable): - (JSC::ExecutableAllocator::reprotectRegion): - (JSC::ExecutableAllocator::cacheFlush): - -2009-06-08 Dimitri Glazkov - - Unreviewed, GTK build fix (thanks, bdash). - - * GNUmakefile.am: Moved DateMath with all other wtf kin. - -2009-06-08 Gavin Barraclough - - Reviewed by Geoff Garen. - - Add (incomplete) support to YARR for running with the jit enabled - on Arm thumb2 platforms. Adds new Assembler/MacroAssembler classes, - along with cache flushing support, tweaks to MacroAssemblerCodePtr - to support decorated thumb code pointers, and new enter/exit code - to YARR jit for the platform. - - Support for this platform is still under development - the assembler - currrently only supports planting and linking jumps with a 16Mb range. - As such, initially commiting in a disabled state. - - * JavaScriptCore.xcodeproj/project.pbxproj: - Add new assembler files. - * assembler/ARMv7Assembler.h: Added. - Add new Assembler. - * assembler/AbstractMacroAssembler.h: - Tweaks to ensure sizes of pointer values planted in JIT code do not change. - * assembler/MacroAssembler.h: - On ARMv7 platforms use MacroAssemblerARMv7. - * assembler/MacroAssemblerARMv7.h: Added. - Add new MacroAssembler. - * assembler/MacroAssemblerCodeRef.h: - (JSC::FunctionPtr::FunctionPtr): - Add better ASSERT. - (JSC::ReturnAddressPtr::ReturnAddressPtr): - Add better ASSERT. - (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): - On ARMv7, MacroAssemblerCodePtr's mush be 'decorated' with a low bit set, - to indicate to the processor that the code is thumb code, not traditional - 32-bit ARM. - (JSC::MacroAssemblerCodePtr::dataLocation): - On ARMv7, decoration must be removed. - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::makeWritable): - Reformatted, no change. - (JSC::ExecutableAllocator::makeExecutable): - When marking code executable also cache flush it, where necessary. - (JSC::ExecutableAllocator::MakeWritable::MakeWritable): - Only use the null implementation of this class if both !ASSEMBLER_WX_EXCLUSIVE - and running on x86(_64) - on other platforms we may also need ensure that - makeExecutable is called at the end to flush caches. - (JSC::ExecutableAllocator::reprotectRegion): - Reformatted, no change. - (JSC::ExecutableAllocator::cacheFlush): - Cache flush a region of memory, or platforms where this is necessary. - * wtf/Platform.h: - Add changes necessary to allow YARR jit to build on this platform, disabled. - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): - (JSC::Yarr::RegexGenerator::generateReturn): - Add support to these methods for ARMv7. - -2009-06-08 Dimitri Glazkov - - Unreviewed, fix my previous fix. - - * runtime/DateInstance.cpp: - (JSC::DateInstance::msToGregorianDateTime): Use WTF namespace qualifier to - disambiguate func signatures. - -2009-06-08 Mark Rowe - - Attempt to fix the Tiger build. - - * wtf/Platform.h: Only test the value of the macro once we know it is defined. - -2009-06-08 Dimitri Glazkov - - Unreviewed, another Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-06-08 Dimitri Glazkov - - Unreviewed, projectile-fixing Windows build. - - * runtime/DateConversion.cpp: Added StringExtras include. - * wtf/DateMath.cpp: Replaced math with algorithm include (looking for std::min def for Windows). - -2009-06-08 Dimitri Glazkov - - Unreviewed, Windows build fix. - - * runtime/DateConstructor.cpp: Changed to use WTF namespace. - * runtime/DateConversion.cpp: Added UString include. - * runtime/DateInstance.cpp: Changed to use WTF namespace. - * wtf/DateMath.cpp: Added math include. - -2009-06-08 Dimitri Glazkov - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=26238 - Move most of runtime/DateMath functions to wtf/DateMath, and split off conversion-related - helpers to DateConversion. - - * AllInOneFile.cpp: Changed DateMath->DateConversion. - * GNUmakefile.am: Ditto and added DateMath. - * JavaScriptCore.exp: Ditto. - * JavaScriptCore.pri: Ditto. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added DateMath. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - * JavaScriptCoreSources.bkl: Ditto. - * pcre/pcre_exec.cpp: Changed to use DateMath. - * profiler/ProfileNode.cpp: - (JSC::getCount): Changed to use DateConversion. - * runtime/DateConstructor.cpp: Ditto. - * runtime/DateConversion.cpp: Copied from JavaScriptCore/runtime/DateMath.cpp. - (JSC::parseDate): Refactored to use null-terminated characters as input. - * runtime/DateConversion.h: Copied from JavaScriptCore/runtime/DateMath.h. - * runtime/DateInstance.cpp: Changed to use wtf/DateMath. - * runtime/DateInstance.h: Ditto. - * runtime/DateMath.cpp: Removed. - * runtime/DateMath.h: Removed. - * runtime/DatePrototype.cpp: Ditto. - * runtime/InitializeThreading.cpp: Ditto. - * wtf/DateMath.cpp: Copied from JavaScriptCore/runtime/DateMath.cpp. - * wtf/DateMath.h: Copied from JavaScriptCore/runtime/DateMath.h. - -2009-06-08 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - -2009-06-07 David Kilzer - - Make JavaScriptCore compile for iPhone and iPhone Simulator - - Reviewed by Gavin Barraclough. - - * Configurations/Base.xcconfig: Split GCC_ENABLE_OBJC_GC on - $(REAL_PLATFORM_NAME). Added $(ARCHS_UNIVERSAL_IPHONE_OS) to - VALID_ARCHS. Added REAL_PLATFORM_NAME_iphoneos, - REAL_PLATFORM_NAME_iphonesimulator, HAVE_DTRACE_iphoneos and - HAVE_DTRACE_iphonesimulator variables. - * Configurations/DebugRelase.xcconfig: Split ARCHS definition on - $(REAL_PLATFORM_NAME). - * Configurations/JavaScriptCore.xcconfig: Added - EXPORTED_SYMBOLS_FILE_armv6 and EXPORTED_SYMBOLS_FILE_armv7 - variables. Split OTHER_LDFLAGS into OTHER_LDFLAGS_BASE and - OTHER_LDFLAGS_$(REAL_PLATFORM_NAME) since CoreServices.framework - is only linked to on Mac OS X. - * JavaScriptCore.xcodeproj/project.pbxproj: Removed references - to CoreServices.framework since it's linked using OTHER_LDFLAGS - in JavaScriptCore.xcconfig. - * profiler/ProfilerServer.mm: Added #import for iPhone - Simulator. - (-[ProfilerServer init]): Conditionalize use of - NSDistributedNotificationCenter to non-iPhone or iPhone - Simulator. - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::): Build fix for iPhone and iPhone - Simulator. - * wtf/Platform.h: Defined PLATFORM(IPHONE) and - PLATFORM(IPHONE_SIMULATOR). - * wtf/ThreadingPthreads.cpp: - (WTF::setThreadNameInternal): Build fix for iPhone and iPhone - Simulator. - -2009-06-08 Tor Arne Vestbø - - Reviewed by Simon Hausmann. - - [Qt] Use $QMAKE_PATH_SEP instead of hardcoded / to fix Windows build - - * JavaScriptCore.pri: - * JavaScriptCore.pro: - * jsc.pro: - -2009-06-07 Gavin Barraclough - - RS by Sam Weinig. - - Remove bonus bogus \n from last commit. - - * jit/JITStubs.cpp: - (JSC::): - -2009-06-07 Gavin Barraclough - - Reviewed by Sam Weinig. - - Change the implementation of op_throw so the stub function always modifies its - return address - if it doesn't find a 'catch' it will switch to a trampoline - to force a return from JIT execution. This saves memory, by avoiding the need - for a unique return for every op_throw. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_throw): - JITStubs::cti_op_throw now always changes its return address, - remove return code generated after the stub call (this is now - handled by ctiOpThrowNotCaught). - * jit/JITStubs.cpp: - (JSC::): - Add ctiOpThrowNotCaught definitions. - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - Change cti_op_throw to always change its return address. - * jit/JITStubs.h: - Add ctiOpThrowNotCaught declaration. - -2009-06-05 Gavin Barraclough - - Rudder stamped by Sam Weinig. - - Add missing ASSERT. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::getRelocatedAddress): - -2009-06-05 Gavin Barraclough - - Reviewed by Sam Weinig. - - Switch storePtrWithPatch to take the initial immediate value as an argument. - - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::storePtrWithPatch): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::storePtrWithPatch): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jsr): - -2009-06-05 Gavin Barraclough - - Reviewed by Sam Weinig. - - Remove patchLength..tByIdExternalLoadPrefix magic numbers from JIT.h. - - These aren't really suitable values to be tracking within common code - of the JIT, since they are not (and realistically cannot) be checked - by ASSERTs, as the other repatch offsets are. Move this functionality - (skipping the REX prefix when patching load instructions to LEAs on - x86-64) into the X86Assembler. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::CodeLocationInstruction::repatchLoadPtrToLEA): - * assembler/X86Assembler.h: - (JSC::X86Assembler::repatchLoadPtrToLEA): - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - -2009-06-05 Shinichiro Hamaji - - Bug 26160: Compile fails in MacOSX when GNU fileutils are installed - - - - Reviewed by Alexey Proskuryakov. - - Use /bin/ln instead of ln for cases where this command is used with -h option. - As this option is not supported by GNU fileutils, this change helps users - who have GNU fileutils in their PATH. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-06-05 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Remove DoubleNotEqual floating point comparison condition for now - - it is not used, and it is unclear the semantics are correct (I think - this comparison would actually give you not-equal-or-unordered, which - might be what is wanted... we can revisit this interface & get it - right when required). - - Also, fix asserts in branchArith32 ops. All adds & subs can check - for Signed, multiply only sets OF so can only check for overflow. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::): - (JSC::MacroAssemblerX86Common::branchAdd32): - (JSC::MacroAssemblerX86Common::branchMul32): - (JSC::MacroAssemblerX86Common::branchSub32): - -2009-06-05 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Minor tidy up in JITStubs. - - * jit/JITStubs.cpp: - (JSC::StackHack::StackHack): - * jit/JITStubs.h: - -2009-06-05 Koen Kooi - - Reviewed by Xan Lopez. - - Build fix for glib unicode backend. - - * wtf/unicode/glib/UnicodeMacrosFromICU.h: - -2009-06-05 Gavin Barraclough - - Reviewed by Oliver Hunt. - - 3 tiny cleanups: - - * assembler/MacroAssemblerX86.h: - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::storePtrWithPatch): - store*() methods should take an ImplicitAddress, rather than an Address. - * assembler/X86Assembler.h: - Make patchPointer private. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_ret): - Remove empty line at end of function. - -2009-06-05 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Encapsulate many uses of void* in the assembler & jit with types that provide - more semantic information. The new types are: - - * MacroAssemblerCodePtr - this wraps a pointer into JIT generated code. - * FunctionPtr - this wraps a pointer to a C/C++ function in JSC. - * ReturnAddressPtr - this wraps a return address resulting from a 'call' instruction. - - Wrapping these types allows for stronger type-checking than is possible with everything - represented a void*. For example, it is now enforced by the type system that near - calls can only be linked to JIT code and not to C functions in JSC (this was previously - required, but could not be enforced on the interface). - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::CodeLocationCommon::CodeLocationCommon): - (JSC::AbstractMacroAssembler::CodeLocationCommon::dataLocation): - (JSC::AbstractMacroAssembler::CodeLocationCommon::executableAddress): - (JSC::AbstractMacroAssembler::CodeLocationCommon::reset): - (JSC::AbstractMacroAssembler::CodeLocationInstruction::repatchLoadToLEA): - (JSC::AbstractMacroAssembler::CodeLocationInstruction::CodeLocationInstruction): - (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForSwitch): - (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForExceptionHandler): - (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForJSR): - (JSC::AbstractMacroAssembler::CodeLocationLabel::operator!): - (JSC::AbstractMacroAssembler::CodeLocationLabel::reset): - (JSC::AbstractMacroAssembler::CodeLocationLabel::CodeLocationLabel): - (JSC::AbstractMacroAssembler::CodeLocationLabel::getJumpDestination): - (JSC::AbstractMacroAssembler::CodeLocationJump::relink): - (JSC::AbstractMacroAssembler::CodeLocationJump::CodeLocationJump): - (JSC::AbstractMacroAssembler::CodeLocationCall::relink): - (JSC::AbstractMacroAssembler::CodeLocationCall::calleeReturnAddressValue): - (JSC::AbstractMacroAssembler::CodeLocationCall::CodeLocationCall): - (JSC::AbstractMacroAssembler::CodeLocationNearCall::relink): - (JSC::AbstractMacroAssembler::CodeLocationNearCall::calleeReturnAddressValue): - (JSC::AbstractMacroAssembler::CodeLocationNearCall::CodeLocationNearCall): - (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::repatch): - (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::CodeLocationDataLabel32): - (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::repatch): - (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::CodeLocationDataLabelPtr): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToTrampoline): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToFunction): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkNearCallerToTrampoline): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::addressForLookup): - (JSC::AbstractMacroAssembler::trampolineAt): - (JSC::AbstractMacroAssembler::PatchBuffer::link): - (JSC::AbstractMacroAssembler::PatchBuffer::performFinalization): - (JSC::::CodeLocationCommon::instructionAtOffset): - (JSC::::CodeLocationCommon::labelAtOffset): - (JSC::::CodeLocationCommon::jumpAtOffset): - (JSC::::CodeLocationCommon::callAtOffset): - (JSC::::CodeLocationCommon::nearCallAtOffset): - (JSC::::CodeLocationCommon::dataLabelPtrAtOffset): - (JSC::::CodeLocationCommon::dataLabel32AtOffset): - * assembler/MacroAssemblerCodeRef.h: - (JSC::FunctionPtr::FunctionPtr): - (JSC::FunctionPtr::value): - (JSC::FunctionPtr::executableAddress): - (JSC::ReturnAddressPtr::ReturnAddressPtr): - (JSC::ReturnAddressPtr::value): - (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): - (JSC::MacroAssemblerCodePtr::executableAddress): - (JSC::MacroAssemblerCodePtr::dataLocation): - (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef): - * assembler/X86Assembler.h: - (JSC::X86Assembler::patchPointerForCall): - * jit/JIT.cpp: - (JSC::ctiPatchNearCallByReturnAddress): - (JSC::ctiPatchCallByReturnAddress): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - (JSC::JIT::compileCTIMachineTrampolines): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - * jit/JITCode.h: - (JSC::JITCode::operator !): - (JSC::JITCode::addressForCall): - (JSC::JITCode::offsetOf): - (JSC::JITCode::execute): - (JSC::JITCode::size): - (JSC::JITCode::HostFunction): - * jit/JITInlineMethods.h: - (JSC::JIT::emitNakedCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::JITThunks::ctiArrayLengthTrampoline): - (JSC::JITThunks::ctiStringLengthTrampoline): - (JSC::JITThunks::ctiVirtualCallPreLink): - (JSC::JITThunks::ctiVirtualCallLink): - (JSC::JITThunks::ctiVirtualCall): - (JSC::JITThunks::ctiNativeCallThunk): - * yarr/RegexJIT.h: - (JSC::Yarr::RegexCodeBlock::operator!): - (JSC::Yarr::RegexCodeBlock::execute): - -2009-06-05 Antti Koivisto - - Try to unbreak Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-06-03 Antti Koivisto - - Reviewed by Dave Kilzer. - - https://bugs.webkit.org/show_bug.cgi?id=13128 - Safari not obeying cache header - - Export JSC::parseDate() - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-06-04 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Bug in property caching of getters and setters. - - Make sure that the transition logic accounts for getters and setters. - If we don't we end up screwing up the transition tables so that some - transitions will start incorrectly believing that they need to check - for getters and setters. - - * runtime/JSObject.cpp: - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - * runtime/JSObject.h: - (JSC::): - * runtime/Structure.h: - -2009-06-04 Gavin Barraclough - - Reviewed by Sam Weinig. - - Minor tweak to PatchBuffer, change it so it no longer holds a CodeRef, and instead - holds a separate code pointer and executable pool. Since it now always holds its - own copy of the code size, and to simplify the construction sequence, it's neater - this way. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::PatchBuffer::PatchBuffer): - (JSC::AbstractMacroAssembler::PatchBuffer::finalizeCode): - (JSC::AbstractMacroAssembler::PatchBuffer::code): - (JSC::AbstractMacroAssembler::PatchBuffer::performFinalization): - -2009-06-04 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Remove 'JIT_STUB_ARGUMENT_STACK' this is unused and untested. - - This just leaves JIT_STUB_ARGUMENT_REGISTER and JIT_STUB_ARGUMENT_VA_LIST. - Since JIT_STUB_ARGUMENT_REGISTER is the sensible configuration on most platforms, - remove this define and make this the default behaviour. - Platforms must now define JIT_STUB_ARGUMENT_VA_LIST to get crazy va_list voodoo, - if they so desire. - - (Refactoring of #ifdefs only, no functional change, no performance impact.) - - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReference): - (JSC::JIT::restoreArgumentReferenceForTrampoline): - * jit/JITStubs.cpp: - (JSC::): - * jit/JITStubs.h: - * wtf/Platform.h: - -2009-06-04 Gavin Barraclough - - Rubber stamped by Sam Weinig. - - * jit/JITArithmetic.cpp: - Remove some redundant typedefs, unused since arithmetic was added to the MacroAssembler interface. - -2009-06-04 Brent Fulgham - - Build fix due to header include problem. - - * interpreter/Interpreter.h: Remove wtf from includes so that - compile can find the headers in expected places. - -2009-06-04 Zoltan Horvath - - Reviewed by Darin Adler. - - HashTable class (JavaScriptCore/wtf/HashTable.h) doesn't instantiated by 'new', so - inheritance was removed. HashTable struct has been instantiated by operator new in - JSGlobalData.cpp:106. - HashTable couldn't inherited from FastAllocBase since struct with inheritance is - no longer POD, so HashTable struct has been instantiated by fastNew, destroyed by - fastDelete. - - * interpreter/Interpreter.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::~JSGlobalData): - * wtf/HashTable.h: - -2009-06-04 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Wrap the code that plants pushes/pops planted by JIT in explanatorily named - methods; move property storage reallocation into a standard stub function. - - ~No performance impact (possible <1% progression on x86-64, likely just noise). - - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - Wrap calls to push/pop. - * jit/JIT.h: - Declare the new wrapper methods. - * jit/JITInlineMethods.h: - (JSC::JIT::preverveReturnAddressAfterCall): - (JSC::JIT::restoreReturnAddressBeforeReturn): - Define the new wrapper methods. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_end): - (JSC::JIT::emit_op_ret): - Wrap calls to push/pop. - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - Move property storage reallocation into a standard stub function. - * jit/JITStubs.cpp: - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::JITStubs::): - -2009-06-04 Laszlo Gombos - - Reviewed by Ariya Hidayat. - - [Qt] Single-threaded QtWebKit configuration - - - * JavaScriptCore.pri: Use ThreadingNone.cpp instead of - ThreadingQt.cpp and make sure ENABLE_JSC_MULTIPLE_THREADS is turned off - when ENABLE_SINGLE_THREADED is tuned on - * wtf/ThreadingNone.cpp: - (WTF::ThreadCondition::wait): Fix compilation warning. - (WTF::ThreadCondition::timedWait): Ditto. - -2009-06-02 Mark Rowe - - Reviewed by Anders Carlsson. - - Remove workaround that was added to address as it no longer affects our Tiger builds. - - * Configurations/Base.xcconfig: - -2009-06-02 Xan Lopez - - Reviewed by Sam Weinig. - - Use C-style comments in Platform.h so it can be included from C - files. - - * wtf/Platform.h: - -2009-06-02 Tor Arne Vestbø - - Rubber-stamped by Simon Hausmann. - - Use File::Spec->tmpdir instead of hardcoded paths for tempfile() dir - - This fixes the Windows-build if the user does not have a /tmp directory. - - * pcre/dftables: - -2009-06-02 Gavin Barraclough - - Reviewed by Oliver ">>" Hunt. - - emitSlow_op_rshift is linking the wrong number of slow cases, if !supportsFloatingPoint(). - Fixerate, and refactor/comment the code a little to make it clearer what is going on. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_rshift): - -2009-06-01 Gavin Barraclough - - Reviewed by NOBODY - speculative windows build fix (errm, for the other patch!). - - * jit/JITStubs.cpp: - (JSC::): - -2009-06-01 Gavin Barraclough - - Reviewed by NOBODY - speculative windows build fix. - - * assembler/AbstractMacroAssembler.h: - (JSC::::CodeLocationCall::CodeLocationCall): - (JSC::::CodeLocationNearCall::CodeLocationNearCall): - -2009-06-01 Gavin Barraclough - - Reviewed by Olliej Hunt. - - Change JITStub functions from being static members on the JITStub class to be - global extern "C" functions, and switch their the function signature declaration - in the definition of the functions to be C-macro generated. This makes it easier - to work with the stub functions from assembler code (since the names no longer - require mangling), and by delaring the functions with a macro we can look at - also auto-generating asm thunks to wrap the JITStub functions to perform the - work currently in 'restoreArgumentReference' (as a memory saving). - - Making this change also forces us to be a bit more realistic about what is private - on the Register and CallFrame objects. Presently most everything on these classes - is private, and the classes have plenty of friends. We could befriend all the - global functions to perpetuate the delusion of encapsulation, but using friends is - a bit of a sledgehammer solution here - since friends can poke around with all of - the class's privates, and since all the major classes taht operate on Regsiters are - currently friends, right there is currently in practice very little protection at - all. Better to start removing friend delclarations, and exposing just the parts - that need to be exposed. - - * interpreter/CallFrame.h: - (JSC::ExecState::returnPC): - (JSC::ExecState::setCallerFrame): - (JSC::ExecState::returnValueRegister): - (JSC::ExecState::setArgumentCount): - (JSC::ExecState::setCallee): - (JSC::ExecState::setCodeBlock): - * interpreter/Interpreter.h: - * interpreter/Register.h: - (JSC::Register::Register): - (JSC::Register::i): - * jit/JITStubs.cpp: - (JSC::): - (JSC::JITThunks::JITThunks): - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::JITStubs::): - * runtime/JSFunction.h: - (JSC::JSFunction::nativeFunction): - (JSC::JSFunction::classInfo): - * runtime/JSGlobalData.h: - -2009-06-01 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Tidy up the literal parser. - - Make the number lexing in the LiteralParser exactly match the JSON spec, which - makes us cover more cases, but also more strict. Also made string lexing only - allow double-quoted strings. - - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::Lexer::lex): - (JSC::LiteralParser::Lexer::lexString): - (JSC::LiteralParser::Lexer::lexNumber): - -2009-06-01 Gavin Barraclough - - Reviewed by Sam "WX" Weinig. - - Allow the JIT to operate without relying on use of RWX memory, on platforms where this is supported. - - This patch adds a switch to Platform.h (ENABLE_ASSEMBLER_WX_EXCLUSIVE) which enables this mode of operation. - When this flag is set, all executable memory will be allocated RX, and switched to RW only whilst being - modified. Upon completion of code generation the protection is switched back to RX to allow execution. - - Further optimization will be required before it is desirable to enable this mode of operation by default; - enabling this presently incurs a 5%-10% regression. - - (Submitting disabled - no performance impact). - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::CodeLocationInstruction::repatchLoadToLEA): - (JSC::AbstractMacroAssembler::CodeLocationLabel::fromFunctionPointer): - (JSC::AbstractMacroAssembler::CodeLocationJump::relink): - (JSC::AbstractMacroAssembler::CodeLocationCall::relink): - (JSC::AbstractMacroAssembler::CodeLocationNearCall::relink): - (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::repatch): - (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::repatch): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToTrampoline): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToFunction): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkNearCallerToTrampoline): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkNearCallerToFunction): - (JSC::AbstractMacroAssembler::PatchBuffer::PatchBuffer): - (JSC::AbstractMacroAssembler::PatchBuffer::~PatchBuffer): - (JSC::AbstractMacroAssembler::PatchBuffer::link): - (JSC::AbstractMacroAssembler::PatchBuffer::patch): - (JSC::AbstractMacroAssembler::PatchBuffer::performFinalization): - (JSC::::CodeLocationCommon::nearCallAtOffset): - (JSC::::CodeLocationCall::CodeLocationCall): - (JSC::::CodeLocationNearCall::CodeLocationNearCall): - * assembler/AssemblerBuffer.h: - (JSC::AssemblerBuffer::executableCopy): - * assembler/X86Assembler.h: - (JSC::CAN_SIGN_EXTEND_U32_64): - (JSC::X86Assembler::linkJump): - (JSC::X86Assembler::linkCall): - (JSC::X86Assembler::patchPointer): - (JSC::X86Assembler::relinkJump): - (JSC::X86Assembler::relinkCall): - (JSC::X86Assembler::repatchInt32): - (JSC::X86Assembler::repatchPointer): - (JSC::X86Assembler::repatchLoadToLEA): - (JSC::X86Assembler::patchInt32): - (JSC::X86Assembler::patchRel32): - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::): - (JSC::ExecutableAllocator::makeWritable): - (JSC::ExecutableAllocator::makeExecutable): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - * jit/ExecutableAllocatorPosix.cpp: - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - (JSC::ExecutableAllocator::reprotectRegion): - * jit/ExecutableAllocatorWin.cpp: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - * wtf/Platform.h: - -2009-05-29 Zoltan Horvath - - Reviewed by Darin Adler. - - Inherits Interpreter class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/JSGlobalData.cpp. - - * interpreter/Interpreter.h: - -2009-06-01 David Levin - - Reviewed by NOBODY (windows build fix). - - Add exports for windows (corresponding to the JavaScriptCore.exp modification - in the previous change). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-06-01 David Levin - - Reviewed by Darin Alder and Maciej Stachowiak. - - Bug 26057: StringImpl should share buffers with UString. - https://bugs.webkit.org/show_bug.cgi?id=26057 - - * JavaScriptCore.exp: - * runtime/UString.cpp: - (JSC::UString::Rep::create): - (JSC::UString::BaseString::sharedBuffer): Only do the sharing when - the buffer exceeds a certain size. The size was tuned by running - various dom benchmarks with numbers ranging from 20 to 800 and finding - a place that seemed to do the best overall. - * runtime/UString.h: - -2009-05-31 Gavin Barraclough - - Reviewed by Olliej "you just need to change NativeFunctionWrapper.h" Hunt. - - Add ENABLE_JIT_OPTIMIZE_NATIVE_CALL switch to allow JIT to operate without native call optimizations. - - * runtime/NativeFunctionWrapper.h: - * wtf/Platform.h: - -2009-05-30 Darin Adler - - Reviewed by Sam Weinig. - - REGRESSION (r42734): Celtic Kane JavaScript benchmark does not run: - "Maximum call stack size exceeded" - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): Use the same recursion limit as the other recursion checks. - We need a limit of at least 100 to run the benchmark above. - (JSC::arrayProtoFuncToLocaleString): Ditto. - (JSC::arrayProtoFuncJoin): Ditto. - -2009-05-28 Dirk Schulze - - Reviewed by Nikolas Zimmermann. - - Added new build flag --filters for Mac. More details in WebCore/ChangeLog. - - * Configurations/FeatureDefines.xcconfig: - -2009-05-27 Oliver Hunt - - Reviewed by Mark Rowe. - - Stack overflow in JSC::stringProtoFuncReplace() running jsFunFuzz - - We should always check for exceptions after creating a CachedCall, this wasn't being done in - the string replace logic. - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - -2009-05-27 Gustavo Noronha Silva - - Unreviewed (make distcheck) build fix; adding missing headers. - - * GNUmakefile.am: - -2009-05-27 Jessie Berlin - - Reviewed by Adam Roben - - Fix the Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-27 Fridrich Strba - - Reviewed by Gustavo Noronha. - - When building on Windows, consider Windows specific files. - - * GNUmakefile.am: - -2009-05-27 Fridrich Strba - - Reviewed by Maciej Stachowiak. - - When building with MinGW, don't use the __declspec(dl{import,export}) - decorations and rely on the linker to use its nifty auto-import feature. - It is extremely hard to get the decorations right with MinGW in general - and impossible in WebKit, where the resulting shared library is linking - together some static libraries. - - * config.h: - -2009-05-26 Holger Hans Peter Freyther - - Reviewed by Xan Lopez. - - https://bugs.webkit.org/show_bug.cgi?id=25613 - - Be able to use GOwnPtr for GHashTable as well. The assumption - is that the hash table has been created with g_hash_table_new_full - and has proper destruction functions. - - * wtf/GOwnPtr.cpp: - (WTF::GHashTable): - * wtf/GOwnPtr.h: - -2009-05-26 Oliver Hunt - - Reviewed by Gavin Barraclough. - - REGRESSION: Assertion failure due to forward references - - Add a pattern type for forward references to ensure that we don't confuse the - quantifier alternatives assertion. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::atomBackReference): - (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets): - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::ByteCompiler::emitDisjunction): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateTerm): - * yarr/RegexPattern.h: - (JSC::Yarr::PatternTerm::): - (JSC::Yarr::PatternTerm::PatternTerm): - (JSC::Yarr::PatternTerm::ForwardReference): - -2009-05-26 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Fix for: REGRESSION: jQuery load() issue (25981), - and also an ASSERT failure on http://ihasahotdog.com/. - - When overwriting a property on a dictionary with a cached specific value, - clear the cache if new value being written is different. - - * JavaScriptCore.exp: - Export the new symbols. - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_get_by_id_method_check_second): - Close dictionary prototypes upon caching a method access, as would happen when caching - a regular get_by_id. - * runtime/JSObject.h: - (JSC::JSObject::propertyStorage): - (JSC::JSObject::locationForOffset): - Make these methods private. - (JSC::JSObject::putDirectInternal): - When overwriting a property on a dictionary with a cached specific value, - clear the cache if new value being written is different. - * runtime/Structure.cpp: - (JSC::Structure::despecifyDictionaryFunction): - Reset the specific value field for a given property in a dictionary. - (JSC::Structure::despecifyFunctionTransition): - Rename of 'changeFunctionTransition' (this was already internally refered to as a despecification). - * runtime/Structure.h: - Declare new method. - -2009-05-26 Gavin Barraclough - - Reviewed by Oliver "pieces of eight" Hunt. - - When reseting RegexPattern class, should fully reset the class, not just bits of it. - In particular, we delete the cached character classes (for wordchars, etc), but do - not reset the set of pointers to the cached classes. In the case of a repeated parse - due to an illegal back-reference we will continue to use the deleted character class. - - * yarr/RegexPattern.h: - (JSC::Yarr::RegexPattern::reset): - -2009-05-26 Brent Fulgham - - Build fix to correct r44161. - - * wtf/FastAllocBase.h: - -2009-05-26 Zoltan Horvath - - Reviewed by Maciej Stachowiak. - - Inherite HashTable from FastAllocBase, because it has been instantiated by - 'new' in JavaScriptCore/runtime/JSGlobalData.cpp. - - * wtf/HashTable.h: - * wtf/FastAllocBase.h: Remove 'wtf' path from TypeTraits.h to allow use outside of wtf. - -2009-05-25 David Levin - - Reviewed by Maciej Stachowiak and Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=25126 - Allow the buffer underlying UString to be shared. - - In order to not grow the underlying size of any structure, - there is a union in the Rep string which holds - + m_sharedBuffer -- a pointer to the shared ref counted buffer - if the class is BaseString and the buffer is being shared OR - + m_baseString -- the BaseString if the class is only UString::Rep - but not a UString::BaseString - - Ideally, m_sharedBuffer would be a RefPtr, but it cannot be because - it is in a union. - - No change in sunspider perf. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/UString.cpp: - (JSC::UString::Rep::share): - (JSC::UString::Rep::destroy): - (JSC::UString::BaseString::sharedBuffer): - (JSC::UString::BaseString::setSharedBuffer): - (JSC::UString::BaseString::slowIsBufferReadOnly): - (JSC::expandCapacity): - (JSC::UString::Rep::reserveCapacity): - (JSC::UString::expandPreCapacity): - (JSC::concatenate): - (JSC::UString::append): - * runtime/UString.h: - (JSC::UString::Rep::Rep): - (JSC::UString::Rep::): - (JSC::UString::BaseString::isShared): - (JSC::UString::BaseString::isBufferReadOnly): - (JSC::UString::Rep::baseString): - * wtf/CrossThreadRefCounted.h: - (WTF::CrossThreadRefCounted::isShared): - * wtf/OwnFastMallocPtr.h: Added. - (WTF::OwnFastMallocPtr::OwnFastMallocPtr): - (WTF::OwnFastMallocPtr::~OwnFastMallocPtr): - (WTF::OwnFastMallocPtr::get): - (WTF::OwnFastMallocPtr::release): - -2009-05-25 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Re-add interpreter logic to jit-enabled builds as GCC mysteriously regresses without it - - * wtf/Platform.h: - -2009-05-25 Fridrich Strba - - Reviewed by Maciej Stachowiak. - - The functions written in assembly need to have a leading - underscore on Windows too. - - * jit/JITStubs.cpp: - -2009-05-24 Steve Falkenburg - - Build fix for experimental PGO Windows target. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2009-05-23 David Kilzer - - Part 1 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr - - - - Reviewed by Oliver Hunt. - - * GNUmakefile.am: Added OwnPtrCommon.h and PassOwnPtr.h. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - - * wtf/OwnPtr.h: - (WTF::OwnPtr::OwnPtr): Added constructors that take a - PassOwnPtr. Also added a copy constructor declaration that's - required when assigning a PassOwnPtr to a stack-based OwnPtr. - (WTF::operator=): Added assignment operator methods that take a - PassOwnPtr. - (WTF::swap): Reformatted. - (WTF::operator==): Whitespace changes. - (WTF::operator!=): Ditto. - - * wtf/OwnPtrCommon.h: Added. - (WTF::deleteOwnedPtr): - - * wtf/PassOwnPtr.h: Added. - (WTF::PassOwnPtr::PassOwnPtr): - (WTF::PassOwnPtr::~PassOwnPtr): - (WTF::PassOwnPtr::get): - (WTF::PassOwnPtr::clear): - (WTF::PassOwnPtr::release): - (WTF::PassOwnPtr::operator*): - (WTF::PassOwnPtr::operator->): - (WTF::PassOwnPtr::operator!): - (WTF::PassOwnPtr::operator UnspecifiedBoolType): - (WTF::::operator): - (WTF::operator==): - (WTF::operator!=): - (WTF::static_pointer_cast): - (WTF::const_pointer_cast): - (WTF::getPtr): - -2009-05-23 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Remove interpreter specific logic from the JIT builds. - - This saves ~100k in JSC release builds. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: - * wtf/Platform.h: - -2009-05-22 Mark Rowe - - Part two of an attempted Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-22 Mark Rowe - - Part one of an attempted Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-21 Gavin Barraclough - - Reviewed by Geoff Garen. - - op_method_check - - Optimize method calls, by caching specific function values within the Structure. - The new opcode is used almost like an x86 opcode prefix byte to optimize op_get_by_id, - where the property access is being used to read a function to be passed to op-call (i.e. - 'foo.bar();'). This patch modifies the Structure class such that when a property is - put to an object for the first time we will check if the value is a function. If it is, - we will cache the function value on the Structure. A Structure in such a state guarantees - that not only does a property with the given identifier exist on the object, but also that - its value is unchanged. Upon any further attempt to put a property with the same identifier - (but a different value) to the object, it will transition back to a normal Structure (where - it will guarantee the presence but not the value of the property). - - op_method_check makes use of the new information made available by the Structure, by - augmenting the functionality of op_get_by_id. Upon generating a FunctionCallDotNode a - check will be emitted prior to the property access reading the function value, and the JIT - will generate an extra (initially unlinked but patchable) set of checks prior to the regular - JIT code for get_by_id. The new code will do inline structure and prototype structure check - (unlike a regular get_by_id, which can only handle 'self' accesses inline), and then performs - an immediate load of the function value, rather than using memory accesses to load the value - from the obejct's property storage array. If the method check fails it will revert, or if - the access is polymorphic, the op_get_by_id will continue to operate - and optimize itself - - just as any other regular op_get_by_id would. - - ~2.5% on v8-tests, due to a ~9% progression on richards. - - * API/JSCallbackObjectFunctions.h: - (JSC::::put): - (JSC::::staticFunctionGetter): - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): - * JavaScriptCore.exp: - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::differenceBetween): - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::moveWithPatch): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/CodeBlock.h: - (JSC::getMethodCallLinkInfoReturnLocation): - (JSC::CodeBlock::getMethodCallLinkInfo): - (JSC::CodeBlock::addMethodCallLinkInfos): - (JSC::CodeBlock::methodCallLinkInfo): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitMethodCheck): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::MethodCallCompilationInfo::MethodCallCompilationInfo): - * jit/JITOpcodes.cpp: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::emitSlow_op_method_check): - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::emitSlow_op_put_by_id): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::patchMethodCallProto): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_get_by_id_method_check): - (JSC::JITStubs::cti_op_get_by_id_method_check_second): - * jit/JITStubs.h: - * jsc.cpp: - (GlobalObject::GlobalObject): - * parser/Nodes.cpp: - (JSC::FunctionCallDotNode::emitBytecode): - * runtime/Arguments.cpp: - (JSC::Arguments::put): - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - * runtime/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * runtime/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - (JSC::constructError): - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * runtime/JSActivation.cpp: - (JSC::JSActivation::put): - (JSC::JSActivation::putWithAttributes): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::JSByteArray): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::getOwnPropertySlot): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::putWithAttributes): - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::mark): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (JSC::JSGlobalObject::methodCallDummy): - * runtime/JSObject.cpp: - (JSC::JSObject::put): - (JSC::JSObject::putWithAttributes): - (JSC::JSObject::deleteProperty): - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::JSObject::getPropertyAttributes): - (JSC::JSObject::getPropertySpecificFunction): - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectFunctionWithoutTransition): - * runtime/JSObject.h: - (JSC::getJSFunction): - (JSC::JSObject::getDirectLocation): - (JSC::JSObject::putDirect): - (JSC::JSObject::putDirectWithoutTransition): - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::parseObject): - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/Lookup.h: - (JSC::lookupPut): - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - (JSC::NativeErrorConstructor::construct): - * runtime/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - * runtime/PropertyMapHashTable.h: - (JSC::PropertyMapEntry::PropertyMapEntry): - * runtime/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * runtime/PutPropertySlot.h: - (JSC::PutPropertySlot::): - (JSC::PutPropertySlot::PutPropertySlot): - (JSC::PutPropertySlot::setNewProperty): - (JSC::PutPropertySlot::setDespecifyFunctionProperty): - (JSC::PutPropertySlot::isCacheable): - (JSC::PutPropertySlot::cachedOffset): - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::~Structure): - (JSC::Structure::materializePropertyMap): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::changeFunctionTransition): - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::get): - (JSC::Structure::despecifyFunction): - (JSC::Structure::put): - (JSC::Structure::remove): - * runtime/Structure.h: - (JSC::Structure::get): - (JSC::Structure::specificFunction): - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTableHashTraits::emptyValue): - * wtf/Platform.h: - -2009-05-22 Brent Fulgham - - Reviewed by Steve Falkenburg. - - https://bugs.webkit.org/show_bug.cgi?id=25950 - JavaScriptCore Fails to build on Windows (Cairo) due to CoreFoundation - link requirement. - - Modify project to add new Debug_CFLite and Release_CFLite targets. These - use the new JavaScriptCoreCFLite.vsprops to link against CFLite.dll. - Existing projects are changed to use the new JavaScriptCoreCF.vsprops - to link against CoreFoundation.dll. - - The JavaScriptCoreCommon.vsprops is modified to remove the link - against CoreFoundation.dll. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - -2009-05-22 Dominik Röttsches - - Reviewed by Gustavo Noronha. - - https://bugs.webkit.org/show_bug.cgi?id=15914 - [GTK] Implement Unicode functionality using GLib - - Original patch by Jürg Billeter and Naiem Shaik. - Implementing WTF Unicode functionality based on GLib. - - * GNUmakefile.am: - * wtf/unicode/Unicode.h: - * wtf/unicode/glib: Added. - * wtf/unicode/glib/UnicodeGLib.cpp: Added. - (WTF::Unicode::foldCase): - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::direction): - (WTF::Unicode::umemcasecmp): - * wtf/unicode/glib/UnicodeGLib.h: Added. - (WTF::Unicode::): - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::toTitleCase): - (WTF::Unicode::isArabicChar): - (WTF::Unicode::isFormatChar): - (WTF::Unicode::isSeparatorSpace): - (WTF::Unicode::isPrintableChar): - (WTF::Unicode::isDigit): - (WTF::Unicode::isPunct): - (WTF::Unicode::mirroredChar): - (WTF::Unicode::category): - (WTF::Unicode::isLower): - (WTF::Unicode::digitValue): - (WTF::Unicode::combiningClass): - (WTF::Unicode::decompositionType): - * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added. - -2009-05-21 Xan Lopez - - Unreviewed build fix. - - Add MacroAssemblerCodeRef.h to file list. - - * GNUmakefile.am: - -2009-05-21 Gavin Barraclough - - Reviewed by Darin Adler. - Addition of MacroAssemblerCodeRef.h rubber stamped by Geoff Garen. - - Refactor JIT code-handle objects. The representation of generated code is currently - a bit of a mess. We have a class JITCode which wraps the pointer to a block of - generated code, but this object does not reference the executable pool meaning that - external events (the pool being derefed) could make the pointer become invalid. - To overcome this both the JIT and Yarr implement further (and similar) objects to - wrap the code pointer with a RefPtr to the pool. To add to the mire, as well as the - CodeBlock containing a handle onto the code the FunctionBodyNode also contains a - copy of the code pointer which is used almost (but not entirely) uniquely to access - the JIT code for a function. - - Rationalization of all this: - - * Add a new type 'MacroAssembler::CodeRef' as a handle for a block of JIT generated code. - * Change the JIT & Yarr to internally handle code using CodeRefs. - * Move the CodeRef (formerly anow defunct JITCodeRef) from CodeBlock to its owner node. - * Remove the (now) redundant code pointer from FunctionBodyNode. - - While tidying this up I've made the PatchBuffer return code in new allocations using a CodeRef, - and have enforced an interface that the PatchBuffer will always be used, and 'finalizeCode()' or - 'finalizeCodeAddendum()' will always be called exactly once on the PatchBuffer to complete code generation. - - This gives us a potentially useful hook ('PatchBuffer::performFinalization()') at the end of generation, - which may have a number of uses. It may be helpful should we wish to switch our generation - model to allow RW/RX exclusive memory, and it may be useful on non-cache-coherent platforms to - give us an oportunity to cache flush as necessary. - - No performance impact. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToTrampoline): - (JSC::AbstractMacroAssembler::CodeRef::CodeRef): - (JSC::AbstractMacroAssembler::CodeRef::trampolineAt): - (JSC::AbstractMacroAssembler::PatchBuffer::PatchBuffer): - (JSC::AbstractMacroAssembler::PatchBuffer::~PatchBuffer): - (JSC::AbstractMacroAssembler::PatchBuffer::link): - (JSC::AbstractMacroAssembler::PatchBuffer::linkTailRecursive): - (JSC::AbstractMacroAssembler::PatchBuffer::patch): - (JSC::AbstractMacroAssembler::PatchBuffer::complete): - (JSC::AbstractMacroAssembler::PatchBuffer::finalize): - (JSC::AbstractMacroAssembler::PatchBuffer::entry): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - (JSC::CodeBlock::setJITCode): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getBytecodeIndex): - (JSC::CodeBlock::executablePool): - * interpreter/CallFrameClosure.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - (JSC::Interpreter::prepareForRepeatCall): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::linkCall): - * jit/JIT.h: - * jit/JITCode.h: - (JSC::JITCode::JITCode): - (JSC::JITCode::operator bool): - (JSC::JITCode::addressForCall): - (JSC::JITCode::offsetOf): - (JSC::JITCode::execute): - (JSC::JITCode::size): - (JSC::JITCode::executablePool): - (JSC::JITCode::HostFunction): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_vm_dontLazyLinkCall): - (JSC::JITStubs::cti_vm_lazyLinkCall): - * parser/Nodes.cpp: - (JSC::ProgramNode::generateJITCode): - (JSC::EvalNode::generateJITCode): - (JSC::FunctionBodyNode::FunctionBodyNode): - (JSC::FunctionBodyNode::createNativeThunk): - (JSC::FunctionBodyNode::generateJITCode): - * parser/Nodes.h: - (JSC::ScopeNode::generatedJITCode): - (JSC::ScopeNode::getExecutablePool): - (JSC::ScopeNode::setJITCode): - (JSC::ProgramNode::jitCode): - (JSC::EvalNode::jitCode): - (JSC::FunctionBodyNode::jitCode): - * runtime/RegExp.cpp: - (JSC::RegExp::match): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::compile): - (JSC::Yarr::jitCompileRegex): - (JSC::Yarr::executeRegex): - * yarr/RegexJIT.h: - (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): - (JSC::Yarr::RegexCodeBlock::pcreFallback): - (JSC::Yarr::RegexCodeBlock::setFallback): - (JSC::Yarr::RegexCodeBlock::operator bool): - (JSC::Yarr::RegexCodeBlock::set): - (JSC::Yarr::RegexCodeBlock::execute): - -2009-05-21 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - REGRESSION: Cached DOM global object property access fails in browser (25921) - - - When caching properties on the global object we need to ensure that we're - not attempting to cache through a shell object. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveGlobal): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_resolve_global): - -2009-05-21 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - -2009-05-21 Cameron Zwarich - - Reviewed by Mark Rowe. - - Bug 25945: Add support for MADV_FREE to TCMalloc - - - - Add support for MADV_FREE to TCMalloc_SystemRelease for platforms that - don't also support MADV_FREE_REUSE. The code is identical to the MADV_DONTNEED - case except for the advice passed to madvise(), so combining the two cases - makes the most sense. - - * wtf/Platform.h: Only define HAVE_MADV_FREE when not building on Tiger or - Leopard, because while it is defined on these platforms it actually does - nothing. - * wtf/TCSystemAlloc.cpp: - (TCMalloc_SystemRelease): use MADV_FREE if it is available; otherwise use - MADV_DONTNEED. - -2009-05-21 Mark Rowe - - Reviewed by Oliver Hunt. - - Fix / . - Bug 25917: REGRESSION (r43559?): Javascript debugger crashes when pausing page - - The debugger currently retrieves the arguments object from an activation rather than pulling - it from a call frame. This is unreliable to due to the recent optimization to lazily create - the arguments object. In the long-term it should stop doing that (), - but for now we force eager creation of the arguments object when debugging. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - -2009-05-21 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 25912: Harden NumberPrototype.cpp by removing use of strcpy() - - - This causes no change on SunSpider. - - * runtime/NumberPrototype.cpp: - (JSC::integerPartNoExp): replace strcpy() with memcpy(), ASSERT that the - temporary buffer has sufficient space to store the result, and move the - explicit null-termination closer to the memcpy() for easier visual inspection - of the code. - (JSC::fractionalPartToString): replace strcpy() with memcpy(), and ASSERT - that the temporary buffer has sufficient space to store the result. There - is no explicit null-termination because this is done by the caller. The - same is already true for exponentialPartToString(). - (JSC::numberProtoFuncToExponential): replace strcpy() with memcpy(), explicitly - null-terminate the result, and ASSERT that the temporary buffer has sufficient - space to store the result. - -2009-05-20 Sam Weinig - - Reviewed by Cameron Zwarich. - - Cleanup the JSGlobalData when exiting early with the usage statement in jsc. - - * jsc.cpp: - (printUsageStatement): - (parseArguments): - (jscmain): - -2009-05-20 Stephanie Lewis - - Update the order files. Generate new order files. - - * JavaScriptCore.order: - -2009-05-19 Kenneth Rohde Christiansen - - Reviewed by Simon Hausmann. - - Replace WREC with YARR + YARR_JIT for the Qt port. This is only - used when compiled with JIT support for now, so it is a drop-in - replacement for the WREC usage. Still including the wrec headers - as they are being referred from RegExp.h, though the contents of - that header it protected by "#if ENABLE(WREC)". - - * JavaScriptCore.pri: - -2009-05-20 Xan Lopez - - Reviewed by Eric Seidel. - - Fix GTK debug build. - - The function dumpDisjunction, compiled with debug enabled, uses - printf, which needs stdio.h to be included. - - * yarr/RegexInterpreter.cpp: - -2009-05-20 Laszlo Gombos - - Reviewed by George Staikos. - - BUG 25843: [Qt] Remove qt-port build flag - - - * JavaScriptCore.pro: - - -2009-05-19 Geoffrey Garen - - Windows build fix. - - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::releaseExcessCapacity): Copy-paste typo. - -2009-05-19 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed CrashTracer: [USER] 1 crash in Install - Mac OS X at • 0x9274241c - - (Original patch by Joe Sokol and Ronnie Misra.) - - SunSpider says 1.004x faster. - - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::releaseExcessCapacity): Instead of doing complicated - math that sometimes used to overflow, just release the full range of the - register file. - - * interpreter/RegisterFile.h: - (JSC::isPageAligned): - (JSC::RegisterFile::RegisterFile): Added ASSERTs to verify that it's - safe to release the full range of the register file. - - (JSC::RegisterFile::shrink): No need to releaseExcessCapacity() if the - new end is not smaller than the old end. (Also, doing so used to cause - numeric overflow, unmapping basically the whole process from memory.) - -2009-05-19 Oliver Hunt - - RS=Mark Rowe. - - REGRESSION: Start Debugging JavaScript crashes browser (nightly builds only?) - - - Remove JSC_FAST_CALL as it wasn't gaining us anything, and was - resulting in weird bugs in the nightly builds. - - * parser/Nodes.cpp: - * parser/Nodes.h: - (JSC::ExpressionNode::isNumber): - (JSC::ExpressionNode::isString): - (JSC::ExpressionNode::isNull): - (JSC::ExpressionNode::isPure): - (JSC::ExpressionNode::isLocation): - (JSC::ExpressionNode::isResolveNode): - (JSC::ExpressionNode::isBracketAccessorNode): - (JSC::ExpressionNode::isDotAccessorNode): - (JSC::ExpressionNode::isFuncExprNode): - (JSC::ExpressionNode::isSimpleArray): - (JSC::ExpressionNode::isAdd): - (JSC::ExpressionNode::resultDescriptor): - (JSC::StatementNode::firstLine): - (JSC::StatementNode::lastLine): - (JSC::StatementNode::isEmptyStatement): - (JSC::StatementNode::isReturnNode): - (JSC::StatementNode::isExprStatement): - (JSC::StatementNode::isBlock): - (JSC::NullNode::isNull): - (JSC::BooleanNode::isPure): - (JSC::NumberNode::value): - (JSC::NumberNode::setValue): - (JSC::NumberNode::isNumber): - (JSC::NumberNode::isPure): - (JSC::StringNode::isPure): - (JSC::StringNode::isString): - (JSC::ResolveNode::identifier): - (JSC::ResolveNode::isLocation): - (JSC::ResolveNode::isResolveNode): - (JSC::BracketAccessorNode::isLocation): - (JSC::BracketAccessorNode::isBracketAccessorNode): - (JSC::DotAccessorNode::base): - (JSC::DotAccessorNode::identifier): - (JSC::DotAccessorNode::isLocation): - (JSC::DotAccessorNode::isDotAccessorNode): - (JSC::TypeOfResolveNode::identifier): - (JSC::AddNode::isAdd): - (JSC::BlockNode::isBlock): - (JSC::EmptyStatementNode::isEmptyStatement): - (JSC::ExprStatementNode::isExprStatement): - (JSC::ReturnNode::isReturnNode): - (JSC::ScopeNode::sourceURL): - (JSC::ProgramNode::bytecode): - (JSC::EvalNode::bytecode): - (JSC::FunctionBodyNode::parameters): - (JSC::FunctionBodyNode::toSourceString): - (JSC::FunctionBodyNode::bytecode): - (JSC::FuncExprNode::isFuncExprNode): - -2009-05-19 Maciej Stachowiak - - Reviewed by Gavin Barraclough. - - - speed up string comparison, especially for short strings - - ~1% on SunSpider - - * JavaScriptCore.exp: - * runtime/UString.cpp: - * runtime/UString.h: - (JSC::operator==): Inline UString's operator==, since it is called from - hot places in the runtime. Also, specialize 2-char strings in a similar way to - 1-char, since we're taking the hit of a switch anyway. - -2009-05-18 Maciej Stachowiak - - Reviewed by Gavin Barraclough. - - - for polymorphic prototype lookups, increase the number of slots from 4 to 8 - - ~4% faster on v8 raytrace benchmark - - * bytecode/Instruction.h: - -2009-05-18 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - - tighten up the code for the load_varargs stub - - ~1-2% on v8-raytrace - - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_load_varargs): Hoist some loop invariants that - the compiler didn't feel like hoisting for us. Remove unneeded exception check. - -2009-05-18 Maciej Stachowiak - - Reviewed by Geoff Garen. - - - Improve code generation for access to prototype properties - - ~0.4% speedup on SunSpider. - - Based on a suggestion from Geoff Garen. - - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - -2009-05-18 Gustavo Noronha Silva - - Reviewed by Gavin Barraclough. - - Enable YARR, and disable WREC for GTK+. - - * GNUmakefile.am: - * yarr/RegexParser.h: - -2009-05-18 Jan Michael Alonzo - - Reviewed by Xan Lopez. - - [Gtk] Various autotools build refactoring and fixes - https://bugs.webkit.org/show_bug.cgi?id=25286 - - Add -no-install and -no-fast-install to programs and tests that we - don't install. Also remove -O2 since this is already handled at - configure time. - - * GNUmakefile.am: - -2009-05-17 Jan Michael Alonzo - - Reviewed by Xan Lopez. - - [Gtk] Various autotools build refactoring and fixes - https://bugs.webkit.org/show_bug.cgi?id=25286 - - Add JavaScriptCore/ to JSC include path only since it's not - required when building WebCore. - - * GNUmakefile.am: - -2009-05-17 Steve Falkenburg - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore.make: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2009-05-15 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Looking like MSVC doesn't like static variables in inline methods? - Make the state of the SSE2 check a static variable on the class - MacroAssemblerX86Common as a speculative build fix for Windows. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::convertInt32ToDouble): - (JSC::MacroAssemblerX86Common::branchDouble): - (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32): - (JSC::MacroAssemblerX86Common::isSSE2Present): - (JSC::MacroAssemblerX86Common::): - * jit/JIT.cpp: - -2009-05-15 Adam Roben - - Add some assembler headers to JavaScriptCore.vcproj - - This is just a convenience for Windows developers. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2009-05-15 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Add FP support to the MacroAssembler, port JITArithmetic over to make use of this. Also add - API to determine whether FP support is available 'MacroAssembler::supportsFloatingPoint()', - FP is presently only supported on SSE2 platforms, not x87. On platforms where a suitable - hardware FPU is not available 'supportsFloatingPoint()' may simply return false, and all - other methods ASSERT_NOT_REACHED(). - - * assembler/AbstractMacroAssembler.h: - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::MacroAssemblerX86): - (JSC::MacroAssemblerX86::branch32): - (JSC::MacroAssemblerX86::branchPtrWithPatch): - (JSC::MacroAssemblerX86::supportsFloatingPoint): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::): - (JSC::MacroAssemblerX86Common::loadDouble): - (JSC::MacroAssemblerX86Common::storeDouble): - (JSC::MacroAssemblerX86Common::addDouble): - (JSC::MacroAssemblerX86Common::subDouble): - (JSC::MacroAssemblerX86Common::mulDouble): - (JSC::MacroAssemblerX86Common::convertInt32ToDouble): - (JSC::MacroAssemblerX86Common::branchDouble): - (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32): - (JSC::MacroAssemblerX86Common::branch32): - (JSC::MacroAssemblerX86Common::branch16): - (JSC::MacroAssemblerX86Common::branchTest32): - (JSC::MacroAssemblerX86Common::branchAdd32): - (JSC::MacroAssemblerX86Common::branchMul32): - (JSC::MacroAssemblerX86Common::branchSub32): - (JSC::MacroAssemblerX86Common::set32): - (JSC::MacroAssemblerX86Common::setTest32): - (JSC::MacroAssemblerX86Common::x86Condition): - (JSC::MacroAssemblerX86Common::isSSE2Present): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::movePtrToDouble): - (JSC::MacroAssemblerX86_64::moveDoubleToPtr): - (JSC::MacroAssemblerX86_64::setPtr): - (JSC::MacroAssemblerX86_64::branchPtr): - (JSC::MacroAssemblerX86_64::branchTestPtr): - (JSC::MacroAssemblerX86_64::branchAddPtr): - (JSC::MacroAssemblerX86_64::branchSubPtr): - (JSC::MacroAssemblerX86_64::supportsFloatingPoint): - * assembler/X86Assembler.h: - * jit/JIT.cpp: - (JSC::JIT::JIT): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_rshift): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::compileBinaryArithOp): - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::emit_op_add): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - -2009-05-15 Francisco Tolmasky - - BUG 25467: JavaScript debugger should use function.displayName as the function's name in the call stack - - - Reviewed by Adam Roben. - - * JavaScriptCore.exp: Added calculatedFunctionName - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Added calculatedFunctionName - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added calculatedFunctionName - * debugger/DebuggerCallFrame.cpp: Added calculatedFunctionName to match existing one in ProfileNode. - (JSC::DebuggerCallFrame::calculatedFunctionName): - * debugger/DebuggerCallFrame.h: Added calculatedFunctionName to match existing one in ProfileNode. - -2009-05-14 Gavin Barraclough - - Build fix, not reviewed. - - Quick fixes for JIT builds with OPTIMIZE flags disabled. - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compilePutByIdHotPath): - -2009-05-14 Steve Falkenburg - - Back out incorrect Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore.make: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2009-05-14 Steve Falkenburg - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore.make: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2009-05-14 Adam Roben - - Windows jsc build fix - - r43648 modified jsc.vcproj's post-build event not to try to copy files - that aren't present. Then r43661 mistakenly un-did that modification. - This patch restores the modification from r43648, but puts the code in - jscCommon.vsprops (where it should have been added in r43648). - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Restored empty - VCPostBuildEventTool tags. - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Modified the post-build - event command line to match the one in jsc.vcproj from r43648. - -2009-05-14 Laszlo Gombos - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=25325 - - Make sure pthread_self() is declared before it gets called in Collector.cpp - - * runtime/Collector.cpp: Include pthread.h in most Unix-like platforms - (not just for OPENBSD) - -2009-05-14 Mark Rowe - - Reviewed by Oliver Hunt. - - Fix . - Bug 25785: Segfault in mark when using JSObjectMakeConstructor - - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): OpaqueJSClass::prototype can return 0. We need to use the default object prototype when it does. - * API/tests/testapi.c: - (main): Add a test case. - * runtime/JSObject.h: - (JSC::JSObject::putDirect): Add a clearer assertion for a null value. The assertion on the next line does catch this, - but the cause of the failure is not clear from the assertion itself. - -2009-05-14 Mark Rowe - - Rubber-stamped by Darin Adler. - - When building with Xcode 3.1.3 should be using gcc 4.2 - - The meaning of XCODE_VERSION_ACTUAL is more sensible in newer versions of Xcode. - Update our logic to select the compiler version to use the more appropriate XCODE_VERSION_MINOR - if the version of Xcode supports it, and fall back to XCODE_VERSION_ACTUAL if not. - - * Configurations/Base.xcconfig: - -2009-05-14 Gavin Barraclough - - Reviewed by Geoff Garen. - - Checking register file bounds should be a ptr comparison (m_end is a Register*). - Also, the compare should be unsigned, pointers don'ts go negative. - - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - -2009-05-13 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Fix REGRESSION: page at Metroauto site crashes in cti_op_loop_if_less (25730) - - op_loop_if_less (imm < op) was loading op into regT1, but in the slow path spills regT0. - This leads to bad happen. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emitSlow_op_loop_if_less): - -2009-05-13 Dmitry Titov - - Rubber-stamped by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=25746 - Revert http://trac.webkit.org/changeset/43507 which caused crash in PPC nightlies with Safari 4. - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * bytecode/SamplingTool.cpp: - (JSC::SamplingThread::start): - (JSC::SamplingThread::stop): - * bytecode/SamplingTool.h: - * wtf/CrossThreadRefCounted.h: - (WTF::CrossThreadRefCounted::CrossThreadRefCounted): - (WTF::::ref): - (WTF::::deref): - * wtf/Threading.h: - * wtf/ThreadingNone.cpp: - * wtf/ThreadingPthreads.cpp: - (WTF::threadMapMutex): - (WTF::initializeThreading): - (WTF::threadMap): - (WTF::identifierByPthreadHandle): - (WTF::establishIdentifierForPthreadHandle): - (WTF::pthreadHandleForIdentifier): - (WTF::clearPthreadHandleForIdentifier): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::detachThread): - (WTF::currentThread): - * wtf/ThreadingWin.cpp: - (WTF::threadMapMutex): - (WTF::initializeThreading): - (WTF::threadMap): - (WTF::storeThreadHandleByIdentifier): - (WTF::threadHandleForIdentifier): - (WTF::clearThreadHandleForIdentifier): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::detachThread): - (WTF::currentThread): - * wtf/gtk/ThreadingGtk.cpp: - (WTF::threadMapMutex): - (WTF::initializeThreading): - (WTF::threadMap): - (WTF::identifierByGthreadHandle): - (WTF::establishIdentifierForThread): - (WTF::threadForIdentifier): - (WTF::clearThreadForIdentifier): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::currentThread): - * wtf/qt/ThreadingQt.cpp: - (WTF::threadMapMutex): - (WTF::threadMap): - (WTF::identifierByQthreadHandle): - (WTF::establishIdentifierForThread): - (WTF::clearThreadForIdentifier): - (WTF::threadForIdentifier): - (WTF::initializeThreading): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::currentThread): - -2009-05-13 Darin Adler - - Revert the parser arena change. It was a slowdown, not a speedup. - Better luck next time (I'll break it up into pieces). - -2009-05-13 Darin Adler - - Tiger build fix. - - * parser/Grammar.y: Add back empty code blocks, needed by older - versions of bison on certain rules. - -2009-05-13 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - -2009-05-13 Adam Roben - - Windows build fixes after r43642 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - Updated. - - * debugger/Debugger.cpp: - * runtime/ArrayConstructor.cpp: - * runtime/JSArray.cpp: - * runtime/RegExp.cpp: - * runtime/RegExpConstructor.cpp: - * runtime/RegExpPrototype.cpp: - * runtime/StringPrototype.cpp: - Added missing #includes. - -2009-05-13 Darin Adler - - Reviewed by Cameron Zwarich. - - Bug 25674: syntax tree nodes should use arena allocation - https://bugs.webkit.org/show_bug.cgi?id=25674 - - Step 3: Add some actual arena allocation. About 1% SunSpider speedup. - - * JavaScriptCore.exp: Updated. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): Updated since VarStack - contains const Identifier* now. - (JSC::BytecodeGenerator::emitPushNewScope): Updated to take a const - Identifier&. - * bytecompiler/BytecodeGenerator.h: Ditto - - * bytecompiler/SegmentedVector.h: Added isEmpty. - - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): Moved this function here from - WebCore so WebCore doesn't need the details of FunctionBodyNode. - * debugger/Debugger.h: Ditto. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): Updated since VarStack contains const - Identifier* now. - - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_vm_lazyLinkCall): Call isHostFunction on the body - rather than on the function object, since we can't easily have inlined - access to the FunctionBodyNode in JSFunction.h since WebCore needs - access to that header. - (JSC::JITStubs::cti_op_construct_JSConstruct): Ditto. - * profiler/Profiler.cpp: - (JSC::Profiler::createCallIdentifier): Ditto. - - * parser/Grammar.y: Use JSGlobalData* to pass the global data pointer - around whenever possible instead of using void*. Changed - SET_EXCEPTION_LOCATION from a macro to an inline function. Marked - the structure-creating functions inline. Changed the VarStack to use - identifier pointers instead of actual identifiers. This takes - advantage of the fact that all identifier pointers come from the - arena and avoids reference count churn. Changed Identifier* to - const Identifier* to make sure we don't modify any by accident. - Used identifiers for regular expression strings too, using the new - scanRegExp that has out parameters instead of the old one that relied - on side effects in the Lexer. Move the creation of numeric identifiers - out of this file and into the PropertyNode constructor. - - * parser/Lexer.cpp: - (JSC::Lexer::setCode): Pass in ParserArena, used for identifiers. - (JSC::Lexer::makeIdentifier): Changed return type to const Identifier* - and changed to call ParserArena. - (JSC::Lexer::scanRegExp): Added out arguments that are const Identifier* - as well as a prefix character argument so we can handle the /= case - without a string append. - (JSC::Lexer::skipRegExp): Added. Skips a regular expression without - allocating Identifier objects. - (JSC::Lexer::clear): Removed the code to manage m_identifiers, m_pattern, - and m_flags, and added code to set m_arena to 0. - * parser/Lexer.h: Updated for changes above. - - * parser/NodeConstructors.h: - (JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable - on the arena. - (JSC::ParserArenaDeletable::operator new): Changed to call the - allocateDeletable function on the arena instead of deleteWithArena. - (JSC::RegExpNode::RegExpNode): Changed arguments to Identifier instead - of UString since these come from the parser which makes identifiers. - (JSC::PropertyNode::PropertyNode): Added new constructor that makes - numeric identifiers. Some day we might want to optimize this for - integers so it doesn't create a string for each one. - (JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier - since it's now a const Identifier& so it can't be left uninitialized. - (JSC::BreakNode::BreakNode): Ditto. - (JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements* - to keep track of the statements rather than a separate statement vector. - (JSC::BlockNode::BlockNode): Ditto. - (JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier. - - * parser/Nodes.cpp: Moved the comment explaining emitBytecode in here. - It seemed strangely out of place in the header. - (JSC::ThrowableExpressionData::emitThrowError): Added an overload for - UString as well as Identifier. - (JSC::SourceElements::singleStatement): Added. - (JSC::SourceElements::lastStatement): Added. - (JSC::RegExpNode::emitBytecode): Updated since the pattern and flags - are now Identifier instead of UString. Also changed the throwError code - to use the substitution mechanism instead of doing a string append. - (JSC::SourceElements::emitBytecode): Added. Replaces the old - statementListEmitCode function, since we now keep the SourceElements - objects around. - (JSC::BlockNode::lastStatement): Added. - (JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of - statementListEmitCode. - (JSC::CaseClauseNode::emitBytecode): Added. - (JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode - instead of statementListEmitCode. - (JSC::ScopeNodeData::ScopeNodeData): Changed to store the - SourceElements* instead of using releaseContentsIntoVector. - (JSC::ScopeNode::emitStatementsBytecode): Added. - (JSC::ScopeNode::singleStatement): Added. - (JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead - of statementListEmitCode. - (JSC::EvalNode::emitBytecode): Ditto. - (JSC::EvalNode::generateBytecode): Removed code to clear the children - vector. This optimization is no longer possible since everything is in - a single arena. - (JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode - insetad of statementListEmitCode and check for the return node using - the new functions. - - * parser/Nodes.h: Changed VarStack to store const Identifier* instead - of Identifier and rely on the arena to control lifetime. Added a new - ParserArenaFreeable class. Made ParserArenaDeletable inherit from - FastAllocBase instead of having its own operator new. Base the Node - class on ParserArenaFreeable. Changed the various Node classes - to use const Identifier& instead of Identifier to avoid the need to - call their destructors and allow them to function as "freeable" in the - arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions. - Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode, - CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable - as a base class since they do not descend from Node. Eliminated the - StatementVector type and instead have various classes use SourceElements* - instead of StatementVector. This prevents those classes from having th - use ParserArenaDeletable to make sure the vector destructor is called. - - * parser/Parser.cpp: - (JSC::Parser::parse): Pass the arena to the lexer. - - * parser/Parser.h: Added an include of ParserArena.h, which is no longer - included by Nodes.h. - - * parser/ParserArena.cpp: - (JSC::ParserArena::ParserArena): Added. Initializes the new members, - m_freeableMemory, m_freeablePoolEnd, and m_identifiers. - (JSC::ParserArena::freeablePool): Added. Computes the pool pointer, - since we store only the current pointer and the end of pool pointer. - (JSC::ParserArena::deallocateObjects): Added. Contains the common - memory-deallocation logic used by both the destructor and the - reset function. - (JSC::ParserArena::~ParserArena): Changed to call deallocateObjects. - (JSC::ParserArena::reset): Ditto. Also added code to zero out the - new structures, and switched to use clear() instead of shrink(0) since - we don't really reuse arenas. - (JSC::ParserArena::makeNumericIdentifier): Added. - (JSC::ParserArena::allocateFreeablePool): Added. Used when the pool - is empty. - (JSC::ParserArena::isEmpty): Added. No longer inline, which is fine - since this is used only for assertions at the moment. - - * parser/ParserArena.h: Added an actual arena of "freeable" objects, - ones that don't need destructors to be called. Also added the segmented - vector of identifiers that used to be in the Lexer. - - * runtime/FunctionConstructor.cpp: - (JSC::extractFunctionBody): Use singleStatement function rather than - getting at a StatementVector. - - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): Call isHostFunction on the body - rather than the function object. - - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): Moved the structure version of this in - here from the header. It's not hot enough that it needs to be inlined. - (JSC::JSFunction::isHostFunction): Moved this in here from the header. - It's now a helper to be used only within the class. - (JSC::JSFunction::setBody): Moved this in here. It's not hot enough that - it needs to be inlined, and we want to be able to compile the header - without the definition of FunctionBodyNode. - - * runtime/JSFunction.h: Eliminated the include of "Nodes.h". This was - exposing too much JavaScriptCore dependency to WebCore. Because of this - change and some changes made to WebCore, we could now export a lot fewer - headers from JavaScriptCore, but I have not done that yet in this check-in. - Made a couple functions non-inline. Removes some isHostFunction() assertions. - - * wtf/FastAllocBase.h: Added the conventional using statements we use in - WTF so we can use identifiers from the WTF namespace without explicit - namespace qualification or namespace directive. This is the usual WTF style, - although it's unconventional in the C++ world. We use the namespace primarily - for link-time disambiguation, not compile-time. - - * wtf/FastMalloc.cpp: Fixed an incorrect comment. - -2009-05-13 Xan Lopez - - Unreviewed build fix: add JITStubCall.h to files list. - - * GNUmakefile.am: - -2009-05-13 Ariya Hidayat - - Unreviewed build fix, as suggested by Yael Aharon . - - * wtf/qt/ThreadingQt.cpp: - (WTF::waitForThreadCompletion): renamed IsValid to isValid. - -2009-05-13 Jan Michael Alonzo - - Revert r43562 - [Gtk] WTF_USE_JSC is already defined in - WebCore/config.h. - - * wtf/Platform.h: - -2009-05-12 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Add SamplingCounter tool to provide a simple mechanism for counting events in JSC - (enabled using ENABLE(SAMPLING_COUNTERS)). To count events within a single function - use the class 'SamplingCounter', where the counter may be incremented from multiple - functions 'GlobalSamplingCounter' may be convenient; all other counters (stack or - heap allocated, rather than statically declared) should use the DeletableSamplingCounter. - Further description of these classes is provided alongside their definition in - SamplingTool.h. - - Counters may be incremented from c++ by calling the 'count()' method on the counter, - or may be incremented by JIT code by using the 'emitCount()' method within the JIT. - - This patch also fixes CODEBLOCK_SAMPLING, which was missing a null pointer check. - - * JavaScriptCore.exp: - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::addWithCarry32): - (JSC::MacroAssemblerX86::and32): - (JSC::MacroAssemblerX86::or32): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::and32): - (JSC::MacroAssemblerX86Common::or32): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::and32): - (JSC::MacroAssemblerX86_64::or32): - (JSC::MacroAssemblerX86_64::addPtr): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::adcl_im): - (JSC::X86Assembler::addq_im): - (JSC::X86Assembler::andl_im): - (JSC::X86Assembler::orl_im): - * bytecode/SamplingTool.cpp: - (JSC::AbstractSamplingCounter::dump): - * bytecode/SamplingTool.h: - (JSC::AbstractSamplingCounter::count): - (JSC::GlobalSamplingCounter::name): - (JSC::SamplingCounter::SamplingCounter): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::): - * jit/JITInlineMethods.h: - (JSC::JIT::setSamplingFlag): - (JSC::JIT::clearSamplingFlag): - (JSC::JIT::emitCount): - * jsc.cpp: - (runWithScripts): - * parser/Nodes.cpp: - (JSC::ScopeNode::ScopeNode): - * wtf/Platform.h: - -2009-05-13 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore.make: - -2009-05-12 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore.make: - -2009-05-12 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Crash occurs at JSC::Interpreter::execute() when loading http://www.sears.com - - We created the arguments objects before an op_push_scope but not - before op_push_new_scope, this meant a null arguments object could - be resolved inside catch blocks. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitPushNewScope): - -2009-05-12 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Crash occurs at JSC::JSActivation::mark() when loading http://www.monster.com; http://www.cnet.com - Crash loading www.google.dk/ig (and other igoogle's as well) - - Following on from the lazy arguments creation patch, it's now - possible for an activation to to have a null register in the callframe - so we can't just blindly mark the local registers in an activation, - and must null check first instead. - - * API/tests/testapi.c: - (functionGC): - * API/tests/testapi.js: - (bludgeonArguments.return.g): - (bludgeonArguments): - * runtime/JSActivation.cpp: - (JSC::JSActivation::mark): - -2009-05-12 Gavin Barraclough - - Rubber stamped by Geoff Garen. - - WTF_USE_CTI_REPATCH_PIC is no longer used, remove. - - * jit/JIT.h: - * jit/JITStubCall.h: - -2009-05-12 Gavin Barraclough - - Reviewed by Maciej Stachowiak. - - We've run into some problems where changing the size of the class JIT leads to - performance fluctuations. Try forcing alignment in an attempt to stabalize this. - - * jit/JIT.h: - -2009-05-12 Kevin Ollivier - - wx build fix. Add ParserArena.cpp to the build. - - * JavaScriptCoreSources.bkl: - -2009-05-12 Oliver Hunt - - Reviewed by Geoff Garen. - - Unsigned underflow on 64bit cannot be treated as a negative number - - This code included some placeswhere we deliberately create negative offsets - from unsigned values, on 32bit this is "safe", but in 64bit builds much - badness occurs. Solution is to use signed types as nature intended. - - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_load_varargs): - -2009-05-12 Jan Michael Alonzo - - Reviewed by Holger Freyther. - - [Gtk] Various autotools build refactoring and fixes - https://bugs.webkit.org/show_bug.cgi?id=25286 - - Define WTF_USE_JSC for the Gtk port. - - * wtf/Platform.h: - -2009-05-12 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - - allow all of strictEqual to be inlined into cti_op_stricteq once again - - We had this optimization once but accidentally lost it at some point. - - * runtime/Operations.h: - (JSC::JSValue::strictEqualSlowCaseInline): - (JSC::JSValue::strictEqual): - -2009-05-12 Gavin Barraclough - - Reviewed by Oliver Hunt. - - instanceof should throw if the constructor being tested does not implement - 'HasInstance" (i.e. is a function). Instead we were returning false. - - * interpreter/Interpreter.cpp: - (JSC::isInvalidParamForIn): - (JSC::isInvalidParamForInstanceOf): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_instanceof): - * tests/mozilla/ecma_2/instanceof/instanceof-003.js: - Fix broken test case. - * tests/mozilla/ecma_2/instanceof/regress-7635.js: - Remove broken test case (was an exact duplicate of a test in instanceof-003.js). - -2009-05-12 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Improve function call forwarding performance - - Make creation of the Arguments object occur lazily, so it - is not necessarily created for every function that references - it. Then add logic to Function.apply to allow it to avoid - allocating the Arguments object at all. Helps a lot with - the function forwarding/binding logic in jQuery, Prototype, - and numerous other JS libraries. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::registerFor): - (JSC::BytecodeGenerator::willResolveToArguments): - (JSC::BytecodeGenerator::uncheckedRegisterForArguments): - (JSC::BytecodeGenerator::createArgumentsIfNecessary): - (JSC::BytecodeGenerator::emitCallEval): - (JSC::BytecodeGenerator::emitPushScope): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_create_arguments): - (JSC::JIT::emit_op_init_arguments): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_tear_off_arguments): - (JSC::JITStubs::cti_op_load_varargs): - * parser/Nodes.cpp: - (JSC::ApplyFunctionCallDotNode::emitBytecode): - -2009-05-11 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Enable use of SamplingFlags directly from JIT code. - - * bytecode/SamplingTool.h: - * jit/JIT.h: - (JSC::JIT::sampleCodeBlock): - (JSC::JIT::sampleInstruction): - * jit/JITInlineMethods.h: - (JSC::JIT::setSamplingFlag): - (JSC::JIT::clearSamplingFlag): - -2009-05-11 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Implement JIT generation for instanceof for non-objects (always returns false). - Also fixes the sequencing of the prototype and value isObject checks, to no match the spec. - - 0.5% progression on v8 tests overall, due to 3.5% on early-boyer. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * runtime/JSObject.cpp: - (JSC::JSObject::hasInstance): - * runtime/TypeInfo.h: - (JSC::TypeInfo::TypeInfo): - -2009-05-11 Geoffrey Garen - - Reviewed by Sam Weinig. - - A little more JIT refactoring. - - Rearranged code to more clearly indicate what's conditionally compiled - and why. Now, all shared code is at the top of our JIT files, and all - #if'd code is at the bottom. #if'd code is delineated by large comments. - - Moved functions that relate to the JIT but don't explicitly do codegen - into JIT.cpp. Refactored SSE2 check to store its result as a data member - in the JIT. - - * jit/JIT.cpp: - (JSC::isSSE2Present): - (JSC::JIT::JIT): - (JSC::JIT::unlinkCall): - (JSC::JIT::linkCall): - * jit/JIT.h: - (JSC::JIT::isSSE2Present): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCallVarargsSlowCase): - -2009-05-11 Holger Hans Peter Freyther - - Build fix. - - * JavaScriptCore.pri: Build the new JITOpcodes.cpp - -2009-05-11 Sam Weinig - - Reviewed by Geoffrey Garen. - - More re-factoring of JIT code generation. Use a macro to - forward the main switch-statement cases to the helper functions. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - -2009-05-11 Sam Weinig - - Reviewed by Geoffrey Garen. - - More re-factoring of JIT code generation to move opcode generation - to helper functions outside the main switch-statement and gave those - helper functions standardized names. This patch covers the remaining - slow cases. - - * jit/JIT.cpp: - * jit/JIT.h: - * jit/JITOpcodes.cpp: - -2009-05-11 Geoffrey Garen - - Build fix. - - * GNUmakefile.am: Added JITOpcodes.cpp and JITStubCall.h to the project. - -2009-05-11 Geoffrey Garen - - Build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added - JITOpcodes.cpp and JITStubCall.h to the project. - -2009-05-11 Geoffrey Garen - - Reviewed by Sam Weinig. - - Some JIT refactoring. - - Moved JITStubCall* into its own header. - - Modified JITStubCall to ASSERT that its return value is handled correctly. - Also, replaced function template with explicit instantiations to resolve - some confusion. - - Replaced all uses of emit{Get,Put}CTIArgument with explicit peeks, pokes, - and calls to killLastResultRegister(). - - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompile): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - * jit/JITCall.cpp: - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReference): - * jit/JITPropertyAccess.cpp: - * jit/JITStubCall.h: Copied from jit/JIT.h. - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::addArgument): - (JSC::JITStubCall::call): - (JSC::JITStubCall::): - -2009-05-11 Sam Weinig - - Reviewed by Geoffrey Garen. - - Start re-factoring JIT code generation to move opcode generation - to helper functions outside the main switch-statement and gave those - helper functions standardized names. This patch only covers the main - pass and all the arithmetic opcodes in the slow path. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - * jit/JITOpcodes.cpp: Copied from jit/JIT.cpp. - * jit/JITPropertyAccess.cpp: - -2009-05-11 Steve Falkenburg - - Re-add experimental PGO configs. - - Reviewed by Adam Roben. - - * JavaScriptCore.vcproj/JavaScriptCore.make: - * JavaScriptCore.vcproj/JavaScriptCore.sln: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - -2009-05-11 Sam Weinig - - Reviewed by Geoffrey "1" Garen. - - Rip out the !USE(CTI_REPATCH_PIC) code. It was untested and unused. - - * jit/JIT.h: - (JSC::JIT::compileGetByIdChainList): - (JSC::JIT::compileGetByIdChain): - (JSC::JIT::compileCTIMachineTrampolines): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::JITStubs::tryCachePutByID): - (JSC::JITStubs::tryCacheGetByID): - -2009-05-11 Dmitry Titov - - GTK build fix - the deprecated waitForThreadCompletion is not needed on GTK. - - * wtf/ThreadingPthreads.cpp: used #ifdef PLATFORM(DARWIN) around waitForThreadCompletion(). - -2009-05-11 Adam Roben - - Build fix for newer versions of GCC - - * wtf/ThreadingPthreads.cpp: Added a declaration of - waitForThreadCompletion before its definition to silence a warning. - -2009-05-11 Dmitry Titov - - Reviewed by Alexey Proskuryakov and Adam Roben. - - https://bugs.webkit.org/show_bug.cgi?id=25348 - Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap. - - * wtf/Threading.h: - (WTF::ThreadIdentifier::ThreadIdentifier): - (WTF::ThreadIdentifier::isValid): - (WTF::ThreadIdentifier::invalidate): - (WTF::ThreadIdentifier::platformId): - ThreadIdentifier is now a class, containing a PlatformThreadIdentifier and - methods that are used across the code on thread ids: construction, comparisons, - check for 'valid' state etc. '0' is used as invalid id, which happens to just work - with all platform-specific thread id implementations. - - All the following files repeatedly reflect the new ThreadIdentifier for each platform. - We remove ThreadMap and threadMapMutex from all of them, remove the functions that - populated/searched/cleared the map and add platform-specific comparison operators - for ThreadIdentifier. - - There are specific temporary workarounds for Safari 4 beta on OSX and Win32 since the - public build uses WTF threading functions with old type of ThreadingIdentifier. - The next time Safari 4 is rebuilt, it will 'automatically' pick up the new type and new - functions so the deprecated ones can be removed. - - * wtf/gtk/ThreadingGtk.cpp: - (WTF::ThreadIdentifier::operator==): - (WTF::ThreadIdentifier::operator!=): - (WTF::initializeThreading): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::currentThread): - - * wtf/ThreadingNone.cpp: - (WTF::ThreadIdentifier::operator==): - (WTF::ThreadIdentifier::operator!=): - - * wtf/ThreadingPthreads.cpp: - (WTF::ThreadIdentifier::operator==): - (WTF::ThreadIdentifier::operator!=): - (WTF::initializeThreading): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::detachThread): - (WTF::currentThread): - (WTF::waitForThreadCompletion): This is a workaround for Safari 4 beta on Mac. - Safari 4 is linked against old definition of ThreadIdentifier so it treats it as uint32_t. - This 'old' variant of waitForThreadCompletion takes uint32_t and has the old decorated name, so Safari can - load it from JavaScriptCore library. The other functions (CurrentThread() etc) happen to match their previous - decorated names and, while they return pthread_t now, it is a pointer which round-trips through a uint32_t. - This function will be removed as soon as Safari 4 will release next public build. - - * wtf/qt/ThreadingQt.cpp: - (WTF::ThreadIdentifier::operator==): - (WTF::ThreadIdentifier::operator!=): - (WTF::initializeThreading): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::currentThread): - - * wtf/ThreadingWin.cpp: - (WTF::ThreadIdentifier::operator==): - (WTF::ThreadIdentifier::operator!=): - (WTF::initializeThreading): - (WTF::createThreadInternal): All the platforms (except Windows) used a sequential - counter as a thread ID and mapped it into platform ID. Windows was using native thread - id and mapped it into thread handle. Since we can always obtain a thread handle - by thread id, createThread now closes the handle. - (WTF::waitForThreadCompletion): obtains another one using OpenThread(id) API. If can not obtain a handle, - it means the thread already exited. - (WTF::detachThread): - (WTF::currentThread): - (WTF::detachThreadDeprecated): old function, renamed (for Win Safari 4 beta which uses it for now). - (WTF::waitForThreadCompletionDeprecated): same. - (WTF::currentThreadDeprecated): same. - (WTF::createThreadDeprecated): same. - - * bytecode/SamplingTool.h: - * bytecode/SamplingTool.cpp: Use DEFINE_STATIC_LOCAL for a static ThreadIdentifier variable, to avoid static constructor. - - * JavaScriptCore.exp: export lists - updated decorated names of the WTF threading functions - since they now take a different type as a parameter. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: ditto for Windows, plus added "deprecated" functions - that take old parameter type - turns out public beta of Safari 4 uses those, so they need to be kept along for a while. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: ditto. - -2009-05-11 Darin Adler - - Reviewed by Oliver Hunt. - - Bug 25560: REGRESSION (r34821): "string value".__proto__ gets the wrong object. - https://bugs.webkit.org/show_bug.cgi?id=25560 - rdar://problem/6861069 - - I missed this case back a year ago when I sped up handling - of JavaScript wrappers. Easy to fix. - - * runtime/JSObject.h: - (JSC::JSValue::get): Return the prototype itself if the property name - is __proto__. - * runtime/JSString.cpp: - (JSC::JSString::getOwnPropertySlot): Ditto. - -2009-05-09 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Rename emitGetFromCallFrameHeader to emitGetFromCallFrameHeaderPtr - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::emitGetFromCallFrameHeaderPtr): - (JSC::JIT::emitGetFromCallFrameHeader32): - -2009-05-11 Holger Hans Peter Freyther - - Unreviewed build fix. Build ParserAreana.cpp for Qt - - * JavaScriptCore.pri: - -2009-05-11 Norbert Leser - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=24536 - - Symbian compilers cannot resolve WTF::PassRefPtr - unless Profile.h is included. - - * profiler/ProfileGenerator.h: - -2009-05-11 Csaba Osztrogonac - - Reviewed by Holger Freyther. - - https://bugs.webkit.org/show_bug.cgi?id=24284 - - * JavaScriptCore.pri: coding style modified - * jsc.pro: duplicated values removed from INCLUDEPATH, DEFINES - -2009-05-11 Gustavo Noronha Silva - - Reviewed by NOBODY (build fix). - - Also add ParserArena, in addition to AllInOne, for release builds, - since adding it to AllInOne breaks Mac. - - * GNUmakefile.am: - -2009-05-11 Gustavo Noronha Silva - - Unreviewed build fix. Adding ParserArena to the autotools build. - - * GNUmakefile.am: - -2009-05-11 Adam Roben - - More Windows build fixes after r43479 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - Export ParserArena::reset. - -2009-05-11 Adam Roben - - Windows build fixes after r43479 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added - ParserArena to the project. - - * parser/NodeConstructors.h: Added a missing include. - (JSC::ParserArenaDeletable::operator new): Marked these as inline. - -2009-05-10 Maciej Stachowiak - - Reviewed by Geoff Garen. - - - fixed REGRESSION(r43432): Many JavaScriptCore tests crash in 64-bit - https://bugs.webkit.org/show_bug.cgi?id=25680 - - Accound for the 64-bit instruction prefix when rewriting mov to lea on 64-bit. - - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - -2009-05-10 Darin Adler - - Reviewed by Cameron Zwarich. - - Bug 25674: syntax tree nodes should use arena allocation - https://bugs.webkit.org/show_bug.cgi?id=25674 - - Part two: Remove reference counting from most nodes. - - * JavaScriptCore.exp: Updated. - - * JavaScriptCore.xcodeproj/project.pbxproj: Added ParserArena.h and .cpp. - - * parser/Grammar.y: Replaced uses of ParserRefCountedData with uses of - ParserArenaData. Took out now-nonfunctional code that tries to manually - release declaration list. Changed the new calls that create FuncDeclNode - and FuncExprNode so that they use the proper version of operator new for - the reference-counted idiom, not the deletion idiom. - - * parser/NodeConstructors.h: - (JSC::ParserArenaDeletable::operator new): Added. - (JSC::ParserArenaRefCounted::ParserArenaRefCounted): Added. - (JSC::Node::Node): Removed ParserRefCounted initializer. - (JSC::ElementNode::ElementNode): Ditto. - (JSC::PropertyNode::PropertyNode): Ditto. - (JSC::ArgumentsNode::ArgumentsNode): Ditto. - (JSC::SourceElements::SourceElements): Ditto. - (JSC::ParameterNode::ParameterNode): Ditto. - (JSC::FuncExprNode::FuncExprNode): Added ParserArenaRefCounted initializer. - (JSC::FuncDeclNode::FuncDeclNode): Ditto. - (JSC::CaseClauseNode::CaseClauseNode): Removed ParserRefCounted initializer. - (JSC::ClauseListNode::ClauseListNode): Ditto. - (JSC::CaseBlockNode::CaseBlockNode): Ditto. - - * parser/NodeInfo.h: Replaced uses of ParserRefCountedData with uses of - ParserArenaData. - - * parser/Nodes.cpp: - (JSC::ScopeNode::ScopeNode): Added ParserArenaRefCounted initializer. - (JSC::ProgramNode::create): Use the proper version of operator new for - the reference-counted idiom, not the deletion idiom. Use the arena - contains function instead of the vecctor find function. - (JSC::EvalNode::create): Use the proper version of operator new for - the reference-counted idiom, not the deletion idiom. Use the arena - reset function instead of the vector shrink function. - (JSC::FunctionBodyNode::createNativeThunk): Use the proper version - of operator new for the reference-counted idiom, not the deletion idiom. - (JSC::FunctionBodyNode::create): More of the same. - - * parser/Nodes.h: Added ParserArenaDeletable and ParserArenaRefCounted - to replace ParserRefCounted. Fixed inheritance so only the classes that - need reference counting inherit from ParserArenaRefCounted. - - * parser/Parser.cpp: - (JSC::Parser::parse): Set m_sourceElements to 0 since it now starts - uninitialized. Just set it to 0 again in the failure case, since it's - now just a raw pointer, not an owning one. - (JSC::Parser::reparseInPlace): Removed now-unneeded get() function. - (JSC::Parser::didFinishParsing): Replaced uses of ParserRefCountedData - with uses of ParserArenaData. - - * parser/Parser.h: Less RefPtr, more arena. - - * parser/ParserArena.cpp: Added. - * parser/ParserArena.h: Added. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::~JSGlobalData): Removed arena-related code, since it's - now in the Parser. - (JSC::JSGlobalData::createLeaked): Removed unneeded #ifndef. - (JSC::JSGlobalData::createNativeThunk): Tweaked #if a bit. - - * runtime/JSGlobalData.h: Removed parserArena, which is now in Parser. - - * wtf/RefCounted.h: Added deletionHasBegun function, for use in - assertions to catch deletion not done by the deref function. - -2009-05-10 David Kilzer - - Part 2: Try to fix the Windows build by adding a symbol which is really just a re-mangling of a changed method signature - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-10 David Kilzer - - Try to fix the Windows build by removing an unknown symbol - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-10 David Kilzer - - Touch Nodes.cpp to try to fix Windows build - - * parser/Nodes.cpp: Removed whitespace. - -2009-05-10 Darin Adler - - Reviewed by Maciej Stachowiak. - - Quick fix for failures seen on buildbot. Maciej plans a better fix later. - - * wtf/dtoa.cpp: Change the hardcoded number of 32-bit words in a BigInt - from 32 to 64. Parsing "1e500", for example, requires more than 32 words. - -2009-05-10 Darin Adler - - Reviewed by Sam Weinig. - - Bug 25674: syntax tree nodes should use arena allocation - Part one: Change lifetimes so we won't have to use reference - counting so much, but don't eliminate the reference counts - entirely yet. - - * JavaScriptCore.exp: Updated. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): Update for use of raw pointers - instead of RefPtr. - (JSC::BytecodeGenerator::emitCall): Ditto. - (JSC::BytecodeGenerator::emitConstruct): Ditto. - - * parser/Grammar.y: Update node creating code to use new (JSGlobalData*) - instead of the plain new. At the moment this is just a hook for future - arena allocation; it's inline and JSGlobalData* is not used. - - * parser/NodeConstructors.h: Updated for name change of parserObjects to - parserArena. Also added explicit initialization for raw pointers that used - to be RefPtr. Also removed some uses of get() that aren't needed now that - the pointers are raw pointers. Also eliminated m_parameter from FuncExprNode - and FuncDeclNode. Also changed node-creating code to use new (JSGlobalData*) - as above. - - * parser/Nodes.cpp: Eliminated NodeReleaser and all use of it. - (JSC::ParserRefCounted::ParserRefCounted): Updated for name change of - parserObjects to parserArena. - (JSC::SourceElements::append): Use raw pointers. - (JSC::ArrayNode::emitBytecode): Ditto. - (JSC::ArrayNode::isSimpleArray): Ditto. - (JSC::ArrayNode::toArgumentList): Ditto. - (JSC::ObjectLiteralNode::emitBytecode): Ditto. - (JSC::PropertyListNode::emitBytecode): Ditto. - (JSC::BracketAccessorNode::emitBytecode): Ditto. - (JSC::DotAccessorNode::emitBytecode): Ditto. - (JSC::ArgumentListNode::emitBytecode): Ditto. - (JSC::NewExprNode::emitBytecode): Ditto. - (JSC::EvalFunctionCallNode::emitBytecode): Ditto. - (JSC::FunctionCallValueNode::emitBytecode): Ditto. - (JSC::FunctionCallResolveNode::emitBytecode): Ditto. - (JSC::FunctionCallBracketNode::emitBytecode): Ditto. - (JSC::FunctionCallDotNode::emitBytecode): Ditto. - (JSC::CallFunctionCallDotNode::emitBytecode): Ditto. - (JSC::ApplyFunctionCallDotNode::emitBytecode): Ditto. - (JSC::PostfixBracketNode::emitBytecode): Ditto. - (JSC::PostfixDotNode::emitBytecode): Ditto. - (JSC::DeleteBracketNode::emitBytecode): Ditto. - (JSC::DeleteDotNode::emitBytecode): Ditto. - (JSC::DeleteValueNode::emitBytecode): Ditto. - (JSC::VoidNode::emitBytecode): Ditto. - (JSC::TypeOfValueNode::emitBytecode): Ditto. - (JSC::PrefixBracketNode::emitBytecode): Ditto. - (JSC::PrefixDotNode::emitBytecode): Ditto. - (JSC::UnaryOpNode::emitBytecode): Ditto. - (JSC::BinaryOpNode::emitStrcat): Ditto. - (JSC::BinaryOpNode::emitBytecode): Ditto. - (JSC::EqualNode::emitBytecode): Ditto. - (JSC::StrictEqualNode::emitBytecode): Ditto. - (JSC::ReverseBinaryOpNode::emitBytecode): Ditto. - (JSC::ThrowableBinaryOpNode::emitBytecode): Ditto. - (JSC::InstanceOfNode::emitBytecode): Ditto. - (JSC::LogicalOpNode::emitBytecode): Ditto. - (JSC::ConditionalNode::emitBytecode): Ditto. - (JSC::ReadModifyResolveNode::emitBytecode): Ditto. - (JSC::AssignResolveNode::emitBytecode): Ditto. - (JSC::AssignDotNode::emitBytecode): Ditto. - (JSC::ReadModifyDotNode::emitBytecode): Ditto. - (JSC::AssignBracketNode::emitBytecode): Ditto. - (JSC::ReadModifyBracketNode::emitBytecode): Ditto. - (JSC::CommaNode::emitBytecode): Ditto. - (JSC::ConstDeclNode::emitCodeSingle): Ditto. - (JSC::ConstDeclNode::emitBytecode): Ditto. - (JSC::ConstStatementNode::emitBytecode): Ditto. - (JSC::statementListEmitCode): Ditto. - (JSC::BlockNode::emitBytecode): Ditto. - (JSC::ExprStatementNode::emitBytecode): Ditto. - (JSC::VarStatementNode::emitBytecode): Ditto. - (JSC::IfNode::emitBytecode): Ditto. - (JSC::IfElseNode::emitBytecode): Ditto. - (JSC::DoWhileNode::emitBytecode): Ditto. - (JSC::WhileNode::emitBytecode): Ditto. - (JSC::ForNode::emitBytecode): Ditto. - (JSC::ForInNode::emitBytecode): Ditto. - (JSC::ReturnNode::emitBytecode): Ditto. - (JSC::WithNode::emitBytecode): Ditto. - (JSC::CaseBlockNode::tryOptimizedSwitch): Ditto. - (JSC::CaseBlockNode::emitBytecodeForBlock): Ditto. - (JSC::SwitchNode::emitBytecode): Ditto. - (JSC::LabelNode::emitBytecode): Ditto. - (JSC::ThrowNode::emitBytecode): Ditto. - (JSC::TryNode::emitBytecode): Ditto. - (JSC::ScopeNodeData::ScopeNodeData): Use swap to transfer ownership - of the arena, varStack and functionStack. - (JSC::ScopeNode::ScopeNode): Pass in the arena when creating the - ScopeNodeData. - (JSC::ProgramNode::ProgramNode): Made this inline since it's used - in only one place. - (JSC::ProgramNode::create): Changed this to return a PassRefPtr since - we plan to have the scope nodes be outside the arena, so they will need - some kind of ownership transfer (maybe auto_ptr instead of PassRefPtr - in the future, though). Remove the node from the newly-created arena to - avoid a circular reference. Later we'll keep the node out of the arena - by using a different operator new, but for now it's the ParserRefCounted - constructor that puts the node into the arena, and there's no way to - bypass that. - (JSC::EvalNode::EvalNode): Ditto. - (JSC::EvalNode::create): Ditto. - (JSC::FunctionBodyNode::FunctionBodyNode): Ditto. - (JSC::FunctionBodyNode::createNativeThunk): Moved the code that - reseets the arena here instead of the caller. - (JSC::FunctionBodyNode::create): Same change as the other create - functions above. - (JSC::FunctionBodyNode::emitBytecode): Use raw pointers. - - * parser/Nodes.h: Removed NodeReleaser. Changed FunctionStack to - use raw pointers. Removed the releaseNodes function. Added an override - of operator new that takes a JSGlobalData* to prepare for future arena use. - Use raw pointers instead of RefPtr everywhere possible. - - * parser/Parser.cpp: - (JSC::Parser::reparseInPlace): Pass the arena in. - - * parser/Parser.h: - (JSC::Parser::parse): Updated for name change of parserObjects to parserArena. - (JSC::Parser::reparse): Ditto. - * runtime/FunctionConstructor.cpp: - (JSC::extractFunctionBody): Ditto. - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::~JSGlobalData): Ditto. - (JSC::JSGlobalData::createNativeThunk): Moved arena manipulation into the - FunctionBodyNode::createNativeThunk function. - - * runtime/JSGlobalData.h: Tweaked formatting and renamed parserObjects to - parserArena. - - * wtf/NotFound.h: Added the usual "using WTF" to this header to match the - rest of WTF. - -2009-05-10 Dimitri Glazkov - - Reviewed by Geoffrey Garen. - - https://bugs.webkit.org/show_bug.cgi?id=25670 - Remove no longer valid chunk of code from dtoa. - - * wtf/dtoa.cpp: - (WTF::dtoa): Removed invalid code. - -2009-05-10 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - "Class const *" is the same as "const Class*", use the latter syntax consistently. - - See . - - * pcre/pcre_compile.cpp: - (calculateCompiledPatternLength): - * runtime/JSObject.h: - (JSC::JSObject::offsetForLocation): - (JSC::JSObject::locationForOffset): - -2009-05-10 Maciej Stachowiak - - Reviewed by Alexey Proskuryakov. - - - speedup dtoa/strtod - - Added a bunch of inlining, and replaced malloc with stack allocation. - - 0.5% SunSpider speedup (7% on string-tagcloud). - - * runtime/NumberPrototype.cpp: - (JSC::integerPartNoExp): - (JSC::numberProtoFuncToExponential): - * runtime/UString.cpp: - (JSC::concatenate): - (JSC::UString::from): - * wtf/dtoa.cpp: - (WTF::BigInt::BigInt): - (WTF::BigInt::operator=): - (WTF::Balloc): - (WTF::Bfree): - (WTF::multadd): - (WTF::s2b): - (WTF::i2b): - (WTF::mult): - (WTF::pow5mult): - (WTF::lshift): - (WTF::cmp): - (WTF::diff): - (WTF::b2d): - (WTF::d2b): - (WTF::ratio): - (WTF::strtod): - (WTF::quorem): - (WTF::freedtoa): - (WTF::dtoa): - * wtf/dtoa.h: - -2009-05-09 Mike Hommey - - Reviewed by Geoffrey Garen. Landed by Jan Alonzo. - - Enable JIT on x86-64 gtk+ - https://bugs.webkit.org/show_bug.cgi?id=24724 - - * GNUmakefile.am: - -2009-05-09 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Removed the last non-call-related manually managed JIT stub call. - - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArithSlow_op_rshift): Fully use the JITStubCall - abstraction, instead of emitPutJITStubArg. - -2009-05-09 Sebastian Andrzej Siewior - - Reviewed by Gustavo Noronha. - - https://bugs.webkit.org/show_bug.cgi?id=25653 - PLATFORM(X86_64) inherits ia64 - - __ia64__ is defined by gcc in an IA64 arch and has completely - nothing in common with X86-64 exept both are from Intel and have - an 64bit address space. That's it. Since code seems to expect x86 - here, ia64 has to go. - - * wtf/Platform.h: - -2009-05-09 Gustavo Noronha Silva - - Suggested by Geoffrey Garen. - - Assume SSE2 is present on X86-64 and on MAC X86-32. This fixes a - build breakage on non-Mac X86-64 when JIT is enabled. - - * jit/JITArithmetic.cpp: - -2009-05-09 Gustavo Noronha Silva - - Build fix, adding missing files to make dist. - - * GNUmakefile.am: - -2009-05-09 Geoffrey Garen - - Windows build fix. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::patchLoadToLEA): - -2009-05-09 Geoffrey Garen - - Windows build fix. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::patchLoadToLEA): - -2009-05-09 Maciej Stachowiak - - Reviewed by Gavin Barraclough. - - Original patch by John McCall. Updated by Cameron Zwarich. Further refined by me. - - - Assorted speedups to property access - - ~.3%-1% speedup on SunSpider - - 1) When we know from the structure ID that an object is using inline storage, plant direct - loads and stores against it; no need to indirect through storage pointer. - - 2) Also because of the above, union the property storage pointer with the first inline property - slot and add an extra inline property slot. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::CodeLocationInstruction::CodeLocationInstruction): - (JSC::AbstractMacroAssembler::CodeLocationInstruction::patchLoadToLEA): - (JSC::::CodeLocationCommon::instructionAtOffset): - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::storePtr): - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::store32): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::storePtr): - * assembler/X86Assembler.h: - (JSC::X86Assembler::movq_EAXm): - (JSC::X86Assembler::movl_rm): - (JSC::X86Assembler::patchLoadToLEA): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compilePutDirectOffset): - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - * runtime/JSObject.cpp: - (JSC::JSObject::mark): - (JSC::JSObject::removeDirect): - * runtime/JSObject.h: - (JSC::JSObject::propertyStorage): - (JSC::JSObject::getDirect): - (JSC::JSObject::getOffset): - (JSC::JSObject::offsetForLocation): - (JSC::JSObject::locationForOffset): - (JSC::JSObject::getDirectOffset): - (JSC::JSObject::putDirectOffset): - (JSC::JSObject::isUsingInlineStorage): - (JSC::JSObject::): - (JSC::JSObject::JSObject): - (JSC::JSObject::~JSObject): - (JSC::Structure::isUsingInlineStorage): - (JSC::JSObject::putDirect): - (JSC::JSObject::putDirectWithoutTransition): - (JSC::JSObject::allocatePropertyStorageInline): - * runtime/Structure.h: - -2009-05-09 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Changed all our JIT stubs so that they return a maximum of 1 JS value or - two non-JS pointers, and do all other value returning through out - parameters, in preparation for 64bit JS values on a 32bit system. - - Stubs that used to return two JSValues now return one JSValue and take - and out parameter specifying where in the register array the second - value should go. - - SunSpider reports no change. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArithSlow_op_post_inc): - (JSC::JIT::compileFastArithSlow_op_post_dec): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_call_arityCheck): - (JSC::JITStubs::cti_op_resolve_func): - (JSC::JITStubs::cti_op_post_inc): - (JSC::JITStubs::cti_op_resolve_with_base): - (JSC::JITStubs::cti_op_post_dec): - * jit/JITStubs.h: - (JSC::): - -2009-05-08 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed CrashTracer: [REGRESSION] >400 crashes - in Safari at com.apple.JavaScriptCore • JSC::BytecodeGenerator::emitComplexJumpScopes + 468 - https://bugs.webkit.org/show_bug.cgi?id=25658 - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitComplexJumpScopes): Guard the whole loop - with a bounds check. The old loop logic would decrement and read topScope - without a bounds check, which could cause crashes on page boundaries. - -2009-05-08 Jan Michael Alonzo - - Reviewed by NOBODY (BuildFix). - - Gtk fix: add LiteralParser to the build script per r43424. - - Add LiteralParser to the Qt and Wx build scripts too. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCoreSources.bkl: - -2009-05-08 Oliver Hunt - - Reviewed by Gavin Barraclough and Darin Adler. - - Add a limited literal parser for eval to handle object and array literals fired at eval - - This is a simplified parser and lexer that we can throw at strings passed to eval - in case a site is using eval to parse JSON (eg. json2.js). The lexer is intentionally - limited (in effect it's whitelisting a limited "common" subset of the JSON grammar) - as this decreases the likelihood of us wating time attempting to parse any significant - amount of non-JSON content. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - * runtime/LiteralParser.cpp: Added. - (JSC::isStringCharacter): - (JSC::LiteralParser::Lexer::lex): - (JSC::LiteralParser::Lexer::lexString): - (JSC::LiteralParser::Lexer::lexNumber): - (JSC::LiteralParser::parseStatement): - (JSC::LiteralParser::parseExpression): - (JSC::LiteralParser::parseArray): - (JSC::LiteralParser::parseObject): - (JSC::LiteralParser::StackGuard::StackGuard): - (JSC::LiteralParser::StackGuard::~StackGuard): - (JSC::LiteralParser::StackGuard::isSafe): - * runtime/LiteralParser.h: Added. - (JSC::LiteralParser::LiteralParser): - (JSC::LiteralParser::attemptJSONParse): - (JSC::LiteralParser::): - (JSC::LiteralParser::Lexer::Lexer): - (JSC::LiteralParser::Lexer::next): - (JSC::LiteralParser::Lexer::currentToken): - (JSC::LiteralParser::abortParse): - -2009-05-08 Geoffrey Garen - - Not reviewed. - - Restored a Mozilla JS test I accidentally gutted. - - * tests/mozilla/ecma/Array/15.4.4.2.js: - (getTestCases): - (test): - -2009-05-08 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - More abstraction for JITStub calls from JITed code. - - Added a JITStubCall class that automatically handles things like assigning - arguments to different stack slots and storing return values. Deployed - the class in about a billion places. A bunch more places remain to be - fixed up, but this is a good stopping point for now. - - * jit/JIT.cpp: - (JSC::JIT::emitTimeoutCheck): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::JIT::JSRInfo::JSRInfo): - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::addArgument): - (JSC::JITStubCall::call): - (JSC::JITStubCall::): - (JSC::CallEvalJITStub::CallEvalJITStub): - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArithSlow_op_lshift): - (JSC::JIT::compileFastArithSlow_op_rshift): - (JSC::JIT::compileFastArithSlow_op_jnless): - (JSC::JIT::compileFastArithSlow_op_bitand): - (JSC::JIT::compileFastArithSlow_op_mod): - (JSC::JIT::compileFastArith_op_mod): - (JSC::JIT::compileFastArithSlow_op_post_inc): - (JSC::JIT::compileFastArithSlow_op_post_dec): - (JSC::JIT::compileFastArithSlow_op_pre_inc): - (JSC::JIT::compileFastArithSlow_op_pre_dec): - (JSC::JIT::compileFastArith_op_add): - (JSC::JIT::compileFastArith_op_mul): - (JSC::JIT::compileFastArith_op_sub): - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::compileFastArithSlow_op_add): - (JSC::JIT::compileFastArithSlow_op_mul): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - (JSC::): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdSlowCase): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_resolve_func): - (JSC::JITStubs::cti_op_resolve_with_base): - -2009-05-08 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Add a new opcode jnlesseq, and optimize its compilation in the JIT using - techniques similar to what were used to optimize jnless in r43363. - - This gives a 0.7% speedup on SunSpider, particularly on the tests 3d-cube, - control-flow-recursive, date-format-xparb, and string-base64. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): Add support for dumping op_jnlesseq. - * bytecode/Opcode.h: Add op_jnlesseq to the list of opcodes. - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitJumpIfFalse): Add a peephole optimization - for op_jnlesseq when emitting lesseq followed by a jump. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): Add case for op_jnlesseq. - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): Add case for op_jnlesseq. - (JSC::JIT::privateCompileSlowCases): Add case for op_jnlesseq. - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_jnlesseq): Added. - (JSC::JIT::compileFastArithSlow_op_jnlesseq): Added. - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_jlesseq): Added. - * jit/JITStubs.h: - -2009-05-08 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - fix test failures on 64-bit - - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArithSlow_op_jnless): Avoid accidentaly treating an - immediate int as an immediate float in the 64-bit value representation. - -2009-05-08 Gavin Barraclough - - Rubber stamped by Oliver Hunt. - - Removing an empty constructor and an uncalled, empty function seems to be a - pretty solid 1% regeression on my machine, so I'm going to put them back. - Um. Yeah, this this pretty pointles and makes no sense at all. I officially - lose the will to live in 3... 2... - - * bytecode/SamplingTool.cpp: - (JSC::SamplingTool::notifyOfScope): - * bytecode/SamplingTool.h: - (JSC::SamplingTool::~SamplingTool): - -2009-05-08 Gavin Barraclough - - Reviewed by Oliver "I see lots of ifdefs" Hunt. - - Fix (kinda) for sampling tool breakage. The codeblock sampling tool has become - b0rked due to recent changes in native function calling. The initialization of - a ScopeNode appears to now occur before the sampling tool (or possibly the - interpreter has been brought into existence, wihich leads to crashyness). - - This patch doesn't fix the problem. The crash occurs when tracking a Scope, but - we shouldn't need to track scopes when we're just sampling opcodes, not - codeblocks. Not retaining Scopes when just opcode sampling will reduce sampling - overhead reducing any instrumentation skew, which is a good thing. As a side - benefit this patch also gets the opcode sampling going again, albeit in a bit of - a lame way. Will come back later with a proper fix from codeblock sampling. - - * JavaScriptCore.exp: - * bytecode/SamplingTool.cpp: - (JSC::compareLineCountInfoSampling): - (JSC::SamplingTool::dump): - * bytecode/SamplingTool.h: - (JSC::SamplingTool::SamplingTool): - * parser/Nodes.cpp: - (JSC::ScopeNode::ScopeNode): - -2009-05-07 Mark Rowe - - Rubber-stamped by Oliver Hunt. - - Fix . - Bug 25640: Crash on quit in r43384 nightly build on Leopard w/ Safari 4 beta installed - - Roll out r43366 as it removed symbols that Safari 4 Beta uses. - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * bytecode/SamplingTool.cpp: - (JSC::SamplingThread::start): - (JSC::SamplingThread::stop): - * bytecode/SamplingTool.h: - * wtf/CrossThreadRefCounted.h: - (WTF::CrossThreadRefCounted::CrossThreadRefCounted): - (WTF::::ref): - (WTF::::deref): - * wtf/Threading.h: - * wtf/ThreadingNone.cpp: - * wtf/ThreadingPthreads.cpp: - (WTF::threadMapMutex): - (WTF::initializeThreading): - (WTF::threadMap): - (WTF::identifierByPthreadHandle): - (WTF::establishIdentifierForPthreadHandle): - (WTF::pthreadHandleForIdentifier): - (WTF::clearPthreadHandleForIdentifier): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::detachThread): - (WTF::currentThread): - * wtf/ThreadingWin.cpp: - (WTF::threadMapMutex): - (WTF::initializeThreading): - (WTF::threadMap): - (WTF::storeThreadHandleByIdentifier): - (WTF::threadHandleForIdentifier): - (WTF::clearThreadHandleForIdentifier): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::detachThread): - (WTF::currentThread): - * wtf/gtk/ThreadingGtk.cpp: - (WTF::threadMapMutex): - (WTF::initializeThreading): - (WTF::threadMap): - (WTF::identifierByGthreadHandle): - (WTF::establishIdentifierForThread): - (WTF::threadForIdentifier): - (WTF::clearThreadForIdentifier): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::currentThread): - * wtf/qt/ThreadingQt.cpp: - (WTF::threadMapMutex): - (WTF::threadMap): - (WTF::identifierByQthreadHandle): - (WTF::establishIdentifierForThread): - (WTF::clearThreadForIdentifier): - (WTF::threadForIdentifier): - (WTF::initializeThreading): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::currentThread): - -2009-05-07 Gustavo Noronha Silva - - Suggested by Oliver Hunt. - - Also check for Linux for the special-cased calling convention. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * wtf/Platform.h: - -2009-05-07 Gavin Barraclough - - Reviewed by Maciej Stachowiak. - - Previously, when appending to an existing string and growing the underlying buffer, - we would actually allocate 110% of the required size in order to give us some space - to expand into. Now we treat strings differently based on their size: - - Small Strings (up to 4 pages): - Expand the allocation size to 112.5% of the amount requested. This is largely sicking - to our previous policy, however 112.5% is cheaper to calculate. - - Medium Strings (up to 128 pages): - For pages covering multiple pages over-allocation is less of a concern - any unused - space will not be paged in if it is not used, so this is purely a VM overhead. For - these strings allocate 2x the requested size. - - Large Strings (to infinity and beyond!): - Revert to our 112.5% policy - probably best to limit the amount of unused VM we allow - any individual string be responsible for. - - Additionally, round small allocations up to a multiple of 16 bytes, and medium and - large allocations up to a multiple of page size. - - ~1.5% progression on Sunspider, due to 5% improvement on tagcloud & 15% on validate. - - * runtime/UString.cpp: - (JSC::expandedSize): - -2009-05-07 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed a minor sequencing error introduced by recent Parser speedups. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::createNativeThunk): Missed a spot in my last patch. - -2009-05-07 Geoffrey Garen - - Not reviewed. - - * wtf/Platform.h: Reverted an accidental (and performance-catastrophic) - change. - -2009-05-07 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed a minor sequencing error introduced by recent Parser speedups. - - * parser/Parser.cpp: - (JSC::Parser::reparseInPlace): Missed a spot in my last patch. - -2009-05-07 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed a minor sequencing error introduced by recent Parser speedups. - - * parser/Parser.cpp: - (JSC::Parser::parse): - * parser/Parser.h: - (JSC::Parser::parse): - (JSC::Parser::reparse): Shrink the parsedObjects vector after allocating - the root node, to avoid leaving a stray node in the vector, since that's - a slight memory leak, and it causes problems during JSGlobalData teardown. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::~JSGlobalData): ASSERT that we're not being torn - down while we think we're still parsing, since that would cause lots of - bad memory references during our destruction. - -2009-05-07 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Replaced two more macros with references to the JITStackFrame structure. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReference): - * jit/JITStubs.cpp: - (JSC::): - * jit/JITStubs.h: - -2009-05-07 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Improve native call performance - - Fix the windows build by adding calling convention declarations everywhere, - chose fastcall as that seemed most sensible given we were having to declare - the convention explicitly. In addition switched to fastcall on mac in the - deluded belief that documented fastcall behavior on windows would match - actual its actual behavior. - - * API/JSCallbackFunction.h: - * API/JSCallbackObject.h: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * interpreter/CallFrame.h: - (JSC::ExecState::argumentCount): - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jsc.cpp: - (functionPrint): - (functionDebug): - (functionGC): - (functionVersion): - (functionRun): - (functionLoad): - (functionSetSamplingFlags): - (functionClearSamplingFlags): - (functionReadline): - (functionQuit): - * runtime/ArrayConstructor.cpp: - (JSC::callArrayConstructor): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - (JSC::arrayProtoFuncConcat): - (JSC::arrayProtoFuncPop): - (JSC::arrayProtoFuncPush): - (JSC::arrayProtoFuncReverse): - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSlice): - (JSC::arrayProtoFuncSort): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncReduce): - (JSC::arrayProtoFuncReduceRight): - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/BooleanConstructor.cpp: - (JSC::callBooleanConstructor): - * runtime/BooleanPrototype.cpp: - (JSC::booleanProtoFuncToString): - (JSC::booleanProtoFuncValueOf): - * runtime/CallData.h: - * runtime/DateConstructor.cpp: - (JSC::callDate): - (JSC::dateParse): - (JSC::dateNow): - (JSC::dateUTC): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToLocaleString): - (JSC::dateProtoFuncToLocaleDateString): - (JSC::dateProtoFuncToLocaleTimeString): - (JSC::dateProtoFuncGetTime): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetMilliSeconds): - (JSC::dateProtoFuncGetUTCMilliseconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::dateProtoFuncSetTime): - (JSC::dateProtoFuncSetMilliSeconds): - (JSC::dateProtoFuncSetUTCMilliseconds): - (JSC::dateProtoFuncSetSeconds): - (JSC::dateProtoFuncSetUTCSeconds): - (JSC::dateProtoFuncSetMinutes): - (JSC::dateProtoFuncSetUTCMinutes): - (JSC::dateProtoFuncSetHours): - (JSC::dateProtoFuncSetUTCHours): - (JSC::dateProtoFuncSetDate): - (JSC::dateProtoFuncSetUTCDate): - (JSC::dateProtoFuncSetMonth): - (JSC::dateProtoFuncSetUTCMonth): - (JSC::dateProtoFuncSetFullYear): - (JSC::dateProtoFuncSetUTCFullYear): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): - * runtime/ErrorConstructor.cpp: - (JSC::callErrorConstructor): - * runtime/ErrorPrototype.cpp: - (JSC::errorProtoFuncToString): - * runtime/FunctionConstructor.cpp: - (JSC::callFunctionConstructor): - * runtime/FunctionPrototype.cpp: - (JSC::callFunctionPrototype): - (JSC::functionProtoFuncToString): - (JSC::functionProtoFuncApply): - (JSC::functionProtoFuncCall): - * runtime/JSFunction.h: - (JSC::JSFunction::nativeFunction): - (JSC::JSFunction::setScopeChain): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - (JSC::globalFuncParseInt): - (JSC::globalFuncParseFloat): - (JSC::globalFuncIsNaN): - (JSC::globalFuncIsFinite): - (JSC::globalFuncDecodeURI): - (JSC::globalFuncDecodeURIComponent): - (JSC::globalFuncEncodeURI): - (JSC::globalFuncEncodeURIComponent): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - (JSC::globalFuncJSCPrint): - * runtime/JSGlobalObjectFunctions.h: - * runtime/MathObject.cpp: - (JSC::mathProtoFuncAbs): - (JSC::mathProtoFuncACos): - (JSC::mathProtoFuncASin): - (JSC::mathProtoFuncATan): - (JSC::mathProtoFuncATan2): - (JSC::mathProtoFuncCeil): - (JSC::mathProtoFuncCos): - (JSC::mathProtoFuncExp): - (JSC::mathProtoFuncFloor): - (JSC::mathProtoFuncLog): - (JSC::mathProtoFuncMax): - (JSC::mathProtoFuncMin): - (JSC::mathProtoFuncPow): - (JSC::mathProtoFuncRandom): - (JSC::mathProtoFuncRound): - (JSC::mathProtoFuncSin): - (JSC::mathProtoFuncSqrt): - (JSC::mathProtoFuncTan): - * runtime/NativeErrorConstructor.cpp: - (JSC::callNativeErrorConstructor): - * runtime/NativeFunctionWrapper.h: - * runtime/NumberConstructor.cpp: - (JSC::callNumberConstructor): - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): - (JSC::numberProtoFuncToLocaleString): - (JSC::numberProtoFuncValueOf): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToExponential): - (JSC::numberProtoFuncToPrecision): - * runtime/ObjectConstructor.cpp: - (JSC::callObjectConstructor): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncValueOf): - (JSC::objectProtoFuncHasOwnProperty): - (JSC::objectProtoFuncIsPrototypeOf): - (JSC::objectProtoFuncDefineGetter): - (JSC::objectProtoFuncDefineSetter): - (JSC::objectProtoFuncLookupGetter): - (JSC::objectProtoFuncLookupSetter): - (JSC::objectProtoFuncPropertyIsEnumerable): - (JSC::objectProtoFuncToLocaleString): - (JSC::objectProtoFuncToString): - * runtime/ObjectPrototype.h: - * runtime/RegExpConstructor.cpp: - (JSC::callRegExpConstructor): - * runtime/RegExpObject.cpp: - (JSC::callRegExpObject): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncTest): - (JSC::regExpProtoFuncExec): - (JSC::regExpProtoFuncCompile): - (JSC::regExpProtoFuncToString): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCode): - (JSC::callStringConstructor): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncToString): - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncConcat): - (JSC::stringProtoFuncIndexOf): - (JSC::stringProtoFuncLastIndexOf): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - (JSC::stringProtoFuncSlice): - (JSC::stringProtoFuncSplit): - (JSC::stringProtoFuncSubstr): - (JSC::stringProtoFuncSubstring): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncLocaleCompare): - (JSC::stringProtoFuncBig): - (JSC::stringProtoFuncSmall): - (JSC::stringProtoFuncBlink): - (JSC::stringProtoFuncBold): - (JSC::stringProtoFuncFixed): - (JSC::stringProtoFuncItalics): - (JSC::stringProtoFuncStrike): - (JSC::stringProtoFuncSub): - (JSC::stringProtoFuncSup): - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): - (JSC::stringProtoFuncLink): - * wtf/Platform.h: - -2009-05-07 Geoffrey Garen - - Not reviewed. - - Rolled out a portion of r43352 because it broke 64bit. - - * jit/JITStubs.h: - -2009-05-07 Kevin Ollivier - - Build fix for functions reaturning ThreadIdentifier. - - * wtf/ThreadingNone.cpp: - (WTF::createThreadInternal): - (WTF::currentThread): - -2009-05-07 Maciej Stachowiak - - Reviewed by John Honeycutt. - - - enable optimization case im the last patch that I accidentally had disabled. - - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArithSlow_op_jnless): - -2009-05-07 Dmitry Titov - - Attempt to fix Win build. - - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArithSlow_op_jnless): - -2009-05-07 Dmitry Titov - - Reviewed by Alexey Proskuryakov and Adam Roben. - - https://bugs.webkit.org/show_bug.cgi?id=25348 - Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap. - - * wtf/Threading.h: - (WTF::ThreadIdentifier::ThreadIdentifier): - (WTF::ThreadIdentifier::isValid): - (WTF::ThreadIdentifier::invalidate): - (WTF::ThreadIdentifier::platformId): - ThreadIdentifier is now a class, containing a PlatformThreadIdentifier and - methods that are used across the code on thread ids: construction, comparisons, - check for 'valid' state etc. '0' is used as invalid id, which happens to just work - with all platform-specific thread id implementations. - - All the following files repeatedly reflect the new ThreadIdentifier for each platform. - We remove ThreadMap and threadMapMutex from all of them, remove the functions that - populated/searched/cleared the map and add platform-specific comparison operators - for ThreadIdentifier. - - * wtf/gtk/ThreadingGtk.cpp: - (WTF::ThreadIdentifier::operator==): - (WTF::ThreadIdentifier::operator!=): - (WTF::initializeThreading): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::currentThread): - - * wtf/ThreadingNone.cpp: - (WTF::ThreadIdentifier::operator==): - (WTF::ThreadIdentifier::operator!=): - - * wtf/ThreadingPthreads.cpp: - (WTF::ThreadIdentifier::operator==): - (WTF::ThreadIdentifier::operator!=): - (WTF::initializeThreading): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::detachThread): - (WTF::currentThread): - - * wtf/qt/ThreadingQt.cpp: - (WTF::ThreadIdentifier::operator==): - (WTF::ThreadIdentifier::operator!=): - (WTF::initializeThreading): - (WTF::createThreadInternal): - (WTF::waitForThreadCompletion): - (WTF::currentThread): - - * wtf/ThreadingWin.cpp: - (WTF::ThreadIdentifier::operator==): - (WTF::ThreadIdentifier::operator!=): - (WTF::initializeThreading): - (WTF::createThreadInternal): All the platforms (except Windows) used a sequential - counter as a thread ID and mapped it into platform ID. Windows was using native thread - id and mapped it into thread handle. Since we can always obtain a thread handle - by thread id, createThread now closes the handle. - (WTF::waitForThreadCompletion): obtains another one using OpenThread(id) API. If can not obtain a handle, - it means the thread already exited. - (WTF::detachThread): - (WTF::currentThread): - (WTF::detachThreadDeprecated): old function, renamed (for Win Safari 4 beta which uses it for now). - (WTF::waitForThreadCompletionDeprecated): same. - (WTF::currentThreadDeprecated): same. - (WTF::createThreadDeprecated): same. - - * bytecode/SamplingTool.h: - * bytecode/SamplingTool.cpp: Use DEFINE_STATIC_LOCAL for a static ThreadIdentifier variable, to avoid static constructor. - - * JavaScriptCore.exp: export lists - updated the WTF threading functions decorated names - since they now take a different type as a parameter. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: ditto for Windows, plus added "deprecated" functions - that take old parameter type - turns out public beta of Safari 4 uses those, so they need to be kept along for a while. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: ditto. - -2009-05-07 Maciej Stachowiak - - Reviewed by Sam Weinig. - - - optimize various cases of branch-fused less - - 1% speedup on SunSpider overall - 13% speedup on math-cordic - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - op_loop_if_less: Optimize case of constant as first operand, just as case of constant as - second operand. - op_jnless: Factored out into compileFastArith_op_jnless. - (JSC::JIT::privateCompileSlowCases): - op_jnless: Factored out into compileFastArithSlow_op_jnless. - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_jnless): Factored out from main compile loop. - - Generate inline code for comparison of constant immediate int as first operand to another - immediate int, as for loop_if_less - - (JSC::JIT::compileFastArithSlow_op_jnless): - - Generate inline code for comparing two floating point numbers. - - Generate code for both cases of comparing a floating point number to a constant immediate - int. - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): Fix dumping of op_jnless (tangentially related bugfix). - -2009-05-07 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added the return address of a stub function to the JITStackFrame abstraction. - - * jit/JIT.cpp: - * jit/JIT.h: - * jit/JITStubs.cpp: - (JSC::): - (JSC::StackHack::StackHack): - (JSC::StackHack::~StackHack): - (JSC::returnToThrowTrampoline): - (JSC::JITStubs::cti_op_convert_this): - (JSC::JITStubs::cti_op_end): - (JSC::JITStubs::cti_op_add): - (JSC::JITStubs::cti_op_pre_inc): - (JSC::JITStubs::cti_timeout_check): - (JSC::JITStubs::cti_register_file_check): - (JSC::JITStubs::cti_op_loop_if_less): - (JSC::JITStubs::cti_op_loop_if_lesseq): - (JSC::JITStubs::cti_op_new_object): - (JSC::JITStubs::cti_op_put_by_id_generic): - (JSC::JITStubs::cti_op_get_by_id_generic): - (JSC::JITStubs::cti_op_put_by_id): - (JSC::JITStubs::cti_op_put_by_id_second): - (JSC::JITStubs::cti_op_put_by_id_fail): - (JSC::JITStubs::cti_op_get_by_id): - (JSC::JITStubs::cti_op_get_by_id_second): - (JSC::JITStubs::cti_op_get_by_id_self_fail): - (JSC::JITStubs::cti_op_get_by_id_proto_list): - (JSC::JITStubs::cti_op_get_by_id_proto_list_full): - (JSC::JITStubs::cti_op_get_by_id_proto_fail): - (JSC::JITStubs::cti_op_get_by_id_array_fail): - (JSC::JITStubs::cti_op_get_by_id_string_fail): - (JSC::JITStubs::cti_op_instanceof): - (JSC::JITStubs::cti_op_del_by_id): - (JSC::JITStubs::cti_op_mul): - (JSC::JITStubs::cti_op_new_func): - (JSC::JITStubs::cti_op_call_JSFunction): - (JSC::JITStubs::cti_op_call_arityCheck): - (JSC::JITStubs::cti_vm_dontLazyLinkCall): - (JSC::JITStubs::cti_vm_lazyLinkCall): - (JSC::JITStubs::cti_op_push_activation): - (JSC::JITStubs::cti_op_call_NotJSFunction): - (JSC::JITStubs::cti_op_create_arguments): - (JSC::JITStubs::cti_op_create_arguments_no_params): - (JSC::JITStubs::cti_op_tear_off_activation): - (JSC::JITStubs::cti_op_tear_off_arguments): - (JSC::JITStubs::cti_op_profile_will_call): - (JSC::JITStubs::cti_op_profile_did_call): - (JSC::JITStubs::cti_op_ret_scopeChain): - (JSC::JITStubs::cti_op_new_array): - (JSC::JITStubs::cti_op_resolve): - (JSC::JITStubs::cti_op_construct_JSConstruct): - (JSC::JITStubs::cti_op_construct_NotJSConstruct): - (JSC::JITStubs::cti_op_get_by_val): - (JSC::JITStubs::cti_op_get_by_val_string): - (JSC::JITStubs::cti_op_get_by_val_byte_array): - (JSC::JITStubs::cti_op_resolve_func): - (JSC::JITStubs::cti_op_sub): - (JSC::JITStubs::cti_op_put_by_val): - (JSC::JITStubs::cti_op_put_by_val_array): - (JSC::JITStubs::cti_op_put_by_val_byte_array): - (JSC::JITStubs::cti_op_lesseq): - (JSC::JITStubs::cti_op_loop_if_true): - (JSC::JITStubs::cti_op_load_varargs): - (JSC::JITStubs::cti_op_negate): - (JSC::JITStubs::cti_op_resolve_base): - (JSC::JITStubs::cti_op_resolve_skip): - (JSC::JITStubs::cti_op_resolve_global): - (JSC::JITStubs::cti_op_div): - (JSC::JITStubs::cti_op_pre_dec): - (JSC::JITStubs::cti_op_jless): - (JSC::JITStubs::cti_op_not): - (JSC::JITStubs::cti_op_jtrue): - (JSC::JITStubs::cti_op_post_inc): - (JSC::JITStubs::cti_op_eq): - (JSC::JITStubs::cti_op_lshift): - (JSC::JITStubs::cti_op_bitand): - (JSC::JITStubs::cti_op_rshift): - (JSC::JITStubs::cti_op_bitnot): - (JSC::JITStubs::cti_op_resolve_with_base): - (JSC::JITStubs::cti_op_new_func_exp): - (JSC::JITStubs::cti_op_mod): - (JSC::JITStubs::cti_op_less): - (JSC::JITStubs::cti_op_neq): - (JSC::JITStubs::cti_op_post_dec): - (JSC::JITStubs::cti_op_urshift): - (JSC::JITStubs::cti_op_bitxor): - (JSC::JITStubs::cti_op_new_regexp): - (JSC::JITStubs::cti_op_bitor): - (JSC::JITStubs::cti_op_call_eval): - (JSC::JITStubs::cti_op_throw): - (JSC::JITStubs::cti_op_get_pnames): - (JSC::JITStubs::cti_op_next_pname): - (JSC::JITStubs::cti_op_push_scope): - (JSC::JITStubs::cti_op_pop_scope): - (JSC::JITStubs::cti_op_typeof): - (JSC::JITStubs::cti_op_is_undefined): - (JSC::JITStubs::cti_op_is_boolean): - (JSC::JITStubs::cti_op_is_number): - (JSC::JITStubs::cti_op_is_string): - (JSC::JITStubs::cti_op_is_object): - (JSC::JITStubs::cti_op_is_function): - (JSC::JITStubs::cti_op_stricteq): - (JSC::JITStubs::cti_op_to_primitive): - (JSC::JITStubs::cti_op_strcat): - (JSC::JITStubs::cti_op_nstricteq): - (JSC::JITStubs::cti_op_to_jsnumber): - (JSC::JITStubs::cti_op_in): - (JSC::JITStubs::cti_op_push_new_scope): - (JSC::JITStubs::cti_op_jmp_scopes): - (JSC::JITStubs::cti_op_put_by_index): - (JSC::JITStubs::cti_op_switch_imm): - (JSC::JITStubs::cti_op_switch_char): - (JSC::JITStubs::cti_op_switch_string): - (JSC::JITStubs::cti_op_del_by_val): - (JSC::JITStubs::cti_op_put_getter): - (JSC::JITStubs::cti_op_put_setter): - (JSC::JITStubs::cti_op_new_error): - (JSC::JITStubs::cti_op_debug): - (JSC::JITStubs::cti_vm_throw): - * jit/JITStubs.h: - (JSC::JITStackFrame::returnAddressSlot): - -2009-05-07 Darin Adler - - Reviewed by Geoff Garen. - - * parser/Lexer.cpp: - (JSC::Lexer::lex): Fix missing braces. This would make us always - take the slower case for string parsing and Visual Studio correctly - noticed unreachable code. - -2009-05-07 Darin Adler - - Reviewed by Sam Weinig. - - Bug 25589: goto instead of state machine in lexer - https://bugs.webkit.org/show_bug.cgi?id=25589 - - SunSpider is 0.8% faster. - - * parser/Lexer.cpp: - (JSC::Lexer::currentCharacter): Added. - (JSC::Lexer::currentOffset): Changed to call currentCharacter for clarity. - (JSC::Lexer::setCode): Removed code to set now-obsolete m_skipLineEnd. - (JSC::Lexer::shiftLineTerminator): Added. Handles line numbers and the - two-character line terminators. - (JSC::Lexer::makeIdentifier): Changed to take characters and length rather - than a vector, since we now make these directly out of the source buffer - when possible. - (JSC::Lexer::lastTokenWasRestrKeyword): Added. - (JSC::isNonASCIIIdentStart): Broke out the non-inline part. - (JSC::isIdentStart): Moved here. - (JSC::isNonASCIIIdentPart): Broke out the non-inline part. - (JSC::isIdentPart): Moved here. - (JSC::singleEscape): Moved here, and removed some unneeded cases. - (JSC::Lexer::record8): Moved here. - (JSC::Lexer::record16): Moved here. - (JSC::Lexer::lex): Rewrote this whole function to use goto and not use - a state machine. Got rid of most of the local variables. Also rolled the - matchPunctuator function in here. - (JSC::Lexer::scanRegExp): Changed to use the new version of isLineTerminator. - Clear m_buffer16 after using it instead of before. - - * parser/Lexer.h: Removed State enum, setDone function, nextLine function, - lookupKeywordFunction, one of the isLineTerminator functions, m_done data member, - m_skipLineEnd data member, and m_state data member. Added shiftLineTerminator - function, currentCharacter function, and changed the arguments to the makeIdentifier - function. Removed one branch from the isLineTerminator function. - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): Streamlined the case where we don't replace anything. - -2009-05-07 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Removed a few more special constants, and replaced them with uses of - the JITStackFrame struct. - - Removed one of the two possible definitions of VoidPtrPair. The Mac - definition was more elegant, but SunSpider doesn't think it's any - faster, and it's net less elegant to have two ways of doing things. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompile): - * jit/JITStubs.h: - (JSC::): - -2009-05-07 Darin Adler - - * runtime/ScopeChain.h: - (JSC::ScopeChainNode::~ScopeChainNode): Tweak formatting. - -2009-05-07 Simon Hausmann - - Reviewed by Tor Arne Vestbø. - - Fix the build thread stack base determination build on Symbian, - by moving the code block before PLATFORM(UNIX), which is also - enabled on Symbian builds. - - * runtime/Collector.cpp: - (JSC::currentThreadStackBase): - -2009-05-07 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Fix crash due to incorrectly using an invalid scopechain - - stringProtoFuncReplace was checking for an exception on a CachedCall - by asking for the cached callframes exception. Unfortunately this - could crash in certain circumstances as CachedCall does not guarantee - a valid callframe following a call. Even more unfortunately the check - was entirely unnecessary as there is only a single exception slot per - global data, so it was already checked via the initial exec->hadException() - check. - - To make bugs like this more obvious, i've added a debug only destructor - to ScopeChainNode that 0's all of its fields. This exposed a crash in - the standard javascriptcore tests. - - * runtime/ScopeChain.h: - (JSC::ScopeChainNode::~ScopeChainNode): - (JSC::ScopeChain::~ScopeChain): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - -2009-05-07 Gavin Barraclough - - Reviewed by Geoff Garen. - - Enable op_strcat across += assignments. This patch allows the lhs of a read/modify node - to be included within the concatenation operation, and also modifies the implementation - of the concatenation to attempt to reuse and cat onto the leftmost string, rather than - always allocating a new empty output string to copy into (as was previously the behaviour). - - ~0.5% progression, due to a 3%-3.5% progression on the string tests (particularly validate). - - * parser/Nodes.cpp: - (JSC::BinaryOpNode::emitStrcat): - (JSC::emitReadModifyAssignment): - (JSC::ReadModifyResolveNode::emitBytecode): - (JSC::ReadModifyDotNode::emitBytecode): - (JSC::ReadModifyBracketNode::emitBytecode): - * parser/Nodes.h: - * runtime/Operations.h: - (JSC::concatenateStrings): - * runtime/UString.cpp: - (JSC::UString::reserveCapacity): - * runtime/UString.h: - -2009-05-07 Simon Hausmann - - Reviewed by Oliver Hunt. - - Fix the build on Windows without JIT: interpreter/RegisterFile.h needs - roundUpAllocationSize, which is protected by #if ENABLED(ASSEMBLER). - Moved the #ifdef down and always offer the function. - - * jit/ExecutableAllocator.h: - -2009-05-06 Geoffrey Garen - - Reviewed by Gavin "++" Barraclough. - - Added some abstraction around the JIT stub calling convention by creating - a struct to represent the persistent stack frame JIT code shares with - JIT stubs. - - SunSpider reports no change. - - * jit/JIT.h: - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_convert_this): - (JSC::JITStubs::cti_op_end): - (JSC::JITStubs::cti_op_add): - (JSC::JITStubs::cti_op_pre_inc): - (JSC::JITStubs::cti_timeout_check): - (JSC::JITStubs::cti_register_file_check): - (JSC::JITStubs::cti_op_loop_if_less): - (JSC::JITStubs::cti_op_loop_if_lesseq): - (JSC::JITStubs::cti_op_new_object): - (JSC::JITStubs::cti_op_put_by_id_generic): - (JSC::JITStubs::cti_op_get_by_id_generic): - (JSC::JITStubs::cti_op_put_by_id): - (JSC::JITStubs::cti_op_put_by_id_second): - (JSC::JITStubs::cti_op_put_by_id_fail): - (JSC::JITStubs::cti_op_get_by_id): - (JSC::JITStubs::cti_op_get_by_id_second): - (JSC::JITStubs::cti_op_get_by_id_self_fail): - (JSC::JITStubs::cti_op_get_by_id_proto_list): - (JSC::JITStubs::cti_op_get_by_id_proto_list_full): - (JSC::JITStubs::cti_op_get_by_id_proto_fail): - (JSC::JITStubs::cti_op_get_by_id_array_fail): - (JSC::JITStubs::cti_op_get_by_id_string_fail): - (JSC::JITStubs::cti_op_instanceof): - (JSC::JITStubs::cti_op_del_by_id): - (JSC::JITStubs::cti_op_mul): - (JSC::JITStubs::cti_op_new_func): - (JSC::JITStubs::cti_op_call_JSFunction): - (JSC::JITStubs::cti_op_call_arityCheck): - (JSC::JITStubs::cti_vm_dontLazyLinkCall): - (JSC::JITStubs::cti_vm_lazyLinkCall): - (JSC::JITStubs::cti_op_push_activation): - (JSC::JITStubs::cti_op_call_NotJSFunction): - (JSC::JITStubs::cti_op_create_arguments): - (JSC::JITStubs::cti_op_create_arguments_no_params): - (JSC::JITStubs::cti_op_tear_off_activation): - (JSC::JITStubs::cti_op_tear_off_arguments): - (JSC::JITStubs::cti_op_profile_will_call): - (JSC::JITStubs::cti_op_profile_did_call): - (JSC::JITStubs::cti_op_ret_scopeChain): - (JSC::JITStubs::cti_op_new_array): - (JSC::JITStubs::cti_op_resolve): - (JSC::JITStubs::cti_op_construct_JSConstruct): - (JSC::JITStubs::cti_op_construct_NotJSConstruct): - (JSC::JITStubs::cti_op_get_by_val): - (JSC::JITStubs::cti_op_get_by_val_string): - (JSC::JITStubs::cti_op_get_by_val_byte_array): - (JSC::JITStubs::cti_op_resolve_func): - (JSC::JITStubs::cti_op_sub): - (JSC::JITStubs::cti_op_put_by_val): - (JSC::JITStubs::cti_op_put_by_val_array): - (JSC::JITStubs::cti_op_put_by_val_byte_array): - (JSC::JITStubs::cti_op_lesseq): - (JSC::JITStubs::cti_op_loop_if_true): - (JSC::JITStubs::cti_op_load_varargs): - (JSC::JITStubs::cti_op_negate): - (JSC::JITStubs::cti_op_resolve_base): - (JSC::JITStubs::cti_op_resolve_skip): - (JSC::JITStubs::cti_op_resolve_global): - (JSC::JITStubs::cti_op_div): - (JSC::JITStubs::cti_op_pre_dec): - (JSC::JITStubs::cti_op_jless): - (JSC::JITStubs::cti_op_not): - (JSC::JITStubs::cti_op_jtrue): - (JSC::JITStubs::cti_op_post_inc): - (JSC::JITStubs::cti_op_eq): - (JSC::JITStubs::cti_op_lshift): - (JSC::JITStubs::cti_op_bitand): - (JSC::JITStubs::cti_op_rshift): - (JSC::JITStubs::cti_op_bitnot): - (JSC::JITStubs::cti_op_resolve_with_base): - (JSC::JITStubs::cti_op_new_func_exp): - (JSC::JITStubs::cti_op_mod): - (JSC::JITStubs::cti_op_less): - (JSC::JITStubs::cti_op_neq): - (JSC::JITStubs::cti_op_post_dec): - (JSC::JITStubs::cti_op_urshift): - (JSC::JITStubs::cti_op_bitxor): - (JSC::JITStubs::cti_op_new_regexp): - (JSC::JITStubs::cti_op_bitor): - (JSC::JITStubs::cti_op_call_eval): - (JSC::JITStubs::cti_op_throw): - (JSC::JITStubs::cti_op_get_pnames): - (JSC::JITStubs::cti_op_next_pname): - (JSC::JITStubs::cti_op_push_scope): - (JSC::JITStubs::cti_op_pop_scope): - (JSC::JITStubs::cti_op_typeof): - (JSC::JITStubs::cti_op_is_undefined): - (JSC::JITStubs::cti_op_is_boolean): - (JSC::JITStubs::cti_op_is_number): - (JSC::JITStubs::cti_op_is_string): - (JSC::JITStubs::cti_op_is_object): - (JSC::JITStubs::cti_op_is_function): - (JSC::JITStubs::cti_op_stricteq): - (JSC::JITStubs::cti_op_to_primitive): - (JSC::JITStubs::cti_op_strcat): - (JSC::JITStubs::cti_op_nstricteq): - (JSC::JITStubs::cti_op_to_jsnumber): - (JSC::JITStubs::cti_op_in): - (JSC::JITStubs::cti_op_push_new_scope): - (JSC::JITStubs::cti_op_jmp_scopes): - (JSC::JITStubs::cti_op_put_by_index): - (JSC::JITStubs::cti_op_switch_imm): - (JSC::JITStubs::cti_op_switch_char): - (JSC::JITStubs::cti_op_switch_string): - (JSC::JITStubs::cti_op_del_by_val): - (JSC::JITStubs::cti_op_put_getter): - (JSC::JITStubs::cti_op_put_setter): - (JSC::JITStubs::cti_op_new_error): - (JSC::JITStubs::cti_op_debug): - (JSC::JITStubs::cti_vm_throw): - * jit/JITStubs.h: - (JSC::): - -2009-05-06 Gavin Barraclough - - Reviewed by Maciej Stachowiak & Darin Adler. - - Improve string concatenation (as coded in JS as a sequence of adds). - - Detect patterns corresponding to string concatenation, and change the bytecode - generation to emit a new op_strcat instruction. By handling the full set of - additions within a single function we do not need allocate JSString wrappers - for intermediate results, and we can calculate the size of the output string - prior to allocating storage, in order to prevent reallocation of the buffer. - - 1.5%-2% progression on Sunspider, largely due to a 30% progression on date-format-xparb. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - Add new opcodes. - * bytecode/Opcode.h: - Add new opcodes. - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitStrcat): - (JSC::BytecodeGenerator::emitToPrimitive): - Add generation of new opcodes. - * bytecompiler/BytecodeGenerator.h: - Add generation of new opcodes. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - Add implmentation of new opcodes. - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - Add implmentation of new opcodes. - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_to_primitive): - (JSC::JITStubs::cti_op_strcat): - Add implmentation of new opcodes. - * jit/JITStubs.h: - Add implmentation of new opcodes. - * parser/Nodes.cpp: - (JSC::BinaryOpNode::emitStrcat): - (JSC::BinaryOpNode::emitBytecode): - (JSC::ReadModifyResolveNode::emitBytecode): - Add generation of new opcodes. - * parser/Nodes.h: - (JSC::ExpressionNode::): - (JSC::AddNode::): - Add methods to allow identification of add nodes. - * parser/ResultType.h: - (JSC::ResultType::definitelyIsString): - (JSC::ResultType::forAdd): - Fix error in detection of adds that will produce string results. - * runtime/Operations.h: - (JSC::concatenateStrings): - Add implmentation of new opcodes. - * runtime/UString.cpp: - (JSC::UString::appendNumeric): - Add methods to append numbers to an existing string. - * runtime/UString.h: - (JSC::UString::Rep::createEmptyBuffer): - (JSC::UString::BaseString::BaseString): - Add support for creating an empty string with a non-zero capacity available in the BaseString. - -2009-05-06 Darin Adler - - Reviewed by Sam Weinig. - - Made RefCounted::m_refCount private. - - * runtime/Structure.h: Removed addressOfCount. - * wtf/RefCounted.h: Made m_refCount private. - Added addressOfCount. - -2009-05-06 Darin Adler - - Fixed assertion seen a lot! - - * parser/Nodes.cpp: - (JSC::FunctionBodyNode::~FunctionBodyNode): Removed now-bogus assertion. - -2009-05-06 Darin Adler - - Working with Sam Weinig. - - Redo parse tree constructor optimization without breaking the Windows - build the way I did yesterday. The previous try broke the build by adding - an include of Lexer.h and all its dependencies that had to work outside - the JavaScriptCore project. - - * GNUmakefile.am: Added NodeConstructors.h. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - Removed byteocde directory -- we no longer are trying to include Lexer.h - outside JavaScriptCore. - - * JavaScriptCore.xcodeproj/project.pbxproj: Change SegmentedVector.h - and Lexer.h back to internal files. Added NodeConstructors.h. - - * parser/Grammar.y: Added include of NodeConstructors.h. - Changed use of ConstDeclNode to use public functions. - - * parser/NodeConstructors.h: Copied from parser/Nodes.h. - Just contains the inlined constructors now. - - * parser/Nodes.cpp: Added include of NodeConstructors.h. - Moved node constructors into the header. - (JSC::FunctionBodyNode::FunctionBodyNode): Removed m_refCount - initialization. - - * parser/Nodes.h: Removed all the constructor definitions, and also - removed the JSC_FAST_CALL from them since these are all inlined, so the - calling convention is irrelevant. Made more things private. Used a data - member for operator opcodes instead of a virtual function. Removed the - special FunctionBodyNode::ref/deref functions since the default functions - are now just as fast. - - * runtime/FunctionConstructor.cpp: - (JSC::extractFunctionBody): Fixed types here so we don't typecast until - after we do type checking. - -2009-05-06 Simon Hausmann - - Reviewed by Ariya Hidayat. - - Fix the Qt build on Windows. - - * JavaScriptCore.pri: Define BUILDING_JavaScriptCore/WTF to get the meaning - of the JS_EXPORTDATA macros correct - -2009-05-06 Simon Hausmann - - Reviewed by Ariya Hidayat. - - Enable the JIT for the Qt build on Windows. - - * JavaScriptCore.pri: - -2009-05-06 Simon Hausmann - - Reviewed by Tor Arne Vestbø. - - Tweak JavaScriptCore.pri for being able to override the generated sources dir for the - generated_files target. - - * JavaScriptCore.pri: - -2009-05-06 Tor Arne Vestbø - - Reviewed by Simon Hausmann. - - Build QtWebKit as a framework on Mac - - This implies both debug and release build by default, unless - one of the --debug or --release config options are passed to - the build-webkit script. - - Frameworks can be disabled by passing CONFIG+=webkit_no_framework - to the build-webkit script. - - To be able to build both debug and release targets in parallel - we have to use separate output directories for the generated - sources, which is not optimal, but required to avoid race conditions. - - An optimization would be to only require this spit-up on Mac. - - * JavaScriptCore.pri: - * JavaScriptCore.pro: - * jsc.pro: - -2009-05-06 Tor Arne Vestbø - - Reviewed by Simon Hausmann. - - [Qt] Use $$GENERATED_SOURCES_DIR as output when running bison - - A couple of the generators left the bison output file in the source - tree, and then moved it into $$GENERATED_SOURCES_DIR, which did not - work well when building release and debug configurations in parallel. - - * JavaScriptCore.pri: - -2009-05-05 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Simplified a bit of codegen. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - -2009-05-05 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Moved all the JIT stub related code into one place. - - * jit/JIT.cpp: - * jit/JIT.h: - * jit/JITCode.h: - * jit/JITStubs.cpp: - (JSC::): - * jit/JITStubs.h: - -2009-05-05 Sam Weinig - - Try to fix Windows build. - - Move Node constructor to the .cpp file. - - * parser/Nodes.cpp: - * parser/Nodes.h: - -2009-05-05 Darin Adler - - Try to fix Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - - Try to fix Mac build. - - * JavaScriptCore.xcodeproj/project.pbxproj: Made SegmentedVector.h private. - -2009-05-05 Darin Adler - - Try to fix Mac build. - - * JavaScriptCore.xcodeproj/project.pbxproj: Made Lexer.h private. - -2009-05-05 Darin Adler - - Reviewed by Sam Weinig. - - Bug 25569: make ParserRefCounted use conventional reference counting - https://bugs.webkit.org/show_bug.cgi?id=25569 - - SunSpider speedup of about 1.6%. - - * JavaScriptCore.exp: Updated. - - * parser/Nodes.cpp: - (JSC::NodeReleaser::releaseAllNodes): ALWAYS_INLINE. - (JSC::NodeReleaser::adopt): Ditto. - (JSC::ParserRefCounted::ParserRefCounted): Removed most of the code. - Add the object to a Vector that gets cleared after parsing. - (JSC::ParserRefCounted::~ParserRefCounted): Removed most of the code. - - * parser/Nodes.h: Made ParserRefCounted inherit from RefCounted and - made inline versions of the constructor and destructor. Made the - Node constructor inline. - - * parser/Parser.cpp: - (JSC::Parser::parse): Call globalData->parserObjects.shrink(0) after - parsing, where it used to call ParserRefCounted::deleteNewObjects. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): Eliminated code to manage the - newParserObjects and parserObjectExtraRefCounts. - (JSC::JSGlobalData::~JSGlobalData): Ditto. - - * runtime/JSGlobalData.h: Replaced the HashSet and HashCountedSet - with a Vector. - - * wtf/PassRefPtr.h: - (WTF::PassRefPtr::~PassRefPtr): The most common thing to do with a - PassRefPtr in hot code is to pass it and then destroy it once it's - set to zero. Help the optimizer by telling it that's true. - -2009-05-05 Xan Lopez and Gustavo Noronha Silva - - Reviewed by Oliver Hunt. - - Disable the NativeFunctionWrapper for all non-Mac ports for now, - as it is also crashing on Linux/x86. - - * runtime/NativeFunctionWrapper.h: - -2009-05-05 Steve Falkenburg - - Fix build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-05 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Expose toThisObject for the DOM Window - - * JavaScriptCore.exp: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (Make windows go again until i work out the - accursed calling convention). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * jit/JIT.cpp: - * runtime/NativeFunctionWrapper.h: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (Fix windows debug builds). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (Hopefully the last fix). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (Fix the build fix caused by a different build fix). - - * parser/Nodes.cpp: - * parser/Nodes.h: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (No idea how my changes could have broken these). - - * runtime/DatePrototype.cpp: - * runtime/RegExpObject.cpp: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (Why should i expect msvc to list all the errors in a file?). - - * parser/Nodes.cpp: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (Fix warning, and another missing include). - - * jit/JIT.cpp: - * parser/Nodes.h: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (More build fixes). - - * runtime/ErrorPrototype.cpp: - * runtime/JSGlobalObject.cpp: - * runtime/NumberPrototype.cpp: - * runtime/ObjectPrototype.cpp: - * runtime/StringConstructor.cpp: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (Will the fixes never end?). - - * runtime/FunctionPrototype.h: - * runtime/Lookup.cpp: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (More build fixes). - - * jit/JIT.cpp: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (More build fixing). - - * runtime/CallData.h: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - * runtime/ArrayConstructor.cpp: - * runtime/BooleanPrototype.cpp: - * runtime/DateConstructor.cpp: - * runtime/Error.cpp: - * runtime/ObjectConstructor.cpp: - * runtime/RegExpPrototype.cpp: - -2009-05-05 Oliver Hunt - - Reviewed by NOBODY (Buildfix). - - Add missing file - - * runtime/NativeFunctionWrapper.h: Copied from JavaScriptCore/jit/ExecutableAllocator.cpp. - -2009-05-05 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Bug 25559: Improve native function call performance - - - In order to cache calls to native functions we now make the standard - prototype functions use a small assembly thunk that converts the JS - calling convention into the native calling convention. As this is - only beneficial in the JIT we use the NativeFunctionWrapper typedef - to alternate between PrototypeFunction and JSFunction to keep the - code sane. This change from PrototypeFunction to NativeFunctionWrapper - is the bulk of this patch. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::call): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::addPtr): - * assembler/X86Assembler.h: - (JSC::X86Assembler::leaq_mr): - (JSC::X86Assembler::call_m): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - (JSC::Interpreter::prepareForRepeatCall): - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - (JSC::JIT::compileCTIMachineTrampolines): - * jit/JITCall.cpp: - (JSC::JIT::linkCall): - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCall): - * jit/JITCode.h: - (JSC::JITCode::operator bool): - * jit/JITInlineMethods.h: - (JSC::JIT::emitGetFromCallFrameHeader): - (JSC::JIT::emitGetFromCallFrameHeader32): - * jit/JITStubs.cpp: - (JSC::JITStubs::JITStubs): - (JSC::JITStubs::cti_op_call_JSFunction): - (JSC::JITStubs::cti_vm_dontLazyLinkCall): - (JSC::JITStubs::cti_vm_lazyLinkCall): - (JSC::JITStubs::cti_op_construct_JSConstruct): - * jit/JITStubs.h: - (JSC::JITStubs::ctiNativeCallThunk): - * jsc.cpp: - (GlobalObject::GlobalObject): - * parser/Nodes.cpp: - (JSC::FunctionBodyNode::FunctionBodyNode): - (JSC::FunctionBodyNode::createNativeThunk): - (JSC::FunctionBodyNode::generateJITCode): - * parser/Nodes.h: - (JSC::FunctionBodyNode::): - (JSC::FunctionBodyNode::generatedJITCode): - (JSC::FunctionBodyNode::jitCode): - * profiler/Profiler.cpp: - (JSC::Profiler::createCallIdentifier): - * runtime/ArgList.h: - * runtime/ArrayPrototype.cpp: - (JSC::isNumericCompareFunction): - * runtime/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::addFunctionProperties): - (JSC::functionProtoFuncToString): - * runtime/FunctionPrototype.h: - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::~JSFunction): - (JSC::JSFunction::mark): - (JSC::JSFunction::getCallData): - (JSC::JSFunction::call): - (JSC::JSFunction::argumentsGetter): - (JSC::JSFunction::callerGetter): - (JSC::JSFunction::lengthGetter): - (JSC::JSFunction::getOwnPropertySlot): - (JSC::JSFunction::put): - (JSC::JSFunction::deleteProperty): - (JSC::JSFunction::getConstructData): - (JSC::JSFunction::construct): - * runtime/JSFunction.h: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::setScope): - (JSC::JSFunction::scope): - (JSC::JSFunction::isHostFunction): - (JSC::JSFunction::scopeChain): - (JSC::JSFunction::clearScopeChain): - (JSC::JSFunction::setScopeChain): - (JSC::JSFunction::nativeFunction): - (JSC::JSFunction::setNativeFunction): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::~JSGlobalData): - (JSC::JSGlobalData::createNativeThunk): - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::nativeFunctionThunk): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - * runtime/JSGlobalObject.h: - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/Lookup.h: - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): - * runtime/RegExpPrototype.cpp: - (JSC::RegExpPrototype::RegExpPrototype): - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - -2009-05-05 Gavin Barraclough - - Reviewed by Oliver Hunt. - - For convenience, let the sampling flags tool clear multiple flags at once. - - * jsc.cpp: - (GlobalObject::GlobalObject): - (functionSetSamplingFlags): - (functionClearSamplingFlags): - -2009-05-04 Maciej Stachowiak - - Rubber stamped by Gavin. - - - inline Vector::resize for a ~1.5% speedup on string-tagcloud - - * wtf/Vector.h: - (WTF::Vector::resize): Inline - -2009-05-03 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: - -2009-05-03 Mark Rowe - - Fix the 64-bit build. - - * API/APICast.h: - (toJS): - (toRef): - * runtime/JSNumberCell.cpp: - (JSC::jsAPIMangledNumber): - * runtime/JSNumberCell.h: - -2009-05-02 Sam Weinig - - Roll JSC API number marshaling back in one last time (I hope). - -2009-05-03 Sam Weinig - - Roll JSC API number marshaling back out. It still breaks windows. - -2009-05-03 Sam Weinig - - Roll JSC API number marshaling back in. - -2009-05-02 Darin Adler - - Reviewed by Maciej Stachowiak. - - Bug 25519: streamline lexer by handling BOMs differently - https://bugs.webkit.org/show_bug.cgi?id=25519 - - Roughly 1% faster SunSpider. - - * parser/Grammar.y: Tweak formatting a bit. - - * parser/Lexer.cpp: - (JSC::Lexer::Lexer): Remove unnnecessary initialization of data members - that are set up by setCode. - (JSC::Lexer::currentOffset): Added. Used where the old code would look at - m_currentOffset. - (JSC::Lexer::shift1): Replaces the old shift function. No longer does anything - to handle BOM characters. - (JSC::Lexer::shift2): Ditto. - (JSC::Lexer::shift3): Ditto. - (JSC::Lexer::shift4): Ditto. - (JSC::Lexer::setCode): Updated for name change from yylineno to m_line. - Removed now-unused m_eatNextIdentifier, m_stackToken, and m_restrKeyword. - Replaced m_skipLF and m_skipCR with m_skipLineEnd. Replaced the old - m_length with m_codeEnd and m_currentOffset with m_codeStart. Added code - to scan for a BOM character and call copyCodeWithoutBOMs() if we find any. - (JSC::Lexer::copyCodeWithoutBOMs): Added. - (JSC::Lexer::nextLine): Updated for name change from yylineno to m_line. - (JSC::Lexer::makeIdentifier): Moved up higher in the file. - (JSC::Lexer::matchPunctuator): Moved up higher in the file and changed to - use a switch statement instead of just if statements. - (JSC::Lexer::isLineTerminator): Moved up higher in the file and changed to - have fewer branches. - (JSC::Lexer::lastTokenWasRestrKeyword): Added. This replaces the old - m_restrKeyword boolean. - (JSC::Lexer::isIdentStart): Moved up higher in the file. Changed to use - fewer branches in the ASCII but not identifier case. - (JSC::Lexer::isIdentPart): Ditto. - (JSC::Lexer::singleEscape): Moved up higher in the file. - (JSC::Lexer::convertOctal): Moved up higher in the file. - (JSC::Lexer::convertHex): Moved up higher in the file. Changed to use - toASCIIHexValue instead of rolling our own here. - (JSC::Lexer::convertUnicode): Ditto. - (JSC::Lexer::record8): Moved up higher in the file. - (JSC::Lexer::record16): Moved up higher in the file. - (JSC::Lexer::lex): Changed type of stringType to int. Replaced m_skipLF - and m_skipCR with m_skipLineEnd, which requires fewer branches in the - main lexer loop. Use currentOffset instead of m_currentOffset. Removed - unneeded m_stackToken. Use isASCIIDigit instead of isDecimalDigit. - Split out the two cases for InIdentifierOrKeyword and InIdentifier. - Added special case tight loops for identifiers and other simple states. - Removed a branch from the code that sets m_atLineStart to false using goto. - Streamlined the number-handling code so we don't check for the same types - twice for non-numeric cases and don't add a null to m_buffer8 when it's - not being used. Removed m_eatNextIdentifier, which wasn't working anyway, - and m_restrKeyword, which is redundant with m_lastToken. Set the - m_delimited flag without using a branch. - (JSC::Lexer::scanRegExp): Tweaked style a bit. - (JSC::Lexer::clear): Clear m_codeWithoutBOMs so we don't use memory after - parsing. Clear out UString objects in the more conventional way. - (JSC::Lexer::sourceCode): Made this no-longer inline since it has more - work to do in the case where we stripped BOMs. - - * parser/Lexer.h: Renamed yylineno to m_lineNumber. Removed convertHex - function, which is the same as toASCIIHexValue. Removed isHexDigit - function, which is the same as isASCIIHedDigit. Replaced shift with four - separate shift functions. Removed isWhiteSpace function that passes - m_current, instead just passing m_current explicitly. Removed isOctalDigit, - which is the same as isASCIIOctalDigit. Eliminated unused arguments from - matchPunctuator. Added copyCoodeWithoutBOMs and currentOffset. Moved the - makeIdentifier function out of the header. Added lastTokenWasRestrKeyword - function. Added new constants for m_skipLineEnd. Removed unused yycolumn, - m_restrKeyword, m_skipLF, m_skipCR, m_eatNextIdentifier, m_stackToken, - m_position, m_length, m_currentOffset, m_nextOffset1, m_nextOffset2, - m_nextOffset3. Added m_skipLineEnd, m_codeStart, m_codeEnd, and - m_codeWithoutBOMs. - - * parser/SourceProvider.h: Added hasBOMs function. In the future this can - be used to tell the lexer about strings known not to have BOMs. - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncUnescape): Changed to use isASCIIHexDigit. - - * wtf/ASCIICType.h: Added using statements to match the design of the - other WTF headers. - -2009-05-02 Ada Chan - - Fix windows build (when doing a clean build) - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-02 Geoffrey Garen - - Reviewed by Sam Weinig. - - Simplified null-ish JSValues. - - Replaced calls to noValue() with calls to JSValue() (which is what - noValue() returned). Removed noValue(). - - Replaced almost all uses of jsImpossibleValue() with uses of JSValue(). - Its one remaining use is for construction of hash table deleted values. - For that specific task, I made a new, private constructor with a special - tag. Removed jsImpossibleValue(). - - Removed "JSValue()" initialiazers, since default construction happens... - by default. - - * API/JSCallbackObjectFunctions.h: - (JSC::::call): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitLoad): - * bytecompiler/BytecodeGenerator.h: - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * debugger/DebuggerCallFrame.h: - (JSC::DebuggerCallFrame::DebuggerCallFrame): - * interpreter/CallFrame.h: - (JSC::ExecState::clearException): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveLastCaller): - * interpreter/Register.h: - (JSC::Register::Register): - * jit/JITCall.cpp: - (JSC::JIT::unlinkCall): - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCall): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_call_eval): - (JSC::JITStubs::cti_vm_throw): - * profiler/Profiler.cpp: - (JSC::Profiler::willExecute): - (JSC::Profiler::didExecute): - * runtime/ArrayPrototype.cpp: - (JSC::getProperty): - * runtime/Completion.cpp: - (JSC::evaluate): - * runtime/Completion.h: - (JSC::Completion::Completion): - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::getPrimitiveNumber): - * runtime/JSArray.cpp: - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::sort): - (JSC::JSArray::compactForSorting): - * runtime/JSCell.cpp: - (JSC::JSCell::getJSNumber): - * runtime/JSCell.h: - (JSC::JSValue::getJSNumber): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSImmediate.h: - (JSC::JSImmediate::fromNumberOutsideIntegerRange): - (JSC::JSImmediate::from): - * runtime/JSNumberCell.cpp: - (JSC::jsNumberCell): - * runtime/JSObject.cpp: - (JSC::callDefaultValueFunction): - * runtime/JSObject.h: - (JSC::JSObject::getDirect): - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::toPrimitive): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::next): - * runtime/JSValue.h: - (JSC::JSValue::): - (JSC::JSValueHashTraits::constructDeletedValue): - (JSC::JSValueHashTraits::isDeletedValue): - (JSC::JSValue::JSValue): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::JSWrapperObject): - * runtime/Operations.h: - (JSC::resolveBase): - * runtime/PropertySlot.h: - (JSC::PropertySlot::clearBase): - (JSC::PropertySlot::clearValue): - -2009-05-02 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - speed up the lexer in various ways - - ~2% command-line SunSpider speedup - - * parser/Lexer.cpp: - (JSC::Lexer::setCode): Moved below shift() so it can inline. - (JSC::Lexer::scanRegExp): Use resize(0) instead of clear() on Vectors, since the intent - here is not to free the underlying buffer. - (JSC::Lexer::lex): ditto; also, change the loop logic a bit for the main lexing loop - to avoid branching on !m_done twice per iteration. Now we only check it once. - (JSC::Lexer::shift): Make this ALWAYS_INLINE and tag an unusual branch as UNLIKELY - * parser/Lexer.h: - (JSC::Lexer::makeIdentifier): force to be ALWAYS_INLINE - * wtf/Vector.h: - (WTF::::append): force to be ALWAYS_INLINE (may have helped in ways other than parsing but it wasn't - getting inlined in a hot code path in the lexer) - -2009-05-01 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore.make: - -2009-05-01 Sam Weinig - - Fix 64bit build. - - * runtime/JSNumberCell.h: - (JSC::JSValue::JSValue): - * runtime/JSValue.h: - (JSC::jsNumber): - -2009-05-01 Sam Weinig - - Roll out JavaScriptCore API number marshaling. - - * API/APICast.h: - (toJS): - (toRef): - * API/JSBase.cpp: - (JSEvaluateScript): - (JSCheckScriptSyntax): - * API/JSCallbackConstructor.cpp: - (JSC::constructJSCallback): - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::call): - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertySlot): - (JSC::::put): - (JSC::::deleteProperty): - (JSC::::construct): - (JSC::::hasInstance): - (JSC::::call): - (JSC::::toNumber): - (JSC::::toString): - (JSC::::staticValueGetter): - (JSC::::callbackGetter): - * API/JSObjectRef.cpp: - (JSObjectMakeFunction): - (JSObjectMakeArray): - (JSObjectMakeDate): - (JSObjectMakeError): - (JSObjectMakeRegExp): - (JSObjectGetPrototype): - (JSObjectSetPrototype): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - (JSObjectDeleteProperty): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - * API/JSValueRef.cpp: - (JSValueGetType): - (JSValueIsUndefined): - (JSValueIsNull): - (JSValueIsBoolean): - (JSValueIsNumber): - (JSValueIsString): - (JSValueIsObject): - (JSValueIsObjectOfClass): - (JSValueIsEqual): - (JSValueIsStrictEqual): - (JSValueIsInstanceOfConstructor): - (JSValueMakeUndefined): - (JSValueMakeNull): - (JSValueMakeBoolean): - (JSValueMakeNumber): - (JSValueMakeString): - (JSValueToBoolean): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - (JSValueUnprotect): - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * runtime/JSNumberCell.cpp: - * runtime/JSNumberCell.h: - * runtime/JSValue.h: - -2009-05-01 Sam Weinig - - Fix windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-01 Sam Weinig - - Fix the build. - - * JavaScriptCore.exp: - -2009-05-01 Sam Weinig - - Reviewed by Geoffrey "Too Far!" Garen. - - Move JS number construction into JSValue. - - * runtime/JSImmediate.h: - * runtime/JSNumberCell.h: - (JSC::JSValue::JSValue): - * runtime/JSValue.h: - (JSC::jsNumber): - -2009-05-01 Sam Weinig - - Reviewed by Geoff "The Minneapolis" Garen. - - Add mechanism to vend heap allocated JS numbers to JavaScriptCore API clients with a - representation that is independent of the number representation in the VM. - - Numbers leaving the interpreter are converted to a tagged JSNumberCell. - - The numbers coming into the interpreter (asserted to be the tagged JSNumberCell) are - converted back to the VM's internal number representation. - - * API/APICast.h: - (toJS): - (toRef): - * API/JSBase.cpp: - (JSEvaluateScript): - (JSCheckScriptSyntax): - * API/JSCallbackConstructor.cpp: - (JSC::constructJSCallback): - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::call): - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertySlot): - (JSC::::put): - (JSC::::deleteProperty): - (JSC::::construct): - (JSC::::hasInstance): - (JSC::::call): - (JSC::::toNumber): - (JSC::::toString): - (JSC::::staticValueGetter): - (JSC::::callbackGetter): - * API/JSObjectRef.cpp: - (JSObjectMakeFunction): - (JSObjectMakeArray): - (JSObjectMakeDate): - (JSObjectMakeError): - (JSObjectMakeRegExp): - (JSObjectGetPrototype): - (JSObjectSetPrototype): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - (JSObjectDeleteProperty): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - * API/JSValueRef.cpp: - (JSValueGetType): - (JSValueIsUndefined): - (JSValueIsNull): - (JSValueIsBoolean): - (JSValueIsNumber): - (JSValueIsString): - (JSValueIsObject): - (JSValueIsObjectOfClass): - (JSValueIsEqual): - (JSValueIsStrictEqual): - (JSValueIsInstanceOfConstructor): - (JSValueMakeUndefined): - (JSValueMakeNull): - (JSValueMakeBoolean): - (JSValueMakeNumber): - (JSValueMakeString): - (JSValueToBoolean): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - (JSValueUnprotect): - * runtime/JSNumberCell.cpp: - (JSC::jsAPIMangledNumber): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::isAPIMangledNumber): - (JSC::JSNumberCell::): - (JSC::JSNumberCell::JSNumberCell): - (JSC::JSValue::isAPIMangledNumber): - * runtime/JSValue.h: - -2009-05-01 Geoffrey Garen - - Windows build fix take 6. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-05-01 Geoffrey Garen - - Windows build fix take 5. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-01 Geoffrey Garen - - Windows build fix take 4. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-01 Geoffrey Garen - - Windows build fix take 3. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-01 Geoffrey Garen - - Windows build fix take 2. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-05-01 Geoffrey Garen - - Windows build fix take 1. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-05-01 Geoffrey Garen - - Rubber Stamped by Sam Weinig. - - Renamed JSValuePtr => JSValue. - - * API/APICast.h: - (toJS): - (toRef): - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::call): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * API/JSCallbackObjectFunctions.h: - (JSC::::asCallbackObject): - (JSC::::put): - (JSC::::hasInstance): - (JSC::::call): - (JSC::::staticValueGetter): - (JSC::::staticFunctionGetter): - (JSC::::callbackGetter): - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): - (JSObjectSetPrototype): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - * API/JSValueRef.cpp: - (JSValueGetType): - (JSValueIsUndefined): - (JSValueIsNull): - (JSValueIsBoolean): - (JSValueIsNumber): - (JSValueIsString): - (JSValueIsObject): - (JSValueIsObjectOfClass): - (JSValueIsEqual): - (JSValueIsStrictEqual): - (JSValueIsInstanceOfConstructor): - (JSValueToBoolean): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - (JSValueUnprotect): - * JavaScriptCore.exp: - * bytecode/CodeBlock.cpp: - (JSC::valueToSourceString): - (JSC::constantName): - (JSC::CodeBlock::dump): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getConstant): - (JSC::CodeBlock::addUnexpectedConstant): - (JSC::CodeBlock::unexpectedConstant): - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::addConstant): - (JSC::BytecodeGenerator::addUnexpectedConstant): - (JSC::BytecodeGenerator::emitLoad): - (JSC::BytecodeGenerator::emitGetScopedVar): - (JSC::BytecodeGenerator::emitPutScopedVar): - (JSC::BytecodeGenerator::emitNewError): - (JSC::keyForImmediateSwitch): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::JSValueHashTraits::constructDeletedValue): - (JSC::BytecodeGenerator::JSValueHashTraits::isDeletedValue): - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/Debugger.h: - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::put): - (JSC::DebuggerActivation::putWithAttributes): - (JSC::DebuggerActivation::lookupGetter): - (JSC::DebuggerActivation::lookupSetter): - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * debugger/DebuggerCallFrame.h: - (JSC::DebuggerCallFrame::DebuggerCallFrame): - (JSC::DebuggerCallFrame::exception): - * interpreter/CachedCall.h: - (JSC::CachedCall::CachedCall): - (JSC::CachedCall::call): - (JSC::CachedCall::setThis): - (JSC::CachedCall::setArgument): - * interpreter/CallFrame.cpp: - (JSC::CallFrame::thisValue): - (JSC::CallFrame::dumpCaller): - * interpreter/CallFrame.h: - (JSC::ExecState::setException): - (JSC::ExecState::exception): - (JSC::ExecState::exceptionSlot): - * interpreter/CallFrameClosure.h: - (JSC::CallFrameClosure::setArgument): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveBase): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::resolveBaseAndFunc): - (JSC::isNotObject): - (JSC::Interpreter::callEval): - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::prepareForRepeatCall): - (JSC::Interpreter::createExceptionScope): - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): - (JSC::Interpreter::retrieveCaller): - (JSC::Interpreter::retrieveLastCaller): - * interpreter/Interpreter.h: - * interpreter/Register.h: - (JSC::Register::): - (JSC::Register::Register): - (JSC::Register::jsValue): - * jit/JIT.cpp: - (JSC::): - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_mod): - * jit/JITCall.cpp: - (JSC::JIT::unlinkCall): - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCall): - * jit/JITCode.h: - (JSC::): - (JSC::JITCode::execute): - * jit/JITInlineMethods.h: - (JSC::JIT::emitGetVirtualRegister): - (JSC::JIT::getConstantOperand): - (JSC::JIT::emitPutJITStubArgFromVirtualRegister): - (JSC::JIT::emitInitRegister): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - * jit/JITStubs.cpp: - (JSC::JITStubs::tryCachePutByID): - (JSC::JITStubs::tryCacheGetByID): - (JSC::JITStubs::cti_op_convert_this): - (JSC::JITStubs::cti_op_add): - (JSC::JITStubs::cti_op_pre_inc): - (JSC::JITStubs::cti_op_loop_if_less): - (JSC::JITStubs::cti_op_loop_if_lesseq): - (JSC::JITStubs::cti_op_get_by_id_generic): - (JSC::JITStubs::cti_op_get_by_id): - (JSC::JITStubs::cti_op_get_by_id_second): - (JSC::JITStubs::cti_op_get_by_id_self_fail): - (JSC::JITStubs::cti_op_get_by_id_proto_list): - (JSC::JITStubs::cti_op_get_by_id_proto_list_full): - (JSC::JITStubs::cti_op_get_by_id_proto_fail): - (JSC::JITStubs::cti_op_get_by_id_array_fail): - (JSC::JITStubs::cti_op_get_by_id_string_fail): - (JSC::JITStubs::cti_op_instanceof): - (JSC::JITStubs::cti_op_del_by_id): - (JSC::JITStubs::cti_op_mul): - (JSC::JITStubs::cti_op_call_NotJSFunction): - (JSC::JITStubs::cti_op_resolve): - (JSC::JITStubs::cti_op_construct_NotJSConstruct): - (JSC::JITStubs::cti_op_get_by_val): - (JSC::JITStubs::cti_op_get_by_val_string): - (JSC::JITStubs::cti_op_get_by_val_byte_array): - (JSC::JITStubs::cti_op_resolve_func): - (JSC::JITStubs::cti_op_sub): - (JSC::JITStubs::cti_op_put_by_val): - (JSC::JITStubs::cti_op_put_by_val_array): - (JSC::JITStubs::cti_op_put_by_val_byte_array): - (JSC::JITStubs::cti_op_lesseq): - (JSC::JITStubs::cti_op_loop_if_true): - (JSC::JITStubs::cti_op_load_varargs): - (JSC::JITStubs::cti_op_negate): - (JSC::JITStubs::cti_op_resolve_base): - (JSC::JITStubs::cti_op_resolve_skip): - (JSC::JITStubs::cti_op_resolve_global): - (JSC::JITStubs::cti_op_div): - (JSC::JITStubs::cti_op_pre_dec): - (JSC::JITStubs::cti_op_jless): - (JSC::JITStubs::cti_op_not): - (JSC::JITStubs::cti_op_jtrue): - (JSC::JITStubs::cti_op_post_inc): - (JSC::JITStubs::cti_op_eq): - (JSC::JITStubs::cti_op_lshift): - (JSC::JITStubs::cti_op_bitand): - (JSC::JITStubs::cti_op_rshift): - (JSC::JITStubs::cti_op_bitnot): - (JSC::JITStubs::cti_op_resolve_with_base): - (JSC::JITStubs::cti_op_mod): - (JSC::JITStubs::cti_op_less): - (JSC::JITStubs::cti_op_neq): - (JSC::JITStubs::cti_op_post_dec): - (JSC::JITStubs::cti_op_urshift): - (JSC::JITStubs::cti_op_bitxor): - (JSC::JITStubs::cti_op_bitor): - (JSC::JITStubs::cti_op_call_eval): - (JSC::JITStubs::cti_op_throw): - (JSC::JITStubs::cti_op_next_pname): - (JSC::JITStubs::cti_op_typeof): - (JSC::JITStubs::cti_op_is_undefined): - (JSC::JITStubs::cti_op_is_boolean): - (JSC::JITStubs::cti_op_is_number): - (JSC::JITStubs::cti_op_is_string): - (JSC::JITStubs::cti_op_is_object): - (JSC::JITStubs::cti_op_is_function): - (JSC::JITStubs::cti_op_stricteq): - (JSC::JITStubs::cti_op_nstricteq): - (JSC::JITStubs::cti_op_to_jsnumber): - (JSC::JITStubs::cti_op_in): - (JSC::JITStubs::cti_op_switch_imm): - (JSC::JITStubs::cti_op_switch_char): - (JSC::JITStubs::cti_op_switch_string): - (JSC::JITStubs::cti_op_del_by_val): - (JSC::JITStubs::cti_op_new_error): - (JSC::JITStubs::cti_vm_throw): - * jit/JITStubs.h: - * jsc.cpp: - (functionPrint): - (functionDebug): - (functionGC): - (functionVersion): - (functionRun): - (functionLoad): - (functionSetSamplingFlag): - (functionClearSamplingFlag): - (functionReadline): - (functionQuit): - * parser/Nodes.cpp: - (JSC::processClauseList): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::addParentForConsoleStart): - * profiler/Profiler.cpp: - (JSC::Profiler::willExecute): - (JSC::Profiler::didExecute): - (JSC::Profiler::createCallIdentifier): - * profiler/Profiler.h: - * runtime/ArgList.cpp: - (JSC::MarkedArgumentBuffer::slowAppend): - * runtime/ArgList.h: - (JSC::MarkedArgumentBuffer::at): - (JSC::MarkedArgumentBuffer::append): - (JSC::ArgList::ArgList): - (JSC::ArgList::at): - * runtime/Arguments.cpp: - (JSC::Arguments::put): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - (JSC::asArguments): - * runtime/ArrayConstructor.cpp: - (JSC::callArrayConstructor): - * runtime/ArrayPrototype.cpp: - (JSC::getProperty): - (JSC::putProperty): - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - (JSC::arrayProtoFuncConcat): - (JSC::arrayProtoFuncPop): - (JSC::arrayProtoFuncPush): - (JSC::arrayProtoFuncReverse): - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSlice): - (JSC::arrayProtoFuncSort): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncReduce): - (JSC::arrayProtoFuncReduceRight): - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/BooleanConstructor.cpp: - (JSC::callBooleanConstructor): - (JSC::constructBooleanFromImmediateBoolean): - * runtime/BooleanConstructor.h: - * runtime/BooleanObject.h: - (JSC::asBooleanObject): - * runtime/BooleanPrototype.cpp: - (JSC::booleanProtoFuncToString): - (JSC::booleanProtoFuncValueOf): - * runtime/CallData.cpp: - (JSC::call): - * runtime/CallData.h: - * runtime/Collector.cpp: - (JSC::Heap::protect): - (JSC::Heap::unprotect): - (JSC::Heap::heap): - * runtime/Collector.h: - * runtime/Completion.cpp: - (JSC::evaluate): - * runtime/Completion.h: - (JSC::Completion::Completion): - (JSC::Completion::value): - (JSC::Completion::setValue): - * runtime/ConstructData.cpp: - (JSC::construct): - * runtime/ConstructData.h: - * runtime/DateConstructor.cpp: - (JSC::constructDate): - (JSC::callDate): - (JSC::dateParse): - (JSC::dateNow): - (JSC::dateUTC): - * runtime/DateInstance.h: - (JSC::asDateInstance): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToLocaleString): - (JSC::dateProtoFuncToLocaleDateString): - (JSC::dateProtoFuncToLocaleTimeString): - (JSC::dateProtoFuncGetTime): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetMilliSeconds): - (JSC::dateProtoFuncGetUTCMilliseconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetMilliSeconds): - (JSC::dateProtoFuncSetUTCMilliseconds): - (JSC::dateProtoFuncSetSeconds): - (JSC::dateProtoFuncSetUTCSeconds): - (JSC::dateProtoFuncSetMinutes): - (JSC::dateProtoFuncSetUTCMinutes): - (JSC::dateProtoFuncSetHours): - (JSC::dateProtoFuncSetUTCHours): - (JSC::dateProtoFuncSetDate): - (JSC::dateProtoFuncSetUTCDate): - (JSC::dateProtoFuncSetMonth): - (JSC::dateProtoFuncSetUTCMonth): - (JSC::dateProtoFuncSetFullYear): - (JSC::dateProtoFuncSetUTCFullYear): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/ErrorConstructor.cpp: - (JSC::callErrorConstructor): - * runtime/ErrorPrototype.cpp: - (JSC::errorProtoFuncToString): - * runtime/ExceptionHelpers.cpp: - (JSC::createInterruptedExecutionException): - (JSC::createError): - (JSC::createStackOverflowError): - (JSC::createUndefinedVariableError): - (JSC::createErrorMessage): - (JSC::createInvalidParamError): - (JSC::createNotAConstructorError): - (JSC::createNotAFunctionError): - * runtime/ExceptionHelpers.h: - * runtime/FunctionConstructor.cpp: - (JSC::callFunctionConstructor): - * runtime/FunctionPrototype.cpp: - (JSC::callFunctionPrototype): - (JSC::functionProtoFuncToString): - (JSC::functionProtoFuncApply): - (JSC::functionProtoFuncCall): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::toPrimitive): - (JSC::GetterSetter::getPrimitiveNumber): - * runtime/GetterSetter.h: - (JSC::asGetterSetter): - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::displayName): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - (JSC::asInternalFunction): - * runtime/JSActivation.cpp: - (JSC::JSActivation::getOwnPropertySlot): - (JSC::JSActivation::put): - (JSC::JSActivation::putWithAttributes): - (JSC::JSActivation::argumentsGetter): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - (JSC::asActivation): - * runtime/JSArray.cpp: - (JSC::storageSize): - (JSC::JSArray::JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::mark): - (JSC::compareNumbersForQSort): - (JSC::JSArray::sortNumeric): - (JSC::JSArray::sort): - (JSC::JSArray::compactForSorting): - (JSC::JSArray::checkConsistency): - (JSC::constructArray): - * runtime/JSArray.h: - (JSC::JSArray::getIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::createStructure): - (JSC::asArray): - (JSC::isJSArray): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - (JSC::JSByteArray::put): - * runtime/JSByteArray.h: - (JSC::JSByteArray::getIndex): - (JSC::JSByteArray::setIndex): - (JSC::asByteArray): - (JSC::isJSByteArray): - * runtime/JSCell.cpp: - (JSC::JSCell::put): - (JSC::JSCell::getJSNumber): - * runtime/JSCell.h: - (JSC::asCell): - (JSC::JSValue::asCell): - (JSC::JSValue::isString): - (JSC::JSValue::isGetterSetter): - (JSC::JSValue::isObject): - (JSC::JSValue::getString): - (JSC::JSValue::getObject): - (JSC::JSValue::getCallData): - (JSC::JSValue::getConstructData): - (JSC::JSValue::getUInt32): - (JSC::JSValue::getTruncatedInt32): - (JSC::JSValue::getTruncatedUInt32): - (JSC::JSValue::mark): - (JSC::JSValue::marked): - (JSC::JSValue::toPrimitive): - (JSC::JSValue::getPrimitiveNumber): - (JSC::JSValue::toBoolean): - (JSC::JSValue::toNumber): - (JSC::JSValue::toString): - (JSC::JSValue::toObject): - (JSC::JSValue::toThisObject): - (JSC::JSValue::needsThisConversion): - (JSC::JSValue::toThisString): - (JSC::JSValue::getJSNumber): - * runtime/JSFunction.cpp: - (JSC::JSFunction::call): - (JSC::JSFunction::argumentsGetter): - (JSC::JSFunction::callerGetter): - (JSC::JSFunction::lengthGetter): - (JSC::JSFunction::getOwnPropertySlot): - (JSC::JSFunction::put): - (JSC::JSFunction::construct): - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - (JSC::asFunction): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::JSGlobalObject::put): - (JSC::JSGlobalObject::putWithAttributes): - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::resetPrototype): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - (JSC::JSGlobalObject::GlobalPropertyInfo::GlobalPropertyInfo): - (JSC::asGlobalObject): - (JSC::Structure::prototypeForLookup): - (JSC::Structure::prototypeChain): - (JSC::Structure::isValid): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEval): - (JSC::globalFuncParseInt): - (JSC::globalFuncParseFloat): - (JSC::globalFuncIsNaN): - (JSC::globalFuncIsFinite): - (JSC::globalFuncDecodeURI): - (JSC::globalFuncDecodeURIComponent): - (JSC::globalFuncEncodeURI): - (JSC::globalFuncEncodeURIComponent): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - (JSC::globalFuncJSCPrint): - * runtime/JSGlobalObjectFunctions.h: - * runtime/JSImmediate.cpp: - (JSC::JSImmediate::toThisObject): - (JSC::JSImmediate::toObject): - (JSC::JSImmediate::prototype): - (JSC::JSImmediate::toString): - * runtime/JSImmediate.h: - (JSC::JSImmediate::isImmediate): - (JSC::JSImmediate::isNumber): - (JSC::JSImmediate::isIntegerNumber): - (JSC::JSImmediate::isDoubleNumber): - (JSC::JSImmediate::isPositiveIntegerNumber): - (JSC::JSImmediate::isBoolean): - (JSC::JSImmediate::isUndefinedOrNull): - (JSC::JSImmediate::isEitherImmediate): - (JSC::JSImmediate::areBothImmediate): - (JSC::JSImmediate::areBothImmediateIntegerNumbers): - (JSC::JSImmediate::makeValue): - (JSC::JSImmediate::makeInt): - (JSC::JSImmediate::makeDouble): - (JSC::JSImmediate::makeBool): - (JSC::JSImmediate::makeUndefined): - (JSC::JSImmediate::makeNull): - (JSC::JSImmediate::doubleValue): - (JSC::JSImmediate::intValue): - (JSC::JSImmediate::uintValue): - (JSC::JSImmediate::boolValue): - (JSC::JSImmediate::rawValue): - (JSC::JSImmediate::trueImmediate): - (JSC::JSImmediate::falseImmediate): - (JSC::JSImmediate::undefinedImmediate): - (JSC::JSImmediate::nullImmediate): - (JSC::JSImmediate::zeroImmediate): - (JSC::JSImmediate::oneImmediate): - (JSC::JSImmediate::impossibleValue): - (JSC::JSImmediate::toBoolean): - (JSC::JSImmediate::getTruncatedUInt32): - (JSC::JSImmediate::fromNumberOutsideIntegerRange): - (JSC::JSImmediate::from): - (JSC::JSImmediate::getTruncatedInt32): - (JSC::JSImmediate::toDouble): - (JSC::JSImmediate::getUInt32): - (JSC::JSValue::JSValue): - (JSC::JSValue::isUndefinedOrNull): - (JSC::JSValue::isBoolean): - (JSC::JSValue::getBoolean): - (JSC::JSValue::toInt32): - (JSC::JSValue::toUInt32): - (JSC::JSValue::isCell): - (JSC::JSValue::isInt32Fast): - (JSC::JSValue::getInt32Fast): - (JSC::JSValue::isUInt32Fast): - (JSC::JSValue::getUInt32Fast): - (JSC::JSValue::makeInt32Fast): - (JSC::JSValue::areBothInt32Fast): - (JSC::JSFastMath::canDoFastBitwiseOperations): - (JSC::JSFastMath::equal): - (JSC::JSFastMath::notEqual): - (JSC::JSFastMath::andImmediateNumbers): - (JSC::JSFastMath::xorImmediateNumbers): - (JSC::JSFastMath::orImmediateNumbers): - (JSC::JSFastMath::canDoFastRshift): - (JSC::JSFastMath::canDoFastUrshift): - (JSC::JSFastMath::rightShiftImmediateNumbers): - (JSC::JSFastMath::canDoFastAdditiveOperations): - (JSC::JSFastMath::addImmediateNumbers): - (JSC::JSFastMath::subImmediateNumbers): - (JSC::JSFastMath::incImmediateNumber): - (JSC::JSFastMath::decImmediateNumber): - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::toPrimitive): - (JSC::JSNotAnObject::getPrimitiveNumber): - (JSC::JSNotAnObject::put): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::createStructure): - * runtime/JSNumberCell.cpp: - (JSC::JSNumberCell::toPrimitive): - (JSC::JSNumberCell::getPrimitiveNumber): - (JSC::JSNumberCell::getJSNumber): - (JSC::jsNumberCell): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::createStructure): - (JSC::isNumberCell): - (JSC::asNumberCell): - (JSC::jsNumber): - (JSC::JSValue::isDoubleNumber): - (JSC::JSValue::getDoubleNumber): - (JSC::JSValue::isNumber): - (JSC::JSValue::uncheckedGetNumber): - (JSC::jsNaN): - (JSC::JSValue::toJSNumber): - (JSC::JSValue::getNumber): - (JSC::JSValue::numberToInt32): - (JSC::JSValue::numberToUInt32): - * runtime/JSObject.cpp: - (JSC::JSObject::mark): - (JSC::JSObject::put): - (JSC::JSObject::putWithAttributes): - (JSC::callDefaultValueFunction): - (JSC::JSObject::getPrimitiveNumber): - (JSC::JSObject::defaultValue): - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::JSObject::lookupGetter): - (JSC::JSObject::lookupSetter): - (JSC::JSObject::hasInstance): - (JSC::JSObject::toNumber): - (JSC::JSObject::toString): - (JSC::JSObject::fillGetterPropertySlot): - * runtime/JSObject.h: - (JSC::JSObject::getDirect): - (JSC::JSObject::getDirectLocation): - (JSC::JSObject::offsetForLocation): - (JSC::JSObject::locationForOffset): - (JSC::JSObject::getDirectOffset): - (JSC::JSObject::putDirectOffset): - (JSC::JSObject::createStructure): - (JSC::asObject): - (JSC::JSObject::prototype): - (JSC::JSObject::setPrototype): - (JSC::JSValue::isObject): - (JSC::JSObject::inlineGetOwnPropertySlot): - (JSC::JSObject::getOwnPropertySlotForWrite): - (JSC::JSObject::getPropertySlot): - (JSC::JSObject::get): - (JSC::JSObject::putDirect): - (JSC::JSObject::putDirectWithoutTransition): - (JSC::JSObject::toPrimitive): - (JSC::JSValue::get): - (JSC::JSValue::put): - (JSC::JSObject::allocatePropertyStorageInline): - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::toPrimitive): - (JSC::JSPropertyNameIterator::getPrimitiveNumber): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::create): - (JSC::JSPropertyNameIterator::next): - * runtime/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::put): - (JSC::JSStaticScopeObject::putWithAttributes): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::JSStaticScopeObject): - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSString.cpp: - (JSC::JSString::toPrimitive): - (JSC::JSString::getPrimitiveNumber): - (JSC::JSString::getOwnPropertySlot): - * runtime/JSString.h: - (JSC::JSString::createStructure): - (JSC::asString): - (JSC::isJSString): - (JSC::JSValue::toThisJSString): - * runtime/JSValue.cpp: - (JSC::JSValue::toInteger): - (JSC::JSValue::toIntegerPreserveNaN): - * runtime/JSValue.h: - (JSC::JSValue::makeImmediate): - (JSC::JSValue::asValue): - (JSC::noValue): - (JSC::jsImpossibleValue): - (JSC::jsNull): - (JSC::jsUndefined): - (JSC::jsBoolean): - (JSC::operator==): - (JSC::operator!=): - (JSC::JSValue::encode): - (JSC::JSValue::decode): - (JSC::JSValue::JSValue): - (JSC::JSValue::operator bool): - (JSC::JSValue::operator==): - (JSC::JSValue::operator!=): - (JSC::JSValue::isUndefined): - (JSC::JSValue::isNull): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::symbolTablePut): - (JSC::JSVariableObject::symbolTablePutWithAttributes): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::internalValue): - (JSC::JSWrapperObject::setInternalValue): - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/Lookup.h: - (JSC::lookupPut): - * runtime/MathObject.cpp: - (JSC::mathProtoFuncAbs): - (JSC::mathProtoFuncACos): - (JSC::mathProtoFuncASin): - (JSC::mathProtoFuncATan): - (JSC::mathProtoFuncATan2): - (JSC::mathProtoFuncCeil): - (JSC::mathProtoFuncCos): - (JSC::mathProtoFuncExp): - (JSC::mathProtoFuncFloor): - (JSC::mathProtoFuncLog): - (JSC::mathProtoFuncMax): - (JSC::mathProtoFuncMin): - (JSC::mathProtoFuncPow): - (JSC::mathProtoFuncRandom): - (JSC::mathProtoFuncRound): - (JSC::mathProtoFuncSin): - (JSC::mathProtoFuncSqrt): - (JSC::mathProtoFuncTan): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NativeErrorConstructor.cpp: - (JSC::callNativeErrorConstructor): - * runtime/NumberConstructor.cpp: - (JSC::numberConstructorNaNValue): - (JSC::numberConstructorNegInfinity): - (JSC::numberConstructorPosInfinity): - (JSC::numberConstructorMaxValue): - (JSC::numberConstructorMinValue): - (JSC::callNumberConstructor): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.cpp: - (JSC::NumberObject::getJSNumber): - (JSC::constructNumber): - * runtime/NumberObject.h: - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): - (JSC::numberProtoFuncToLocaleString): - (JSC::numberProtoFuncValueOf): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToExponential): - (JSC::numberProtoFuncToPrecision): - * runtime/ObjectConstructor.cpp: - (JSC::constructObject): - (JSC::callObjectConstructor): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncValueOf): - (JSC::objectProtoFuncHasOwnProperty): - (JSC::objectProtoFuncIsPrototypeOf): - (JSC::objectProtoFuncDefineGetter): - (JSC::objectProtoFuncDefineSetter): - (JSC::objectProtoFuncLookupGetter): - (JSC::objectProtoFuncLookupSetter): - (JSC::objectProtoFuncPropertyIsEnumerable): - (JSC::objectProtoFuncToLocaleString): - (JSC::objectProtoFuncToString): - * runtime/ObjectPrototype.h: - * runtime/Operations.cpp: - (JSC::JSValue::equalSlowCase): - (JSC::JSValue::strictEqualSlowCase): - (JSC::throwOutOfMemoryError): - (JSC::jsAddSlowCase): - (JSC::jsTypeStringForValue): - (JSC::jsIsObjectType): - (JSC::jsIsFunctionType): - * runtime/Operations.h: - (JSC::JSValue::equal): - (JSC::JSValue::equalSlowCaseInline): - (JSC::JSValue::strictEqual): - (JSC::JSValue::strictEqualSlowCaseInline): - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::jsAdd): - (JSC::countPrototypeChainEntriesAndCheckForProxies): - (JSC::resolveBase): - * runtime/PropertySlot.cpp: - (JSC::PropertySlot::functionGetter): - * runtime/PropertySlot.h: - (JSC::PropertySlot::PropertySlot): - (JSC::PropertySlot::getValue): - (JSC::PropertySlot::putValue): - (JSC::PropertySlot::setValueSlot): - (JSC::PropertySlot::setValue): - (JSC::PropertySlot::setCustom): - (JSC::PropertySlot::setCustomIndex): - (JSC::PropertySlot::slotBase): - (JSC::PropertySlot::setBase): - (JSC::PropertySlot::): - * runtime/Protect.h: - (JSC::gcProtect): - (JSC::gcUnprotect): - (JSC::ProtectedPtr::operator JSValue): - (JSC::ProtectedJSValue::ProtectedJSValue): - (JSC::ProtectedJSValue::get): - (JSC::ProtectedJSValue::operator JSValue): - (JSC::ProtectedJSValue::operator->): - (JSC::ProtectedJSValue::~ProtectedJSValue): - (JSC::ProtectedJSValue::operator=): - (JSC::operator==): - (JSC::operator!=): - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::getBackref): - (JSC::RegExpConstructor::getLastParen): - (JSC::RegExpConstructor::getLeftContext): - (JSC::RegExpConstructor::getRightContext): - (JSC::regExpConstructorDollar1): - (JSC::regExpConstructorDollar2): - (JSC::regExpConstructorDollar3): - (JSC::regExpConstructorDollar4): - (JSC::regExpConstructorDollar5): - (JSC::regExpConstructorDollar6): - (JSC::regExpConstructorDollar7): - (JSC::regExpConstructorDollar8): - (JSC::regExpConstructorDollar9): - (JSC::regExpConstructorInput): - (JSC::regExpConstructorMultiline): - (JSC::regExpConstructorLastMatch): - (JSC::regExpConstructorLastParen): - (JSC::regExpConstructorLeftContext): - (JSC::regExpConstructorRightContext): - (JSC::RegExpConstructor::put): - (JSC::setRegExpConstructorInput): - (JSC::setRegExpConstructorMultiline): - (JSC::constructRegExp): - (JSC::callRegExpConstructor): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - (JSC::asRegExpConstructor): - * runtime/RegExpMatchesArray.h: - (JSC::RegExpMatchesArray::put): - * runtime/RegExpObject.cpp: - (JSC::regExpObjectGlobal): - (JSC::regExpObjectIgnoreCase): - (JSC::regExpObjectMultiline): - (JSC::regExpObjectSource): - (JSC::regExpObjectLastIndex): - (JSC::RegExpObject::put): - (JSC::setRegExpObjectLastIndex): - (JSC::RegExpObject::test): - (JSC::RegExpObject::exec): - (JSC::callRegExpObject): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - (JSC::asRegExpObject): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncTest): - (JSC::regExpProtoFuncExec): - (JSC::regExpProtoFuncCompile): - (JSC::regExpProtoFuncToString): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCodeSlowCase): - (JSC::stringFromCharCode): - (JSC::callStringConstructor): - * runtime/StringObject.cpp: - (JSC::StringObject::put): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - (JSC::asStringObject): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncToString): - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncConcat): - (JSC::stringProtoFuncIndexOf): - (JSC::stringProtoFuncLastIndexOf): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - (JSC::stringProtoFuncSlice): - (JSC::stringProtoFuncSplit): - (JSC::stringProtoFuncSubstr): - (JSC::stringProtoFuncSubstring): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncLocaleCompare): - (JSC::stringProtoFuncBig): - (JSC::stringProtoFuncSmall): - (JSC::stringProtoFuncBlink): - (JSC::stringProtoFuncBold): - (JSC::stringProtoFuncFixed): - (JSC::stringProtoFuncItalics): - (JSC::stringProtoFuncStrike): - (JSC::stringProtoFuncSub): - (JSC::stringProtoFuncSup): - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): - (JSC::stringProtoFuncLink): - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::changePrototypeTransition): - * runtime/Structure.h: - (JSC::Structure::create): - (JSC::Structure::setPrototypeWithoutTransition): - (JSC::Structure::storedPrototype): - -2009-05-01 Geoffrey Garen - - Reviewed by Sam "That doesn't look like what I thought it looks like" Weinig. - - Beefed up the JSValuePtr class and removed some non-JSValuePtr dependencies - on JSImmediate, in prepapration for making JSImmediate an implementation - detail of JSValuePtr. - - SunSpider reports no change. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_mod): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncParseInt): Updated for interface changes. - - * runtime/JSImmediate.h: - (JSC::JSValuePtr::JSValuePtr): - * runtime/JSValue.h: - (JSC::JSValuePtr::): - (JSC::jsImpossibleValue): - (JSC::jsNull): - (JSC::jsUndefined): - (JSC::jsBoolean): - (JSC::JSValuePtr::encode): - (JSC::JSValuePtr::decode): - (JSC::JSValuePtr::JSValuePtr): - (JSC::JSValuePtr::operator bool): - (JSC::JSValuePtr::operator==): - (JSC::JSValuePtr::operator!=): - (JSC::JSValuePtr::isUndefined): - (JSC::JSValuePtr::isNull): Changed jsImpossibleValue(), jsNull(), - jsUndefined(), and jsBoolean() to operate in terms of JSValuePtr instead - of JSImmediate. - - * wtf/StdLibExtras.h: - (WTF::bitwise_cast): Fixed up for clarity. - -2009-04-30 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug fix for rdar:/6845379. If a case-insensitive regex contains - a character class containing a range with an upper bound of \uFFFF - the parser will infinite-loop whist adding other-case characters - for characters in the range that do have another case. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::CharacterClassConstructor::putRange): - -2009-04-30 Gavin Barraclough - - Reviewed by Oliver Hunt. - - OPCODE_SAMPLING without CODEBLOCK_SAMPLING is currently broken, - since SamplingTool::Sample::isNull() checks the m_codeBlock - member (which is always null without CODEBLOCK_SAMPLING). - - Restructure the checks so make this work again. - - * bytecode/SamplingTool.cpp: - (JSC::SamplingTool::doRun): - * bytecode/SamplingTool.h: - (JSC::SamplingTool::Sample::isNull): - -2009-04-30 Maciej Stachowiak - - Reviewed by Gavin Barraclough. - - - Concatenate final three strings in simple replace case at one go - - ~0.2% SunSpider speedup - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): Use new replaceRange helper instead of - taking substrings and concatenating three strings. - * runtime/UString.cpp: - (JSC::UString::replaceRange): New helper function. - * runtime/UString.h: - -2009-04-30 Geoffrey Garen - - Rubber Stamped by Gavin Barraclough. - - Changed JSValueEncodedAsPtr* => EncodedJSValuePtr to support a non-pointer - encoding for JSValuePtrs. - - * API/APICast.h: - (toJS): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::JSValueHashTraits::constructDeletedValue): - (JSC::BytecodeGenerator::JSValueHashTraits::isDeletedValue): - * interpreter/Register.h: - (JSC::Register::): - * jit/JIT.cpp: - (JSC::): - * jit/JIT.h: - * jit/JITCode.h: - (JSC::): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_add): - (JSC::JITStubs::cti_op_pre_inc): - (JSC::JITStubs::cti_op_get_by_id_generic): - (JSC::JITStubs::cti_op_get_by_id): - (JSC::JITStubs::cti_op_get_by_id_second): - (JSC::JITStubs::cti_op_get_by_id_self_fail): - (JSC::JITStubs::cti_op_get_by_id_proto_list): - (JSC::JITStubs::cti_op_get_by_id_proto_list_full): - (JSC::JITStubs::cti_op_get_by_id_proto_fail): - (JSC::JITStubs::cti_op_get_by_id_array_fail): - (JSC::JITStubs::cti_op_get_by_id_string_fail): - (JSC::JITStubs::cti_op_instanceof): - (JSC::JITStubs::cti_op_del_by_id): - (JSC::JITStubs::cti_op_mul): - (JSC::JITStubs::cti_op_call_NotJSFunction): - (JSC::JITStubs::cti_op_resolve): - (JSC::JITStubs::cti_op_construct_NotJSConstruct): - (JSC::JITStubs::cti_op_get_by_val): - (JSC::JITStubs::cti_op_get_by_val_string): - (JSC::JITStubs::cti_op_get_by_val_byte_array): - (JSC::JITStubs::cti_op_sub): - (JSC::JITStubs::cti_op_lesseq): - (JSC::JITStubs::cti_op_negate): - (JSC::JITStubs::cti_op_resolve_base): - (JSC::JITStubs::cti_op_resolve_skip): - (JSC::JITStubs::cti_op_resolve_global): - (JSC::JITStubs::cti_op_div): - (JSC::JITStubs::cti_op_pre_dec): - (JSC::JITStubs::cti_op_not): - (JSC::JITStubs::cti_op_eq): - (JSC::JITStubs::cti_op_lshift): - (JSC::JITStubs::cti_op_bitand): - (JSC::JITStubs::cti_op_rshift): - (JSC::JITStubs::cti_op_bitnot): - (JSC::JITStubs::cti_op_mod): - (JSC::JITStubs::cti_op_less): - (JSC::JITStubs::cti_op_neq): - (JSC::JITStubs::cti_op_urshift): - (JSC::JITStubs::cti_op_bitxor): - (JSC::JITStubs::cti_op_bitor): - (JSC::JITStubs::cti_op_call_eval): - (JSC::JITStubs::cti_op_throw): - (JSC::JITStubs::cti_op_next_pname): - (JSC::JITStubs::cti_op_typeof): - (JSC::JITStubs::cti_op_is_undefined): - (JSC::JITStubs::cti_op_is_boolean): - (JSC::JITStubs::cti_op_is_number): - (JSC::JITStubs::cti_op_is_string): - (JSC::JITStubs::cti_op_is_object): - (JSC::JITStubs::cti_op_is_function): - (JSC::JITStubs::cti_op_stricteq): - (JSC::JITStubs::cti_op_nstricteq): - (JSC::JITStubs::cti_op_to_jsnumber): - (JSC::JITStubs::cti_op_in): - (JSC::JITStubs::cti_op_del_by_val): - (JSC::JITStubs::cti_vm_throw): - * jit/JITStubs.h: - * runtime/JSValue.h: - (JSC::JSValuePtr::encode): - (JSC::JSValuePtr::decode): - -2009-04-30 Gavin Barraclough - - Reviewed by Oliver "Abandon Ship!" Hunt. - - Fix a leak in Yarr. - - All Disjunctions should be recorded in RegexPattern::m_disjunctions, - so that they can be freed at the end of compilation - copyDisjunction - is failing to do so. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::copyDisjunction): - -2009-04-30 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Add function to CallFrame for dumping the current JS caller - - Added debug only method CallFrame::dumpCaller() that provide the call location - of the deepest currently executing JS function. - - * interpreter/CallFrame.cpp: - (JSC::CallFrame::dumpCaller): - * interpreter/CallFrame.h: - -2009-04-30 Maciej Stachowiak - - Reviewed by Geoff Garen. - - - make BaseStrings have themselves as a base, instead of nothing, to remove common branches - - ~0.7% SunSpider speedup - - * runtime/UString.h: - (JSC::UString::Rep::Rep): For the constructor without a base, set self as base instead of null. - (JSC::UString::Rep::baseString): Just read m_baseString - no more branching. - -2009-04-30 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Two quick improvements to SamplingFlags mechanism. - - SamplingFlags::ScopedFlag class to provide support for automagically - clearing a flag as it goes out of scope, and add a little more detail - to the output generated by the tool. - - * bytecode/SamplingTool.cpp: - (JSC::SamplingFlags::stop): - * bytecode/SamplingTool.h: - (JSC::SamplingFlags::ScopedFlag::ScopedFlag): - (JSC::SamplingFlags::ScopedFlag::~ScopedFlag): - -2009-04-30 Adam Roben - - Restore build event steps that were truncated in r43082 - - Rubber-stamped by Steve Falkenburg. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: - Re-copied the command lines for the build events from the pre-r43082 - .vcproj files. - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Removed an unnecessary - attribute. - -2009-04-30 Adam Roben - - Move settings from .vcproj files to .vsprops files within the - JavaScriptCore directory - - Moving the settings to a .vsprops file means that we will only have to - change a single setting to affect all configurations, instead of one - setting per configuration. - - Reviewed by Steve Falkenburg. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - Moved settings from these files to the new .vsprops files. Note that - testapi.vcproj had a lot of overrides of default settings that were - the same as the defaults, which I've removed. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added. - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added. - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added. - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added. - -2009-04-30 Dimitri Glazkov - - Reviewed by Timothy Hatcher. - - https://bugs.webkit.org/show_bug.cgi?id=25470 - Extend the cover of ENABLE_JAVASCRIPT_DEBUGGER to profiler. - - * Configurations/FeatureDefines.xcconfig: Added ENABLE_JAVASCRIPT_DEBUGGER define. - -2009-04-30 Maciej Stachowiak - - Reviewed by Alexey Proskuryakov. - - - speed up string concatenation by reorganizing some simple cases - - 0.7% SunSpider speedup - - * runtime/UString.cpp: - (JSC::concatenate): Put fast case for appending a single character - before the empty string special cases; streamline code a bit to - delay computing values that are not needed in the fast path. - -2009-04-30 Gavin Barraclough - - Reviewed by Maciej Stachowiak. - - Add SamplingFlags mechanism. - - This mechanism allows fine-grained JSC and JavaScript program aware - performance measurement. The mechanism provides a set of 32 flags, - numbered #1..#32. Flag #16 is initially set, and all other flags - are cleared. Flags may be set and cleared from within - - Enable by setting ENABLE_SAMPLING_FLAGS to 1 in wtf/Platform.h. - Disabled by default, no performance impact. Flags may be modified - by calling SamplingFlags::setFlag() and SamplingFlags::clearFlag() - from within JSC implementation, or by calling setSamplingFlag() and - clearSamplingFlag() from JavaScript. - - The flags are sampled with a frequency of 10000Hz, and the highest - set flag in recorded, allowing multiple events to be measured (with - the highest flag number representing the highest priority). - - Disabled by default; no performance impact. - - * JavaScriptCore.exp: - * bytecode/SamplingTool.cpp: - (JSC::SamplingFlags::sample): - (JSC::SamplingFlags::start): - (JSC::SamplingFlags::stop): - (JSC::SamplingThread::threadStartFunc): - (JSC::SamplingThread::start): - (JSC::SamplingThread::stop): - (JSC::ScopeSampleRecord::sample): - (JSC::SamplingTool::doRun): - (JSC::SamplingTool::sample): - (JSC::SamplingTool::start): - (JSC::SamplingTool::stop): - * bytecode/SamplingTool.h: - (JSC::SamplingFlags::setFlag): - (JSC::SamplingFlags::clearFlag): - (JSC::SamplingTool::SamplingTool): - * jsc.cpp: - (GlobalObject::GlobalObject): - (functionSetSamplingFlag): - (functionClearSamplingFlag): - (runWithScripts): - * wtf/Platform.h: - -2009-04-29 Sam Weinig - - Another attempt to fix the windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-04-29 Sam Weinig - - Try and fix the windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-04-29 Gavin Barraclough - - Reviewed by Oliver "Peg-Leg" Hunt. - - Coallesce input checking and reduce futzing with the index position - between alternatives and iterations of the main loop of a regex, - when run in YARR. - - Consider the following regex: /foo|bar/ - - Prior to this patch, this will be implemented something like this pseudo-code description: - - loop: - check_for_available_input(3) // this increments the index by 3, for the first alterantive. - if (available) { test "foo" } - decrement_index(3) - check_for_available_input(3) // this increments the index by 3, for the second alterantive. - if (available) { test "bar" } - decrement_index(3) - check_for_available_input(1) // can we loop again? - if (available) { goto loop } - - With these changes it will look more like this: - - check_for_available_input(3) // this increments the index by 3, for the first alterantive. - if (!available) { goto fail } - loop: - test "foo" - test "bar" - check_for_available_input(1) // can we loop again? - if (available) { goto loop } - fail: - - - This gives about a 5% gain on v8-regex, no change on Sunspider. - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo): - (JSC::Yarr::RegexGenerator::generateDisjunction): - -2009-04-29 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Clean up ArgList to be a trivial type - - Separate out old ArgList logic to handle buffering and marking arguments - into a distinct MarkedArgumentBuffer type. ArgList becomes a trivial - struct of a pointer and length. - - * API/JSObjectRef.cpp: - (JSObjectMakeFunction): - (JSObjectMakeArray): - (JSObjectMakeDate): - (JSObjectMakeError): - (JSObjectMakeRegExp): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - * JavaScriptCore.exp: - * interpreter/CallFrame.h: - (JSC::ExecState::emptyList): - * runtime/ArgList.cpp: - (JSC::ArgList::getSlice): - (JSC::MarkedArgumentBuffer::markLists): - (JSC::MarkedArgumentBuffer::slowAppend): - * runtime/ArgList.h: - (JSC::MarkedArgumentBuffer::MarkedArgumentBuffer): - (JSC::MarkedArgumentBuffer::~MarkedArgumentBuffer): - (JSC::ArgList::ArgList): - (JSC::ArgList::at): - (JSC::ArgList::isEmpty): - (JSC::ArgList::size): - (JSC::ArgList::begin): - (JSC::ArgList::end): - * runtime/Arguments.cpp: - (JSC::Arguments::fillArgList): - * runtime/Arguments.h: - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncConcat): - (JSC::arrayProtoFuncPush): - (JSC::arrayProtoFuncSort): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncReduce): - (JSC::arrayProtoFuncReduceRight): - * runtime/Collector.cpp: - (JSC::Heap::collect): - * runtime/Collector.h: - (JSC::Heap::markListSet): - * runtime/CommonIdentifiers.h: - * runtime/Error.cpp: - (JSC::Error::create): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncApply): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): - (JSC::JSArray::fillArgList): - (JSC::constructArray): - * runtime/JSArray.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSObject.cpp: - (JSC::JSObject::put): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCodeSlowCase): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncConcat): - (JSC::stringProtoFuncMatch): - -2009-04-29 Laszlo Gombos - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=25334 - - Fix Qt build when ENABLE_JIT is explicitly set to 1 - to overrule defaults. - - * JavaScriptCore.pri: - -2009-04-29 Oliver Hunt - - Reviewed by Steve Falkenburg. - - Crash in profiler due to incorrect assuming displayName would be a string. - - Fixed by adding a type guard. - - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::displayName): - -2009-04-28 Geoffrey Garen - - Rubber stamped by Beth Dakin. - - Removed scaffolding supporting dynamically converting between 32bit and - 64bit value representations. - - * API/JSCallbackConstructor.cpp: - (JSC::constructJSCallback): - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::call): - * API/JSCallbackObjectFunctions.h: - (JSC::::construct): - (JSC::::call): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getConstant): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitEqualityOp): - * interpreter/CallFrame.cpp: - (JSC::CallFrame::thisValue): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - (JSC::Interpreter::throwException): - (JSC::Interpreter::createExceptionScope): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): - * interpreter/Register.h: - (JSC::Register::): - (JSC::Register::Register): - (JSC::Register::jsValue): - (JSC::Register::marked): - (JSC::Register::mark): - (JSC::Register::i): - (JSC::Register::activation): - (JSC::Register::arguments): - (JSC::Register::callFrame): - (JSC::Register::codeBlock): - (JSC::Register::function): - (JSC::Register::propertyNameIterator): - (JSC::Register::scopeChain): - (JSC::Register::vPC): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_call_NotJSFunction): - (JSC::JITStubs::cti_op_load_varargs): - (JSC::JITStubs::cti_op_call_eval): - * jsc.cpp: - (functionPrint): - (functionDebug): - (functionRun): - (functionLoad): - * runtime/ArgList.h: - (JSC::ArgList::at): - * runtime/Arguments.cpp: - (JSC::Arguments::copyToRegisters): - (JSC::Arguments::fillArgList): - (JSC::Arguments::getOwnPropertySlot): - * runtime/ArrayConstructor.cpp: - (JSC::constructArrayWithSizeQuirk): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncJoin): - (JSC::arrayProtoFuncConcat): - (JSC::arrayProtoFuncPush): - (JSC::arrayProtoFuncSlice): - (JSC::arrayProtoFuncSort): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncReduce): - (JSC::arrayProtoFuncReduceRight): - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/BooleanConstructor.cpp: - (JSC::constructBoolean): - (JSC::callBooleanConstructor): - * runtime/DateConstructor.cpp: - (JSC::constructDate): - (JSC::dateParse): - (JSC::dateUTC): - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - (JSC::fillStructuresUsingTimeArgs): - (JSC::fillStructuresUsingDateArgs): - (JSC::dateProtoFuncSetTime): - (JSC::dateProtoFuncSetYear): - * runtime/ErrorConstructor.cpp: - (JSC::constructError): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncApply): - (JSC::functionProtoFuncCall): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::constructArray): - * runtime/JSArray.h: - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEval): - (JSC::globalFuncParseInt): - (JSC::globalFuncParseFloat): - (JSC::globalFuncIsNaN): - (JSC::globalFuncIsFinite): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - (JSC::globalFuncJSCPrint): - * runtime/MathObject.cpp: - (JSC::mathProtoFuncAbs): - (JSC::mathProtoFuncACos): - (JSC::mathProtoFuncASin): - (JSC::mathProtoFuncATan): - (JSC::mathProtoFuncATan2): - (JSC::mathProtoFuncCeil): - (JSC::mathProtoFuncCos): - (JSC::mathProtoFuncExp): - (JSC::mathProtoFuncFloor): - (JSC::mathProtoFuncLog): - (JSC::mathProtoFuncMax): - (JSC::mathProtoFuncMin): - (JSC::mathProtoFuncPow): - (JSC::mathProtoFuncRound): - (JSC::mathProtoFuncSin): - (JSC::mathProtoFuncSqrt): - (JSC::mathProtoFuncTan): - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::construct): - * runtime/NumberConstructor.cpp: - (JSC::constructWithNumberConstructor): - (JSC::callNumberConstructor): - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToExponential): - (JSC::numberProtoFuncToPrecision): - * runtime/ObjectConstructor.cpp: - (JSC::constructObject): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncHasOwnProperty): - (JSC::objectProtoFuncIsPrototypeOf): - (JSC::objectProtoFuncDefineGetter): - (JSC::objectProtoFuncDefineSetter): - (JSC::objectProtoFuncLookupGetter): - (JSC::objectProtoFuncLookupSetter): - (JSC::objectProtoFuncPropertyIsEnumerable): - * runtime/PropertySlot.h: - (JSC::PropertySlot::getValue): - * runtime/RegExpConstructor.cpp: - (JSC::constructRegExp): - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::match): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncCompile): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCodeSlowCase): - (JSC::stringFromCharCode): - (JSC::constructWithStringConstructor): - (JSC::callStringConstructor): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncConcat): - (JSC::stringProtoFuncIndexOf): - (JSC::stringProtoFuncLastIndexOf): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - (JSC::stringProtoFuncSlice): - (JSC::stringProtoFuncSplit): - (JSC::stringProtoFuncSubstr): - (JSC::stringProtoFuncSubstring): - (JSC::stringProtoFuncLocaleCompare): - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): - (JSC::stringProtoFuncLink): - -2009-04-28 David Kilzer - - A little more hardening for UString - - Reviewed by Maciej Stachowiak. - - Revised fix for in r42644. - - * runtime/UString.cpp: - (JSC::newCapacityWithOverflowCheck): Added. - (JSC::concatenate): Used newCapacityWithOverflowCheck(). - (JSC::UString::append): Ditto. - -2009-04-28 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Bring back r42969, this time with correct codegen - - Add logic to the codegen for right shift to avoid jumping to a helper function - when shifting a small floating point value. - - * jit/JITArithmetic.cpp: - (isSSE2Present): - (JSC::JIT::compileFastArith_op_rshift): - (JSC::JIT::compileFastArithSlow_op_rshift): - -2009-04-28 Kevin Ollivier - - wxMSW build fix. Switch JSCore build back to static. - - * API/JSBase.h: - * config.h: - * jscore.bkl: - -2009-04-28 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Roll out r42969, due to hangs in build bot. - - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_rshift): - (JSC::JIT::compileFastArithSlow_op_rshift): - (JSC::isSSE2Present): - -2009-04-28 Xan Lopez - - Unreviewed: fix distcheck build, add (even more) missing files to list. - - * GNUmakefile.am: - -2009-04-28 Oliver Hunt - - Reviewed by Geoff Garen. - - Improve performance of string indexing - - Add a cti_get_by_val_string function to specialise indexing into a string object. - This gives us a slight performance win on a number of string tests. - - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_get_by_val): - (JSC::JITStubs::cti_op_get_by_val_string): - * jit/JITStubs.h: - -2009-04-28 Oliver Hunt - - Reviewed by Geoff Garen. - - Improve performance of right shifts of large or otherwise floating point values. - - Add logic to the codegen for right shift to avoid jumping to a helper function - when shifting a small floating point value. - - * jit/JITArithmetic.cpp: - (isSSE2Present): Moved to the head of file. - (JSC::JIT::compileFastArith_op_rshift): - (JSC::JIT::compileFastArithSlow_op_rshift): - -2009-04-28 Xan Lopez - - Unreviewed: fix distcheck build, add (more) missing files to list. - - * GNUmakefile.am: - -2009-04-28 Xan Lopez - - Unreviewed: fix distcheck build, add missing header to file list. - - * GNUmakefile.am: - -2009-04-28 Gavin Barraclough - - Rubber stamped by Maciej "Henry Morgan" Stachowiak. - - Enable YARR. - (Again.) - - * wtf/Platform.h: - -2009-04-27 Gavin Barraclough - - Reviewed by Maciej Stachowiak. - - Tweak a loop condition to keep GCC happy, - some GCCs seem to be having issues with this. :-/ - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::breakTarget): - * wtf/Platform.h: - -2009-04-27 Adam Roben - - Windows Debug build fix - - Not sure why the buildbots weren't affected by this problem. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Let VS - re-order the file list, and added JavaScriptCore[_debug].def to the - project. This was not necessary for the fix, but made making the fix - easier. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - Removed a function that no longer exists. - -2009-04-26 Gavin Barraclough - - Reviewed by Weinig Sam. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=25416 - "Cached prototype accesses unsafely hoist property storage load above structure checks." - - Do not hoist the load of the pointer to the property storage array. - - No performance impact. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - -2009-04-26 Gavin Barraclough - - Reviewed by Geoffrey "Gaffe or energy?" Garen. - - Randomize address requested by ExecutableAllocatorFixedVMPool. - - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - -2009-04-26 Sam Weinig - - Reviewed by Eric Seidel. - - Remove scons-based build system. - - * JavaScriptCore.scons: Removed. - -2009-04-25 Oliver Hunt - - Reviewed by NOBODY (Buildfix). - - Make HAVE_MADV_FREE darwin only for now - - * wtf/Platform.h: - -2009-04-25 Jan Michael Alonzo - - Reviewed by Oliver Hunt. - - Gtk build fix - check if we have MADV_FREE before using it. - - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::releaseExcessCapacity): - * wtf/Platform.h: - -2009-04-24 Kevin Ollivier - - wx build fix. Switching JSCore from a static lib to a dynamic lib - to match the Apple build and fix symbol exports. - - * jscore.bkl: - -2009-04-24 Laszlo Gombos - - Rubber-stamped by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=25337 - Move ThreadingQt.cpp under the qt directory. - - * JavaScriptCore.pri: - * wtf/ThreadingQt.cpp: Removed. - * wtf/qt/ThreadingQt.cpp: Copied from JavaScriptCore/wtf/ThreadingQt.cpp. - -2009-04-24 Laszlo Gombos - - Rubber-stamped by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=25338 - Move ThreadingGtk.cpp under the gtk directory. - - * GNUmakefile.am: - * wtf/ThreadingGtk.cpp: Removed. - * wtf/gtk/ThreadingGtk.cpp: Copied from JavaScriptCore/wtf/ThreadingGtk.cpp. - -2009-04-24 Gavin Barraclough - - Reviewed by Sam "Wesley" Weinig. - - Improve performance to YARR interpreter. - (From about 3x slower than PCRE on regex-dna to about 30% slower). - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets): - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::checkCharacter): - (JSC::Yarr::Interpreter::checkCasedCharacter): - (JSC::Yarr::Interpreter::backtrackPatternCharacter): - (JSC::Yarr::Interpreter::backtrackPatternCasedCharacter): - (JSC::Yarr::Interpreter::matchParentheticalAssertionBegin): - (JSC::Yarr::Interpreter::matchParentheticalAssertionEnd): - (JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin): - (JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd): - (JSC::Yarr::Interpreter::matchDisjunction): - (JSC::Yarr::Interpreter::interpret): - (JSC::Yarr::ByteCompiler::atomPatternCharacter): - (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): - (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): - (JSC::Yarr::ByteCompiler::closeAlternative): - (JSC::Yarr::ByteCompiler::closeBodyAlternative): - (JSC::Yarr::ByteCompiler::atomParenthesesEnd): - (JSC::Yarr::ByteCompiler::regexBegin): - (JSC::Yarr::ByteCompiler::regexEnd): - (JSC::Yarr::ByteCompiler::alterantiveBodyDisjunction): - (JSC::Yarr::ByteCompiler::alterantiveDisjunction): - (JSC::Yarr::ByteCompiler::emitDisjunction): - * yarr/RegexInterpreter.h: - (JSC::Yarr::ByteTerm::): - (JSC::Yarr::ByteTerm::ByteTerm): - (JSC::Yarr::ByteTerm::BodyAlternativeBegin): - (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction): - (JSC::Yarr::ByteTerm::BodyAlternativeEnd): - (JSC::Yarr::ByteTerm::AlternativeBegin): - (JSC::Yarr::ByteTerm::AlternativeDisjunction): - (JSC::Yarr::ByteTerm::AlternativeEnd): - (JSC::Yarr::ByteTerm::SubpatternBegin): - (JSC::Yarr::ByteTerm::SubpatternEnd): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateParentheticalAssertion): - * yarr/RegexPattern.h: - -2009-04-24 Rob Raguet-Schofield - - Rubber-stamped by Mark Rowe. - - * wtf/CurrentTime.h: Fix a typo in a comment. - -2009-04-24 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Add reinterpret_cast - - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::releaseExcessCapacity): - -2009-04-23 Oliver Hunt - - Reviewed by Geoff Garen. - - JavaScript register file should remap to release physical pages accumulated during deep recursion - - We now track the maximum extent of the RegisterFile, and when we reach the final - return from JS (so the stack portion of the registerfile becomes empty) we see - if that extent is greater than maxExcessCapacity. If it is we use madvise or - VirtualFree to release the physical pages that were backing the excess. - - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::releaseExcessCapacity): - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - (JSC::RegisterFile::shrink): - (JSC::RegisterFile::grow): - -2009-04-23 Mark Rowe - - With great sadness and a heavy heart I switch us back from YARR to WREC in - order to restore greenness to the world once more. - - * wtf/Platform.h: - -2009-04-23 Mark Rowe - - More Windows build fixage. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-04-23 Mark Rowe - - Attempt to fix the Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove a symbol that no longer exists. - -2009-04-23 Francisco Tolmasky - - BUG 24604: WebKit profiler reports incorrect total times - - - Reviewed by Timothy Hatcher and Kevin McCullough. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * profiler/CallIdentifier.h: - (JSC::CallIdentifier::Hash::hash): - (JSC::CallIdentifier::Hash::equal): - (JSC::CallIdentifier::hash): - (WTF::): - * profiler/HeavyProfile.cpp: Removed. - * profiler/HeavyProfile.h: Removed. - * profiler/Profile.cpp: No more need for TreeProfile/HeavyProfile - (JSC::Profile::create): - * profiler/Profile.h: - * profiler/ProfileNode.cpp: - * profiler/ProfileNode.h: - * profiler/TreeProfile.cpp: Removed. - * profiler/TreeProfile.h: Removed. - -2009-04-23 Gavin Barraclough - - Not Reviewed. - - Speculative Windows build fix II. - - * yarr/RegexInterpreter.cpp: - -2009-04-23 Gavin Barraclough - - Not Reviewed. - - Speculative Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * runtime/RegExp.cpp: - -2009-04-23 Gavin Barraclough - - Rubber stamped by salty sea dogs Sam & Geoff. - - Enable YARR_JIT by default (where supported), replacing WREC. - - * wtf/Platform.h: - -2009-04-23 Gavin Barraclough - - Reviewed by Geoff "Dread Pirate Roberts" Garen. - - Various small fixes to YARR JIT, in preparation for enabling it by default. - - * Correctly index into the callframe when storing restart addresses for - nested alternatives. - * Allow backtracking back into matched alternatives of parentheses. - * Fix callframe offset calculation for parenthetical assertions. - * When a set of parenthese are quantified with a fixed and variable portion, - and the variable portion is quantified once, this should not reset the - pattern match on failure to match (the last match from the firxed portion - should be preserved). - * Up the pattern size limit to match PCRE's new limit. - * Unlclosed parentheses should be reported with the message "missing )". - - * wtf/Platform.h: - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::quantifyAtom): - (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets): - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::matchParentheses): - (JSC::Yarr::Interpreter::backtrackParentheses): - (JSC::Yarr::ByteCompiler::emitDisjunction): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::loadFromFrameAndJump): - (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction): - (JSC::Yarr::RegexGenerator::generateParentheticalAssertion): - (JSC::Yarr::RegexGenerator::generateTerm): - (JSC::Yarr::executeRegex): - * yarr/RegexParser.h: - (JSC::Yarr::Parser::): - (JSC::Yarr::Parser::parseTokens): - (JSC::Yarr::Parser::parse): - * yarr/RegexPattern.h: - (JSC::Yarr::PatternTerm::): - (JSC::Yarr::PatternTerm::PatternTerm): - -2009-04-22 Mark Rowe - - Rubber-stamped by Gavin Barraclough. - - Add the m_ prefix on FixedVMPoolAllocator's member variables, and fix typos in a few comments. - - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::addToFreeList): - (JSC::FixedVMPoolAllocator::coalesceFreeSpace): - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::alloc): - (JSC::FixedVMPoolAllocator::free): - (JSC::FixedVMPoolAllocator::isWithinVMPool): - -2009-04-22 Mark Rowe - - Rubber-stamped by Gavin Barraclough. - - Add some assertions to FixedVMPoolAllocator to guard against cases where we - attempt to free memory that didn't originate from the pool, or we attempt to - hand out a bogus address from alloc. - - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::release): - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::alloc): - (JSC::FixedVMPoolAllocator::free): - (JSC::FixedVMPoolAllocator::isWithinVMPool): - -2009-04-22 Gavin Barraclough - - Rubber stamped by Sam "Blackbeard" Weinig. - - Although pirates do spell the word 'generate' as 'genertate', - webkit developers do not. Fixertate. - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateAssertionBOL): - (JSC::Yarr::RegexGenerator::generateAssertionEOL): - (JSC::Yarr::RegexGenerator::generateAssertionWordBoundary): - (JSC::Yarr::RegexGenerator::generatePatternCharacterSingle): - (JSC::Yarr::RegexGenerator::generatePatternCharacterPair): - (JSC::Yarr::RegexGenerator::generatePatternCharacterFixed): - (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy): - (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy): - (JSC::Yarr::RegexGenerator::generateCharacterClassSingle): - (JSC::Yarr::RegexGenerator::generateCharacterClassFixed): - (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy): - (JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy): - (JSC::Yarr::RegexGenerator::generateTerm): - -2009-04-22 Gavin Barraclough - - Reviewed by Sam "Blackbeard" Weinig. - - Improvements to YARR JIT. This patch expands support in three key areas: - * Add (temporary) support for falling back to PCRE for expressions not supported. - * Add support for x86_64 and Windows. - * Add support for singly quantified parentheses (? and ??), alternatives within - parentheses, and parenthetical assertions. - - * runtime/RegExp.cpp: - (JSC::RegExp::match): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::storeToFrame): - (JSC::Yarr::RegexGenerator::storeToFrameWithPatch): - (JSC::Yarr::RegexGenerator::loadFromFrameAndJump): - (JSC::Yarr::RegexGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord): - (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative): - (JSC::Yarr::RegexGenerator::TermGenerationState::resetTerm): - (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack): - (JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists): - (JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump): - (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks): - (JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom): - (JSC::Yarr::RegexGenerator::genertateAssertionBOL): - (JSC::Yarr::RegexGenerator::genertateAssertionEOL): - (JSC::Yarr::RegexGenerator::matchAssertionWordchar): - (JSC::Yarr::RegexGenerator::genertateAssertionWordBoundary): - (JSC::Yarr::RegexGenerator::genertatePatternCharacterSingle): - (JSC::Yarr::RegexGenerator::genertatePatternCharacterPair): - (JSC::Yarr::RegexGenerator::genertatePatternCharacterFixed): - (JSC::Yarr::RegexGenerator::genertatePatternCharacterGreedy): - (JSC::Yarr::RegexGenerator::genertatePatternCharacterNonGreedy): - (JSC::Yarr::RegexGenerator::genertateCharacterClassSingle): - (JSC::Yarr::RegexGenerator::genertateCharacterClassFixed): - (JSC::Yarr::RegexGenerator::genertateCharacterClassGreedy): - (JSC::Yarr::RegexGenerator::genertateCharacterClassNonGreedy): - (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction): - (JSC::Yarr::RegexGenerator::generateParenthesesSingle): - (JSC::Yarr::RegexGenerator::generateParentheticalAssertion): - (JSC::Yarr::RegexGenerator::generateTerm): - (JSC::Yarr::RegexGenerator::generateDisjunction): - (JSC::Yarr::RegexGenerator::generateEnter): - (JSC::Yarr::RegexGenerator::generateReturn): - (JSC::Yarr::RegexGenerator::RegexGenerator): - (JSC::Yarr::RegexGenerator::generate): - (JSC::Yarr::RegexGenerator::compile): - (JSC::Yarr::RegexGenerator::generationFailed): - (JSC::Yarr::jitCompileRegex): - (JSC::Yarr::executeRegex): - * yarr/RegexJIT.h: - (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): - (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): - -2009-04-22 Sam Weinig - - Rubber-stamped by Darin Adler. - - Fix for - Turn off Geolocation by default - - * Configurations/FeatureDefines.xcconfig: - -2009-04-22 Oliver Hunt - - Reviewed by NOBODY (Buildfix). - - * interpreter/CachedCall.h: - -2009-04-21 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - * runtime/StringPrototype.cpp: - -2009-04-21 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Improve String.replace performance slightly - - Apply our vm reentry caching logic to String.replace with global - regexes. - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - -2009-04-21 Geoffrey Garen - - Reviewed by Cameron Zwarich and Oliver Hunt. - - Re-Fixed REGRESSION: Stack overflow on PowerPC on - fast/workers/use-machine-stack.html (22531) - - SunSpider reports no change. - - Use a larger recursion limit on the main thread (because we can, and - there's some evidence that it may improve compatibility), and a smaller - recursion limit on secondary threads (because they tend to have smaller - stacks). - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - (JSC::Interpreter::prepareForRepeatCall): - * interpreter/Interpreter.h: - (JSC::): Ditto. I wrote the recursion test slightly funny, so that the - common case remains a simple compare to constant. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): Conservatively, set the array recursion limits - to the lower, secondary thread limit. We can do something fancier if - compatibility moves us, but this seems sufficient for now. - -2009-04-21 Geoffrey Garen - - Rubber-stamped by Adam Roben. - - Disabled one more Mozilla JS test because it fails intermittently on Windows. - (See https://bugs.webkit.org/show_bug.cgi?id=25160.) - - * tests/mozilla/expected.html: - -2009-04-21 Adam Roben - - Rename JavaScriptCore_debug.dll to JavaScriptCore.dll in the Debug - configuration - - This matches the naming scheme for WebKit.dll, and will be necessary - once Safari links against JavaScriptCore.dll. This change also causes - run-safari not to fail (because the launcher printed by FindSafari was - always looking for JavaScriptCore.dll, never - JavaScriptCore_debug.dll). - - Part of Bug 25305: can't run safari or drt on windows - - - Reviewed by Steve Falkenburg and Sam Weinig. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - Use $(WebKitDLLConfigSuffix) for naming JavaScriptCore.{dll,lib}. - -2009-04-21 Adam Roben - - Fix JavaScriptCore build on VC++ Express - - Reviewed by Steve Falkenburg and Sam Weinig. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Link - explicitly against gdi32.lib and oleaut32.lib. - -2009-04-21 Geoffrey Garen - - Reviewed by Mark Rowe. - - Tiger crash fix: Put VM tags in their own header file, and fixed up the - #ifdefs so they're not used on Tiger. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - * jit/ExecutableAllocatorPosix.cpp: - (JSC::ExecutablePool::systemAlloc): - * runtime/Collector.cpp: - (JSC::allocateBlock): - * wtf/VMTags.h: Added. - -2009-04-20 Steve Falkenburg - - More Windows build fixes. - - * JavaScriptCore.vcproj/JavaScriptCore.make: Copy DLLs, PDBs. - * JavaScriptCore.vcproj/JavaScriptCore.resources: Added. - * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist: Added. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Added. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add version stamping, resource copying. - -2009-04-20 Steve Falkenburg - - Separate JavaScriptCore.dll from WebKit.dll. - Slight performance improvement or no change on benchmarks. - - Allows us to break a circular dependency between CFNetwork and WebKit on Windows, - and simplifies standalone JavaScriptCore builds. - - Reviewed by Oliver Hunt. - - * API/JSBase.h: Export symbols with JS_EXPORT when using MSVC. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Build JavaScriptCore as a DLL instead of a static library. - * config.h: Specify __declspec(dllexport/dllimport) appropriately when exporting data. - * runtime/InternalFunction.h: Specify JS_EXPORTDATA on exported data. - * runtime/JSArray.h: Specify JS_EXPORTDATA on exported data. - * runtime/JSFunction.h: Specify JS_EXPORTDATA on exported data. - * runtime/StringObject.h: Specify JS_EXPORTDATA on exported data. - * runtime/UString.h: Specify JS_EXPORTDATA on exported data. - -2009-04-20 Sam Weinig - - Reviewed by Kevin McCullough. - - Always tag mmaped memory on darwin and clean up #defines - now that they are a little bigger. - - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - * jit/ExecutableAllocatorPosix.cpp: - (JSC::ExecutablePool::systemAlloc): - * runtime/Collector.cpp: - (JSC::allocateBlock): - -2009-04-20 Sam Weinig - - Rubber-stamped by Tim Hatcher. - - Add licenses for xcconfig files. - - * Configurations/Base.xcconfig: - * Configurations/DebugRelease.xcconfig: - * Configurations/FeatureDefines.xcconfig: - * Configurations/JavaScriptCore.xcconfig: - * Configurations/Version.xcconfig: - -2009-04-20 Ariya Hidayat - - Build fix for Qt port (after r42646). Not reviewed. - - * wtf/unicode/qt4/UnicodeQt4.h: Added U16_PREV. - -2009-04-19 Sam Weinig - - Reviewed by Darin Adler. - - Better fix for JSStringCreateWithCFString hardening. - - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): - -2009-04-19 Sam Weinig - - Reviewed by Dan Bernstein. - - Fix for - Harden JSStringCreateWithCFString against malformed CFStringRefs. - - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): - -2009-04-19 David Kilzer - - Make FEATURE_DEFINES completely dynamic - - Reviewed by Darin Adler. - - Make FEATURE_DEFINES depend on individual ENABLE_FEATURE_NAME - variables for each feature, making it possible to remove all - knowledge of FEATURE_DEFINES from build-webkit. - - * Configurations/FeatureDefines.xcconfig: Extract a variable - from FEATURE_DEFINES for each feature setting. - -2009-04-18 Sam Weinig - - Reviewed by Dan Bernstein. - - Fix typo. s/VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE/VM_MEMORY_JAVASCRIPT_CORE/ - - * runtime/Collector.cpp: - (JSC::allocateBlock): Fix bozo typo. - -2009-04-18 Sam Weinig - - Reviewed by Anders Carlsson. - - Fix for Tag JavaScript memory on SnowLeopard - - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - * jit/ExecutableAllocatorPosix.cpp: - (JSC::ExecutablePool::systemAlloc): - * runtime/Collector.cpp: - (JSC::allocateBlock): - -2009-04-18 Drew Wilson - - VisiblePosition.characterAfter should return UChar32 - - Reviewed by Dan Bernstein. - - * wtf/unicode/icu/UnicodeIcu.h: - (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic): Added. - -2009-04-18 Sam Weinig - - Reviewed by Mark Rowe. - - Fix for - A little bit of hardening for UString. - - * runtime/UString.cpp: - (JSC::concatenate): - (JSC::UString::append): - -2009-04-18 Sam Weinig - - Reviewed by Mark Rowe and Dan Bernstein. - - Fix for - A little bit of hardening for Vector. - - * wtf/Vector.h: - (WTF::Vector::append): - (WTF::Vector::insert): - -2009-04-17 Gavin Barraclough - - Reviewed by Geoff Garen. - - On x86_64, make all JIT-code allocations from a new heap, managed - by FixedVMPoolAllocator. This class allocates a single large (2Gb) - pool of virtual memory from which all further allocations take place. - Since all JIT code is allocated from this pool, we can continue to - safely assume (as is already asserted) that it will always be possible - to link any JIT-code to JIT-code jumps and calls. - - * JavaScriptCore.xcodeproj/project.pbxproj: - Add new file. - * jit/ExecutableAllocatorFixedVMPool.cpp: Added. - (JSC::FreeListEntry::FreeListEntry): - (JSC::AVLTreeAbstractorForFreeList::get_less): - (JSC::AVLTreeAbstractorForFreeList::set_less): - (JSC::AVLTreeAbstractorForFreeList::get_greater): - (JSC::AVLTreeAbstractorForFreeList::set_greater): - (JSC::AVLTreeAbstractorForFreeList::get_balance_factor): - (JSC::AVLTreeAbstractorForFreeList::set_balance_factor): - (JSC::AVLTreeAbstractorForFreeList::null): - (JSC::AVLTreeAbstractorForFreeList::compare_key_key): - (JSC::AVLTreeAbstractorForFreeList::compare_key_node): - (JSC::AVLTreeAbstractorForFreeList::compare_node_node): - (JSC::sortFreeListEntriesByPointer): - (JSC::sortCommonSizedAllocations): - (JSC::FixedVMPoolAllocator::release): - (JSC::FixedVMPoolAllocator::reuse): - (JSC::FixedVMPoolAllocator::addToFreeList): - (JSC::FixedVMPoolAllocator::coalesceFreeSpace): - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::alloc): - (JSC::FixedVMPoolAllocator::free): - (JSC::ExecutableAllocator::intializePageSize): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - The new 2Gb heap class! - * jit/ExecutableAllocatorPosix.cpp: - Disable use of this implementation on x86_64. - * wtf/AVLTree.h: - Add missing variable initialization. - (WTF::::remove): - -2009-04-17 Oliver Hunt - - Reviewed by Darin Adler. - - Fix bug where the VM reentry cache would not correctly unroll the cached callframe - - Fix a check that was intended to mark a cached call as invalid when the callframe could - not be constructed. Instead it was just checking that there was a place to put the - exception. This eventually results in a non-recoverable RegisterFile starvation. - - * interpreter/CachedCall.h: - (JSC::CachedCall::CachedCall): - (JSC::CachedCall::call): add assertion to ensure we don't use a bad callframe - -2009-04-17 David Kilzer - - Simplify FEATURE_DEFINES definition - - Reviewed by Darin Adler. - - This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME - variables to their own FeatureDefines.xcconfig file. It also - extracts a new ENABLE_GEOLOCATION variable so that - FEATURE_DEFINES only needs to be defined once. - - * Configurations/FeatureDefines.xcconfig: Added. - * Configurations/JavaScriptCore.xcconfig: Removed definition of - ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES. Added include - of FeatureDefines.xcconfig. - * JavaScriptCore.xcodeproj/project.pbxproj: Added - FeatureDefines.xcconfig file. - -2009-04-08 Mihnea Ovidenie - - Reviewed by Oliver Hunt. - - Bug 25027: JavaScript parseInt wrong on negative numbers - - - When dealing with negative numbers, parseInt should use ceil instead of floor. - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncParseInt): - -2009-04-16 Stephanie Lewis - - Reviewed by Oliver Hunt. - - 32-bit to 64-bit: Javascript hash tables double in size - - Remove perfect hash optimization which removes 1 MB of overhead on 32-bit and almost 2 MB on 64-bit. Removing the optimization was not a regression on SunSpider and the acid 3 test still passes. - - * create_hash_table: - * runtime/Lookup.cpp: - (JSC::HashTable::createTable): - (JSC::HashTable::deleteTable): - * runtime/Lookup.h: - (JSC::HashEntry::initialize): - (JSC::HashEntry::next): - (JSC::HashTable::entry): - * runtime/Structure.cpp: - (JSC::Structure::getEnumerableNamesFromClassInfoTable): - -2009-04-16 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Fix subtle error in optimised VM reentry in Array.sort - - Basically to ensure we don't accidentally invalidate the cached callframe - we should be using the cached callframe rather than our own exec state. - While the old behaviour was wrong i have been unable to actually create a - test case where anything actually ends up going wrong. - - * interpreter/CachedCall.h: - (JSC::CachedCall::newCallFrame): - * runtime/JSArray.cpp: - (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): - -2009-04-16 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Optimise op_resolve_base - - If we can statically find a property we are trying to resolve - the base of, the base is guaranteed to be the global object. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitResolveBase): - -2009-04-16 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Improve performance of read-write-modify operators - - Implement cross scope optimisation for read-write-modify - operators, to avoid unnecessary calls to property resolve - helper functions. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitLoadGlobalObject): - (JSC::BytecodeGenerator::emitResolveWithBase): - * bytecompiler/BytecodeGenerator.h: - -2009-04-16 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Improve performance of remaining array enumeration functions - - Make use of function entry cache for remaining Array enumeration functions. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - -2009-04-15 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Improve performance of Array.sort - - Cache the VM entry for Array.sort when using a JS comparison function. - - * runtime/JSArray.cpp: - (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): - (JSC::JSArray::sort): - -2009-04-15 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Bug 25229: Need support for Array.prototype.reduceRight - - - Implement Array.reduceRight - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncReduceRight): - -2009-04-15 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Bug 25227: Array.filter triggers an assertion when the target array shrinks while being filtered - - - We correct this simply by making the fast array path fall back on the slow path if - we ever discover the fast access is unsafe. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncFilter): - -2009-04-13 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Bug 25159: Support Array.prototype.reduce - - - Implement Array.prototype.reduce - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncReduce): - -2009-04-15 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Move CallFrameClosure from inside the Interpreter class to its own file. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/CachedCall.h: - * interpreter/CallFrameClosure.h: Copied from JavaScriptCore/yarr/RegexJIT.h. - (JSC::CallFrameClosure::setArgument): - (JSC::CallFrameClosure::resetCallFrame): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::prepareForRepeatCall): - * interpreter/Interpreter.h: - -2009-04-14 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Bug 25202: Improve performance of repeated callbacks into the VM - - Add the concept of a CachedCall to native code for use in Array - prototype and similar functions where a single callback function - is called repeatedly with the same number of arguments. - - Used Array.prototype.filter as the test function and got a 50% win - over a naive non-caching specialised version. This makes the native - implementation of Array.prototype.filter faster than the JS one once - more. - - * JavaScriptCore.vcproj/JavaScriptCore.sln: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/CachedCall.h: Added. - (JSC::CachedCall::CachedCall): - (JSC::CachedCall::call): - (JSC::CachedCall::setThis): - (JSC::CachedCall::setArgument): - (JSC::CachedCall::~CachedCall): - CachedCall is a wrapper that automates the calling and teardown - for a CallFrameClosure - * interpreter/CallFrame.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::prepareForRepeatCall): - Create the basic entry closure for a function - (JSC::Interpreter::execute): - A new ::execute method to enter the interpreter from a closure - (JSC::Interpreter::endRepeatCall): - Clear the entry closure - * interpreter/Interpreter.h: - (JSC::Interpreter::CallFrameClosure::setArgument): - (JSC::Interpreter::CallFrameClosure::resetCallFrame): - Helper functions to simplify setting up the closure's callframe - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncFilter): - -2009-04-14 Xan Lopez - - Fix the build. - - Add the yarr headers (and only the headers) to the build, so that - RegExp.cpp can compile. The headers are ifdefed out with yarr - disabled, so we don't need anything else for now. - - * GNUmakefile.am: - -2009-04-14 Adam Roben - - Remove support for profile-guided optimization on Windows - - Rubber-stamped by Steve Falkenburg. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed - the Release_PGO configuration. Also let VS re-order the source files - list. - -2009-04-14 Xan Lopez - - Unreviewed build fix. - - * GNUmakefile.am: - -2009-04-14 Jan Michael Alonzo - - Gtk build fix when building minidom. Not reviewed. - - Use C-style comment instead of C++ style since autotools builds - minidom using gcc and not g++. - - * wtf/Platform.h: - -2009-04-14 Gavin Barraclough - - Reviewed by NOBODY - speculative build fix. - - * runtime/RegExp.h: - -2009-04-13 Gavin Barraclough - - Reviewed by Cap'n Geoff Garen. - - Yarr! - (Yet another regex runtime). - - Currently disabled by default since the interpreter, whilst awesomely - functional, has not been optimized and is likely slower than PCRE, and - the JIT, whilst faster than WREC, is presently incomplete and does not - fallback to using an interpreter for the cases it cannot handle. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::move): - (JSC::MacroAssemblerX86Common::swap): - (JSC::MacroAssemblerX86Common::signExtend32ToPtr): - (JSC::MacroAssemblerX86Common::zeroExtend32ToPtr): - (JSC::MacroAssemblerX86Common::branch32): - (JSC::MacroAssemblerX86Common::branch16): - * assembler/X86Assembler.h: - (JSC::X86Assembler::cmpw_im): - (JSC::X86Assembler::testw_rr): - (JSC::X86Assembler::X86InstructionFormatter::immediate16): - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::~RegExp): - (JSC::RegExp::create): - (JSC::RegExp::compile): - (JSC::RegExp::match): - * runtime/RegExp.h: - * wtf/Platform.h: - * yarr: Added. - * yarr/RegexCompiler.cpp: Added. - (JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor): - (JSC::Yarr::CharacterClassConstructor::reset): - (JSC::Yarr::CharacterClassConstructor::append): - (JSC::Yarr::CharacterClassConstructor::putChar): - (JSC::Yarr::CharacterClassConstructor::isUnicodeUpper): - (JSC::Yarr::CharacterClassConstructor::isUnicodeLower): - (JSC::Yarr::CharacterClassConstructor::putRange): - (JSC::Yarr::CharacterClassConstructor::charClass): - (JSC::Yarr::CharacterClassConstructor::addSorted): - (JSC::Yarr::CharacterClassConstructor::addSortedRange): - (JSC::Yarr::newlineCreate): - (JSC::Yarr::digitsCreate): - (JSC::Yarr::spacesCreate): - (JSC::Yarr::wordcharCreate): - (JSC::Yarr::nondigitsCreate): - (JSC::Yarr::nonspacesCreate): - (JSC::Yarr::nonwordcharCreate): - (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor): - (JSC::Yarr::RegexPatternConstructor::~RegexPatternConstructor): - (JSC::Yarr::RegexPatternConstructor::reset): - (JSC::Yarr::RegexPatternConstructor::assertionBOL): - (JSC::Yarr::RegexPatternConstructor::assertionEOL): - (JSC::Yarr::RegexPatternConstructor::assertionWordBoundary): - (JSC::Yarr::RegexPatternConstructor::atomPatternCharacter): - (JSC::Yarr::RegexPatternConstructor::atomBuiltInCharacterClass): - (JSC::Yarr::RegexPatternConstructor::atomCharacterClassBegin): - (JSC::Yarr::RegexPatternConstructor::atomCharacterClassAtom): - (JSC::Yarr::RegexPatternConstructor::atomCharacterClassRange): - (JSC::Yarr::RegexPatternConstructor::atomCharacterClassBuiltIn): - (JSC::Yarr::RegexPatternConstructor::atomCharacterClassEnd): - (JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin): - (JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin): - (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd): - (JSC::Yarr::RegexPatternConstructor::atomBackReference): - (JSC::Yarr::RegexPatternConstructor::copyDisjunction): - (JSC::Yarr::RegexPatternConstructor::copyTerm): - (JSC::Yarr::RegexPatternConstructor::quantifyAtom): - (JSC::Yarr::RegexPatternConstructor::disjunction): - (JSC::Yarr::RegexPatternConstructor::regexBegin): - (JSC::Yarr::RegexPatternConstructor::regexEnd): - (JSC::Yarr::RegexPatternConstructor::regexError): - (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets): - (JSC::Yarr::RegexPatternConstructor::setupDisjunctionOffsets): - (JSC::Yarr::RegexPatternConstructor::setupOffsets): - (JSC::Yarr::compileRegex): - * yarr/RegexCompiler.h: Added. - * yarr/RegexInterpreter.cpp: Added. - (JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext): - (JSC::Yarr::Interpreter::DisjunctionContext::operator new): - (JSC::Yarr::Interpreter::allocDisjunctionContext): - (JSC::Yarr::Interpreter::freeDisjunctionContext): - (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new): - (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput): - (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext): - (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::InputStream::InputStream): - (JSC::Yarr::Interpreter::InputStream::next): - (JSC::Yarr::Interpreter::InputStream::rewind): - (JSC::Yarr::Interpreter::InputStream::read): - (JSC::Yarr::Interpreter::InputStream::readChecked): - (JSC::Yarr::Interpreter::InputStream::reread): - (JSC::Yarr::Interpreter::InputStream::prev): - (JSC::Yarr::Interpreter::InputStream::getPos): - (JSC::Yarr::Interpreter::InputStream::setPos): - (JSC::Yarr::Interpreter::InputStream::atStart): - (JSC::Yarr::Interpreter::InputStream::atEnd): - (JSC::Yarr::Interpreter::InputStream::checkInput): - (JSC::Yarr::Interpreter::InputStream::uncheckInput): - (JSC::Yarr::Interpreter::testCharacterClass): - (JSC::Yarr::Interpreter::tryConsumeCharacter): - (JSC::Yarr::Interpreter::checkCharacter): - (JSC::Yarr::Interpreter::tryConsumeCharacterClass): - (JSC::Yarr::Interpreter::checkCharacterClass): - (JSC::Yarr::Interpreter::tryConsumeBackReference): - (JSC::Yarr::Interpreter::matchAssertionBOL): - (JSC::Yarr::Interpreter::matchAssertionEOL): - (JSC::Yarr::Interpreter::matchAssertionWordBoundary): - (JSC::Yarr::Interpreter::matchPatternCharacter): - (JSC::Yarr::Interpreter::backtrackPatternCharacter): - (JSC::Yarr::Interpreter::matchCharacterClass): - (JSC::Yarr::Interpreter::backtrackCharacterClass): - (JSC::Yarr::Interpreter::matchBackReference): - (JSC::Yarr::Interpreter::backtrackBackReference): - (JSC::Yarr::Interpreter::recordParenthesesMatch): - (JSC::Yarr::Interpreter::resetMatches): - (JSC::Yarr::Interpreter::resetAssertionMatches): - (JSC::Yarr::Interpreter::parenthesesDoBacktrack): - (JSC::Yarr::Interpreter::matchParenthesesOnceBegin): - (JSC::Yarr::Interpreter::matchParenthesesOnceEnd): - (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin): - (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd): - (JSC::Yarr::Interpreter::matchParentheticalAssertionOnceBegin): - (JSC::Yarr::Interpreter::matchParentheticalAssertionOnceEnd): - (JSC::Yarr::Interpreter::backtrackParentheticalAssertionOnceBegin): - (JSC::Yarr::Interpreter::backtrackParentheticalAssertionOnceEnd): - (JSC::Yarr::Interpreter::matchParentheses): - (JSC::Yarr::Interpreter::backtrackParentheses): - (JSC::Yarr::Interpreter::matchTerm): - (JSC::Yarr::Interpreter::backtrackTerm): - (JSC::Yarr::Interpreter::matchAlternative): - (JSC::Yarr::Interpreter::matchDisjunction): - (JSC::Yarr::Interpreter::matchNonZeroDisjunction): - (JSC::Yarr::Interpreter::interpret): - (JSC::Yarr::Interpreter::Interpreter): - (JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry): - (JSC::Yarr::ByteCompiler::ByteCompiler): - (JSC::Yarr::ByteCompiler::compile): - (JSC::Yarr::ByteCompiler::checkInput): - (JSC::Yarr::ByteCompiler::assertionBOL): - (JSC::Yarr::ByteCompiler::assertionEOL): - (JSC::Yarr::ByteCompiler::assertionWordBoundary): - (JSC::Yarr::ByteCompiler::atomPatternCharacter): - (JSC::Yarr::ByteCompiler::atomCharacterClass): - (JSC::Yarr::ByteCompiler::atomBackReference): - (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): - (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): - (JSC::Yarr::ByteCompiler::popParenthesesStack): - (JSC::Yarr::ByteCompiler::dumpDisjunction): - (JSC::Yarr::ByteCompiler::closeAlternative): - (JSC::Yarr::ByteCompiler::atomParenthesesEnd): - (JSC::Yarr::ByteCompiler::regexBegin): - (JSC::Yarr::ByteCompiler::regexEnd): - (JSC::Yarr::ByteCompiler::alterantiveDisjunction): - (JSC::Yarr::ByteCompiler::emitDisjunction): - (JSC::Yarr::byteCompileRegex): - (JSC::Yarr::interpretRegex): - * yarr/RegexInterpreter.h: Added. - (JSC::Yarr::ByteTerm::): - (JSC::Yarr::ByteTerm::ByteTerm): - (JSC::Yarr::ByteTerm::BOL): - (JSC::Yarr::ByteTerm::CheckInput): - (JSC::Yarr::ByteTerm::EOL): - (JSC::Yarr::ByteTerm::WordBoundary): - (JSC::Yarr::ByteTerm::BackReference): - (JSC::Yarr::ByteTerm::AlternativeBegin): - (JSC::Yarr::ByteTerm::AlternativeDisjunction): - (JSC::Yarr::ByteTerm::AlternativeEnd): - (JSC::Yarr::ByteTerm::PatternEnd): - (JSC::Yarr::ByteTerm::invert): - (JSC::Yarr::ByteTerm::capture): - (JSC::Yarr::ByteDisjunction::ByteDisjunction): - (JSC::Yarr::BytecodePattern::BytecodePattern): - (JSC::Yarr::BytecodePattern::~BytecodePattern): - * yarr/RegexJIT.cpp: Added. - (JSC::Yarr::RegexGenerator::optimizeAlternative): - (JSC::Yarr::RegexGenerator::matchCharacterClassRange): - (JSC::Yarr::RegexGenerator::matchCharacterClass): - (JSC::Yarr::RegexGenerator::jumpIfNoAvailableInput): - (JSC::Yarr::RegexGenerator::jumpIfAvailableInput): - (JSC::Yarr::RegexGenerator::checkInput): - (JSC::Yarr::RegexGenerator::atEndOfInput): - (JSC::Yarr::RegexGenerator::notAtEndOfInput): - (JSC::Yarr::RegexGenerator::jumpIfCharEquals): - (JSC::Yarr::RegexGenerator::jumpIfCharNotEquals): - (JSC::Yarr::RegexGenerator::readCharacter): - (JSC::Yarr::RegexGenerator::storeToFrame): - (JSC::Yarr::RegexGenerator::loadFromFrame): - (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState): - (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative): - (JSC::Yarr::RegexGenerator::TermGenerationState::alternativeValid): - (JSC::Yarr::RegexGenerator::TermGenerationState::nextAlternative): - (JSC::Yarr::RegexGenerator::TermGenerationState::alternative): - (JSC::Yarr::RegexGenerator::TermGenerationState::resetTerm): - (JSC::Yarr::RegexGenerator::TermGenerationState::termValid): - (JSC::Yarr::RegexGenerator::TermGenerationState::nextTerm): - (JSC::Yarr::RegexGenerator::TermGenerationState::term): - (JSC::Yarr::RegexGenerator::TermGenerationState::lookaheadTerm): - (JSC::Yarr::RegexGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm): - (JSC::Yarr::RegexGenerator::TermGenerationState::inputOffset): - (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack): - (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackGenerated): - (JSC::Yarr::RegexGenerator::jumpToBacktrackCheckEmitPending): - (JSC::Yarr::RegexGenerator::genertateAssertionBOL): - (JSC::Yarr::RegexGenerator::genertateAssertionEOL): - (JSC::Yarr::RegexGenerator::matchAssertionWordchar): - (JSC::Yarr::RegexGenerator::genertateAssertionWordBoundary): - (JSC::Yarr::RegexGenerator::genertatePatternCharacterSingle): - (JSC::Yarr::RegexGenerator::genertatePatternCharacterPair): - (JSC::Yarr::RegexGenerator::genertatePatternCharacterFixed): - (JSC::Yarr::RegexGenerator::genertatePatternCharacterGreedy): - (JSC::Yarr::RegexGenerator::genertatePatternCharacterNonGreedy): - (JSC::Yarr::RegexGenerator::genertateCharacterClassSingle): - (JSC::Yarr::RegexGenerator::genertateCharacterClassFixed): - (JSC::Yarr::RegexGenerator::genertateCharacterClassGreedy): - (JSC::Yarr::RegexGenerator::genertateCharacterClassNonGreedy): - (JSC::Yarr::RegexGenerator::generateParenthesesSingleDisjunctionOneAlternative): - (JSC::Yarr::RegexGenerator::generateParenthesesSingle): - (JSC::Yarr::RegexGenerator::generateTerm): - (JSC::Yarr::RegexGenerator::generateDisjunction): - (JSC::Yarr::RegexGenerator::RegexGenerator): - (JSC::Yarr::RegexGenerator::generate): - (JSC::Yarr::jitCompileRegex): - (JSC::Yarr::executeRegex): - * yarr/RegexJIT.h: Added. - (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): - * yarr/RegexParser.h: Added. - (JSC::Yarr::): - (JSC::Yarr::Parser::): - (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate): - (JSC::Yarr::Parser::CharacterClassParserDelegate::begin): - (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacterUnescaped): - (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter): - (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass): - (JSC::Yarr::Parser::CharacterClassParserDelegate::end): - (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary): - (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference): - (JSC::Yarr::Parser::CharacterClassParserDelegate::flush): - (JSC::Yarr::Parser::CharacterClassParserDelegate::): - (JSC::Yarr::Parser::Parser): - (JSC::Yarr::Parser::parseEscape): - (JSC::Yarr::Parser::parseAtomEscape): - (JSC::Yarr::Parser::parseCharacterClassEscape): - (JSC::Yarr::Parser::parseCharacterClass): - (JSC::Yarr::Parser::parseParenthesesBegin): - (JSC::Yarr::Parser::parseParenthesesEnd): - (JSC::Yarr::Parser::parseQuantifier): - (JSC::Yarr::Parser::parseTokens): - (JSC::Yarr::Parser::parse): - (JSC::Yarr::Parser::saveState): - (JSC::Yarr::Parser::restoreState): - (JSC::Yarr::Parser::atEndOfPattern): - (JSC::Yarr::Parser::peek): - (JSC::Yarr::Parser::peekIsDigit): - (JSC::Yarr::Parser::peekDigit): - (JSC::Yarr::Parser::consume): - (JSC::Yarr::Parser::consumeDigit): - (JSC::Yarr::Parser::consumeNumber): - (JSC::Yarr::Parser::consumeOctal): - (JSC::Yarr::Parser::tryConsume): - (JSC::Yarr::Parser::tryConsumeHex): - (JSC::Yarr::parse): - * yarr/RegexPattern.h: Added. - (JSC::Yarr::CharacterRange::CharacterRange): - (JSC::Yarr::): - (JSC::Yarr::PatternTerm::): - (JSC::Yarr::PatternTerm::PatternTerm): - (JSC::Yarr::PatternTerm::BOL): - (JSC::Yarr::PatternTerm::EOL): - (JSC::Yarr::PatternTerm::WordBoundary): - (JSC::Yarr::PatternTerm::invert): - (JSC::Yarr::PatternTerm::capture): - (JSC::Yarr::PatternTerm::quantify): - (JSC::Yarr::PatternAlternative::PatternAlternative): - (JSC::Yarr::PatternAlternative::lastTerm): - (JSC::Yarr::PatternAlternative::removeLastTerm): - (JSC::Yarr::PatternDisjunction::PatternDisjunction): - (JSC::Yarr::PatternDisjunction::~PatternDisjunction): - (JSC::Yarr::PatternDisjunction::addNewAlternative): - (JSC::Yarr::RegexPattern::RegexPattern): - (JSC::Yarr::RegexPattern::~RegexPattern): - (JSC::Yarr::RegexPattern::reset): - (JSC::Yarr::RegexPattern::containsIllegalBackReference): - (JSC::Yarr::RegexPattern::newlineCharacterClass): - (JSC::Yarr::RegexPattern::digitsCharacterClass): - (JSC::Yarr::RegexPattern::spacesCharacterClass): - (JSC::Yarr::RegexPattern::wordcharCharacterClass): - (JSC::Yarr::RegexPattern::nondigitsCharacterClass): - (JSC::Yarr::RegexPattern::nonspacesCharacterClass): - (JSC::Yarr::RegexPattern::nonwordcharCharacterClass): - -2009-04-13 Oliver Hunt - - Reviewed by NOBODY (Missed code from last patch). - - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::displayName): - (JSC::InternalFunction::calculatedDisplayName): - * runtime/InternalFunction.h: - -2009-04-13 Francisco Tolmasky - - Reviewed by Oliver Hunt. - - BUG 25171: It should be possible to manually set the name of an anonymous function - - - This change adds the displayName property to functions, which when set overrides the - normal name when appearing in the console. - - * profiler/Profiler.cpp: - (JSC::createCallIdentifierFromFunctionImp): Changed call to InternalFunction::name to InternalFunction::calculatedDisplayName - * runtime/CommonIdentifiers.h: Added displayName common identifier. - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::displayName): Access to user settable displayName property - (JSC::InternalFunction::calculatedDisplayName): Returns displayName if it exists, if not then the natural name - -2009-04-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Disabled another JavaScriptCore test because it fails on Windows but - not Mac, so it makes the bots red. - - * tests/mozilla/expected.html: - -2009-04-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Disabled two JavaScriptCore tests because they fail on Window or Mac but - not both, so they make the bots red. - - * tests/mozilla/expected.html: Updated expected results. - -2009-04-09 Ben Murdoch - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=25091 - The Android platform requires threads to be registered with the VM. - This patch implements this behaviour inside ThreadingPthreads.cpp. - - * wtf/ThreadingPthreads.cpp: Add a level above threadEntryPoint that takes care of (un)registering threads with the VM. - (WTF::runThreadWithRegistration): register the thread and run entryPoint. Unregister the thread afterwards. - (WTF::createThreadInternal): call runThreadWithRegistration instead of entryPoint directly. - -2009-04-09 David Kilzer - - Reinstating Option to turn off SVG DOM Objective-C bindings - - Rolled r42345 back in. The build failure was caused by an - internal script which had not been updated the same way that - build-webkit was updated. - - * Configurations/JavaScriptCore.xcconfig: - -2009-04-09 Alexey Proskuryakov - - Reverting Option to turn off SVG DOM Objective-C bindings. - It broke Mac build, and I don't know how to fix it. - - * Configurations/JavaScriptCore.xcconfig: - -2009-04-09 Xan Lopez - - Unreviewed build fix. - - Checking for __GLIBCXX__ being bigger than some date is not enough - to get std::tr1, C++0x has to be in use too. Add another check for - __GXX_EXPERIMENTAL_CXX0X__. - - * wtf/TypeTraits.h: - -2009-04-08 Oliver Hunt - - Reviewed by Adam Roben. - - Fix assertion failure in function.apply - - The result of excess arguments to function.apply is irrelevant - so we don't need to provide a result register. We were providing - temporary result register but not ref'ing it resulting in an - assertion failure. - - * parser/Nodes.cpp: - (JSC::ApplyFunctionCallDotNode::emitBytecode): - -2009-04-08 David Kilzer - - Option to turn off SVG DOM Objective-C bindings - - Reviewed by Darin Adler and Maciej Stachowiak. - - Introduce the ENABLE_SVG_DOM_OBJC_BINDINGS feature define so - that SVG DOM Objective-C bindings may be optionally disabled. - - * Configurations/JavaScriptCore.xcconfig: Added - ENABLE_SVG_DOM_OBJC_BINDINGS variable and use it in - FEATURE_DEFINES. - -2009-04-08 Paul Pedriana - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=20422 - Allow custom memory allocation control. - - * wtf/FastAllocBase.h: - New added file. Implements allocation base class. - * wtf/TypeTraits.h: - Augments existing type traits support as needed by FastAllocBase. - * wtf/FastMalloc.h: - Changed to support FastMalloc match validation. - * wtf/FastMalloc.cpp: - Changed to support FastMalloc match validation. - * wtf/Platform.h: - Added ENABLE_FAST_MALLOC_MATCH_VALIDATION; defaults to 0. - * GNUmakefile.am: - Updated to include added FastAllocBase.h. - * JavaScriptCore.xcodeproj/project.pbxproj: - Updated to include added FastAllocBase.h. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - Updated to include added FastAllocBase.h. - -2009-04-07 Oliver Hunt - - Reviewed by Geoff Garen. - - Improve function.apply performance - - Jump through a few hoops to improve performance of function.apply in the general case. - - In the case of zero or one arguments, or if there are only two arguments and the - second is an array literal we treat function.apply as function.call. - - Otherwise we use the new opcodes op_load_varargs and op_call_varargs to do the .apply call - without re-entering the virtual machine. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): - (JSC::BytecodeGenerator::emitLoadVarargs): - (JSC::BytecodeGenerator::emitCallVarargs): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCallVarargsSlowCase): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_load_varargs): - * jit/JITStubs.h: - * parser/Grammar.y: - * parser/Nodes.cpp: - (JSC::ArrayNode::isSimpleArray): - (JSC::ArrayNode::toArgumentList): - (JSC::CallFunctionCallDotNode::emitBytecode): - (JSC::ApplyFunctionCallDotNode::emitBytecode): - * parser/Nodes.h: - (JSC::ExpressionNode::): - (JSC::ApplyFunctionCallDotNode::): - * runtime/Arguments.cpp: - (JSC::Arguments::copyToRegisters): - (JSC::Arguments::fillArgList): - * runtime/Arguments.h: - (JSC::Arguments::numProvidedArguments): - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::addFunctionProperties): - * runtime/FunctionPrototype.h: - * runtime/JSArray.cpp: - (JSC::JSArray::copyToRegisters): - * runtime/JSArray.h: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::mark): - * runtime/JSGlobalObject.h: - -2009-04-08 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=25073 - JavaScriptCore tests don't run if time zone is not PST - - * API/tests/testapi.c: - (timeZoneIsPST): Added a function that checks whether the time zone is PST, using the same - method as functions in DateMath.cpp do for formatting the result. - (main): Skip date string format test if the time zone is not PST. - -2009-04-07 David Levin - - Reviewed by Sam Weinig and Geoff Garen. - - https://bugs.webkit.org/show_bug.cgi?id=25039 - UString refactoring to support UChar* sharing. - - No change in sunspider perf. - - * runtime/SmallStrings.cpp: - (JSC::SmallStringsStorage::SmallStringsStorage): - * runtime/UString.cpp: - (JSC::initializeStaticBaseString): - (JSC::initializeUString): - (JSC::UString::BaseString::isShared): - Encapsulate the meaning behind the refcount == 1 checks because - this needs to do slightly more when sharing is added. - (JSC::concatenate): - (JSC::UString::append): - (JSC::UString::operator=): - * runtime/UString.h: - Make m_baseString part of a union to get rid of casts, but make it protected because - it is tricky to use it correctly since it is only valid when the Rep is not a BaseString. - The void* will be filled in when sharing is added. - - Add constructors due to the making members protected and it make ensuring proper - initialization work better (like in SmallStringsStorage). - (JSC::UString::Rep::create): - (JSC::UString::Rep::Rep): - (JSC::UString::Rep::): - (JSC::UString::BaseString::BaseString): - (JSC::UString::Rep::setBaseString): - (JSC::UString::Rep::baseString): - -2009-04-04 Xan Lopez - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=25033 - dtoa.cpp segfaults with g++ 4.4.0 - - g++ 4.4.0 seems to be more strict about aliasing rules, so it - produces incorrect code if dtoa.cpp is compiled with - -fstrict-aliasing (it also emits a ton of warnings, so fair enough - I guess). The problem was that we were only casting variables to - union types in order to do type punning, but GCC and the C - standard require that we actually use a union to store the value. - - This patch does just that, the code is mostly copied from the dtoa - version in GCC: - http://gcc.gnu.org/viewcvs/trunk/libjava/classpath/native/fdlibm/dtoa.c?view=markup. - - * wtf/dtoa.cpp: - (WTF::ulp): - (WTF::b2d): - (WTF::ratio): - (WTF::hexnan): - (WTF::strtod): - (WTF::dtoa): - -2009-04-04 Kevin Ollivier - - wx build fix for Win port. Build the assembler sources to get missing functions. - - * JavaScriptCoreSources.bkl: - * jscore.bkl: - * wtf/Platform.h: - -2009-04-02 Darin Adler - - Reviewed by Kevin Decker. - - crash in GC due to uninitialized callFunction pointer - - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): Initialize - callFunction as we do the other data members that are used in the mark function. - -2009-04-02 Yael Aharon - - Reviewed by Simon Hausmann - - https://bugs.webkit.org/show_bug.cgi?id=24490 - - Implement WTF::ThreadSpecific in the Qt build using - QThreadStorage. - - * wtf/ThreadSpecific.h: - -2009-04-01 Greg Bolsinga - - Reviewed by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=24990 - Put SECTORDER_FLAGS into xcconfig files. - - * Configurations/Base.xcconfig: - * Configurations/DebugRelease.xcconfig: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-03-27 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Fix non-AllInOneFile builds. - - * bytecompiler/BytecodeGenerator.cpp: - -2009-03-27 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Improve performance of Function.prototype.call - - - Optimistically assume that expression.call(..) is going to be a call to - Function.prototype.call, and handle it specially to attempt to reduce the - degree of VM reentrancy. - - When everything goes right this removes the vm reentry improving .call() - by around a factor of 10. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * parser/Grammar.y: - * parser/Nodes.cpp: - (JSC::CallFunctionCallDotNode::emitBytecode): - * parser/Nodes.h: - (JSC::CallFunctionCallDotNode::): - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::addFunctionProperties): - * runtime/FunctionPrototype.h: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::mark): - * runtime/JSGlobalObject.h: - -2009-03-27 Laszlo Gombos - - Reviewed by Darin Adler. - - Bug 24884: Include strings.h for strcasecmp() - https://bugs.webkit.org/show_bug.cgi?id=24884 - - * runtime/DateMath.cpp: Reversed previous change including strings.h - * wtf/StringExtras.h: Include strings.h here is available - -2009-03-26 Adam Roben - - Copy testapi.js to $WebKitOutputDir on Windows - - Part of Bug 24856: run-javascriptcore-tests should run testapi on - Windows - - - This matches what Mac does, which will help once we enable running - testapi from run-javascriptcore-tests on Windows. - - Reviewed by Steve Falkenburg. - - * JavaScriptCore.vcproj/testapi/testapi.vcproj: Copy testapi.js next - to testapi.exe. - -2009-03-25 Oliver Hunt - - Reviewed by Geoff Garen. - - Fix exception handling for instanceof in the interpreter. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2009-03-25 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed Write to freed memory in JSC::Label::deref - when reloading http://helpme.att.net/speedtest/ - - * bytecompiler/BytecodeGenerator.h: Reversed the declaration order for - m_labelScopes and m_labels to reverse their destruction order. - m_labelScopes has references to memory within m_labels, so its destructor - needs to run first. - -2009-03-24 Eli Fidler - - Reviewed by George Staikos. - - Correct warnings which in some environments are treated as errors. - - * wtf/dtoa.cpp: - (WTF::b2d): - (WTF::d2b): - (WTF::strtod): - (WTF::dtoa): - -2009-03-24 Kevin Ollivier - - Reviewed by Darin Adler. - - Explicitly define HAVE_LANGINFO_H on Darwin. Fixes the wx build bot jscore - test failure. - - https://bugs.webkit.org/show_bug.cgi?id=24780 - - * wtf/Platform.h: - -2009-03-23 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Fix className() for API defined class - - * API/JSCallbackObjectFunctions.h: - (JSC::::className): - * API/tests/testapi.c: - (EmptyObject_class): - (main): - * API/tests/testapi.js: - -2009-03-23 Oliver Hunt - - Reviewed by Geoff Garen. - - Make testapi assertions run in release builds, so that testapi actually - works in a release build. - - Many of the testapi assertions have side effects that are necessary, and - given testapi is a testing program, perf impact of an assertion is not - important, so it makes sense to apply the assertions in release builds - anyway. - - * API/tests/testapi.c: - (EvilExceptionObject_hasInstance): - -2009-03-23 David Kilzer - - Provide JavaScript exception information after slow script timeout - - Reviewed by Oliver Hunt. - - * runtime/Completion.cpp: - (JSC::evaluate): Set the exception object as the Completion - object's value for slow script timeouts. This is used in - WebCore when reporting the exception. - * runtime/ExceptionHelpers.cpp: - (JSC::InterruptedExecutionError::toString): Added. Provides a - description message for the exception when it is reported. - -2009-03-23 Gustavo Noronha Silva and Thadeu Lima de Souza Cascardo - - Reviewed by Adam Roben. - - https://bugs.webkit.org/show_bug.cgi?id=24674 - Crashes in !PLATFORM(MAC)'s formatLocaleDate, in very specific situations - - Make sure strftime never returns 2-digits years to avoid ambiguity - and a crash. We wrap this new code option in HAVE_LANGINFO_H, - since it is apparently not available in all platforms. - - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - * wtf/Platform.h: - -2009-03-22 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Fix exception handling in API - - We can't just use the ExecState exception slot for returning exceptions - from class introspection functions provided through the API as many JSC - functions will explicitly clear the ExecState exception when returning. - - * API/JSCallbackObjectFunctions.h: - (JSC::JSCallbackObject::getOwnPropertySlot): - (JSC::JSCallbackObject::put): - (JSC::JSCallbackObject::deleteProperty): - (JSC::JSCallbackObject::construct): - (JSC::JSCallbackObject::hasInstance): - (JSC::JSCallbackObject::call): - (JSC::JSCallbackObject::toNumber): - (JSC::JSCallbackObject::toString): - (JSC::JSCallbackObject::staticValueGetter): - (JSC::JSCallbackObject::callbackGetter): - * API/tests/testapi.c: - (MyObject_hasProperty): - (MyObject_getProperty): - (MyObject_setProperty): - (MyObject_deleteProperty): - (MyObject_callAsFunction): - (MyObject_callAsConstructor): - (MyObject_hasInstance): - (EvilExceptionObject_hasInstance): - (EvilExceptionObject_convertToType): - (EvilExceptionObject_class): - (main): - * API/tests/testapi.js: - (EvilExceptionObject.hasInstance): - (EvilExceptionObject.toNumber): - (EvilExceptionObject.toStringExplicit): - -2009-03-21 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 20049: testapi failure: MyObject - 0 should be NaN but instead is 1. - - - - In this case, the test is wrong. According to the ECMA spec, subtraction - uses ToNumber, not ToPrimitive. Change the test to match the spec. - - * API/tests/testapi.js: - -2009-03-21 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Ensure that JSObjectMakeFunction doesn't produce incorrect line numbers. - - Also make test api correctly propagate failures. - - * API/tests/testapi.c: - (main): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - -2009-03-21 Oliver Hunt - - Reviewed by Mark Rowe. - - Improve testapi by making it report failures in a way we can pick up - from our test scripts. - - * API/tests/testapi.c: - (assertEqualsAsBoolean): - (assertEqualsAsNumber): - (assertEqualsAsUTF8String): - (assertEqualsAsCharactersPtr): - (main): - * API/tests/testapi.js: - (pass): - (fail): - (shouldBe): - (shouldThrow): - -2009-03-20 Norbert Leser - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=24535 - - Fixes missing line terminator character (;) after macro call. - It is common practice to add the trailing ";" where macros are substituted - and not where they are defined with #define. - This change is consistent with other macro declarations across webkit, - and it also solves compilation failure with symbian compilers. - - * runtime/UString.cpp: - * wtf/Assertions.h: - -2009-03-20 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed a JavaScriptCore crash on the Windows buildbot. - - * bytecompiler/BytecodeGenerator.h: Reduced the AST recursion limit. - Apparently, Windows has small stacks. - -2009-03-20 Geoffrey Garen - - Reviewed by Oliver Hunt. - - A little cleanup in the RegisterFile code. - - Moved large inline functions out of the class declaration, to make it - more readable. - - Switched over to using the roundUpAllocationSize function to avoid - duplicate code and subtle bugs. - - Renamed m_maxCommitted to m_commitEnd, to match m_end. - - Renamed allocationSize to commitSize because it's the chunk size for - committing memory, not allocating memory. - - SunSpider reports no change. - - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - (JSC::RegisterFile::shrink): - (JSC::RegisterFile::grow): - * jit/ExecutableAllocator.h: - (JSC::roundUpAllocationSize): - -2009-03-19 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed -- a little bit of hardening in the Collector. - - SunSpider reports no change. I also verified in the disassembly that - we end up with a single compare to constant. - - * runtime/Collector.cpp: - (JSC::Heap::heapAllocate): - -2009-03-19 Geoffrey Garen - - Reviewed by Cameron Zwarich and Oliver Hunt. - - Fixed REGRESSION: Stack overflow on PowerPC on - fast/workers/use-machine-stack.html (22531) - - Dialed down the re-entry allowance to 64 (from 128). - - On a 512K stack, this leaves about 64K for other code on the stack while - JavaScript is running. Not perfect, but it solves our crash on PPC. - - Different platforms may want to dial this down even more. - - Also, substantially shrunk BytecodeGenerator. Since we allocate one on - the stack in order to throw a stack overflow exception -- well, let's - just say the old code had an appreciation for irony. - - SunSpider reports no change. - - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.h: - (JSC::): - -2009-03-19 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 24350: REGRESSION: Safari 4 breaks SPAW wysiwyg editor multiple instances - - - - The SPAW editor's JavaScript assumes that toString() on a function - constructed with the Function constructor produces a function with - a newline after the opening brace. - - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): Add a newline after the opening brace of the - function's source code. - -2009-03-19 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 23771: REGRESSION (r36016): JSObjectHasProperty freezes on global class without kJSClassAttributeNoAutomaticPrototype - - - - * API/tests/testapi.c: - (main): Add a test for this bug. - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::resetPrototype): Don't set the prototype of the - last object in the prototype chain to the object prototype when the - object prototype is already the last object in the prototype chain. - -2009-03-19 Timothy Hatcher - - -[WebView scheduleInRunLoop:forMode:] has no affect on timers - - Reviewed by Darin Adler. - - * wtf/Platform.h: Added HAVE_RUNLOOP_TIMER for PLATFORM(MAC). - -2009-03-19 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed Regular expression run-time complexity - limit too low for long inputs (21485) - - I raised PCRE's "matchLimit" (limit on backtracking) by an order of - magnitude. This fixes all the reported examples of timing out on legitimate - regular expression matches. - - In my testing on a Core Duo MacBook Pro, the longest you can get stuck - trying to match a string is still under 1s, so this seems like a safe change. - - I can think of a number of better solutions that are more complicated, - but this is a good improvement for now. - - * pcre/pcre_exec.cpp: - -2009-03-19 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed REGRESSION (Safari 4): regular expression - pattern size limit lower than Safari 3.2, other browsers, breaks SAP (14873) - - Bumped the pattern size limit to 1MB, and standardized it between PCRE - and WREC. (Empirical testing says that we can easily compile a 1MB regular - expression without risking a hang. Other browsers support bigger regular - expressions, but also hang.) - - SunSpider reports no change. - - I started with a patch posted to Bugzilla by Erik Corry (erikcorry@google.com). - - * pcre/pcre_internal.h: - (put3ByteValue): - (get3ByteValue): - (put3ByteValueAndAdvance): - (putLinkValueAllowZero): - (getLinkValueAllowZero): Made PCRE's "LINK_SIZE" (the number of bytes - used to record jumps between bytecodes) 3, to accomodate larger potential - jumps. Bumped PCRE's "MAX_PATTERN_SIZE" to 1MB. (Technically, at this - LINK_SIZE, we can support even larger patterns, but we risk a hang during - compilation, and it's not clear that such large patterns are important - on the web.) - - * wrec/WREC.cpp: - (JSC::WREC::Generator::compileRegExp): Match PCRE's maximum pattern size, - to avoid quirks between platforms. - -2009-03-18 Ada Chan - - Rolling out r41818 since it broke the windows build. - Error: ..\..\runtime\DatePrototype.cpp(30) : fatal error C1083: Cannot open include file: 'langinfo.h': No such file or directory - - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - -2009-03-17 Oliver Hunt - - Reviewed by Cameron Zwarich. - - REGRESSION (Safari 4): Incorrect function return value when using IE "try ... finally" memory leak work-around (24654) - - - If the return value for a function is in a local register we need - to copy it before executing any finalisers, otherwise it is possible - for the finaliser to clobber the result. - - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::hasFinaliser): - * parser/Nodes.cpp: - (JSC::ReturnNode::emitBytecode): - -2009-03-17 Kevin Ollivier - - Reviewed by Mark Rowe. - - Move BUILDING_ON_* defines into Platform.h to make them available to other ports. - Also tweak the defines so that they work with the default values set by - AvailabilityMacros.h. - - https://bugs.webkit.org/show_bug.cgi?id=24630 - - * JavaScriptCorePrefix.h: - * wtf/Platform.h: - -2009-03-15 Simon Fraser - - Revert r41718 because it broke DumpRenderTree on Tiger. - - * JavaScriptCorePrefix.h: - * wtf/Platform.h: - -2009-03-15 Kevin Ollivier - - Non-Apple Mac ports build fix. Move defines for the BUILDING_ON_ macros into - Platform.h so that they're defined for all ports building on Mac, and tweak - the definitions of those macros based on Mark Rowe's suggestions to accomodate - cases where the values may not be <= to the .0 release for that version. - - * JavaScriptCorePrefix.h: - * wtf/Platform.h: - -2009-03-13 Mark Rowe - - Rubber-stamped by Dan Bernstein. - - Take advantage of the ability of recent versions of Xcode to easily switch the active - architecture. - - * Configurations/DebugRelease.xcconfig: - -2009-03-13 Mark Rowe - - Reviewed by David Kilzer. - - Prevent AllInOneFile.cpp and ProfileGenerator.cpp from rebuilding unnecessarily when - switching between building in Xcode and via build-webkit. - - build-webkit passes FEATURE_DEFINES to xcodebuild, resulting in it being present in the - Derived Sources build settings. When building in Xcode, this setting isn't present so - Xcode reruns the script build phases. This results in a new version of TracingDtrace.h - being generated, and the files that include it being rebuilt. - - * JavaScriptCore.xcodeproj/project.pbxproj: Don't regenerate TracingDtrace.h if it is - already newer than the input file. - -2009-03-13 Norbert Leser - - Reviewed by Darin Adler. - - Resolved name conflict with globally defined tzname in Symbian. - Replaced with different name instead of using namespace qualifier - (appeared to be less clumsy). - - * runtime/DateMath.cpp: - -2009-03-12 Mark Rowe - - Reviewed by Darin Adler. - - TCMalloc_SystemRelease should use madvise rather than re-mmaping span of pages - - * wtf/FastMalloc.cpp: - (WTF::mergeDecommittedStates): If either of the spans has been released to the system, release the other - span as well so that the flag in the merged span is accurate. - * wtf/Platform.h: - * wtf/TCSystemAlloc.cpp: Track decommitted spans when using MADV_FREE_REUSABLE / MADV_FREE_REUSE. - (TCMalloc_SystemRelease): Use madvise with MADV_FREE_REUSABLE when it is available. - (TCMalloc_SystemCommit): Use madvise with MADV_FREE_REUSE when it is available. - * wtf/TCSystemAlloc.h: - -2009-03-12 Adam Treat - - Reviewed by NOBODY (Build fix). - - Include string.h for strlen usage. - - * wtf/Threading.cpp: - -2009-03-12 David Kilzer - - Add NO_RETURN attribute to runInteractive() when not using readline - - Reviewed by Darin Adler. - - * jsc.cpp: - (runInteractive): If the readline library is not used, this method - will never return, thus the NO_RETURN attribute is needed to prevent - a gcc warning. - -2009-03-12 Adam Roben - - Adopt setThreadNameInternal on Windows - - Also changed a Windows-only assertion about thread name length to an - all-platform log message. - - Reviewed by Adam Treat. - - * wtf/Threading.cpp: - (WTF::createThread): Warn if the thread name is longer than 31 - characters, as Visual Studio will truncate names longer than that - length. - - * wtf/ThreadingWin.cpp: - (WTF::setThreadNameInternal): Renamed from setThreadName and changed - to always operate on the current thread. - (WTF::initializeThreading): Changed to use setThreadNameInternal. - (WTF::createThreadInternal): Removed call to setThreadName. This is - now handled by threadEntryPoint and setThreadNameInternal. - -2009-03-11 David Kilzer - - Clarify comments regarding order of FEATURE_DEFINES - - Rubber-stamped by Mark Rowe. - - * Configurations/JavaScriptCore.xcconfig: Added warning about - the consequences when FEATURE_DEFINES are not kept in sync. - -2009-03-11 Dan Bernstein - - Reviewed by Darin Adler. - - - WTF support for fixing Thai text selection - in Safari is incorrect - - * wtf/unicode/icu/UnicodeIcu.h: - (WTF::Unicode::hasLineBreakingPropertyComplexContext): Added. Returns - whether the character has Unicode line breaking property value SA - ("Complex Context"). - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::hasLineBreakingPropertyComplexContext): Added an - implementation that always returns false. - -2009-03-11 Darin Adler - - Reviewed by Mark Rowe. - - Give threads names on platforms with pthread_setname_np. - - * wtf/Threading.cpp: - (WTF::NewThreadContext::NewThreadContext): Initialize thread name. - (WTF::threadEntryPoint): Call setThreadNameInternal. - (WTF::createThread): Pass thread name. - - * wtf/Threading.h: Added new comments, setThreadNameInternal. - - * wtf/ThreadingGtk.cpp: - (WTF::setThreadNameInternal): Added. Empty. - * wtf/ThreadingNone.cpp: - (WTF::setThreadNameInternal): Added. Empty. - * wtf/ThreadingPthreads.cpp: - (WTF::setThreadNameInternal): Call pthread_setname_np when available. - * wtf/ThreadingQt.cpp: - (WTF::setThreadNameInternal): Added. Empty. - * wtf/ThreadingWin.cpp: - (WTF::setThreadNameInternal): Added. Empty. - -2009-03-11 Adam Roben - - Change the Windows implementation of ThreadSpecific to use functions - instead of extern globals - - This will make it easier to export ThreadSpecific from WebKit. - - Reviewed by John Sullivan. - - * API/JSBase.cpp: - (JSEvaluateScript): - Touched this file to force ThreadSpecific.h to be copied into - $WebKitOutputDir. - - * wtf/ThreadSpecific.h: Replaced g_tls_key_count with tlsKeyCount() - and g_tls_keys with tlsKeys(). - - (WTF::::ThreadSpecific): - (WTF::::~ThreadSpecific): - (WTF::::get): - (WTF::::set): - (WTF::::destroy): - Updated to use the new functions. - - * wtf/ThreadSpecificWin.cpp: - (WTF::tlsKeyCount): - (WTF::tlsKeys): - Added. - - (WTF::ThreadSpecificThreadExit): Changed to use the new functions. - -2009-03-10 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 24291: REGRESSION (r38635): Single line JavaScript comment prevents HTML button click handler execution - - - - Add an extra newline to the end of the body of the program text constructed - by the Function constructor for parsing. This allows single line comments to - be handled correctly by the parser. - - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - -2009-03-09 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Bug 24447: REGRESSION (r41508): Google Maps does not complete initialization - - - r41508 actually exposed a pre-existing bug where we were not invalidating the result - register cache at jump targets. This causes problems when condition loads occur in an - expression -- namely through the ?: and || operators. This patch corrects these issues - by marking the target of all forward jumps as being a jump target, and then clears the - result register cache when ever it starts generating code for a targeted instruction. - - I do not believe it is possible to cause this class of failure outside of a single - expression, and expressions only provide forward branches, so this should resolve this - entire class of bug. That said i've included a test case that gets as close as possible - to hitting this bug with a back branch, to hopefully prevent anyone from introducing the - problem in future. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::Label::isUsed): - (JSC::AbstractMacroAssembler::Label::used): - * assembler/X86Assembler.h: - (JSC::X86Assembler::JmpDst::JmpDst): - (JSC::X86Assembler::JmpDst::isUsed): - (JSC::X86Assembler::JmpDst::used): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - -2009-03-09 David Levin - - Reviewed by Darin Adler. - - Bug 23175: String and UString should be able to share a UChar* buffer. - - - Add CrossThreadRefCounted. - - * wtf/CrossThreadRefCounted.h: Added. - (WTF::CrossThreadRefCounted::create): - (WTF::CrossThreadRefCounted::isShared): - (WTF::CrossThreadRefCounted::dataAccessMustBeThreadSafe): - (WTF::CrossThreadRefCounted::mayBePassedToAnotherThread): - (WTF::CrossThreadRefCounted::CrossThreadRefCounted): - (WTF::CrossThreadRefCounted::~CrossThreadRefCounted): - (WTF::CrossThreadRefCounted::ref): - (WTF::CrossThreadRefCounted::deref): - (WTF::CrossThreadRefCounted::release): - (WTF::CrossThreadRefCounted::copy): - (WTF::CrossThreadRefCounted::threadSafeDeref): - * wtf/RefCounted.h: - * wtf/Threading.h: - (WTF::ThreadSafeSharedBase::ThreadSafeSharedBase): - (WTF::ThreadSafeSharedBase::derefBase): - (WTF::ThreadSafeShared::ThreadSafeShared): - (WTF::ThreadSafeShared::deref): - -2009-03-09 Laszlo Gombos - - Reviewed by George Staikos. - - https://bugs.webkit.org/show_bug.cgi?id=24353 - Allow to overrule default build options for Qt build. - - * JavaScriptCore.pri: Allow to overrule ENABLE_JIT - -2009-03-08 Oliver Hunt - - Reviewed by NOBODY (build fix). - - Build fix. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncConcat): - -2009-03-01 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Bug 24268: RuntimeArray is not a fully implemented JSArray - - - Don't cast a type to JSArray, just because it reportsArray as a supertype - in the JS type system. Doesn't appear feasible to create a testcase - unfortunately as setting up the failure conditions requires internal access - to JSC not present in DRT. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncConcat): - -2009-03-06 Gavin Barraclough - - Reviewed by Oliver Hunt. - - When preforming an op_mov, preserve any existing register mapping. - - ~0.5% progression on v8 tests x86-64. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - -2009-03-05 Simone Fiorentino - - Bug 24382: request to add SH4 platform - - - - Reviewed by David Kilzer. - - * wtf/Platform.h: Added support for SH4 platform. - -2009-03-05 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Writes of constant values to SF registers should be made with direct memory - writes where possible, rather than moving the value via a hardware register. - - ~3% win on SunSpider tests on x86, ~1.5% win on v8 tests on x86-64. - - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::storePtr): - * assembler/X86Assembler.h: - (JSC::X86Assembler::movq_i32m): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - -2009-03-05 Mark Rowe - - Fix the build. - - Sprinkle "static" around NumberConstructor.cpp in order to please the compiler. - - * runtime/NumberConstructor.cpp: - (JSC::numberConstructorNaNValue): - (JSC::numberConstructorNegInfinity): - (JSC::numberConstructorPosInfinity): - (JSC::numberConstructorMaxValue): - (JSC::numberConstructorMinValue): - -2009-03-04 Mark Rowe - - Reviewed by Oliver Hunt. - - FastMallocZone's enumeration code reports fragmented administration space - - The handling of MALLOC_ADMIN_REGION_RANGE_TYPE in FastMalloc's zone was incorrect. It was attempting - to record the memory containing and individual span as an administrative region, when all memory - allocated via MetaDataAlloc should in fact be recorded. This was causing memory regions allocated - via MetaDataAlloc to appear as "VM_ALLOCATE ?" in vmmap output. They are now correctly reported as - "MALLOC_OTHER" regions associated with the JavaScriptCore FastMalloc zone. - - Memory is allocated via MetaDataAlloc from two locations: PageHeapAllocator, and TCMalloc_PageMap{2,3}. - These two cases are handled differently. - - PageHeapAllocator is extended to keep a linked list of memory regions that it has allocated. The - first object in an allocated region contains the link to the previously allocated region. To record - the administrative regions of a PageHeapAllocator we can simply walk the linked list and record - each allocated region we encounter. - - TCMalloc_PageMaps allocate memory via MetaDataAlloc to store each level of the radix tree. To record - the administrative regions of a TCMalloc_PageMap we walk the tree and record the storage used for nodes - at each position rather than the nodes themselves. - - A small performance improvement is achieved by coalescing adjacent memory regions inside the PageMapMemoryUsageRecorder - so that fewer calls in to the range recorder are necessary. We further reduce the number of calls to the - range recorder by aggregating the in-use ranges of a given memory region into a local buffer before recording - them with a single call. A similar approach is also used by AdminRegionRecorder. - - * wtf/FastMalloc.cpp: - (WTF::PageHeapAllocator::Init): - (WTF::PageHeapAllocator::New): - (WTF::PageHeapAllocator::recordAdministrativeRegions): - (WTF::TCMallocStats::FreeObjectFinder::isFreeObject): - (WTF::TCMallocStats::PageMapMemoryUsageRecorder::~PageMapMemoryUsageRecorder): - (WTF::TCMallocStats::PageMapMemoryUsageRecorder::recordPendingRegions): - (WTF::TCMallocStats::PageMapMemoryUsageRecorder::visit): - (WTF::TCMallocStats::AdminRegionRecorder::AdminRegionRecorder): - (WTF::TCMallocStats::AdminRegionRecorder::recordRegion): - (WTF::TCMallocStats::AdminRegionRecorder::visit): - (WTF::TCMallocStats::AdminRegionRecorder::recordPendingRegions): - (WTF::TCMallocStats::AdminRegionRecorder::~AdminRegionRecorder): - (WTF::TCMallocStats::FastMallocZone::enumerate): - (WTF::TCMallocStats::FastMallocZone::FastMallocZone): - (WTF::TCMallocStats::FastMallocZone::init): - * wtf/TCPageMap.h: - (TCMalloc_PageMap2::visitValues): - (TCMalloc_PageMap2::visitAllocations): - (TCMalloc_PageMap3::visitValues): - (TCMalloc_PageMap3::visitAllocations): - -2009-03-04 Antti Koivisto - - Reviewed by Dave Hyatt. - - https://bugs.webkit.org/show_bug.cgi?id=24359 - Repaint throttling mechanism - - Set ENABLE_REPAINT_THROTTLING to 0 by default. - - * wtf/Platform.h: - -2009-03-03 David Kilzer - - WebCore and WebKit should install the same set of headers during installhdrs phase as build phase - - Reviewed by Mark Rowe. - - * Configurations/Base.xcconfig: Defined REAL_PLATFORM_NAME based - on PLATFORM_NAME to work around the missing definition on Tiger. - Updated HAVE_DTRACE to use REAL_PLATFORM_NAME. - -2009-03-03 Kevin McCullough - - Reviewed by Oliver Hunt. - - console.profile() doesn't work without a title - - * profiler/Profiler.cpp: - (JSC::Profiler::startProfiling): assert if there is not title to ensure - we don't start profiling without one. - -2009-03-02 Sam Weinig - - Reviewed by Mark Rowe. - - Enable Geolocation (except on Tiger and Leopard). - - * Configurations/JavaScriptCore.xcconfig: - -2009-03-01 David Kilzer - - Move HAVE_DTRACE check to Base.xcconfig - - Reviewed by Mark Rowe. - - * Configurations/Base.xcconfig: Set HAVE_DTRACE Xcode variable - based on PLATFORM_NAME and MAC_OS_X_VERSION_MAJOR. Also define - it as a preprocessor macro by modifying - GCC_PREPROCESSOR_DEFINITIONS. - * JavaScriptCore.xcodeproj/project.pbxproj: Changed "Generate - DTrace header" script phase to check for HAVE_DTRACE instead of - MACOSX_DEPLOYMENT_TARGET. - * wtf/Platform.h: Removed definition of HAVE_DTRACE macro since - it's defined in Base.xcconfig now. - -2009-03-01 Horia Olaru - - By looking in grammar.y there are only a few types of statement nodes - on which the debugger should stop. - - Removed isBlock and isLoop virtual calls. No need to emit debug hooks in - the "statementListEmitCode" method as long as the necessary hooks can be - added in each "emitCode". - - https://bugs.webkit.org/show_bug.cgi?id=21073 - - Reviewed by Kevin McCullough. - - * parser/Nodes.cpp: - (JSC::ConstStatementNode::emitBytecode): - (JSC::statementListEmitCode): - (JSC::EmptyStatementNode::emitBytecode): - (JSC::ExprStatementNode::emitBytecode): - (JSC::VarStatementNode::emitBytecode): - (JSC::IfNode::emitBytecode): - (JSC::IfElseNode::emitBytecode): - (JSC::DoWhileNode::emitBytecode): - (JSC::WhileNode::emitBytecode): - (JSC::ForNode::emitBytecode): - (JSC::ForInNode::emitBytecode): - (JSC::ContinueNode::emitBytecode): - (JSC::BreakNode::emitBytecode): - (JSC::ReturnNode::emitBytecode): - (JSC::WithNode::emitBytecode): - (JSC::SwitchNode::emitBytecode): - (JSC::LabelNode::emitBytecode): - (JSC::ThrowNode::emitBytecode): - (JSC::TryNode::emitBytecode): - * parser/Nodes.h: - -2009-02-26 Gavin Barraclough - - Reviewed by Geoff Garen. - - Fix bug #23614. Switches on double precision values were incorrectly - truncating the scrutinee value. E.g.: - - switch (1.1) { case 1: print("FAIL"); } - - Was resulting in FAIL. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_switch_imm): - -2009-02-26 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Integer Immediate representation need not be canonical in x86 JIT code. - On x86-64 we already have loosened the requirement that the int immediate - representation in canonical, we should bring x86 into line. - - This patch is a minor (~0.5%) improvement on sunspider & v8-tests, and - should reduce memory footoprint (reduces JIT code size). - - * jit/JIT.cpp: - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - (JSC::JIT::emitJumpIfImmediateNumber): - (JSC::JIT::emitJumpIfNotImmediateNumber): - * jit/JITArithmetic.cpp: - (JSC::JIT::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::JIT::compileBinaryArithOp): - -2009-02-26 Carol Szabo - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=24099 - ARM Compiler Warnings in pcre_exec.cpp - - * pcre/pcre_exec.cpp: - (match): - -2009-02-25 Cameron Zwarich - - Reviewed by Gavin Barraclough. - - Bug 24086: Regression (r40993): WebKit crashes after logging in to lists.zenbe - - - - The numeric sort optimization in r40993 generated bytecode for a function - without generating JIT code. This breaks an assumption in some parts of - the JIT's function calling logic that the presence of a CodeBlock implies - the existence of JIT code. - - In order to fix this, we simply generate JIT code whenever we check whether - a function is a numeric sort function. This only incurs an additional cost - in the case when the function is a numeric sort function, in which case it - is not expensive to generate JIT code for it. - - * runtime/ArrayPrototype.cpp: - (JSC::isNumericCompareFunction): - -2009-02-25 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed REGRESSION (r36701): Unable to select - messages on hotmail (24052) - - The bug was that for-in enumeration used a cached prototype chain without - validating that it was up-to-date. - - This led me to refactor prototype chain caching so it was easier to work - with and harder to get wrong. - - After a bit of inlining, this patch is performance-neutral on SunSpider - and the v8 benchmarks. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::tryCacheGetByID): - * jit/JITStubs.cpp: - (JSC::JITStubs::tryCachePutByID): - (JSC::JITStubs::tryCacheGetByID): - (JSC::JITStubs::cti_op_get_by_id_proto_list): Use the new refactored goodness. See - lines beginning with "-" and smile. - - * runtime/JSGlobalObject.h: - (JSC::Structure::prototypeForLookup): A shout out to const. - - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::next): We can use a pointer comparison to - see if our cached structure chain is equal to the object's structure chain, - since in the case of a cache hit, we share references to the same structure - chain. - - * runtime/Operations.h: - (JSC::countPrototypeChainEntriesAndCheckForProxies): Use the new refactored - goodness. - - * runtime/PropertyNameArray.h: - (JSC::PropertyNameArray::PropertyNameArray): - (JSC::PropertyNameArray::setShouldCache): - (JSC::PropertyNameArray::shouldCache): Renamed "cacheable" to "shouldCache" - to communicate that the client is specifying a recommendation, not a - capability. - - * runtime/Structure.cpp: - (JSC::Structure::Structure): No need to initialize a RefPtr. - (JSC::Structure::getEnumerablePropertyNames): Moved some code into helper - functions. - - (JSC::Structure::prototypeChain): New centralized accessor for a prototype - chain. Revalidates on every access, since the objects in the prototype - chain may have mutated. - - (JSC::Structure::isValid): Helper function for revalidating a cached - prototype chain. - - (JSC::Structure::getEnumerableNamesFromPropertyTable): - (JSC::Structure::getEnumerableNamesFromClassInfoTable): Factored out of - getEnumerablePropertyNames. - - * runtime/Structure.h: - - * runtime/StructureChain.cpp: - (JSC::StructureChain::StructureChain): - * runtime/StructureChain.h: - (JSC::StructureChain::create): No need for structureChainsAreEqual, since - we use pointer equality now. Refactored StructureChain to make a little - more sense and eliminate special cases for null prototypes. - -2009-02-25 Steve Falkenburg - - Use timeBeginPeriod to enable timing resolution greater than 16ms in command line jsc for Windows. - Allows more accurate reporting of benchmark times via command line jsc.exe. Doesn't affect WebKit's use of JavaScriptCore. - - Reviewed by Adam Roben. - - * jsc.cpp: - (main): - -2009-02-24 Geoffrey Garen - - Build fix? - - * GNUmakefile.am: - -2009-02-24 Mark Rowe - - Reviewed by Oliver Hunt. - - Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros - - * API/JSBasePrivate.h: - * API/JSContextRef.h: - * API/JSObjectRef.h: - * API/WebKitAvailability.h: - -2009-02-23 Geoffrey Garen - - Reviewed by Sam Weinig. - - Next step in splitting JIT functionality out of the Interpreter class: - Moved vptr storage from Interpreter to JSGlobalData, so it could be shared - between Interpreter and JITStubs, and moved the *Trampoline JIT stubs - into the JITStubs class. Also added a VPtrSet class to encapsulate vptr - hacks during JSGlobalData initialization. - - SunSpider says 0.4% faster. Meh. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::Interpreter): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - (JSC::JIT::compileCTIMachineTrampolines): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePatchGetArrayLength): - * jit/JITStubs.cpp: - (JSC::JITStubs::JITStubs): - (JSC::JITStubs::tryCacheGetByID): - (JSC::JITStubs::cti_vm_dontLazyLinkCall): - (JSC::JITStubs::cti_op_get_by_val): - (JSC::JITStubs::cti_op_get_by_val_byte_array): - (JSC::JITStubs::cti_op_put_by_val): - (JSC::JITStubs::cti_op_put_by_val_array): - (JSC::JITStubs::cti_op_put_by_val_byte_array): - (JSC::JITStubs::cti_op_is_string): - * jit/JITStubs.h: - (JSC::JITStubs::ctiArrayLengthTrampoline): - (JSC::JITStubs::ctiStringLengthTrampoline): - (JSC::JITStubs::ctiVirtualCallPreLink): - (JSC::JITStubs::ctiVirtualCallLink): - (JSC::JITStubs::ctiVirtualCall): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncPop): - (JSC::arrayProtoFuncPush): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncApply): - * runtime/JSArray.h: - (JSC::isJSArray): - * runtime/JSByteArray.h: - (JSC::asByteArray): - (JSC::isJSByteArray): - * runtime/JSCell.h: - * runtime/JSFunction.h: - * runtime/JSGlobalData.cpp: - (JSC::VPtrSet::VPtrSet): - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::create): - (JSC::JSGlobalData::sharedInstance): - * runtime/JSGlobalData.h: - * runtime/JSString.h: - (JSC::isJSString): - * runtime/Operations.h: - (JSC::jsLess): - (JSC::jsLessEq): - * wrec/WREC.cpp: - (JSC::WREC::Generator::compileRegExp): - -2009-02-23 Csaba Osztrogonac - - Reviewed by Oliver Hunt. - - Bug 23787: Allow JIT to generate SSE2 code if using GCC - - - GCC version of the cpuid check. - - * jit/JITArithmetic.cpp: - (JSC::isSSE2Present): previous assembly code fixed. - -2009-02-23 David Levin - - Reviewed by Alexey Proskuryakov. - - Bug 24047: Need to simplify nested if's in WorkerRunLoop::runInMode - - - * wtf/MessageQueue.h: - (WTF::MessageQueue::infiniteTime): - Allows for one to call waitForMessageFilteredWithTimeout and wait forever. - - (WTF::MessageQueue::alwaysTruePredicate): - (WTF::MessageQueue::waitForMessage): - Made waitForMessage call waitForMessageFilteredWithTimeout, so that there is less - duplicate code. - - (WTF::MessageQueue::waitForMessageFilteredWithTimeout): - - * wtf/ThreadingQt.cpp: - (WTF::ThreadCondition::timedWait): - * wtf/ThreadingWin.cpp: - (WTF::ThreadCondition::timedWait): - Made these two implementations consistent with the pthread and gtk implementations. - Currently, the time calculations would overflow when passed large values. - -2009-02-23 Jeremy Moskovich - - Reviewed by Adam Roben. - - https://bugs.webkit.org/show_bug.cgi?id=24096 - PLATFORM(MAC)->PLATFORM(CF) since we want to use the CF functions in Chrome on OS X. - - * wtf/CurrentTime.cpp: - -2009-02-22 Geoffrey Garen - - Build fix? - - * GNUmakefile.am: - -2009-02-22 Geoffrey Garen - - Build fix. - - * GNUmakefile.am: - -2009-02-22 Geoffrey Garen - - Reviewed by Sam Weinig. - - Next step in splitting JIT functionality out of the Interpreter class: - Created a JITStubs class and renamed Interpreter::cti_* to JITStubs::cti_*. - - Also, moved timeout checking into its own class, located in JSGlobalData, - so both the Interpreter and the JIT could have access to it. - - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * interpreter/CallFrame.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::Interpreter): - (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: - * interpreter/Register.h: - * jit/JIT.cpp: - (JSC::): - (JSC::JIT::emitTimeoutCheck): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArithSlow_op_lshift): - (JSC::JIT::compileFastArithSlow_op_rshift): - (JSC::JIT::compileFastArithSlow_op_bitand): - (JSC::JIT::compileFastArithSlow_op_mod): - (JSC::JIT::compileFastArith_op_mod): - (JSC::JIT::compileFastArithSlow_op_post_inc): - (JSC::JIT::compileFastArithSlow_op_post_dec): - (JSC::JIT::compileFastArithSlow_op_pre_inc): - (JSC::JIT::compileFastArithSlow_op_pre_dec): - (JSC::JIT::compileFastArith_op_add): - (JSC::JIT::compileFastArith_op_mul): - (JSC::JIT::compileFastArith_op_sub): - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::compileFastArithSlow_op_add): - (JSC::JIT::compileFastArithSlow_op_mul): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdSlowCase): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - * jit/JITStubs.cpp: - (JSC::JITStubs::tryCachePutByID): - (JSC::JITStubs::tryCacheGetByID): - (JSC::JITStubs::cti_op_convert_this): - (JSC::JITStubs::cti_op_end): - (JSC::JITStubs::cti_op_add): - (JSC::JITStubs::cti_op_pre_inc): - (JSC::JITStubs::cti_timeout_check): - (JSC::JITStubs::cti_register_file_check): - (JSC::JITStubs::cti_op_loop_if_less): - (JSC::JITStubs::cti_op_loop_if_lesseq): - (JSC::JITStubs::cti_op_new_object): - (JSC::JITStubs::cti_op_put_by_id_generic): - (JSC::JITStubs::cti_op_get_by_id_generic): - (JSC::JITStubs::cti_op_put_by_id): - (JSC::JITStubs::cti_op_put_by_id_second): - (JSC::JITStubs::cti_op_put_by_id_fail): - (JSC::JITStubs::cti_op_get_by_id): - (JSC::JITStubs::cti_op_get_by_id_second): - (JSC::JITStubs::cti_op_get_by_id_self_fail): - (JSC::JITStubs::cti_op_get_by_id_proto_list): - (JSC::JITStubs::cti_op_get_by_id_proto_list_full): - (JSC::JITStubs::cti_op_get_by_id_proto_fail): - (JSC::JITStubs::cti_op_get_by_id_array_fail): - (JSC::JITStubs::cti_op_get_by_id_string_fail): - (JSC::JITStubs::cti_op_instanceof): - (JSC::JITStubs::cti_op_del_by_id): - (JSC::JITStubs::cti_op_mul): - (JSC::JITStubs::cti_op_new_func): - (JSC::JITStubs::cti_op_call_JSFunction): - (JSC::JITStubs::cti_op_call_arityCheck): - (JSC::JITStubs::cti_vm_dontLazyLinkCall): - (JSC::JITStubs::cti_vm_lazyLinkCall): - (JSC::JITStubs::cti_op_push_activation): - (JSC::JITStubs::cti_op_call_NotJSFunction): - (JSC::JITStubs::cti_op_create_arguments): - (JSC::JITStubs::cti_op_create_arguments_no_params): - (JSC::JITStubs::cti_op_tear_off_activation): - (JSC::JITStubs::cti_op_tear_off_arguments): - (JSC::JITStubs::cti_op_profile_will_call): - (JSC::JITStubs::cti_op_profile_did_call): - (JSC::JITStubs::cti_op_ret_scopeChain): - (JSC::JITStubs::cti_op_new_array): - (JSC::JITStubs::cti_op_resolve): - (JSC::JITStubs::cti_op_construct_JSConstruct): - (JSC::JITStubs::cti_op_construct_NotJSConstruct): - (JSC::JITStubs::cti_op_get_by_val): - (JSC::JITStubs::cti_op_get_by_val_byte_array): - (JSC::JITStubs::cti_op_resolve_func): - (JSC::JITStubs::cti_op_sub): - (JSC::JITStubs::cti_op_put_by_val): - (JSC::JITStubs::cti_op_put_by_val_array): - (JSC::JITStubs::cti_op_put_by_val_byte_array): - (JSC::JITStubs::cti_op_lesseq): - (JSC::JITStubs::cti_op_loop_if_true): - (JSC::JITStubs::cti_op_negate): - (JSC::JITStubs::cti_op_resolve_base): - (JSC::JITStubs::cti_op_resolve_skip): - (JSC::JITStubs::cti_op_resolve_global): - (JSC::JITStubs::cti_op_div): - (JSC::JITStubs::cti_op_pre_dec): - (JSC::JITStubs::cti_op_jless): - (JSC::JITStubs::cti_op_not): - (JSC::JITStubs::cti_op_jtrue): - (JSC::JITStubs::cti_op_post_inc): - (JSC::JITStubs::cti_op_eq): - (JSC::JITStubs::cti_op_lshift): - (JSC::JITStubs::cti_op_bitand): - (JSC::JITStubs::cti_op_rshift): - (JSC::JITStubs::cti_op_bitnot): - (JSC::JITStubs::cti_op_resolve_with_base): - (JSC::JITStubs::cti_op_new_func_exp): - (JSC::JITStubs::cti_op_mod): - (JSC::JITStubs::cti_op_less): - (JSC::JITStubs::cti_op_neq): - (JSC::JITStubs::cti_op_post_dec): - (JSC::JITStubs::cti_op_urshift): - (JSC::JITStubs::cti_op_bitxor): - (JSC::JITStubs::cti_op_new_regexp): - (JSC::JITStubs::cti_op_bitor): - (JSC::JITStubs::cti_op_call_eval): - (JSC::JITStubs::cti_op_throw): - (JSC::JITStubs::cti_op_get_pnames): - (JSC::JITStubs::cti_op_next_pname): - (JSC::JITStubs::cti_op_push_scope): - (JSC::JITStubs::cti_op_pop_scope): - (JSC::JITStubs::cti_op_typeof): - (JSC::JITStubs::cti_op_is_undefined): - (JSC::JITStubs::cti_op_is_boolean): - (JSC::JITStubs::cti_op_is_number): - (JSC::JITStubs::cti_op_is_string): - (JSC::JITStubs::cti_op_is_object): - (JSC::JITStubs::cti_op_is_function): - (JSC::JITStubs::cti_op_stricteq): - (JSC::JITStubs::cti_op_nstricteq): - (JSC::JITStubs::cti_op_to_jsnumber): - (JSC::JITStubs::cti_op_in): - (JSC::JITStubs::cti_op_push_new_scope): - (JSC::JITStubs::cti_op_jmp_scopes): - (JSC::JITStubs::cti_op_put_by_index): - (JSC::JITStubs::cti_op_switch_imm): - (JSC::JITStubs::cti_op_switch_char): - (JSC::JITStubs::cti_op_switch_string): - (JSC::JITStubs::cti_op_del_by_val): - (JSC::JITStubs::cti_op_put_getter): - (JSC::JITStubs::cti_op_put_setter): - (JSC::JITStubs::cti_op_new_error): - (JSC::JITStubs::cti_op_debug): - (JSC::JITStubs::cti_vm_throw): - * jit/JITStubs.h: - (JSC::): - * runtime/JSFunction.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.cpp: - * runtime/JSGlobalObject.h: - * runtime/TimeoutChecker.cpp: Copied from interpreter/Interpreter.cpp. - (JSC::TimeoutChecker::TimeoutChecker): - (JSC::TimeoutChecker::reset): - (JSC::TimeoutChecker::didTimeOut): - * runtime/TimeoutChecker.h: Copied from interpreter/Interpreter.h. - (JSC::TimeoutChecker::setTimeoutInterval): - (JSC::TimeoutChecker::ticksUntilNextCheck): - (JSC::TimeoutChecker::start): - (JSC::TimeoutChecker::stop): - -2009-02-20 Gustavo Noronha Silva - - Unreviewed build fix after r41100. - - * GNUmakefile.am: - -2009-02-20 Oliver Hunt - - Reviewed by Mark Rowe. - - 2==null returns true in 64bit jit - - Code for op_eq_null and op_neq_null was incorrectly performing - a 32bit compare, which truncated the type tag from an integer - immediate, leading to incorrect behaviour. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::setPtr): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::setPtr): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - -2009-02-19 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - First step in splitting JIT functionality out of the Interpreter class: - Created JITStubs.h/.cpp, and moved Interpreter::cti_* into JITStubs.cpp. - - Functions that the Interpreter and JITStubs share moved to Operations.h/.cpp. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveBase): - (JSC::Interpreter::checkTimeout): - (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: - * jit/JITStubs.cpp: Copied from interpreter/Interpreter.cpp. - (JSC::Interpreter::cti_op_resolve_base): - * jit/JITStubs.h: Copied from interpreter/Interpreter.h. - * runtime/Operations.cpp: - (JSC::jsAddSlowCase): - (JSC::jsTypeStringForValue): - (JSC::jsIsObjectType): - (JSC::jsIsFunctionType): - * runtime/Operations.h: - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::jsAdd): - (JSC::cachePrototypeChain): - (JSC::countPrototypeChainEntriesAndCheckForProxies): - (JSC::resolveBase): - -2009-02-19 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Fix for x86-64. Where the JavaScriptCore text segment lies outside - a 2gb range of the heap containing JIT generated code, callbacks - from JIT code to the stub functions in Interpreter will be incorrectly - linked. - - No performance impact on Sunspider, 1% regression on v8-tests, - due to a 3% regression on richards. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::Call::Call): - (JSC::AbstractMacroAssembler::Jump::link): - (JSC::AbstractMacroAssembler::Jump::linkTo): - (JSC::AbstractMacroAssembler::CodeLocationJump::relink): - (JSC::AbstractMacroAssembler::CodeLocationCall::relink): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToFunction): - (JSC::AbstractMacroAssembler::PatchBuffer::link): - (JSC::AbstractMacroAssembler::PatchBuffer::linkTailRecursive): - (JSC::AbstractMacroAssembler::differenceBetween): - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::tailRecursiveCall): - (JSC::MacroAssembler::makeTailRecursiveCall): - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::call): - * assembler/MacroAssemblerX86Common.h: - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::call): - (JSC::MacroAssemblerX86_64::moveWithPatch): - (JSC::MacroAssemblerX86_64::branchPtrWithPatch): - (JSC::MacroAssemblerX86_64::storePtrWithPatch): - * assembler/X86Assembler.h: - (JSC::X86Assembler::jmp_r): - (JSC::X86Assembler::linkJump): - (JSC::X86Assembler::patchJump): - (JSC::X86Assembler::patchCall): - (JSC::X86Assembler::linkCall): - (JSC::X86Assembler::patchAddress): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCTICachePutByID): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::JIT::compileBinaryArithOp): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompilePutByIdReplace): - -2009-02-18 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Simplified .call and .apply in preparation for optimizing them. Also, - a little cleanup. - - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncApply): - (JSC::functionProtoFuncCall): No need to do any specific conversion on - 'this' -- op_convert_this will do it if necessary. - - * runtime/JSImmediate.cpp: - (JSC::JSImmediate::toThisObject): Slightly relaxed the rules on - toThisObject to allow for 'undefined', which can be passed through - .call and .apply. - -2009-02-19 David Levin - - Reviewed by Alexey Proskuryakov. - - Bug 23976: MessageQueue needs a way to wait for a message that satisfies an arbitrary criteria. - - - * wtf/Deque.h: - (WTF::Deque::findIf): - * wtf/MessageQueue.h: - (WTF::MessageQueue::waitForMessageFiltered): - -2009-02-18 David Levin - - Reviewed by Alexey Proskuryakov. - - Bug 23974: Deque::Remove would be a useful method. - - - Add Deque::remove and DequeIteratorBase::operator=. - - Why was operator= added? Every concrete iterator (DequeIterator..DequeConstReverseIterator) - was calling DequeIteratorBase::assign(), which called Base::operator=(). Base::operator=() - was not implemented. This went unnoticed because the iterator copy code has been unused. - - * wtf/Deque.h: - (WTF::Deque::remove): - (WTF::DequeIteratorBase::removeFromIteratorsList): - (WTF::DequeIteratorBase::operator=): - (WTF::DequeIteratorBase::~DequeIteratorBase): - -2009-02-18 Gustavo Noronha Silva - - Reviewed by Holger Freyther. - - Fix symbols.filter location, and add other missing files to the - autotools build, so that make dist works. - - * GNUmakefile.am: - -2009-02-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed failure in js1_5/Regress/regress-168347.js, as seen on the Oliver - bot. - - Technically, both behaviors are OK, but we might as well keep this test - passing. - - * runtime/FunctionPrototype.cpp: - (JSC::insertSemicolonIfNeeded): No need to add a trailing semicolon - after a trailing '}', since '}' ends a block, indicating the end of a - statement. - -2009-02-17 Geoffrey Garen - - Build fix. - - * runtime/FunctionPrototype.cpp: - -2009-02-17 Oliver Hunt - - Reviewed by Geoff Garen. - - Add assertion to guard against oversized pc relative calls. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::link): - -2009-02-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed REGRESSION: http://www.amnestyusa.org/ - fails to load. - - amnestyusa.org uses the Optimist JavaScript library, which adds event - listeners by concatenating string-ified functions. This is only sure to - be syntactically valid if the string-ified functions end in semicolons. - - * parser/Lexer.cpp: - (JSC::Lexer::isWhiteSpace): - * parser/Lexer.h: - (JSC::Lexer::isWhiteSpace): - (JSC::Lexer::isLineTerminator): Added some helper functions for examining - whitespace. - - * runtime/FunctionPrototype.cpp: - (JSC::appendSemicolonIfNeeded): - (JSC::functionProtoFuncToString): When string-ifying a function, insert - a semicolon in the last non-whitespace position, if one doesn't already exist. - -2009-02-16 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Roll out r41022 as it breaks qt and gtk builds - - * jit/JITArithmetic.cpp: - (JSC::isSSE2Present): - -2009-02-16 Sam Weinig - - Reviewed by Geoffrey Garen. - - Fix for - REGRESSION (r36779): Adding link, images, flash in TinyMCE blocks entire page (21382) - - No performance regression. - - * runtime/Arguments.cpp: - (JSC::Arguments::fillArgList): Add codepath for when the "length" property has been - overridden. - -2009-02-16 Mark Rowe - - Build fix. - - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::): - (WTF::TCMallocStats::FastMallocZone::FastMallocZone): - -2009-02-16 Csaba Osztrogonac - - Reviewed by Oliver Hunt. - - Bug 23787: Allow JIT to generate SSE2 code if using GCC - - - GCC version of the cpuid check. - - * jit/JITArithmetic.cpp: - (JSC::isSSE2Present): GCC assembly code added. - 6.6% progression on x86 Linux with JIT and WREC on SunSpider if using SSE2 capable machine. - -2009-02-13 Adam Treat - - Reviewed by George Staikos. - - https://bugs.webkit.org/show_bug.cgi?id=23960 - Crash Fix. - - Don't depend on 'initializeThreading()' to come before a call to 'isMainThread()' - as QtWebKit only calls 'initializeThreading()' during QWebPage construction. - - A client app may well make a call to QWebSettings::iconForUrl() for instance - before creating a QWebPage and that call to QWebSettings triggers an - ASSERT(isMainThread()) deep within WebCore. - - * wtf/ThreadingQt.cpp: - (WTF::isMainThread): - -2009-02-13 Gavin Barraclough - - Reviewed by Darin Adler. - - Some data in the instruction stream is potentially uninitialized - fix this. - - Change the OperandTypes constructor so that uninitialized memory in the int - is zeroed, and modify the Instruction constructor taking an Opcode so that - if !HAVE(COMPUTED_GOTO) (i.e. when Opcode is an enum, and is potentially only - a byte) it zeros the Instruction first before writing the opcode. - - * bytecode/Instruction.h: - (JSC::Instruction::Instruction): - * parser/ResultType.h: - (JSC::OperandTypes::OperandTypes): - -2009-02-13 Geoffrey Garen - - Build fix for non_JIT platforms. - - * bytecode/CodeBlock.h: - (JSC::CodeBlock::setIsNumericCompareFunction): - (JSC::CodeBlock::isNumericCompareFunction): - -2009-02-13 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed Optimize sort by JS numeric comparison - function not to run the comparison function - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::setIsNumericCompareFunction): - (JSC::CodeBlock::isNumericCompareFunction): Added the ability to track - whether a CodeBlock performs a sort-like numeric comparison. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): Set the isNumericCompareFunction bit - after compiling. - - * parser/Nodes.cpp: - (JSC::FunctionBodyNode::emitBytecode): Fixed a bug that caused us to - codegen an extra return at the end of all functions (eek!), since this - made it harder / weirder to detect the numeric comparison pattern in - bytecode. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncSort): Use the isNumericCompareFunction bit to do - a faster sort if we can. - - * runtime/FunctionConstructor.cpp: - (JSC::extractFunctionBody): - (JSC::constructFunction): - * runtime/FunctionConstructor.h: Renamed and exported extractFunctionBody for - use in initializing lazyNumericCompareFunction. - - * runtime/JSArray.cpp: - (JSC::compareNumbersForQSort): - (JSC::compareByStringPairForQSort): - (JSC::JSArray::sortNumeric): - (JSC::JSArray::sort): - * runtime/JSArray.h: Added a fast numeric sort. Renamed ArrayQSortPair - to be more specific since we do different kinds of qsort now. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::numericCompareFunction): - (JSC::JSGlobalData::ClientData::~ClientData): - * runtime/JSGlobalData.h: Added helper data for computing the - isNumericCompareFunction bit. - -2009-02-13 Darin Adler - - * Configurations/JavaScriptCore.xcconfig: Undo accidental commit of this file. - -2009-02-12 Darin Adler - - Reviewed by Oliver Hunt and Alexey Proskuryakov. - - Speed up a couple string functions. - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncIndexOf): Added a fast path for cases where the second - argument is either missing or an integer. - (JSC::stringProtoFuncBig): Use jsNontrivialString since the string is guaranteed - to be 2 or more characters long. - (JSC::stringProtoFuncSmall): Ditto. - (JSC::stringProtoFuncBlink): Ditto. - (JSC::stringProtoFuncBold): Ditto. - (JSC::stringProtoFuncItalics): Ditto. - (JSC::stringProtoFuncStrike): Ditto. - (JSC::stringProtoFuncSub): Ditto. - (JSC::stringProtoFuncSup): Ditto. - (JSC::stringProtoFuncFontcolor): Ditto. - (JSC::stringProtoFuncFontsize): Make the fast path Sam recently added even faster - by avoiding all but the minimum memory allocation. - (JSC::stringProtoFuncAnchor): Use jsNontrivialString. - (JSC::stringProtoFuncLink): Added a fast path. - - * runtime/UString.cpp: - (JSC::UString::find): Added a fast path for single-character search strings. - -2009-02-13 David Levin - - Reviewed by Darin Adler. - - Bug 23926: Race condition in callOnMainThreadAndWait - - - * wtf/MainThread.cpp: - Removed callOnMainThreadAndWait since it isn't used. - -2009-02-13 Oliver Hunt - - Reviewed by Jon Honeycutt. - - Math.random is really slow on windows. - - Math.random calls WTF::randomNumber which is implemented as - the secure rand_s on windows. Unfortunately rand_s is an order - of magnitude slower than arc4random. For this reason I've - added "weakRandomNumber" for use by JavaScript's Math Object. - In the long term we should look at using our own secure PRNG - in place of the system, but this will do for now. - - 30% win on SunSpider on Windows, resolving most of the remaining - disparity vs. Mac. - - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - (JSC::mathProtoFuncRandom): - * wtf/RandomNumber.cpp: - (WTF::weakRandomNumber): - (WTF::randomNumber): - * wtf/RandomNumber.h: - * wtf/RandomNumberSeed.h: - (WTF::initializeWeakRandomNumberGenerator): - -2009-02-12 Mark Rowe - - Fix the build for other platforms. - - * wtf/RandomNumber.cpp: - (WTF::randomNumber): - -2009-02-12 Gavin Barraclough - - Reviewed by Sam Weinig. - - Remove (/reduce) use of hard-wired register names from the JIT. - Currently there is no abstraction of registers used in the JIT, - which has a number of negative consequences. Hard-wiring x86 - register names makes the JIT less portable to other platforms, - and prevents us from performing dynamic register allocation to - attempt to maintain more temporary values in machine registers. - (The latter will be more important on x86-64, where we have more - registers to make use of). - - Also, remove MacroAssembler::mod32. This was not providing a - useful abstraction, and was not in keeping with the rest of the - MacroAssembler interface, in having specific register requirements. - - * assembler/MacroAssemblerX86Common.h: - * jit/JIT.cpp: - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emitSlowScriptCheck): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_lshift): - (JSC::JIT::compileFastArithSlow_op_lshift): - (JSC::JIT::compileFastArith_op_rshift): - (JSC::JIT::compileFastArithSlow_op_rshift): - (JSC::JIT::compileFastArith_op_bitand): - (JSC::JIT::compileFastArithSlow_op_bitand): - (JSC::JIT::compileFastArith_op_mod): - (JSC::JIT::compileFastArithSlow_op_mod): - (JSC::JIT::compileFastArith_op_post_inc): - (JSC::JIT::compileFastArithSlow_op_post_inc): - (JSC::JIT::compileFastArith_op_post_dec): - (JSC::JIT::compileFastArithSlow_op_post_dec): - (JSC::JIT::compileFastArith_op_pre_inc): - (JSC::JIT::compileFastArithSlow_op_pre_inc): - (JSC::JIT::compileFastArith_op_pre_dec): - (JSC::JIT::compileFastArithSlow_op_pre_dec): - (JSC::JIT::compileFastArith_op_add): - (JSC::JIT::compileFastArith_op_mul): - (JSC::JIT::compileFastArith_op_sub): - (JSC::JIT::compileBinaryArithOp): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpCallEvalSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::emitGetVirtualRegister): - (JSC::JIT::emitPutVirtualRegister): - (JSC::JIT::emitNakedCall): - (JSC::JIT::restoreArgumentReference): - (JSC::JIT::restoreArgumentReferenceForTrampoline): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdSlowCase): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - -2009-02-12 Horia Olaru - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=23400 - - When throwing an exception within an eval argument string, the dst parameter was - modified in the functions below and the return value for eval was altered. Changed - the emitNode call in JSC::ThrowNode::emitBytecode to use a temporary register - to store its results instead of dst. The JSC::FunctionCallResolveNode::emitBytecode - would load the function within the dst registry, also altering the result returned - by eval. Replaced it with another temporary. - - * parser/Nodes.cpp: - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::ThrowNode::emitBytecode): - -2009-02-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Speed up String.prototype.fontsize. - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncFontsize): Specialize for defined/commonly used values. - -2009-02-12 Geoffrey Garen - - Reviewed by Sam Weinig. - - Correctness fix. - - * wtf/RandomNumber.cpp: - (WTF::randomNumber): Divide by the maximum representable value, which - is different on each platform now, to get values between 0 and 1. - -2009-02-12 Geoffrey Garen - - Build fix. - - * wtf/RandomNumber.cpp: - (WTF::randomNumber): - -2009-02-12 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed . - - * wtf/RandomNumber.cpp: - (WTF::randomNumber): Make only one call to the random number generator - on platforms where the generator is cryptographically secure. The value - of randomness over and above cryptographically secure randomness is not - clear, and it caused some performance problems. - -2009-02-12 Adam Roben - - Fix lots of Perl warnings when building JavaScriptCoreGenerated on - Windows - - Reviewed by John Sullivan. - - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: - Create the docs/ directory so that we can write bytecode.html into it. - This matches what JavaScriptCore.xcodeproj does. - -2009-02-12 Simon Hausmann - - Rubber-stamped by Lars. - - Re-enable the JIT in the Qt build with -fno-stack-protector on Linux. - - * JavaScriptCore.pri: - -2009-02-11 Dmitry Titov - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=23705 - Fix the UI freeze caused by Worker generating a flood of messages. - Measure time we spend in executing posted work items. If too much time is spent - without returning to the run loop, exit and reschedule. - - * wtf/MainThread.h: - Added initializeMainThreadPlatform() to initialize low-level mechanism for posting - work items from thread to thread. This removes #ifdefs for WIN and CHROMIUM from platform-independent code. - - * wtf/MainThread.cpp: - (WTF::initializeMainThread): - (WTF::dispatchFunctionsFromMainThread): - Instead of dispatching all work items in the queue, dispatch them one by one - and measure elapsed time. After a threshold, reschedule and quit. - - (WTF::callOnMainThread): - (WTF::callOnMainThreadAndWait): - Only schedule dispatch if the queue was empty - to avoid many posted messages in the run loop queue. - - * wtf/mac/MainThreadMac.mm: - (WTF::scheduleDispatchFunctionsOnMainThread): - Use static instance of the mainThreadCaller instead of allocating and releasing it each time. - (WTF::initializeMainThreadPlatform): - * wtf/gtk/MainThreadChromium.cpp: - (WTF::initializeMainThreadPlatform): - * wtf/gtk/MainThreadGtk.cpp: - (WTF::initializeMainThreadPlatform): - * wtf/qt/MainThreadQt.cpp: - (WTF::initializeMainThreadPlatform): - * wtf/win/MainThreadWin.cpp: - (WTF::initializeMainThreadPlatform): - * wtf/wx/MainThreadWx.cpp: - (WTF::initializeMainThreadPlatform): - -2009-02-11 Sam Weinig - - Reviewed by Gavin Barraclough. - - Style cleanup. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::CodeLocationCommon::CodeLocationCommon): - (JSC::AbstractMacroAssembler::CodeLocationCommon::operator bool): - (JSC::AbstractMacroAssembler::CodeLocationCommon::reset): - (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForSwitch): - (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForExceptionHandler): - (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForJSR): - (JSC::AbstractMacroAssembler::CodeLocationLabel::getJumpDestination): - (JSC::AbstractMacroAssembler::CodeLocationJump::relink): - (JSC::AbstractMacroAssembler::CodeLocationJump::CodeLocationJump): - (JSC::AbstractMacroAssembler::CodeLocationCall::relink): - (JSC::AbstractMacroAssembler::CodeLocationCall::calleeReturnAddressValue): - (JSC::AbstractMacroAssembler::CodeLocationCall::CodeLocationCall): - (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::repatch): - (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::CodeLocationDataLabel32): - (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::repatch): - (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::CodeLocationDataLabelPtr): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::ProcessorReturnAddress): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToFunction): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::operator void*): - (JSC::AbstractMacroAssembler::PatchBuffer::link): - (JSC::::CodeLocationCommon::labelAtOffset): - (JSC::::CodeLocationCommon::jumpAtOffset): - (JSC::::CodeLocationCommon::callAtOffset): - (JSC::::CodeLocationCommon::dataLabelPtrAtOffset): - (JSC::::CodeLocationCommon::dataLabel32AtOffset): - -2009-02-11 Sam Weinig - - Reviewed by Gavin Barraclough. - - * assembler/AbstractMacroAssembler.h: Fix comments. - -2009-02-11 Alexey Proskuryakov - - Trying to fix wx build. - - * bytecode/JumpTable.h: Include "MacroAssembler.h", not . - * jscore.bkl: Added assembler directory to search paths. - -2009-02-10 Gavin Barraclough - - Build - fix. - (Narrow - changelog - for - dhyatt). - - * bytecode/Instruction.h: - (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): - (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): - -2009-02-10 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Reduce use of void* / reinterpret_cast in JIT repatching code, - add strong types for Calls and for the various types of pointers - we retain into the JIT generated instruction stream. - - No performance impact. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr): - (JSC::AbstractMacroAssembler::ImmPtr::asIntptr): - (JSC::AbstractMacroAssembler::Imm32::Imm32): - (JSC::AbstractMacroAssembler::Label::Label): - (JSC::AbstractMacroAssembler::DataLabelPtr::DataLabelPtr): - (JSC::AbstractMacroAssembler::Call::Call): - (JSC::AbstractMacroAssembler::Call::link): - (JSC::AbstractMacroAssembler::Call::linkTo): - (JSC::AbstractMacroAssembler::Jump::Jump): - (JSC::AbstractMacroAssembler::Jump::linkTo): - (JSC::AbstractMacroAssembler::CodeLocationCommon::CodeLocationCommon): - (JSC::AbstractMacroAssembler::CodeLocationCommon::operator bool): - (JSC::AbstractMacroAssembler::CodeLocationCommon::reset): - (JSC::AbstractMacroAssembler::CodeLocationLabel::CodeLocationLabel): - (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForSwitch): - (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForExceptionHandler): - (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForJSR): - (JSC::AbstractMacroAssembler::CodeLocationLabel::getJumpDestination): - (JSC::AbstractMacroAssembler::CodeLocationJump::CodeLocationJump): - (JSC::AbstractMacroAssembler::CodeLocationJump::relink): - (JSC::AbstractMacroAssembler::CodeLocationCall::CodeLocationCall): - (JSC::AbstractMacroAssembler::CodeLocationCall::relink): - (JSC::AbstractMacroAssembler::CodeLocationCall::calleeReturnAddressValue): - (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::CodeLocationDataLabel32): - (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::repatch): - (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::CodeLocationDataLabelPtr): - (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::repatch): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::ProcessorReturnAddress): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToFunction): - (JSC::AbstractMacroAssembler::ProcessorReturnAddress::operator void*): - (JSC::AbstractMacroAssembler::PatchBuffer::entry): - (JSC::AbstractMacroAssembler::PatchBuffer::trampolineAt): - (JSC::AbstractMacroAssembler::PatchBuffer::link): - (JSC::AbstractMacroAssembler::PatchBuffer::linkTailRecursive): - (JSC::AbstractMacroAssembler::PatchBuffer::patch): - (JSC::AbstractMacroAssembler::PatchBuffer::locationOf): - (JSC::AbstractMacroAssembler::PatchBuffer::returnAddressOffset): - (JSC::AbstractMacroAssembler::differenceBetween): - (JSC::::CodeLocationCommon::labelAtOffset): - (JSC::::CodeLocationCommon::jumpAtOffset): - (JSC::::CodeLocationCommon::callAtOffset): - (JSC::::CodeLocationCommon::dataLabelPtrAtOffset): - (JSC::::CodeLocationCommon::dataLabel32AtOffset): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::call): - * assembler/X86Assembler.h: - (JSC::X86Assembler::getCallReturnOffset): - * bytecode/CodeBlock.h: - (JSC::CallLinkInfo::CallLinkInfo): - (JSC::getStructureStubInfoReturnLocation): - (JSC::getCallLinkInfoReturnLocation): - * bytecode/Instruction.h: - (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): - (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): - * bytecode/JumpTable.h: - (JSC::StringJumpTable::ctiForValue): - (JSC::SimpleJumpTable::ctiForValue): - * bytecode/StructureStubInfo.h: - (JSC::StructureStubInfo::StructureStubInfo): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitCatch): - (JSC::prepareJumpTableForStringSwitch): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::cti_op_get_by_id_self_fail): - (JSC::getPolymorphicAccessStructureListSlot): - (JSC::Interpreter::cti_op_throw): - (JSC::Interpreter::cti_op_switch_imm): - (JSC::Interpreter::cti_op_switch_char): - (JSC::Interpreter::cti_op_switch_string): - (JSC::Interpreter::cti_vm_throw): - * jit/JIT.cpp: - (JSC::ctiSetReturnAddress): - (JSC::ctiPatchCallByReturnAddress): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - (JSC::CallRecord::CallRecord): - (JSC::JIT::compileGetByIdSelf): - (JSC::JIT::compileGetByIdProto): - (JSC::JIT::compileGetByIdChain): - (JSC::JIT::compilePutByIdReplace): - (JSC::JIT::compilePutByIdTransition): - (JSC::JIT::compilePatchGetArrayLength): - (JSC::JIT::emitCTICall): - * jit/JITCall.cpp: - (JSC::JIT::unlinkCall): - (JSC::JIT::linkCall): - * jit/JITInlineMethods.h: - (JSC::JIT::emitNakedCall): - (JSC::JIT::emitCTICall_internal): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdSlowCase): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - -2009-02-10 Adam Roben - - Windows build fix after r40813 - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Added profiler/ to the include - path so that Profiler.h can be found. - -2009-02-09 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Provide a class type for a generated block of JIT code. - Also changes the return address -> bytecode index map to - track the return addess as an unsigned offset into the code - instead of a ptrdiff_t in terms of void**s - the latter is - equal to the actual offset / sizeof(void*), making it a - potentially lossy representation. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::PatchBuffer::returnAddressOffset): - * assembler/X86Assembler.h: - (JSC::X86Assembler::getCallReturnOffset): - * bytecode/CodeBlock.h: - (JSC::CallReturnOffsetToBytecodeIndex::CallReturnOffsetToBytecodeIndex): - (JSC::getCallReturnOffset): - (JSC::CodeBlock::getBytecodeIndex): - (JSC::CodeBlock::jitCode): - (JSC::CodeBlock::callReturnIndexVector): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - (JSC::Interpreter::cti_vm_dontLazyLinkCall): - (JSC::Interpreter::cti_vm_lazyLinkCall): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::): - * jit/JITCall.cpp: - (JSC::JIT::linkCall): - * jit/JITCode.h: Added. - (JSC::): - (JSC::JITCode::JITCode): - (JSC::JITCode::operator bool): - (JSC::JITCode::addressForCall): - (JSC::JITCode::offsetOf): - (JSC::JITCode::execute): - -2009-02-09 John Grabowski - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=23856 - Change the definition of "main thread" for Chromium on OSX. - It does not match the DARWIN definition. - - * wtf/ThreadingPthreads.cpp: - (WTF::initializeThreading): - (WTF::isMainThread): - -2009-02-09 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Minor bugfix, incorrect check meant that subtraction causing integer overflow - would be missed on x86-64 JIT. - - * jit/JITArithmetic.cpp: - (JSC::JIT::compileBinaryArithOp): - -2009-02-09 Gavin Barraclough - - Reviewed by Oliver Hunt. - - A more sensible register allocation for x86-64. - - When WREC was ported to x86-64 it stuck with the same register allocation as x86. - This requires registers to be reordered on entry into WREC generated code, since - argument passing is different on x86-64 and x86 (regparm(3)). This patch switches - x86-64 to use a native register allocation, that does not require argument registers - to be reordered. - - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateEnter): - (JSC::WREC::Generator::generateReturnSuccess): - (JSC::WREC::Generator::generateReturnFailure): - * wrec/WRECGenerator.h: - -2009-02-05 Adam Roben - - Build fix - - Rubberstamped by Sam Weinig. - - * wtf/TypeTraits.h: Include Platform.h, since this header uses macros - defined there. - -2009-02-05 Dimitri Glazkov - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=23747 - Add Chromium threading-related files. - - * wtf/MainThread.cpp: Added platform guard to initializeMainThread. - * wtf/chromium/ChromiumThreading.h: Added. - * wtf/chromium/MainThreadChromium.cpp: Added. - (WTF::initializeMainThread): - (WTF::scheduleDispatchFunctionsOnMainThread): - -2009-02-05 David Levin - - Reviewed by Darin Adler. - - Bug 23713: COMPILE_ASSERTS should be moved out of TypeTraits.h and into .cpp file - - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - - * wtf/HashTraits.h: - Remove unnecessary header file that I missed when moving out the type traits form this file. - - * wtf/TypeTraits.cpp: Added. - (WTF::): - * wtf/TypeTraits.h: - Moved the compile asserts into TypeTraits.cpp file. - -2009-02-04 Gavin Barraclough - - Reviewed by Oliver 'the nun' Hunt. - - Add -e switch to jsc to enable evaluation of scripts passed on the command line. - - * jsc.cpp: - (Script::Script): - (runWithScripts): - (printUsageStatement): - (parseArguments): - (jscmain): - -2009-02-04 Gavin Barraclough - - Rubber stamped by Sam 'Big Mac' Weinig. - - * assembler/AbstractMacroAssembler.h: Copied from assembler/MacroAssembler.h. - * assembler/MacroAssemblerX86.h: Copied from assembler/MacroAssembler.h. - * assembler/MacroAssemblerX86Common.h: Copied from assembler/MacroAssembler.h. - * assembler/MacroAssemblerX86_64.h: Copied from assembler/MacroAssembler.h. - -2009-02-04 Gavin Barraclough - - Reviewed by Sam Weinig. - - This patch tidies up the MacroAssembler, cleaning up the code and refactoring out the - platform-specific parts. The MacroAssembler gets split up like a beef burger, with the - platform-agnostic data types being the lower bun (in the form of the class AbstractMacroAssembler), - the plaform-specific code generation forming a big meaty patty of methods like 'add32', - 'branch32', etc (MacroAssemblerX86), and finally topped off with the bun-lid of the - MacroAssembler class itself, providing covenience methods such as the stack peek & poke, - and backwards branch methods, all of which can be described in a platform independent - way using methods from the base class. The AbstractMacroAssembler is templated on the - type of the assembler class that will be used for code generation, and the three layers - are held together with the cocktail stick of inheritance. - - The above description is a slight simplification since the MacroAssemblerX86 is actually - formed from two layers (in effect giving us a kind on bacon double cheeseburger) - with the - bulk of methods that are common between x86 & x86-64 implemented in MacroAssemblerX86Common, - which forms a base class for MacroAssemblerX86 and MacroAssemblerX86_64 (which add the methods - specific to the given platform). - - I'm landing these changes first without splitting the classes across multiple files, - I will follow up with a second patch to split up the file MacroAssembler.h. - - * assembler/MacroAssembler.h: - (JSC::AbstractMacroAssembler::): - (JSC::AbstractMacroAssembler::DataLabelPtr::DataLabelPtr): - (JSC::AbstractMacroAssembler::DataLabelPtr::patch): - (JSC::AbstractMacroAssembler::DataLabel32::DataLabel32): - (JSC::AbstractMacroAssembler::DataLabel32::patch): - (JSC::AbstractMacroAssembler::Label::Label): - (JSC::AbstractMacroAssembler::Jump::Jump): - (JSC::AbstractMacroAssembler::Jump::link): - (JSC::AbstractMacroAssembler::Jump::linkTo): - (JSC::AbstractMacroAssembler::Jump::patch): - (JSC::AbstractMacroAssembler::JumpList::link): - (JSC::AbstractMacroAssembler::JumpList::linkTo): - (JSC::AbstractMacroAssembler::PatchBuffer::link): - (JSC::AbstractMacroAssembler::PatchBuffer::addressOf): - (JSC::AbstractMacroAssembler::PatchBuffer::setPtr): - (JSC::AbstractMacroAssembler::size): - (JSC::AbstractMacroAssembler::copyCode): - (JSC::AbstractMacroAssembler::label): - (JSC::AbstractMacroAssembler::align): - (JSC::AbstractMacroAssembler::differenceBetween): - (JSC::MacroAssemblerX86Common::xor32): - (JSC::MacroAssemblerX86Common::load32WithAddressOffsetPatch): - (JSC::MacroAssemblerX86Common::store32WithAddressOffsetPatch): - (JSC::MacroAssemblerX86Common::move): - (JSC::MacroAssemblerX86Common::swap): - (JSC::MacroAssemblerX86Common::signExtend32ToPtr): - (JSC::MacroAssemblerX86Common::zeroExtend32ToPtr): - (JSC::MacroAssemblerX86Common::branch32): - (JSC::MacroAssemblerX86Common::jump): - (JSC::MacroAssemblerX86_64::add32): - (JSC::MacroAssemblerX86_64::sub32): - (JSC::MacroAssemblerX86_64::load32): - (JSC::MacroAssemblerX86_64::store32): - (JSC::MacroAssemblerX86_64::addPtr): - (JSC::MacroAssemblerX86_64::andPtr): - (JSC::MacroAssemblerX86_64::orPtr): - (JSC::MacroAssemblerX86_64::rshiftPtr): - (JSC::MacroAssemblerX86_64::subPtr): - (JSC::MacroAssemblerX86_64::xorPtr): - (JSC::MacroAssemblerX86_64::loadPtr): - (JSC::MacroAssemblerX86_64::loadPtrWithAddressOffsetPatch): - (JSC::MacroAssemblerX86_64::storePtr): - (JSC::MacroAssemblerX86_64::storePtrWithAddressOffsetPatch): - (JSC::MacroAssemblerX86_64::branchPtr): - (JSC::MacroAssemblerX86_64::branchTestPtr): - (JSC::MacroAssemblerX86_64::branchAddPtr): - (JSC::MacroAssemblerX86_64::branchSubPtr): - (JSC::MacroAssemblerX86_64::branchPtrWithPatch): - (JSC::MacroAssemblerX86_64::storePtrWithPatch): - (JSC::MacroAssemblerX86::add32): - (JSC::MacroAssemblerX86::sub32): - (JSC::MacroAssemblerX86::load32): - (JSC::MacroAssemblerX86::store32): - (JSC::MacroAssemblerX86::branch32): - (JSC::MacroAssemblerX86::branchPtrWithPatch): - (JSC::MacroAssemblerX86::storePtrWithPatch): - (JSC::MacroAssembler::pop): - (JSC::MacroAssembler::peek): - (JSC::MacroAssembler::poke): - (JSC::MacroAssembler::branchPtr): - (JSC::MacroAssembler::branch32): - (JSC::MacroAssembler::branch16): - (JSC::MacroAssembler::branchTestPtr): - (JSC::MacroAssembler::addPtr): - (JSC::MacroAssembler::andPtr): - (JSC::MacroAssembler::orPtr): - (JSC::MacroAssembler::rshiftPtr): - (JSC::MacroAssembler::subPtr): - (JSC::MacroAssembler::xorPtr): - (JSC::MacroAssembler::loadPtr): - (JSC::MacroAssembler::loadPtrWithAddressOffsetPatch): - (JSC::MacroAssembler::storePtr): - (JSC::MacroAssembler::storePtrWithAddressOffsetPatch): - (JSC::MacroAssembler::branchAddPtr): - (JSC::MacroAssembler::branchSubPtr): - * jit/JITArithmetic.cpp: - (JSC::JIT::compileBinaryArithOp): - -2009-02-04 Alexey Proskuryakov - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=23681 - Worker tests crash in debug builds if run --singly - - The crash happened because worker threads continued running while debug-only static objects - were already being destroyed on main thread. - - * runtime/Structure.cpp: Create static debug-only sets in heap, so that they don't get - destroyed. - - * wtf/ThreadingPthreads.cpp: Changed assertions to conventional form. - -2009-02-03 Gavin Barraclough - - Reviewed by Geoff Garen. - - https://bugs.webkit.org/show_bug.cgi?id=23715 - - Simplify MacroAssembler interface, by combining comparison methods. - Seprate operations are combined as follows: - jz32/jnz32/jzPtr/jnzPtr -> branchTest32/branchTestPtr, - j*(Add|Mul|Sub)32/j*(Add|Mul|Sub)Ptr -> branch(Add|Mul|Sub)32/branch(Add|Mul|Sub)Ptr - j*32/j*Ptr (all other two op combparisons) -> branch32/brnachPtr - set*32 -> set32 - - Also, represent the Scale of BaseIndex addresses as a plain enum (0,1,2,3), - instead of as multiplicands (1,2,4,8). - - This patch singificantly reduces replication of code, and increases functionality supported - by the MacroAssembler. No performance impact. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::): - (JSC::MacroAssembler::branchPtr): - (JSC::MacroAssembler::branchPtrWithPatch): - (JSC::MacroAssembler::branch32): - (JSC::MacroAssembler::branch16): - (JSC::MacroAssembler::branchTestPtr): - (JSC::MacroAssembler::branchTest32): - (JSC::MacroAssembler::branchAddPtr): - (JSC::MacroAssembler::branchAdd32): - (JSC::MacroAssembler::branchMul32): - (JSC::MacroAssembler::branchSubPtr): - (JSC::MacroAssembler::branchSub32): - (JSC::MacroAssembler::set32): - (JSC::MacroAssembler::setTest32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::jccRel32): - (JSC::X86Assembler::setccOpcode): - (JSC::X86Assembler::cmpq_mr): - (JSC::X86Assembler::setcc_r): - (JSC::X86Assembler::sete_r): - (JSC::X86Assembler::setne_r): - (JSC::X86Assembler::jne): - (JSC::X86Assembler::je): - (JSC::X86Assembler::jl): - (JSC::X86Assembler::jb): - (JSC::X86Assembler::jle): - (JSC::X86Assembler::jbe): - (JSC::X86Assembler::jge): - (JSC::X86Assembler::jg): - (JSC::X86Assembler::ja): - (JSC::X86Assembler::jae): - (JSC::X86Assembler::jo): - (JSC::X86Assembler::jp): - (JSC::X86Assembler::js): - (JSC::X86Assembler::jcc): - (JSC::X86Assembler::X86InstructionFormatter::putModRmSib): - * jit/JIT.cpp: - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emitSlowScriptCheck): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_lshift): - (JSC::JIT::compileFastArith_op_mod): - (JSC::JIT::compileFastArith_op_post_inc): - (JSC::JIT::compileFastArith_op_post_dec): - (JSC::JIT::compileFastArith_op_pre_inc): - (JSC::JIT::compileFastArith_op_pre_dec): - (JSC::JIT::compileBinaryArithOp): - (JSC::JIT::compileFastArith_op_add): - (JSC::JIT::compileFastArith_op_mul): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::checkStructure): - (JSC::JIT::emitJumpIfJSCell): - (JSC::JIT::emitJumpIfNotJSCell): - (JSC::JIT::emitJumpIfImmediateNumber): - (JSC::JIT::emitJumpIfNotImmediateNumber): - (JSC::JIT::emitJumpIfImmediateInteger): - (JSC::JIT::emitJumpIfNotImmediateInteger): - (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * runtime/RegExp.cpp: - (JSC::RegExp::match): - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateEnter): - (JSC::WREC::Generator::generateIncrementIndex): - (JSC::WREC::Generator::generateLoadCharacter): - (JSC::WREC::Generator::generateJumpIfNotEndOfInput): - (JSC::WREC::Generator::generateBackreferenceQuantifier): - (JSC::WREC::Generator::generateNonGreedyQuantifier): - (JSC::WREC::Generator::generateGreedyQuantifier): - (JSC::WREC::Generator::generatePatternCharacterPair): - (JSC::WREC::Generator::generatePatternCharacter): - (JSC::WREC::Generator::generateCharacterClassInvertedRange): - (JSC::WREC::Generator::generateCharacterClassInverted): - (JSC::WREC::Generator::generateAssertionBOL): - (JSC::WREC::Generator::generateAssertionEOL): - (JSC::WREC::Generator::generateAssertionWordBoundary): - (JSC::WREC::Generator::generateBackreference): - -2009-02-03 David Hyatt - - Fix a bug in Vector's shrinkCapacity method. It did not properly copy elements into the inline buffer - when shrinking down from a size that was greater than the inline capacity. - - Reviewed by Maciej - - * wtf/Vector.h: - (WTF::VectorBuffer::VectorBuffer): - (WTF::VectorBuffer::allocateBuffer): - -2009-02-03 Simon Hausmann - - Reviewed by Tor Arne Vestbø. - - Added accessor for JSByteArray storage. - - * runtime/JSByteArray.h: - (JSC::JSByteArray::storage): - -2009-02-03 Dmitry Titov - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=23560 - Implement SharedTimer on WorkerRunLoop - - * JavaScriptCore.exp: - Forgot to expose ThreadCondition::timedWait() in one of previous patches. - -2009-02-02 Oliver Hunt - - Reviewed by Gavin Barraclough. - - REGRESSION: Regular Expressions and character classes, shorthands and ranges - - - In certain circumstances when WREC::Generator::generateCharacterClassInvertedRange invokes - itself recursively, it will incorrectly emit (and thus consume) the next single character - match in the current character class. As WREC uses a binary search this out of sequence - codegen could result in a character match being missed and so cause the regex to produce - incorrect results. - - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateCharacterClassInvertedRange): - -2009-02-02 Darin Adler - - Reviewed by Dave Hyatt. - - Bug 23676: Speed up uses of reserveCapacity on new vectors by adding a new reserveInitialCapacity - https://bugs.webkit.org/show_bug.cgi?id=23676 - - * API/JSObjectRef.cpp: - (JSObjectCopyPropertyNames): Use reserveInitialCapacity. - * parser/Lexer.cpp: - (JSC::Lexer::Lexer): Ditto. - (JSC::Lexer::clear): Ditto. - - * wtf/Vector.h: Added reserveInitialCapacity, a more efficient version of - reserveCapacity for use when the vector is brand new (still size 0 with no - capacity other than the inline capacity). - -2009-01-30 Mark Rowe - - Rubber-stamped by Oliver Hunt. - - Enable the JIT on Mac OS X x86_64 as it passes all tests. - - * wtf/Platform.h: - -2009-01-30 Oliver Hunt - - Reviewed by Mark Rowe and Sam Weinig. - - Finally fix load() to propagate exceptions correctly. - - * jsc.cpp: - (functionLoad): - -2009-01-30 David Levin - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=23618 - Templated worker tasks should be more error proof to use. - Fix Chromium build. - - * wtf/TypeTraits.h: - (WTF::IsConvertibleToInteger::IsConvertibleToDouble): - Avoid "possible loss of data" warning when using Microsoft's C++ compiler - by avoiding an implicit conversion of int types to doubles. - -2009-01-30 Laszlo Gombos - - Reviewed by Simon Hausmann. - - Bug 23580: GNU mode RVCT compilation support - - - * pcre/pcre_exec.cpp: Use COMPILER(GCC) instead of __GNUC__. - * wtf/FastMalloc.cpp: Ditto. - (WTF::TCMallocStats::): - * wtf/Platform.h: Don't define COMPILER(GCC) with RVCT --gnu. - -2009-01-30 David Levin - - Reviewed by Alexey Proskuryakov. - - Bug 23618: Templated worker tasks should be more error proof to use - - - Add the type traits needed for the generic worker tasks - and compile asserts for them. - - Add a summary header to the TypeTraits.h file to explain what is in there. - - Add a note to explain IsPod's deficiencies. - - * wtf/TypeTraits.h: - -2009-01-30 David Levin - - Reviewed by Alexey Proskuryakov. - - Bug 23616: Various "template helpers" should be consolidated from isolated files in JavaScriptCore. - - - * wtf/TypeTraits.h: Moved RemovePointer, IsPod, IsInteger to this file. - - * wtf/OwnPtr.h: Use RemovePointer from TypeTraits.h. - * wtf/RetainPtr.h: Ditto. - - * wtf/HashTraits.h: Use IsInteger from TypeTraits.h. - - * wtf/VectorTraits.h: Use IsPod from TypeTraits.h. - - * GNUmakefile.am: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - Added TypeTraits.h. - -2009-01-29 Stephanie Lewis - - RS by Oliver Hunt. - - Update the order files. - - * JavaScriptCore.order: - -2009-01-29 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 23551: Crash on page load with profiler enabled and running - - - - Interpreter::execute(FunctionBodyNode*, ...) calls Profiler::didExecute() - with a stale CallFrame. If some part of the scope chain has already been - freed, Profiler::didExecute() will crash when attempting to get the lexical - global object. The fix is to make the didExecute() call use the caller's - CallFrame, not the one made for the function call. In this case, the - willExecute() call should also be changed to match. - - Since this occurs in the actual inspector JS, it is difficult to reduce. - I couldn't make a layout test. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - -2009-01-28 Sam Weinig - - Reviewed by Gavin Barraclough. - - Fix for - Hang occurs when closing Installer window (iTunes, Aperture) - - * JavaScriptCore.exp: Export JSGlobalData::sharedInstance. - -2009-01-28 Sam Weinig - - Reviewed by Geoff Garen. - - Initial patch by Mark Rowe. - - - REGRESSION (r36006): "out of memory" alert running dromaeo on Windows - - Report the cost of the ArrayStorage vector more accurately/often. - - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): Report the extra cost even for a filled array - because JSString using the single character optimization and immediates - wont increase the cost themselves. - (JSC::JSArray::putSlowCase): Update the cost when increasing the size of - the array. - (JSC::JSArray::increaseVectorLength): Ditto. - -2009-01-28 Sam Weinig - - Reviewed by Geoff Garen. - - Fix for - REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view - - Iterating the properties of activation objects accessed through the WebKit debugging - APIs was broken by forced conversion of JSActivation to the global object. To fix this, - we use a proxy activation object that acts more like a normal JSObject. - - * debugger/DebuggerActivation.cpp: Added. - (JSC::DebuggerActivation::DebuggerActivation): - (JSC::DebuggerActivation::mark): - (JSC::DebuggerActivation::className): - (JSC::DebuggerActivation::getOwnPropertySlot): - (JSC::DebuggerActivation::put): - (JSC::DebuggerActivation::putWithAttributes): - (JSC::DebuggerActivation::deleteProperty): - (JSC::DebuggerActivation::getPropertyNames): - (JSC::DebuggerActivation::getPropertyAttributes): - (JSC::DebuggerActivation::defineGetter): - (JSC::DebuggerActivation::defineSetter): - (JSC::DebuggerActivation::lookupGetter): - (JSC::DebuggerActivation::lookupSetter): - * debugger/DebuggerActivation.h: Added. - Proxy JSActivation object for Debugging. - - * runtime/JSActivation.h: - (JSC::JSActivation::isActivationObject): Added. - * runtime/JSObject.h: - (JSC::JSObject::isActivationObject): Added. - -2009-01-28 David Kilzer - - Bug 23490: Remove initialRefCount argument from RefCounted class - - - - Reviewed by Darin Adler. - - RefCountedBase now always starts with a ref count of 1, so there - is no need to pass the initialRefCount into the class anymore. - - * wtf/ByteArray.h: - (WTF::ByteArray::ByteArray): Removed call to RefCounted(1). - * wtf/RefCounted.h: - (WTF::RefCountedBase::RefCountedBase): Changed to start with a - ref count of 1. - (WTF::RefCounted::RefCounted): Removed initialRefCount argument - and removed call to RefCounted(1). - -2009-01-26 Adele Peterson - - Build fix. - - * debugger/Debugger.cpp: - -2009-01-26 Gavin Barraclough - - Reviewed by Darin Adler. - - Fixes for eq null & neq null, on 64-bit JIT. - https://bugs.webkit.org/show_bug.cgi?id=23559 - - This patch degrades 64-bit JIT performance on some benchmarks, - due to the whole not-being-incorrect thing. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - -2009-01-26 Cameron Zwarich - - Reviewed by Gavin Barraclough. - - Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames - - - - * JavaScriptCore.exp: - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): Added so that WebScriptCallFrame can - evaluate JS starting from a global call frame. - * debugger/Debugger.h: - -2009-01-25 Mark Rowe - - Rubber-stamped by Dan Bernstein. - - Improve the consistency of settings in our .xcconfig files. - - * Configurations/Base.xcconfig: Enable GCC_OBJC_CALL_CXX_CDTORS to match other projects. - -2009-01-25 Darin Adler - - Reviewed by Mark Rowe. - - Bug 23352: Turn on more compiler warnings in the Mac build - https://bugs.webkit.org/show_bug.cgi?id=23352 - - Turn on the following warnings: - - -Wcast-qual - -Wextra-tokens - -Wformat=2 - -Winit-self - -Wmissing-noreturn - -Wpacked - -Wrendundant-decls - - * Configurations/Base.xcconfig: Added the new warnings. Switched to -Wextra instead of - -W for clarity since we don't have to support the older versions of gcc that require the - old -W syntax. Since we now use -Wformat=2, removed -Wformat-security. Also removed - -Wno-format-y2k since we can have that one on now. - -2009-01-25 Judit Jasz - - Reviewed by Darin Adler. - - Compilation problem fixing - http://bugs.webkit.org/show_bug.cgi?id=23497 - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): Use JSValuePtr::encode. - -2009-01-25 Darin Adler - - Reviewed by Sam Weinig. - - Bug 23352: Turn on more compiler warnings in the Mac build - https://bugs.webkit.org/show_bug.cgi?id=23352 - - Fourth patch: Deal with the last few stray warnings. - - * parser/Parser.cpp: Only declare jscyyparse if it's not already declared. - This makes both separate compilation and all-in-one compilation work with the - -Wredundant-decls warning. - -2009-01-25 Darin Adler - - Reviewed by Sam Weinig. - - Bug 23352: Turn on more compiler warnings in the Mac build - https://bugs.webkit.org/show_bug.cgi?id=23352 - - Third patch: Use the noreturn attribute on functions that don't - return to prepare for the use of the -Wmissing-noreturn warning. - - * jit/JITCall.cpp: - (JSC::unreachable): Added NO_RETURN. - * jsc.cpp: - (functionQuit): Ditto. - (printUsageStatement): Ditto. - * wtf/AlwaysInline.h: Added definition of NO_RETURN. - -2009-01-24 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Force inlining of Lexer::matchPunctuator - - 2.2% win when parsing jQuery, Mootools, Prototype, etc - - * parser/Lexer.h: - -2009-01-23 Gavin Barraclough - - Reviewed by Geoff Garen. - - Fix for - Ensure that callbacks out from the JSC interface are only allowed - to return in reverse-chronological order to that in which they were - made. If we allow earlier callbacks to return first, then this may - result in setions of the RegisterFile in use by another thread - being trampled. - - See uber-comment in JSLock.h for details. - - * runtime/JSLock.cpp: - (JSC::JSLock::DropAllLocks::DropAllLocks): - (JSC::JSLock::DropAllLocks::~DropAllLocks): - -2009-01-23 Darin Adler - - Try to fix WX build. - - * runtime/JSGlobalObjectFunctions.h: Include - for the definition of UChar. - -2009-01-23 Anders Carlsson - - * Configurations/Base.xcconfig: - GCC 4.0 build fix. - - * runtime/JSNumberCell.h: - 64-bit build fix. - -2009-01-23 Anders Carlsson - - Reviewed by Sam Weinig. - - Turn on -Wmissing-prototypes and fix the warnings. - - * API/JSClassRef.cpp: - (clearReferenceToPrototype): - * Configurations/Base.xcconfig: - * runtime/Collector.cpp: - (JSC::getPlatformThreadRegisters): - * runtime/ExceptionHelpers.cpp: - (JSC::createError): - * runtime/JSGlobalObjectFunctions.h: - * runtime/JSNumberCell.h: - * runtime/UString.cpp: - (JSC::initializeStaticBaseString): - (JSC::createRep): - * wtf/FastMalloc.cpp: - * wtf/Threading.cpp: - -2009-01-22 Mark Rowe - - Rubber-stamped by Anders Carlsson. - - Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily. - - Current versions of Xcode only respect it for C and Objective-C files, - and our code doesn't currently compile if it is applied to C++ and - Objective-C++ files. - - * Configurations/Base.xcconfig: - -2009-01-22 Steve Falkenburg - - https://bugs.webkit.org/show_bug.cgi?id=23489 - - Return currentTime() in correct units for the two early return cases. - - Reviewed by Mark Rowe. - - * wtf/CurrentTime.cpp: - (WTF::currentTime): - -2009-01-22 Sam Weinig - - Reviewed by Mark Rowe. - - Fix for - FastMalloc allocating an extra 4MB of meta-data on 64-bit - - Rely on the fact that on all known x86-64 platforms only use 48 bits of - address space to shrink the initial size of the PageMap from ~4MB to 120K. - For 64-bit we still use a 3-level radix tree, but now each level is only 12 - bits wide. - - No performance change. - - * wtf/FastMalloc.cpp: - (WTF::MapSelector): Add specialization for 64 bit that takes into account the - 16 bits of unused address space on x86-64. - -2009-01-22 Beth Dakin - - Reviewed by Sam Weinig. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=23461 LayoutTests/ - fast/js/numeric-conversion.html is broken, and corresponding - - - The basic problem here is that parseInt(Infinity) should be NaN, - but we were returning 0. NaN matches Safari 3.2.1 and Firefox. - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncParseInt): - -2009-01-22 Oliver Hunt - - Reviewed by Geoff Garen. - - (r39682-r39736) JSFunFuzz: crash on "(function(){({ x2: x }), })()" - - - Automatic semicolon insertion was resulting in this being accepted in the initial - nodeless parsing, but subsequent reparsing for code generation would fail, leading - to a crash. The solution is to ensure that reparsing a function performs parsing - in the same state as the initial parse. We do this by modifying the saved source - ranges to include rather than exclude the opening and closing braces. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): add an assertion for successful recompile - * parser/Lexer.h: - (JSC::Lexer::sourceCode): include rather than exclude braces. - * parser/Nodes.h: - (JSC::FunctionBodyNode::toSourceString): No need to append braces anymore. - -2009-01-22 Dmitry Titov - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=23373 - - Implement ThreadCondition::timedWait(). - Since we borrow the code for condition variables from other sources, - I did the same for timedWait(). See comments in ThreadingWin.cpp for - rationale and more info. - - * wtf/CONTRIBUTORS.pthreads-win32: - Added. A list of Pthreads-win32 contributors mentioned in their license. The license itself - is included into wtf/ThreadingWin32.cpp. - - * wtf/Threading.h: - * wtf/ThreadingWin.cpp: - Additional info and Pthreads-win32 license at the beginning. - (WTF::PlatformCondition::timedWait): new method, derived from Pthreads-win32. - (WTF::PlatformCondition::signal): same - (WTF::ThreadCondition::ThreadCondition): - (WTF::ThreadCondition::~ThreadCondition): - (WTF::ThreadCondition::wait): this now calls PlatformCondition::timedWait. - (WTF::ThreadCondition::timedWait): same - (WTF::ThreadCondition::signal): this now calls PlatformCondition::signal. - (WTF::ThreadCondition::broadcast): same - -2009-01-21 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=23469. - - We need to check all numbers in integer switches, not just those - represented as integer JSImmediates. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::cti_op_switch_imm): - -2009-01-21 Gavin Barraclough - - Reviewed by Geoff Garen. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=23468. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2009-01-21 Alexey Proskuryakov - - Suggested by Oliver Hunt. Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=23456 - Function argument names leak - - * parser/Nodes.cpp: (JSC::FunctionBodyNode::~FunctionBodyNode): Destruct parameter names. - -2009-01-20 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Windows build fix - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2009-01-20 Gavin Barraclough - - Reviewed by Mark Rowe. - - Structure property table deleted offset maps are being leaked. - Probably shouldn't be doing that. - - https://bugs.webkit.org/show_bug.cgi?id=23442 - - * runtime/Structure.cpp: - (JSC::Structure::~Structure): - -2009-01-20 Oliver Hunt - - Reviewed by NOBODY (build fix). - - Attempt to fix gtk build - - * GNUmakefile.am: - -2009-01-20 Darin Adler - - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferences): Add back the initialization to fix the build. - -2009-01-20 Darin Adler - - Reviewed by Mark Rowe. - - Bug 23352: Turn on more compiler warnings in the Mac build - https://bugs.webkit.org/show_bug.cgi?id=23352 - - First patch: Fix some simple cases of various warnings. - - * pcre/pcre_compile.cpp: - (jsRegExpCompile): Use const_cast to change const-ness. - - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferences): Remove unneeded initialization and - use UChar instead of unsigned short for UTF-16 values. - - * wtf/dtoa.cpp: - (WTF::strtod): Use const_cast to change const-ness. - -2009-01-20 Oliver Hunt - - Reviewed by NOBODY (build fix). - - Whoops, remove runtime/ByteArray references from .pri and .scons builds, update .bkl - - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCoreSources.bkl: - -2009-01-20 Oliver Hunt - - RS=Dan Bernstein. - - Move runtime/ByteArray to wtf/ByteArray - - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSByteArray.cpp: - * runtime/JSByteArray.h: - * wtf/ByteArray.cpp: Renamed from JavaScriptCore/runtime/ByteArray.cpp. - (WTF::ByteArray::create): - * wtf/ByteArray.h: Renamed from JavaScriptCore/runtime/ByteArray.h. - (WTF::ByteArray::length): - (WTF::ByteArray::set): - (WTF::ByteArray::get): - (WTF::ByteArray::data): - (WTF::ByteArray::deref): - (WTF::ByteArray::ByteArray): - -2009-01-19 Sam Weinig - - Rubber-stamped by Gavin Barraclough. - - Remove temporary operator-> from JSValuePtr. - - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::call): - * API/JSCallbackObjectFunctions.h: - (JSC::::call): - (JSC::::toNumber): - (JSC::::toString): - * API/JSObjectRef.cpp: - (JSObjectSetPrototype): - * API/JSValueRef.cpp: - (JSValueGetType): - (JSValueIsUndefined): - (JSValueIsNull): - (JSValueIsBoolean): - (JSValueIsNumber): - (JSValueIsString): - (JSValueIsObject): - (JSValueIsObjectOfClass): - (JSValueToBoolean): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - * bytecode/CodeBlock.cpp: - (JSC::valueToSourceString): - (JSC::CodeBlock::mark): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::isKnownNotImmediate): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitEqualityOp): - (JSC::keyForImmediateSwitch): - * interpreter/Interpreter.cpp: - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::jsAddSlowCase): - (JSC::jsAdd): - (JSC::jsTypeStringForValue): - (JSC::jsIsObjectType): - (JSC::jsIsFunctionType): - (JSC::isNotObject): - (JSC::Interpreter::callEval): - (JSC::Interpreter::throwException): - (JSC::cachePrototypeChain): - (JSC::Interpreter::tryCachePutByID): - (JSC::countPrototypeChainEntriesAndCheckForProxies): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::tryCTICachePutByID): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::Interpreter::cti_op_convert_this): - (JSC::Interpreter::cti_op_add): - (JSC::Interpreter::cti_op_pre_inc): - (JSC::Interpreter::cti_op_put_by_id_generic): - (JSC::Interpreter::cti_op_get_by_id_generic): - (JSC::Interpreter::cti_op_put_by_id): - (JSC::Interpreter::cti_op_put_by_id_second): - (JSC::Interpreter::cti_op_put_by_id_fail): - (JSC::Interpreter::cti_op_get_by_id): - (JSC::Interpreter::cti_op_get_by_id_second): - (JSC::Interpreter::cti_op_get_by_id_self_fail): - (JSC::Interpreter::cti_op_get_by_id_proto_list): - (JSC::Interpreter::cti_op_get_by_id_proto_list_full): - (JSC::Interpreter::cti_op_get_by_id_proto_fail): - (JSC::Interpreter::cti_op_get_by_id_array_fail): - (JSC::Interpreter::cti_op_get_by_id_string_fail): - (JSC::Interpreter::cti_op_instanceof): - (JSC::Interpreter::cti_op_del_by_id): - (JSC::Interpreter::cti_op_mul): - (JSC::Interpreter::cti_op_call_JSFunction): - (JSC::Interpreter::cti_op_call_NotJSFunction): - (JSC::Interpreter::cti_op_construct_JSConstruct): - (JSC::Interpreter::cti_op_construct_NotJSConstruct): - (JSC::Interpreter::cti_op_get_by_val): - (JSC::Interpreter::cti_op_get_by_val_byte_array): - (JSC::Interpreter::cti_op_sub): - (JSC::Interpreter::cti_op_put_by_val): - (JSC::Interpreter::cti_op_put_by_val_array): - (JSC::Interpreter::cti_op_put_by_val_byte_array): - (JSC::Interpreter::cti_op_loop_if_true): - (JSC::Interpreter::cti_op_negate): - (JSC::Interpreter::cti_op_div): - (JSC::Interpreter::cti_op_pre_dec): - (JSC::Interpreter::cti_op_not): - (JSC::Interpreter::cti_op_jtrue): - (JSC::Interpreter::cti_op_post_inc): - (JSC::Interpreter::cti_op_lshift): - (JSC::Interpreter::cti_op_bitand): - (JSC::Interpreter::cti_op_rshift): - (JSC::Interpreter::cti_op_bitnot): - (JSC::Interpreter::cti_op_mod): - (JSC::Interpreter::cti_op_post_dec): - (JSC::Interpreter::cti_op_urshift): - (JSC::Interpreter::cti_op_bitxor): - (JSC::Interpreter::cti_op_bitor): - (JSC::Interpreter::cti_op_push_scope): - (JSC::Interpreter::cti_op_is_undefined): - (JSC::Interpreter::cti_op_is_boolean): - (JSC::Interpreter::cti_op_is_number): - (JSC::Interpreter::cti_op_to_jsnumber): - (JSC::Interpreter::cti_op_in): - (JSC::Interpreter::cti_op_put_by_index): - (JSC::Interpreter::cti_op_switch_imm): - (JSC::Interpreter::cti_op_switch_char): - (JSC::Interpreter::cti_op_switch_string): - (JSC::Interpreter::cti_op_del_by_val): - (JSC::Interpreter::cti_op_put_getter): - (JSC::Interpreter::cti_op_put_setter): - (JSC::Interpreter::cti_op_new_error): - * interpreter/Interpreter.h: - (JSC::Interpreter::isJSArray): - (JSC::Interpreter::isJSString): - (JSC::Interpreter::isJSByteArray): - * interpreter/Register.h: - (JSC::Register::marked): - (JSC::Register::mark): - * jit/JITInlineMethods.h: - (JSC::JIT::getConstantOperandImmediateInt): - (JSC::JIT::isOperandConstantImmediateInt): - * jsc.cpp: - (functionPrint): - (functionDebug): - (functionRun): - (functionLoad): - (runWithScripts): - (runInteractive): - * parser/Nodes.cpp: - (JSC::processClauseList): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::addParentForConsoleStart): - * profiler/Profiler.cpp: - (JSC::Profiler::createCallIdentifier): - * runtime/ArrayConstructor.cpp: - (JSC::constructArrayWithSizeQuirk): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - (JSC::arrayProtoFuncConcat): - (JSC::arrayProtoFuncPop): - (JSC::arrayProtoFuncPush): - (JSC::arrayProtoFuncReverse): - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSlice): - (JSC::arrayProtoFuncSort): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/BooleanConstructor.cpp: - (JSC::constructBoolean): - (JSC::callBooleanConstructor): - * runtime/BooleanPrototype.cpp: - (JSC::booleanProtoFuncToString): - (JSC::booleanProtoFuncValueOf): - * runtime/Collector.cpp: - (JSC::Heap::protect): - (JSC::Heap::unprotect): - (JSC::Heap::heap): - (JSC::Heap::collect): - (JSC::typeName): - * runtime/Completion.cpp: - (JSC::evaluate): - * runtime/DateConstructor.cpp: - (JSC::constructDate): - (JSC::dateParse): - (JSC::dateUTC): - * runtime/DateInstance.h: - (JSC::DateInstance::internalNumber): - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - (JSC::fillStructuresUsingTimeArgs): - (JSC::fillStructuresUsingDateArgs): - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToLocaleString): - (JSC::dateProtoFuncToLocaleDateString): - (JSC::dateProtoFuncToLocaleTimeString): - (JSC::dateProtoFuncGetTime): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetMilliSeconds): - (JSC::dateProtoFuncGetUTCMilliseconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): - * runtime/ErrorConstructor.cpp: - (JSC::constructError): - * runtime/ErrorPrototype.cpp: - (JSC::errorProtoFuncToString): - * runtime/ExceptionHelpers.cpp: - (JSC::createError): - (JSC::createErrorMessage): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - (JSC::functionProtoFuncApply): - (JSC::functionProtoFuncCall): - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::toObject): - * runtime/JSActivation.cpp: - (JSC::JSActivation::getOwnPropertySlot): - * runtime/JSArray.cpp: - (JSC::JSArray::put): - (JSC::JSArray::mark): - (JSC::JSArray::sort): - (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): - (JSC::JSArray::compactForSorting): - * runtime/JSByteArray.h: - (JSC::JSByteArray::setIndex): - * runtime/JSCell.h: - (JSC::asCell): - * runtime/JSFunction.cpp: - (JSC::JSFunction::call): - (JSC::JSFunction::construct): - * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::lastInPrototypeChain): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEval): - (JSC::globalFuncParseInt): - (JSC::globalFuncParseFloat): - (JSC::globalFuncIsNaN): - (JSC::globalFuncIsFinite): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - (JSC::globalFuncJSCPrint): - * runtime/JSImmediate.cpp: - (JSC::JSImmediate::toThisObject): - (JSC::JSImmediate::toObject): - (JSC::JSImmediate::prototype): - (JSC::JSImmediate::toString): - * runtime/JSImmediate.h: - * runtime/JSObject.cpp: - (JSC::JSObject::mark): - (JSC::JSObject::put): - (JSC::callDefaultValueFunction): - (JSC::JSObject::getPrimitiveNumber): - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::JSObject::lookupGetter): - (JSC::JSObject::lookupSetter): - (JSC::JSObject::hasInstance): - (JSC::JSObject::toNumber): - (JSC::JSObject::toString): - * runtime/JSObject.h: - (JSC::JSObject::JSObject): - (JSC::JSObject::inlineGetOwnPropertySlot): - (JSC::JSObject::getOwnPropertySlotForWrite): - (JSC::JSObject::getPropertySlot): - (JSC::JSValuePtr::get): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::create): - * runtime/JSString.cpp: - (JSC::JSString::getOwnPropertySlot): - * runtime/JSValue.h: - * runtime/JSWrapperObject.cpp: - (JSC::JSWrapperObject::mark): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::setInternalValue): - * runtime/MathObject.cpp: - (JSC::mathProtoFuncAbs): - (JSC::mathProtoFuncACos): - (JSC::mathProtoFuncASin): - (JSC::mathProtoFuncATan): - (JSC::mathProtoFuncATan2): - (JSC::mathProtoFuncCeil): - (JSC::mathProtoFuncCos): - (JSC::mathProtoFuncExp): - (JSC::mathProtoFuncFloor): - (JSC::mathProtoFuncLog): - (JSC::mathProtoFuncMax): - (JSC::mathProtoFuncMin): - (JSC::mathProtoFuncPow): - (JSC::mathProtoFuncRound): - (JSC::mathProtoFuncSin): - (JSC::mathProtoFuncSqrt): - (JSC::mathProtoFuncTan): - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - (JSC::NativeErrorConstructor::construct): - * runtime/NumberConstructor.cpp: - (JSC::constructWithNumberConstructor): - (JSC::callNumberConstructor): - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): - (JSC::numberProtoFuncToLocaleString): - (JSC::numberProtoFuncValueOf): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToExponential): - (JSC::numberProtoFuncToPrecision): - * runtime/ObjectConstructor.cpp: - (JSC::constructObject): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncValueOf): - (JSC::objectProtoFuncHasOwnProperty): - (JSC::objectProtoFuncIsPrototypeOf): - (JSC::objectProtoFuncDefineGetter): - (JSC::objectProtoFuncDefineSetter): - (JSC::objectProtoFuncLookupGetter): - (JSC::objectProtoFuncLookupSetter): - (JSC::objectProtoFuncPropertyIsEnumerable): - (JSC::objectProtoFuncToLocaleString): - (JSC::objectProtoFuncToString): - * runtime/Operations.h: - (JSC::JSValuePtr::equalSlowCaseInline): - (JSC::JSValuePtr::strictEqual): - (JSC::JSValuePtr::strictEqualSlowCaseInline): - * runtime/Protect.h: - (JSC::gcProtect): - (JSC::gcUnprotect): - * runtime/RegExpConstructor.cpp: - (JSC::setRegExpConstructorInput): - (JSC::setRegExpConstructorMultiline): - (JSC::constructRegExp): - * runtime/RegExpObject.cpp: - (JSC::setRegExpObjectLastIndex): - (JSC::RegExpObject::match): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncTest): - (JSC::regExpProtoFuncExec): - (JSC::regExpProtoFuncCompile): - (JSC::regExpProtoFuncToString): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCodeSlowCase): - (JSC::stringFromCharCode): - (JSC::constructWithStringConstructor): - (JSC::callStringConstructor): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncToString): - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncConcat): - (JSC::stringProtoFuncIndexOf): - (JSC::stringProtoFuncLastIndexOf): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - (JSC::stringProtoFuncSlice): - (JSC::stringProtoFuncSplit): - (JSC::stringProtoFuncSubstr): - (JSC::stringProtoFuncSubstring): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncLocaleCompare): - (JSC::stringProtoFuncBig): - (JSC::stringProtoFuncSmall): - (JSC::stringProtoFuncBlink): - (JSC::stringProtoFuncBold): - (JSC::stringProtoFuncFixed): - (JSC::stringProtoFuncItalics): - (JSC::stringProtoFuncStrike): - (JSC::stringProtoFuncSub): - (JSC::stringProtoFuncSup): - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): - (JSC::stringProtoFuncLink): - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::getEnumerablePropertyNames): - (JSC::Structure::createCachedPrototypeChain): - * runtime/Structure.h: - (JSC::Structure::mark): - * runtime/StructureChain.cpp: - (JSC::StructureChain::StructureChain): - -2009-01-19 Darin Adler - - Reviewed by Sam Weinig. - - Bug 23409: REGRESSION: RegExp 'replace()' function improperly processes '$$' - - - - Test: fast/js/string-replace-3.html - - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferences): Remove code that adds an extra $ -- not sure - how this ever worked. - -2009-01-16 Gavin Barraclough - - Reviewed by Oliver Hunt. - - On x86-64 jit, cache JSImmedate::TagMask & JSImmedate::TagTypeNumber in - registers, save reloading them every time they're used. - - Draws x86-64 jit performance close to that of i386 jit. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::subPtr): - (JSC::MacroAssembler::jnzPtr): - (JSC::MacroAssembler::jzPtr): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileBinaryArithOpSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::emitJumpIfJSCell): - (JSC::JIT::emitJumpIfNotJSCell): - (JSC::JIT::emitJumpIfImmediateNumber): - (JSC::JIT::emitJumpIfNotImmediateNumber): - (JSC::JIT::emitJumpIfImmediateInteger): - (JSC::JIT::emitJumpIfNotImmediateInteger): - (JSC::JIT::emitFastArithIntToImmNoCheck): - -2009-01-16 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Add support to x86-64 JIT for inline double precision arithmetic ops. - +5/6% on x86-64, JIT enabled, sunspider. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::addPtr): - * assembler/X86Assembler.h: - (JSC::X86Assembler::movq_rr): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_pre_inc): - (JSC::JIT::compileBinaryArithOp): - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::compileFastArith_op_add): - (JSC::JIT::compileFastArithSlow_op_add): - (JSC::JIT::compileFastArith_op_mul): - (JSC::JIT::compileFastArithSlow_op_mul): - (JSC::JIT::compileFastArith_op_sub): - (JSC::JIT::compileFastArithSlow_op_sub): - * parser/ResultType.h: - (JSC::ResultType::isReusable): - (JSC::ResultType::isInt32): - (JSC::ResultType::definitelyIsNumber): - (JSC::ResultType::mightBeNumber): - (JSC::ResultType::isNotNumber): - (JSC::ResultType::unknownType): - -2009-01-16 Gavin Barraclough - - Reviewed by Geoff Garen. - - Fixes for SamplingTool. - - https://bugs.webkit.org/show_bug.cgi?id=23390 - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::storePtr): - * bytecode/SamplingTool.cpp: - (JSC::SamplingTool::run): - (JSC::SamplingTool::dump): - * bytecode/SamplingTool.h: - (JSC::SamplingTool::encodeSample): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::JIT::samplingToolTrackCodeBlock): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::emitCTICall_internal): - -2009-01-16 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed REGRESSION: Latest WebKit nightlies - turn "c" into "" when stripping \\c_ character - - * wrec/WRECParser.cpp: - (JSC::WREC::Parser::consumeEscape): Mimic a Firefox quirk when parsing - control escapes inside character classes. - -2009-01-16 Adam Roben - - Windows build fix - - * wrec/WRECParser.cpp: - (JSC::WREC::Parser::parseParentheses): Removed unreachable code. - -2009-01-15 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed REGRESSION (r39164): Discarding quantifier - on assertion gives incorrect result (23075) - - https://bugs.webkit.org/show_bug.cgi?id=23075 - - * pcre/pcre_compile.cpp: - (compileBranch): Throw away an assertion if it's followed by a quantifier - with a 0 minimum, to match SpiderMonkey, v8, and the ECMA spec. - - * wrec/WRECParser.cpp: - (JSC::WREC::Parser::parseParentheses): Fall back on PCRE for the rare - case of an assertion with a quantifier with a 0 minimum, since we - don't handle quantified subexpressions yet, and in this special case, - we can't just throw away the quantifier. - -2009-01-15 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Add support in ResultType to track that the results of bitops - are always of type int32_t. - - * parser/Nodes.cpp: - (JSC::ReadModifyResolveNode::emitBytecode): - (JSC::ReadModifyDotNode::emitBytecode): - (JSC::ReadModifyBracketNode::emitBytecode): - * parser/Nodes.h: - (JSC::ExpressionNode::): - (JSC::BooleanNode::): - (JSC::NumberNode::): - (JSC::StringNode::): - (JSC::PrePostResolveNode::): - (JSC::TypeOfResolveNode::): - (JSC::TypeOfValueNode::): - (JSC::UnaryPlusNode::): - (JSC::NegateNode::): - (JSC::BitwiseNotNode::): - (JSC::LogicalNotNode::): - (JSC::MultNode::): - (JSC::DivNode::): - (JSC::ModNode::): - (JSC::SubNode::): - (JSC::LeftShiftNode::): - (JSC::RightShiftNode::): - (JSC::UnsignedRightShiftNode::): - (JSC::LessNode::): - (JSC::GreaterNode::): - (JSC::LessEqNode::): - (JSC::GreaterEqNode::): - (JSC::InstanceOfNode::): - (JSC::EqualNode::): - (JSC::NotEqualNode::): - (JSC::StrictEqualNode::): - (JSC::NotStrictEqualNode::): - (JSC::BitAndNode::): - (JSC::BitOrNode::): - (JSC::BitXOrNode::): - (JSC::LogicalOpNode::): - * parser/ResultType.h: - (JSC::ResultType::isInt32): - (JSC::ResultType::isNotNumber): - (JSC::ResultType::booleanType): - (JSC::ResultType::numberType): - (JSC::ResultType::numberTypeCanReuse): - (JSC::ResultType::numberTypeCanReuseIsInt32): - (JSC::ResultType::stringOrNumberTypeCanReuse): - (JSC::ResultType::stringType): - (JSC::ResultType::unknownType): - (JSC::ResultType::forAdd): - (JSC::ResultType::forBitOp): - (JSC::OperandTypes::OperandTypes): - -2009-01-15 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Add support for integer addition, subtraction and multiplication - in JIT code on x86-64. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::mul32): - (JSC::MacroAssembler::sub32): - (JSC::MacroAssembler::joMul32): - (JSC::MacroAssembler::joSub32): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_add): - (JSC::JIT::compileFastArithSlow_op_add): - (JSC::JIT::compileFastArith_op_mul): - (JSC::JIT::compileFastArithSlow_op_mul): - (JSC::JIT::compileFastArith_op_sub): - (JSC::JIT::compileFastArithSlow_op_sub): - -2009-01-15 Gavin Barraclough - - Reviewed by Geoff Garen. - - On x86-64 allow JSImmediate to encode 64-bit double precision values. - This patch only affects builds that set USE(ALTERNATE_JSIMMEDIATE). - Updates the implementation of JSValuePtr:: and JSImmediate:: methods - that operate on neumeric values to be be aware of the new representation. - When this representation is in use, the class JSNumberCell is redundant - and is compiled out. - - The format of the new immediate representation is documented in JSImmediate.h. - - * JavaScriptCore.exp: - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::subPtr): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::subq_rr): - (JSC::X86Assembler::movq_rr): - (JSC::X86Assembler::ucomisd_rr): - (JSC::X86Assembler::X86InstructionFormatter::twoByteOp64): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::cti_op_stricteq): - (JSC::Interpreter::cti_op_nstricteq): - * jit/JIT.cpp: - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_lshift): - (JSC::JIT::compileFastArith_op_rshift): - (JSC::JIT::compileFastArith_op_bitand): - (JSC::JIT::compileFastArith_op_mod): - (JSC::JIT::compileFastArith_op_add): - (JSC::JIT::compileFastArith_op_mul): - (JSC::JIT::compileFastArith_op_post_inc): - (JSC::JIT::compileFastArith_op_post_dec): - (JSC::JIT::compileFastArith_op_pre_inc): - (JSC::JIT::compileFastArith_op_pre_dec): - (JSC::JIT::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::JIT::compileBinaryArithOp): - * jit/JITInlineMethods.h: - (JSC::JIT::emitJumpIfBothJSCells): - (JSC::JIT::emitJumpIfEitherNumber): - (JSC::JIT::emitJumpIfNotEitherNumber): - (JSC::JIT::emitJumpIfImmediateIntegerNumber): - (JSC::JIT::emitJumpIfNotImmediateIntegerNumber): - (JSC::JIT::emitJumpIfNotImmediateIntegerNumbers): - (JSC::JIT::emitJumpSlowCaseIfNotImmediateIntegerNumber): - (JSC::JIT::emitJumpSlowCaseIfNotImmediateIntegerNumbers): - (JSC::JIT::emitFastArithDeTagImmediate): - (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero): - (JSC::JIT::emitFastArithReTagImmediate): - (JSC::JIT::emitFastArithIntToImmNoCheck): - * runtime/JSCell.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSImmediate.cpp: - (JSC::JSImmediate::toThisObject): - (JSC::JSImmediate::toObject): - (JSC::JSImmediate::toString): - * runtime/JSImmediate.h: - (JSC::wtf_reinterpret_cast): - (JSC::JSImmediate::isNumber): - (JSC::JSImmediate::isIntegerNumber): - (JSC::JSImmediate::isDoubleNumber): - (JSC::JSImmediate::isPositiveIntegerNumber): - (JSC::JSImmediate::areBothImmediateIntegerNumbers): - (JSC::JSImmediate::makeInt): - (JSC::JSImmediate::makeDouble): - (JSC::JSImmediate::doubleValue): - (JSC::doubleToBoolean): - (JSC::JSImmediate::toBoolean): - (JSC::JSImmediate::getTruncatedUInt32): - (JSC::JSImmediate::makeOutOfIntegerRange): - (JSC::JSImmediate::from): - (JSC::JSImmediate::getTruncatedInt32): - (JSC::JSImmediate::toDouble): - (JSC::JSImmediate::getUInt32): - (JSC::JSValuePtr::isInt32Fast): - (JSC::JSValuePtr::isUInt32Fast): - (JSC::JSValuePtr::areBothInt32Fast): - (JSC::JSFastMath::canDoFastBitwiseOperations): - (JSC::JSFastMath::xorImmediateNumbers): - (JSC::JSFastMath::canDoFastRshift): - (JSC::JSFastMath::canDoFastUrshift): - (JSC::JSFastMath::rightShiftImmediateNumbers): - (JSC::JSFastMath::canDoFastAdditiveOperations): - (JSC::JSFastMath::addImmediateNumbers): - (JSC::JSFastMath::subImmediateNumbers): - * runtime/JSNumberCell.cpp: - (JSC::jsNumberCell): - * runtime/JSNumberCell.h: - (JSC::createNumberStructure): - (JSC::isNumberCell): - (JSC::asNumberCell): - (JSC::jsNumber): - (JSC::JSValuePtr::isDoubleNumber): - (JSC::JSValuePtr::getDoubleNumber): - (JSC::JSValuePtr::isNumber): - (JSC::JSValuePtr::uncheckedGetNumber): - (JSC::jsNaN): - (JSC::JSValuePtr::getNumber): - (JSC::JSValuePtr::numberToInt32): - (JSC::JSValuePtr::numberToUInt32): - * runtime/JSValue.h: - * runtime/NumberConstructor.cpp: - (JSC::numberConstructorNegInfinity): - (JSC::numberConstructorPosInfinity): - (JSC::numberConstructorMaxValue): - (JSC::numberConstructorMinValue): - * runtime/NumberObject.cpp: - (JSC::constructNumber): - * runtime/NumberObject.h: - * runtime/Operations.h: - (JSC::JSValuePtr::equal): - (JSC::JSValuePtr::equalSlowCaseInline): - (JSC::JSValuePtr::strictEqual): - (JSC::JSValuePtr::strictEqualSlowCaseInline): - * wtf/Platform.h: - -2009-01-15 Sam Weinig - - Reviewed by Geoffrey Garen. - - - REGRESSION (r34838): JavaScript objects appear to be leaked after loading google.com - - Subtract the number of JSStrings cached in SmallStrings when calculating the - number of live JSObjects. - - * runtime/Collector.cpp: - (JSC::Heap::objectCount): - * runtime/SmallStrings.cpp: - (JSC::SmallStrings::count): - * runtime/SmallStrings.h: - -2009-01-15 Sam Weinig - - Fix Qt build. - - * runtime/Collector.cpp: - -2009-01-15 Sam Weinig - - Reviewed by Gavin Barraclough. - - Fix crash seen running fast/canvas. - - Make sure to mark the ScopeNode and CodeBlock being created - in the re-parse for exception information. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - * parser/Nodes.h: - (JSC::ScopeNode::mark): - * runtime/Collector.cpp: - (JSC::Heap::collect): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - -2009-01-15 Craig Schlenter - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=23347 - Compilation of JavaScriptCore/wtf/ThreadingPthreads.cpp fails on Linux - - * wtf/ThreadingPthreads.cpp: included limits.h as INT_MAX is defined there. - -2009-01-15 Oliver Hunt - - Reviewed by Geoff Garen. - - Bug 23225: REGRESSION: Assertion failure in reparseInPlace() (m_sourceElements) at sfgate.com - - - Character position for open and closing brace was incorrectly referencing m_position to - record their position in a source document, however this is unsafe as BOMs may lead to - m_position being an arbitrary position from the real position of the current character. - - * parser/Lexer.cpp: - (JSC::Lexer::matchPunctuator): - -2009-01-14 David Kilzer - - Bug 23153: JSC build always touches JavaScriptCore/docs/bytecode.html - - - - Reviewed by Darin Adler. - - Instead of building bytecode.html into ${SRCROOT}/docs/bytecode.html, build it - into ${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore/docs/bytecode.html. - - Also fixes make-bytecode-docs.pl to actually generate documentation. - - * DerivedSources.make: Changed bytecode.html to be built into local docs - directory in ${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore. - * JavaScriptCore.xcodeproj/project.pbxproj: Added "/docs" to the end of the - "mkdir -p" command so that the docs subdirectory is automatically created. - * docs/make-bytecode-docs.pl: Changed BEGIN_OPCODE to DEFINE_OPCODE so that - documentation is actually generated. - -2009-01-14 Adam Treat - - Build fix for Qt from Dmitry Titov. - - * wtf/ThreadingQt.cpp: - (WTF::ThreadCondition::timedWait): - -2009-01-14 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Bug 22903: REGRESSION (r36267): visiting this site reliably crashes WebKit nightly - - EvalCodeBlock's do not reference the functions that are declared inside the eval - code, this means that simply marking the EvalCodeBlock through the global object - is insufficient to mark the declared functions. This patch corrects this by - explicitly marking the CodeBlocks of all the functions declared in the cached - EvalNode. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::mark): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::hasFunctions): - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::mark): - * parser/Nodes.cpp: - (JSC::ScopeNodeData::mark): - (JSC::EvalNode::mark): - * parser/Nodes.h: - -2009-01-14 Dmitry Titov - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=23312 - Implement MessageQueue::waitForMessageTimed() - Also fixed ThreadCondition::timedWait() to take absolute time, as discussed on webkit-dev. - Win32 version of timedWait still has to be implemented. - - * wtf/MessageQueue.h: - (WTF::MessageQueueWaitResult: new enum for the result of MessageQueue::waitForMessageTimed. - (WTF::MessageQueue::waitForMessage): - (WTF::MessageQueue::waitForMessageTimed): New method. - * wtf/Threading.h: - * wtf/ThreadingGtk.cpp: - (WTF::ThreadCondition::timedWait): changed to use absolute time instead of interval. - * wtf/ThreadingNone.cpp: - (WTF::ThreadCondition::timedWait): ditto. - * wtf/ThreadingPthreads.cpp: - (WTF::ThreadCondition::timedWait): ditto. - * wtf/ThreadingQt.cpp: - (WTF::ThreadCondition::timedWait): ditto. - * wtf/ThreadingWin.cpp: - (WTF::ThreadCondition::timedWait): ditto. The actual Win32 code is still to be implemented. - -2009-01-14 Dean McNamee - - Reviewed by Darin Adler and Oliver hunt. - - Correctly match allocation functions by implementing a custom deref(). - - https://bugs.webkit.org/show_bug.cgi?id=23315 - - * runtime/ByteArray.h: - (JSC::ByteArray::deref): - (JSC::ByteArray::ByteArray): - -2009-01-14 Dan Bernstein - - Reviewed by John Sullivan. - - - update copyright - - * Info.plist: - -2009-01-13 Beth Dakin - - Reviewed by Darin Adler and Oliver Hunt. - - REGRESSION: Business widget's front side - fails to render correctly when flipping widget - - The problem here is that parseInt was parsing NaN as 0. This patch - corrects that by parsing NaN as NaN. This matches our old behavior - and Firefox. - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncParseInt): - -2009-01-13 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Fix for: https://bugs.webkit.org/show_bug.cgi?id=23292 - - Implementation of two argument canDoFastAdditiveOperations does not correlate well with reality. - - * runtime/JSImmediate.h: - (JSC::JSFastMath::canDoFastAdditiveOperations): - -2009-01-13 Zalan Bujtas - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=23290 - Fix JSImmediate::isImmediate(src) to !src->isCell() - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2009-01-13 Dmitry Titov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=23281 - Fix the Chromium Win build. - Need to use PLATFORM(WIN_OS) instead of PLATFORM(WIN). - Moved GTK and WX up in #if sequence because they could come with WIN_OS too, - while they have their own implementation even on Windows. - - * wtf/CurrentTime.cpp: - (WTF::currentTime): - -2009-01-12 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Make the JSImmediate interface private. - - All manipulation of JS values should be through the JSValuePtr class, not by using JSImmediate - directly. The key missing methods on JSValuePtr are: - - * isCell() - check for values that are JSCell*s, and as such where asCell() may be used. - * isInt32Fast() getInt32Fast() - fast check/access for integer immediates. - * isUInt32Fast() getUInt32Fast() - ditto for unsigned integer immediates. - - The JIT is allowed full access to JSImmediate, since it needs to be able to directly - manipulate JSValuePtrs. The Interpreter is provided access to perform operations directly - on JSValuePtrs through the new JSFastMath interface. - - No performance impact. - - * API/JSCallbackObjectFunctions.h: - (JSC::::toNumber): - * API/JSValueRef.cpp: - (JSValueIsEqual): - (JSValueIsStrictEqual): - * JavaScriptCore.exp: - * bytecode/CodeBlock.h: - (JSC::CodeBlock::isKnownNotImmediate): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::keyForImmediateSwitch): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::JSValueHashTraits::constructDeletedValue): - (JSC::BytecodeGenerator::JSValueHashTraits::isDeletedValue): - * interpreter/Interpreter.cpp: - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::jsAdd): - (JSC::jsIsObjectType): - (JSC::cachePrototypeChain): - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::tryCTICachePutByID): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::Interpreter::cti_op_add): - (JSC::Interpreter::cti_op_get_by_id_self_fail): - (JSC::Interpreter::cti_op_get_by_id_proto_list): - (JSC::Interpreter::cti_op_instanceof): - (JSC::Interpreter::cti_op_mul): - (JSC::Interpreter::cti_op_get_by_val): - (JSC::Interpreter::cti_op_get_by_val_byte_array): - (JSC::Interpreter::cti_op_sub): - (JSC::Interpreter::cti_op_put_by_val): - (JSC::Interpreter::cti_op_put_by_val_array): - (JSC::Interpreter::cti_op_put_by_val_byte_array): - (JSC::Interpreter::cti_op_negate): - (JSC::Interpreter::cti_op_div): - (JSC::Interpreter::cti_op_eq): - (JSC::Interpreter::cti_op_lshift): - (JSC::Interpreter::cti_op_bitand): - (JSC::Interpreter::cti_op_rshift): - (JSC::Interpreter::cti_op_bitnot): - (JSC::Interpreter::cti_op_neq): - (JSC::Interpreter::cti_op_urshift): - (JSC::Interpreter::cti_op_call_eval): - (JSC::Interpreter::cti_op_throw): - (JSC::Interpreter::cti_op_is_undefined): - (JSC::Interpreter::cti_op_stricteq): - (JSC::Interpreter::cti_op_nstricteq): - (JSC::Interpreter::cti_op_switch_imm): - (JSC::Interpreter::cti_vm_throw): - * interpreter/Interpreter.h: - (JSC::Interpreter::isJSArray): - (JSC::Interpreter::isJSString): - (JSC::Interpreter::isJSByteArray): - * jit/JIT.cpp: - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - (JSC::JIT::isStrictEqCaseHandledInJITCode): - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_rshift): - (JSC::JIT::compileFastArith_op_bitand): - (JSC::JIT::compileFastArith_op_mod): - * jit/JITCall.cpp: - (JSC::JIT::unlinkCall): - (JSC::JIT::compileOpCall): - * jit/JITInlineMethods.h: - (JSC::JIT::getConstantOperandImmediateInt): - (JSC::JIT::isOperandConstantImmediateInt): - * parser/Nodes.cpp: - (JSC::processClauseList): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/BooleanPrototype.cpp: - (JSC::booleanProtoFuncValueOf): - * runtime/Collector.cpp: - (JSC::Heap::protect): - (JSC::Heap::unprotect): - (JSC::Heap::heap): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::getOwnPropertySlot): - * runtime/JSByteArray.h: - (JSC::JSByteArray::getIndex): - * runtime/JSCell.cpp: - * runtime/JSCell.h: - (JSC::JSValuePtr::isNumberCell): - (JSC::JSValuePtr::asCell): - (JSC::JSValuePtr::isNumber): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncParseInt): - * runtime/JSImmediate.h: - (JSC::js0): - (JSC::jsImpossibleValue): - (JSC::JSValuePtr::toInt32): - (JSC::JSValuePtr::toUInt32): - (JSC::JSValuePtr::isCell): - (JSC::JSValuePtr::isInt32Fast): - (JSC::JSValuePtr::getInt32Fast): - (JSC::JSValuePtr::isUInt32Fast): - (JSC::JSValuePtr::getUInt32Fast): - (JSC::JSValuePtr::makeInt32Fast): - (JSC::JSValuePtr::areBothInt32Fast): - (JSC::JSFastMath::canDoFastBitwiseOperations): - (JSC::JSFastMath::equal): - (JSC::JSFastMath::notEqual): - (JSC::JSFastMath::andImmediateNumbers): - (JSC::JSFastMath::xorImmediateNumbers): - (JSC::JSFastMath::orImmediateNumbers): - (JSC::JSFastMath::canDoFastRshift): - (JSC::JSFastMath::canDoFastUrshift): - (JSC::JSFastMath::rightShiftImmediateNumbers): - (JSC::JSFastMath::canDoFastAdditiveOperations): - (JSC::JSFastMath::addImmediateNumbers): - (JSC::JSFastMath::subImmediateNumbers): - (JSC::JSFastMath::incImmediateNumber): - (JSC::JSFastMath::decImmediateNumber): - * runtime/JSNumberCell.h: - (JSC::JSValuePtr::asNumberCell): - (JSC::jsNumber): - (JSC::JSValuePtr::uncheckedGetNumber): - (JSC::JSNumberCell::toInt32): - (JSC::JSNumberCell::toUInt32): - (JSC::JSValuePtr::toJSNumber): - (JSC::JSValuePtr::getNumber): - (JSC::JSValuePtr::numberToInt32): - (JSC::JSValuePtr::numberToUInt32): - * runtime/JSObject.h: - (JSC::JSValuePtr::isObject): - (JSC::JSValuePtr::get): - (JSC::JSValuePtr::put): - * runtime/JSValue.cpp: - (JSC::JSValuePtr::toInteger): - (JSC::JSValuePtr::toIntegerPreserveNaN): - * runtime/JSValue.h: - * runtime/Operations.cpp: - (JSC::JSValuePtr::equalSlowCase): - (JSC::JSValuePtr::strictEqualSlowCase): - * runtime/Operations.h: - (JSC::JSValuePtr::equal): - (JSC::JSValuePtr::equalSlowCaseInline): - (JSC::JSValuePtr::strictEqual): - (JSC::JSValuePtr::strictEqualSlowCaseInline): - * runtime/Protect.h: - (JSC::gcProtect): - (JSC::gcUnprotect): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - * runtime/Structure.cpp: - (JSC::Structure::createCachedPrototypeChain): - -2009-01-12 Kevin Ollivier - - Since date time functions have moved here, now the wx port JSC - needs to depend on wx. - - * jscore.bkl: - -2009-01-11 David Levin - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=23245 - - Add initializeThreading to key places in JS API to ensure that - UString is properly initialized. - - * API/JSContextRef.cpp: - (JSContextGroupCreate): - (JSGlobalContextCreate): - * API/JSObjectRef.cpp: - (JSClassCreate): - * API/JSStringRef.cpp: - (JSStringCreateWithCharacters): - (JSStringCreateWithUTF8CString): - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): - -2009-01-11 David Levin - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=23175 - - Separate out BaseString information from UString::Rep and make all baseString access go through - a member function, so that it may be used for something else (in the future) in the BaseString - case. - - * runtime/SmallStrings.cpp: - (JSC::SmallStringsStorage::rep): - (JSC::SmallStringsStorage::SmallStringsStorage): - (JSC::SmallStrings::SmallStrings): - (JSC::SmallStrings::mark): - Adjust to account for the changes in UString and put the UString in place in - SmallStringsStorage to aid in locality of reference among the UChar[] and UString::Rep's. - - * runtime/SmallStrings.h: - * runtime/UString.cpp: - (JSC::initializeStaticBaseString): - (JSC::initializeUString): - (JSC::UString::Rep::create): - (JSC::UString::Rep::destroy): - (JSC::UString::Rep::checkConsistency): - (JSC::expandCapacity): - (JSC::UString::expandPreCapacity): - (JSC::concatenate): - (JSC::UString::append): - (JSC::UString::operator=): - * runtime/UString.h: - (JSC::UString::Rep::baseIsSelf): - (JSC::UString::Rep::setBaseString): - (JSC::UString::Rep::baseString): - (JSC::UString::Rep::): - (JSC::UString::Rep::null): - (JSC::UString::Rep::empty): - (JSC::UString::Rep::data): - (JSC::UString::cost): - Separate out the items out used by base strings from those used in Rep's that only - point to base strings. (This potentially saves 24 bytes per Rep.) - -2009-01-11 Darin Adler - - Reviewed by Dan Bernstein. - - Bug 23239: improve handling of unused arguments in JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=23239 - - * runtime/DatePrototype.cpp: Moved LocaleDateTimeFormat enum outside #if - so we can use this on all platforms. Changed valueOf to share the same - function with getTime, since the contents of the two are identical. Removed - a FIXME since the idea isn't really specific enough or helpful enough to - need to sit here in the source code. - (JSC::formatLocaleDate): Changed the Mac version of this function to take - the same arguments as the non-Mac version so the caller doesn't have to - special-case the two platforms. Also made the formatString array be const; - before the characters were, but the array was a modifiable global variable. - (JSC::dateProtoFuncToLocaleString): Changed to call the new unified - version of formatLocaleDate and remove the ifdef. - (JSC::dateProtoFuncToLocaleDateString): Ditto. - (JSC::dateProtoFuncToLocaleTimeString): Ditto. - - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::toObject): Use the new ASSERT_UNUSED instead of the - old UNUSED_PARAM. - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): Changed to only use UNUSED_PARAM when the parameter - is actually unused. - - * wtf/TCSystemAlloc.cpp: - (TCMalloc_SystemRelease): Changed to only use UNUSED_PARAM when the parameter - is actually unused. - (TCMalloc_SystemCommit): Changed to omit the argument names instead of using - UNUSED_PARAM. - -2009-01-11 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Fix the build (whoops) - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::cti_op_get_by_val): - -2009-01-11 Oliver Hunt - - Reviewed by Darin Adler and Anders Carlsson - - Bug 23128: get/put_by_val need to respecialise in the face of ByteArray - - Restructure the code slightly, and add comments per Darin's suggestions - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::cti_op_get_by_val): - (JSC::Interpreter::cti_op_get_by_val_byte_array): - (JSC::Interpreter::cti_op_put_by_val): - (JSC::Interpreter::cti_op_put_by_val_byte_array): - -2009-01-11 Oliver Hunt - - Reviewed by Anders Carlsson. - - Whoops, I accidentally removed an exception check from fast the - fast path for string indexing when i originally landed the - byte array logic. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::cti_op_get_by_val): - -2009-01-11 Oliver Hunt - - Reviewed by Anders Carlsson. - - Bug 23128: get/put_by_val need to respecialise in the face of ByteArray - - - Fairly simple patch, add specialised versions of cti_op_get/put_by_val - that assume ByteArray, thus avoiding a few branches in the case of bytearray - manipulation. - - No effect on SunSpider. 15% win on the original testcase. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::cti_op_get_by_val): - (JSC::Interpreter::cti_op_get_by_val_byte_array): - (JSC::Interpreter::cti_op_put_by_val): - (JSC::Interpreter::cti_op_put_by_val_byte_array): - * interpreter/Interpreter.h: - -2009-01-11 Alexey Proskuryakov - - Try to fix Windows build. - - * wtf/CurrentTime.cpp: Added a definition of msPerSecond (previously, this code was in - DateMath.cpp, with constant definition in DateTime.h) - -2009-01-11 Alexey Proskuryakov - - Try to fix Windows build. - - * wtf/CurrentTime.cpp: Include and , as MSDN says to. - -2009-01-11 Dmitry Titov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=23207 - Moved currentTime() to from WebCore to WTF. - - * GNUmakefile.am: - * JavaScriptCore.exp: added export for WTF::currentTime() - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * runtime/DateMath.cpp: - (JSC::getCurrentUTCTimeWithMicroseconds): This function had another implementation of currentTime(), essentially. Now uses WTF version. - * wtf/CurrentTime.cpp: Added. - (WTF::currentTime): - (WTF::highResUpTime): - (WTF::lowResUTCTime): - (WTF::qpcAvailable): - * wtf/CurrentTime.h: Added. - -2009-01-09 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Stage two of converting JSValue from a pointer to a class type. - Remove the class JSValue. The functionallity has been transitioned - into the wrapper class type JSValuePtr. - - The last stage will be to rename JSValuePtr to JSValue, remove the - overloaded -> operator, and switch operations on JSValuePtrs from - using '->' to use '.' instead. - - * API/APICast.h: - * JavaScriptCore.exp: - * runtime/JSCell.h: - (JSC::asCell): - (JSC::JSValuePtr::asCell): - (JSC::JSValuePtr::isNumber): - (JSC::JSValuePtr::isString): - (JSC::JSValuePtr::isGetterSetter): - (JSC::JSValuePtr::isObject): - (JSC::JSValuePtr::getNumber): - (JSC::JSValuePtr::getString): - (JSC::JSValuePtr::getObject): - (JSC::JSValuePtr::getCallData): - (JSC::JSValuePtr::getConstructData): - (JSC::JSValuePtr::getUInt32): - (JSC::JSValuePtr::getTruncatedInt32): - (JSC::JSValuePtr::getTruncatedUInt32): - (JSC::JSValuePtr::mark): - (JSC::JSValuePtr::marked): - (JSC::JSValuePtr::toPrimitive): - (JSC::JSValuePtr::getPrimitiveNumber): - (JSC::JSValuePtr::toBoolean): - (JSC::JSValuePtr::toNumber): - (JSC::JSValuePtr::toString): - (JSC::JSValuePtr::toObject): - (JSC::JSValuePtr::toThisObject): - (JSC::JSValuePtr::needsThisConversion): - (JSC::JSValuePtr::toThisString): - (JSC::JSValuePtr::getJSNumber): - * runtime/JSImmediate.h: - (JSC::JSValuePtr::isUndefined): - (JSC::JSValuePtr::isNull): - (JSC::JSValuePtr::isUndefinedOrNull): - (JSC::JSValuePtr::isBoolean): - (JSC::JSValuePtr::getBoolean): - (JSC::JSValuePtr::toInt32): - (JSC::JSValuePtr::toUInt32): - * runtime/JSNumberCell.h: - (JSC::JSValuePtr::uncheckedGetNumber): - (JSC::JSValuePtr::toJSNumber): - * runtime/JSObject.h: - (JSC::JSValuePtr::isObject): - (JSC::JSValuePtr::get): - (JSC::JSValuePtr::put): - * runtime/JSString.h: - (JSC::JSValuePtr::toThisJSString): - * runtime/JSValue.cpp: - (JSC::JSValuePtr::toInteger): - (JSC::JSValuePtr::toIntegerPreserveNaN): - (JSC::JSValuePtr::toInt32SlowCase): - (JSC::JSValuePtr::toUInt32SlowCase): - * runtime/JSValue.h: - (JSC::JSValuePtr::makeImmediate): - (JSC::JSValuePtr::immediateValue): - (JSC::JSValuePtr::JSValuePtr): - (JSC::JSValuePtr::operator->): - (JSC::JSValuePtr::operator bool): - (JSC::JSValuePtr::operator==): - (JSC::JSValuePtr::operator!=): - (JSC::JSValuePtr::encode): - (JSC::JSValuePtr::decode): - (JSC::JSValuePtr::toFloat): - (JSC::JSValuePtr::asValue): - (JSC::operator==): - (JSC::operator!=): - -2009-01-09 David Levin - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=23175 - - Adjustment to previous patch. Remove call to initilizeThreading from JSGlobalCreate - and fix jsc.cpp instead. - - * jsc.cpp: - (main): - (jscmain): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::create): - -2009-01-09 Sam Weinig - - Roll r39720 back in with a working interpreted mode. - -2009-01-09 David Levin - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=23175 - - Added a template to make the pointer and flags combination - in UString more readable and less error prone. - - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - Added PtrAndFlags.h (and sorted the xcode project file). - - * runtime/Identifier.cpp: - (JSC::Identifier::add): - (JSC::Identifier::addSlowCase): - * runtime/InitializeThreading.cpp: - (JSC::initializeThreadingOnce): - Made the init threading initialize the UString globals. Before - these were initilized using {} but that became harder due to the - addition of this tempalte class. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::create): - * runtime/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * runtime/UString.cpp: - (JSC::initializeStaticBaseString): - (JSC::initializeUString): - (JSC::UString::Rep::create): - (JSC::UString::Rep::createFromUTF8): - (JSC::createRep): - (JSC::UString::UString): - (JSC::concatenate): - (JSC::UString::operator=): - (JSC::UString::makeNull): - (JSC::UString::nullRep): - * runtime/UString.h: - (JSC::UString::Rep::identifierTable): - (JSC::UString::Rep::setIdentifierTable): - (JSC::UString::Rep::isStatic): - (JSC::UString::Rep::setStatic): - (JSC::UString::Rep::): - (JSC::UString::Rep::null): - (JSC::UString::Rep::empty): - (JSC::UString::isNull): - (JSC::UString::null): - (JSC::UString::UString): - - * wtf/PtrAndFlags.h: Added. - (WTF::PtrAndFlags::PtrAndFlags): - (WTF::PtrAndFlags::isFlagSet): - (WTF::PtrAndFlags::setFlag): - (WTF::PtrAndFlags::clearFlag): - (WTF::PtrAndFlags::get): - (WTF::PtrAndFlags::set): - A simple way to layer together a pointer and 2 flags. It relies on the pointer being 4 byte aligned, - which should happen for all allocators (due to aligning pointers, int's, etc. on 4 byte boundaries). - -2009-01-08 Gavin Barraclough - - Reviewed by -O-l-i-v-e-r- -H-u-n-t- Sam Weinig (sorry, Sam!). - - Encode immediates in the low word of JSValuePtrs, on x86-64. - - On 32-bit platforms a JSValuePtr may represent a 31-bit signed integer. - On 64-bit platforms, if USE(ALTERNATE_JSIMMEDIATE) is defined, a full - 32-bit integer may be stored in an immediate. - - Presently USE(ALTERNATE_JSIMMEDIATE) uses the same encoding as the default - immediate format - the value is left shifted by one, so a one bit tag can - be added to indicate the value is an immediate. However this means that - values must be commonly be detagged (by right shifting by one) before - arithmetic operations can be performed on immediates. This patch modifies - the formattting so the the high bits of the immediate mark values as being - integer. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::not32): - (JSC::MacroAssembler::orPtr): - (JSC::MacroAssembler::zeroExtend32ToPtr): - (JSC::MacroAssembler::jaePtr): - (JSC::MacroAssembler::jbPtr): - (JSC::MacroAssembler::jnzPtr): - (JSC::MacroAssembler::jzPtr): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::notl_r): - (JSC::X86Assembler::testq_i32r): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_lshift): - (JSC::JIT::compileFastArith_op_rshift): - (JSC::JIT::compileFastArith_op_bitand): - (JSC::JIT::compileFastArithSlow_op_bitand): - (JSC::JIT::compileFastArith_op_mod): - (JSC::JIT::compileFastArithSlow_op_mod): - (JSC::JIT::compileFastArith_op_add): - (JSC::JIT::compileFastArith_op_mul): - (JSC::JIT::compileFastArith_op_post_inc): - (JSC::JIT::compileFastArith_op_post_dec): - (JSC::JIT::compileFastArith_op_pre_inc): - (JSC::JIT::compileFastArith_op_pre_dec): - (JSC::JIT::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::JIT::compileBinaryArithOp): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::emitJumpIfJSCell): - (JSC::JIT::emitJumpIfNotJSCell): - (JSC::JIT::emitJumpIfImmNum): - (JSC::JIT::emitJumpSlowCaseIfNotImmNum): - (JSC::JIT::emitJumpSlowCaseIfNotImmNums): - (JSC::JIT::emitFastArithDeTagImmediate): - (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero): - (JSC::JIT::emitFastArithReTagImmediate): - (JSC::JIT::emitFastArithImmToInt): - (JSC::JIT::emitFastArithIntToImmNoCheck): - (JSC::JIT::emitTagAsBoolImmediate): - * jit/JITPropertyAccess.cpp: - (JSC::resizePropertyStorage): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - * runtime/JSImmediate.h: - (JSC::JSImmediate::isNumber): - (JSC::JSImmediate::isPositiveNumber): - (JSC::JSImmediate::areBothImmediateNumbers): - (JSC::JSImmediate::xorImmediateNumbers): - (JSC::JSImmediate::rightShiftImmediateNumbers): - (JSC::JSImmediate::canDoFastAdditiveOperations): - (JSC::JSImmediate::addImmediateNumbers): - (JSC::JSImmediate::subImmediateNumbers): - (JSC::JSImmediate::makeInt): - (JSC::JSImmediate::toBoolean): - * wtf/Platform.h: - -2009-01-08 Sam Weinig - - Revert r39720. It broke Interpreted mode. - -2009-01-08 Sam Weinig - - Reviewed by Oliver Hunt. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=23197 - Delay creating the PCVector until an exception is thrown - Part of - Don't store exception information for a CodeBlock until first exception is thrown - - - Change the process for re-parsing/re-generating bytecode for exception information - to use data from the original CodeBlock (offsets of GlobalResolve instructions) to - aid in creating an identical instruction stream on re-parse, instead of padding - interchangeable opcodes, which would result in different JITed code. - - Fix bug where the wrong ScopeChainNode was used when re-parsing/regenerating from - within some odd modified scope chains. - - Lazily create the pcVector by re-JITing the regenerated CodeBlock and stealing the - the pcVector from it. - - Saves ~2MB on Membuster head. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset): - (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset): - * bytecode/CodeBlock.h: - (JSC::JITCodeRef::JITCodeRef): - (JSC::GlobalResolveInfo::GlobalResolveInfo): - (JSC::CodeBlock::getBytecodeIndex): - (JSC::CodeBlock::addGlobalResolveInstruction): - (JSC::CodeBlock::addGlobalResolveInfo): - (JSC::CodeBlock::addFunctionRegisterInfo): - (JSC::CodeBlock::hasExceptionInfo): - (JSC::CodeBlock::pcVector): - (JSC::EvalCodeBlock::EvalCodeBlock): - (JSC::EvalCodeBlock::baseScopeDepth): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitResolve): - (JSC::BytecodeGenerator::emitGetScopedVar): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::setRegeneratingForExceptionInfo): - * interpreter/Interpreter.cpp: - (JSC::bytecodeOffsetForPC): - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveLastCaller): - (JSC::Interpreter::cti_op_instanceof): - (JSC::Interpreter::cti_op_call_NotJSFunction): - (JSC::Interpreter::cti_op_resolve): - (JSC::Interpreter::cti_op_construct_NotJSConstruct): - (JSC::Interpreter::cti_op_resolve_func): - (JSC::Interpreter::cti_op_resolve_skip): - (JSC::Interpreter::cti_op_resolve_global): - (JSC::Interpreter::cti_op_resolve_with_base): - (JSC::Interpreter::cti_op_throw): - (JSC::Interpreter::cti_op_in): - (JSC::Interpreter::cti_vm_throw): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * parser/Nodes.cpp: - (JSC::EvalNode::generateBytecode): - (JSC::EvalNode::bytecodeForExceptionInfoReparse): - (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse): - * parser/Nodes.h: - -2009-01-08 Jian Li - - Reviewed by Alexey Proskuryakov. - - Add Win32 implementation of ThreadSpecific. - https://bugs.webkit.org/show_bug.cgi?id=22614 - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * wtf/ThreadSpecific.h: - (WTF::ThreadSpecific::ThreadSpecific): - (WTF::ThreadSpecific::~ThreadSpecific): - (WTF::ThreadSpecific::get): - (WTF::ThreadSpecific::set): - (WTF::ThreadSpecific::destroy): - * wtf/ThreadSpecificWin.cpp: Added. - (WTF::ThreadSpecificThreadExit): - * wtf/ThreadingWin.cpp: - (WTF::wtfThreadEntryPoint): - -2009-01-08 Justin McPherson - - Reviewed by Simon Hausmann. - - Fix compilation with Qt on NetBSD. - - * runtime/Collector.cpp: - (JSC::currentThreadStackBase): Use PLATFORM(NETBSD) to enter the - code path to retrieve the stack base using pthread_attr_get_np. - The PTHREAD_NP_H define is not used because the header file does - not exist on NetBSD, but the function is declared nevertheless. - * wtf/Platform.h: Introduce WTF_PLATFORM_NETBSD. - -2009-01-07 Sam Weinig - - Reviewed by Geoffrey Garen. - - Don't store exception information for a CodeBlock until first exception is thrown - - Don't initially store exception information (lineNumber/expressionRange/getByIdExcecptionInfo) - in CodeBlocks blocks. Instead, re-parse for the data on demand and cache it then. - - One important change that was needed to make this work was to pad op_get_global_var with nops to - be the same length as op_resolve_global, since one could be replaced for the other on re-parsing, - and we want to keep the offsets bytecode offsets the same. - - 1.3MB improvement on Membuster head. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): Update op_get_global_var to account for the padding. - (JSC::CodeBlock::dumpStatistics): Add more statistic dumping. - (JSC::CodeBlock::CodeBlock): Initialize m_exceptionInfo. - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): Re-parses the CodeBlocks - associated SourceCode and steals the ExceptionInfo from it. - (JSC::CodeBlock::lineNumberForBytecodeOffset): Creates the exception info on demand. - (JSC::CodeBlock::expressionRangeForBytecodeOffset): Ditto. - (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): Ditto. - * bytecode/CodeBlock.h: - (JSC::CodeBlock::numberOfExceptionHandlers): Updated to account for m_exceptionInfo indirection. - (JSC::CodeBlock::addExceptionHandler): Ditto. - (JSC::CodeBlock::exceptionHandler): Ditto. - (JSC::CodeBlock::clearExceptionInfo): Ditto. - (JSC::CodeBlock::addExpressionInfo): Ditto. - (JSC::CodeBlock::addGetByIdExceptionInfo): Ditto. - (JSC::CodeBlock::numberOfLineInfos): Ditto. - (JSC::CodeBlock::addLineInfo): Ditto. - (JSC::CodeBlock::lastLineInfo): Ditto. - - * bytecode/Opcode.h: Change length of op_get_global_var to match op_resolve_global. - - * bytecode/SamplingTool.cpp: - (JSC::SamplingTool::dump): Add comment indicating why it is okay not to pass a CallFrame. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): Clear the exception info after generation for Function and Eval - Code when not in regenerate for exception info mode. - (JSC::BytecodeGenerator::BytecodeGenerator): Initialize m_regeneratingForExceptionInfo to false. - (JSC::BytecodeGenerator::emitGetScopedVar): Pad op_get_global_var with 2 nops. - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::setRegeneratingForExcpeptionInfo): Added. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): Pass the CallFrame to exception info accessors. - (JSC::Interpreter::privateExecute): Ditto. - (JSC::Interpreter::retrieveLastCaller): Ditto. - (JSC::Interpreter::cti_op_new_error): Ditto. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): Pass the current bytecode offset instead of hard coding the - line number, the stub will do the accessing if it gets called. - - * parser/Nodes.cpp: - (JSC::ProgramNode::emitBytecode): Moved. - (JSC::ProgramNode::generateBytecode): Moved. - (JSC::EvalNode::create): Moved. - (JSC::EvalNode::bytecodeForExceptionInfoReparse): Added. - (JSC::FunctionBodyNode::generateBytecode): Rename reparse to reparseInPlace. - (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse): Addded. - - * parser/Nodes.h: - (JSC::ScopeNode::features): Added getter. - * parser/Parser.cpp: - (JSC::Parser::reparseInPlace): Renamed from reparse. - * parser/Parser.h: - (JSC::Parser::reparse): Added. Re-parses the passed in Node into - a new Node. - * runtime/ExceptionHelpers.cpp: - (JSC::createUndefinedVariableError): Pass along CallFrame. - (JSC::createInvalidParamError): Ditto. - (JSC::createNotAConstructorError): Ditto. - (JSC::createNotAFunctionError): Ditto. - (JSC::createNotAnObjectError): Ditto. - -2009-01-06 Gavin Barraclough - - Reviewed by Maciej Stachowiak. - - Replace accidentally removed references in BytecodeGenerator, deleting these - will be hindering the sharing of constant numbers and strings. - - The code to add a new constant (either number or string) to their respective - map works by attempting to add a null entry, then checking the result of the - add for null. The first time, this should return the null (or noValue). - The code checks for null (to see if this is the initial add), and then allocates - a new number / string object. This code relies on the result returned from - the add to the map being stored as a reference, such that the allocated object - will be stored in the map, and will be resused if the same constant is encountered - again. By failing to use a reference we will be leaking GC object for each - additional entry added to the map. As GC objects they should be clollected, - be we should no be allocatin them in the first place. - - https://bugs.webkit.org/show_bug.cgi?id=23158 - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitLoad): - -2009-01-06 Oliver Hunt - - Reviewed by Gavin Barraclough. - - JavaScript register file should use VirtualAlloc on Windows - - Fairly simple, just reserve 4Mb of address space for the - register file, and then commit one section at a time. We - don't release committed memory as we drop back, but then - mac doesn't either so this probably not too much of a - problem. - - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::~RegisterFile): - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - (JSC::RegisterFile::grow): - -2009-01-06 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=23142 - ThreadGlobalData leaks seen on buildbot - - * wtf/ThreadSpecific.h: (WTF::ThreadSpecific::destroy): Temporarily reset the thread - specific value to make getter work on Mac OS X. - - * wtf/Platform.h: Touch this file again to make sure all Windows builds use the most recent - version of ThreadSpecific.h. - -2009-01-05 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Replace all uses of JSValue* with a new smart pointer type, JSValuePtr. - - A JavaScript value may be a heap object or boxed primitive, represented by a - pointer, or may be an unboxed immediate value, such as an integer. Since a - value may dynamically need to contain either a pointer value or an immediate, - we encode immediates as pointer values (since all valid JSCell pointers are - allocated at alligned addesses, unaligned addresses are available to encode - immediates). As such all JavaScript values are represented using a JSValue*. - - This implementation is encumbered by a number of constraints. It ties the - JSValue representation to the size of pointer on the platform, which, for - example, means that we currently can represent different ranges of integers - as immediates on x86 and x86-64. It also prevents us from overloading the - to-boolean conversion used to test for noValue() - effectively forcing us - to represent noValue() as 0. This would potentially be problematic were we - to wish to encode integer values differently (e.g. were we to use the v8 - encoding, where pointers are tagged with 1 and integers with 0, then the - immediate integer 0 would conflict with noValue()). - - This patch replaces all usage of JSValue* with a new class, JSValuePtr, - which encapsulates the pointer. JSValuePtr maintains the same interface as - JSValue*, overloading operator-> and operator bool such that previous - operations in the code on variables of type JSValue* are still supported. - - In order to provide a ProtectPtr<> type with support for the new value - representation (without using the internal JSValue type directly), a new - ProtectJSValuePtr type has been added, equivalent to the previous type - ProtectPtr. - - This patch is likely the first in a sequence of three changes. With the - value now encapsulated it will likely make sense to migrate the functionality - from JSValue into JSValuePtr, such that the internal pointer representation - need not be exposed. Through migrating the functionality to the wrapper - class the existing JSValue should be rendered redundant, and the class is - likely to be removed (the JSValuePtr now wrapping a pointer to a JSCell). - At this stage it will likely make sense to rename JSValuePtr to JSValue. - - https://bugs.webkit.org/show_bug.cgi?id=23114 - - * API/APICast.h: - (toJS): - (toRef): - * API/JSBase.cpp: - (JSEvaluateScript): - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::call): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * API/JSCallbackObjectFunctions.h: - (JSC::::asCallbackObject): - (JSC::::put): - (JSC::::hasInstance): - (JSC::::call): - (JSC::::staticValueGetter): - (JSC::::staticFunctionGetter): - (JSC::::callbackGetter): - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): - (JSObjectSetPrototype): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - * API/JSValueRef.cpp: - (JSValueGetType): - (JSValueIsUndefined): - (JSValueIsNull): - (JSValueIsBoolean): - (JSValueIsNumber): - (JSValueIsString): - (JSValueIsObject): - (JSValueIsObjectOfClass): - (JSValueIsEqual): - (JSValueIsStrictEqual): - (JSValueIsInstanceOfConstructor): - (JSValueToBoolean): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - (JSValueUnprotect): - * JavaScriptCore.exp: - * bytecode/CodeBlock.cpp: - (JSC::valueToSourceString): - (JSC::constantName): - (JSC::CodeBlock::dump): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getConstant): - (JSC::CodeBlock::addUnexpectedConstant): - (JSC::CodeBlock::unexpectedConstant): - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::addConstant): - (JSC::BytecodeGenerator::addUnexpectedConstant): - (JSC::BytecodeGenerator::emitLoad): - (JSC::BytecodeGenerator::emitLoadJSV): - (JSC::BytecodeGenerator::emitGetScopedVar): - (JSC::BytecodeGenerator::emitPutScopedVar): - (JSC::BytecodeGenerator::emitNewError): - (JSC::keyForImmediateSwitch): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::JSValueHashTraits::constructDeletedValue): - (JSC::BytecodeGenerator::JSValueHashTraits::isDeletedValue): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * debugger/DebuggerCallFrame.h: - (JSC::DebuggerCallFrame::DebuggerCallFrame): - (JSC::DebuggerCallFrame::exception): - * interpreter/CallFrame.cpp: - (JSC::CallFrame::thisValue): - * interpreter/CallFrame.h: - (JSC::ExecState::setException): - (JSC::ExecState::exception): - (JSC::ExecState::exceptionSlot): - (JSC::ExecState::hadException): - * interpreter/Interpreter.cpp: - (JSC::fastIsNumber): - (JSC::fastToInt32): - (JSC::fastToUInt32): - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::jsAddSlowCase): - (JSC::jsAdd): - (JSC::jsTypeStringForValue): - (JSC::jsIsObjectType): - (JSC::jsIsFunctionType): - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::inlineResolveBase): - (JSC::Interpreter::resolveBase): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::resolveBaseAndFunc): - (JSC::isNotObject): - (JSC::Interpreter::callEval): - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::checkTimeout): - (JSC::Interpreter::createExceptionScope): - (JSC::cachePrototypeChain): - (JSC::Interpreter::tryCachePutByID): - (JSC::countPrototypeChainEntriesAndCheckForProxies): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): - (JSC::Interpreter::retrieveCaller): - (JSC::Interpreter::retrieveLastCaller): - (JSC::Interpreter::tryCTICachePutByID): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::returnToThrowTrampoline): - (JSC::Interpreter::cti_op_convert_this): - (JSC::Interpreter::cti_op_add): - (JSC::Interpreter::cti_op_pre_inc): - (JSC::Interpreter::cti_op_loop_if_less): - (JSC::Interpreter::cti_op_loop_if_lesseq): - (JSC::Interpreter::cti_op_get_by_id_generic): - (JSC::Interpreter::cti_op_get_by_id): - (JSC::Interpreter::cti_op_get_by_id_second): - (JSC::Interpreter::cti_op_get_by_id_self_fail): - (JSC::Interpreter::cti_op_get_by_id_proto_list): - (JSC::Interpreter::cti_op_get_by_id_proto_list_full): - (JSC::Interpreter::cti_op_get_by_id_proto_fail): - (JSC::Interpreter::cti_op_get_by_id_array_fail): - (JSC::Interpreter::cti_op_get_by_id_string_fail): - (JSC::Interpreter::cti_op_instanceof): - (JSC::Interpreter::cti_op_del_by_id): - (JSC::Interpreter::cti_op_mul): - (JSC::Interpreter::cti_op_call_NotJSFunction): - (JSC::Interpreter::cti_op_resolve): - (JSC::Interpreter::cti_op_construct_NotJSConstruct): - (JSC::Interpreter::cti_op_get_by_val): - (JSC::Interpreter::cti_op_resolve_func): - (JSC::Interpreter::cti_op_sub): - (JSC::Interpreter::cti_op_put_by_val): - (JSC::Interpreter::cti_op_put_by_val_array): - (JSC::Interpreter::cti_op_lesseq): - (JSC::Interpreter::cti_op_loop_if_true): - (JSC::Interpreter::cti_op_negate): - (JSC::Interpreter::cti_op_resolve_base): - (JSC::Interpreter::cti_op_resolve_skip): - (JSC::Interpreter::cti_op_resolve_global): - (JSC::Interpreter::cti_op_div): - (JSC::Interpreter::cti_op_pre_dec): - (JSC::Interpreter::cti_op_jless): - (JSC::Interpreter::cti_op_not): - (JSC::Interpreter::cti_op_jtrue): - (JSC::Interpreter::cti_op_post_inc): - (JSC::Interpreter::cti_op_eq): - (JSC::Interpreter::cti_op_lshift): - (JSC::Interpreter::cti_op_bitand): - (JSC::Interpreter::cti_op_rshift): - (JSC::Interpreter::cti_op_bitnot): - (JSC::Interpreter::cti_op_resolve_with_base): - (JSC::Interpreter::cti_op_mod): - (JSC::Interpreter::cti_op_less): - (JSC::Interpreter::cti_op_neq): - (JSC::Interpreter::cti_op_post_dec): - (JSC::Interpreter::cti_op_urshift): - (JSC::Interpreter::cti_op_bitxor): - (JSC::Interpreter::cti_op_bitor): - (JSC::Interpreter::cti_op_call_eval): - (JSC::Interpreter::cti_op_throw): - (JSC::Interpreter::cti_op_next_pname): - (JSC::Interpreter::cti_op_typeof): - (JSC::Interpreter::cti_op_is_undefined): - (JSC::Interpreter::cti_op_is_boolean): - (JSC::Interpreter::cti_op_is_number): - (JSC::Interpreter::cti_op_is_string): - (JSC::Interpreter::cti_op_is_object): - (JSC::Interpreter::cti_op_is_function): - (JSC::Interpreter::cti_op_stricteq): - (JSC::Interpreter::cti_op_nstricteq): - (JSC::Interpreter::cti_op_to_jsnumber): - (JSC::Interpreter::cti_op_in): - (JSC::Interpreter::cti_op_switch_imm): - (JSC::Interpreter::cti_op_switch_char): - (JSC::Interpreter::cti_op_switch_string): - (JSC::Interpreter::cti_op_del_by_val): - (JSC::Interpreter::cti_op_new_error): - (JSC::Interpreter::cti_vm_throw): - * interpreter/Interpreter.h: - (JSC::Interpreter::isJSArray): - (JSC::Interpreter::isJSString): - * interpreter/Register.h: - (JSC::Register::): - (JSC::Register::Register): - (JSC::Register::jsValue): - (JSC::Register::getJSValue): - * jit/JIT.cpp: - (JSC::): - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - (JSC::): - (JSC::JIT::execute): - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_rshift): - (JSC::JIT::compileFastArithSlow_op_rshift): - * jit/JITCall.cpp: - (JSC::JIT::unlinkCall): - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCall): - * jit/JITInlineMethods.h: - (JSC::JIT::emitGetVirtualRegister): - (JSC::JIT::getConstantOperand): - (JSC::JIT::isOperandConstant31BitImmediateInt): - (JSC::JIT::emitPutJITStubArgFromVirtualRegister): - (JSC::JIT::emitInitRegister): - * jit/JITPropertyAccess.cpp: - (JSC::resizePropertyStorage): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - * jsc.cpp: - (functionPrint): - (functionDebug): - (functionGC): - (functionVersion): - (functionRun): - (functionLoad): - (functionReadline): - (functionQuit): - * parser/Nodes.cpp: - (JSC::NullNode::emitBytecode): - (JSC::ArrayNode::emitBytecode): - (JSC::FunctionCallValueNode::emitBytecode): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::VoidNode::emitBytecode): - (JSC::ConstDeclNode::emitCodeSingle): - (JSC::ReturnNode::emitBytecode): - (JSC::processClauseList): - (JSC::EvalNode::emitBytecode): - (JSC::FunctionBodyNode::emitBytecode): - (JSC::ProgramNode::emitBytecode): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::addParentForConsoleStart): - * profiler/Profiler.cpp: - (JSC::Profiler::willExecute): - (JSC::Profiler::didExecute): - (JSC::Profiler::createCallIdentifier): - * profiler/Profiler.h: - * runtime/ArgList.cpp: - (JSC::ArgList::slowAppend): - * runtime/ArgList.h: - (JSC::ArgList::at): - (JSC::ArgList::append): - * runtime/Arguments.cpp: - (JSC::Arguments::put): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - (JSC::asArguments): - * runtime/ArrayConstructor.cpp: - (JSC::callArrayConstructor): - * runtime/ArrayPrototype.cpp: - (JSC::getProperty): - (JSC::putProperty): - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - (JSC::arrayProtoFuncConcat): - (JSC::arrayProtoFuncPop): - (JSC::arrayProtoFuncPush): - (JSC::arrayProtoFuncReverse): - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSlice): - (JSC::arrayProtoFuncSort): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/BooleanConstructor.cpp: - (JSC::callBooleanConstructor): - (JSC::constructBooleanFromImmediateBoolean): - * runtime/BooleanConstructor.h: - * runtime/BooleanObject.h: - (JSC::asBooleanObject): - * runtime/BooleanPrototype.cpp: - (JSC::booleanProtoFuncToString): - (JSC::booleanProtoFuncValueOf): - * runtime/CallData.cpp: - (JSC::call): - * runtime/CallData.h: - * runtime/Collector.cpp: - (JSC::Heap::protect): - (JSC::Heap::unprotect): - (JSC::Heap::heap): - (JSC::Heap::collect): - * runtime/Collector.h: - * runtime/Completion.cpp: - (JSC::evaluate): - * runtime/Completion.h: - (JSC::Completion::Completion): - (JSC::Completion::value): - (JSC::Completion::setValue): - (JSC::Completion::isValueCompletion): - * runtime/ConstructData.cpp: - (JSC::construct): - * runtime/ConstructData.h: - * runtime/DateConstructor.cpp: - (JSC::constructDate): - (JSC::callDate): - (JSC::dateParse): - (JSC::dateNow): - (JSC::dateUTC): - * runtime/DateInstance.h: - (JSC::asDateInstance): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToLocaleString): - (JSC::dateProtoFuncToLocaleDateString): - (JSC::dateProtoFuncToLocaleTimeString): - (JSC::dateProtoFuncValueOf): - (JSC::dateProtoFuncGetTime): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetMilliSeconds): - (JSC::dateProtoFuncGetUTCMilliseconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetMilliSeconds): - (JSC::dateProtoFuncSetUTCMilliseconds): - (JSC::dateProtoFuncSetSeconds): - (JSC::dateProtoFuncSetUTCSeconds): - (JSC::dateProtoFuncSetMinutes): - (JSC::dateProtoFuncSetUTCMinutes): - (JSC::dateProtoFuncSetHours): - (JSC::dateProtoFuncSetUTCHours): - (JSC::dateProtoFuncSetDate): - (JSC::dateProtoFuncSetUTCDate): - (JSC::dateProtoFuncSetMonth): - (JSC::dateProtoFuncSetUTCMonth): - (JSC::dateProtoFuncSetFullYear): - (JSC::dateProtoFuncSetUTCFullYear): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/ErrorConstructor.cpp: - (JSC::callErrorConstructor): - * runtime/ErrorPrototype.cpp: - (JSC::errorProtoFuncToString): - * runtime/ExceptionHelpers.cpp: - (JSC::createInterruptedExecutionException): - (JSC::createError): - (JSC::createStackOverflowError): - (JSC::createUndefinedVariableError): - (JSC::createErrorMessage): - (JSC::createInvalidParamError): - (JSC::createNotAConstructorError): - (JSC::createNotAFunctionError): - * runtime/ExceptionHelpers.h: - * runtime/FunctionConstructor.cpp: - (JSC::callFunctionConstructor): - * runtime/FunctionPrototype.cpp: - (JSC::callFunctionPrototype): - (JSC::functionProtoFuncToString): - (JSC::functionProtoFuncApply): - (JSC::functionProtoFuncCall): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::toPrimitive): - (JSC::GetterSetter::getPrimitiveNumber): - * runtime/GetterSetter.h: - (JSC::asGetterSetter): - * runtime/InitializeThreading.cpp: - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - (JSC::asInternalFunction): - * runtime/JSActivation.cpp: - (JSC::JSActivation::getOwnPropertySlot): - (JSC::JSActivation::put): - (JSC::JSActivation::putWithAttributes): - (JSC::JSActivation::argumentsGetter): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - (JSC::asActivation): - * runtime/JSArray.cpp: - (JSC::storageSize): - (JSC::JSArray::JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::getPropertyNames): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::mark): - (JSC::JSArray::sort): - (JSC::JSArray::compactForSorting): - (JSC::JSArray::checkConsistency): - (JSC::constructArray): - * runtime/JSArray.h: - (JSC::JSArray::getIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::createStructure): - (JSC::asArray): - * runtime/JSCell.cpp: - (JSC::JSCell::put): - (JSC::JSCell::getJSNumber): - * runtime/JSCell.h: - (JSC::asCell): - (JSC::JSValue::asCell): - (JSC::JSValue::toPrimitive): - (JSC::JSValue::getPrimitiveNumber): - (JSC::JSValue::getJSNumber): - * runtime/JSFunction.cpp: - (JSC::JSFunction::call): - (JSC::JSFunction::argumentsGetter): - (JSC::JSFunction::callerGetter): - (JSC::JSFunction::lengthGetter): - (JSC::JSFunction::getOwnPropertySlot): - (JSC::JSFunction::put): - (JSC::JSFunction::construct): - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - (JSC::asFunction): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::JSGlobalObject::put): - (JSC::JSGlobalObject::putWithAttributes): - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::resetPrototype): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - (JSC::JSGlobalObject::GlobalPropertyInfo::GlobalPropertyInfo): - (JSC::asGlobalObject): - (JSC::Structure::prototypeForLookup): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEval): - (JSC::globalFuncParseInt): - (JSC::globalFuncParseFloat): - (JSC::globalFuncIsNaN): - (JSC::globalFuncIsFinite): - (JSC::globalFuncDecodeURI): - (JSC::globalFuncDecodeURIComponent): - (JSC::globalFuncEncodeURI): - (JSC::globalFuncEncodeURIComponent): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - (JSC::globalFuncJSCPrint): - * runtime/JSGlobalObjectFunctions.h: - * runtime/JSImmediate.cpp: - (JSC::JSImmediate::toThisObject): - (JSC::JSImmediate::toObject): - (JSC::JSImmediate::prototype): - (JSC::JSImmediate::toString): - * runtime/JSImmediate.h: - (JSC::JSImmediate::isImmediate): - (JSC::JSImmediate::isNumber): - (JSC::JSImmediate::isPositiveNumber): - (JSC::JSImmediate::isBoolean): - (JSC::JSImmediate::isUndefinedOrNull): - (JSC::JSImmediate::isNegative): - (JSC::JSImmediate::isEitherImmediate): - (JSC::JSImmediate::isAnyImmediate): - (JSC::JSImmediate::areBothImmediate): - (JSC::JSImmediate::areBothImmediateNumbers): - (JSC::JSImmediate::andImmediateNumbers): - (JSC::JSImmediate::xorImmediateNumbers): - (JSC::JSImmediate::orImmediateNumbers): - (JSC::JSImmediate::rightShiftImmediateNumbers): - (JSC::JSImmediate::canDoFastAdditiveOperations): - (JSC::JSImmediate::addImmediateNumbers): - (JSC::JSImmediate::subImmediateNumbers): - (JSC::JSImmediate::incImmediateNumber): - (JSC::JSImmediate::decImmediateNumber): - (JSC::JSImmediate::makeValue): - (JSC::JSImmediate::makeInt): - (JSC::JSImmediate::makeBool): - (JSC::JSImmediate::makeUndefined): - (JSC::JSImmediate::makeNull): - (JSC::JSImmediate::intValue): - (JSC::JSImmediate::uintValue): - (JSC::JSImmediate::boolValue): - (JSC::JSImmediate::rawValue): - (JSC::JSImmediate::trueImmediate): - (JSC::JSImmediate::falseImmediate): - (JSC::JSImmediate::undefinedImmediate): - (JSC::JSImmediate::nullImmediate): - (JSC::JSImmediate::zeroImmediate): - (JSC::JSImmediate::oneImmediate): - (JSC::JSImmediate::impossibleValue): - (JSC::JSImmediate::toBoolean): - (JSC::JSImmediate::getTruncatedUInt32): - (JSC::JSImmediate::from): - (JSC::JSImmediate::getTruncatedInt32): - (JSC::JSImmediate::toDouble): - (JSC::JSImmediate::getUInt32): - (JSC::jsNull): - (JSC::jsBoolean): - (JSC::jsUndefined): - (JSC::JSValue::isUndefined): - (JSC::JSValue::isNull): - (JSC::JSValue::isUndefinedOrNull): - (JSC::JSValue::isBoolean): - (JSC::JSValue::getBoolean): - (JSC::JSValue::toInt32): - (JSC::JSValue::toUInt32): - (JSC::toInt32): - (JSC::toUInt32): - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::toPrimitive): - (JSC::JSNotAnObject::getPrimitiveNumber): - (JSC::JSNotAnObject::put): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::createStructure): - * runtime/JSNumberCell.cpp: - (JSC::JSNumberCell::toPrimitive): - (JSC::JSNumberCell::getPrimitiveNumber): - (JSC::JSNumberCell::getJSNumber): - (JSC::jsNumberCell): - (JSC::jsNaN): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::createStructure): - (JSC::asNumberCell): - (JSC::jsNumber): - (JSC::JSValue::toJSNumber): - * runtime/JSObject.cpp: - (JSC::JSObject::mark): - (JSC::JSObject::put): - (JSC::JSObject::putWithAttributes): - (JSC::callDefaultValueFunction): - (JSC::JSObject::getPrimitiveNumber): - (JSC::JSObject::defaultValue): - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::JSObject::lookupGetter): - (JSC::JSObject::lookupSetter): - (JSC::JSObject::hasInstance): - (JSC::JSObject::toNumber): - (JSC::JSObject::toString): - (JSC::JSObject::fillGetterPropertySlot): - * runtime/JSObject.h: - (JSC::JSObject::getDirect): - (JSC::JSObject::getDirectLocation): - (JSC::JSObject::offsetForLocation): - (JSC::JSObject::locationForOffset): - (JSC::JSObject::getDirectOffset): - (JSC::JSObject::putDirectOffset): - (JSC::JSObject::createStructure): - (JSC::asObject): - (JSC::JSObject::prototype): - (JSC::JSObject::setPrototype): - (JSC::JSObject::inlineGetOwnPropertySlot): - (JSC::JSObject::getOwnPropertySlotForWrite): - (JSC::JSObject::getPropertySlot): - (JSC::JSObject::get): - (JSC::JSObject::putDirect): - (JSC::JSObject::putDirectWithoutTransition): - (JSC::JSObject::toPrimitive): - (JSC::JSValue::get): - (JSC::JSValue::put): - (JSC::JSObject::allocatePropertyStorageInline): - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::toPrimitive): - (JSC::JSPropertyNameIterator::getPrimitiveNumber): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::create): - (JSC::JSPropertyNameIterator::next): - * runtime/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::put): - (JSC::JSStaticScopeObject::putWithAttributes): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::JSStaticScopeObject): - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSString.cpp: - (JSC::JSString::toPrimitive): - (JSC::JSString::getPrimitiveNumber): - (JSC::JSString::getOwnPropertySlot): - * runtime/JSString.h: - (JSC::JSString::createStructure): - (JSC::asString): - * runtime/JSValue.h: - (JSC::JSValuePtr::makeImmediate): - (JSC::JSValuePtr::immediateValue): - (JSC::JSValuePtr::JSValuePtr): - (JSC::JSValuePtr::operator->): - (JSC::JSValuePtr::hasValue): - (JSC::JSValuePtr::operator==): - (JSC::JSValuePtr::operator!=): - (JSC::JSValuePtr::encode): - (JSC::JSValuePtr::decode): - (JSC::JSValue::asValue): - (JSC::noValue): - (JSC::operator==): - (JSC::operator!=): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::symbolTablePut): - (JSC::JSVariableObject::symbolTablePutWithAttributes): - * runtime/JSWrapperObject.cpp: - (JSC::JSWrapperObject::mark): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::internalValue): - (JSC::JSWrapperObject::setInternalValue): - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/Lookup.h: - (JSC::lookupPut): - * runtime/MathObject.cpp: - (JSC::mathProtoFuncAbs): - (JSC::mathProtoFuncACos): - (JSC::mathProtoFuncASin): - (JSC::mathProtoFuncATan): - (JSC::mathProtoFuncATan2): - (JSC::mathProtoFuncCeil): - (JSC::mathProtoFuncCos): - (JSC::mathProtoFuncExp): - (JSC::mathProtoFuncFloor): - (JSC::mathProtoFuncLog): - (JSC::mathProtoFuncMax): - (JSC::mathProtoFuncMin): - (JSC::mathProtoFuncPow): - (JSC::mathProtoFuncRandom): - (JSC::mathProtoFuncRound): - (JSC::mathProtoFuncSin): - (JSC::mathProtoFuncSqrt): - (JSC::mathProtoFuncTan): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NativeErrorConstructor.cpp: - (JSC::callNativeErrorConstructor): - * runtime/NumberConstructor.cpp: - (JSC::numberConstructorNaNValue): - (JSC::numberConstructorNegInfinity): - (JSC::numberConstructorPosInfinity): - (JSC::numberConstructorMaxValue): - (JSC::numberConstructorMinValue): - (JSC::callNumberConstructor): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.cpp: - (JSC::NumberObject::getJSNumber): - (JSC::constructNumberFromImmediateNumber): - * runtime/NumberObject.h: - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): - (JSC::numberProtoFuncToLocaleString): - (JSC::numberProtoFuncValueOf): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToExponential): - (JSC::numberProtoFuncToPrecision): - * runtime/ObjectConstructor.cpp: - (JSC::constructObject): - (JSC::callObjectConstructor): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncValueOf): - (JSC::objectProtoFuncHasOwnProperty): - (JSC::objectProtoFuncIsPrototypeOf): - (JSC::objectProtoFuncDefineGetter): - (JSC::objectProtoFuncDefineSetter): - (JSC::objectProtoFuncLookupGetter): - (JSC::objectProtoFuncLookupSetter): - (JSC::objectProtoFuncPropertyIsEnumerable): - (JSC::objectProtoFuncToLocaleString): - (JSC::objectProtoFuncToString): - * runtime/ObjectPrototype.h: - * runtime/Operations.cpp: - (JSC::equal): - (JSC::equalSlowCase): - (JSC::strictEqual): - (JSC::strictEqualSlowCase): - (JSC::throwOutOfMemoryError): - * runtime/Operations.h: - (JSC::equalSlowCaseInline): - (JSC::strictEqualSlowCaseInline): - * runtime/PropertySlot.cpp: - (JSC::PropertySlot::functionGetter): - * runtime/PropertySlot.h: - (JSC::PropertySlot::PropertySlot): - (JSC::PropertySlot::getValue): - (JSC::PropertySlot::putValue): - (JSC::PropertySlot::setValueSlot): - (JSC::PropertySlot::setValue): - (JSC::PropertySlot::setCustom): - (JSC::PropertySlot::setCustomIndex): - (JSC::PropertySlot::slotBase): - (JSC::PropertySlot::setBase): - (JSC::PropertySlot::): - * runtime/Protect.h: - (JSC::gcProtect): - (JSC::gcUnprotect): - (JSC::ProtectedPtr::ProtectedPtr): - (JSC::ProtectedPtr::operator JSValuePtr): - (JSC::ProtectedJSValuePtr::ProtectedJSValuePtr): - (JSC::ProtectedJSValuePtr::get): - (JSC::ProtectedJSValuePtr::operator JSValuePtr): - (JSC::ProtectedJSValuePtr::operator->): - (JSC::::ProtectedPtr): - (JSC::::~ProtectedPtr): - (JSC::::operator): - (JSC::ProtectedJSValuePtr::~ProtectedJSValuePtr): - (JSC::ProtectedJSValuePtr::operator=): - (JSC::operator==): - (JSC::operator!=): - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::getBackref): - (JSC::RegExpConstructor::getLastParen): - (JSC::RegExpConstructor::getLeftContext): - (JSC::RegExpConstructor::getRightContext): - (JSC::regExpConstructorDollar1): - (JSC::regExpConstructorDollar2): - (JSC::regExpConstructorDollar3): - (JSC::regExpConstructorDollar4): - (JSC::regExpConstructorDollar5): - (JSC::regExpConstructorDollar6): - (JSC::regExpConstructorDollar7): - (JSC::regExpConstructorDollar8): - (JSC::regExpConstructorDollar9): - (JSC::regExpConstructorInput): - (JSC::regExpConstructorMultiline): - (JSC::regExpConstructorLastMatch): - (JSC::regExpConstructorLastParen): - (JSC::regExpConstructorLeftContext): - (JSC::regExpConstructorRightContext): - (JSC::RegExpConstructor::put): - (JSC::setRegExpConstructorInput): - (JSC::setRegExpConstructorMultiline): - (JSC::constructRegExp): - (JSC::callRegExpConstructor): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - (JSC::asRegExpConstructor): - * runtime/RegExpMatchesArray.h: - (JSC::RegExpMatchesArray::put): - * runtime/RegExpObject.cpp: - (JSC::regExpObjectGlobal): - (JSC::regExpObjectIgnoreCase): - (JSC::regExpObjectMultiline): - (JSC::regExpObjectSource): - (JSC::regExpObjectLastIndex): - (JSC::RegExpObject::put): - (JSC::setRegExpObjectLastIndex): - (JSC::RegExpObject::test): - (JSC::RegExpObject::exec): - (JSC::callRegExpObject): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - (JSC::asRegExpObject): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncTest): - (JSC::regExpProtoFuncExec): - (JSC::regExpProtoFuncCompile): - (JSC::regExpProtoFuncToString): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCodeSlowCase): - (JSC::stringFromCharCode): - (JSC::callStringConstructor): - * runtime/StringObject.cpp: - (JSC::StringObject::put): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - (JSC::asStringObject): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncToString): - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncConcat): - (JSC::stringProtoFuncIndexOf): - (JSC::stringProtoFuncLastIndexOf): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - (JSC::stringProtoFuncSlice): - (JSC::stringProtoFuncSplit): - (JSC::stringProtoFuncSubstr): - (JSC::stringProtoFuncSubstring): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncLocaleCompare): - (JSC::stringProtoFuncBig): - (JSC::stringProtoFuncSmall): - (JSC::stringProtoFuncBlink): - (JSC::stringProtoFuncBold): - (JSC::stringProtoFuncFixed): - (JSC::stringProtoFuncItalics): - (JSC::stringProtoFuncStrike): - (JSC::stringProtoFuncSub): - (JSC::stringProtoFuncSup): - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): - (JSC::stringProtoFuncLink): - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::changePrototypeTransition): - (JSC::Structure::createCachedPrototypeChain): - * runtime/Structure.h: - (JSC::Structure::create): - (JSC::Structure::setPrototypeWithoutTransition): - (JSC::Structure::storedPrototype): - -2009-01-06 Oliver Hunt - - Reviewed by Cameron Zwarich. - - [jsfunfuzz] Over released ScopeChainNode - - - So this delightful bug was caused by our unwind code using a ScopeChain to perform - the unwind. The ScopeChain would ref the initial top of the scope chain, then deref - the resultant top of scope chain, which is incorrect. - - This patch removes the dependency on ScopeChain for the unwind, and i've filed - to look into the unintuitive - ScopeChain behaviour. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): - -2009-01-06 Adam Roben - - Hopeful Windows crash-on-launch fix - - * wtf/Platform.h: Force a world rebuild by touching this file. - -2009-01-06 Holger Hans Peter Freyther - - Reviewed by NOBODY (Build fix). - - * GNUmakefile.am:Add ByteArray.cpp too - -2009-01-06 Holger Hans Peter Freyther - - Reviewed by NOBODY (Speculative build fix). - - AllInOneFile.cpp does not include the JSByteArray.cpp include it... - - * GNUmakefile.am: - -2009-01-05 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Fix Wx build - - * JavaScriptCoreSources.bkl: - -2009-01-05 Oliver Hunt - - Windows build fixes - - Rubber-stamped by Alice Liu. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::Interpreter): - * runtime/ByteArray.cpp: - (JSC::ByteArray::create): - * runtime/ByteArray.h: - -2009-01-05 Oliver Hunt - - Reviewed by Gavin Barraclough. - - CanvasPixelArray performance is too slow - - - The fix to this is to devirtualise get and put in a manner similar to - JSString and JSArray. To do this I've added a ByteArray implementation - and JSByteArray wrapper to JSC. We can then do vptr comparisons to - devirtualise the calls. - - This devirtualisation improves performance by 1.5-2x in my somewhat ad - hoc tests. - - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::Interpreter): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::cti_op_get_by_val): - (JSC::Interpreter::cti_op_put_by_val): - * interpreter/Interpreter.h: - (JSC::Interpreter::isJSByteArray): - * runtime/ByteArray.cpp: Added. - (JSC::ByteArray::create): - * runtime/ByteArray.h: Added. - (JSC::ByteArray::length): - (JSC::ByteArray::set): - (JSC::ByteArray::get): - (JSC::ByteArray::data): - (JSC::ByteArray::ByteArray): - * runtime/JSByteArray.cpp: Added. - (JSC::): - (JSC::JSByteArray::JSByteArray): - (JSC::JSByteArray::createStructure): - (JSC::JSByteArray::getOwnPropertySlot): - (JSC::JSByteArray::put): - (JSC::JSByteArray::getPropertyNames): - * runtime/JSByteArray.h: Added. - (JSC::JSByteArray::canAccessIndex): - (JSC::JSByteArray::getIndex): - (JSC::JSByteArray::setIndex): - (JSC::JSByteArray::classInfo): - (JSC::JSByteArray::length): - (JSC::JSByteArray::): - (JSC::JSByteArray::JSByteArray): - (JSC::asByteArray): - -2009-01-05 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=23073 - Workers crash on Windows Release builds - - * wtf/ThreadSpecific.h: - (WTF::ThreadSpecific::destroy): Changed to clear the pointer only after data object - destruction is finished - otherwise, WebCore::ThreadGlobalData destructor was re-creating - the object in order to access atomic string table. - (WTF::ThreadSpecific::operator T*): Symmetrically, set up the per-thread pointer before - data constructor is called. - - * wtf/ThreadingWin.cpp: (WTF::wtfThreadEntryPoint): Remove a Windows-only hack to finalize - a thread - pthreadVC2 is a DLL, so it gets thread detached messages, and cleans up thread - specific data automatically. Besides, this code wasn't even compiled in for some time now. - -2009-01-05 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=23115 - Create a version of ASSERT for use with otherwise unused variables - - * wtf/Assertions.h: Added ASSERT_UNUSED. - - * jit/ExecutableAllocatorPosix.cpp: - (JSC::ExecutablePool::systemRelease): - * runtime/Collector.cpp: - (JSC::Heap::destroy): - (JSC::Heap::heapAllocate): - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::toPrimitive): - (JSC::JSNotAnObject::getPrimitiveNumber): - (JSC::JSNotAnObject::toBoolean): - (JSC::JSNotAnObject::toNumber): - (JSC::JSNotAnObject::toString): - (JSC::JSNotAnObject::getOwnPropertySlot): - (JSC::JSNotAnObject::put): - (JSC::JSNotAnObject::deleteProperty): - (JSC::JSNotAnObject::getPropertyNames): - * wtf/TCSystemAlloc.cpp: - (TCMalloc_SystemRelease): - Use it in some places that used other idioms for this purpose. - -2009-01-04 Alice Liu - - Merge m_transitionCount and m_offset in Structure. - - Reviewed by Darin Adler. - - * runtime/Structure.cpp: - (JSC::Structure::Structure): Remove m_transitionCount - (JSC::Structure::addPropertyTransitionToExistingStructure): No need to wait until after the assignment to offset to assert if it's notFound; move it up. - (JSC::Structure::addPropertyTransition): Use method for transitionCount instead of m_transitionCount. Remove line that maintains the m_transitionCount. - (JSC::Structure::changePrototypeTransition): Remove line that maintains the m_transitionCount. - (JSC::Structure::getterSetterTransition): Remove line that maintains the m_transitionCount. - * runtime/Structure.h: - Changed s_maxTransitionLength and m_offset from size_t to signed char. m_offset will never become greater than 64 - because the structure transitions to a dictionary at that time. - (JSC::Structure::transitionCount): method to replace the data member - -2009-01-04 Darin Adler - - Reviewed by David Kilzer. - - Bug 15114: Provide compile-time assertions for sizeof(UChar), sizeof(DeprecatedChar), etc. - https://bugs.webkit.org/show_bug.cgi?id=15114 - - * wtf/unicode/Unicode.h: Assert size of UChar. There is no DeprecatedChar any more. - -2009-01-03 Sam Weinig - - Reviewed by Oliver Hunt. - - Change the pcVector from storing native code pointers to storing offsets - from the base pointer. This will allow us to generate the pcVector on demand - for exceptions. - - * bytecode/CodeBlock.h: - (JSC::PC::PC): - (JSC::getNativePCOffset): - (JSC::CodeBlock::getBytecodeIndex): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - -2009-01-02 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - * runtime/ScopeChain.cpp: - -2009-01-02 Oliver Hunt - - Reviewed by Gavin Barraclough. - - [jsfunfuzz] unwind logic for exceptions in eval fails to account for dynamic scope external to the eval - https://bugs.webkit.org/show_bug.cgi?id=23078 - - This bug was caused by eval codeblocks being generated without accounting - for the depth of the scope chain they inherited. This meant that exception - handlers would understate their expected scope chain depth, which in turn - led to incorrectly removing nodes from the scope chain. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitCatch): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::depth): - * runtime/ScopeChain.cpp: - (JSC::ScopeChain::localDepth): - * runtime/ScopeChain.h: - (JSC::ScopeChainNode::deref): - (JSC::ScopeChainNode::ref): - -2009-01-02 David Smith - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=22699 - Enable NodeList caching for getElementsByTagName - - * wtf/HashFunctions.h: Moved the definition of PHI here and renamed to stringHashingStartValue - -2009-01-02 David Kilzer - - Attempt to fix Qt Linux build after r39553 - - * wtf/RandomNumberSeed.h: Include for gettimeofday(). - Include and for getpid(). - -2009-01-02 David Kilzer - - Bug 23081: These files are no longer part of the KDE libraries - - - - Reviewed by Darin Adler. - - Removed "This file is part of the KDE libraries" comment from - source files. Added or updated Apple copyrights as well. - - * parser/Lexer.h: - * wtf/HashCountedSet.h: - * wtf/RetainPtr.h: - * wtf/VectorTraits.h: - -2009-01-02 David Kilzer - - Bug 23080: Remove last vestiges of KJS references - - - - Reviewed by Darin Adler. - - Also updated Apple copyright statements. - - * DerivedSources.make: Changed bison "kjsyy" prefix to "jscyy". - * GNUmakefile.am: Ditto. - * JavaScriptCore.pri: Ditto. Also changed KJSBISON to JSCBISON - and kjsbison to jscbison. - - * JavaScriptCoreSources.bkl: Changed JSCORE_KJS_SOURCES to - JSCORE_JSC_SOURCES. - * jscore.bkl: Ditto. - - * create_hash_table: Updated copyright and removed old comment. - - * parser/Grammar.y: Changed "kjsyy" prefix to "jscyy" prefix. - * parser/Lexer.cpp: Ditto. Also changed KJS_DEBUG_LEX to - JSC_DEBUG_LEX. - (jscyylex): - (JSC::Lexer::lex): - * parser/Parser.cpp: Ditto. - (JSC::Parser::parse): - - * pcre/dftables: Changed "kjs_pcre_" prefix to "jsc_pcre_". - * pcre/pcre_compile.cpp: Ditto. - (getOthercaseRange): - (encodeUTF8): - (compileBranch): - (calculateCompiledPatternLength): - * pcre/pcre_exec.cpp: Ditto. - (matchRef): - (getUTF8CharAndIncrementLength): - (match): - * pcre/pcre_internal.h: Ditto. - (toLowerCase): - (flipCase): - (classBitmapForChar): - (charTypeForChar): - * pcre/pcre_tables.cpp: Ditto. - * pcre/pcre_ucp_searchfuncs.cpp: Ditto. - (jsc_pcre_ucp_othercase): - * pcre/pcre_xclass.cpp: Ditto. - (getUTF8CharAndAdvancePointer): - (jsc_pcre_xclass): - - * runtime/Collector.h: Updated header guards using the - clean-header-guards script. - * runtime/CollectorHeapIterator.h: Added missing header guard. - * runtime/Identifier.h: Updated header guards. - * runtime/JSFunction.h: Fixed end-of-namespace comment. - - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): Renamed "kjsprint" debug function - to "jscprint". Changed implementation method from - globalFuncKJSPrint() to globalFuncJSCPrint(). - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncJSCPrint): Renamed from globalFuncKJSPrint(). - * runtime/JSGlobalObjectFunctions.h: Ditto. - - * runtime/JSImmediate.h: Updated header guards. - * runtime/JSLock.h: Ditto. - * runtime/JSType.h: Ditto. - * runtime/JSWrapperObject.h: Ditto. - * runtime/Lookup.h: Ditto. - * runtime/Operations.h: Ditto. - * runtime/Protect.h: Ditto. - * runtime/RegExp.h: Ditto. - * runtime/UString.h: Ditto. - - * tests/mozilla/js1_5/Array/regress-157652.js: Changed "KJS" - reference in comment to "JSC". - - * wrec/CharacterClassConstructor.cpp: Change "kjs_pcre_" function - prefixes to "jsc_pcre_". - (JSC::WREC::CharacterClassConstructor::put): - (JSC::WREC::CharacterClassConstructor::flush): - - * wtf/unicode/Unicode.h: Change "KJS_" header guard to "WTF_". - * wtf/unicode/icu/UnicodeIcu.h: Ditto. - * wtf/unicode/qt4/UnicodeQt4.h: Ditto. - -2009-01-02 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Make randomNumber generate 2^53 values instead of 2^32 (or 2^31 for rand() platforms) - - * wtf/RandomNumber.cpp: - (WTF::randomNumber): - -2009-01-02 David Kilzer - - Remove declaration for JSC::Identifier::initializeIdentifierThreading() - - Reviewed by Alexey Proskuryakov. - - * runtime/Identifier.h: - (JSC::Identifier::initializeIdentifierThreading): Removed - declaration since the implementation was removed in r34412. - -2009-01-01 Darin Adler - - Reviewed by Oliver Hunt. - - String.replace does not support $& replacement metacharacter when search term is not a RegExp - - - - Test: fast/js/string-replace-3.html - - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferences): Added a null check here so we won't try to handle $$-$9 - backreferences when the search term is a string, not a RegExp. Added a check for 0 so we - won't try to handle $0 or $00 as a backreference. - (JSC::stringProtoFuncReplace): Added a call to substituteBackreferences. - -2009-01-01 Gavin Barraclough - - Reviewed by Darin Adler. - - Allow 32-bit integers to be stored in JSImmediates, on x64-bit. - Presently the top 32-bits of a 64-bit JSImmediate serve as a sign extension of a 31-bit - int stored in the low word (shifted left by one, to make room for a tag). In the new - format, the top 31-bits serve as a sign extension of a 32-bit int, still shifted left by - one. - - The new behavior is enabled using a flag in Platform.h, 'WTF_USE_ALTERNATE_JSIMMEDIATE'. - When this is set the constants defining the range of ints allowed to be stored as - JSImmediate values is extended. The code in JSImmediate.h can safely operate on either - format. This patch updates the JIT so that it can also operate with the new format. - - ~2% progression on x86-64, with & without the JIT, on sunspider & v8 tests. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::addPtr): - (JSC::MacroAssembler::orPtr): - (JSC::MacroAssembler::or32): - (JSC::MacroAssembler::rshiftPtr): - (JSC::MacroAssembler::rshift32): - (JSC::MacroAssembler::subPtr): - (JSC::MacroAssembler::xorPtr): - (JSC::MacroAssembler::xor32): - (JSC::MacroAssembler::move): - (JSC::MacroAssembler::compareImm64ForBranch): - (JSC::MacroAssembler::compareImm64ForBranchEquality): - (JSC::MacroAssembler::jePtr): - (JSC::MacroAssembler::jgePtr): - (JSC::MacroAssembler::jlPtr): - (JSC::MacroAssembler::jlePtr): - (JSC::MacroAssembler::jnePtr): - (JSC::MacroAssembler::jnzSubPtr): - (JSC::MacroAssembler::joAddPtr): - (JSC::MacroAssembler::jzSubPtr): - * assembler/X86Assembler.h: - (JSC::X86Assembler::addq_rr): - (JSC::X86Assembler::orq_ir): - (JSC::X86Assembler::subq_ir): - (JSC::X86Assembler::xorq_rr): - (JSC::X86Assembler::sarq_CLr): - (JSC::X86Assembler::sarq_i8r): - (JSC::X86Assembler::cmpq_ir): - * jit/JIT.cpp: - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileFastArith_op_lshift): - (JSC::JIT::compileFastArithSlow_op_lshift): - (JSC::JIT::compileFastArith_op_rshift): - (JSC::JIT::compileFastArithSlow_op_rshift): - (JSC::JIT::compileFastArith_op_bitand): - (JSC::JIT::compileFastArithSlow_op_bitand): - (JSC::JIT::compileFastArith_op_mod): - (JSC::JIT::compileFastArithSlow_op_mod): - (JSC::JIT::compileFastArith_op_add): - (JSC::JIT::compileFastArithSlow_op_add): - (JSC::JIT::compileFastArith_op_mul): - (JSC::JIT::compileFastArithSlow_op_mul): - (JSC::JIT::compileFastArith_op_post_inc): - (JSC::JIT::compileFastArithSlow_op_post_inc): - (JSC::JIT::compileFastArith_op_post_dec): - (JSC::JIT::compileFastArithSlow_op_post_dec): - (JSC::JIT::compileFastArith_op_pre_inc): - (JSC::JIT::compileFastArithSlow_op_pre_inc): - (JSC::JIT::compileFastArith_op_pre_dec): - (JSC::JIT::compileFastArithSlow_op_pre_dec): - (JSC::JIT::compileBinaryArithOp): - * jit/JITInlineMethods.h: - (JSC::JIT::getConstantOperand): - (JSC::JIT::getConstantOperandImmediateInt): - (JSC::JIT::isOperandConstantImmediateInt): - (JSC::JIT::isOperandConstant31BitImmediateInt): - (JSC::JIT::emitFastArithDeTagImmediate): - (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero): - (JSC::JIT::emitFastArithReTagImmediate): - (JSC::JIT::emitFastArithImmToInt): - (JSC::JIT::emitFastArithIntToImmNoCheck): - * runtime/JSImmediate.h: - (JSC::JSImmediate::isPositiveNumber): - (JSC::JSImmediate::isNegative): - (JSC::JSImmediate::rightShiftImmediateNumbers): - (JSC::JSImmediate::canDoFastAdditiveOperations): - (JSC::JSImmediate::makeValue): - (JSC::JSImmediate::makeInt): - (JSC::JSImmediate::makeBool): - (JSC::JSImmediate::intValue): - (JSC::JSImmediate::rawValue): - (JSC::JSImmediate::toBoolean): - (JSC::JSImmediate::from): - * wtf/Platform.h: - -2008-12-31 Oliver Hunt - - Reviewed by Cameron Zwarich. - - [jsfunfuzz] Assertion + incorrect behaviour with dynamically created local variable in a catch block - - - Eval inside a catch block attempts to use the catch block's static scope in - an unsafe way by attempting to add new properties to the scope. This patch - fixes this issue simply by preventing the catch block from using a static - scope if it contains an eval. - - * parser/Grammar.y: - * parser/Nodes.cpp: - (JSC::TryNode::emitBytecode): - * parser/Nodes.h: - (JSC::TryNode::): - -2008-12-31 Oliver Hunt - - Reviewed by Gavin Barraclough. - - [jsfunfuzz] Computed exception offset wrong when first instruction is attempt to resolve deleted eval - - - This was caused by the expression information for the initial resolve of - eval not being emitted. If this resolve was the first instruction that - could throw an exception the information search would fail leading to an - assertion failure. If it was not the first throwable opcode the wrong - expression information would used. - - Fix is simply to emit the expression info. - - * parser/Nodes.cpp: - (JSC::EvalFunctionCallNode::emitBytecode): - -2008-12-31 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 23054: Caching of global lookups occurs even when the global object has become a dictionary - - - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveGlobal): Do not cache lookup if the global - object has transitioned to a dictionary. - (JSC::Interpreter::cti_op_resolve_global): Do not cache lookup if the - global object has transitioned to a dictionary. - -2008-12-30 Oliver Hunt - - Reviewed by Darin Adler. - - [jsfunfuzz] With blocks do not correctly protect their scope object - Crash in JSC::TypeInfo::hasStandardGetOwnPropertySlot() running jsfunfuzz - - The problem that caused this was that with nodes were not correctly protecting - the final object that was placed in the scope chain. We correct this by forcing - the use of a temporary register (which stops us relying on a local register - protecting the scope) and changing the behaviour of op_push_scope so that it - will store the final scope object. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitPushScope): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::cti_op_push_scope): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * parser/Nodes.cpp: - (JSC::WithNode::emitBytecode): - -2008-12-30 Cameron Zwarich - - Reviewed by Sam Weinig. - - Bug 23037: Parsing and reparsing disagree on automatic semicolon insertion - - - - Parsing and reparsing disagree about automatic semicolon insertion, so that a - function like - - function() { a = 1, } - - is parsed as being syntactically valid but gets a syntax error upon reparsing. - This leads to an assertion failure in Parser::reparse(). It is not that big of - an issue in practice, because in a Release build such a function will return - 'undefined' when called. - - In this case, we are not following the spec and it should be a syntax error. - However, unless there is a newline separating the ',' and the '}', WebKit would - not treat it as a syntax error in the past either. It would be a bit of work to - make the automatic semicolon insertion match the spec exactly, so this patch - changes it to match our past behaviour. - - The problem is that even during reparsing, the Lexer adds a semicolon at the - end of the input, which confuses allowAutomaticSemicolon(), because it is - expecting either a '}', the end of input, or a terminator like a newline. - - * parser/Lexer.cpp: - (JSC::Lexer::Lexer): Initialize m_isReparsing to false. - (JSC::Lexer::lex): Do not perform automatic semicolon insertion in the Lexer if - we are in the middle of reparsing. - (JSC::Lexer::clear): Set m_isReparsing to false. - * parser/Lexer.h: - (JSC::Lexer::setIsReparsing): Added. - * parser/Parser.cpp: - (JSC::Parser::reparse): Call Lexer::setIsReparsing() to notify the Lexer of - reparsing. - -2008-12-29 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Yet another attempt to fix Tiger. - - * wtf/RandomNumber.cpp: - (WTF::randomNumber): - -2008-12-29 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Tiger build fix (correct this time) - - * wtf/RandomNumber.cpp: - -2008-12-29 Cameron Zwarich - - Rubber-stamped by Alexey Proskuryakov. - - Revert r39509, because kjsyydebug is used in the generated code if YYDEBUG is 1. - - * parser/Grammar.y: - -2008-12-29 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Tiger build fix. - - * wtf/RandomNumber.cpp: - -2008-12-29 Oliver Hunt - - Reviewed by Mark Rowe. - - Insecure randomness in Math.random() leads to user tracking - - Switch to arc4random on PLATFORM(DARWIN), this is ~1.5x slower than random(), but the - it is still so fast that there is no fathomable way it could be a bottleneck for anything. - - randomNumber is called in two places - * During form submission where it is called once per form - * Math.random in JSC. For this difference to show up you have to be looping on - a cached local copy of random, for a large (>10000) calls. - - No change in SunSpider. - - * wtf/RandomNumber.cpp: - (WTF::randomNumber): - * wtf/RandomNumberSeed.h: - (WTF::initializeRandomNumberGenerator): - -2008-12-29 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Remove unused kjsyydebug #define. - - * parser/Grammar.y: - -2008-12-29 Cameron Zwarich - - Reviewed by Oliver Hunt and Sam Weinig. - - Bug 23029: REGRESSION (r39337): jsfunfuzz generates identical test files - - - - The unification of random number generation in r39337 resulted in random() - being initialized on Darwin, but rand() actually being used. Fix this by - making randomNumber() use random() instead of rand() on Darwin. - - * wtf/RandomNumber.cpp: - (WTF::randomNumber): - -2008-12-29 Sam Weinig - - Fix buildbots. - - * runtime/Structure.cpp: - -2008-12-29 Sam Weinig - - Reviewed by Oliver Hunt. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=23026 - Move the deleted offsets vector into the PropertyMap - - Saves 3 words per Structure. - - * runtime/PropertyMapHashTable.h: - * runtime/Structure.cpp: - (JSC::Structure::addPropertyTransition): - (JSC::Structure::changePrototypeTransition): - (JSC::Structure::getterSetterTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::fromDictionaryTransition): - (JSC::Structure::copyPropertyTable): - (JSC::Structure::put): - (JSC::Structure::remove): - (JSC::Structure::rehashPropertyMapHashTable): - * runtime/Structure.h: - (JSC::Structure::propertyStorageSize): - -2008-12-29 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Change code using m_body.get() as a boolean to take advantage of the - implicit conversion of RefPtr to boolean. - - * runtime/JSFunction.cpp: - (JSC::JSFunction::~JSFunction): - -2008-12-28 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 22840: REGRESSION (r38349): Gmail doesn't load with profiling enabled - - - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitNewArray): Add an assertion that the range - of registers passed to op_new_array is sequential. - (JSC::BytecodeGenerator::emitCall): Correct the relocation of registers - when emitting profiler hooks so that registers aren't leaked. Also, add - an assertion that the 'this' register is always ref'd (because it is), - remove the needless protection of the 'this' register when relocating, - and add an assertion that the range of registers passed to op_call for - function call arguments is sequential. - (JSC::BytecodeGenerator::emitConstruct): Correct the relocation of - registers when emitting profiler hooks so that registers aren't leaked. - Also, add an assertion that the range of registers passed to op_construct - for function call arguments is sequential. - -2008-12-26 Mark Rowe - - Reviewed by Alexey Proskuryakov. - - Race condition in WTF::currentThread can lead to a thread using two different identifiers during its lifetime - - If a newly-created thread calls WTF::currentThread() before WTF::createThread calls establishIdentifierForPthreadHandle - then more than one identifier will be used for the same thread. We can avoid this by adding some extra synchronization - during thread creation that delays the execution of the thread function until the thread identifier has been set up, and - an assertion to catch this problem should it reappear in the future. - - * wtf/Threading.cpp: Added. - (WTF::NewThreadContext::NewThreadContext): - (WTF::threadEntryPoint): - (WTF::createThread): Add cross-platform createThread function that delays the execution of the thread function until - after the thread identifier has been set up. - * wtf/Threading.h: - * wtf/ThreadingGtk.cpp: - (WTF::establishIdentifierForThread): - (WTF::createThreadInternal): - * wtf/ThreadingNone.cpp: - (WTF::createThreadInternal): - * wtf/ThreadingPthreads.cpp: - (WTF::establishIdentifierForPthreadHandle): - (WTF::createThreadInternal): - * wtf/ThreadingQt.cpp: - (WTF::identifierByQthreadHandle): - (WTF::establishIdentifierForThread): - (WTF::createThreadInternal): - * wtf/ThreadingWin.cpp: - (WTF::storeThreadHandleByIdentifier): - (WTF::createThreadInternal): - - Add Threading.cpp to the build. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - -2008-12-26 Sam Weinig - - Reviewed by Alexey Proskuryakov. - - Remove unused method. - - * runtime/Structure.h: Remove mutableTypeInfo. - -2008-12-22 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Fix rounding / bounds / signed comparison bug in ExecutableAllocator. - - ExecutableAllocator::alloc assumed that m_freePtr would be aligned. This was - not always true, since the first allocation from an additional pool would not - be rounded up. Subsequent allocations would be unaligned, and too much memory - could be erroneously allocated from the pool, when the size requested was - available, but the size rounded up to word granularity was not available in the - pool. This may result in the value of m_freePtr being greater than m_end. - - Under these circumstances, the unsigned check for space will always pass, - resulting in pointers to memory outside of the arena being returned, and - ultimately segfaulty goodness when attempting to memcpy the hot freshly jitted - code from the AssemblerBuffer. - - https://bugs.webkit.org/show_bug.cgi?id=22974 - ... and probably many, many more. - - * jit/ExecutableAllocator.h: - (JSC::ExecutablePool::alloc): - (JSC::ExecutablePool::roundUpAllocationSize): - (JSC::ExecutablePool::ExecutablePool): - (JSC::ExecutablePool::poolAllocate): - -2008-12-22 Sam Weinig - - Reviewed by Gavin Barraclough. - - Rename all uses of the term "repatch" to "patch". - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::DataLabelPtr::patch): - (JSC::MacroAssembler::DataLabel32::patch): - (JSC::MacroAssembler::Jump::patch): - (JSC::MacroAssembler::PatchBuffer::PatchBuffer): - (JSC::MacroAssembler::PatchBuffer::setPtr): - (JSC::MacroAssembler::loadPtrWithAddressOffsetPatch): - (JSC::MacroAssembler::storePtrWithAddressOffsetPatch): - (JSC::MacroAssembler::storePtrWithPatch): - (JSC::MacroAssembler::jnePtrWithPatch): - * assembler/X86Assembler.h: - (JSC::X86Assembler::patchAddress): - (JSC::X86Assembler::patchImmediate): - (JSC::X86Assembler::patchPointer): - (JSC::X86Assembler::patchBranchOffset): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCTICachePutByID): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::Interpreter::cti_op_put_by_id): - (JSC::Interpreter::cti_op_get_by_id): - (JSC::Interpreter::cti_op_get_by_id_self_fail): - (JSC::Interpreter::cti_op_get_by_id_proto_list): - (JSC::Interpreter::cti_vm_dontLazyLinkCall): - * jit/JIT.cpp: - (JSC::ctiPatchCallByReturnAddress): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::unlinkCall): - (JSC::JIT::linkCall): - (JSC::JIT::compileOpCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdSlowCase): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - -2008-12-22 Adam Roben - - Build fix after r39428 - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSlowCase): Added a missing MacroAssembler:: - -2008-12-22 Nikolas Zimmermann - - Rubber-stamped by George Staikos. - - Unify all TorchMobile copyright lines. Consolidate in a single line, as requested by Mark Rowe, some time ago. - - * wtf/RandomNumber.cpp: - * wtf/RandomNumber.h: - * wtf/RandomNumberSeed.h: - -2008-12-21 Nikolas Zimmermann - - Rubber-stamped by George Staikos. - - Fix copyright of the new RandomNumber* files. - - * wtf/RandomNumber.cpp: - * wtf/RandomNumber.h: - * wtf/RandomNumberSeed.h: - -2008-12-21 Gavin Barraclough - - Reviewed by Oliver Hunt & Cameron Zwarich. - - Add support for call and property access repatching on x86-64. - - No change in performance on current configurations (2x impovement on v8-tests with JIT enabled on x86-64). - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::DataLabelPtr::repatch): - (JSC::MacroAssembler::DataLabelPtr::operator X86Assembler::JmpDst): - (JSC::MacroAssembler::DataLabel32::repatch): - (JSC::MacroAssembler::RepatchBuffer::addressOf): - (JSC::MacroAssembler::add32): - (JSC::MacroAssembler::sub32): - (JSC::MacroAssembler::loadPtrWithAddressOffsetRepatch): - (JSC::MacroAssembler::storePtrWithAddressOffsetRepatch): - (JSC::MacroAssembler::jePtr): - (JSC::MacroAssembler::jnePtr): - (JSC::MacroAssembler::jnePtrWithRepatch): - (JSC::MacroAssembler::differenceBetween): - * assembler/X86Assembler.h: - (JSC::X86Assembler::addl_im): - (JSC::X86Assembler::subl_im): - (JSC::X86Assembler::cmpl_rm): - (JSC::X86Assembler::movq_rm_disp32): - (JSC::X86Assembler::movq_mr_disp32): - (JSC::X86Assembler::repatchPointer): - (JSC::X86Assembler::X86InstructionFormatter::oneByteOp64_disp32): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::unlinkCall): - (JSC::JIT::linkCall): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReferenceForTrampoline): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compilePutByIdSlowCase): - (JSC::resizePropertyStorage): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * wtf/Platform.h: - -2008-12-20 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Port optimized property access generation to the MacroAssembler. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::AbsoluteAddress::AbsoluteAddress): - (JSC::MacroAssembler::DataLabelPtr::repatch): - (JSC::MacroAssembler::DataLabel32::DataLabel32): - (JSC::MacroAssembler::DataLabel32::repatch): - (JSC::MacroAssembler::Label::operator X86Assembler::JmpDst): - (JSC::MacroAssembler::Jump::repatch): - (JSC::MacroAssembler::JumpList::empty): - (JSC::MacroAssembler::RepatchBuffer::link): - (JSC::MacroAssembler::add32): - (JSC::MacroAssembler::and32): - (JSC::MacroAssembler::sub32): - (JSC::MacroAssembler::loadPtrWithAddressRepatch): - (JSC::MacroAssembler::storePtrWithAddressRepatch): - (JSC::MacroAssembler::push): - (JSC::MacroAssembler::ja32): - (JSC::MacroAssembler::jePtr): - (JSC::MacroAssembler::jnePtr): - (JSC::MacroAssembler::jnePtrWithRepatch): - (JSC::MacroAssembler::align): - (JSC::MacroAssembler::differenceBetween): - * assembler/X86Assembler.h: - (JSC::X86Assembler::movl_rm_disp32): - (JSC::X86Assembler::movl_mr_disp32): - (JSC::X86Assembler::X86InstructionFormatter::oneByteOp_disp32): - (JSC::X86Assembler::X86InstructionFormatter::memoryModRM): - * jit/JIT.cpp: - (JSC::ctiRepatchCallByReturnAddress): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compilePutByIdSlowCase): - (JSC::resizePropertyStorage): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - * wtf/RefCounted.h: - (WTF::RefCountedBase::addressOfCount): - -2008-12-19 Gustavo Noronha Silva - - Reviewed by Holger Freyther. - - https://bugs.webkit.org/show_bug.cgi?id=22686 - - Added file which was missing to the javascriptcore_sources - variable, so that it shows up in the tarball created by `make - dist'. - - * GNUmakefile.am: - -2008-12-19 Holger Hans Peter Freyther - - Reviewed by Antti Koivisto. - - Build fix when building JS API tests with a c89 c compiler - - Do not use C++ style comments and convert them to C comments. - - * wtf/Platform.h: - -2008-12-18 Gavin Barraclough - - Reviewed by Sam Weinig. - - Same as last revision, adding cases for pre & post inc & dec. - - https://bugs.webkit.org/show_bug.cgi?id=22928 - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - -2008-12-18 Gavin Barraclough - - Reviewed by Sam Weinig. - - Fixes for the JIT's handling of JSImmediate values on x86-64. - On 64-bit systems, the code in JSImmediate.h relies on the upper - bits of a JSImmediate being a sign extension of the low 32-bits. - This was not being enforced by the JIT, since a number of inline - operations were being performed on 32-bit values in registers, and - when a 32-bit result is written to a register on x86-64 the value - is zero-extended to 64-bits. - - This fix honors previous behavoir. A better fix in the long run - (when the JIT is enabled by default) may be to change JSImmediate.h - so it no longer relies on the upper bits of the pointer,... though - if we're going to change JSImmediate.h for 64-bit, we probably may - as well change the format so that the full range of 32-bit ints can - be stored, rather than just 31-bits. - - https://bugs.webkit.org/show_bug.cgi?id=22925 - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::addPtr): - (JSC::MacroAssembler::andPtr): - (JSC::MacroAssembler::orPtr): - (JSC::MacroAssembler::or32): - (JSC::MacroAssembler::xor32): - (JSC::MacroAssembler::xorPtr): - (JSC::MacroAssembler::signExtend32ToPtr): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::andq_rr): - (JSC::X86Assembler::andq_ir): - (JSC::X86Assembler::orq_rr): - (JSC::X86Assembler::xorq_ir): - (JSC::X86Assembler::movsxd_rr): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JITInlineMethods.h: - (JSC::JIT::emitFastArithReTagImmediate): - (JSC::JIT::emitFastArithPotentiallyReTagImmediate): - (JSC::JIT::emitFastArithImmToInt): - -2008-12-18 Gavin Barraclough - - Reviewed by Sam Weinig. - - Just a tidy up - rename & refactor some the #defines configuring the JIT. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::cti_op_convert_this): - (JSC::Interpreter::cti_op_end): - (JSC::Interpreter::cti_op_add): - (JSC::Interpreter::cti_op_pre_inc): - (JSC::Interpreter::cti_timeout_check): - (JSC::Interpreter::cti_register_file_check): - (JSC::Interpreter::cti_op_loop_if_less): - (JSC::Interpreter::cti_op_loop_if_lesseq): - (JSC::Interpreter::cti_op_new_object): - (JSC::Interpreter::cti_op_put_by_id_generic): - (JSC::Interpreter::cti_op_get_by_id_generic): - (JSC::Interpreter::cti_op_put_by_id): - (JSC::Interpreter::cti_op_put_by_id_second): - (JSC::Interpreter::cti_op_put_by_id_fail): - (JSC::Interpreter::cti_op_get_by_id): - (JSC::Interpreter::cti_op_get_by_id_second): - (JSC::Interpreter::cti_op_get_by_id_self_fail): - (JSC::Interpreter::cti_op_get_by_id_proto_list): - (JSC::Interpreter::cti_op_get_by_id_proto_list_full): - (JSC::Interpreter::cti_op_get_by_id_proto_fail): - (JSC::Interpreter::cti_op_get_by_id_array_fail): - (JSC::Interpreter::cti_op_get_by_id_string_fail): - (JSC::Interpreter::cti_op_instanceof): - (JSC::Interpreter::cti_op_del_by_id): - (JSC::Interpreter::cti_op_mul): - (JSC::Interpreter::cti_op_new_func): - (JSC::Interpreter::cti_op_call_JSFunction): - (JSC::Interpreter::cti_op_call_arityCheck): - (JSC::Interpreter::cti_vm_dontLazyLinkCall): - (JSC::Interpreter::cti_vm_lazyLinkCall): - (JSC::Interpreter::cti_op_push_activation): - (JSC::Interpreter::cti_op_call_NotJSFunction): - (JSC::Interpreter::cti_op_create_arguments): - (JSC::Interpreter::cti_op_create_arguments_no_params): - (JSC::Interpreter::cti_op_tear_off_activation): - (JSC::Interpreter::cti_op_tear_off_arguments): - (JSC::Interpreter::cti_op_profile_will_call): - (JSC::Interpreter::cti_op_profile_did_call): - (JSC::Interpreter::cti_op_ret_scopeChain): - (JSC::Interpreter::cti_op_new_array): - (JSC::Interpreter::cti_op_resolve): - (JSC::Interpreter::cti_op_construct_JSConstruct): - (JSC::Interpreter::cti_op_construct_NotJSConstruct): - (JSC::Interpreter::cti_op_get_by_val): - (JSC::Interpreter::cti_op_resolve_func): - (JSC::Interpreter::cti_op_sub): - (JSC::Interpreter::cti_op_put_by_val): - (JSC::Interpreter::cti_op_put_by_val_array): - (JSC::Interpreter::cti_op_lesseq): - (JSC::Interpreter::cti_op_loop_if_true): - (JSC::Interpreter::cti_op_negate): - (JSC::Interpreter::cti_op_resolve_base): - (JSC::Interpreter::cti_op_resolve_skip): - (JSC::Interpreter::cti_op_resolve_global): - (JSC::Interpreter::cti_op_div): - (JSC::Interpreter::cti_op_pre_dec): - (JSC::Interpreter::cti_op_jless): - (JSC::Interpreter::cti_op_not): - (JSC::Interpreter::cti_op_jtrue): - (JSC::Interpreter::cti_op_post_inc): - (JSC::Interpreter::cti_op_eq): - (JSC::Interpreter::cti_op_lshift): - (JSC::Interpreter::cti_op_bitand): - (JSC::Interpreter::cti_op_rshift): - (JSC::Interpreter::cti_op_bitnot): - (JSC::Interpreter::cti_op_resolve_with_base): - (JSC::Interpreter::cti_op_new_func_exp): - (JSC::Interpreter::cti_op_mod): - (JSC::Interpreter::cti_op_less): - (JSC::Interpreter::cti_op_neq): - (JSC::Interpreter::cti_op_post_dec): - (JSC::Interpreter::cti_op_urshift): - (JSC::Interpreter::cti_op_bitxor): - (JSC::Interpreter::cti_op_new_regexp): - (JSC::Interpreter::cti_op_bitor): - (JSC::Interpreter::cti_op_call_eval): - (JSC::Interpreter::cti_op_throw): - (JSC::Interpreter::cti_op_get_pnames): - (JSC::Interpreter::cti_op_next_pname): - (JSC::Interpreter::cti_op_push_scope): - (JSC::Interpreter::cti_op_pop_scope): - (JSC::Interpreter::cti_op_typeof): - (JSC::Interpreter::cti_op_is_undefined): - (JSC::Interpreter::cti_op_is_boolean): - (JSC::Interpreter::cti_op_is_number): - (JSC::Interpreter::cti_op_is_string): - (JSC::Interpreter::cti_op_is_object): - (JSC::Interpreter::cti_op_is_function): - (JSC::Interpreter::cti_op_stricteq): - (JSC::Interpreter::cti_op_nstricteq): - (JSC::Interpreter::cti_op_to_jsnumber): - (JSC::Interpreter::cti_op_in): - (JSC::Interpreter::cti_op_push_new_scope): - (JSC::Interpreter::cti_op_jmp_scopes): - (JSC::Interpreter::cti_op_put_by_index): - (JSC::Interpreter::cti_op_switch_imm): - (JSC::Interpreter::cti_op_switch_char): - (JSC::Interpreter::cti_op_switch_string): - (JSC::Interpreter::cti_op_del_by_val): - (JSC::Interpreter::cti_op_put_getter): - (JSC::Interpreter::cti_op_put_setter): - (JSC::Interpreter::cti_op_new_error): - (JSC::Interpreter::cti_op_debug): - (JSC::Interpreter::cti_vm_throw): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompile): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReference): - (JSC::JIT::restoreArgumentReferenceForTrampoline): - * wtf/Platform.h: - -2008-12-18 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 21855: REGRESSION (r37323): Gmail complains about popup blocking when opening a link - - - - Move DynamicGlobalObjectScope to JSGlobalObject.h so that it can be used - from WebCore. - - * interpreter/Interpreter.cpp: - * runtime/JSGlobalObject.h: - (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): - (JSC::DynamicGlobalObjectScope::~DynamicGlobalObjectScope): - -2008-12-17 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=22393 - Segfault when caching property accesses to primitive cells. - - Changed some asObject casts to asCell casts in cases where a primitive - value may be a cell and not an object. - - Re-enabled property caching for primitives in cases where it had been - disabled because of this bug. - - Updated a comment to better explain something Darin thought needed - explaining in an old patch review. - - * interpreter/Interpreter.cpp: - (JSC::countPrototypeChainEntriesAndCheckForProxies): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::Interpreter::cti_op_get_by_id_self_fail): - (JSC::Interpreter::cti_op_get_by_id_proto_list): - -2008-12-17 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Fixes for Sunspider failures with the JIT enabled on x86-64. - - * assembler/MacroAssembler.h: - Switch the order of the RegisterID & Address form of je32, to keep it consistent with jne32. - * jit/JIT.cpp: - * jit/JIT.h: - * jit/JITInlineMethods.h: - Port the m_ctiVirtualCall tramopline generation to use the MacroAssembler interface. - * jit/JITCall.cpp: - Fix bug in the non-optimizing code path, vptr check should have been to the memory address pointer - to by the register, not to the register itself. - * wrec/WRECGenerator.cpp: - See assembler/MacroAssembler.h, above. - -2008-12-17 Gavin Barraclough - - Reviewed by Sam Weinig. - - print("Hello, 64-bit jitted world!"); - Get hello-world working through the JIT, on x86-64. - - * assembler/X86Assembler.h: - Fix encoding of opcode + RegisterID format instructions for 64-bit. - * interpreter/Interpreter.cpp: - * interpreter/Interpreter.h: - Make VoidPtrPair actually be a pair of void*s. - (Possibly should make this change for 32-bit Mac platforms, too - but won't change 32-bit behaviour in this patch). - * jit/JIT.cpp: - * jit/JIT.h: - Provide names for the timeoutCheckRegister & callFrameRegister on x86-64, - force x86-64 ctiTrampoline arguments onto the stack, - implement the asm trampolines for x86-64, - implement the restoreArgumentReference methods for x86-64 calling conventions. - * jit/JITCall.cpp: - * jit/JITInlineMethods.h: - * wtf/Platform.h: - Add switch settings to ENABLE(JIT), on PLATFORM(X86_64) (currently still disabled). - -2008-12-17 Sam Weinig - - Reviewed by Gavin Barraclough. - - Add more CodeBlock statistics. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dumpStatistics): - -2008-12-17 Sam Weinig - - Reviewed by Darin Adler. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=22897 - - Look into feasibility of discarding bytecode after native codegen - - Clear the bytecode Instruction vector at the end JIT generation. - - Saves 4.8 MB on Membuster head. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): Add logging for the case that someone tries - to dump the instructions of a CodeBlock that has had its bytecode - vector cleared. - (JSC::CodeBlock::CodeBlock): Initialize the instructionCount - (JSC::CodeBlock::handlerForBytecodeOffset): Use instructionCount instead - of the size of the instruction vector in the assertion. - (JSC::CodeBlock::lineNumberForBytecodeOffset): Ditto. - (JSC::CodeBlock::expressionRangeForBytecodeOffset): Ditto. - (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): Ditto. - (JSC::CodeBlock::functionRegisterForBytecodeOffset): Ditto. - * bytecode/CodeBlock.h: - (JSC::CodeBlock::setInstructionCount): Store the instruction vector size - in debug builds for assertions. - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): Clear the bytecode vector unless we - have compiled with Opcode sampling where we will continue to require it - -2008-12-17 Cary Clark - - Reviewed by Darin Adler. - Landed by Adam Barth. - - Add ENABLE_TEXT_CARET to permit the ANDROID platform - to invalidate and draw the caret in a separate thread. - - * wtf/Platform.h: - Default ENABLE_TEXT_CARET to 1. - -2008-12-17 Alexey Proskuryakov - - Reviewed by Darin Adler. - - Don't use unique context group in JSGlobalContextCreate() on Tiger or Leopard, take two. - - * API/JSContextRef.cpp: The previous patch that claimed to do this was making Tiger and - Leopard always use unique context group instead. - -2008-12-16 Sam Weinig - - Reviewed by Geoffrey Garen. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=22838 - Remove dependency on the bytecode Instruction buffer in Interpreter::throwException - Part of - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::functionRegisterForBytecodeOffset): Added. Function to get - a function Register index in a callFrame for a bytecode offset. - (JSC::CodeBlock::shrinkToFit): Shrink m_getByIdExceptionInfo and m_functionRegisterInfos. - * bytecode/CodeBlock.h: - (JSC::FunctionRegisterInfo::FunctionRegisterInfo): Added. - (JSC::CodeBlock::addFunctionRegisterInfo): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitCall): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): Use functionRegisterForBytecodeOffset in JIT - mode. - -2008-12-16 Sam Weinig - - Reviewed by Gavin Barraclough. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=22837 - Remove dependency on the bytecode Instruction buffer in Interpreter::cti_op_call_NotJSFunction - Part of - - * interpreter/CallFrame.h: Added comment regarding returnPC storing a void*. - * interpreter/Interpreter.cpp: - (JSC::bytecodeOffsetForPC): We no longer have any cases of the PC - being in the instruction stream for JIT, so we can remove the check. - (JSC::Interpreter::cti_op_call_NotJSFunction): Use the CTI_RETURN_ADDRESS - as the call frame returnPC as it is only necessary for looking up when - throwing an exception. - * interpreter/RegisterFile.h: - (JSC::RegisterFile::): Added comment regarding returnPC storing a void*. - * jit/JIT.h: Remove ARG_instr4. - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSetupArgs): Don't pass the instruction pointer. - -2008-12-16 Darin Adler - - Reviewed and landed by Cameron Zwarich. - - Preparatory work for fixing - - Bug 22887: Make UString::Rep use RefCounted rather than implementing its own ref counting - - - Change the various string translators used by Identifier:add() so that - they never zero the ref count of a newly created UString::Rep. - - * runtime/Identifier.cpp: - (JSC::CStringTranslator::translate): - (JSC::Identifier::add): - (JSC::UCharBufferTranslator::translate): - -2008-12-16 Gavin Barraclough - - Build fix for 'doze. - - * assembler/AssemblerBuffer.h: - -2008-12-16 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Make the JIT compile on x86-64. - This largely involves populting the missing calls in MacroAssembler.h. - In addition some reinterpret_casts need removing from the JIT, and the - repatching property access code will need to be fully compiled out for - now. The changes in interpret.cpp are to reorder the functions so that - the _generic forms come before all other property access methods, and - then to place all property access methods other than the generic forms - under control of the ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS macro. - - No performance impact. - - * assembler/AssemblerBuffer.h: - (JSC::AssemblerBuffer::putInt64Unchecked): - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::loadPtr): - (JSC::MacroAssembler::load32): - (JSC::MacroAssembler::storePtr): - (JSC::MacroAssembler::storePtrWithRepatch): - (JSC::MacroAssembler::store32): - (JSC::MacroAssembler::poke): - (JSC::MacroAssembler::move): - (JSC::MacroAssembler::testImm64): - (JSC::MacroAssembler::jePtr): - (JSC::MacroAssembler::jnePtr): - (JSC::MacroAssembler::jnzPtr): - (JSC::MacroAssembler::jzPtr): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::cmpq_rr): - (JSC::X86Assembler::cmpq_rm): - (JSC::X86Assembler::cmpq_im): - (JSC::X86Assembler::testq_i32m): - (JSC::X86Assembler::movl_mEAX): - (JSC::X86Assembler::movl_i32r): - (JSC::X86Assembler::movl_EAXm): - (JSC::X86Assembler::movq_rm): - (JSC::X86Assembler::movq_mEAX): - (JSC::X86Assembler::movq_mr): - (JSC::X86Assembler::movq_i64r): - (JSC::X86Assembler::movl_mr): - (JSC::X86Assembler::X86InstructionFormatter::oneByteOp64): - (JSC::X86Assembler::X86InstructionFormatter::immediate64): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::cti_op_put_by_id_generic): - (JSC::Interpreter::cti_op_get_by_id_generic): - (JSC::Interpreter::cti_op_put_by_id): - (JSC::Interpreter::cti_op_put_by_id_second): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - * runtime/JSImmediate.h: - (JSC::JSImmediate::makeInt): - -2008-12-16 Cameron Zwarich - - Reviewed by Darin Adler. - - Bug 22869: REGRESSION (r38407): http://news.cnet.com/8301-13579_3-9953533-37.html crashes - - - - Before r38407, Structure::m_nameInPrevious was ref'd due to it being - stored in a PropertyMap. However, PropertyMaps are created lazily after - r38407, so Structure::m_nameInPrevious is not necessarily ref'd while - it is being used. Making it a RefPtr instead of a raw pointer fixes - the problem. - - Unfortunately, the crash in the bug is rather intermittent, and it is - impossible to add an assertion in UString::Ref::ref() to catch this bug - because some users of UString::Rep deliberately zero out the reference - count. Therefore, there is no layout test accompanying this bug fix. - - * runtime/Structure.cpp: - (JSC::Structure::~Structure): Use get(). - (JSC::Structure::materializePropertyMap): Use get(). - (JSC::Structure::addPropertyTransitionToExistingStructure): Use get(). - (JSC::Structure::addPropertyTransition): Use get(). - * runtime/Structure.h: Make Structure::m_nameInPrevious a RefPtr instead - of a raw pointer. - -2008-12-16 Nikolas Zimmermann - - Not reviewed. Attempt to fix win build. No 'using namespace WTF' in this file, needs manual WTF:: prefix. - Not sure why the build works as is here. - - * runtime/MathObject.cpp: - (JSC::mathProtoFuncRandom): - -2008-12-16 Nikolas Zimmermann - - Reviewed by Darin Adler. - - Fixes: https://bugs.webkit.org/show_bug.cgi?id=22876 - - Unify random number generation in JavaScriptCore & WebCore, by introducing - wtf/RandomNumber.h and moving wtf_random/wtf_random_init out of MathExtras.h. - - wtf_random_init() has been renamed to initializeRandomNumberGenerator() and - lives in it's own private header: wtf/RandomNumberSeed.h, only intended to - be used from within JavaScriptCore. - - wtf_random() has been renamed to randomNumber() and lives in a public header - wtf/RandomNumber.h, usable from within JavaScriptCore & WebCore. It encapsulates - the code taking care of initializing the random number generator (only when - building without ENABLE(JSC_MULTIPLE_THREADS), otherwhise initializeThreading() - already took care of that). - - Functional change on darwin: Use random() instead of rand(), as it got a larger - period (more randomness). HTMLFormElement already contains this implementation - and I just moved it in randomNumber(), as special case for PLATFORM(DARWIN). - - * GNUmakefile.am: Add RandomNumber.(cpp/h) / RandomNumberSeed.h. - * JavaScriptCore.exp: Ditto. - * JavaScriptCore.pri: Ditto. - * JavaScriptCore.scons: Ditto. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - * JavaScriptCoreSources.bkl: Ditto. - * runtime/MathObject.cpp: Use new WTF::randomNumber() functionality. - (JSC::mathProtoFuncRandom): - * wtf/MathExtras.h: Move wtf_random / wtf_random_init to new files. - * wtf/RandomNumber.cpp: Added. - (WTF::randomNumber): - * wtf/RandomNumber.h: Added. - * wtf/RandomNumberSeed.h: Added. Internal usage within JSC only. - (WTF::initializeRandomNumberGenerator): - * wtf/ThreadingGtk.cpp: Rename wtf_random_init() to initializeRandomNumberGenerator(). - (WTF::initializeThreading): - * wtf/ThreadingPthreads.cpp: Ditto. - (WTF::initializeThreading): - * wtf/ThreadingQt.cpp: Ditto. - (WTF::initializeThreading): - * wtf/ThreadingWin.cpp: Ditto. - (WTF::initializeThreading): - -2008-12-16 Yael Aharon - - Reviewed by Tor Arne Vestbø. - - Qt/Win build fix - - * JavaScriptCore.pri: - -2008-12-15 Mark Rowe - - Reviewed by Cameron Zwarich. - - Fix the build with GCC 4.0. - - * Configurations/JavaScriptCore.xcconfig: GCC 4.0 appears to have a bug when compiling with -funwind-tables on, - so don't use it with that compiler version. - -2008-12-15 Mark Rowe - - Rubber-stamped by Cameron Zwarich. - - Change WebKit-related projects to build with GCC 4.2 on Leopard. - - * Configurations/Base.xcconfig: - * Configurations/DebugRelease.xcconfig: - -2008-12-15 Alexey Proskuryakov - - Reviewed by Darin Adler. - - Don't use unique context group in JSGlobalContextCreate() on Tiger or Leopard. - - * API/JSContextRef.cpp: (JSGlobalContextCreate): - -2008-12-15 Alexey Proskuryakov - - Reviewed by Darin Adler. - - Mach ports leak from worker threads - - * interpreter/Interpreter.cpp: (JSC::getCPUTime): - Deallocate the thread self port. - -2008-12-15 Gavin Barraclough - - Reviewed by Mark Rowe. - - Construct stack frames in JIT code, so that backtracing can still work. - JIT should play nice with attempts to take stack traces - - * jit/JIT.cpp: - (JSC::): - (JSC::JIT::privateCompileMainPass): - -2008-12-15 Mark Rowe - - Reviewed by Gavin Barraclough. - - JavaScriptCore needs exception handling tables in order to get stack traces without frame pointers - - * Configurations/JavaScriptCore.xcconfig: - -2008-12-15 Gavin Barraclough - - Rubber stamped by Mark Rowe. - - Revert r39226 / Bug 22818: Unify JIT callback argument access OS X / Windows - This causes Acid3 failures – reverting for now & will revisit later. - https://bugs.webkit.org/show_bug.cgi?id=22873 - - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReference): - (JSC::JIT::restoreArgumentReferenceForTrampoline): - (JSC::JIT::emitCTICall_internal): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - * wtf/Platform.h: - -2008-12-15 Darin Adler - - Reviewed by Sam Weinig. - - - fix crash due to infinite recursion after setting window.__proto__ = window - - Replaced toGlobalObject with the more generally useful unwrappedObject and used it to - fix the cycle detection code in put(__proto__). - - * JavaScriptCore.exp: Updated. - - * runtime/JSGlobalObject.cpp: Removed toGlobalObject. We now use unwrappedObject instead. - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::isGlobalObject): Ditto. - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): Use unwrappedObject and isGlobalObject here rather than toGlobalObject. - - * runtime/JSObject.cpp: - (JSC::JSObject::put): Rewrote prototype cycle checking loop. Use unwrappedObject in the loop now. - (JSC::JSObject::unwrappedObject): Replaced toGlobalObject with this new function. - * runtime/JSObject.h: More of the same. - -2008-12-15 Steve Falkenburg - - Windows build fix. - - Visual Studio requires visibility of forward declarations to match class declaration. - - * assembler/X86Assembler.h: - -2008-12-15 Gustavo Noronha Silva - - Reviewed by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=22686 - - GTK+ build fix. - - * GNUmakefile.am: - -2008-12-15 Gavin Barraclough - - Reviewed by Geoff Garen. - - Add support to X86Assembler emitting instructions that access all 16 registers on x86-64. - Add a new formating class, that is reponsible for both emitting the opcode bytes and the - ModRm bytes of an instruction in a single call; this can insert the REX byte as necessary - before the opcode, but has access to the register numbers to build the REX. - - * assembler/AssemblerBuffer.h: - (JSC::AssemblerBuffer::isAligned): - (JSC::AssemblerBuffer::data): - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::addPtr): - (JSC::MacroAssembler::add32): - (JSC::MacroAssembler::and32): - (JSC::MacroAssembler::or32): - (JSC::MacroAssembler::sub32): - (JSC::MacroAssembler::xor32): - (JSC::MacroAssembler::loadPtr): - (JSC::MacroAssembler::load32): - (JSC::MacroAssembler::load16): - (JSC::MacroAssembler::storePtr): - (JSC::MacroAssembler::storePtrWithRepatch): - (JSC::MacroAssembler::store32): - (JSC::MacroAssembler::pop): - (JSC::MacroAssembler::push): - (JSC::MacroAssembler::compareImm32ForBranch): - (JSC::MacroAssembler::compareImm32ForBranchEquality): - (JSC::MacroAssembler::testImm32): - (JSC::MacroAssembler::jae32): - (JSC::MacroAssembler::jb32): - (JSC::MacroAssembler::je16): - (JSC::MacroAssembler::jg32): - (JSC::MacroAssembler::jnePtr): - (JSC::MacroAssembler::jne32): - (JSC::MacroAssembler::jump): - * assembler/X86Assembler.h: - (JSC::X86::): - (JSC::X86Assembler::): - (JSC::X86Assembler::size): - (JSC::X86Assembler::push_r): - (JSC::X86Assembler::pop_r): - (JSC::X86Assembler::push_i32): - (JSC::X86Assembler::push_m): - (JSC::X86Assembler::pop_m): - (JSC::X86Assembler::addl_rr): - (JSC::X86Assembler::addl_mr): - (JSC::X86Assembler::addl_ir): - (JSC::X86Assembler::addq_ir): - (JSC::X86Assembler::addl_im): - (JSC::X86Assembler::andl_rr): - (JSC::X86Assembler::andl_ir): - (JSC::X86Assembler::orl_rr): - (JSC::X86Assembler::orl_mr): - (JSC::X86Assembler::orl_ir): - (JSC::X86Assembler::subl_rr): - (JSC::X86Assembler::subl_mr): - (JSC::X86Assembler::subl_ir): - (JSC::X86Assembler::subl_im): - (JSC::X86Assembler::xorl_rr): - (JSC::X86Assembler::xorl_ir): - (JSC::X86Assembler::sarl_i8r): - (JSC::X86Assembler::sarl_CLr): - (JSC::X86Assembler::shll_i8r): - (JSC::X86Assembler::shll_CLr): - (JSC::X86Assembler::imull_rr): - (JSC::X86Assembler::imull_i32r): - (JSC::X86Assembler::idivl_r): - (JSC::X86Assembler::cmpl_rr): - (JSC::X86Assembler::cmpl_rm): - (JSC::X86Assembler::cmpl_mr): - (JSC::X86Assembler::cmpl_ir): - (JSC::X86Assembler::cmpl_ir_force32): - (JSC::X86Assembler::cmpl_im): - (JSC::X86Assembler::cmpl_im_force32): - (JSC::X86Assembler::cmpw_rm): - (JSC::X86Assembler::testl_rr): - (JSC::X86Assembler::testl_i32r): - (JSC::X86Assembler::testl_i32m): - (JSC::X86Assembler::testq_rr): - (JSC::X86Assembler::testq_i32r): - (JSC::X86Assembler::testb_i8r): - (JSC::X86Assembler::sete_r): - (JSC::X86Assembler::setz_r): - (JSC::X86Assembler::setne_r): - (JSC::X86Assembler::setnz_r): - (JSC::X86Assembler::cdq): - (JSC::X86Assembler::xchgl_rr): - (JSC::X86Assembler::movl_rr): - (JSC::X86Assembler::movl_rm): - (JSC::X86Assembler::movl_mr): - (JSC::X86Assembler::movl_i32r): - (JSC::X86Assembler::movl_i32m): - (JSC::X86Assembler::movq_rr): - (JSC::X86Assembler::movq_rm): - (JSC::X86Assembler::movq_mr): - (JSC::X86Assembler::movzwl_mr): - (JSC::X86Assembler::movzbl_rr): - (JSC::X86Assembler::leal_mr): - (JSC::X86Assembler::call): - (JSC::X86Assembler::jmp): - (JSC::X86Assembler::jmp_r): - (JSC::X86Assembler::jmp_m): - (JSC::X86Assembler::jne): - (JSC::X86Assembler::jnz): - (JSC::X86Assembler::je): - (JSC::X86Assembler::jl): - (JSC::X86Assembler::jb): - (JSC::X86Assembler::jle): - (JSC::X86Assembler::jbe): - (JSC::X86Assembler::jge): - (JSC::X86Assembler::jg): - (JSC::X86Assembler::ja): - (JSC::X86Assembler::jae): - (JSC::X86Assembler::jo): - (JSC::X86Assembler::jp): - (JSC::X86Assembler::js): - (JSC::X86Assembler::addsd_rr): - (JSC::X86Assembler::addsd_mr): - (JSC::X86Assembler::cvtsi2sd_rr): - (JSC::X86Assembler::cvttsd2si_rr): - (JSC::X86Assembler::movd_rr): - (JSC::X86Assembler::movsd_rm): - (JSC::X86Assembler::movsd_mr): - (JSC::X86Assembler::mulsd_rr): - (JSC::X86Assembler::mulsd_mr): - (JSC::X86Assembler::pextrw_irr): - (JSC::X86Assembler::subsd_rr): - (JSC::X86Assembler::subsd_mr): - (JSC::X86Assembler::ucomis_rr): - (JSC::X86Assembler::int3): - (JSC::X86Assembler::ret): - (JSC::X86Assembler::predictNotTaken): - (JSC::X86Assembler::label): - (JSC::X86Assembler::align): - (JSC::X86Assembler::link): - (JSC::X86Assembler::executableCopy): - (JSC::X86Assembler::X86InstructionFormater::prefix): - (JSC::X86Assembler::X86InstructionFormater::oneByteOp): - (JSC::X86Assembler::X86InstructionFormater::twoByteOp): - (JSC::X86Assembler::X86InstructionFormater::oneByteOp64): - (JSC::X86Assembler::X86InstructionFormater::oneByteOp8): - (JSC::X86Assembler::X86InstructionFormater::twoByteOp8): - (JSC::X86Assembler::X86InstructionFormater::instructionImmediate8): - (JSC::X86Assembler::X86InstructionFormater::instructionImmediate32): - (JSC::X86Assembler::X86InstructionFormater::instructionRel32): - (JSC::X86Assembler::X86InstructionFormater::size): - (JSC::X86Assembler::X86InstructionFormater::isAligned): - (JSC::X86Assembler::X86InstructionFormater::data): - (JSC::X86Assembler::X86InstructionFormater::executableCopy): - (JSC::X86Assembler::X86InstructionFormater::registerModRM): - (JSC::X86Assembler::X86InstructionFormater::memoryModRM): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITArithmetic.cpp: - (JSC::JIT::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::JIT::compileBinaryArithOp): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - -2008-12-15 Darin Adler - - * interpreter/RegisterFile.h: Tweak include formatting. - -2008-12-15 Holger Hans Peter Freyther - - Build fix for Gtk+. - - * interpreter/RegisterFile.h: Include stdio.h for fprintf - -2008-12-15 Alexey Proskuryakov - - Reviewed by Oliver Hunt. - - Worker Thread crash running multiple workers for a moderate amount of time - - * interpreter/RegisterFile.h: (JSC::RegisterFile::RegisterFile): - Improve error handling: if mmap fails, crash immediately, and print out the reason. - -2008-12-13 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Re-enable WREC on 64-bit. - Implements one of the MacroAssembler::jnzPtr methods, previously only implemented for 32-bit x86. - - https://bugs.webkit.org/show_bug.cgi?id=22849 - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::testImm64): - (JSC::MacroAssembler::jnzPtr): - * assembler/X86Assembler.h: - (JSC::X86Assembler::testq_i32r): - (JSC::X86Assembler::testq_rr): - * wtf/Platform.h: - -2008-12-13 Gavin Barraclough - - Fix PPC builds. - - * assembler/MacroAssembler.h: - -2008-12-13 Gavin Barraclough - - Build fix only, no review. - - * bytecode/CodeBlock.h: - -2008-12-13 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Port the remainder of the JIT, bar calling convention related code, and code - implementing optimizations which can be disabled, to use the MacroAssembler. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::DataLabelPtr::DataLabelPtr): - (JSC::MacroAssembler::RepatchBuffer::RepatchBuffer): - (JSC::MacroAssembler::RepatchBuffer::link): - (JSC::MacroAssembler::RepatchBuffer::addressOf): - (JSC::MacroAssembler::RepatchBuffer::setPtr): - (JSC::MacroAssembler::addPtr): - (JSC::MacroAssembler::lshift32): - (JSC::MacroAssembler::mod32): - (JSC::MacroAssembler::rshift32): - (JSC::MacroAssembler::storePtrWithRepatch): - (JSC::MacroAssembler::jnzPtr): - (JSC::MacroAssembler::jzPtr): - (JSC::MacroAssembler::jump): - (JSC::MacroAssembler::label): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::xchgl_rr): - (JSC::X86Assembler::jmp_m): - (JSC::X86Assembler::repatchAddress): - (JSC::X86Assembler::getRelocatedAddress): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - * bytecode/CodeBlock.h: - (JSC::JITCodeRef::JITCodeRef): - (JSC::CodeBlock::setJITCode): - (JSC::CodeBlock::jitCode): - (JSC::CodeBlock::executablePool): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileLinkPass): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - (JSC::CallRecord::CallRecord): - (JSC::JumpTable::JumpTable): - (JSC::JIT::emitCTICall): - (JSC::JIT::JSRInfo::JSRInfo): - * jit/JITArithmetic.cpp: - * jit/JITCall.cpp: - * jit/JITInlineMethods.h: - (JSC::JIT::emitNakedCall): - (JSC::JIT::emitCTICall_internal): - (JSC::JIT::checkStructure): - (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero): - (JSC::JIT::addSlowCase): - (JSC::JIT::addJump): - (JSC::JIT::emitJumpSlowToHot): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - -2008-12-12 Cameron Zwarich - - Reviewed by Sam Weinig. - - Fix the failures of the following layout tests, which regressed in - r39255: - - fast/dom/StyleSheet/ownerNode-lifetime-2.html - fast/xsl/transform-xhr-doc.xhtml - - The binary search in CodeBlock::getByIdExceptionInfoForBytecodeOffset() - doesn't guarantee that it actually finds a match, so add an explicit check - for this. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): - -2008-12-12 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Replace emitPutCallArg methods with emitPutJITStubArg methods. Primarily to make the argument numbering - more sensible (1-based incrementing by 1, rather than 0-based incrementing by 4). The CTI name also seems - to be being deprecated from the code generally. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileBinaryArithOp): - (JSC::JIT::compileBinaryArithOpSlowCase): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpCallEvalSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCall): - * jit/JITInlineMethods.h: - (JSC::JIT::emitPutJITStubArg): - (JSC::JIT::emitPutJITStubArgConstant): - (JSC::JIT::emitGetJITStubArg): - (JSC::JIT::emitPutJITStubArgFromVirtualRegister): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdSlowCase): - -2008-12-12 Gavin Barraclough - - Fix windows builds. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - -2008-12-12 Gavin Barraclough - - Reviewed by Geoff Garen. - - Remove loop counter 'i' from the JIT generation passes, replace with a member m_bytecodeIndex. - - No impact on performance. - - * jit/JIT.cpp: - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emitSlowScriptCheck): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::CallRecord::CallRecord): - (JSC::JmpTable::JmpTable): - (JSC::JIT::emitCTICall): - * jit/JITArithmetic.cpp: - (JSC::JIT::compileBinaryArithOp): - (JSC::JIT::compileBinaryArithOpSlowCase): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::emitGetVirtualRegister): - (JSC::JIT::emitGetVirtualRegisters): - (JSC::JIT::emitNakedCall): - (JSC::JIT::emitCTICall_internal): - (JSC::JIT::emitJumpSlowCaseIfJSCell): - (JSC::JIT::emitJumpSlowCaseIfNotJSCell): - (JSC::JIT::emitJumpSlowCaseIfNotImmNum): - (JSC::JIT::emitJumpSlowCaseIfNotImmNums): - (JSC::JIT::emitFastArithIntToImmOrSlowCase): - (JSC::JIT::addSlowCase): - (JSC::JIT::addJump): - (JSC::JIT::emitJumpSlowToHot): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compilePutByIdSlowCase): - -2008-12-12 Sam Weinig - - Reviewed by Cameron Zwarich. - - Look into feasibility of discarding bytecode after native codegen - - Move more JIT functionality to using offsets into the Instruction buffer - instead of raw pointers. Two to go! - - * interpreter/Interpreter.cpp: - (JSC::bytecodeOffsetForPC): Rename from vPCForPC. - (JSC::Interpreter::resolve): Pass offset to exception helper. - (JSC::Interpreter::resolveSkip): Ditto. - (JSC::Interpreter::resolveGlobal): Ditto. - (JSC::Interpreter::resolveBaseAndProperty): Ditto. - (JSC::Interpreter::resolveBaseAndFunc): Ditto. - (JSC::isNotObject): Ditto. - (JSC::Interpreter::unwindCallFrame): Call bytecodeOffsetForPC. - (JSC::Interpreter::throwException): Use offsets instead of vPCs. - (JSC::Interpreter::privateExecute): Pass offset to exception helper. - (JSC::Interpreter::retrieveLastCaller): Ditto. - (JSC::Interpreter::cti_op_instanceof): Ditto. - (JSC::Interpreter::cti_op_call_NotJSFunction): Ditto. - (JSC::Interpreter::cti_op_resolve): Pass offset to exception helper. - (JSC::Interpreter::cti_op_construct_NotJSConstruct): Ditto. - (JSC::Interpreter::cti_op_resolve_func): Ditto. - (JSC::Interpreter::cti_op_resolve_skip): Ditto. - (JSC::Interpreter::cti_op_resolve_global): Ditto. - (JSC::Interpreter::cti_op_resolve_with_base): Ditto. - (JSC::Interpreter::cti_op_throw): Ditto. - (JSC::Interpreter::cti_op_in): Ditto. - (JSC::Interpreter::cti_vm_throw): Ditto. - * interpreter/Interpreter.h: - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): Don't pass unnecessary vPC to stub. - * jit/JIT.h: Remove ARG_instr1 - ARG_instr3 and ARG_instr5 - ARG_instr6. - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallEvalSetupArgs): Don't pass unnecessary vPC to stub.. - (JSC::JIT::compileOpConstructSetupArgs): Ditto. - - * runtime/ExceptionHelpers.cpp: - (JSC::createUndefinedVariableError): Take an offset instead of vPC. - (JSC::createInvalidParamError): Ditto. - (JSC::createNotAConstructorError): Ditto. - (JSC::createNotAFunctionError): Ditto. - (JSC::createNotAnObjectError): Ditto. - * runtime/ExceptionHelpers.h: - -2008-12-12 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 22835: Crash during bytecode generation when comparing to null - - - - Change the special cases in bytecode generation for comparison to null - to use tempDestination(). - - * parser/Nodes.cpp: - (JSC::BinaryOpNode::emitBytecode): - (JSC::EqualNode::emitBytecode): - -2008-12-12 Gavin Barraclough - - Reviewed by Geoff Garen. - - Move slow-cases of JIT code generation over to the MacroAssembler interface. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::Label::Label): - (JSC::MacroAssembler::jae32): - (JSC::MacroAssembler::jg32): - (JSC::MacroAssembler::jzPtr): - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - (JSC::JIT::emitGetVariableObjectRegister): - (JSC::JIT::emitPutVariableObjectRegister): - * jit/JIT.h: - (JSC::SlowCaseEntry::SlowCaseEntry): - (JSC::JIT::getSlowCase): - (JSC::JIT::linkSlowCase): - * jit/JITArithmetic.cpp: - (JSC::JIT::compileBinaryArithOpSlowCase): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::emitJumpSlowCaseIfNotJSCell): - (JSC::JIT::linkSlowCaseIfNotJSCell): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdSlowCase): - -2008-12-12 Cameron Zwarich - - Reviewed by Sam Weinig. - - Bug 22828: Do not inspect bytecode instruction stream for op_get_by_id exception information - - - In order to remove the bytecode instruction stream after generating - native code, all inspection of bytecode instructions at runtime must - be removed. One particular instance of this is the special handling of - exceptions thrown by the op_get_by_id emitted directly before an - op_construct or an op_instanceof. This patch moves that information to - an auxiliary data structure in CodeBlock. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::addGetByIdExceptionInfo): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitConstruct): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitGetByIdExceptionInfo): - * parser/Nodes.cpp: - (JSC::InstanceOfNode::emitBytecode): - * runtime/ExceptionHelpers.cpp: - (JSC::createNotAnObjectError): - -2008-12-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Change exception information accessors to take offsets into the bytecode - instruction buffer instead of pointers so that they can work even even - if the bytecode buffer is purged. - - * bytecode/CodeBlock.cpp: - (JSC::instructionOffsetForNth): - (JSC::CodeBlock::handlerForBytecodeOffset): - (JSC::CodeBlock::lineNumberForBytecodeOffset): - (JSC::CodeBlock::expressionRangeForBytecodeOffset): - * bytecode/CodeBlock.h: - * bytecode/SamplingTool.cpp: - (JSC::SamplingTool::dump): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveLastCaller): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * runtime/ExceptionHelpers.cpp: - (JSC::createUndefinedVariableError): - (JSC::createInvalidParamError): - (JSC::createNotAConstructorError): - (JSC::createNotAFunctionError): - (JSC::createNotAnObjectError): - -2008-12-12 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Tiny bit of refactoring in quantifier generation. - - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateNonGreedyQuantifier): - (JSC::WREC::Generator::generateGreedyQuantifier): - -2008-12-11 Sam Weinig - - Reviewed by Geoffrey Garen. - - Remove dependancy on having the Instruction buffer in order to - deref Structures used for property access and global resolves. - Instead, we put references to the necessary Structures in auxiliary - data structures on the CodeBlock. This is not an ideal solution, - as we still pay for having the Structures in two places and we - would like to eventually just hold on to offsets into the machine - code buffer. - - - Also removes CodeBlock bloat in non-JIT by #ifdefing the JIT - only data structures. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * bytecode/CodeBlock.cpp: - (JSC::isGlobalResolve): - (JSC::isPropertyAccess): - (JSC::instructionOffsetForNth): - (JSC::printGlobalResolveInfo): - (JSC::printStructureStubInfo): - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::~CodeBlock): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::GlobalResolveInfo::GlobalResolveInfo): - (JSC::getNativePC): - (JSC::CodeBlock::instructions): - (JSC::CodeBlock::getStubInfo): - (JSC::CodeBlock::getBytecodeIndex): - (JSC::CodeBlock::addPropertyAccessInstruction): - (JSC::CodeBlock::addGlobalResolveInstruction): - (JSC::CodeBlock::numberOfStructureStubInfos): - (JSC::CodeBlock::addStructureStubInfo): - (JSC::CodeBlock::structureStubInfo): - (JSC::CodeBlock::addGlobalResolveInfo): - (JSC::CodeBlock::globalResolveInfo): - (JSC::CodeBlock::numberOfCallLinkInfos): - (JSC::CodeBlock::addCallLinkInfo): - (JSC::CodeBlock::callLinkInfo): - * bytecode/Instruction.h: - (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): - (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): - * bytecode/Opcode.h: - (JSC::): - * bytecode/StructureStubInfo.cpp: Copied from bytecode/CodeBlock.cpp. - (JSC::StructureStubInfo::deref): - * bytecode/StructureStubInfo.h: Copied from bytecode/CodeBlock.h. - (JSC::StructureStubInfo::StructureStubInfo): - (JSC::StructureStubInfo::initGetByIdSelf): - (JSC::StructureStubInfo::initGetByIdProto): - (JSC::StructureStubInfo::initGetByIdChain): - (JSC::StructureStubInfo::initGetByIdSelfList): - (JSC::StructureStubInfo::initGetByIdProtoList): - (JSC::StructureStubInfo::initPutByIdTransition): - (JSC::StructureStubInfo::initPutByIdReplace): - (JSC::StructureStubInfo::): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitResolve): - (JSC::BytecodeGenerator::emitGetById): - (JSC::BytecodeGenerator::emitPutById): - (JSC::BytecodeGenerator::emitCall): - (JSC::BytecodeGenerator::emitConstruct): - (JSC::BytecodeGenerator::emitCatch): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCTICachePutByID): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::Interpreter::cti_op_get_by_id_self_fail): - (JSC::getPolymorphicAccessStructureListSlot): - (JSC::Interpreter::cti_op_get_by_id_proto_list): - (JSC::Interpreter::cti_op_resolve_global): - * jit/JIT.cpp: - (JSC::JIT::JIT): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdSlowCase): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - -2008-12-11 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Remove CTI_ARGUMENTS mode, use va_start implementation on Windows, - unifying JIT callback (cti_*) argument access on OS X & Windows - - No performance impact. - - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::emitCTICall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - * wtf/Platform.h: - -2008-12-11 Holger Freyther - - Reviewed by Simon Hausmann. - - https://bugs.webkit.org/show_bug.cgi?id=20953 - - For Qt it is not pratical to have a FontCache and GlyphPageTreeNode - implementation. This is one of the reasons why the Qt port is currently not - using WebCore/platform/graphics/Font.cpp. By allowing to not use - the simple/fast-path the Qt port will be able to use it. - - Introduce USE(FONT_FAST_PATH) and define it for every port but the - Qt one. - - * wtf/Platform.h: Enable USE(FONT_FAST_PATH) - -2008-12-11 Gabor Loki - - Reviewed by Darin Adler and landed by Holger Freyther. - - - Fix threading on Qt-port and Gtk-port for Sampling tool. - - * wtf/ThreadingGtk.cpp: - (WTF::waitForThreadCompletion): - * wtf/ThreadingQt.cpp: - (WTF::waitForThreadCompletion): - -2008-12-10 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 22734: Debugger crashes when stepping into a function call in a return statement - - - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): The DebuggerCallFrame uses - the 'this' value stored in a callFrame, so op_convert_this should be - emitted at the beginning of a function body when generating bytecode - with debug hooks. - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::thisObject): The assertion inherent in the call - to asObject() here is valid, because any 'this' value should have been - converted to a JSObject*. - -2008-12-10 Gavin Barraclough - - Reviewed by Geoff Garen. - - Port more of the JIT to use the MacroAssembler interface. - - Everything in the main pass, bar a few corner cases (operations with required - registers, or calling convention code). Slightly refactors array creation, - moving the offset calculation into the callFrame into C code (reducing code - planted). - - Overall this appears to be a 1% win on v8-tests, due to the smaller immediates - being planted (in jfalse in particular). - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::cti_op_new_array): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateEnter): - -2008-12-10 Sam Weinig - - Fix non-JIT builds. - - * bytecode/CodeBlock.h: - -2008-12-10 Sam Weinig - - Reviewed by Geoffrey Garen. - - Remove the CTI return address table from CodeBlock - - Step 2: - - Convert the return address table from a HashMap to a sorted Vector. This - reduces the size of the data structure by ~4.5MB on Membuster head. - - SunSpider reports a 0.5% progression. - - * bytecode/CodeBlock.cpp: - (JSC::sizeInBytes): Generic method to get the cost of a Vector. - (JSC::CodeBlock::dumpStatistics): Add dumping of member sizes. - * bytecode/CodeBlock.h: - (JSC::PC::PC): Struct representing NativePC -> VirtualPC mappings. - (JSC::getNativePC): Helper for binary chop. - (JSC::CodeBlock::getBytecodeIndex): Used to get the VirtualPC from a - NativePC using a binary chop of the pcVector. - (JSC::CodeBlock::pcVector): Accessor. - - * interpreter/Interpreter.cpp: - (JSC::vPCForPC): Use getBytecodeIndex instead of jitReturnAddressVPCMap().get(). - (JSC::Interpreter::cti_op_instanceof): Ditto. - (JSC::Interpreter::cti_op_resolve): Ditto. - (JSC::Interpreter::cti_op_resolve_func): Ditto. - (JSC::Interpreter::cti_op_resolve_skip): Ditto. - (JSC::Interpreter::cti_op_resolve_with_base): Ditto. - (JSC::Interpreter::cti_op_throw): Ditto. - (JSC::Interpreter::cti_op_in): Ditto. - (JSC::Interpreter::cti_vm_throw): Ditto. - - * jit/JIT.cpp: - (JSC::JIT::privateCompile): Reserve exact capacity and fill the pcVector. - -2008-12-09 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Added WREC support for an assertion followed by a quantifier. Fixed - PCRE to match. - - * wrec/WRECParser.cpp: - (JSC::WREC::Parser::parseParentheses): Throw away the quantifier, since - it's meaningless. (Firefox does the same.) - - * pcre/pcre_compile.cpp: - (compileBranch): ditto. - -2008-12-09 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - In preparation for compiling WREC without PCRE: - - Further relaxed WREC's parsing to be more web-compatible. Fixed PCRE to - match in cases where it didn't already. - - Changed JavaScriptCore to report syntax errors detected by WREC, rather - than falling back on PCRE any time WREC sees an error. - - * pcre/pcre_compile.cpp: - (checkEscape): Relaxed parsing of \c and \N escapes to be more - web-compatible. - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): Only fall back on PCRE if WREC has not reported - a syntax error. - - * wrec/WREC.cpp: - (JSC::WREC::Generator::compileRegExp): Fixed some error reporting to - match PCRE. - - * wrec/WRECParser.cpp: Added error messages that match PCRE. - - (JSC::WREC::Parser::consumeGreedyQuantifier): - (JSC::WREC::Parser::parseParentheses): - (JSC::WREC::Parser::parseCharacterClass): - (JSC::WREC::Parser::parseNonCharacterEscape): Updated the above functions to - use the new setError API. - - (JSC::WREC::Parser::consumeEscape): Relaxed parsing of \c \N \u \x \B - to be more web-compatible. - - (JSC::WREC::Parser::parseAlternative): Distinguish between a malformed - quantifier and a quantifier with no prefix, like PCRE does. - - (JSC::WREC::Parser::consumeParenthesesType): Updated to use the new setError API. - - * wrec/WRECParser.h: - (JSC::WREC::Parser::error): - (JSC::WREC::Parser::syntaxError): - (JSC::WREC::Parser::parsePattern): - (JSC::WREC::Parser::reset): - (JSC::WREC::Parser::setError): Store error messages instead of error codes, - to provide for exception messages. Use a setter for reporting errors, so - errors detected early are not overwritten by errors detected later. - -2008-12-09 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Use va_args to access cti function arguments. - https://bugs.webkit.org/show_bug.cgi?id=22774 - - This may be a minor regression, but we'll take the hit if so to reduce fragility. - - * interpreter/Interpreter.cpp: - * interpreter/Interpreter.h: - -2008-12-09 Sam Weinig - - Reviewed twice by Cameron Zwarich. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=22752 - Clear SymbolTable after codegen for Function codeblocks that - don't require an activation - - This is a ~1.5MB improvement on Membuster-head. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dumpStatistics): Add logging of non-empty symbol tables - and total size used by symbol tables. - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): Clear the symbol table here. - -2008-12-09 Sam Weinig - - Reviewed by Geoffrey Garen. - - Remove unnecessary extra lookup when throwing an exception. - We used to first lookup the target offset using getHandlerForVPC - and then we would lookup the native code stub using - nativeExceptionCodeForHandlerVPC. Instead, we can just pass around - the HandlerInfo. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::handlerForVPC): Return the HandlerInfo. - * bytecode/CodeBlock.h: Remove nativeExceptionCodeForHandlerVPC. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): Return a HandlerInfo instead of - and Instruction offset. - (JSC::Interpreter::privateExecute): Get the offset from HandlerInfo. - (JSC::Interpreter::cti_op_throw): Get the native code from the HandleInfo. - (JSC::Interpreter::cti_vm_throw): Ditto. - * interpreter/Interpreter.h: - -2008-12-09 Eric Seidel - - Build fix only, no review. - - Speculative fix for the Chromium-Windows bot. - Add JavaScriptCore/os-win32 to the include path (for stdint.h) - Strangely it builds fine on my local windows box (or at least doesn't hit this error) - - * JavaScriptCore.scons: - -2008-12-09 Eric Seidel - - No review, build fix only. - - Add ExecutableAllocator files missing from Scons build. - - * JavaScriptCore.scons: - -2008-12-09 Dimitri Glazkov - - Reviewed by Timothy Hatcher. - - https://bugs.webkit.org/show_bug.cgi?id=22631 - Allow ScriptCallFrame query names of functions in the call stack. - - * JavaScriptCore.exp: added InternalFunction::name and - UString operator==() as exported symbol - -2008-12-08 Judit Jasz - - Reviewed and tweaked by Cameron Zwarich. - - Bug 22352: Annotate opcodes with their length - - - * bytecode/Opcode.cpp: - * bytecode/Opcode.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - -2008-12-08 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Implemented more of the relaxed and somewhat weird rules for deciding - how to interpret a non-pattern-character. - - * wrec/Escapes.h: - (JSC::WREC::Escape::): - (JSC::WREC::Escape::Escape): Eliminated Escape::None because it was - unused. If you see an '\\', it's either a valid escape or an error. - - * wrec/Quantifier.h: - (JSC::WREC::Quantifier::Quantifier): - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateNonGreedyQuantifier): - (JSC::WREC::Generator::generateGreedyQuantifier): Renamed "noMaxSpecified" - to "Infinity", since that's what it means. - - * wrec/WRECParser.cpp: - (JSC::WREC::Parser::consumeGreedyQuantifier): Re-wrote {n,m} parsing rules - because they were too strict before. Added support for backtracking - in the case where the {n,m} fails to parse as a quantifier, and yet is - not a syntax error. - - (JSC::WREC::Parser::parseCharacterClass): - (JSC::WREC::Parser::parseNonCharacterEscape): Eliminated Escape::None, - as above. - - (JSC::WREC::Parser::consumeEscape): Don't treat ASCII and _ escapes - as syntax errors. See fast/regex/non-pattern-characters.html. - - * wrec/WRECParser.h: - (JSC::WREC::Parser::SavedState::SavedState): - (JSC::WREC::Parser::SavedState::restore): Added a state backtracker, - since parsing {n,m} forms requires backtracking if the form turns out - not to be a quantifier. - -2008-12-08 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Refactored WREC parsing so that only one piece of code needs to know - the relaxed and somewhat weird rules for deciding how to interpret a - non-pattern-character, in preparation for implementing those rules. - - Also, implemented the relaxed and somewhat weird rules for '}' and ']'. - - * wrec/WREC.cpp: Reduced the regular expression size limit. Now that - WREC handles ']' properly, it compiles fast/js/regexp-charclass-crash.html, - which makes it hang at the old limit. (The old limit was based on the - misimpression that the same value in PCRE limited the regular expression - pattern size; in reality, it limited the expected compiled regular - expression size. WREC doesn't have a way to calculate an expected - compiled regular expression size, but this should be good enough.) - - * wrec/WRECParser.cpp: - (JSC::WREC::parsePatternCharacterSequence): Nixed this function because - it contained a second copy of the logic for handling non-pattern-characters, - which is about to get a lot more complicated. - - (JSC::WREC::PatternCharacterSequence::PatternCharacterSequence): - (JSC::WREC::PatternCharacterSequence::size): - (JSC::WREC::PatternCharacterSequence::append): - (JSC::WREC::PatternCharacterSequence::flush): Helper object for generating - an optimized sequence of pattern characters. - - (JSC::WREC::Parser::parseNonCharacterEscape): Renamed to reflect the fact - that the main parseAlternative loop handles character escapes. - - (JSC::WREC::Parser::parseAlternative): Moved pattern character sequence - logic from parsePatternCharacterSequence to here, using - PatternCharacterSequence to help with the details. - - * wrec/WRECParser.h: Updated for renames. - -2008-12-08 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - Give JSGlobalContextCreate a behavior that is concurrency aware, - and un-deprecate it - - * API/JSContextRef.cpp: (JSGlobalContextCreate): - * API/JSContextRef.h: - Use a unique context group for the context, unless the application was linked against old - JavaScriptCore. - -2008-12-08 Sam Weinig - - Reviewed by Cameron Zwarich. - - Fix for Remove the CTI return address table from CodeBlock - - Step 1: - - Remove use of jitReturnAddressVPCMap when looking for vPC to store Structures - in for cached lookup. Instead, use the offset in the StructureStubInfo that is - already required. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dumpStatistics): Fix extraneous semicolon. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCTICachePutByID): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::Interpreter::cti_op_get_by_id_self_fail): - (JSC::Interpreter::cti_op_get_by_id_proto_list): - * jit/JIT.h: - (JSC::JIT::compileGetByIdSelf): - (JSC::JIT::compileGetByIdProto): - (JSC::JIT::compileGetByIdChain): - (JSC::JIT::compilePutByIdReplace): - (JSC::JIT::compilePutByIdTransition): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): Remove extra call to getStubInfo. - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - -2008-12-08 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Port the op_j?n?eq_null JIT code generation to use the MacroAssembler, - and clean up slightly at the same time. The 'j' forms currently compare, - then set a register, then compare again, then branch. Branch directly on - the result of the first compare. - - Around a 1% progression on deltablue, crypto & early boyer, for about 1/2% - overall on v8-tests. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdSlowCase): - -2008-12-08 Gavin Barraclough - - Reviewed by Geoff Garen. - - Expand MacroAssembler to support more operations, required by the JIT. - - Generally adds more operations and permutations of operands to the existing - interface. Rename 'jset' to 'jnz' and 'jnset' to 'jz', which seem clearer, - and require that immediate pointer operands (though not pointer addresses to - load and store instructions) are wrapped in a ImmPtr() type, akin to Imm32(). - - No performance impact. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::): - (JSC::MacroAssembler::ImmPtr::ImmPtr): - (JSC::MacroAssembler::add32): - (JSC::MacroAssembler::and32): - (JSC::MacroAssembler::or32): - (JSC::MacroAssembler::sub32): - (JSC::MacroAssembler::xor32): - (JSC::MacroAssembler::loadPtr): - (JSC::MacroAssembler::load32): - (JSC::MacroAssembler::storePtr): - (JSC::MacroAssembler::store32): - (JSC::MacroAssembler::poke): - (JSC::MacroAssembler::move): - (JSC::MacroAssembler::testImm32): - (JSC::MacroAssembler::jae32): - (JSC::MacroAssembler::jb32): - (JSC::MacroAssembler::jePtr): - (JSC::MacroAssembler::je32): - (JSC::MacroAssembler::jnePtr): - (JSC::MacroAssembler::jne32): - (JSC::MacroAssembler::jnzPtr): - (JSC::MacroAssembler::jnz32): - (JSC::MacroAssembler::jzPtr): - (JSC::MacroAssembler::jz32): - (JSC::MacroAssembler::joSub32): - (JSC::MacroAssembler::jump): - (JSC::MacroAssembler::sete32): - (JSC::MacroAssembler::setne32): - (JSC::MacroAssembler::setnz32): - (JSC::MacroAssembler::setz32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::addl_mr): - (JSC::X86Assembler::andl_i8r): - (JSC::X86Assembler::cmpl_rm): - (JSC::X86Assembler::cmpl_mr): - (JSC::X86Assembler::cmpl_i8m): - (JSC::X86Assembler::subl_mr): - (JSC::X86Assembler::testl_i32m): - (JSC::X86Assembler::xorl_i32r): - (JSC::X86Assembler::movl_rm): - (JSC::X86Assembler::modRm_opmsib): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JITInlineMethods.h: - (JSC::JIT::emitGetVirtualRegister): - (JSC::JIT::emitPutCTIArgConstant): - (JSC::JIT::emitPutCTIParam): - (JSC::JIT::emitPutImmediateToCallFrameHeader): - (JSC::JIT::emitInitRegister): - (JSC::JIT::checkStructure): - (JSC::JIT::emitJumpIfJSCell): - (JSC::JIT::emitJumpIfNotJSCell): - (JSC::JIT::emitJumpSlowCaseIfNotImmNum): - -2008-12-08 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed a bug where WREC would allow a quantifier whose minimum was - greater than its maximum. - - * wrec/Quantifier.h: - (JSC::WREC::Quantifier::Quantifier): ASSERT that the quantifier is not - backwards. - - * wrec/WRECParser.cpp: - (JSC::WREC::Parser::consumeGreedyQuantifier): Verify that the minimum - is not greater than the maximum. - -2008-12-08 Eric Seidel - - Build fix only, no review. - - * JavaScriptCore.scons: add bytecode/JumpTable.cpp - -2008-12-08 Sam Weinig - - Reviewed by Geoffrey Garen. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=22716 - - Add RareData structure to CodeBlock for infrequently used auxiliary data - members. - - Reduces memory on Membuster-head by ~.5MB - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::dumpStatistics): - (JSC::CodeBlock::mark): - (JSC::CodeBlock::getHandlerForVPC): - (JSC::CodeBlock::nativeExceptionCodeForHandlerVPC): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::numberOfExceptionHandlers): - (JSC::CodeBlock::addExceptionHandler): - (JSC::CodeBlock::exceptionHandler): - (JSC::CodeBlock::addFunction): - (JSC::CodeBlock::function): - (JSC::CodeBlock::addUnexpectedConstant): - (JSC::CodeBlock::unexpectedConstant): - (JSC::CodeBlock::addRegExp): - (JSC::CodeBlock::regexp): - (JSC::CodeBlock::numberOfImmediateSwitchJumpTables): - (JSC::CodeBlock::addImmediateSwitchJumpTable): - (JSC::CodeBlock::immediateSwitchJumpTable): - (JSC::CodeBlock::numberOfCharacterSwitchJumpTables): - (JSC::CodeBlock::addCharacterSwitchJumpTable): - (JSC::CodeBlock::characterSwitchJumpTable): - (JSC::CodeBlock::numberOfStringSwitchJumpTables): - (JSC::CodeBlock::addStringSwitchJumpTable): - (JSC::CodeBlock::stringSwitchJumpTable): - (JSC::CodeBlock::evalCodeCache): - (JSC::CodeBlock::createRareDataIfNecessary): - -2008-11-26 Peter Kasting - - Reviewed by Anders Carlsson. - - https://bugs.webkit.org/show_bug.cgi?id=16814 - Allow ports to disable ActiveX->NPAPI conversion for Media Player. - Improve handling of miscellaneous ActiveX objects. - - * wtf/Platform.h: Add another ENABLE(...). - -2008-12-08 Sam Weinig - - Reviewed by Mark Rowe. - - Add dumping of CodeBlock member structure usage. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dumpStatistics): - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::isEmpty): - -2008-12-08 David Kilzer - - Bug 22555: Sort "children" sections in Xcode project files - - - - Reviewed by Eric Seidel. - - * JavaScriptCore.xcodeproj/project.pbxproj: Sorted. - -2008-12-08 Tony Chang - - Reviewed by Eric Seidel. - - Enable Pan scrolling only when building on PLATFORM(WIN_OS) - Previously platforms like Apple Windows WebKit, Cairo Windows WebKit, - Wx and Chromium were enabling it explicitly, now we just turn it on - for all WIN_OS, later platforms can turn it off as needed on Windows - (or turn it on under Linux, etc.) - https://bugs.webkit.org/show_bug.cgi?id=22698 - - * wtf/Platform.h: - -2008-12-08 Sam Weinig - - Reviewed by Cameron Zwarich. - - Add basic memory statistics dumping for CodeBlock. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dumpStatistics): - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::~CodeBlock): - * bytecode/CodeBlock.h: - -2008-12-08 Simon Hausmann - - Fix the Linux build with newer gcc/glibc. - - * jit/ExecutableAllocatorPosix.cpp: Include unistd.h for - getpagesize(), according to - http://opengroup.org/onlinepubs/007908775/xsh/getpagesize.html - -2008-12-08 Simon Hausmann - - Fix the build with Qt on Windows. - - * JavaScriptCore.pri: Compile ExecutableAllocatorWin.cpp on Windows. - -2008-12-07 Oliver Hunt - - Reviewed by NOBODY (Buildfix). - - Fix non-WREC builds - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - -2008-12-07 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Put ENABLE(ASSEMBLER) guards around use of ExecutableAllocator in global data - - Correct Qt and Gtk project files - - * GNUmakefile.am: - * JavaScriptCore.pri: - * runtime/JSGlobalData.h: - -2008-12-07 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Add new files to other projects. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.pro: - -2008-12-07 Oliver Hunt - - Rubber stamped by Mark Rowe. - - Rename ExecutableAllocatorMMAP to the more sensible ExecutableAllocatorPosix - - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/ExecutableAllocator.h: - * jit/ExecutableAllocatorPosix.cpp: Renamed from JavaScriptCore/jit/ExecutableAllocatorMMAP.cpp. - (JSC::ExecutableAllocator::intializePageSize): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - -2008-12-07 Oliver Hunt - - Reviewed by Cameron Zwarich and Sam Weinig - - Need more granular control over allocation of executable memory (21783) - - - Add a new allocator for use by the JIT that provides executable pages, so - we can get rid of the current hack that makes the entire heap executable. - - 1-2% progression on SunSpider-v8, 1% on SunSpider. Reduces memory usage as well! - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/AssemblerBuffer.h: - (JSC::AssemblerBuffer::size): - (JSC::AssemblerBuffer::executableCopy): - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::size): - (JSC::MacroAssembler::copyCode): - * assembler/X86Assembler.h: - (JSC::X86Assembler::size): - (JSC::X86Assembler::executableCopy): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::executablePool): - (JSC::CodeBlock::setExecutablePool): - * bytecode/Instruction.h: - (JSC::PolymorphicAccessStructureList::derefStructures): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::~Interpreter): - * interpreter/Interpreter.h: - * jit/ExecutableAllocator.cpp: Added. - * jit/ExecutableAllocator.h: Added. - (JSC::ExecutablePool::create): - (JSC::ExecutablePool::alloc): - (JSC::ExecutablePool::~ExecutablePool): - (JSC::ExecutablePool::available): - (JSC::ExecutablePool::ExecutablePool): - (JSC::ExecutablePool::poolAllocate): - (JSC::ExecutableAllocator::ExecutableAllocator): - (JSC::ExecutableAllocator::poolForSize): - (JSC::ExecutablePool::sizeForAllocation): - * jit/ExecutableAllocatorMMAP.cpp: Added. - (JSC::ExecutableAllocator::intializePageSize): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - * jit/ExecutableAllocatorWin.cpp: Added. - (JSC::ExecutableAllocator::intializePageSize): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - (JSC::JIT::compileCTIMachineTrampolines): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - * parser/Nodes.cpp: - (JSC::RegExpNode::emitBytecode): - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::poolForSize): - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::create): - (JSC::RegExp::~RegExp): - * runtime/RegExp.h: - * runtime/RegExpConstructor.cpp: - (JSC::constructRegExp): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncCompile): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - * wrec/WREC.cpp: - (JSC::WREC::Generator::compileRegExp): - * wrec/WRECGenerator.h: - * wtf/FastMalloc.cpp: - * wtf/FastMalloc.h: - * wtf/TCSystemAlloc.cpp: - (TryMmap): - (TryVirtualAlloc): - (TryDevMem): - (TCMalloc_SystemRelease): - -2008-12-06 Sam Weinig - - Fix the Gtk build. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - -2008-12-06 Sam Weinig - - Reviewed by Cameron Zwarich, - - Move CodeBlock constructor into the .cpp file. - - Sunspider reports a .7% progression, but I can only assume this - is noise. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - * bytecode/CodeBlock.h: - -2008-12-06 Sam Weinig - - Reviewed by Cameron Zwarich. - - Split JumpTable code into its own file. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * bytecode/CodeBlock.cpp: - * bytecode/CodeBlock.h: - * bytecode/JumpTable.cpp: Copied from bytecode/CodeBlock.cpp. - * bytecode/JumpTable.h: Copied from bytecode/CodeBlock.h. - -2008-12-05 Sam Weinig - - Reviewed by Cameron Zwarich. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=22715 - Encapsulate more CodeBlock members in preparation - of moving some of them to a rare data structure. - - * bytecode/CodeBlock.cpp: - (JSC::locationForOffset): - (JSC::printConditionalJump): - (JSC::printGetByIdOp): - (JSC::printPutByIdOp): - (JSC::CodeBlock::printStructure): - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::~CodeBlock): - (JSC::CodeBlock::unlinkCallers): - (JSC::CodeBlock::derefStructures): - (JSC::CodeBlock::refStructures): - (JSC::CodeBlock::mark): - (JSC::CodeBlock::getHandlerForVPC): - (JSC::CodeBlock::nativeExceptionCodeForHandlerVPC): - (JSC::CodeBlock::lineNumberForVPC): - (JSC::CodeBlock::expressionRangeForVPC): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::addCaller): - (JSC::CodeBlock::removeCaller): - (JSC::CodeBlock::isKnownNotImmediate): - (JSC::CodeBlock::isConstantRegisterIndex): - (JSC::CodeBlock::getConstant): - (JSC::CodeBlock::isTemporaryRegisterIndex): - (JSC::CodeBlock::getStubInfo): - (JSC::CodeBlock::getCallLinkInfo): - (JSC::CodeBlock::instructions): - (JSC::CodeBlock::setJITCode): - (JSC::CodeBlock::jitCode): - (JSC::CodeBlock::ownerNode): - (JSC::CodeBlock::setGlobalData): - (JSC::CodeBlock::setThisRegister): - (JSC::CodeBlock::thisRegister): - (JSC::CodeBlock::setNeedsFullScopeChain): - (JSC::CodeBlock::needsFullScopeChain): - (JSC::CodeBlock::setUsesEval): - (JSC::CodeBlock::usesEval): - (JSC::CodeBlock::setUsesArguments): - (JSC::CodeBlock::usesArguments): - (JSC::CodeBlock::codeType): - (JSC::CodeBlock::source): - (JSC::CodeBlock::sourceOffset): - (JSC::CodeBlock::addGlobalResolveInstruction): - (JSC::CodeBlock::numberOfPropertyAccessInstructions): - (JSC::CodeBlock::addPropertyAccessInstruction): - (JSC::CodeBlock::propertyAccessInstruction): - (JSC::CodeBlock::numberOfCallLinkInfos): - (JSC::CodeBlock::addCallLinkInfo): - (JSC::CodeBlock::callLinkInfo): - (JSC::CodeBlock::numberOfJumpTargets): - (JSC::CodeBlock::addJumpTarget): - (JSC::CodeBlock::jumpTarget): - (JSC::CodeBlock::lastJumpTarget): - (JSC::CodeBlock::numberOfExceptionHandlers): - (JSC::CodeBlock::addExceptionHandler): - (JSC::CodeBlock::exceptionHandler): - (JSC::CodeBlock::addExpressionInfo): - (JSC::CodeBlock::numberOfLineInfos): - (JSC::CodeBlock::addLineInfo): - (JSC::CodeBlock::lastLineInfo): - (JSC::CodeBlock::jitReturnAddressVPCMap): - (JSC::CodeBlock::numberOfIdentifiers): - (JSC::CodeBlock::addIdentifier): - (JSC::CodeBlock::identifier): - (JSC::CodeBlock::numberOfConstantRegisters): - (JSC::CodeBlock::addConstantRegister): - (JSC::CodeBlock::constantRegister): - (JSC::CodeBlock::addFunction): - (JSC::CodeBlock::function): - (JSC::CodeBlock::addFunctionExpression): - (JSC::CodeBlock::functionExpression): - (JSC::CodeBlock::addUnexpectedConstant): - (JSC::CodeBlock::unexpectedConstant): - (JSC::CodeBlock::addRegExp): - (JSC::CodeBlock::regexp): - (JSC::CodeBlock::symbolTable): - (JSC::CodeBlock::evalCodeCache): - New inline setters/getters. - - (JSC::ProgramCodeBlock::ProgramCodeBlock): - (JSC::ProgramCodeBlock::~ProgramCodeBlock): - (JSC::ProgramCodeBlock::clearGlobalObject): - * bytecode/SamplingTool.cpp: - (JSC::ScopeSampleRecord::sample): - (JSC::SamplingTool::dump): - * bytecompiler/BytecodeGenerator.cpp: - * bytecompiler/BytecodeGenerator.h: - * bytecompiler/Label.h: - * interpreter/CallFrame.cpp: - * interpreter/Interpreter.cpp: - * jit/JIT.cpp: - * jit/JITCall.cpp: - * jit/JITInlineMethods.h: - * jit/JITPropertyAccess.cpp: - * parser/Nodes.cpp: - * runtime/Arguments.h: - * runtime/ExceptionHelpers.cpp: - * runtime/JSActivation.cpp: - * runtime/JSActivation.h: - * runtime/JSGlobalObject.cpp: - Change direct access to use new getter/setters. - -2008-12-05 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Prevent GCC4.2 from hanging when trying to compile Interpreter.cpp. - Added "-fno-var-tracking" compiler flag. - - https://bugs.webkit.org/show_bug.cgi?id=22704 - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-12-05 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Ordering of branch operands in MacroAssembler in unnecessarily inconsistent. - - je, jg etc take an immediate operand as the second argument, but for the - equality branches (je, jne) the immediate operand was the first argument. This - was unnecessarily inconsistent. Change je, jne methods to take the immediate - as the second argument. - - https://bugs.webkit.org/show_bug.cgi?id=22703 - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::je32): - (JSC::MacroAssembler::jne32): - * jit/JIT.cpp: - (JSC::JIT::compileOpStrictEq): - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateEnter): - (JSC::WREC::Generator::generateNonGreedyQuantifier): - (JSC::WREC::Generator::generateGreedyQuantifier): - (JSC::WREC::Generator::generatePatternCharacterPair): - (JSC::WREC::Generator::generatePatternCharacter): - (JSC::WREC::Generator::generateCharacterClassInvertedRange): - (JSC::WREC::Generator::generateCharacterClassInverted): - (JSC::WREC::Generator::generateAssertionBOL): - (JSC::WREC::Generator::generateAssertionWordBoundary): - -2008-12-05 Gavin Barraclough - - Reviewed by Geoff Garen. - - Second tranche of porting JIT.cpp to MacroAssembler interface. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::mul32): - (JSC::MacroAssembler::jl32): - (JSC::MacroAssembler::jnzSub32): - (JSC::MacroAssembler::joAdd32): - (JSC::MacroAssembler::joMul32): - (JSC::MacroAssembler::jzSub32): - * jit/JIT.cpp: - (JSC::JIT::emitSlowScriptCheck): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::emitJumpIfNotJSCell): - (JSC::JIT::emitJumpSlowCaseIfNotJSCell): - -2008-12-05 David Kilzer - - Bug 22609: Provide a build-time choice when generating hash tables for properties of built-in DOM objects - - - - - Reviewed by Darin Adler. - - Initial patch by Yosen Lin. Adapted for ToT WebKit by David Kilzer. - - Added back the code that generates a "compact" hash (instead of a - perfect hash) as a build-time option using the - ENABLE(PERFECT_HASH_SIZE) macro as defined in Lookup.h. - - * create_hash_table: Rename variables to differentiate perfect hash - values from compact hash values. Added back code to compute compact - hash tables. Generate both hash table sizes and emit - conditionalized code based on ENABLE(PERFECT_HASH_SIZE). - * runtime/Lookup.cpp: - (JSC::HashTable::createTable): Added version of createTable() for - use with compact hash tables. - (JSC::HashTable::deleteTable): Updated to work with compact hash - tables. - * runtime/Lookup.h: Defined ENABLE(PERFECT_HASH_SIZE) macro here. - (JSC::HashEntry::initialize): Set m_next to zero when using compact - hash tables. - (JSC::HashEntry::setNext): Added for compact hash tables. - (JSC::HashEntry::next): Added for compact hash tables. - (JSC::HashTable::entry): Added version of entry() for use with - compact hash tables. - * runtime/Structure.cpp: - (JSC::Structure::getEnumerablePropertyNames): Updated to work with - compact hash tables. - -2008-12-05 Gavin Barraclough - - Reviewed by Geoff Garen. - - Remove redundant calls to JIT::emitSlowScriptCheck. - This is checked in the hot path, so is not needed on the slow path - and the code - was being planted before the start of the slow case, so was completely unreachable! - - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - -2008-12-05 Gavin Barraclough - - Reviewed by Geoff Garen. - - Move JIT::compileOpStrictEq to MacroAssembler interface. - - The rewrite also looks like a small (<1%) performance progression. - - https://bugs.webkit.org/show_bug.cgi?id=22697 - - * jit/JIT.cpp: - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::emitJumpIfJSCell): - (JSC::JIT::emitJumpSlowCaseIfJSCell): - -2008-12-05 Gavin Barraclough - - Reviewed by Geoff Garen. - - Remove m_assembler from MacroAssembler::Jump. - Keeping a pointer allowed for some syntactic sugar - "link()" looks nicer - than "link(this)". But maintaining this doubles the size of Jump, which - is even more unfortunate for the JIT, since there are many large structures - holding JmpSrcs. Probably best to remove it. - - https://bugs.webkit.org/show_bug.cgi?id=22693 - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::Jump::Jump): - (JSC::MacroAssembler::Jump::link): - (JSC::MacroAssembler::Jump::linkTo): - (JSC::MacroAssembler::JumpList::link): - (JSC::MacroAssembler::JumpList::linkTo): - (JSC::MacroAssembler::jae32): - (JSC::MacroAssembler::je32): - (JSC::MacroAssembler::je16): - (JSC::MacroAssembler::jg32): - (JSC::MacroAssembler::jge32): - (JSC::MacroAssembler::jl32): - (JSC::MacroAssembler::jle32): - (JSC::MacroAssembler::jnePtr): - (JSC::MacroAssembler::jne32): - (JSC::MacroAssembler::jnset32): - (JSC::MacroAssembler::jset32): - (JSC::MacroAssembler::jump): - (JSC::MacroAssembler::jzSub32): - (JSC::MacroAssembler::joAdd32): - (JSC::MacroAssembler::call): - * wrec/WREC.cpp: - (JSC::WREC::Generator::compileRegExp): - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateEnter): - (JSC::WREC::Generator::generateBackreferenceQuantifier): - (JSC::WREC::Generator::generateNonGreedyQuantifier): - (JSC::WREC::Generator::generateGreedyQuantifier): - (JSC::WREC::Generator::generatePatternCharacter): - (JSC::WREC::Generator::generateCharacterClassInvertedRange): - (JSC::WREC::Generator::generateCharacterClassInverted): - (JSC::WREC::Generator::generateCharacterClass): - (JSC::WREC::Generator::generateParenthesesAssertion): - (JSC::WREC::Generator::generateParenthesesInvertedAssertion): - (JSC::WREC::Generator::generateParenthesesNonGreedy): - (JSC::WREC::Generator::generateParenthesesResetTrampoline): - (JSC::WREC::Generator::generateAssertionBOL): - (JSC::WREC::Generator::generateAssertionEOL): - (JSC::WREC::Generator::generateAssertionWordBoundary): - (JSC::WREC::Generator::generateBackreference): - (JSC::WREC::Generator::terminateAlternative): - (JSC::WREC::Generator::terminateDisjunction): - * wrec/WRECParser.h: - -2008-12-05 Gavin Barraclough - - Reviewed by Geoffrey Garen. - - Simplify JIT generated checks for timeout code, by moving more work into the C function. - https://bugs.webkit.org/show_bug.cgi?id=22688 - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::cti_timeout_check): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::emitSlowScriptCheck): - -2008-12-05 Sam Weinig - - Reviewed by Geoffrey Garen. - - Encapsulate access to jump tables in the CodeBlock in preparation - of moving them to a rare data structure. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::numberOfImmediateSwitchJumpTables): - (JSC::CodeBlock::addImmediateSwitchJumpTable): - (JSC::CodeBlock::immediateSwitchJumpTable): - (JSC::CodeBlock::numberOfCharacterSwitchJumpTables): - (JSC::CodeBlock::addCharacterSwitchJumpTable): - (JSC::CodeBlock::characterSwitchJumpTable): - (JSC::CodeBlock::numberOfStringSwitchJumpTables): - (JSC::CodeBlock::addStringSwitchJumpTable): - (JSC::CodeBlock::stringSwitchJumpTable): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): - (JSC::BytecodeGenerator::endSwitch): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::cti_op_switch_imm): - (JSC::Interpreter::cti_op_switch_char): - (JSC::Interpreter::cti_op_switch_string): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - -2008-12-05 Adam Roben - - Windows build fix after r39020 - - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReference): - (JSC::JIT::restoreArgumentReferenceForTrampoline): - Add some apparently-missing __. - -2008-12-04 Geoffrey Garen - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=22673 - - Added support for the assertion (?=) and inverted assertion (?!) atoms - in WREC. - - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateParenthesesAssertion): - (JSC::WREC::Generator::generateParenthesesInvertedAssertion): Split the - old (unused) generateParentheses into these two functions, with more - limited capabilities. - - * wrec/WRECGenerator.h: - (JSC::WREC::Generator::): Moved an enum to the top of the class definition, - to match the WebKit style, and removed a defunct comment. - - * wrec/WRECParser.cpp: - (JSC::WREC::Parser::parseParentheses): - (JSC::WREC::Parser::consumeParenthesesType): - * wrec/WRECParser.h: - (JSC::WREC::Parser::): Added support for parsing (?=) and (?!). - -2008-12-05 Simon Hausmann - - Rubber-stamped by Tor Arne Vestbø. - - Disable the JIT for the Qt build alltogether again, after observing - more miscompilations in a wider range of newer gcc versions. - - * JavaScriptCore.pri: - -2008-12-05 Simon Hausmann - - Reviewed by Tor Arne Vestbø. - - Disable the JIT for the Qt build on Linux unless gcc is >= 4.2, - due to miscompilations. - - * JavaScriptCore.pri: - -2008-12-04 Gavin Barraclough - - Reviewed by Geoff Garen. - - Start porting the JIT to use the MacroAssembler. - - https://bugs.webkit.org/show_bug.cgi?id=22671 - No change in performance. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::Jump::operator X86Assembler::JmpSrc): - (JSC::MacroAssembler::add32): - (JSC::MacroAssembler::and32): - (JSC::MacroAssembler::lshift32): - (JSC::MacroAssembler::rshift32): - (JSC::MacroAssembler::storePtr): - (JSC::MacroAssembler::store32): - (JSC::MacroAssembler::poke): - (JSC::MacroAssembler::move): - (JSC::MacroAssembler::compareImm32ForBranchEquality): - (JSC::MacroAssembler::jnePtr): - (JSC::MacroAssembler::jnset32): - (JSC::MacroAssembler::jset32): - (JSC::MacroAssembler::jzeroSub32): - (JSC::MacroAssembler::joverAdd32): - (JSC::MacroAssembler::call): - * assembler/X86Assembler.h: - (JSC::X86Assembler::shll_i8r): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileBinaryArithOp): - * jit/JITInlineMethods.h: - (JSC::JIT::emitGetVirtualRegister): - (JSC::JIT::emitPutCTIArg): - (JSC::JIT::emitPutCTIArgConstant): - (JSC::JIT::emitGetCTIArg): - (JSC::JIT::emitPutCTIArgFromVirtualRegister): - (JSC::JIT::emitPutCTIParam): - (JSC::JIT::emitGetCTIParam): - (JSC::JIT::emitPutToCallFrameHeader): - (JSC::JIT::emitPutImmediateToCallFrameHeader): - (JSC::JIT::emitGetFromCallFrameHeader): - (JSC::JIT::emitPutVirtualRegister): - (JSC::JIT::emitInitRegister): - (JSC::JIT::emitNakedCall): - (JSC::JIT::restoreArgumentReference): - (JSC::JIT::restoreArgumentReferenceForTrampoline): - (JSC::JIT::emitCTICall): - (JSC::JIT::checkStructure): - (JSC::JIT::emitJumpSlowCaseIfNotJSCell): - (JSC::JIT::emitJumpSlowCaseIfNotImmNum): - (JSC::JIT::emitJumpSlowCaseIfNotImmNums): - (JSC::JIT::emitFastArithDeTagImmediate): - (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero): - (JSC::JIT::emitFastArithReTagImmediate): - (JSC::JIT::emitFastArithPotentiallyReTagImmediate): - (JSC::JIT::emitFastArithImmToInt): - (JSC::JIT::emitFastArithIntToImmOrSlowCase): - (JSC::JIT::emitFastArithIntToImmNoCheck): - (JSC::JIT::emitTagAsBoolImmediate): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - -2008-12-04 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Some refactoring for generateGreedyQuantifier. - - SunSpider reports no change (possibly a 0.3% speedup). - - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateGreedyQuantifier): Clarified label - meanings and unified some logic to simplify things. - - * wrec/WRECParser.h: - (JSC::WREC::Parser::parseAlternative): Added a version of parseAlternative - that can jump to a Label, instead of a JumpList, upon failure. (Eventually, - when we have a true Label class, this will be redundant.) This makes - things easier for generateGreedyQuantifier, because it can avoid - explicitly linking things. - -2008-12-04 Simon Hausmann - - Reviewed by Holger Freyther. - - Fix crashes in the Qt build on Linux/i386 with non-executable memory - by enabling TCSystemAlloc and the PROT_EXEC flag for mmap. - - * JavaScriptCore.pri: Enable the use of TCSystemAlloc if the JIT is - enabled. - * wtf/TCSystemAlloc.cpp: Extend the PROT_EXEC permissions to - PLATFORM(QT). - -2008-12-04 Simon Hausmann - - Reviewed by Tor Arne Vestbø. - - Enable ENABLE_JIT_OPTIMIZE_CALL, ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS - and ENABLE_JIT_OPTIMIZE_ARITHMETIC, as suggested by Niko. - - * JavaScriptCore.pri: - -2008-12-04 Kent Hansen - - Reviewed by Simon Hausmann. - - Enable the JSC jit for the Qt build by default for release builds on - linux-g++ and win32-msvc. - - * JavaScriptCore.pri: - -2008-12-04 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Allow JIT to function without property access repatching and arithmetic optimizations. - Controlled by ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS and ENABLE_JIT_OPTIMIZE_ARITHMETIC switches. - - https://bugs.webkit.org/show_bug.cgi?id=22643 - - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: Copied from jit/JIT.cpp. - (JSC::JIT::compileBinaryArithOp): - (JSC::JIT::compileBinaryArithOpSlowCase): - * jit/JITPropertyAccess.cpp: Copied from jit/JIT.cpp. - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutByIdHotPath): - (JSC::JIT::compilePutByIdSlowCase): - (JSC::resizePropertyStorage): - (JSC::transitionWillNeedStorageRealloc): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - * wtf/Platform.h: - -2008-12-03 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Optimized sequences of characters in regular expressions by comparing - two characters at a time. - - 1-2% speedup on SunSpider, 19-25% speedup on regexp-dna. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::load32): - (JSC::MacroAssembler::jge32): Filled out a few more macro methods. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::movl_mr): Added a verion of movl_mr that operates - without an offset, to allow the macro assembler to optmize for that case. - - * wrec/WREC.cpp: - (JSC::WREC::Generator::compileRegExp): Test the saved value of index - instead of the index register when checking for "end of input." The - index register doesn't increment by 1 in an orderly fashion, so testing - it for == "end of input" is not valid. - - Also, jump all the way to "return failure" upon reaching "end of input," - instead of executing the next alternative. This is more logical, and - it's a slight optimization in the case of an expression with many alternatives. - - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateIncrementIndex): Added support for - jumping to a failure label in the case where the index has reached "end - of input." - - (JSC::WREC::Generator::generatePatternCharacterSequence): - (JSC::WREC::Generator::generatePatternCharacterPair): This is the - optmization. It's basically like generatePatternCharacter, but it runs two - characters at a time. - - (JSC::WREC::Generator::generatePatternCharacter): Changed to use isASCII, - since it's clearer than comparing to a magic hex value. - - * wrec/WRECGenerator.h: - -2008-12-03 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Allow JIT to operate without the call-repatching optimization. - Controlled by ENABLE(JIT_OPTIMIZE_CALL), defaults on, disabling - this leads to significant performance regression. - - https://bugs.webkit.org/show_bug.cgi?id=22639 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITCall.cpp: Copied from jit/JIT.cpp. - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpCallEvalSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - (JSC::unreachable): - * jit/JITInlineMethods.h: Copied from jit/JIT.cpp. - (JSC::JIT::checkStructure): - (JSC::JIT::emitFastArithPotentiallyReTagImmediate): - (JSC::JIT::emitTagAsBoolImmediate): - * wtf/Platform.h: - -2008-12-03 Eric Seidel - - Rubber-stamped by David Hyatt. - - Make HAVE_ACCESSIBILITY only define if !defined - - * wtf/Platform.h: - -2008-12-03 Sam Weinig - - Fix build. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::orl_i32r): - -2008-12-03 Sam Weinig - - Reviewed by Geoffrey Garen. - - Remove shared AssemblerBuffer 1MB buffer and instead give AssemblerBuffer - an 256 byte inline capacity. - - 1% progression on Sunspider. - - * assembler/AssemblerBuffer.h: - (JSC::AssemblerBuffer::AssemblerBuffer): - (JSC::AssemblerBuffer::~AssemblerBuffer): - (JSC::AssemblerBuffer::grow): - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::MacroAssembler): - * assembler/X86Assembler.h: - (JSC::X86Assembler::X86Assembler): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::Interpreter): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::JIT): - * parser/Nodes.cpp: - (JSC::RegExpNode::emitBytecode): - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::create): - * runtime/RegExp.h: - * runtime/RegExpConstructor.cpp: - (JSC::constructRegExp): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncCompile): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - * wrec/WREC.cpp: - (JSC::WREC::Generator::compileRegExp): - * wrec/WRECGenerator.h: - (JSC::WREC::Generator::Generator): - * wrec/WRECParser.h: - (JSC::WREC::Parser::Parser): - -2008-12-03 Geoffrey Garen - - Reviewed by Oliver Hunt, with help from Gavin Barraclough. - - orl_i32r was actually coded as an 8bit OR. So, I renamed orl_i32r to - orl_i8r, changed all orl_i32r clients to use orl_i8r, and then added - a new orl_i32r that actually does a 32bit OR. - - (32bit OR is currently unused, but a patch I'm working on uses it.) - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::or32): Updated to choose between 8bit and 32bit OR. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::orl_i8r): The old orl_i32r. - (JSC::X86Assembler::orl_i32r): The new orl_i32r. - - * jit/JIT.cpp: - (JSC::JIT::emitFastArithPotentiallyReTagImmediate): - (JSC::JIT::emitTagAsBoolImmediate): Use orl_i8r, since we're ORing 8bit - values. - -2008-12-03 Dean Jackson - - Reviewed by Dan Bernstein. - - Helper functions for turn -> degrees. - https://bugs.webkit.org/show_bug.cgi?id=22497 - - * wtf/MathExtras.h: - (turn2deg): - (deg2turn): - -2008-12-02 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 22504: Crashes during code generation occur due to refing of ignoredResult() - - - Since ignoredResult() was implemented by casting 1 to a RegisterID*, any - attempt to ref ignoredResult() results in a crash. This will occur in - code generation of a function body where a node emits another node with - the dst that was passed to it, and then refs the returned RegisterID*. - - To fix this problem, make ignoredResult() a member function of - BytecodeGenerator that simply returns a pointe to a fixed RegisterID - member of BytecodeGenerator. - - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::ignoredResult): - * bytecompiler/RegisterID.h: - * parser/Nodes.cpp: - (JSC::NullNode::emitBytecode): - (JSC::BooleanNode::emitBytecode): - (JSC::NumberNode::emitBytecode): - (JSC::StringNode::emitBytecode): - (JSC::RegExpNode::emitBytecode): - (JSC::ThisNode::emitBytecode): - (JSC::ResolveNode::emitBytecode): - (JSC::ObjectLiteralNode::emitBytecode): - (JSC::PostfixResolveNode::emitBytecode): - (JSC::PostfixBracketNode::emitBytecode): - (JSC::PostfixDotNode::emitBytecode): - (JSC::DeleteValueNode::emitBytecode): - (JSC::VoidNode::emitBytecode): - (JSC::TypeOfResolveNode::emitBytecode): - (JSC::TypeOfValueNode::emitBytecode): - (JSC::PrefixResolveNode::emitBytecode): - (JSC::AssignResolveNode::emitBytecode): - (JSC::CommaNode::emitBytecode): - (JSC::ForNode::emitBytecode): - (JSC::ForInNode::emitBytecode): - (JSC::ReturnNode::emitBytecode): - (JSC::ThrowNode::emitBytecode): - (JSC::FunctionBodyNode::emitBytecode): - (JSC::FuncDeclNode::emitBytecode): - -2008-12-02 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=22537 - REGRESSION (r38745): Assertion failure in jsSubstring() at ge.com - - The bug was that index would become greater than length, so our - "end of input" checks, which all check "index == length", would fail. - - The solution is to check for end of input before incrementing index, - to ensure that index is always <= length. - - As a side benefit, generateJumpIfEndOfInput can now use je instead of - jg, which should be slightly faster. - - * wrec/WREC.cpp: - (JSC::WREC::Generator::compileRegExp): - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateJumpIfEndOfInput): - -2008-12-02 Gavin Barraclough - - Reviewed by Geoffrey Garen. - - Plant shift right immediate instructions, which are awesome. - https://bugs.webkit.org/show_bug.cgi?id=22610 - ~5% on the v8-crypto test. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - -2008-12-02 Geoffrey Garen - - Reviewed by Sam Weinig. - - Cleaned up SegmentedVector by abstracting segment access into helper - functions. - - SunSpider reports no change. - - * bytecompiler/SegmentedVector.h: - (JSC::SegmentedVector::SegmentedVector): - (JSC::SegmentedVector::~SegmentedVector): - (JSC::SegmentedVector::size): - (JSC::SegmentedVector::at): - (JSC::SegmentedVector::operator[]): - (JSC::SegmentedVector::last): - (JSC::SegmentedVector::append): - (JSC::SegmentedVector::removeLast): - (JSC::SegmentedVector::grow): - (JSC::SegmentedVector::clear): - (JSC::SegmentedVector::deleteAllSegments): - (JSC::SegmentedVector::segmentFor): - (JSC::SegmentedVector::subscriptFor): - (JSC::SegmentedVector::ensureSegmentsFor): - (JSC::SegmentedVector::ensureSegment): - -2008-12-02 Geoffrey Garen - - Reviewed by Geoffrey Garen. (Patch by Cameron Zwarich .) - - Fixed https://bugs.webkit.org/show_bug.cgi?id=22482 - REGRESSION (r37991): Occasionally see "Scene rendered incorrectly" - message when running the V8 Raytrace benchmark - - Rolled out r37991. It didn't properly save xmm0, which is caller-save, - before calling helper functions. - - SunSpider and v8 benchmarks show little change -- possibly a .2% - SunSpider regression, possibly a .2% v8 benchmark speedup. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Instruction.h: - (JSC::Instruction::): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitUnaryOp): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitToJSNumber): - (JSC::BytecodeGenerator::emitTypeOf): - (JSC::BytecodeGenerator::emitGetPropertyNames): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * parser/Nodes.cpp: - (JSC::UnaryOpNode::emitBytecode): - (JSC::BinaryOpNode::emitBytecode): - (JSC::EqualNode::emitBytecode): - * parser/ResultType.h: - (JSC::ResultType::isReusable): - (JSC::ResultType::mightBeNumber): - * runtime/JSNumberCell.h: - -2008-12-01 Gavin Barraclough - - Reviewed by Geoffrey Garen. - - Remove unused (sampling only, and derivable) argument to JIT::emitCTICall. - https://bugs.webkit.org/show_bug.cgi?id=22587 - - * jit/JIT.cpp: - (JSC::JIT::emitCTICall): - (JSC::JIT::compileOpCall): - (JSC::JIT::emitSlowScriptCheck): - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - * jit/JIT.h: - -2008-12-02 Dimitri Glazkov - - Reviewed by Eric Seidel. - - Fix the inheritance chain for JSFunction. - - * runtime/JSFunction.cpp: - (JSC::JSFunction::info): Add InternalFunction::info as parent class - -2008-12-02 Simon Hausmann - - Reviewed by Tor Arne Vestbø. - - Fix ability to include JavaScriptCore.pri from other .pro files. - - * JavaScriptCore.pri: Moved -O3 setting into the .pro files. - * JavaScriptCore.pro: - * jsc.pro: - -2008-12-01 Geoffrey Garen - - Reviewed by Cameron Zwarich, with help from Gavin Barraclough. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=22583. - - Refactored regular expression parsing to parse sequences of characters - as a single unit, in preparation for optimizing sequences of characters. - - SunSpider reports no change. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wrec/Escapes.h: Added. Set of classes for representing an escaped - token in a pattern. - - * wrec/Quantifier.h: - (JSC::WREC::Quantifier::Quantifier): Simplified this constructor slightly, - to match the new Escape constructor. - - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generatePatternCharacterSequence): - * wrec/WRECGenerator.h: Added an interface for generating a sequence - of pattern characters at a time. It doesn't do anything special yet. - - * wrec/WRECParser.cpp: - (JSC::WREC::Parser::consumeGreedyQuantifier): - (JSC::WREC::Parser::consumeQuantifier): Renamed "parse" to "consume" in - these functions, to match "consumeEscape." - - (JSC::WREC::Parser::parsePatternCharacterSequence): New function for - iteratively aggregating a sequence of characters in a pattern. - - (JSC::WREC::Parser::parseCharacterClassQuantifier): - (JSC::WREC::Parser::parseBackreferenceQuantifier): Renamed "parse" to - "consume" in these functions, to match "consumeEscape." - - (JSC::WREC::Parser::parseCharacterClass): Refactored to use the common - escape processing code in consumeEscape. - - (JSC::WREC::Parser::parseEscape): Refactored to use the common - escape processing code in consumeEscape. - - (JSC::WREC::Parser::consumeEscape): Factored escaped token processing - into a common function, since we were doing this in a few places. - - (JSC::WREC::Parser::parseTerm): Refactored to use the common - escape processing code in consumeEscape. - - * wrec/WRECParser.h: - (JSC::WREC::Parser::consumeOctal): Refactored to use a helper function - for reading a digit. - -2008-12-01 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 20340: SegmentedVector segment allocations can lead to unsafe use of temporary registers - - - SegmentedVector currently frees segments and reallocates them when used - as a stack. This can lead to unsafe use of pointers into freed segments. - - In order to fix this problem, SegmentedVector will be changed to only - grow and never shrink. Also, rename the reserveCapacity() member - function to grow() to match the actual usage in BytecodeGenerator, where - this function is used to allocate a group of registers at once, rather - than merely saving space for them. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): Use grow() instead of - reserveCapacity(). - * bytecompiler/SegmentedVector.h: - (JSC::SegmentedVector::SegmentedVector): - (JSC::SegmentedVector::last): - (JSC::SegmentedVector::append): - (JSC::SegmentedVector::removeLast): - (JSC::SegmentedVector::grow): Renamed from reserveCapacity(). - (JSC::SegmentedVector::clear): - -2008-12-01 Mark Rowe - - Rubber-stamped by Anders Carlsson. - - Disable WREC for x86_64 since memory allocated by the system allocator is not marked executable, - which causes 64-bit debug builds to crash. Once we have a dedicated allocator for executable - memory we can turn this back on. - - * wtf/Platform.h: - -2008-12-01 Antti Koivisto - - Reviewed by Maciej Stachowiak. - - Restore inline buffer after vector is shrunk back below its inline capacity. - - * wtf/Vector.h: - (WTF::): - (WTF::VectorBuffer::restoreInlineBufferIfNeeded): - (WTF::::shrinkCapacity): - -2008-11-30 Antti Koivisto - - Reviewed by Mark Rowe. - - Try to return free pages in the current thread cache too. - - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::releaseFastMallocFreeMemory): - -2008-12-01 David Levin - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=22567 - Make HashTable work as expected with respect to threads. Specifically, it has class-level - thread safety and constant methods work on constant objects without synchronization. - - No observable change in behavior, so no test. This only affects debug builds. - - * wtf/HashTable.cpp: - (WTF::hashTableStatsMutex): - (WTF::HashTableStats::~HashTableStats): - (WTF::HashTableStats::recordCollisionAtCount): - Guarded variable access with a mutex. - - * wtf/HashTable.h: - (WTF::::lookup): - (WTF::::lookupForWriting): - (WTF::::fullLookupForWriting): - (WTF::::add): - (WTF::::reinsert): - (WTF::::remove): - (WTF::::rehash): - Changed increments of static variables to use atomicIncrement. - - (WTF::::invalidateIterators): - (WTF::addIterator): - (WTF::removeIterator): - Guarded mutable access with a mutex. - -2008-11-29 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Enable WREC on PLATFORM(X86_64). This change predominantly requires changes to the - WREC::Generator::generateEnter method to support the x86-64 ABI, and addition of - support for a limited number of quadword operations in the X86Assembler. - - This patch will cause the JS heap to be allocated with RWX permissions on 64-bit Mac - platforms. This is a regression with respect to previous 64-bit behaviour, but is no - more permissive than on 32-bit builds. This issue should be addressed at some point. - (This is tracked by bug #21783.) - - https://bugs.webkit.org/show_bug.cgi?id=22554 - Greater than 4x speedup on regexp-dna, on x86-64. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::addPtr): - (JSC::MacroAssembler::loadPtr): - (JSC::MacroAssembler::storePtr): - (JSC::MacroAssembler::pop): - (JSC::MacroAssembler::push): - (JSC::MacroAssembler::move): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::movq_rr): - (JSC::X86Assembler::addl_i8m): - (JSC::X86Assembler::addl_i32r): - (JSC::X86Assembler::addq_i8r): - (JSC::X86Assembler::addq_i32r): - (JSC::X86Assembler::movq_mr): - (JSC::X86Assembler::movq_rm): - * wrec/WREC.h: - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateEnter): - (JSC::WREC::Generator::generateReturnSuccess): - (JSC::WREC::Generator::generateReturnFailure): - * wtf/Platform.h: - * wtf/TCSystemAlloc.cpp: - -2008-12-01 Cameron Zwarich - - Reviewed by Sam Weinig. - - Preliminary work for bug 20340: SegmentedVector segment allocations can lead to unsafe use of temporary registers - - - SegmentedVector currently frees segments and reallocates them when used - as a stack. This can lead to unsafe use of pointers into freed segments. - - In order to fix this problem, SegmentedVector will be changed to only - grow and never shrink, with the sole exception of clearing all of its - data, a capability that is required by Lexer. This patch changes the - public interface to only allow for these capabilities. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): Use reserveCapacity() - instead of resize() for m_globals and m_parameters. - * bytecompiler/SegmentedVector.h: - (JSC::SegmentedVector::resize): Removed. - (JSC::SegmentedVector::reserveCapacity): Added. - (JSC::SegmentedVector::clear): Added. - (JSC::SegmentedVector::shrink): Removed. - (JSC::SegmentedVector::grow): Removed. - * parser/Lexer.cpp: - (JSC::Lexer::clear): Use clear() instead of resize(0). - -2008-11-30 Sam Weinig - - Reviewed by Mark Rowe. - - Renames jumps to m_jumps in JumpList. - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::JumpList::link): - (JSC::MacroAssembler::JumpList::linkTo): - (JSC::MacroAssembler::JumpList::append): - -2008-11-30 Antti Koivisto - - Reviewed by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=22557 - - Report free size in central and thread caches too. - - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::fastMallocStatistics): - * wtf/FastMalloc.h: - -2008-11-29 Antti Koivisto - - Reviewed by Dan Bernstein. - - https://bugs.webkit.org/show_bug.cgi?id=22557 - Add statistics for JavaScript GC heap. - - * JavaScriptCore.exp: - * runtime/Collector.cpp: - (JSC::Heap::objectCount): - (JSC::addToStatistics): - (JSC::Heap::statistics): - * runtime/Collector.h: - -2008-11-29 Antti Koivisto - - Fix debug build by adding a stub method. - - * wtf/FastMalloc.cpp: - (WTF::fastMallocStatistics): - -2008-11-29 Antti Koivisto - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=22557 - - Add function for getting basic statistics from FastMalloc. - - * JavaScriptCore.exp: - * wtf/FastMalloc.cpp: - (WTF::DLL_Length): - (WTF::TCMalloc_PageHeap::ReturnedBytes): - (WTF::TCMallocStats::fastMallocStatistics): - * wtf/FastMalloc.h: - -2008-11-29 Cameron Zwarich - - Not reviewed. - - The C++ standard does not automatically grant the friendships of an - enclosing class to its nested subclasses, so we should do so explicitly. - This fixes the GCC 4.0 build, although both GCC 4.2 and Visual C++ 2005 - accept the incorrect code as it is. - - * assembler/MacroAssembler.h: - -2008-11-29 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Add the class MacroAssembler to provide some abstraction of code generation, - and change WREC to make use of this class, rather than directly accessing - the X86Assembler. - - This patch also allows WREC to be compiled without the rest of the JIT enabled. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/MacroAssembler.h: Added. - (JSC::MacroAssembler::): - (JSC::MacroAssembler::MacroAssembler): - (JSC::MacroAssembler::copyCode): - (JSC::MacroAssembler::Address::Address): - (JSC::MacroAssembler::ImplicitAddress::ImplicitAddress): - (JSC::MacroAssembler::BaseIndex::BaseIndex): - (JSC::MacroAssembler::Label::Label): - (JSC::MacroAssembler::Jump::Jump): - (JSC::MacroAssembler::Jump::link): - (JSC::MacroAssembler::Jump::linkTo): - (JSC::MacroAssembler::JumpList::link): - (JSC::MacroAssembler::JumpList::linkTo): - (JSC::MacroAssembler::JumpList::append): - (JSC::MacroAssembler::Imm32::Imm32): - (JSC::MacroAssembler::add32): - (JSC::MacroAssembler::or32): - (JSC::MacroAssembler::sub32): - (JSC::MacroAssembler::loadPtr): - (JSC::MacroAssembler::load32): - (JSC::MacroAssembler::load16): - (JSC::MacroAssembler::storePtr): - (JSC::MacroAssembler::store32): - (JSC::MacroAssembler::pop): - (JSC::MacroAssembler::push): - (JSC::MacroAssembler::peek): - (JSC::MacroAssembler::poke): - (JSC::MacroAssembler::move): - (JSC::MacroAssembler::compareImm32ForBranch): - (JSC::MacroAssembler::compareImm32ForBranchEquality): - (JSC::MacroAssembler::jae32): - (JSC::MacroAssembler::je32): - (JSC::MacroAssembler::je16): - (JSC::MacroAssembler::jg32): - (JSC::MacroAssembler::jge32): - (JSC::MacroAssembler::jl32): - (JSC::MacroAssembler::jle32): - (JSC::MacroAssembler::jne32): - (JSC::MacroAssembler::jump): - (JSC::MacroAssembler::breakpoint): - (JSC::MacroAssembler::ret): - * assembler/X86Assembler.h: - (JSC::X86Assembler::cmpw_rm): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::Interpreter): - * interpreter/Interpreter.h: - (JSC::Interpreter::assemblerBuffer): - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * wrec/WREC.cpp: - (JSC::WREC::Generator::compileRegExp): - * wrec/WREC.h: - * wrec/WRECFunctors.cpp: - (JSC::WREC::GeneratePatternCharacterFunctor::generateAtom): - (JSC::WREC::GenerateCharacterClassFunctor::generateAtom): - (JSC::WREC::GenerateBackreferenceFunctor::generateAtom): - (JSC::WREC::GenerateParenthesesNonGreedyFunctor::generateAtom): - * wrec/WRECFunctors.h: - (JSC::WREC::GenerateParenthesesNonGreedyFunctor::GenerateParenthesesNonGreedyFunctor): - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateEnter): - (JSC::WREC::Generator::generateReturnSuccess): - (JSC::WREC::Generator::generateSaveIndex): - (JSC::WREC::Generator::generateIncrementIndex): - (JSC::WREC::Generator::generateLoadCharacter): - (JSC::WREC::Generator::generateJumpIfEndOfInput): - (JSC::WREC::Generator::generateJumpIfNotEndOfInput): - (JSC::WREC::Generator::generateReturnFailure): - (JSC::WREC::Generator::generateBacktrack1): - (JSC::WREC::Generator::generateBacktrackBackreference): - (JSC::WREC::Generator::generateBackreferenceQuantifier): - (JSC::WREC::Generator::generateNonGreedyQuantifier): - (JSC::WREC::Generator::generateGreedyQuantifier): - (JSC::WREC::Generator::generatePatternCharacter): - (JSC::WREC::Generator::generateCharacterClassInvertedRange): - (JSC::WREC::Generator::generateCharacterClassInverted): - (JSC::WREC::Generator::generateCharacterClass): - (JSC::WREC::Generator::generateParentheses): - (JSC::WREC::Generator::generateParenthesesNonGreedy): - (JSC::WREC::Generator::generateParenthesesResetTrampoline): - (JSC::WREC::Generator::generateAssertionBOL): - (JSC::WREC::Generator::generateAssertionEOL): - (JSC::WREC::Generator::generateAssertionWordBoundary): - (JSC::WREC::Generator::generateBackreference): - (JSC::WREC::Generator::terminateAlternative): - (JSC::WREC::Generator::terminateDisjunction): - * wrec/WRECGenerator.h: - (JSC::WREC::Generator::Generator): - * wrec/WRECParser.cpp: - (JSC::WREC::Parser::parsePatternCharacterQualifier): - (JSC::WREC::Parser::parseCharacterClassQuantifier): - (JSC::WREC::Parser::parseBackreferenceQuantifier): - (JSC::WREC::Parser::parseParentheses): - (JSC::WREC::Parser::parseCharacterClass): - (JSC::WREC::Parser::parseOctalEscape): - (JSC::WREC::Parser::parseEscape): - (JSC::WREC::Parser::parseTerm): - (JSC::WREC::Parser::parseDisjunction): - * wrec/WRECParser.h: - (JSC::WREC::Parser::Parser): - (JSC::WREC::Parser::parsePattern): - (JSC::WREC::Parser::parseAlternative): - * wtf/Platform.h: - -2008-11-28 Simon Hausmann - - Reviewed by Tor Arne Vestbø. - - Fix compilation on Windows CE - - Port away from the use of errno after calling strtol(), instead - detect conversion errors by checking the result and the stop - position. - - * runtime/DateMath.cpp: - (JSC::parseLong): - (JSC::parseDate): - -2008-11-28 Joerg Bornemann - - Reviewed by Simon Hausmann. - - Implement lowResUTCTime() on Windows CE using GetSystemTime as _ftime() is not available. - - * runtime/DateMath.cpp: - (JSC::lowResUTCTime): - -2008-11-28 Simon Hausmann - - Rubber-stamped by Tor Arne Vestbø. - - Removed unnecessary inclusion of errno.h, which also fixes compilation on Windows CE. - - * runtime/JSGlobalObjectFunctions.cpp: - -2008-11-27 Cameron Zwarich - - Not reviewed. - - r38825 made JSFunction::m_body private, but some inspector code in - WebCore sets the field. Add setters for it. - - * runtime/JSFunction.h: - (JSC::JSFunction::setBody): - -2008-11-27 Sam Weinig - - Reviewed by Cameron Zwarich. - - Fix FIXME by adding accessor for JSFunction's m_body property. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::cti_op_call_JSFunction): - (JSC::Interpreter::cti_vm_dontLazyLinkCall): - (JSC::Interpreter::cti_vm_lazyLinkCall): - * profiler/Profiler.cpp: - (JSC::createCallIdentifierFromFunctionImp): - * runtime/Arguments.h: - (JSC::Arguments::getArgumentsData): - (JSC::Arguments::Arguments): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSFunction.h: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::body): - -2008-11-27 Sam Weinig - - Reviewed by Oliver Hunt. - - Remove unused member variables from ProgramNode. - - * parser/Nodes.h: - -2008-11-27 Brent Fulgham - - Reviewed by Alexey Proskuryakov. - - Enable mouse panning feaure on Windows Cairo build. - See http://bugs.webkit.org/show_bug.cgi?id=22525 - - * wtf/Platform.h: Enable mouse panning feaure on Windows Cairo build. - -2008-11-27 Alp Toker - - Change recently introduced C++ comments in Platform.h to C comments to - fix the minidom build with traditional C. - - Build GtkLauncher and minidom with the '-ansi' compiler flag to detect - API header breakage at build time. - - * GNUmakefile.am: - * wtf/Platform.h: - -2008-11-27 Alp Toker - - Remove C++ comment from JavaScriptCore API headers (introduced r35449). - Fixes build for ANSI C applications using the public API. - - * API/WebKitAvailability.h: - -2008-11-26 Eric Seidel - - No review, build fix only. - - Fix the JSC Chromium Mac build by adding JavaScriptCore/icu into the include path - - * JavaScriptCore.scons: - -2008-11-25 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Remove the unused member function JSFunction::getParameterName(). - - * runtime/JSFunction.cpp: - * runtime/JSFunction.h: - -2008-11-24 Gavin Barraclough - - Reviewed by Geoff Garen. - - Polymorpic caching for get by id chain. Similar to the polymorphic caching already implemented - for self and proto accesses (implemented by allowing multiple trampolines to be JIT genertaed, - and linked together) - the get by id chain caching is implemented as a genericization of the - proto list caching, allowing cached access lists to contain a mix of proto and proto chain - accesses (since in JS style inheritance hierarchies you may commonly see a mix of properties - being overridden on the direct prototype, or higher up its prototype chain). - - In order to allow this patch to compile there is a fix to appease gcc 4.2 compiler issues - (removing the jumps between fall-through cases in privateExecute). - - This patch also removes redundant immediate checking from the reptach code, and fixes a related - memory leak (failure to deallocate trampolines). - - ~2% progression on v8 tests (bulk on the win on deltablue) - - * bytecode/Instruction.h: - (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::): - (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): - (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): - (JSC::PolymorphicAccessStructureList::derefStructures): - * interpreter/Interpreter.cpp: - (JSC::countPrototypeChainEntriesAndCheckForProxies): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::Interpreter::cti_op_get_by_id_self_fail): - (JSC::getPolymorphicAccessStructureListSlot): - (JSC::Interpreter::cti_op_get_by_id_proto_list): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePatchGetArrayLength): - * jit/JIT.h: - (JSC::JIT::compileGetByIdChainList): - -2008-11-25 Cameron Zwarich - - Reviewed by Alexey Proskuryakov. - - Move the collect() call in Heap::heapAllocate() that is conditionally - compiled under COLLECT_ON_EVERY_ALLOCATION so that it is before we get - information about the heap. This was causing assertion failures for me - while I was reducing a bug. - - * runtime/Collector.cpp: - (JSC::Heap::heapAllocate): - -2008-11-24 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 13790: Function declarations are not treated as statements (used to affect starcraft2.com) - - - Modify the parser to treat function declarations as statements, - simplifying the grammar in the process. Technically, according to the - grammar in the ECMA spec, function declarations are not statements and - can not be used everywhere that statements can, but it is not worth the - possibility compatibility issues just to stick to the spec in this case. - - * parser/Grammar.y: - * parser/Nodes.cpp: - (JSC::FuncDeclNode::emitBytecode): Avoid returning ignoredResult() - as a result, because it causes a crash in DoWhileNode::emitBytecode(). - -2008-11-24 Geoffrey Garen - - Reviewed by Sam Weinig. - - Unroll the regexp matching loop by 1. 10% speedup on simple matching - stress test. No change on SunSpider. - - (I decided not to unroll to arbitrary levels because the returns diminsh - quickly.) - - * wrec/WREC.cpp: - (JSC::WREC::compileRegExp): - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateJumpIfEndOfInput): - (JSC::WREC::Generator::generateJumpIfNotEndOfInput): - * wrec/WRECGenerator.h: - * wrec/WRECParser.h: - (JSC::WREC::Parser::error): - (JSC::WREC::Parser::parsePattern): - -2008-11-24 Geoffrey Garen - - Reviewed by Sam Weinig. - - Removed some unnecessary "Generator::" prefixes. - - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateEnter): - (JSC::WREC::Generator::generateReturnSuccess): - (JSC::WREC::Generator::generateSaveIndex): - (JSC::WREC::Generator::generateIncrementIndex): - (JSC::WREC::Generator::generateLoopIfNotEndOfInput): - (JSC::WREC::Generator::generateReturnFailure): - -2008-11-24 Geoffrey Garen - - Reviewed by Sam Weinig. - - Made a bunch of WREC::Parser functions private, and added an explicit - "reset()" function, so a parser can be reused. - - * wrec/WRECParser.h: - (JSC::WREC::Parser::Parser): - (JSC::WREC::Parser::generator): - (JSC::WREC::Parser::ignoreCase): - (JSC::WREC::Parser::multiline): - (JSC::WREC::Parser::recordSubpattern): - (JSC::WREC::Parser::numSubpatterns): - (JSC::WREC::Parser::parsePattern): - (JSC::WREC::Parser::parseAlternative): - (JSC::WREC::Parser::reset): - -2008-11-24 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Implement repatching for get by id chain. - Previously the access is performed in a function stub, in the repatch form - the trampoline is not called to; instead the hot path is relinked to jump - directly to the trampoline, if it fails it will jump to the slow case. - - https://bugs.webkit.org/show_bug.cgi?id=22449 - 3% progression on deltablue. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdChain): - -2008-11-24 Joerg Bornemann - - Reviewed by Simon Hausmann. - - https://bugs.webkit.org/show_bug.cgi?id=20746 - - Various small compilation fixes to make the Qt port of WebKit - compile on Windows CE. - - * config.h: Don't set _CRT_RAND_S for CE, it's not available. - * jsc.cpp: Disabled use of debugger includes for CE. It - does not have the debugging functions. - * runtime/DateMath.cpp: Use localtime() on Windows CE. - * wtf/Assertions.cpp: Compile on Windows CE without debugger. - * wtf/Assertions.h: Include windows.h before defining ASSERT. - * wtf/MathExtras.h: Include stdlib.h instead of xmath.h. - * wtf/Platform.h: Disable ERRNO_H and detect endianess based - on the Qt endianess. On Qt for Windows CE the endianess is - defined by the vendor specific build spec. - * wtf/Threading.h: Use the volatile-less atomic functions. - * wtf/dtoa.cpp: Compile without errno. - * wtf/win/MainThreadWin.cpp: Don't include windows.h on CE after - Assertions.h due to the redefinition of ASSERT. - -2008-11-22 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Replace accidentally deleted immediate check from get by id chain trampoline. - https://bugs.webkit.org/show_bug.cgi?id=22413 - - * jit/JIT.cpp: - (JSC::JIT::privateCompileGetByIdChain): - -2008-11-21 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Add (really) polymorphic caching for get by id self. - Very similar to caching of prototype accesses, described below. - - Oh, also, probably shouldn't have been leaking those structure list objects. - - 4% preogression on deltablue. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::derefStructures): - (JSC::PrototypeStructureList::derefStructures): - * bytecode/Instruction.h: - * bytecode/Opcode.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::cti_op_get_by_id_self_fail): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::patchGetByIdSelf): - * jit/JIT.h: - (JSC::JIT::compileGetByIdSelfList): - -2008-11-21 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed many crashes seen 'round the world (but only in release builds). - - Update outputParameter offset to reflect slight re-ordering of push - instructions in r38669. - - * wrec/WRECGenerator.cpp: - -2008-11-21 Geoffrey Garen - - Reviewed by Sam Weinig. - - A little more RegExp refactoring. - - Deployed a helper function for reading the next character. Used the "link - vector of jumps" helper in a place I missed before. - - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateLoadCharacter): - (JSC::WREC::Generator::generatePatternCharacter): - (JSC::WREC::Generator::generateCharacterClass): - (JSC::WREC::Generator::generateAssertionEOL): - (JSC::WREC::Generator::generateAssertionWordBoundary): - * wrec/WRECGenerator.h: - -2008-11-21 Alexey Proskuryakov - - Reviewed by Dan Bernstein. - - https://bugs.webkit.org/show_bug.cgi?id=22402 - Replace abort() with CRASH() - - * wtf/Assertions.h: Added a different method to crash, which should work even is 0xbbadbeef - is a valid memory address. - - * runtime/Collector.cpp: - * wtf/FastMalloc.cpp: - * wtf/FastMalloc.h: - * wtf/TCSpinLock.h: - Replace abort() with CRASH(). - -2008-11-21 Alexey Proskuryakov - - Reverted fix for bug 22042 (Replace abort() with CRASH()), because it was breaking - FOR_EACH_OPCODE_ID macro somehow, making Safari crash. - - * runtime/Collector.cpp: - (JSC::Heap::heapAllocate): - (JSC::Heap::collect): - * wtf/Assertions.h: - * wtf/FastMalloc.cpp: - (WTF::fastMalloc): - (WTF::fastCalloc): - (WTF::fastRealloc): - (WTF::InitSizeClasses): - (WTF::PageHeapAllocator::New): - (WTF::TCMallocStats::do_malloc): - * wtf/FastMalloc.h: - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::Init): - (TCMalloc_SpinLock::Finalize): - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - -2008-11-21 Geoffrey Garen - - Reviewed by Sam Weinig. - - A little more RegExp refactoring. - - Moved all assembly from WREC.cpp into WRECGenerator helper functions. - This should help with portability and readability. - - Removed ASSERTs after calls to executableCopy(), and changed - executableCopy() to ASSERT instead. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::executableCopy): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompilePatchGetArrayLength): - * wrec/WREC.cpp: - (JSC::WREC::compileRegExp): - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateEnter): - (JSC::WREC::Generator::generateReturnSuccess): - (JSC::WREC::Generator::generateSaveIndex): - (JSC::WREC::Generator::generateIncrementIndex): - (JSC::WREC::Generator::generateLoopIfNotEndOfInput): - (JSC::WREC::Generator::generateReturnFailure): - * wrec/WRECGenerator.h: - * wrec/WRECParser.h: - (JSC::WREC::Parser::ignoreCase): - (JSC::WREC::Parser::generator): - -2008-11-21 Alexey Proskuryakov - - Build fix. - - * wtf/Assertions.h: Use ::abort for C++ code. - -2008-11-21 Alexey Proskuryakov - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=22402 - Replace abort() with CRASH() - - * wtf/Assertions.h: Added abort() after an attempt to crash for extra safety. - - * runtime/Collector.cpp: - * wtf/FastMalloc.cpp: - * wtf/FastMalloc.h: - * wtf/TCSpinLock.h: - Replace abort() with CRASH(). - -2008-11-21 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed wrec => generator. - - * wrec/WRECFunctors.cpp: - (JSC::WREC::GeneratePatternCharacterFunctor::generateAtom): - (JSC::WREC::GeneratePatternCharacterFunctor::backtrack): - (JSC::WREC::GenerateCharacterClassFunctor::generateAtom): - (JSC::WREC::GenerateCharacterClassFunctor::backtrack): - (JSC::WREC::GenerateBackreferenceFunctor::generateAtom): - (JSC::WREC::GenerateBackreferenceFunctor::backtrack): - (JSC::WREC::GenerateParenthesesNonGreedyFunctor::generateAtom): - -2008-11-19 Gavin Barraclough - - Reviewed by Darin Adler. - - Add support for (really) polymorphic caching of prototype accesses. - - If a cached prototype access misses, cti_op_get_by_id_proto_list is called. - When this occurs the Structure pointers from the instruction stream are copied - off into a new ProtoStubInfo object. A second prototype access trampoline is - generated, and chained onto the first. Subsequent missed call to - cti_op_get_by_id_proto_list_append, which append futher new trampolines, up to - PROTOTYPE_LIST_CACHE_SIZE (currently 4). If any of the misses result in an - access other than to a direct prototype property, list formation is halted (or - for the initial miss, does not take place at all). - - Separate fail case functions are provided for each access since this contributes - to the performance progression (enables better processor branch prediction). - - Overall this is a near 5% progression on v8, with around 10% wins on richards - and deltablue. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::derefStructures): - * bytecode/Instruction.h: - (JSC::ProtoStructureList::ProtoStubInfo::set): - (JSC::ProtoStructureList::ProtoStructureList): - (JSC::Instruction::Instruction): - (JSC::Instruction::): - * bytecode/Opcode.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::Interpreter::cti_op_put_by_id_fail): - (JSC::Interpreter::cti_op_get_by_id_self_fail): - (JSC::Interpreter::cti_op_get_by_id_proto_list): - (JSC::Interpreter::cti_op_get_by_id_proto_list_append): - (JSC::Interpreter::cti_op_get_by_id_proto_list_full): - (JSC::Interpreter::cti_op_get_by_id_proto_fail): - (JSC::Interpreter::cti_op_get_by_id_chain_fail): - (JSC::Interpreter::cti_op_get_by_id_array_fail): - (JSC::Interpreter::cti_op_get_by_id_string_fail): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompilePatchGetArrayLength): - * jit/JIT.h: - (JSC::JIT::compileGetByIdProtoList): - -2008-11-20 Sam Weinig - - Try and fix the tiger build. - - * parser/Grammar.y: - -2008-11-20 Eric Seidel - - Reviewed by Darin Adler. - - Make JavaScriptCore Chromium build under Windows (cmd only, cygwin almost works) - https://bugs.webkit.org/show_bug.cgi?id=22347 - - * JavaScriptCore.scons: - * parser/Parser.cpp: Add using std::auto_ptr since we use auto_ptr - -2008-11-20 Steve Falkenburg - - Fix build. - - Reviewed by Sam Weinig. - - * parser/Parser.cpp: - (JSC::Parser::reparse): - -2008-11-20 Geoffrey Garen - - Reviewed by Sam Weinig. - - A little more RegExp refactoring. - - Created a helper function in the assembler for linking a vector of - JmpSrc to a location, and deployed it in a bunch of places. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/X86Assembler.h: - (JSC::X86Assembler::link): - * wrec/WREC.cpp: - (JSC::WREC::compileRegExp): - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateNonGreedyQuantifier): - (JSC::WREC::Generator::generateGreedyQuantifier): - (JSC::WREC::Generator::generateCharacterClassInverted): - (JSC::WREC::Generator::generateParentheses): - (JSC::WREC::Generator::generateParenthesesResetTrampoline): - (JSC::WREC::Generator::generateAssertionBOL): - (JSC::WREC::Generator::generateAssertionEOL): - (JSC::WREC::Generator::generateAssertionWordBoundary): - (JSC::WREC::Generator::terminateAlternative): - (JSC::WREC::Generator::terminateDisjunction): - * wrec/WRECParser.cpp: - * wrec/WRECParser.h: - (JSC::WREC::Parser::consumeHex): - -2008-11-20 Sam Weinig - - Fix non-mac builds. - - * parser/Lexer.cpp: - * parser/Parser.cpp: - -2008-11-20 Sam Weinig - - Reviewed by Darin Adler. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=22385 - - Lazily reparse FunctionBodyNodes on first execution. - - - Saves 57MB on Membuster head. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): Remove vector shrinking since this is now - handled by destroying the ScopeNodeData after generation. - - * parser/Grammar.y: Add alternate NoNode version of the grammar - that does not create nodes. This is used to lazily create FunctionBodyNodes - on first execution. - - * parser/Lexer.cpp: - (JSC::Lexer::setCode): Fix bug where on reparse, the Lexer was confused about - what position and length meant. Position is the current position in the original - data buffer (important for getting correct line/column information) and length - the end offset in the original buffer. - * parser/Lexer.h: - (JSC::Lexer::sourceCode): Positions are relative to the beginning of the buffer. - - * parser/Nodes.cpp: - (JSC::ScopeNodeData::ScopeNodeData): Move initialization of ScopeNode data here. - (JSC::ScopeNode::ScopeNode): Add constructor that only sets the JSGlobalData - for FunctionBodyNode stubs. - (JSC::ScopeNode::~ScopeNode): Release m_children now that we don't inherit from - BlockNode. - (JSC::ScopeNode::releaseNodes): Ditto. - (JSC::EvalNode::generateBytecode): Only shrink m_children, as we need to keep around - the rest of the data. - (JSC::FunctionBodyNode::FunctionBodyNode): Add constructor that only sets the - JSGlobalData. - (JSC::FunctionBodyNode::create): Ditto. - (JSC::FunctionBodyNode::generateBytecode): If we don't have the data, do a reparse - to construct it. Then after generation, destroy the data. - (JSC::ProgramNode::generateBytecode): After generation, destroy the AST data. - * parser/Nodes.h: - (JSC::ExpressionNode::): Add isFuncExprNode for FunctionConstructor. - (JSC::StatementNode::): Add isExprStatementNode for FunctionConstructor. - (JSC::ExprStatementNode::): Ditto. - (JSC::ExprStatementNode::expr): Add accessor for FunctionConstructor. - (JSC::FuncExprNode::): Add isFuncExprNode for FunctionConstructor - - (JSC::ScopeNode::adoptData): Adopts a ScopeNodeData. - (JSC::ScopeNode::data): Accessor for ScopeNodeData. - (JSC::ScopeNode::destroyData): Deletes the ScopeNodeData. - (JSC::ScopeNode::setFeatures): Added. - (JSC::ScopeNode::varStack): Added assert. - (JSC::ScopeNode::functionStack): Ditto. - (JSC::ScopeNode::children): Ditto. - (JSC::ScopeNode::neededConstants): Ditto. - Factor m_varStack, m_functionStack, m_children and m_numConstants into ScopeNodeData. - - * parser/Parser.cpp: - (JSC::Parser::reparse): Reparse the SourceCode in the FunctionBodyNode and set - set up the ScopeNodeData for it. - * parser/Parser.h: - - * parser/SourceCode.h: - (JSC::SourceCode::endOffset): Added for use in the lexer. - - * runtime/FunctionConstructor.cpp: - (JSC::getFunctionBody): Assuming a ProgramNode with one FunctionExpression in it, - get the FunctionBodyNode. Any issues signifies a parse failure in constructFunction. - (JSC::constructFunction): Make parsing functions in the form new Function(""), easier - by concatenating the strings together (with some glue) and parsing the function expression - as a ProgramNode from which we can receive the FunctionBodyNode. This has the added benefit - of not having special parsing code for the arguments and lazily constructing the - FunctionBodyNode's AST on first execution. - - * runtime/Identifier.h: - (JSC::operator!=): Added. - -2008-11-20 Sam Weinig - - Reviewed by Geoffrey Garen. - - Speedup the lexer to offset coming re-parsing patch. - - - .6% progression on Sunspider. - - * bytecompiler/SegmentedVector.h: - (JSC::SegmentedVector::shrink): Fixed bug where m_size would not be - set when shrinking to 0. - - * parser/Lexer.cpp: - (JSC::Lexer::Lexer): - (JSC::Lexer::isIdentStart): Use isASCIIAlpha and isASCII to avoid going into ICU in the common cases. - (JSC::Lexer::isIdentPart): Use isASCIIAlphanumeric and isASCII to avoid going into ICU in the common cases - (JSC::isDecimalDigit): Use version in ASCIICType.h. Inlining it was a regression. - (JSC::Lexer::isHexDigit): Ditto. - (JSC::Lexer::isOctalDigit): Ditto. - (JSC::Lexer::clear): Resize the m_identifiers SegmentedVector to initial - capacity - * parser/Lexer.h: Remove unused m_strings vector. Make m_identifiers - a SegmentedVector to avoid allocating a new Identifier* for - each identifier found. The SegmentedVector is need so we can passes - references to the Identifier to the parser, which remain valid even when - the vector is resized. - (JSC::Lexer::makeIdentifier): Inline and return a reference to the added - Identifier. - -2008-11-20 Sam Weinig - - Reviewed by Darin Adler. - - Add isASCII to ASCIICType. Use coming soon! - - * wtf/ASCIICType.h: - (WTF::isASCII): - -2008-11-20 Sam Weinig - - Reviewed by Darin Adler. - - Add OwnPtr constructor and OwnPtr::adopt that take an auto_ptr. - - * wtf/OwnPtr.h: - (WTF::OwnPtr::OwnPtr): - (WTF::OwnPtr::adopt): - -2008-11-20 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=22364 - Crashes seen on Tiger buildbots due to worker threads exhausting pthread keys - - * runtime/Collector.cpp: - (JSC::Heap::Heap): - (JSC::Heap::destroy): - (JSC::Heap::makeUsableFromMultipleThreads): - (JSC::Heap::registerThread): - * runtime/Collector.h: - Pthread key for tracking threads is only created on request now, because this is a limited - resource, and thread tracking is not needed for worker heaps, or for WebCore heap. - - * API/JSContextRef.cpp: (JSGlobalContextCreateInGroup): Call makeUsableFromMultipleThreads(). - - * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::sharedInstance): Ditto. - - * runtime/JSGlobalData.h: (JSC::JSGlobalData::makeUsableFromMultipleThreads): Just forward - the call to Heap, which clients need not know about, ideally. - -2008-11-20 Geoffrey Garen - - Reviewed by Sam Weinig. - - A little more WREC refactoring. - - Removed the "Register" suffix from register names in WREC, and renamed: - currentPosition => index - currentValue => character - quantifierCount => repeatCount - - Added a top-level parsePattern function to the WREC parser, which - allowed me to remove the error() and atEndOfPattern() accessors. - - Factored out an MSVC customization into a constant. - - Renamed nextLabel => beginPattern. - - * wrec/WREC.cpp: - (JSC::WREC::compileRegExp): - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateBacktrack1): - (JSC::WREC::Generator::generateBacktrackBackreference): - (JSC::WREC::Generator::generateBackreferenceQuantifier): - (JSC::WREC::Generator::generateNonGreedyQuantifier): - (JSC::WREC::Generator::generateGreedyQuantifier): - (JSC::WREC::Generator::generatePatternCharacter): - (JSC::WREC::Generator::generateCharacterClassInvertedRange): - (JSC::WREC::Generator::generateCharacterClassInverted): - (JSC::WREC::Generator::generateCharacterClass): - (JSC::WREC::Generator::generateParentheses): - (JSC::WREC::Generator::generateParenthesesResetTrampoline): - (JSC::WREC::Generator::generateAssertionBOL): - (JSC::WREC::Generator::generateAssertionEOL): - (JSC::WREC::Generator::generateAssertionWordBoundary): - (JSC::WREC::Generator::generateBackreference): - (JSC::WREC::Generator::generateDisjunction): - (JSC::WREC::Generator::terminateDisjunction): - * wrec/WRECGenerator.h: - * wrec/WRECParser.h: - (JSC::WREC::Parser::parsePattern): - -2008-11-19 Geoffrey Garen - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=22361 - A little more RegExp refactoring. - - Consistently named variables holding the starting position at which - regexp matching should begin to "startOffset". - - A few more "regExpObject" => "regExpConstructor" changes. - - Refactored RegExpObject::match for clarity, and replaced a slow "get" - of the "global" property with a fast access to the global bit. - - Made the error message you see when RegExpObject::match has no input a - little more informative, as in Firefox. - - * runtime/RegExp.cpp: - (JSC::RegExp::match): - * runtime/RegExp.h: - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::match): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - -2008-11-19 Geoffrey Garen - - Reviewed by Sam Weinig. - - A little more refactoring. - - Removed the "emit" and "emitUnlinked" prefixes from the assembler. - - Moved the JmpSrc and JmpDst class definitions to the top of the X86 - assembler class, in accordance with WebKit style guidelines. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::JmpSrc::JmpSrc): - (JSC::X86Assembler::JmpDst::JmpDst): - (JSC::X86Assembler::int3): - (JSC::X86Assembler::pushl_m): - (JSC::X86Assembler::popl_m): - (JSC::X86Assembler::movl_rr): - (JSC::X86Assembler::addl_rr): - (JSC::X86Assembler::addl_i8r): - (JSC::X86Assembler::addl_i8m): - (JSC::X86Assembler::addl_i32r): - (JSC::X86Assembler::addl_mr): - (JSC::X86Assembler::andl_rr): - (JSC::X86Assembler::andl_i32r): - (JSC::X86Assembler::cmpl_i8r): - (JSC::X86Assembler::cmpl_rr): - (JSC::X86Assembler::cmpl_rm): - (JSC::X86Assembler::cmpl_mr): - (JSC::X86Assembler::cmpl_i32r): - (JSC::X86Assembler::cmpl_i32m): - (JSC::X86Assembler::cmpl_i8m): - (JSC::X86Assembler::cmpw_rm): - (JSC::X86Assembler::orl_rr): - (JSC::X86Assembler::orl_mr): - (JSC::X86Assembler::orl_i32r): - (JSC::X86Assembler::subl_rr): - (JSC::X86Assembler::subl_i8r): - (JSC::X86Assembler::subl_i8m): - (JSC::X86Assembler::subl_i32r): - (JSC::X86Assembler::subl_mr): - (JSC::X86Assembler::testl_i32r): - (JSC::X86Assembler::testl_i32m): - (JSC::X86Assembler::testl_rr): - (JSC::X86Assembler::xorl_i8r): - (JSC::X86Assembler::xorl_rr): - (JSC::X86Assembler::sarl_i8r): - (JSC::X86Assembler::sarl_CLr): - (JSC::X86Assembler::shl_i8r): - (JSC::X86Assembler::shll_CLr): - (JSC::X86Assembler::imull_rr): - (JSC::X86Assembler::imull_i32r): - (JSC::X86Assembler::idivl_r): - (JSC::X86Assembler::negl_r): - (JSC::X86Assembler::movl_mr): - (JSC::X86Assembler::movzbl_rr): - (JSC::X86Assembler::movzwl_mr): - (JSC::X86Assembler::movl_rm): - (JSC::X86Assembler::movl_i32r): - (JSC::X86Assembler::movl_i32m): - (JSC::X86Assembler::leal_mr): - (JSC::X86Assembler::jmp_r): - (JSC::X86Assembler::jmp_m): - (JSC::X86Assembler::movsd_mr): - (JSC::X86Assembler::xorpd_mr): - (JSC::X86Assembler::movsd_rm): - (JSC::X86Assembler::movd_rr): - (JSC::X86Assembler::cvtsi2sd_rr): - (JSC::X86Assembler::cvttsd2si_rr): - (JSC::X86Assembler::addsd_mr): - (JSC::X86Assembler::subsd_mr): - (JSC::X86Assembler::mulsd_mr): - (JSC::X86Assembler::addsd_rr): - (JSC::X86Assembler::subsd_rr): - (JSC::X86Assembler::mulsd_rr): - (JSC::X86Assembler::ucomis_rr): - (JSC::X86Assembler::pextrw_irr): - (JSC::X86Assembler::call): - (JSC::X86Assembler::jmp): - (JSC::X86Assembler::jne): - (JSC::X86Assembler::jnz): - (JSC::X86Assembler::je): - (JSC::X86Assembler::jl): - (JSC::X86Assembler::jb): - (JSC::X86Assembler::jle): - (JSC::X86Assembler::jbe): - (JSC::X86Assembler::jge): - (JSC::X86Assembler::jg): - (JSC::X86Assembler::ja): - (JSC::X86Assembler::jae): - (JSC::X86Assembler::jo): - (JSC::X86Assembler::jp): - (JSC::X86Assembler::js): - (JSC::X86Assembler::predictNotTaken): - (JSC::X86Assembler::convertToFastCall): - (JSC::X86Assembler::restoreArgumentReference): - (JSC::X86Assembler::restoreArgumentReferenceForTrampoline): - (JSC::X86Assembler::modRm_rr): - (JSC::X86Assembler::modRm_rr_Unchecked): - (JSC::X86Assembler::modRm_rm): - (JSC::X86Assembler::modRm_rm_Unchecked): - (JSC::X86Assembler::modRm_rmsib): - (JSC::X86Assembler::modRm_opr): - (JSC::X86Assembler::modRm_opr_Unchecked): - (JSC::X86Assembler::modRm_opm): - (JSC::X86Assembler::modRm_opm_Unchecked): - (JSC::X86Assembler::modRm_opmsib): - * jit/JIT.cpp: - (JSC::JIT::emitNakedCall): - (JSC::JIT::emitNakedFastCall): - (JSC::JIT::emitCTICall): - (JSC::JIT::emitJumpSlowCaseIfNotJSCell): - (JSC::JIT::emitJumpSlowCaseIfNotImmNum): - (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero): - (JSC::JIT::emitFastArithIntToImmOrSlowCase): - (JSC::JIT::emitArithIntToImmWithJump): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emitSlowScriptCheck): - (JSC::JIT::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::JIT::compileBinaryArithOp): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompilePatchGetArrayLength): - * wrec/WREC.cpp: - (JSC::WREC::compileRegExp): - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateBackreferenceQuantifier): - (JSC::WREC::Generator::generateNonGreedyQuantifier): - (JSC::WREC::Generator::generateGreedyQuantifier): - (JSC::WREC::Generator::generatePatternCharacter): - (JSC::WREC::Generator::generateCharacterClassInvertedRange): - (JSC::WREC::Generator::generateCharacterClassInverted): - (JSC::WREC::Generator::generateCharacterClass): - (JSC::WREC::Generator::generateParentheses): - (JSC::WREC::Generator::generateParenthesesNonGreedy): - (JSC::WREC::Generator::generateParenthesesResetTrampoline): - (JSC::WREC::Generator::generateAssertionBOL): - (JSC::WREC::Generator::generateAssertionEOL): - (JSC::WREC::Generator::generateAssertionWordBoundary): - (JSC::WREC::Generator::generateBackreference): - (JSC::WREC::Generator::generateDisjunction): - -2008-11-19 Simon Hausmann - - Sun CC build fix, removed trailing comman for last enum value. - - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::): - -2008-11-19 Mark Rowe - - Reviewed by Alexey Proskuryakov. - - Expand the workaround for Apple GCC compiler bug to all versions of GCC 4.0.1. - It has been observed with builds 5465 (Xcode 3.0) and 5484 (Xcode 3.1), and there is no evidence - that it has been fixed in newer builds of GCC 4.0.1. - - This addresses (WebKit nightly crashes on launch on 10.4.11). - - * wtf/StdLibExtras.h: - -2008-11-18 Cameron Zwarich - - Reviewed by Maciej Stachowiak and Geoff Garen. - - Bug 22287: ASSERTION FAILED: Not enough jumps linked in slow case codegen in CTI::privateCompileSlowCases()) - - - Fix a typo in the number cell reuse code where the first and second - operands are sometimes confused. - - * jit/JIT.cpp: - (JSC::JIT::compileBinaryArithOpSlowCase): - -2008-11-18 Dan Bernstein - - - try to fix the Windows build - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2008-11-18 Geoffrey Garen - - Reviewed by Sam Weinig. - - Minor RegExp cleanup. - - SunSpider says no change. - - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::match): Renamed "regExpObj" to "regExpConstructor". - - * wrec/WREC.cpp: - (JSC::WREC::compileRegExp): Instead of checking for a NULL output vector, - ASSERT that the output vector is not NULL. (The rest of WREC is not - safe to use with a NULL output vector, and we probably don't want to - spend the time and/or performance to make it safe.) - -2008-11-18 Geoffrey Garen - - Reviewed by Darin Adler. - - A little more renaming and refactoring. - - VM_CHECK_EXCEPTION() => CHECK_FOR_EXCEPTION(). - NEXT_INSTRUCTION => NEXT_INSTRUCTION(). - - Removed the "Error_" and "TempError_" prefixes from WREC error types. - - Refactored the WREC parser so it doesn't need a "setError" function, - and changed "isEndOfPattern" and its use -- they read kind of backwards - before. - - Changed our "TODO:" error messages at least to say something, since you - can't say "TODO:" in shipping software. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::cti_op_convert_this): - (JSC::Interpreter::cti_op_add): - (JSC::Interpreter::cti_op_pre_inc): - (JSC::Interpreter::cti_op_loop_if_less): - (JSC::Interpreter::cti_op_loop_if_lesseq): - (JSC::Interpreter::cti_op_put_by_id): - (JSC::Interpreter::cti_op_put_by_id_second): - (JSC::Interpreter::cti_op_put_by_id_generic): - (JSC::Interpreter::cti_op_put_by_id_fail): - (JSC::Interpreter::cti_op_get_by_id): - (JSC::Interpreter::cti_op_get_by_id_second): - (JSC::Interpreter::cti_op_get_by_id_generic): - (JSC::Interpreter::cti_op_get_by_id_fail): - (JSC::Interpreter::cti_op_instanceof): - (JSC::Interpreter::cti_op_del_by_id): - (JSC::Interpreter::cti_op_mul): - (JSC::Interpreter::cti_op_call_NotJSFunction): - (JSC::Interpreter::cti_op_resolve): - (JSC::Interpreter::cti_op_construct_NotJSConstruct): - (JSC::Interpreter::cti_op_get_by_val): - (JSC::Interpreter::cti_op_resolve_func): - (JSC::Interpreter::cti_op_sub): - (JSC::Interpreter::cti_op_put_by_val): - (JSC::Interpreter::cti_op_put_by_val_array): - (JSC::Interpreter::cti_op_lesseq): - (JSC::Interpreter::cti_op_loop_if_true): - (JSC::Interpreter::cti_op_negate): - (JSC::Interpreter::cti_op_resolve_skip): - (JSC::Interpreter::cti_op_resolve_global): - (JSC::Interpreter::cti_op_div): - (JSC::Interpreter::cti_op_pre_dec): - (JSC::Interpreter::cti_op_jless): - (JSC::Interpreter::cti_op_not): - (JSC::Interpreter::cti_op_jtrue): - (JSC::Interpreter::cti_op_post_inc): - (JSC::Interpreter::cti_op_eq): - (JSC::Interpreter::cti_op_lshift): - (JSC::Interpreter::cti_op_bitand): - (JSC::Interpreter::cti_op_rshift): - (JSC::Interpreter::cti_op_bitnot): - (JSC::Interpreter::cti_op_resolve_with_base): - (JSC::Interpreter::cti_op_mod): - (JSC::Interpreter::cti_op_less): - (JSC::Interpreter::cti_op_neq): - (JSC::Interpreter::cti_op_post_dec): - (JSC::Interpreter::cti_op_urshift): - (JSC::Interpreter::cti_op_bitxor): - (JSC::Interpreter::cti_op_bitor): - (JSC::Interpreter::cti_op_push_scope): - (JSC::Interpreter::cti_op_to_jsnumber): - (JSC::Interpreter::cti_op_in): - (JSC::Interpreter::cti_op_del_by_val): - * wrec/WREC.cpp: - (JSC::WREC::compileRegExp): - * wrec/WRECParser.cpp: - (JSC::WREC::Parser::parseGreedyQuantifier): - (JSC::WREC::Parser::parseParentheses): - (JSC::WREC::Parser::parseCharacterClass): - (JSC::WREC::Parser::parseEscape): - * wrec/WRECParser.h: - (JSC::WREC::Parser::): - (JSC::WREC::Parser::atEndOfPattern): - -2008-11-18 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=22337 - Enable workers by default - - * Configurations/JavaScriptCore.xcconfig: Define ENABLE_WORKERS. - -2008-11-18 Alexey Proskuryakov - - - Windows build fix - - * wrec/WRECFunctors.h: - * wrec/WRECGenerator.h: - * wrec/WRECParser.h: - CharacterClass is a struct, not a class, fix forward declarations. - -2008-11-18 Dan Bernstein - - - Windows build fix - - * assembler/X86Assembler.h: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix gtk build. - - * wrec/Quantifier.h: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix gtk build. - - * assembler/AssemblerBuffer.h: - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Split WREC classes out into individual files, with a few modifications - to more closely match the WebKit coding style. - - * GNUmakefile.am: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/X86Assembler.h: - * runtime/RegExp.cpp: - * wrec/CharacterClass.cpp: Copied from wrec/CharacterClassConstructor.cpp. - (JSC::WREC::CharacterClass::newline): - (JSC::WREC::CharacterClass::digits): - (JSC::WREC::CharacterClass::spaces): - (JSC::WREC::CharacterClass::wordchar): - (JSC::WREC::CharacterClass::nondigits): - (JSC::WREC::CharacterClass::nonspaces): - (JSC::WREC::CharacterClass::nonwordchar): - * wrec/CharacterClass.h: Copied from wrec/CharacterClassConstructor.h. - * wrec/CharacterClassConstructor.cpp: - (JSC::WREC::CharacterClassConstructor::addSortedRange): - (JSC::WREC::CharacterClassConstructor::append): - * wrec/CharacterClassConstructor.h: - * wrec/Quantifier.h: Copied from wrec/WREC.h. - * wrec/WREC.cpp: - (JSC::WREC::compileRegExp): - * wrec/WREC.h: - * wrec/WRECFunctors.cpp: Copied from wrec/WREC.cpp. - * wrec/WRECFunctors.h: Copied from wrec/WREC.cpp. - (JSC::WREC::GenerateAtomFunctor::~GenerateAtomFunctor): - (JSC::WREC::GeneratePatternCharacterFunctor::GeneratePatternCharacterFunctor): - (JSC::WREC::GenerateCharacterClassFunctor::GenerateCharacterClassFunctor): - (JSC::WREC::GenerateBackreferenceFunctor::GenerateBackreferenceFunctor): - (JSC::WREC::GenerateParenthesesNonGreedyFunctor::GenerateParenthesesNonGreedyFunctor): - * wrec/WRECGenerator.cpp: Copied from wrec/WREC.cpp. - (JSC::WREC::Generator::generatePatternCharacter): - (JSC::WREC::Generator::generateCharacterClassInvertedRange): - (JSC::WREC::Generator::generateCharacterClassInverted): - (JSC::WREC::Generator::generateCharacterClass): - (JSC::WREC::Generator::generateParentheses): - (JSC::WREC::Generator::generateAssertionBOL): - (JSC::WREC::Generator::generateAssertionEOL): - (JSC::WREC::Generator::generateAssertionWordBoundary): - * wrec/WRECGenerator.h: Copied from wrec/WREC.h. - * wrec/WRECParser.cpp: Copied from wrec/WREC.cpp. - (JSC::WREC::Parser::parseGreedyQuantifier): - (JSC::WREC::Parser::parseCharacterClassQuantifier): - (JSC::WREC::Parser::parseParentheses): - (JSC::WREC::Parser::parseCharacterClass): - (JSC::WREC::Parser::parseEscape): - (JSC::WREC::Parser::parseTerm): - * wrec/WRECParser.h: Copied from wrec/WREC.h. - (JSC::WREC::Parser::): - (JSC::WREC::Parser::Parser): - (JSC::WREC::Parser::setError): - (JSC::WREC::Parser::error): - (JSC::WREC::Parser::recordSubpattern): - (JSC::WREC::Parser::numSubpatterns): - (JSC::WREC::Parser::ignoreCase): - (JSC::WREC::Parser::multiline): - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix a few builds. - - * JavaScriptCoreSources.bkl: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix a few builds. - - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved VM/CTI.* => jit/JIT.*. - - Removed VM. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CTI.cpp: Removed. - * VM/CTI.h: Removed. - * bytecode/CodeBlock.cpp: - * interpreter/Interpreter.cpp: - * jit: Added. - * jit/JIT.cpp: Copied from VM/CTI.cpp. - * jit/JIT.h: Copied from VM/CTI.h. - * runtime/RegExp.cpp: - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved runtime/ExecState.* => interpreter/CallFrame.*. - - * API/JSBase.cpp: - * API/OpaqueJSString.cpp: - * GNUmakefile.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * debugger/DebuggerCallFrame.h: - * interpreter/CallFrame.cpp: Copied from runtime/ExecState.cpp. - * interpreter/CallFrame.h: Copied from runtime/ExecState.h. - * interpreter/Interpreter.cpp: - * parser/Nodes.cpp: - * profiler/ProfileGenerator.cpp: - * profiler/Profiler.cpp: - * runtime/ClassInfo.h: - * runtime/Collector.cpp: - * runtime/Completion.cpp: - * runtime/ExceptionHelpers.cpp: - * runtime/ExecState.cpp: Removed. - * runtime/ExecState.h: Removed. - * runtime/Identifier.cpp: - * runtime/JSFunction.cpp: - * runtime/JSGlobalObjectFunctions.cpp: - * runtime/JSLock.cpp: - * runtime/JSNumberCell.h: - * runtime/JSObject.h: - * runtime/JSString.h: - * runtime/Lookup.h: - * runtime/PropertyNameArray.h: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * API/APICast.h: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * API/APICast.h: - * runtime/ExecState.h: - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved VM/SamplingTool.* => bytecode/SamplingTool.*. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/SamplingTool.cpp: Removed. - * VM/SamplingTool.h: Removed. - * bytecode/SamplingTool.cpp: Copied from VM/SamplingTool.cpp. - * bytecode/SamplingTool.h: Copied from VM/SamplingTool.h. - * jsc.cpp: - (runWithScripts): - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * runtime/ExecState.h: - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved VM/ExceptionHelpers.cpp => runtime/ExceptionHelpers.cpp. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/ExceptionHelpers.cpp: Removed. - * runtime/ExceptionHelpers.cpp: Copied from VM/ExceptionHelpers.cpp. - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved VM/RegisterFile.cpp => interpreter/RegisterFile.cpp. - - * AllInOneFile.cpp: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/RegisterFile.cpp: Removed. - * interpreter/RegisterFile.cpp: Copied from VM/RegisterFile.cpp. - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved: - VM/ExceptionHelpers.h => runtime/ExceptionHelpers.h - VM/Register.h => interpreter/Register.h - VM/RegisterFile.h => interpreter/RegisterFile.h - - - * GNUmakefile.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/ExceptionHelpers.h: Removed. - * VM/Register.h: Removed. - * VM/RegisterFile.h: Removed. - * interpreter/Register.h: Copied from VM/Register.h. - * interpreter/RegisterFile.h: Copied from VM/RegisterFile.h. - * runtime/ExceptionHelpers.h: Copied from VM/ExceptionHelpers.h. - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Qt build. - - * JavaScriptCore.pri: - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved VM/Machine.cpp => interpreter/Interpreter.cpp. - - * DerivedSources.make: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/Machine.cpp: Removed. - * interpreter/Interpreter.cpp: Copied from VM/Machine.cpp. - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved VM/Machine.h => interpreter/Interpreter.h - - * GNUmakefile.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CTI.cpp: - * VM/CTI.h: - * VM/ExceptionHelpers.cpp: - * VM/Machine.cpp: - * VM/Machine.h: Removed. - * VM/SamplingTool.cpp: - * bytecode/CodeBlock.cpp: - * bytecompiler/BytecodeGenerator.cpp: - * bytecompiler/BytecodeGenerator.h: - * debugger/DebuggerCallFrame.cpp: - * interpreter: Added. - * interpreter/Interpreter.h: Copied from VM/Machine.h. - * profiler/ProfileGenerator.cpp: - * runtime/Arguments.h: - * runtime/ArrayPrototype.cpp: - * runtime/Collector.cpp: - * runtime/Completion.cpp: - * runtime/ExecState.h: - * runtime/FunctionPrototype.cpp: - * runtime/JSActivation.cpp: - * runtime/JSFunction.cpp: - * runtime/JSGlobalData.cpp: - * runtime/JSGlobalObject.cpp: - * runtime/JSGlobalObjectFunctions.cpp: - * wrec/WREC.cpp: - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved runtime/Interpreter.cpp => runtime/Completion.cpp. - - Moved functions from Interpreter.h to Completion.h, and removed - Interpreter.h from the project. - - * API/JSBase.cpp: - * AllInOneFile.cpp: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * jsc.cpp: - * runtime/Completion.cpp: Copied from runtime/Interpreter.cpp. - * runtime/Completion.h: - * runtime/Interpreter.cpp: Removed. - * runtime/Interpreter.h: Removed. - -2008-11-17 Gabor Loki - - Reviewed by Darin Adler. - - - Fix PCRE include path problem on Qt-port - - * JavaScriptCore.pri: - * pcre/pcre.pri: - -2008-11-17 Gabor Loki - - Reviewed by Darin Adler. - - - Add missing CTI source to the build system on Qt-port - - * JavaScriptCore.pri: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix JSGlue build. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Qt build. - - * jsc.pro: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Qt build. - - * JavaScriptCore.pri: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Qt build. - - * JavaScriptCore.pri: - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - More file moves: - - VM/CodeBlock.* => bytecode/CodeBlock.* - VM/EvalCodeCache.h => bytecode/EvalCodeCache.h - VM/Instruction.h => bytecode/Instruction.h - VM/Opcode.* => bytecode/Opcode.* - - * GNUmakefile.am: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/CodeBlock.cpp: Removed. - * VM/CodeBlock.h: Removed. - * VM/EvalCodeCache.h: Removed. - * VM/Instruction.h: Removed. - * VM/Opcode.cpp: Removed. - * VM/Opcode.h: Removed. - * bytecode: Added. - * bytecode/CodeBlock.cpp: Copied from VM/CodeBlock.cpp. - * bytecode/CodeBlock.h: Copied from VM/CodeBlock.h. - * bytecode/EvalCodeCache.h: Copied from VM/EvalCodeCache.h. - * bytecode/Instruction.h: Copied from VM/Instruction.h. - * bytecode/Opcode.cpp: Copied from VM/Opcode.cpp. - * bytecode/Opcode.h: Copied from VM/Opcode.h. - * jsc.pro: - * jscore.bkl: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix a few more builds. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCoreSources.bkl: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix gtk build. - - * GNUmakefile.am: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-11-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Some file moves: - - VM/LabelID.h => bytecompiler/Label.h - VM/RegisterID.h => bytecompiler/RegisterID.h - VM/SegmentedVector.h => bytecompiler/SegmentedVector.h - bytecompiler/CodeGenerator.* => bytecompiler/BytecodeGenerator.* - - * AllInOneFile.cpp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/LabelID.h: Removed. - * VM/RegisterID.h: Removed. - * VM/SegmentedVector.h: Removed. - * bytecompiler/BytecodeGenerator.cpp: Copied from bytecompiler/CodeGenerator.cpp. - * bytecompiler/BytecodeGenerator.h: Copied from bytecompiler/CodeGenerator.h. - * bytecompiler/CodeGenerator.cpp: Removed. - * bytecompiler/CodeGenerator.h: Removed. - * bytecompiler/Label.h: Copied from VM/LabelID.h. - * bytecompiler/LabelScope.h: - * bytecompiler/RegisterID.h: Copied from VM/RegisterID.h. - * bytecompiler/SegmentedVector.h: Copied from VM/SegmentedVector.h. - * jsc.cpp: - * parser/Nodes.cpp: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-11-17 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-11-16 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - -2008-11-16 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-11-16 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved masm => assembler and split "AssemblerBuffer.h" out of "X86Assembler.h". - - Also renamed ENABLE_MASM to ENABLE_ASSEMBLER. - - * GNUmakefile.am: - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler: Added. - * assembler/AssemblerBuffer.h: Copied from masm/X86Assembler.h. - (JSC::AssemblerBuffer::AssemblerBuffer): - (JSC::AssemblerBuffer::~AssemblerBuffer): - (JSC::AssemblerBuffer::ensureSpace): - (JSC::AssemblerBuffer::isAligned): - (JSC::AssemblerBuffer::putByteUnchecked): - (JSC::AssemblerBuffer::putByte): - (JSC::AssemblerBuffer::putShortUnchecked): - (JSC::AssemblerBuffer::putShort): - (JSC::AssemblerBuffer::putIntUnchecked): - (JSC::AssemblerBuffer::putInt): - (JSC::AssemblerBuffer::data): - (JSC::AssemblerBuffer::size): - (JSC::AssemblerBuffer::reset): - (JSC::AssemblerBuffer::executableCopy): - (JSC::AssemblerBuffer::grow): - * assembler/X86Assembler.h: Copied from masm/X86Assembler.h. - * masm: Removed. - * masm/X86Assembler.h: Removed. - * wtf/Platform.h: - -2008-11-16 Geoffrey Garen - - Not reviewed. - - Try to fix gtk build. - - * GNUmakefile.am: - -2008-11-16 Geoffrey Garen - - Not reviewed. - - Fixed tyop. - - * VM/CTI.cpp: - -2008-11-16 Geoffrey Garen - - Not reviewed. - - Try to fix windows build. - - * VM/CTI.cpp: - -2008-11-16 Geoffrey Garen - - Not reviewed. - - Try to fix gtk build. - - * GNUmakefile.am: - -2008-11-16 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed ENABLE_CTI and ENABLE(CTI) to ENABLE_JIT and ENABLE(JIT). - - * VM/CTI.cpp: - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - * VM/CodeBlock.h: - (JSC::CodeBlock::CodeBlock): - * VM/Machine.cpp: - (JSC::Interpreter::Interpreter): - (JSC::Interpreter::initialize): - (JSC::Interpreter::~Interpreter): - (JSC::Interpreter::execute): - (JSC::Interpreter::privateExecute): - * VM/Machine.h: - * bytecompiler/CodeGenerator.cpp: - (JSC::prepareJumpTableForStringSwitch): - * runtime/JSFunction.cpp: - (JSC::JSFunction::~JSFunction): - * runtime/JSGlobalData.h: - * wrec/WREC.h: - * wtf/Platform.h: - * wtf/TCSystemAlloc.cpp: - -2008-11-16 Geoffrey Garen - - Not reviewed. - - Try to fix gtk build. - - * VM/CTI.cpp: - -2008-11-16 Geoffrey Garen - - Reviewed by a few people on squirrelfish-dev. - - Renamed CTI => JIT. - - * VM/CTI.cpp: - (JSC::JIT::killLastResultRegister): - (JSC::JIT::emitGetVirtualRegister): - (JSC::JIT::emitGetVirtualRegisters): - (JSC::JIT::emitPutCTIArgFromVirtualRegister): - (JSC::JIT::emitPutCTIArg): - (JSC::JIT::emitGetCTIArg): - (JSC::JIT::emitPutCTIArgConstant): - (JSC::JIT::getConstantImmediateNumericArg): - (JSC::JIT::emitPutCTIParam): - (JSC::JIT::emitGetCTIParam): - (JSC::JIT::emitPutToCallFrameHeader): - (JSC::JIT::emitGetFromCallFrameHeader): - (JSC::JIT::emitPutVirtualRegister): - (JSC::JIT::emitInitRegister): - (JSC::JIT::printBytecodeOperandTypes): - (JSC::JIT::emitAllocateNumber): - (JSC::JIT::emitNakedCall): - (JSC::JIT::emitNakedFastCall): - (JSC::JIT::emitCTICall): - (JSC::JIT::emitJumpSlowCaseIfNotJSCell): - (JSC::JIT::linkSlowCaseIfNotJSCell): - (JSC::JIT::emitJumpSlowCaseIfNotImmNum): - (JSC::JIT::emitJumpSlowCaseIfNotImmNums): - (JSC::JIT::getDeTaggedConstantImmediate): - (JSC::JIT::emitFastArithDeTagImmediate): - (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero): - (JSC::JIT::emitFastArithReTagImmediate): - (JSC::JIT::emitFastArithPotentiallyReTagImmediate): - (JSC::JIT::emitFastArithImmToInt): - (JSC::JIT::emitFastArithIntToImmOrSlowCase): - (JSC::JIT::emitFastArithIntToImmNoCheck): - (JSC::JIT::emitArithIntToImmWithJump): - (JSC::JIT::emitTagAsBoolImmediate): - (JSC::JIT::JIT): - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpCallEvalSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emitSlowScriptCheck): - (JSC::JIT::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::JIT::compileBinaryArithOp): - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileLinkPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileGetByIdSelf): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompilePutByIdReplace): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::unlinkCall): - (JSC::JIT::linkCall): - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::freeCTIMachineTrampolines): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::emitGetVariableObjectRegister): - (JSC::JIT::emitPutVariableObjectRegister): - * VM/CTI.h: - (JSC::JIT::compile): - (JSC::JIT::compileGetByIdSelf): - (JSC::JIT::compileGetByIdProto): - (JSC::JIT::compileGetByIdChain): - (JSC::JIT::compilePutByIdReplace): - (JSC::JIT::compilePutByIdTransition): - (JSC::JIT::compileCTIMachineTrampolines): - (JSC::JIT::compilePatchGetArrayLength): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::unlinkCallers): - * VM/Machine.cpp: - (JSC::Interpreter::initialize): - (JSC::Interpreter::~Interpreter): - (JSC::Interpreter::execute): - (JSC::Interpreter::tryCTICachePutByID): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::Interpreter::cti_op_call_JSFunction): - (JSC::Interpreter::cti_vm_dontLazyLinkCall): - (JSC::Interpreter::cti_vm_lazyLinkCall): - * VM/Machine.h: - * VM/RegisterFile.h: - * parser/Nodes.h: - * runtime/JSArray.h: - * runtime/JSCell.h: - * runtime/JSFunction.h: - * runtime/JSImmediate.h: - * runtime/JSNumberCell.h: - * runtime/JSObject.h: - * runtime/JSString.h: - * runtime/JSVariableObject.h: - * runtime/ScopeChain.h: - * runtime/Structure.h: - * runtime/TypeInfo.h: - * runtime/UString.h: - -2008-11-16 Geoffrey Garen - - Not reviewed. - - Try to fix wx build. - - * jscore.bkl: - -2008-11-16 Geoffrey Garen - - Reviewed by Sam Weinig. - - Nixed X86:: and X86Assembler:: prefixes in a lot of places using typedefs. - - * VM/CTI.cpp: - (JSC::CTI::emitGetVirtualRegister): - (JSC::CTI::emitGetVirtualRegisters): - (JSC::CTI::emitPutCTIArgFromVirtualRegister): - (JSC::CTI::emitPutCTIArg): - (JSC::CTI::emitGetCTIArg): - (JSC::CTI::emitPutCTIParam): - (JSC::CTI::emitGetCTIParam): - (JSC::CTI::emitPutToCallFrameHeader): - (JSC::CTI::emitGetFromCallFrameHeader): - (JSC::CTI::emitPutVirtualRegister): - (JSC::CTI::emitNakedCall): - (JSC::CTI::emitNakedFastCall): - (JSC::CTI::emitCTICall): - (JSC::CTI::emitJumpSlowCaseIfNotJSCell): - (JSC::CTI::emitJumpSlowCaseIfNotImmNum): - (JSC::CTI::emitJumpSlowCaseIfNotImmNums): - (JSC::CTI::emitFastArithDeTagImmediate): - (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero): - (JSC::CTI::emitFastArithReTagImmediate): - (JSC::CTI::emitFastArithPotentiallyReTagImmediate): - (JSC::CTI::emitFastArithImmToInt): - (JSC::CTI::emitFastArithIntToImmOrSlowCase): - (JSC::CTI::emitFastArithIntToImmNoCheck): - (JSC::CTI::emitArithIntToImmWithJump): - (JSC::CTI::emitTagAsBoolImmediate): - (JSC::CTI::compileOpCall): - (JSC::CTI::compileOpStrictEq): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::CTI::privateCompilePutByIdTransition): - (JSC::CTI::privateCompileCTIMachineTrampolines): - (JSC::CTI::privateCompilePatchGetArrayLength): - (JSC::CTI::emitGetVariableObjectRegister): - (JSC::CTI::emitPutVariableObjectRegister): - * VM/CTI.h: - (JSC::CallRecord::CallRecord): - (JSC::JmpTable::JmpTable): - (JSC::SlowCaseEntry::SlowCaseEntry): - (JSC::CTI::JSRInfo::JSRInfo): - * wrec/WREC.h: - -2008-11-16 Geoffrey Garen - - Not reviewed. - - Try to fix Qt build. - - * JavaScriptCore.pri: - -2008-11-16 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed OBJECT_OFFSET => FIELD_OFFSET - - Nixed use of OBJECT_OFFSET outside of CTI.cpp by making CTI a friend in - more places. - - * VM/CTI.cpp: - (JSC::CTI::compileOpCallInitializeCallFrame): - (JSC::CTI::compileOpCall): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::CTI::privateCompilePutByIdTransition): - (JSC::CTI::privateCompileCTIMachineTrampolines): - (JSC::CTI::privateCompilePatchGetArrayLength): - (JSC::CTI::emitGetVariableObjectRegister): - (JSC::CTI::emitPutVariableObjectRegister): - * runtime/JSValue.h: - * runtime/JSVariableObject.h: - -2008-11-16 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renames: - - X86Assembler::copy => X86Assembler::executableCopy - AssemblerBuffer::copy => AssemblerBuffer::executableCopy - - * VM/CTI.cpp: - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::CTI::privateCompilePutByIdTransition): - (JSC::CTI::privateCompileCTIMachineTrampolines): - (JSC::CTI::privateCompilePatchGetArrayLength): - * masm/X86Assembler.h: - (JSC::AssemblerBuffer::executableCopy): - (JSC::X86Assembler::executableCopy): - * wrec/WREC.cpp: - (JSC::WREC::compileRegExp): - -2008-11-16 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed WREC => JSC::WREC, removing JSC:: prefix in a lot of places. - Renamed WRECFunction => WREC::CompiledRegExp, and deployed this type - name in place of a few casts. - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::~RegExp): - (JSC::RegExp::match): - * runtime/RegExp.h: - * wrec/CharacterClassConstructor.cpp: - * wrec/CharacterClassConstructor.h: - * wrec/WREC.cpp: - (JSC::WREC::compileRegExp): - * wrec/WREC.h: - (JSC::WREC::Generator::Generator): - (JSC::WREC::Parser::Parser): - (JSC::WREC::Parser::parseAlternative): - -2008-11-16 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed BytecodeInterpreter => Interpreter. - - * JavaScriptCore.exp: - * VM/CTI.cpp: - (JSC::): - (JSC::CTI::compileOpCall): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::CTI::privateCompilePutByIdTransition): - (JSC::CTI::privateCompileCTIMachineTrampolines): - (JSC::CTI::freeCTIMachineTrampolines): - (JSC::CTI::patchGetByIdSelf): - (JSC::CTI::patchPutByIdReplace): - (JSC::CTI::privateCompilePatchGetArrayLength): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::derefStructures): - (JSC::CodeBlock::refStructures): - * VM/Machine.cpp: - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveBase): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::resolveBaseAndFunc): - (JSC::Interpreter::slideRegisterWindowForCall): - (JSC::Interpreter::callEval): - (JSC::Interpreter::Interpreter): - (JSC::Interpreter::initialize): - (JSC::Interpreter::~Interpreter): - (JSC::Interpreter::dumpCallFrame): - (JSC::Interpreter::dumpRegisters): - (JSC::Interpreter::isOpcode): - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::debug): - (JSC::Interpreter::resetTimeoutCheck): - (JSC::Interpreter::checkTimeout): - (JSC::Interpreter::createExceptionScope): - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::uncachePutByID): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::uncacheGetByID): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): - (JSC::Interpreter::retrieveCaller): - (JSC::Interpreter::retrieveLastCaller): - (JSC::Interpreter::findFunctionCallFrame): - (JSC::Interpreter::tryCTICachePutByID): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::Interpreter::cti_op_convert_this): - (JSC::Interpreter::cti_op_end): - (JSC::Interpreter::cti_op_add): - (JSC::Interpreter::cti_op_pre_inc): - (JSC::Interpreter::cti_timeout_check): - (JSC::Interpreter::cti_register_file_check): - (JSC::Interpreter::cti_op_loop_if_less): - (JSC::Interpreter::cti_op_loop_if_lesseq): - (JSC::Interpreter::cti_op_new_object): - (JSC::Interpreter::cti_op_put_by_id): - (JSC::Interpreter::cti_op_put_by_id_second): - (JSC::Interpreter::cti_op_put_by_id_generic): - (JSC::Interpreter::cti_op_put_by_id_fail): - (JSC::Interpreter::cti_op_get_by_id): - (JSC::Interpreter::cti_op_get_by_id_second): - (JSC::Interpreter::cti_op_get_by_id_generic): - (JSC::Interpreter::cti_op_get_by_id_fail): - (JSC::Interpreter::cti_op_instanceof): - (JSC::Interpreter::cti_op_del_by_id): - (JSC::Interpreter::cti_op_mul): - (JSC::Interpreter::cti_op_new_func): - (JSC::Interpreter::cti_op_call_JSFunction): - (JSC::Interpreter::cti_op_call_arityCheck): - (JSC::Interpreter::cti_vm_dontLazyLinkCall): - (JSC::Interpreter::cti_vm_lazyLinkCall): - (JSC::Interpreter::cti_op_push_activation): - (JSC::Interpreter::cti_op_call_NotJSFunction): - (JSC::Interpreter::cti_op_create_arguments): - (JSC::Interpreter::cti_op_create_arguments_no_params): - (JSC::Interpreter::cti_op_tear_off_activation): - (JSC::Interpreter::cti_op_tear_off_arguments): - (JSC::Interpreter::cti_op_profile_will_call): - (JSC::Interpreter::cti_op_profile_did_call): - (JSC::Interpreter::cti_op_ret_scopeChain): - (JSC::Interpreter::cti_op_new_array): - (JSC::Interpreter::cti_op_resolve): - (JSC::Interpreter::cti_op_construct_JSConstruct): - (JSC::Interpreter::cti_op_construct_NotJSConstruct): - (JSC::Interpreter::cti_op_get_by_val): - (JSC::Interpreter::cti_op_resolve_func): - (JSC::Interpreter::cti_op_sub): - (JSC::Interpreter::cti_op_put_by_val): - (JSC::Interpreter::cti_op_put_by_val_array): - (JSC::Interpreter::cti_op_lesseq): - (JSC::Interpreter::cti_op_loop_if_true): - (JSC::Interpreter::cti_op_negate): - (JSC::Interpreter::cti_op_resolve_base): - (JSC::Interpreter::cti_op_resolve_skip): - (JSC::Interpreter::cti_op_resolve_global): - (JSC::Interpreter::cti_op_div): - (JSC::Interpreter::cti_op_pre_dec): - (JSC::Interpreter::cti_op_jless): - (JSC::Interpreter::cti_op_not): - (JSC::Interpreter::cti_op_jtrue): - (JSC::Interpreter::cti_op_post_inc): - (JSC::Interpreter::cti_op_eq): - (JSC::Interpreter::cti_op_lshift): - (JSC::Interpreter::cti_op_bitand): - (JSC::Interpreter::cti_op_rshift): - (JSC::Interpreter::cti_op_bitnot): - (JSC::Interpreter::cti_op_resolve_with_base): - (JSC::Interpreter::cti_op_new_func_exp): - (JSC::Interpreter::cti_op_mod): - (JSC::Interpreter::cti_op_less): - (JSC::Interpreter::cti_op_neq): - (JSC::Interpreter::cti_op_post_dec): - (JSC::Interpreter::cti_op_urshift): - (JSC::Interpreter::cti_op_bitxor): - (JSC::Interpreter::cti_op_new_regexp): - (JSC::Interpreter::cti_op_bitor): - (JSC::Interpreter::cti_op_call_eval): - (JSC::Interpreter::cti_op_throw): - (JSC::Interpreter::cti_op_get_pnames): - (JSC::Interpreter::cti_op_next_pname): - (JSC::Interpreter::cti_op_push_scope): - (JSC::Interpreter::cti_op_pop_scope): - (JSC::Interpreter::cti_op_typeof): - (JSC::Interpreter::cti_op_is_undefined): - (JSC::Interpreter::cti_op_is_boolean): - (JSC::Interpreter::cti_op_is_number): - (JSC::Interpreter::cti_op_is_string): - (JSC::Interpreter::cti_op_is_object): - (JSC::Interpreter::cti_op_is_function): - (JSC::Interpreter::cti_op_stricteq): - (JSC::Interpreter::cti_op_nstricteq): - (JSC::Interpreter::cti_op_to_jsnumber): - (JSC::Interpreter::cti_op_in): - (JSC::Interpreter::cti_op_push_new_scope): - (JSC::Interpreter::cti_op_jmp_scopes): - (JSC::Interpreter::cti_op_put_by_index): - (JSC::Interpreter::cti_op_switch_imm): - (JSC::Interpreter::cti_op_switch_char): - (JSC::Interpreter::cti_op_switch_string): - (JSC::Interpreter::cti_op_del_by_val): - (JSC::Interpreter::cti_op_put_getter): - (JSC::Interpreter::cti_op_put_setter): - (JSC::Interpreter::cti_op_new_error): - (JSC::Interpreter::cti_op_debug): - (JSC::Interpreter::cti_vm_throw): - * VM/Machine.h: - * VM/Register.h: - * VM/SamplingTool.h: - (JSC::SamplingTool::SamplingTool): - * bytecompiler/CodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): - (JSC::BytecodeGenerator::BytecodeGenerator): - * jsc.cpp: - (runWithScripts): - * runtime/ExecState.h: - (JSC::ExecState::interpreter): - * runtime/JSCell.h: - * runtime/JSFunction.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSString.h: - * wrec/WREC.cpp: - (WREC::compileRegExp): - * wrec/WREC.h: - -2008-11-16 Geoffrey Garen - - Roll out r38461 (my last patch) because it broke the world. - -2008-11-16 Geoffrey Garen - - Reviewed by Sam Weinig. - - A few more renames: - - BytecodeInterpreter => Interpreter - WREC => JSC::WREC, removing JSC:: prefix in a lot of places - X86Assembler::copy => X86Assembler::executableCopy - AssemblerBuffer::copy => AssemblerBuffer::executableCopy - WRECFunction => WREC::RegExpFunction - OBJECT_OFFSET => FIELD_OFFSET - - Also: - - Nixed use of OBJECT_OFFSET outside of CTI.cpp by making CTI a friend in more places. - Nixed X86:: and X86Assembler:: prefixes in a lot of places using typedefs - - * JavaScriptCore.exp: - * VM/CTI.cpp: - (JSC::): - (JSC::CTI::emitGetVirtualRegister): - (JSC::CTI::emitGetVirtualRegisters): - (JSC::CTI::emitPutCTIArgFromVirtualRegister): - (JSC::CTI::emitPutCTIArg): - (JSC::CTI::emitGetCTIArg): - (JSC::CTI::emitPutCTIParam): - (JSC::CTI::emitGetCTIParam): - (JSC::CTI::emitPutToCallFrameHeader): - (JSC::CTI::emitGetFromCallFrameHeader): - (JSC::CTI::emitPutVirtualRegister): - (JSC::CTI::emitNakedCall): - (JSC::CTI::emitNakedFastCall): - (JSC::CTI::emitCTICall): - (JSC::CTI::emitJumpSlowCaseIfNotJSCell): - (JSC::CTI::emitJumpSlowCaseIfNotImmNum): - (JSC::CTI::emitJumpSlowCaseIfNotImmNums): - (JSC::CTI::emitFastArithDeTagImmediate): - (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero): - (JSC::CTI::emitFastArithReTagImmediate): - (JSC::CTI::emitFastArithPotentiallyReTagImmediate): - (JSC::CTI::emitFastArithImmToInt): - (JSC::CTI::emitFastArithIntToImmOrSlowCase): - (JSC::CTI::emitFastArithIntToImmNoCheck): - (JSC::CTI::emitArithIntToImmWithJump): - (JSC::CTI::emitTagAsBoolImmediate): - (JSC::CTI::compileOpCallInitializeCallFrame): - (JSC::CTI::compileOpCall): - (JSC::CTI::compileOpStrictEq): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::CTI::privateCompilePutByIdTransition): - (JSC::CTI::privateCompileCTIMachineTrampolines): - (JSC::CTI::freeCTIMachineTrampolines): - (JSC::CTI::patchGetByIdSelf): - (JSC::CTI::patchPutByIdReplace): - (JSC::CTI::privateCompilePatchGetArrayLength): - (JSC::CTI::emitGetVariableObjectRegister): - (JSC::CTI::emitPutVariableObjectRegister): - * VM/CTI.h: - (JSC::CallRecord::CallRecord): - (JSC::JmpTable::JmpTable): - (JSC::SlowCaseEntry::SlowCaseEntry): - (JSC::CTI::JSRInfo::JSRInfo): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::derefStructures): - (JSC::CodeBlock::refStructures): - * VM/Machine.cpp: - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveBase): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::resolveBaseAndFunc): - (JSC::Interpreter::slideRegisterWindowForCall): - (JSC::Interpreter::callEval): - (JSC::Interpreter::Interpreter): - (JSC::Interpreter::initialize): - (JSC::Interpreter::~Interpreter): - (JSC::Interpreter::dumpCallFrame): - (JSC::Interpreter::dumpRegisters): - (JSC::Interpreter::isOpcode): - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::debug): - (JSC::Interpreter::resetTimeoutCheck): - (JSC::Interpreter::checkTimeout): - (JSC::Interpreter::createExceptionScope): - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::uncachePutByID): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::uncacheGetByID): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): - (JSC::Interpreter::retrieveCaller): - (JSC::Interpreter::retrieveLastCaller): - (JSC::Interpreter::findFunctionCallFrame): - (JSC::Interpreter::tryCTICachePutByID): - (JSC::Interpreter::tryCTICacheGetByID): - (JSC::): - (JSC::Interpreter::cti_op_convert_this): - (JSC::Interpreter::cti_op_end): - (JSC::Interpreter::cti_op_add): - (JSC::Interpreter::cti_op_pre_inc): - (JSC::Interpreter::cti_timeout_check): - (JSC::Interpreter::cti_register_file_check): - (JSC::Interpreter::cti_op_loop_if_less): - (JSC::Interpreter::cti_op_loop_if_lesseq): - (JSC::Interpreter::cti_op_new_object): - (JSC::Interpreter::cti_op_put_by_id): - (JSC::Interpreter::cti_op_put_by_id_second): - (JSC::Interpreter::cti_op_put_by_id_generic): - (JSC::Interpreter::cti_op_put_by_id_fail): - (JSC::Interpreter::cti_op_get_by_id): - (JSC::Interpreter::cti_op_get_by_id_second): - (JSC::Interpreter::cti_op_get_by_id_generic): - (JSC::Interpreter::cti_op_get_by_id_fail): - (JSC::Interpreter::cti_op_instanceof): - (JSC::Interpreter::cti_op_del_by_id): - (JSC::Interpreter::cti_op_mul): - (JSC::Interpreter::cti_op_new_func): - (JSC::Interpreter::cti_op_call_JSFunction): - (JSC::Interpreter::cti_op_call_arityCheck): - (JSC::Interpreter::cti_vm_dontLazyLinkCall): - (JSC::Interpreter::cti_vm_lazyLinkCall): - (JSC::Interpreter::cti_op_push_activation): - (JSC::Interpreter::cti_op_call_NotJSFunction): - (JSC::Interpreter::cti_op_create_arguments): - (JSC::Interpreter::cti_op_create_arguments_no_params): - (JSC::Interpreter::cti_op_tear_off_activation): - (JSC::Interpreter::cti_op_tear_off_arguments): - (JSC::Interpreter::cti_op_profile_will_call): - (JSC::Interpreter::cti_op_profile_did_call): - (JSC::Interpreter::cti_op_ret_scopeChain): - (JSC::Interpreter::cti_op_new_array): - (JSC::Interpreter::cti_op_resolve): - (JSC::Interpreter::cti_op_construct_JSConstruct): - (JSC::Interpreter::cti_op_construct_NotJSConstruct): - (JSC::Interpreter::cti_op_get_by_val): - (JSC::Interpreter::cti_op_resolve_func): - (JSC::Interpreter::cti_op_sub): - (JSC::Interpreter::cti_op_put_by_val): - (JSC::Interpreter::cti_op_put_by_val_array): - (JSC::Interpreter::cti_op_lesseq): - (JSC::Interpreter::cti_op_loop_if_true): - (JSC::Interpreter::cti_op_negate): - (JSC::Interpreter::cti_op_resolve_base): - (JSC::Interpreter::cti_op_resolve_skip): - (JSC::Interpreter::cti_op_resolve_global): - (JSC::Interpreter::cti_op_div): - (JSC::Interpreter::cti_op_pre_dec): - (JSC::Interpreter::cti_op_jless): - (JSC::Interpreter::cti_op_not): - (JSC::Interpreter::cti_op_jtrue): - (JSC::Interpreter::cti_op_post_inc): - (JSC::Interpreter::cti_op_eq): - (JSC::Interpreter::cti_op_lshift): - (JSC::Interpreter::cti_op_bitand): - (JSC::Interpreter::cti_op_rshift): - (JSC::Interpreter::cti_op_bitnot): - (JSC::Interpreter::cti_op_resolve_with_base): - (JSC::Interpreter::cti_op_new_func_exp): - (JSC::Interpreter::cti_op_mod): - (JSC::Interpreter::cti_op_less): - (JSC::Interpreter::cti_op_neq): - (JSC::Interpreter::cti_op_post_dec): - (JSC::Interpreter::cti_op_urshift): - (JSC::Interpreter::cti_op_bitxor): - (JSC::Interpreter::cti_op_new_regexp): - (JSC::Interpreter::cti_op_bitor): - (JSC::Interpreter::cti_op_call_eval): - (JSC::Interpreter::cti_op_throw): - (JSC::Interpreter::cti_op_get_pnames): - (JSC::Interpreter::cti_op_next_pname): - (JSC::Interpreter::cti_op_push_scope): - (JSC::Interpreter::cti_op_pop_scope): - (JSC::Interpreter::cti_op_typeof): - (JSC::Interpreter::cti_op_is_undefined): - (JSC::Interpreter::cti_op_is_boolean): - (JSC::Interpreter::cti_op_is_number): - (JSC::Interpreter::cti_op_is_string): - (JSC::Interpreter::cti_op_is_object): - (JSC::Interpreter::cti_op_is_function): - (JSC::Interpreter::cti_op_stricteq): - (JSC::Interpreter::cti_op_nstricteq): - (JSC::Interpreter::cti_op_to_jsnumber): - (JSC::Interpreter::cti_op_in): - (JSC::Interpreter::cti_op_push_new_scope): - (JSC::Interpreter::cti_op_jmp_scopes): - (JSC::Interpreter::cti_op_put_by_index): - (JSC::Interpreter::cti_op_switch_imm): - (JSC::Interpreter::cti_op_switch_char): - (JSC::Interpreter::cti_op_switch_string): - (JSC::Interpreter::cti_op_del_by_val): - (JSC::Interpreter::cti_op_put_getter): - (JSC::Interpreter::cti_op_put_setter): - (JSC::Interpreter::cti_op_new_error): - (JSC::Interpreter::cti_op_debug): - (JSC::Interpreter::cti_vm_throw): - * VM/Machine.h: - * VM/Register.h: - * VM/SamplingTool.cpp: - (JSC::SamplingTool::dump): - * VM/SamplingTool.h: - (JSC::SamplingTool::SamplingTool): - * bytecompiler/CodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): - (JSC::BytecodeGenerator::BytecodeGenerator): - * jsc.cpp: - (runWithScripts): - * masm/X86Assembler.h: - (JSC::AssemblerBuffer::executableCopy): - (JSC::X86Assembler::executableCopy): - * runtime/ExecState.h: - (JSC::ExecState::interpreter): - * runtime/JSCell.h: - * runtime/JSFunction.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSImmediate.h: - * runtime/JSString.h: - * runtime/JSValue.h: - * runtime/JSVariableObject.h: - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::~RegExp): - (JSC::RegExp::match): - * runtime/RegExp.h: - * wrec/CharacterClassConstructor.cpp: - * wrec/CharacterClassConstructor.h: - * wrec/WREC.cpp: - (JSC::WREC::compileRegExp): - * wrec/WREC.h: - (JSC::WREC::Generator::Generator): - (JSC::WREC::Parser::): - (JSC::WREC::Parser::Parser): - (JSC::WREC::Parser::parseAlternative): - -2008-11-16 Greg Bolsinga - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=21810 - Remove use of static C++ objects that are destroyed at exit time (destructors) - - Conditionally have the DEFINE_STATIC_LOCAL workaround - (Codegen issue with C++ static reference in gcc build 5465) based upon the compiler - build versions. It will use the: - static T& = *new T; - style for all other compilers. - - * wtf/StdLibExtras.h: - -2008-11-16 Alexey Proskuryakov - - Reviewed by Dan Bernstein. - - https://bugs.webkit.org/show_bug.cgi?id=22290 - Remove cross-heap GC and MessagePort multi-threading support - - It is broken (and may not be implementable at all), and no longer needed, as we - don't use MessagePorts for communication with workers any more. - - * JavaScriptCore.exp: - * runtime/Collector.cpp: - (JSC::Heap::collect): - * runtime/JSGlobalObject.cpp: - * runtime/JSGlobalObject.h: - Remove hooks for cross-heap GC. - -2008-11-15 Sam Weinig - - Reviewed by Cameron Zwarich. - - Cleanup jsc command line code a little. - - * jsc.cpp: - (functionQuit): - (main): Use standard exit status macros - (cleanupGlobalData): Factor out cleanup code into this function. - (printUsageStatement): Use standard exit status macros. - -2008-11-15 Sam Weinig - - Reviewed by Cameron Zwarich. - - Cleanup BytecodeGenerator constructors. - - * bytecompiler/CodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - * bytecompiler/CodeGenerator.h: - * parser/Nodes.cpp: - (JSC::ProgramNode::generateBytecode): - -2008-11-15 Darin Adler - - Rubber stamped by Geoff Garen. - - - do the long-planned StructureID -> Structure rename - - * API/JSCallbackConstructor.cpp: - (JSC::JSCallbackConstructor::JSCallbackConstructor): - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * API/JSCallbackObjectFunctions.h: - (JSC::::JSCallbackObject): - * API/JSValueRef.cpp: - (JSValueIsInstanceOfConstructor): - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.scons: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/CTI.cpp: - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::transitionWillNeedStorageRealloc): - (JSC::CTI::privateCompilePutByIdTransition): - (JSC::CTI::patchGetByIdSelf): - (JSC::CTI::patchPutByIdReplace): - * VM/CTI.h: - (JSC::CTI::compileGetByIdSelf): - (JSC::CTI::compileGetByIdProto): - (JSC::CTI::compileGetByIdChain): - (JSC::CTI::compilePutByIdReplace): - (JSC::CTI::compilePutByIdTransition): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::printStructure): - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::~CodeBlock): - (JSC::CodeBlock::derefStructures): - (JSC::CodeBlock::refStructures): - * VM/CodeBlock.h: - * VM/Instruction.h: - (JSC::Instruction::Instruction): - (JSC::Instruction::): - * VM/Machine.cpp: - (JSC::jsTypeStringForValue): - (JSC::jsIsObjectType): - (JSC::BytecodeInterpreter::resolveGlobal): - (JSC::BytecodeInterpreter::BytecodeInterpreter): - (JSC::cachePrototypeChain): - (JSC::BytecodeInterpreter::tryCachePutByID): - (JSC::BytecodeInterpreter::uncachePutByID): - (JSC::BytecodeInterpreter::tryCacheGetByID): - (JSC::BytecodeInterpreter::uncacheGetByID): - (JSC::BytecodeInterpreter::privateExecute): - (JSC::BytecodeInterpreter::tryCTICachePutByID): - (JSC::BytecodeInterpreter::tryCTICacheGetByID): - (JSC::BytecodeInterpreter::cti_op_instanceof): - (JSC::BytecodeInterpreter::cti_op_construct_JSConstruct): - (JSC::BytecodeInterpreter::cti_op_resolve_global): - (JSC::BytecodeInterpreter::cti_op_is_undefined): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - * runtime/ArrayConstructor.h: - * runtime/ArrayPrototype.cpp: - (JSC::ArrayPrototype::ArrayPrototype): - * runtime/ArrayPrototype.h: - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): - (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): - * runtime/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - * runtime/BooleanConstructor.h: - * runtime/BooleanObject.cpp: - (JSC::BooleanObject::BooleanObject): - * runtime/BooleanObject.h: - * runtime/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * runtime/BooleanPrototype.h: - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * runtime/DateConstructor.h: - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DateInstance.h: - * runtime/DatePrototype.cpp: - (JSC::DatePrototype::DatePrototype): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * runtime/ErrorConstructor.h: - * runtime/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - * runtime/ErrorInstance.h: - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/ErrorPrototype.h: - * runtime/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * runtime/FunctionConstructor.h: - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - (JSC::FunctionPrototype::addFunctionProperties): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::GlobalEvalFunction): - * runtime/GlobalEvalFunction.h: - * runtime/Identifier.h: - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - (JSC::InternalFunction::InternalFunction): - * runtime/JSActivation.cpp: - (JSC::JSActivation::JSActivation): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - * runtime/JSArray.h: - (JSC::JSArray::createStructure): - * runtime/JSCell.h: - (JSC::JSCell::JSCell): - (JSC::JSCell::isObject): - (JSC::JSCell::isString): - (JSC::JSCell::structure): - (JSC::JSValue::needsThisConversion): - * runtime/JSFunction.cpp: - (JSC::JSFunction::construct): - * runtime/JSFunction.h: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::createStructure): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::createLeaked): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::JSGlobalObject::reset): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObject): - (JSC::JSGlobalObject::argumentsStructure): - (JSC::JSGlobalObject::arrayStructure): - (JSC::JSGlobalObject::booleanObjectStructure): - (JSC::JSGlobalObject::callbackConstructorStructure): - (JSC::JSGlobalObject::callbackFunctionStructure): - (JSC::JSGlobalObject::callbackObjectStructure): - (JSC::JSGlobalObject::dateStructure): - (JSC::JSGlobalObject::emptyObjectStructure): - (JSC::JSGlobalObject::errorStructure): - (JSC::JSGlobalObject::functionStructure): - (JSC::JSGlobalObject::numberObjectStructure): - (JSC::JSGlobalObject::prototypeFunctionStructure): - (JSC::JSGlobalObject::regExpMatchesArrayStructure): - (JSC::JSGlobalObject::regExpStructure): - (JSC::JSGlobalObject::stringObjectStructure): - (JSC::JSGlobalObject::createStructure): - (JSC::Structure::prototypeForLookup): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::createStructure): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::createStructure): - (JSC::JSNumberCell::JSNumberCell): - * runtime/JSObject.cpp: - (JSC::JSObject::mark): - (JSC::JSObject::put): - (JSC::JSObject::deleteProperty): - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::JSObject::getPropertyAttributes): - (JSC::JSObject::getPropertyNames): - (JSC::JSObject::removeDirect): - (JSC::JSObject::createInheritorID): - * runtime/JSObject.h: - (JSC::JSObject::getDirect): - (JSC::JSObject::getDirectLocation): - (JSC::JSObject::hasCustomProperties): - (JSC::JSObject::hasGetterSetterProperties): - (JSC::JSObject::createStructure): - (JSC::JSObject::JSObject): - (JSC::JSObject::~JSObject): - (JSC::JSObject::prototype): - (JSC::JSObject::setPrototype): - (JSC::JSObject::setStructure): - (JSC::JSObject::inheritorID): - (JSC::JSObject::inlineGetOwnPropertySlot): - (JSC::JSObject::getOwnPropertySlotForWrite): - (JSC::JSCell::fastGetOwnPropertySlot): - (JSC::JSObject::putDirect): - (JSC::JSObject::putDirectWithoutTransition): - (JSC::JSObject::transitionTo): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::next): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::JSStaticScopeObject): - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSString.h: - (JSC::JSString::JSString): - (JSC::JSString::createStructure): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::JSVariableObject): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::JSWrapperObject): - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/NativeErrorConstructor.h: - * runtime/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * runtime/NativeErrorPrototype.h: - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.cpp: - (JSC::NumberObject::NumberObject): - * runtime/NumberObject.h: - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * runtime/NumberPrototype.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - * runtime/ObjectConstructor.h: - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): - * runtime/ObjectPrototype.h: - * runtime/Operations.h: - (JSC::equalSlowCaseInline): - * runtime/PropertyNameArray.h: - (JSC::PropertyNameArrayData::setCachedStructure): - (JSC::PropertyNameArrayData::cachedStructure): - (JSC::PropertyNameArrayData::setCachedPrototypeChain): - (JSC::PropertyNameArrayData::cachedPrototypeChain): - (JSC::PropertyNameArrayData::PropertyNameArrayData): - * runtime/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * runtime/PrototypeFunction.h: - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::RegExpObject): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/RegExpPrototype.cpp: - (JSC::RegExpPrototype::RegExpPrototype): - * runtime/RegExpPrototype.h: - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * runtime/StringConstructor.h: - * runtime/StringObject.cpp: - (JSC::StringObject::StringObject): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::create): - (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined): - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * runtime/StringPrototype.h: - * runtime/Structure.cpp: Copied from JavaScriptCore/runtime/StructureID.cpp. - (JSC::Structure::dumpStatistics): - (JSC::Structure::Structure): - (JSC::Structure::~Structure): - (JSC::Structure::startIgnoringLeaks): - (JSC::Structure::stopIgnoringLeaks): - (JSC::Structure::materializePropertyMap): - (JSC::Structure::getEnumerablePropertyNames): - (JSC::Structure::clearEnumerationCache): - (JSC::Structure::growPropertyStorageCapacity): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::removePropertyTransition): - (JSC::Structure::changePrototypeTransition): - (JSC::Structure::getterSetterTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::fromDictionaryTransition): - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::removePropertyWithoutTransition): - (JSC::Structure::createCachedPrototypeChain): - (JSC::Structure::checkConsistency): - (JSC::Structure::copyPropertyTable): - (JSC::Structure::get): - (JSC::Structure::put): - (JSC::Structure::remove): - (JSC::Structure::insertIntoPropertyMapHashTable): - (JSC::Structure::createPropertyMapHashTable): - (JSC::Structure::expandPropertyMapHashTable): - (JSC::Structure::rehashPropertyMapHashTable): - (JSC::Structure::getEnumerablePropertyNamesInternal): - * runtime/Structure.h: Copied from JavaScriptCore/runtime/StructureID.h. - (JSC::Structure::create): - (JSC::Structure::previousID): - (JSC::Structure::setCachedPrototypeChain): - (JSC::Structure::cachedPrototypeChain): - (JSC::Structure::): - (JSC::Structure::get): - * runtime/StructureChain.cpp: Copied from JavaScriptCore/runtime/StructureIDChain.cpp. - (JSC::StructureChain::StructureChain): - (JSC::structureChainsAreEqual): - * runtime/StructureChain.h: Copied from JavaScriptCore/runtime/StructureIDChain.h. - (JSC::StructureChain::create): - (JSC::StructureChain::head): - * runtime/StructureID.cpp: Removed. - * runtime/StructureID.h: Removed. - * runtime/StructureIDChain.cpp: Removed. - * runtime/StructureIDChain.h: Removed. - * runtime/StructureIDTransitionTable.h: Removed. - * runtime/StructureTransitionTable.h: Copied from JavaScriptCore/runtime/StructureIDTransitionTable.h. - -2008-11-15 Darin Adler - - - fix non-WREC build - - * runtime/RegExp.cpp: Put "using namespace WREC" inside #if ENABLE(WREC). - -2008-11-15 Kevin Ollivier - - Reviewed by Timothy Hatcher. - - As ThreadingNone doesn't implement threads, isMainThread should return true, - not false. - - https://bugs.webkit.org/show_bug.cgi?id=22285 - - * wtf/ThreadingNone.cpp: - (WTF::isMainThread): - -2008-11-15 Geoffrey Garen - - Reviewed by Sam Weinig. - - Moved all WREC-related code into WREC.cpp and put it in a WREC namespace. - Removed the WREC prefix from class names. - - * VM/CTI.cpp: - * VM/CTI.h: - * VM/Machine.h: - (JSC::BytecodeInterpreter::assemblerBuffer): - * masm/X86Assembler.h: - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * wrec/CharacterClassConstructor.cpp: - * wrec/CharacterClassConstructor.h: - * wrec/WREC.cpp: - (WREC::GenerateParenthesesNonGreedyFunctor::GenerateParenthesesNonGreedyFunctor): - (WREC::GeneratePatternCharacterFunctor::generateAtom): - (WREC::GeneratePatternCharacterFunctor::backtrack): - (WREC::GenerateCharacterClassFunctor::generateAtom): - (WREC::GenerateCharacterClassFunctor::backtrack): - (WREC::GenerateBackreferenceFunctor::generateAtom): - (WREC::GenerateBackreferenceFunctor::backtrack): - (WREC::GenerateParenthesesNonGreedyFunctor::generateAtom): - (WREC::GenerateParenthesesNonGreedyFunctor::backtrack): - (WREC::Generator::generateBacktrack1): - (WREC::Generator::generateBacktrackBackreference): - (WREC::Generator::generateBackreferenceQuantifier): - (WREC::Generator::generateNonGreedyQuantifier): - (WREC::Generator::generateGreedyQuantifier): - (WREC::Generator::generatePatternCharacter): - (WREC::Generator::generateCharacterClassInvertedRange): - (WREC::Generator::generateCharacterClassInverted): - (WREC::Generator::generateCharacterClass): - (WREC::Generator::generateParentheses): - (WREC::Generator::generateParenthesesNonGreedy): - (WREC::Generator::generateParenthesesResetTrampoline): - (WREC::Generator::generateAssertionBOL): - (WREC::Generator::generateAssertionEOL): - (WREC::Generator::generateAssertionWordBoundary): - (WREC::Generator::generateBackreference): - (WREC::Generator::generateDisjunction): - (WREC::Generator::terminateDisjunction): - (WREC::Parser::parseGreedyQuantifier): - (WREC::Parser::parseQuantifier): - (WREC::Parser::parsePatternCharacterQualifier): - (WREC::Parser::parseCharacterClassQuantifier): - (WREC::Parser::parseBackreferenceQuantifier): - (WREC::Parser::parseParentheses): - (WREC::Parser::parseCharacterClass): - (WREC::Parser::parseOctalEscape): - (WREC::Parser::parseEscape): - (WREC::Parser::parseTerm): - (WREC::Parser::parseDisjunction): - (WREC::compileRegExp): - * wrec/WREC.h: - (WREC::Generator::Generator): - (WREC::Parser::Parser): - (WREC::Parser::parseAlternative): - -2008-11-15 Geoffrey Garen - - Reviewed by Sam Weinig. - - Changed another case of "m_jit" to "m_assembler". - - * VM/CTI.cpp: - * wrec/WREC.cpp: - * wrec/WREC.h: - (JSC::WRECGenerator::WRECGenerator): - (JSC::WRECParser::WRECParser): - -2008-11-15 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed "jit" to "assembler" and, for brevity, replaced *jit.* with __ - using a macro. - - * VM/CTI.cpp: - (JSC::CTI::emitGetVirtualRegister): - (JSC::CTI::emitPutCTIArgFromVirtualRegister): - (JSC::CTI::emitPutCTIArg): - (JSC::CTI::emitGetCTIArg): - (JSC::CTI::emitPutCTIArgConstant): - (JSC::CTI::emitPutCTIParam): - (JSC::CTI::emitGetCTIParam): - (JSC::CTI::emitPutToCallFrameHeader): - (JSC::CTI::emitGetFromCallFrameHeader): - (JSC::CTI::emitPutVirtualRegister): - (JSC::CTI::emitInitRegister): - (JSC::CTI::emitAllocateNumber): - (JSC::CTI::emitNakedCall): - (JSC::CTI::emitNakedFastCall): - (JSC::CTI::emitCTICall): - (JSC::CTI::emitJumpSlowCaseIfNotJSCell): - (JSC::CTI::linkSlowCaseIfNotJSCell): - (JSC::CTI::emitJumpSlowCaseIfNotImmNum): - (JSC::CTI::emitJumpSlowCaseIfNotImmNums): - (JSC::CTI::emitFastArithDeTagImmediate): - (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero): - (JSC::CTI::emitFastArithReTagImmediate): - (JSC::CTI::emitFastArithPotentiallyReTagImmediate): - (JSC::CTI::emitFastArithImmToInt): - (JSC::CTI::emitFastArithIntToImmOrSlowCase): - (JSC::CTI::emitFastArithIntToImmNoCheck): - (JSC::CTI::emitArithIntToImmWithJump): - (JSC::CTI::emitTagAsBoolImmediate): - (JSC::CTI::CTI): - (JSC::CTI::compileOpCallInitializeCallFrame): - (JSC::CTI::compileOpCall): - (JSC::CTI::compileOpStrictEq): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileLinkPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::CTI::privateCompilePutByIdTransition): - (JSC::CTI::privateCompileCTIMachineTrampolines): - (JSC::CTI::privateCompilePatchGetArrayLength): - (JSC::CTI::emitGetVariableObjectRegister): - (JSC::CTI::emitPutVariableObjectRegister): - (JSC::CTI::compileRegExp): - * VM/CTI.h: - * wrec/WREC.cpp: - (JSC::WRECGenerator::generateBacktrack1): - (JSC::WRECGenerator::generateBacktrackBackreference): - (JSC::WRECGenerator::generateBackreferenceQuantifier): - (JSC::WRECGenerator::generateNonGreedyQuantifier): - (JSC::WRECGenerator::generateGreedyQuantifier): - (JSC::WRECGenerator::generatePatternCharacter): - (JSC::WRECGenerator::generateCharacterClassInvertedRange): - (JSC::WRECGenerator::generateCharacterClassInverted): - (JSC::WRECGenerator::generateCharacterClass): - (JSC::WRECGenerator::generateParentheses): - (JSC::WRECGenerator::generateParenthesesNonGreedy): - (JSC::WRECGenerator::generateParenthesesResetTrampoline): - (JSC::WRECGenerator::generateAssertionBOL): - (JSC::WRECGenerator::generateAssertionEOL): - (JSC::WRECGenerator::generateAssertionWordBoundary): - (JSC::WRECGenerator::generateBackreference): - (JSC::WRECGenerator::generateDisjunction): - (JSC::WRECGenerator::terminateDisjunction): - -2008-11-15 Sam Weinig - - Reviewed by Geoffrey Garen. - - Remove dead method declaration. - - * bytecompiler/CodeGenerator.h: - -2008-11-15 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed LabelID to Label, Label::isForwardLabel to Label::isForward. - - * VM/LabelID.h: - (JSC::Label::Label): - (JSC::Label::isForward): - * bytecompiler/CodeGenerator.cpp: - (JSC::BytecodeGenerator::newLabel): - (JSC::BytecodeGenerator::emitLabel): - (JSC::BytecodeGenerator::emitJump): - (JSC::BytecodeGenerator::emitJumpIfTrue): - (JSC::BytecodeGenerator::emitJumpIfFalse): - (JSC::BytecodeGenerator::pushFinallyContext): - (JSC::BytecodeGenerator::emitComplexJumpScopes): - (JSC::BytecodeGenerator::emitJumpScopes): - (JSC::BytecodeGenerator::emitNextPropertyName): - (JSC::BytecodeGenerator::emitCatch): - (JSC::BytecodeGenerator::emitJumpSubroutine): - (JSC::prepareJumpTableForImmediateSwitch): - (JSC::prepareJumpTableForCharacterSwitch): - (JSC::prepareJumpTableForStringSwitch): - (JSC::BytecodeGenerator::endSwitch): - * bytecompiler/CodeGenerator.h: - * bytecompiler/LabelScope.h: - (JSC::LabelScope::LabelScope): - (JSC::LabelScope::breakTarget): - (JSC::LabelScope::continueTarget): - * parser/Nodes.cpp: - (JSC::LogicalOpNode::emitBytecode): - (JSC::ConditionalNode::emitBytecode): - (JSC::IfNode::emitBytecode): - (JSC::IfElseNode::emitBytecode): - (JSC::DoWhileNode::emitBytecode): - (JSC::WhileNode::emitBytecode): - (JSC::ForNode::emitBytecode): - (JSC::ForInNode::emitBytecode): - (JSC::ReturnNode::emitBytecode): - (JSC::CaseBlockNode::emitBytecodeForBlock): - (JSC::TryNode::emitBytecode): - -2008-11-15 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed JITCodeBuffer to AssemblerBuffer and renamed its data members - to be more like the rest of our buffer classes, with a size and a - capacity. - - Added an assert in the unchecked put case to match the test in the checked - put case. - - Changed a C-style cast to a C++-style cast. - - Renamed MAX_INSTRUCTION_SIZE to maxInstructionSize. - - * VM/CTI.cpp: - (JSC::CTI::CTI): - (JSC::CTI::compileRegExp): - * VM/Machine.cpp: - (JSC::BytecodeInterpreter::BytecodeInterpreter): - * VM/Machine.h: - (JSC::BytecodeInterpreter::assemblerBuffer): - * masm/X86Assembler.h: - (JSC::AssemblerBuffer::AssemblerBuffer): - (JSC::AssemblerBuffer::~AssemblerBuffer): - (JSC::AssemblerBuffer::ensureSpace): - (JSC::AssemblerBuffer::isAligned): - (JSC::AssemblerBuffer::putByteUnchecked): - (JSC::AssemblerBuffer::putByte): - (JSC::AssemblerBuffer::putShortUnchecked): - (JSC::AssemblerBuffer::putShort): - (JSC::AssemblerBuffer::putIntUnchecked): - (JSC::AssemblerBuffer::putInt): - (JSC::AssemblerBuffer::data): - (JSC::AssemblerBuffer::size): - (JSC::AssemblerBuffer::reset): - (JSC::AssemblerBuffer::copy): - (JSC::AssemblerBuffer::grow): - (JSC::X86Assembler::): - (JSC::X86Assembler::X86Assembler): - (JSC::X86Assembler::testl_i32r): - (JSC::X86Assembler::movl_mr): - (JSC::X86Assembler::movl_rm): - (JSC::X86Assembler::movl_i32m): - (JSC::X86Assembler::emitCall): - (JSC::X86Assembler::label): - (JSC::X86Assembler::emitUnlinkedJmp): - (JSC::X86Assembler::emitUnlinkedJne): - (JSC::X86Assembler::emitUnlinkedJe): - (JSC::X86Assembler::emitUnlinkedJl): - (JSC::X86Assembler::emitUnlinkedJb): - (JSC::X86Assembler::emitUnlinkedJle): - (JSC::X86Assembler::emitUnlinkedJbe): - (JSC::X86Assembler::emitUnlinkedJge): - (JSC::X86Assembler::emitUnlinkedJg): - (JSC::X86Assembler::emitUnlinkedJa): - (JSC::X86Assembler::emitUnlinkedJae): - (JSC::X86Assembler::emitUnlinkedJo): - (JSC::X86Assembler::emitUnlinkedJp): - (JSC::X86Assembler::emitUnlinkedJs): - (JSC::X86Assembler::link): - (JSC::X86Assembler::emitModRm_rr): - (JSC::X86Assembler::emitModRm_rm): - (JSC::X86Assembler::emitModRm_opr): - -2008-11-15 Geoffrey Garen - - Suggested by Maciej Stachowiak. - - Reverted most "opcode" => "bytecode" renames. We use "bytecode" as a - mass noun to refer to a stream of instructions. Each instruction may be - an opcode or an operand. - - * VM/CTI.cpp: - (JSC::CTI::emitCTICall): - (JSC::CTI::compileOpCall): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::printStructureIDs): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::derefStructureIDs): - (JSC::CodeBlock::refStructureIDs): - * VM/CodeBlock.h: - * VM/ExceptionHelpers.cpp: - (JSC::createNotAnObjectError): - * VM/Instruction.h: - (JSC::Instruction::Instruction): - (JSC::Instruction::): - * VM/Machine.cpp: - (JSC::BytecodeInterpreter::isOpcode): - (JSC::BytecodeInterpreter::throwException): - (JSC::BytecodeInterpreter::tryCachePutByID): - (JSC::BytecodeInterpreter::uncachePutByID): - (JSC::BytecodeInterpreter::tryCacheGetByID): - (JSC::BytecodeInterpreter::uncacheGetByID): - (JSC::BytecodeInterpreter::privateExecute): - (JSC::BytecodeInterpreter::tryCTICachePutByID): - (JSC::BytecodeInterpreter::tryCTICacheGetByID): - * VM/Machine.h: - (JSC::BytecodeInterpreter::getOpcode): - (JSC::BytecodeInterpreter::getOpcodeID): - (JSC::BytecodeInterpreter::isCallBytecode): - * VM/Opcode.cpp: - (JSC::): - (JSC::OpcodeStats::OpcodeStats): - (JSC::compareOpcodeIndices): - (JSC::compareOpcodePairIndices): - (JSC::OpcodeStats::~OpcodeStats): - (JSC::OpcodeStats::recordInstruction): - (JSC::OpcodeStats::resetLastInstruction): - * VM/Opcode.h: - (JSC::): - (JSC::padOpcodeName): - * VM/SamplingTool.cpp: - (JSC::ScopeSampleRecord::sample): - (JSC::SamplingTool::run): - (JSC::compareOpcodeIndicesSampling): - (JSC::SamplingTool::dump): - * VM/SamplingTool.h: - (JSC::ScopeSampleRecord::ScopeSampleRecord): - (JSC::SamplingTool::SamplingTool): - * bytecompiler/CodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitLabel): - (JSC::BytecodeGenerator::emitOpcode): - (JSC::BytecodeGenerator::emitJump): - (JSC::BytecodeGenerator::emitJumpIfTrue): - (JSC::BytecodeGenerator::emitJumpIfFalse): - (JSC::BytecodeGenerator::emitMove): - (JSC::BytecodeGenerator::emitUnaryOp): - (JSC::BytecodeGenerator::emitPreInc): - (JSC::BytecodeGenerator::emitPreDec): - (JSC::BytecodeGenerator::emitPostInc): - (JSC::BytecodeGenerator::emitPostDec): - (JSC::BytecodeGenerator::emitBinaryOp): - (JSC::BytecodeGenerator::emitEqualityOp): - (JSC::BytecodeGenerator::emitUnexpectedLoad): - (JSC::BytecodeGenerator::emitInstanceOf): - (JSC::BytecodeGenerator::emitResolve): - (JSC::BytecodeGenerator::emitGetScopedVar): - (JSC::BytecodeGenerator::emitPutScopedVar): - (JSC::BytecodeGenerator::emitResolveBase): - (JSC::BytecodeGenerator::emitResolveWithBase): - (JSC::BytecodeGenerator::emitResolveFunction): - (JSC::BytecodeGenerator::emitGetById): - (JSC::BytecodeGenerator::emitPutById): - (JSC::BytecodeGenerator::emitPutGetter): - (JSC::BytecodeGenerator::emitPutSetter): - (JSC::BytecodeGenerator::emitDeleteById): - (JSC::BytecodeGenerator::emitGetByVal): - (JSC::BytecodeGenerator::emitPutByVal): - (JSC::BytecodeGenerator::emitDeleteByVal): - (JSC::BytecodeGenerator::emitPutByIndex): - (JSC::BytecodeGenerator::emitNewObject): - (JSC::BytecodeGenerator::emitNewArray): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitNewRegExp): - (JSC::BytecodeGenerator::emitNewFunctionExpression): - (JSC::BytecodeGenerator::emitCall): - (JSC::BytecodeGenerator::emitReturn): - (JSC::BytecodeGenerator::emitUnaryNoDstOp): - (JSC::BytecodeGenerator::emitConstruct): - (JSC::BytecodeGenerator::emitPopScope): - (JSC::BytecodeGenerator::emitDebugHook): - (JSC::BytecodeGenerator::emitComplexJumpScopes): - (JSC::BytecodeGenerator::emitJumpScopes): - (JSC::BytecodeGenerator::emitNextPropertyName): - (JSC::BytecodeGenerator::emitCatch): - (JSC::BytecodeGenerator::emitNewError): - (JSC::BytecodeGenerator::emitJumpSubroutine): - (JSC::BytecodeGenerator::emitSubroutineReturn): - (JSC::BytecodeGenerator::emitPushNewScope): - (JSC::BytecodeGenerator::beginSwitch): - * bytecompiler/CodeGenerator.h: - * jsc.cpp: - (runWithScripts): - * masm/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::emitModRm_opr): - (JSC::X86Assembler::emitModRm_opr_Unchecked): - (JSC::X86Assembler::emitModRm_opm): - (JSC::X86Assembler::emitModRm_opm_Unchecked): - (JSC::X86Assembler::emitModRm_opmsib): - * parser/Nodes.cpp: - (JSC::UnaryOpNode::emitBytecode): - (JSC::BinaryOpNode::emitBytecode): - (JSC::ReverseBinaryOpNode::emitBytecode): - (JSC::ThrowableBinaryOpNode::emitBytecode): - (JSC::emitReadModifyAssignment): - (JSC::ScopeNode::ScopeNode): - * parser/Nodes.h: - (JSC::UnaryPlusNode::): - (JSC::NegateNode::): - (JSC::BitwiseNotNode::): - (JSC::LogicalNotNode::): - (JSC::MultNode::): - (JSC::DivNode::): - (JSC::ModNode::): - (JSC::AddNode::): - (JSC::SubNode::): - (JSC::LeftShiftNode::): - (JSC::RightShiftNode::): - (JSC::UnsignedRightShiftNode::): - (JSC::LessNode::): - (JSC::GreaterNode::): - (JSC::LessEqNode::): - (JSC::GreaterEqNode::): - (JSC::InstanceOfNode::): - (JSC::InNode::): - (JSC::EqualNode::): - (JSC::NotEqualNode::): - (JSC::StrictEqualNode::): - (JSC::NotStrictEqualNode::): - (JSC::BitAndNode::): - (JSC::BitOrNode::): - (JSC::BitXOrNode::): - * runtime/StructureID.cpp: - (JSC::StructureID::fromDictionaryTransition): - * wtf/Platform.h: - -2008-11-15 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renames: - - CodeGenerator => BytecodeGenerator - emitCodeForBlock => emitBytecodeForBlock - generatedByteCode => generatedBytecode - generateCode => generateBytecode - - * JavaScriptCore.exp: - * bytecompiler/CodeGenerator.cpp: - (JSC::BytecodeGenerator::setDumpsGeneratedCode): - (JSC::BytecodeGenerator::generate): - (JSC::BytecodeGenerator::addVar): - (JSC::BytecodeGenerator::addGlobalVar): - (JSC::BytecodeGenerator::allocateConstants): - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::addParameter): - (JSC::BytecodeGenerator::registerFor): - (JSC::BytecodeGenerator::constRegisterFor): - (JSC::BytecodeGenerator::isLocal): - (JSC::BytecodeGenerator::isLocalConstant): - (JSC::BytecodeGenerator::newRegister): - (JSC::BytecodeGenerator::newTemporary): - (JSC::BytecodeGenerator::highestUsedRegister): - (JSC::BytecodeGenerator::newLabelScope): - (JSC::BytecodeGenerator::newLabel): - (JSC::BytecodeGenerator::emitLabel): - (JSC::BytecodeGenerator::emitBytecode): - (JSC::BytecodeGenerator::retrieveLastBinaryOp): - (JSC::BytecodeGenerator::retrieveLastUnaryOp): - (JSC::BytecodeGenerator::rewindBinaryOp): - (JSC::BytecodeGenerator::rewindUnaryOp): - (JSC::BytecodeGenerator::emitJump): - (JSC::BytecodeGenerator::emitJumpIfTrue): - (JSC::BytecodeGenerator::emitJumpIfFalse): - (JSC::BytecodeGenerator::addConstant): - (JSC::BytecodeGenerator::addUnexpectedConstant): - (JSC::BytecodeGenerator::addRegExp): - (JSC::BytecodeGenerator::emitMove): - (JSC::BytecodeGenerator::emitUnaryOp): - (JSC::BytecodeGenerator::emitPreInc): - (JSC::BytecodeGenerator::emitPreDec): - (JSC::BytecodeGenerator::emitPostInc): - (JSC::BytecodeGenerator::emitPostDec): - (JSC::BytecodeGenerator::emitBinaryOp): - (JSC::BytecodeGenerator::emitEqualityOp): - (JSC::BytecodeGenerator::emitLoad): - (JSC::BytecodeGenerator::emitUnexpectedLoad): - (JSC::BytecodeGenerator::findScopedProperty): - (JSC::BytecodeGenerator::emitInstanceOf): - (JSC::BytecodeGenerator::emitResolve): - (JSC::BytecodeGenerator::emitGetScopedVar): - (JSC::BytecodeGenerator::emitPutScopedVar): - (JSC::BytecodeGenerator::emitResolveBase): - (JSC::BytecodeGenerator::emitResolveWithBase): - (JSC::BytecodeGenerator::emitResolveFunction): - (JSC::BytecodeGenerator::emitGetById): - (JSC::BytecodeGenerator::emitPutById): - (JSC::BytecodeGenerator::emitPutGetter): - (JSC::BytecodeGenerator::emitPutSetter): - (JSC::BytecodeGenerator::emitDeleteById): - (JSC::BytecodeGenerator::emitGetByVal): - (JSC::BytecodeGenerator::emitPutByVal): - (JSC::BytecodeGenerator::emitDeleteByVal): - (JSC::BytecodeGenerator::emitPutByIndex): - (JSC::BytecodeGenerator::emitNewObject): - (JSC::BytecodeGenerator::emitNewArray): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitNewRegExp): - (JSC::BytecodeGenerator::emitNewFunctionExpression): - (JSC::BytecodeGenerator::emitCall): - (JSC::BytecodeGenerator::emitCallEval): - (JSC::BytecodeGenerator::emitReturn): - (JSC::BytecodeGenerator::emitUnaryNoDstOp): - (JSC::BytecodeGenerator::emitConstruct): - (JSC::BytecodeGenerator::emitPushScope): - (JSC::BytecodeGenerator::emitPopScope): - (JSC::BytecodeGenerator::emitDebugHook): - (JSC::BytecodeGenerator::pushFinallyContext): - (JSC::BytecodeGenerator::popFinallyContext): - (JSC::BytecodeGenerator::breakTarget): - (JSC::BytecodeGenerator::continueTarget): - (JSC::BytecodeGenerator::emitComplexJumpScopes): - (JSC::BytecodeGenerator::emitJumpScopes): - (JSC::BytecodeGenerator::emitNextPropertyName): - (JSC::BytecodeGenerator::emitCatch): - (JSC::BytecodeGenerator::emitNewError): - (JSC::BytecodeGenerator::emitJumpSubroutine): - (JSC::BytecodeGenerator::emitSubroutineReturn): - (JSC::BytecodeGenerator::emitPushNewScope): - (JSC::BytecodeGenerator::beginSwitch): - (JSC::BytecodeGenerator::endSwitch): - (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException): - * bytecompiler/CodeGenerator.h: - * jsc.cpp: - (runWithScripts): - * parser/Nodes.cpp: - (JSC::ThrowableExpressionData::emitThrowError): - (JSC::NullNode::emitBytecode): - (JSC::BooleanNode::emitBytecode): - (JSC::NumberNode::emitBytecode): - (JSC::StringNode::emitBytecode): - (JSC::RegExpNode::emitBytecode): - (JSC::ThisNode::emitBytecode): - (JSC::ResolveNode::isPure): - (JSC::ResolveNode::emitBytecode): - (JSC::ArrayNode::emitBytecode): - (JSC::ObjectLiteralNode::emitBytecode): - (JSC::PropertyListNode::emitBytecode): - (JSC::BracketAccessorNode::emitBytecode): - (JSC::DotAccessorNode::emitBytecode): - (JSC::ArgumentListNode::emitBytecode): - (JSC::NewExprNode::emitBytecode): - (JSC::EvalFunctionCallNode::emitBytecode): - (JSC::FunctionCallValueNode::emitBytecode): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::FunctionCallBracketNode::emitBytecode): - (JSC::FunctionCallDotNode::emitBytecode): - (JSC::emitPreIncOrDec): - (JSC::emitPostIncOrDec): - (JSC::PostfixResolveNode::emitBytecode): - (JSC::PostfixBracketNode::emitBytecode): - (JSC::PostfixDotNode::emitBytecode): - (JSC::PostfixErrorNode::emitBytecode): - (JSC::DeleteResolveNode::emitBytecode): - (JSC::DeleteBracketNode::emitBytecode): - (JSC::DeleteDotNode::emitBytecode): - (JSC::DeleteValueNode::emitBytecode): - (JSC::VoidNode::emitBytecode): - (JSC::TypeOfResolveNode::emitBytecode): - (JSC::TypeOfValueNode::emitBytecode): - (JSC::PrefixResolveNode::emitBytecode): - (JSC::PrefixBracketNode::emitBytecode): - (JSC::PrefixDotNode::emitBytecode): - (JSC::PrefixErrorNode::emitBytecode): - (JSC::UnaryOpNode::emitBytecode): - (JSC::BinaryOpNode::emitBytecode): - (JSC::EqualNode::emitBytecode): - (JSC::StrictEqualNode::emitBytecode): - (JSC::ReverseBinaryOpNode::emitBytecode): - (JSC::ThrowableBinaryOpNode::emitBytecode): - (JSC::InstanceOfNode::emitBytecode): - (JSC::LogicalOpNode::emitBytecode): - (JSC::ConditionalNode::emitBytecode): - (JSC::emitReadModifyAssignment): - (JSC::ReadModifyResolveNode::emitBytecode): - (JSC::AssignResolveNode::emitBytecode): - (JSC::AssignDotNode::emitBytecode): - (JSC::ReadModifyDotNode::emitBytecode): - (JSC::AssignErrorNode::emitBytecode): - (JSC::AssignBracketNode::emitBytecode): - (JSC::ReadModifyBracketNode::emitBytecode): - (JSC::CommaNode::emitBytecode): - (JSC::ConstDeclNode::emitCodeSingle): - (JSC::ConstDeclNode::emitBytecode): - (JSC::ConstStatementNode::emitBytecode): - (JSC::statementListEmitCode): - (JSC::BlockNode::emitBytecode): - (JSC::EmptyStatementNode::emitBytecode): - (JSC::DebuggerStatementNode::emitBytecode): - (JSC::ExprStatementNode::emitBytecode): - (JSC::VarStatementNode::emitBytecode): - (JSC::IfNode::emitBytecode): - (JSC::IfElseNode::emitBytecode): - (JSC::DoWhileNode::emitBytecode): - (JSC::WhileNode::emitBytecode): - (JSC::ForNode::emitBytecode): - (JSC::ForInNode::emitBytecode): - (JSC::ContinueNode::emitBytecode): - (JSC::BreakNode::emitBytecode): - (JSC::ReturnNode::emitBytecode): - (JSC::WithNode::emitBytecode): - (JSC::CaseBlockNode::emitBytecodeForBlock): - (JSC::SwitchNode::emitBytecode): - (JSC::LabelNode::emitBytecode): - (JSC::ThrowNode::emitBytecode): - (JSC::TryNode::emitBytecode): - (JSC::EvalNode::emitBytecode): - (JSC::EvalNode::generateBytecode): - (JSC::FunctionBodyNode::generateBytecode): - (JSC::FunctionBodyNode::emitBytecode): - (JSC::ProgramNode::emitBytecode): - (JSC::ProgramNode::generateBytecode): - (JSC::FuncDeclNode::emitBytecode): - (JSC::FuncExprNode::emitBytecode): - * parser/Nodes.h: - (JSC::ExpressionNode::): - (JSC::BooleanNode::): - (JSC::NumberNode::): - (JSC::StringNode::): - (JSC::ProgramNode::): - (JSC::EvalNode::): - (JSC::FunctionBodyNode::): - * runtime/Arguments.h: - (JSC::Arguments::getArgumentsData): - (JSC::JSActivation::copyRegisters): - * runtime/JSActivation.cpp: - (JSC::JSActivation::mark): - * runtime/JSActivation.h: - (JSC::JSActivation::JSActivationData::JSActivationData): - * runtime/JSFunction.cpp: - (JSC::JSFunction::~JSFunction): - -2008-11-15 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed all forms of "byte code" "opcode" "op code" "code" "bitcode" - etc. to "bytecode". - - * VM/CTI.cpp: - (JSC::CTI::printBytecodeOperandTypes): - (JSC::CTI::emitAllocateNumber): - (JSC::CTI::emitNakedCall): - (JSC::CTI::emitNakedFastCall): - (JSC::CTI::emitCTICall): - (JSC::CTI::emitJumpSlowCaseIfNotJSCell): - (JSC::CTI::emitJumpSlowCaseIfNotImmNum): - (JSC::CTI::emitJumpSlowCaseIfNotImmNums): - (JSC::CTI::emitFastArithIntToImmOrSlowCase): - (JSC::CTI::compileOpCall): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - * VM/CTI.h: - (JSC::CallRecord::CallRecord): - (JSC::SwitchRecord::SwitchRecord): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::printStructureIDs): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::~CodeBlock): - (JSC::CodeBlock::derefStructureIDs): - (JSC::CodeBlock::refStructureIDs): - * VM/CodeBlock.h: - (JSC::StructureStubInfo::StructureStubInfo): - * VM/ExceptionHelpers.cpp: - (JSC::createNotAnObjectError): - * VM/Instruction.h: - (JSC::Instruction::Instruction): - (JSC::Instruction::): - * VM/Machine.cpp: - (JSC::BytecodeInterpreter::isBytecode): - (JSC::BytecodeInterpreter::throwException): - (JSC::BytecodeInterpreter::execute): - (JSC::BytecodeInterpreter::tryCachePutByID): - (JSC::BytecodeInterpreter::uncachePutByID): - (JSC::BytecodeInterpreter::tryCacheGetByID): - (JSC::BytecodeInterpreter::uncacheGetByID): - (JSC::BytecodeInterpreter::privateExecute): - (JSC::BytecodeInterpreter::tryCTICachePutByID): - (JSC::BytecodeInterpreter::tryCTICacheGetByID): - (JSC::BytecodeInterpreter::cti_op_call_JSFunction): - (JSC::BytecodeInterpreter::cti_vm_dontLazyLinkCall): - (JSC::BytecodeInterpreter::cti_vm_lazyLinkCall): - * VM/Machine.h: - (JSC::BytecodeInterpreter::getBytecode): - (JSC::BytecodeInterpreter::getBytecodeID): - (JSC::BytecodeInterpreter::isCallBytecode): - * VM/Opcode.cpp: - (JSC::): - (JSC::BytecodeStats::BytecodeStats): - (JSC::compareBytecodeIndices): - (JSC::compareBytecodePairIndices): - (JSC::BytecodeStats::~BytecodeStats): - (JSC::BytecodeStats::recordInstruction): - (JSC::BytecodeStats::resetLastInstruction): - * VM/Opcode.h: - (JSC::): - (JSC::padBytecodeName): - * VM/SamplingTool.cpp: - (JSC::ScopeSampleRecord::sample): - (JSC::SamplingTool::run): - (JSC::compareBytecodeIndicesSampling): - (JSC::SamplingTool::dump): - * VM/SamplingTool.h: - (JSC::ScopeSampleRecord::ScopeSampleRecord): - (JSC::SamplingTool::SamplingTool): - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::generate): - (JSC::CodeGenerator::CodeGenerator): - (JSC::CodeGenerator::emitLabel): - (JSC::CodeGenerator::emitBytecode): - (JSC::CodeGenerator::emitJump): - (JSC::CodeGenerator::emitJumpIfTrue): - (JSC::CodeGenerator::emitJumpIfFalse): - (JSC::CodeGenerator::emitMove): - (JSC::CodeGenerator::emitUnaryOp): - (JSC::CodeGenerator::emitPreInc): - (JSC::CodeGenerator::emitPreDec): - (JSC::CodeGenerator::emitPostInc): - (JSC::CodeGenerator::emitPostDec): - (JSC::CodeGenerator::emitBinaryOp): - (JSC::CodeGenerator::emitEqualityOp): - (JSC::CodeGenerator::emitUnexpectedLoad): - (JSC::CodeGenerator::emitInstanceOf): - (JSC::CodeGenerator::emitResolve): - (JSC::CodeGenerator::emitGetScopedVar): - (JSC::CodeGenerator::emitPutScopedVar): - (JSC::CodeGenerator::emitResolveBase): - (JSC::CodeGenerator::emitResolveWithBase): - (JSC::CodeGenerator::emitResolveFunction): - (JSC::CodeGenerator::emitGetById): - (JSC::CodeGenerator::emitPutById): - (JSC::CodeGenerator::emitPutGetter): - (JSC::CodeGenerator::emitPutSetter): - (JSC::CodeGenerator::emitDeleteById): - (JSC::CodeGenerator::emitGetByVal): - (JSC::CodeGenerator::emitPutByVal): - (JSC::CodeGenerator::emitDeleteByVal): - (JSC::CodeGenerator::emitPutByIndex): - (JSC::CodeGenerator::emitNewObject): - (JSC::CodeGenerator::emitNewArray): - (JSC::CodeGenerator::emitNewFunction): - (JSC::CodeGenerator::emitNewRegExp): - (JSC::CodeGenerator::emitNewFunctionExpression): - (JSC::CodeGenerator::emitCall): - (JSC::CodeGenerator::emitReturn): - (JSC::CodeGenerator::emitUnaryNoDstOp): - (JSC::CodeGenerator::emitConstruct): - (JSC::CodeGenerator::emitPopScope): - (JSC::CodeGenerator::emitDebugHook): - (JSC::CodeGenerator::emitComplexJumpScopes): - (JSC::CodeGenerator::emitJumpScopes): - (JSC::CodeGenerator::emitNextPropertyName): - (JSC::CodeGenerator::emitCatch): - (JSC::CodeGenerator::emitNewError): - (JSC::CodeGenerator::emitJumpSubroutine): - (JSC::CodeGenerator::emitSubroutineReturn): - (JSC::CodeGenerator::emitPushNewScope): - (JSC::CodeGenerator::beginSwitch): - (JSC::CodeGenerator::endSwitch): - * bytecompiler/CodeGenerator.h: - (JSC::CodeGenerator::emitNode): - * jsc.cpp: - (runWithScripts): - * masm/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::emitModRm_opr): - (JSC::X86Assembler::emitModRm_opr_Unchecked): - (JSC::X86Assembler::emitModRm_opm): - (JSC::X86Assembler::emitModRm_opm_Unchecked): - (JSC::X86Assembler::emitModRm_opmsib): - * parser/Nodes.cpp: - (JSC::NullNode::emitBytecode): - (JSC::BooleanNode::emitBytecode): - (JSC::NumberNode::emitBytecode): - (JSC::StringNode::emitBytecode): - (JSC::RegExpNode::emitBytecode): - (JSC::ThisNode::emitBytecode): - (JSC::ResolveNode::emitBytecode): - (JSC::ArrayNode::emitBytecode): - (JSC::ObjectLiteralNode::emitBytecode): - (JSC::PropertyListNode::emitBytecode): - (JSC::BracketAccessorNode::emitBytecode): - (JSC::DotAccessorNode::emitBytecode): - (JSC::ArgumentListNode::emitBytecode): - (JSC::NewExprNode::emitBytecode): - (JSC::EvalFunctionCallNode::emitBytecode): - (JSC::FunctionCallValueNode::emitBytecode): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::FunctionCallBracketNode::emitBytecode): - (JSC::FunctionCallDotNode::emitBytecode): - (JSC::PostfixResolveNode::emitBytecode): - (JSC::PostfixBracketNode::emitBytecode): - (JSC::PostfixDotNode::emitBytecode): - (JSC::PostfixErrorNode::emitBytecode): - (JSC::DeleteResolveNode::emitBytecode): - (JSC::DeleteBracketNode::emitBytecode): - (JSC::DeleteDotNode::emitBytecode): - (JSC::DeleteValueNode::emitBytecode): - (JSC::VoidNode::emitBytecode): - (JSC::TypeOfResolveNode::emitBytecode): - (JSC::TypeOfValueNode::emitBytecode): - (JSC::PrefixResolveNode::emitBytecode): - (JSC::PrefixBracketNode::emitBytecode): - (JSC::PrefixDotNode::emitBytecode): - (JSC::PrefixErrorNode::emitBytecode): - (JSC::UnaryOpNode::emitBytecode): - (JSC::BinaryOpNode::emitBytecode): - (JSC::EqualNode::emitBytecode): - (JSC::StrictEqualNode::emitBytecode): - (JSC::ReverseBinaryOpNode::emitBytecode): - (JSC::ThrowableBinaryOpNode::emitBytecode): - (JSC::InstanceOfNode::emitBytecode): - (JSC::LogicalOpNode::emitBytecode): - (JSC::ConditionalNode::emitBytecode): - (JSC::emitReadModifyAssignment): - (JSC::ReadModifyResolveNode::emitBytecode): - (JSC::AssignResolveNode::emitBytecode): - (JSC::AssignDotNode::emitBytecode): - (JSC::ReadModifyDotNode::emitBytecode): - (JSC::AssignErrorNode::emitBytecode): - (JSC::AssignBracketNode::emitBytecode): - (JSC::ReadModifyBracketNode::emitBytecode): - (JSC::CommaNode::emitBytecode): - (JSC::ConstDeclNode::emitBytecode): - (JSC::ConstStatementNode::emitBytecode): - (JSC::BlockNode::emitBytecode): - (JSC::EmptyStatementNode::emitBytecode): - (JSC::DebuggerStatementNode::emitBytecode): - (JSC::ExprStatementNode::emitBytecode): - (JSC::VarStatementNode::emitBytecode): - (JSC::IfNode::emitBytecode): - (JSC::IfElseNode::emitBytecode): - (JSC::DoWhileNode::emitBytecode): - (JSC::WhileNode::emitBytecode): - (JSC::ForNode::emitBytecode): - (JSC::ForInNode::emitBytecode): - (JSC::ContinueNode::emitBytecode): - (JSC::BreakNode::emitBytecode): - (JSC::ReturnNode::emitBytecode): - (JSC::WithNode::emitBytecode): - (JSC::SwitchNode::emitBytecode): - (JSC::LabelNode::emitBytecode): - (JSC::ThrowNode::emitBytecode): - (JSC::TryNode::emitBytecode): - (JSC::ScopeNode::ScopeNode): - (JSC::EvalNode::emitBytecode): - (JSC::FunctionBodyNode::emitBytecode): - (JSC::ProgramNode::emitBytecode): - (JSC::FuncDeclNode::emitBytecode): - (JSC::FuncExprNode::emitBytecode): - * parser/Nodes.h: - (JSC::UnaryPlusNode::): - (JSC::NegateNode::): - (JSC::BitwiseNotNode::): - (JSC::LogicalNotNode::): - (JSC::MultNode::): - (JSC::DivNode::): - (JSC::ModNode::): - (JSC::AddNode::): - (JSC::SubNode::): - (JSC::LeftShiftNode::): - (JSC::RightShiftNode::): - (JSC::UnsignedRightShiftNode::): - (JSC::LessNode::): - (JSC::GreaterNode::): - (JSC::LessEqNode::): - (JSC::GreaterEqNode::): - (JSC::InstanceOfNode::): - (JSC::InNode::): - (JSC::EqualNode::): - (JSC::NotEqualNode::): - (JSC::StrictEqualNode::): - (JSC::NotStrictEqualNode::): - (JSC::BitAndNode::): - (JSC::BitOrNode::): - (JSC::BitXOrNode::): - (JSC::ProgramNode::): - (JSC::EvalNode::): - (JSC::FunctionBodyNode::): - * runtime/JSNotAnObject.h: - * runtime/StructureID.cpp: - (JSC::StructureID::fromDictionaryTransition): - * wtf/Platform.h: - -2008-11-15 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed Machine to BytecodeInterpreter. - - Nixed the Interpreter class, and changed its two functions to stand-alone - functions. - - * JavaScriptCore.exp: - * VM/CTI.cpp: - (JSC::): - (JSC::CTI::emitCTICall): - (JSC::CTI::CTI): - (JSC::CTI::compileOpCall): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::CTI::privateCompilePutByIdTransition): - (JSC::CTI::privateCompileCTIMachineTrampolines): - (JSC::CTI::freeCTIMachineTrampolines): - (JSC::CTI::patchGetByIdSelf): - (JSC::CTI::patchPutByIdReplace): - (JSC::CTI::privateCompilePatchGetArrayLength): - (JSC::CTI::compileRegExp): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::printStructureIDs): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::derefStructureIDs): - (JSC::CodeBlock::refStructureIDs): - * VM/ExceptionHelpers.cpp: - (JSC::createNotAnObjectError): - * VM/Machine.cpp: - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::BytecodeInterpreter::resolve): - (JSC::BytecodeInterpreter::resolveSkip): - (JSC::BytecodeInterpreter::resolveGlobal): - (JSC::BytecodeInterpreter::resolveBase): - (JSC::BytecodeInterpreter::resolveBaseAndProperty): - (JSC::BytecodeInterpreter::resolveBaseAndFunc): - (JSC::BytecodeInterpreter::slideRegisterWindowForCall): - (JSC::BytecodeInterpreter::callEval): - (JSC::BytecodeInterpreter::BytecodeInterpreter): - (JSC::BytecodeInterpreter::initialize): - (JSC::BytecodeInterpreter::~BytecodeInterpreter): - (JSC::BytecodeInterpreter::dumpCallFrame): - (JSC::BytecodeInterpreter::dumpRegisters): - (JSC::BytecodeInterpreter::isOpcode): - (JSC::BytecodeInterpreter::unwindCallFrame): - (JSC::BytecodeInterpreter::throwException): - (JSC::BytecodeInterpreter::execute): - (JSC::BytecodeInterpreter::debug): - (JSC::BytecodeInterpreter::resetTimeoutCheck): - (JSC::BytecodeInterpreter::checkTimeout): - (JSC::BytecodeInterpreter::createExceptionScope): - (JSC::BytecodeInterpreter::tryCachePutByID): - (JSC::BytecodeInterpreter::uncachePutByID): - (JSC::BytecodeInterpreter::tryCacheGetByID): - (JSC::BytecodeInterpreter::uncacheGetByID): - (JSC::BytecodeInterpreter::privateExecute): - (JSC::BytecodeInterpreter::retrieveArguments): - (JSC::BytecodeInterpreter::retrieveCaller): - (JSC::BytecodeInterpreter::retrieveLastCaller): - (JSC::BytecodeInterpreter::findFunctionCallFrame): - (JSC::BytecodeInterpreter::tryCTICachePutByID): - (JSC::BytecodeInterpreter::tryCTICacheGetByID): - (JSC::BytecodeInterpreter::cti_op_convert_this): - (JSC::BytecodeInterpreter::cti_op_end): - (JSC::BytecodeInterpreter::cti_op_add): - (JSC::BytecodeInterpreter::cti_op_pre_inc): - (JSC::BytecodeInterpreter::cti_timeout_check): - (JSC::BytecodeInterpreter::cti_register_file_check): - (JSC::BytecodeInterpreter::cti_op_loop_if_less): - (JSC::BytecodeInterpreter::cti_op_loop_if_lesseq): - (JSC::BytecodeInterpreter::cti_op_new_object): - (JSC::BytecodeInterpreter::cti_op_put_by_id): - (JSC::BytecodeInterpreter::cti_op_put_by_id_second): - (JSC::BytecodeInterpreter::cti_op_put_by_id_generic): - (JSC::BytecodeInterpreter::cti_op_put_by_id_fail): - (JSC::BytecodeInterpreter::cti_op_get_by_id): - (JSC::BytecodeInterpreter::cti_op_get_by_id_second): - (JSC::BytecodeInterpreter::cti_op_get_by_id_generic): - (JSC::BytecodeInterpreter::cti_op_get_by_id_fail): - (JSC::BytecodeInterpreter::cti_op_instanceof): - (JSC::BytecodeInterpreter::cti_op_del_by_id): - (JSC::BytecodeInterpreter::cti_op_mul): - (JSC::BytecodeInterpreter::cti_op_new_func): - (JSC::BytecodeInterpreter::cti_op_call_JSFunction): - (JSC::BytecodeInterpreter::cti_op_call_arityCheck): - (JSC::BytecodeInterpreter::cti_vm_dontLazyLinkCall): - (JSC::BytecodeInterpreter::cti_vm_lazyLinkCall): - (JSC::BytecodeInterpreter::cti_op_push_activation): - (JSC::BytecodeInterpreter::cti_op_call_NotJSFunction): - (JSC::BytecodeInterpreter::cti_op_create_arguments): - (JSC::BytecodeInterpreter::cti_op_create_arguments_no_params): - (JSC::BytecodeInterpreter::cti_op_tear_off_activation): - (JSC::BytecodeInterpreter::cti_op_tear_off_arguments): - (JSC::BytecodeInterpreter::cti_op_profile_will_call): - (JSC::BytecodeInterpreter::cti_op_profile_did_call): - (JSC::BytecodeInterpreter::cti_op_ret_scopeChain): - (JSC::BytecodeInterpreter::cti_op_new_array): - (JSC::BytecodeInterpreter::cti_op_resolve): - (JSC::BytecodeInterpreter::cti_op_construct_JSConstruct): - (JSC::BytecodeInterpreter::cti_op_construct_NotJSConstruct): - (JSC::BytecodeInterpreter::cti_op_get_by_val): - (JSC::BytecodeInterpreter::cti_op_resolve_func): - (JSC::BytecodeInterpreter::cti_op_sub): - (JSC::BytecodeInterpreter::cti_op_put_by_val): - (JSC::BytecodeInterpreter::cti_op_put_by_val_array): - (JSC::BytecodeInterpreter::cti_op_lesseq): - (JSC::BytecodeInterpreter::cti_op_loop_if_true): - (JSC::BytecodeInterpreter::cti_op_negate): - (JSC::BytecodeInterpreter::cti_op_resolve_base): - (JSC::BytecodeInterpreter::cti_op_resolve_skip): - (JSC::BytecodeInterpreter::cti_op_resolve_global): - (JSC::BytecodeInterpreter::cti_op_div): - (JSC::BytecodeInterpreter::cti_op_pre_dec): - (JSC::BytecodeInterpreter::cti_op_jless): - (JSC::BytecodeInterpreter::cti_op_not): - (JSC::BytecodeInterpreter::cti_op_jtrue): - (JSC::BytecodeInterpreter::cti_op_post_inc): - (JSC::BytecodeInterpreter::cti_op_eq): - (JSC::BytecodeInterpreter::cti_op_lshift): - (JSC::BytecodeInterpreter::cti_op_bitand): - (JSC::BytecodeInterpreter::cti_op_rshift): - (JSC::BytecodeInterpreter::cti_op_bitnot): - (JSC::BytecodeInterpreter::cti_op_resolve_with_base): - (JSC::BytecodeInterpreter::cti_op_new_func_exp): - (JSC::BytecodeInterpreter::cti_op_mod): - (JSC::BytecodeInterpreter::cti_op_less): - (JSC::BytecodeInterpreter::cti_op_neq): - (JSC::BytecodeInterpreter::cti_op_post_dec): - (JSC::BytecodeInterpreter::cti_op_urshift): - (JSC::BytecodeInterpreter::cti_op_bitxor): - (JSC::BytecodeInterpreter::cti_op_new_regexp): - (JSC::BytecodeInterpreter::cti_op_bitor): - (JSC::BytecodeInterpreter::cti_op_call_eval): - (JSC::BytecodeInterpreter::cti_op_throw): - (JSC::BytecodeInterpreter::cti_op_get_pnames): - (JSC::BytecodeInterpreter::cti_op_next_pname): - (JSC::BytecodeInterpreter::cti_op_push_scope): - (JSC::BytecodeInterpreter::cti_op_pop_scope): - (JSC::BytecodeInterpreter::cti_op_typeof): - (JSC::BytecodeInterpreter::cti_op_is_undefined): - (JSC::BytecodeInterpreter::cti_op_is_boolean): - (JSC::BytecodeInterpreter::cti_op_is_number): - (JSC::BytecodeInterpreter::cti_op_is_string): - (JSC::BytecodeInterpreter::cti_op_is_object): - (JSC::BytecodeInterpreter::cti_op_is_function): - (JSC::BytecodeInterpreter::cti_op_stricteq): - (JSC::BytecodeInterpreter::cti_op_nstricteq): - (JSC::BytecodeInterpreter::cti_op_to_jsnumber): - (JSC::BytecodeInterpreter::cti_op_in): - (JSC::BytecodeInterpreter::cti_op_push_new_scope): - (JSC::BytecodeInterpreter::cti_op_jmp_scopes): - (JSC::BytecodeInterpreter::cti_op_put_by_index): - (JSC::BytecodeInterpreter::cti_op_switch_imm): - (JSC::BytecodeInterpreter::cti_op_switch_char): - (JSC::BytecodeInterpreter::cti_op_switch_string): - (JSC::BytecodeInterpreter::cti_op_del_by_val): - (JSC::BytecodeInterpreter::cti_op_put_getter): - (JSC::BytecodeInterpreter::cti_op_put_setter): - (JSC::BytecodeInterpreter::cti_op_new_error): - (JSC::BytecodeInterpreter::cti_op_debug): - (JSC::BytecodeInterpreter::cti_vm_throw): - * VM/Machine.h: - * VM/Register.h: - * VM/SamplingTool.cpp: - (JSC::SamplingTool::run): - * VM/SamplingTool.h: - (JSC::SamplingTool::SamplingTool): - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::generate): - (JSC::CodeGenerator::CodeGenerator): - (JSC::CodeGenerator::emitOpcode): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * jsc.cpp: - (runWithScripts): - * parser/Nodes.cpp: - (JSC::ScopeNode::ScopeNode): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::addParentForConsoleStart): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncPop): - (JSC::arrayProtoFuncPush): - * runtime/Collector.cpp: - (JSC::Heap::collect): - * runtime/ExecState.h: - (JSC::ExecState::interpreter): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncApply): - * runtime/Interpreter.cpp: - (JSC::Interpreter::evaluate): - * runtime/JSCell.h: - * runtime/JSFunction.cpp: - (JSC::JSFunction::call): - (JSC::JSFunction::argumentsGetter): - (JSC::JSFunction::callerGetter): - (JSC::JSFunction::construct): - * runtime/JSFunction.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::~JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::~JSGlobalObject): - (JSC::JSGlobalObject::setTimeoutTime): - (JSC::JSGlobalObject::startTimeoutCheck): - (JSC::JSGlobalObject::stopTimeoutCheck): - (JSC::JSGlobalObject::mark): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - * runtime/JSString.h: - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - -2008-11-15 Maciej Stachowiak - - Reviewed by Sam Weinig. - - - Remove SymbolTable from FunctionBodyNode and move it to CodeBlock - - It's not needed for functions that have never been executed, so no - need to waste the memory. Saves ~4M on membuster after 30 pages. - - * VM/CodeBlock.h: - * VM/Machine.cpp: - (JSC::Machine::retrieveArguments): - * parser/Nodes.cpp: - (JSC::EvalNode::generateCode): - (JSC::FunctionBodyNode::generateCode): - * parser/Nodes.h: - * runtime/JSActivation.h: - (JSC::JSActivation::JSActivationData::JSActivationData): - -2008-11-14 Cameron Zwarich - - Reviewed by Darin Adler. - - Bug 22259: Make all opcodes use eax as their final result register - - - Change one case of op_add (and the corresponding slow case) to use eax - rather than edx. Also, change the order in which the two results of - resolve_func and resolve_base are emitted so that the retrieved value is - put last into eax. - - This gives no performance change on SunSpider or the V8 benchmark suite - when run in either harness. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - -2008-11-14 Gavin Barraclough - - Reviewed by Geoff Garen. - - Geoff has this wacky notion that emitGetArg and emitPutArg should be related to - doing the same thing. Crazy. - - Rename the methods for accessing virtual registers to say 'VirtualRegister' in the - name, and those for setting up the arguments for CTI methods to contain 'CTIArg'. - - * VM/CTI.cpp: - (JSC::CTI::emitGetVirtualRegister): - (JSC::CTI::emitGetVirtualRegisters): - (JSC::CTI::emitPutCTIArgFromVirtualRegister): - (JSC::CTI::emitPutCTIArg): - (JSC::CTI::emitGetCTIArg): - (JSC::CTI::emitPutCTIArgConstant): - (JSC::CTI::emitPutVirtualRegister): - (JSC::CTI::compileOpCallSetupArgs): - (JSC::CTI::compileOpCallEvalSetupArgs): - (JSC::CTI::compileOpConstructSetupArgs): - (JSC::CTI::compileOpCall): - (JSC::CTI::compileOpStrictEq): - (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompileCTIMachineTrampolines): - * VM/CTI.h: - -2008-11-14 Greg Bolsinga - - Reviewed by Antti Koivisto - - Fix potential build break by adding StdLibExtras.h - - * GNUmakefile.am: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2008-11-14 Gavin Barraclough - - Reviewed by Geoff Garen. - - Generate less code for the slow cases of op_call and op_construct. - https://bugs.webkit.org/show_bug.cgi?id=22272 - - 1% progression on v8 tests. - - * VM/CTI.cpp: - (JSC::CTI::emitRetrieveArg): - (JSC::CTI::emitNakedCall): - (JSC::CTI::compileOpCallInitializeCallFrame): - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompileCTIMachineTrampolines): - * VM/CTI.h: - * VM/CodeBlock.h: - (JSC::getCallLinkInfoReturnLocation): - (JSC::CodeBlock::getCallLinkInfo): - * VM/Machine.cpp: - (JSC::Machine::Machine): - (JSC::Machine::cti_vm_dontLazyLinkCall): - (JSC::Machine::cti_vm_lazyLinkCall): - * VM/Machine.h: - -2008-11-14 Greg Bolsinga - - Reviewed by Darin Alder. - - https://bugs.webkit.org/show_bug.cgi?id=21810 - Remove use of static C++ objects that are destroyed at exit time (destructors) - - Create DEFINE_STATIC_LOCAL macro. Change static local objects to leak to avoid - exit-time destructor. Update code that was changed to fix this issue that ran - into a gcc bug ( Codegen issue with C++ static reference - in gcc build 5465). Also typdefs for template types needed to be added in some - cases so the type could make it through the macro successfully. - - Basically code of the form: - static T m; - becomes: - DEFINE_STATIC_LOCAL(T, m, ()); - - Also any code of the form: - static T& m = *new T; - also becomes: - DEFINE_STATIC_LOCAL(T, m, ()); - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/MainThread.cpp: - (WTF::mainThreadFunctionQueueMutex): - (WTF::functionQueue): - * wtf/StdLibExtras.h: Added. Add DEFINE_STATIC_LOCAL macro - * wtf/ThreadingPthreads.cpp: - (WTF::threadMapMutex): - (WTF::threadMap): - (WTF::identifierByPthreadHandle): - -2008-11-13 Sam Weinig - - Reviewed by Darin Adler - - Fix for https://bugs.webkit.org/show_bug.cgi?id=22269 - Reduce PropertyMap usage - - From observation of StructureID statistics, it became clear that many - StructureID's were not being used as StructureIDs themselves, but rather - only being necessary as links in the transition chain. Acknowledging this - and that PropertyMaps stored in StructureIDs can be treated as caches, that - is that they can be reconstructed on demand, it became clear that we could - reduce the memory consumption of StructureIDs by only keeping PropertyMaps - for the StructureIDs that need them the most. - - The specific strategy used to reduce the number of StructureIDs with - PropertyMaps is to take the previous StructureIDs PropertyMap when initially - transitioning (addPropertyTransition) from it and clearing out the pointer - in the process. The next time we need to do the same transition, for instance - repeated calls to the same constructor, we use the new addPropertyTransitionToExistingStructure - first, which allows us not to need the PropertyMap to determine if the property - exists already, since a transition to that property would require it not already - be present in the StructureID. Should there be no transition, the PropertyMap - can be constructed on demand (via materializePropertyMap) to determine if the put is a - replace or a transition to a new StructureID. - - Reduces memory use on Membuster head test (30 pages open) by ~15MB. - - * JavaScriptCore.exp: - * runtime/JSObject.h: - (JSC::JSObject::putDirect): First use addPropertyTransitionToExistingStructure - so that we can avoid building the PropertyMap on subsequent similar object - creations. - * runtime/PropertyMapHashTable.h: - (JSC::PropertyMapEntry::PropertyMapEntry): Add version of constructor which takes - all values to be used when lazily building the PropertyMap. - * runtime/StructureID.cpp: - (JSC::StructureID::dumpStatistics): Add statistics on the number of StructureIDs - with PropertyMaps. - (JSC::StructureID::StructureID): Rename m_cachedTransistionOffset to m_offset - (JSC::isPowerOf2): - (JSC::nextPowerOf2): - (JSC::sizeForKeyCount): Returns the expected size of a PropertyMap for a key count. - (JSC::StructureID::materializePropertyMap): Builds the PropertyMap out of its previous pointer chain. - (JSC::StructureID::addPropertyTransitionToExistingStructure): Only transitions if there is a - an existing transition. - (JSC::StructureID::addPropertyTransition): Instead of always copying the ProperyMap, try and take - it from it previous pointer. - (JSC::StructureID::removePropertyTransition): Simplify by calling toDictionaryTransition() to do - transition work. - (JSC::StructureID::changePrototypeTransition): Build the PropertyMap if necessary before transitioning - because once you have transitioned, you will not be able to reconstruct it afterwards as there is no - previous pointer, pinning the ProperyMap as well. - (JSC::StructureID::getterSetterTransition): Ditto. - (JSC::StructureID::toDictionaryTransition): Pin the PropertyMap so that it is not destroyed on further transitions. - (JSC::StructureID::fromDictionaryTransition): We can only transition back from a dictionary transition if there - are no deleted offsets. - (JSC::StructureID::addPropertyWithoutTransition): Build PropertyMap on demands and pin. - (JSC::StructureID::removePropertyWithoutTransition): Ditto. - (JSC::StructureID::get): Build on demand. - (JSC::StructureID::createPropertyMapHashTable): Add version of create that takes a size - for on demand building. - (JSC::StructureID::expandPropertyMapHashTable): - (JSC::StructureID::rehashPropertyMapHashTable): - (JSC::StructureID::getEnumerablePropertyNamesInternal): Build PropertyMap on demand. - * runtime/StructureID.h: - (JSC::StructureID::propertyStorageSize): Account for StructureIDs without PropertyMaps. - (JSC::StructureID::isEmpty): Ditto. - (JSC::StructureID::materializePropertyMapIfNecessary): - (JSC::StructureID::get): Build PropertyMap on demand - -2008-11-14 Csaba Osztrogonac - - Reviewed by Simon Hausmann. - - - - JavaScriptCore build with -O3 flag instead of -O2 (gcc). - 2.02% speedup on SunSpider (Qt-port on Linux) - 1.10% speedup on V8 (Qt-port on Linux) - 3.45% speedup on WindScorpion (Qt-port on Linux) - - * JavaScriptCore.pri: - -2008-11-14 Kristian Amlie - - Reviewed by Darin Adler. - - Compile fix for RVCT. - - In reality, it is two fixes: - - 1. Remove typename. I believe typename can only be used when the named - type depends on the template parameters, which it doesn't in this - case, so I think this is more correct. - 2. Replace ::iterator scope with specialized typedef. This is to work - around a bug in RVCT. - - https://bugs.webkit.org/show_bug.cgi?id=22260 - - * wtf/ListHashSet.h: - (WTF::::find): - -2008-11-14 Kristian Amlie - - Reviewed by Darin Adler. - - Compile fix for WINSCW. - - This fix doesn't protect against implicit conversions from bool to - integers, but most likely that will be caught on another platform. - - https://bugs.webkit.org/show_bug.cgi?id=22260 - - * wtf/PassRefPtr.h: - (WTF::PassRefPtr::operator bool): - * wtf/RefPtr.h: - (WTF::RefPtr::operator bool): - -2008-11-14 Cameron Zwarich - - Reviewed by Darin Adler. - - Bug 22245: Move wtf/dtoa.h into the WTF namespace - - - Move wtf/dtoa.h into the WTF namespace from the JSC namespace. This - introduces some ambiguities in name lookups, so I changed all uses of - the functions in wtf/dtoa.h to explicitly state the namespace. - - * JavaScriptCore.exp: - * parser/Lexer.cpp: - (JSC::Lexer::lex): - * runtime/InitializeThreading.cpp: - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::parseInt): - * runtime/NumberPrototype.cpp: - (JSC::integerPartNoExp): - (JSC::numberProtoFuncToExponential): - * runtime/UString.cpp: - (JSC::concatenate): - (JSC::UString::from): - (JSC::UString::toDouble): - * wtf/dtoa.cpp: - * wtf/dtoa.h: - -2008-11-14 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 22257: Enable redundant read optimizations for results generated by compileBinaryArithOp() - - - This shows no change in performance on either SunSpider or the V8 - benchmark suite, but it removes an ugly special case and allows for - future optimizations to be implemented in a cleaner fashion. - - This patch was essentially given to me by Gavin Barraclough upon my - request, but I did regression and performance testing so that he could - work on something else. - - * VM/CTI.cpp: - (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate): Move the final - result to eax if it is not already there. - (JSC::CTI::compileBinaryArithOp): Remove the killing of the final result - register that disables the optimization. - -2008-11-13 Eric Seidel - - Reviewed by Adam Roben. - - Add a Scons-based build system for building - the Chromium-Mac build of JavaScriptCore. - https://bugs.webkit.org/show_bug.cgi?id=21991 - - * JavaScriptCore.scons: Added. - * SConstruct: Added. - -2008-11-13 Eric Seidel - - Reviewed by Adam Roben. - - Add PLATFORM(CHROMIUM) to the "we don't use cairo" blacklist - until https://bugs.webkit.org/show_bug.cgi?id=22250 is fixed. - - * wtf/Platform.h: - -2008-11-13 Cameron Zwarich - - Reviewed by Sam Weinig. - - In r38375 the 'jsc' shell was changed to improve teardown on quit. The - main() function in jsc.cpp uses Structured Exception Handling, so Visual - C++ emits a warning when destructors are used. - - In order to speculatively fix the Windows build, this patch changes that - code to use explicit pointer manipulation and locking rather than smart - pointers and RAII. - - * jsc.cpp: - (main): - -2008-11-13 Cameron Zwarich - - Reviewed by Darin Adler. - - Bug 22246: Get arguments for opcodes together to eliminate more redundant memory reads - - - It is common for opcodes to read their first operand into eax and their - second operand into edx. If the value intended for the second operand is - in eax, we should first move eax to the register for the second operand - and then read the first operand into eax. - - This is a 0.5% speedup on SunSpider and a 2.0% speedup on the V8 - benchmark suite when measured using the V8 harness. - - * VM/CTI.cpp: - (JSC::CTI::emitGetArgs): - (JSC::CTI::compileOpStrictEq): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CTI.h: - -2008-11-13 Cameron Zwarich - - Reviewed by Darin Adler. - - Bug 22238: Avoid unnecessary reads of temporaries when the target machine register is not eax - - - Enable the optimization of not reading a value back from memory that we - just wrote when the target machine register is not eax. In order to do - this, the code generation for op_put_global_var must be changed to - read its argument into a register before overwriting eax. - - This is a 0.5% speedup on SunSpider and shows no change on the V8 - benchmark suite when run in either harness. - - * VM/CTI.cpp: - (JSC::CTI::emitGetArg): - (JSC::CTI::privateCompileMainPass): - -2008-11-13 Cameron Zwarich - - Reviewed by Alexey Proskuryakov. - - Perform teardown in the 'jsc' shell in order to suppress annoying and - misleading leak messages. There is still a lone JSC::Node leaking when - quit() is called, but hopefully that can be fixed as well. - - * jsc.cpp: - (functionQuit): - (main): - -2008-11-13 Mike Pinkerton - - Reviewed by Sam Weinig. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=22087 - Need correct platform defines for Mac Chromium - - Set the appropriate platform defines for Mac Chromium, which is - similar to PLATFORM(MAC), but isn't. - - * wtf/Platform.h: - -2008-11-13 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - remove immediate checks from native codegen for known non-immediate cases like "this" - - ~.5% speedup on v8 benchmarks - - In the future we can extend this model to remove all sorts of - typechecks based on local type info or type inference. - - I also added an assertion to verify that all slow cases linked as - many slow case jumps as the corresponding fast case generated, and - fixed the pre-existing cases where this was not true. - - * VM/CTI.cpp: - (JSC::CTI::emitJumpSlowCaseIfNotJSCell): - (JSC::CTI::linkSlowCaseIfNotJSCell): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CTI.h: - * VM/CodeBlock.h: - (JSC::CodeBlock::isKnownNotImmediate): - -2008-11-13 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 21943: Avoid needless reads of temporary values in CTI code - - - If an opcode needs to load a virtual register and a previous opcode left - the contents of that virtual register in a machine register, use the - value in the machine register rather than getting it from memory. - - In order to perform this optimization, it is necessary to know the - jump tagets in the CodeBlock. For temporaries, the only problematic - jump targets are binary logical operators and the ternary conditional - operator. However, if this optimization were to be extended to local - variable registers as well, other jump targets would need to be - included, like switch statement cases and the beginnings of catch - blocks. - - This optimization also requires that the fast case and the slow case - of an opcode use emitPutResult() on the same register, which was chosen - to be eax, as that is the register into which we read the first operand - of opcodes. In order to make this the case, we needed to add some mov - instructions to the slow cases of some instructions. - - This optimizaton is not applied whenever compileBinaryArithOp() is used - to compile an opcode, because different machine registers may be used to - store the final result. It seems possible to rewrite the code generation - in compileBinaryArithOp() to allow for this optimization. - - This optimization is also not applied when generating slow cases, - because some fast cases overwrite the value of eax before jumping to the - slow case. In the future, it may be possible to apply this optimization - to slow cases as well, but it did not seem to be a speedup when testing - an early version of this patch. - - This is a 1.0% speedup on SunSpider and a 6.3% speedup on the V8 - benchmark suite. - - * VM/CTI.cpp: - (JSC::CTI::killLastResultRegister): - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::emitGetCTIParam): - (JSC::CTI::emitGetFromCallFrameHeader): - (JSC::CTI::emitPutResult): - (JSC::CTI::emitCTICall): - (JSC::CTI::CTI): - (JSC::CTI::compileOpCall): - (JSC::CTI::compileOpStrictEq): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompilePatchGetArrayLength): - * VM/CTI.h: - * VM/CodeBlock.h: - (JSC::CodeBlock::isTemporaryRegisterIndex): - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::emitLabel): - -2008-11-12 Alp Toker - - autotools build system fix-up only. Add FloatQuad.h to the source - lists and sort them. - - * GNUmakefile.am: - -2008-11-12 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=22192 - +37 failures in fast/profiler - - along with Darin's review comments in - https://bugs.webkit.org/show_bug.cgi?id=22174 - Simplified op_call by nixing its responsibility for moving the value of - "this" into the first argument slot - - * VM/Machine.cpp: - (JSC::returnToThrowTrampoline): - (JSC::throwStackOverflowError): - (JSC::Machine::cti_register_file_check): - (JSC::Machine::cti_op_call_arityCheck): - (JSC::Machine::cti_vm_throw): Moved the throw logic into a function, since - functions are better than macros. - - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::emitCall): - (JSC::CodeGenerator::emitConstruct): Ensure that the function register - is preserved if profiling is enabled, since the profiler uses that - register. - - * runtime/JSGlobalData.h: Renamed throwReturnAddress to exceptionLocation, - because I had a hard time understanding what "throwReturnAddress" meant. - -2008-11-12 Geoffrey Garen - - Reviewed by Sam Weinig. - - Roll in r38322, now that test failures have been fixed. - - * VM/CTI.cpp: - (JSC::CTI::compileOpCallSetupArgs): - (JSC::CTI::compileOpCallEvalSetupArgs): - (JSC::CTI::compileOpConstructSetupArgs): - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/Machine.cpp: - (JSC::Machine::callEval): - (JSC::Machine::dumpCallFrame): - (JSC::Machine::dumpRegisters): - (JSC::Machine::execute): - (JSC::Machine::privateExecute): - (JSC::Machine::cti_register_file_check): - (JSC::Machine::cti_op_call_arityCheck): - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_construct_NotJSConstruct): - (JSC::Machine::cti_op_call_eval): - (JSC::Machine::cti_vm_throw): - * VM/Machine.h: - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::emitCall): - (JSC::CodeGenerator::emitCallEval): - (JSC::CodeGenerator::emitConstruct): - * bytecompiler/CodeGenerator.h: - * parser/Nodes.cpp: - (JSC::EvalFunctionCallNode::emitCode): - (JSC::FunctionCallValueNode::emitCode): - (JSC::FunctionCallResolveNode::emitCode): - (JSC::FunctionCallBracketNode::emitCode): - (JSC::FunctionCallDotNode::emitCode): - * parser/Nodes.h: - (JSC::ScopeNode::neededConstants): - -2008-11-12 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=22201 - Integer conversion in array.length was safe signed values, - but the length is unsigned. - - * VM/CTI.cpp: - (JSC::CTI::privateCompilePatchGetArrayLength): - -2008-11-12 Cameron Zwarich - - Rubber-stamped by Mark Rowe. - - Roll out r38322 due to test failures on the bots. - - * VM/CTI.cpp: - (JSC::CTI::compileOpCallSetupArgs): - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/Machine.cpp: - (JSC::Machine::callEval): - (JSC::Machine::dumpCallFrame): - (JSC::Machine::dumpRegisters): - (JSC::Machine::execute): - (JSC::Machine::privateExecute): - (JSC::Machine::throwStackOverflowPreviousFrame): - (JSC::Machine::cti_register_file_check): - (JSC::Machine::cti_op_call_arityCheck): - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_construct_NotJSConstruct): - (JSC::Machine::cti_op_call_eval): - (JSC::Machine::cti_vm_throw): - * VM/Machine.h: - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::emitCall): - (JSC::CodeGenerator::emitCallEval): - (JSC::CodeGenerator::emitConstruct): - * bytecompiler/CodeGenerator.h: - * parser/Nodes.cpp: - (JSC::EvalFunctionCallNode::emitCode): - (JSC::FunctionCallValueNode::emitCode): - (JSC::FunctionCallResolveNode::emitCode): - (JSC::FunctionCallBracketNode::emitCode): - (JSC::FunctionCallDotNode::emitCode): - * parser/Nodes.h: - (JSC::ScopeNode::neededConstants): - -2008-11-11 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=22174 - Simplified op_call by nixing its responsibility for moving the value of - "this" into the first argument slot. - - Instead, the caller emits an explicit load or mov instruction, or relies - on implicit knowledge that "this" is already in the first argument slot. - As a result, two operands to op_call are gone: firstArg and thisVal. - - SunSpider and v8 tests show no change in bytecode or CTI. - - * VM/CTI.cpp: - (JSC::CTI::compileOpCallSetupArgs): - (JSC::CTI::compileOpCallEvalSetupArgs): - (JSC::CTI::compileOpConstructSetupArgs): Split apart these three versions - of setting up arguments to op_call, because they're more different than - they are the same -- even more so with this patch. - - (JSC::CTI::compileOpCall): Updated for the fact that op_construct doesn't - match op_call anymore. - - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): Merged a few call cases. Updated - for changes mentioned above. - - * VM/CTI.h: - - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): Updated for new bytecode format of call / construct. - - * VM/Machine.cpp: - (JSC::Machine::callEval): Updated for new bytecode format of call / construct. - - (JSC::Machine::dumpCallFrame): - (JSC::Machine::dumpRegisters): Simplified these debugging functions, - taking advantage of the new call frame layout. - - (JSC::Machine::execute): Fixed up the eval version of execute to be - friendlier to calls in the new format. - - (JSC::Machine::privateExecute): Implemented the new call format in - bytecode. - - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_construct_NotJSConstruct): - (JSC::Machine::cti_op_call_eval): Updated CTI helpers to match the new - call format. - - Fixed a latent bug in stack overflow checking that is now hit because - the register layout has changed a bit -- namely: when throwing a stack - overflow exception inside an op_call helper, we need to account for the - fact that the current call frame is only half-constructed, and use the - parent call frame instead. - - * VM/Machine.h: - - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::emitCall): - (JSC::CodeGenerator::emitCallEval): - (JSC::CodeGenerator::emitConstruct): - * bytecompiler/CodeGenerator.h: Updated codegen to match the new call - format. - - * parser/Nodes.cpp: - (JSC::EvalFunctionCallNode::emitCode): - (JSC::FunctionCallValueNode::emitCode): - (JSC::FunctionCallResolveNode::emitCode): - (JSC::FunctionCallBracketNode::emitCode): - (JSC::FunctionCallDotNode::emitCode): - * parser/Nodes.h: - (JSC::ScopeNode::neededConstants): ditto - -2008-11-11 Cameron Zwarich - - Reviewed by Geoff Garen. - - Remove an unused forwarding header for a file that no longer exists. - - * ForwardingHeaders/JavaScriptCore/JSLock.h: Removed. - -2008-11-11 Mark Rowe - - Fix broken dependencies building JavaScriptCore on a freezing cold cat, caused - by failure to update all instances of "kjs" to their new locations. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-11-11 Alexey Proskuryakov - - Rubber-stamped by Adam Roben. - - * wtf/AVLTree.h: (WTF::AVLTree::Iterator::start_iter): - Fix indentation a little more. - -2008-11-11 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Clean up EvalCodeCache to match our coding style a bit more. - - * VM/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - -2008-11-11 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Bug 22179: Move EvalCodeCache from CodeBlock.h into its own file - - - * GNUmakefile.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CodeBlock.h: - * VM/EvalCodeCache.h: Copied from VM/CodeBlock.h. - * VM/Machine.cpp: - -2008-11-11 Cameron Zwarich - - Reviewed by Sam Weinig. - - Remove the 'm_' prefix from the fields of the SwitchRecord struct. - - * VM/CTI.cpp: - (JSC::CTI::privateCompile): - * VM/CTI.h: - (JSC::SwitchRecord): - (JSC::SwitchRecord::SwitchRecord): - -2008-11-11 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Make asInteger() a static function so that it has internal linkage. - - * VM/CTI.cpp: - (JSC::asInteger): - -2008-11-11 Maciej Stachowiak - - Reviewed by Mark Rowe. - - - shrink CodeBlock and AST related Vectors to exact fit (5-10M savings on membuster test) - - No perf regression combined with the last patch (each seems like a small regression individually) - - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::generate): - * parser/Nodes.h: - (JSC::SourceElements::releaseContentsIntoVector): - * wtf/Vector.h: - (WTF::Vector::shrinkToFit): - -2008-11-11 Maciej Stachowiak - - Reviewed by Mark Rowe. - - - remove inline capacity from declaration stacks (15M savings on membuster test) - - No perf regression on SunSpider or V8 test combined with other upcoming memory improvement patch. - - * JavaScriptCore.exp: - * parser/Nodes.h: - -2008-11-11 Cameron Zwarich - - Reviewed by Oliver Hunt. - - While r38286 removed the need for the m_callFrame member variable of - CTI, it should be also be removed. - - * VM/CTI.h: - -2008-11-10 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Make CTI::asInteger() a non-member function, since it needs no access to - any of CTI's member variables. - - * VM/CTI.cpp: - (JSC::asInteger): - * VM/CTI.h: - -2008-11-10 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Use 'value' instead of 'js' in CTI as a name for JSValue* to match our - usual convention elsewhere. - - * VM/CTI.cpp: - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::getConstantImmediateNumericArg): - (JSC::CTI::printOpcodeOperandTypes): - -2008-11-10 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Make CTI::getConstant() a member function of CodeBlock instead. - - * VM/CTI.cpp: - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::getConstantImmediateNumericArg): - (JSC::CTI::printOpcodeOperandTypes): - (JSC::CTI::privateCompileMainPass): - * VM/CTI.h: - * VM/CodeBlock.h: - (JSC::CodeBlock::getConstant): - -2008-11-10 Cameron Zwarich - - Reviewed by Sam Weinig. - - Rename CodeBlock::isConstant() to isConstantRegisterIndex(). - - * VM/CTI.cpp: - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::getConstantImmediateNumericArg): - (JSC::CTI::printOpcodeOperandTypes): - (JSC::CTI::privateCompileMainPass): - * VM/CodeBlock.h: - (JSC::CodeBlock::isConstantRegisterIndex): - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::emitEqualityOp): - -2008-11-10 Gavin Barraclough - - Build fix for non-CTI builds. - - * VM/Machine.cpp: - (JSC::Machine::initialize): - -2008-11-10 Cameron Zwarich - - Reviewed by Sam Weinig. - - Remove the unused labels member variable of CodeBlock. - - * VM/CodeBlock.h: - * VM/LabelID.h: - (JSC::LabelID::setLocation): - -2008-11-10 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Batch compile the set of static trampolines at the point Machine is constructed, using a single allocation. - Refactor out m_callFrame from CTI, since this is only needed to access the global data (instead store a - pointer to the global data directly, since this is available at the point the Machine is constructed). - Add a method to align the code buffer, to allow JIT generation for multiple trampolines in one block. - - * VM/CTI.cpp: - (JSC::CTI::getConstant): - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::getConstantImmediateNumericArg): - (JSC::CTI::printOpcodeOperandTypes): - (JSC::CTI::CTI): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompileCTIMachineTrampolines): - (JSC::CTI::freeCTIMachineTrampolines): - * VM/CTI.h: - (JSC::CTI::compile): - (JSC::CTI::compileGetByIdSelf): - (JSC::CTI::compileGetByIdProto): - (JSC::CTI::compileGetByIdChain): - (JSC::CTI::compilePutByIdReplace): - (JSC::CTI::compilePutByIdTransition): - (JSC::CTI::compileCTIMachineTrampolines): - (JSC::CTI::compilePatchGetArrayLength): - * VM/Machine.cpp: - (JSC::Machine::initialize): - (JSC::Machine::~Machine): - (JSC::Machine::execute): - (JSC::Machine::tryCTICachePutByID): - (JSC::Machine::tryCTICacheGetByID): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_vm_lazyLinkCall): - * VM/Machine.h: - * masm/X86Assembler.h: - (JSC::JITCodeBuffer::isAligned): - (JSC::X86Assembler::): - (JSC::X86Assembler::align): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - -2008-11-10 Maciej Stachowiak - - Reviewed by Antti Koivisto. - - - Make Vector::clear() release the Vector's memory (1MB savings on membuster) - https://bugs.webkit.org/show_bug.cgi?id=22170 - - * wtf/Vector.h: - (WTF::VectorBufferBase::deallocateBuffer): Set capacity to 0 as - well as size, otherwise shrinking capacity to 0 can fail to reset - the capacity and thus cause a future crash. - (WTF::Vector::~Vector): Shrink size not capacity; we only need - to call destructors, the buffer will be freed anyway. - (WTF::Vector::clear): Change this to shrinkCapacity(0), not just shrink(0). - (WTF::::shrinkCapacity): Use shrink() instead of resize() for case where - the size is greater than the new capacity, to work with types that have no - default constructor. - -2008-11-10 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Split multiple definitions into separate lines. - - * VM/CTI.cpp: - (JSC::CTI::compileBinaryArithOp): - -2008-11-10 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 22162: Remove cachedValueGetter from the JavaScriptCore API implementation - - - There is no more need for the cachedValueGetter hack now that we have - PropertySlot::setValue(), so we should remove it. - - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertySlot): - -2008-11-10 Cameron Zwarich - - Reviewed by Darin Adler. - - Bug 22152: Remove asObject() call from JSCallbackObject::getOwnPropertySlot() - - - With the recent change to adopt asType() style cast functions with - assertions instead of static_casts in many places, the assertion for - the asObject() call in JSCallbackObject::getOwnPropertySlot() has been - failing when using any nontrivial client of the JavaScriptCore API. - The cast isn't even necessary to call slot.setCustom(), so it should - be removed. - - * API/JSCallbackObjectFunctions.h: - (JSC::JSCallbackObject::getOwnPropertySlot): - -2008-11-10 Alexey Proskuryakov - - Reviewed by Adam Roben. - - A few coding style fixes for AVLTree. - - * wtf/AVLTree.h: Moved to WTF namespace, Removed "KJS_" from include guards. - (WTF::AVLTree::Iterator::start_iter): Fixed indentation - - * runtime/JSArray.cpp: Added "using namepace WTF". - -2008-11-09 Cameron Zwarich - - Not reviewed. - - Speculatively fix the non-AllInOne build. - - * runtime/NativeErrorConstructor.cpp: - -2008-11-09 Darin Adler - - Reviewed by Tim Hatcher. - - - https://bugs.webkit.org/show_bug.cgi?id=22149 - remove unused code from the parser - - * AllInOneFile.cpp: Removed nodes2string.cpp. - * GNUmakefile.am: Ditto. - * JavaScriptCore.exp: Ditto. - * JavaScriptCore.pri: Ditto. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - * JavaScriptCoreSources.bkl: Ditto. - - * VM/CodeBlock.h: Added include. - - * VM/Machine.cpp: (JSC::Machine::execute): Use the types from - DeclarationStacks as DeclarationStacks:: rather than Node:: since - "Node" really has little to do with it. - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::CodeGenerator): Ditto. - - * jsc.cpp: - (Options::Options): Removed prettyPrint option. - (runWithScripts): Ditto. - (printUsageStatement): Ditto. - (parseArguments): Ditto. - (jscmain): Ditto. - - * parser/Grammar.y: Removed use of obsolete ImmediateNumberNode. - - * parser/Nodes.cpp: - (JSC::ThrowableExpressionData::emitThrowError): Use inline functions - instead of direct member access for ThrowableExpressionData values. - (JSC::BracketAccessorNode::emitCode): Ditto. - (JSC::DotAccessorNode::emitCode): Ditto. - (JSC::NewExprNode::emitCode): Ditto. - (JSC::EvalFunctionCallNode::emitCode): Ditto. - (JSC::FunctionCallValueNode::emitCode): Ditto. - (JSC::FunctionCallResolveNode::emitCode): Ditto. - (JSC::FunctionCallBracketNode::emitCode): Ditto. - (JSC::FunctionCallDotNode::emitCode): Ditto. - (JSC::PostfixResolveNode::emitCode): Ditto. - (JSC::PostfixBracketNode::emitCode): Ditto. - (JSC::PostfixDotNode::emitCode): Ditto. - (JSC::DeleteResolveNode::emitCode): Ditto. - (JSC::DeleteBracketNode::emitCode): Ditto. - (JSC::DeleteDotNode::emitCode): Ditto. - (JSC::PrefixResolveNode::emitCode): Ditto. - (JSC::PrefixBracketNode::emitCode): Ditto. - (JSC::PrefixDotNode::emitCode): Ditto. - (JSC::ThrowableBinaryOpNode::emitCode): Ditto. - (JSC::InstanceOfNode::emitCode): Ditto. - (JSC::ReadModifyResolveNode::emitCode): Ditto. - (JSC::AssignResolveNode::emitCode): Ditto. - (JSC::AssignDotNode::emitCode): Ditto. - (JSC::ReadModifyDotNode::emitCode): Ditto. - (JSC::AssignBracketNode::emitCode): Ditto. - (JSC::ReadModifyBracketNode::emitCode): Ditto. - (JSC::statementListEmitCode): Take a const StatementVector instead - of a non-const one. Also removed unused statementListPushFIFO. - (JSC::ForInNode::emitCode): Inline functions instead of member access. - (JSC::ThrowNode::emitCode): Ditto. - (JSC::EvalNode::emitCode): Ditto. - (JSC::FunctionBodyNode::emitCode): Ditto. - (JSC::ProgramNode::emitCode): Ditto. - - * parser/Nodes.h: Removed unused includes and forward declarations. - Removed Precedence enum. Made many more members private instead of - protected or public. Removed unused NodeStack typedef. Moved the - VarStack and FunctionStack typedefs from Node to ScopeNode. Made - Node::emitCode pure virtual and changed classes that don't emit - any code to inherit from ParserRefCounted rather than Node. - Moved isReturnNode from Node to StatementNode. Removed the - streamTo, precedence, and needsParensIfLeftmost functions from - all classes. Removed the ImmediateNumberNode class and make - NumberNode::setValue nonvirtual. - - * parser/nodes2string.cpp: Removed. - -2008-11-09 Darin Adler - - Reviewed by Sam Weinig and Maciej Stachowiak. - Includes some work done by Chris Brichford. - - - fix https://bugs.webkit.org/show_bug.cgi?id=14886 - Stack overflow due to deeply nested parse tree doing repeated string concatentation - - Test: fast/js/large-expressions.html - - 1) Code generation is recursive, so takes stack proportional to the complexity - of the source code expression. Fixed by setting an arbitrary recursion limit - of 10,000 nodes. - - 2) Destruction of the syntax tree was recursive. Fixed by introducing a - non-recursive mechanism for destroying the tree. - - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::CodeGenerator): Initialize depth to 0. - (JSC::CodeGenerator::emitThrowExpressionTooDeepException): Added. Emits the code - to throw a "too deep" exception. - * bytecompiler/CodeGenerator.h: - (JSC::CodeGenerator::emitNode): Check depth and emit an exception if we exceed - the maximum depth. - - * parser/Nodes.cpp: - (JSC::NodeReleaser::releaseAllNodes): Added. To be called inside node destructors - to avoid recursive calls to destructors for nodes inside this one. - (JSC::NodeReleaser::release): Added. To be called inside releaseNodes functions. - Also added releaseNodes functions and calls to releaseAllNodes inside destructors - for each class derived from Node that has RefPtr to other nodes. - (JSC::NodeReleaser::adopt): Added. Used by the release function. - (JSC::NodeReleaser::adoptFunctionBodyNode): Added. - - * parser/Nodes.h: Added declarations of releaseNodes and destructors in all classes - that needed it. Eliminated use of ListRefPtr and releaseNext, which are the two parts - of an older solution to the non-recursive destruction problem that works only for - lists, whereas the new solution works for other graphs. Changed ReverseBinaryOpNode - to use BinaryOpNode as a base class to avoid some duplicated code. - -2008-11-08 Kevin Ollivier - - wx build fixes after addition of JSCore parser and bycompiler dirs. Also cleanup - the JSCore Bakefile's group names to be consistent. - - * JavaScriptCoreSources.bkl: - * jscore.bkl: - -2008-11-07 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 21801: REGRESSION (r37821): YUI date formatting JavaScript puts the letter 'd' in place of the day - - - Fix the constant register check in the 'typeof' optimization in - CodeGenerator, which was completely broken after r37821. - - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::emitEqualityOp): - -2008-11-07 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 22129: Move CTI::isConstant() to CodeBlock - - - * VM/CTI.cpp: - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::getConstantImmediateNumericArg): - (JSC::CTI::printOpcodeOperandTypes): - (JSC::CTI::privateCompileMainPass): - * VM/CTI.h: - * VM/CodeBlock.h: - (JSC::CodeBlock::isConstant): - -2008-11-07 Alp Toker - - autotools fix. Always use the configured perl binary (which may be - different to the one in $PATH) when generating sources. - - * GNUmakefile.am: - -2008-11-07 Cameron Zwarich - - Not reviewed. - - Change grammar.cpp to Grammar.cpp and grammar.h to Grammar.h in several - build scripts. - - * DerivedSources.make: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCoreSources.bkl: - -2008-11-07 Alp Toker - - More grammar.cpp -> Grammar.cpp build fixes. - - * AllInOneFile.cpp: - * GNUmakefile.am: - -2008-11-07 Simon Hausmann - - Fix the build on case-sensitive file systems. grammar.y was renamed to - Grammar.y but Lexer.cpp includes grammar.h. The build bots didn't - notice this change because of stale files. - - * parser/Lexer.cpp: - -2008-11-07 Cameron Zwarich - - Reviewed by Alexey Proskuryakov. - - Rename the m_nextGlobal, m_nextParameter, and m_nextConstant member - variables of CodeGenerator to m_nextGlobalIndex, m_nextParameterIndex, - and m_nextConstantIndex respectively. This is to distinguish these from - member variables like m_lastConstant, which are actually RefPtrs to - Registers. - - * bytecompiler/CodeGenerator.cpp: - (JSC::CodeGenerator::addGlobalVar): - (JSC::CodeGenerator::allocateConstants): - (JSC::CodeGenerator::CodeGenerator): - (JSC::CodeGenerator::addParameter): - (JSC::CodeGenerator::addConstant): - * bytecompiler/CodeGenerator.h: - -2008-11-06 Gavin Barraclough barraclough@apple.com - - Reviewed by Oliver Hunt. - - Do not make a cti_* call to perform an op_call unless either: - (1) The codeblock for the function body has not been generated. - (2) The number of arguments passed does not match the callee arity. - - ~1% progression on sunspider --v8 - - * VM/CTI.cpp: - (JSC::CTI::compileOpCallInitializeCallFrame): - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileSlowCases): - * VM/CTI.h: - * VM/Machine.cpp: - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_op_call_arityCheck): - (JSC::Machine::cti_op_construct_JSConstruct): - * VM/Machine.h: - * kjs/nodes.h: - -2008-11-06 Cameron Zwarich - - Reviewed by Geoff Garen. - - Move the remaining files in the kjs subdirectory of JavaScriptCore to - a new parser subdirectory, and remove the kjs subdirectory entirely. - - * AllInOneFile.cpp: - * DerivedSources.make: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/CodeBlock.h: - * VM/ExceptionHelpers.cpp: - * VM/SamplingTool.h: - * bytecompiler/CodeGenerator.h: - * jsc.pro: - * jscore.bkl: - * kjs: Removed. - * kjs/NodeInfo.h: Removed. - * kjs/Parser.cpp: Removed. - * kjs/Parser.h: Removed. - * kjs/ResultType.h: Removed. - * kjs/SourceCode.h: Removed. - * kjs/SourceProvider.h: Removed. - * kjs/grammar.y: Removed. - * kjs/keywords.table: Removed. - * kjs/lexer.cpp: Removed. - * kjs/lexer.h: Removed. - * kjs/nodes.cpp: Removed. - * kjs/nodes.h: Removed. - * kjs/nodes2string.cpp: Removed. - * parser: Added. - * parser/Grammar.y: Copied from kjs/grammar.y. - * parser/Keywords.table: Copied from kjs/keywords.table. - * parser/Lexer.cpp: Copied from kjs/lexer.cpp. - * parser/Lexer.h: Copied from kjs/lexer.h. - * parser/NodeInfo.h: Copied from kjs/NodeInfo.h. - * parser/Nodes.cpp: Copied from kjs/nodes.cpp. - * parser/Nodes.h: Copied from kjs/nodes.h. - * parser/Parser.cpp: Copied from kjs/Parser.cpp. - * parser/Parser.h: Copied from kjs/Parser.h. - * parser/ResultType.h: Copied from kjs/ResultType.h. - * parser/SourceCode.h: Copied from kjs/SourceCode.h. - * parser/SourceProvider.h: Copied from kjs/SourceProvider.h. - * parser/nodes2string.cpp: Copied from kjs/nodes2string.cpp. - * pcre/pcre.pri: - * pcre/pcre_exec.cpp: - * runtime/FunctionConstructor.cpp: - * runtime/JSActivation.h: - * runtime/JSFunction.h: - * runtime/JSGlobalData.cpp: - * runtime/JSGlobalObjectFunctions.cpp: - * runtime/JSObject.cpp: - (JSC::JSObject::toNumber): - * runtime/RegExp.cpp: - -2008-11-06 Adam Roben - - Windows build fix after r38196 - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Added bytecompiler/ to the - include path. - -2008-11-06 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Create a new bytecompiler subdirectory of JavaScriptCore and move some - relevant files to it. - - * AllInOneFile.cpp: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/CodeGenerator.cpp: Removed. - * VM/CodeGenerator.h: Removed. - * bytecompiler: Added. - * bytecompiler/CodeGenerator.cpp: Copied from VM/CodeGenerator.cpp. - * bytecompiler/CodeGenerator.h: Copied from VM/CodeGenerator.h. - * bytecompiler/LabelScope.h: Copied from kjs/LabelScope.h. - * jscore.bkl: - * kjs/LabelScope.h: Removed. - -2008-11-06 Adam Roben - - Windows clean build fix after r38155 - - Rubberstamped by Cameron Zwarich. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Update - the post-build event for the move of create_hash_table out of kjs/. - -2008-11-06 Laszlo Gombos - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=22107 - - Bug uncovered during RVCT port in functions not used. get_lt() and - get_gt() takes only one argument - remove second argument where - applicable. - - * wtf/AVLTree.h: - (JSC::AVLTree::remove): Remove second argument of get_lt/get_gt(). - (JSC::AVLTree::subst): Ditto. - -2008-11-06 Alp Toker - - Reviewed by Cameron Zwarich. - - https://bugs.webkit.org/show_bug.cgi?id=22033 - [GTK] CTI/Linux r38064 crashes; JIT requires executable memory - - Mark pages allocated by the FastMalloc mmap code path executable with - PROT_EXEC. This fixes crashes seen on CPUs and kernels that enforce - non-executable memory (like ExecShield on Fedora Linux) when the JIT - is enabled. - - This patch does not resolve the issue on debug builds so affected - developers may still need to pass --disable-jit to configure. - - * wtf/TCSystemAlloc.cpp: - (TryMmap): - (TryDevMem): - (TCMalloc_SystemRelease): - -2008-11-06 Peter Gal - - Reviewed by Cameron Zwarich. - - Bug 22099: Make the Qt port build the JSC shell in the correct place - - - Adjust include paths and build destination dir for the 'jsc' executable - in the Qt build. - - * jsc.pro: - -2008-11-06 Kristian Amlie - - Reviewed by Simon Hausmann. - - Implemented the block allocation on Symbian through heap allocation. - - Unfortunately there is no way to allocate virtual memory. The Posix - layer provides mmap() but no anonymous mapping. So this is a very slow - solution but it should work as a start. - - * runtime/Collector.cpp: - (JSC::allocateBlock): - (JSC::freeBlock): - -2008-11-06 Laszlo Gombos - - Reviewed by Simon Hausmann. - - Borrow some math functions from the MSVC port to the build with the - RVCT compiler. - - * wtf/MathExtras.h: - (isinf): - (isnan): - (signbit): - -2008-11-06 Laszlo Gombos - - Reviewed by Simon Hausmann. - - Include strings.h for strncasecmp(). - This is needed for compilation inside Symbian and it is also - confirmed by the man-page on Linux. - - * runtime/DateMath.cpp: - -2008-11-06 Norbert Leser - - Reviewed by Simon Hausmann. - - Implemented currentThreadStackBase for Symbian. - - * runtime/Collector.cpp: - (JSC::currentThreadStackBase): - -2008-11-06 Laszlo Gombos - - Reviewed by Simon Hausmann. - - RVCT does not support tm_gmtoff field, so disable that code just like - for MSVC. - - * runtime/DateMath.h: - (JSC::GregorianDateTime::GregorianDateTime): - (JSC::GregorianDateTime::operator tm): - -2008-11-06 Kristian Amlie - - Reviewed by Simon Hausmann. - - Define PLATFORM(UNIX) for S60. Effectively WebKit on S60 is compiled - on top of the Posix layer. - - * wtf/Platform.h: - -2008-11-06 Norbert Leser - - Reviewed by Simon Hausmann. - - Added __SYMBIAN32__ condition for defining PLATFORM(SYMBIAN). - - * wtf/Platform.h: - -2008-11-06 Ariya Hidayat - - Reviewed by Simon Hausmann. - - Added WINSCW compiler define for Symbian S60. - - * wtf/Platform.h: - -2008-11-06 Kristian Amlie - - Reviewed by Simon Hausmann. - - Use the GCC defines of the WTF_ALIGN* macros for the RVCT and the - MINSCW compiler. - - * wtf/Vector.h: - -2008-11-06 Kristian Amlie - - Reviewed by Simon Hausmann. - - Define capabilities of the SYMBIAN platform. Some of the system - headers are actually dependent on RVCT. - - * wtf/Platform.h: - -2008-11-06 Kristian Amlie - - Reviewed by Simon Hausmann. - - Add missing stddef.h header needed for compilation in Symbian. - - * runtime/Collector.h: - -2008-11-06 Kristian Amlie - - Reviewed by Simon Hausmann. - - Added COMPILER(RVCT) to detect the ARM RVCT compiler used in the Symbian environment. - - * wtf/Platform.h: - -2008-11-06 Simon Hausmann - - Fix the Qt build, adjust include paths after move of jsc.pro. - - * jsc.pro: - -2008-11-06 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Move kjs/Shell.cpp to the top level of the JavaScriptCore directory and - rename it to jsc.cpp to reflect the name of the binary compiled from it. - - * GNUmakefile.am: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * jsc.cpp: Copied from kjs/Shell.cpp. - * jsc.pro: - * jscore.bkl: - * kjs/Shell.cpp: Removed. - -2008-11-06 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Move create_hash_table and jsc.pro out of the kjs directory and into the - root directory of JavaScriptCore. - - * DerivedSources.make: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * create_hash_table: Copied from kjs/create_hash_table. - * jsc.pro: Copied from kjs/jsc.pro. - * kjs/create_hash_table: Removed. - * kjs/jsc.pro: Removed. - * make-generated-sources.sh: - -2008-11-05 Gavin Barraclough - - Reviewed by Maciej Stachowiak. - - https://bugs.webkit.org/show_bug.cgi?id=22094 - - Fix for bug where the callee incorrectly recieves the caller's lexical - global object as this, rather than its own. Implementation closely - follows the spec, passing jsNull, checking in the callee and replacing - with the global object where necessary. - - * VM/CTI.cpp: - (JSC::CTI::compileOpCall): - * VM/Machine.cpp: - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_call_eval): - * runtime/JSCell.h: - (JSC::JSValue::toThisObject): - * runtime/JSImmediate.cpp: - (JSC::JSImmediate::toThisObject): - * runtime/JSImmediate.h: - -2008-11-05 Kevin Ollivier - - wx build fix after Operations.cpp move. - - * JavaScriptCoreSources.bkl: - -2008-11-05 Cameron Zwarich - - Not reviewed. - - Fix the build for case-sensitive build systems and wxWindows. - - * JavaScriptCoreSources.bkl: - * kjs/create_hash_table: - -2008-11-05 Cameron Zwarich - - Not reviewed. - - Fix the build for case-sensitive build systems. - - * JavaScriptCoreSources.bkl: - * kjs/Shell.cpp: - * runtime/Interpreter.cpp: - * runtime/JSArray.cpp: - -2008-11-05 Cameron Zwarich - - Not reviewed. - - Fix the build for case-sensitive build systems. - - * API/JSBase.cpp: - * API/JSObjectRef.cpp: - * runtime/CommonIdentifiers.h: - * runtime/Identifier.cpp: - * runtime/InitializeThreading.cpp: - * runtime/InternalFunction.h: - * runtime/JSString.h: - * runtime/Lookup.h: - * runtime/PropertyNameArray.h: - * runtime/PropertySlot.h: - * runtime/StructureID.cpp: - * runtime/StructureID.h: - * runtime/UString.cpp: - -2008-11-05 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Move more files to the runtime subdirectory of JavaScriptCore. - - * API/APICast.h: - * API/JSBase.cpp: - * API/JSCallbackObject.cpp: - * API/JSClassRef.cpp: - * API/JSClassRef.h: - * API/JSStringRefCF.cpp: - * API/JSValueRef.cpp: - * API/OpaqueJSString.cpp: - * API/OpaqueJSString.h: - * AllInOneFile.cpp: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - * VM/Machine.cpp: - * VM/RegisterFile.h: - * debugger/Debugger.h: - * kjs/SourceProvider.h: - * kjs/TypeInfo.h: Removed. - * kjs/collector.cpp: Removed. - * kjs/collector.h: Removed. - * kjs/completion.h: Removed. - * kjs/create_hash_table: - * kjs/identifier.cpp: Removed. - * kjs/identifier.h: Removed. - * kjs/interpreter.cpp: Removed. - * kjs/interpreter.h: Removed. - * kjs/lexer.cpp: - * kjs/lexer.h: - * kjs/lookup.cpp: Removed. - * kjs/lookup.h: Removed. - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/operations.cpp: Removed. - * kjs/operations.h: Removed. - * kjs/protect.h: Removed. - * kjs/regexp.cpp: Removed. - * kjs/regexp.h: Removed. - * kjs/ustring.cpp: Removed. - * kjs/ustring.h: Removed. - * pcre/pcre_exec.cpp: - * profiler/CallIdentifier.h: - * profiler/Profile.h: - * runtime/ArrayConstructor.cpp: - * runtime/ArrayPrototype.cpp: - * runtime/ArrayPrototype.h: - * runtime/Collector.cpp: Copied from kjs/collector.cpp. - * runtime/Collector.h: Copied from kjs/collector.h. - * runtime/CollectorHeapIterator.h: - * runtime/Completion.h: Copied from kjs/completion.h. - * runtime/ErrorPrototype.cpp: - * runtime/Identifier.cpp: Copied from kjs/identifier.cpp. - * runtime/Identifier.h: Copied from kjs/identifier.h. - * runtime/InitializeThreading.cpp: - * runtime/Interpreter.cpp: Copied from kjs/interpreter.cpp. - * runtime/Interpreter.h: Copied from kjs/interpreter.h. - * runtime/JSCell.h: - * runtime/JSGlobalData.cpp: - * runtime/JSGlobalData.h: - * runtime/JSLock.cpp: - * runtime/JSNumberCell.cpp: - * runtime/JSNumberCell.h: - * runtime/JSObject.cpp: - * runtime/JSValue.h: - * runtime/Lookup.cpp: Copied from kjs/lookup.cpp. - * runtime/Lookup.h: Copied from kjs/lookup.h. - * runtime/MathObject.cpp: - * runtime/NativeErrorPrototype.cpp: - * runtime/NumberPrototype.cpp: - * runtime/Operations.cpp: Copied from kjs/operations.cpp. - * runtime/Operations.h: Copied from kjs/operations.h. - * runtime/PropertyMapHashTable.h: - * runtime/Protect.h: Copied from kjs/protect.h. - * runtime/RegExp.cpp: Copied from kjs/regexp.cpp. - * runtime/RegExp.h: Copied from kjs/regexp.h. - * runtime/RegExpConstructor.cpp: - * runtime/RegExpObject.h: - * runtime/RegExpPrototype.cpp: - * runtime/SmallStrings.h: - * runtime/StringObjectThatMasqueradesAsUndefined.h: - * runtime/StructureID.cpp: - * runtime/StructureID.h: - * runtime/StructureIDTransitionTable.h: - * runtime/SymbolTable.h: - * runtime/TypeInfo.h: Copied from kjs/TypeInfo.h. - * runtime/UString.cpp: Copied from kjs/ustring.cpp. - * runtime/UString.h: Copied from kjs/ustring.h. - * wrec/CharacterClassConstructor.h: - * wrec/WREC.h: - -2008-11-05 Geoffrey Garen - - Suggested by Darin Adler. - - Removed two copy constructors that the compiler can generate for us - automatically. - - * VM/LabelID.h: - (JSC::LabelID::setLocation): - (JSC::LabelID::offsetFrom): - (JSC::LabelID::ref): - (JSC::LabelID::refCount): - * kjs/LabelScope.h: - -2008-11-05 Anders Carlsson - - Fix Snow Leopard build. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-11-04 Cameron Zwarich - - Rubber-stamped by Steve Falkenburg. - - Move dtoa.cpp and dtoa.h to the WTF Visual Studio project to reflect - their movement in the filesystem. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2008-11-04 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Move kjs/dtoa.h to the wtf subdirectory of JavaScriptCore. - - * AllInOneFile.cpp: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/dtoa.cpp: Removed. - * kjs/dtoa.h: Removed. - * wtf/dtoa.cpp: Copied from kjs/dtoa.cpp. - * wtf/dtoa.h: Copied from kjs/dtoa.h. - -2008-11-04 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Move kjs/config.h to the top level of JavaScriptCore. - - * GNUmakefile.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * config.h: Copied from kjs/config.h. - * kjs/config.h: Removed. - -2008-11-04 Darin Adler - - Reviewed by Tim Hatcher. - - * wtf/ThreadingNone.cpp: Tweak formatting. - -2008-11-03 Darin Adler - - Reviewed by Tim Hatcher. - - - https://bugs.webkit.org/show_bug.cgi?id=22061 - create script to check for exit-time destructors - - * JavaScriptCore.exp: Changed to export functions rather than - a global for the atomically initialized static mutex. - - * JavaScriptCore.xcodeproj/project.pbxproj: Added a script - phase that runs the check-for-exit-time-destructors script. - - * wtf/MainThread.cpp: - (WTF::mainThreadFunctionQueueMutex): Changed to leak an object - rather than using an exit time destructor. - (WTF::functionQueue): Ditto. - * wtf/unicode/icu/CollatorICU.cpp: - (WTF::cachedCollatorMutex): Ditto. - - * wtf/Threading.h: Changed other platforms to share the Windows - approach where the mutex is internal and the functions are exported. - * wtf/ThreadingGtk.cpp: - (WTF::lockAtomicallyInitializedStaticMutex): Ditto. - (WTF::unlockAtomicallyInitializedStaticMutex): Ditto. - * wtf/ThreadingNone.cpp: - (WTF::lockAtomicallyInitializedStaticMutex): Ditto. - (WTF::unlockAtomicallyInitializedStaticMutex): Ditto. - * wtf/ThreadingPthreads.cpp: - (WTF::threadMapMutex): Changed to leak an object rather than using - an exit time destructor. - (WTF::lockAtomicallyInitializedStaticMutex): Mutex change. - (WTF::unlockAtomicallyInitializedStaticMutex): Ditto. - (WTF::threadMap): Changed to leak an object rather than using - an exit time destructor. - * wtf/ThreadingQt.cpp: - (WTF::lockAtomicallyInitializedStaticMutex): Mutex change. - (WTF::unlockAtomicallyInitializedStaticMutex): Ditto. - * wtf/ThreadingWin.cpp: - (WTF::lockAtomicallyInitializedStaticMutex): Added an assertion. - -2008-11-04 Adam Roben - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Update - the location of JSStaticScopeObject.{cpp,h}. - -2008-11-04 Cameron Zwarich - - Reviewed by Alexey Proskuryakov. - - Move AllInOneFile.cpp to the top level of JavaScriptCore. - - * AllInOneFile.cpp: Copied from kjs/AllInOneFile.cpp. - * GNUmakefile.am: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/AllInOneFile.cpp: Removed. - -2008-11-04 Cameron Zwarich - - Rubber-stamped by Alexey Proskuryakov. - - Add NodeInfo.h to the JavaScriptCore Xcode project. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-11-03 Cameron Zwarich - - Rubber-stamped by Maciej Stachowiak. - - Move more files into the runtime subdirectory of JavaScriptCore. - - * API/JSBase.cpp: - * API/JSCallbackConstructor.cpp: - * API/JSCallbackFunction.cpp: - * API/JSClassRef.cpp: - * API/OpaqueJSString.cpp: - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/ArgList.cpp: Removed. - * kjs/ArgList.h: Removed. - * kjs/Arguments.cpp: Removed. - * kjs/Arguments.h: Removed. - * kjs/BatchedTransitionOptimizer.h: Removed. - * kjs/CollectorHeapIterator.h: Removed. - * kjs/CommonIdentifiers.cpp: Removed. - * kjs/CommonIdentifiers.h: Removed. - * kjs/ExecState.cpp: Removed. - * kjs/ExecState.h: Removed. - * kjs/GetterSetter.cpp: Removed. - * kjs/GetterSetter.h: Removed. - * kjs/InitializeThreading.cpp: Removed. - * kjs/InitializeThreading.h: Removed. - * kjs/JSActivation.cpp: Removed. - * kjs/JSActivation.h: Removed. - * kjs/JSGlobalData.cpp: Removed. - * kjs/JSGlobalData.h: Removed. - * kjs/JSLock.cpp: Removed. - * kjs/JSLock.h: Removed. - * kjs/JSStaticScopeObject.cpp: Removed. - * kjs/JSStaticScopeObject.h: Removed. - * kjs/JSType.h: Removed. - * kjs/PropertyNameArray.cpp: Removed. - * kjs/PropertyNameArray.h: Removed. - * kjs/ScopeChain.cpp: Removed. - * kjs/ScopeChain.h: Removed. - * kjs/ScopeChainMark.h: Removed. - * kjs/SymbolTable.h: Removed. - * kjs/Tracing.d: Removed. - * kjs/Tracing.h: Removed. - * runtime/ArgList.cpp: Copied from kjs/ArgList.cpp. - * runtime/ArgList.h: Copied from kjs/ArgList.h. - * runtime/Arguments.cpp: Copied from kjs/Arguments.cpp. - * runtime/Arguments.h: Copied from kjs/Arguments.h. - * runtime/BatchedTransitionOptimizer.h: Copied from kjs/BatchedTransitionOptimizer.h. - * runtime/CollectorHeapIterator.h: Copied from kjs/CollectorHeapIterator.h. - * runtime/CommonIdentifiers.cpp: Copied from kjs/CommonIdentifiers.cpp. - * runtime/CommonIdentifiers.h: Copied from kjs/CommonIdentifiers.h. - * runtime/ExecState.cpp: Copied from kjs/ExecState.cpp. - * runtime/ExecState.h: Copied from kjs/ExecState.h. - * runtime/GetterSetter.cpp: Copied from kjs/GetterSetter.cpp. - * runtime/GetterSetter.h: Copied from kjs/GetterSetter.h. - * runtime/InitializeThreading.cpp: Copied from kjs/InitializeThreading.cpp. - * runtime/InitializeThreading.h: Copied from kjs/InitializeThreading.h. - * runtime/JSActivation.cpp: Copied from kjs/JSActivation.cpp. - * runtime/JSActivation.h: Copied from kjs/JSActivation.h. - * runtime/JSGlobalData.cpp: Copied from kjs/JSGlobalData.cpp. - * runtime/JSGlobalData.h: Copied from kjs/JSGlobalData.h. - * runtime/JSLock.cpp: Copied from kjs/JSLock.cpp. - * runtime/JSLock.h: Copied from kjs/JSLock.h. - * runtime/JSStaticScopeObject.cpp: Copied from kjs/JSStaticScopeObject.cpp. - * runtime/JSStaticScopeObject.h: Copied from kjs/JSStaticScopeObject.h. - * runtime/JSType.h: Copied from kjs/JSType.h. - * runtime/PropertyNameArray.cpp: Copied from kjs/PropertyNameArray.cpp. - * runtime/PropertyNameArray.h: Copied from kjs/PropertyNameArray.h. - * runtime/ScopeChain.cpp: Copied from kjs/ScopeChain.cpp. - * runtime/ScopeChain.h: Copied from kjs/ScopeChain.h. - * runtime/ScopeChainMark.h: Copied from kjs/ScopeChainMark.h. - * runtime/SymbolTable.h: Copied from kjs/SymbolTable.h. - * runtime/Tracing.d: Copied from kjs/Tracing.d. - * runtime/Tracing.h: Copied from kjs/Tracing.h. - -2008-11-03 Sam Weinig - - Reviewed by Mark Rowe. - - Move #define to turn on dumping StructureID statistics to StructureID.cpp so that - turning it on does not require a full rebuild. - - * runtime/StructureID.cpp: - (JSC::StructureID::dumpStatistics): - * runtime/StructureID.h: - -2008-11-03 Alp Toker - - Reviewed by Geoffrey Garen. - - Fix warning when building on Darwin without JSC_MULTIPLE_THREADS - enabled. - - * kjs/InitializeThreading.cpp: - -2008-11-02 Matt Lilek - - Reviewed by Cameron Zwarich. - - Bug 22042: REGRESSION(r38066): ASSERTION FAILED: source in CodeBlock - - - Rename parameter name to avoid ASSERT. - - * VM/CodeBlock.h: - (JSC::CodeBlock::CodeBlock): - (JSC::ProgramCodeBlock::ProgramCodeBlock): - (JSC::EvalCodeBlock::EvalCodeBlock): - -2008-11-02 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 22035: Remove the '_' suffix on constructor parameter names for structs - - - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::JSCallbackObjectData::JSCallbackObjectData): - * VM/CodeBlock.h: - (JSC::CodeBlock::CodeBlock): - (JSC::ProgramCodeBlock::ProgramCodeBlock): - (JSC::EvalCodeBlock::EvalCodeBlock): - * wrec/WREC.h: - (JSC::Quantifier::Quantifier): - -2008-10-31 Cameron Zwarich - - Rubber-stamped by Geoff Garen. - - Rename SourceRange.h to SourceCode.h. - - * API/JSBase.cpp: - * GNUmakefile.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CodeBlock.h: - * kjs/SourceCode.h: Copied from kjs/SourceRange.h. - * kjs/SourceRange.h: Removed. - * kjs/grammar.y: - * kjs/lexer.h: - * kjs/nodes.cpp: - (JSC::ForInNode::ForInNode): - * kjs/nodes.h: - (JSC::ThrowableExpressionData::setExceptionSourceCode): - -2008-10-31 Cameron Zwarich - - Reviewed by Darin Adler. - - Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console - - - The JSC::Interpreter::shouldPrintExceptions() function is not used at - all in JavaScriptCore, so it should be moved to WebCore::Console, its - only user. - - * JavaScriptCore.exp: - * kjs/interpreter.cpp: - * kjs/interpreter.h: - -2008-10-31 Cameron Zwarich - - Not reviewed. - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-10-31 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Remove the call to Interpreter::setShouldPrintExceptions() from the - GlobalObject constructor in the shell. The shouldPrintExceptions() - information is not used anywhere in JavaScriptCore, only in WebCore. - - * kjs/Shell.cpp: - (GlobalObject::GlobalObject): - -2008-10-31 Kevin Ollivier - - wxMSW build fix. - - * wtf/Threading.h: - -2008-10-31 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Move more files from the kjs subdirectory of JavaScriptCore to the - runtime subdirectory. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/RegExpConstructor.cpp: Removed. - * kjs/RegExpConstructor.h: Removed. - * kjs/RegExpMatchesArray.h: Removed. - * kjs/RegExpObject.cpp: Removed. - * kjs/RegExpObject.h: Removed. - * kjs/RegExpPrototype.cpp: Removed. - * kjs/RegExpPrototype.h: Removed. - * runtime/RegExpConstructor.cpp: Copied from kjs/RegExpConstructor.cpp. - * runtime/RegExpConstructor.h: Copied from kjs/RegExpConstructor.h. - * runtime/RegExpMatchesArray.h: Copied from kjs/RegExpMatchesArray.h. - * runtime/RegExpObject.cpp: Copied from kjs/RegExpObject.cpp. - * runtime/RegExpObject.h: Copied from kjs/RegExpObject.h. - * runtime/RegExpPrototype.cpp: Copied from kjs/RegExpPrototype.cpp. - * runtime/RegExpPrototype.h: Copied from kjs/RegExpPrototype.h. - -2008-10-31 Mark Rowe - - Revert an incorrect portion of r38034. - - * profiler/ProfilerServer.mm: - -2008-10-31 Mark Rowe - - Fix the 64-bit build. - - Disable strict aliasing in ProfilerServer.mm as it leads to the compiler being unhappy - with the common Obj-C idiom self = [super init]; - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-10-31 Cameron Zwarich - - Reviewed by Alexey Proskuryakov. - - Change a header guard to match our coding style. - - * kjs/InitializeThreading.h: - -2008-10-30 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed a small bit of https://bugs.webkit.org/show_bug.cgi?id=21962 - AST uses way too much memory - - Removed a word from StatementNode by nixing LabelStack and turning it - into a compile-time data structure managed by CodeGenerator. - - v8 tests and SunSpider, run by Gavin, report no change. - - * GNUmakefile.am: - * JavaScriptCore.order: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/AllInOneFile.cpp: - * JavaScriptCoreSources.bkl: I sure hope this builds! - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::CodeGenerator): - (JSC::CodeGenerator::newLabelScope): - (JSC::CodeGenerator::breakTarget): - (JSC::CodeGenerator::continueTarget): - * VM/CodeGenerator.h: Nixed the JumpContext system because it depended - on a LabelStack in the AST, and it was a little cumbersome on the client - side. Replaced with LabelScope, which tracks all break / continue - information in the CodeGenerator, just like we track LabelIDs and other - stacks of compile-time data. - - * kjs/LabelScope.h: Added. - (JSC::LabelScope::): - (JSC::LabelScope::LabelScope): - (JSC::LabelScope::ref): - (JSC::LabelScope::deref): - (JSC::LabelScope::refCount): - (JSC::LabelScope::breakTarget): - (JSC::LabelScope::continueTarget): - (JSC::LabelScope::type): - (JSC::LabelScope::name): - (JSC::LabelScope::scopeDepth): Simple abstraction for holding everything - you might want to know about a break-able / continue-able scope. - - * kjs/LabelStack.cpp: Removed. - * kjs/LabelStack.h: Removed. - - * kjs/grammar.y: No need to push labels at parse time -- we don't store - LabelStacks in the AST anymore. - - * kjs/nodes.cpp: - (JSC::DoWhileNode::emitCode): - (JSC::WhileNode::emitCode): - (JSC::ForNode::emitCode): - (JSC::ForInNode::emitCode): - (JSC::ContinueNode::emitCode): - (JSC::BreakNode::emitCode): - (JSC::SwitchNode::emitCode): - (JSC::LabelNode::emitCode): - * kjs/nodes.h: - (JSC::StatementNode::): - (JSC::LabelNode::): Use LabelScope where we used to use JumpContext. - Simplified a bunch of code. Touched up label-related error messages a - bit. - - * kjs/nodes2string.cpp: - (JSC::LabelNode::streamTo): Updated for rename. - -2008-10-31 Cameron Zwarich - - Reviewed by Darin Adler. - - Bug 22005: Move StructureIDChain into its own file - - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * runtime/StructureID.cpp: - * runtime/StructureID.h: - * runtime/StructureIDChain.cpp: Copied from runtime/StructureID.cpp. - * runtime/StructureIDChain.h: Copied from runtime/StructureID.h. - -2008-10-31 Steve Falkenburg - - Build fix. - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - -2008-10-31 Steve Falkenburg - - Build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-10-31 Darin Adler - - Reviewed by Dan Bernstein. - - - fix storage leak seen on buildbot - - Some other cleanup too. The storage leak was caused by the fact - that HashTraits::needsDestruction was false, so - the call identifier objects didn't get deleted. - - * profiler/CallIdentifier.h: - - Added a default constructor to create empty call identifiers. - - Changed the normal constructor to use const UString& - to avoid extra copying and reference count thrash. - - Removed the explicit copy constructor definition, since it's what - the compiler will automatically generate. (Rule of thumb: Either - you need both a custom copy constructor and a custom assignment - operator, or neither.) - - Moved the CallIdentifier hash function out of the WTF namespace; - there's no reason to put it there. - - Changed the CallIdentifier hash function to be a struct rather than - a specialization of the IntHash struct template. Having it be - a specialization made no sense, since CallIdentifier is not an integer, - and did no good. - - Removed explicit definition of emptyValueIsZero in the hash traits, - since inheriting from GenericHashTraits already makes that false. - - Removed explicit definition of emptyValue, instead relying on the - default constructor and GenericHashTraits. - - Removed explicit definition of needsDestruction, because we want it - to have its default value: true, not false. This fixes the leak! - - Changed constructDeletedValue and isDeletedValue to use a line number - of numeric_limits::max() to indicate a value is deleted. - Previously this used empty strings for the empty value and null strings - for the deleted value, but it's more efficient to use null for both. - -2008-10-31 Timothy Hatcher - - Emit the WillExecuteStatement debugger hook before the for loop body - when the statement node for the body isn't a block. This allows - breakpoints on those statements in the Web Inspector. - - https://bugs.webkit.org/show_bug.cgi?id=22004 - - Reviewed by Darin Adler. - - * kjs/nodes.cpp: - (JSC::ForNode::emitCode): Emit the WillExecuteStatement - debugger hook before the statement node if isn't a block. - Also emit the WillExecuteStatement debugger hook for the - loop as the first op-code. - (JSC::ForInNode::emitCode): Ditto. - -2008-10-31 Timothy Hatcher - - Fixes console warnings about not having an autorelease pool. - Also fixes the build for Snow Leopard, by including individual - Foundation headers instead of Foundation.h. - - https://bugs.webkit.org/show_bug.cgi?id=21995 - - Reviewed by Oliver Hunt. - - * profiler/ProfilerServer.mm: - (-[ProfilerServer init]): Create a NSAutoreleasePool and drain it. - -2008-10-31 Cameron Zwarich - - Not reviewed. - - Speculative wxWindows build fix. - - * JavaScriptCoreSources.bkl: - * jscore.bkl: - -2008-10-31 Cameron Zwarich - - Rubber-stamped by Maciej Stachowiak. - - Move VM/JSPropertyNameIterator.cpp and VM/JSPropertyNameIterator.h to - the runtime directory. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * VM/JSPropertyNameIterator.cpp: Removed. - * VM/JSPropertyNameIterator.h: Removed. - * runtime/JSPropertyNameIterator.cpp: Copied from VM/JSPropertyNameIterator.cpp. - * runtime/JSPropertyNameIterator.h: Copied from VM/JSPropertyNameIterator.h. - -2008-10-31 Cameron Zwarich - - Not reviewed. - - Speculative wxWindows build fix. - - * jscore.bkl: - -2008-10-30 Mark Rowe - - Reviewed by Jon Homeycutt. - - Explicitly default to building for only the native architecture in debug and release builds. - - * Configurations/DebugRelease.xcconfig: - -2008-10-30 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Create a debugger directory in JavaScriptCore and move the relevant - files to it. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CodeBlock.cpp: - * VM/CodeGenerator.h: - * VM/Machine.cpp: - * debugger: Added. - * debugger/Debugger.cpp: Copied from kjs/debugger.cpp. - * debugger/Debugger.h: Copied from kjs/debugger.h. - * debugger/DebuggerCallFrame.cpp: Copied from kjs/DebuggerCallFrame.cpp. - * debugger/DebuggerCallFrame.h: Copied from kjs/DebuggerCallFrame.h. - * kjs/AllInOneFile.cpp: - * kjs/DebuggerCallFrame.cpp: Removed. - * kjs/DebuggerCallFrame.h: Removed. - * kjs/Parser.cpp: - * kjs/Parser.h: - * kjs/debugger.cpp: Removed. - * kjs/debugger.h: Removed. - * kjs/interpreter.cpp: - * kjs/nodes.cpp: - * runtime/FunctionConstructor.cpp: - * runtime/JSGlobalObject.cpp: - -2008-10-30 Benjamin K. Stuhl - - gcc 4.3.3/linux-x86 generates "suggest parentheses around && within ||" - warnings; add some parentheses to disambiguate things. No functional - changes, so no tests. - - https://bugs.webkit.org/show_bug.cgi?id=21973 - Add parentheses to clean up some gcc warnings - - Reviewed by Dan Bernstein. - - * wtf/ASCIICType.h: - (WTF::isASCIIAlphanumeric): - (WTF::isASCIIHexDigit): - -2008-10-30 Kevin Lindeman - - Adds ProfilerServer, which is a distributed notification listener - that allows starting and stopping the profiler remotely for use - in conjunction with the profiler's DTace probes. - - https://bugs.webkit.org/show_bug.cgi?id=21719 - - Reviewed by Timothy Hatcher. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): Calls startProfilerServerIfNeeded. - * profiler/ProfilerServer.h: Added. - * profiler/ProfilerServer.mm: Added. - (+[ProfilerServer sharedProfileServer]): - (-[ProfilerServer init]): - (-[ProfilerServer startProfiling]): - (-[ProfilerServer stopProfiling]): - (JSC::startProfilerServerIfNeeded): - -2008-10-30 Kevin Ollivier - - wx build fix after PropertyMap and StructureID merge. - - * JavaScriptCoreSources.bkl: - -2008-10-30 Cameron Zwarich - - Reviewed by Mark Rowe. - - Change the JavaScriptCore Xcode project to use relative paths for the - PCRE source files. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-10-30 Sam Weinig - - Reviewed by Cameron Zwarich and Geoffrey Garen. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=21989 - Merge PropertyMap and StructureID - - - Move PropertyMap code into StructureID in preparation for lazily - creating the map on gets. - - Make remove with transition explicit by adding removePropertyTransition. - - Make the put/remove without transition explicit. - - Make cache invalidation part of put/remove without transition. - - 1% speedup on SunSpider; 0.5% speedup on v8 suite. - - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/identifier.h: - * runtime/JSObject.cpp: - (JSC::JSObject::removeDirect): - * runtime/JSObject.h: - (JSC::JSObject::putDirect): - * runtime/PropertyMap.cpp: Removed. - * runtime/PropertyMap.h: Removed. - * runtime/PropertyMapHashTable.h: Copied from runtime/PropertyMap.h. - * runtime/StructureID.cpp: - (JSC::StructureID::dumpStatistics): - (JSC::StructureID::StructureID): - (JSC::StructureID::~StructureID): - (JSC::StructureID::getEnumerablePropertyNames): - (JSC::StructureID::addPropertyTransition): - (JSC::StructureID::removePropertyTransition): - (JSC::StructureID::toDictionaryTransition): - (JSC::StructureID::changePrototypeTransition): - (JSC::StructureID::getterSetterTransition): - (JSC::StructureID::addPropertyWithoutTransition): - (JSC::StructureID::removePropertyWithoutTransition): - (JSC::PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger): - (JSC::StructureID::checkConsistency): - (JSC::StructureID::copyPropertyTable): - (JSC::StructureID::get): - (JSC::StructureID::put): - (JSC::StructureID::remove): - (JSC::StructureID::insertIntoPropertyMapHashTable): - (JSC::StructureID::expandPropertyMapHashTable): - (JSC::StructureID::createPropertyMapHashTable): - (JSC::StructureID::rehashPropertyMapHashTable): - (JSC::comparePropertyMapEntryIndices): - (JSC::StructureID::getEnumerablePropertyNamesInternal): - * runtime/StructureID.h: - (JSC::StructureID::propertyStorageSize): - (JSC::StructureID::isEmpty): - (JSC::StructureID::get): - -2008-10-30 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 21987: CTI::putDoubleResultToJSNumberCellOrJSImmediate() hardcodes its result register - - - CTI::putDoubleResultToJSNumberCellOrJSImmediate() hardcodes its result - register as ecx, but it should be tempReg1, which is ecx at all of its - callsites. - - * VM/CTI.cpp: - (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate): - -2008-10-30 Cameron Zwarich - - Reviewed by Sam Weinig. - - Bug 21985: Opcodes should use eax as their destination register whenever possible - - - Change more opcodes to use eax as the register for their final result, - and change calls to emitPutResult() that pass eax to rely on the default - value of eax. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - -2008-10-30 Alp Toker - - Build fix attempt for older gcc on the trunk-mac-intel build bot - (error: initializer for scalar variable requires one element). - - Modify the initializer syntax slightly with an additional comma. - - * VM/Machine.cpp: - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_resolve_func): - (JSC::Machine::cti_op_post_inc): - (JSC::Machine::cti_op_resolve_with_base): - (JSC::Machine::cti_op_post_dec): - -2008-10-30 Alp Toker - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=21571 - VoidPtrPair breaks CTI on Linux - - The VoidPtrPair return change made in r37457 does not work on Linux - since POD structs aren't passed in registers. - - This patch uses a union to vectorize VoidPtrPair to a uint64_t and - matches Darwin/MSVC fixing CTI/WREC on Linux. - - Alexey reports no measurable change in Mac performance with this fix. - - * VM/Machine.cpp: - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_resolve_func): - (JSC::Machine::cti_op_post_inc): - (JSC::Machine::cti_op_resolve_with_base): - (JSC::Machine::cti_op_post_dec): - * VM/Machine.h: - (JSC::): - -2008-10-29 Oliver Hunt - - Reviewed by Geoff Garen. - - Initial work to reduce cost of JSNumberCell allocation - - This does the initial work needed to bring more of number - allocation into CTI code directly, rather than just falling - back onto the slow paths if we can't guarantee that a number - cell can be reused. - - Initial implementation only used by op_negate to make sure - it all works. In a negate heavy (though not dominated) test - it results in a 10% win in the non-reusable cell case. - - * VM/CTI.cpp: - (JSC::): - (JSC::CTI::emitAllocateNumber): - (JSC::CTI::emitNakedFastCall): - (JSC::CTI::emitArithIntToImmWithJump): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitUnaryOp): - * VM/CodeGenerator.h: - (JSC::CodeGenerator::emitToJSNumber): - (JSC::CodeGenerator::emitTypeOf): - (JSC::CodeGenerator::emitGetPropertyNames): - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - * VM/Machine.h: - * kjs/ResultType.h: - (JSC::ResultType::isReusableNumber): - (JSC::ResultType::toInt): - * kjs/nodes.cpp: - (JSC::UnaryOpNode::emitCode): - (JSC::BinaryOpNode::emitCode): - (JSC::EqualNode::emitCode): - * masm/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::negl_r): - (JSC::X86Assembler::xorpd_mr): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::JSNumberCell): - -2008-10-29 Steve Falkenburg - - Crash on launch - - For Windows, export explicit functions rather than exporting data for atomicallyInitializedStaticMutex. - - Exporting data from a DLL on Windows requires specifying __declspec(dllimport) in the header used by - callers, but __declspec(dllexport) when defined in the DLL implementation. By instead exporting - the explicit lock/unlock functions, we can avoid this. - - Fixes a crash on launch, since we were previously erroneously exporting atomicallyInitializedStaticMutex as a function. - - Reviewed by Darin Adler. - - * wtf/Threading.h: - (WTF::lockAtomicallyInitializedStaticMutex): - (WTF::unlockAtomicallyInitializedStaticMutex): - * wtf/ThreadingWin.cpp: - (WTF::lockAtomicallyInitializedStaticMutex): - (WTF::unlockAtomicallyInitializedStaticMutex): - -2008-10-29 Sam Weinig - - Reviewed by Oliver Hunt. - - Remove direct use of PropertyMap. - - * JavaScriptCore.exp: - * runtime/JSObject.cpp: - (JSC::JSObject::mark): - (JSC::JSObject::put): - (JSC::JSObject::deleteProperty): - (JSC::JSObject::getPropertyAttributes): - (JSC::JSObject::removeDirect): - * runtime/JSObject.h: - (JSC::JSObject::getDirect): - (JSC::JSObject::getDirectLocation): - (JSC::JSObject::hasCustomProperties): - (JSC::JSObject::JSObject): - (JSC::JSObject::putDirect): - * runtime/PropertyMap.cpp: - (JSC::PropertyMap::get): - * runtime/PropertyMap.h: - (JSC::PropertyMap::isEmpty): - (JSC::PropertyMap::get): - * runtime/StructureID.cpp: - (JSC::StructureID::dumpStatistics): - * runtime/StructureID.h: - (JSC::StructureID::propertyStorageSize): - (JSC::StructureID::get): - (JSC::StructureID::put): - (JSC::StructureID::remove): - (JSC::StructureID::isEmpty): - -2008-10-29 Sam Weinig - - Reviewed by Geoffrey Garen. - - Rename and move the StructureID transition table to its own file. - - * GNUmakefile.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/StructureID.cpp: - (JSC::StructureID::addPropertyTransition): - * runtime/StructureID.h: - (JSC::StructureID::): - * runtime/StructureIDTransitionTable.h: Copied from runtime/StructureID.h. - (JSC::StructureIDTransitionTableHash::hash): - (JSC::StructureIDTransitionTableHash::equal): - -2008-10-29 Sam Weinig - - Reviewed by Cameron Zwarich. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=21958 - Pack bits in StructureID to reduce the size of each StructureID by 2 words. - - * runtime/PropertyMap.h: - (JSC::PropertyMap::propertyMapSize): - * runtime/StructureID.cpp: - (JSC::StructureID::dumpStatistics): Add additional size statistics when dumping. - (JSC::StructureID::StructureID): - * runtime/StructureID.h: - -2008-10-29 Kevin Ollivier - - wx build fixes after addition of runtime and ImageBuffer changes. - - * JavaScriptCoreSources.bkl: - * jscore.bkl: - -2008-10-29 Timothy Hatcher - - Emit the WillExecuteStatement debugger hook before the "else" body - when there is no block for the "else" body. This allows breakpoints - on those statements in the Web Inspector. - - https://bugs.webkit.org/show_bug.cgi?id=21944 - - Reviewed by Maciej Stachowiak. - - * kjs/nodes.cpp: - (JSC::IfElseNode::emitCode): Emit the WillExecuteStatement - debugger hook before the else node if isn't a block. - -2008-10-29 Alexey Proskuryakov - - Build fix. - - * JavaScriptCore.exp: Export HashTable::deleteTable(). - -2008-10-28 Alp Toker - - Fix builddir != srcdir builds after kjs -> runtime breakage. Sources - may now be generated in both kjs/ and runtime/. - - Also sort the sources list for readability. - - * GNUmakefile.am: - -2008-10-28 Alp Toker - - Reviewed by Cameron Zwarich. - - Build fix attempt after kjs -> runtime rename. - - * GNUmakefile.am: - -2008-10-28 Cameron Zwarich - - Not reviewed. - - Remove a duplicate includes directory. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-10-28 Cameron Zwarich - - Not reviewed. - - Attempt to fix the Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - -2008-10-28 Dan Bernstein - - Reviewed by Mark Rowe. - - - export WTF::atomicallyInitializedStaticMutex - - * JavaScriptCore.exp: - -2008-10-28 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed CodeBlock dumping to accurately report constant register indices. - - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - -2008-10-28 Cameron Zwarich - - Not reviewed. - - More Qt build fixes. - - * JavaScriptCore.pri: - -2008-10-28 Cameron Zwarich - - Not reviewed. - - Fix the Qt build, hopefully for real this time. - - * JavaScriptCore.pri: - -2008-10-28 Cameron Zwarich - - Not reviewed. - - Fix the Qt build. - - * JavaScriptCore.pri: - -2008-10-28 Cameron Zwarich - - Not reviewed. - - Fix the Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-10-28 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Create a runtime directory in JavaScriptCore and begin moving files to - it. This is the first step towards removing the kjs directory and - placing files in more meaningful subdirectories of JavaScriptCore. - - * API/JSBase.cpp: - * API/JSCallbackConstructor.cpp: - * API/JSCallbackConstructor.h: - * API/JSCallbackFunction.cpp: - * API/JSClassRef.cpp: - * API/JSClassRef.h: - * API/JSStringRefCF.cpp: - * API/JSValueRef.cpp: - * API/OpaqueJSString.cpp: - * DerivedSources.make: - * GNUmakefile.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/AllInOneFile.cpp: - * kjs/ArrayConstructor.cpp: Removed. - * kjs/ArrayConstructor.h: Removed. - * kjs/ArrayPrototype.cpp: Removed. - * kjs/ArrayPrototype.h: Removed. - * kjs/BooleanConstructor.cpp: Removed. - * kjs/BooleanConstructor.h: Removed. - * kjs/BooleanObject.cpp: Removed. - * kjs/BooleanObject.h: Removed. - * kjs/BooleanPrototype.cpp: Removed. - * kjs/BooleanPrototype.h: Removed. - * kjs/CallData.cpp: Removed. - * kjs/CallData.h: Removed. - * kjs/ClassInfo.h: Removed. - * kjs/ConstructData.cpp: Removed. - * kjs/ConstructData.h: Removed. - * kjs/DateConstructor.cpp: Removed. - * kjs/DateConstructor.h: Removed. - * kjs/DateInstance.cpp: Removed. - * kjs/DateInstance.h: Removed. - * kjs/DateMath.cpp: Removed. - * kjs/DateMath.h: Removed. - * kjs/DatePrototype.cpp: Removed. - * kjs/DatePrototype.h: Removed. - * kjs/Error.cpp: Removed. - * kjs/Error.h: Removed. - * kjs/ErrorConstructor.cpp: Removed. - * kjs/ErrorConstructor.h: Removed. - * kjs/ErrorInstance.cpp: Removed. - * kjs/ErrorInstance.h: Removed. - * kjs/ErrorPrototype.cpp: Removed. - * kjs/ErrorPrototype.h: Removed. - * kjs/FunctionConstructor.cpp: Removed. - * kjs/FunctionConstructor.h: Removed. - * kjs/FunctionPrototype.cpp: Removed. - * kjs/FunctionPrototype.h: Removed. - * kjs/GlobalEvalFunction.cpp: Removed. - * kjs/GlobalEvalFunction.h: Removed. - * kjs/InternalFunction.cpp: Removed. - * kjs/InternalFunction.h: Removed. - * kjs/JSArray.cpp: Removed. - * kjs/JSArray.h: Removed. - * kjs/JSCell.cpp: Removed. - * kjs/JSCell.h: Removed. - * kjs/JSFunction.cpp: Removed. - * kjs/JSFunction.h: Removed. - * kjs/JSGlobalObject.cpp: Removed. - * kjs/JSGlobalObject.h: Removed. - * kjs/JSGlobalObjectFunctions.cpp: Removed. - * kjs/JSGlobalObjectFunctions.h: Removed. - * kjs/JSImmediate.cpp: Removed. - * kjs/JSImmediate.h: Removed. - * kjs/JSNotAnObject.cpp: Removed. - * kjs/JSNotAnObject.h: Removed. - * kjs/JSNumberCell.cpp: Removed. - * kjs/JSNumberCell.h: Removed. - * kjs/JSObject.cpp: Removed. - * kjs/JSObject.h: Removed. - * kjs/JSString.cpp: Removed. - * kjs/JSString.h: Removed. - * kjs/JSValue.cpp: Removed. - * kjs/JSValue.h: Removed. - * kjs/JSVariableObject.cpp: Removed. - * kjs/JSVariableObject.h: Removed. - * kjs/JSWrapperObject.cpp: Removed. - * kjs/JSWrapperObject.h: Removed. - * kjs/MathObject.cpp: Removed. - * kjs/MathObject.h: Removed. - * kjs/NativeErrorConstructor.cpp: Removed. - * kjs/NativeErrorConstructor.h: Removed. - * kjs/NativeErrorPrototype.cpp: Removed. - * kjs/NativeErrorPrototype.h: Removed. - * kjs/NumberConstructor.cpp: Removed. - * kjs/NumberConstructor.h: Removed. - * kjs/NumberObject.cpp: Removed. - * kjs/NumberObject.h: Removed. - * kjs/NumberPrototype.cpp: Removed. - * kjs/NumberPrototype.h: Removed. - * kjs/ObjectConstructor.cpp: Removed. - * kjs/ObjectConstructor.h: Removed. - * kjs/ObjectPrototype.cpp: Removed. - * kjs/ObjectPrototype.h: Removed. - * kjs/PropertyMap.cpp: Removed. - * kjs/PropertyMap.h: Removed. - * kjs/PropertySlot.cpp: Removed. - * kjs/PropertySlot.h: Removed. - * kjs/PrototypeFunction.cpp: Removed. - * kjs/PrototypeFunction.h: Removed. - * kjs/PutPropertySlot.h: Removed. - * kjs/SmallStrings.cpp: Removed. - * kjs/SmallStrings.h: Removed. - * kjs/StringConstructor.cpp: Removed. - * kjs/StringConstructor.h: Removed. - * kjs/StringObject.cpp: Removed. - * kjs/StringObject.h: Removed. - * kjs/StringObjectThatMasqueradesAsUndefined.h: Removed. - * kjs/StringPrototype.cpp: Removed. - * kjs/StringPrototype.h: Removed. - * kjs/StructureID.cpp: Removed. - * kjs/StructureID.h: Removed. - * kjs/completion.h: - * kjs/interpreter.h: - * runtime: Added. - * runtime/ArrayConstructor.cpp: Copied from kjs/ArrayConstructor.cpp. - * runtime/ArrayConstructor.h: Copied from kjs/ArrayConstructor.h. - * runtime/ArrayPrototype.cpp: Copied from kjs/ArrayPrototype.cpp. - * runtime/ArrayPrototype.h: Copied from kjs/ArrayPrototype.h. - * runtime/BooleanConstructor.cpp: Copied from kjs/BooleanConstructor.cpp. - * runtime/BooleanConstructor.h: Copied from kjs/BooleanConstructor.h. - * runtime/BooleanObject.cpp: Copied from kjs/BooleanObject.cpp. - * runtime/BooleanObject.h: Copied from kjs/BooleanObject.h. - * runtime/BooleanPrototype.cpp: Copied from kjs/BooleanPrototype.cpp. - * runtime/BooleanPrototype.h: Copied from kjs/BooleanPrototype.h. - * runtime/CallData.cpp: Copied from kjs/CallData.cpp. - * runtime/CallData.h: Copied from kjs/CallData.h. - * runtime/ClassInfo.h: Copied from kjs/ClassInfo.h. - * runtime/ConstructData.cpp: Copied from kjs/ConstructData.cpp. - * runtime/ConstructData.h: Copied from kjs/ConstructData.h. - * runtime/DateConstructor.cpp: Copied from kjs/DateConstructor.cpp. - * runtime/DateConstructor.h: Copied from kjs/DateConstructor.h. - * runtime/DateInstance.cpp: Copied from kjs/DateInstance.cpp. - * runtime/DateInstance.h: Copied from kjs/DateInstance.h. - * runtime/DateMath.cpp: Copied from kjs/DateMath.cpp. - * runtime/DateMath.h: Copied from kjs/DateMath.h. - * runtime/DatePrototype.cpp: Copied from kjs/DatePrototype.cpp. - * runtime/DatePrototype.h: Copied from kjs/DatePrototype.h. - * runtime/Error.cpp: Copied from kjs/Error.cpp. - * runtime/Error.h: Copied from kjs/Error.h. - * runtime/ErrorConstructor.cpp: Copied from kjs/ErrorConstructor.cpp. - * runtime/ErrorConstructor.h: Copied from kjs/ErrorConstructor.h. - * runtime/ErrorInstance.cpp: Copied from kjs/ErrorInstance.cpp. - * runtime/ErrorInstance.h: Copied from kjs/ErrorInstance.h. - * runtime/ErrorPrototype.cpp: Copied from kjs/ErrorPrototype.cpp. - * runtime/ErrorPrototype.h: Copied from kjs/ErrorPrototype.h. - * runtime/FunctionConstructor.cpp: Copied from kjs/FunctionConstructor.cpp. - * runtime/FunctionConstructor.h: Copied from kjs/FunctionConstructor.h. - * runtime/FunctionPrototype.cpp: Copied from kjs/FunctionPrototype.cpp. - * runtime/FunctionPrototype.h: Copied from kjs/FunctionPrototype.h. - * runtime/GlobalEvalFunction.cpp: Copied from kjs/GlobalEvalFunction.cpp. - * runtime/GlobalEvalFunction.h: Copied from kjs/GlobalEvalFunction.h. - * runtime/InternalFunction.cpp: Copied from kjs/InternalFunction.cpp. - * runtime/InternalFunction.h: Copied from kjs/InternalFunction.h. - * runtime/JSArray.cpp: Copied from kjs/JSArray.cpp. - * runtime/JSArray.h: Copied from kjs/JSArray.h. - * runtime/JSCell.cpp: Copied from kjs/JSCell.cpp. - * runtime/JSCell.h: Copied from kjs/JSCell.h. - * runtime/JSFunction.cpp: Copied from kjs/JSFunction.cpp. - * runtime/JSFunction.h: Copied from kjs/JSFunction.h. - * runtime/JSGlobalObject.cpp: Copied from kjs/JSGlobalObject.cpp. - * runtime/JSGlobalObject.h: Copied from kjs/JSGlobalObject.h. - * runtime/JSGlobalObjectFunctions.cpp: Copied from kjs/JSGlobalObjectFunctions.cpp. - * runtime/JSGlobalObjectFunctions.h: Copied from kjs/JSGlobalObjectFunctions.h. - * runtime/JSImmediate.cpp: Copied from kjs/JSImmediate.cpp. - * runtime/JSImmediate.h: Copied from kjs/JSImmediate.h. - * runtime/JSNotAnObject.cpp: Copied from kjs/JSNotAnObject.cpp. - * runtime/JSNotAnObject.h: Copied from kjs/JSNotAnObject.h. - * runtime/JSNumberCell.cpp: Copied from kjs/JSNumberCell.cpp. - * runtime/JSNumberCell.h: Copied from kjs/JSNumberCell.h. - * runtime/JSObject.cpp: Copied from kjs/JSObject.cpp. - * runtime/JSObject.h: Copied from kjs/JSObject.h. - * runtime/JSString.cpp: Copied from kjs/JSString.cpp. - * runtime/JSString.h: Copied from kjs/JSString.h. - * runtime/JSValue.cpp: Copied from kjs/JSValue.cpp. - * runtime/JSValue.h: Copied from kjs/JSValue.h. - * runtime/JSVariableObject.cpp: Copied from kjs/JSVariableObject.cpp. - * runtime/JSVariableObject.h: Copied from kjs/JSVariableObject.h. - * runtime/JSWrapperObject.cpp: Copied from kjs/JSWrapperObject.cpp. - * runtime/JSWrapperObject.h: Copied from kjs/JSWrapperObject.h. - * runtime/MathObject.cpp: Copied from kjs/MathObject.cpp. - * runtime/MathObject.h: Copied from kjs/MathObject.h. - * runtime/NativeErrorConstructor.cpp: Copied from kjs/NativeErrorConstructor.cpp. - * runtime/NativeErrorConstructor.h: Copied from kjs/NativeErrorConstructor.h. - * runtime/NativeErrorPrototype.cpp: Copied from kjs/NativeErrorPrototype.cpp. - * runtime/NativeErrorPrototype.h: Copied from kjs/NativeErrorPrototype.h. - * runtime/NumberConstructor.cpp: Copied from kjs/NumberConstructor.cpp. - * runtime/NumberConstructor.h: Copied from kjs/NumberConstructor.h. - * runtime/NumberObject.cpp: Copied from kjs/NumberObject.cpp. - * runtime/NumberObject.h: Copied from kjs/NumberObject.h. - * runtime/NumberPrototype.cpp: Copied from kjs/NumberPrototype.cpp. - * runtime/NumberPrototype.h: Copied from kjs/NumberPrototype.h. - * runtime/ObjectConstructor.cpp: Copied from kjs/ObjectConstructor.cpp. - * runtime/ObjectConstructor.h: Copied from kjs/ObjectConstructor.h. - * runtime/ObjectPrototype.cpp: Copied from kjs/ObjectPrototype.cpp. - * runtime/ObjectPrototype.h: Copied from kjs/ObjectPrototype.h. - * runtime/PropertyMap.cpp: Copied from kjs/PropertyMap.cpp. - * runtime/PropertyMap.h: Copied from kjs/PropertyMap.h. - * runtime/PropertySlot.cpp: Copied from kjs/PropertySlot.cpp. - * runtime/PropertySlot.h: Copied from kjs/PropertySlot.h. - * runtime/PrototypeFunction.cpp: Copied from kjs/PrototypeFunction.cpp. - * runtime/PrototypeFunction.h: Copied from kjs/PrototypeFunction.h. - * runtime/PutPropertySlot.h: Copied from kjs/PutPropertySlot.h. - * runtime/SmallStrings.cpp: Copied from kjs/SmallStrings.cpp. - * runtime/SmallStrings.h: Copied from kjs/SmallStrings.h. - * runtime/StringConstructor.cpp: Copied from kjs/StringConstructor.cpp. - * runtime/StringConstructor.h: Copied from kjs/StringConstructor.h. - * runtime/StringObject.cpp: Copied from kjs/StringObject.cpp. - * runtime/StringObject.h: Copied from kjs/StringObject.h. - * runtime/StringObjectThatMasqueradesAsUndefined.h: Copied from kjs/StringObjectThatMasqueradesAsUndefined.h. - * runtime/StringPrototype.cpp: Copied from kjs/StringPrototype.cpp. - * runtime/StringPrototype.h: Copied from kjs/StringPrototype.h. - * runtime/StructureID.cpp: Copied from kjs/StructureID.cpp. - * runtime/StructureID.h: Copied from kjs/StructureID.h. - -2008-10-28 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=21919 - Sampler reports bogus time in op_enter during 3d-raytrace.js - - Fixed a bug where we would pass the incorrect Instruction* during some - parts of CTI codegen. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/SamplingTool.cpp: - (JSC::SamplingTool::run): - * wtf/Platform.h: - -2008-10-28 Kevin McCullough - - Reviewed by Dan Bernstein. - - -Removed unused includes. - Apparent .4% speedup in Sunspider - - * kjs/JSObject.cpp: - * kjs/interpreter.cpp: - -2008-10-28 Alp Toker - - Include copyright license files in the autotools dist target. - - Change suggested by Mike Hommey. - - * GNUmakefile.am: - -2008-10-27 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Stop discarding CodeBlock samples that can't be charged to a specific - opcode. Instead, charge the relevant CodeBlock, and provide a footnote - explaining the situation. - - This will help us tell which CodeBlocks are hot, even if we can't - identify specific lines of code within the CodeBlocks. - - * VM/SamplingTool.cpp: - (JSC::ScopeSampleRecord::sample): - (JSC::compareScopeSampleRecords): - (JSC::SamplingTool::dump): - - * VM/SamplingTool.h: - (JSC::ScopeSampleRecord::ScopeSampleRecord): - (JSC::ScopeSampleRecord::~ScopeSampleRecord): - -2008-10-27 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added a mutex around the SamplingTool's ScopeNode* map, to solve a crash - when sampling the v8 tests. - - * VM/SamplingTool.cpp: - (JSC::SamplingTool::run): - (JSC::SamplingTool::notifyOfScope): - * VM/SamplingTool.h: Since new ScopeNodes can be created after - the SamplingTools has begun sampling, reads and writes to / from the - map need to be synchronized. Shark says this doesn't measurably increase - sampling overhead. - -2008-10-25 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): Provide a dummy value to the - HostCallRecord in CTI non-sampling builds, to silence compiler warning. - -2008-10-25 Geoffrey Garen - - Not reviewed. - - Try to fix Windows build. - - * VM/SamplingTool.h: - (JSC::SamplingTool::encodeSample): Explicitly cast bool to int, to - silence compiler warning. - -2008-10-25 Geoffrey Garen - - Reviewed by Sam Weinig, with Gavin Barraclough's help. - - Fixed Sampling Tool: - - Made CodeBlock sampling work with CTI - - Improved accuracy by unifying most sampling data into a single - 32bit word, which can be written / read atomically. - - Split out three different #ifdefs for modularity: OPCODE_SAMPLING; - CODEBLOCK_SAMPLING; OPCODE_STATS. - - Improved reporting clarity - - Refactored for code clarity - - * JavaScriptCore.exp: Exported another symbol. - - * VM/CTI.cpp: - (JSC::CTI::emitCTICall): - (JSC::CTI::compileOpCall): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - * VM/CTI.h: Updated CTI codegen to use the unified SamplingTool interface - for encoding samples. (This required passing the current vPC to a lot - more functions, since the unified interface samples the current vPC.) - Added hooks for writing the current CodeBlock* on function entry and - after a function call, for the sake of the CodeBlock sampler. Removed - obsolete hook for clearing the current sample inside op_end. Also removed - the custom enum used to differentiate flavors of op_call, since the - OpcodeID enum works just as well. (This was important in an earlier - version of the patch, but now it's just cleanup.) - - * VM/CodeBlock.cpp: - (JSC::CodeBlock::lineNumberForVPC): - * VM/CodeBlock.h: Upated for refactored #ifdefs. Changed lineNumberForVPC - to be robust against vPCs not recorded for exception handling, since - the Sampler may ask for an arbitrary vPC. - - * VM/Machine.cpp: - (JSC::Machine::execute): - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_construct_NotJSConstruct): - * VM/Machine.h: - (JSC::Machine::setSampler): - (JSC::Machine::sampler): - (JSC::Machine::jitCodeBuffer): Upated for refactored #ifdefs. Changed - Machine to use SamplingTool helper objects to record movement in and - out of host code. This makes samples a bit more precise. - - * VM/Opcode.cpp: - (JSC::OpcodeStats::~OpcodeStats): - * VM/Opcode.h: Upated for refactored #ifdefs. Added a little more padding, - to accomodate our more verbose opcode names. - - * VM/SamplingTool.cpp: - (JSC::ScopeSampleRecord::sample): Only count a sample toward our total - if we actually record it. This solves cases where a CodeBlock will - claim to have been sampled many times, with reported samples that don't - match. - - (JSC::SamplingTool::run): Read the current sample into a Sample helper - object, to ensure that the data doesn't change while we're analyzing it, - and to help decode the data. Only access the CodeBlock sampling hash - table if CodeBlock sampling has been enabled, so non-CodeBlock sampling - runs can operate with even less overhead. - - (JSC::SamplingTool::dump): I reorganized this code a lot to print the - most important info at the top, print as a table, annotate and document - the stuff I didn't understand when I started, etc. - - * VM/SamplingTool.h: New helper classes, described above. - - * kjs/Parser.h: - * kjs/Shell.cpp: - (runWithScripts): - * kjs/nodes.cpp: - (JSC::ScopeNode::ScopeNode): Updated for new sampling APIs. - - * wtf/Platform.h: Moved sampling #defines here, since our custom is to - put ENABLE #defines into Platform.h. Made explicit the fact that - CODEBLOCK_SAMPLING depends on OPCODE_SAMPLING. - -2008-10-25 Jan Michael Alonzo - - JSC Build fix, not reviewed. - - * VM/CTI.cpp: add missing include stdio.h for debug builds - -2008-10-24 Eric Seidel - - Reviewed by Darin Adler. - - Get rid of a bonus ASSERT when using a null string as a regexp. - Specifically calling: RegularExpression::match() with String::empty() - will hit this ASSERT. - Chromium hits this, but I don't know of any way to make a layout test. - - * pcre/pcre_exec.cpp: - (jsRegExpExecute): - -2008-10-24 Alexey Proskuryakov - - Suggested and rubber-stamped by Geoff Garen. - - Fix a crash when opening Font Picker. - - The change also hopefully fixes this bug, which I could never reproduce: - https://bugs.webkit.org/show_bug.cgi?id=20241 - Safari crashes at JSValueUnprotect() when fontpicker view close - - * API/JSContextRef.cpp: (JSContextGetGlobalObject): Use lexical global object instead of - dynamic one. - -2008-10-24 Cameron Zwarich - - Reviewed by Geoff Garen. - - Remove ScopeChainNode::bottom() and inline it into its only caller, - ScopeChainnode::globalObject(). - - * kjs/JSGlobalObject.h: - (JSC::ScopeChainNode::globalObject): - * kjs/ScopeChain.h: - (JSC::ScopeChain::bottom): - -2008-10-24 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 21862: Create JSFunction prototype property lazily - - - This is a 1.5% speedup on SunSpider and a 1.4% speedup on the V8 - benchmark suite, including a 3.8% speedup on Earley-Boyer. - - * kjs/JSFunction.cpp: - (JSC::JSFunction::getOwnPropertySlot): - * kjs/nodes.cpp: - (JSC::FuncDeclNode::makeFunction): - (JSC::FuncExprNode::makeFunction): - -2008-10-24 Greg Bolsinga - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=21475 - - Provide support for the Geolocation API - - http://dev.w3.org/geo/api/spec-source.html - - * wtf/Platform.h: ENABLE_GEOLOCATION defaults to 0 - -2008-10-24 Darin Adler - - - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732 - - * API/APICast.h: - * API/JSCallbackConstructor.h: - * API/JSCallbackFunction.cpp: - * API/JSCallbackFunction.h: - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - * API/JSValueRef.cpp: - * VM/CTI.cpp: - * VM/CTI.h: - * VM/CodeBlock.cpp: - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - * VM/CodeGenerator.h: - * VM/ExceptionHelpers.cpp: - * VM/ExceptionHelpers.h: - * VM/JSPropertyNameIterator.cpp: - * VM/JSPropertyNameIterator.h: - * VM/Machine.cpp: - * VM/Machine.h: - * VM/Register.h: - * kjs/ArgList.cpp: - * kjs/ArgList.h: - * kjs/Arguments.cpp: - * kjs/Arguments.h: - * kjs/ArrayConstructor.cpp: - * kjs/ArrayPrototype.cpp: - * kjs/BooleanConstructor.cpp: - * kjs/BooleanConstructor.h: - * kjs/BooleanObject.h: - * kjs/BooleanPrototype.cpp: - * kjs/CallData.cpp: - * kjs/CallData.h: - * kjs/ConstructData.cpp: - * kjs/ConstructData.h: - * kjs/DateConstructor.cpp: - * kjs/DateInstance.h: - * kjs/DatePrototype.cpp: - * kjs/DatePrototype.h: - * kjs/DebuggerCallFrame.cpp: - * kjs/DebuggerCallFrame.h: - * kjs/ErrorConstructor.cpp: - * kjs/ErrorPrototype.cpp: - * kjs/ExecState.cpp: - * kjs/ExecState.h: - * kjs/FunctionConstructor.cpp: - * kjs/FunctionPrototype.cpp: - * kjs/FunctionPrototype.h: - * kjs/GetterSetter.cpp: - * kjs/GetterSetter.h: - * kjs/InternalFunction.h: - * kjs/JSActivation.cpp: - * kjs/JSActivation.h: - * kjs/JSArray.cpp: - * kjs/JSArray.h: - * kjs/JSCell.cpp: - * kjs/JSCell.h: - * kjs/JSFunction.cpp: - * kjs/JSFunction.h: - * kjs/JSGlobalData.h: - * kjs/JSGlobalObject.cpp: - * kjs/JSGlobalObject.h: - * kjs/JSGlobalObjectFunctions.cpp: - * kjs/JSGlobalObjectFunctions.h: - * kjs/JSImmediate.cpp: - * kjs/JSImmediate.h: - * kjs/JSNotAnObject.cpp: - * kjs/JSNotAnObject.h: - * kjs/JSNumberCell.cpp: - * kjs/JSNumberCell.h: - * kjs/JSObject.cpp: - * kjs/JSObject.h: - * kjs/JSStaticScopeObject.cpp: - * kjs/JSStaticScopeObject.h: - * kjs/JSString.cpp: - * kjs/JSString.h: - * kjs/JSValue.h: - * kjs/JSVariableObject.h: - * kjs/JSWrapperObject.h: - * kjs/MathObject.cpp: - * kjs/MathObject.h: - * kjs/NativeErrorConstructor.cpp: - * kjs/NumberConstructor.cpp: - * kjs/NumberConstructor.h: - * kjs/NumberObject.cpp: - * kjs/NumberObject.h: - * kjs/NumberPrototype.cpp: - * kjs/ObjectConstructor.cpp: - * kjs/ObjectPrototype.cpp: - * kjs/ObjectPrototype.h: - * kjs/PropertyMap.h: - * kjs/PropertySlot.cpp: - * kjs/PropertySlot.h: - * kjs/RegExpConstructor.cpp: - * kjs/RegExpConstructor.h: - * kjs/RegExpMatchesArray.h: - * kjs/RegExpObject.cpp: - * kjs/RegExpObject.h: - * kjs/RegExpPrototype.cpp: - * kjs/Shell.cpp: - * kjs/StringConstructor.cpp: - * kjs/StringObject.cpp: - * kjs/StringObject.h: - * kjs/StringObjectThatMasqueradesAsUndefined.h: - * kjs/StringPrototype.cpp: - * kjs/StructureID.cpp: - * kjs/StructureID.h: - * kjs/collector.cpp: - * kjs/collector.h: - * kjs/completion.h: - * kjs/grammar.y: - * kjs/interpreter.cpp: - * kjs/interpreter.h: - * kjs/lookup.cpp: - * kjs/lookup.h: - * kjs/nodes.h: - * kjs/operations.cpp: - * kjs/operations.h: - * kjs/protect.h: - * profiler/ProfileGenerator.cpp: - * profiler/Profiler.cpp: - * profiler/Profiler.h: - Use JSValue* instead of JSValuePtr. - -2008-10-24 David Kilzer - - Rolled out r37840. - - * wtf/Platform.h: - -2008-10-23 Greg Bolsinga - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=21475 - - Provide support for the Geolocation API - - http://dev.w3.org/geo/api/spec-source.html - - * wtf/Platform.h: ENABLE_GEOLOCATION defaults to 0 - -2008-10-23 David Kilzer - - Bug 21832: Fix scripts using 'new File::Temp' for Perl 5.10 - - - - Reviewed by Sam Weinig. - - * pcre/dftables: Use imported tempfile() from File::Temp instead of - 'new File::Temp' to make the script work with Perl 5.10. - -2008-10-23 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Fix hideous pathological case performance when looking up repatch info, bug #21727. - - When repatching JIT code to optimize we look up records providing information about - the generated code (also used to track recsources used in linking to be later released). - The lookup was being performed using a linear scan of all such records. - - (1) Split up the different types of reptach information. This means we can search them - separately, and in some cases should reduce their size. - (2) In the case of property accesses, search with a binary chop over the data. - (3) In the case of calls, pass a pointer to the repatch info into the relink function. - - * VM/CTI.cpp: - (JSC::CTI::CTI): - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::unlinkCall): - (JSC::CTI::linkCall): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::~CodeBlock): - (JSC::CodeBlock::unlinkCallers): - (JSC::CodeBlock::derefStructureIDs): - * VM/CodeBlock.h: - (JSC::StructureStubInfo::StructureStubInfo): - (JSC::CallLinkInfo::CallLinkInfo): - (JSC::CallLinkInfo::setUnlinked): - (JSC::CallLinkInfo::isLinked): - (JSC::getStructureStubInfoReturnLocation): - (JSC::binaryChop): - (JSC::CodeBlock::addCaller): - (JSC::CodeBlock::getStubInfo): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitResolve): - (JSC::CodeGenerator::emitGetById): - (JSC::CodeGenerator::emitPutById): - (JSC::CodeGenerator::emitCall): - (JSC::CodeGenerator::emitConstruct): - * VM/Machine.cpp: - (JSC::Machine::cti_vm_lazyLinkCall): - -2008-10-23 Peter Kasting - - Reviewed by Adam Roben. - - https://bugs.webkit.org/show_bug.cgi?id=21833 - Place JavaScript Debugger hooks under #if ENABLE(JAVASCRIPT_DEBUGGER). - - * wtf/Platform.h: - -2008-10-23 David Kilzer - - Bug 21831: Fix create_hash_table for Perl 5.10 - - - - Reviewed by Sam Weinig. - - * kjs/create_hash_table: Escaped square brackets so that Perl 5.10 - doesn't try to use @nameEntries. - -2008-10-23 Darin Adler - - - roll out https://bugs.webkit.org/show_bug.cgi?id=21732 - to remove the JSValuePtr class, to fix two problems - - 1) slowness under MSVC, since it doesn't handle a - class with a single pointer in it as efficiently - as a pointer - - 2) uninitialized pointers in Vector - - * JavaScriptCore.exp: Updated. - - * API/APICast.h: - (toRef): - * VM/CTI.cpp: - (JSC::CTI::asInteger): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::addConstant): - * VM/CodeGenerator.h: - (JSC::CodeGenerator::JSValueHashTraits::constructDeletedValue): - (JSC::CodeGenerator::JSValueHashTraits::isDeletedValue): - * VM/Machine.cpp: - (JSC::Machine::cti_op_add): - (JSC::Machine::cti_op_pre_inc): - (JSC::Machine::cti_op_get_by_id): - (JSC::Machine::cti_op_get_by_id_second): - (JSC::Machine::cti_op_get_by_id_generic): - (JSC::Machine::cti_op_get_by_id_fail): - (JSC::Machine::cti_op_instanceof): - (JSC::Machine::cti_op_del_by_id): - (JSC::Machine::cti_op_mul): - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_resolve): - (JSC::Machine::cti_op_construct_NotJSConstruct): - (JSC::Machine::cti_op_get_by_val): - (JSC::Machine::cti_op_sub): - (JSC::Machine::cti_op_lesseq): - (JSC::Machine::cti_op_negate): - (JSC::Machine::cti_op_resolve_base): - (JSC::Machine::cti_op_resolve_skip): - (JSC::Machine::cti_op_resolve_global): - (JSC::Machine::cti_op_div): - (JSC::Machine::cti_op_pre_dec): - (JSC::Machine::cti_op_not): - (JSC::Machine::cti_op_eq): - (JSC::Machine::cti_op_lshift): - (JSC::Machine::cti_op_bitand): - (JSC::Machine::cti_op_rshift): - (JSC::Machine::cti_op_bitnot): - (JSC::Machine::cti_op_mod): - (JSC::Machine::cti_op_less): - (JSC::Machine::cti_op_neq): - (JSC::Machine::cti_op_urshift): - (JSC::Machine::cti_op_bitxor): - (JSC::Machine::cti_op_bitor): - (JSC::Machine::cti_op_call_eval): - (JSC::Machine::cti_op_throw): - (JSC::Machine::cti_op_next_pname): - (JSC::Machine::cti_op_typeof): - (JSC::Machine::cti_op_is_undefined): - (JSC::Machine::cti_op_is_boolean): - (JSC::Machine::cti_op_is_number): - (JSC::Machine::cti_op_is_string): - (JSC::Machine::cti_op_is_object): - (JSC::Machine::cti_op_is_function): - (JSC::Machine::cti_op_stricteq): - (JSC::Machine::cti_op_nstricteq): - (JSC::Machine::cti_op_to_jsnumber): - (JSC::Machine::cti_op_in): - (JSC::Machine::cti_op_del_by_val): - (JSC::Machine::cti_vm_throw): - Removed calls to payload functions. - - * VM/Register.h: - (JSC::Register::Register): Removed overload for JSCell and call - to payload function. - - * kjs/JSCell.h: Changed JSCell to derive from JSValue again. - Removed JSValuePtr constructor. - (JSC::asCell): Changed cast from reinterpret_cast to static_cast. - - * kjs/JSImmediate.h: Removed JSValuePtr class. Added typedef back. - - * kjs/JSValue.h: - (JSC::JSValue::JSValue): Added empty protected inline constructor back. - (JSC::JSValue::~JSValue): Same for destructor. - Removed == and != operator for JSValuePtr. - - * kjs/PropertySlot.h: - (JSC::PropertySlot::PropertySlot): Chnaged argument to const JSValue* - and added a const_cast. - - * kjs/protect.h: Removed overloads and specialization for JSValuePtr. - -2008-10-22 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Really "fix" CTI mode on windows 2k3. - - This adds new methods fastMallocExecutable and fastFreeExecutable - to wrap allocation for cti code. This still just makes fastMalloc - return executable memory all the time, which will be fixed in a - later patch. - - However in windows debug builds all executable allocations will be - allocated on separate executable pages, which should resolve any - remaining 2k3 issues. Conveniently the 2k3 bot will now also fail - if there are any fastFree vs. fastFreeExecutable errors. - - * ChangeLog: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - * kjs/regexp.cpp: - (JSC::RegExp::~RegExp): - * masm/X86Assembler.h: - (JSC::JITCodeBuffer::copy): - * wtf/FastMalloc.cpp: - (WTF::fastMallocExecutable): - (WTF::fastFreeExecutable): - (WTF::TCMallocStats::fastMallocExecutable): - (WTF::TCMallocStats::fastFreeExecutable): - * wtf/FastMalloc.h: - -2008-10-22 Darin Adler - - Reviewed by Sam Weinig. - - - fix https://bugs.webkit.org/show_bug.cgi?id=21294 - Bug 21294: Devirtualize getOwnPropertySlot() - - A bit over 3% faster on V8 tests. - - * JavascriptCore.exp: Export leak-related functions.. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructureID): Set HasStandardGetOwnPropertySlot - since this class doesn't override getPropertySlot. - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructureID): Ditto. - - * VM/ExceptionHelpers.cpp: - (JSC::InterruptedExecutionError::InterruptedExecutionError): Use a structure - that's created just for this class instead of trying to share a single "null - prototype" structure. - - * VM/Machine.cpp: - (JSC::Machine::cti_op_create_arguments_no_params): Rename - Arguments::ArgumentsNoParameters to Arguments::NoParameters. - - * kjs/Arguments.h: Rename the enum from Arguments::ArgumentsParameters to - Arguments::NoParametersType and the value from Arguments::ArgumentsNoParameters - to Arguments::NoParameters. - (JSC::Arguments::createStructureID): Added. Returns a structure without - HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot. - (JSC::Arguments::Arguments): Added an assertion that there are no parameters. - - * kjs/DatePrototype.h: - (JSC::DatePrototype::createStructureID): Added. Returns a structure without - HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot. - - * kjs/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructureID): Set HasStandardGetOwnPropertySlot - since this class doesn't override getPropertySlot. - * kjs/InternalFunction.h: - (JSC::InternalFunction::createStructureID): Ditto. - - * kjs/JSArray.h: - (JSC::JSArray::createStructureID): Added. Returns a structure without - HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot. - - * kjs/JSCell.h: Added declaration of fastGetOwnPropertySlot; a non-virtual - version that uses the structure bit to decide whether to call the virtual - version. - - * kjs/JSFunction.h: - (JSC::JSFunction::createStructureID): Added. Returns a structure without - HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot. - - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): Initialize new structures; removed - nullProtoStructureID. - * kjs/JSGlobalData.h: Added new structures. Removed nullProtoStructureID. - - * kjs/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructureID): Added. Returns a structure without - HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot. - - * kjs/JSNotAnObject.h: - (JSC::JSNotAnObjectErrorStub::JSNotAnObjectErrorStub): Use a structure - that's created just for this class instead of trying to share a single "null - prototype" structure. - (JSC::JSNotAnObjectErrorStub::isNotAnObjectErrorStub): Marked this function - virtual for clarity and made it private since no one should call it if they - already have a pointer to this specific type. - (JSC::JSNotAnObject::JSNotAnObject): Use a structure that's created just - for this class instead of trying to share a single "null prototype" structure. - (JSC::JSNotAnObject::createStructureID): Added. Returns a structure without - HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot. - - * kjs/JSObject.h: - (JSC::JSObject::createStructureID): Added HasStandardGetOwnPropertySlot. - (JSC::JSObject::inlineGetOwnPropertySlot): Added. Used so we can share code - between getOwnPropertySlot and fastGetOwnPropertySlot. - (JSC::JSObject::getOwnPropertySlot): Moved so that functions are above the - functions that call them. Moved the guts of this function into - inlineGetOwnPropertySlot. - (JSC::JSCell::fastGetOwnPropertySlot): Added. Checks the - HasStandardGetOwnPropertySlot bit and if it's set, calls - inlineGetOwnPropertySlot, otherwise calls getOwnPropertySlot. - (JSC::JSObject::getPropertySlot): Changed to call fastGetOwnPropertySlot. - (JSC::JSValue::get): Changed to call fastGetOwnPropertySlot. - - * kjs/JSWrapperObject.h: Made constructor protected to emphasize that - this class is only a base class and never instantiated. - - * kjs/MathObject.h: - (JSC::MathObject::createStructureID): Added. Returns a structure without - HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot. - * kjs/NumberConstructor.h: - (JSC::NumberConstructor::createStructureID): Ditto. - * kjs/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructureID): Ditto. - * kjs/RegExpObject.h: - (JSC::RegExpObject::createStructureID): Ditto. - * kjs/StringObject.h: - (JSC::StringObject::createStructureID): Ditto. - - * kjs/TypeInfo.h: Added HasStandardGetOwnPropertySlot flag and - hasStandardGetOwnPropertySlot accessor function. - -2008-10-22 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 21803: Fuse op_jfalse with op_eq_null and op_neq_null - - - Fuse op_jfalse with op_eq_null and op_neq_null to make the new opcodes - op_jeq_null and op_jneq_null. - - This is a 2.6% speedup on the V8 Raytrace benchmark, and strangely also - a 4.7% speedup on the V8 Arguments benchmark, even though it uses - neither of the two new opcodes. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitJumpIfTrue): - (JSC::CodeGenerator::emitJumpIfFalse): - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - * VM/Opcode.h: - -2008-10-22 Darin Fisher - - Reviewed by Eric Seidel. - - Should not define PLATFORM(WIN,MAC,GTK) when PLATFORM(CHROMIUM) is defined - https://bugs.webkit.org/show_bug.cgi?id=21757 - - PLATFORM(CHROMIUM) implies HAVE_ACCESSIBILITY - - * wtf/Platform.h: - -2008-10-22 Cameron Zwarich - - Reviewed by Alexey Proskuryakov. - - Correct opcode names in documentation. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - -2008-10-21 Oliver Hunt - - RS=Maciej Stachowiak. - - Force FastMalloc to make all allocated pages executable in - a vague hope this will allow the Win2k3 bot to be able to - run tests. - - Filed Bug 21783: Need more granular control over allocation of executable memory - to cover a more granular version of this patch. - - * wtf/TCSystemAlloc.cpp: - (TryVirtualAlloc): - -2008-10-21 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=21769 - MessagePort should be GC protected if there are messages to be delivered - - * wtf/MessageQueue.h: - (WTF::::isEmpty): Added. Also added a warning for methods that return a snapshot of queue - state, thus likely to cause race conditions. - -2008-10-21 Darin Adler - - Reviewed by Maciej Stachowiak. - - - convert post-increment to pre-increment in a couple more places for speed - - Speeds up V8 benchmarks a little on most computers. (But, strangely, slows - them down a little on my computer.) - - * kjs/nodes.cpp: - (JSC::statementListEmitCode): Removed default argument, since we always want - to specify this explicitly. - (JSC::ForNode::emitCode): Tolerate ignoredResult() as the dst -- means the - same thing as 0. - (JSC::ReturnNode::emitCode): Ditto. - (JSC::ThrowNode::emitCode): Ditto. - (JSC::FunctionBodyNode::emitCode): Pass ignoredResult() so that we know we - don't have to compute the result of function statements. - -2008-10-21 Peter Kasting - - Reviewed by Maciej Stachowiak. - - Fix an include of a non-public header to use "" instead of <>. - - * API/JSProfilerPrivate.cpp: - -2008-10-20 Sam Weinig - - Reviewed by Cameron Zwarich. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=21766 - REGRESSION: 12 JSC tests fail - - The JSGlobalObject was mutating the shared nullProtoStructureID when - used in jsc. Instead of using nullProtoStructureID, use a new StructureID. - - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::JSCallbackObject): - * API/JSContextRef.cpp: - (JSGlobalContextCreateInGroup): - * kjs/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObject): - * kjs/Shell.cpp: - (GlobalObject::GlobalObject): - (jscmain): - -2008-10-20 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Remove an untaken branch in CodeGenerator::emitJumpIfFalse(). This - function is never called with a backwards target LabelID, and there is - even an assertion to this effect at the top of the function body. - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitJumpIfFalse): - -2008-10-20 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Add opcode documentation for undocumented opcodes. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - -2008-10-16 Sam Weinig - - Reviewed by Cameron Zwarich. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=21683 - Don't create intermediate StructureIDs for builtin objects - - Second stage in reduce number of StructureIDs created when initializing the - JSGlobalObject. - - - Use putDirectWithoutTransition for the remaining singleton objects to reduce - the number of StructureIDs create for about:blank from 132 to 73. - - * kjs/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - * kjs/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - * kjs/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * kjs/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * kjs/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * kjs/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * kjs/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * kjs/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - (JSC::FunctionPrototype::addFunctionProperties): - * kjs/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructureID): - * kjs/InternalFunction.cpp: - * kjs/InternalFunction.h: - (JSC::InternalFunction::InternalFunction): - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - * kjs/JSObject.h: - * kjs/MathObject.cpp: - (JSC::MathObject::MathObject): - * kjs/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - * kjs/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * kjs/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - * kjs/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - * kjs/RegExpPrototype.cpp: - (JSC::RegExpPrototype::RegExpPrototype): - * kjs/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * kjs/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * kjs/StructureID.cpp: - (JSC::StructureID::dumpStatistics): - * kjs/StructureID.h: - (JSC::StructureID::setPrototypeWithoutTransition): - -2008-10-20 Alp Toker - - Fix autotools dist build target by listing recently added header - files only. Not reviewed. - - * GNUmakefile.am: - -2008-10-20 Geoffrey Garen - - Reviewed by Anders Carlsson. - - * VM/Machine.cpp: - (JSC::Machine::tryCacheGetByID): Removed a redundant and sometimes - incorrect cast, which started ASSERTing after Darin's last checkin. - -2008-10-20 Geoffrey Garen - - Not reviewed. - - Re-enable CTI, which I accidentally disabled while checking in fixes - to bytecode. - - * wtf/Platform.h: - -2008-10-20 Alp Toker - - Rubber-stamped by Mark Rowe. - - Typo fix in function name: mimimum -> minimum. - - * kjs/DateMath.cpp: - (JSC::minimumYearForDST): - (JSC::equivalentYearForDST): - -2008-10-20 Alp Toker - - Reviewed by Mark Rowe. - - Use pthread instead of GThread where possible in the GTK+ port. This - fixes issues with global initialisation, particularly on GTK+/Win32 - where a late g_thread_init() will cause hangs. - - * GNUmakefile.am: - * wtf/Platform.h: - * wtf/Threading.h: - * wtf/ThreadingGtk.cpp: - * wtf/ThreadingPthreads.cpp: - -2008-10-20 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=21735 - Emit profiling instrumentation only if the Web Inspector's profiling - feature is enabled - - 22.2% speedup on empty function call benchmark. - 2.9% speedup on v8 benchmark. - 0.7% speedup on SunSpider. - - Lesser but similar speedups in bytecode. - - * VM/CTI.cpp: - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): Nixed JITed profiler hooks. Profiler - hooks now have their own opcodes. Added support for compiling profiler - hook opcodes. - - (JSC::CodeBlock::dump): Dump support for the new profiling opcodes. - - * VM/CodeGenerator.h: - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::CodeGenerator): - (JSC::CodeGenerator::emitCall): - (JSC::CodeGenerator::emitConstruct): Conditionally emit profiling hooks - around call and construct, at the call site. (It's easier to get things - right this way, if you have profiled code calling non-profiled code. - Also, you get a slightly more accurate profile, since you charge the full - cost of the call / construct operation to the callee.) - - Also, fixed a bug where construct would fetch the ".prototype" property - from the constructor before evaluating the arguments to the constructor, - incorrectly allowing an "invalid constructor" exception to short-circuit - argument evaluation. I encountered this bug when trying to make - constructor exceptions work with profiling. - - * VM/Machine.cpp: - (JSC::Machine::callEval): Removed obsolete profiler hooks. - - (JSC::Machine::throwException): Added a check for an exception thrown - within a call instruction. We didn't need this before because the call - instruction would check for a valid call before involing the profiler. - (JSC::Machine::execute): Added a didExecute hook at the end of top-level - function invocation, since op_ret no longer does this for us. - - (JSC::Machine::privateExecute): Removed obsolete profiler hooks. Added - profiler opcodes. Changed some ++vPC to vPC[x] notation, since the - latter is better for performance, and it makes reasoning about the - current opcode in exception handling much simpler. - - (JSC::Machine::cti_op_call_NotJSFunction): Removed obsolete profiler - hooks. - - (JSC::Machine::cti_op_create_arguments_no_params): Added missing - CTI_STACK_HACK that I noticed when adding CTI_STACK_HACK to the new - profiler opcode functions. - - (JSC::Machine::cti_op_profile_will_call): - (JSC::Machine::cti_op_profile_did_call): The new profiler opcode - functions. - - (JSC::Machine::cti_op_construct_NotJSConstruct): Removed obsolete profiler - hooks. - - * VM/Machine.h: - (JSC::Machine::isCallOpcode): Helper for exception handling. - - * VM/Opcode.h: Declare new opcodes. - - * kjs/JSGlobalObject.h: - (JSC::JSGlobalObject::supportsProfiling): Added virtual interface that - allows WebCore to specify whether the target global object has the Web - Inspector's profiling feature enabled. - - * profiler/Profiler.cpp: - (JSC::Profiler::willExecute): - (JSC::Profiler::didExecute): - (JSC::Profiler::createCallIdentifier): - * profiler/Profiler.h: Added support for invoking the profiler with - an arbitrary JSValue*, and not a known object. We didn't need this - before because the call instruction would check for a valid call before - involing the profiler. - -2008-10-20 Darin Adler - - Reviewed by Geoff Garen. - - - get CTI working on Windows again - - * VM/CTI.cpp: - (JSC::CTI::emitCTICall): Add an overload for functions that - return JSObject*. - * VM/CTI.h: Use JSValue* and JSObject* as return types for - cti_op functions. Apparently, MSVC doesn't handle returning - the JSValuePtr struct in a register. We'll have to look into - this more. - - * VM/Machine.cpp: - (JSC::Machine::cti_op_convert_this): - (JSC::Machine::cti_op_add): - (JSC::Machine::cti_op_pre_inc): - (JSC::Machine::cti_op_new_object): - (JSC::Machine::cti_op_get_by_id): - (JSC::Machine::cti_op_get_by_id_second): - (JSC::Machine::cti_op_get_by_id_generic): - (JSC::Machine::cti_op_get_by_id_fail): - (JSC::Machine::cti_op_instanceof): - (JSC::Machine::cti_op_del_by_id): - (JSC::Machine::cti_op_mul): - (JSC::Machine::cti_op_new_func): - (JSC::Machine::cti_op_push_activation): - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_new_array): - (JSC::Machine::cti_op_resolve): - (JSC::Machine::cti_op_construct_JSConstructFast): - (JSC::Machine::cti_op_construct_NotJSConstruct): - (JSC::Machine::cti_op_get_by_val): - (JSC::Machine::cti_op_sub): - (JSC::Machine::cti_op_lesseq): - (JSC::Machine::cti_op_negate): - (JSC::Machine::cti_op_resolve_base): - (JSC::Machine::cti_op_resolve_skip): - (JSC::Machine::cti_op_resolve_global): - (JSC::Machine::cti_op_div): - (JSC::Machine::cti_op_pre_dec): - (JSC::Machine::cti_op_not): - (JSC::Machine::cti_op_eq): - (JSC::Machine::cti_op_lshift): - (JSC::Machine::cti_op_bitand): - (JSC::Machine::cti_op_rshift): - (JSC::Machine::cti_op_bitnot): - (JSC::Machine::cti_op_new_func_exp): - (JSC::Machine::cti_op_mod): - (JSC::Machine::cti_op_less): - (JSC::Machine::cti_op_neq): - (JSC::Machine::cti_op_urshift): - (JSC::Machine::cti_op_bitxor): - (JSC::Machine::cti_op_new_regexp): - (JSC::Machine::cti_op_bitor): - (JSC::Machine::cti_op_call_eval): - (JSC::Machine::cti_op_throw): - (JSC::Machine::cti_op_next_pname): - (JSC::Machine::cti_op_typeof): - (JSC::Machine::cti_op_is_undefined): - (JSC::Machine::cti_op_is_boolean): - (JSC::Machine::cti_op_is_number): - (JSC::Machine::cti_op_is_string): - (JSC::Machine::cti_op_is_object): - (JSC::Machine::cti_op_is_function): - (JSC::Machine::cti_op_stricteq): - (JSC::Machine::cti_op_nstricteq): - (JSC::Machine::cti_op_to_jsnumber): - (JSC::Machine::cti_op_in): - (JSC::Machine::cti_op_push_new_scope): - (JSC::Machine::cti_op_del_by_val): - (JSC::Machine::cti_op_new_error): - (JSC::Machine::cti_vm_throw): - Change these functions to return pointer types, and never - JSValuePtr. - * VM/Machine.h: Ditto. - -2008-10-20 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed some recent break-age in bytecode mode. - - * VM/CodeBlock.cpp: - (JSC::CodeBlock::printStructureIDs): Fixed up an ASSERT caused by - Gavin's last checkin. This is a temporary fix so I can keep on moving. - I'll send email about what I think is an underlying problem soon. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): Removed a redundant and sometimes - incorrect cast, which started ASSERTing after Darin's last checkin. - -2008-10-20 Darin Adler - - - another similar Windows build fix - - * VM/CTI.cpp: Changed return type to JSObject* instead of JSValuePtr. - -2008-10-20 Darin Adler - - - try to fix Windows build - - * VM/CTI.cpp: Use JSValue* instead of JSValuePtr for ctiTrampoline. - * VM/CTI.h: Ditto. - -2008-10-19 Darin Adler - - Reviewed by Cameron Zwarich. - - - finish https://bugs.webkit.org/show_bug.cgi?id=21732 - improve performance by eliminating JSValue as a base class for JSCell - - * VM/Machine.cpp: - (JSC::Machine::cti_op_call_profiler): Use asFunction. - (JSC::Machine::cti_vm_lazyLinkCall): Ditto. - (JSC::Machine::cti_op_construct_JSConstructFast): Use asObject. - - * kjs/JSCell.h: Re-sort friend classes. Eliminate inheritance from - JSValue. Changed cast in asCell from static_cast to reinterpret_cast. - Removed JSValue::getNumber(double&) and one of JSValue::getObject - overloads. - - * kjs/JSValue.h: Made the private constructor and destructor both - non-virtual and also remove the definitions. This class can never - be instantiated or derived. - -2008-10-19 Darin Adler - - Reviewed by Cameron Zwarich. - - - next step of https://bugs.webkit.org/show_bug.cgi?id=21732 - improve performance by eliminating JSValue as a base class for JSCell - - Change JSValuePtr from a typedef into a class. This allows us to support - conversion from JSCell* to JSValuePtr even if JSCell isn't derived from - JSValue. - - * JavaScriptCore.exp: Updated symbols that involve JSValuePtr, since - it's now a distinct type. - - * API/APICast.h: - (toRef): Extract the JSValuePtr payload explicitly since we can't just - cast any more. - * VM/CTI.cpp: - (JSC::CTI::asInteger): Ditto. - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::addConstant): Get at the payload directly. - (JSC::CodeGenerator::emitLoad): Added an overload of JSCell* because - otherwise classes derived from JSValue end up calling the bool - overload instead of JSValuePtr. - * VM/CodeGenerator.h: Ditto. Also update traits to use JSValue* - and the payload functions. - - * VM/Register.h: Added a JSCell* overload and use of payload functions. - - * kjs/JSCell.h: - (JSC::asCell): Use payload function. - (JSC::JSValue::asCell): Use JSValue* instead of JSValuePtr. - (JSC::JSValuePtr::JSValuePtr): Added. Constructor that takes JSCell* - and creates a JSValuePtr. - - * kjs/JSImmediate.h: Added JSValuePtr class. Also updated makeValue - and makeInt to work with JSValue* and the payload function. - - * kjs/JSValue.h: Added == and != operators for JSValuePtr. Put them - here because eventually all the JSValue functions should go here - except what's needed by JSImmediate. Also fix asValue to use - JSValue* instead of JSValuePtr. - - * kjs/PropertySlot.h: Change constructor to take JSValuePtr. - - * kjs/protect.h: Update gcProtect functions to work with JSCell* - as well as JSValuePtr. Also updated the ProtectedPtr - specialization to work more directly. Also changed all the call - sites to use gcProtectNullTolerant. - -2008-10-19 Darin Adler - - Reviewed by Oliver Hunt. - - - next step of https://bugs.webkit.org/show_bug.cgi?id=21732 - improve performance by eliminating JSValue as a base class for JSCell - - Remove most uses of JSValue, which will be removed in a future patch. - - * VM/Machine.cpp: - (JSC::fastToUInt32): Call toUInt32SlowCase function; no longer a member - of JSValue. - * kjs/JSNumberCell.h: - (JSC::JSNumberCell::toInt32): Ditto. - (JSC::JSNumberCell::toUInt32): Ditto. - - * kjs/JSValue.cpp: - (JSC::toInt32SlowCase): Made a non-member function. - (JSC::JSValue::toInt32SlowCase): Changed to call non-member function. - (JSC::toUInt32SlowCase): More of the same. - (JSC::JSValue::toUInt32SlowCase): Ditto. - - * kjs/JSValue.h: Moved static member function so they are no longer - member functions at all. - - * VM/CTI.h: Removed forward declaration of JSValue. - * VM/ExceptionHelpers.h: Ditto. - * kjs/CallData.h: Ditto. - * kjs/ConstructData.h: Ditto. - * kjs/JSGlobalObjectFunctions.h: Ditto. - * kjs/PropertyMap.h: Ditto. - * kjs/StructureID.h: Ditto. - * kjs/collector.h: Ditto. - * kjs/completion.h: Ditto. - - * kjs/grammar.y: - (JSC::makeBitwiseNotNode): Call new non-member toInt32 function. - (JSC::makeLeftShiftNode): More of the same. - (JSC::makeRightShiftNode): Ditto. - - * kjs/protect.h: Added a specialization for ProtectedPtr - so this can be used with JSValuePtr. - -2008-10-18 Darin Adler - - Reviewed by Oliver Hunt. - - - next step of https://bugs.webkit.org/show_bug.cgi?id=21732 - improve performance by eliminating JSValue as a base class for JSCell - - Tweak a little more to get closer to where we can make JSValuePtr a class. - - * API/APICast.h: - (toJS): Change back to JSValue* here, since we're converting the - pointer type. - * VM/CTI.cpp: - (JSC::CTI::unlinkCall): Call asPointer. - * VM/CTI.h: Cast to JSValue* here, since it's a pointer cast. - * kjs/DebuggerCallFrame.h: - (JSC::DebuggerCallFrame::DebuggerCallFrame): Call noValue. - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): Call noValue. - * kjs/JSImmediate.cpp: - (JSC::JSImmediate::toObject): Remove unneeded const_cast. - * kjs/JSWrapperObject.h: - (JSC::JSWrapperObject::JSWrapperObject): Call noValue. - -2008-10-18 Darin Adler - - - fix non-all-in-one build - - * kjs/completion.h: - (JSC::Completion::Completion): Add include of JSValue.h. - -2008-10-18 Darin Adler - - Reviewed by Oliver Hunt. - - - fix assertions I introduced with my casting changes - - These were showing up as failures in the JavaScriptCore tests. - - * VM/Machine.cpp: - (JSC::Machine::cti_op_instanceof): Remove the bogus asCell casting that - was at the top of the function, and instead cast at the point of use. - (JSC::Machine::cti_op_construct_NotJSConstruct): Moved the cast to - object after checking the construct type. - -2008-10-18 Darin Adler - - - fix non-all-in-one build - - * kjs/JSGlobalObjectFunctions.h: Add include of JSImmedate.h (for now). - -2008-10-18 Darin Adler - - - fix build - - * kjs/interpreter.h: Include JSValue.h instead of JSImmediate.h. - -2008-10-18 Darin Adler - - * kjs/interpreter.h: Fix include of JSImmediate.h. - -2008-10-18 Darin Adler - - - fix non-all-in-one build - - * kjs/interpreter.h: Add include of JSImmediate.h. - -2008-10-18 Darin Adler - - - fix non-all-in-one build - - * kjs/ConstructData.h: Add include of JSImmedate.h (for now). - -2008-10-18 Darin Adler - - - try to fix Windows build - - * VM/Machine.cpp: - (JSC::Machine::Machine): Use JSCell* type since MSVC seems to only allow - calling ~JSCell directly if it's a JSCell*. - -2008-10-18 Darin Adler - - Reviewed by Cameron Zwarich. - - - next step on https://bugs.webkit.org/show_bug.cgi?id=21732 - improve performance by eliminating JSValue as a base class for JSCell - - Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be - changing JSValuePtr to be a class, and then eventually renaming it - to JSValue once that's done. - - * JavaScriptCore.exp: Update entry points, since some now take JSValue* - instead of const JSValue*. - - * API/APICast.h: - * API/JSCallbackConstructor.h: - * API/JSCallbackFunction.cpp: - * API/JSCallbackFunction.h: - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - * API/JSValueRef.cpp: - * VM/CTI.cpp: - * VM/CTI.h: - * VM/CodeBlock.cpp: - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - * VM/CodeGenerator.h: - * VM/ExceptionHelpers.cpp: - * VM/ExceptionHelpers.h: - * VM/JSPropertyNameIterator.cpp: - * VM/JSPropertyNameIterator.h: - * VM/Machine.cpp: - * VM/Machine.h: - * VM/Register.h: - * kjs/ArgList.cpp: - * kjs/ArgList.h: - * kjs/Arguments.cpp: - * kjs/Arguments.h: - * kjs/ArrayConstructor.cpp: - * kjs/ArrayPrototype.cpp: - * kjs/BooleanConstructor.cpp: - * kjs/BooleanConstructor.h: - * kjs/BooleanObject.h: - * kjs/BooleanPrototype.cpp: - * kjs/CallData.cpp: - * kjs/CallData.h: - * kjs/ConstructData.cpp: - * kjs/ConstructData.h: - * kjs/DateConstructor.cpp: - * kjs/DateInstance.h: - * kjs/DatePrototype.cpp: - * kjs/DebuggerCallFrame.cpp: - * kjs/DebuggerCallFrame.h: - * kjs/ErrorConstructor.cpp: - * kjs/ErrorPrototype.cpp: - * kjs/ExecState.cpp: - * kjs/ExecState.h: - * kjs/FunctionConstructor.cpp: - * kjs/FunctionPrototype.cpp: - * kjs/GetterSetter.cpp: - * kjs/GetterSetter.h: - * kjs/InternalFunction.h: - * kjs/JSActivation.cpp: - * kjs/JSActivation.h: - * kjs/JSArray.cpp: - * kjs/JSArray.h: - * kjs/JSCell.cpp: - * kjs/JSCell.h: - * kjs/JSFunction.cpp: - * kjs/JSFunction.h: - * kjs/JSGlobalData.h: - * kjs/JSGlobalObject.cpp: - * kjs/JSGlobalObject.h: - * kjs/JSGlobalObjectFunctions.cpp: - * kjs/JSGlobalObjectFunctions.h: - * kjs/JSImmediate.cpp: - * kjs/JSImmediate.h: - * kjs/JSNotAnObject.cpp: - * kjs/JSNotAnObject.h: - * kjs/JSNumberCell.cpp: - * kjs/JSNumberCell.h: - * kjs/JSObject.cpp: - * kjs/JSObject.h: - * kjs/JSStaticScopeObject.cpp: - * kjs/JSStaticScopeObject.h: - * kjs/JSString.cpp: - * kjs/JSString.h: - * kjs/JSValue.h: - * kjs/JSVariableObject.h: - * kjs/JSWrapperObject.h: - * kjs/MathObject.cpp: - * kjs/NativeErrorConstructor.cpp: - * kjs/NumberConstructor.cpp: - * kjs/NumberConstructor.h: - * kjs/NumberObject.cpp: - * kjs/NumberObject.h: - * kjs/NumberPrototype.cpp: - * kjs/ObjectConstructor.cpp: - * kjs/ObjectPrototype.cpp: - * kjs/ObjectPrototype.h: - * kjs/PropertyMap.h: - * kjs/PropertySlot.cpp: - * kjs/PropertySlot.h: - * kjs/RegExpConstructor.cpp: - * kjs/RegExpConstructor.h: - * kjs/RegExpMatchesArray.h: - * kjs/RegExpObject.cpp: - * kjs/RegExpObject.h: - * kjs/RegExpPrototype.cpp: - * kjs/Shell.cpp: - * kjs/StringConstructor.cpp: - * kjs/StringObject.cpp: - * kjs/StringObject.h: - * kjs/StringObjectThatMasqueradesAsUndefined.h: - * kjs/StringPrototype.cpp: - * kjs/StructureID.cpp: - * kjs/StructureID.h: - * kjs/collector.cpp: - * kjs/collector.h: - * kjs/completion.h: - * kjs/grammar.y: - * kjs/interpreter.cpp: - * kjs/interpreter.h: - * kjs/lookup.cpp: - * kjs/lookup.h: - * kjs/nodes.h: - * kjs/operations.cpp: - * kjs/operations.h: - * kjs/protect.h: - * profiler/ProfileGenerator.cpp: - Replace JSValue* with JSValuePtr. - -2008-10-18 Darin Adler - - * VM/Machine.cpp: - (JSC::Machine::cti_op_call_eval): Removed stray parentheses from my - last check-in. - -2008-10-18 Darin Adler - - Reviewed by Oliver Hunt. - - - first step of https://bugs.webkit.org/show_bug.cgi?id=21732 - improve performance by eliminating JSValue as a base class for JSCell - - Remove casts from JSValue* to derived classes, replacing them with - calls to inline casting functions. These functions are also a bit - better than aidrect cast because they also do a runtime assertion. - - Removed use of 0 as for JSValue*, changing call sites to use a - noValue() function instead. - - Move things needed by classes derived from JSValue out of the class, - since the classes won't be deriving from JSValue any more soon. - - I did most of these changes by changing JSValue to not be JSValue* any - more, then fixing a lot of the compilation problems, then rolling out - the JSValue change. - - 1.011x as fast on SunSpider (presumably due to some of the Machine.cpp changes) - - * API/APICast.h: Removed unneeded forward declarations. - - * API/JSCallbackObject.h: Added an asCallbackObject function for casting. - * API/JSCallbackObjectFunctions.h: - (JSC::JSCallbackObject::asCallbackObject): Added. - (JSC::JSCallbackObject::getOwnPropertySlot): Use asObject. - (JSC::JSCallbackObject::call): Use noValue. - (JSC::JSCallbackObject::staticValueGetter): Use asCallbackObject. - (JSC::JSCallbackObject::staticFunctionGetter): Ditto. - (JSC::JSCallbackObject::callbackGetter): Ditto. - - * JavaScriptCore.exp: Updated. - - * JavaScriptCore.xcodeproj/project.pbxproj: Added RegExpMatchesArray.h. - - * VM/CTI.cpp: - (JSC::CTI::asInteger): Added. For use casting a JSValue to an integer. - (JSC::CTI::emitGetArg): Use asInteger. - (JSC::CTI::emitGetPutArg): Ditto. - (JSC::CTI::getConstantImmediateNumericArg): Ditto. Also use noValue. - (JSC::CTI::emitInitRegister): Use asInteger. - (JSC::CTI::getDeTaggedConstantImmediate): Ditto. - (JSC::CTI::compileOpCallInitializeCallFrame): Ditto. - (JSC::CTI::compileOpCall): Ditto. - (JSC::CTI::compileOpStrictEq): Ditto. - (JSC::CTI::privateCompileMainPass): Ditto. - (JSC::CTI::privateCompileGetByIdProto): Ditto. - (JSC::CTI::privateCompileGetByIdChain): Ditto. - (JSC::CTI::privateCompilePutByIdTransition): Ditto. - * VM/CTI.h: Rewrite the ARG-related macros to use C++ casts instead of - C casts and get rid of some extra parentheses. Addd declaration of - asInteger. - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitEqualityOp): Use asString. - (JSC::CodeGenerator::emitLoad): Use noValue. - (JSC::CodeGenerator::findScopedProperty): Change globalObject argument - to JSObject* instead of JSValue*. - (JSC::CodeGenerator::emitResolve): Remove unneeded cast. - (JSC::CodeGenerator::emitGetScopedVar): Use asCell. - (JSC::CodeGenerator::emitPutScopedVar): Ditto. - * VM/CodeGenerator.h: Changed out argument of findScopedProperty. - Also change the JSValueMap to use PtrHash explicitly instead of - getting it from DefaultHash. - - * VM/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::toPrimitive): Use noValue. - * VM/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::next): Ditto. - - * VM/Machine.cpp: - (JSC::fastIsNumber): Moved isImmediate check here instead of - checking for 0 inside Heap::isNumber. Use asCell and asNumberCell. - (JSC::fastToInt32): Ditto. - (JSC::fastToUInt32): Ditto. - (JSC::jsLess): Use asString. - (JSC::jsLessEq): Ditto. - (JSC::jsAdd): Ditto. - (JSC::jsTypeStringForValue): Use asObject. - (JSC::jsIsObjectType): Ditto. - (JSC::jsIsFunctionType): Ditto. - (JSC::inlineResolveBase): Use noValue. - (JSC::Machine::callEval): Use asString. Initialize result to - undefined, not 0. - (JSC::Machine::Machine): Remove unneeded casts to JSCell*. - (JSC::Machine::throwException): Use asObject. - (JSC::Machine::debug): Remove explicit calls to the DebuggerCallFrame - constructor. - (JSC::Machine::checkTimeout): Use noValue. - (JSC::cachePrototypeChain): Use asObject. - (JSC::Machine::tryCachePutByID): Use asCell. - (JSC::Machine::tryCacheGetByID): Use aCell and asObject. - (JSC::Machine::privateExecute): Use noValue, asCell, asObject, asString, - asArray, asActivation, asFunction. Changed code that creates call frames - for host functions to pass 0 for the function pointer -- the call frame - needs a JSFunction* and a host function object is not one. This was - caught by the assertions in the casting functions. Also remove some - unneeded casts in cases where two values are compared. - (JSC::Machine::retrieveLastCaller): Use noValue. - (JSC::Machine::tryCTICachePutByID): Use asCell. - (JSC::Machine::tryCTICacheGetByID): Use aCell and asObject. - (JSC::setUpThrowTrampolineReturnAddress): Added this function to restore - the PIC-branch-avoidance that was recently lost. - (JSC::Machine::cti_op_add): Use asString. - (JSC::Machine::cti_op_instanceof): Use asCell and asObject. - (JSC::Machine::cti_op_call_JSFunction): Use asFunction. - (JSC::Machine::cti_op_call_NotJSFunction): Changed code to pass 0 for - the function pointer, since we don't have a JSFunction. Use asObject. - (JSC::Machine::cti_op_tear_off_activation): Use asActivation. - (JSC::Machine::cti_op_construct_JSConstruct): Use asFunction and asObject. - (JSC::Machine::cti_op_construct_NotJSConstruct): use asObject. - (JSC::Machine::cti_op_get_by_val): Use asArray and asString. - (JSC::Machine::cti_op_resolve_func): Use asPointer; this helps prepare - us for a situation where JSValue is not a pointer. - (JSC::Machine::cti_op_put_by_val): Use asArray. - (JSC::Machine::cti_op_put_by_val_array): Ditto. - (JSC::Machine::cti_op_resolve_global): Use asGlobalObject. - (JSC::Machine::cti_op_post_inc): Change VM_CHECK_EXCEPTION_2 to - VM_CHECK_EXCEPTION_AT_END, since there's no observable work done after - that point. Also use asPointer. - (JSC::Machine::cti_op_resolve_with_base): Use asPointer. - (JSC::Machine::cti_op_post_dec): Change VM_CHECK_EXCEPTION_2 to - VM_CHECK_EXCEPTION_AT_END, since there's no observable work done after - that point. Also use asPointer. - (JSC::Machine::cti_op_call_eval): Use asObject, noValue, and change - VM_CHECK_EXCEPTION_ARG to VM_THROW_EXCEPTION_AT_END. - (JSC::Machine::cti_op_throw): Change return value to a JSValue*. - (JSC::Machine::cti_op_in): Use asObject. - (JSC::Machine::cti_op_switch_char): Use asString. - (JSC::Machine::cti_op_switch_string): Ditto. - (JSC::Machine::cti_op_put_getter): Use asObject. - (JSC::Machine::cti_op_put_setter): Ditto. - (JSC::Machine::cti_vm_throw): Change return value to a JSValue*. - Use noValue. - * VM/Machine.h: Change return values of both cti_op_throw and - cti_vm_throw to JSValue*. - - * VM/Register.h: Remove nullJSValue, which is the same thing - as noValue(). Also removed unneeded definition of JSValue. - - * kjs/ArgList.h: Removed unneeded definition of JSValue. - - * kjs/Arguments.h: - (JSC::asArguments): Added. - - * kjs/ArrayPrototype.cpp: - (JSC::getProperty): Use noValue. - (JSC::arrayProtoFuncToString): Use asArray. - (JSC::arrayProtoFuncToLocaleString): Ditto. - (JSC::arrayProtoFuncConcat): Ditto. - (JSC::arrayProtoFuncPop): Ditto. Also removed unneeded initialization - of the result, which is set in both sides of the branch. - (JSC::arrayProtoFuncPush): Ditto. - (JSC::arrayProtoFuncShift): Removed unneeded initialization - of the result, which is set in both sides of the branch. - (JSC::arrayProtoFuncSort): Use asArray. - - * kjs/BooleanObject.h: - (JSC::asBooleanObject): Added. - - * kjs/BooleanPrototype.cpp: - (JSC::booleanProtoFuncToString): Use asBooleanObject. - (JSC::booleanProtoFuncValueOf): Ditto. - - * kjs/CallData.cpp: - (JSC::call): Use asObject and asFunction. - * kjs/ConstructData.cpp: - (JSC::construct): Ditto. - - * kjs/DateConstructor.cpp: - (JSC::constructDate): Use asDateInstance. - - * kjs/DateInstance.h: - (JSC::asDateInstance): Added. - - * kjs/DatePrototype.cpp: - (JSC::dateProtoFuncToString): Use asDateInstance. - (JSC::dateProtoFuncToUTCString): Ditto. - (JSC::dateProtoFuncToDateString): Ditto. - (JSC::dateProtoFuncToTimeString): Ditto. - (JSC::dateProtoFuncToLocaleString): Ditto. - (JSC::dateProtoFuncToLocaleDateString): Ditto. - (JSC::dateProtoFuncToLocaleTimeString): Ditto. - (JSC::dateProtoFuncValueOf): Ditto. - (JSC::dateProtoFuncGetTime): Ditto. - (JSC::dateProtoFuncGetFullYear): Ditto. - (JSC::dateProtoFuncGetUTCFullYear): Ditto. - (JSC::dateProtoFuncToGMTString): Ditto. - (JSC::dateProtoFuncGetMonth): Ditto. - (JSC::dateProtoFuncGetUTCMonth): Ditto. - (JSC::dateProtoFuncGetDate): Ditto. - (JSC::dateProtoFuncGetUTCDate): Ditto. - (JSC::dateProtoFuncGetDay): Ditto. - (JSC::dateProtoFuncGetUTCDay): Ditto. - (JSC::dateProtoFuncGetHours): Ditto. - (JSC::dateProtoFuncGetUTCHours): Ditto. - (JSC::dateProtoFuncGetMinutes): Ditto. - (JSC::dateProtoFuncGetUTCMinutes): Ditto. - (JSC::dateProtoFuncGetSeconds): Ditto. - (JSC::dateProtoFuncGetUTCSeconds): Ditto. - (JSC::dateProtoFuncGetMilliSeconds): Ditto. - (JSC::dateProtoFuncGetUTCMilliseconds): Ditto. - (JSC::dateProtoFuncGetTimezoneOffset): Ditto. - (JSC::dateProtoFuncSetTime): Ditto. - (JSC::setNewValueFromTimeArgs): Ditto. - (JSC::setNewValueFromDateArgs): Ditto. - (JSC::dateProtoFuncSetYear): Ditto. - (JSC::dateProtoFuncGetYear): Ditto. - - * kjs/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::thisObject): Use asObject. - (JSC::DebuggerCallFrame::evaluate): Use noValue. - * kjs/DebuggerCallFrame.h: Added a constructor that - takes only a callFrame. - - * kjs/ExecState.h: - (JSC::ExecState::clearException): Use noValue. - - * kjs/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): Use asFunction. - (JSC::functionProtoFuncApply): Use asArguments and asArray. - - * kjs/GetterSetter.cpp: - (JSC::GetterSetter::getPrimitiveNumber): Use noValue. - - * kjs/GetterSetter.h: - (JSC::asGetterSetter): Added. - - * kjs/InternalFunction.cpp: - (JSC::InternalFunction::name): Use asString. - - * kjs/InternalFunction.h: - (JSC::asInternalFunction): Added. - - * kjs/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): Use asActivation. - - * kjs/JSActivation.h: - (JSC::asActivation): Added. - - * kjs/JSArray.cpp: - (JSC::JSArray::putSlowCase): Use noValue. - (JSC::JSArray::deleteProperty): Ditto. - (JSC::JSArray::increaseVectorLength): Ditto. - (JSC::JSArray::setLength): Ditto. - (JSC::JSArray::pop): Ditto. - (JSC::JSArray::sort): Ditto. - (JSC::JSArray::compactForSorting): Ditto. - * kjs/JSArray.h: - (JSC::asArray): Added. - - * kjs/JSCell.cpp: - (JSC::JSCell::getJSNumber): Use noValue. - - * kjs/JSCell.h: - (JSC::asCell): Added. - (JSC::JSValue::asCell): Changed to not preserve const. - Given the wide use of JSValue* and JSCell*, it's not - really useful to use const. - (JSC::JSValue::isNumber): Use asValue. - (JSC::JSValue::isString): Ditto. - (JSC::JSValue::isGetterSetter): Ditto. - (JSC::JSValue::isObject): Ditto. - (JSC::JSValue::getNumber): Ditto. - (JSC::JSValue::getString): Ditto. - (JSC::JSValue::getObject): Ditto. - (JSC::JSValue::getCallData): Ditto. - (JSC::JSValue::getConstructData): Ditto. - (JSC::JSValue::getUInt32): Ditto. - (JSC::JSValue::getTruncatedInt32): Ditto. - (JSC::JSValue::getTruncatedUInt32): Ditto. - (JSC::JSValue::mark): Ditto. - (JSC::JSValue::marked): Ditto. - (JSC::JSValue::toPrimitive): Ditto. - (JSC::JSValue::getPrimitiveNumber): Ditto. - (JSC::JSValue::toBoolean): Ditto. - (JSC::JSValue::toNumber): Ditto. - (JSC::JSValue::toString): Ditto. - (JSC::JSValue::toObject): Ditto. - (JSC::JSValue::toThisObject): Ditto. - (JSC::JSValue::needsThisConversion): Ditto. - (JSC::JSValue::toThisString): Ditto. - (JSC::JSValue::getJSNumber): Ditto. - - * kjs/JSFunction.cpp: - (JSC::JSFunction::argumentsGetter): Use asFunction. - (JSC::JSFunction::callerGetter): Ditto. - (JSC::JSFunction::lengthGetter): Ditto. - (JSC::JSFunction::construct): Use asObject. - - * kjs/JSFunction.h: - (JSC::asFunction): Added. - - * kjs/JSGlobalObject.cpp: - (JSC::lastInPrototypeChain): Use asObject. - - * kjs/JSGlobalObject.h: - (JSC::asGlobalObject): Added. - (JSC::ScopeChainNode::globalObject): Use asGlobalObject. - - * kjs/JSImmediate.h: Added noValue, asPointer, and makeValue - functions. Use rawValue, makeValue, and noValue consistently - instead of doing reinterpret_cast in various functions. - - * kjs/JSNumberCell.h: - (JSC::asNumberCell): Added. - (JSC::JSValue::uncheckedGetNumber): Use asValue and asNumberCell. - (JSC::JSValue::toJSNumber): Use asValue. - - * kjs/JSObject.cpp: - (JSC::JSObject::put): Use asObject and asGetterSetter. - (JSC::callDefaultValueFunction): Use noValue. - (JSC::JSObject::defineGetter): Use asGetterSetter. - (JSC::JSObject::defineSetter): Ditto. - (JSC::JSObject::lookupGetter): Ditto. Also use asObject. - (JSC::JSObject::lookupSetter): Ditto. - (JSC::JSObject::hasInstance): Use asObject. - (JSC::JSObject::fillGetterPropertySlot): Use asGetterSetter. - - * kjs/JSObject.h: - (JSC::JSObject::getDirect): Use noValue. - (JSC::asObject): Added. - (JSC::JSValue::isObject): Use asValue. - (JSC::JSObject::get): Removed unneeded const_cast. - (JSC::JSObject::getPropertySlot): Use asObject. - (JSC::JSValue::get): Removed unneeded const_cast. - Use asValue, asCell, and asObject. - (JSC::JSValue::put): Ditto. - (JSC::JSObject::allocatePropertyStorageInline): Fixed spelling - of "oldPropertStorage". - - * kjs/JSString.cpp: - (JSC::JSString::getOwnPropertySlot): Use asObject. - - * kjs/JSString.h: - (JSC::asString): Added. - (JSC::JSValue::toThisJSString): Use asValue. - - * kjs/JSValue.h: Make PreferredPrimitiveType a top level enum - instead of a member of JSValue. Added an asValue function that - returns this. Removed overload of asCell for const. Use asValue - instead of getting right at this. - - * kjs/ObjectPrototype.cpp: - (JSC::objectProtoFuncIsPrototypeOf): Use asObject. - (JSC::objectProtoFuncDefineGetter): Ditto. - (JSC::objectProtoFuncDefineSetter): Ditto. - - * kjs/PropertySlot.h: - (JSC::PropertySlot::PropertySlot): Take a const JSValue* so the - callers don't have to worry about const. - (JSC::PropertySlot::clearBase): Use noValue. - (JSC::PropertySlot::clearValue): Ditto. - - * kjs/RegExpConstructor.cpp: - (JSC::regExpConstructorDollar1): Use asRegExpConstructor. - (JSC::regExpConstructorDollar2): Ditto. - (JSC::regExpConstructorDollar3): Ditto. - (JSC::regExpConstructorDollar4): Ditto. - (JSC::regExpConstructorDollar5): Ditto. - (JSC::regExpConstructorDollar6): Ditto. - (JSC::regExpConstructorDollar7): Ditto. - (JSC::regExpConstructorDollar8): Ditto. - (JSC::regExpConstructorDollar9): Ditto. - (JSC::regExpConstructorInput): Ditto. - (JSC::regExpConstructorMultiline): Ditto. - (JSC::regExpConstructorLastMatch): Ditto. - (JSC::regExpConstructorLastParen): Ditto. - (JSC::regExpConstructorLeftContext): Ditto. - (JSC::regExpConstructorRightContext): Ditto. - (JSC::setRegExpConstructorInput): Ditto. - (JSC::setRegExpConstructorMultiline): Ditto. - (JSC::constructRegExp): Use asObject. - - * kjs/RegExpConstructor.h: - (JSC::asRegExpConstructor): Added. - - * kjs/RegExpObject.cpp: - (JSC::regExpObjectGlobal): Use asRegExpObject. - (JSC::regExpObjectIgnoreCase): Ditto. - (JSC::regExpObjectMultiline): Ditto. - (JSC::regExpObjectSource): Ditto. - (JSC::regExpObjectLastIndex): Ditto. - (JSC::setRegExpObjectLastIndex): Ditto. - (JSC::callRegExpObject): Ditto. - - * kjs/RegExpObject.h: - (JSC::asRegExpObject): Added. - - * kjs/RegExpPrototype.cpp: - (JSC::regExpProtoFuncTest): Use asRegExpObject. - (JSC::regExpProtoFuncExec): Ditto. - (JSC::regExpProtoFuncCompile): Ditto. - (JSC::regExpProtoFuncToString): Ditto. - - * kjs/StringObject.h: - (JSC::StringObject::internalValue): Use asString. - (JSC::asStringObject): Added. - - * kjs/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): Use asRegExpObject. - (JSC::stringProtoFuncToString): Ue asStringObject. - (JSC::stringProtoFuncMatch): Use asRegExpObject. - (JSC::stringProtoFuncSearch): Ditto. - (JSC::stringProtoFuncSplit): Ditto. - - * kjs/StructureID.cpp: - (JSC::StructureID::getEnumerablePropertyNames): Use asObject. - (JSC::StructureID::createCachedPrototypeChain): Ditto. - (JSC::StructureIDChain::StructureIDChain): Use asCell and asObject. - - * kjs/collector.h: - (JSC::Heap::isNumber): Removed null handling. This can only be called - on valid cells. - (JSC::Heap::cellBlock): Removed overload for const and non-const. - Whether the JSCell* is const or not really should have no effect on - whether you can modify the collector block it's in. - - * kjs/interpreter.cpp: - (JSC::Interpreter::evaluate): Use noValue and noObject. - - * kjs/nodes.cpp: - (JSC::FunctionCallResolveNode::emitCode): Use JSObject for the global - object rather than JSValue. - (JSC::PostfixResolveNode::emitCode): Ditto. - (JSC::PrefixResolveNode::emitCode): Ditto. - (JSC::ReadModifyResolveNode::emitCode): Ditto. - (JSC::AssignResolveNode::emitCode): Ditto. - - * kjs/operations.h: - (JSC::equalSlowCaseInline): Use asString, asCell, asNumberCell, - (JSC::strictEqualSlowCaseInline): Ditto. - -2008-10-18 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 21702: Special op_create_activation for the case where there are no named parameters - - - This is a 2.5% speedup on the V8 Raytrace benchmark and a 1.1% speedup - on the V8 Earley-Boyer benchmark. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - * VM/Machine.cpp: - (JSC::Machine::cti_op_create_arguments_no_params): - * VM/Machine.h: - * kjs/Arguments.h: - (JSC::Arguments::): - (JSC::Arguments::Arguments): - -2008-10-17 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - in debug builds, alter the stack to avoid blowing out MallocStackLogging - - (In essence, while executing a CTI function we alter the return - address to jscGeneratedNativeCode so that a single consistent - function is on the stack instead of many random functions without - symbols.) - - * VM/CTI.h: - * VM/Machine.cpp: - (JSC::doSetReturnAddress): - (JSC::): - (JSC::StackHack::StackHack): - (JSC::StackHack::~StackHack): - (JSC::Machine::cti_op_convert_this): - (JSC::Machine::cti_op_end): - (JSC::Machine::cti_op_add): - (JSC::Machine::cti_op_pre_inc): - (JSC::Machine::cti_timeout_check): - (JSC::Machine::cti_register_file_check): - (JSC::Machine::cti_op_loop_if_less): - (JSC::Machine::cti_op_loop_if_lesseq): - (JSC::Machine::cti_op_new_object): - (JSC::Machine::cti_op_put_by_id): - (JSC::Machine::cti_op_put_by_id_second): - (JSC::Machine::cti_op_put_by_id_generic): - (JSC::Machine::cti_op_put_by_id_fail): - (JSC::Machine::cti_op_get_by_id): - (JSC::Machine::cti_op_get_by_id_second): - (JSC::Machine::cti_op_get_by_id_generic): - (JSC::Machine::cti_op_get_by_id_fail): - (JSC::Machine::cti_op_instanceof): - (JSC::Machine::cti_op_del_by_id): - (JSC::Machine::cti_op_mul): - (JSC::Machine::cti_op_new_func): - (JSC::Machine::cti_op_call_profiler): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_vm_lazyLinkCall): - (JSC::Machine::cti_vm_compile): - (JSC::Machine::cti_op_push_activation): - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_create_arguments): - (JSC::Machine::cti_op_tear_off_activation): - (JSC::Machine::cti_op_tear_off_arguments): - (JSC::Machine::cti_op_ret_profiler): - (JSC::Machine::cti_op_ret_scopeChain): - (JSC::Machine::cti_op_new_array): - (JSC::Machine::cti_op_resolve): - (JSC::Machine::cti_op_construct_JSConstructFast): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_construct_NotJSConstruct): - (JSC::Machine::cti_op_get_by_val): - (JSC::Machine::cti_op_resolve_func): - (JSC::Machine::cti_op_sub): - (JSC::Machine::cti_op_put_by_val): - (JSC::Machine::cti_op_put_by_val_array): - (JSC::Machine::cti_op_lesseq): - (JSC::Machine::cti_op_loop_if_true): - (JSC::Machine::cti_op_negate): - (JSC::Machine::cti_op_resolve_base): - (JSC::Machine::cti_op_resolve_skip): - (JSC::Machine::cti_op_resolve_global): - (JSC::Machine::cti_op_div): - (JSC::Machine::cti_op_pre_dec): - (JSC::Machine::cti_op_jless): - (JSC::Machine::cti_op_not): - (JSC::Machine::cti_op_jtrue): - (JSC::Machine::cti_op_post_inc): - (JSC::Machine::cti_op_eq): - (JSC::Machine::cti_op_lshift): - (JSC::Machine::cti_op_bitand): - (JSC::Machine::cti_op_rshift): - (JSC::Machine::cti_op_bitnot): - (JSC::Machine::cti_op_resolve_with_base): - (JSC::Machine::cti_op_new_func_exp): - (JSC::Machine::cti_op_mod): - (JSC::Machine::cti_op_less): - (JSC::Machine::cti_op_neq): - (JSC::Machine::cti_op_post_dec): - (JSC::Machine::cti_op_urshift): - (JSC::Machine::cti_op_bitxor): - (JSC::Machine::cti_op_new_regexp): - (JSC::Machine::cti_op_bitor): - (JSC::Machine::cti_op_call_eval): - (JSC::Machine::cti_op_throw): - (JSC::Machine::cti_op_get_pnames): - (JSC::Machine::cti_op_next_pname): - (JSC::Machine::cti_op_push_scope): - (JSC::Machine::cti_op_pop_scope): - (JSC::Machine::cti_op_typeof): - (JSC::Machine::cti_op_is_undefined): - (JSC::Machine::cti_op_is_boolean): - (JSC::Machine::cti_op_is_number): - (JSC::Machine::cti_op_is_string): - (JSC::Machine::cti_op_is_object): - (JSC::Machine::cti_op_is_function): - (JSC::Machine::cti_op_stricteq): - (JSC::Machine::cti_op_nstricteq): - (JSC::Machine::cti_op_to_jsnumber): - (JSC::Machine::cti_op_in): - (JSC::Machine::cti_op_push_new_scope): - (JSC::Machine::cti_op_jmp_scopes): - (JSC::Machine::cti_op_put_by_index): - (JSC::Machine::cti_op_switch_imm): - (JSC::Machine::cti_op_switch_char): - (JSC::Machine::cti_op_switch_string): - (JSC::Machine::cti_op_del_by_val): - (JSC::Machine::cti_op_put_getter): - (JSC::Machine::cti_op_put_setter): - (JSC::Machine::cti_op_new_error): - (JSC::Machine::cti_op_debug): - (JSC::Machine::cti_vm_throw): - -2008-10-17 Gavin Barraclough - - Optimize op_call by allowing call sites to be directly linked to callees. - - For the hot path of op_call, CTI now generates a check (initially for an impossible - value), and the first time the call is executed we attempt to link the call directly - to the callee. We can currently only do so if the arity of the caller and callee - match. The (optimized) setup for the call on the hot path is linked directly to - the ctiCode for the callee, without indirection. - - Two forms of the slow case of the call are generated, the first will be executed the - first time the call is reached. As well as this path attempting to link the call to - a callee, it also relinks the slow case to a second slow case, which will not continue - to attempt relinking the call. (This policy could be changed in future, but for not - this is intended to prevent thrashing). - - If a callee that the caller has been linked to is garbage collected, then the link - in the caller's JIt code will be reset back to a value that cannot match - to prevent - any false positive matches. - - ~20% progression on deltablue & richards, >12% overall reduction in v8-tests - runtime, one or two percent progression on sunspider. - - Reviewed by Oliver Hunt. - - * VM/CTI.cpp: - (JSC::): - (JSC::CTI::emitNakedCall): - (JSC::unreachable): - (JSC::CTI::compileOpCallInitializeCallFrame): - (JSC::CTI::compileOpCallSetupArgs): - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::unlinkCall): - (JSC::CTI::linkCall): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - (JSC::CodeBlock::unlinkCallers): - (JSC::CodeBlock::derefStructureIDs): - * VM/CodeBlock.h: - (JSC::StructureStubInfo::StructureStubInfo): - (JSC::CallLinkInfo::CallLinkInfo): - (JSC::CodeBlock::addCaller): - (JSC::CodeBlock::removeCaller): - (JSC::CodeBlock::getStubInfo): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitCall): - (JSC::CodeGenerator::emitConstruct): - * VM/Machine.cpp: - (JSC::Machine::cti_op_call_profiler): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_vm_lazyLinkCall): - (JSC::Machine::cti_op_construct_JSConstructFast): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_construct_NotJSConstruct): - * VM/Machine.h: - * kjs/JSFunction.cpp: - (JSC::JSFunction::~JSFunction): - * kjs/JSFunction.h: - * kjs/nodes.h: - (JSC::FunctionBodyNode::): - * masm/X86Assembler.h: - (JSC::X86Assembler::getDifferenceBetweenLabels): - -2008-10-17 Maciej Stachowiak - - Reviewed by Geoff Garen. - - - remove ASSERT that makes the leaks buildbot cry - - * kjs/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - -2008-10-17 Maciej Stachowiak - - Reviewed by Cameron Zwarich - - - don't bother to do arguments tearoff when it will have no effect - - ~1% on v8 raytrace - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitReturn): - -2008-10-17 Marco Barisione - - Reviewed by Sam Weinig. Landed by Jan Alonzo. - - https://bugs.webkit.org/show_bug.cgi?id=21603 - [GTK] Minor fixes to GOwnPtr - - * wtf/GOwnPtr.cpp: - (WTF::GError): - (WTF::GList): - (WTF::GCond): - (WTF::GMutex): - (WTF::GPatternSpec): - (WTF::GDir): - * wtf/GOwnPtr.h: - (WTF::freeOwnedGPtr): - (WTF::GOwnPtr::~GOwnPtr): - (WTF::GOwnPtr::outPtr): - (WTF::GOwnPtr::set): - (WTF::GOwnPtr::clear): - * wtf/Threading.h: - -2008-10-17 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - speed up transitions that resize the property storage a fair bit - - ~3% speedup on v8 RayTrace benchmark, ~1% on DeltaBlue - - * VM/CTI.cpp: - (JSC::resizePropertyStorage): renamed from transitionObject, and reduced to just resize - the object's property storage with one inline call. - (JSC::CTI::privateCompilePutByIdTransition): Use a separate function for property storage - resize, but still do all the rest of the work in assembly in that case, and pass the known - compile-time constants of old and new size rather than structureIDs, saving a bunch of - redundant memory access. - * kjs/JSObject.cpp: - (JSC::JSObject::allocatePropertyStorage): Just call the inline version. - * kjs/JSObject.h: - (JSC::JSObject::allocatePropertyStorageInline): Inline version of allocatePropertyStorage - * masm/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::pushl_i32): Add code to assmeble push of a constant; code originally by Cameron Zwarich. - -2008-10-17 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Remove some C style casts. - - * masm/X86Assembler.h: - (JSC::JITCodeBuffer::putIntUnchecked): - (JSC::X86Assembler::link): - (JSC::X86Assembler::linkAbsoluteAddress): - (JSC::X86Assembler::getRelocatedAddress): - -2008-10-17 Cameron Zwarich - - Rubber-stamped by Maciej Stachowiak. - - Remove some C style casts. - - * VM/CTI.cpp: - (JSC::CTI::patchGetByIdSelf): - (JSC::CTI::patchPutByIdReplace): - * VM/Machine.cpp: - (JSC::Machine::tryCTICachePutByID): - (JSC::Machine::tryCTICacheGetByID): - (JSC::Machine::cti_op_put_by_id): - (JSC::Machine::cti_op_put_by_id_fail): - (JSC::Machine::cti_op_get_by_id): - (JSC::Machine::cti_op_get_by_id_fail): - -2008-10-17 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - Avoid restoring the caller's 'r' value in op_ret - https://bugs.webkit.org/show_bug.cgi?id=21319 - - This patch stops writing the call frame at call and return points; - instead it does so immediately before any CTI call. - - 0.5% speedup or so on the v8 benchmark - - * VM/CTI.cpp: - (JSC::CTI::emitCTICall): - (JSC::CTI::compileOpCall): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - * VM/CTI.h: - -2008-10-17 Cameron Zwarich - - Reviewed by Sam Weinig. - - Make WREC require CTI because it won't actually compile otherwise. - - * wtf/Platform.h: - -2008-10-16 Maciej Stachowiak - - Reviewed by Geoff Garen. - - - fixed JavaScriptCore should not force building with gcc 4.0 - - use gcc 4.2 when building with Xcode 3.1 or newer on Leopard, even though this is not the default - - This time there is no performance regression; we can avoid having - to use the fastcall calling convention for CTI functions by using - varargs to prevent the compiler from moving things around on the - stack. - - * Configurations/DebugRelease.xcconfig: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CTI.cpp: - * VM/Machine.h: - * wtf/Platform.h: - -2008-10-16 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - - fix for REGRESSION: r37631 causing crashes on buildbot - https://bugs.webkit.org/show_bug.cgi?id=21682 - - * kjs/collector.cpp: - (JSC::Heap::collect): Avoid crashing when a GC occurs while no global objects are live. - -2008-10-16 Sam Weinig - - Reviewed by Maciej Stachowiak. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=21683 - Don't create intermediate StructureIDs for builtin objects - - First step in reduce number of StructureIDs created when initializing the - JSGlobalObject. - - - In order to avoid creating the intermediate StructureIDs use the new putDirectWithoutTransition - and putDirectFunctionWithoutTransition to add properties to JSObjects without transitioning - the StructureID. This patch just implements this strategy for ObjectPrototype but alone - reduces the number of StructureIDs create for about:blank by 10, from 142 to 132. - - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - * kjs/JSObject.cpp: - (JSC::JSObject::putDirectFunctionWithoutTransition): - * kjs/JSObject.h: - (JSC::JSObject::putDirectWithoutTransition): - * kjs/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): - * kjs/ObjectPrototype.h: - * kjs/StructureID.cpp: - (JSC::StructureID::addPropertyWithoutTransition): - * kjs/StructureID.h: - -2008-10-16 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - fix for: REGRESSION: over 100 StructureIDs leak loading about:blank (result of fix for bug 21633) - - Apparent slight progression (< 0.5%) on v8 benchmarks and SunSpider. - - * kjs/StructureID.cpp: - (JSC::StructureID::~StructureID): Don't deref this object's parent's pointer to - itself from the destructor; that doesn't even make sense. - (JSC::StructureID::addPropertyTransition): Don't refer the single transition; - the rule is that parent StructureIDs are ref'd but child ones are not. Refing - the child creates a cycle. - -2008-10-15 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=21609 - Make MessagePorts protect their peers across heaps - - * JavaScriptCore.exp: - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::markCrossHeapDependentObjects): - * kjs/JSGlobalObject.h: - * kjs/collector.cpp: - (JSC::Heap::collect): - Before GC sweep phase, a function supplied by global object is now called for all global - objects in the heap, making it possible to implement cross-heap dependencies. - -2008-10-15 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=21610 - run-webkit-threads --threaded crashes in StructureID destructor - - * kjs/StructureID.cpp: - (JSC::StructureID::StructureID): - (JSC::StructureID::~StructureID): - Protect access to a static (debug-only) HashSet with a lock. - -2008-10-15 Sam Weinig - - Reviewed by Goeffrey Garen. - - Add function to dump statistics for StructureIDs. - - * kjs/StructureID.cpp: - (JSC::StructureID::dumpStatistics): - (JSC::StructureID::StructureID): - (JSC::StructureID::~StructureID): - * kjs/StructureID.h: - -2008-10-15 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 21633: Avoid using a HashMap when there is only a single transition - - - This is a 0.8% speedup on SunSpider and between a 0.5% and 1.0% speedup - on the V8 benchmark suite, depending on which harness we use. It will - also slightly reduce the memory footprint of a StructureID. - - * kjs/StructureID.cpp: - (JSC::StructureID::StructureID): - (JSC::StructureID::~StructureID): - (JSC::StructureID::addPropertyTransition): - * kjs/StructureID.h: - (JSC::StructureID::): - -2008-10-15 Csaba Osztrogonac - - Reviewed by Geoffrey Garen. - - 1.40% speedup on SunSpider, 1.44% speedup on V8. (Linux) - - No change on Mac. - - * VM/Machine.cpp: - (JSC::fastIsNumber): ALWAYS_INLINE modifier added. - -2008-10-15 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=21345 - Start the debugger without reloading the inspected page - - * JavaScriptCore.exp: New symbols. - * JavaScriptCore.xcodeproj/project.pbxproj: New files. - - * VM/CodeBlock.h: - (JSC::EvalCodeCache::get): Updated for tweak to parsing API. - - * kjs/CollectorHeapIterator.h: Added. An iterator for the object heap, - which we use to find all the live functions and recompile them. - - * kjs/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): Updated for tweak to parsing API. - - * kjs/FunctionConstructor.cpp: - (JSC::constructFunction): Updated for tweak to parsing API. - - * kjs/JSFunction.cpp: - (JSC::JSFunction::JSFunction): Try to validate our SourceCode in debug - builds by ASSERTing that it's syntactically valid. This doesn't catch - all SourceCode bugs, but it catches a lot of them. - - * kjs/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): Updated for tweak to parsing API. - - * kjs/Parser.cpp: - (JSC::Parser::parse): - * kjs/Parser.h: - (JSC::Parser::parse): Tweaked the parser to make it possible to parse - without an ExecState, and to allow the client to specify a debugger to - notify (or not) about the source we parse. This allows the inspector - to recompile even though no JavaScript is executing, then notify the - debugger about all source code when it's done. - - * kjs/Shell.cpp: - (prettyPrintScript): Updated for tweak to parsing API. - - * kjs/SourceRange.h: - (JSC::SourceCode::isNull): Added to help with ASSERTs. - - * kjs/collector.cpp: - (JSC::Heap::heapAllocate): - (JSC::Heap::sweep): - (JSC::Heap::primaryHeapBegin): - (JSC::Heap::primaryHeapEnd): - * kjs/collector.h: - (JSC::): Moved a bunch of declarations around to enable compilation of - CollectorHeapIterator. - - * kjs/interpreter.cpp: - (JSC::Interpreter::checkSyntax): - (JSC::Interpreter::evaluate): Updated for tweak to parsing API. - - * kjs/lexer.h: - (JSC::Lexer::sourceCode): BUG FIX: Calculate SourceCode ranges relative - to the SourceCode range in which we're lexing, otherwise nested functions - that are compiled individually get SourceCode ranges that don't reflect - their nesting. - - * kjs/nodes.cpp: - (JSC::FunctionBodyNode::FunctionBodyNode): - (JSC::FunctionBodyNode::finishParsing): - (JSC::FunctionBodyNode::create): - (JSC::FunctionBodyNode::copyParameters): - * kjs/nodes.h: - (JSC::ScopeNode::setSource): - (JSC::FunctionBodyNode::parameterCount): Added some helper functions for - copying one FunctionBodyNode's parameters to another. The recompiler uses - these when calling "finishParsing". - -2008-10-15 Joerg Bornemann - - Reviewed by Darin Adler. - - - part of https://bugs.webkit.org/show_bug.cgi?id=20746 - Fix compilation on Windows CE. - - str(n)icmp, strdup and vsnprintf are not available on Windows CE, - they are called _str(n)icmp, etc. instead - - * wtf/StringExtras.h: Added inline function implementations. - -2008-10-15 Gabor Loki - - Reviewed by Cameron Zwarich. - - - Use simple uint32_t multiplication on op_mul if both operands are - immediate number and they are between zero and 0x7FFF. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - -2008-10-09 Darin Fisher - - Reviewed by Sam Weinig. - - Make pan scrolling a platform configurable option. - https://bugs.webkit.org/show_bug.cgi?id=21515 - - * wtf/Platform.h: Add ENABLE_PAN_SCROLLING - -2008-10-14 Maciej Stachowiak - - Rubber stamped by Sam Weinig. - - - revert r37572 and r37581 for now - - Turns out GCC 4.2 is still a (small) regression, we'll have to do - more work to turn it on. - - * Configurations/DebugRelease.xcconfig: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CTI.cpp: - * VM/CTI.h: - * VM/Machine.cpp: - (JSC::Machine::cti_op_convert_this): - (JSC::Machine::cti_op_end): - (JSC::Machine::cti_op_add): - (JSC::Machine::cti_op_pre_inc): - (JSC::Machine::cti_timeout_check): - (JSC::Machine::cti_register_file_check): - (JSC::Machine::cti_op_loop_if_less): - (JSC::Machine::cti_op_loop_if_lesseq): - (JSC::Machine::cti_op_new_object): - (JSC::Machine::cti_op_put_by_id): - (JSC::Machine::cti_op_put_by_id_second): - (JSC::Machine::cti_op_put_by_id_generic): - (JSC::Machine::cti_op_put_by_id_fail): - (JSC::Machine::cti_op_get_by_id): - (JSC::Machine::cti_op_get_by_id_second): - (JSC::Machine::cti_op_get_by_id_generic): - (JSC::Machine::cti_op_get_by_id_fail): - (JSC::Machine::cti_op_instanceof): - (JSC::Machine::cti_op_del_by_id): - (JSC::Machine::cti_op_mul): - (JSC::Machine::cti_op_new_func): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_vm_compile): - (JSC::Machine::cti_op_push_activation): - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_create_arguments): - (JSC::Machine::cti_op_tear_off_activation): - (JSC::Machine::cti_op_tear_off_arguments): - (JSC::Machine::cti_op_ret_profiler): - (JSC::Machine::cti_op_ret_scopeChain): - (JSC::Machine::cti_op_new_array): - (JSC::Machine::cti_op_resolve): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_construct_NotJSConstruct): - (JSC::Machine::cti_op_get_by_val): - (JSC::Machine::cti_op_resolve_func): - (JSC::Machine::cti_op_sub): - (JSC::Machine::cti_op_put_by_val): - (JSC::Machine::cti_op_put_by_val_array): - (JSC::Machine::cti_op_lesseq): - (JSC::Machine::cti_op_loop_if_true): - (JSC::Machine::cti_op_negate): - (JSC::Machine::cti_op_resolve_base): - (JSC::Machine::cti_op_resolve_skip): - (JSC::Machine::cti_op_resolve_global): - (JSC::Machine::cti_op_div): - (JSC::Machine::cti_op_pre_dec): - (JSC::Machine::cti_op_jless): - (JSC::Machine::cti_op_not): - (JSC::Machine::cti_op_jtrue): - (JSC::Machine::cti_op_post_inc): - (JSC::Machine::cti_op_eq): - (JSC::Machine::cti_op_lshift): - (JSC::Machine::cti_op_bitand): - (JSC::Machine::cti_op_rshift): - (JSC::Machine::cti_op_bitnot): - (JSC::Machine::cti_op_resolve_with_base): - (JSC::Machine::cti_op_new_func_exp): - (JSC::Machine::cti_op_mod): - (JSC::Machine::cti_op_less): - (JSC::Machine::cti_op_neq): - (JSC::Machine::cti_op_post_dec): - (JSC::Machine::cti_op_urshift): - (JSC::Machine::cti_op_bitxor): - (JSC::Machine::cti_op_new_regexp): - (JSC::Machine::cti_op_bitor): - (JSC::Machine::cti_op_call_eval): - (JSC::Machine::cti_op_throw): - (JSC::Machine::cti_op_get_pnames): - (JSC::Machine::cti_op_next_pname): - (JSC::Machine::cti_op_push_scope): - (JSC::Machine::cti_op_pop_scope): - (JSC::Machine::cti_op_typeof): - (JSC::Machine::cti_op_is_undefined): - (JSC::Machine::cti_op_is_boolean): - (JSC::Machine::cti_op_is_number): - (JSC::Machine::cti_op_is_string): - (JSC::Machine::cti_op_is_object): - (JSC::Machine::cti_op_is_function): - (JSC::Machine::cti_op_stricteq): - (JSC::Machine::cti_op_nstricteq): - (JSC::Machine::cti_op_to_jsnumber): - (JSC::Machine::cti_op_in): - (JSC::Machine::cti_op_push_new_scope): - (JSC::Machine::cti_op_jmp_scopes): - (JSC::Machine::cti_op_put_by_index): - (JSC::Machine::cti_op_switch_imm): - (JSC::Machine::cti_op_switch_char): - (JSC::Machine::cti_op_switch_string): - (JSC::Machine::cti_op_del_by_val): - (JSC::Machine::cti_op_put_getter): - (JSC::Machine::cti_op_put_setter): - (JSC::Machine::cti_op_new_error): - (JSC::Machine::cti_op_debug): - (JSC::Machine::cti_vm_throw): - * VM/Machine.h: - * masm/X86Assembler.h: - (JSC::X86Assembler::emitRestoreArgumentReference): - (JSC::X86Assembler::emitRestoreArgumentReferenceForTrampoline): - * wtf/Platform.h: - -2008-10-14 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=20256 - Array.push and other standard methods disappear - - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::~JSGlobalData): - Don't use static hash tables even on platforms that don't enable JSC_MULTIPLE_THREADS - - these tables reference IdentifierTable, which is always per-GlobalData. - -2008-10-14 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - always use CTI_ARGUMENTS and CTI_ARGUMENTS_FASTCALL - - This is a small regression for GCC 4.0, but simplifies the code - for future improvements and lets us focus on GCC 4.2+ and MSVC. - - * VM/CTI.cpp: - * VM/CTI.h: - * VM/Machine.cpp: - (JSC::Machine::cti_op_convert_this): - (JSC::Machine::cti_op_end): - (JSC::Machine::cti_op_add): - (JSC::Machine::cti_op_pre_inc): - (JSC::Machine::cti_timeout_check): - (JSC::Machine::cti_register_file_check): - (JSC::Machine::cti_op_loop_if_less): - (JSC::Machine::cti_op_loop_if_lesseq): - (JSC::Machine::cti_op_new_object): - (JSC::Machine::cti_op_put_by_id): - (JSC::Machine::cti_op_put_by_id_second): - (JSC::Machine::cti_op_put_by_id_generic): - (JSC::Machine::cti_op_put_by_id_fail): - (JSC::Machine::cti_op_get_by_id): - (JSC::Machine::cti_op_get_by_id_second): - (JSC::Machine::cti_op_get_by_id_generic): - (JSC::Machine::cti_op_get_by_id_fail): - (JSC::Machine::cti_op_instanceof): - (JSC::Machine::cti_op_del_by_id): - (JSC::Machine::cti_op_mul): - (JSC::Machine::cti_op_new_func): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_vm_compile): - (JSC::Machine::cti_op_push_activation): - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_create_arguments): - (JSC::Machine::cti_op_tear_off_activation): - (JSC::Machine::cti_op_tear_off_arguments): - (JSC::Machine::cti_op_ret_profiler): - (JSC::Machine::cti_op_ret_scopeChain): - (JSC::Machine::cti_op_new_array): - (JSC::Machine::cti_op_resolve): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_construct_NotJSConstruct): - (JSC::Machine::cti_op_get_by_val): - (JSC::Machine::cti_op_resolve_func): - (JSC::Machine::cti_op_sub): - (JSC::Machine::cti_op_put_by_val): - (JSC::Machine::cti_op_put_by_val_array): - (JSC::Machine::cti_op_lesseq): - (JSC::Machine::cti_op_loop_if_true): - (JSC::Machine::cti_op_negate): - (JSC::Machine::cti_op_resolve_base): - (JSC::Machine::cti_op_resolve_skip): - (JSC::Machine::cti_op_resolve_global): - (JSC::Machine::cti_op_div): - (JSC::Machine::cti_op_pre_dec): - (JSC::Machine::cti_op_jless): - (JSC::Machine::cti_op_not): - (JSC::Machine::cti_op_jtrue): - (JSC::Machine::cti_op_post_inc): - (JSC::Machine::cti_op_eq): - (JSC::Machine::cti_op_lshift): - (JSC::Machine::cti_op_bitand): - (JSC::Machine::cti_op_rshift): - (JSC::Machine::cti_op_bitnot): - (JSC::Machine::cti_op_resolve_with_base): - (JSC::Machine::cti_op_new_func_exp): - (JSC::Machine::cti_op_mod): - (JSC::Machine::cti_op_less): - (JSC::Machine::cti_op_neq): - (JSC::Machine::cti_op_post_dec): - (JSC::Machine::cti_op_urshift): - (JSC::Machine::cti_op_bitxor): - (JSC::Machine::cti_op_new_regexp): - (JSC::Machine::cti_op_bitor): - (JSC::Machine::cti_op_call_eval): - (JSC::Machine::cti_op_throw): - (JSC::Machine::cti_op_get_pnames): - (JSC::Machine::cti_op_next_pname): - (JSC::Machine::cti_op_push_scope): - (JSC::Machine::cti_op_pop_scope): - (JSC::Machine::cti_op_typeof): - (JSC::Machine::cti_op_is_undefined): - (JSC::Machine::cti_op_is_boolean): - (JSC::Machine::cti_op_is_number): - (JSC::Machine::cti_op_is_string): - (JSC::Machine::cti_op_is_object): - (JSC::Machine::cti_op_is_function): - (JSC::Machine::cti_op_stricteq): - (JSC::Machine::cti_op_nstricteq): - (JSC::Machine::cti_op_to_jsnumber): - (JSC::Machine::cti_op_in): - (JSC::Machine::cti_op_push_new_scope): - (JSC::Machine::cti_op_jmp_scopes): - (JSC::Machine::cti_op_put_by_index): - (JSC::Machine::cti_op_switch_imm): - (JSC::Machine::cti_op_switch_char): - (JSC::Machine::cti_op_switch_string): - (JSC::Machine::cti_op_del_by_val): - (JSC::Machine::cti_op_put_getter): - (JSC::Machine::cti_op_put_setter): - (JSC::Machine::cti_op_new_error): - (JSC::Machine::cti_op_debug): - (JSC::Machine::cti_vm_throw): - * VM/Machine.h: - * masm/X86Assembler.h: - (JSC::X86Assembler::emitRestoreArgumentReference): - (JSC::X86Assembler::emitRestoreArgumentReferenceForTrampoline): - * wtf/Platform.h: - -2008-10-13 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - make Machine::getArgumentsData an Arguments method and inline it - - ~2% on v8 raytrace - - * VM/Machine.cpp: - * kjs/Arguments.h: - (JSC::Machine::getArgumentsData): - -2008-10-13 Alp Toker - - Fix autotools dist build target by listing recently added header - files only. Not reviewed. - - * GNUmakefile.am: - -2008-10-13 Maciej Stachowiak - - Rubber stamped by Mark Rowe. - - - fixed JavaScriptCore should not force building with gcc 4.0 - - use gcc 4.2 when building with Xcode 3.1 or newer on Leopard, even though this is not the default - - * Configurations/DebugRelease.xcconfig: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-10-13 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 21541: Move RegisterFile growth check to callee - - - Move the RegisterFile growth check to the callee in the common case, - where some of the information is known statically at JIT time. There is - still a check in the caller in the case where the caller provides too - few arguments. - - This is a 2.1% speedup on the V8 benchmark, including a 5.1% speedup on - the Richards benchmark, a 4.1% speedup on the DeltaBlue benchmark, and a - 1.4% speedup on the Earley-Boyer benchmark. It is also a 0.5% speedup on - SunSpider. - - * VM/CTI.cpp: - (JSC::CTI::privateCompile): - * VM/Machine.cpp: - (JSC::Machine::cti_register_file_check): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_op_construct_JSConstruct): - * VM/Machine.h: - * VM/RegisterFile.h: - * masm/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::cmpl_mr): - (JSC::X86Assembler::emitUnlinkedJg): - -2008-10-13 Sam Weinig - - Reviewed by Dan Bernstein. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=21577 - 5 false positive StructureID leaks - - - Add leak ignore set to StructureID to selectively ignore leaking some StructureIDs. - - Add create method to JSGlolalData to be used when the data will be intentionally - leaked and ignore all leaks caused the StructureIDs stored in it. - - * JavaScriptCore.exp: - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::createLeaked): - * kjs/JSGlobalData.h: - * kjs/StructureID.cpp: - (JSC::StructureID::StructureID): - (JSC::StructureID::~StructureID): - (JSC::StructureID::startIgnoringLeaks): - (JSC::StructureID::stopIgnoringLeaks): - * kjs/StructureID.h: - -2008-10-13 Marco Barisione - - Reviewed by Darin Adler. Landed by Jan Alonzo. - - WebKit GTK Port needs a smartpointer to handle g_free (GFreePtr?) - http://bugs.webkit.org/show_bug.cgi?id=20483 - - Add a GOwnPtr smart pointer (similar to OwnPtr) to handle memory - allocated by GLib and start the conversion to use it. - - * GNUmakefile.am: - * wtf/GOwnPtr.cpp: Added. - (WTF::GError): - (WTF::GList): - (WTF::GCond): - (WTF::GMutex): - (WTF::GPatternSpec): - (WTF::GDir): - * wtf/GOwnPtr.h: Added. - (WTF::freeOwnedPtr): - (WTF::GOwnPtr::GOwnPtr): - (WTF::GOwnPtr::~GOwnPtr): - (WTF::GOwnPtr::get): - (WTF::GOwnPtr::release): - (WTF::GOwnPtr::rawPtr): - (WTF::GOwnPtr::set): - (WTF::GOwnPtr::clear): - (WTF::GOwnPtr::operator*): - (WTF::GOwnPtr::operator->): - (WTF::GOwnPtr::operator!): - (WTF::GOwnPtr::operator UnspecifiedBoolType): - (WTF::GOwnPtr::swap): - (WTF::swap): - (WTF::operator==): - (WTF::operator!=): - (WTF::getPtr): - * wtf/Threading.h: - * wtf/ThreadingGtk.cpp: - (WTF::Mutex::~Mutex): - (WTF::Mutex::lock): - (WTF::Mutex::tryLock): - (WTF::Mutex::unlock): - (WTF::ThreadCondition::~ThreadCondition): - (WTF::ThreadCondition::wait): - (WTF::ThreadCondition::timedWait): - (WTF::ThreadCondition::signal): - (WTF::ThreadCondition::broadcast): - -2008-10-12 Gabriella Toth - - Reviewed by Darin Adler. - - - part of https://bugs.webkit.org/show_bug.cgi?id=21055 - Bug 21055: not invoked functions - - * kjs/nodes.cpp: Deleted a function that is not invoked: - statementListInitializeVariableAccessStack. - -2008-10-12 Darin Adler - - Reviewed by Sam Weinig. - - * wtf/unicode/icu/UnicodeIcu.h: Fixed indentation to match WebKit coding style. - * wtf/unicode/qt4/UnicodeQt4.h: Ditto. - -2008-10-12 Darin Adler - - Reviewed by Sam Weinig. - - - https://bugs.webkit.org/show_bug.cgi?id=21556 - Bug 21556: non-ASCII digits are allowed in places where only ASCII should be - - * wtf/unicode/icu/UnicodeIcu.h: Removed isDigit, digitValue, and isFormatChar. - * wtf/unicode/qt4/UnicodeQt4.h: Ditto. - -2008-10-12 Anders Carlsson - - Reviewed by Darin Adler. - - Make the append method that takes a Vector more strict - it now requires the elements - of the vector to be appended same type as the elements of the Vector they're being appended to. - - This would cause problems when dealing with Vectors containing other Vectors. - - * wtf/Vector.h: - (WTF::::append): - -2008-10-11 Cameron Zwarich - - Reviewed by Sam Weinig. - - Clean up RegExpMatchesArray.h to match our coding style. - - * kjs/RegExpMatchesArray.h: - (JSC::RegExpMatchesArray::getOwnPropertySlot): - (JSC::RegExpMatchesArray::put): - (JSC::RegExpMatchesArray::deleteProperty): - (JSC::RegExpMatchesArray::getPropertyNames): - -2008-10-11 Cameron Zwarich - - Reviewed by Sam Weinig. - - Bug 21525: 55 StructureID leaks on Wikitravel's main page - - - Bug 21533: Simple JavaScript code leaks StructureIDs - - - StructureID::getEnumerablePropertyNames() ends up calling back to itself - via JSObject::getPropertyNames(), which causes the PropertyNameArray to - be cached twice. This leads to a memory leak in almost every use of - JSObject::getPropertyNames() on an object. The fix here is based on a - suggestion of Sam Weinig. - - This patch also fixes every StructureID leaks that occurs while running - the Mozilla MemBuster test. - - * kjs/PropertyNameArray.h: - (JSC::PropertyNameArray::PropertyNameArray): - (JSC::PropertyNameArray::setCacheable): - (JSC::PropertyNameArray::cacheable): - * kjs/StructureID.cpp: - (JSC::StructureID::getEnumerablePropertyNames): - -2008-10-10 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Use fastcall calling convention on GCC > 4.0 - - Results in a 2-3% improvement in GCC 4.2 performance, so - that it is no longer a regression vs. GCC 4.0 - - * VM/CTI.cpp: - * VM/Machine.h: - * wtf/Platform.h: - -2008-10-10 Sam Weinig - - Reviewed by Darin Adler. - - - Add a workaround for a bug in ceil in Darwin libc. - - Remove old workarounds for JS math functions that are not needed - anymore. - - The math functions are heavily tested by fast/js/math.html. - - * kjs/MathObject.cpp: - (JSC::mathProtoFuncAbs): Remove workaround. - (JSC::mathProtoFuncCeil): Ditto. - (JSC::mathProtoFuncFloor): Ditto. - * wtf/MathExtras.h: - (wtf_ceil): Add ceil workaround for darwin. - -2008-10-10 Sam Weinig - - Reviewed by Darin Adler - - Add Assertions to JSObject constructor. - - * kjs/JSObject.h: - (JSC::JSObject::JSObject): - -2008-10-10 Sam Weinig - - Reviewed by Cameron Zwarich. - - Remove now unused m_getterSetterFlag variable from PropertyMap. - - * kjs/PropertyMap.cpp: - (JSC::PropertyMap::operator=): - * kjs/PropertyMap.h: - (JSC::PropertyMap::PropertyMap): - -2008-10-09 Sam Weinig - - Reviewed by Maciej Stachowiak. - - Add leaks checking to StructureID. - - * kjs/StructureID.cpp: - (JSC::StructureID::StructureID): - (JSC::StructureID::~StructureID): - -2008-10-09 Alp Toker - - Reviewed by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=20760 - Implement support for x86 Linux in CTI - - Prepare to enable CTI/WREC on supported architectures. - - Make it possible to use the CTI_ARGUMENT workaround with GCC as well - as MSVC by fixing some preprocessor conditionals. - - Note that CTI/WREC no longer requires CTI_ARGUMENT on Linux so we - don't actually enable it except when building with MSVC. GCC on Win32 - remains untested. - - Adapt inline ASM code to use the global symbol underscore prefix only - on Darwin and to call the properly mangled Machine::cti_vm_throw - symbol name depending on CTI_ARGUMENT. - - Also avoid global inclusion of the JIT infrastructure headers - throughout WebCore and WebKit causing recompilation of about ~1500 - source files after modification to X86Assembler.h, CTI.h, WREC.h, - which are only used deep inside JavaScriptCore. - - * GNUmakefile.am: - * VM/CTI.cpp: - * VM/CTI.h: - * VM/Machine.cpp: - * VM/Machine.h: - * kjs/regexp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::~RegExp): - (JSC::RegExp::match): - * kjs/regexp.h: - * masm/X86Assembler.h: - (JSC::X86Assembler::emitConvertToFastCall): - (JSC::X86Assembler::emitRestoreArgumentReferenceForTrampoline): - (JSC::X86Assembler::emitRestoreArgumentReference): - -2008-10-09 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Fix for bug #21160, x=0;1/(x*-1) == -Infinity - - * ChangeLog: - * VM/CTI.cpp: - (JSC::CTI::emitFastArithDeTagImmediate): - (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::compileBinaryArithOpSlowCase): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CTI.h: - * masm/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::emitUnlinkedJs): - -2008-10-09 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 21459: REGRESSION (r37324): Safari crashes inside JavaScriptCore while browsing hulu.com - - - After r37324, an Arguments object does not mark an associated activation - object. This change was made because Arguments no longer directly used - the activation object in any way. However, if an activation is torn off, - then the backing store of Arguments becomes the register array of the - activation object. Arguments directly marks all of the arguments, but - the activation object is being collected, which causes its register - array to be freed and new memory to be allocated in its place. - - Unfortunately, it does not seem possible to reproduce this issue in a - layout test. - - * kjs/Arguments.cpp: - (JSC::Arguments::mark): - * kjs/Arguments.h: - (JSC::Arguments::setActivation): - (JSC::Arguments::Arguments): - (JSC::JSActivation::copyRegisters): - -2008-10-09 Ariya Hidayat - - Reviewed by Simon. - - Build fix for MinGW. - - * wtf/AlwaysInline.h: - -2008-10-08 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 21497: REGRESSION (r37433): Bytecode JSC tests are severely broken - - - Fix a typo in r37433 that causes the failure of a large number of JSC - tests with the bytecode interpreter enabled. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - -2008-10-08 Mark Rowe - - Windows build fix. - - * VM/CTI.cpp: - (JSC::): Update type of argument to ctiTrampoline. - -2008-10-08 Darin Adler - - Reviewed by Cameron Zwarich. - - - https://bugs.webkit.org/show_bug.cgi?id=21403 - Bug 21403: use new CallFrame class rather than Register* for call frame manipulation - - Add CallFrame as a synonym for ExecState. Arguably, some day we should switch every - client over to the new name. - - Use CallFrame* consistently rather than Register* or ExecState* in low-level code such - as Machine.cpp and CTI.cpp. Similarly, use callFrame rather than r as its name and use - accessor functions to get at things in the frame. - - Eliminate other uses of ExecState* that aren't needed, replacing in some cases with - JSGlobalData* and in other cases eliminating them entirely. - - * API/JSObjectRef.cpp: - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeFunction): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectDeleteProperty): - * API/OpaqueJSString.cpp: - * API/OpaqueJSString.h: - * VM/CTI.cpp: - (JSC::CTI::getConstant): - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::getConstantImmediateNumericArg): - (JSC::CTI::printOpcodeOperandTypes): - (JSC::CTI::CTI): - (JSC::CTI::compileOpCall): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::compileRegExp): - * VM/CTI.h: - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitEqualityOp): - (JSC::CodeGenerator::emitLoad): - (JSC::CodeGenerator::emitUnexpectedLoad): - (JSC::CodeGenerator::emitConstruct): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::jsAddSlowCase): - (JSC::jsAdd): - (JSC::jsTypeStringForValue): - (JSC::Machine::resolve): - (JSC::Machine::resolveSkip): - (JSC::Machine::resolveGlobal): - (JSC::inlineResolveBase): - (JSC::Machine::resolveBase): - (JSC::Machine::resolveBaseAndProperty): - (JSC::Machine::resolveBaseAndFunc): - (JSC::Machine::slideRegisterWindowForCall): - (JSC::isNotObject): - (JSC::Machine::callEval): - (JSC::Machine::dumpCallFrame): - (JSC::Machine::dumpRegisters): - (JSC::Machine::unwindCallFrame): - (JSC::Machine::throwException): - (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): - (JSC::DynamicGlobalObjectScope::~DynamicGlobalObjectScope): - (JSC::Machine::execute): - (JSC::Machine::debug): - (JSC::Machine::createExceptionScope): - (JSC::cachePrototypeChain): - (JSC::Machine::tryCachePutByID): - (JSC::Machine::tryCacheGetByID): - (JSC::Machine::privateExecute): - (JSC::Machine::retrieveArguments): - (JSC::Machine::retrieveCaller): - (JSC::Machine::retrieveLastCaller): - (JSC::Machine::findFunctionCallFrame): - (JSC::Machine::getArgumentsData): - (JSC::Machine::tryCTICachePutByID): - (JSC::Machine::getCTIArrayLengthTrampoline): - (JSC::Machine::getCTIStringLengthTrampoline): - (JSC::Machine::tryCTICacheGetByID): - (JSC::Machine::cti_op_convert_this): - (JSC::Machine::cti_op_end): - (JSC::Machine::cti_op_add): - (JSC::Machine::cti_op_pre_inc): - (JSC::Machine::cti_timeout_check): - (JSC::Machine::cti_op_loop_if_less): - (JSC::Machine::cti_op_loop_if_lesseq): - (JSC::Machine::cti_op_new_object): - (JSC::Machine::cti_op_put_by_id): - (JSC::Machine::cti_op_put_by_id_second): - (JSC::Machine::cti_op_put_by_id_generic): - (JSC::Machine::cti_op_put_by_id_fail): - (JSC::Machine::cti_op_get_by_id): - (JSC::Machine::cti_op_get_by_id_second): - (JSC::Machine::cti_op_get_by_id_generic): - (JSC::Machine::cti_op_get_by_id_fail): - (JSC::Machine::cti_op_instanceof): - (JSC::Machine::cti_op_del_by_id): - (JSC::Machine::cti_op_mul): - (JSC::Machine::cti_op_new_func): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_vm_compile): - (JSC::Machine::cti_op_push_activation): - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_create_arguments): - (JSC::Machine::cti_op_tear_off_activation): - (JSC::Machine::cti_op_tear_off_arguments): - (JSC::Machine::cti_op_ret_profiler): - (JSC::Machine::cti_op_ret_scopeChain): - (JSC::Machine::cti_op_new_array): - (JSC::Machine::cti_op_resolve): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_construct_NotJSConstruct): - (JSC::Machine::cti_op_get_by_val): - (JSC::Machine::cti_op_resolve_func): - (JSC::Machine::cti_op_sub): - (JSC::Machine::cti_op_put_by_val): - (JSC::Machine::cti_op_put_by_val_array): - (JSC::Machine::cti_op_lesseq): - (JSC::Machine::cti_op_loop_if_true): - (JSC::Machine::cti_op_negate): - (JSC::Machine::cti_op_resolve_base): - (JSC::Machine::cti_op_resolve_skip): - (JSC::Machine::cti_op_resolve_global): - (JSC::Machine::cti_op_div): - (JSC::Machine::cti_op_pre_dec): - (JSC::Machine::cti_op_jless): - (JSC::Machine::cti_op_not): - (JSC::Machine::cti_op_jtrue): - (JSC::Machine::cti_op_post_inc): - (JSC::Machine::cti_op_eq): - (JSC::Machine::cti_op_lshift): - (JSC::Machine::cti_op_bitand): - (JSC::Machine::cti_op_rshift): - (JSC::Machine::cti_op_bitnot): - (JSC::Machine::cti_op_resolve_with_base): - (JSC::Machine::cti_op_new_func_exp): - (JSC::Machine::cti_op_mod): - (JSC::Machine::cti_op_less): - (JSC::Machine::cti_op_neq): - (JSC::Machine::cti_op_post_dec): - (JSC::Machine::cti_op_urshift): - (JSC::Machine::cti_op_bitxor): - (JSC::Machine::cti_op_new_regexp): - (JSC::Machine::cti_op_bitor): - (JSC::Machine::cti_op_call_eval): - (JSC::Machine::cti_op_throw): - (JSC::Machine::cti_op_get_pnames): - (JSC::Machine::cti_op_next_pname): - (JSC::Machine::cti_op_push_scope): - (JSC::Machine::cti_op_pop_scope): - (JSC::Machine::cti_op_typeof): - (JSC::Machine::cti_op_to_jsnumber): - (JSC::Machine::cti_op_in): - (JSC::Machine::cti_op_push_new_scope): - (JSC::Machine::cti_op_jmp_scopes): - (JSC::Machine::cti_op_put_by_index): - (JSC::Machine::cti_op_switch_imm): - (JSC::Machine::cti_op_switch_char): - (JSC::Machine::cti_op_switch_string): - (JSC::Machine::cti_op_del_by_val): - (JSC::Machine::cti_op_put_getter): - (JSC::Machine::cti_op_put_setter): - (JSC::Machine::cti_op_new_error): - (JSC::Machine::cti_op_debug): - (JSC::Machine::cti_vm_throw): - * VM/Machine.h: - * VM/Register.h: - * VM/RegisterFile.h: - * kjs/Arguments.h: - * kjs/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::functionName): - (JSC::DebuggerCallFrame::type): - (JSC::DebuggerCallFrame::thisObject): - (JSC::DebuggerCallFrame::evaluate): - * kjs/DebuggerCallFrame.h: - * kjs/ExecState.cpp: - (JSC::CallFrame::thisValue): - * kjs/ExecState.h: - * kjs/FunctionConstructor.cpp: - (JSC::constructFunction): - * kjs/JSActivation.cpp: - (JSC::JSActivation::JSActivation): - (JSC::JSActivation::argumentsGetter): - * kjs/JSActivation.h: - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): - * kjs/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - * kjs/JSVariableObject.h: - * kjs/Parser.cpp: - (JSC::Parser::parse): - * kjs/RegExpConstructor.cpp: - (JSC::constructRegExp): - * kjs/RegExpPrototype.cpp: - (JSC::regExpProtoFuncCompile): - * kjs/Shell.cpp: - (prettyPrintScript): - * kjs/StringPrototype.cpp: - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - * kjs/identifier.cpp: - (JSC::Identifier::checkSameIdentifierTable): - * kjs/interpreter.cpp: - (JSC::Interpreter::checkSyntax): - (JSC::Interpreter::evaluate): - * kjs/nodes.cpp: - (JSC::ThrowableExpressionData::emitThrowError): - (JSC::RegExpNode::emitCode): - (JSC::ArrayNode::emitCode): - (JSC::InstanceOfNode::emitCode): - * kjs/nodes.h: - * kjs/regexp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::create): - * kjs/regexp.h: - * profiler/HeavyProfile.h: - * profiler/Profile.h: - * wrec/WREC.cpp: - * wrec/WREC.h: - -2008-10-08 Mark Rowe - - Typed by Maciej Stachowiak, reviewed by Mark Rowe. - - Fix crash in fast/js/constant-folding.html with CTI disabled. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - -2008-10-08 Timothy Hatcher - - Roll out r37427 because it causes an infinite recursion loading about:blank. - - https://bugs.webkit.org/show_bug.cgi?id=21476 - -2008-10-08 Darin Adler - - Reviewed by Cameron Zwarich. - - - https://bugs.webkit.org/show_bug.cgi?id=21403 - Bug 21403: use new CallFrame class rather than Register* for call frame manipulation - - Add CallFrame as a synonym for ExecState. Arguably, some day we should switch every - client over to the new name. - - Use CallFrame* consistently rather than Register* or ExecState* in low-level code such - as Machine.cpp and CTI.cpp. Similarly, use callFrame rather than r as its name and use - accessor functions to get at things in the frame. - - Eliminate other uses of ExecState* that aren't needed, replacing in some cases with - JSGlobalData* and in other cases eliminating them entirely. - - * API/JSObjectRef.cpp: - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeFunction): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectDeleteProperty): - * API/OpaqueJSString.cpp: - * API/OpaqueJSString.h: - * VM/CTI.cpp: - (JSC::CTI::getConstant): - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::getConstantImmediateNumericArg): - (JSC::CTI::printOpcodeOperandTypes): - (JSC::CTI::CTI): - (JSC::CTI::compileOpCall): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::compileRegExp): - * VM/CTI.h: - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitEqualityOp): - (JSC::CodeGenerator::emitLoad): - (JSC::CodeGenerator::emitUnexpectedLoad): - (JSC::CodeGenerator::emitConstruct): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::jsAddSlowCase): - (JSC::jsAdd): - (JSC::jsTypeStringForValue): - (JSC::Machine::resolve): - (JSC::Machine::resolveSkip): - (JSC::Machine::resolveGlobal): - (JSC::inlineResolveBase): - (JSC::Machine::resolveBase): - (JSC::Machine::resolveBaseAndProperty): - (JSC::Machine::resolveBaseAndFunc): - (JSC::Machine::slideRegisterWindowForCall): - (JSC::isNotObject): - (JSC::Machine::callEval): - (JSC::Machine::dumpCallFrame): - (JSC::Machine::dumpRegisters): - (JSC::Machine::unwindCallFrame): - (JSC::Machine::throwException): - (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): - (JSC::DynamicGlobalObjectScope::~DynamicGlobalObjectScope): - (JSC::Machine::execute): - (JSC::Machine::debug): - (JSC::Machine::createExceptionScope): - (JSC::cachePrototypeChain): - (JSC::Machine::tryCachePutByID): - (JSC::Machine::tryCacheGetByID): - (JSC::Machine::privateExecute): - (JSC::Machine::retrieveArguments): - (JSC::Machine::retrieveCaller): - (JSC::Machine::retrieveLastCaller): - (JSC::Machine::findFunctionCallFrame): - (JSC::Machine::getArgumentsData): - (JSC::Machine::tryCTICachePutByID): - (JSC::Machine::getCTIArrayLengthTrampoline): - (JSC::Machine::getCTIStringLengthTrampoline): - (JSC::Machine::tryCTICacheGetByID): - (JSC::Machine::cti_op_convert_this): - (JSC::Machine::cti_op_end): - (JSC::Machine::cti_op_add): - (JSC::Machine::cti_op_pre_inc): - (JSC::Machine::cti_timeout_check): - (JSC::Machine::cti_op_loop_if_less): - (JSC::Machine::cti_op_loop_if_lesseq): - (JSC::Machine::cti_op_new_object): - (JSC::Machine::cti_op_put_by_id): - (JSC::Machine::cti_op_put_by_id_second): - (JSC::Machine::cti_op_put_by_id_generic): - (JSC::Machine::cti_op_put_by_id_fail): - (JSC::Machine::cti_op_get_by_id): - (JSC::Machine::cti_op_get_by_id_second): - (JSC::Machine::cti_op_get_by_id_generic): - (JSC::Machine::cti_op_get_by_id_fail): - (JSC::Machine::cti_op_instanceof): - (JSC::Machine::cti_op_del_by_id): - (JSC::Machine::cti_op_mul): - (JSC::Machine::cti_op_new_func): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_vm_compile): - (JSC::Machine::cti_op_push_activation): - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_create_arguments): - (JSC::Machine::cti_op_tear_off_activation): - (JSC::Machine::cti_op_tear_off_arguments): - (JSC::Machine::cti_op_ret_profiler): - (JSC::Machine::cti_op_ret_scopeChain): - (JSC::Machine::cti_op_new_array): - (JSC::Machine::cti_op_resolve): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_construct_NotJSConstruct): - (JSC::Machine::cti_op_get_by_val): - (JSC::Machine::cti_op_resolve_func): - (JSC::Machine::cti_op_sub): - (JSC::Machine::cti_op_put_by_val): - (JSC::Machine::cti_op_put_by_val_array): - (JSC::Machine::cti_op_lesseq): - (JSC::Machine::cti_op_loop_if_true): - (JSC::Machine::cti_op_negate): - (JSC::Machine::cti_op_resolve_base): - (JSC::Machine::cti_op_resolve_skip): - (JSC::Machine::cti_op_resolve_global): - (JSC::Machine::cti_op_div): - (JSC::Machine::cti_op_pre_dec): - (JSC::Machine::cti_op_jless): - (JSC::Machine::cti_op_not): - (JSC::Machine::cti_op_jtrue): - (JSC::Machine::cti_op_post_inc): - (JSC::Machine::cti_op_eq): - (JSC::Machine::cti_op_lshift): - (JSC::Machine::cti_op_bitand): - (JSC::Machine::cti_op_rshift): - (JSC::Machine::cti_op_bitnot): - (JSC::Machine::cti_op_resolve_with_base): - (JSC::Machine::cti_op_new_func_exp): - (JSC::Machine::cti_op_mod): - (JSC::Machine::cti_op_less): - (JSC::Machine::cti_op_neq): - (JSC::Machine::cti_op_post_dec): - (JSC::Machine::cti_op_urshift): - (JSC::Machine::cti_op_bitxor): - (JSC::Machine::cti_op_new_regexp): - (JSC::Machine::cti_op_bitor): - (JSC::Machine::cti_op_call_eval): - (JSC::Machine::cti_op_throw): - (JSC::Machine::cti_op_get_pnames): - (JSC::Machine::cti_op_next_pname): - (JSC::Machine::cti_op_push_scope): - (JSC::Machine::cti_op_pop_scope): - (JSC::Machine::cti_op_typeof): - (JSC::Machine::cti_op_to_jsnumber): - (JSC::Machine::cti_op_in): - (JSC::Machine::cti_op_push_new_scope): - (JSC::Machine::cti_op_jmp_scopes): - (JSC::Machine::cti_op_put_by_index): - (JSC::Machine::cti_op_switch_imm): - (JSC::Machine::cti_op_switch_char): - (JSC::Machine::cti_op_switch_string): - (JSC::Machine::cti_op_del_by_val): - (JSC::Machine::cti_op_put_getter): - (JSC::Machine::cti_op_put_setter): - (JSC::Machine::cti_op_new_error): - (JSC::Machine::cti_op_debug): - (JSC::Machine::cti_vm_throw): - * VM/Machine.h: - * VM/Register.h: - * VM/RegisterFile.h: - * kjs/Arguments.h: - * kjs/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::functionName): - (JSC::DebuggerCallFrame::type): - (JSC::DebuggerCallFrame::thisObject): - (JSC::DebuggerCallFrame::evaluate): - * kjs/DebuggerCallFrame.h: - * kjs/ExecState.cpp: - (JSC::CallFrame::thisValue): - * kjs/ExecState.h: - * kjs/FunctionConstructor.cpp: - (JSC::constructFunction): - * kjs/JSActivation.cpp: - (JSC::JSActivation::JSActivation): - (JSC::JSActivation::argumentsGetter): - * kjs/JSActivation.h: - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): - * kjs/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - * kjs/JSVariableObject.h: - * kjs/Parser.cpp: - (JSC::Parser::parse): - * kjs/RegExpConstructor.cpp: - (JSC::constructRegExp): - * kjs/RegExpPrototype.cpp: - (JSC::regExpProtoFuncCompile): - * kjs/Shell.cpp: - (prettyPrintScript): - * kjs/StringPrototype.cpp: - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - * kjs/identifier.cpp: - (JSC::Identifier::checkSameIdentifierTable): - * kjs/interpreter.cpp: - (JSC::Interpreter::checkSyntax): - (JSC::Interpreter::evaluate): - * kjs/nodes.cpp: - (JSC::ThrowableExpressionData::emitThrowError): - (JSC::RegExpNode::emitCode): - (JSC::ArrayNode::emitCode): - (JSC::InstanceOfNode::emitCode): - * kjs/nodes.h: - * kjs/regexp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::create): - * kjs/regexp.h: - * profiler/HeavyProfile.h: - * profiler/Profile.h: - * wrec/WREC.cpp: - * wrec/WREC.h: - -2008-10-08 Prasanth Ullattil - - Reviewed by Oliver Hunt. - - Avoid endless loops when compiling without the computed goto - optimization. - - NEXT_OPCODE expands to "continue", which will not work inside - loops. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - -2008-10-08 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - Re-landing the following fix with the crashing bug in it fixed (r37405): - - - optimize away multiplication by constant 1.0 - - 2.3% speedup on v8 RayTrace benchmark - - Apparently it's not uncommon for JavaScript code to multiply by - constant 1.0 in the mistaken belief that this converts integer to - floating point and that there is any operational difference. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): Optimize to_jsnumber for - case where parameter is already number. - (JSC::CTI::privateCompileSlowCases): ditto - * VM/Machine.cpp: - (JSC::Machine::privateExecute): ditto - * kjs/grammar.y: - (makeMultNode): Transform as follows: - +FOO * BAR ==> FOO * BAR - FOO * +BAR ==> FOO * BAR - FOO * 1 ==> +FOO - 1 * FOO ==> +FOO - (makeDivNode): Transform as follows: - +FOO / BAR ==> FOO / BAR - FOO / +BAR ==> FOO / BAR - (makeSubNode): Transform as follows: - +FOO - BAR ==> FOO - BAR - FOO - +BAR ==> FOO - BAR - * kjs/nodes.h: - (JSC::ExpressionNode::stripUnaryPlus): Helper for above - grammar.y changes - (JSC::UnaryPlusNode::stripUnaryPlus): ditto - -2008-10-08 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - - correctly handle appending -0 to a string, it should stringify as just 0 - - * kjs/ustring.cpp: - (JSC::concatenate): - -2008-10-08 Prasanth Ullattil - - Reviewed by Simon. - - Fix WebKit compilation with VC2008SP1 - - Apply the TR1 workaround for JavaScriptCore, too. - - * JavaScriptCore.pro: - -2008-10-08 Prasanth Ullattil - - Reviewed by Simon. - - Fix compilation errors on VS2008 64Bit - - * kjs/collector.cpp: - (JSC::currentThreadStackBase): - -2008-10-08 André Pönitz - - Reviewed by Simon. - - Fix compilation with Qt namespaces. - - * wtf/Threading.h: - -2008-10-07 Sam Weinig - - Roll out r37405. - -2008-10-07 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Switch CTI runtime calls to the fastcall calling convention - - Basically this means that we get to store the argument for CTI - calls in the ECX register, which saves a register->memory write - and subsequent memory->register read. - - This is a 1.7% progression in SunSpider and 2.4% on commandline - v8 tests on Windows - - * VM/CTI.cpp: - (JSC::): - (JSC::CTI::privateCompilePutByIdTransition): - (JSC::CTI::privateCompilePatchGetArrayLength): - * VM/CTI.h: - * VM/Machine.h: - * masm/X86Assembler.h: - (JSC::X86Assembler::emitRestoreArgumentReference): - (JSC::X86Assembler::emitRestoreArgumentReferenceForTrampoline): - We need this to correctly reload ecx from inside certain property access - trampolines. - * wtf/Platform.h: - -2008-10-07 Maciej Stachowiak - - Reviewed by Mark Rowe. - - - optimize away multiplication by constant 1.0 - - 2.3% speedup on v8 RayTrace benchmark - - Apparently it's not uncommon for JavaScript code to multiply by - constant 1.0 in the mistaken belief that this converts integer to - floating point and that there is any operational difference. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): Optimize to_jsnumber for - case where parameter is already number. - (JSC::CTI::privateCompileSlowCases): ditto - * VM/Machine.cpp: - (JSC::Machine::privateExecute): ditto - * kjs/grammar.y: - (makeMultNode): Transform as follows: - +FOO * BAR ==> FOO * BAR - FOO * +BAR ==> FOO * BAR - FOO * 1 ==> +FOO - 1 * FOO ==> +FOO - (makeDivNode): Transform as follows: - +FOO / BAR ==> FOO / BAR - FOO / +BAR ==> FOO / BAR - (makeSubNode): Transform as follows: - +FOO - BAR ==> FOO - BAR - FOO - +BAR ==> FOO - BAR - * kjs/nodes.h: - (JSC::ExpressionNode::stripUnaryPlus): Helper for above - grammar.y changes - (JSC::UnaryPlusNode::stripUnaryPlus): ditto - -2008-10-07 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - - make constant folding code more consistent - - Added a makeSubNode to match add, mult and div; use the makeFooNode functions always, - instead of allocating nodes directly in other places in the grammar. - - * kjs/grammar.y: - -2008-10-07 Sam Weinig - - Reviewed by Cameron Zwarich. - - Move hasGetterSetterProperties flag from PropertyMap to StructureID. - - * kjs/JSObject.cpp: - (JSC::JSObject::put): - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - * kjs/JSObject.h: - (JSC::JSObject::hasGetterSetterProperties): - (JSC::JSObject::getOwnPropertySlotForWrite): - (JSC::JSObject::getOwnPropertySlot): - * kjs/PropertyMap.h: - * kjs/StructureID.cpp: - (JSC::StructureID::StructureID): - (JSC::StructureID::addPropertyTransition): - (JSC::StructureID::toDictionaryTransition): - (JSC::StructureID::changePrototypeTransition): - (JSC::StructureID::getterSetterTransition): - * kjs/StructureID.h: - (JSC::StructureID::hasGetterSetterProperties): - (JSC::StructureID::setHasGetterSetterProperties): - -2008-10-07 Sam Weinig - - Reviewed by Cameron Zwarich. - - Roll r37370 back in with bug fixes. - - - PropertyMap::storageSize() should reflect the number of keys + deletedOffsets - and has nothing to do with the internal deletedSentinel count anymore. - -2008-10-07 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Move callframe initialization into JIT code, again. - - As a part of the restructuring the second result from functions is now - returned in edx, allowing the new value of 'r' to be returned via a - register, and stored to the stack from JIT code, too. - - 4.5% progression on v8-tests. (3% in their harness) - - * VM/CTI.cpp: - (JSC::): - (JSC::CTI::emitCall): - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - * VM/CTI.h: - (JSC::CallRecord::CallRecord): - * VM/Machine.cpp: - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_resolve_func): - (JSC::Machine::cti_op_post_inc): - (JSC::Machine::cti_op_resolve_with_base): - (JSC::Machine::cti_op_post_dec): - * VM/Machine.h: - * kjs/JSFunction.h: - * kjs/ScopeChain.h: - -2008-10-07 Mark Rowe - - Fix typo in method name. - - * wrec/WREC.cpp: - * wrec/WREC.h: - -2008-10-07 Cameron Zwarich - - Rubber-stamped by Mark Rowe. - - Roll out r37370. - -2008-10-06 Sam Weinig - - Reviewed by Cameron Zwarich. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=21415 - Improve the division between PropertyStorageArray and PropertyMap - - - Rework ProperyMap to store offsets in the value so that they don't - change when rehashing. This allows us not to have to keep the - PropertyStorageArray in sync and thus not have to pass it in. - - Rename PropertyMap::getOffset -> PropertyMap::get since put/remove - now also return offsets. - - A Vector of deleted offsets is now needed since the storage is out of - band. - - 1% win on SunSpider. Wash on V8 suite. - - * JavaScriptCore.exp: - * VM/CTI.cpp: - (JSC::transitionWillNeedStorageRealloc): - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - Transition logic can be greatly simplified by the fact that - the storage capacity is always known, and is correct for the - inline case. - * kjs/JSObject.cpp: - (JSC::JSObject::put): Rename getOffset -> get. - (JSC::JSObject::deleteProperty): Ditto. - (JSC::JSObject::getPropertyAttributes): Ditto. - (JSC::JSObject::removeDirect): Use returned offset to - clear the value in the PropertyNameArray. - (JSC::JSObject::allocatePropertyStorage): Add assert. - * kjs/JSObject.h: - (JSC::JSObject::getDirect): Rename getOffset -> get - (JSC::JSObject::getDirectLocation): Rename getOffset -> get - (JSC::JSObject::putDirect): Use propertyStorageCapacity to determine whether - or not to resize. Also, since put now returns an offset (and thus - addPropertyTransition does also) setting of the PropertyStorageArray is - now done here. - (JSC::JSObject::transitionTo): - * kjs/PropertyMap.cpp: - (JSC::PropertyMap::checkConsistency): PropertyStorageArray is no longer - passed in. - (JSC::PropertyMap::operator=): Copy the delete offsets vector. - (JSC::PropertyMap::put): Instead of setting the PropertyNameArray - explicitly, return the offset where the value should go. - (JSC::PropertyMap::remove): Instead of removing from the PropertyNameArray - explicitly, return the offset where the value should be removed. - (JSC::PropertyMap::get): Switch to using the stored offset, instead - of the implicit one. - (JSC::PropertyMap::insert): - (JSC::PropertyMap::expand): This is never called when m_table is null, - so remove that branch and add it as an assertion. - (JSC::PropertyMap::createTable): Consistency checks no longer take - a PropertyNameArray. - (JSC::PropertyMap::rehash): No need to rehash the PropertyNameArray - now that it is completely out of band. - * kjs/PropertyMap.h: - (JSC::PropertyMapEntry::PropertyMapEntry): Store offset into PropertyNameArray. - (JSC::PropertyMap::get): Switch to using the stored offset, instead - of the implicit one. - * kjs/StructureID.cpp: - (JSC::StructureID::StructureID): Initialize the propertyStorageCapacity to - JSObject::inlineStorageCapacity. - (JSC::StructureID::growPropertyStorageCapacity): Grow the storage capacity as - described below. - (JSC::StructureID::addPropertyTransition): Copy the storage capacity. - (JSC::StructureID::toDictionaryTransition): Ditto. - (JSC::StructureID::changePrototypeTransition): Ditto. - (JSC::StructureID::getterSetterTransition): Ditto. - * kjs/StructureID.h: - (JSC::StructureID::propertyStorageCapacity): Add propertyStorageCapacity - which is the current capacity for the JSObjects PropertyStorageArray. - It starts at the JSObject::inlineStorageCapacity (currently 2), then - when it first needs to be resized moves to the JSObject::nonInlineBaseStorageCapacity - (currently 16), and after that doubles each time. - -2008-10-06 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 21396: Remove the OptionalCalleeActivation call frame slot - - - Remove the OptionalCalleeActivation call frame slot. We have to be - careful to store the activation object in a register, because objects - in the scope chain do not get marked. - - This is a 0.3% speedup on both SunSpider and the V8 benchmark. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::CodeGenerator): - (JSC::CodeGenerator::emitReturn): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (JSC::Machine::dumpRegisters): - (JSC::Machine::unwindCallFrame): - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_op_push_activation): - (JSC::Machine::cti_op_tear_off_activation): - (JSC::Machine::cti_op_construct_JSConstruct): - * VM/Machine.h: - (JSC::Machine::initializeCallFrame): - * VM/RegisterFile.h: - (JSC::RegisterFile::): - -2008-10-06 Tony Chang - - Reviewed by Alexey Proskuryakov. - - Chromium doesn't use pthreads on windows, so make its use conditional. - - Also convert a WORD to a DWORD to avoid a compiler warning. This - matches the other methods around it. - - * wtf/ThreadingWin.cpp: - (WTF::wtfThreadEntryPoint): - (WTF::ThreadCondition::broadcast): - -2008-10-06 Mark Mentovai - - Reviewed by Tim Hatcher. - - Allow ENABLE_DASHBOARD_SUPPORT and ENABLE_MAC_JAVA_BRIDGE to be - disabled on the Mac. - - https://bugs.webkit.org/show_bug.cgi?id=21333 - - * wtf/Platform.h: - -2008-10-06 Steve Falkenburg - - https://bugs.webkit.org/show_bug.cgi?id=21416 - Pass 0 for size to VirtualAlloc, as documented by MSDN. - Identified by Application Verifier. - - Reviewed by Darin Adler. - - * kjs/collector.cpp: - (KJS::freeBlock): - -2008-10-06 Kevin McCullough - - Reviewed by Tim Hatcheri and Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=21412 - Bug 21412: Refactor user initiated profile count to be more stable - - Export UString::from for use with creating the profile title. - - * JavaScriptCore.exp: - -2008-10-06 Maciej Stachowiak - - Not reviewed. Build fix. - - - revert toBoolean changes (r37333 and r37335); need to make WebCore work with these - - * API/JSValueRef.cpp: - (JSValueToBoolean): - * ChangeLog: - * JavaScriptCore.exp: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_loop_if_true): - (JSC::Machine::cti_op_not): - (JSC::Machine::cti_op_jtrue): - * kjs/ArrayPrototype.cpp: - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncSome): - * kjs/BooleanConstructor.cpp: - (JSC::constructBoolean): - (JSC::callBooleanConstructor): - * kjs/GetterSetter.h: - * kjs/JSCell.h: - (JSC::JSValue::toBoolean): - * kjs/JSNumberCell.cpp: - (JSC::JSNumberCell::toBoolean): - * kjs/JSNumberCell.h: - * kjs/JSObject.cpp: - (JSC::JSObject::toBoolean): - * kjs/JSObject.h: - * kjs/JSString.cpp: - (JSC::JSString::toBoolean): - * kjs/JSString.h: - * kjs/JSValue.h: - * kjs/RegExpConstructor.cpp: - (JSC::setRegExpConstructorMultiline): - * kjs/RegExpObject.cpp: - (JSC::RegExpObject::match): - * kjs/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): - -2008-10-06 Maciej Stachowiak - - Reviewed by Sam Weinig. - - - optimize op_jtrue, op_loop_if_true and op_not in various ways - https://bugs.webkit.org/show_bug.cgi?id=21404 - - 1) Make JSValue::toBoolean nonvirtual and completely inline by - making use of the StructureID type field. - - 2) Make JSValue::toBoolean not take an ExecState; doesn't need it. - - 3) Make op_not, op_loop_if_true and op_jtrue not read the - ExecState (toBoolean doesn't need it any more) and not check - exceptions (toBoolean can't throw). - - * API/JSValueRef.cpp: - (JSValueToBoolean): - * JavaScriptCore.exp: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_loop_if_true): - (JSC::Machine::cti_op_not): - (JSC::Machine::cti_op_jtrue): - * kjs/ArrayPrototype.cpp: - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncSome): - * kjs/BooleanConstructor.cpp: - (JSC::constructBoolean): - (JSC::callBooleanConstructor): - * kjs/GetterSetter.h: - * kjs/JSCell.h: - (JSC::JSValue::toBoolean): - * kjs/JSNumberCell.cpp: - * kjs/JSNumberCell.h: - (JSC::JSNumberCell::toBoolean): - * kjs/JSObject.cpp: - * kjs/JSObject.h: - (JSC::JSObject::toBoolean): - (JSC::JSCell::toBoolean): - * kjs/JSString.cpp: - * kjs/JSString.h: - (JSC::JSString::toBoolean): - * kjs/JSValue.h: - * kjs/RegExpConstructor.cpp: - (JSC::setRegExpConstructorMultiline): - * kjs/RegExpObject.cpp: - (JSC::RegExpObject::match): - * kjs/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): - -2008-10-06 Ariya Hidayat - - Reviewed by Simon. - - Build fix for MinGW. - - * JavaScriptCore.pri: - * kjs/DateMath.cpp: - (JSC::highResUpTime): - -2008-10-05 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Remove ScopeNode::containsClosures() now that it is unused. - - * kjs/nodes.h: - (JSC::ScopeNode::containsClosures): - -2008-10-05 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - fix releas-only test failures caused by the fix to bug 21375 - - * VM/Machine.cpp: - (JSC::Machine::unwindCallFrame): Update ExecState while unwinding call frames; - it now matters more to have a still-valid ExecState, since dynamicGlobalObject - will make use of the ExecState's scope chain. - * VM/Machine.h: - -2008-10-05 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 21364: Remove the branch in op_ret for OptionalCalleeActivation and OptionalCalleeArguments - - - Use information from the parser to detect whether an activation is - needed or 'arguments' is used, and emit explicit instructions to tear - them off before op_ret. This allows a branch to be removed from op_ret - and simplifies some other code. This does cause a small change in the - behaviour of 'f.arguments'; it is no longer live when 'arguments' is not - mentioned in the lexical scope of the function. - - It should now be easy to remove the OptionaCalleeActivation slot in the - call frame, but this will be done in a later patch. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitReturn): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (JSC::Machine::unwindCallFrame): - (JSC::Machine::privateExecute): - (JSC::Machine::retrieveArguments): - (JSC::Machine::cti_op_create_arguments): - (JSC::Machine::cti_op_tear_off_activation): - (JSC::Machine::cti_op_tear_off_arguments): - * VM/Machine.h: - * VM/Opcode.h: - * kjs/Arguments.cpp: - (JSC::Arguments::mark): - * kjs/Arguments.h: - (JSC::Arguments::isTornOff): - (JSC::Arguments::Arguments): - (JSC::Arguments::copyRegisters): - (JSC::JSActivation::copyRegisters): - * kjs/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): - * kjs/JSActivation.h: - -2008-10-05 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - - fixed "REGRESSION (r37297): fast/js/deep-recursion-test takes too long and times out" - https://bugs.webkit.org/show_bug.cgi?id=21375 - - The problem is that dynamicGlobalObject had become O(N) in number - of call frames, but unwinding the stack for an exception called it - for every call frame, resulting in O(N^2) behavior for an - exception thrown from inside deep recursion. - - Instead of doing it that way, stash the dynamic global object in JSGlobalData. - - * JavaScriptCore.exp: - * VM/Machine.cpp: - (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Helper class to temporarily - store and later restore a dynamicGlobalObject in JSGlobalData. - (JSC::DynamicGlobalObjectScope::~DynamicGlobalObjectScope): - (JSC::Machine::execute): In each version, establish a DynamicGlobalObjectScope. - For ProgramNode, always establish set new dynamicGlobalObject, for FunctionBody and Eval, - only if none is currently set. - * VM/Machine.h: - * kjs/ExecState.h: - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): Ininitalize new dynamicGlobalObject field to 0. - * kjs/JSGlobalData.h: - * kjs/JSGlobalObject.h: - (JSC::ExecState::dynamicGlobalObject): Moved here from ExecState for benefit of inlining. - Return lexical global object if this is a globalExec(), otherwise look in JSGlobalData - for the one stashed there. - -2008-10-05 Sam Weinig - - Reviewed by Maciej Stachowiak. - - Avoid an extra lookup when transitioning to an existing StructureID - by caching the offset of property that caused the transition. - - 1% win on V8 suite. Wash on SunSpider. - - * kjs/PropertyMap.cpp: - (JSC::PropertyMap::put): - * kjs/PropertyMap.h: - * kjs/StructureID.cpp: - (JSC::StructureID::StructureID): - (JSC::StructureID::addPropertyTransition): - * kjs/StructureID.h: - (JSC::StructureID::setCachedTransistionOffset): - (JSC::StructureID::cachedTransistionOffset): - -2008-10-05 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 21364: Remove the branch in op_ret for OptionalCalleeActivation and OptionalCalleeArguments - - - This patch does not yet remove the branch, but it does a bit of refactoring - so that a CodeGenerator now knows whether the associated CodeBlock will need - a full scope before doing any code generation. This makes it possible to emit - explicit tear-off instructions before every op_ret. - - * VM/CodeBlock.h: - (JSC::CodeBlock::CodeBlock): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::generate): - (JSC::CodeGenerator::CodeGenerator): - (JSC::CodeGenerator::emitPushScope): - (JSC::CodeGenerator::emitPushNewScope): - * kjs/nodes.h: - (JSC::ScopeNode::needsActivation): - -2008-10-05 Gavin Barraclough - - Reviewed by Cameron Zwarich. - - Fix for bug #21387 - using SamplingTool with CTI. - - (1) A repatch offset offset changes due to an additional instruction to update SamplingTool state. - (2) Fix an incusion order problem due to ExecState changes. - (3) Change to a MACHINE_SAMPLING macro, use of exec should now be accessing global data. - - * VM/CTI.h: - (JSC::CTI::execute): - * VM/SamplingTool.h: - (JSC::SamplingTool::privateExecuteReturned): - * kjs/Shell.cpp: - -2008-10-04 Mark Rowe - - Reviewed by Tim Hatcher. - - Add a 'Check For Weak VTables' build phase to catch weak vtables as early as possible. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-10-04 Sam Weinig - - Reviewed by Oliver Hunt. - - Fix https://bugs.webkit.org/show_bug.cgi?id=21320 - leaks of PropertyNameArrayData seen on buildbot - - - Fix RefPtr cycle by making PropertyNameArrayData's pointer back - to the StructureID a weak pointer. - - * kjs/PropertyNameArray.h: - (JSC::PropertyNameArrayData::setCachedStructureID): - (JSC::PropertyNameArrayData::cachedStructureID): - * kjs/StructureID.cpp: - (JSC::StructureID::getEnumerablePropertyNames): - (JSC::StructureID::clearEnumerationCache): - (JSC::StructureID::~StructureID): - -2008-10-04 Darin Adler - - Reviewed by Cameron Zwarich. - - - https://bugs.webkit.org/show_bug.cgi?id=21295 - Bug 21295: Replace ExecState with a call frame Register pointer - - 10% faster on Richards; other v8 benchmarks faster too. - A wash on SunSpider. - - This does the minimum necessary to get the speedup. Next step in - cleaning this up is to replace ExecState with a CallFrame class, - and be more judicious about when to pass a call frame and when - to pass a global data pointer, global object pointer, or perhaps - something else entirely. - - * VM/CTI.cpp: Remove the debug-only check of the exception in - ctiVMThrowTrampoline -- already checked in the code the trampoline - jumps to, so not all that useful. Removed the exec argument from - ctiTrampoline. Removed emitDebugExceptionCheck -- no longer needed. - (JSC::CTI::emitCall): Removed code to set ExecState::m_callFrame. - (JSC::CTI::privateCompileMainPass): Removed code in catch to extract - the exception from ExecState::m_exception; instead, the code that - jumps into catch will make sure the exception is already in eax. - * VM/CTI.h: Removed exec from the ctiTrampoline. Also removed the - non-helpful "volatile". Temporarily left ARG_exec in as a synonym - for ARG_r; I'll change that on a future cleanup pass when introducing - more use of the CallFrame type. - (JSC::CTI::execute): Removed the ExecState* argument. - - * VM/ExceptionHelpers.cpp: - (JSC::InterruptedExecutionError::InterruptedExecutionError): Take - JSGlobalData* instead of ExecState*. - (JSC::createInterruptedExecutionException): Ditto. - * VM/ExceptionHelpers.h: Ditto. Also removed an unneeded include. - - * VM/Machine.cpp: - (JSC::slideRegisterWindowForCall): Removed the exec and - exceptionValue arguments. Changed to return 0 when there's a stack - overflow rather than using a separate exception argument to cut - down on memory accesses in the calling convention. - (JSC::Machine::unwindCallFrame): Removed the exec argument when - constructing a DebuggerCallFrame. Also removed code to set - ExecState::m_callFrame. - (JSC::Machine::throwException): Removed the exec argument when - construction a DebuggerCallFrame. - (JSC::Machine::execute): Updated to use the register instead of - ExecState and also removed various uses of ExecState. - (JSC::Machine::debug): - (JSC::Machine::privateExecute): Put globalData into a local - variable so it can be used throughout the interpreter. Changed - the VM_CHECK_EXCEPTION to get the exception in globalData instead - of through ExecState. - (JSC::Machine::retrieveLastCaller): Turn exec into a registers - pointer by calling registers() instead of by getting m_callFrame. - (JSC::Machine::callFrame): Ditto. - Tweaked exception macros. Made new versions for when you know - you have an exception. Get at global exception with ARG_globalData. - Got rid of the need to pass in the return value type. - (JSC::Machine::cti_op_add): Update to use new version of exception - macros. - (JSC::Machine::cti_op_pre_inc): Ditto. - (JSC::Machine::cti_timeout_check): Ditto. - (JSC::Machine::cti_op_instanceof): Ditto. - (JSC::Machine::cti_op_new_func): Ditto. - (JSC::Machine::cti_op_call_JSFunction): Optimized by using the - ARG values directly instead of through local variables -- this gets - rid of code that just shuffles things around in the stack frame. - Also get rid of ExecState and update for the new way exceptions are - handled in slideRegisterWindowForCall. - (JSC::Machine::cti_vm_compile): Update to make exec out of r since - they are both the same thing now. - (JSC::Machine::cti_op_call_NotJSFunction): Ditto. - (JSC::Machine::cti_op_init_arguments): Ditto. - (JSC::Machine::cti_op_resolve): Ditto. - (JSC::Machine::cti_op_construct_JSConstruct): Ditto. - (JSC::Machine::cti_op_construct_NotJSConstruct): Ditto. - (JSC::Machine::cti_op_resolve_func): Ditto. - (JSC::Machine::cti_op_put_by_val): Ditto. - (JSC::Machine::cti_op_put_by_val_array): Ditto. - (JSC::Machine::cti_op_resolve_skip): Ditto. - (JSC::Machine::cti_op_resolve_global): Ditto. - (JSC::Machine::cti_op_post_inc): Ditto. - (JSC::Machine::cti_op_resolve_with_base): Ditto. - (JSC::Machine::cti_op_post_dec): Ditto. - (JSC::Machine::cti_op_call_eval): Ditto. - (JSC::Machine::cti_op_throw): Ditto. Also rearranged to return - the exception value as the return value so it can be used by - op_catch. - (JSC::Machine::cti_op_push_scope): Ditto. - (JSC::Machine::cti_op_in): Ditto. - (JSC::Machine::cti_op_del_by_val): Ditto. - (JSC::Machine::cti_vm_throw): Ditto. Also rearranged to return - the exception value as the return value so it can be used by - op_catch. - - * kjs/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::functionName): Pass globalData. - (JSC::DebuggerCallFrame::evaluate): Eliminated code to make a - new ExecState. - * kjs/DebuggerCallFrame.h: Removed ExecState argument from - constructor. - - * kjs/ExecState.h: Eliminated all data members and made ExecState - inherit privately from Register instead. Also added a typedef to - the future name for this class, which is CallFrame. It's just a - Register* that knows it's a pointer at a call frame. The new class - can't be constructed or copied. Changed all functions to use - the this pointer instead of m_callFrame. Changed exception-related - functions to access an exception in JSGlobalData. Removed functions - used by CTI to pass the return address to the throw machinery -- - this is now done directly with a global in the global data. - - * kjs/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): Pass globalData instead of exec. - - * kjs/InternalFunction.cpp: - (JSC::InternalFunction::name): Take globalData instead of exec. - * kjs/InternalFunction.h: Ditto. - - * kjs/JSGlobalData.cpp: Initialize the new exception global to 0. - * kjs/JSGlobalData.h: Declare two new globals. One for the current - exception and another for the return address used by CTI to - implement the throw operation. - - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): Removed code to set up globalExec, - which is now the same thing as globalCallFrame. - (JSC::JSGlobalObject::reset): Get globalExec from our globalExec - function so we don't have to repeat the logic twice. - (JSC::JSGlobalObject::mark): Removed code to mark the exception; - the exception is now stored in JSGlobalData and marked there. - (JSC::JSGlobalObject::globalExec): Return a pointer to the end - of the global call frame. - * kjs/JSGlobalObject.h: Removed the globalExec data member. - - * kjs/JSObject.cpp: - (JSC::JSObject::putDirectFunction): Pass globalData instead of exec. - - * kjs/collector.cpp: - (JSC::Heap::collect): Mark the global exception. - - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::addParentForConsoleStart): Pass globalData - instead of exec to createCallIdentifier. - - * profiler/Profiler.cpp: - (JSC::Profiler::willExecute): Pass globalData instead of exec to - createCallIdentifier. - (JSC::Profiler::didExecute): Ditto. - (JSC::Profiler::createCallIdentifier): Take globalData instead of - exec. - (JSC::createCallIdentifierFromFunctionImp): Ditto. - * profiler/Profiler.h: Change interface to take a JSGlobalData - instead of an ExecState. - -2008-10-04 Cameron Zwarich - - Reviewed by Darin Adler. - - Bug 21369: Add opcode documentation for all undocumented opcodes - - - This patch adds opcode documentation for all undocumented opcodes, and - it also renames op_init_arguments to op_create_arguments. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::CodeGenerator): - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_create_arguments): - * VM/Machine.h: - * VM/Opcode.h: - -2008-10-03 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - "this" object in methods called on primitives should be wrapper object - https://bugs.webkit.org/show_bug.cgi?id=21362 - - I changed things so that functions which use "this" do a fast - version of toThisObject conversion if needed. Currently we miss - the conversion entirely, at least for primitive types. Using - TypeInfo and the primitive check, I made the fast case bail out - pretty fast. - - This is inexplicably an 1.007x SunSpider speedup (and a wash on V8 benchmarks). - - Also renamed some opcodes for clarity: - - init ==> enter - init_activation ==> enter_with_activation - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::generate): - (JSC::CodeGenerator::CodeGenerator): - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_convert_this): - * VM/Machine.h: - * VM/Opcode.h: - * kjs/JSActivation.cpp: - (JSC::JSActivation::JSActivation): - * kjs/JSActivation.h: - (JSC::JSActivation::createStructureID): - * kjs/JSCell.h: - (JSC::JSValue::needsThisConversion): - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * kjs/JSGlobalData.h: - * kjs/JSNumberCell.h: - (JSC::JSNumberCell::createStructureID): - * kjs/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::JSStaticScopeObject): - (JSC::JSStaticScopeObject::createStructureID): - * kjs/JSString.h: - (JSC::JSString::createStructureID): - * kjs/JSValue.h: - * kjs/TypeInfo.h: - (JSC::TypeInfo::needsThisConversion): - * kjs/nodes.h: - (JSC::ScopeNode::usesThis): - -2008-10-03 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 21356: The size of the RegisterFile differs depending on 32-bit / 64-bit and Debug / Release - - - The RegisterFile decreases in size (measured in terms of numbers of - Registers) as the size of a Register increases. This causes - - js1_5/Regress/regress-159334.js - - to fail in 64-bit debug builds. This fix makes the RegisterFile on all - platforms the same size that it is in 32-bit Release builds. - - * VM/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - -2008-10-03 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - Some code cleanup to how we handle code features. - - 1) Rename FeatureInfo typedef to CodeFeatures. - 2) Rename NodeFeatureInfo template to NodeInfo. - 3) Keep CodeFeature bitmask in ScopeNode instead of trying to break it out into individual bools. - 4) Rename misleadingly named "needsClosure" method to "containsClosures", which better describes the meaning - of ClosureFeature. - 5) Make setUsersArguments() not take an argument since it only goes one way. - - * JavaScriptCore.exp: - * VM/CodeBlock.h: - (JSC::CodeBlock::CodeBlock): - * kjs/NodeInfo.h: - * kjs/Parser.cpp: - (JSC::Parser::didFinishParsing): - * kjs/Parser.h: - (JSC::Parser::parse): - * kjs/grammar.y: - * kjs/nodes.cpp: - (JSC::ScopeNode::ScopeNode): - (JSC::ProgramNode::ProgramNode): - (JSC::ProgramNode::create): - (JSC::EvalNode::EvalNode): - (JSC::EvalNode::create): - (JSC::FunctionBodyNode::FunctionBodyNode): - (JSC::FunctionBodyNode::create): - * kjs/nodes.h: - (JSC::ScopeNode::usesEval): - (JSC::ScopeNode::containsClosures): - (JSC::ScopeNode::usesArguments): - (JSC::ScopeNode::setUsesArguments): - -2008-10-03 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 21343: REGRESSSION (r37160): ecma_3/ExecutionContexts/10.1.3-1.js and js1_4/Functions/function-001.js fail on 64-bit - - - A fix was landed for this issue in r37253, and the ChangeLog assumes - that it is a compiler bug, but it turns out that it is a subtle issue - with mixing signed and unsigned 32-bit values in a 64-bit environment. - In order to properly fix this bug, we should convert our signed offsets - into the register file to use ptrdiff_t. - - This may not be the only instance of this issue, but I will land this - fix first and look for more later. - - * VM/Machine.cpp: - (JSC::Machine::getArgumentsData): - * VM/Machine.h: - * kjs/Arguments.cpp: - (JSC::Arguments::getOwnPropertySlot): - * kjs/Arguments.h: - (JSC::Arguments::init): - -2008-10-03 Darin Adler - - * VM/CTI.cpp: Another Windows build fix. Change the args of ctiTrampoline. - - * kjs/JSNumberCell.h: A build fix for newer versions of gcc. Added - declarations of JSGlobalData overloads of jsNumberCell. - -2008-10-03 Darin Adler - - - try to fix Windows build - - * kjs/ScopeChain.h: Add forward declaration of JSGlobalData. - -2008-10-03 Darin Adler - - Reviewed by Geoff Garen. - - - next step of https://bugs.webkit.org/show_bug.cgi?id=21295 - Turn ExecState into a call frame pointer. - - Remove m_globalObject and m_globalData from ExecState. - - SunSpider says this is a wash (slightly faster but not statistically - significant); which is good enough since it's a preparation step and - not supposed to be a spedup. - - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::JSCallbackFunction): - * kjs/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - * kjs/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - * kjs/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * kjs/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * kjs/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - * kjs/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - * kjs/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * kjs/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - * kjs/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - * kjs/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * kjs/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - * kjs/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - Pass JSGlobalData* instead of ExecState* to the InternalFunction - constructor. - - * API/OpaqueJSString.cpp: Added now-needed include. - - * JavaScriptCore.exp: Updated. - - * VM/CTI.cpp: - (JSC::CTI::emitSlowScriptCheck): Changed to use ARGS_globalData - instead of ARGS_exec. - - * VM/CTI.h: Added a new argument to the CTI, the global data pointer. - While it's possible to get to the global data pointer using the - ExecState pointer, it's slow enough that it's better to just keep - it around in the CTI arguments. - - * VM/CodeBlock.h: Moved the CodeType enum here from ExecState.h. - - * VM/Machine.cpp: - (JSC::Machine::execute): Pass fewer arguments when constructing - ExecState, and pass the global data pointer when invoking CTI. - (JSC::Machine::firstCallFrame): Added. Used to get the dynamic global - object, which is in the scope chain of the first call frame. - (JSC::Machine::cti_op_add): Use globalData instead of exec when - possible, to keep fast cases fast, since it's now more expensive to - get to it through the exec pointer. - (JSC::Machine::cti_timeout_check): Ditto. - (JSC::Machine::cti_op_put_by_id_second): Ditto. - (JSC::Machine::cti_op_get_by_id_second): Ditto. - (JSC::Machine::cti_op_mul): Ditto. - (JSC::Machine::cti_vm_compile): Ditto. - (JSC::Machine::cti_op_get_by_val): Ditto. - (JSC::Machine::cti_op_sub): Ditto. - (JSC::Machine::cti_op_put_by_val): Ditto. - (JSC::Machine::cti_op_put_by_val_array): Ditto. - (JSC::Machine::cti_op_negate): Ditto. - (JSC::Machine::cti_op_div): Ditto. - (JSC::Machine::cti_op_pre_dec): Ditto. - (JSC::Machine::cti_op_post_inc): Ditto. - (JSC::Machine::cti_op_lshift): Ditto. - (JSC::Machine::cti_op_bitand): Ditto. - (JSC::Machine::cti_op_rshift): Ditto. - (JSC::Machine::cti_op_bitnot): Ditto. - (JSC::Machine::cti_op_mod): Ditto. - (JSC::Machine::cti_op_post_dec): Ditto. - (JSC::Machine::cti_op_urshift): Ditto. - (JSC::Machine::cti_op_bitxor): Ditto. - (JSC::Machine::cti_op_bitor): Ditto. - (JSC::Machine::cti_op_call_eval): Ditto. - (JSC::Machine::cti_op_throw): Ditto. - (JSC::Machine::cti_op_is_string): Ditto. - (JSC::Machine::cti_op_debug): Ditto. - (JSC::Machine::cti_vm_throw): Ditto. - - * VM/Machine.h: Added firstCallFrame. - - * kjs/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): Pass fewer arguments when - constructing ExecState. - - * kjs/ExecState.cpp: Deleted contents. Later we'll remove the - file altogether. - - * kjs/ExecState.h: Removed m_globalObject and m_globalData. - Moved CodeType into another header. - (JSC::ExecState::ExecState): Take only a single argument, a - call frame pointer. - (JSC::ExecState::dynamicGlobalObject): Get the object from - the first call frame since it's no longer stored. - (JSC::ExecState::globalData): Get the global data from the - scope chain, since we no longer store a pointer to it here. - (JSC::ExecState::identifierTable): Ditto. - (JSC::ExecState::propertyNames): Ditto. - (JSC::ExecState::emptyList): Ditto. - (JSC::ExecState::lexer): Ditto. - (JSC::ExecState::parser): Ditto. - (JSC::ExecState::machine): Ditto. - (JSC::ExecState::arrayTable): Ditto. - (JSC::ExecState::dateTable): Ditto. - (JSC::ExecState::mathTable): Ditto. - (JSC::ExecState::numberTable): Ditto. - (JSC::ExecState::regExpTable): Ditto. - (JSC::ExecState::regExpConstructorTable): Ditto. - (JSC::ExecState::stringTable): Ditto. - (JSC::ExecState::heap): Ditto. - - * kjs/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): Pass - JSGlobalData* instead of ExecState* to the InternalFunction - constructor. - (JSC::constructFunction): Pass the global data pointer when - constructing a new scope chain. - - * kjs/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): Take a JSGlobalData* - instead of an ExecState*. Later we can change more places to - work this way -- it's more efficient to take the type you need - since the caller might already have it. - * kjs/InternalFunction.h: Ditto. - - * kjs/JSCell.h: - (JSC::JSCell::operator new): Added an overload that takes a - JSGlobalData* so you can construct without an ExecState*. - - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): Moved creation of the global scope - chain in here, since it now requires a pointer to the global data. - Moved the initialization of the call frame in here since it requires - the global scope chain node. Removed the extra argument to ExecState - when creating the global ExecState*. - * kjs/JSGlobalObject.h: Removed initialization of globalScopeChain - and the call frame from the JSGlobalObjectData constructor. Added - a thisValue argument to the init function. - - * kjs/JSNumberCell.cpp: Added versions of jsNumberCell that take - JSGlobalData* rather than ExecState*. - * kjs/JSNumberCell.h: - (JSC::JSNumberCell::operator new): Added a version that takes - JSGlobalData*. - (JSC::JSNumberCell::JSNumberCell): Ditto. - (JSC::jsNumber): Ditto. - * kjs/JSString.cpp: - (JSC::jsString): Ditto. - (JSC::jsSubstring): Ditto. - (JSC::jsOwnedString): Ditto. - * kjs/JSString.h: - (JSC::JSString::JSString): Changed to take JSGlobalData*. - (JSC::jsEmptyString): Added a version that takes JSGlobalData*. - (JSC::jsSingleCharacterString): Ditto. - (JSC::jsSingleCharacterSubstring): Ditto. - (JSC::jsNontrivialString): Ditto. - (JSC::JSString::getIndex): Ditto. - (JSC::jsString): Ditto. - (JSC::jsSubstring): Ditto. - (JSC::jsOwnedString): Ditto. - - * kjs/ScopeChain.h: Added a globalData pointer to each node. - (JSC::ScopeChainNode::ScopeChainNode): Initialize the globalData - pointer. - (JSC::ScopeChainNode::push): Set the global data pointer in the - new node. - (JSC::ScopeChain::ScopeChain): Take a globalData argument. - - * kjs/SmallStrings.cpp: - (JSC::SmallStrings::createEmptyString): Take JSGlobalData* instead of - ExecState*. - (JSC::SmallStrings::createSingleCharacterString): Ditto. - * kjs/SmallStrings.h: - (JSC::SmallStrings::emptyString): Ditto. - (JSC::SmallStrings::singleCharacterString): Ditto. - -2008-10-03 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 21343: REGRESSSION (r37160): ecma_3/ExecutionContexts/10.1.3-1.js and js1_4/Functions/function-001.js fail on 64-bit - - - Add a workaround for a bug in GCC, which affects GCC 4.0, GCC 4.2, and - llvm-gcc 4.2. I put it in an #ifdef because it was a slight regression - on SunSpider in 32-bit, although that might be entirely random. - - * kjs/Arguments.cpp: - (JSC::Arguments::getOwnPropertySlot): - -2008-10-03 Darin Adler - - Rubber stamped by Alexey Proskuryakov. - - * kjs/Shell.cpp: (main): Don't delete JSGlobalData. Later, we need to change - this tool to use public JavaScriptCore API instead. - -2008-10-03 Darin Adler - - Suggested by Alexey Proskuryakov. - - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::~JSGlobalData): Remove call to heap.destroy() because - it's too late to ref the JSGlobalData object once it's already being - destroyed. In practice this is not a problem because WebCore's JSGlobalData - is never destroyed and JSGlobalContextRelease takes care of calling - heap.destroy() in advance. - -2008-10-02 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Replace SSE3 check with an SSE2 check, and implement SSE2 check on windows. - - 5.6% win on SunSpider on windows. - - * VM/CTI.cpp: - (JSC::isSSE2Present): - (JSC::CTI::compileBinaryArithOp): - (JSC::CTI::compileBinaryArithOpSlowCase): - -2008-10-03 Maciej Stachowiak - - Rubber stamped by Cameron Zwarich. - - - fix mistaken change of | to || which caused a big perf regression on EarleyBoyer - - * kjs/grammar.y: - -2008-10-02 Darin Adler - - Reviewed by Geoff Garen. - - - https://bugs.webkit.org/show_bug.cgi?id=21321 - Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData - - 1.019x as fast on SunSpider. - - * API/JSBase.cpp: - (JSEvaluateScript): Use heap. instead of heap-> to work with the heap. - (JSCheckScriptSyntax): Ditto. - (JSGarbageCollect): Ditto. - (JSReportExtraMemoryCost): Ditto. - * API/JSContextRef.cpp: - (JSGlobalContextRetain): Ditto. - (JSGlobalContextRelease): Destroy the heap with the destroy function instead - of the delete operator. - (JSContextGetGlobalObject): Use heap. instead of heap-> to work with the heap. - * API/JSObjectRef.cpp: - (JSObjectMake): Use heap. instead of heap-> to work with the heap. - (JSObjectMakeFunctionWithCallback): Ditto. - (JSObjectMakeConstructor): Ditto. - (JSObjectMakeFunction): Ditto. - (JSObjectMakeArray): Ditto. - (JSObjectMakeDate): Ditto. - (JSObjectMakeError): Ditto. - (JSObjectMakeRegExp): Ditto. - (JSObjectHasProperty): Ditto. - (JSObjectGetProperty): Ditto. - (JSObjectSetProperty): Ditto. - (JSObjectGetPropertyAtIndex): Ditto. - (JSObjectSetPropertyAtIndex): Ditto. - (JSObjectDeleteProperty): Ditto. - (JSObjectCallAsFunction): Ditto. - (JSObjectCallAsConstructor): Ditto. - (JSObjectCopyPropertyNames): Ditto. - (JSPropertyNameAccumulatorAddName): Ditto. - * API/JSValueRef.cpp: - (JSValueIsEqual): Ditto. - (JSValueIsInstanceOfConstructor): Ditto. - (JSValueMakeNumber): Ditto. - (JSValueMakeString): Ditto. - (JSValueToNumber): Ditto. - (JSValueToStringCopy): Ditto. - (JSValueToObject): Ditto. - (JSValueProtect): Ditto. - (JSValueUnprotect): Ditto. - - * kjs/ExecState.h: - (JSC::ExecState::heap): Update to use the & operator. - - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): Update to initialize a heap member - instead of calling new to make a heap. - (JSC::JSGlobalData::~JSGlobalData): Destroy the heap with the destroy - function instead of the delete operator. - * kjs/JSGlobalData.h: Change from Heap* to a Heap. - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::mark): Use the & operator here. - (JSC::JSGlobalObject::operator new): Use heap. instead of heap-> to work - with the heap. - -2008-10-02 Cameron Zwarich - - Reviewed by Geoff Garen. - - Bug 21317: Replace RegisterFile size and capacity information with Register pointers - - - This is a 2.3% speedup on the V8 DeltaBlue benchmark, a 3.3% speedup on - the V8 Raytrace benchmark, and a 1.0% speedup on SunSpider. - - * VM/Machine.cpp: - (JSC::slideRegisterWindowForCall): - (JSC::Machine::callEval): - (JSC::Machine::execute): - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_op_construct_JSConstruct): - * VM/RegisterFile.cpp: - (JSC::RegisterFile::~RegisterFile): - * VM/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - (JSC::RegisterFile::start): - (JSC::RegisterFile::end): - (JSC::RegisterFile::size): - (JSC::RegisterFile::shrink): - (JSC::RegisterFile::grow): - (JSC::RegisterFile::lastGlobal): - (JSC::RegisterFile::markGlobals): - (JSC::RegisterFile::markCallFrames): - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::copyGlobalsTo): - -2008-10-02 Cameron Zwarich - - Rubber-stamped by Darin Adler. - - Change bitwise operations introduced in r37166 to boolean operations. We - only use bitwise operations over boolean operations for increasing - performance in extremely hot code, but that does not apply to anything - in the parser. - - * kjs/grammar.y: - -2008-10-02 Gavin Barraclough - - Reviewed by Darin Adler. - - Fix for bug #21232 - should reset m_isPendingDash on flush, - and should allow '\-' as beginning or end of a range (though - not to specifiy a range itself). - - * ChangeLog: - * wrec/CharacterClassConstructor.cpp: - (JSC::CharacterClassConstructor::put): - (JSC::CharacterClassConstructor::flush): - * wrec/CharacterClassConstructor.h: - (JSC::CharacterClassConstructor::flushBeforeEscapedHyphen): - * wrec/WREC.cpp: - (JSC::WRECGenerator::generateDisjunction): - (JSC::WRECParser::parseCharacterClass): - (JSC::WRECParser::parseDisjunction): - * wrec/WREC.h: - -2008-10-02 Darin Adler - - Reviewed by Sam Weinig. - - - remove the "static" from declarations in a header file, since we - don't want them to have internal linkage - - * VM/Machine.h: Remove the static keyword from the constant and the - three inline functions that Geoff just moved here. - -2008-10-02 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=21283. - Profiler Crashes When Started - - * VM/Machine.cpp: - * VM/Machine.h: - (JSC::makeHostCallFramePointer): - (JSC::isHostCallFrame): - (JSC::stripHostCallFrameBit): Moved some things to the header so - JSGlobalObject could use them. - - * kjs/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): Call the - new makeHostCallFramePointer API, since 0 no longer indicates a host - call frame. - -2008-10-02 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=21304 - Stop using a static wrapper map for WebCore JS bindings - - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::~JSGlobalData): - (JSC::JSGlobalData::ClientData::~ClientData): - * kjs/JSGlobalData.h: - Added a client data member to JSGlobalData. WebCore will use it to store bindings-related - global data. - - * JavaScriptCore.exp: Export virtual ClientData destructor. - -2008-10-02 Geoffrey Garen - - Not reviewed. - - Try to fix Qt build. - - * kjs/Error.h: - -2008-10-01 Geoffrey Garen - - Reviewed by Darin Adler and Cameron Zwarich. - - Preliminary step toward dynamic recompilation: Standardized and - simplified the parsing interface. - - The main goal in this patch is to make it easy to ask for a duplicate - compilation, and get back a duplicate result -- same source URL, same - debugger / profiler ID, same toString behavior, etc. - - The basic unit of compilation and evaluation is now SourceCode, which - encompasses a SourceProvider, a range in that provider, and a starting - line number. - - A SourceProvider now encompasses a source URL, and *is* a source ID, - since a pointer is a unique identifier. - - * API/JSBase.cpp: - (JSEvaluateScript): - (JSCheckScriptSyntax): Provide a SourceCode to the Interpreter, since - other APIs are no longer supported. - - * VM/CodeBlock.h: - (JSC::EvalCodeCache::get): Provide a SourceCode to the Interpreter, since - other APIs are no longer supported. - (JSC::CodeBlock::CodeBlock): ASSERT something that used to be ASSERTed - by our caller -- this is a better bottleneck. - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::CodeGenerator): Updated for the fact that - FunctionBodyNode's parameters are no longer a WTF::Vector. - - * kjs/Arguments.cpp: - (JSC::Arguments::Arguments): ditto - - * kjs/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): Provide a SourceCode to the Parser, - since other APIs are no longer supported. - - * kjs/FunctionConstructor.cpp: - (JSC::constructFunction): Provide a SourceCode to the Parser, since - other APIs are no longer supported. Adopt FunctionBodyNode's new - "finishParsing" API. - - * kjs/JSFunction.cpp: - (JSC::JSFunction::lengthGetter): - (JSC::JSFunction::getParameterName): Updated for the fact that - FunctionBodyNode's parameters are no longer a wtf::Vector. - - * kjs/JSFunction.h: Nixed some cruft. - - * kjs/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): Provide a SourceCode to the Parser, since - other APIs are no longer supported. - - * kjs/Parser.cpp: - (JSC::Parser::parse): Require a SourceCode argument, instead of a bunch - of broken out parameters. Stop tracking sourceId as an integer, since we - use the SourceProvider pointer for this now. Don't clamp the - startingLineNumber, since SourceCode does that now. - - * kjs/Parser.h: - (JSC::Parser::parse): Standardized the parsing interface to require a - SourceCode. - - * kjs/Shell.cpp: - (functionRun): - (functionLoad): - (prettyPrintScript): - (runWithScripts): - (runInteractive): Provide a SourceCode to the Interpreter, since - other APIs are no longer supported. - - * kjs/SourceProvider.h: - (JSC::SourceProvider::SourceProvider): - (JSC::SourceProvider::url): - (JSC::SourceProvider::asId): - (JSC::UStringSourceProvider::create): - (JSC::UStringSourceProvider::UStringSourceProvider): Added new - responsibilities described above. - - * kjs/SourceRange.h: - (JSC::SourceCode::SourceCode): - (JSC::SourceCode::toString): - (JSC::SourceCode::provider): - (JSC::SourceCode::firstLine): - (JSC::SourceCode::data): - (JSC::SourceCode::length): Added new responsibilities described above. - Renamed SourceRange to SourceCode, based on review feedback. Added - a makeSource function for convenience. - - * kjs/debugger.h: Provide a SourceCode to the client, since other APIs - are no longer supported. - - * kjs/grammar.y: Provide startingLineNumber when creating a SourceCode. - - * kjs/debugger.h: Treat sourceId as intptr_t to avoid loss of precision - on 64bit platforms. - - * kjs/interpreter.cpp: - (JSC::Interpreter::checkSyntax): - (JSC::Interpreter::evaluate): - * kjs/interpreter.h: Require a SourceCode instead of broken out arguments. - - * kjs/lexer.cpp: - (JSC::Lexer::setCode): - * kjs/lexer.h: - (JSC::Lexer::sourceRange): Fold together the SourceProvider and line number - into a SourceCode. Fixed a bug where the Lexer would accidentally keep - alive the last SourceProvider forever. - - * kjs/nodes.cpp: - (JSC::ScopeNode::ScopeNode): - (JSC::ProgramNode::ProgramNode): - (JSC::ProgramNode::create): - (JSC::EvalNode::EvalNode): - (JSC::EvalNode::generateCode): - (JSC::EvalNode::create): - (JSC::FunctionBodyNode::FunctionBodyNode): - (JSC::FunctionBodyNode::finishParsing): - (JSC::FunctionBodyNode::create): - (JSC::FunctionBodyNode::generateCode): - (JSC::ProgramNode::generateCode): - (JSC::FunctionBodyNode::paramString): - * kjs/nodes.h: - (JSC::ScopeNode::): - (JSC::ScopeNode::sourceId): - (JSC::FunctionBodyNode::): - (JSC::FunctionBodyNode::parameterCount): - (JSC::FuncExprNode::): - (JSC::FuncDeclNode::): Store a SourceCode in all ScopeNodes, since - SourceCode is now responsible for tracking URL, ID, etc. Streamlined - some ad hoc FunctionBodyNode fixups into a "finishParsing" function, to - help make clear what you need to do in order to finish parsing a - FunctionBodyNode. - - * wtf/Vector.h: - (WTF::::releaseBuffer): Don't ASSERT that releaseBuffer() is only called - when buffer is not 0, since FunctionBodyNode is more than happy - to get back a 0 buffer, and other functions like RefPtr::release() allow - for 0, too. - -2008-10-01 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 21289: REGRESSION (r37160): Inspector crashes on load - - - The code in Arguments::mark() in r37160 was wrong. It marks indices in - d->registers, but that makes no sense (they are local variables, not - arguments). It should mark those indices in d->registerArray instead. - - This patch also changes Arguments::copyRegisters() to use d->numParameters - instead of recomputing it. - - * kjs/Arguments.cpp: - (JSC::Arguments::mark): - * kjs/Arguments.h: - (JSC::Arguments::copyRegisters): - -2008-09-30 Darin Adler - - Reviewed by Eric Seidel. - - - https://bugs.webkit.org/show_bug.cgi?id=21214 - work on getting rid of ExecState - - Eliminate some unneeded uses of dynamicGlobalObject. - - * API/JSClassRef.cpp: - (OpaqueJSClass::contextData): Changed to use a map in the global data instead - of on the global object. Also fixed to use only a single hash table lookup. - - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): Use lexicalGlobalObject rather than dynamicGlobalObject - to get the object prototype. - - * kjs/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): Use arrayVisitedElements set in global data rather - than in the global object. - (JSC::arrayProtoFuncToLocaleString): Ditto. - (JSC::arrayProtoFuncJoin): Ditto. - - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): Don't initialize opaqueJSClassData, since - it's no longer a pointer. - (JSC::JSGlobalData::~JSGlobalData): We still need to delete all the values, but - we don't need to delete the map since it's no longer a pointer. - - * kjs/JSGlobalData.h: Made opaqueJSClassData a map instead of a pointer to a map. - Also added arrayVisitedElements. - - * kjs/JSGlobalObject.h: Removed arrayVisitedElements. - - * kjs/Shell.cpp: - (functionRun): Use lexicalGlobalObject instead of dynamicGlobalObject. - (functionLoad): Ditto. - -2008-10-01 Cameron Zwarich - - Not reviewed. - - Speculative Windows build fix. - - * kjs/grammar.y: - -2008-10-01 Cameron Zwarich - - Reviewed by Darin Adler. - - Bug 21123: using "arguments" in a function should not force creation of an activation object - - - Make the 'arguments' object not require a JSActivation. We store the - 'arguments' object in the OptionalCalleeArguments call frame slot. We - need to be able to get the original 'arguments' object to tear it off - when returning from a function, but 'arguments' may be assigned to in a - number of ways. - - Therefore, we use the OptionalCalleeArguments slot when we want to get - the original activation or we know that 'arguments' was not assigned a - different value. When 'arguments' may have been assigned a new value, - we use a new local variable that is initialized with 'arguments'. Since - a function parameter named 'arguments' may overwrite the value of - 'arguments', we also need to be careful to look up 'arguments' in the - symbol table, so we get the parameter named 'arguments' instead of the - local variable that we have added for holding the 'arguments' object. - - This is a 19.1% win on the V8 Raytrace benchmark using the SunSpider - harness, and a 20.7% win using the V8 harness. This amounts to a 6.5% - total speedup on the V8 benchmark suite using the V8 harness. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::CodeGenerator): - * VM/Machine.cpp: - (JSC::Machine::unwindCallFrame): - (JSC::Machine::privateExecute): - (JSC::Machine::retrieveArguments): - (JSC::Machine::cti_op_init_arguments): - (JSC::Machine::cti_op_ret_activation_arguments): - * VM/Machine.h: - * VM/RegisterFile.h: - (JSC::RegisterFile::): - * kjs/Arguments.cpp: - (JSC::Arguments::mark): - (JSC::Arguments::fillArgList): - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::put): - * kjs/Arguments.h: - (JSC::Arguments::setRegisters): - (JSC::Arguments::init): - (JSC::Arguments::Arguments): - (JSC::Arguments::copyRegisters): - (JSC::JSActivation::copyRegisters): - * kjs/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): - * kjs/JSActivation.h: - (JSC::JSActivation::JSActivationData::JSActivationData): - * kjs/grammar.y: - * kjs/nodes.h: - (JSC::ScopeNode::setUsesArguments): - * masm/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::orl_mr): - -2008-10-01 Kevin McCullough - - Rubberstamped by Geoff Garen. - - Remove BreakpointCheckStatement because it's not used anymore. - No effect on sunspider or the jsc tests. - - * kjs/nodes.cpp: - * kjs/nodes.h: - -2008-09-30 Oliver Hunt - - Reviewed by Geoff Garen. - - Improve performance of CTI on windows. - - Currently on platforms where the compiler doesn't allow us to safely - index relative to the address of a parameter we need to actually - provide a pointer to CTI runtime call arguments. This patch improves - performance in this case by making the CTI logic for restoring this - parameter much less conservative by only resetting it before we actually - make a call, rather than between each and every SF bytecode we generate - code for. - - This results in a 3.6% progression on the v8 benchmark when compiled with MSVC. - - * VM/CTI.cpp: - (JSC::CTI::emitCall): - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompilePutByIdTransition): - * VM/CTI.h: - * masm/X86Assembler.h: - * wtf/Platform.h: - -2008-09-30 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - - track uses of "this", "with" and "catch" in the parser - - Knowing this up front will be useful for future optimizations. - - Perf and correctness remain the same. - - * kjs/NodeInfo.h: - * kjs/grammar.y: - -2008-09-30 Sam Weinig - - Reviewed by Mark Rowe. - - Add WebKitAvailability macros for JSObjectMakeArray, JSObjectMakeDate, JSObjectMakeError, - and JSObjectMakeRegExp - - * API/JSObjectRef.h: - -2008-09-30 Darin Adler - - Reviewed by Geoff Garen. - - - https://bugs.webkit.org/show_bug.cgi?id=21214 - work on getting rid of ExecState - - Replaced the m_prev field of ExecState with a bit in the - call frame pointer to indicate "host" call frames. - - * VM/Machine.cpp: - (JSC::makeHostCallFramePointer): Added. Sets low bit. - (JSC::isHostCallFrame): Added. Checks low bit. - (JSC::stripHostCallFrameBit): Added. Clears low bit. - (JSC::Machine::unwindCallFrame): Replaced null check that was - formerly used to detect host call frames with an isHostCallFrame check. - (JSC::Machine::execute): Pass in a host call frame pointer rather than - always passing 0 when starting execution from the host. This allows us - to follow the entire call frame pointer chain when desired, or to stop - at the host calls when that's desired. - (JSC::Machine::privateExecute): Replaced null check that was - formerly used to detect host call frames with an isHostCallFrame check. - (JSC::Machine::retrieveCaller): Ditto. - (JSC::Machine::retrieveLastCaller): Ditto. - (JSC::Machine::callFrame): Removed the code to walk up m_prev pointers - and replaced it with code that uses the caller pointer and uses the - stripHostCallFrameBit function. - - * kjs/ExecState.cpp: Removed m_prev. - * kjs/ExecState.h: Ditto. - -2008-09-30 Cameron Zwarich - - Reviewed by Geoff Garen. - - Move all detection of 'arguments' in a lexical scope to the parser, in - preparation for fixing - - Bug 21123: using "arguments" in a function should not force creation of an activation object - - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::CodeGenerator): - * kjs/NodeInfo.h: - * kjs/grammar.y: - -2008-09-30 Geoffrey Garen - - Not reviewed. - - * kjs/Shell.cpp: - (runWithScripts): Fixed indentation. - -2008-09-30 Mark Rowe - - Rubber-stamped by Sam Weinig. - - Build fix. Move InternalFunction::classInfo implementation into the .cpp - file to prevent the vtable for InternalFunction being generated as a weak symbol. - Has no effect on SunSpider. - - * kjs/InternalFunction.cpp: - (JSC::InternalFunction::classInfo): - * kjs/InternalFunction.h: - -2008-09-29 Maciej Stachowiak - - Reviewed by Darin Adler. - - - optimize appending a number to a string - https://bugs.webkit.org/show_bug.cgi?id=21203 - - It's pretty common in real-world code (and on some of the v8 - benchmarks) to append a number to a string, so I made this one of - the fast cases, and also added support to UString to do it - directly without allocating a temporary UString. - - ~1% speedup on v8 benchmark. - - * VM/Machine.cpp: - (JSC::jsAddSlowCase): Make this NEVER_INLINE because somehow otherwise - the change is a regression. - (JSC::jsAdd): Handle number + string special case. - (JSC::Machine::cti_op_add): Integrate much of the logic of jsAdd to - avoid exception check in the str + str, num + num and str + num cases. - * kjs/ustring.cpp: - (JSC::expandedSize): Make this a non-member function, since it needs to be - called in non-member functions but not outside this file. - (JSC::expandCapacity): Ditto. - (JSC::UString::expandCapacity): Call the non-member version. - (JSC::createRep): Helper to make a rep from a char*. - (JSC::UString::UString): Use above helper. - (JSC::concatenate): Guts of concatenating constructor for cases where first - item is a UString::Rep, and second is a UChar* and length, or a char*. - (JSC::UString::append): Implement for cases where first item is a UString::Rep, - and second is an int or double. Sadly duplicates logic of UString::from(int) - and UString::from(double). - * kjs/ustring.h: - -2008-09-29 Darin Adler - - Reviewed by Sam Weinig. - - - https://bugs.webkit.org/show_bug.cgi?id=21214 - work on getting rid of ExecState - - * JavaScriptCore.exp: Updated since JSGlobalObject::init - no longer takes a parameter. - - * VM/Machine.cpp: - (JSC::Machine::execute): Removed m_registerFile argument - for ExecState constructors. - - * kjs/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): Removed globalThisValue - argument for ExecState constructor. - - * kjs/ExecState.cpp: - (JSC::ExecState::ExecState): Removed globalThisValue and - registerFile arguments to constructors. - - * kjs/ExecState.h: Removed m_globalThisValue and - m_registerFile data members. - - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): Removed globalThisValue - argument for ExecState constructor. - - * kjs/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObject): Got rid of parameter - for the init function. - -2008-09-29 Geoffrey Garen - - Rubber-stamped by Cameron Zwarich. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=21225 - Machine::retrieveLastCaller should check for a NULL codeBlock - - In order to crash, you would need to call retrieveCaller in a situation - where you had two host call frames in a row in the register file. I - don't know how to make that happen, or if it's even possible, so I don't - have a test case -- but better safe than sorry! - - * VM/Machine.cpp: - (JSC::Machine::retrieveLastCaller): - -2008-09-29 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Store the callee ScopeChain, not the caller ScopeChain, in the call frame - header. Nix the "scopeChain" local variable and ExecState::m_scopeChain, and - access the callee ScopeChain through the call frame header instead. - - Profit: call + return are simpler, because they don't have to update the - "scopeChain" local variable, or ExecState::m_scopeChain. - - Because CTI keeps "r" in a register, reading the callee ScopeChain relative - to "r" can be very fast, in any cases we care to optimize. - - 0% speedup on empty function call benchmark. (5.5% speedup in bytecode.) - 0% speedup on SunSpider. (7.5% speedup on controlflow-recursive.) - 2% speedup on SunSpider --v8. - 2% speedup on v8 benchmark. - - * VM/CTI.cpp: Changed scope chain access to read the scope chain from - the call frame header. Sped up op_ret by changing it not to fuss with - the "scopeChain" local variable or ExecState::m_scopeChain. - - * VM/CTI.h: Updated CTI trampolines not to take a ScopeChainNode* - argument, since that's stored in the call frame header now. - - * VM/Machine.cpp: Access "scopeChain" and "codeBlock" through new helper - functions that read from the call frame header. Updated functions operating - on ExecState::m_callFrame to account for / take advantage of the fact that - Exec:m_callFrame is now never NULL. - - Fixed a bug in op_construct, where it would use the caller's default - object prototype, rather than the callee's, when constructing a new object. - - * VM/Machine.h: Made some helper functions available. Removed - ScopeChainNode* arguments to a lot of functions, since the ScopeChainNode* - is now stored in the call frame header. - - * VM/RegisterFile.h: Renamed "CallerScopeChain" to "ScopeChain", since - that's what it is now. - - * kjs/DebuggerCallFrame.cpp: Updated for change to ExecState signature. - - * kjs/ExecState.cpp: - * kjs/ExecState.h: Nixed ExecState::m_callFrame, along with the unused - isGlobalObject function. - - * kjs/JSGlobalObject.cpp: - * kjs/JSGlobalObject.h: Gave the global object a fake call frame in - which to store the global scope chain, since our code now assumes that - it can always read the scope chain out of the ExecState's call frame. - -2008-09-29 Cameron Zwarich - - Reviewed by Sam Weinig. - - Remove the isActivationObject() virtual method on JSObject and use - StructureID information instead. This should be slightly faster, but - isActivationObject() is only used in assertions and unwinding the stack - for exceptions. - - * VM/Machine.cpp: - (JSC::depth): - (JSC::Machine::unwindCallFrame): - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_ret_activation): - * kjs/JSActivation.cpp: - * kjs/JSActivation.h: - * kjs/JSObject.h: - -2008-09-29 Peter Gal - - Reviewed and tweaked by Darin Adler. - - Fix build for non-all-in-one platforms. - - * kjs/StringPrototype.cpp: Added missing ASCIICType.h include. - -2008-09-29 Bradley T. Hughes - - Reviewed by Simon Hausmann. - - Fix compilation with icpc - - * wtf/HashSet.h: - (WTF::::find): - (WTF::::contains): - -2008-09-29 Thiago Macieira - - Reviewed by Simon Hausmann. - - Changed copyright from Trolltech ASA to Nokia. - - Nokia acquired Trolltech ASA, assets were transferred on September 26th 2008. - - - * wtf/qt/MainThreadQt.cpp: - -2008-09-29 Simon Hausmann - - Reviewed by Lars Knoll. - - Don't accidentially install libJavaScriptCore.a for the build inside - Qt. - - * JavaScriptCore.pro: - -2008-09-28 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 21200: Allow direct access to 'arguments' without using op_resolve - - - Allow fast access to the 'arguments' object by adding an extra slot to - the callframe to store it. - - This is a 3.0% speedup on the V8 Raytrace benchmark. - - * JavaScriptCore.exp: - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::CodeGenerator): - (JSC::CodeGenerator::registerFor): - * VM/CodeGenerator.h: - (JSC::CodeGenerator::registerFor): - * VM/Machine.cpp: - (JSC::Machine::initializeCallFrame): - (JSC::Machine::dumpRegisters): - (JSC::Machine::privateExecute): - (JSC::Machine::retrieveArguments): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_op_create_arguments): - (JSC::Machine::cti_op_construct_JSConstruct): - * VM/Machine.h: - * VM/Opcode.h: - * VM/RegisterFile.h: - (JSC::RegisterFile::): - * kjs/JSActivation.cpp: - (JSC::JSActivation::mark): - (JSC::JSActivation::argumentsGetter): - * kjs/JSActivation.h: - (JSC::JSActivation::JSActivationData::JSActivationData): - * kjs/NodeInfo.h: - * kjs/Parser.cpp: - (JSC::Parser::didFinishParsing): - * kjs/Parser.h: - (JSC::Parser::parse): - * kjs/grammar.y: - * kjs/nodes.cpp: - (JSC::ScopeNode::ScopeNode): - (JSC::ProgramNode::ProgramNode): - (JSC::ProgramNode::create): - (JSC::EvalNode::EvalNode): - (JSC::EvalNode::create): - (JSC::FunctionBodyNode::FunctionBodyNode): - (JSC::FunctionBodyNode::create): - * kjs/nodes.h: - (JSC::ScopeNode::usesArguments): - -2008-09-28 Mark Rowe - - Reviewed by Sam Weinig. - - Add an ASCII fast-path to toLowerCase and toUpperCase. - - The fast path speeds up the common case of an ASCII-only string by up to 60% while adding a less than 5% penalty - to the less common non-ASCII case. - - This also removes stringProtoFuncToLocaleLowerCase and stringProtoFuncToLocaleUpperCase, which were identical - to the non-locale variants of the functions. toLocaleLowerCase and toLocaleUpperCase now use the non-locale - variants of the functions directly. - - * kjs/StringPrototype.cpp: - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - -2008-09-28 Mark Rowe - - Reviewed by Cameron Zwarich. - - Speed up parseInt and parseFloat. - - Repeatedly indexing into a UString is slow, so retrieve a pointer into the underlying buffer once up front - and use that instead. This is a 7% win on a parseInt/parseFloat micro-benchmark. - - * kjs/JSGlobalObjectFunctions.cpp: - (JSC::parseInt): - (JSC::parseFloat): - -2008-09-28 Simon Hausmann - - Reviewed by David Hyatt. - - In Qt's initializeThreading re-use an existing thread identifier for the main - thread if it exists. - - currentThread() implicitly creates new identifiers and it could be that - it is called before initializeThreading(). - - * wtf/ThreadingQt.cpp: - (WTF::initializeThreading): - -2008-09-27 Keishi Hattori - - Added Machine::retrieveCaller to the export list. - - Reviewed by Kevin McCullough and Tim Hatcher. - - * JavaScriptCore.exp: Added Machine::retrieveCaller. - -2008-09-27 Anders Carlsson - - Fix build. - - * VM/CTI.cpp: - (JSC::): - -2008-09-27 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - https://bugs.webkit.org/show_bug.cgi?id=21175 - - Store the callee CodeBlock, not the caller CodeBlock, in the call frame - header. Nix the "codeBlock" local variable, and access the callee - CodeBlock through the call frame header instead. - - Profit: call + return are simpler, because they don't have to update the - "codeBlock" local variable. - - Because CTI keeps "r" in a register, reading the callee CodeBlock relative - to "r" can be very fast, in any cases we care to optimize. Presently, - no such cases seem important. - - Also, stop writing "dst" to the call frame header. CTI doesn't use it. - - 21.6% speedup on empty function call benchmark. - 3.8% speedup on SunSpider --v8. - 2.1% speedup on v8 benchmark. - 0.7% speedup on SunSpider (6% speedup on controlflow-recursive). - - Small regression in bytecode, because currently every op_ret reads the - callee CodeBlock to check needsFullScopeChain, and bytecode does not - keep "r" in a register. On-balance, this is probably OK, since CTI is - our high-performance execution model. Also, this should go away once - we make needsFullScopeChain statically determinable at parse time. - - * VM/CTI.cpp: - (JSC::CTI::compileOpCall): The speedup! - (JSC::CTI::privateCompileSlowCases): ditto - - * VM/CTI.h: - (JSC::): Fixed up magic trampoline constants to account for the nixed - "codeBlock" argument. - (JSC::CTI::execute): Changed trampoline function not to take a "codeBlock" - argument, since codeBlock is now stored in the call frame header. - - * VM/Machine.cpp: Read the callee CodeBlock from the register file. Use - a NULL CallerRegisters in the call frame header to signal a built-in - caller, since CodeBlock is now never NULL. - - * VM/Machine.h: Made some stand-alone functions Machine member functions - so they could call the private codeBlock() accessor in the Register - class, of which Machine is a friend. Renamed "CallerCodeBlock" to - "CodeBlock", since it's no longer the caller's CodeBlock. - - * VM/RegisterFile.h: Marked some methods const to accommodate a - const RegisterFile* being passed around in Machine.cpp. - -2008-09-26 Jan Michael Alonzo - - Gtk build fix. Not reviewed. - - Narrow-down the target of the JavaScriptCore .lut.h generator so - it won't try to create the WebCore .lut.hs. - - * GNUmakefile.am: - -2008-09-26 Matt Lilek - - Reviewed by Tim Hatcher. - - Update FEATURE_DEFINES after ENABLE_CROSS_DOCUMENT_MESSAGING was removed. - - * Configurations/JavaScriptCore.xcconfig: - -2008-09-26 Cameron Zwarich - - Rubber-stamped by Anders Carlson. - - Change the name 'sc' to 'scopeChainNode' in a few places. - - * kjs/nodes.cpp: - (JSC::EvalNode::generateCode): - (JSC::FunctionBodyNode::generateCode): - (JSC::ProgramNode::generateCode): - -2008-09-26 Sam Weinig - - Reviewed by Darin Adler. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=21152 - Speedup static property get/put - - Convert getting/setting static property values to use static functions - instead of storing an integer and switching in getValueProperty/putValueProperty. - - * kjs/JSObject.cpp: - (JSC::JSObject::deleteProperty): - (JSC::JSObject::getPropertyAttributes): - * kjs/MathObject.cpp: - (JSC::MathObject::getOwnPropertySlot): - * kjs/NumberConstructor.cpp: - (JSC::numberConstructorNaNValue): - (JSC::numberConstructorNegInfinity): - (JSC::numberConstructorPosInfinity): - (JSC::numberConstructorMaxValue): - (JSC::numberConstructorMinValue): - * kjs/PropertySlot.h: - (JSC::PropertySlot::): - * kjs/RegExpConstructor.cpp: - (JSC::regExpConstructorDollar1): - (JSC::regExpConstructorDollar2): - (JSC::regExpConstructorDollar3): - (JSC::regExpConstructorDollar4): - (JSC::regExpConstructorDollar5): - (JSC::regExpConstructorDollar6): - (JSC::regExpConstructorDollar7): - (JSC::regExpConstructorDollar8): - (JSC::regExpConstructorDollar9): - (JSC::regExpConstructorInput): - (JSC::regExpConstructorMultiline): - (JSC::regExpConstructorLastMatch): - (JSC::regExpConstructorLastParen): - (JSC::regExpConstructorLeftContext): - (JSC::regExpConstructorRightContext): - (JSC::setRegExpConstructorInput): - (JSC::setRegExpConstructorMultiline): - (JSC::RegExpConstructor::setInput): - (JSC::RegExpConstructor::setMultiline): - (JSC::RegExpConstructor::multiline): - * kjs/RegExpConstructor.h: - * kjs/RegExpObject.cpp: - (JSC::regExpObjectGlobal): - (JSC::regExpObjectIgnoreCase): - (JSC::regExpObjectMultiline): - (JSC::regExpObjectSource): - (JSC::regExpObjectLastIndex): - (JSC::setRegExpObjectLastIndex): - * kjs/RegExpObject.h: - (JSC::RegExpObject::setLastIndex): - (JSC::RegExpObject::lastIndex): - (JSC::RegExpObject::RegExpObjectData::RegExpObjectData): - * kjs/StructureID.cpp: - (JSC::StructureID::getEnumerablePropertyNames): - * kjs/create_hash_table: - * kjs/lexer.cpp: - (JSC::Lexer::lex): - * kjs/lookup.cpp: - (JSC::HashTable::createTable): - (JSC::HashTable::deleteTable): - (JSC::setUpStaticFunctionSlot): - * kjs/lookup.h: - (JSC::HashEntry::initialize): - (JSC::HashEntry::setKey): - (JSC::HashEntry::key): - (JSC::HashEntry::attributes): - (JSC::HashEntry::function): - (JSC::HashEntry::functionLength): - (JSC::HashEntry::propertyGetter): - (JSC::HashEntry::propertyPutter): - (JSC::HashEntry::lexerValue): - (JSC::HashEntry::): - (JSC::HashTable::entry): - (JSC::getStaticPropertySlot): - (JSC::getStaticValueSlot): - (JSC::lookupPut): - -2008-09-26 Gavin Barraclough - - Reviewed by Maciej Stachowiak & Oliver Hunt. - - Add support for reusing temporary JSNumberCells. This change is based on the observation - that if the result of certain operations is a JSNumberCell and is consumed by a subsequent - operation that would produce a JSNumberCell, we can reuse the object rather than allocating - a fresh one. E.g. given the expression ((a * b) * c), we can statically determine that - (a * b) will have a numeric result (or else it will have thrown an exception), so the result - will either be a JSNumberCell or a JSImmediate. - - This patch changes three areas of JSC: - * The AST now tracks type information about the result of each node. - * This information is consumed in bytecode compilation, and certain bytecode operations - now carry the statically determined type information about their operands. - * CTI uses the information in a number of fashions: - * Where an operand to certain arithmetic operations is reusable, it will plant code - to try to perform the operation in JIT code & reuse the cell, where appropriate. - * Where it can be statically determined that an operand can only be numeric (typically - the result of another arithmetic operation) the code will not redundantly check that - the JSCell is a JSNumberCell. - * Where either of the operands to an add are non-numeric do not plant an optimized - arithmetic code path, just call straight out to the C function. - - +6% Sunspider (10% progression on 3D, 16% progression on math, 60% progression on access-nbody), - +1% v8-tests (improvements in raytrace & crypto) - - * VM/CTI.cpp: Add optimized code generation with reuse of temporary JSNumberCells. - * VM/CTI.h: - * kjs/JSNumberCell.h: - * masm/X86Assembler.h: - - * VM/CodeBlock.cpp: Add type information to specific bytecodes. - * VM/CodeGenerator.cpp: - * VM/CodeGenerator.h: - * VM/Machine.cpp: - - * kjs/nodes.cpp: Track static type information for nodes. - * kjs/nodes.h: - * kjs/ResultDescriptor.h: (Added) - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-09-26 Yichao Yin - - Reviewed by George Staikos, Maciej Stachowiak. - - Add utility functions needed for upcoming WML code. - - * wtf/ASCIICType.h: - (WTF::isASCIIPrintable): - -2008-09-26 Geoffrey Garen - - Reviewed by Darin Adler. - - Reverted the part of r36614 that used static data because static data - is not thread-safe. - -2008-09-26 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Removed dynamic check for whether the callee needs an activation object. - Replaced with callee code to create the activation object. - - 0.5% speedup on SunSpider. - No change on v8 benchmark. (Might be a speedup, but it's in range of the - variance.) - - 0.7% speedup on v8 benchmark in bytecode. - 1.3% speedup on empty call benchmark in bytecode. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): Added support for op_init_activation, - the new opcode that specifies that the callee's initialization should - create an activation object. - (JSC::CTI::privateCompile): Removed previous code that did a similar - thing in an ad-hoc way. - - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): Added a case for dumping op_init_activation. - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::generate): Added fixup code to change op_init to - op_init_activation if necessary. (With a better parser, we would know - which to use from the beginning.) - - * VM/Instruction.h: - (JSC::Instruction::Instruction): - (WTF::): Faster traits for the instruction vector. An earlier version - of this patch relied on inserting at the beginning of the vector, and - depended on this change for speed. - - * VM/Machine.cpp: - (JSC::Machine::execute): Removed clients of setScopeChain, the old - abstraction for dynamically checking for whether an activation object - needed to be created. - (JSC::Machine::privateExecute): ditto - - (JSC::Machine::cti_op_push_activation): Renamed this function from - cti_vm_updateScopeChain, and made it faster by removing the call to - setScopeChain. - * VM/Machine.h: - - * VM/Opcode.h: Declared op_init_activation. - -2008-09-24 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Move most of the return code back into the callee, now that the callee - doesn't have to calculate anything dynamically. - - 11.5% speedup on empty function call benchmark. - - SunSpider says 0.3% faster. SunSpider --v8 says no change. - - * VM/CTI.cpp: - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - -2008-09-24 Sam Weinig - - Reviewed by Maciej Stachowiak. - - Remove staticFunctionGetter. There is only one remaining user of - staticFunctionGetter and it can be converted to use setUpStaticFunctionSlot. - - * JavaScriptCore.exp: - * kjs/lookup.cpp: - * kjs/lookup.h: - -2008-09-24 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - - inline JIT fast case of op_neq - - remove extra level of function call indirection from slow cases of eq and neq - - 1% speedup on Richards - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_eq): - (JSC::Machine::cti_op_neq): - * kjs/operations.cpp: - (JSC::equal): - (JSC::equalSlowCase): - * kjs/operations.h: - (JSC::equalSlowCaseInline): - -2008-09-24 Sam Weinig - - Reviewed by Darin Adler. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=21080 - - Crash below Function.apply when using a runtime array as the argument list - - Test: plugins/bindings-array-apply-crash.html - - * kjs/FunctionPrototype.cpp: - (JSC::functionProtoFuncApply): Revert to the slow case if the object inherits from - JSArray (via ClassInfo) but is not a JSArray. - -2008-09-24 Kevin McCullough - - Style change. - - * kjs/nodes.cpp: - (JSC::statementListEmitCode): - -2008-09-24 Kevin McCullough - - Reviewed by Geoff. - - Bug 21031: Breakpoints in the condition of loops only breaks the first - time - - Now when setting breakpoints in the condition of a loop (for, while, - for in, and do while) will successfully break each time throught the - loop. - - For 'for' loops we need a little more complicated behavior that cannot - be accomplished without some more significant changes: - https://bugs.webkit.org/show_bug.cgi?id=21073 - - * kjs/nodes.cpp: - (JSC::statementListEmitCode): We don't want to blindly emit a debug hook - at the first line of loops, instead let the loop emit the debug hooks. - (JSC::DoWhileNode::emitCode): - (JSC::WhileNode::emitCode): - (JSC::ForNode::emitCode): - (JSC::ForInNode::emitCode): - * kjs/nodes.h: - (JSC::StatementNode::): - (JSC::DoWhileNode::): - (JSC::WhileNode::): - (JSC::ForInNode::): - -2008-09-24 Geoffrey Garen - - Reviewed by Darin Adler. - - Fixed Need a SPI for telling JS the size of - the objects it retains - - * API/tests/testapi.c: Test the new SPI a little. - - * API/JSSPI.cpp: Add the new SPI. - * API/JSSPI.h: Add the new SPI. - * JavaScriptCore.exp: Add the new SPI. - * JavaScriptCore.xcodeproj/project.pbxproj: Add the new SPI. - -2008-09-24 Geoffrey Garen - - Reviewed by Darin Adler. - - * API/JSBase.h: Filled in some missing function names. - -2008-09-24 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=21057 - Crash in RegisterID::deref() running fast/canvas/canvas-putImageData.html - - * VM/CodeGenerator.h: Changed declaration order to ensure the - m_lastConstant, which is a RefPtr that points into m_calleeRegisters, - has its destructor called before the destructor for m_calleeRegisters. - -2008-09-24 Darin Adler - - Reviewed by Sam Weinig. - - - https://bugs.webkit.org/show_bug.cgi?id=21047 - speed up ret_activation with inlining - - About 1% on v8-raytrace. - - * JavaScriptCore.exp: Removed JSVariableObject::setRegisters. - - * kjs/JSActivation.cpp: Moved copyRegisters to the header to make it inline. - * kjs/JSActivation.h: - (JSC::JSActivation::copyRegisters): Moved here. Also removed the registerArraySize - argument to setRegisters, since the object doesn't need to store the number of - registers. - - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): Removed unnecessary clearing left over from when we - used this on objects that weren't brand new. These days, this function is really - just part of the constructor. - - * kjs/JSGlobalObject.h: Added registerArraySize to JSGlobalObjectData, since - JSVariableObjectData no longer needs it. Added a setRegisters override here - that handles storing the size. - - * kjs/JSStaticScopeObject.h: Removed code to set registerArraySize, since it - no longer exists. - - * kjs/JSVariableObject.cpp: Moved copyRegisterArray and setRegisters to the - header to make them inline. - * kjs/JSVariableObject.h: Removed registerArraySize from JSVariableObjectData, - since it was only used for the global object. - (JSC::JSVariableObject::copyRegisterArray): Moved here ot make it inline. - (JSC::JSVariableObject::setRegisters): Moved here to make it inline. Also - removed the code to set registerArraySize and changed an if statement into - an assert to save an unnnecessary branch. - -2008-09-24 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - - inline PropertyMap::getOffset to speed up polymorphic lookups - - ~1.5% speedup on v8 benchmark - no effect on SunSpider - - * JavaScriptCore.exp: - * kjs/PropertyMap.cpp: - * kjs/PropertyMap.h: - (JSC::PropertyMap::getOffset): - -2008-09-24 Jan Michael Alonzo - - Reviewed by Alp Toker. - - https://bugs.webkit.org/show_bug.cgi?id=20992 - Build fails on GTK+ Mac OS - - * wtf/ThreadingGtk.cpp: Remove platform ifdef as suggested by - Richard Hult. - (WTF::initializeThreading): - -2008-09-23 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Bug 19968: Slow Script at www.huffingtonpost.com - - - Finally found the cause of this accursed issue. It is triggered - by synchronous creation of a new global object from JS. The new - global object resets the timer state in this execution group's - Machine, taking timerCheckCount to 0. Then when JS returns the - timerCheckCount is decremented making it non-zero. The next time - we execute JS we will start the timeout counter, however the non-zero - timeoutCheckCount means we don't reset the timer information. This - means that the timeout check is now checking the cumulative time - since the creation of the global object rather than the time since - JS was last entered. At this point the slow script dialog is guaranteed - to eventually be displayed incorrectly unless a page is loaded - asynchronously (which will reset everything into a sane state). - - The fix for this is rather trivial -- the JSGlobalObject constructor - should not be resetting the machine timer state. - - * VM/Machine.cpp: - (JSC::Machine::Machine): - Now that we can't rely on the GlobalObject initialising the timeout - state, we do it in the Machine constructor. - - * VM/Machine.h: - (JSC::Machine::stopTimeoutCheck): - Add assertions to guard against this happening. - - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): - Don't reset the timeout state. - -2008-09-23 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=21038 | - Uncaught exceptions in regex replace callbacks crash webkit - - This was a combination of two problems: - - (1) the replace function would continue execution after an exception - had been thrown. - - (2) In some cases, the Machine would return 0 in the case of an exception, - despite the fact that a few clients dereference the Machine's return - value without first checking for an exception. - - * VM/Machine.cpp: - (JSC::Machine::execute): - - ^ Return jsNull() instead of 0 in the case of an exception, since some - clients depend on using our return value. - - ^ ASSERT that execution does not continue after an exception has been - thrown, to help catch problems like this in the future. - - * kjs/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - - ^ Stop execution if an exception has been thrown. - -2008-09-23 Geoffrey Garen - - Try to fix the windows build. - - * VM/CTI.cpp: - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileMainPass): - -2008-09-23 Alp Toker - - Build fix. - - * VM/CTI.h: - -2008-09-23 Geoffrey Garen - - Reviewed by Darin Adler. - - * wtf/Platform.h: Removed duplicate #if. - -2008-09-23 Geoffrey Garen - - Reviewed by Darin Adler. - - Changed the layout of the call frame from - - { header, parameters, locals | constants, temporaries } - - to - - { parameters, header | locals, constants, temporaries } - - This simplifies function entry+exit, and enables a number of future - optimizations. - - 13.5% speedup on empty call benchmark for bytecode; 23.6% speedup on - empty call benchmark for CTI. - - SunSpider says no change. SunSpider --v8 says 1% faster. - - * VM/CTI.cpp: - - Added a bit of abstraction for calculating whether a register is a - constant, since this patch changes that calculation: - (JSC::CTI::isConstant): - (JSC::CTI::getConstant): - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::getConstantImmediateNumericArg): - - Updated for changes to callframe header location: - (JSC::CTI::emitPutToCallFrameHeader): - (JSC::CTI::emitGetFromCallFrameHeader): - (JSC::CTI::printOpcodeOperandTypes): - - Renamed to spite Oliver: - (JSC::CTI::emitInitRegister): - - Added an abstraction for emitting a call through a register, so that - calls through registers generate exception info, too: - (JSC::CTI::emitCall): - - Updated to match the new callframe header layout, and to support calls - through registers, which have no destination address: - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - - * VM/CTI.h: - - More of the above: - (JSC::CallRecord::CallRecord): - - * VM/CodeBlock.cpp: - - Updated for new register layout: - (JSC::registerName): - (JSC::CodeBlock::dump): - - * VM/CodeBlock.h: - - Updated CodeBlock to track slightly different information about the - register frame, and tweaked the style of an ASSERT_NOT_REACHED. - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::getStubInfo): - - * VM/CodeGenerator.cpp: - - Added some abstraction around constant register allocation, since this - patch changes it, changed codegen to account for the new callframe - layout, and added abstraction around register fetching code - that used to assume that all local registers lived at negative indices, - since vars now live at positive indices: - (JSC::CodeGenerator::generate): - (JSC::CodeGenerator::addVar): - (JSC::CodeGenerator::addGlobalVar): - (JSC::CodeGenerator::allocateConstants): - (JSC::CodeGenerator::CodeGenerator): - (JSC::CodeGenerator::addParameter): - (JSC::CodeGenerator::registerFor): - (JSC::CodeGenerator::constRegisterFor): - (JSC::CodeGenerator::newRegister): - (JSC::CodeGenerator::newTemporary): - (JSC::CodeGenerator::highestUsedRegister): - (JSC::CodeGenerator::addConstant): - - ASSERT that our caller referenced the registers it passed to us. - Otherwise, we might overwrite them with parameters: - (JSC::CodeGenerator::emitCall): - (JSC::CodeGenerator::emitConstruct): - - * VM/CodeGenerator.h: - - Added some abstraction for getting a RegisterID for a given index, - since the rules are a little weird: - (JSC::CodeGenerator::registerFor): - - * VM/Machine.cpp: - - Utility function to transform a machine return PC to a virtual machine - return VPC, for the sake of stack unwinding, since both PCs are stored - in the same location now: - (JSC::vPCForPC): - - Tweaked to account for new call frame: - (JSC::Machine::initializeCallFrame): - - Tweaked to account for registerOffset supplied by caller: - (JSC::slideRegisterWindowForCall): - - Tweaked to account for new register layout: - (JSC::scopeChainForCall): - (JSC::Machine::callEval): - (JSC::Machine::dumpRegisters): - (JSC::Machine::unwindCallFrame): - (JSC::Machine::execute): - - Changed op_call and op_construct to implement the new calling convention: - (JSC::Machine::privateExecute): - - Tweaked to account for the new register layout: - (JSC::Machine::retrieveArguments): - (JSC::Machine::retrieveCaller): - (JSC::Machine::retrieveLastCaller): - (JSC::Machine::callFrame): - (JSC::Machine::getArgumentsData): - - Changed CTI call helpers to implement the new calling convention: - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_op_call_NotJSFunction): - (JSC::Machine::cti_op_ret_activation): - (JSC::Machine::cti_op_ret_profiler): - (JSC::Machine::cti_op_construct_JSConstruct): - (JSC::Machine::cti_op_construct_NotJSConstruct): - (JSC::Machine::cti_op_call_eval): - - * VM/Machine.h: - - * VM/Opcode.h: - - Renamed op_initialise_locals to op_init, because this opcode - doesn't initialize all locals, and it doesn't initialize only locals. - Also, to spite Oliver. - - * VM/RegisterFile.h: - - New call frame enumeration values: - (JSC::RegisterFile::): - - Simplified the calculation of whether a RegisterID is a temporary, - since we can no longer assume that all positive non-constant registers - are temporaries: - * VM/RegisterID.h: - (JSC::RegisterID::RegisterID): - (JSC::RegisterID::setTemporary): - (JSC::RegisterID::isTemporary): - - Renamed firstArgumentIndex to firstParameterIndex because the assumption - that this variable pertained to the actual arguments supplied by the - caller caused me to write some buggy code: - * kjs/Arguments.cpp: - (JSC::ArgumentsData::ArgumentsData): - (JSC::Arguments::Arguments): - (JSC::Arguments::fillArgList): - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::put): - - Updated for new call frame layout: - * kjs/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::functionName): - (JSC::DebuggerCallFrame::type): - * kjs/DebuggerCallFrame.h: - - Changed the activation object to account for the fact that a call frame - header now sits between parameters and local variables. This change - requires all variable objects to do their own marking, since they - now use their register storage differently: - * kjs/JSActivation.cpp: - (JSC::JSActivation::mark): - (JSC::JSActivation::copyRegisters): - (JSC::JSActivation::createArgumentsObject): - * kjs/JSActivation.h: - - Updated global object to use the new interfaces required by the change - to JSActivation above: - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::mark): - (JSC::JSGlobalObject::copyGlobalsFrom): - (JSC::JSGlobalObject::copyGlobalsTo): - * kjs/JSGlobalObject.h: - (JSC::JSGlobalObject::addStaticGlobals): - - Updated static scope object to use the new interfaces required by the - change to JSActivation above: - * kjs/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::mark): - (JSC::JSStaticScopeObject::~JSStaticScopeObject): - * kjs/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::JSStaticScopeObject): - (JSC::JSStaticScopeObject::d): - - Updated variable object to use the new interfaces required by the - change to JSActivation above: - * kjs/JSVariableObject.cpp: - (JSC::JSVariableObject::copyRegisterArray): - (JSC::JSVariableObject::setRegisters): - * kjs/JSVariableObject.h: - - Changed the bit twiddling in symbol table not to assume that all indices - are negative, since they can be positive now: - * kjs/SymbolTable.h: - (JSC::SymbolTableEntry::SymbolTableEntry): - (JSC::SymbolTableEntry::isNull): - (JSC::SymbolTableEntry::getIndex): - (JSC::SymbolTableEntry::getAttributes): - (JSC::SymbolTableEntry::setAttributes): - (JSC::SymbolTableEntry::isReadOnly): - (JSC::SymbolTableEntry::pack): - (JSC::SymbolTableEntry::isValidIndex): - - Changed call and construct nodes to ref their functions and/or bases, - so that emitCall/emitConstruct doesn't overwrite them with parameters. - Also, updated for rename to registerFor: - * kjs/nodes.cpp: - (JSC::ResolveNode::emitCode): - (JSC::NewExprNode::emitCode): - (JSC::EvalFunctionCallNode::emitCode): - (JSC::FunctionCallValueNode::emitCode): - (JSC::FunctionCallResolveNode::emitCode): - (JSC::FunctionCallBracketNode::emitCode): - (JSC::FunctionCallDotNode::emitCode): - (JSC::PostfixResolveNode::emitCode): - (JSC::DeleteResolveNode::emitCode): - (JSC::TypeOfResolveNode::emitCode): - (JSC::PrefixResolveNode::emitCode): - (JSC::ReadModifyResolveNode::emitCode): - (JSC::AssignResolveNode::emitCode): - (JSC::ConstDeclNode::emitCodeSingle): - (JSC::ForInNode::emitCode): - - Added abstraction for getting exception info out of a call through a - register: - * masm/X86Assembler.h: - (JSC::X86Assembler::emitCall): - - Removed duplicate #if: - * wtf/Platform.h: - -2008-09-23 Kevin McCullough - - Reviewed by Darin. - - Bug 21030: The JS debugger breaks on the do of a do-while not the while - (where the conditional statement is) - https://bugs.webkit.org/show_bug.cgi?id=21030 - Now the statementListEmitCode detects if a do-while node is being - emited and emits the debug hook on the last line instead of the first. - - This change had no effect on sunspider. - - * kjs/nodes.cpp: - (JSC::statementListEmitCode): - * kjs/nodes.h: - (JSC::StatementNode::isDoWhile): - (JSC::DoWhileNode::isDoWhile): - -2008-09-23 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - inline the fast case of instanceof - https://bugs.webkit.org/show_bug.cgi?id=20818 - - ~2% speedup on EarleyBoyer test. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/Machine.cpp: - (JSC::Machine::cti_op_instanceof): - -2008-09-23 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - add forgotten slow case logic for !== - - * VM/CTI.cpp: - (JSC::CTI::privateCompileSlowCases): - -2008-09-23 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - inline the fast cases of !==, same as for === - - 2.9% speedup on EarleyBoyer benchmark - - * VM/CTI.cpp: - (JSC::CTI::compileOpStrictEq): Factored stricteq codegen into this function, - and parameterized so it can do the reverse version as well. - (JSC::CTI::privateCompileMainPass): Use the above for stricteq and nstricteq. - * VM/CTI.h: - (JSC::CTI::): Declare above stuff. - * VM/Machine.cpp: - (JSC::Machine::cti_op_nstricteq): Removed fast cases, now handled inline. - -2008-09-23 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 20989: Aguments constructor should put 'callee' and 'length' properties in a more efficient way - - - Make special cases for the 'callee' and 'length' properties in the - Arguments object. - - This is somewhere between a 7.8% speedup and a 10% speedup on the V8 - Raytrace benchmark, depending on whether it is run alone or with the - other V8 benchmarks. - - * kjs/Arguments.cpp: - (JSC::ArgumentsData::ArgumentsData): - (JSC::Arguments::Arguments): - (JSC::Arguments::mark): - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::put): - (JSC::Arguments::deleteProperty): - -2008-09-23 Maciej Stachowiak - - Reviewed by Darin. - - - speed up instanceof some more - https://bugs.webkit.org/show_bug.cgi?id=20818 - - ~2% speedup on EarleyBoyer - - The idea here is to record in the StructureID whether the class - needs a special hasInstance or if it can use the normal logic from - JSObject. - - Based on this I inlined the real work directly into - cti_op_instanceof and put the fastest checks up front and the - error handling at the end (so it should be fairly straightforward - to split off the beginning to be inlined if desired). - - I only did this for CTI, not the bytecode interpreter. - - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructureID): - * ChangeLog: - * VM/Machine.cpp: - (JSC::Machine::cti_op_instanceof): - * kjs/JSImmediate.h: - (JSC::JSImmediate::isAnyImmediate): - * kjs/TypeInfo.h: - (JSC::TypeInfo::overridesHasInstance): - (JSC::TypeInfo::flags): - -2008-09-22 Darin Adler - - Reviewed by Sam Weinig. - - - https://bugs.webkit.org/show_bug.cgi?id=21019 - make FunctionBodyNode::ref/deref fast - - Speeds up v8-raytrace by 7.2%. - - * kjs/nodes.cpp: - (JSC::FunctionBodyNode::FunctionBodyNode): Initialize m_refCount to 0. - * kjs/nodes.h: - (JSC::FunctionBodyNode::ref): Call base class ref once, and thereafter use - m_refCount. - (JSC::FunctionBodyNode::deref): Ditto, but the deref side. - -2008-09-22 Darin Adler - - Pointed out by Sam Weinig. - - * kjs/Arguments.cpp: - (JSC::Arguments::fillArgList): Fix bad copy and paste. Oops! - -2008-09-22 Darin Adler - - Reviewed by Cameron Zwarich. - - - https://bugs.webkit.org/show_bug.cgi?id=20983 - ArgumentsData should have some room to allocate some extra arguments inline - - Speeds up v8-raytrace by 5%. - - * kjs/Arguments.cpp: - (JSC::ArgumentsData::ArgumentsData): Use a fixed buffer if there are 4 or fewer - extra arguments. - (JSC::Arguments::Arguments): Use a fixed buffer if there are 4 or fewer - extra arguments. - (JSC::Arguments::~Arguments): Delete the buffer if necessary. - (JSC::Arguments::mark): Update since extraArguments are now Register. - (JSC::Arguments::fillArgList): Added special case for the only case that's - actually used in the practice, when there are no parameters. There are some - other special cases in there too, but that's the only one that matters. - (JSC::Arguments::getOwnPropertySlot): Updated to use setValueSlot since there's - no operation to get you at the JSValue* inside a Register as a "slot". - -2008-09-22 Sam Weinig - - Reviewed by Maciej Stachowiak. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=21014 - Speed up for..in by using StructureID to avoid calls to hasProperty - - Speeds up fasta by 8%. - - * VM/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::invalidate): - * VM/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::next): - * kjs/PropertyNameArray.h: - (JSC::PropertyNameArrayData::begin): - (JSC::PropertyNameArrayData::end): - (JSC::PropertyNameArrayData::setCachedStructureID): - (JSC::PropertyNameArrayData::cachedStructureID): - * kjs/StructureID.cpp: - (JSC::StructureID::getEnumerablePropertyNames): - (JSC::structureIDChainsAreEqual): - * kjs/StructureID.h: - -2008-09-22 Kelvin Sherlock - - Updated and tweaked by Sam Weinig. - - Reviewed by Geoffrey Garen. - - Bug 20020: Proposed enhancement to JavaScriptCore API - - - Add JSObjectMakeArray, JSObjectMakeDate, JSObjectMakeError, and JSObjectMakeRegExp - functions to create JavaScript Array, Date, Error, and RegExp objects, respectively. - - * API/JSObjectRef.cpp: The functions - * API/JSObjectRef.h: Function prototype and documentation - * JavaScriptCore.exp: Added functions to exported function list - * API/tests/testapi.c: Added basic functionality tests. - - * kjs/DateConstructor.cpp: - Replaced static JSObject* constructDate(ExecState* exec, JSObject*, const ArgList& args) - with JSObject* constructDate(ExecState* exec, const ArgList& args). - Added static JSObject* constructWithDateConstructor(ExecState* exec, JSObject*, const ArgList& args) function - - * kjs/DateConstructor.h: - added prototype for JSObject* constructDate(ExecState* exec, const ArgList& args) - - * kjs/ErrorConstructor.cpp: - removed static qualifier from ErrorInstance* constructError(ExecState* exec, const ArgList& args) - - * kjs/ErrorConstructor.h: - added prototype for ErrorInstance* constructError(ExecState* exec, const ArgList& args) - - * kjs/RegExpConstructor.cpp: - removed static qualifier from JSObject* constructRegExp(ExecState* exec, const ArgList& args) - - * kjs/RegExpConstructor.h: - added prototype for JSObject* constructRegExp(ExecState* exec, const ArgList& args) - -2008-09-22 Matt Lilek - - Not reviewed, Windows build fix. - - * kjs/Arguments.cpp: - * kjs/FunctionPrototype.cpp: - -2008-09-22 Sam Weinig - - Reviewed by Darin Adler. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=20982 - Speed up the apply method of functions by special-casing array and 'arguments' objects - - 1% speedup on v8-raytrace. - - Test: fast/js/function-apply.html - - * kjs/Arguments.cpp: - (JSC::Arguments::fillArgList): - * kjs/Arguments.h: - * kjs/FunctionPrototype.cpp: - (JSC::functionProtoFuncApply): - * kjs/JSArray.cpp: - (JSC::JSArray::fillArgList): - * kjs/JSArray.h: - -2008-09-22 Darin Adler - - Reviewed by Sam Weinig. - - - https://bugs.webkit.org/show_bug.cgi?id=20993 - Array.push/pop need optimized cases for JSArray - - 3% or so speedup on DeltaBlue benchmark. - - * kjs/ArrayPrototype.cpp: - (JSC::arrayProtoFuncPop): Call JSArray::pop when appropriate. - (JSC::arrayProtoFuncPush): Call JSArray::push when appropriate. - - * kjs/JSArray.cpp: - (JSC::JSArray::putSlowCase): Set m_fastAccessCutoff when appropriate, getting - us into the fast code path. - (JSC::JSArray::pop): Added. - (JSC::JSArray::push): Added. - * kjs/JSArray.h: Added push and pop. - - * kjs/operations.cpp: - (JSC::throwOutOfMemoryError): Don't inline this. Helps us avoid PIC branches. - -2008-09-22 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - speed up instanceof operator by replacing implementsHasInstance method with a TypeInfo flag - - Partial work towards - - 2.2% speedup on EarleyBoyer benchmark. - - * API/JSCallbackConstructor.cpp: - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructureID): - * API/JSCallbackFunction.cpp: - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructureID): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructureID): - * API/JSCallbackObjectFunctions.h: - (JSC::::hasInstance): - * API/JSValueRef.cpp: - (JSValueIsInstanceOfConstructor): - * JavaScriptCore.exp: - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_instanceof): - * kjs/InternalFunction.cpp: - * kjs/InternalFunction.h: - (JSC::InternalFunction::createStructureID): - * kjs/JSObject.cpp: - * kjs/JSObject.h: - * kjs/TypeInfo.h: - (JSC::TypeInfo::implementsHasInstance): - -2008-09-22 Maciej Stachowiak - - Reviewed by Dave Hyatt. - - Based on initial work by Darin Adler. - - - replace masqueradesAsUndefined virtual method with a flag in TypeInfo - - use this to JIT inline code for eq_null and neq_null - https://bugs.webkit.org/show_bug.cgi?id=20823 - - 0.5% speedup on SunSpider - ~4% speedup on Richards benchmark - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - * VM/Machine.cpp: - (JSC::jsTypeStringForValue): - (JSC::jsIsObjectType): - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_is_undefined): - * VM/Machine.h: - * kjs/JSCell.h: - * kjs/JSValue.h: - * kjs/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::create): - (JSC::StringObjectThatMasqueradesAsUndefined::createStructureID): - * kjs/StructureID.h: - (JSC::StructureID::mutableTypeInfo): - * kjs/TypeInfo.h: - (JSC::TypeInfo::TypeInfo): - (JSC::TypeInfo::masqueradesAsUndefined): - * kjs/operations.cpp: - (JSC::equal): - * masm/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::setne_r): - (JSC::X86Assembler::setnz_r): - (JSC::X86Assembler::testl_i32m): - -2008-09-22 Tor Arne Vestbø - - Reviewed by Simon. - - Initialize QCoreApplication in kjs binary/Shell.cpp - - This allows us to use QCoreApplication::instance() to - get the main thread in ThreadingQt.cpp - - * kjs/Shell.cpp: - (main): - * wtf/ThreadingQt.cpp: - (WTF::initializeThreading): - -2008-09-21 Darin Adler - - - blind attempt to fix non-all-in-one builds - - * kjs/JSGlobalObject.cpp: Added includes of Arguments.h and RegExpObject.h. - -2008-09-21 Darin Adler - - - fix debug build - - * kjs/StructureID.cpp: - (JSC::StructureID::addPropertyTransition): Use typeInfo().type() instead of m_type. - (JSC::StructureID::createCachedPrototypeChain): Ditto. - -2008-09-21 Maciej Stachowiak - - Reviewed by Darin Adler. - - - introduce a TypeInfo class, for holding per-type (in the C++ class sense) date in StructureID - https://bugs.webkit.org/show_bug.cgi?id=20981 - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompilePutByIdTransition): - * VM/Machine.cpp: - (JSC::jsIsObjectType): - (JSC::Machine::Machine): - * kjs/AllInOneFile.cpp: - * kjs/JSCell.h: - (JSC::JSCell::isObject): - (JSC::JSCell::isString): - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - * kjs/JSGlobalObject.h: - (JSC::StructureID::prototypeForLookup): - * kjs/JSNumberCell.h: - (JSC::JSNumberCell::createStructureID): - * kjs/JSObject.cpp: - (JSC::JSObject::createInheritorID): - * kjs/JSObject.h: - (JSC::JSObject::createStructureID): - * kjs/JSString.h: - (JSC::JSString::createStructureID): - * kjs/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * kjs/RegExpConstructor.cpp: - * kjs/RegExpMatchesArray.h: Added. - (JSC::RegExpMatchesArray::getOwnPropertySlot): - (JSC::RegExpMatchesArray::put): - (JSC::RegExpMatchesArray::deleteProperty): - (JSC::RegExpMatchesArray::getPropertyNames): - * kjs/StructureID.cpp: - (JSC::StructureID::StructureID): - (JSC::StructureID::addPropertyTransition): - (JSC::StructureID::toDictionaryTransition): - (JSC::StructureID::changePrototypeTransition): - (JSC::StructureID::getterSetterTransition): - * kjs/StructureID.h: - (JSC::StructureID::create): - (JSC::StructureID::typeInfo): - * kjs/TypeInfo.h: Added. - (JSC::TypeInfo::TypeInfo): - (JSC::TypeInfo::type): - -2008-09-21 Darin Adler - - Reviewed by Cameron Zwarich. - - - fix crash logging into Gmail due to recent Arguments change - - * kjs/Arguments.cpp: - (JSC::Arguments::Arguments): Fix window where mark() function could - see d->extraArguments with uninitialized contents. - (JSC::Arguments::mark): Check d->extraArguments for 0 to handle two - cases: 1) Inside the constructor before it's initialized. - 2) numArguments <= numParameters. - -2008-09-21 Darin Adler - - - fix loose end from the "duplicate constant values" patch - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitLoad): Add a special case for values the - hash table can't handle. - -2008-09-21 Mark Rowe - - Fix the non-AllInOneFile build. - - * kjs/Arguments.cpp: Add missing #include. - -2008-09-21 Darin Adler - - Reviewed by Cameron Zwarich and Mark Rowe. - - - fix test failure caused by my recent IndexToNameMap patch - - * kjs/Arguments.cpp: - (JSC::Arguments::deleteProperty): Added the accidentally-omitted - check of the boolean result from toArrayIndex. - -2008-09-21 Darin Adler - - Reviewed by Maciej Stachowiak. - - - https://bugs.webkit.org/show_bug.cgi?id=20975 - inline immediate-number case of == - - * VM/CTI.h: Renamed emitJumpSlowCaseIfNotImm to - emitJumpSlowCaseIfNotImmNum, since the old name was incorrect. - - * VM/CTI.cpp: Updated for new name. - (JSC::CTI::privateCompileMainPass): Added op_eq. - (JSC::CTI::privateCompileSlowCases): Added op_eq. - - * VM/Machine.cpp: - (JSC::Machine::cti_op_eq): Removed fast case, since it's now - compiled. - -2008-09-21 Peter Gal - - Reviewed by Tim Hatcher and Eric Seidel. - - Fix the QT/Linux JavaScriptCore segmentation fault. - https://bugs.webkit.org/show_bug.cgi?id=20914 - - * wtf/ThreadingQt.cpp: - (WTF::initializeThreading): Use currentThread() if - platform is not a MAC (like in pre 36541 revisions) - -2008-09-21 Darin Adler - - Reviewed by Sam Weinig. - - * kjs/debugger.h: Removed some unneeded includes and declarations. - -2008-09-21 Darin Adler - - Reviewed by Sam Weinig. - - - https://bugs.webkit.org/show_bug.cgi?id=20972 - speed up Arguments further by eliminating the IndexToNameMap - - No change on SunSpider. 1.29x as fast on V8 Raytrace. - - * kjs/Arguments.cpp: Moved ArgumentsData in here. Eliminated the - indexToNameMap and hadDeletes data members. Changed extraArguments into - an OwnArrayPtr and added deletedArguments, another OwnArrayPtr. - Replaced numExtraArguments with numParameters, since that's what's - used more directly in hot code paths. - (JSC::Arguments::Arguments): Pass in argument count instead of ArgList. - Initialize ArgumentsData the new way. - (JSC::Arguments::mark): Updated. - (JSC::Arguments::getOwnPropertySlot): Overload for the integer form so - we don't have to convert integers to identifiers just to get an argument. - Integrated the deleted case with the fast case. - (JSC::Arguments::put): Ditto. - (JSC::Arguments::deleteProperty): Ditto. - - * kjs/Arguments.h: Minimized includes. Made everything private. Added - overloads for the integral property name case. Eliminated mappedIndexSetter. - Moved ArgumentsData into the .cpp file. - - * kjs/IndexToNameMap.cpp: Emptied out and prepared for deletion. - * kjs/IndexToNameMap.h: Ditto. - - * kjs/JSActivation.cpp: - (JSC::JSActivation::createArgumentsObject): Elminated ArgList. - - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - Removed IndexToNameMap. - -2008-09-21 Darin Adler - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitLoad): One more tweak: Wrote this in a slightly - clearer style. - -2008-09-21 Judit Jasz - - Reviewed and tweaked by Darin Adler. - - - https://bugs.webkit.org/show_bug.cgi?id=20645 - Elminate duplicate constant values in CodeBlocks. - - Seems to be a wash on SunSpider. - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitLoad): Use m_numberMap and m_stringMap to guarantee - we emit the same JSValue* for identical numbers and strings. - * VM/CodeGenerator.h: Added overload of emitLoad for const Identifier&. - Add NumberMap and IdentifierStringMap types and m_numberMap and m_stringMap. - * kjs/nodes.cpp: - (JSC::StringNode::emitCode): Call the new emitLoad and let it do the - JSString creation. - -2008-09-21 Paul Pedriana - - Reviewed and tweaked by Darin Adler. - - - https://bugs.webkit.org/show_bug.cgi?id=16925 - Fixed lack of Vector buffer alignment for both GCC and MSVC. - Since there's no portable way to do this, for now we don't support - other compilers. - - * wtf/Vector.h: Added WTF_ALIGH_ON, WTF_ALIGNED, AlignedBufferChar, and AlignedBuffer. - Use AlignedBuffer insteadof an array of char in VectorBuffer. - -2008-09-21 Gabor Loki - - Reviewed by Darin Adler. - - - https://bugs.webkit.org/show_bug.cgi?id=19408 - Add lightweight constant folding to the parser for *, /, + (only for numbers), <<, >>, ~ operators. - - 1.008x as fast on SunSpider. - - * kjs/grammar.y: - (makeNegateNode): Fold if expression is a number > 0. - (makeBitwiseNotNode): Fold if expression is a number. - (makeMultNode): Fold if expressions are both numbers. - (makeDivNode): Fold if expressions are both numbers. - (makeAddNode): Fold if expressions are both numbers. - (makeLeftShiftNode): Fold if expressions are both numbers. - (makeRightShiftNode): Fold if expressions are both numbers. - -2008-09-21 Maciej Stachowiak - - Reviewed by Oliver. - - - speed up === operator by generating inline machine code for the fast paths - https://bugs.webkit.org/show_bug.cgi?id=20820 - - * VM/CTI.cpp: - (JSC::CTI::emitJumpSlowCaseIfNotImmediateNumber): - (JSC::CTI::emitJumpSlowCaseIfNotImmediateNumbers): - (JSC::CTI::emitJumpSlowCaseIfNotImmediates): - (JSC::CTI::emitTagAsBoolImmediate): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CTI.h: - * VM/Machine.cpp: - (JSC::Machine::cti_op_stricteq): - * masm/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::sete_r): - (JSC::X86Assembler::setz_r): - (JSC::X86Assembler::movzbl_rr): - (JSC::X86Assembler::emitUnlinkedJnz): - -2008-09-21 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Free memory allocated for extra arguments in the destructor of the - Arguments object. - - * kjs/Arguments.cpp: - (JSC::Arguments::~Arguments): - * kjs/Arguments.h: - -2008-09-21 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20815: 'arguments' object creation is non-optimal - - - Fix our inefficient way of creating the arguments object by only - creating named properties for each of the arguments after a use of the - 'delete' statement. This patch also speeds up access to the 'arguments' - object slightly, but it still does not use the array fast path for - indexed access that exists for many opcodes. - - This is about a 20% improvement on the V8 Raytrace benchmark, and a 1.5% - improvement on the Earley-Boyer benchmark, which gives a 4% improvement - overall. - - * kjs/Arguments.cpp: - (JSC::Arguments::Arguments): - (JSC::Arguments::mark): - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::put): - (JSC::Arguments::deleteProperty): - * kjs/Arguments.h: - (JSC::Arguments::ArgumentsData::ArgumentsData): - * kjs/IndexToNameMap.h: - (JSC::IndexToNameMap::size): - * kjs/JSActivation.cpp: - (JSC::JSActivation::createArgumentsObject): - * kjs/JSActivation.h: - (JSC::JSActivation::uncheckedSymbolTableGet): - (JSC::JSActivation::uncheckedSymbolTableGetValue): - (JSC::JSActivation::uncheckedSymbolTablePut): - * kjs/JSFunction.h: - (JSC::JSFunction::numParameters): - -2008-09-20 Darin Adler - - Reviewed by Mark Rowe. - - - fix crash seen on buildbot - - * kjs/JSGlobalObject.cpp: - (JSC::JSGlobalObject::mark): Add back mark of arrayPrototype, - deleted by accident in my recent check-in. - -2008-09-20 Maciej Stachowiak - - Not reviewed, build fix. - - - speculative fix for non-AllInOne builds - - * kjs/operations.h: - -2008-09-20 Maciej Stachowiak - - Reviewed by Darin Adler. - - - assorted optimizations to === and !== operators - (work towards ) - - 2.5% speedup on earley-boyer test - - * VM/Machine.cpp: - (JSC::Machine::cti_op_stricteq): Use inline version of - strictEqualSlowCase; remove unneeded exception check. - (JSC::Machine::cti_op_nstricteq): ditto - * kjs/operations.cpp: - (JSC::strictEqual): Use strictEqualSlowCaseInline - (JSC::strictEqualSlowCase): ditto - * kjs/operations.h: - (JSC::strictEqualSlowCaseInline): Version of strictEqualSlowCase that can be inlined, - since the extra function call indirection is a lose for CTI. - -2008-09-20 Darin Adler - - Reviewed by Maciej Stachowiak. - - - finish https://bugs.webkit.org/show_bug.cgi?id=20858 - make each distinct C++ class get a distinct JSC::Structure - - This also includes some optimizations that make the change an overall - small speedup. Without those it was a bit of a slowdown. - - * API/JSCallbackConstructor.cpp: - (JSC::JSCallbackConstructor::JSCallbackConstructor): Take a structure. - * API/JSCallbackConstructor.h: Ditto. - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::JSCallbackFunction): Pass a structure. - * API/JSCallbackObject.h: Take a structure. - * API/JSCallbackObjectFunctions.h: - (JSC::JSCallbackObject::JSCallbackObject): Ditto. - - * API/JSClassRef.cpp: - (OpaqueJSClass::prototype): Pass in a structure. Call setPrototype - if there's a custom prototype involved. - * API/JSObjectRef.cpp: - (JSObjectMake): Ditto. - (JSObjectMakeConstructor): Pass in a structure. - - * JavaScriptCore.exp: Updated. - - * VM/Machine.cpp: - (JSC::jsLess): Added a special case for when both arguments are strings. - This avoids converting both strings to with UString::toDouble. - (JSC::jsLessEq): Ditto. - (JSC::Machine::privateExecute): Pass in a structure. - (JSC::Machine::cti_op_construct_JSConstruct): Ditto. - (JSC::Machine::cti_op_new_regexp): Ditto. - (JSC::Machine::cti_op_is_string): Ditto. - * VM/Machine.h: Made isJSString public so it can be used in the CTI. - - * kjs/Arguments.cpp: - (JSC::Arguments::Arguments): Pass in a structure. - - * kjs/JSCell.h: Mark constructor explicit. - - * kjs/JSGlobalObject.cpp: - (JSC::markIfNeeded): Added an overload for marking structures. - (JSC::JSGlobalObject::reset): Eliminate code to set data members to - zero. We now do that in the constructor, and we no longer use this - anywhere except in the constructor. Added code to create structures. - Pass structures rather than prototypes when creating objects. - (JSC::JSGlobalObject::mark): Mark the structures. - - * kjs/JSGlobalObject.h: Removed unneeded class declarations. - Added initializers for raw pointers in JSGlobalObjectData so - everything starts with a 0. Added structure data and accessor - functions. - - * kjs/JSImmediate.cpp: - (JSC::JSImmediate::nonInlineNaN): Added. - * kjs/JSImmediate.h: - (JSC::JSImmediate::toDouble): Rewrote to avoid PIC branches. - - * kjs/JSNumberCell.cpp: - (JSC::jsNumberCell): Made non-inline to avoid PIC branches - in functions that call this one. - (JSC::jsNaN): Ditto. - * kjs/JSNumberCell.h: Ditto. - - * kjs/JSObject.h: Removed constructor that takes a prototype. - All callers now pass structures. - - * kjs/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - (JSC::constructArrayWithSizeQuirk): - * kjs/ArrayConstructor.h: - * kjs/ArrayPrototype.cpp: - (JSC::ArrayPrototype::ArrayPrototype): - * kjs/ArrayPrototype.h: - * kjs/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - (JSC::constructBoolean): - (JSC::constructBooleanFromImmediateBoolean): - * kjs/BooleanConstructor.h: - * kjs/BooleanObject.cpp: - (JSC::BooleanObject::BooleanObject): - * kjs/BooleanObject.h: - * kjs/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * kjs/BooleanPrototype.h: - * kjs/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - (JSC::constructDate): - * kjs/DateConstructor.h: - * kjs/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * kjs/DateInstance.h: - * kjs/DatePrototype.cpp: - (JSC::DatePrototype::DatePrototype): - * kjs/DatePrototype.h: - * kjs/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - (JSC::constructError): - * kjs/ErrorConstructor.h: - * kjs/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - * kjs/ErrorInstance.h: - * kjs/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * kjs/ErrorPrototype.h: - * kjs/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * kjs/FunctionConstructor.h: - * kjs/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - (JSC::FunctionPrototype::addFunctionProperties): - * kjs/FunctionPrototype.h: - * kjs/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::GlobalEvalFunction): - * kjs/GlobalEvalFunction.h: - * kjs/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * kjs/InternalFunction.h: - (JSC::InternalFunction::InternalFunction): - * kjs/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::constructEmptyArray): - (JSC::constructArray): - * kjs/JSArray.h: - * kjs/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::construct): - * kjs/JSObject.cpp: - (JSC::constructEmptyObject): - * kjs/JSString.cpp: - (JSC::StringObject::create): - * kjs/JSWrapperObject.h: - * kjs/MathObject.cpp: - (JSC::MathObject::MathObject): - * kjs/MathObject.h: - * kjs/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - (JSC::NativeErrorConstructor::construct): - * kjs/NativeErrorConstructor.h: - * kjs/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * kjs/NativeErrorPrototype.h: - * kjs/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - (JSC::constructWithNumberConstructor): - * kjs/NumberConstructor.h: - * kjs/NumberObject.cpp: - (JSC::NumberObject::NumberObject): - (JSC::constructNumber): - (JSC::constructNumberFromImmediateNumber): - * kjs/NumberObject.h: - * kjs/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * kjs/NumberPrototype.h: - * kjs/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::constructObject): - * kjs/ObjectConstructor.h: - * kjs/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): - * kjs/ObjectPrototype.h: - * kjs/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * kjs/PrototypeFunction.h: - * kjs/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - (JSC::RegExpMatchesArray::RegExpMatchesArray): - (JSC::constructRegExp): - * kjs/RegExpConstructor.h: - * kjs/RegExpObject.cpp: - (JSC::RegExpObject::RegExpObject): - * kjs/RegExpObject.h: - * kjs/RegExpPrototype.cpp: - (JSC::RegExpPrototype::RegExpPrototype): - * kjs/RegExpPrototype.h: - * kjs/Shell.cpp: - (GlobalObject::GlobalObject): - * kjs/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - (JSC::constructWithStringConstructor): - * kjs/StringConstructor.h: - * kjs/StringObject.cpp: - (JSC::StringObject::StringObject): - * kjs/StringObject.h: - * kjs/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined): - * kjs/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * kjs/StringPrototype.h: - Take and pass structures. - -2008-09-19 Alp Toker - - Build fix for the 'gold' linker and recent binutils. New behaviour - requires that we link to used libraries explicitly. - - * GNUmakefile.am: - -2008-09-19 Sam Weinig - - Roll r36694 back in. It did not cause the crash. - - * JavaScriptCore.exp: - * VM/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::invalidate): - * VM/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::create): - * kjs/JSObject.cpp: - (JSC::JSObject::getPropertyNames): - * kjs/PropertyMap.cpp: - (JSC::PropertyMap::getEnumerablePropertyNames): - * kjs/PropertyMap.h: - * kjs/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * kjs/PropertyNameArray.h: - (JSC::PropertyNameArrayData::create): - (JSC::PropertyNameArrayData::propertyNameVector): - (JSC::PropertyNameArrayData::setCachedPrototypeChain): - (JSC::PropertyNameArrayData::cachedPrototypeChain): - (JSC::PropertyNameArrayData::begin): - (JSC::PropertyNameArrayData::end): - (JSC::PropertyNameArrayData::PropertyNameArrayData): - (JSC::PropertyNameArray::PropertyNameArray): - (JSC::PropertyNameArray::addKnownUnique): - (JSC::PropertyNameArray::size): - (JSC::PropertyNameArray::operator[]): - (JSC::PropertyNameArray::begin): - (JSC::PropertyNameArray::end): - (JSC::PropertyNameArray::setData): - (JSC::PropertyNameArray::data): - (JSC::PropertyNameArray::releaseData): - * kjs/StructureID.cpp: - (JSC::structureIDChainsAreEqual): - (JSC::StructureID::getEnumerablePropertyNames): - (JSC::StructureID::clearEnumerationCache): - (JSC::StructureID::createCachedPrototypeChain): - * kjs/StructureID.h: - -2008-09-19 Sam Weinig - - Roll out r36694. - - * JavaScriptCore.exp: - * VM/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::invalidate): - * VM/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::create): - * kjs/JSObject.cpp: - (JSC::JSObject::getPropertyNames): - * kjs/PropertyMap.cpp: - (JSC::PropertyMap::getEnumerablePropertyNames): - * kjs/PropertyMap.h: - * kjs/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * kjs/PropertyNameArray.h: - (JSC::PropertyNameArray::PropertyNameArray): - (JSC::PropertyNameArray::addKnownUnique): - (JSC::PropertyNameArray::begin): - (JSC::PropertyNameArray::end): - (JSC::PropertyNameArray::size): - (JSC::PropertyNameArray::operator[]): - (JSC::PropertyNameArray::releaseIdentifiers): - * kjs/StructureID.cpp: - (JSC::StructureID::getEnumerablePropertyNames): - * kjs/StructureID.h: - (JSC::StructureID::clearEnumerationCache): - -2008-09-19 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Improve peformance of local variable initialisation. - - Pull local and constant initialisation out of slideRegisterWindowForCall - and into its own opcode. This allows the JIT to generate the initialisation - code for a function directly into the instruction stream and so avoids a few - branches on function entry. - - Results a 1% progression in SunSpider, particularly in a number of the bitop - tests where the called functions are very fast. - - * VM/CTI.cpp: - (JSC::CTI::emitInitialiseRegister): - (JSC::CTI::privateCompileMainPass): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::CodeGenerator): - * VM/Machine.cpp: - (JSC::slideRegisterWindowForCall): - (JSC::Machine::privateExecute): - * VM/Opcode.h: - -2008-09-19 Sam Weinig - - Reviewed by Darin Adler. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=20928 - Speed up JS property enumeration by caching entire PropertyNameArray - - 1.3% speedup on Sunspider, 30% on string-fasta. - - * JavaScriptCore.exp: - * VM/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::invalidate): - * VM/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::create): - * kjs/JSObject.cpp: - (JSC::JSObject::getPropertyNames): - * kjs/PropertyMap.cpp: - (JSC::PropertyMap::getEnumerablePropertyNames): - * kjs/PropertyMap.h: - * kjs/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * kjs/PropertyNameArray.h: - (JSC::PropertyNameArrayData::create): - (JSC::PropertyNameArrayData::propertyNameVector): - (JSC::PropertyNameArrayData::setCachedPrototypeChain): - (JSC::PropertyNameArrayData::cachedPrototypeChain): - (JSC::PropertyNameArrayData::begin): - (JSC::PropertyNameArrayData::end): - (JSC::PropertyNameArrayData::PropertyNameArrayData): - (JSC::PropertyNameArray::PropertyNameArray): - (JSC::PropertyNameArray::addKnownUnique): - (JSC::PropertyNameArray::size): - (JSC::PropertyNameArray::operator[]): - (JSC::PropertyNameArray::begin): - (JSC::PropertyNameArray::end): - (JSC::PropertyNameArray::setData): - (JSC::PropertyNameArray::data): - (JSC::PropertyNameArray::releaseData): - * kjs/ScopeChain.cpp: - (JSC::ScopeChainNode::print): - * kjs/StructureID.cpp: - (JSC::structureIDChainsAreEqual): - (JSC::StructureID::getEnumerablePropertyNames): - (JSC::StructureID::clearEnumerationCache): - (JSC::StructureID::createCachedPrototypeChain): - * kjs/StructureID.h: - -2008-09-19 Holger Hans Peter Freyther - - Reviewed by Maciej Stachowiak. - - Fix a mismatched new[]/delete in JSObject::allocatePropertyStorage - - * kjs/JSObject.cpp: - (JSC::JSObject::allocatePropertyStorage): Spotted by valgrind. - -2008-09-19 Darin Adler - - Reviewed by Sam Weinig. - - - part 2 of https://bugs.webkit.org/show_bug.cgi?id=20858 - make each distinct C++ class get a distinct JSC::Structure - - * JavaScriptCore.exp: Exported constructEmptyObject for use in WebCore. - - * kjs/JSGlobalObject.h: Changed the protected constructor to take a - structure instead of a prototype. - - * kjs/JSVariableObject.h: Removed constructor that takes a prototype. - -2008-09-19 Julien Chaffraix - - Reviewed by Alexey Proskuryakov. - - Use the template hoisting technique on the RefCounted class. This reduces the code bloat due to - non-template methods' code been copied for each instance of the template. - The patch splits RefCounted between a base class that holds non-template methods and attributes - and the template RefCounted class that keeps the same functionnality. - - On my Linux with gcc 4.3 for the Gtk port, this is: - - a ~600KB save on libwebkit.so in release. - - a ~1.6MB save on libwebkit.so in debug. - - It is a wash on Sunspider and a small win on Dromaeo (not sure it is relevant). - On the whole, it should be a small win as we reduce the compiled code size and the only - new function call should be inlined by the compiler. - - * wtf/RefCounted.h: - (WTF::RefCountedBase::ref): Copied from RefCounted. - (WTF::RefCountedBase::hasOneRef): Ditto. - (WTF::RefCountedBase::refCount): Ditto. - (WTF::RefCountedBase::RefCountedBase): Ditto. - (WTF::RefCountedBase::~RefCountedBase): Ditto. - (WTF::RefCountedBase::derefBase): Tweaked from the RefCounted version to remove - template section. - (WTF::RefCounted::RefCounted): - (WTF::RefCounted::deref): Small wrapper around RefCountedBase::derefBase(). - (WTF::RefCounted::~RefCounted): Keep private destructor. - -2008-09-18 Darin Adler - - Reviewed by Maciej Stachowiak. - - - part 1 of https://bugs.webkit.org/show_bug.cgi?id=20858 - make each distinct C++ class get a distinct JSC::Structure - - * kjs/lookup.h: Removed things here that were used only in WebCore: - cacheGlobalObject, JSC_DEFINE_PROTOTYPE, JSC_DEFINE_PROTOTYPE_WITH_PROTOTYPE, - and JSC_IMPLEMENT_PROTOTYPE. - -2008-09-18 Darin Adler - - Reviewed by Maciej Stachowiak. - - - https://bugs.webkit.org/show_bug.cgi?id=20927 - simplify/streamline the code to turn strings into identifiers while parsing - - * kjs/grammar.y: Get rid of string from the union, and use ident for STRING as - well as for IDENT. - - * kjs/lexer.cpp: - (JSC::Lexer::lex): Use makeIdentifier instead of makeUString for String. - * kjs/lexer.h: Remove makeUString. - - * kjs/nodes.h: Changed StringNode to hold an Identifier instead of UString. - - * VM/CodeGenerator.cpp: - (JSC::keyForCharacterSwitch): Updated since StringNode now holds an Identifier. - (JSC::prepareJumpTableForStringSwitch): Ditto. - * kjs/nodes.cpp: - (JSC::StringNode::emitCode): Ditto. The comment from here is now in the lexer. - (JSC::processClauseList): Ditto. - * kjs/nodes2string.cpp: - (JSC::StringNode::streamTo): Ditto. - -2008-09-18 Sam Weinig - - Fix style. - - * VM/Instruction.h: - (JSC::Instruction::Instruction): - -2008-09-18 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Bug 20911: REGRESSION(r36480?): Reproducible assertion failure below derefStructureIDs 64-bit JavaScriptCore - - - The problem was simply caused by the int constructor for Instruction - failing to initialise the full struct in 64bit builds. - - * VM/Instruction.h: - (JSC::Instruction::Instruction): - -2008-09-18 Darin Adler - - - fix release build - - * wtf/RefCountedLeakCounter.cpp: Removed stray "static". - -2008-09-18 Darin Adler - - Reviewed by Sam Weinig. - - * kjs/JSGlobalObject.h: Tiny style guideline tweak. - -2008-09-18 Darin Adler - - Reviewed by Sam Weinig. - - - fix https://bugs.webkit.org/show_bug.cgi?id=20925 - LEAK messages appear every time I quit - - * JavaScriptCore.exp: Updated, and also added an export - needed for future WebCore use of JSC::StructureID. - - * wtf/RefCountedLeakCounter.cpp: - (WTF::RefCountedLeakCounter::suppressMessages): Added. - (WTF::RefCountedLeakCounter::cancelMessageSuppression): Added. - (WTF::RefCountedLeakCounter::RefCountedLeakCounter): Tweaked a bit. - (WTF::RefCountedLeakCounter::~RefCountedLeakCounter): Added code to - log the reason there was no leak checking done. - (WTF::RefCountedLeakCounter::increment): Tweaked a bit. - (WTF::RefCountedLeakCounter::decrement): Ditto. - - * wtf/RefCountedLeakCounter.h: Replaced setLogLeakMessages with two - new functions, suppressMessages and cancelMessageSuppression. Also - added m_ prefixes to the data member names. - -2008-09-18 Holger Hans Peter Freyther - - Reviewed by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=20437 - - Add a proper #define to define which XML Parser implementation to use. Client - code can use #if USE(QXMLSTREAM) to decide if the Qt XML StreamReader - implementation is going to be used. - - * wtf/Platform.h: - -2008-09-18 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Make a Unicode non-breaking space count as a whitespace character in - PCRE. This change was already made in WREC, and it fixes one of the - Mozilla JS tests. Since it is now fixed in PCRE as well, we can check - in a new set of expected test results. - - * pcre/pcre_internal.h: - (isSpaceChar): - * tests/mozilla/expected.html: - -2008-09-18 Stephanie Lewis - - Reviewed by Mark Rowe and Maciej Stachowiak. - - add an option use arch to specify which architecture to run. - - * tests/mozilla/jsDriver.pl: - -2008-09-17 Oliver Hunt - - Correctly restore argument reference prior to SFX runtime calls. - - Reviewed by Steve Falkenburg. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - -2008-09-17 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20876: REGRESSION (r36417, r36427): fast/js/exception-expression-offset.html fails - - - r36417 and r36427 caused an get_by_id opcode to be emitted before the - instanceof and construct opcodes, in order to enable inline caching of - the prototype property. Unfortunately, this regressed some tests dealing - with exceptions thrown by 'instanceof' and the 'new' operator. We fix - these problems by detecting whether an "is not an object" exception is - thrown before op_instanceof or op_construct, and emit the proper - exception in those cases. - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitConstruct): - * VM/CodeGenerator.h: - * VM/ExceptionHelpers.cpp: - (JSC::createInvalidParamError): - (JSC::createNotAConstructorError): - (JSC::createNotAnObjectError): - * VM/ExceptionHelpers.h: - * VM/Machine.cpp: - (JSC::Machine::getOpcode): - (JSC::Machine::privateExecute): - * VM/Machine.h: - * kjs/nodes.cpp: - (JSC::NewExprNode::emitCode): - (JSC::InstanceOfNode::emitCode): - -2008-09-17 Gavin Barraclough - - Reviewed by Oliver Hunt. - - JIT generation cti_op_construct_verify. - - Quarter to half percent progression on v8-tests. - Roughly not change on SunSpider (possible minor progression). - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - * VM/Machine.cpp: - * VM/Machine.h: - -2008-09-15 Steve Falkenburg - - Improve timer accuracy for JavaScript Date object on Windows. - - Use a combination of ftime and QueryPerformanceCounter. - ftime returns the information we want, but doesn't have sufficient resolution. - QueryPerformanceCounter has high resolution, but is only usable to measure time intervals. - To combine them, we call ftime and QueryPerformanceCounter initially. Later calls will use - QueryPerformanceCounter by itself, adding the delta to the saved ftime. We re-sync to - correct for drift if the low-res and high-res elapsed time between calls differs by more - than twice the low-resolution timer resolution. - - QueryPerformanceCounter may be inaccurate due to a problems with: - - some PCI bridge chipsets (http://support.microsoft.com/kb/274323) - - BIOS bugs (http://support.microsoft.com/kb/895980/) - - BIOS/HAL bugs on multiprocessor/multicore systems (http://msdn.microsoft.com/en-us/library/ms644904.aspx) - - Reviewed by Darin Adler. - - * kjs/DateMath.cpp: - (JSC::highResUpTime): - (JSC::lowResUTCTime): - (JSC::qpcAvailable): - (JSC::getCurrentUTCTimeWithMicroseconds): - -2008-09-17 Gavin Barraclough - - Reviewed by Geoff Garen. - - Implement JIT generation of CallFrame initialization, for op_call. - - 1% sunspider 2.5% v8-tests. - - * VM/CTI.cpp: - (JSC::CTI::compileOpCall): - * VM/Machine.cpp: - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_op_call_NotJSFunction): - -2008-09-17 Gavin Barraclough - - Reviewed by Geoff Garen. - - Optimizations for op_call in CTI. Move check for (ctiCode == 0) into JIT code, - move copying of scopeChain for CodeBlocks that needFullScopeChain into head of - functions, instead of checking prior to making the call. - - 3% on v8-tests (4% on richards, 6% in delta-blue) - - * VM/CTI.cpp: - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - * VM/Machine.cpp: - (JSC::Machine::execute): - (JSC::Machine::cti_op_call_JSFunction): - (JSC::Machine::cti_vm_compile): - (JSC::Machine::cti_vm_updateScopeChain): - (JSC::Machine::cti_op_construct_JSConstruct): - * VM/Machine.h: - -2008-09-17 Tor Arne Vestbø - - Fix the QtWebKit/Mac build - - * wtf/ThreadingQt.cpp: - (WTF::initializeThreading): use QCoreApplication to get the main thread - -2008-09-16 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20857: REGRESSION (r36427): ASSERTION FAILED: m_refCount >= 0 in RegisterID::deref() - - - Fix a problem stemming from the slightly unsafe behaviour of the - CodeGenerator::finalDestination() method by putting the "func" argument - of the emitConstruct() method in a RefPtr in its caller. Also, add an - assertion guaranteeing that this is always the case. - - CodeGenerator::finalDestination() is still incorrect and can cause - problems with a different allocator; see bug 20340 for more details. - - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitConstruct): - * kjs/nodes.cpp: - (JSC::NewExprNode::emitCode): - -2008-09-16 Alice Liu - - build fix. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - -2008-09-16 Gavin Barraclough - - Reviewed by Geoff Garen. - - CTI code generation for op_ret. The majority of the work - (updating variables on the stack & on exec) can be performed - directly in generated code. - - We still need to check, & to call out to C-code to handle - activation records, profiling, and full scope chains. - - +1.5% Sunspider, +5/6% v8 tests. - - * VM/CTI.cpp: - (JSC::CTI::emitPutCTIParam): - (JSC::CTI::compileOpCall): - (JSC::CTI::privateCompileMainPass): - * VM/CTI.h: - * VM/Machine.cpp: - (JSC::Machine::cti_op_ret_activation): - (JSC::Machine::cti_op_ret_profiler): - (JSC::Machine::cti_op_ret_scopeChain): - * VM/Machine.h: - -2008-09-16 Dimitri Glazkov - - Fix the Windows build. - - Add some extra parentheses to stop MSVC from complaining so much. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_stricteq): - (JSC::Machine::cti_op_nstricteq): - * kjs/operations.cpp: - (JSC::strictEqual): - -2008-09-15 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - speed up the === and !== operators by choosing the fast cases better - - No effect on SunSpider but speeds up the V8 EarlyBoyer benchmark about 4%. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_stricteq): - (JSC::Machine::cti_op_nstricteq): - * kjs/JSImmediate.h: - (JSC::JSImmediate::areBothImmediate): - * kjs/operations.cpp: - (JSC::strictEqual): - (JSC::strictEqualSlowCase): - * kjs/operations.h: - -2008-09-15 Oliver Hunt - - RS=Sam Weinig. - - Coding style cleanup. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - -2008-09-15 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Bug 20874: op_resolve does not do any form of caching - - - This patch adds an op_resolve_global opcode to handle (and cache) - property lookup we can statically determine must occur on the global - object (if at all). - - 3% progression on sunspider, 3.2x improvement to bitops-bitwise-and, and - 10% in math-partial-sums - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::findScopedProperty): - (JSC::CodeGenerator::emitResolve): - * VM/Machine.cpp: - (JSC::resolveGlobal): - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_resolve_global): - * VM/Machine.h: - * VM/Opcode.h: - -2008-09-15 Sam Weinig - - Roll out r36462. It broke document.all. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CTI.h: - * VM/Machine.cpp: - (JSC::Machine::Machine): - (JSC::Machine::cti_op_eq_null): - (JSC::Machine::cti_op_neq_null): - * VM/Machine.h: - (JSC::Machine::isJSString): - * kjs/JSCell.h: - * kjs/JSWrapperObject.h: - * kjs/StringObject.h: - * kjs/StringObjectThatMasqueradesAsUndefined.h: - -2008-09-15 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20863: ASSERTION FAILED: addressOffset < instructions.size() in CodeBlock::getHandlerForVPC - - - r36427 changed the number of arguments to op_construct without changing - the argument index for the vPC in the call to initializeCallFrame() in - the CTI case. This caused a JSC test failure. Correcting the argument - index fixes the test failure. - - * VM/Machine.cpp: - (JSC::Machine::cti_op_construct_JSConstruct): - -2008-09-15 Mark Rowe - - Fix GCC 4.2 build. - - * VM/CTI.h: - -2008-09-15 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed a typo in op_get_by_id_chain that caused it to miss every time - in the interpreter. - - Also, a little cleanup. - - * VM/Machine.cpp: - (JSC::Machine::privateExecute): Set up baseObject before entering the - loop, so we compare against the right values. - -2008-09-15 Geoffrey Garen - - Reviewed by Sam Weinig. - - Removed the CalledAsConstructor flag from the call frame header. Now, - we use an explicit opcode at the call site to fix up constructor results. - - SunSpider says 0.4% faster. - - cti_op_construct_verify is an out-of-line function call for now, but we - can fix that once StructureID holds type information like isObject. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): Codegen for the new opcode. - - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - - * VM/CodeGenerator.cpp: Codegen for the new opcode. Also... - (JSC::CodeGenerator::emitCall): ... don't test for known non-zero value. - (JSC::CodeGenerator::emitConstruct): ... ditto. - - * VM/Machine.cpp: No more CalledAsConstructor - (JSC::Machine::privateExecute): Implementation for the new opcode. - (JSC::Machine::cti_op_ret): The speedup: no need to check whether we were - called as a constructor. - (JSC::Machine::cti_op_construct_verify): Implementation for the new opcode. - * VM/Machine.h: - - * VM/Opcode.h: Declare new opcode. - - * VM/RegisterFile.h: - (JSC::RegisterFile::): No more CalledAsConstructor - -2008-09-15 Gavin Barraclough - - Reviewed by Geoff Garen. - - Inline code generation of eq_null/neq_null for CTI. Uses vptr checking for - StringObjectsThatAreMasqueradingAsBeingUndefined. In the long run, the - masquerading may be handled differently (through the StructureIDs - see bug - #20823). - - >1% on v8-tests. - - * VM/CTI.cpp: - (JSC::CTI::emitJumpSlowCaseIfIsJSCell): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CTI.h: - * VM/Machine.cpp: - (JSC::Machine::Machine): - (JSC::Machine::cti_op_eq_null): - (JSC::Machine::cti_op_neq_null): - * VM/Machine.h: - (JSC::Machine::doesMasqueradesAsUndefined): - * kjs/JSWrapperObject.h: - (JSC::JSWrapperObject::): - (JSC::JSWrapperObject::JSWrapperObject): - * kjs/StringObject.h: - (JSC::StringObject::StringObject): - * kjs/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined): - -2008-09-15 Cameron Zwarich - - Rubber-stamped by Oliver Hunt. - - r36427 broke CodeBlock::dump() by changing the number of arguments to - op_construct without changing the code that prints it. This patch fixes - it by printing the additional argument. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - -2008-09-15 Adam Roben - - Build fix - - * kjs/StructureID.cpp: Removed a stray semicolon. - -2008-09-15 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Fix a crash in fast/js/exception-expression-offset.html caused by not - updating all mentions of the length of op_construct in r36427. - - * VM/Machine.cpp: - (JSC::Machine::cti_op_construct_NotJSConstruct): - -2008-09-15 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - fix layout test failure introduced by fix for 20849 - - (The failing test was fast/js/delete-then-put.html) - - * kjs/JSObject.cpp: - (JSC::JSObject::removeDirect): Clear enumeration cache - in the dictionary case. - * kjs/JSObject.h: - (JSC::JSObject::putDirect): Ditto. - * kjs/StructureID.h: - (JSC::StructureID::clearEnumerationCache): Inline to handle the - clear. - -2008-09-15 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - fix JSC test failures introduced by fix for 20849 - - * kjs/PropertyMap.cpp: - (JSC::PropertyMap::getEnumerablePropertyNames): Use the correct count. - -2008-09-15 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20851: REGRESSION (r36410): fast/js/kde/GlobalObject.html fails - - - r36410 introduced an optimization for parseInt() that is incorrect when - its argument is larger than the range of a 32-bit integer. If the - argument is a number that is not an immediate integer, then the correct - behaviour is to return the floor of its value, unless it is an infinite - value, in which case the correct behaviour is to return 0. - - * kjs/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncParseInt): - -2008-09-15 Sam Weinig - - Reviewed by Maciej Stachowiak. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=20849 - Cache property names for getEnumerablePropertyNames in the StructureID. - - ~0.5% speedup on Sunspider overall (9.7% speedup on string-fasta). ~1% speedup - on the v8 test suite. - - * kjs/JSObject.cpp: - (JSC::JSObject::getPropertyNames): - * kjs/PropertyMap.cpp: - (JSC::PropertyMap::getEnumerablePropertyNames): - * kjs/PropertyMap.h: - * kjs/StructureID.cpp: - (JSC::StructureID::StructureID): - (JSC::StructureID::getEnumerablePropertyNames): - * kjs/StructureID.h: - -2008-09-14 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - speed up JS construction by extracting "prototype" lookup so PIC applies. - - ~0.5% speedup on SunSpider - Speeds up some of the V8 tests as well, most notably earley-boyer. - - * VM/CTI.cpp: - (JSC::CTI::compileOpCall): Account for extra arg for prototype. - (JSC::CTI::privateCompileMainPass): Account for increased size of op_construct. - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitConstruct): Emit separate lookup to get prototype property. - * VM/Machine.cpp: - (JSC::Machine::privateExecute): Expect prototype arg in op_construct. - (JSC::Machine::cti_op_construct_JSConstruct): ditto - (JSC::Machine::cti_op_construct_NotJSConstruct): ditto - -2008-09-10 Alexey Proskuryakov - - Reviewed by Eric Seidel. - - Add a protected destructor for RefCounted. - - It is wrong to call its destructor directly, because (1) this should be taken care of by - deref(), and (2) many classes that use RefCounted have non-virtual destructors. - - No change in behavior. - - * wtf/RefCounted.h: (WTF::RefCounted::~RefCounted): - -2008-09-14 Gavin Barraclough - - Reviewed by Sam Weinig. - - Accelerated property accesses. - - Inline more of the array access code into the JIT code for get/put_by_val. - Accelerate get/put_by_id by speculatively inlining a disable direct access - into the hot path of the code, and repatch this with the correct StructureID - and property map offset once these are known. In the case of accesses to the - prototype and reading the array-length a trampoline is genertaed, and the - branch to the slow-case is relinked to jump to this. - - By repatching, we mean rewriting the x86 instruction stream. Instructions are - only modified in a simple fasion - altering immediate operands, memory access - deisplacements, and branch offsets. - - For regular get_by_id/put_by_id accesses to an object, a StructureID in an - instruction's immediate operant is updateded, and a memory access operation's - displacement is updated to access the correct field on the object. In the case - of more complex accesses (array length and get_by_id_prototype) the offset on - the branch to slow-case is updated, to now jump to a trampoline. - - +2.8% sunspider, +13% v8-tests - - * VM/CTI.cpp: - (JSC::CTI::emitCall): - (JSC::CTI::emitJumpSlowCaseIfNotJSCell): - (JSC::CTI::CTI): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::CTI::privateCompilePutByIdTransition): - (JSC::CTI::privateCompileArrayLengthTrampoline): - (JSC::CTI::privateCompileStringLengthTrampoline): - (JSC::CTI::patchGetByIdSelf): - (JSC::CTI::patchPutByIdReplace): - (JSC::CTI::privateCompilePatchGetArrayLength): - (JSC::CTI::privateCompilePatchGetStringLength): - * VM/CTI.h: - (JSC::CTI::compileGetByIdSelf): - (JSC::CTI::compileGetByIdProto): - (JSC::CTI::compileGetByIdChain): - (JSC::CTI::compilePutByIdReplace): - (JSC::CTI::compilePutByIdTransition): - (JSC::CTI::compileArrayLengthTrampoline): - (JSC::CTI::compileStringLengthTrampoline): - (JSC::CTI::compilePatchGetArrayLength): - (JSC::CTI::compilePatchGetStringLength): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::~CodeBlock): - * VM/CodeBlock.h: - (JSC::StructureStubInfo::StructureStubInfo): - (JSC::CodeBlock::getStubInfo): - * VM/Machine.cpp: - (JSC::Machine::tryCTICachePutByID): - (JSC::Machine::tryCTICacheGetByID): - (JSC::Machine::cti_op_put_by_val_array): - * VM/Machine.h: - * masm/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::cmpl_i8m): - (JSC::X86Assembler::emitUnlinkedJa): - (JSC::X86Assembler::getRelocatedAddress): - (JSC::X86Assembler::getDifferenceBetweenLabels): - (JSC::X86Assembler::emitModRm_opmsib): - -2008-09-14 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - - split the "prototype" lookup for hasInstance into opcode stream so it can be cached - - ~5% speedup on v8 earley-boyer test - - * API/JSCallbackObject.h: Add a parameter for the pre-looked-up prototype. - * API/JSCallbackObjectFunctions.h: - (JSC::::hasInstance): Ditto. - * API/JSValueRef.cpp: - (JSValueIsInstanceOfConstructor): Look up and pass in prototype. - * JavaScriptCore.exp: - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): Pass along prototype. - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): Print third arg. - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitInstanceOf): Implement this, now that there - is a third argument. - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (JSC::Machine::privateExecute): Pass along the prototype. - (JSC::Machine::cti_op_instanceof): ditto - * kjs/JSObject.cpp: - (JSC::JSObject::hasInstance): Expect to get a pre-looked-up prototype. - * kjs/JSObject.h: - * kjs/nodes.cpp: - (JSC::InstanceOfNode::emitCode): Emit a get_by_id of the prototype - property and pass that register to instanceof. - * kjs/nodes.h: - -2008-09-14 Gavin Barraclough - - Reviewed by Sam Weinig. - - Remove unnecessary virtual function call from cti_op_call_JSFunction - - ~5% on richards, ~2.5% on v8-tests, ~0.5% on sunspider. - - * VM/Machine.cpp: - (JSC::Machine::cti_op_call_JSFunction): - -2008-09-14 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20827: the 'typeof' operator is slow - - - Optimize the 'typeof' operator when its result is compared to a constant - string. - - This is a 5.5% speedup on the V8 Earley-Boyer test. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitEqualityOp): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (JSC::jsIsObjectType): - (JSC::jsIsFunctionType): - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_is_undefined): - (JSC::Machine::cti_op_is_boolean): - (JSC::Machine::cti_op_is_number): - (JSC::Machine::cti_op_is_string): - (JSC::Machine::cti_op_is_object): - (JSC::Machine::cti_op_is_function): - * VM/Machine.h: - * VM/Opcode.h: - * kjs/nodes.cpp: - (JSC::BinaryOpNode::emitCode): - (JSC::EqualNode::emitCode): - (JSC::StrictEqualNode::emitCode): - * kjs/nodes.h: - -2008-09-14 Sam Weinig - - Reviewed by Cameron Zwarich. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=20844 - Speed up parseInt for numbers - - Sunspider reports this as 1.029x as fast overall and 1.37x as fast on string-unpack-code. - No change on the v8 suite. - - * kjs/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncParseInt): Don't convert numbers to strings just to - convert them back to numbers. - -2008-09-14 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 20816: op_lesseq should be optimized - - - Add a loop_if_lesseq opcode that is similar to the loop_if_less opcode. - - This is a 9.4% speedup on the V8 Crypto benchmark. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitJumpIfTrue): - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_loop_if_lesseq): - * VM/Machine.h: - * VM/Opcode.h: - -2008-09-14 Sam Weinig - - Reviewed by Cameron Zwarich. - - Cleanup Sampling code. - - * VM/CTI.cpp: - (JSC::CTI::emitCall): - (JSC::CTI::privateCompileMainPass): - * VM/CTI.h: - (JSC::CTI::execute): - * VM/SamplingTool.cpp: - (JSC::): - (JSC::SamplingTool::run): - (JSC::SamplingTool::dump): - * VM/SamplingTool.h: - (JSC::SamplingTool::callingHostFunction): - -2008-09-13 Oliver Hunt - - Reviewed by Cameron Zwarich. - - Bug 20821: Cache property transitions to speed up object initialization - https://bugs.webkit.org/show_bug.cgi?id=20821 - - Implement a transition cache to improve the performance of new properties - being added to objects. This is extremely beneficial in constructors and - shows up as a 34% improvement on access-binary-trees in SunSpider (0.8% - overall) - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - (JSC::): - (JSC::transitionWillNeedStorageRealloc): - (JSC::CTI::privateCompilePutByIdTransition): - * VM/CTI.h: - (JSC::CTI::compilePutByIdTransition): - * VM/CodeBlock.cpp: - (JSC::printPutByIdOp): - (JSC::CodeBlock::printStructureIDs): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::derefStructureIDs): - (JSC::CodeBlock::refStructureIDs): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::emitPutById): - * VM/Machine.cpp: - (JSC::cachePrototypeChain): - (JSC::Machine::tryCachePutByID): - (JSC::Machine::tryCacheGetByID): - (JSC::Machine::privateExecute): - (JSC::Machine::tryCTICachePutByID): - (JSC::Machine::tryCTICacheGetByID): - * VM/Machine.h: - * VM/Opcode.h: - * kjs/JSObject.h: - (JSC::JSObject::putDirect): - (JSC::JSObject::transitionTo): - * kjs/PutPropertySlot.h: - (JSC::PutPropertySlot::PutPropertySlot): - (JSC::PutPropertySlot::wasTransition): - (JSC::PutPropertySlot::setWasTransition): - * kjs/StructureID.cpp: - (JSC::StructureID::transitionTo): - (JSC::StructureIDChain::StructureIDChain): - * kjs/StructureID.h: - (JSC::StructureID::previousID): - (JSC::StructureID::setCachedPrototypeChain): - (JSC::StructureID::cachedPrototypeChain): - (JSC::StructureID::propertyMap): - * masm/X86Assembler.h: - (JSC::X86Assembler::addl_i8m): - (JSC::X86Assembler::subl_i8m): - -2008-09-12 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20819: JSValue::isObject() is slow - - - Optimize JSCell::isObject() and JSCell::isString() by making them - non-virtual calls that rely on the StructureID type information. - - This is a 0.7% speedup on SunSpider and a 1.0% speedup on the V8 - benchmark suite. - - * JavaScriptCore.exp: - * kjs/JSCell.cpp: - * kjs/JSCell.h: - (JSC::JSCell::isObject): - (JSC::JSCell::isString): - * kjs/JSObject.cpp: - * kjs/JSObject.h: - * kjs/JSString.cpp: - * kjs/JSString.h: - (JSC::JSString::JSString): - * kjs/StructureID.h: - (JSC::StructureID::type): - -2008-09-11 Stephanie Lewis - - Reviewed by Oliver Hunt. - - Turn off PGO Optimization on CTI.cpp -> . Fixes - crash on CNN and on Dromaeo. - Fix Missing close tag in vcproj. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2008-09-11 Cameron Zwarich - - Not reviewed. - - Correct an SVN problem with the last commit and actually add the new - files. - - * wrec/CharacterClassConstructor.cpp: Added. - (JSC::): - (JSC::getCharacterClassNewline): - (JSC::getCharacterClassDigits): - (JSC::getCharacterClassSpaces): - (JSC::getCharacterClassWordchar): - (JSC::getCharacterClassNondigits): - (JSC::getCharacterClassNonspaces): - (JSC::getCharacterClassNonwordchar): - (JSC::CharacterClassConstructor::addSorted): - (JSC::CharacterClassConstructor::addSortedRange): - (JSC::CharacterClassConstructor::put): - (JSC::CharacterClassConstructor::flush): - (JSC::CharacterClassConstructor::append): - * wrec/CharacterClassConstructor.h: Added. - (JSC::CharacterClassConstructor::CharacterClassConstructor): - (JSC::CharacterClassConstructor::isUpsideDown): - (JSC::CharacterClassConstructor::charClass): - -2008-09-11 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20788: Split CharacterClassConstructor into its own file - - - Split CharacterClassConstructor into its own file and clean up some - style issues. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wrec/CharacterClassConstructor.cpp: Added. - (JSC::): - (JSC::getCharacterClassNewline): - (JSC::getCharacterClassDigits): - (JSC::getCharacterClassSpaces): - (JSC::getCharacterClassWordchar): - (JSC::getCharacterClassNondigits): - (JSC::getCharacterClassNonspaces): - (JSC::getCharacterClassNonwordchar): - (JSC::CharacterClassConstructor::addSorted): - (JSC::CharacterClassConstructor::addSortedRange): - (JSC::CharacterClassConstructor::put): - (JSC::CharacterClassConstructor::flush): - (JSC::CharacterClassConstructor::append): - * wrec/CharacterClassConstructor.h: Added. - (JSC::CharacterClassConstructor::CharacterClassConstructor): - (JSC::CharacterClassConstructor::isUpsideDown): - (JSC::CharacterClassConstructor::charClass): - * wrec/WREC.cpp: - (JSC::WRECParser::parseCharacterClass): - -2008-09-10 Simon Hausmann - - Not reviewed but trivial one-liner for yet unused macro. - - Changed PLATFORM(WINCE) to PLATFORM(WIN_CE) as requested by Mark. - - (part of https://bugs.webkit.org/show_bug.cgi?id=20746) - - * wtf/Platform.h: - -2008-09-10 Cameron Zwarich - - Rubber-stamped by Oliver Hunt. - - Fix a typo by renaming the overloaded orl_rr that takes an immediate to - orl_i32r. - - * VM/CTI.cpp: - (JSC::CTI::emitFastArithPotentiallyReTagImmediate): - * masm/X86Assembler.h: - (JSC::X86Assembler::orl_i32r): - * wrec/WREC.cpp: - (JSC::WRECGenerator::generatePatternCharacter): - (JSC::WRECGenerator::generateCharacterClassInverted): - -2008-09-10 Sam Weinig - - Reviewed by Geoff Garen. - - Add inline property storage for JSObject. - - 1.2% progression on Sunspider. .5% progression on the v8 test suite. - - * JavaScriptCore.exp: - * VM/CTI.cpp: - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - * kjs/JSObject.cpp: - (JSC::JSObject::mark): There is no reason to check storageSize now that - we start from 0. - (JSC::JSObject::allocatePropertyStorage): Allocates/reallocates heap storage. - * kjs/JSObject.h: - (JSC::JSObject::offsetForLocation): m_propertyStorage is not an OwnArrayPtr - now so there is no reason to .get() - (JSC::JSObject::usingInlineStorage): - (JSC::JSObject::JSObject): Start with m_propertyStorage pointing to the - inline storage. - (JSC::JSObject::~JSObject): Free the heap storage if not using the inline - storage. - (JSC::JSObject::putDirect): Switch to the heap storage only when we know - we know that we are about to add a property that will overflow the inline - storage. - * kjs/PropertyMap.cpp: - (JSC::PropertyMap::createTable): Don't allocate the propertyStorage, that is - now handled by JSObject. - (JSC::PropertyMap::rehash): PropertyStorage is not a OwnArrayPtr anymore. - * kjs/PropertyMap.h: - (JSC::PropertyMap::storageSize): Rename from markingCount. - * kjs/StructureID.cpp: - (JSC::StructureID::addPropertyTransition): Don't resize the property storage - if we are using inline storage. - * kjs/StructureID.h: - -2008-09-10 Oliver Hunt - - Reviewed by Geoff Garen. - - Inline immediate number version of op_mul. - - Renamed mull_rr to imull_rr as that's what it's - actually doing, and added imull_i32r for the constant - case immediate multiply. - - 1.1% improvement to SunSpider. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * masm/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::imull_rr): - (JSC::X86Assembler::imull_i32r): - -2008-09-10 Cameron Zwarich - - Not reviewed. - - Mac build fix. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-09-09 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Add optimised access to known properties on the global object. - - Improve cross scope access to the global object by emitting - code to access it directly rather than by walking the scope chain. - - This is a 0.8% win in SunSpider and a 1.7% win in the v8 benchmarks. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::emitGetVariableObjectRegister): - (JSC::CTI::emitPutVariableObjectRegister): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (JSC::CodeGenerator::findScopedProperty): - (JSC::CodeGenerator::emitResolve): - (JSC::CodeGenerator::emitGetScopedVar): - (JSC::CodeGenerator::emitPutScopedVar): - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (JSC::Machine::privateExecute): - * VM/Opcode.h: - * kjs/nodes.cpp: - (JSC::FunctionCallResolveNode::emitCode): - (JSC::PostfixResolveNode::emitCode): - (JSC::PrefixResolveNode::emitCode): - (JSC::ReadModifyResolveNode::emitCode): - (JSC::AssignResolveNode::emitCode): - -2008-09-10 Maciej Stachowiak - - Reviewed by Oliver. - - - enable polymorphic inline caching of properties of primitives - - 1.012x speedup on SunSpider. - - We create special structure IDs for JSString and - JSNumberCell. Unlike normal structure IDs, these cannot hold the - true prototype. Due to JS autoboxing semantics, the prototype used - when looking up string or number properties depends on the lexical - global object of the call site, not the creation site. Thus we - enable StructureIDs to handle this quirk for primitives. - - Everything else should be straightforward. - - * VM/CTI.cpp: - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - * VM/CTI.h: - (JSC::CTI::compileGetByIdProto): - (JSC::CTI::compileGetByIdChain): - * VM/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - * VM/Machine.cpp: - (JSC::Machine::Machine): - (JSC::cachePrototypeChain): - (JSC::Machine::tryCachePutByID): - (JSC::Machine::tryCacheGetByID): - (JSC::Machine::privateExecute): - (JSC::Machine::tryCTICachePutByID): - (JSC::Machine::tryCTICacheGetByID): - * kjs/GetterSetter.h: - (JSC::GetterSetter::GetterSetter): - * kjs/JSCell.h: - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * kjs/JSGlobalData.h: - * kjs/JSGlobalObject.h: - (JSC::StructureID::prototypeForLookup): - * kjs/JSNumberCell.h: - (JSC::JSNumberCell::JSNumberCell): - (JSC::jsNumberCell): - * kjs/JSObject.h: - (JSC::JSObject::prototype): - * kjs/JSString.cpp: - (JSC::jsString): - (JSC::jsSubstring): - (JSC::jsOwnedString): - * kjs/JSString.h: - (JSC::JSString::JSString): - (JSC::JSString::): - (JSC::jsSingleCharacterString): - (JSC::jsSingleCharacterSubstring): - (JSC::jsNontrivialString): - * kjs/SmallStrings.cpp: - (JSC::SmallStrings::createEmptyString): - (JSC::SmallStrings::createSingleCharacterString): - * kjs/StructureID.cpp: - (JSC::StructureID::StructureID): - (JSC::StructureID::addPropertyTransition): - (JSC::StructureID::getterSetterTransition): - (JSC::StructureIDChain::StructureIDChain): - * kjs/StructureID.h: - (JSC::StructureID::create): - (JSC::StructureID::storedPrototype): - -2008-09-09 Joerg Bornemann - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=20746 - - Added WINCE platform macro. - - * wtf/Platform.h: - -2008-09-09 Sam Weinig - - Reviewed by Mark Rowe. - - Remove unnecessary override of getOffset. - - Sunspider reports this as a .6% progression. - - * JavaScriptCore.exp: - * kjs/JSObject.h: - (JSC::JSObject::getDirectLocation): - (JSC::JSObject::getOwnPropertySlotForWrite): - (JSC::JSObject::putDirect): - * kjs/PropertyMap.cpp: - * kjs/PropertyMap.h: - -2008-09-09 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20759: Remove MacroAssembler - - - Remove MacroAssembler and move its functionality to X86Assembler. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CTI.cpp: - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::emitPutArg): - (JSC::CTI::emitPutCTIParam): - (JSC::CTI::emitGetCTIParam): - (JSC::CTI::emitPutToCallFrameHeader): - (JSC::CTI::emitGetFromCallFrameHeader): - (JSC::CTI::emitPutResult): - (JSC::CTI::emitDebugExceptionCheck): - (JSC::CTI::emitJumpSlowCaseIfNotImm): - (JSC::CTI::emitJumpSlowCaseIfNotImms): - (JSC::CTI::emitFastArithDeTagImmediate): - (JSC::CTI::emitFastArithReTagImmediate): - (JSC::CTI::emitFastArithPotentiallyReTagImmediate): - (JSC::CTI::emitFastArithImmToInt): - (JSC::CTI::emitFastArithIntToImmOrSlowCase): - (JSC::CTI::emitFastArithIntToImmNoCheck): - (JSC::CTI::compileOpCall): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::CTI::privateArrayLengthTrampoline): - (JSC::CTI::privateStringLengthTrampoline): - (JSC::CTI::compileRegExp): - * VM/CTI.h: - (JSC::CallRecord::CallRecord): - (JSC::JmpTable::JmpTable): - (JSC::SlowCaseEntry::SlowCaseEntry): - (JSC::CTI::JSRInfo::JSRInfo): - * masm/MacroAssembler.h: Removed. - * masm/MacroAssemblerWin.cpp: Removed. - * masm/X86Assembler.h: - (JSC::X86Assembler::emitConvertToFastCall): - (JSC::X86Assembler::emitRestoreArgumentReference): - * wrec/WREC.h: - (JSC::WRECGenerator::WRECGenerator): - (JSC::WRECParser::WRECParser): - -2008-09-09 Sam Weinig - - Reviewed by Cameron Zwarich. - - Don't waste the first item in the PropertyStorage. - - - Fix typo (makingCount -> markingCount) - - Remove undefined method declaration. - - No change on Sunspider. - - * kjs/JSObject.cpp: - (JSC::JSObject::mark): - * kjs/PropertyMap.cpp: - (JSC::PropertyMap::put): - (JSC::PropertyMap::remove): - (JSC::PropertyMap::getOffset): - (JSC::PropertyMap::insert): - (JSC::PropertyMap::rehash): - (JSC::PropertyMap::resizePropertyStorage): - (JSC::PropertyMap::checkConsistency): - * kjs/PropertyMap.h: - (JSC::PropertyMap::markingCount): Fix typo. - -2008-09-09 Cameron Zwarich - - Not reviewed. - - Speculative Windows build fix. - - * masm/MacroAssemblerWin.cpp: - (JSC::MacroAssembler::emitConvertToFastCall): - (JSC::MacroAssembler::emitRestoreArgumentReference): - -2008-09-09 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20755: Create an X86 namespace for register names and other things - - - Create an X86 namespace to put X86 register names. Perhaps I will move - opcode names here later as well. - - * VM/CTI.cpp: - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::emitPutArg): - (JSC::CTI::emitPutArgConstant): - (JSC::CTI::emitPutCTIParam): - (JSC::CTI::emitGetCTIParam): - (JSC::CTI::emitPutToCallFrameHeader): - (JSC::CTI::emitGetFromCallFrameHeader): - (JSC::CTI::emitPutResult): - (JSC::CTI::emitDebugExceptionCheck): - (JSC::CTI::emitJumpSlowCaseIfNotImms): - (JSC::CTI::compileOpCall): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::CTI::privateArrayLengthTrampoline): - (JSC::CTI::privateStringLengthTrampoline): - (JSC::CTI::compileRegExp): - * VM/CTI.h: - * masm/X86Assembler.h: - (JSC::X86::): - (JSC::X86Assembler::emitModRm_rm): - (JSC::X86Assembler::emitModRm_rm_Unchecked): - (JSC::X86Assembler::emitModRm_rmsib): - * wrec/WREC.cpp: - (JSC::WRECGenerator::generateNonGreedyQuantifier): - (JSC::WRECGenerator::generateGreedyQuantifier): - (JSC::WRECGenerator::generateParentheses): - (JSC::WRECGenerator::generateBackreference): - (JSC::WRECGenerator::gernerateDisjunction): - * wrec/WREC.h: - -2008-09-09 Sam Weinig - - Reviewed by Geoffrey Garen. - - Remove unnecessary friend declaration. - - * kjs/PropertyMap.h: - -2008-09-09 Sam Weinig - - Reviewed by Geoffrey Garen. - - Replace uses of PropertyMap::get and PropertyMap::getLocation with - PropertyMap::getOffset. - - Sunspider reports this as a .6% improvement. - - * JavaScriptCore.exp: - * kjs/JSObject.cpp: - (JSC::JSObject::put): - (JSC::JSObject::deleteProperty): - (JSC::JSObject::getPropertyAttributes): - * kjs/JSObject.h: - (JSC::JSObject::getDirect): - (JSC::JSObject::getDirectLocation): - (JSC::JSObject::locationForOffset): - * kjs/PropertyMap.cpp: - (JSC::PropertyMap::remove): - (JSC::PropertyMap::getOffset): - * kjs/PropertyMap.h: - -2008-09-09 Cameron Zwarich - - Reviewed by Sam Weinig. - - Bug 20754: Remove emit prefix from assembler opcode methods - - - * VM/CTI.cpp: - (JSC::CTI::emitGetArg): - (JSC::CTI::emitGetPutArg): - (JSC::CTI::emitPutArg): - (JSC::CTI::emitPutArgConstant): - (JSC::CTI::emitPutCTIParam): - (JSC::CTI::emitGetCTIParam): - (JSC::CTI::emitPutToCallFrameHeader): - (JSC::CTI::emitGetFromCallFrameHeader): - (JSC::CTI::emitPutResult): - (JSC::CTI::emitDebugExceptionCheck): - (JSC::CTI::emitCall): - (JSC::CTI::emitJumpSlowCaseIfNotImm): - (JSC::CTI::emitJumpSlowCaseIfNotImms): - (JSC::CTI::emitFastArithDeTagImmediate): - (JSC::CTI::emitFastArithReTagImmediate): - (JSC::CTI::emitFastArithPotentiallyReTagImmediate): - (JSC::CTI::emitFastArithImmToInt): - (JSC::CTI::emitFastArithIntToImmOrSlowCase): - (JSC::CTI::emitFastArithIntToImmNoCheck): - (JSC::CTI::compileOpCall): - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - (JSC::CTI::privateCompile): - (JSC::CTI::privateCompileGetByIdSelf): - (JSC::CTI::privateCompileGetByIdProto): - (JSC::CTI::privateCompileGetByIdChain): - (JSC::CTI::privateCompilePutByIdReplace): - (JSC::CTI::privateArrayLengthTrampoline): - (JSC::CTI::privateStringLengthTrampoline): - (JSC::CTI::compileRegExp): - * masm/MacroAssemblerWin.cpp: - (JSC::MacroAssembler::emitConvertToFastCall): - (JSC::MacroAssembler::emitRestoreArgumentReference): - * masm/X86Assembler.h: - (JSC::X86Assembler::pushl_r): - (JSC::X86Assembler::pushl_m): - (JSC::X86Assembler::popl_r): - (JSC::X86Assembler::popl_m): - (JSC::X86Assembler::movl_rr): - (JSC::X86Assembler::addl_rr): - (JSC::X86Assembler::addl_i8r): - (JSC::X86Assembler::addl_i32r): - (JSC::X86Assembler::addl_mr): - (JSC::X86Assembler::andl_rr): - (JSC::X86Assembler::andl_i32r): - (JSC::X86Assembler::cmpl_i8r): - (JSC::X86Assembler::cmpl_rr): - (JSC::X86Assembler::cmpl_rm): - (JSC::X86Assembler::cmpl_i32r): - (JSC::X86Assembler::cmpl_i32m): - (JSC::X86Assembler::cmpw_rm): - (JSC::X86Assembler::orl_rr): - (JSC::X86Assembler::subl_rr): - (JSC::X86Assembler::subl_i8r): - (JSC::X86Assembler::subl_i32r): - (JSC::X86Assembler::subl_mr): - (JSC::X86Assembler::testl_i32r): - (JSC::X86Assembler::testl_rr): - (JSC::X86Assembler::xorl_i8r): - (JSC::X86Assembler::xorl_rr): - (JSC::X86Assembler::sarl_i8r): - (JSC::X86Assembler::sarl_CLr): - (JSC::X86Assembler::shl_i8r): - (JSC::X86Assembler::shll_CLr): - (JSC::X86Assembler::mull_rr): - (JSC::X86Assembler::idivl_r): - (JSC::X86Assembler::cdq): - (JSC::X86Assembler::movl_mr): - (JSC::X86Assembler::movzwl_mr): - (JSC::X86Assembler::movl_rm): - (JSC::X86Assembler::movl_i32r): - (JSC::X86Assembler::movl_i32m): - (JSC::X86Assembler::leal_mr): - (JSC::X86Assembler::ret): - (JSC::X86Assembler::jmp_r): - (JSC::X86Assembler::jmp_m): - (JSC::X86Assembler::call_r): - * wrec/WREC.cpp: - (JSC::WRECGenerator::generateBacktrack1): - (JSC::WRECGenerator::generateBacktrackBackreference): - (JSC::WRECGenerator::generateBackreferenceQuantifier): - (JSC::WRECGenerator::generateNonGreedyQuantifier): - (JSC::WRECGenerator::generateGreedyQuantifier): - (JSC::WRECGenerator::generatePatternCharacter): - (JSC::WRECGenerator::generateCharacterClassInvertedRange): - (JSC::WRECGenerator::generateCharacterClassInverted): - (JSC::WRECGenerator::generateCharacterClass): - (JSC::WRECGenerator::generateParentheses): - (JSC::WRECGenerator::gererateParenthesesResetTrampoline): - (JSC::WRECGenerator::generateAssertionBOL): - (JSC::WRECGenerator::generateAssertionEOL): - (JSC::WRECGenerator::generateAssertionWordBoundary): - (JSC::WRECGenerator::generateBackreference): - (JSC::WRECGenerator::gernerateDisjunction): - -2008-09-09 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Clean up the WREC code some more. - - * VM/CTI.cpp: - (JSC::CTI::compileRegExp): - * wrec/WREC.cpp: - (JSC::getCharacterClassNewline): - (JSC::getCharacterClassDigits): - (JSC::getCharacterClassSpaces): - (JSC::getCharacterClassWordchar): - (JSC::getCharacterClassNondigits): - (JSC::getCharacterClassNonspaces): - (JSC::getCharacterClassNonwordchar): - (JSC::WRECGenerator::generateBacktrack1): - (JSC::WRECGenerator::generateBacktrackBackreference): - (JSC::WRECGenerator::generateBackreferenceQuantifier): - (JSC::WRECGenerator::generateNonGreedyQuantifier): - (JSC::WRECGenerator::generateGreedyQuantifier): - (JSC::WRECGenerator::generatePatternCharacter): - (JSC::WRECGenerator::generateCharacterClassInvertedRange): - (JSC::WRECGenerator::generateCharacterClassInverted): - (JSC::WRECGenerator::generateCharacterClass): - (JSC::WRECGenerator::generateParentheses): - (JSC::WRECGenerator::gererateParenthesesResetTrampoline): - (JSC::WRECGenerator::generateAssertionBOL): - (JSC::WRECGenerator::generateAssertionEOL): - (JSC::WRECGenerator::generateAssertionWordBoundary): - (JSC::WRECGenerator::generateBackreference): - (JSC::WRECGenerator::gernerateDisjunction): - (JSC::WRECParser::parseCharacterClass): - (JSC::WRECParser::parseEscape): - (JSC::WRECParser::parseTerm): - * wrec/WREC.h: - -2008-09-09 Mark Rowe - - Build fix, rubber-stamped by Anders Carlsson. - - Silence spurious build warnings about missing format attributes on functions in Assertions.cpp. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-09-09 Mark Rowe - - Rubber-stamped by Oliver Hunt. - - Fix builds using the "debug" variant. - - This reverts r36130 and tweaks Identifier to export the same symbols for Debug - and Release configurations. - - * Configurations/JavaScriptCore.xcconfig: - * DerivedSources.make: - * JavaScriptCore.Debug.exp: Removed. - * JavaScriptCore.base.exp: Removed. - * JavaScriptCore.exp: Added. - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/identifier.cpp: - (JSC::Identifier::addSlowCase): #ifdef the call to checkSameIdentifierTable so that - there is no overhead in Release builds. - (JSC::Identifier::checkSameIdentifierTable): Add empty functions for Release builds. - * kjs/identifier.h: - (JSC::Identifier::add): #ifdef the calls to checkSameIdentifierTable so that there is - no overhead in Release builds, and remove the inline definitions of checkSameIdentifierTable. - -2008-09-09 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Clean up WREC a bit to bring it closer to our coding style guidelines. - - * wrec/WREC.cpp: - (JSC::): - (JSC::getCharacterClass_newline): - (JSC::getCharacterClass_d): - (JSC::getCharacterClass_s): - (JSC::getCharacterClass_w): - (JSC::getCharacterClass_D): - (JSC::getCharacterClass_S): - (JSC::getCharacterClass_W): - (JSC::CharacterClassConstructor::append): - (JSC::WRECGenerator::generateNonGreedyQuantifier): - (JSC::WRECGenerator::generateGreedyQuantifier): - (JSC::WRECGenerator::generateCharacterClassInverted): - (JSC::WRECParser::parseQuantifier): - (JSC::WRECParser::parsePatternCharacterQualifier): - (JSC::WRECParser::parseCharacterClassQuantifier): - (JSC::WRECParser::parseBackreferenceQuantifier): - * wrec/WREC.h: - (JSC::Quantifier::): - (JSC::Quantifier::Quantifier): - -2008-09-09 Jungshik Shin - - Reviewed by Alexey Proskuryakov. - - Try MIME charset names before trying IANA names - ( https://bugs.webkit.org/show_bug.cgi?id=17537 ) - - * wtf/StringExtras.h: (strcasecmp): Added. - -2008-09-09 Cameron Zwarich - - Reviewed by Mark Rowe. - - Bug 20719: REGRESSION (r36135-36244): Hangs, then crashes after several seconds - - - - Fix a typo in the case-insensitive matching of character patterns. - - * wrec/WREC.cpp: - (JSC::WRECGenerator::generatePatternCharacter): - -2008-09-09 Maciej Stachowiak - - Reviewed by Sam Weinig. - - - allow polymorphic inline cache to handle Math object functions and possibly other similar things - - 1.012x speedup on SunSpider. - - * kjs/MathObject.cpp: - (JSC::MathObject::getOwnPropertySlot): - * kjs/lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * kjs/lookup.h: - (JSC::getStaticPropertySlot): - -2008-09-08 Sam Weinig - - Reviewed by Maciej Stachowiak and Oliver Hunt. - - Split storage of properties out of the PropertyMap and into the JSObject - to allow sharing PropertyMap on the StructureID. In order to get this - function correctly, the StructureID's transition mappings were changed to - transition based on property name and attribute pairs, instead of just - property name. - - - Removes the single property optimization now that the PropertyMap is shared. - This will be replaced by in-lining some values on the JSObject. - - This is a wash on Sunspider and a 6.7% win on the v8 test suite. - - * JavaScriptCore.base.exp: - * VM/CTI.cpp: - (JSC::CTI::privateCompileGetByIdSelf): Get the storage directly off the JSObject. - (JSC::CTI::privateCompileGetByIdProto): Ditto. - (JSC::CTI::privateCompileGetByIdChain): Ditto. - (JSC::CTI::privateCompilePutByIdReplace): Ditto. - * kjs/JSObject.cpp: - (JSC::JSObject::mark): Mark the PropertyStorage. - (JSC::JSObject::put): Update to get the propertyMap of the StructureID. - (JSC::JSObject::deleteProperty): Ditto. - (JSC::JSObject::defineGetter): Return early if the property is already a getter/setter. - (JSC::JSObject::defineSetter): Ditto. - (JSC::JSObject::getPropertyAttributes): Update to get the propertyMap of the StructureID - (JSC::JSObject::getPropertyNames): Ditto. - (JSC::JSObject::removeDirect): Ditto. - * kjs/JSObject.h: Remove PropertyMap and add PropertyStorage. - (JSC::JSObject::propertyStorage): return the PropertyStorage. - (JSC::JSObject::getDirect): Update to get the propertyMap of the StructureID. - (JSC::JSObject::getDirectLocation): Ditto. - (JSC::JSObject::offsetForLocation): Compute location directly. - (JSC::JSObject::hasCustomProperties): Update to get the propertyMap of the StructureID. - (JSC::JSObject::hasGetterSetterProperties): Ditto. - (JSC::JSObject::getDirectOffset): Get by indexing into PropertyStorage. - (JSC::JSObject::putDirectOffset): Put by indexing into PropertyStorage. - (JSC::JSObject::getOwnPropertySlotForWrite): Update to get the propertyMap of the StructureID. - (JSC::JSObject::getOwnPropertySlot): Ditto. - (JSC::JSObject::putDirect): Move putting into the StructureID unless the property already exists. - * kjs/PropertyMap.cpp: Use the propertyStorage as the storage for the JSValues. - (JSC::PropertyMap::checkConsistency): - (JSC::PropertyMap::operator=): - (JSC::PropertyMap::~PropertyMap): - (JSC::PropertyMap::get): - (JSC::PropertyMap::getLocation): - (JSC::PropertyMap::put): - (JSC::PropertyMap::getOffset): - (JSC::PropertyMap::insert): - (JSC::PropertyMap::expand): - (JSC::PropertyMap::rehash): - (JSC::PropertyMap::createTable): - (JSC::PropertyMap::resizePropertyStorage): Resize the storage to match the size of the map - (JSC::PropertyMap::remove): - (JSC::PropertyMap::getEnumerablePropertyNames): - * kjs/PropertyMap.h: - (JSC::PropertyMapEntry::PropertyMapEntry): - (JSC::PropertyMap::isEmpty): - (JSC::PropertyMap::size): - (JSC::PropertyMap::makingCount): - (JSC::PropertyMap::PropertyMap): - - * kjs/StructureID.cpp: - (JSC::StructureID::addPropertyTransition): Transitions now are based off the property name - and attributes. - (JSC::StructureID::toDictionaryTransition): Copy the map. - (JSC::StructureID::changePrototypeTransition): Copy the map. - (JSC::StructureID::getterSetterTransition): Copy the map. - (JSC::StructureID::~StructureID): - * kjs/StructureID.h: - (JSC::TransitionTableHash::hash): Custom hash for transition map. - (JSC::TransitionTableHash::equal): Ditto. - (JSC::TransitionTableHashTraits::emptyValue): Custom traits for transition map - (JSC::TransitionTableHashTraits::constructDeletedValue): Ditto. - (JSC::TransitionTableHashTraits::isDeletedValue): Ditto. - (JSC::StructureID::propertyMap): Added. - -2008-09-08 Oliver Hunt - - Reviewed by Mark Rowe. - - Bug 20694: Slow Script error pops up when running Dromaeo tests - - Correct error in timeout logic where execution tick count would - be reset to incorrect value due to incorrect offset and indirection. - Codegen for the slow script dialog was factored out into a separate - method (emitSlowScriptCheck) rather than having multiple copies of - the same code. Also added calls to generate slow script checks - for loop_if_less and loop_if_true opcodes. - - * VM/CTI.cpp: - (JSC::CTI::emitSlowScriptCheck): - (JSC::CTI::privateCompileMainPass): - (JSC::CTI::privateCompileSlowCases): - * VM/CTI.h: - -2008-09-08 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Remove references to the removed WRECompiler class. - - * VM/Machine.h: - * wrec/WREC.h: - -2008-09-08 Cameron Zwarich - - Rubber-stamped by Mark Rowe. - - Fix the build with CTI enabled but WREC disabled. - - * VM/CTI.cpp: - * VM/CTI.h: - -2008-09-08 Dan Bernstein - - - build fix - - * kjs/nodes.h: - (JSC::StatementNode::): - (JSC::BlockNode::): - -2008-09-08 Kevin McCullough - - Reviewed by Geoff. - - Breakpoints in for loops, while loops or - conditions without curly braces don't break. (19306) - -Statement Lists already emit debug hooks but conditionals without - brackets are not lists. - - * kjs/nodes.cpp: - (KJS::IfNode::emitCode): - (KJS::IfElseNode::emitCode): - (KJS::DoWhileNode::emitCode): - (KJS::WhileNode::emitCode): - (KJS::ForNode::emitCode): - (KJS::ForInNode::emitCode): - * kjs/nodes.h: - (KJS::StatementNode::): - (KJS::BlockNode::): - -2008-09-08 Maciej Stachowiak - - Reviewed by Anders Carlsson. - - - Cache the code generated for eval to speed up SunSpider and web sites - https://bugs.webkit.org/show_bug.cgi?id=20718 - - 1.052x on SunSpider - 2.29x on date-format-tofte - - Lots of real sites seem to get many hits on this cache as well, - including GMail, Google Spreadsheets, Slate and Digg (the last of - these gets over 100 hits on initial page load). - - * VM/CodeBlock.h: - (JSC::EvalCodeCache::get): - * VM/Machine.cpp: - (JSC::Machine::callEval): - (JSC::Machine::privateExecute): - (JSC::Machine::cti_op_call_eval): - * VM/Machine.h: - -2008-09-07 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 20711: Change KJS prefix on preprocessor macros to JSC - - - * kjs/CommonIdentifiers.cpp: - (JSC::CommonIdentifiers::CommonIdentifiers): - * kjs/CommonIdentifiers.h: - * kjs/PropertySlot.h: - (JSC::PropertySlot::getValue): - (JSC::PropertySlot::putValue): - (JSC::PropertySlot::setValueSlot): - (JSC::PropertySlot::setValue): - (JSC::PropertySlot::setRegisterSlot): - * kjs/lookup.h: - * kjs/nodes.cpp: - * kjs/nodes.h: - (JSC::Node::): - (JSC::ExpressionNode::): - (JSC::StatementNode::): - (JSC::NullNode::): - (JSC::BooleanNode::): - (JSC::NumberNode::): - (JSC::ImmediateNumberNode::): - (JSC::StringNode::): - (JSC::RegExpNode::): - (JSC::ThisNode::): - (JSC::ResolveNode::): - (JSC::ElementNode::): - (JSC::ArrayNode::): - (JSC::PropertyNode::): - (JSC::PropertyListNode::): - (JSC::ObjectLiteralNode::): - (JSC::BracketAccessorNode::): - (JSC::DotAccessorNode::): - (JSC::ArgumentListNode::): - (JSC::ArgumentsNode::): - (JSC::NewExprNode::): - (JSC::EvalFunctionCallNode::): - (JSC::FunctionCallValueNode::): - (JSC::FunctionCallResolveNode::): - (JSC::FunctionCallBracketNode::): - (JSC::FunctionCallDotNode::): - (JSC::PrePostResolveNode::): - (JSC::PostfixResolveNode::): - (JSC::PostfixBracketNode::): - (JSC::PostfixDotNode::): - (JSC::PostfixErrorNode::): - (JSC::DeleteResolveNode::): - (JSC::DeleteBracketNode::): - (JSC::DeleteDotNode::): - (JSC::DeleteValueNode::): - (JSC::VoidNode::): - (JSC::TypeOfResolveNode::): - (JSC::TypeOfValueNode::): - (JSC::PrefixResolveNode::): - (JSC::PrefixBracketNode::): - (JSC::PrefixDotNode::): - (JSC::PrefixErrorNode::): - (JSC::UnaryPlusNode::): - (JSC::NegateNode::): - (JSC::BitwiseNotNode::): - (JSC::LogicalNotNode::): - (JSC::MultNode::): - (JSC::DivNode::): - (JSC::ModNode::): - (JSC::AddNode::): - (JSC::SubNode::): - (JSC::LeftShiftNode::): - (JSC::RightShiftNode::): - (JSC::UnsignedRightShiftNode::): - (JSC::LessNode::): - (JSC::GreaterNode::): - (JSC::LessEqNode::): - (JSC::GreaterEqNode::): - (JSC::ThrowableBinaryOpNode::): - (JSC::InstanceOfNode::): - (JSC::InNode::): - (JSC::EqualNode::): - (JSC::NotEqualNode::): - (JSC::StrictEqualNode::): - (JSC::NotStrictEqualNode::): - (JSC::BitAndNode::): - (JSC::BitOrNode::): - (JSC::BitXOrNode::): - (JSC::LogicalOpNode::): - (JSC::ConditionalNode::): - (JSC::ReadModifyResolveNode::): - (JSC::AssignResolveNode::): - (JSC::ReadModifyBracketNode::): - (JSC::AssignBracketNode::): - (JSC::AssignDotNode::): - (JSC::ReadModifyDotNode::): - (JSC::AssignErrorNode::): - (JSC::CommaNode::): - (JSC::VarDeclCommaNode::): - (JSC::ConstDeclNode::): - (JSC::ConstStatementNode::): - (JSC::EmptyStatementNode::): - (JSC::DebuggerStatementNode::): - (JSC::ExprStatementNode::): - (JSC::VarStatementNode::): - (JSC::IfNode::): - (JSC::IfElseNode::): - (JSC::DoWhileNode::): - (JSC::WhileNode::): - (JSC::ForNode::): - (JSC::ContinueNode::): - (JSC::BreakNode::): - (JSC::ReturnNode::): - (JSC::WithNode::): - (JSC::LabelNode::): - (JSC::ThrowNode::): - (JSC::TryNode::): - (JSC::ParameterNode::): - (JSC::ScopeNode::): - (JSC::ProgramNode::): - (JSC::EvalNode::): - (JSC::FunctionBodyNode::): - (JSC::FuncExprNode::): - (JSC::FuncDeclNode::): - (JSC::CaseClauseNode::): - (JSC::ClauseListNode::): - (JSC::CaseBlockNode::): - (JSC::SwitchNode::): - -2008-09-07 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20704: Replace the KJS namespace - - - Rename the KJS namespace to JSC. There are still some uses of KJS in - preprocessor macros and comments, but these will also be changed some - time in the near future. - - * API/APICast.h: - (toJS): - (toRef): - (toGlobalRef): - * API/JSBase.cpp: - * API/JSCallbackConstructor.cpp: - * API/JSCallbackConstructor.h: - * API/JSCallbackFunction.cpp: - * API/JSCallbackFunction.h: - * API/JSCallbackObject.cpp: - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - * API/JSClassRef.cpp: - (OpaqueJSClass::staticValues): - (OpaqueJSClass::staticFunctions): - * API/JSClassRef.h: - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - * API/JSProfilerPrivate.cpp: - * API/JSStringRef.cpp: - * API/JSValueRef.cpp: - (JSValueGetType): - * API/OpaqueJSString.cpp: - * API/OpaqueJSString.h: - * JavaScriptCore.Debug.exp: - * JavaScriptCore.base.exp: - * VM/CTI.cpp: - (JSC::): - * VM/CTI.h: - * VM/CodeBlock.cpp: - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - * VM/CodeGenerator.h: - * VM/ExceptionHelpers.cpp: - * VM/ExceptionHelpers.h: - * VM/Instruction.h: - * VM/JSPropertyNameIterator.cpp: - * VM/JSPropertyNameIterator.h: - * VM/LabelID.h: - * VM/Machine.cpp: - * VM/Machine.h: - * VM/Opcode.cpp: - * VM/Opcode.h: - * VM/Register.h: - (WTF::): - * VM/RegisterFile.cpp: - * VM/RegisterFile.h: - * VM/RegisterID.h: - (WTF::): - * VM/SamplingTool.cpp: - * VM/SamplingTool.h: - * VM/SegmentedVector.h: - * kjs/ArgList.cpp: - * kjs/ArgList.h: - * kjs/Arguments.cpp: - * kjs/Arguments.h: - * kjs/ArrayConstructor.cpp: - * kjs/ArrayConstructor.h: - * kjs/ArrayPrototype.cpp: - * kjs/ArrayPrototype.h: - * kjs/BatchedTransitionOptimizer.h: - * kjs/BooleanConstructor.cpp: - * kjs/BooleanConstructor.h: - * kjs/BooleanObject.cpp: - * kjs/BooleanObject.h: - * kjs/BooleanPrototype.cpp: - * kjs/BooleanPrototype.h: - * kjs/CallData.cpp: - * kjs/CallData.h: - * kjs/ClassInfo.h: - * kjs/CommonIdentifiers.cpp: - * kjs/CommonIdentifiers.h: - * kjs/ConstructData.cpp: - * kjs/ConstructData.h: - * kjs/DateConstructor.cpp: - * kjs/DateConstructor.h: - * kjs/DateInstance.cpp: - (JSC::DateInstance::msToGregorianDateTime): - * kjs/DateInstance.h: - * kjs/DateMath.cpp: - * kjs/DateMath.h: - * kjs/DatePrototype.cpp: - * kjs/DatePrototype.h: - * kjs/DebuggerCallFrame.cpp: - * kjs/DebuggerCallFrame.h: - * kjs/Error.cpp: - * kjs/Error.h: - * kjs/ErrorConstructor.cpp: - * kjs/ErrorConstructor.h: - * kjs/ErrorInstance.cpp: - * kjs/ErrorInstance.h: - * kjs/ErrorPrototype.cpp: - * kjs/ErrorPrototype.h: - * kjs/ExecState.cpp: - * kjs/ExecState.h: - * kjs/FunctionConstructor.cpp: - * kjs/FunctionConstructor.h: - * kjs/FunctionPrototype.cpp: - * kjs/FunctionPrototype.h: - * kjs/GetterSetter.cpp: - * kjs/GetterSetter.h: - * kjs/GlobalEvalFunction.cpp: - * kjs/GlobalEvalFunction.h: - * kjs/IndexToNameMap.cpp: - * kjs/IndexToNameMap.h: - * kjs/InitializeThreading.cpp: - * kjs/InitializeThreading.h: - * kjs/InternalFunction.cpp: - * kjs/InternalFunction.h: - (JSC::InternalFunction::InternalFunction): - * kjs/JSActivation.cpp: - * kjs/JSActivation.h: - * kjs/JSArray.cpp: - * kjs/JSArray.h: - * kjs/JSCell.cpp: - * kjs/JSCell.h: - * kjs/JSFunction.cpp: - * kjs/JSFunction.h: - (JSC::JSFunction::JSFunction): - * kjs/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * kjs/JSGlobalData.h: - * kjs/JSGlobalObject.cpp: - * kjs/JSGlobalObject.h: - * kjs/JSGlobalObjectFunctions.cpp: - * kjs/JSGlobalObjectFunctions.h: - * kjs/JSImmediate.cpp: - * kjs/JSImmediate.h: - * kjs/JSLock.cpp: - * kjs/JSLock.h: - * kjs/JSNotAnObject.cpp: - * kjs/JSNotAnObject.h: - * kjs/JSNumberCell.cpp: - * kjs/JSNumberCell.h: - * kjs/JSObject.cpp: - * kjs/JSObject.h: - * kjs/JSStaticScopeObject.cpp: - * kjs/JSStaticScopeObject.h: - * kjs/JSString.cpp: - * kjs/JSString.h: - * kjs/JSType.h: - * kjs/JSValue.cpp: - * kjs/JSValue.h: - * kjs/JSVariableObject.cpp: - * kjs/JSVariableObject.h: - * kjs/JSWrapperObject.cpp: - * kjs/JSWrapperObject.h: - * kjs/LabelStack.cpp: - * kjs/LabelStack.h: - * kjs/MathObject.cpp: - * kjs/MathObject.h: - * kjs/NativeErrorConstructor.cpp: - * kjs/NativeErrorConstructor.h: - * kjs/NativeErrorPrototype.cpp: - * kjs/NativeErrorPrototype.h: - * kjs/NodeInfo.h: - * kjs/NumberConstructor.cpp: - * kjs/NumberConstructor.h: - * kjs/NumberObject.cpp: - * kjs/NumberObject.h: - * kjs/NumberPrototype.cpp: - * kjs/NumberPrototype.h: - * kjs/ObjectConstructor.cpp: - * kjs/ObjectConstructor.h: - * kjs/ObjectPrototype.cpp: - * kjs/ObjectPrototype.h: - * kjs/Parser.cpp: - * kjs/Parser.h: - * kjs/PropertyMap.cpp: - (JSC::PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger): - * kjs/PropertyMap.h: - * kjs/PropertyNameArray.cpp: - * kjs/PropertyNameArray.h: - * kjs/PropertySlot.cpp: - * kjs/PropertySlot.h: - * kjs/PrototypeFunction.cpp: - * kjs/PrototypeFunction.h: - * kjs/PutPropertySlot.h: - * kjs/RegExpConstructor.cpp: - * kjs/RegExpConstructor.h: - * kjs/RegExpObject.cpp: - * kjs/RegExpObject.h: - * kjs/RegExpPrototype.cpp: - * kjs/RegExpPrototype.h: - * kjs/ScopeChain.cpp: - * kjs/ScopeChain.h: - * kjs/ScopeChainMark.h: - * kjs/Shell.cpp: - (jscmain): - * kjs/SmallStrings.cpp: - * kjs/SmallStrings.h: - * kjs/SourceProvider.h: - * kjs/SourceRange.h: - * kjs/StringConstructor.cpp: - * kjs/StringConstructor.h: - * kjs/StringObject.cpp: - * kjs/StringObject.h: - * kjs/StringObjectThatMasqueradesAsUndefined.h: - * kjs/StringPrototype.cpp: - * kjs/StringPrototype.h: - * kjs/StructureID.cpp: - * kjs/StructureID.h: - * kjs/SymbolTable.h: - * kjs/collector.cpp: - * kjs/collector.h: - * kjs/completion.h: - * kjs/create_hash_table: - * kjs/debugger.cpp: - * kjs/debugger.h: - * kjs/dtoa.cpp: - * kjs/dtoa.h: - * kjs/grammar.y: - * kjs/identifier.cpp: - * kjs/identifier.h: - (JSC::Identifier::equal): - * kjs/interpreter.cpp: - * kjs/interpreter.h: - * kjs/lexer.cpp: - (JSC::Lexer::Lexer): - (JSC::Lexer::clear): - (JSC::Lexer::makeIdentifier): - * kjs/lexer.h: - * kjs/lookup.cpp: - * kjs/lookup.h: - * kjs/nodes.cpp: - * kjs/nodes.h: - * kjs/nodes2string.cpp: - * kjs/operations.cpp: - * kjs/operations.h: - * kjs/protect.h: - * kjs/regexp.cpp: - * kjs/regexp.h: - * kjs/ustring.cpp: - * kjs/ustring.h: - (JSC::operator!=): - (JSC::IdentifierRepHash::hash): - (WTF::): - * masm/MacroAssembler.h: - * masm/MacroAssemblerWin.cpp: - * masm/X86Assembler.h: - * pcre/pcre_exec.cpp: - * profiler/CallIdentifier.h: - (WTF::): - * profiler/HeavyProfile.cpp: - * profiler/HeavyProfile.h: - * profiler/Profile.cpp: - * profiler/Profile.h: - * profiler/ProfileGenerator.cpp: - * profiler/ProfileGenerator.h: - * profiler/ProfileNode.cpp: - * profiler/ProfileNode.h: - * profiler/Profiler.cpp: - * profiler/Profiler.h: - * profiler/TreeProfile.cpp: - * profiler/TreeProfile.h: - * wrec/WREC.cpp: - * wrec/WREC.h: - * wtf/AVLTree.h: - -2008-09-07 Maciej Stachowiak - - Reviewed by Dan Bernstein. - - - rename IA32MacroAssembler class to X86Assembler - - We otherwise call the platform X86, and also, I don't see any macros. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * masm/IA32MacroAsm.h: Removed. - * masm/MacroAssembler.h: - (KJS::MacroAssembler::MacroAssembler): - * masm/MacroAssemblerWin.cpp: - (KJS::MacroAssembler::emitRestoreArgumentReference): - * masm/X86Assembler.h: Copied from masm/IA32MacroAsm.h. - (KJS::X86Assembler::X86Assembler): - * wrec/WREC.cpp: - (KJS::WRECGenerator::generateNonGreedyQuantifier): - (KJS::WRECGenerator::generateGreedyQuantifier): - (KJS::WRECGenerator::generateParentheses): - (KJS::WRECGenerator::generateBackreference): - (KJS::WRECGenerator::gernerateDisjunction): - * wrec/WREC.h: - -2008-09-07 Cameron Zwarich - - Not reviewed. - - Visual C++ seems to have some odd casting rules, so just convert the - offending cast back to a C-style cast for now. - - * kjs/collector.cpp: - (KJS::otherThreadStackPointer): - -2008-09-07 Cameron Zwarich - - Reviewed by Mark Rowe. - - Attempt to fix the Windows build by using a const_cast to cast regs.Esp - to a uintptr_t instead of a reinterpret_cast. - - * kjs/collector.cpp: - (KJS::otherThreadStackPointer): - -2008-09-07 Cameron Zwarich - - Reviewed by Sam Weinig. - - Remove C-style casts from kjs/collector.cpp. - - * kjs/collector.cpp: - (KJS::Heap::heapAllocate): - (KJS::currentThreadStackBase): - (KJS::Heap::markConservatively): - (KJS::otherThreadStackPointer): - (KJS::Heap::markOtherThreadConservatively): - (KJS::Heap::sweep): - -2008-09-07 Mark Rowe - - Build fix for the debug variant. - - * DerivedSources.make: Also use the .Debug.exp exports file when building the debug variant. - -2008-09-07 Cameron Zwarich - - Reviewed by Timothy Hatcher. - - Remove C-style casts from the CTI code. - - * VM/CTI.cpp: - (KJS::CTI::emitGetArg): - (KJS::CTI::emitGetPutArg): - (KJS::ctiRepatchCallByReturnAddress): - (KJS::CTI::compileOpCall): - (KJS::CTI::privateCompileMainPass): - (KJS::CTI::privateCompileGetByIdSelf): - (KJS::CTI::privateCompileGetByIdProto): - (KJS::CTI::privateCompileGetByIdChain): - (KJS::CTI::privateCompilePutByIdReplace): - (KJS::CTI::privateArrayLengthTrampoline): - (KJS::CTI::privateStringLengthTrampoline): - -=== End merge of squirrelfish-extreme === - -2008-09-06 Gavin Barraclough - - Reviewed by Sam Weinig. Adapted somewhat by Maciej Stachowiak. - - - refactor WREC to share more of the JIT infrastructure with CTI - - * VM/CTI.cpp: - (KJS::CTI::emitGetArg): - (KJS::CTI::emitGetPutArg): - (KJS::CTI::emitPutArg): - (KJS::CTI::emitPutArgConstant): - (KJS::CTI::emitPutCTIParam): - (KJS::CTI::emitGetCTIParam): - (KJS::CTI::emitPutToCallFrameHeader): - (KJS::CTI::emitGetFromCallFrameHeader): - (KJS::CTI::emitPutResult): - (KJS::CTI::emitDebugExceptionCheck): - (KJS::CTI::emitJumpSlowCaseIfNotImm): - (KJS::CTI::emitJumpSlowCaseIfNotImms): - (KJS::CTI::emitFastArithDeTagImmediate): - (KJS::CTI::emitFastArithReTagImmediate): - (KJS::CTI::emitFastArithPotentiallyReTagImmediate): - (KJS::CTI::emitFastArithImmToInt): - (KJS::CTI::emitFastArithIntToImmOrSlowCase): - (KJS::CTI::emitFastArithIntToImmNoCheck): - (KJS::CTI::CTI): - (KJS::CTI::compileOpCall): - (KJS::CTI::privateCompileMainPass): - (KJS::CTI::privateCompileSlowCases): - (KJS::CTI::privateCompile): - (KJS::CTI::privateCompileGetByIdSelf): - (KJS::CTI::privateCompileGetByIdProto): - (KJS::CTI::privateCompileGetByIdChain): - (KJS::CTI::privateCompilePutByIdReplace): - (KJS::CTI::privateArrayLengthTrampoline): - (KJS::CTI::privateStringLengthTrampoline): - (KJS::CTI::compileRegExp): - * VM/CTI.h: - (KJS::CallRecord::CallRecord): - (KJS::JmpTable::JmpTable): - (KJS::SlowCaseEntry::SlowCaseEntry): - (KJS::CTI::JSRInfo::JSRInfo): - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): - * wrec/WREC.cpp: - (KJS::GenerateParenthesesNonGreedyFunctor::GenerateParenthesesNonGreedyFunctor): - (KJS::GeneratePatternCharacterFunctor::generateAtom): - (KJS::GeneratePatternCharacterFunctor::backtrack): - (KJS::GenerateCharacterClassFunctor::generateAtom): - (KJS::GenerateCharacterClassFunctor::backtrack): - (KJS::GenerateBackreferenceFunctor::generateAtom): - (KJS::GenerateBackreferenceFunctor::backtrack): - (KJS::GenerateParenthesesNonGreedyFunctor::generateAtom): - (KJS::GenerateParenthesesNonGreedyFunctor::backtrack): - (KJS::WRECGenerate::generateBacktrack1): - (KJS::WRECGenerate::generateBacktrackBackreference): - (KJS::WRECGenerate::generateBackreferenceQuantifier): - (KJS::WRECGenerate::generateNonGreedyQuantifier): - (KJS::WRECGenerate::generateGreedyQuantifier): - (KJS::WRECGenerate::generatePatternCharacter): - (KJS::WRECGenerate::generateCharacterClassInvertedRange): - (KJS::WRECGenerate::generateCharacterClassInverted): - (KJS::WRECGenerate::generateCharacterClass): - (KJS::WRECGenerate::generateParentheses): - (KJS::WRECGenerate::generateParenthesesNonGreedy): - (KJS::WRECGenerate::gererateParenthesesResetTrampoline): - (KJS::WRECGenerate::generateAssertionBOL): - (KJS::WRECGenerate::generateAssertionEOL): - (KJS::WRECGenerate::generateAssertionWordBoundary): - (KJS::WRECGenerate::generateBackreference): - (KJS::WRECGenerate::gernerateDisjunction): - (KJS::WRECGenerate::terminateDisjunction): - (KJS::WRECParser::parseGreedyQuantifier): - (KJS::WRECParser::parseQuantifier): - (KJS::WRECParser::parsePatternCharacterQualifier): - (KJS::WRECParser::parseCharacterClassQuantifier): - (KJS::WRECParser::parseBackreferenceQuantifier): - (KJS::WRECParser::parseParentheses): - (KJS::WRECParser::parseCharacterClass): - (KJS::WRECParser::parseOctalEscape): - (KJS::WRECParser::parseEscape): - (KJS::WRECParser::parseTerm): - (KJS::WRECParser::parseDisjunction): - * wrec/WREC.h: - (KJS::WRECGenerate::WRECGenerate): - (KJS::WRECParser::): - (KJS::WRECParser::WRECParser): - (KJS::WRECParser::parseAlternative): - (KJS::WRECParser::isEndOfPattern): - -2008-09-06 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Fix the sampler build. - - * VM/SamplingTool.h: - -2008-09-06 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Jump through the necessary hoops required to make MSVC cooperate with SFX - - We now explicitly declare the calling convention on all cti_op_* cfunctions, - and return int instead of bool where appropriate (despite the cdecl calling - convention seems to state MSVC generates code that returns the result value - through ecx). SFX behaves slightly differently under MSVC, specifically it - stores the base argument address for the cti_op_* functions in the first - argument, and then does the required stack manipulation through that pointer. - This is necessary as MSVC's optimisations assume they have complete control - of the stack, and periodically elide our stack manipulations, or move - values in unexpected ways. MSVC also frequently produces tail calls which may - clobber the first argument, so the MSVC path is slightly less efficient due - to the need to restore it. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CTI.cpp: - (KJS::): - (KJS::CTI::compileOpCall): - (KJS::CTI::privateCompileMainPass): - (KJS::CTI::privateCompileSlowCases): - * VM/CTI.h: - * VM/Machine.cpp: - * VM/Machine.h: - * masm/MacroAssembler.h: - (KJS::MacroAssembler::emitConvertToFastCall): - * masm/MacroAssemblerIA32GCC.cpp: Removed. - For performance reasons we need these no-op functions to be inlined. - - * masm/MacroAssemblerWin.cpp: - (KJS::MacroAssembler::emitRestoreArgumentReference): - * wtf/Platform.h: - -2008-09-05 Geoffrey Garen - - Reviewed by Maciej Stachowiak, or maybe the other way around. - - Added the ability to coalesce JITCode buffer grow operations by first - growing the buffer and then executing unchecked puts to it. - - About a 2% speedup on date-format-tofte. - - * VM/CTI.cpp: - (KJS::CTI::compileOpCall): - * masm/IA32MacroAsm.h: - (KJS::JITCodeBuffer::ensureSpace): - (KJS::JITCodeBuffer::putByteUnchecked): - (KJS::JITCodeBuffer::putByte): - (KJS::JITCodeBuffer::putShortUnchecked): - (KJS::JITCodeBuffer::putShort): - (KJS::JITCodeBuffer::putIntUnchecked): - (KJS::JITCodeBuffer::putInt): - (KJS::IA32MacroAssembler::emitTestl_i32r): - (KJS::IA32MacroAssembler::emitMovl_mr): - (KJS::IA32MacroAssembler::emitMovl_rm): - (KJS::IA32MacroAssembler::emitMovl_i32m): - (KJS::IA32MacroAssembler::emitUnlinkedJe): - (KJS::IA32MacroAssembler::emitModRm_rr): - (KJS::IA32MacroAssembler::emitModRm_rr_Unchecked): - (KJS::IA32MacroAssembler::emitModRm_rm_Unchecked): - (KJS::IA32MacroAssembler::emitModRm_rm): - (KJS::IA32MacroAssembler::emitModRm_opr): - (KJS::IA32MacroAssembler::emitModRm_opr_Unchecked): - (KJS::IA32MacroAssembler::emitModRm_opm_Unchecked): - -2008-09-05 Mark Rowe - - Reviewed by Sam Weinig. - - Disable WREC and CTI on platforms that we have not yet had a chance to test with. - - * wtf/Platform.h: - -2008-09-05 Geoffrey Garen - - Reviewed by Sam Weinig. - - Use jo instead of a mask compare when fetching array.length and - string.length. 4% speedup on array.length / string.length torture - test. - - * VM/CTI.cpp: - (KJS::CTI::privateArrayLengthTrampoline): - (KJS::CTI::privateStringLengthTrampoline): - -2008-09-05 Geoffrey Garen - - Reviewed by Sam Weinig. - - Removed a CTI compilation pass by recording labels during bytecode - generation. This is more to reduce complexity than it is to improve - performance. - - SunSpider reports no change. - - CodeBlock now keeps a "labels" set, which holds the offsets of all the - instructions that can be jumped to. - - * VM/CTI.cpp: Nixed a pass. - - * VM/CodeBlock.h: Added a "labels" set. - - * VM/LabelID.h: No need for a special LableID for holding jump - destinations, since the CodeBlock now knows all jump destinations. - - * wtf/HashTraits.h: New hash traits to accomodate putting offset 0 in - the set. - - * kjs/nodes.cpp: - (KJS::TryNode::emitCode): Emit a dummy label to record sret targets. - -2008-09-05 Mark Rowe - - Reviewed by Oliver Hunt and Gavin Barraclough. - - Move the JITCodeBuffer onto Machine and remove the static variables. - - * VM/CTI.cpp: Initialize m_jit with the Machine's code buffer. - * VM/Machine.cpp: - (KJS::Machine::Machine): Allocate a JITCodeBuffer. - * VM/Machine.h: - * kjs/RegExpConstructor.cpp: - (KJS::constructRegExp): Pass the ExecState through. - * kjs/RegExpPrototype.cpp: - (KJS::regExpProtoFuncCompile): Ditto. - * kjs/StringPrototype.cpp: - (KJS::stringProtoFuncMatch): Ditto. - (KJS::stringProtoFuncSearch): Ditto. - * kjs/nodes.cpp: - (KJS::RegExpNode::emitCode): Compile the pattern at code generation time - so that we have access to an ExecState. - * kjs/nodes.h: - (KJS::RegExpNode::): - * kjs/nodes2string.cpp: - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): Pass the ExecState through. - (KJS::RegExp::create): Ditto. - * kjs/regexp.h: - * masm/IA32MacroAsm.h: - (KJS::IA32MacroAssembler::IA32MacroAssembler): Reset the JITCodeBuffer when we are - constructed. - * wrec/WREC.cpp: - (KJS::WRECompiler::compile): Retrieve the JITCodeBuffer from the Machine. - * wrec/WREC.h: - -2008-09-05 Mark Rowe - - Reviewed by Oliver Hunt and Gavin Barraclough. - - Fix the build when CTI is disabled. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::~CodeBlock): - * VM/CodeGenerator.cpp: - (KJS::prepareJumpTableForStringSwitch): - * VM/Machine.cpp: - (KJS::Machine::Machine): - (KJS::Machine::~Machine): - -2008-09-05 Gavin Barraclough - - Reviewed by Mark Rowe. - - Fix some windows abi issues. - - * VM/CTI.cpp: - (KJS::CTI::privateCompileMainPass): - (KJS::CTI::privateCompileSlowCases): - * VM/CTI.h: - (KJS::CallRecord::CallRecord): - (KJS::): - * VM/Machine.cpp: - (KJS::Machine::cti_op_resolve_func): - (KJS::Machine::cti_op_post_inc): - (KJS::Machine::cti_op_resolve_with_base): - (KJS::Machine::cti_op_post_dec): - * VM/Machine.h: - -2008-09-05 Mark Rowe - - Reviewed by Sam Weinig. - - Fix ecma/FunctionObjects/15.3.5.3.js after I broke it in r93. - - * VM/Machine.cpp: - (KJS::Machine::cti_op_call_NotJSFunction): Restore m_callFrame to the correct value after making the native call. - (KJS::Machine::cti_op_construct_NotJSConstruct): Ditto. - -2008-09-04 Mark Rowe - - Reviewed by Sam Weinig. - - Fix fast/dom/Window/console-functions.html. - - The call frame on the ExecState was not being updated on calls into native functions. This meant that functions - such as console.log would use the line number of the last JS function on the call stack. - - * VM/Machine.cpp: - (KJS::Machine::cti_op_call_NotJSFunction): Update the ExecState's call frame before making a native function call, - and restore it when the function is done. - (KJS::Machine::cti_op_construct_NotJSConstruct): Ditto. - -2008-09-05 Oliver Hunt - - Start bringing up SFX on windows. - - Reviewed by Mark Rowe and Sam Weinig - - Start doing the work to bring up SFX on windows. Initially - just working on WREC, as it does not make any calls so reduces - the amount of code that needs to be corrected. - - Start abstracting the CTI JIT codegen engine. - - * ChangeLog: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CTI.cpp: - * masm/IA32MacroAsm.h: - * masm/MacroAssembler.h: Added. - (KJS::MacroAssembler::MacroAssembler): - * masm/MacroAssemblerIA32GCC.cpp: Added. - (KJS::MacroAssembler::emitConvertToFastCall): - * masm/MacroAssemblerWin.cpp: Added. - (KJS::MacroAssembler::emitConvertToFastCall): - * wrec/WREC.cpp: - (KJS::WRECompiler::parseGreedyQuantifier): - (KJS::WRECompiler::parseCharacterClass): - (KJS::WRECompiler::parseEscape): - (KJS::WRECompiler::compilePattern): - * wrec/WREC.h: - -2008-09-04 Gavin Barraclough - - Reviewed by Sam Weinig. - - Support for slow scripts (timeout checking). - - * VM/CTI.cpp: - (KJS::CTI::privateCompileMainPass): - (KJS::CTI::privateCompile): - * VM/Machine.cpp: - (KJS::slideRegisterWindowForCall): - (KJS::Machine::cti_timeout_check): - (KJS::Machine::cti_vm_throw): - -2008-09-04 Sam Weinig - - Reviewed by Mark Rowe. - - Third round of style cleanup. - - * VM/CTI.cpp: - * VM/CTI.h: - * VM/CodeBlock.h: - * VM/Machine.cpp: - * VM/Machine.h: - * kjs/ExecState.h: - -2008-09-04 Sam Weinig - - Reviewed by Jon Honeycutt. - - Second round of style cleanup. - - * VM/CTI.cpp: - * VM/CTI.h: - * wrec/WREC.h: - -2008-09-04 Sam Weinig - - Reviewed by Mark Rowe. - - First round of style cleanup. - - * VM/CTI.cpp: - * VM/CTI.h: - * masm/IA32MacroAsm.h: - * wrec/WREC.cpp: - * wrec/WREC.h: - -2008-09-04 Geoffrey Garen - - Reviewed by Mark Rowe. - - Merged http://trac.webkit.org/changeset/36081 to work with CTI. - - * VM/Machine.cpp: - (KJS::Machine::tryCtiCacheGetByID): - -2008-09-04 Gavin Barraclough - - Reviewed by Sam Weinig. - - Enable profiling in CTI. - - * VM/CTI.h: - (KJS::): - (KJS::CTI::execute): - * VM/Machine.cpp: - (KJS::Machine::cti_op_call_JSFunction): - (KJS::Machine::cti_op_call_NotJSFunction): - (KJS::Machine::cti_op_ret): - (KJS::Machine::cti_op_construct_JSConstruct): - (KJS::Machine::cti_op_construct_NotJSConstruct): - -2008-09-04 Victor Hernandez - - Reviewed by Geoffrey Garen. - - Fixed an #if to support using WREC without CTI. - - * kjs/regexp.cpp: - (KJS::RegExp::match): - -2008-09-04 Gavin Barraclough - - Reviewed by Oliver Hunt. - - The array/string length trampolines are owned by the Machine, not the codeblock that compiled them. - - * VM/CTI.cpp: - (KJS::CTI::privateArrayLengthTrampoline): - (KJS::CTI::privateStringLengthTrampoline): - * VM/Machine.cpp: - (KJS::Machine::~Machine): - * VM/Machine.h: - -2008-09-04 Mark Rowe - - Reviewed by Gavin Barraclough and Sam Weinig. - - Fix a crash on launch of jsc when GuardMalloc is enabled. - - * kjs/ScopeChain.h: - (KJS::ScopeChain::ScopeChain): Initialize m_node to 0 when we have no valid scope chain. - (KJS::ScopeChain::~ScopeChain): Null-check m_node before calling deref. - -2008-09-03 Oliver Hunt - - Reviewed by Gavin Barraclough and Geoff Garen. - - Fix inspector and fast array access so that it bounds - checks correctly. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass2_Main): - * masm/IA32MacroAsm.h: - (KJS::IA32MacroAssembler::): - (KJS::IA32MacroAssembler::emitUnlinkedJb): - (KJS::IA32MacroAssembler::emitUnlinkedJbe): - -2008-09-03 Mark Rowe - - Move the assertion after the InitializeAndReturn block, as - that is used even when CTI is enabled. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-09-03 Mark Rowe - - Reviewed by Sam Weinig. - - Replace calls to exit with ASSERT_WITH_MESSAGE or ASSERT_NOT_REACHED. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile_pass4_SlowCases): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - (KJS::Machine::cti_vm_throw): - -2008-09-03 Mark Rowe - - Reviewed by Sam Weinig. - - Tweak JavaScriptCore to compile on non-x86 platforms. This is achieved - by wrapping more code with ENABLE(CTI), ENABLE(WREC), and PLATFORM(X86) - #if's. - - * VM/CTI.cpp: - * VM/CTI.h: - * VM/CodeBlock.cpp: - (KJS::CodeBlock::printStructureIDs): Use %td as the format specifier for - printing a ptrdiff_t. - * VM/Machine.cpp: - * VM/Machine.h: - * kjs/regexp.cpp: - (KJS::RegExp::RegExp): - (KJS::RegExp::~RegExp): - (KJS::RegExp::match): - * kjs/regexp.h: - * masm/IA32MacroAsm.h: - * wrec/WREC.cpp: - * wrec/WREC.h: - * wtf/Platform.h: Only enable CTI and WREC on x86. Add an extra define to - track whether any MASM-using features are enabled. - -2008-09-03 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Copy Geoff's array/string length optimization for CTI. - - * VM/CTI.cpp: - (KJS::CTI::privateArrayLengthTrampoline): - (KJS::CTI::privateStringLengthTrampoline): - * VM/CTI.h: - (KJS::CTI::compileArrayLengthTrampoline): - (KJS::CTI::compileStringLengthTrampoline): - * VM/Machine.cpp: - (KJS::Machine::Machine): - (KJS::Machine::getCtiArrayLengthTrampoline): - (KJS::Machine::getCtiStringLengthTrampoline): - (KJS::Machine::tryCtiCacheGetByID): - (KJS::Machine::cti_op_get_by_id_second): - * VM/Machine.h: - * kjs/JSString.h: - * kjs/ustring.h: - -2008-09-03 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Implement fast array accesses in CTI - 2-3% progression on sunspider. - - * VM/CTI.cpp: - (KJS::CTI::emitFastArithIntToImmNoCheck): - (KJS::CTI::compileOpCall): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile_pass4_SlowCases): - * VM/CTI.h: - * kjs/JSArray.h: - -2008-09-02 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Enable fast property access support in CTI. - - * VM/CTI.cpp: - (KJS::ctiSetReturnAddress): - (KJS::ctiRepatchCallByReturnAddress): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile): - (KJS::CTI::privateCompileGetByIdSelf): - (KJS::CTI::privateCompileGetByIdProto): - (KJS::CTI::privateCompileGetByIdChain): - (KJS::CTI::privateCompilePutByIdReplace): - * VM/CTI.h: - (KJS::CTI::compileGetByIdSelf): - (KJS::CTI::compileGetByIdProto): - (KJS::CTI::compileGetByIdChain): - (KJS::CTI::compilePutByIdReplace): - * VM/CodeBlock.cpp: - (KJS::CodeBlock::~CodeBlock): - * VM/CodeBlock.h: - * VM/Machine.cpp: - (KJS::doSetReturnAddressVmThrowTrampoline): - (KJS::Machine::tryCtiCachePutByID): - (KJS::Machine::tryCtiCacheGetByID): - (KJS::Machine::cti_op_put_by_id): - (KJS::Machine::cti_op_put_by_id_second): - (KJS::Machine::cti_op_put_by_id_generic): - (KJS::Machine::cti_op_put_by_id_fail): - (KJS::Machine::cti_op_get_by_id): - (KJS::Machine::cti_op_get_by_id_second): - (KJS::Machine::cti_op_get_by_id_generic): - (KJS::Machine::cti_op_get_by_id_fail): - (KJS::Machine::cti_op_throw): - (KJS::Machine::cti_vm_throw): - * VM/Machine.h: - * kjs/JSCell.h: - * kjs/JSObject.h: - * kjs/PropertyMap.h: - * kjs/StructureID.cpp: - (KJS::StructureIDChain::StructureIDChain): - * masm/IA32MacroAsm.h: - (KJS::IA32MacroAssembler::emitCmpl_i32m): - (KJS::IA32MacroAssembler::emitMovl_mr): - (KJS::IA32MacroAssembler::emitMovl_rm): - -2008-09-02 Sam Weinig - - Reviewed by Gavin Barraclough and Mark Rowe. - - A backslash (\) at the of a RegEx should produce an error. - Fixes fast/regex/test1.html. - - * wrec/WREC.cpp: - (KJS::WRECompiler::parseEscape): - -2008-09-02 Sam Weinig - - Reviewed by Geoff Garen. - - Link jumps for the slow case of op_loop_if_less. Fixes acid3. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass4_SlowCases): - -2008-09-01 Sam Weinig - - Rubber-stamped by Maciej Stachowiak. - - Switch WREC on by default. - - * wtf/Platform.h: - -2008-09-01 Sam Weinig - - Reviewed by Mark Rowe. - - Fix two failures in fast/regex/test1.html - - \- in a character class should be treated as a literal - - - A missing max quantifier needs to be treated differently than - a null max quantifier. - - * wrec/WREC.cpp: - (KJS::WRECompiler::generateNonGreedyQuantifier): - (KJS::WRECompiler::generateGreedyQuantifier): - (KJS::WRECompiler::parseCharacterClass): - * wrec/WREC.h: - (KJS::Quantifier::Quantifier): - -2008-09-01 Sam Weinig - - Reviewed by Mark Rowe. - - Fix crash in fast/js/kde/evil-n.html - - * kjs/regexp.cpp: Always pass a non-null offset vector to the wrec function. - -2008-09-01 Sam Weinig - - Reviewed by Gavin Barraclough and Mark Rowe. - - Add pattern length limit fixing one test in fast/js. - - * wrec/WREC.cpp: - (KJS::WRECompiler::compile): - * wrec/WREC.h: - (KJS::WRECompiler::): - -2008-09-01 Sam Weinig - - Reviewed by Gavin Barraclough and Mark Rowe. - - Make octal escape parsing/back-reference parsing more closely match - prior behavior fixing one test in fast/js. - - * wrec/WREC.cpp: - (KJS::WRECompiler::parseCharacterClass): 8 and 9 should be IdentityEscaped - (KJS::WRECompiler::parseEscape): - * wrec/WREC.h: - (KJS::WRECompiler::peekDigit): - -2008-09-01 Sam Weinig - - Reviewed by Gavin Barraclough and Mark Rowe. - - Fix one mozilla test. - - * wrec/WREC.cpp: - (KJS::WRECompiler::generateCharacterClassInverted): Fix incorrect not - ascii upper check. - -2008-09-01 Sam Weinig - - Reviewed by Gavin Barraclough and Mark Rowe. - - Parse octal escapes in character classes fixing one mozilla test. - - * wrec/WREC.cpp: - (KJS::WRECompiler::parseCharacterClass): - (KJS::WRECompiler::parseOctalEscape): - * wrec/WREC.h: - (KJS::WRECompiler::consumeOctal): - -2008-09-01 Sam Weinig - - Reviewed by Oliver Hunt. - - Fixes two mozilla tests with WREC enabled. - - * wrec/WREC.cpp: - (KJS::CharacterClassConstructor::append): Keep the character class sorted - when appending another character class. - -2008-09-01 Sam Weinig - - Reviewed by Gavin Barraclough and Mark Rowe. - - Fixes two mozilla tests with WREC enabled. - - * wrec/WREC.cpp: - (KJS::CharacterClassConstructor::addSortedRange): Insert the range at the correct position - instead of appending it to the end. - -2008-09-01 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Move cross-compilation unit call into NEVER_INLINE function. - - * VM/Machine.cpp: - (KJS::doSetReturnAddressVmThrowTrampoline): - -2008-09-01 Sam Weinig - - Reviewed by Gavin Barraclough and Geoff Garen. - - Fix one test in fast/js. - - * VM/Machine.cpp: - (KJS::Machine::cti_op_construct_NotJSConstruct): Throw a createNotAConstructorError, - instead of a createNotAFunctionError. - -2008-08-31 Gavin Barraclough - - Reviewed by Maciej Stachowiak. - - Zero-cost exception handling. This patch takes the exception checking - back of the hot path. When an exception occurs in a Machine::cti* - method, the return address to JIT code is recorded, and is then - overwritten with a pointer to a trampoline routine. When the method - returns the trampoline will cause the cti_vm_throw method to be invoked. - - cti_vm_throw uses the return address preserved above, to discover the - vPC of the bytecode that raised the exception (using a map build during - translation). From the VPC of the faulting bytecode the vPC of a catch - routine may be discovered (unwinding the stack where necesary), and then - a bytecode address for the catch routine is looked up. Final cti_vm_throw - overwrites its return address to JIT code again, to trampoline directly - to the catch routine. - - cti_op_throw is handled in a similar fashion. - - * VM/CTI.cpp: - (KJS::CTI::emitPutCTIParam): - (KJS::CTI::emitPutToCallFrameHeader): - (KJS::CTI::emitGetFromCallFrameHeader): - (KJS::ctiSetReturnAddressForArgs): - (KJS::CTI::emitDebugExceptionCheck): - (KJS::CTI::printOpcodeOperandTypes): - (KJS::CTI::emitCall): - (KJS::CTI::compileOpCall): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile): - * VM/CTI.h: - (KJS::CallRecord::CallRecord): - (KJS::): - (KJS::CTI::execute): - * VM/CodeBlock.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - (KJS::Machine::cti_op_instanceof): - (KJS::Machine::cti_op_call_NotJSFunction): - (KJS::Machine::cti_op_resolve): - (KJS::Machine::cti_op_resolve_func): - (KJS::Machine::cti_op_resolve_skip): - (KJS::Machine::cti_op_resolve_with_base): - (KJS::Machine::cti_op_throw): - (KJS::Machine::cti_op_in): - (KJS::Machine::cti_vm_throw): - * VM/RegisterFile.h: - (KJS::RegisterFile::): - * kjs/ExecState.h: - (KJS::ExecState::setCtiReturnAddress): - (KJS::ExecState::ctiReturnAddress): - * masm/IA32MacroAsm.h: - (KJS::IA32MacroAssembler::): - (KJS::IA32MacroAssembler::emitPushl_m): - (KJS::IA32MacroAssembler::emitPopl_m): - (KJS::IA32MacroAssembler::getRelocatedAddress): - -2008-08-31 Mark Rowe - - Reviewed by Oliver Hunt. - - Fall back to PCRE for any regexp containing parentheses until we correctly backtrack within them. - - * wrec/WREC.cpp: - (KJS::WRECompiler::parseParentheses): - * wrec/WREC.h: - (KJS::WRECompiler::): - -2008-08-31 Mark Rowe - - Reviewed by Oliver Hunt. - - Fix several issues within ecma_3/RegExp/perlstress-001.js with WREC enabled. - - * wrec/WREC.cpp: - (KJS::WRECompiler::generateNonGreedyQuantifier): Compare with the maximum quantifier count rather than the minimum. - (KJS::WRECompiler::generateAssertionEOL): Do a register-to-register comparison rather than immediate-to-register. - (KJS::WRECompiler::parseCharacterClass): Pass through the correct inversion flag. - -2008-08-30 Mark Rowe - - Reviewed by Oliver Hunt. - - Re-fix the six remaining failures in the Mozilla JavaScript tests in a manner that does not kill performance. - This shows up as a 0.6% progression on SunSpider on my machine. - - Grow the JITCodeBuffer's underlying buffer when we run out of space rather than just bailing out. - - * VM/CodeBlock.h: - (KJS::CodeBlock::~CodeBlock): Switch to using fastFree now that JITCodeBuffer::copy uses fastMalloc. - * kjs/regexp.cpp: Ditto. - * masm/IA32MacroAsm.h: - (KJS::JITCodeBuffer::growBuffer): - (KJS::JITCodeBuffer::JITCodeBuffer): - (KJS::JITCodeBuffer::~JITCodeBuffer): - (KJS::JITCodeBuffer::putByte): - (KJS::JITCodeBuffer::putShort): - (KJS::JITCodeBuffer::putInt): - (KJS::JITCodeBuffer::reset): - (KJS::JITCodeBuffer::copy): - -2008-08-29 Oliver Hunt - - RS=Maciej - - Roll out previous patch as it causes a 5% performance regression - - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CTI.cpp: - (KJS::getJCB): - (KJS::CTI::privateCompile): - * VM/CodeBlock.h: - (KJS::CodeBlock::~CodeBlock): - * masm/IA32MacroAsm.h: - (KJS::JITCodeBuffer::JITCodeBuffer): - (KJS::JITCodeBuffer::putByte): - (KJS::JITCodeBuffer::putShort): - (KJS::JITCodeBuffer::putInt): - (KJS::JITCodeBuffer::getEIP): - (KJS::JITCodeBuffer::start): - (KJS::JITCodeBuffer::getOffset): - (KJS::JITCodeBuffer::reset): - (KJS::JITCodeBuffer::copy): - (KJS::IA32MacroAssembler::emitModRm_rr): - (KJS::IA32MacroAssembler::emitModRm_rm): - (KJS::IA32MacroAssembler::emitModRm_rmsib): - (KJS::IA32MacroAssembler::IA32MacroAssembler): - (KJS::IA32MacroAssembler::emitInt3): - (KJS::IA32MacroAssembler::emitPushl_r): - (KJS::IA32MacroAssembler::emitPopl_r): - (KJS::IA32MacroAssembler::emitMovl_rr): - (KJS::IA32MacroAssembler::emitAddl_rr): - (KJS::IA32MacroAssembler::emitAddl_i8r): - (KJS::IA32MacroAssembler::emitAddl_i32r): - (KJS::IA32MacroAssembler::emitAddl_mr): - (KJS::IA32MacroAssembler::emitAndl_rr): - (KJS::IA32MacroAssembler::emitAndl_i32r): - (KJS::IA32MacroAssembler::emitCmpl_i8r): - (KJS::IA32MacroAssembler::emitCmpl_rr): - (KJS::IA32MacroAssembler::emitCmpl_rm): - (KJS::IA32MacroAssembler::emitCmpl_i32r): - (KJS::IA32MacroAssembler::emitCmpl_i32m): - (KJS::IA32MacroAssembler::emitCmpw_rm): - (KJS::IA32MacroAssembler::emitOrl_rr): - (KJS::IA32MacroAssembler::emitOrl_i8r): - (KJS::IA32MacroAssembler::emitSubl_rr): - (KJS::IA32MacroAssembler::emitSubl_i8r): - (KJS::IA32MacroAssembler::emitSubl_i32r): - (KJS::IA32MacroAssembler::emitSubl_mr): - (KJS::IA32MacroAssembler::emitTestl_i32r): - (KJS::IA32MacroAssembler::emitTestl_rr): - (KJS::IA32MacroAssembler::emitXorl_i8r): - (KJS::IA32MacroAssembler::emitXorl_rr): - (KJS::IA32MacroAssembler::emitSarl_i8r): - (KJS::IA32MacroAssembler::emitSarl_CLr): - (KJS::IA32MacroAssembler::emitShl_i8r): - (KJS::IA32MacroAssembler::emitShll_CLr): - (KJS::IA32MacroAssembler::emitMull_rr): - (KJS::IA32MacroAssembler::emitIdivl_r): - (KJS::IA32MacroAssembler::emitCdq): - (KJS::IA32MacroAssembler::emitMovl_mr): - (KJS::IA32MacroAssembler::emitMovzwl_mr): - (KJS::IA32MacroAssembler::emitMovl_rm): - (KJS::IA32MacroAssembler::emitMovl_i32r): - (KJS::IA32MacroAssembler::emitMovl_i32m): - (KJS::IA32MacroAssembler::emitLeal_mr): - (KJS::IA32MacroAssembler::emitRet): - (KJS::IA32MacroAssembler::emitJmpN_r): - (KJS::IA32MacroAssembler::emitJmpN_m): - (KJS::IA32MacroAssembler::emitCall): - (KJS::IA32MacroAssembler::label): - (KJS::IA32MacroAssembler::emitUnlinkedJmp): - (KJS::IA32MacroAssembler::emitUnlinkedJne): - (KJS::IA32MacroAssembler::emitUnlinkedJe): - (KJS::IA32MacroAssembler::emitUnlinkedJl): - (KJS::IA32MacroAssembler::emitUnlinkedJle): - (KJS::IA32MacroAssembler::emitUnlinkedJge): - (KJS::IA32MacroAssembler::emitUnlinkedJae): - (KJS::IA32MacroAssembler::emitUnlinkedJo): - (KJS::IA32MacroAssembler::link): - * wrec/WREC.cpp: - (KJS::WRECompiler::compilePattern): - (KJS::WRECompiler::compile): - * wrec/WREC.h: - -2008-08-29 Mark Rowe - - Reviewed by Oliver Hunt. - - Have JITCodeBuffer manage a Vector containing the generated code so that it can grow - as needed when generating code for a large function. This fixes all six remaining failures - in Mozilla tests in both debug and release builds. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile): - * VM/CodeBlock.h: - (KJS::CodeBlock::~CodeBlock): - * masm/IA32MacroAsm.h: - (KJS::JITCodeBuffer::putByte): - (KJS::JITCodeBuffer::putShort): - (KJS::JITCodeBuffer::putInt): - (KJS::JITCodeBuffer::getEIP): - (KJS::JITCodeBuffer::start): - (KJS::JITCodeBuffer::getOffset): - (KJS::JITCodeBuffer::getCode): - (KJS::IA32MacroAssembler::emitModRm_rr): - * wrec/WREC.cpp: - (KJS::WRECompiler::compilePattern): - * wrec/WREC.h: - -2008-08-29 Mark Rowe - - Reviewed by Oliver Hunt. - - Implement parsing of octal escapes in regular expressions. This fixes three Mozilla tests. - - * wrec/WREC.cpp: - (KJS::WRECompiler::parseOctalEscape): - (KJS::WRECompiler::parseEscape): Parse the escape sequence as an octal escape if it has a leading zero. - Add a FIXME about treating invalid backreferences as octal escapes in the future. - * wrec/WREC.h: - (KJS::WRECompiler::consumeNumber): Multiply by 10 rather than 0 so that we handle numbers with more than - one digit. - * wtf/ASCIICType.h: - (WTF::isASCIIOctalDigit): - -2008-08-29 Sam Weinig - - Reviewed by Mark Rowe. - - Pass vPC to instanceof method. Fixes 2 mozilla tests in debug. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::cti_op_instanceof): - -2008-08-29 Sam Weinig - - Reviewed by Mark Rowe. - - Pass vPCs to resolve methods for correct exception creation. Fixes - 17 mozilla tests in debug. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass2_Main): - * VM/CTI.h: - * VM/Machine.cpp: - (KJS::Machine::cti_op_resolve): - (KJS::Machine::cti_op_resolve_func): - (KJS::Machine::cti_op_resolve_skip): - (KJS::Machine::cti_op_resolve_with_base): - -2008-08-29 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Remembering to actually throw the exception passed to op throw helps. - Regressions 19 -> 6. - - * VM/Machine.cpp: - (KJS::Machine::cti_op_throw): - (KJS::Machine::cti_vm_throw): - -2008-08-29 Gavin Barraclough - - Reviewed by Sam Weinig. - - Support for exception unwinding the stack. - - Once upon a time, Sam asked me for a bettr ChangeLog entry. The return address - is now preserved on entry to a JIT code function (if we preserve lazily we need - restore the native return address during exception stack unwind). This takes - the number of regressions down from ~150 to 19. - - * VM/CTI.cpp: - (KJS::getJCB): - (KJS::CTI::emitExceptionCheck): - (KJS::CTI::compileOpCall): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile): - * VM/CTI.h: - (KJS::): - * VM/Machine.cpp: - (KJS::Machine::throwException): - (KJS::Machine::cti_op_call_JSFunction): - (KJS::Machine::cti_op_call_NotJSFunction): - (KJS::Machine::cti_op_construct_JSConstruct): - (KJS::Machine::cti_op_construct_NotJSConstruct): - (KJS::Machine::cti_op_throw): - (KJS::Machine::cti_vm_throw): - -2008-08-29 Mark Rowe - - Reviewed by Oliver Hunt. - - Fix js1_2/regexp/word_boundary.js and four other Mozilla tests with WREC enabled. - - * wrec/WREC.cpp: - (KJS::WRECompiler::generateCharacterClassInvertedRange): If none of the exact matches - succeeded, jump to failure. - (KJS::WRECompiler::compilePattern): Restore and increment the current position stored - on the stack to ensure that it will be reset to the correct position after a failed - match has consumed input. - -2008-08-29 Mark Rowe - - Reviewed by Oliver Hunt. - - Fix a hang in ecma_3/RegExp/15.10.2-1.js with WREC enabled. - A backreference with a quantifier would get stuck in an infinite - loop if the captured range was empty. - - * wrec/WREC.cpp: - (KJS::WRECompiler::generateBackreferenceQuantifier): If the captured range - was empty, do not attempt to match the backreference. - (KJS::WRECompiler::parseBackreferenceQuantifier): - * wrec/WREC.h: - (KJS::Quantifier::): - -2008-08-28 Sam Weinig - - Reviewed by Oliver Hunt. - - Implement op_debug. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::debug): - (KJS::Machine::privateExecute): - (KJS::Machine::cti_op_debug): - * VM/Machine.h: - -2008-08-28 Sam Weinig - - Reviewed by Gavin Barraclough and Geoff Garen. - - Implement op_switch_string fixing 1 mozilla test and one test in fast/js. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile): - * VM/CTI.h: - (KJS::SwitchRecord::): - (KJS::SwitchRecord::SwitchRecord): - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeBlock.h: - (KJS::ExpressionRangeInfo::): - (KJS::StringJumpTable::offsetForValue): - (KJS::StringJumpTable::ctiForValue): - (KJS::SimpleJumpTable::add): - (KJS::SimpleJumpTable::ctiForValue): - * VM/CodeGenerator.cpp: - (KJS::prepareJumpTableForStringSwitch): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - (KJS::Machine::cti_op_switch_string): - * VM/Machine.h: - -2008-08-28 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Do not recurse on the machine stack when executing op_call. - - * VM/CTI.cpp: - (KJS::CTI::emitGetPutArg): - (KJS::CTI::emitPutArg): - (KJS::CTI::emitPutArgConstant): - (KJS::CTI::compileOpCall): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile): - * VM/CTI.h: - (KJS::): - (KJS::CTI::compile): - (KJS::CTI::execute): - (KJS::CTI::): - * VM/Machine.cpp: - (KJS::Machine::Machine): - (KJS::Machine::execute): - (KJS::Machine::cti_op_call_JSFunction): - (KJS::Machine::cti_op_call_NotJSFunction): - (KJS::Machine::cti_op_ret): - (KJS::Machine::cti_op_construct_JSConstruct): - (KJS::Machine::cti_op_construct_NotJSConstruct): - (KJS::Machine::cti_op_call_eval): - * VM/Machine.h: - * VM/Register.h: - (KJS::Register::Register): - * VM/RegisterFile.h: - (KJS::RegisterFile::): - * kjs/InternalFunction.h: - (KJS::InternalFunction::InternalFunction): - * kjs/JSFunction.h: - (KJS::JSFunction::JSFunction): - * kjs/ScopeChain.h: - (KJS::ScopeChain::ScopeChain): - * masm/IA32MacroAsm.h: - (KJS::IA32MacroAssembler::): - (KJS::IA32MacroAssembler::emitModRm_opm): - (KJS::IA32MacroAssembler::emitCmpl_i32m): - (KJS::IA32MacroAssembler::emitCallN_r): - -2008-08-28 Sam Weinig - - Reviewed by Mark Rowe. - - Exit instead of crashing in ctiUnsupported and ctiTimedOut. - - * VM/Machine.cpp: - (KJS::ctiUnsupported): - (KJS::ctiTimedOut): - -2008-08-28 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Implement codegen for op_jsr and op_sret. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile): - * VM/CTI.h: - (KJS::CTI::JSRInfo::JSRInfo): - * masm/IA32MacroAsm.h: - (KJS::IA32MacroAssembler::emitJmpN_m): - (KJS::IA32MacroAssembler::linkAbsoluteAddress): - -2008-08-28 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Initial support for exceptions (throw / catch must occur in same CodeBlock). - - * VM/CTI.cpp: - (KJS::CTI::emitExceptionCheck): - (KJS::CTI::emitCall): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile_pass4_SlowCases): - (KJS::CTI::privateCompile): - * VM/CTI.h: - * VM/CodeBlock.cpp: - (KJS::CodeBlock::nativeExceptionCodeForHandlerVPC): - * VM/CodeBlock.h: - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitCatch): - * VM/Machine.cpp: - (KJS::Machine::throwException): - (KJS::Machine::privateExecute): - (KJS::ctiUnsupported): - (KJS::ctiTimedOut): - (KJS::Machine::cti_op_add): - (KJS::Machine::cti_op_pre_inc): - (KJS::Machine::cti_timeout_check): - (KJS::Machine::cti_op_loop_if_less): - (KJS::Machine::cti_op_put_by_id): - (KJS::Machine::cti_op_get_by_id): - (KJS::Machine::cti_op_instanceof): - (KJS::Machine::cti_op_del_by_id): - (KJS::Machine::cti_op_mul): - (KJS::Machine::cti_op_call): - (KJS::Machine::cti_op_resolve): - (KJS::Machine::cti_op_construct): - (KJS::Machine::cti_op_get_by_val): - (KJS::Machine::cti_op_resolve_func): - (KJS::Machine::cti_op_sub): - (KJS::Machine::cti_op_put_by_val): - (KJS::Machine::cti_op_lesseq): - (KJS::Machine::cti_op_loop_if_true): - (KJS::Machine::cti_op_negate): - (KJS::Machine::cti_op_resolve_skip): - (KJS::Machine::cti_op_div): - (KJS::Machine::cti_op_pre_dec): - (KJS::Machine::cti_op_jless): - (KJS::Machine::cti_op_not): - (KJS::Machine::cti_op_jtrue): - (KJS::Machine::cti_op_post_inc): - (KJS::Machine::cti_op_eq): - (KJS::Machine::cti_op_lshift): - (KJS::Machine::cti_op_bitand): - (KJS::Machine::cti_op_rshift): - (KJS::Machine::cti_op_bitnot): - (KJS::Machine::cti_op_resolve_with_base): - (KJS::Machine::cti_op_mod): - (KJS::Machine::cti_op_less): - (KJS::Machine::cti_op_neq): - (KJS::Machine::cti_op_post_dec): - (KJS::Machine::cti_op_urshift): - (KJS::Machine::cti_op_bitxor): - (KJS::Machine::cti_op_bitor): - (KJS::Machine::cti_op_call_eval): - (KJS::Machine::cti_op_throw): - (KJS::Machine::cti_op_push_scope): - (KJS::Machine::cti_op_stricteq): - (KJS::Machine::cti_op_nstricteq): - (KJS::Machine::cti_op_to_jsnumber): - (KJS::Machine::cti_op_in): - (KJS::Machine::cti_op_del_by_val): - (KJS::Machine::cti_vm_throw): - * VM/Machine.h: - * kjs/ExecState.h: - * masm/IA32MacroAsm.h: - (KJS::IA32MacroAssembler::emitCmpl_i32m): - -2008-08-28 Mark Rowe - - Rubber-stamped by Oliver Hunt. - - Print debugging info to stderr so that run-webkit-tests can capture it. - This makes it easy to check whether test failures are due to unimplemented - op codes, missing support for exceptions, etc. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::printOpcodeOperandTypes): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile_pass4_SlowCases): - (KJS::CTI::privateCompile): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - (KJS::ctiException): - (KJS::ctiUnsupported): - (KJS::Machine::cti_op_call): - (KJS::Machine::cti_op_resolve): - (KJS::Machine::cti_op_construct): - (KJS::Machine::cti_op_get_by_val): - (KJS::Machine::cti_op_resolve_func): - (KJS::Machine::cti_op_resolve_skip): - (KJS::Machine::cti_op_resolve_with_base): - (KJS::Machine::cti_op_call_eval): - -2008-08-27 Mark Rowe - - Reviewed by Gavin Barraclough and Maciej Stachowiak. - - Fix fast/js/bitwise-and-on-undefined.html. - - A temporary value in the slow path of op_bitand was being stored in edx, but was - being clobbered by emitGetPutArg before we used it. To fix this, emitGetPutArg - now takes a third argument that specifies the scratch register to use when loading - from memory. This allows us to avoid clobbering the temporary in op_bitand. - - * VM/CTI.cpp: - (KJS::CTI::emitGetPutArg): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile_pass4_SlowCases): - * VM/CTI.h: - -2008-08-27 Mark Rowe - - Rubber-stamped by Oliver Hunt. - - Switch CTI on by default. - - * wtf/Platform.h: - -2008-08-27 Mark Rowe - - Reviewed by Oliver Hunt. - - Fix the build of the full WebKit stack. - - * JavaScriptCore.xcodeproj/project.pbxproj: Mark two new headers as private so they can be pulled in from WebCore. - * VM/CTI.h: Fix build issues that show up when compiled with GCC 4.2 as part of WebCore. - * wrec/WREC.h: Ditto. - -2008-08-27 Mark Rowe - - Reviewed by Sam Weinig. - - Implement op_new_error. Does not fix any tests as it is always followed by the unimplemented op_throw. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::cti_op_new_error): - * VM/Machine.h: - -2008-08-27 Sam Weinig - - Reviewed by Gavin Barraclough and Geoff Garen. - - Implement op_put_getter and op_put_setter. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::cti_op_put_getter): - (KJS::Machine::cti_op_put_setter): - * VM/Machine.h: - -2008-08-27 Sam Weinig - - Reviewed by Gavin Barraclough and Geoff Garen. - - Implement op_del_by_val fixing 3 mozilla tests. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::cti_op_del_by_val): - * VM/Machine.h: - -2008-08-27 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Quick & dirty fix to get SamplingTool sampling op_call. - - * VM/SamplingTool.h: - (KJS::SamplingTool::callingHostFunction): - -2008-08-27 Sam Weinig - - Reviewed by Gavin Barraclough and Geoff Garen. - - Fix op_put_by_index. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass2_Main): Use emitPutArgConstant instead of emitGetPutArg - for the property value. - * VM/Machine.cpp: - (KJS::Machine::cti_op_put_by_index): Get the property value from the correct argument. - -2008-08-27 Sam Weinig - - Reviewed by Gavin Barraclough and Geoff Garen. - - Implement op_switch_imm in the CTI fixing 13 mozilla tests. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::cti_op_switch_imm): - * VM/Machine.h: - -2008-08-27 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Implement op_switch_char in CTI. - - * VM/CTI.cpp: - (KJS::CTI::emitCall): - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile): - * VM/CTI.h: - (KJS::CallRecord::CallRecord): - (KJS::SwitchRecord::SwitchRecord): - * VM/CodeBlock.h: - (KJS::SimpleJumpTable::SimpleJumpTable::ctiForValue): - * VM/Machine.cpp: - (KJS::Machine::cti_op_switch_char): - * VM/Machine.h: - * masm/IA32MacroAsm.h: - (KJS::IA32MacroAssembler::): - (KJS::IA32MacroAssembler::emitJmpN_r): - (KJS::IA32MacroAssembler::getRelocatedAddress): - * wtf/Platform.h: - -2008-08-26 Sam Weinig - - Reviewed by Mark Rowe. - - Implement op_put_by_index to fix 1 mozilla test. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::cti_op_put_by_index): - * VM/Machine.h: - -2008-08-26 Gavin Barraclough - - Reviewed by Geoff Garen. - - More fixes from Geoff's review. - - * VM/CTI.cpp: - (KJS::CTI::emitGetArg): - (KJS::CTI::emitGetPutArg): - (KJS::CTI::emitPutArg): - (KJS::CTI::emitPutArgConstant): - (KJS::CTI::getConstantImmediateNumericArg): - (KJS::CTI::emitGetCTIParam): - (KJS::CTI::emitPutResult): - (KJS::CTI::emitCall): - (KJS::CTI::emitJumpSlowCaseIfNotImm): - (KJS::CTI::emitJumpSlowCaseIfNotImms): - (KJS::CTI::getDeTaggedConstantImmediate): - (KJS::CTI::emitFastArithDeTagImmediate): - (KJS::CTI::emitFastArithReTagImmediate): - (KJS::CTI::emitFastArithPotentiallyReTagImmediate): - (KJS::CTI::emitFastArithImmToInt): - (KJS::CTI::emitFastArithIntToImmOrSlowCase): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile_pass4_SlowCases): - (KJS::CTI::privateCompile): - * VM/CTI.h: - -2008-08-26 Mark Rowe - - Reviewed by Gavin Barraclough and Geoff Garen. - - Implement op_jmp_scopes to fix 2 Mozilla tests. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::cti_op_push_new_scope): Update ExecState::m_scopeChain after calling ARG_setScopeChain. - (KJS::Machine::cti_op_jmp_scopes): - * VM/Machine.h: - -2008-08-26 Gavin Barraclough - - Reviewed by Oliver Hunt. - - WebKit Regular Expression Compiler. (set ENABLE_WREC = 1 in Platform.h). - - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/regexp.cpp: - * kjs/regexp.h: - * wrec: Added. - * wrec/WREC.cpp: Added. - * wrec/WREC.h: Added. - * wtf/Platform.h: - -2008-08-26 Sam Weinig - - Rubber-stamped by Oliver Hunt. - - Remove bogus assertion. - - * VM/Machine.cpp: - (KJS::Machine::cti_op_del_by_id): - -2008-08-26 Mark Rowe - - Reviewed by Sam Weinig. - - Implement op_push_new_scope and stub out op_catch. This fixes 11 Mozilla tests. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::cti_op_push_new_scope): - (KJS::Machine::cti_op_catch): - * VM/Machine.h: - -2008-08-26 Mark Rowe - - Reviewed by Sam Weinig. - - Clean up op_resolve_base so that it shares its implementation with the bytecode interpreter. - - * VM/Machine.cpp: - (KJS::inlineResolveBase): - (KJS::resolveBase): - -2008-08-26 Oliver Hunt - - Reviewed by Sam Weinig. - - Add codegen support for op_instanceof, fixing 15 mozilla tests. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::cti_op_instanceof): - (KJS::Machine::cti_op_del_by_id): - * VM/Machine.h: - * wtf/Platform.h: - -2008-08-26 Gavin Barraclough - - Reviewed by Geoff Garen. - - Fixes for initial review comments. - - * VM/CTI.cpp: - (KJS::CTI::ctiCompileGetArg): - (KJS::CTI::ctiCompileGetPutArg): - (KJS::CTI::ctiCompilePutResult): - (KJS::CTI::ctiCompileCall): - (KJS::CTI::CTI): - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::printOpcodeOperandTypes): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile_pass4_SlowCases): - (KJS::CTI::privateCompile): - * VM/CTI.h: - * VM/Register.h: - * kjs/JSValue.h: - -2008-08-26 Sam Weinig - - Reviewed by Gavin Barraclough and Geoff Garen. - - Fix up exception checking code. - - * VM/Machine.cpp: - (KJS::Machine::cti_op_call): - (KJS::Machine::cti_op_resolve): - (KJS::Machine::cti_op_construct): - (KJS::Machine::cti_op_resolve_func): - (KJS::Machine::cti_op_resolve_skip): - (KJS::Machine::cti_op_resolve_with_base): - (KJS::Machine::cti_op_call_eval): - -2008-08-26 Sam Weinig - - Reviewed by Oliver Hunt. - - Fix slowcase for op_post_inc and op_post_dec fixing 2 mozilla tests. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass4_SlowCases): - -2008-08-26 Mark Rowe - - Reviewed by Sam Weinig. - - Implement op_in, fixing 8 mozilla tests. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::cti_op_in): - * VM/Machine.h: - -2008-08-26 Mark Rowe - - Rubber-stamped by Oliver Hunt. - - Don't hardcode the size of a Register for op_new_array. Fixes a crash - seen during the Mozilla tests. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass2_Main): - -2008-08-26 Sam Weinig - - Reviewed by Gavin Barraclough and Geoff Garen. - - Add support for op_push_scope and op_pop_scope, fixing 20 mozilla tests. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/CTI.h: - * VM/Machine.cpp: - (KJS::Machine::cti_op_push_scope): - (KJS::Machine::cti_op_pop_scope): - * VM/Machine.h: - -2008-08-26 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Add codegen support for op_del_by_id, fixing 49 mozilla tests. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - * VM/Machine.cpp: - (KJS::Machine::cti_op_del_by_id): - * VM/Machine.h: - -2008-08-26 Sam Weinig - - Reviewed by Gavin Barraclough and Geoff Garen. - - Don't hardcode the size of a Register for op_get_scoped_var and op_put_scoped_var - fixing 513 mozilla tests in debug build. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass2_Main): - -2008-08-26 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Added code generator support for op_loop, fixing around 60 mozilla tests. - - * VM/CTI.cpp: - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::privateCompile_pass2_Main): - -2008-08-26 Mark Rowe - - Reviewed by Sam Weinig. - - Set -fomit-frame-pointer in the correct location. - - * Configurations/JavaScriptCore.xcconfig: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-08-26 Gavin Barraclough - - Reviewed by Geoff Garen. - - Inital cut of CTI, Geoff's review fixes to follow. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/CTI.cpp: Added. - (KJS::getJCB): - (KJS::CTI::ctiCompileGetArg): - (KJS::CTI::ctiCompileGetPutArg): - (KJS::CTI::ctiCompilePutArg): - (KJS::CTI::ctiCompilePutArgImm): - (KJS::CTI::ctiImmediateNumericArg): - (KJS::CTI::ctiCompileGetCTIParam): - (KJS::CTI::ctiCompilePutResult): - (KJS::CTI::ctiCompileCall): - (KJS::CTI::slowCaseIfNotImm): - (KJS::CTI::slowCaseIfNotImms): - (KJS::CTI::ctiFastArithDeTagConstImmediate): - (KJS::CTI::ctiFastArithDeTagImmediate): - (KJS::CTI::ctiFastArithReTagImmediate): - (KJS::CTI::ctiFastArithPotentiallyReTagImmediate): - (KJS::CTI::ctiFastArithImmToInt): - (KJS::CTI::ctiFastArithIntToImmOrSlowCase): - (KJS::CTI::CTI): - (KJS::CTI::privateCompile_pass1_Scan): - (KJS::CTI::ctiCompileAdd): - (KJS::CTI::ctiCompileAddImm): - (KJS::CTI::ctiCompileAddImmNotInt): - (KJS::CTI::TEMP_HACK_PRINT_TYPES): - (KJS::CTI::privateCompile_pass2_Main): - (KJS::CTI::privateCompile_pass3_Link): - (KJS::CTI::privateCompile_pass4_SlowCases): - (KJS::CTI::privateCompile): - * VM/CTI.h: Added. - (KJS::CTI2Result::CTI2Result): - (KJS::CallRecord::CallRecord): - (KJS::JmpTable::JmpTable): - (KJS::SlowCaseEntry::SlowCaseEntry): - (KJS::CTI::compile): - (KJS::CTI::LabelInfo::LabelInfo): - * VM/CodeBlock.h: - (KJS::CodeBlock::CodeBlock): - (KJS::CodeBlock::~CodeBlock): - * VM/Machine.cpp: - (KJS::Machine::execute): - (KJS::Machine::privateExecute): - (KJS::ctiException): - (KJS::ctiUnsupported): - (KJS::ctiTimedOut): - (KJS::Machine::cti_op_end): - (KJS::Machine::cti_op_add): - (KJS::Machine::cti_op_pre_inc): - (KJS::Machine::cti_timeout_check): - (KJS::Machine::cti_op_loop_if_less): - (KJS::Machine::cti_op_new_object): - (KJS::Machine::cti_op_put_by_id): - (KJS::Machine::cti_op_get_by_id): - (KJS::Machine::cti_op_mul): - (KJS::Machine::cti_op_new_func): - (KJS::Machine::cti_op_call): - (KJS::Machine::cti_op_ret): - (KJS::Machine::cti_op_new_array): - (KJS::Machine::cti_op_resolve): - (KJS::Machine::cti_op_construct): - (KJS::Machine::cti_op_get_by_val): - (KJS::Machine::cti_op_resolve_func): - (KJS::Machine::cti_op_sub): - (KJS::Machine::cti_op_put_by_val): - (KJS::Machine::cti_op_lesseq): - (KJS::Machine::cti_op_loop_if_true): - (KJS::Machine::cti_op_negate): - (KJS::Machine::cti_op_resolve_base): - (KJS::Machine::cti_op_resolve_skip): - (KJS::Machine::cti_op_div): - (KJS::Machine::cti_op_pre_dec): - (KJS::Machine::cti_op_jless): - (KJS::Machine::cti_op_not): - (KJS::Machine::cti_op_jtrue): - (KJS::Machine::cti_op_post_inc): - (KJS::Machine::cti_op_eq): - (KJS::Machine::cti_op_lshift): - (KJS::Machine::cti_op_bitand): - (KJS::Machine::cti_op_rshift): - (KJS::Machine::cti_op_bitnot): - (KJS::Machine::cti_op_resolve_with_base): - (KJS::Machine::cti_op_new_func_exp): - (KJS::Machine::cti_op_mod): - (KJS::Machine::cti_op_less): - (KJS::Machine::cti_op_neq): - (KJS::Machine::cti_op_post_dec): - (KJS::Machine::cti_op_urshift): - (KJS::Machine::cti_op_bitxor): - (KJS::Machine::cti_op_new_regexp): - (KJS::Machine::cti_op_bitor): - (KJS::Machine::cti_op_call_eval): - (KJS::Machine::cti_op_throw): - (KJS::Machine::cti_op_get_pnames): - (KJS::Machine::cti_op_next_pname): - (KJS::Machine::cti_op_typeof): - (KJS::Machine::cti_op_stricteq): - (KJS::Machine::cti_op_nstricteq): - (KJS::Machine::cti_op_to_jsnumber): - * VM/Machine.h: - * VM/Register.h: - (KJS::Register::jsValue): - (KJS::Register::getJSValue): - (KJS::Register::codeBlock): - (KJS::Register::scopeChain): - (KJS::Register::i): - (KJS::Register::r): - (KJS::Register::vPC): - (KJS::Register::jsPropertyNameIterator): - * VM/SamplingTool.cpp: - (KJS::): - (KJS::SamplingTool::run): - (KJS::SamplingTool::dump): - * VM/SamplingTool.h: - * kjs/JSImmediate.h: - (KJS::JSImmediate::zeroImmediate): - (KJS::JSImmediate::oneImmediate): - * kjs/JSValue.h: - * kjs/JSVariableObject.h: - (KJS::JSVariableObject::JSVariableObjectData::offsetOf_registers): - (KJS::JSVariableObject::offsetOf_d): - (KJS::JSVariableObject::offsetOf_Data_registers): - * masm: Added. - * masm/IA32MacroAsm.h: Added. - (KJS::JITCodeBuffer::JITCodeBuffer): - (KJS::JITCodeBuffer::putByte): - (KJS::JITCodeBuffer::putShort): - (KJS::JITCodeBuffer::putInt): - (KJS::JITCodeBuffer::getEIP): - (KJS::JITCodeBuffer::start): - (KJS::JITCodeBuffer::getOffset): - (KJS::JITCodeBuffer::reset): - (KJS::JITCodeBuffer::copy): - (KJS::IA32MacroAssembler::): - (KJS::IA32MacroAssembler::emitModRm_rr): - (KJS::IA32MacroAssembler::emitModRm_rm): - (KJS::IA32MacroAssembler::emitModRm_rmsib): - (KJS::IA32MacroAssembler::emitModRm_opr): - (KJS::IA32MacroAssembler::emitModRm_opm): - (KJS::IA32MacroAssembler::IA32MacroAssembler): - (KJS::IA32MacroAssembler::emitInt3): - (KJS::IA32MacroAssembler::emitPushl_r): - (KJS::IA32MacroAssembler::emitPopl_r): - (KJS::IA32MacroAssembler::emitMovl_rr): - (KJS::IA32MacroAssembler::emitAddl_rr): - (KJS::IA32MacroAssembler::emitAddl_i8r): - (KJS::IA32MacroAssembler::emitAddl_i32r): - (KJS::IA32MacroAssembler::emitAddl_mr): - (KJS::IA32MacroAssembler::emitAndl_rr): - (KJS::IA32MacroAssembler::emitAndl_i32r): - (KJS::IA32MacroAssembler::emitCmpl_i8r): - (KJS::IA32MacroAssembler::emitCmpl_rr): - (KJS::IA32MacroAssembler::emitCmpl_rm): - (KJS::IA32MacroAssembler::emitCmpl_i32r): - (KJS::IA32MacroAssembler::emitCmpw_rm): - (KJS::IA32MacroAssembler::emitOrl_rr): - (KJS::IA32MacroAssembler::emitOrl_i8r): - (KJS::IA32MacroAssembler::emitSubl_rr): - (KJS::IA32MacroAssembler::emitSubl_i8r): - (KJS::IA32MacroAssembler::emitSubl_i32r): - (KJS::IA32MacroAssembler::emitSubl_mr): - (KJS::IA32MacroAssembler::emitTestl_i32r): - (KJS::IA32MacroAssembler::emitTestl_rr): - (KJS::IA32MacroAssembler::emitXorl_i8r): - (KJS::IA32MacroAssembler::emitXorl_rr): - (KJS::IA32MacroAssembler::emitSarl_i8r): - (KJS::IA32MacroAssembler::emitSarl_CLr): - (KJS::IA32MacroAssembler::emitShl_i8r): - (KJS::IA32MacroAssembler::emitShll_CLr): - (KJS::IA32MacroAssembler::emitMull_rr): - (KJS::IA32MacroAssembler::emitIdivl_r): - (KJS::IA32MacroAssembler::emitCdq): - (KJS::IA32MacroAssembler::emitMovl_mr): - (KJS::IA32MacroAssembler::emitMovzwl_mr): - (KJS::IA32MacroAssembler::emitMovl_rm): - (KJS::IA32MacroAssembler::emitMovl_i32r): - (KJS::IA32MacroAssembler::emitMovl_i32m): - (KJS::IA32MacroAssembler::emitLeal_mr): - (KJS::IA32MacroAssembler::emitRet): - (KJS::IA32MacroAssembler::JmpSrc::JmpSrc): - (KJS::IA32MacroAssembler::JmpDst::JmpDst): - (KJS::IA32MacroAssembler::emitCall): - (KJS::IA32MacroAssembler::label): - (KJS::IA32MacroAssembler::emitUnlinkedJmp): - (KJS::IA32MacroAssembler::emitUnlinkedJne): - (KJS::IA32MacroAssembler::emitUnlinkedJe): - (KJS::IA32MacroAssembler::emitUnlinkedJl): - (KJS::IA32MacroAssembler::emitUnlinkedJle): - (KJS::IA32MacroAssembler::emitUnlinkedJge): - (KJS::IA32MacroAssembler::emitUnlinkedJae): - (KJS::IA32MacroAssembler::emitUnlinkedJo): - (KJS::IA32MacroAssembler::emitPredictionNotTaken): - (KJS::IA32MacroAssembler::link): - (KJS::IA32MacroAssembler::copy): - * wtf/Platform.h: - -2008-08-26 Oliver Hunt - - RS=Maciej. - - Enabled -fomit-frame-pointer on Release and Production builds, add additional Profiling build config for shark, etc. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -=== Start merge of squirrelfish-extreme === - -2008-09-06 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Fix the Mac Debug build by adding symbols that are exported only in a - Debug configuration. - - * Configurations/JavaScriptCore.xcconfig: - * DerivedSources.make: - * JavaScriptCore.Debug.exp: Added. - * JavaScriptCore.base.exp: Copied from JavaScriptCore.exp. - * JavaScriptCore.exp: Removed. - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-09-05 Darin Adler - - Reviewed by Cameron Zwarich. - - - https://bugs.webkit.org/show_bug.cgi?id=20681 - JSPropertyNameIterator functions need to be inlined - - 1.007x as fast on SunSpider overall - 1.081x as fast on SunSpider math-cordic - - * VM/JSPropertyNameIterator.cpp: Moved functions out of here. - * VM/JSPropertyNameIterator.h: - (KJS::JSPropertyNameIterator::JSPropertyNameIterator): Moved - this into the header and marked it inline. - (KJS::JSPropertyNameIterator::create): Ditto. - (KJS::JSPropertyNameIterator::next): Ditto. - -2008-09-05 Darin Adler - - Reviewed by Geoffrey Garen. - - - fix https://bugs.webkit.org/show_bug.cgi?id=20673 - single-character strings are churning in the Identifier table - - 1.007x as fast on SunSpider overall - 1.167x as fast on SunSpider string-fasta - - * JavaScriptCore.exp: Updated. - * kjs/SmallStrings.cpp: - (KJS::SmallStrings::singleCharacterStringRep): Added. - * kjs/SmallStrings.h: Added singleCharacterStringRep for clients that - need just a UString, not a JSString. - * kjs/identifier.cpp: - (KJS::Identifier::add): Added special cases for single character strings - so that the UString::Rep that ends up in the identifier table is the one - from the single-character string optimization; otherwise we end up having - to look it up in the identifier table over and over again. - (KJS::Identifier::addSlowCase): Ditto. - (KJS::Identifier::checkSameIdentifierTable): Made this function an empty - inline in release builds so that callers don't have to put #ifndef NDEBUG - at each call site. - * kjs/identifier.h: - (KJS::Identifier::add): Removed #ifndef NDEBUG around the calls to - checkSameIdentifierTable. - (KJS::Identifier::checkSameIdentifierTable): Added. Empty inline version - for NDEBUG builds. - -2008-09-05 Mark Rowe - - Build fix. - - * kjs/JSObject.h: Move the inline virtual destructor after a non-inline - virtual function so that the symbol for the vtable is not marked as a - weakly exported symbol. - -2008-09-05 Darin Adler - - Reviewed by Sam Weinig. - - - fix https://bugs.webkit.org/show_bug.cgi?id=20671 - JavaScriptCore string manipulation spends too much time in memcpy - - 1.011x as fast on SunSpider overall - 1.028x as fast on SunSpider string tests - - For small strings, use a loop rather than calling memcpy. The loop can - be faster because there's no function call overhead, and because it can - assume the pointers are aligned instead of checking that. Currently the - threshold is set at 20 characters, based on some testing on one particular - computer. Later we can tune this for various platforms by setting - USTRING_COPY_CHARS_INLINE_CUTOFF appropriately, but it does no great harm - if not perfectly tuned. - - * kjs/ustring.cpp: - (KJS::overflowIndicator): Removed bogus const. - (KJS::maxUChars): Ditto. - (KJS::copyChars): Added. - (KJS::UString::Rep::createCopying): Call copyChars instead of memcpy. - Also eliminated need for const_cast. - (KJS::UString::expandPreCapacity): Ditto. - (KJS::concatenate): Ditto. - (KJS::UString::spliceSubstringsWithSeparators): Ditto. - (KJS::UString::append): Ditto. - -2008-09-05 Kevin McCullough - - Reviewed by Sam and Alexey. - - Make the profiler work with a null exec state. This will allow other - applications start the profiler to get DTrace probes going without - needing a WebView. - - * ChangeLog: - * profiler/ProfileGenerator.cpp: - (KJS::ProfileGenerator::ProfileGenerator): - (KJS::ProfileGenerator::willExecute): - (KJS::ProfileGenerator::didExecute): - * profiler/Profiler.cpp: - (KJS::Profiler::startProfiling): - (KJS::Profiler::stopProfiling): - (KJS::dispatchFunctionToProfiles): - -2008-09-04 Gavin Barraclough - - Reviewed by Geoffrey Garen. - - Fixed an off-by-one error that would cause the StructureIDChain to - be one object too short. - - Can't construct a test case because other factors make this not crash - (yet!). - - * kjs/StructureID.cpp: - (KJS::StructureIDChain::StructureIDChain): - -2008-09-04 Kevin Ollivier - - wx build fixes. - - * JavaScriptCoreSources.bkl: - -2008-09-04 Mark Rowe - - Reviewed by Eric Seidel. - - Fix https://bugs.webkit.org/show_bug.cgi?id=20639. - Bug 20639: ENABLE_DASHBOARD_SUPPORT does not need to be a FEATURE_DEFINE - - * Configurations/JavaScriptCore.xcconfig: Remove ENABLE_DASHBOARD_SUPPORT from FEATURE_DEFINES. - * wtf/Platform.h: Set ENABLE_DASHBOARD_SUPPORT for PLATFORM(MAC). - -2008-09-04 Adele Peterson - - Build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - -2008-09-04 Mark Rowe - - Mac build fix. - - * kjs/config.h: Only check the value of HAVE_CONFIG_H if it is defined. - -2008-09-04 Marco Barisione - - Reviewed by Eric Seidel. - - http://bugs.webkit.org/show_bug.cgi?id=20380 - [GTK][AUTOTOOLS] Include autotoolsconfig.h from config.h - - * kjs/config.h: Include the configuration header generated by - autotools if available. - -2008-09-04 Tor Arne Vestbø - - Reviewed by Simon. - - Fix the QtWebKit build to match changes in r36016 - - * JavaScriptCore.pri: - -2008-09-04 Mark Rowe - - Fix the 64-bit build. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::printStructureID): Store the instruction offset into an unsigned local - to avoid a warning related to format specifiers. - (KJS::CodeBlock::printStructureIDs): Ditto. - -2008-09-04 Cameron Zwarich - - Rubber-stamped by Oliver Hunt. - - Correct the spelling of 'entryIndices'. - - * kjs/PropertyMap.cpp: - (KJS::PropertyMap::get): - (KJS::PropertyMap::getLocation): - (KJS::PropertyMap::put): - (KJS::PropertyMap::insert): - (KJS::PropertyMap::remove): - (KJS::PropertyMap::checkConsistency): - * kjs/PropertyMap.h: - (KJS::PropertyMapHashTable::entries): - (KJS::PropertyMap::getOffset): - (KJS::PropertyMap::putOffset): - (KJS::PropertyMap::offsetForTableLocation): - -2008-09-03 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Fixed REGRESSION: Crash occurs at - KJS::Machine::privateExecute() when attempting to load my Mobile Gallery - (http://www.me.com/gallery/#home) - - also - - https://bugs.webkit.org/show_bug.cgi?id=20633 Crash in privateExecute - @ cs.byu.edu - - The underlying problem was that we would cache prototype properties - even if the prototype was a dictionary. - - The fix is to transition a prototype back from dictionary to normal - status when an opcode caches access to it. (This is better than just - refusing to cache, since a heavily accessed prototype is almost - certainly not a true dictionary.) - - * VM/Machine.cpp: - (KJS::Machine::tryCacheGetByID): - * kjs/JSObject.h: - -2008-09-03 Eric Seidel - - Reviewed by Sam. - - Clean up Platform.h and add PLATFORM(CHROMIUM), PLATFORM(SKIA) and USE(V8_BINDINGS) - - * Configurations/JavaScriptCore.xcconfig: add missing ENABLE_* - * wtf/ASCIICType.h: include since it depends on it. - * wtf/Platform.h: - -2008-09-03 Kevin McCullough - - Reviewed by Tim. - - Remove the rest of the "zombie" code from the profiler. - - There is no longer a need for the ProfilerClient callback mechanism. - - * API/JSProfilerPrivate.cpp: - (JSStartProfiling): - * JavaScriptCore.exp: - * profiler/HeavyProfile.h: - * profiler/ProfileGenerator.cpp: - (KJS::ProfileGenerator::create): - (KJS::ProfileGenerator::ProfileGenerator): - * profiler/ProfileGenerator.h: - (KJS::ProfileGenerator::profileGroup): - * profiler/Profiler.cpp: - (KJS::Profiler::startProfiling): - (KJS::Profiler::stopProfiling): Immediately return the profile when - stopped instead of using a callback. - * profiler/Profiler.h: - * profiler/TreeProfile.h: - -2008-09-03 Adele Peterson - - Build fix. - - * wtf/win/MainThreadWin.cpp: - -2008-09-02 Kevin McCullough - - Reviewed by Darin and Tim. - - Remove most of the "zombie" mode from the profiler. Next we will need - to remove the client callback mechanism in profiles. - - - This simplifies the code, leverages the recent changes I've made in - getting line numbers from SquirrelFish, and is a slight speed - improvement on SunSpider. - - Also the "zombie" mode was a constant source of odd edge cases and - obscure bugs so it's good to remove since all of its issues may not have - been found. - - * API/JSProfilerPrivate.cpp: No need to call didFinishAllExecution() any - more. - (JSEndProfiling): - * JavaScriptCore.exp: Export the new signature of retrieveLastCaller() - * VM/Machine.cpp: - (KJS::Machine::execute): No need to call didFinishAllExecution() any - more. - (KJS::Machine::retrieveCaller): Now operates on InternalFunctions now - since the RegisterFile is no longer guaranteeded to store only - JSFunctions - (KJS::Machine::retrieveLastCaller): Now also retrieve the function's - name - (KJS::Machine::callFrame): A result of changing retrieveCaller() - * VM/Machine.h: - * VM/Register.h: - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::~JSGlobalObject): - * kjs/nodes.h: - * profiler/ProfileGenerator.cpp: - (KJS::ProfileGenerator::create): Now pass the original exec and get the - global exec and client when necessary. We need the original exec so we - can have the stack frame where profiling started. - (KJS::ProfileGenerator::ProfileGenerator): ditto. - (KJS::ProfileGenerator::addParentForConsoleStart): This is where the - parent to star of the profile is added, if there is one. - (KJS::ProfileGenerator::willExecute): Remove uglyness! - (KJS::ProfileGenerator::didExecute): Ditto! - (KJS::ProfileGenerator::stopProfiling): - (KJS::ProfileGenerator::removeProfileStart): Use a better way to find - and remove the function we are looking for. - (KJS::ProfileGenerator::removeProfileEnd): Ditto. - * profiler/ProfileGenerator.h: - (KJS::ProfileGenerator::client): - * profiler/ProfileNode.cpp: - (KJS::ProfileNode::removeChild): Add a better way to remove a child from - a ProfileNode. - (KJS::ProfileNode::stopProfiling): - (KJS::ProfileNode::debugPrintData): Modified a debug-only diagnostic - function to be sane. - * profiler/ProfileNode.h: - * profiler/Profiler.cpp: Change to pass the original exec state. - (KJS::Profiler::startProfiling): - (KJS::Profiler::stopProfiling): - (KJS::Profiler::willExecute): - (KJS::Profiler::didExecute): - (KJS::Profiler::createCallIdentifier): - * profiler/Profiler.h: - -2008-09-01 Alexey Proskuryakov - - Reviewed by Darin Adler. - - Implement callOnMainThreadAndWait(). - - This will be useful when a background thread needs to perform UI calls synchronously - (e.g. an openDatabase() call cannot return until the user answers to a confirmation dialog). - - * wtf/MainThread.cpp: - (WTF::FunctionWithContext::FunctionWithContext): Added a ThreadCondition member. When - non-zero, the condition is signalled after the function is called. - (WTF::mainThreadFunctionQueueMutex): Renamed from functionQueueMutex, sinc this is no longer - static. Changed to be initialized from initializeThreading() to avoid lock contention. - (WTF::initializeMainThread): On non-Windows platforms, just call mainThreadFunctionQueueMutex. - (WTF::dispatchFunctionsFromMainThread): Signal synchronous calls when done. - (WTF::callOnMainThread): Updated for functionQueueMutex rename. - (WTF::callOnMainThreadAndWait): Added. - - * wtf/MainThread.h: Added callOnMainThreadAndWait(); initializeMainThread() now exists on - all platforms. - - * wtf/win/MainThreadWin.cpp: (WTF::initializeMainThread): Added a callOnMainThreadAndWait() - call to initialize function queue mutex. - - * wtf/ThreadingGtk.cpp: (WTF::initializeThreading): - * wtf/ThreadingPthreads.cpp: (WTF::initializeThreading): - * wtf/ThreadingQt.cpp: (WTF::initializeThreading): - Only initialize mainThreadIdentifier on non-Darwin platforms. It was not guaranteed to be - accurate on Darwin. - -2008-09-03 Geoffrey Garen - - Reviewed by Darin Adler. - - Use isUndefinedOrNull() instead of separate checks for each in op_eq_null - and op_neq_null. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-09-02 Csaba Osztrogonac - - Reviewed by Darin Adler. - - Bug 20296: OpcodeStats doesn't build on platforms which don't have mergesort(). - - - * VM/Opcode.cpp: - (KJS::OpcodeStats::~OpcodeStats): mergesort() replaced with qsort() - -2008-09-02 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fast path for array.length and string.length. - - SunSpider says 0.5% faster. - -2008-09-02 Geoffrey Garen - - Reviewed by Anders Carlsson. - - Added optimized paths for comparing to null. - - SunSpider says 0.5% faster. - -2008-09-02 Geoffrey Garen - - Reviewed by Sam Weinig. - - Changed jsDriver.pl to dump the exact text you would need in order to - reproduce a test result. This enables a fast workflow where you copy - and paste a test failure in the terminal. - - * tests/mozilla/jsDriver.pl: - -2008-09-02 Geoffrey Garen - - Reviewed by Sam Weinig. - - Implemented the rest of Darin's review comments for the 09-01 inline - caching patch. - - SunSpider says 0.5% faster, but that seems like noise. - - * JavaScriptCore.xcodeproj/project.pbxproj: Put PutPropertySlot into - its own file, and added BatchedTransitionOptimizer. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::~CodeBlock): Use array indexing instead of a pointer - iterator. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): Used BatchedTransitionOptimizer to - make batched put and remove for declared variables fast, without forever - pessimizing the global object. Removed the old getDirect/removeDirect hack - that tried to do the same in a more limited way. - - * VM/CodeGenerator.h: Moved IdentifierRepHash to the KJS namespace since - it doesn't specialize anything in WTF. - - * VM/Machine.cpp: - (KJS::Machine::Machine): Nixed the DummyConstruct tag because it was - confusingly named. - - (KJS::Machine::execute): Used BatchedTransitionOptimizer, as above. Fixed - up some comments. - - (KJS::cachePrototypeChain): Cast to JSObject*, since it's more specific. - - (KJS::Machine::tryCachePutByID): Use isNull() instead of comparing to - jsNull(), since isNull() leaves more options open for the future. - (KJS::Machine::tryCacheGetByID): ditto - (KJS::Machine::privateExecute): ditto - - * VM/SamplingTool.cpp: - (KJS::SamplingTool::dump): Use C++-style cast, to match our style - guidelines. - - * kjs/BatchedTransitionOptimizer.h: Added. New class that allows host - code to add a batch of properties to an object in an efficient way. - - * kjs/JSActivation.cpp: Use isNull(), as above. - - * kjs/JSArray.cpp: Get rid of DummyConstruct tag, as above. - * kjs/JSArray.h: - - * kjs/JSGlobalData.cpp: Nixed two unused StructureIDs. - * kjs/JSGlobalData.h: - - * kjs/JSImmediate.cpp: Use isNull(), as above. - - * kjs/JSObject.cpp: - (KJS::JSObject::mark): Moved mark tracing code elsewhere, to make this - function more readable. - - (KJS::JSObject::put): Use isNull(), as above. - - (KJS::JSObject::createInheritorID): Return a raw pointer, since the - object is owned by a data member, not necessarily the caller. - * kjs/JSObject.h: - - * kjs/JSString.cpp: Use isNull(), as above. - - * kjs/PropertyMap.h: Updated to use PropertySlot::invalidOffset. - - * kjs/PropertySlot.h: Changed KJS_INVALID_OFFSET to WTF::notFound - because C macros are so 80's. - - * kjs/PutPropertySlot.h: Added. Split out of PropertySlot.h. Also renamed - PutPropertySlot::SlotType to PutPropertySlot::Type, and slotBase to base, - since "slot" was redundant. - - * kjs/StructureID.cpp: Added a new transition *away* from dictionary - status, to support BatchedTransitionOptimizer. - - (KJS::StructureIDChain::StructureIDChain): No need to store m_size as - a data member, so keep it in a local, which might be faster. - * kjs/StructureID.h: - - * kjs/SymbolTable.h: Moved IdentifierRepHash to KJS namespace, as above. - * kjs/ustring.h: - -2008-09-02 Adam Roben - - Windows build fixes - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add - StructureID.{cpp,h} to the project. Also let VS reorder this file. - * VM/CodeBlock.cpp: Include StringExtras so that snprintf will be - defined on Windows. - -2008-09-01 Sam Weinig - - Fix release build. - - * JavaScriptCore.exp: - -2008-09-01 Jan Michael Alonzo - - Reviewed by Oliver Hunt. - - Gtk buildfix - - * GNUmakefile.am: - * kjs/PropertyMap.cpp: rename Identifier.h to identifier.h - * kjs/StructureID.cpp: include JSObject.h - -2008-09-01 Geoffrey Garen - - Reviewed by Darin Adler. - - First cut at inline caching for access to vanilla JavaScript properties. - - SunSpider says 4% faster. Tests heavy on dictionary-like access have - regressed a bit -- we have a lot of room to improve in this area, - but this patch is over-ripe as-is. - - JSCells now have a StructureID that uniquely identifies their layout, - and holds their prototype. - - JSValue::put takes a PropertySlot& argument, so it can fill in details - about where it put a value, for the sake of caching. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::CodeGenerator): Avoid calling removeDirect if we - can, since it disables inline caching in the global object. This can - probably improve in the future. - - * kjs/JSGlobalObject.cpp: Nixed reset(), since it complicates caching, and - wasn't really necessary. - - * kjs/JSObject.cpp: Tweaked getter / setter behavior not to rely on the - IsGetterSetter flag, since the flag was buggy. This is necessary in order - to avoid accidentally accessing a getter / setter as a normal property. - - Also changed getter / setter creation to honor ReadOnly, matching Mozilla. - - * kjs/PropertyMap.cpp: Nixed clear(), since it complicates caching and - isn't necessary. - - * kjs/Shell.cpp: Moved SamplingTool dumping outside the loop. This allows - you to aggregate sampling of multiple files (or the same file repeatedly), - which helped me track down regressions. - - * kjs/ustring.h: Moved IdentifierRepHash here to share it. - -2008-09-01 Geoffrey Garen - - Reviewed by Sam Weinig. - - Eagerly allocate the Math object's numeric constants. This avoids - constantly reallocating them in loops, and also ensures that the Math - object will not use the single property optimization, which makes - properties ineligible for caching. - - SunSpider reports a small speedup, in combination with inline caching. - - * kjs/MathObject.cpp: - (KJS::MathObject::MathObject): - (KJS::MathObject::getOwnPropertySlot): - * kjs/MathObject.h: - -2008-09-01 Jan Michael Alonzo - - Gtk build fix, not reviewed. - - * GNUmakefile.am: Add SmallStrings.cpp in both release and debug builds - -2008-08-31 Cameron Zwarich - - Reviewed by Maciej Stachowiak. - - Bug 20577: REGRESSION (r36006): Gmail is broken - - - r36006 changed stringProtoFuncSubstr() so that it is uses the more - efficient jsSubstring(), rather than using UString::substr() and then - calling jsString(). However, the change did not account for the case - where the start and the length of the substring extend beyond the length - of the original string. This patch corrects that. - - * kjs/StringPrototype.cpp: - (KJS::stringProtoFuncSubstr): - -2008-08-31 Simon Hausmann - - Unreviewed build fix (with gcc 4.3) - - * kjs/ustring.h: Properly forward declare operator== for UString and - the the concatenate functions inside the KJS namespace. - -2008-08-30 Darin Adler - - Reviewed by Maciej. - - - https://bugs.webkit.org/show_bug.cgi?id=20333 - improve JavaScript speed when handling single-character strings - - 1.035x as fast on SunSpider overall. - 1.127x as fast on SunSpider string tests. - 1.910x as fast on SunSpider string-base64 test. - - * API/JSObjectRef.cpp: - (JSObjectMakeFunction): Removed unneeded explicit construction of UString. - - * GNUmakefile.am: Added SmallStrings.h and SmallStrings.cpp. - * JavaScriptCore.pri: Ditto. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - * JavaScriptCoreSources.bkl: Ditto. - - * JavaScriptCore.exp: Updated. - - * VM/Machine.cpp: - (KJS::jsAddSlowCase): Changed to use a code path that doesn't involve - a UString constructor. This avoids an extra jump caused by the "in charge" - vs. "not in charge" constructors. - (KJS::jsAdd): Ditto. - (KJS::jsTypeStringForValue): Adopted jsNontrivialString. - - * kjs/ArrayPrototype.cpp: - (KJS::arrayProtoFuncToString): Adopted jsEmptyString. - (KJS::arrayProtoFuncToLocaleString): Ditto. - (KJS::arrayProtoFuncJoin): Ditto. - * kjs/BooleanPrototype.cpp: - (KJS::booleanProtoFuncToString): Adopted jsNontrivialString. - * kjs/DateConstructor.cpp: - (KJS::callDate): Ditto. - * kjs/DatePrototype.cpp: - (KJS::formatLocaleDate): Adopted jsEmptyString and jsNontrivialString. - (KJS::dateProtoFuncToString): Ditto. - (KJS::dateProtoFuncToUTCString): Ditto. - (KJS::dateProtoFuncToDateString): Ditto. - (KJS::dateProtoFuncToTimeString): Ditto. - (KJS::dateProtoFuncToLocaleString): Ditto. - (KJS::dateProtoFuncToLocaleDateString): Ditto. - (KJS::dateProtoFuncToLocaleTimeString): Ditto. - (KJS::dateProtoFuncToGMTString): Ditto. - - * kjs/ErrorPrototype.cpp: - (KJS::ErrorPrototype::ErrorPrototype): Ditto. - (KJS::errorProtoFuncToString): Ditto. - - * kjs/JSGlobalData.h: Added SmallStrings. - - * kjs/JSString.cpp: - (KJS::jsString): Eliminated the overload that takes a const char*. - Added code to use SmallStrings to get strings of small sizes rather - than creating a new JSString every time. - (KJS::jsSubstring): Added. Used when creating a string from a substring - to avoid creating a JSString in cases where the substring will end up - empty or as one character. - (KJS::jsOwnedString): Added the same code as in jsString. - - * kjs/JSString.h: Added new functions jsEmptyString, jsSingleCharacterString, - jsSingleCharacterSubstring, jsSubstring, and jsNontrivialString for various - cases where we want to create JSString, and want special handling for small - strings. - (KJS::JSString::JSString): Added an overload that takes a PassRefPtr of - a UString::Rep so you don't have to construct a UString; PassRefPtr can be - more efficient. - (KJS::jsEmptyString): Added. - (KJS::jsSingleCharacterString): Added. - (KJS::jsSingleCharacterSubstring): Added. - (KJS::jsNontrivialString): Added. - (KJS::JSString::getIndex): Adopted jsSingleCharacterSubstring. - (KJS::JSString::getStringPropertySlot): Ditto. - - * kjs/NumberPrototype.cpp: - (KJS::numberProtoFuncToFixed): Adopted jsNontrivialString. - (KJS::numberProtoFuncToExponential): Ditto. - (KJS::numberProtoFuncToPrecision): Ditto. - - * kjs/ObjectPrototype.cpp: - (KJS::objectProtoFuncToLocaleString): Adopted toThisJSString. - (KJS::objectProtoFuncToString): Adopted jsNontrivialString. - - * kjs/RegExpConstructor.cpp: Separated the lastInput value that's used - with the lastOvector to return matches from the input value that can be - changed via JavaScript. They will be equal in many cases, but not all. - (KJS::RegExpConstructor::performMatch): Set input. - (KJS::RegExpMatchesArray::RegExpMatchesArray): Ditto. - (KJS::RegExpMatchesArray::fillArrayInstance): Adopted jsSubstring. Also, - use input rather than lastInput in the appropriate place. - (KJS::RegExpConstructor::getBackref): Adopted jsSubstring and jsEmptyString. - Added code to handle the case where there is no backref -- before this - depended on range checking in UString::substr which is not present in - jsSubstring. - (KJS::RegExpConstructor::getLastParen): Ditto. - (KJS::RegExpConstructor::getLeftContext): Ditto. - (KJS::RegExpConstructor::getRightContext): Ditto. - (KJS::RegExpConstructor::getValueProperty): Use input rather than lastInput. - Also adopt jsEmptyString. - (KJS::RegExpConstructor::putValueProperty): Ditto. - (KJS::RegExpConstructor::input): Ditto. - - * kjs/RegExpPrototype.cpp: - (KJS::regExpProtoFuncToString): Adopt jsNonTrivialString. Also changed to - use UString::append to append single characters rather than using += and - a C-style string. - - * kjs/SmallStrings.cpp: Added. - (KJS::SmallStringsStorage::SmallStringsStorage): Construct the - buffer and UString::Rep for all 256 single-character strings for - the U+0000 through U+00FF. This covers all the values used in - the base64 test as well as most values seen elsewhere on the web - as well. It's possible that later we might fix this to only work - for U+0000 through U+007F but the others are used quite a bit in - the current version of the base64 test. - (KJS::SmallStringsStorage::~SmallStringsStorage): Free memory. - (KJS::SmallStrings::SmallStrings): Create a set of small strings, - initially not created; created later when they are used. - (KJS::SmallStrings::~SmallStrings): Deallocate. Not left compiler - generated because the SmallStringsStorage class's destructor needs - to be visible. - (KJS::SmallStrings::mark): Mark all the strings. - (KJS::SmallStrings::createEmptyString): Create a cell for the - empty string. Called only the first time. - (KJS::SmallStrings::createSingleCharacterString): Create a cell - for one of the single-character strings. Called only the first time. - * kjs/SmallStrings.h: Added. - - * kjs/StringConstructor.cpp: - (KJS::stringFromCharCodeSlowCase): Factored out of strinFromCharCode. - Only used for cases where the caller does not pass exactly one argument. - (KJS::stringFromCharCode): Adopted jsSingleCharacterString. - (KJS::callStringConstructor): Adopted jsEmptyString. - - * kjs/StringObject.cpp: - (KJS::StringObject::StringObject): Adopted jsEmptyString. - - * kjs/StringPrototype.cpp: - (KJS::stringProtoFuncReplace): Adopted jsSubstring. - (KJS::stringProtoFuncCharAt): Adopted jsEmptyString and - jsSingleCharacterSubstring and also added a special case when the - index is an immediate number to avoid conversion to and from floating - point, since that's the common case. - (KJS::stringProtoFuncCharCodeAt): Ditto. - (KJS::stringProtoFuncMatch): Adopted jsSubstring and jsEmptyString. - (KJS::stringProtoFuncSlice): Adopted jsSubstring and - jsSingleCharacterSubstring. Also got rid of some unneeded locals and - removed unneeded code to set the length property of the array, since it - is automatically updated as values are added to the array. - (KJS::stringProtoFuncSplit): Adopted jsEmptyString. - (KJS::stringProtoFuncSubstr): Adopted jsSubstring. - (KJS::stringProtoFuncSubstring): Ditto. - - * kjs/collector.cpp: - (KJS::Heap::collect): Added a call to mark SmallStrings. - - * kjs/ustring.cpp: - (KJS::UString::expandedSize): Made this a static member function since - it doesn't need to look at any data members. - (KJS::UString::expandCapacity): Use a non-inline function, makeNull, to - set the rep to null in failure cases. This avoids adding a PIC branch for - the normal case when there is no failure. - (KJS::UString::expandPreCapacity): Ditto. - (KJS::UString::UString): Ditto. - (KJS::concatenate): Refactored the concatenation constructor into this - separate function. Calling the concatenation constructor was leading to - an extra branch because of the in-charge vs. not-in-charge versions not - both being inlined, and this was showing up as nearly 1% on Shark. Also - added a special case for when the second string is a single character, - since it's a common idiom to build up a string that way and we can do - things much more quickly, without involving memcpy for example. Also - adopted the non-inline function, nullRep, for the same reason given for - makeNull above. - (KJS::UString::append): Adopted makeNull for failure cases. - (KJS::UString::operator=): Ditto. - (KJS::UString::toDouble): Added a special case for converting single - character strings to numbers. We're doing this a ton of times while - running the base64 test. - (KJS::operator==): Added special cases so we can compare single-character - strings without calling memcmp. Later we might want to special case other - short lengths similarly. - (KJS::UString::makeNull): Added. - (KJS::UString::nullRep): Added. - * kjs/ustring.h: Added declarations for the nullRep and makeNull. Changed - expandedSize to be a static member function. Added a declaration of the - concatenate function. Removed the concatenation constructor. Rewrote - operator+ to use the concatenate function. - -2008-08-29 Anders Carlsson - - Build fix. - - * VM/Machine.cpp: - (KJS::getCPUTime): - -2008-08-29 Anders Carlsson - - Reviewed by Darin Adler. - - - When a machine is under heavy load, the Slow Script dialog often comes up many times and just gets in the way - - Instead of using clock time, use the CPU time spent executing the current thread when - determining if the script has been running for too long. - - * VM/Machine.cpp: - (KJS::getCPUTime): - (KJS::Machine::checkTimeout): - -2008-08-28 Cameron Zwarich - - Rubber-stamped by Sam Weinig. - - Change 'term' to 'expr' in variable names to standardize terminology. - - * kjs/nodes.cpp: - (KJS::BinaryOpNode::emitCode): - (KJS::ReverseBinaryOpNode::emitCode): - (KJS::ThrowableBinaryOpNode::emitCode): - * kjs/nodes.h: - (KJS::BinaryOpNode::BinaryOpNode): - (KJS::ReverseBinaryOpNode::ReverseBinaryOpNode): - (KJS::MultNode::): - (KJS::DivNode::): - (KJS::ModNode::): - (KJS::AddNode::): - (KJS::SubNode::): - (KJS::LeftShiftNode::): - (KJS::RightShiftNode::): - (KJS::UnsignedRightShiftNode::): - (KJS::LessNode::): - (KJS::GreaterNode::): - (KJS::LessEqNode::): - (KJS::GreaterEqNode::): - (KJS::ThrowableBinaryOpNode::): - (KJS::InstanceOfNode::): - (KJS::InNode::): - (KJS::EqualNode::): - (KJS::NotEqualNode::): - (KJS::StrictEqualNode::): - (KJS::NotStrictEqualNode::): - (KJS::BitAndNode::): - (KJS::BitOrNode::): - (KJS::BitXOrNode::): - * kjs/nodes2string.cpp: - (KJS::MultNode::streamTo): - (KJS::DivNode::streamTo): - (KJS::ModNode::streamTo): - (KJS::AddNode::streamTo): - (KJS::SubNode::streamTo): - (KJS::LeftShiftNode::streamTo): - (KJS::RightShiftNode::streamTo): - (KJS::UnsignedRightShiftNode::streamTo): - (KJS::LessNode::streamTo): - (KJS::GreaterNode::streamTo): - (KJS::LessEqNode::streamTo): - (KJS::GreaterEqNode::streamTo): - (KJS::InstanceOfNode::streamTo): - (KJS::InNode::streamTo): - (KJS::EqualNode::streamTo): - (KJS::NotEqualNode::streamTo): - (KJS::StrictEqualNode::streamTo): - (KJS::NotStrictEqualNode::streamTo): - (KJS::BitAndNode::streamTo): - (KJS::BitXOrNode::streamTo): - (KJS::BitOrNode::streamTo): - -2008-08-28 Alp Toker - - GTK+ dist/build fix. List newly added header files. - - * GNUmakefile.am: - -2008-08-28 Sam Weinig - - Reviewed by Oliver Hunt. - - Change to throw a ReferenceError at runtime instead of a ParseError - at parse time, when the left hand side expression of a for-in statement - is not an lvalue. - - * kjs/grammar.y: - * kjs/nodes.cpp: - (KJS::ForInNode::emitCode): - -2008-08-28 Alexey Proskuryakov - - Not reviewed, build fix (at least for OpenBSD, posssibly more). - - https://bugs.webkit.org/show_bug.cgi?id=20545 - missing #include in JavaScriptCore/VM/SamplingTool.cpp - - * VM/SamplingTool.cpp: add the missing include. - -2008-08-26 Kevin McCullough - - Reviewed by Geoff and Cameron. - - Hitting assertion in Register::codeBlock when - loading facebook (20516). - - - This was a result of my line numbers change. After a host function is - called the stack does not get reset correctly. - - Oddly this also appears to be a slight speedup on SunSpider. - - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - -2008-08-26 Alexey Proskuryakov - - Reviewed by Geoff and Tim. - - Export new API methods. - - * JavaScriptCore.exp: - -2008-08-25 Kevin McCullough - - Reviewed by Geoff, Tim and Mark. - - JSProfiler: It would be nice if the profiles - in the console said what file and line number they came from - - Lay the foundation for getting line numbers and other data from the - JavaScript engine. With the cleanup in kjs/ExecState this is actually - a slight performance improvement. - - * JavaScriptCore.exp: Export retrieveLastCaller() for WebCore. - * JavaScriptCore.xcodeproj/project.pbxproj: - * VM/Machine.cpp: Now Host and JS functions set a call frame on the - exec state, so this and the profiler code were pulled out of the - branches. - (KJS::Machine::privateExecute): - (KJS::Machine::retrieveLastCaller): This get's the lineNumber, sourceID - and sourceURL for the previously called function. - * VM/Machine.h: - * kjs/ExecState.cpp: Remove references to JSFunction since it's not used - anywhere. - * kjs/ExecState.h: - -2008-08-25 Alexey Proskuryakov - - Reviewed by Darin Adler. - - Ensure that JSGlobalContextRelease() performs garbage collection, even if there are other - contexts in the current context's group. - - This is only really necessary when the last reference is released, but there is no way to - determine that, and no harm in collecting slightly more often. - - * API/JSContextRef.cpp: (JSGlobalContextRelease): Explicitly collect the heap if it is not - being destroyed. - -2008-08-24 Cameron Zwarich - - Reviewed by Oliver Hunt. - - Bug 20093: JSC shell does not clear exceptions after it executes toString on an expression - - - Clear exceptions after evaluating any code in the JSC shell. We do not - report exceptions that are caused by calling toString on the final - valued, but at least we avoid incorrect behaviour. - - Also, print any exceptions that occurred while evaluating code at the - interactive prompt, not just while evaluating code from a file. - - * kjs/Shell.cpp: - (runWithScripts): - (runInteractive): - -2008-08-24 Cameron Zwarich - - Reviewed by Oliver. - - Remove an unnecessary RefPtr to a RegisterID. - - * kjs/nodes.cpp: - (KJS::DeleteBracketNode::emitCode): - -2008-08-24 Mark Rowe - - Reviewed by Oliver Hunt. - - Use the correct version number for when JSGlobalContextCreate was introduced. - - * API/JSContextRef.h: - -2008-08-23 Cameron Zwarich - - Rubber-stamped by Mark Rowe. - - Remove modelines. - - * API/APICast.h: - * API/JSBase.cpp: - * API/JSCallbackConstructor.cpp: - * API/JSCallbackConstructor.h: - * API/JSCallbackFunction.cpp: - * API/JSCallbackFunction.h: - * API/JSCallbackObject.cpp: - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - * API/JSClassRef.cpp: - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - * API/JSProfilerPrivate.cpp: - * API/JSStringRef.cpp: - * API/JSStringRefBSTR.cpp: - * API/JSStringRefCF.cpp: - * API/JSValueRef.cpp: - * API/tests/JSNode.c: - * API/tests/JSNode.h: - * API/tests/JSNodeList.c: - * API/tests/JSNodeList.h: - * API/tests/Node.c: - * API/tests/Node.h: - * API/tests/NodeList.c: - * API/tests/NodeList.h: - * API/tests/minidom.c: - * API/tests/minidom.js: - * API/tests/testapi.c: - * API/tests/testapi.js: - * JavaScriptCore.pro: - * kjs/FunctionConstructor.h: - * kjs/FunctionPrototype.h: - * kjs/JSArray.h: - * kjs/JSString.h: - * kjs/JSWrapperObject.cpp: - * kjs/NumberConstructor.h: - * kjs/NumberObject.h: - * kjs/NumberPrototype.h: - * kjs/lexer.h: - * kjs/lookup.h: - * wtf/Assertions.cpp: - * wtf/Assertions.h: - * wtf/HashCountedSet.h: - * wtf/HashFunctions.h: - * wtf/HashIterators.h: - * wtf/HashMap.h: - * wtf/HashSet.h: - * wtf/HashTable.h: - * wtf/HashTraits.h: - * wtf/ListHashSet.h: - * wtf/ListRefPtr.h: - * wtf/Noncopyable.h: - * wtf/OwnArrayPtr.h: - * wtf/OwnPtr.h: - * wtf/PassRefPtr.h: - * wtf/Platform.h: - * wtf/RefPtr.h: - * wtf/RefPtrHashMap.h: - * wtf/RetainPtr.h: - * wtf/UnusedParam.h: - * wtf/Vector.h: - * wtf/VectorTraits.h: - * wtf/unicode/Unicode.h: - * wtf/unicode/icu/UnicodeIcu.h: - -2008-08-22 Cameron Zwarich - - Reviewed by Oliver. - - Some cleanup to match our coding style. - - * VM/CodeGenerator.h: - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * kjs/ExecState.cpp: - * kjs/ExecState.h: - * kjs/completion.h: - * kjs/identifier.cpp: - (KJS::Identifier::equal): - (KJS::CStringTranslator::hash): - (KJS::CStringTranslator::equal): - (KJS::CStringTranslator::translate): - (KJS::UCharBufferTranslator::equal): - (KJS::UCharBufferTranslator::translate): - (KJS::Identifier::remove): - * kjs/operations.h: - -2008-08-20 Alexey Proskuryakov - - Windows build fix. - - * API/WebKitAvailability.h: Define DEPRECATED_ATTRIBUTE. - -2008-08-19 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - Bring back shared JSGlobalData and implicit locking, because too many clients rely on it. - - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::~JSGlobalData): - (KJS::JSGlobalData::JSGlobalData): Re-add shared instance. - (KJS::JSGlobalData::sharedInstanceExists): Ditto. - (KJS::JSGlobalData::sharedInstance): Ditto. - (KJS::JSGlobalData::sharedInstanceInternal): Ditto. - - * API/JSContextRef.h: Deprecated JSGlobalContextCreate(). Added a very conservative - description of its threading model (nothing is allowed). - - * API/JSContextRef.cpp: - (JSGlobalContextCreate): Use shared JSGlobalData. - (JSGlobalContextCreateInGroup): Support passing NULL group to request a unique one. - (JSGlobalContextRetain): Added back locking. - (JSGlobalContextRelease): Ditto. - (JSContextGetGlobalObject): Ditto. - - * API/tests/minidom.c: (main): - * API/tests/testapi.c: (main): - Switched to JSGlobalContextCreateInGroup() to avoid deprecation warnings. - - * JavaScriptCore.exp: Re-added JSLock methods. Added JSGlobalContextCreateInGroup (d'oh!). - - * API/JSBase.cpp: - (JSEvaluateScript): - (JSCheckScriptSyntax): - (JSGarbageCollect): - * API/JSCallbackConstructor.cpp: - (KJS::constructJSCallback): - * API/JSCallbackFunction.cpp: - (KJS::JSCallbackFunction::call): - * API/JSCallbackObjectFunctions.h: - (KJS::::init): - (KJS::::getOwnPropertySlot): - (KJS::::put): - (KJS::::deleteProperty): - (KJS::::construct): - (KJS::::hasInstance): - (KJS::::call): - (KJS::::getPropertyNames): - (KJS::::toNumber): - (KJS::::toString): - (KJS::::staticValueGetter): - (KJS::::callbackGetter): - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeConstructor): - (JSObjectMakeFunction): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - (JSObjectDeleteProperty): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - (JSObjectCopyPropertyNames): - (JSPropertyNameArrayRelease): - (JSPropertyNameAccumulatorAddName): - * API/JSValueRef.cpp: - (JSValueIsEqual): - (JSValueIsInstanceOfConstructor): - (JSValueMakeNumber): - (JSValueMakeString): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - (JSValueUnprotect): - * ForwardingHeaders/JavaScriptCore/JSLock.h: Added. - * GNUmakefile.am: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - * kjs/AllInOneFile.cpp: - * kjs/JSGlobalData.h: - * kjs/JSGlobalObject.cpp: - (KJS::JSGlobalObject::~JSGlobalObject): - (KJS::JSGlobalObject::init): - * kjs/JSLock.cpp: Added. - (KJS::createJSLockCount): - (KJS::JSLock::lockCount): - (KJS::setLockCount): - (KJS::JSLock::JSLock): - (KJS::JSLock::lock): - (KJS::JSLock::unlock): - (KJS::JSLock::currentThreadIsHoldingLock): - (KJS::JSLock::DropAllLocks::DropAllLocks): - (KJS::JSLock::DropAllLocks::~DropAllLocks): - * kjs/JSLock.h: Added. - (KJS::JSLock::JSLock): - (KJS::JSLock::~JSLock): - * kjs/Shell.cpp: - (functionGC): - (jscmain): - * kjs/collector.cpp: - (KJS::Heap::~Heap): - (KJS::Heap::heapAllocate): - (KJS::Heap::setGCProtectNeedsLocking): - (KJS::Heap::protect): - (KJS::Heap::unprotect): - (KJS::Heap::collect): - * kjs/identifier.cpp: - * kjs/interpreter.cpp: - (KJS::Interpreter::checkSyntax): - (KJS::Interpreter::evaluate): - Re-added implicit locking. - -2008-08-19 Kevin McCullough - - Reviewed by Tim and Mark. - - Implement DTrace hooks for dashcode and instruments. - - * API/JSProfilerPrivate.cpp: Added. Expose SPI so that profiling can be - turned on from a client. The DTrace probes were added within the - profiler mechanism for performance reasons so the profiler must be - started to enable tracing. - (JSStartProfiling): - (JSEndProfiling): - * API/JSProfilerPrivate.h: Added. Ditto. - * JavaScriptCore.exp: Exposing the start/stop methods to clients. - * JavaScriptCore.xcodeproj/project.pbxproj: - * kjs/Tracing.d: Define the DTrace probes. - * kjs/Tracing.h: Ditto. - * profiler/ProfileGenerator.cpp: Implement the DTrace probes in the - profiler. - (KJS::ProfileGenerator::willExecute): - (KJS::ProfileGenerator::didExecute): - -2008-08-19 Steve Falkenburg - - Build fix. - - * kjs/operations.cpp: - (KJS::equal): - -2008-08-18 Timothy Hatcher - - Fix an assertion when generating a heavy profile because the - empty value and deleted value of CallIdentifier where equal. - - https://bugs.webkit.org/show_bug.cgi?id=20439 - - Reviewed by Dan Bernstein. - - * profiler/CallIdentifier.h: Make the emptyValue for CallIdentifier - use empty strings for URL and function name. - -2008-08-12 Darin Adler - - Reviewed by Geoff. - - - eliminate JSValue::type() - - This will make it slightly easier to change the JSImmediate design without - having to touch so many call sites. - - SunSpider says this change is a wash (looked like a slight speedup, but not - statistically significant). - - * API/JSStringRef.cpp: Removed include of JSType.h. - * API/JSValueRef.cpp: Removed include of JSType.h. - (JSValueGetType): Replaced use of JSValue::type() with - JSValue::is functions. - - * JavaScriptCore.exp: Updated. - - * VM/JSPropertyNameIterator.cpp: Removed type() implementation. - (KJS::JSPropertyNameIterator::toPrimitive): Changed to take - PreferredPrimitiveType argument instead of JSType. - * VM/JSPropertyNameIterator.h: Ditto. - - * VM/Machine.cpp: - (KJS::fastIsNumber): Updated for name change. - (KJS::fastToInt32): Ditto. - (KJS::fastToUInt32): Ditto. - (KJS::jsAddSlowCase): Updated toPrimitive caller for change from - JSType to PreferredPrimitiveType. - (KJS::jsAdd): Replaced calls to JSValue::type() with calls to - JSValue::isString(). - (KJS::jsTypeStringForValue): Replaced calls to JSValue::type() - with multiple calls to JSValue::is -- we could make this a - virtual function instead if we want to have faster performance. - (KJS::Machine::privateExecute): Renamed JSImmediate::toTruncatedUInt32 - to JSImmediate::getTruncatedUInt32 for consistency with other functions. - Changed two calls of JSValue::type() to JSValue::isString(). - - * kjs/GetterSetter.cpp: - (KJS::GetterSetter::toPrimitive): Changed to take - PreferredPrimitiveType argument instead of JSType. - (KJS::GetterSetter::isGetterSetter): Added. - * kjs/GetterSetter.h: - - * kjs/JSCell.cpp: - (KJS::JSCell::isString): Added. - (KJS::JSCell::isGetterSetter): Added. - (KJS::JSCell::isObject): Added. - - * kjs/JSCell.h: Eliminated type function. Added isGetterSetter. - Made isString and isObject virtual. Changed toPrimitive to take - PreferredPrimitiveType argument instead of JSType. - (KJS::JSCell::isNumber): Use Heap::isNumber for faster performance. - (KJS::JSValue::isGetterSetter): Added. - (KJS::JSValue::toPrimitive): Changed to take - PreferredPrimitiveType argument instead of JSType. - - * kjs/JSImmediate.h: Removed JSValue::type() and replaced - JSValue::toTruncatedUInt32 with JSValue::getTruncatedUInt32. - (KJS::JSImmediate::isEitherImmediate): Added. - - * kjs/JSNotAnObject.cpp: - (KJS::JSNotAnObject::toPrimitive): Changed to take - PreferredPrimitiveType argument instead of JSType. - * kjs/JSNotAnObject.h: Ditto. - * kjs/JSNumberCell.cpp: - (KJS::JSNumberCell::toPrimitive): Ditto. - * kjs/JSNumberCell.h: - (KJS::JSNumberCell::toInt32): Renamed from fastToInt32. There's no - other "slow" version of this once you have a JSNumberCell, so there's - no need for "fast" in the name. It's a feature that this hides the - base class toInt32, which does the same job less efficiently (and has - an additional ExecState argument). - (KJS::JSNumberCell::toUInt32): Ditto. - - * kjs/JSObject.cpp: - (KJS::callDefaultValueFunction): Use isGetterSetter instead of type. - (KJS::JSObject::getPrimitiveNumber): Use PreferredPrimitiveType. - (KJS::JSObject::defaultValue): Ditto. - (KJS::JSObject::defineGetter): Use isGetterSetter. - (KJS::JSObject::defineSetter): Ditto. - (KJS::JSObject::lookupGetter): Ditto. - (KJS::JSObject::lookupSetter): Ditto. - (KJS::JSObject::toNumber): Use PreferredPrimitiveType. - (KJS::JSObject::toString): Ditto. - (KJS::JSObject::isObject): Added. - - * kjs/JSObject.h: - (KJS::JSObject::inherits): Call the isObject from JSCell; it's now - hidden by our override of isObject. - (KJS::JSObject::getOwnPropertySlotForWrite): Use isGetterSetter - instead of type. - (KJS::JSObject::getOwnPropertySlot): Ditto. - (KJS::JSObject::toPrimitive): Use PreferredPrimitiveType. - - * kjs/JSString.cpp: - (KJS::JSString::toPrimitive): Use PreferredPrimitiveType. - (KJS::JSString::isString): Added. - * kjs/JSString.h: Ditto. - - * kjs/JSValue.h: Removed type(), added isGetterSetter(). Added - PreferredPrimitiveType enum and used it as the argument for the - toPrimitive function. - (KJS::JSValue::getBoolean): Simplified a bit an removed a branch. - - * kjs/collector.cpp: - (KJS::typeName): Changed to use JSCell::is functions instead of - calling JSCell::type. - - * kjs/collector.h: - (KJS::Heap::isNumber): Renamed from fastIsNumber. - - * kjs/nodes.h: Added now-needed include of JSType, since the type - is used here to record types of values in the tree. - - * kjs/operations.cpp: - (KJS::equal): Rewrote to no longer depend on type(). - (KJS::strictEqual): Ditto. - -2008-08-18 Kevin McCullough - - Reviewed by Tim. - - If there are no nodes in a profile all the time should be attributed to - (idle) - - * profiler/Profile.cpp: If ther are no nodes make sure we still process - the head. - (KJS::Profile::forEach): - * profiler/ProfileGenerator.cpp: Remove some useless code. - (KJS::ProfileGenerator::stopProfiling): - -2008-08-18 Alexey Proskuryakov - - Reviewed by Maciej. - - Make JSGlobalContextRetain/Release actually work. - - * API/JSContextRef.cpp: - (JSGlobalContextRetain): - (JSGlobalContextRelease): - Ref/deref global data to give checking for globalData.refCount() some sense. - - * API/tests/testapi.c: (main): Added a test for this bug. - - * kjs/JSGlobalData.cpp: - (KJS::JSGlobalData::~JSGlobalData): - While checking for memory leaks, found that JSGlobalData::emptyList has changed to - a pointer, but it was not destructed, causing a huge leak in run-webkit-tests --threaded. - -2008-08-17 Cameron Zwarich - - Reviewed by Maciej. - - Change the counting of constants so that preincrement and predecrement of - const local variables are considered unexpected loads. - - * kjs/nodes.cpp: - (KJS::PrefixResolveNode::emitCode): - * kjs/nodes.h: - (KJS::ScopeNode::neededConstants): - -2008-08-17 Oliver Hunt - - Reviewed by Cameron Zwarich. - - In Gmail, a crash occurs at KJS::Machine::privateExecute() when applying list styling to text after a quote had been removed - - - This crash was caused by "depth()" incorrectly determining the scope depth - of a 0 depth function without a full scope chain. Because such a function - would not have an activation the depth function would return the scope depth - of the parent frame, thus triggering an incorrect unwind. Any subsequent - look up that walked the scope chain would result in incorrect behaviour, - leading to a crash or incorrect variable resolution. This can only actually - happen in try...finally statements as that's the only path that can result in - the need to unwind the scope chain, but not force the function to need a - full scope chain. - - The fix is simply to check for this case before attempting to walk the scope chain. - - * VM/Machine.cpp: - (KJS::depth): - (KJS::Machine::throwException): - -2008-08-17 Cameron Zwarich - - Reviewed by Maciej. - - Bug 20419: Remove op_jless - - - Remove op_jless, which is rarely used now that we have op_loop_if_less. - - * VM/CodeBlock.cpp: - (KJS::CodeBlock::dump): - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::emitJumpIfTrue): - * VM/Machine.cpp: - (KJS::Machine::privateExecute): - * VM/Opcode.h: - -2008-08-17 Cameron Zwarich - - Reviewed by Dan Bernstein. - - Fix a typo in r35807 that is also causing build failures for - non-AllInOne builds. - - * kjs/NumberConstructor.cpp: - -2008-08-17 Geoffrey Garen - - Reviewed by Cameron Zwarich. - - Made room for a free word in JSCell. - - SunSpider says no change. - - I changed JSCallbackObjectData, Arguments, JSArray, and RegExpObject to - store auxiliary data in a secondary structure. - - I changed InternalFunction to store the function's name in the property - map. - - I changed JSGlobalObjectData to use a virtual destructor, so WebCore's - JSDOMWindowBaseData could inherit from it safely. (It's a strange design - for JSDOMWindowBase to allocate an object that JSGlobalObject deletes, - but that's really our only option, given the size constraint.) - - I also added a bunch of compile-time ASSERTs, and removed lots of comments - in JSObject.h because they were often out of date, and they got in the - way of reading what was actually going on. - - Also renamed JSArray::getLength to JSArray::length, to match our style - guidelines. - -2008-08-16 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Sped up property access for array.length and string.length by adding a - mechanism for returning a temporary value directly instead of returning - a pointer to a function that retrieves the value. - - Also removed some unused cruft from PropertySlot. - - SunSpider says 0.5% - 1.2% faster. - - NOTE: This optimization is not a good idea in general, because it's - actually a pessimization in the case of resolve for assignment, - and it may get in the way of other optimizations in the future. - -2008-08-16 Dan Bernstein - - Reviewed by Geoffrey Garen. - - Disable dead code stripping in debug builds. - - * Configurations/Base.xcconfig: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2008-08-15 Mark Rowe - - Reviewed by Oliver Hunt. - - FastMallocZone's enumeration code makes assumptions about handling of remote memory regions that overlap - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Don't directly compare pointers mapped into the local process with - a pointer that has not been mapped. Instead, calculate a local address for the pointer and compare with that. - (WTF::TCMallocStats::FreeObjectFinder::findFreeObjects): Pass in the remote address of the central free list so that it can - be used when calculating local addresses. - (WTF::TCMallocStats::FastMallocZone::enumerate): Ditto. - -2008-08-15 Mark Rowe - - Rubber-stamped by Geoff Garen. - - Please include a _debug version of JavaScriptCore framework - - * Configurations/Base.xcconfig: Factor out the debug-only settings so that they can shared - between the Debug configuration and debug Production variant. - * JavaScriptCore.xcodeproj/project.pbxproj: Enable the debug variant. - -2008-08-15 Mark Rowe - - Fix the 64-bit build. - - Add extra cast to avoid warnings about loss of precision when casting from - JSValue* to an integer type. - - * kjs/JSImmediate.h: - (KJS::JSImmediate::intValue): - (KJS::JSImmediate::uintValue): - -2008-08-15 Alexey Proskuryakov - - Still fixing Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Added OpaqueJSString - to yet another place. - -2008-08-15 Alexey Proskuryakov - - Trying to fix non-Apple builds. - - * ForwardingHeaders/JavaScriptCore/OpaqueJSString.h: Added. - -2008-08-15 Gavin Barraclough - - Reviewed by Geoff Garen. - - Allow JSImmediate to hold 31 bit signed integer immediate values. The low two bits of a - JSValue* are a tag, with the tag value 00 indicating the JSValue* is a pointer to a - JSCell. Non-zero tag values used to indicate that the JSValue* is not a real pointer, - but instead holds an immediate value encoded within the pointer. This patch changes the - encoding so both the tag values 01 and 11 indicate the value is a signed integer, allowing - a 31 bit value to be stored. All other immediates are tagged with the value 10, and - distinguished by a secondary tag. - - Roughly +2% on SunSpider. - - * kjs/JSImmediate.h: Encoding of JSImmediates has changed - see comment at head of file for - descption of new layout. - -2008-08-15 Alexey Proskuryakov - - More build fixes. - - * API/OpaqueJSString.h: Add a namespace to friend declaration to appease MSVC. - * API/JSStringRefCF.h: (JSStringCreateWithCFString) Cast UniChar* to UChar* explicitly. - * JavaScriptCore.exp: Added OpaqueJSString::create(const KJS::UString&) to fix WebCore build. - -2008-08-15 Alexey Proskuryakov - - Build fix. - - * JavaScriptCore.xcodeproj/project.pbxproj: Marked OpaqueJSString as private - - * kjs/identifier.cpp: - (KJS::Identifier::checkSameIdentifierTable): - * kjs/identifier.h: - (KJS::Identifier::add): - Since checkSameIdentifierTable is exported for debug build's sake, gcc wants it to be - non-inline in release builds, too. - - * JavaScriptCore.exp: Don't export inline OpaqueJSString destructor. - -2008-08-15 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - JSStringRef is created context-free, but can get linked to one via an identifier table, - breaking an implicit API contract. - - Made JSStringRef point to OpaqueJSString, which is a new string object separate from UString. - - * API/APICast.h: Removed toRef/toJS conversions for JSStringRef, as this is no longer a - simple typecast. - - * kjs/identifier.cpp: - (KJS::Identifier::checkSameIdentifierTable): - * kjs/identifier.h: - (KJS::Identifier::add): - (KJS::UString::checkSameIdentifierTable): - Added assertions to verify that an identifier is not being added to a different JSGlobalData. - - * API/JSObjectRef.cpp: - (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray): Changed OpaqueJSPropertyNameArray to - hold JSStringRefs. This is necessary to avoid having to construct (and leak) a new instance - in JSPropertyNameArrayGetNameAtIndex(), now that making a JSStringRef is not just a typecast. - - * API/OpaqueJSString.cpp: Added. - (OpaqueJSString::create): - (OpaqueJSString::ustring): - (OpaqueJSString::identifier): - * API/OpaqueJSString.h: Added. - (OpaqueJSString::create): - (OpaqueJSString::characters): - (OpaqueJSString::length): - (OpaqueJSString::OpaqueJSString): - (OpaqueJSString::~OpaqueJSString): - - * API/JSBase.cpp: - (JSEvaluateScript): - (JSCheckScriptSyntax): - * API/JSCallbackObjectFunctions.h: - (KJS::::getOwnPropertySlot): - (KJS::::put): - (KJS::::deleteProperty): - (KJS::::staticValueGetter): - (KJS::::callbackGetter): - * API/JSStringRef.cpp: - (JSStringCreateWithCharacters): - (JSStringCreateWithUTF8CString): - (JSStringRetain): - (JSStringRelease): - (JSStringGetLength): - (JSStringGetCharactersPtr): - (JSStringGetMaximumUTF8CStringSize): - (JSStringGetUTF8CString): - (JSStringIsEqual): - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): - (JSStringCopyCFString): - * API/JSValueRef.cpp: - (JSValueMakeString): - (JSValueToStringCopy): - Updated to use OpaqueJSString. - - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - Added OpaqueJSString. - -2008-08-14 Kevin McCullough - - Reviewed by Tim. - - Notify of profile in console - - Profiles now have a unique ID so that they can be linked to the - console message that announces that a profile completed. - - * profiler/HeavyProfile.cpp: - (KJS::HeavyProfile::HeavyProfile): - * profiler/Profile.cpp: - (KJS::Profile::create): - (KJS::Profile::Profile): - * profiler/Profile.h: - (KJS::Profile::uid): - * profiler/ProfileGenerator.cpp: - (KJS::ProfileGenerator::create): - (KJS::ProfileGenerator::ProfileGenerator): - * profiler/ProfileGenerator.h: - * profiler/Profiler.cpp: - (KJS::Profiler::startProfiling): - * profiler/TreeProfile.cpp: - (KJS::TreeProfile::create): - (KJS::TreeProfile::TreeProfile): - * profiler/TreeProfile.h: - -2008-08-13 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Nixed a PIC branch from JSObject::getOwnPropertySlot, by forcing - fillGetterProperty, which references a global function pointer, - out-of-line. - - .2% SunSpider speedup, 4.3% access-nbody speedup, 8.7% speedup on a - custom property access benchmark for objects with one property. - - * kjs/JSObject.cpp: - (KJS::JSObject::fillGetterPropertySlot): - -2008-08-13 Alp Toker - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=20349 - WTF::initializeThreading() fails if threading is already initialized - - Fix threading initialization logic to support cases where - g_thread_init() has already been called elsewhere. - - Resolves database-related crashers reported in several applications. - - * wtf/ThreadingGtk.cpp: - (WTF::initializeThreading): - -2008-08-13 Brad Hughes - - Reviewed by Simon. - - Fix compiling of QtWebKit in release mode with the Intel C++ Compiler for Linux - - The latest upgrade of the intel compiler allows us to compile all of - Qt with optimizations enabled (yay!). - - * JavaScriptCore.pro: - -2008-08-12 Oliver Hunt - - Reviewed by Geoff Garen. - - Add peephole optimisation to 'op_not... jfalse...' (eg. if(!...) ) - - This is a very slight win in sunspider, and a fairly substantial win - in hot code that does if(!...), etc. - - * VM/CodeGenerator.cpp: - (KJS::CodeGenerator::retrieveLastUnaryOp): - (KJS::CodeGenerator::rewindBinaryOp): - (KJS::CodeGenerator::rewindUnaryOp): - (KJS::CodeGenerator::emitJumpIfFalse): - * VM/CodeGenerator.h: - -2008-08-12 Dan Bernstein - - - JavaScriptCore part of - Make fast*alloc() abort() on failure and add "try" variants that - return NULL on failure. - - Reviewed by Darin Adler. - - * JavaScriptCore.exp: Exported tryFastCalloc(). - * VM/RegisterFile.h: - (KJS::RegisterFile::RegisterFile): Removed an ASSERT(). - * kjs/JSArray.cpp: - (KJS::JSArray::putSlowCase): Changed to use tryFastRealloc(). - (KJS::JSArray::increaseVectorLength): Ditto. - * kjs/ustring.cpp: - (KJS::allocChars): Changed to use tryFastMalloc(). - (KJS::reallocChars): Changed to use tryFastRealloc(). - * wtf/FastMalloc.cpp: - (WTF::fastZeroedMalloc): Removed null checking of fastMalloc()'s result - and removed extra call to InvokeNewHook(). - (WTF::tryFastZeroedMalloc): Added. Uses tryFastMalloc(). - (WTF::tryFastMalloc): Renamed fastMalloc() to this. - (WTF::fastMalloc): Added. This version abort()s if allocation fails. - (WTF::tryFastCalloc): Renamed fastCalloc() to this. - (WTF::fastCalloc): Added. This version abort()s if allocation fails. - (WTF::tryFastRealloc): Renamed fastRealloc() to this. - (WTF::fastRealloc): Added. This version abort()s if allocation fails. - (WTF::do_malloc): Made this a function template. When the abortOnFailure - template parameter is set, the function abort()s on failure to allocate. - Otherwise, it sets errno to ENOMEM and returns zero. - (WTF::TCMallocStats::fastMalloc): Defined to abort() on failure. - (WTF::TCMallocStats::tryFastMalloc): Added. Does not abort() on - failure. - (WTF::TCMallocStats::fastCalloc): Defined to abort() on failure. - (WTF::TCMallocStats::tryFastCalloc): Added. Does not abort() on - failure. - (WTF::TCMallocStats::fastRealloc): Defined to abort() on failure. - (WTF::TCMallocStats::tryFastRealloc): Added. Does not abort() on - failure. - * wtf/FastMalloc.h: Declared the "try" variants. - -2008-08-11 Adam Roben - - Move WTF::notFound into its own header so that it can be used - independently of Vector - - Rubberstamped by Darin Adler. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - Added NotFound.h to the project. - * wtf/NotFound.h: Added. Moved the notFound constant here... - * wtf/Vector.h: ...from here. - -2008-08-11 Alexey Proskuryakov - - Reviewed by Mark Rowe. - - REGRESSION: PhotoBooth hangs after launching under TOT Webkit - - * API/JSContextRef.cpp: (JSGlobalContextRelease): Corrected a comment. - - * kjs/collector.cpp: (KJS::Heap::~Heap): Ensure that JSGlobalData is not deleted while - sweeping the heap. - -== Rolled over to ChangeLog-2008-08-10 == diff --git a/ChangeLog-2010-05-24 b/ChangeLog-2010-05-24 deleted file mode 100644 index e6ec0f1..0000000 --- a/ChangeLog-2010-05-24 +++ /dev/null @@ -1,28211 +0,0 @@ -2010-05-24 Gavin Barraclough - - Rubber Stamped by Sam Weinig. - - Accidentally committed double write of codeblock in Interpreter. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-05-24 Gavin Barraclough - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=39583 - Move creation of 'this' object from caller to callee in construction. - - Presently the caller of a constructor is responsible for providing a this - object. Instead, move the object creation into a new op_create_this opcode, - planted in the head of the contructor bytecode for a function. Since the - prototype for the object is provided by performing a get_by_id on the callee, - also add a new get_callee opcode (this is used to get the callee JSFunction - into a register so that a normal get_by_id can be used). - - Currently the caller is also responsible for detecting when op_construct is - performed on a JSFunction representing a host function, in which case an - exception is thrown – and this check currently takes place when constructing - the this object. Instead, mirroring the recent changes for non-host functions, - add a parallel code-path for native constructors to follow, with a thunk for - invoking native constructors provided by JITStubs, and a constructor-specific - NativeFunction on NativeExecutable. Provide an implementation of a host - constructor which will throw an exception. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): - * bytecode/CodeBlock.h: - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitConstruct): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitGetByIdExceptionInfo): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITCall32_64.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompileCTINativeCall): - (JSC::JIT::emit_op_neq_null): - (JSC::JIT::emit_op_convert_this): - (JSC::JIT::emit_op_get_callee): - (JSC::JIT::emit_op_create_this): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompileCTINativeCall): - (JSC::JIT::emit_op_get_callee): - (JSC::JIT::emit_op_create_this): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - (JSC::JITThunks::hostFunctionStub): - * jit/JITStubs.h: - (JSC::JITThunks::ctiNativeConstruct): - (JSC::): - * runtime/ExceptionHelpers.cpp: - (JSC::createNotAnObjectError): - * runtime/Executable.h: - (JSC::NativeExecutable::create): - (JSC::NativeExecutable::NativeExecutable): - * runtime/JSFunction.cpp: - (JSC::callHostFunctionAsConstructor): - * runtime/JSFunction.h: - -2010-05-23 Sam Weinig - - Fix windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-05-23 Sam Weinig - - Reviewed by Oliver Hunt. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=39575 - Make JS DOMObject inherit from JSObjectWithGlobalObject instead of JSObject - - Expose the global object stored in JSObjectWithGlobalObject. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSObjectWithGlobalObject.cpp: - (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject): - (JSC::JSObjectWithGlobalObject::globalObject): - * runtime/JSObjectWithGlobalObject.h: - -2010-05-21 Oliver Hunt - - "asm volatile" isn't valid outside of functions. - - Reviewed by Gavin Barraclough. - - * jit/JITStubs.cpp: - -2010-05-21 Gavin Barraclough - - Unreviewed build fix. - - Interpreter fix following r59974. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::get): - * runtime/JSPropertyNameIterator.h: - -2010-05-21 Gavin Barraclough - - Rubber stamped by Oliver Hunt. - - Interpreter fix following r59939. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-05-21 David Levin - - Unreviewed build fix. - - * wtf/SizeLimits.cpp: Removed a check while I figure out how to write it properly. - -2010-05-21 David Levin - - Reviewed by Darin Adler. - - Enforce size constraints on various data structures in JavaScriptCore/wtf. - https://bugs.webkit.org/show_bug.cgi?id=39327 - - I only modified the default build for OSX and Chromium's build file to include WTFCompileAsserts.cpp - as those should be sufficient to catch regressions on the size of the data structures. - - * JavaScriptCore.gypi: Added the WTFCompileAsserts.cpp file. - * JavaScriptCore.xcodeproj/project.pbxproj: Added the WTFCompileAsserts.cpp file. - * runtime/UString.cpp: Added a compile assert for UString size. - * wtf/SizeLimits.cpp: Added compile asserts for data structures that didn't have cpp files. - * wtf/text/StringImpl.cpp: Added a compile assert for StringImpl size. - -2010-05-21 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Bug 39509 - Exceptions raised when JSString::value() is called not always properly thrown. - Missing some CHECK_FOR_EXCEPTION()s, cleanup NativeError construction (adding a property - via the prototype was inefficient, and whilst trivially true that the property is is not - a rope - and thus couldn't except - it would be hard to prove this). - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::name): - (JSC::InternalFunction::displayName): - * runtime/JSFunction.cpp: - (JSC::JSFunction::name): - (JSC::JSFunction::displayName): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - * runtime/JSPropertyNameIterator.cpp: - * runtime/JSPropertyNameIterator.h: - * runtime/JSString.h: - (JSC::RopeBuilder::tryGetValue): - (JSC::JSString::getIndex): - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/NativeErrorConstructor.h: - * runtime/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * runtime/NativeErrorPrototype.h: - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - -2010-05-21 Gavin Barraclough - - Reviewed by NOBODY (build fix). - - Fix interpreter build. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-05-21 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Split out JITCall32_64.cpp, and tightened up some #ifdefs in the hopes - of improving compile times. - https://bugs.webkit.org/show_bug.cgi?id=39507 - - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/JIT.cpp: - * jit/JITArithmetic.cpp: - * jit/JITArithmetic32_64.cpp: - * jit/JITCall.cpp: - * jit/JITCall32_64.cpp: Copied from jit/JITCall.cpp. - * jit/JITOpcodes.cpp: - * jit/JITOpcodes32_64.cpp: - * jit/JITPropertyAccess.cpp: - * jit/JITPropertyAccess32_64.cpp: - * jit/JITStubs.cpp: - -2010-05-21 Csaba Osztrogonác - - Unreviewed buildfix for Qt after r59941. - - * JavaScriptCore.pro: missing runtime/JSObjectWithGlobalObject.cpp added to SOURCES. - -2010-05-21 Oliver Hunt - - Windows build fix #3 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-05-21 Oliver Hunt - - Windows build fix #2 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-05-21 Oliver Hunt - - Windows build fix #1 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-05-21 Oliver Hunt - - Reviewed by Geoffrey Garen. - - All callable objects should have a global object reference - https://bugs.webkit.org/show_bug.cgi?id=39495 - - All objects that may ever return a value other CallTypeNone - or ConstructTypeNone now get a global object in their constructor - and store that in their first anonymous slot. We add a new type - JSObjectWithGlobalObject to allow us to share this logic as much - as possible, however some objects have specific inheritance - requirements so we can't just use it universally. - - To enforce this requirement JSValue::getCallData and getConstructData - make use of a new "isValidCallee" function to assert that any object - that returns a value other than CallType/ConstructTypeNone has a - global object in anonymous slot 0. - - In order to ensure that static function slots are converted into - function objects with the correct global object, all prototype objects - and other classes with static function slots also gain a global object - reference. Happily this fixes the long standing issue where host - function objects get a prototype from the lexical global object of the - first function that calls them, instead of the global object that they - are defined on. - - * API/JSCallbackConstructor.cpp: - (JSC::JSCallbackConstructor::JSCallbackConstructor): - * API/JSCallbackConstructor.h: - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::JSCallbackFunction): - * API/JSCallbackFunction.h: - * API/JSCallbackObject.cpp: - (JSC::): - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::JSCallbackObject): - (JSC::::staticFunctionGetter): - * API/JSClassRef.cpp: - (OpaqueJSClass::prototype): - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeConstructor): - (JSObjectGetPrivate): - (JSObjectSetPrivate): - (JSObjectGetPrivateProperty): - (JSObjectSetPrivateProperty): - (JSObjectDeletePrivateProperty): - * API/JSValueRef.cpp: - (JSValueIsObjectOfClass): - * API/JSWeakObjectMapRefPrivate.cpp: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jsc.cpp: - (GlobalObject::GlobalObject): - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - * runtime/ArrayConstructor.h: - * runtime/ArrayPrototype.cpp: - (JSC::ArrayPrototype::ArrayPrototype): - * runtime/ArrayPrototype.h: - (JSC::ArrayPrototype::createStructure): - * runtime/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - * runtime/BooleanConstructor.h: - * runtime/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * runtime/BooleanPrototype.h: - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * runtime/DateConstructor.h: - * runtime/DatePrototype.cpp: - (JSC::DatePrototype::DatePrototype): - * runtime/DatePrototype.h: - * runtime/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * runtime/ErrorConstructor.h: - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/ErrorPrototype.h: - * runtime/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * runtime/FunctionConstructor.h: - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - (JSC::FunctionPrototype::addFunctionProperties): - * runtime/FunctionPrototype.h: - * runtime/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::GlobalEvalFunction): - * runtime/GlobalEvalFunction.h: - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * runtime/InternalFunction.h: - * runtime/JSCell.h: - (JSC::JSValue::getCallData): - (JSC::JSValue::getConstructData): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - * runtime/JSFunction.h: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObject): - * runtime/JSONObject.cpp: - (JSC::JSONObject::JSONObject): - * runtime/JSONObject.h: - * runtime/JSObject.h: - * runtime/JSObjectWithGlobalObject.cpp: Added. - (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject): - * runtime/JSObjectWithGlobalObject.h: Added. - (JSC::JSObjectWithGlobalObject::createStructure): - (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject): - * runtime/JSValue.cpp: - (JSC::JSValue::isValidCallee): - * runtime/JSValue.h: - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - * runtime/MathObject.h: - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/NativeErrorConstructor.h: - * runtime/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * runtime/NativeErrorPrototype.h: - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - * runtime/NumberConstructor.h: - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * runtime/NumberPrototype.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - * runtime/ObjectConstructor.h: - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): - * runtime/ObjectPrototype.h: - * runtime/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * runtime/PrototypeFunction.h: - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - (JSC::constructRegExp): - * runtime/RegExpConstructor.h: - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::RegExpObject): - * runtime/RegExpObject.h: - * runtime/RegExpPrototype.cpp: - (JSC::RegExpPrototype::RegExpPrototype): - * runtime/RegExpPrototype.h: - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * runtime/StringConstructor.h: - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * runtime/StringPrototype.h: - -2010-05-21 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Removed the unused entry in the CallFrame - https://bugs.webkit.org/show_bug.cgi?id=39470 - - Removed the unused entry in the CallFrame, and reordered CallFrame - writes on the hot path to be in forwards order. - - SunSpider says 0.3% faster. - - * interpreter/RegisterFile.h: - (JSC::RegisterFile::): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - -2010-05-21 Jedrzej Nowacki - - Reviewed by Kenneth Rohde Christiansen. - - Split the QScriptValue autotest into smaller chunks. - - File tst_qscriptvalue_generated.cpp was huge and it was difficult to compile - it with MSVS2008, because of the code optimization. - - Tests were splited into a few files for better use of distributed - compilation. - Repeated calls to insert() and operator<<() where replaced by loops, - that should reduce time of code optimizing. - - New files were generated by the same application, test logic wasn't changed. - - [Qt] The QScriptValue autotest should be refactored. - https://bugs.webkit.org/show_bug.cgi?id=38987 - - * qt/tests/qscriptvalue/qscriptvalue.pro: - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: Removed. - * qt/tests/qscriptvalue/tst_qscriptvalue_generated_init.cpp: Added. - (tst_QScriptValue::initScriptValues): - * qt/tests/qscriptvalue/tst_qscriptvalue_generated_istype.cpp: Added. - (tst_QScriptValue::isValid_initData): - (tst_QScriptValue::isValid_makeData): - (tst_QScriptValue::isValid_test): - (tst_QScriptValue::isBool_initData): - (tst_QScriptValue::isBool_makeData): - (tst_QScriptValue::isBool_test): - (tst_QScriptValue::isBoolean_initData): - (tst_QScriptValue::isBoolean_makeData): - (tst_QScriptValue::isBoolean_test): - (tst_QScriptValue::isNumber_initData): - (tst_QScriptValue::isNumber_makeData): - (tst_QScriptValue::isNumber_test): - (tst_QScriptValue::isFunction_initData): - (tst_QScriptValue::isFunction_makeData): - (tst_QScriptValue::isFunction_test): - (tst_QScriptValue::isNull_initData): - (tst_QScriptValue::isNull_makeData): - (tst_QScriptValue::isNull_test): - (tst_QScriptValue::isString_initData): - (tst_QScriptValue::isString_makeData): - (tst_QScriptValue::isString_test): - (tst_QScriptValue::isUndefined_initData): - (tst_QScriptValue::isUndefined_makeData): - (tst_QScriptValue::isUndefined_test): - (tst_QScriptValue::isObject_initData): - (tst_QScriptValue::isObject_makeData): - (tst_QScriptValue::isObject_test): - * qt/tests/qscriptvalue/tst_qscriptvalue_generated_totype.cpp: Added. - (tst_QScriptValue::toString_initData): - (tst_QScriptValue::toString_makeData): - (tst_QScriptValue::toString_test): - (tst_QScriptValue::toNumber_initData): - (tst_QScriptValue::toNumber_makeData): - (tst_QScriptValue::toNumber_test): - (tst_QScriptValue::toBool_initData): - (tst_QScriptValue::toBool_makeData): - (tst_QScriptValue::toBool_test): - (tst_QScriptValue::toBoolean_initData): - (tst_QScriptValue::toBoolean_makeData): - (tst_QScriptValue::toBoolean_test): - (tst_QScriptValue::toInteger_initData): - (tst_QScriptValue::toInteger_makeData): - (tst_QScriptValue::toInteger_test): - (tst_QScriptValue::toInt32_initData): - (tst_QScriptValue::toInt32_makeData): - (tst_QScriptValue::toInt32_test): - (tst_QScriptValue::toUInt32_initData): - (tst_QScriptValue::toUInt32_makeData): - (tst_QScriptValue::toUInt32_test): - (tst_QScriptValue::toUInt16_initData): - (tst_QScriptValue::toUInt16_makeData): - (tst_QScriptValue::toUInt16_test): - -2010-05-21 Kwang Yul Seo - - Reviewed by Eric Seidel. - - Add COMPILER(MSVC) guard for strnstr - https://bugs.webkit.org/show_bug.cgi?id=39397 - - BREWMP uses MSVC for simulator build, but it is not OS(WINDOWS). - Add COMPILER(MSVC) guard for strnstr. - - * wtf/StringExtras.h: - -2010-05-21 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Add !PLATFORM(BREWMP) guard for isMainThread - https://bugs.webkit.org/show_bug.cgi?id=39396 - - BREWMP sets ENABLE(SINGLE_THREADED), so it uses isMainThread from ThreadingNone.cpp. - Exclude isMainThread in MainThread.cpp. - - * wtf/MainThread.cpp: - -2010-05-20 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Use skia as BREW MP's graphics backend. - https://bugs.webkit.org/show_bug.cgi?id=39407 - - Define WTF_PLATFORM_SKIA=1 for BREW MP. - - * wtf/Platform.h: - -2010-05-20 Geoffrey Garen - - Reviewed by Beth Dakin. - - Fixed naming mixup: it's op_call_put_result, not ret_result. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-05-20 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Whittling away at CodeBlock use: Removed a little wonkiness in closure lookup - https://bugs.webkit.org/show_bug.cgi?id=39444 - - Calculate all lookup depths at compile time. I'm not sure why we couldn't - do this before, but whatever the reason, it seems to be gone now. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::findScopedProperty): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobalDynamic): - (JSC::Interpreter::privateExecute): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_resolve_skip): - (JSC::JIT::emit_op_resolve_global_dynamic): - (JSC::JIT::emitSlow_op_resolve_global_dynamic): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_resolve_skip): - -2010-05-20 Darin Adler - - Reviewed by Eric Seidel. - - Fix warnings seen on the buildbots today - https://bugs.webkit.org/show_bug.cgi?id=39368 - - * profiler/ProfileNode.cpp: - (JSC::getCount): Removed unneeded initialization of global variable. - These are all initialized to zero anyway, so no need to try to initialize - it and get a warning. - - * wtf/CurrentTime.cpp: - (WTF::currentTime): Removed unused global variable. - -2010-05-20 Geoffrey Garen - - Reviewed by Darin Adler. - - Removed some reliance on callFame[CodeBlock] by storing CodeBlock in a - local variable in the Interpreter. - https://bugs.webkit.org/show_bug.cgi?id=39447 - - Small speedup on SunSpider in Interpreter mode. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jsc.cpp: - * wtf/Platform.h: - -2010-05-19 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Bug 39408 - Unify JIT/interpreter return behaviour. - - Presently the JIT and the interpreter have differing implementations in how - they handle storing the result of a function call back to the register file. - In both cases the op_call ( / _eval / _varargs / op_construct) opcode has an - operand indicating the VM register in which the result should be stored. - The JIT plants code after the call to store the result, so the value will be - stored as soon as the callee has returned. In the interpreter the call - passes the return value register id into the callee via the callee callframe, - and the callee is responsible for writing the result back into its callers - register file after it has restored the parents callframe pointer, but before - returning. - - Instead, move the task of writing the call result to the register file into a - new opcode (op_call_put_result), and after returning the callee should leave - the return value in a canonical location. In the case of the interpreter, - this canonical location is a local variable in privateExecute - (functionReturnValue), in the case of the JIT this is the normal return value - registers (regT0, or regT1:regT0 in JSVALUE32_64). op_call_put_result stores - the result from the canonical location to the registerfile. - - In addition to unifying JIT & interpreter behaviour this change allows us to - remove a slot from the callframe, omit the write of the result where the - return value from the call is not used, and provides a 2% speedup on sunspider - in the interpreter. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitCall): - (JSC::BytecodeGenerator::emitCallVarargs): - (JSC::BytecodeGenerator::emitConstruct): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::finalDestinationOrIgnored): - * bytecompiler/NodesCodegen.cpp: - (JSC::NewExprNode::emitBytecode): - (JSC::FunctionCallValueNode::emitBytecode): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::FunctionCallBracketNode::emitBytecode): - (JSC::FunctionCallDotNode::emitBytecode): - (JSC::CallFunctionCallDotNode::emitBytecode): - (JSC::ApplyFunctionCallDotNode::emitBytecode): - * interpreter/CallFrame.h: - (JSC::ExecState::init): - (JSC::ExecState::noCaller): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): - (JSC::Interpreter::throwException): - (JSC::Interpreter::privateExecute): - * interpreter/RegisterFile.h: - (JSC::RegisterFile::): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::emit_op_call_put_result): - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCallVarargsSlowCase): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - (JSC::JIT::compileOpCallVarargsSetupArgs): - -2010-05-20 Steve Block - - Reviewed by Jeremy Orlow. - - Provide bindings for DeviceOrientation - https://bugs.webkit.org/show_bug.cgi?id=39210 - - Adds ENABLE_DEVICE_ORIENTATION to XCode project file, always disabled. - - * Configurations/FeatureDefines.xcconfig: - -2010-05-19 Gavin Barraclough - - Reviewed by Geoff Garen. - - Errk! rename op_constructor_ret as requested in review of Bug 39399. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitReturn): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::emit_op_ret_object_or_this): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_ret_object_or_this): - -2010-05-19 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 39399 - Move responsibility for verifying constructors return objects from the caller to the callee. - - This is a necessary step to move object creation from caller to callee. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitReturn): - (JSC::BytecodeGenerator::emitConstruct): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::isConstructor): - * bytecompiler/NodesCodegen.cpp: - (JSC::FunctionBodyNode::emitBytecode): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::emit_op_constructor_ret): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_constructor_ret): - -2010-05-19 Gavin Barraclough - - Reviewed by NOBODY (build fix). - - Fix windows build II. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-05-19 Gavin Barraclough - - Reviewed by NOBODY (build fix). - - Fix windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-05-19 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Bug 39393 - JSFunction need not be a subclass of InternalFunction. - - re-landing r59800. - - * JavaScriptCore.exp: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::retrieveCaller): - (JSC::Interpreter::findFunctionCallFrame): - * interpreter/Interpreter.h: - * profiler/Profiler.cpp: - (JSC::Profiler::createCallIdentifier): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSFunction.cpp: - (JSC::): - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::name): - (JSC::JSFunction::displayName): - (JSC::JSFunction::calculatedDisplayName): - * runtime/JSFunction.h: - * runtime/JSObject.cpp: - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectFunctionWithoutTransition): - * runtime/JSObject.h: - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - -2010-05-19 Gavin Barraclough - - Reviewed by NOBODY (build fix). - - Reverting r59800, this b0rked stuff. - - * JavaScriptCore.exp: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::retrieveCaller): - (JSC::Interpreter::findFunctionCallFrame): - * interpreter/Interpreter.h: - * profiler/Profiler.cpp: - (JSC::Profiler::createCallIdentifier): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSFunction.cpp: - (JSC::): - (JSC::JSFunction::JSFunction): - * runtime/JSFunction.h: - * runtime/JSObject.cpp: - * runtime/JSObject.h: - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - -2010-05-19 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Bug 39393 - JSFunction need not be a subclass of InternalFunction. - - This may prevent us from introducing a more useful parent class to - JSFunction, e.g. a JSObject that holds an executable, which could - also reference an eval or program executable. - - * JavaScriptCore.exp: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::retrieveCaller): - (JSC::Interpreter::findFunctionCallFrame): - * interpreter/Interpreter.h: - * profiler/Profiler.cpp: - (JSC::Profiler::createCallIdentifier): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSFunction.cpp: - (JSC::): - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::name): - (JSC::JSFunction::displayName): - (JSC::JSFunction::calculatedDisplayName): - * runtime/JSFunction.h: - * runtime/JSObject.cpp: - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectFunctionWithoutTransition): - * runtime/JSObject.h: - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - -2010-05-19 Oliver Hunt - - Reviewed by Geoffrey Garen. - - emitJumpIfNotJSCell should special case constant immediate values - https://bugs.webkit.org/show_bug.cgi?id=39392 - - - Make emitJumpSlowCaseIfNotJSCell special case constant immediate - values, in addition to the immediate JSCell optimisation. - - Also add assertions to make sure no one else produces code that - attempts to load constants from the register file. - - * jit/JITInlineMethods.h: - (JSC::JIT::emitJumpSlowCaseIfNotJSCell): - * jit/JSInterfaceJIT.h: - (JSC::JSInterfaceJIT::emitJumpIfNotJSCell): - (JSC::JSInterfaceJIT::emitLoadInt32): - (JSC::JSInterfaceJIT::tagFor): - (JSC::JSInterfaceJIT::payloadFor): - (JSC::JSInterfaceJIT::emitLoadDouble): - (JSC::JSInterfaceJIT::addressFor): - * jit/ThunkGenerators.cpp: - -2010-05-19 Geoffrey Garen - - Reviewed by Sam Weinig. - - Slight refactoring to CodeBlock bytecode access - https://bugs.webkit.org/show_bug.cgi?id=39384 - - * bytecode/CodeBlock.h: - (JSC::CodeBlock::bytecodeOffset): - * interpreter/CallFrame.h: - (JSC::ExecState::returnPC): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::retrieveLastCaller): Moved bytecode access into a - CodeBlock helper function. Changed CallFrame to accurately represent - how the returnPC is stored in JIT vs Interpreter. - -2010-05-19 Geoffrey Garen - - Reviewed by Sam Weinig. - - Don't build the Interpreter into JIT builds. - https://bugs.webkit.org/show_bug.cgi?id=39373 - - SunSpider says no change. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: - * wtf/Platform.h: - -2010-05-19 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Standardized naming: "bytecode offset" wins; "bytecode index" loses. - - Also renamed getBytecodeOffset to bytecodeOffset, to match the WebKit - naming style. - - * bytecode/CodeBlock.h: - (JSC::CallReturnOffsetToBytecodeOffset::CallReturnOffsetToBytecodeOffset): - (JSC::getCallReturnOffset): - (JSC::CodeBlock::bytecodeOffset): - (JSC::CodeBlock::callReturnIndexVector): - * interpreter/Interpreter.cpp: - (JSC::bytecodeOffsetForPC): - * jit/JIT.cpp: - (JSC::JIT::JIT): - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileLinkPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::CallRecord::CallRecord): - (JSC::JumpTable::JumpTable): - (JSC::SwitchRecord::SwitchRecord): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargsSlowCase): - (JSC::JIT::compileOpCall): - * jit/JITInlineMethods.h: - (JSC::JIT::emitNakedCall): - (JSC::JIT::addSlowCase): - (JSC::JIT::addJump): - (JSC::JIT::emitJumpSlowToHot): - (JSC::JIT::isLabeled): - (JSC::JIT::map): - (JSC::JIT::unmap): - (JSC::JIT::isMapped): - (JSC::JIT::getMappedPayload): - (JSC::JIT::getMappedTag): - (JSC::JIT::emitGetVirtualRegister): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_switch_imm): - (JSC::JIT::emit_op_switch_char): - (JSC::JIT::emit_op_switch_string): - (JSC::JIT::emit_op_new_error): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_mov): - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emit_op_catch): - (JSC::JIT::emit_op_switch_imm): - (JSC::JIT::emit_op_switch_char): - (JSC::JIT::emit_op_switch_string): - (JSC::JIT::emit_op_new_error): - (JSC::JIT::emit_op_convert_this): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::emitSlow_op_method_check): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::emitSlow_op_method_check): - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::emit_op_get_by_pname): - * jit/JITStubCall.h: - (JSC::JITStubCall::call): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - -2010-05-19 Peter Varga - - Reviewed by Darin Adler. - - The backtrackParenthesesOnceEnd function should store the start position - of the subpattern's non-greedy match at the place of the subpattern's - start index in the output array instead of the place of the - subpattern's end index. - Add layout test for checking of non-greedy matching of subpattern in - regular expressions. - https://bugs.webkit.org/show_bug.cgi?id=39289 - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd): - -2010-05-18 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 39343 - Dynamically generate a native call thunk per NativeFunction - - https://bugs.webkit.org/show_bug.cgi?id=39252 regressed performance on i386, - by adding an extra indirection to making a native call. By introducing per- - NativeFunction thunks we can hard code the function pointer into the thunk - so that it need not be loaded from the callee. - - * jit/JIT.h: - (JSC::JIT::compileCTINativeCall): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTINativeCall): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTINativeCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emitSlow_op_get_by_val): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emitSlow_op_get_by_val): - * jit/JITStubs.cpp: - (JSC::JITThunks::ctiStub): - (JSC::JITThunks::hostFunctionStub): - * jit/JITStubs.h: - * jit/SpecializedThunkJIT.h: - (JSC::SpecializedThunkJIT::finalize): - * jit/ThunkGenerators.cpp: - (JSC::charCodeAtThunkGenerator): - (JSC::charAtThunkGenerator): - (JSC::fromCharCodeThunkGenerator): - (JSC::sqrtThunkGenerator): - (JSC::powThunkGenerator): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::getHostFunction): - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::getCTIStub): - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * wtf/Platform.h: - -2010-05-18 Geoffrey Garen - - Reviewed by Darin Adler. - - Simplified handling of 'arguments' -- 1.2% SunSpider speedup - https://bugs.webkit.org/show_bug.cgi?id=39200 - - Removed the reserved OptionalCalleeArguments slot from the CallFrame. - Now, slots for 'arguments' are allocated and initialized only by - functions that might need them. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): Updated for new bytecode operands. - - (JSC::CodeBlock::CodeBlock): - * bytecode/CodeBlock.h: - (JSC::unmodifiedArgumentsRegister): Added a helper function for mapping - from the arguments register to its unmodified counterpart. - - (JSC::CodeBlock::setArgumentsRegister): - (JSC::CodeBlock::argumentsRegister): - (JSC::CodeBlock::usesArguments): Changed from a "usesArguments" bool to - an optional int index representing the arguments register. - - * bytecode/Opcode.h: Updated for new bytecode operands. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::addVar): Factored out a helper function for - allocating an anonymous var. - - (JSC::BytecodeGenerator::BytecodeGenerator): Merged / simplified some - arguments vs activation logic, and added code to allocate the arguments - registers when needed. - - (JSC::BytecodeGenerator::createArgumentsIfNecessary): Updated for new bytecode operands. - - (JSC::BytecodeGenerator::emitCallEval): No need to create the arguments - object before calling eval; the activation object will lazily create the - arguments object if eval resolves it. - - (JSC::BytecodeGenerator::emitReturn): Updated for new bytecode operands. - - (JSC::BytecodeGenerator::emitPushScope): - (JSC::BytecodeGenerator::emitPushNewScope): Ditto emitCallEval. - - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::addVar): Factored out a helper function for - allocating an anonymous var. - - (JSC::BytecodeGenerator::registerFor): No more need for special handling - of the arguments registers; they're allocated just like normal registers - now. - - * interpreter/CallFrame.h: - (JSC::ExecState::callerFrame): - (JSC::ExecState::init): - * interpreter/CallFrameClosure.h: - (JSC::CallFrameClosure::resetCallFrame): Nixed optionalCalleeArguments. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): Opcodes accessing 'arguments' now - take operands specifying registers, just like all other opcodes. - JSActivation::copyRegisters is no longer responsible for tearing off the - arguments object; instead, the VM is responsible for both. - - Also, a behavior change: Each access to f.arguments creates a new object, - unless f itself uses 'arguments'. This matches Chrome, and is necessary - for the optimization. f.arguments is a nonstandard, deprecated feature, - so high fidelity to a given implementation is not necessarily a goal. - Also, as illustrated by the new test case, the identity of f.arguments - has been broken since 2008, except in the case where f itself accesses - f.arguments -- but nobody seemed to notice. So, hopefully this change won't - break the web. - - * interpreter/Register.h: Nixed the special arguments accessor. It's no - longer needed. - - * interpreter/RegisterFile.h: - (JSC::RegisterFile::): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCall): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_tear_off_activation): - (JSC::JIT::emit_op_tear_off_arguments): - (JSC::JIT::emit_op_create_arguments): - (JSC::JIT::emit_op_init_arguments): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_tear_off_activation): - (JSC::JIT::emit_op_tear_off_arguments): - (JSC::JIT::emit_op_create_arguments): - (JSC::JIT::emit_op_init_arguments): The actual optimization: Removed - OptionalCalleeArguments from the callframe slot. Now, it doesn't need - to be initialized for most calls. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): Updated stubs to support arbitrary 'arguments' registers, - instead of hard-coding something in the call frame. - - * runtime/Arguments.h: - (JSC::JSActivation::copyRegisters): Removed some obfuscatory abstraction. - - * runtime/Executable.h: - (JSC::FunctionExecutable::generatedByteCode): Added a helper for accessing - the 'arguments' register. In a future patch, that kind of data should - probably move out of CodeBlock and into Executable. - - * runtime/JSActivation.cpp: - (JSC::JSActivation::getOwnPropertySlot): - (JSC::JSActivation::argumentsGetter): - * runtime/JSActivation.h: Simplified / fixed access to 'arguments' via - the activation object. It now implements the same behavior implemented - by optimized variable access in the VM. This simplifies some other - things, too -- like eval code generation. - -2010-05-18 Sam Weinig - - Try to fix the windows build. - - * API/JSStringRefBSTR.cpp: - -2010-05-18 Anders Carlsson - - Reviewed by Sam Weinig. - - Add an inlineCapacity template parameter to ListHashSet and use it to shrink the positioned object list hash set. - https://bugs.webkit.org/show_bug.cgi?id=39304 - - - Add an inlineCapacity template parameter to ListHashSet. - - * wtf/ListHashSet.h: - (WTF::::ListHashSet): - (WTF::::operator): - (WTF::::swap): - (WTF::::~ListHashSet): - (WTF::::size): - (WTF::::capacity): - (WTF::::isEmpty): - (WTF::::begin): - (WTF::::end): - (WTF::::find): - (WTF::::contains): - (WTF::::add): - (WTF::::insertBefore): - (WTF::::remove): - (WTF::::clear): - (WTF::::unlinkAndDelete): - (WTF::::appendNode): - (WTF::::insertNodeBefore): - (WTF::::deleteAllNodes): - (WTF::::makeIterator): - (WTF::::makeConstIterator): - (WTF::deleteAllValues): - -2010-05-18 Gabor Loki - - Reviewed by Darin Adler. - - Fix the interpreter after r59637 - https://bugs.webkit.org/show_bug.cgi?id=39287 - - * runtime/Executable.h: - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::getCallData): - * runtime/JSGlobalData.cpp: - * runtime/JSGlobalData.h: - -2010-05-17 Gavin Barraclough - - Reviewed by Geoff Garen. - - Oops, meant ebx not eax there. Fix Qt (and probably Win too). - - * jit/JITOpcodes32_64.cpp: - -2010-05-17 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 39252 - Move host/native JSFunction's NativeFunction onto NativeExecutable. - - Currently host functions reuse JSFunction's ScopeChain as storage for their - NativeFunction (the C function pointer to the host function implementation). - Instead, move this onto NativeExecutable. This will allow host functions to - have a scopechain (which will be implemented as a separate patch). - - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCall): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::stringGetByValStubGenerator): - (JSC::JIT::emitSlow_op_get_by_val): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::stringGetByValStubGenerator): - (JSC::JIT::emitSlow_op_get_by_val): - * jit/JITStubs.cpp: - (JSC::JITThunks::specializedThunk): - * jit/JITStubs.h: - (JSC::JITThunks::ctiNativeCall): - * jit/SpecializedThunkJIT.h: - (JSC::SpecializedThunkJIT::finalize): - * jit/ThunkGenerators.cpp: - (JSC::charCodeAtThunkGenerator): - (JSC::charAtThunkGenerator): - (JSC::fromCharCodeThunkGenerator): - (JSC::sqrtThunkGenerator): - (JSC::powThunkGenerator): - * jit/ThunkGenerators.h: - * runtime/Executable.h: - (JSC::NativeExecutable::create): - (JSC::NativeExecutable::function): - (JSC::NativeExecutable::NativeExecutable): - (JSC::JSFunction::nativeFunction): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::~JSFunction): - (JSC::JSFunction::markChildren): - (JSC::JSFunction::getCallData): - (JSC::JSFunction::call): - (JSC::JSFunction::getOwnPropertySlot): - (JSC::JSFunction::getConstructData): - (JSC::JSFunction::construct): - * runtime/JSFunction.h: - (JSC::JSFunction::scope): - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::getThunk): - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - -2010-05-17 Patrick Gansterer - - Reviewed by Laszlo Gombos. - - [Qt] Remove WinCE endian dedection. - https://bugs.webkit.org/show_bug.cgi?id=38511 - - Windows CE supports little-endian format only. - Correct dedection was added in r57804. - - * wtf/Platform.h: - -2010-05-16 Simon Fraser - - Reviewed by Darin Adler. - - Reduce the size of FunctionExecutable - https://bugs.webkit.org/show_bug.cgi?id=39180 - - Change m_numVariables from a size_t to 31 bits in a bitfield, - packed with another bit for m_forceUsesArguments (which in turn - get packed with the base class). - - Reduces the size of FunctionExecutable from 160 to 152 bytes. - - * runtime/Executable.h: - (JSC::FunctionExecutable::variableCount): - (JSC::FunctionExecutable::FunctionExecutable): - -2010-05-15 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Incorrect codegen for slowcase of < in 64-bit - https://bugs.webkit.org/show_bug.cgi?id=39151 - - Call the correct stud for the slowcases of the < operator. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emitSlow_op_jless): - -2010-05-15 Leo Yang - - Reviewed by Darin Adler. - - Fix bug https://bugs.webkit.org/show_bug.cgi?id=38890 - - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - -2010-05-15 Leandro Pereira - - Reviewed by Adam Treat. - - [EFL] Add build system for the EFL port. - http://webkit.org/b/37945 - - * CMakeLists.txt: Added. - * CMakeListsEfl.txt: Added. - * config.h: Add conditional to look for cmakeconfig.h. - * jsc/CMakeLists.txt: Added. - * jsc/CMakeListsEfl.txt: Added. - * wtf/CMakeLists.txt: Added. - * wtf/CMakeListsEfl.txt: Added. - -2010-05-15 Chao-ying Fu - - Reviewed by Oliver Hunt. - - Update MIPS JIT for unsigned right shift, Math.sqrt, load16 - https://bugs.webkit.org/show_bug.cgi?id=38412 - - Fixed MIPS build failure. - - * assembler/MIPSAssembler.h: - (JSC::MIPSAssembler::srl): - (JSC::MIPSAssembler::srlv): - (JSC::MIPSAssembler::sqrtd): - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::urshift32): - (JSC::MacroAssemblerMIPS::sqrtDouble): - (JSC::MacroAssemblerMIPS::load16): - (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt): - * jit/JSInterfaceJIT.h: - -2010-05-15 Ilya Tikhonovsky - - Reviewed by Geoffrey Garen. - - WebInspector: JSC Should provide heap size info for Timeline panel. - https://bugs.webkit.org/show_bug.cgi?id=38420 - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * runtime/Collector.cpp: - (JSC::Heap::size): - * runtime/Collector.h: - -2010-05-15 Dave Tapuska - - Reviewed by Darin Adler. - - Add a new define for we need strict arena alignment. ARMv5 with - double word instructions set this value. - - * wtf/Platform.h: - -2010-05-14 Stephanie Lewis - - Rubber-stamped by Mark Rowe. - - Update order files. - - * JavaScriptCore.order: - -2010-05-14 Jedrzej Nowacki - - Reviewed by Kenneth Rohde Christiansen. - - Implementation of QtScript API that provide method to convert a value to an object. - - [Qt] QtScript is missing toObject API - https://bugs.webkit.org/show_bug.cgi?id=36594 - - * qt/api/qscriptengine.cpp: - (QScriptEngine::toObject): - * qt/api/qscriptengine.h: - * qt/api/qscriptvalue.cpp: - (QScriptValue::toObject): - * qt/api/qscriptvalue.h: - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::toObject): - * qt/tests/qscriptengine/tst_qscriptengine.cpp: - (tst_QScriptEngine::toObject): - (tst_QScriptEngine::toObjectTwoEngines): - * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: - (tst_QScriptValue::toObjectSimple): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - -2010-05-14 Chao-ying Fu - - Reviewed by Oliver Hunt. - - String Indexing Failure on JSVALUE32 targets - https://bugs.webkit.org/show_bug.cgi?id=39034 - - Remove zero-extend/shift-right code on regT1, because we already have - it in emit_op_get_by_val(). - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::stringGetByValStubGenerator): - -2010-05-10 Jocelyn Turcotte - - Reviewed by Alexey Proskuryakov. - - Fix a VS2010 assert in std::copy - https://bugs.webkit.org/show_bug.cgi?id=38630 - - The assert complains that the output iterator is null. - - * wtf/Vector.h: - (WTF::::operator): - -2010-05-13 Maciej Stachowiak - - No review, attempted build fix. - - Try to fix Tiger build with some gratuitous initialization of - seemingly uninitialized variables. - - * wtf/text/StringImpl.h: - (WebCore::StringImpl::tryCreateUninitialized): - -2010-05-13 Maciej Stachowiak - - Reviewed by Mark Rowe. - - Various JavaScript string optimizations - https://bugs.webkit.org/show_bug.cgi?id=39051 - - Approximately 1% SunSpider speedup. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncJoin): Remove branches from the hot code path - by moving the first pass outside the loop, and duplicating the hot loop - to extract the loop-invariant branch. - * runtime/RegExp.cpp: - (JSC::RegExp::match): resize ovector to 0 instead of clearing to avoid - thrash in case of large matches. - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::performMatch): Mark ALWAYS_INLINE to make the - compiler respect our authority. - * runtime/StringPrototype.cpp: - (JSC::jsSpliceSubstringsWithSeparators): Inline. - (JSC::stringProtoFuncSubstring): Rewrite boundary condition checks to - reduce the number of floating point comparisons and branches. - -2010-05-12 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=39039 - Provide support for separate bytecode/JIT code translations for call/construct usage - This will allow us to produce code generated specifically for use as a constructor, not for general function use. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::unlinkCallers): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getBytecodeIndex): - (JSC::CodeBlock::getJITCode): - (JSC::CodeBlock::executablePool): - (JSC::GlobalCodeBlock::GlobalCodeBlock): - (JSC::FunctionCodeBlock::FunctionCodeBlock): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::prepareForRepeatCall): - (JSC::Interpreter::execute): - (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::unlinkCallOrConstruct): - (JSC::JIT::linkConstruct): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emitSlow_op_get_by_val): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emitSlow_op_get_by_val): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::JITThunks::ctiVirtualConstructLink): - (JSC::JITThunks::ctiVirtualConstruct): - (JSC::): - * jit/SpecializedThunkJIT.h: - (JSC::SpecializedThunkJIT::finalize): - * runtime/Arguments.h: - (JSC::JSActivation::copyRegisters): - * runtime/ArrayPrototype.cpp: - (JSC::isNumericCompareFunction): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::~FunctionExecutable): - (JSC::FunctionExecutable::compileForCall): - (JSC::FunctionExecutable::compileForConstruct): - (JSC::EvalExecutable::generateJITCode): - (JSC::ProgramExecutable::generateJITCode): - (JSC::FunctionExecutable::generateJITCodeForCall): - (JSC::FunctionExecutable::generateJITCodeForConstruct): - (JSC::FunctionExecutable::markAggregate): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - (JSC::FunctionExecutable::recompile): - * runtime/Executable.h: - (JSC::ExecutableBase::ExecutableBase): - (JSC::ExecutableBase::isHostFunction): - (JSC::ExecutableBase::generatedJITCodeForCall): - (JSC::ExecutableBase::generatedJITCodeForConstruct): - (JSC::NativeExecutable::NativeExecutable): - (JSC::EvalExecutable::jitCode): - (JSC::ProgramExecutable::jitCode): - (JSC::FunctionExecutable::bytecodeForCall): - (JSC::FunctionExecutable::isGeneratedForCall): - (JSC::FunctionExecutable::generatedBytecodeForCall): - (JSC::FunctionExecutable::bytecodeForConstruct): - (JSC::FunctionExecutable::isGeneratedForConstruct): - (JSC::FunctionExecutable::generatedBytecodeForConstruct): - (JSC::FunctionExecutable::symbolTable): - (JSC::FunctionExecutable::FunctionExecutable): - (JSC::FunctionExecutable::jitCodeForCall): - (JSC::FunctionExecutable::jitCodeForConstruct): - * runtime/JSActivation.h: - (JSC::JSActivation::JSActivationData::JSActivationData): - * runtime/JSFunction.cpp: - (JSC::JSFunction::~JSFunction): - (JSC::JSFunction::call): - (JSC::JSFunction::construct): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::numericCompareFunction): - -2010-05-12 Oliver Hunt - - build fix - - REGRESSION (r59282): Tiger PPC build broken - - * runtime/UString.h: - (JSC::tryMakeString): - -2010-05-12 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Incorrect 32-bit codegen for op_jnlesseq - https://bugs.webkit.org/show_bug.cgi?id=39038 - - Correct the use of incorrect comparison operators. - - * jit/JITArithmetic32_64.cpp: - (JSC::JIT::emit_op_jlesseq): - (JSC::JIT::emitBinaryDoubleOp): - -2010-05-12 Caio Marcelo de Oliveira Filho - - Reviewed by Eric Seidel. - - JavaScriptCore: fix build when some optimizations are disabled - https://bugs.webkit.org/show_bug.cgi?id=38800 - - Remove outdated UNUSED_PARAMs when using JIT but with - ENABLE_JIT_OPTIMIZE_CALL and ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS - disabled. - - * jit/JITOpcodes.cpp: - * jit/JITOpcodes32_64.cpp: - -2010-05-12 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Work around GCC stupidity by either explicitly inlining or by - using ALWAYS_INLINE - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - * runtime/UString.h: - (JSC::UString::~UString): - * wtf/RefPtr.h: - (WTF::RefPtr::RefPtr): - (WTF::RefPtr::~RefPtr): - * wtf/text/StringImpl.h: - (WebCore::StringImpl::create): - (WebCore::StringImpl::tryCreateUninitialized): - -2010-05-12 Laszlo Gombos - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Detect debug mode consistently - https://bugs.webkit.org/show_bug.cgi?id=38863 - - * JavaScriptCore.pri: - * JavaScriptCore.pro: - * jsc.pro: - * qt/api/QtScript.pro: - -2010-05-12 Peter Varga - - Reviewed by Gavin Barraclough. - - Remove a direct jump in generatePatternCharacterGreedy() and - generatePatternCharacterClassGreedy() functions if quantityCount of the term - is unlimited. - https://bugs.webkit.org/show_bug.cgi?id=38898 - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy): - (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy): - -2010-05-11 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Slight simplification to the calling convention: read RegisterFile::end() - from an absolute address, instead of from a pointer to the RegisterFile - on the stack. - - SunSpider reports no change. - - This should free us to remove the RegisterFile argument from the stack. - - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - -2010-05-11 Brian Weinstein - - Possible Gtk build fix - use ALWAYS_INLINE on functions that were inlined. - - * wtf/text/AtomicString.h: - (WebCore::AtomicString::add): Use ALWAYS_INLINE. - * wtf/text/WTFString.h: - (WebCore::String::length): Ditto. - (WebCore::String::isEmpty): Ditto. - -2010-05-11 Anders Carlsson - - Reviewed by Sam Weinig. - - Add a compile time assert that sizeof(String) == sizeof(AtomicString). - - * wtf/text/AtomicString.cpp: - -2010-05-11 Anders Carlsson - - Reviewed by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=38961 - Move some member variables around to reduce class sizes. - - Make AtomicString no longer inherit from FastAllocBase. - - Since AtomicString's first (and only) member variable, a RefPtr, also inherits from FastAllocBase this - was causing the size of AtomicString to contain sizeof(void*) bytes of padding. - - * wtf/text/AtomicString.h: - -2010-05-11 Brian Weinstein - - Reviewed by Maciej Stachowiak. - Patch by Gavin Barraclough. - - Rest of REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF. - https://bugs.webkit.org/show_bug.cgi?id=38930 - - - Inline string functions that are commonly used in WTFString, CString, and AtomicString. - - * JavaScriptCore.exp: Remove exports of inline functions. - * wtf/text/AtomicString.cpp: - (WebCore::AtomicString::addSlowCase): Rename add to addSlowCase, and inline the fast path - of add. - * wtf/text/AtomicString.h: - (WebCore::AtomicString::add): Inline the fast path of add. - * wtf/text/CString.cpp: Inline implementation of data and length in the header. - * wtf/text/CString.h: - (WTF::CString::data): Inline implementation of data. - (WTF::CString::length): Inline implementation of length. - * wtf/text/WTFString.cpp: Remove implementations of functions to be inlined. - * wtf/text/WTFString.h: - (WebCore::String::String): Inline implementation. - (WebCore::String::length): Ditto. - (WebCore::String::characters): Ditto. - (WebCore::String::operator[]): Ditto. - (WebCore::String::isEmpty): Ditto. - -2010-05-11 Brian Weinstein - - Reviewed by Steve Falkenburg and Jon Honeycutt. - Patch by Gavin Barraclough. - - REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF. - https://bugs.webkit.org/show_bug.cgi?id=38930 - - - When the String classes were moved from WebCore to WTF, it meant that on Windows, all operations - on Strings in WebCore had to cross a DLL boundary (from WebKit.dll to JavaScript.dll). - - We fix this by refactoring some of the WTF string code, so the code in AtomicString, StringImpl, and - WTFString can be built by both WebCore and WTF, and we don't need to talk across a DLL to do operations - on Strings. - - * GNUmakefile.am: Add new file to build system. - * JavaScriptCore.gypi: Ditto. - * JavaScriptCore.pro: Ditto. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove string exports, because these are now - handled in WebCore. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove the post-build step that was added - here (the post build step is in JavaScriptCoreCommon.vsprops). - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Copy the three cpp files that need to be compiled - by WebCore into the WebKitOutputDir directory. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add the StringStatics file. - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add the three WTF string cpp files to this project. - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Remove the need to link against WTF.lib (since jsc links against JavaScriptCore). - * JavaScriptCore.xcodeproj/project.pbxproj: Add the StringStatics file. - * wtf/text/AtomicString.cpp: Moved code to StringStatics. - * wtf/text/StringImpl.cpp: Ditto. - * wtf/text/StringStatics.cpp: Added. Move functions in WTF Strings that define static variables to here, so - the rest of the files can be compiled in WebCore. - (WebCore::StringImpl::empty): Moved from StringImpl.cpp to here. - (WebCore::AtomicString::init): Moved from AtomicString.cpp to here. - -2010-05-11 Alice Liu - - Rubber-stamped by Gavin Barraclough. - - Fix build error when enabling debugging block in WebKit win painting code - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-05-11 Mark Rowe - - Fix the world. - - In r59162 a change was made to WebCore's FeatureDefines.xcconfig that enabled FILE_READER and FILE_WRITER. - The author and reviewer of that patch ignored the carefully-worded warning at the top of that file asking - that changes to the file be kept in sync across JavaScriptCore, WebCore and WebKit, as well as being kept - in sync with build-webkit. This led to WebCore and WebKit having different views of Document's vtable - and results in crashes in Safari shortly after launch when virtual function calls resulted in the wrong - function in WebCore being called. - - We fix this by bringing the FeatureDefines.xcconfig files in to sync. Based on the ChangeLog message and - other changes in r59162 it appears that enabling FILE_WRITER was unintentional so that particular change - has been reverted. - - * Configurations/FeatureDefines.xcconfig: - -2010-05-11 Sheriff Bot - - Unreviewed, rolling out r59171. - http://trac.webkit.org/changeset/59171 - https://bugs.webkit.org/show_bug.cgi?id=38933 - - "Broke the world" (Requested by bweinstein on #webkit). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/text/AtomicString.cpp: - (WebCore::AtomicString::init): - * wtf/text/StringImpl.cpp: - (WebCore::StringImpl::empty): - * wtf/text/StringStatics.cpp: Removed. - -2010-05-11 Brian Weinstein - - Reviewed by Steve Falkenburg. - Patch by Gavin Barraclough. - - REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF. - https://bugs.webkit.org/show_bug.cgi?id=38930 - - - When the String classes were moved from WebCore to WTF, it meant that on Windows, all operations - on Strings in WebCore had to cross a DLL boundary (from WebKit.dll to JavaScript.dll). - - We fix this by refactoring some of the WTF string code, so the code in AtomicString, StringImpl, and - WTFString can be built by both WebCore and WTF, and we don't need to talk across a DLL to do operations - on Strings. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove string exports, because these are now - handled in WebCore. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove the post-build step that was added - here (the post build step is in JavaScriptCoreCommon.vsprops). - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Copy the three cpp files that need to be compiled - by WebCore into the WebKitOutputDir directory. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add the StringStatics file. - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add the three WTF string cpp files to this project. - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Remove the need to link against WTF.lib (since jsc links against JavaScriptCore). - * JavaScriptCore.xcodeproj/project.pbxproj: Add the StringStatics file. - * wtf/text/AtomicString.cpp: Moved code to StringStatics. - * wtf/text/StringImpl.cpp: Ditto. - * wtf/text/StringStatics.cpp: Added. Move functions in WTF Strings that define static variables to here, so - the rest of the files can be compiled in WebCore. - (WebCore::StringImpl::empty): Moved from StringImpl.cpp to here. - (WebCore::AtomicString::init): Moved from AtomicString.cpp to here. - -2010-05-11 Geoffrey Garen - - Fixed test failures seen on SnowLeopard buildbot. - - * runtime/JSString.cpp: - (JSC::JSString::replaceCharacter): Don't use size_t and wtf::notFound. - Instead, use the individual types and notFound values of the string APIs - we're using, since they're not necessarily the same in 64bit. - -2010-05-11 Geoffrey Garen - - Reviewed by Oliver Hunt and Darin Adler. - - Start using ropes in String.prototype.replace. - - 1%-1.5% speedup on SunSpider. - - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): Updated for RopeImpl refactoring. - - (JSC::JSString::replaceCharacter): Added a replaceCharacter function, which creates - a rope for the resulting replacement. - - * runtime/JSString.h: A few changes here: - (JSC::): - (JSC::RopeBuilder::RopeIterator::RopeIterator): - (JSC::RopeBuilder::RopeIterator::operator++): - (JSC::RopeBuilder::RopeIterator::operator*): - (JSC::RopeBuilder::RopeIterator::operator!=): - (JSC::RopeBuilder::RopeIterator::WorkItem::WorkItem): - (JSC::RopeBuilder::RopeIterator::WorkItem::operator!=): - (JSC::RopeBuilder::RopeIterator::skipRopes): Created a RopeIterator abstraction. - We use this to do a substring find without having to resolve the rope. - (We could use this iterator when resolving ropes, too, but resolving - ropes backwards is usually more efficient.) - - (JSC::RopeBuilder::JSString): Added constructors for 2 & 3 UStrings. - - (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): - (JSC::RopeBuilder::size): Updated for RopeImpl refactoring. - - * runtime/Operations.h: Updated for RopeImpl refactoring. - (JSC::jsString): Added jsString functions for 2 & 3 UStrings. - - * runtime/RopeImpl.cpp: - (JSC::RopeImpl::derefFibersNonRecursive): - * runtime/RopeImpl.h: - (JSC::RopeImpl::initializeFiber): - (JSC::RopeImpl::size): - (JSC::RopeImpl::fibers): - (JSC::RopeImpl::deref): - (JSC::RopeImpl::RopeImpl): A little refactoring to make this patch easier: - Moved statics to the top of the class; put multi-statement functions on - multiple lines; renamed "fiberCount" to "size" to match other collections; - changed the "fibers" accessor to return the fibers buffer, instead of an - item in the buffer, to make iteration easier. - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): Don't resolve a rope unless we need to. Do - use our new replaceCharacter function if possible. Do use a rope to - represent splicing three strings together. - -2010-05-10 Laszlo Gombos - - Reviewed by Darin Adler. - - [Qt] Disable JIT support for mingw-w64 - https://bugs.webkit.org/show_bug.cgi?id=38747 - - Disale JIT for mingw-w64 as it is reportedly - unstable. - - Thanks for Vanboxem Rruben for the investigation. - - * wtf/Platform.h: - -2010-05-09 Fumitoshi Ukai - - Reviewed by Eric Seidel. - - JavaScriptCore/wtf/MD5.h: checksum should take a reference to output. - https://bugs.webkit.org/show_bug.cgi?id=38723 - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/MD5.cpp: - (WTF::expectMD5): - Fix for checksum change. - (WTF::MD5::checksum): - Take a reference to output, instead of returning the result by value, to reduce coping for performance. - * wtf/MD5.h: - -2010-05-09 Oliver Hunt - - Build fix. - - Fix accidental repeat addition of emit_op_new_regexp - - * jit/JITOpcodes.cpp: - -2010-05-09 Oliver Hunt - - Reviewed by Gavin Barraclough. - - REGRESSION(r57955): RegExp literals should not actually be cached, so r57955 should be rolled out. - https://bugs.webkit.org/show_bug.cgi?id=38828 - - - Rollout r57955 - - * bytecode/CodeBlock.cpp: - (JSC::regexpToSourceString): - (JSC::regexpName): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::addRegExp): - (JSC::CodeBlock::regexp): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::addRegExp): - (JSC::BytecodeGenerator::emitNewRegExp): - * bytecompiler/BytecodeGenerator.h: - * bytecompiler/NodesCodegen.cpp: - (JSC::RegExpNode::emitBytecode): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_new_regexp): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): - -2010-05-09 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Reserve a large-ish initial capacity for Lexer::m_buffer16. - - SunSpider says 0.3% faster. - - m_buffer16 is used when parsing complex strings -- for example, strings - with escape sequences in them. These kinds of strings can be really long, - and we want to avoid repeatedly copying as we grow m_buffer16. - - The net memory cost is quite low, since it's proporitional to source - code we already have in memory, and we throw away m_buffer16 right when - we're done parsing. - - * parser/Lexer.cpp: - (JSC::Lexer::Lexer): No need to reserve initial capacity in our constructor, - since setCode will be called before we're asked to lex anything. - (JSC::Lexer::setCode): Reserve enough space to lex half the source code - as a complex string without having to copy. - (JSC::Lexer::clear): No need to reserve initial capacity here either, - since setCode will be called before we're asked to lex anything. - -2010-05-09 Laszlo Gombos - - Reviewed by Eric Seidel. - - [Qt] Remove YARR configuration rules from Qt make system - https://bugs.webkit.org/show_bug.cgi?id=38819 - - Setting YARR based on JIT seeting is now in Platform.h - for all ports. This patch essentially reverses r49238. - - * JavaScriptCore.pri: - -2010-05-09 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Improve string indexing performance - https://bugs.webkit.org/show_bug.cgi?id=38814 - - Add an assembly stub to do indexed loads from strings much - more cheaply than the current stub dispatch logic. We can - do this because we are able to make guarantees about the - register contents when entering the stub so the call overhead - is negligible. - - * jit/JIT.h: - * jit/JITInlineMethods.h: - * jit/JITOpcodes.cpp: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::stringGetByValStubGenerator): - (JSC::JIT::emitSlow_op_get_by_val): - Moved from JITOpcodes.cpp to keep the slowcase next to - the normal case codegen as we do for everything else. - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::stringGetByValStubGenerator): - (JSC::JIT::emitSlow_op_get_by_val): - * jit/JSInterfaceJIT.h: - (JSC::JSInterfaceJIT::emitFastArithImmToInt): - -2010-05-09 Maciej Stachowiak - - Fixed version of: "Optimized o[s] where o is a cell and s is a string" - https://bugs.webkit.org/show_bug.cgi?id=38815 - - Fixed the previous patch for this from Geoff Garen. - - The two problems were a missing exception check and a PropertySlot - initialized improperly, leading to crashes and failures in the case - of getters accessed with bracket syntax. - - Previous patch: - - Optimized o[s] where o is a cell and s is a string, removing some old - code that wasn't really tuned for the JIT. - - SunSpider says 0.8% faster. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSCell.h: - -2010-05-08 Laszlo Gombos - - Unreviewed, build fix. - - Fix missing terminating ' character warning - - The warning has been only seen on the Gtk buildbots. - - * wtf/Platform.h: - -2010-05-08 Laszlo Gombos - - Reviewed by Gavin Barraclough. - - Refactor YARR and YARR_JIT default rules in Platform.h - https://bugs.webkit.org/show_bug.cgi?id=38727 - - Turn on YARR and YARR JIT by default of JIT is enabled. - Ports can overrule this default decisions as they wish. - - * wtf/Platform.h: - -2010-05-08 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Split JSVALUE32_64 code out of JITOpcodes.cpp and into JITOpcodes32_64.cpp - https://bugs.webkit.org/show_bug.cgi?id=38808 - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/JITOpcodes.cpp: - * jit/JITOpcodes32_64.cpp: Added. - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::emit_op_mov): - (JSC::JIT::emit_op_end): - (JSC::JIT::emit_op_jmp): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emitSlow_op_loop_if_lesseq): - (JSC::JIT::emit_op_new_object): - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emitSlow_op_instanceof): - (JSC::JIT::emit_op_new_func): - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_tear_off_activation): - (JSC::JIT::emit_op_tear_off_arguments): - (JSC::JIT::emit_op_new_array): - (JSC::JIT::emit_op_resolve): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emitSlow_op_to_primitive): - (JSC::JIT::emit_op_strcat): - (JSC::JIT::emit_op_resolve_base): - (JSC::JIT::emit_op_resolve_skip): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emitSlow_op_resolve_global): - (JSC::JIT::emit_op_not): - (JSC::JIT::emitSlow_op_not): - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emitSlow_op_jfalse): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emitSlow_op_jtrue): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_jneq_ptr): - (JSC::JIT::emit_op_jsr): - (JSC::JIT::emit_op_sret): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emit_op_stricteq): - (JSC::JIT::emitSlow_op_stricteq): - (JSC::JIT::emit_op_nstricteq): - (JSC::JIT::emitSlow_op_nstricteq): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - (JSC::JIT::emit_op_resolve_with_base): - (JSC::JIT::emit_op_new_func_exp): - (JSC::JIT::emit_op_throw): - (JSC::JIT::emit_op_get_pnames): - (JSC::JIT::emit_op_next_pname): - (JSC::JIT::emit_op_push_scope): - (JSC::JIT::emit_op_pop_scope): - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emitSlow_op_to_jsnumber): - (JSC::JIT::emit_op_push_new_scope): - (JSC::JIT::emit_op_catch): - (JSC::JIT::emit_op_jmp_scopes): - (JSC::JIT::emit_op_switch_imm): - (JSC::JIT::emit_op_switch_char): - (JSC::JIT::emit_op_switch_string): - (JSC::JIT::emit_op_new_error): - (JSC::JIT::emit_op_debug): - (JSC::JIT::emit_op_enter): - (JSC::JIT::emit_op_enter_with_activation): - (JSC::JIT::emit_op_create_arguments): - (JSC::JIT::emit_op_init_arguments): - (JSC::JIT::emit_op_convert_this): - (JSC::JIT::emitSlow_op_convert_this): - (JSC::JIT::emit_op_profile_will_call): - (JSC::JIT::emit_op_profile_did_call): - -2010-05-08 Gabor Loki - - Reviewed by Gavin Barraclough. - - Fix halfword loads on ARM - https://bugs.webkit.org/show_bug.cgi?id=38741 - - The BaseIndex and ImplicitAddress are contain 32bit wide offset, but - the load16 functions were working with 8 bit data (encoded in the - instruction). If the offset cannot be encoded in an instruction, it - should be stored in a temporary register. - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::getOffsetForHalfwordDataTransfer): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::load16): - -2010-05-08 Gabor Loki - - Reviewed by Gavin Barraclough. - - Fix spanning branch instruction on Cortex-A8 with Thumb-2 JIT - https://bugs.webkit.org/show_bug.cgi?id=38280 - - If the 32-bit Thumb-2 branch instruction spans two 4KiB regions and - the target of the branch falls within the first region it is - possible for the processor to incorrectly determine the branch - instruction, and it is also possible in some cases for the processor - to enter a deadlock state. - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::linkJumpAbsolute): - -2010-05-08 Adam Barth - - Reviewed by Darin Fisher. - - [WTFURL] Add a buffer for managing the output of the canonicalizer - https://bugs.webkit.org/show_bug.cgi?id=38671 - - The canonicalizer produces a stream of canonicalized characters, which - we will store in a URLBuffer. URLBuffer is quite similar to Vector, - but serves as an abstraction to isolate us from the underlying - character storage. In the case of WebKit, we'll probably implement a - subclass of URLBuffer with Vector. In Chromium, the backing store is a - std::string, which avoids an unnecessary memcpy that would be caused by - using Vector instead. - - * wtf/url/src/URLBuffer.h: Added. - (WTF::URLBuffer::URLBuffer): - (WTF::URLBuffer::~URLBuffer): - (WTF::URLBuffer::at): - (WTF::URLBuffer::set): - (WTF::URLBuffer::capacity): - (WTF::URLBuffer::length): - (WTF::URLBuffer::data): - (WTF::URLBuffer::setLength): - (WTF::URLBuffer::append): - (WTF::URLBuffer::grow): - -2010-05-08 Eric Seidel - - Unreviewed, just reverting commit. - - REGRESSION(59000): r59000 contained all sorts of changes it should not have, needs revert. - https://bugs.webkit.org/show_bug.cgi?id=38798 - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitResolve): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_resolve_global): - -2010-05-04 Jer Noble - - Reviewed by Maciej Stachowiak - - Safari pegs CPU and drops tons of frames using HTML5 Vimeo player - - - - Added cancelCallOnMainThread. callOnMainThread should always now be paired - with cancelCallOnMainThread in situations where the refcon passed to callOnMainThread - may be dealloced before the main thread function can be dispatched. - - * wtf/MainThread.cpp: - (WTF::FunctionWithContext::operator == ): Supports the FunctionWithContextFinder predicate functor. - (WTF::FunctionWithContextFinder::FunctionWithContextFinder): Predicate functor for use with Dequeue::findIf - (WTF::FunctionWithContextFinder::operator()): - (WTF::cancelCallOnMainThread): - * wtf/MainThread.h: - -2010-05-07 Oliver Hunt - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-05-07 Eric Seidel - - Unreviewed, rolling out r58990. - http://trac.webkit.org/changeset/58990 - - Broke 4 tests on Snow Leopard and Qt. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSCell.h: - -2010-05-07 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Optimize access to the global object from a function that uses eval - https://bugs.webkit.org/show_bug.cgi?id=38644 - - Fix bug where cross scope access to a global var (vs. property) would - be allowed without checking for intervening dynamic scopes. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitResolve): - -2010-05-07 Oliver Hunt - - 32-bit buildfix. - - Macro expansion I stab at thee! - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_resolve_global): - -2010-05-07 Geoffrey Garen - - Reviewed by Darin Adler. - - Optimized o[s] where o is a cell and s is a string, removing some old - code that wasn't really tuned for the JIT. - - SunSpider says 0.8% faster. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSCell.h: - -2010-05-07 Oliver Hunt - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-05-07 Oliver Hunt - - Reviewed by Geoffrey Garen. - - Optimize access to the global object from a function that uses eval - https://bugs.webkit.org/show_bug.cgi?id=38644 - - Add op_resolve_global_dynamic, a variant of op_resolve_global that - checks each node in the scope chain for dynamically inserted properties - and falls back to the normal resolve logic in that case. - - * JavaScriptCore.exp: - * bytecode/CodeBlock.cpp: - (JSC::isGlobalResolve): - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::derefStructures): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::findScopedProperty): - Now take an additional reference parameter to used to indicate that - there were nodes that may gain dynamic properties - (JSC::BytecodeGenerator::emitResolve): - (JSC::BytecodeGenerator::emitResolveBase): - (JSC::BytecodeGenerator::emitResolveWithBase): - deal with additional argument to findScopedProperty - * bytecompiler/BytecodeGenerator.h: - * bytecompiler/NodesCodegen.cpp: - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::PostfixResolveNode::emitBytecode): - (JSC::PrefixResolveNode::emitBytecode): - (JSC::ReadModifyResolveNode::emitBytecode): - (JSC::AssignResolveNode::emitBytecode): - These functions use findScopedProperty directly in order to - optimise lookup. They cannot trivially handle any degree of - dynamism in the lookup so we just give up in such case. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveGlobalDynamic): - (JSC::Interpreter::execute): - (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emit_op_resolve_global_dynamic): - (JSC::JIT::emitSlow_op_resolve_global): - (JSC::JIT::emitSlow_op_resolve_global_dynamic): - Happily resolve_global_dynamic can share the slow case! - * jit/JITStubs.h: - (JSC::): - * runtime/JSActivation.cpp: - (JSC::JSActivation::isDynamicScope): - * runtime/JSActivation.h: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::isDynamicScope): - * runtime/JSGlobalObject.h: - * runtime/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::isDynamicScope): - * runtime/JSStaticScopeObject.h: - * runtime/JSVariableObject.h: - -2010-05-07 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Fixed Sputnik failure seen on buildbot. - - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): Cast to unsigned before checking magnitude, - to efficiently exclude negative numbers, which require two characters - instead of one. - -2010-05-07 Geoffrey Garen - - Reviewed by Alexey Proskuryakov. - - Slightly more effective way to guarantee a compile-time constant, at - least on gcc. - - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): Use pointer notation instead of array - notation, so the compiler treats the string and its contents as constant. - -2010-05-07 Adam Barth - - Reviewed by Alexey Proskuryakov. - - [WTFURL] Add core URL parser - https://bugs.webkit.org/show_bug.cgi?id=38572 - - This patch adds the core of the URL parser. The URL parser uses a - templated notion of a code unit to support different string types. - Later we'll add some non-templated APIs with concrete types that - clients can use more conveniently. - - The URLParser has a couple calls to ASSERT(), which I've commented out - for now. I'm not 100% sure how to handle the dependency issues there - yet, so I've punted on the issue for now. - - Also, there are a number of methods that are declared public in this - patch that are only used by the canonicalizer. My plan is to make - those private or protected and make the canonicalizer a friend of the - parser. The details will be in a later patch. - - * wtf/url/src/URLComponent.h: - (WTF::URLComponent::fromRange): - (WTF::URLComponent::isNonEmpty): - (WTF::URLComponent::isEmptyOrInvalid): - * wtf/url/src/URLParser.h: Added. - (WTF::URLParser::): - (WTF::URLParser::isPossibleAuthorityTerminator): - (WTF::URLParser::parseAuthority): - (WTF::URLParser::extractScheme): - (WTF::URLParser::parseAfterScheme): - (WTF::URLParser::parseStandardURL): - (WTF::URLParser::parsePath): - (WTF::URLParser::parsePathURL): - (WTF::URLParser::parseMailtoURL): - (WTF::URLParser::parsePort): - (WTF::URLParser::extractFileName): - (WTF::URLParser::extractQueryKeyValue): - (WTF::URLParser::isURLSlash): - (WTF::URLParser::shouldTrimFromURL): - (WTF::URLParser::trimURL): - (WTF::URLParser::consecutiveSlashes): - (WTF::URLParser::isPortDigit): - (WTF::URLParser::nextAuthorityTerminator): - (WTF::URLParser::parseUserInfo): - (WTF::URLParser::parseServerInfo): - -2010-05-07 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Added a fast path for number-to-character conversion via - Number.prototype.toString base 36. - - 0.7% speedup on SunSpider. - - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): Made radix interpretation a little more - efficient by keeping it in int space. Turned "const char" into - "static const char" just in case. Added a fast path for base 36 - conversion of something that will turn into a character. - -2010-05-07 Adam Barth - - Reviewed by Darin Fisher. - - [WTFURL] Add a malloc-backed URLBuffer - https://bugs.webkit.org/show_bug.cgi?id=38694 - - This patch adds a URLBuffer that uses new/delete to manage the backing - store for the buffer. - - * wtf/url/src/RawURLBuffer.h: Added. - (WTF::RawURLBuffer::RawURLBuffer): - (WTF::RawURLBuffer::~RawURLBuffer): - (WTF::RawURLBuffer::resize): - -2010-05-06 Fumitoshi Ukai - - Reviewed by Alexey Proskuryakov. - - JavaScriptCore/wtf/RandomNumber.h should provide using WTF::* - https://bugs.webkit.org/show_bug.cgi?id=38719 - - * wtf/RandomNumber.h: - Add using directives. - -2010-05-06 Laszlo Gombos - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Enable YARR_JIT for X86 Mac for QtWebKit - https://bugs.webkit.org/show_bug.cgi?id=38668 - - * wtf/Platform.h: - -2010-05-06 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 38714 - Add result caching for Math.sin - - Math.sin is frequently called with the same operand, caching the result should - improve performance. CachedTranscendentalFunction adds a generic mechanism to - cache results for pure functions with the signature "double func(double)", and - where NaN maps to NaN. - - CachedTranscendentalFunction uses a very simple hash function designed to be - fast to execute since we cannot cache the result, and trivial to JIT generate, - should we wish to do so. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/CachedTranscendentalFunction.h: Added. - (JSC::CachedTranscendentalFunction::CachedTranscendentalFunction): - (JSC::CachedTranscendentalFunction::~CachedTranscendentalFunction): - (JSC::CachedTranscendentalFunction::operator()): - (JSC::CachedTranscendentalFunction::initialize): - (JSC::CachedTranscendentalFunction::hash): - * runtime/JSGlobalData.h: - * runtime/MathObject.cpp: - (JSC::mathProtoFuncSin): - * wtf/Platform.h: - -2010-05-06 Geoffrey Garen - - Windows build fix. - - * bytecode/SamplingTool.cpp: - (JSC::SamplingFlags::sample): Use a cast, so Windows will be happy when - this code is enabled. - * wtf/Platform.h: Reverted last change to this file, which seems to have - been accidental. - -2010-05-06 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Add compile switch to make debugger keyword plant breakpoint instructions. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitDebugHook): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_debug): - * wtf/Platform.h: - -2010-05-06 Oliver Hunt - - Build fix - - Fix ARM builds - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::load16): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::load16): - -2010-05-06 Oliver Hunt - - Reviewed by Geoffrey Garen. - - Improve performance of single character string compares - https://bugs.webkit.org/show_bug.cgi?id=38659 - - Add logic to the jit to identify comparisons to single character string literals - and then just perform the comparison inline, rather than ignoring the evidence - and attempting to perform an integer comparison. - - Multiple changes required -- add jnlesseq opcode, add helper function to identify - single character string constants, add a helper to load single character strings. - Then add the 32_64 and normal codepaths to the JIT. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::load16): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitJumpIfTrue): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jless): - (JSC::JIT::emitSlow_op_jless): - (JSC::JIT::emit_op_jlesseq): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - * jit/JITArithmetic32_64.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jless): - (JSC::JIT::emitSlow_op_jless): - (JSC::JIT::emit_op_jlesseq): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emitBinaryDoubleOp): - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoadCharacterString): - (JSC::JIT::isOperandConstantImmediateChar): - * jit/JSInterfaceJIT.h: - (JSC::ThunkHelpers::stringImplDataOffset): - (JSC::ThunkHelpers::jsStringLengthOffset): - (JSC::ThunkHelpers::jsStringValueOffset): - Moved from ThunkGenerators to make it possible to share. - * jit/ThunkGenerators.cpp: - -2010-05-06 Martin Robinson - - Reviewed by Gustavo Noronha Silva. - - [GTK] Enable DOM clipboard and drag-and-drop access - https://bugs.webkit.org/show_bug.cgi?id=30623 - - Convert dragging portion of drag-and-drop to use DataObjectGtk. - - * wtf/gobject/GRefPtr.h: Add forward declarations for GObject functions. - -2010-05-06 Steve Block - - Reviewed by Eric Seidel. - - MAC_JAVA_BRIDGE should be renamed JAVA_BRIDGE - https://bugs.webkit.org/show_bug.cgi?id=38544 - - * wtf/Platform.h: - -2010-05-06 Adam Barth - - Reviewed by Maciej Stachowiak. - - [WTFURL] Add a class to represent the segments of a URL - https://bugs.webkit.org/show_bug.cgi?id=38566 - - When paired with a string, this class represents a parsed URL. - - * wtf/url/src/URLSegments.cpp: Added. - (WTF::URLSegments::length): - (WTF::URLSegments::charactersBefore): - * wtf/url/src/URLSegments.h: Added. - (WTF::URLSegments::): - (WTF::URLSegments::URLSegments): - * wtf/url/wtfurl.gyp: - -2010-05-05 Tony Gentilcore - - Reviewed by Adam Barth. - - Adding comment with link to RefPtr documentation. - https://bugs.webkit.org/show_bug.cgi?id=38601 - - * wtf/RefPtr.h: - -2010-05-05 Gavin Barraclough - - Reviewed by Darin Adler. - - Bug 38604 - workers-gc2 crashing on Qt - - This appears to be due to a couple of issues. - (1) When the atomic string table is deleted it does not clear the 'inTable' bit - on AtomicStrings - it implicitly assumes that all AtomicStrings have already - been deleted at this point (otherwise they will crash in their destructor when - they try to remove themselves from the atomic string table). - (2) We don't fix the ordering in which WTF::WTFThreadData and - WebCore::ThreadGlobalData are destructed. - - We should make sure that ThreadGlobalData is cleaned up before worker threads - terminate and WTF::WTFThreadData is destroyed, and we should clear the inTable - bit of members on atomic string table destruction. - - WTF changes (fix issue 1, above) - ensure inTable property is cleared when the - atomic string table is destroyed (also, rename InTable to IsAtomic, to make it - clear which table we are refering to!) - - * wtf/text/AtomicString.cpp: - (WebCore::AtomicStringTable::destroy): - (WebCore::CStringTranslator::translate): - (WebCore::UCharBufferTranslator::translate): - (WebCore::HashAndCharactersTranslator::translate): - (WebCore::AtomicString::add): - * wtf/text/StringImpl.cpp: - (WebCore::StringImpl::~StringImpl): - * wtf/text/StringImpl.h: - (WebCore::StringImpl::isAtomic): - (WebCore::StringImpl::setIsAtomic): - * wtf/text/StringImplBase.h: - -2010-05-05 Oliver Hunt - - Reviewed by Geoffrey Garen. - - Make Array.join specialised for actual arrays - https://bugs.webkit.org/show_bug.cgi?id=38592 - - Bring Array.join in line with the other array methods by specialising for - this === an array. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncJoin): - -2010-05-04 Yongjun Zhang - - Reviewed by Darin Adler. - - WebKit crashes at DebuggerCallFrame::functionName() if m_callFrame is the top global callframe. - https://bugs.webkit.org/show_bug.cgi?id=38535 - - Don't call asFunction if callee is not a FunctionType to prevent assertion failure - in JSCell::isObject(). - - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::functionName): - (JSC::DebuggerCallFrame::calculatedFunctionName): - -2010-05-04 Steve Falkenburg - - Remove redundant exports to fix Windows build warnings. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-05-04 Jedrzej Nowacki - - Reviewed by Holger Freyther. - - Fix a memory leak inside the QScriptValue. - - QSciptValuePrivate::toString should release all temporary variables. - - [Qt] QScriptValue::toString have a memory leak. - https://bugs.webkit.org/show_bug.cgi?id=38112 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::toString): - -2010-05-04 Gustavo Noronha Silva - - Reviewed by Darin Adler. - - Does not work on SPARC because of alignment issues - https://bugs.webkit.org/show_bug.cgi?id=38455 - - Use AllocAlignmentInteger instead of void* on pageheap_memory to - avoid crashing at runtime in some architectures. Investigated by - Mike Hommey , change suggested by Darin Adler. - - * wtf/FastMalloc.cpp: - -2010-05-04 Adam Barth - - Reviewed by Maciej Stachowiak. - - Add first WTFURL file - https://bugs.webkit.org/show_bug.cgi?id=38470 - - This class represents a component of a URL, such as the scheme or path. - Essentially, the class is an index into a string buffer. - - * wtf/url: Added. - - There was some discussion about where to put the URL library. - There are a number of reasonable options, but putting the library - in the WTF directory seems like a reasonable alternative. This - location will make more sense once WTF is moved out of - JavaScriptCore and into a top-level directory. - * wtf/url/src: Added. - - I've added this extra directory to the usual structure because we - eventually want a "public" folder that defines the public - interface to this library that clients outside of svn.webkit.org - can rely upon, much like the various subfolders of the WebKit - directory often define a public API. - * wtf/url/src/URLComponent.h: Added. - - I've added this somewhat trivial class to get the ball rolling. - (WTF::URLComponent::URLComponent): - (WTF::URLComponent::isValid): - (WTF::URLComponent::isNonempty): - (WTF::URLComponent::reset): - (WTF::URLComponent::operator==): - (WTF::URLComponent::begin): - (WTF::URLComponent::setBegin): - (WTF::URLComponent::length): - (WTF::URLComponent::setLength): - (WTF::URLComponent::end): - * wtf/url/wtfurl.gyp: Added. - - WTFURL will be an independently buildable library, hence the - beginnings of a wtfurl.gyp file. - -2010-05-03 Stephanie Lewis - - Reviewed by Geoff Garen. - - https://bugs.webkit.org/show_bug.cgi?id=38368 - REGRESSSION: 1.5% PLT regression due to 56028 - (return memory quicker). - Instead of returning everything but the smallest spans spread out - the spans kept over several size lists. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::scavenge): - -2010-05-03 James Robinson - - Reviewed by Eric Seidel. - - Clean up a few compiler warnings - https://bugs.webkit.org/show_bug.cgi?id=38073 - - * wtf/text/StringImpl.cpp: - (WebCore::StringImpl::ascii): - -2010-05-03 Gavin Barraclough - - Reviewed by NOBODY (reverting previous commit). - - Rolling out r58114 - this introduced memory leaks of - AtomicStrings then workers terminated. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/ThunkGenerators.cpp: - (JSC::ThunkHelpers::stringImplDataOffset): - * runtime/Identifier.cpp: - (JSC::IdentifierTable::~IdentifierTable): - (JSC::IdentifierTable::add): - (JSC::IdentifierCStringTranslator::hash): - (JSC::IdentifierCStringTranslator::equal): - (JSC::IdentifierCStringTranslator::translate): - (JSC::Identifier::add): - (JSC::IdentifierUCharBufferTranslator::hash): - (JSC::IdentifierUCharBufferTranslator::equal): - (JSC::IdentifierUCharBufferTranslator::translate): - (JSC::Identifier::addSlowCase): - * runtime/Identifier.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::~JSGlobalData): - * runtime/JSGlobalData.h: - * wtf/WTFThreadData.cpp: - (WTF::WTFThreadData::WTFThreadData): - (WTF::WTFThreadData::~WTFThreadData): - * wtf/WTFThreadData.h: - (JSC::IdentifierTable::remove): - (JSC::IdentifierTable::literalTable): - (WTF::WTFThreadData::atomicStringTable): - * wtf/text/AtomicString.cpp: - (WebCore::AtomicStringTable::create): - (WebCore::AtomicStringTable::table): - (WebCore::AtomicStringTable::destroy): - (WebCore::stringTable): - (WebCore::CStringTranslator::hash): - (WebCore::CStringTranslator::equal): - (WebCore::CStringTranslator::translate): - (WebCore::operator==): - (WebCore::AtomicString::add): - (WebCore::equal): - (WebCore::UCharBufferTranslator::hash): - (WebCore::UCharBufferTranslator::equal): - (WebCore::UCharBufferTranslator::translate): - (WebCore::HashAndCharactersTranslator::hash): - (WebCore::HashAndCharactersTranslator::equal): - (WebCore::HashAndCharactersTranslator::translate): - (WebCore::AtomicString::find): - (WebCore::AtomicString::remove): - * wtf/text/AtomicStringTable.h: Removed. - * wtf/text/StringImpl.cpp: - (WebCore::StringImpl::~StringImpl): - * wtf/text/StringImpl.h: - (WebCore::StringImpl::inTable): - (WebCore::StringImpl::setInTable): - (WebCore::equal): - * wtf/text/StringImplBase.h: - (WTF::StringImplBase::StringImplBase): - -2010-05-03 Kevin Watters - - Reviewed by Kevin Ollivier. - - [wx] Implement scheduleDispatchFunctionsOnMainThread for wx port. - https://bugs.webkit.org/show_bug.cgi?id=38480 - - * wtf/wx/MainThreadWx.cpp: - (wxCallAfter::wxCallAfter): - (wxCallAfter::OnCallback): - (WTF::scheduleDispatchFunctionsOnMainThread): - -2010-05-03 Kevin Watters - - Reviewed by Kevin Ollivier. - - [wx] Build and use Mac's ComplexTextController to support complex text in wx. - https://bugs.webkit.org/show_bug.cgi?id=38482 - - * wtf/Platform.h: - -2010-05-03 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Interpreter crashes due to incorrect refcounting of cached structures. - https://bugs.webkit.org/show_bug.cgi?id=38491 - rdar://problem/7926160 - - Make sure we ref/deref structures used for cached custom property getters - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::derefStructures): - (JSC::CodeBlock::refStructures): - -2010-05-02 Laszlo Gombos - - Reviewed by Eric Seidel. - - [Qt] Enable JIT for QtWebKit on Symbian - https://bugs.webkit.org/show_bug.cgi?id=38339 - - JIT on Symbian has been stable for quite some time, it - is time to turn it on by default. - - * wtf/Platform.h: - -2010-04-29 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Add codegen support for unsigned right shift - https://bugs.webkit.org/show_bug.cgi?id=38375 - - Expose unsigned right shift in the macro assembler, and make use of it - from the jit. Currently if the result is outside the range 0..2^31-1 - we simply fall back to the slow case, even in JSVALUE64 and JSVALUE32_64 - where technically we could still return an immediate value. - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::urshift32): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::urshift32): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::urshift32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::shrl_i8r): - (JSC::X86Assembler::shrl_CLr): - Add unsigned right shift to the x86 assembler - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - op_rshift no longer simply get thrown to a stub function - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_urshift): - (JSC::JIT::emitSlow_op_urshift): - JSVALUE32 and JSVALUE64 implementation. Only supports - double lhs in JSVALUE64. - * jit/JITArithmetic32_64.cpp: - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_rshift): - (JSC::JIT::emit_op_urshift): - (JSC::JIT::emitSlow_op_urshift): - Refactor right shift code to have shared implementation between signed - and unsigned versions. - -2010-04-29 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Handle double on righthand side of a right shift - https://bugs.webkit.org/show_bug.cgi?id=38363 - - In 64-bit we support right shift of a double, and there's no - reason not to in 32-bit either. This is a 1.1% sunspider - improvement in 32bit. - - Given high performance javascript code frequently makes - use of bit operators to perform double->int conversion i'll - follow this patch up with similar patches for bitwise 'and' - and 'or'. - - * jit/JITArithmetic32_64.cpp: - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_rshift): - -2010-04-29 Oliver Hunt - - Reviewed by Geoff Garen. - - Hoist JSVALUE32_64 arithmetic implementations into a separate file. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emitSlow_op_jless): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emit_op_mod): - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::emit_op_div): - (JSC::JIT::compileBinaryArithOp): - * jit/JITArithmetic32_64.cpp: Added. - (JSC::JIT::emit_op_negate): - (JSC::JIT::emitSlow_op_negate): - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jless): - (JSC::JIT::emitSlow_op_jless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emitSlow_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_rshift): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emitSlow_op_bitand): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emitSlow_op_bitor): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emitSlow_op_bitxor): - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emitSlow_op_bitnot): - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emitSlow_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emitSlow_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emitSlow_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emitSlow_op_pre_dec): - (JSC::JIT::emit_op_add): - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSub32Constant): - (JSC::JIT::emitSlow_op_sub): - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emit_op_div): - (JSC::JIT::emitSlow_op_div): - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - -2010-04-29 Zoltan Herczeg - - Reviewed by Oliver Hunt - - Add sqrt() instruction support for ARM assembler (using VFP) - https://bugs.webkit.org/show_bug.cgi?id=38312 - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::): - (JSC::ARMAssembler::fsqrtd_r): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::supportsFloatingPointSqrt): - (JSC::MacroAssemblerARM::sqrtDouble): - -2010-04-29 Laszlo Gombos - - Reviewed by Simon Hausmann. - - [Qt] Refactor qtscriptglobal.h - https://bugs.webkit.org/show_bug.cgi?id=37953 - - Use the same pattern in qtscriptglobal.h as in - qwebkitglobal.h without checking for specific OSs. - - * qt/api/qtscriptglobal.h: - -2010-04-29 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - Small cleanup. - - QScriptValuePrivate constructor shouldn't take QScriptEngine pointer - as a parameter, because it breaks a private / public separation rule. - QScriptEnginePrivate::get(QScriptEngine*) should return - a QScriptEnginePrivate pointer instead of a QScriptEnginePtr, it simplifies - implementation. - - [Qt] QScriptValuePrivate class needs some cleanup. - https://bugs.webkit.org/show_bug.cgi?id=37729 - - * qt/api/qscriptengine_p.h: - (QScriptEnginePrivate::get): - * qt/api/qscriptvalue.cpp: - (QScriptValue::QScriptValue): - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::QScriptValuePrivate): - -2010-04-29 Kwang Yul Seo - - Reviewed by Simon Hausmann. - - [WINCE] Export g_stackBase with JS_EXPORTDATA - https://bugs.webkit.org/show_bug.cgi?id=37437 - - Export g_stackBase with JS_EXPORTDATA as it is used by SharedTimerWince.cpp. - - * runtime/Collector.cpp: - -2010-04-28 Oliver Hunt - - Do an unordered compare so that we don't treat NaN incorrectly. - - RS=Gavin Barraclough - - * jit/ThunkGenerators.cpp: - (JSC::powThunkGenerator): - -2010-04-28 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Add fast paths for Math.pow and Math.sqrt - https://bugs.webkit.org/show_bug.cgi?id=38294 - - Add specialized thunks for Math.pow and Math.sqrt. - This requires adding a sqrtDouble function to the MacroAssembler - and sqrtsd to the x86 assembler. - - Math.pow is slightly more complicated, in that we have - to implement exponentiation ourselves rather than relying - on hardware support. The inline exponentiation is restricted - to positive integer exponents on a numeric base. Exponentiation - is finally performed through the "Exponentiation by Squaring" - algorithm. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::supportsFloatingPointSqrt): - (JSC::MacroAssemblerARM::loadDouble): - (JSC::MacroAssemblerARM::sqrtDouble): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt): - (JSC::MacroAssemblerARMv7::sqrtDouble): - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::loadDouble): - (JSC::MacroAssemblerX86::supportsFloatingPointSqrt): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::sqrtDouble): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::loadDouble): - (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::movsd_mr): - (JSC::X86Assembler::sqrtsd_rr): - (JSC::X86Assembler::X86InstructionFormatter::twoByteOp): - (JSC::X86Assembler::X86InstructionFormatter::memoryModRM): - * create_hash_table: - * jit/JIT.h: - * jit/JITInlineMethods.h: - * jit/JITOpcodes.cpp: - * jit/JITStubs.h: - (JSC::JITThunks::ctiNativeCallThunk): - * jit/JSInterfaceJIT.h: - (JSC::JSInterfaceJIT::emitLoadDouble): - (JSC::JSInterfaceJIT::emitJumpIfImmediateNumber): - (JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber): - (JSC::JSInterfaceJIT::emitLoadInt32): - * jit/SpecializedThunkJIT.h: - (JSC::SpecializedThunkJIT::loadDoubleArgument): - (JSC::SpecializedThunkJIT::loadInt32Argument): - (JSC::SpecializedThunkJIT::returnJSValue): - (JSC::SpecializedThunkJIT::returnDouble): - (JSC::SpecializedThunkJIT::finalize): - * jit/ThunkGenerators.cpp: - (JSC::sqrtThunkGenerator): - (JSC::powThunkGenerator): - * jit/ThunkGenerators.h: - * runtime/Executable.h: - (JSC::NativeExecutable::NativeExecutable): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - -2010-04-28 Mike Thole - - Reviewed by Mark Rowe. - - Reenable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK now that an - exports file for it has been added. - - * wtf/Platform.h: - -2010-04-28 Mike Thole - - Build fix, not reviewed. - - * wtf/Platform.h: - Disable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK until an exports file is created. - -2010-04-28 Mike Thole - - Reviewed by David Kilzer. - - Add canAuthenticateAgainstProtectionSpace() to frame loader so that a protection space - can be inspected before attempting to authenticate against it - https://bugs.webkit.org/show_bug.cgi?id=38271 - - * wtf/Platform.h: Add WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK define. - -2010-04-28 Darin Adler - - Reviewed by Sam Weinig. - - Don't use CFAbsoluteTimeGetCurrent on Mac OS X, since it's just a cover - for gettimeofday anyway. - - * wtf/CurrentTime.cpp: - (WTF::currentTime): Remove the CF version of this. Change the "other POSIX" - version to pass 0 for the time zone instead of ignoring a return value. - Also get rid of unneeded type casts, since operations involving both - integers and doubles are always evaluated as doubles in C without explicit - type casting. - -2010-04-28 Darin Fisher - - Reviewed by David Levin. - - [Chromium] callOnMainThread should equate to MessageLoop::PostTask - https://bugs.webkit.org/show_bug.cgi?id=38276 - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - * wtf/MainThread.cpp: - * wtf/chromium/ChromiumThreading.h: - * wtf/chromium/MainThreadChromium.cpp: - (WTF::initializeMainThread): - (WTF::callOnMainThread): - (WTF::callOnMainThreadAndWait): - (WTF::setMainThreadCallbacksPaused): - (WTF::isMainThread): - -2010-04-28 Simon Hausmann , Kent Hansen - - Reviewed by Darin Adler. - - JSC's currentThreadStackBase is not reentrant on some platforms - https://bugs.webkit.org/show_bug.cgi?id=37195 - - This function needs to be reentrant to avoid memory corruption on platforms where - the implementation uses global variables. - - This patch adds a mutex lock where necessary and makes the Symbian implementation - reentrant. - - * runtime/Collector.cpp: - (JSC::currentThreadStackBaseMutex): - (JSC::currentThreadStackBase): - -2010-04-28 Thiago Macieira - - Reviewed by Simon Hausmann. - - Fix compilation with gcc 3.4. - - AtomicStringImpl.h:29: error: base `WebCore::StringImpl' with only - non-default constructor in class without a constructor - - * wtf/text/AtomicStringImpl.h: - (WebCore::AtomicStringImpl::AtomicStringImpl): Provide a default constructor. - * wtf/text/StringImpl.h: Allow AtomicStringImpl to call a StringImpl constructor through a friend declaration. - -2010-04-27 Stephanie Lewis - - Fix Tiger build. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::Carve): - -2010-04-26 Stephanie Lewis - - Reviewed by Geoff Garen. - - https://bugs.webkit.org/show_bug.cgi?id=38154 FastMalloc calls madvise too often. - REGRESSSION: 1.5% PLT regression due to 56028 (return memory quicker). - To save on madvise calls when recommitting memory recommit the entire span and then carve it - instead of carving the span up and only committing the part that will be used immediately. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::New): - (WTF::TCMalloc_PageHeap::AllocLarge): - (WTF::TCMalloc_PageHeap::Carve): - -2010-04-26 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Add specialized thunks for a char code related string functions - https://bugs.webkit.org/show_bug.cgi?id=38177 - - This is a simple extension to my prior patch. Basically hoist the - existing character loading logic from the charCodeAt thunk and into - a helper function, then add a helper to load strings from the small - string cache. This allows trivial implementations of fromCharCode - and charAt. - - * create_hash_table: - * jit/SpecializedThunkJIT.h: - (JSC::SpecializedThunkJIT::returnJSCell): - (JSC::SpecializedThunkJIT::tagReturnAsJSCell): - * jit/ThunkGenerators.cpp: - (JSC::stringCharLoad): - (JSC::charToString): - (JSC::charCodeAtThunkGenerator): - (JSC::charAtThunkGenerator): - (JSC::fromCharCodeThunkGenerator): - * jit/ThunkGenerators.h: - * runtime/SmallStrings.h: - (JSC::SmallStrings::singleCharacterStrings): - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - -2010-04-27 Thomas Zander - - Reviewed by Simon Hausmann. - - [Qt] Fix the build on Symbian on Linux using the Makefile based mkspec - - * JavaScriptCore.pri: It is necessary to specify the library search path - when linking against JavaScriptCore. - -2010-04-21 Jocelyn Turcotte - - Reviewed by Simon Hausmann. - - Compile fix for Visual Studio 2010 - https://bugs.webkit.org/show_bug.cgi?id=37867 - - Patch by Prasanth Ullattil - - * runtime/Structure.cpp: - (JSC::Structure::transitionTableAdd): - * wtf/MathExtras.h: - * wtf/Platform.h: - -2010-04-27 Jocelyn Turcotte - - Reviewed by Simon Hausmann. - - Rename COMPILER(MSVC7) to COMPILER(MSVC7_OR_LOWER) - - * config.h: - (JSC::Structure::transitionTableAdd): - * wtf/Assertions.h: - * wtf/Atomics.h: - * wtf/CurrentTime.h: - (WTF::getLocalTime): - * wtf/Platform.h: - * wtf/StaticConstructors.h: - * wtf/StringExtras.h: - * wtf/Vector.h: - (WTF::::append): - -2010-04-15 Jocelyn Turcotte - - Reviewed by Tor Arne Vestbø. - - [Qt] Fix Mac build break. - - https://bugs.webkit.org/show_bug.cgi?id=37867 - - Make sure JavaScriptCore's debug_and_release config follows that - of WebCore. - - Use different name for JavaScriptCore target in debug and release - since they might be written in the same path at the same time on - parallel builds - - Consolidate the DESTDIR determination logic in JavaScriptCore.pri - - * JavaScriptCore.pri: - * JavaScriptCore.pro: - -2010-04-21 Jocelyn Turcotte - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Make sure WebKit is not compiled using C++0x. - https://bugs.webkit.org/show_bug.cgi?id=37867 - - As the rest of Qt compiles in the C++0x mode, people might start - compiling it in this mode. WebKit don't support this yet. - - Patch by Thiago Macieira - - * JavaScriptCore.pro: - -2010-04-26 Oliver Hunt - - Fix windows - - * jit/SpecializedThunkJIT.h: - (JSC::SpecializedThunkJIT::argumentToVirtualRegister): - -2010-04-26 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Need to support more efficient dispatch of lightweight builtins - https://bugs.webkit.org/show_bug.cgi?id=38155 - - The problem with calling lightweight builtins is that marshalling - the call from the nitro calling convention to the system calling - convention is very expensive relative to the cost of the actually - evaluating the function. To work around this problem this patch - adds the ability to define a custom thunk for a builtin. - - This allows us to use high performance custom implementations of - the common and sensible versions of simple builtins. This patch - includes a simple (use of which is currently hardcoded) thunk for - charCodeAt. - - This adds a JSInterfaceJIT subclass called SpecializedThunkJIT - that has helper functions to remove (or at least reduce) the need - to have separate thunk implementations for each JSValue encoding. - - * GNUmakefile.am: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - Many project file updates - - * create_hash_table: - Add thunk generation callbacks to the hash tables, currently - we hardcode the script to only support charCodeAt - - * jit/JITStubCall.h: - * jit/JITStubs.cpp: - (JSC::JITThunks::~JITThunks): - (JSC::JITThunks::specializedThunk): - * jit/JITStubs.h: - * jit/SpecializedThunkJIT.h: Added. - (JSC::SpecializedThunkJIT::SpecializedThunkJIT): - (JSC::SpecializedThunkJIT::loadCellArgument): - (JSC::SpecializedThunkJIT::loadJSStringArgument): - (JSC::SpecializedThunkJIT::loadInt32Argument): - (JSC::SpecializedThunkJIT::appendFailure): - (JSC::SpecializedThunkJIT::returnInt32): - (JSC::SpecializedThunkJIT::finalize): - (JSC::SpecializedThunkJIT::argumentToVirtualRegister): - (JSC::SpecializedThunkJIT::tagReturnAsInt32): - * jit/ThunkGenerators.cpp: Added. - (JSC::ThunkHelpers::stringImplDataOffset): - (JSC::ThunkHelpers::jsStringLengthOffset): - (JSC::ThunkHelpers::jsStringValueOffset): - (JSC::charCodeAtThunkGenerator): - * jit/ThunkGenerators.h: Added. - * runtime/Executable.h: - (JSC::NativeExecutable::NativeExecutable): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - * runtime/JSFunction.h: - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::getThunk): - * runtime/JSString.h: - (JSC::): - * runtime/JSValue.h: - Protect some of the JSVALUE32 and JSVALUE32_64 only constants - and function behind appropriate USE() guards to make it harder - to use the wrong flags for the target build. - * runtime/Lookup.cpp: - (JSC::HashTable::createTable): - (JSC::setUpStaticFunctionSlot): - * runtime/Lookup.h: - (JSC::HashEntry::initialize): - (JSC::HashEntry::generator): - (JSC::HashEntry::): - Make the lookup tables use a specialized thunkGenerator - if present - * wtf/text/StringImpl.h: - -2010-04-26 Oliver Hunt - - Build fix - - * runtime/JSImmediate.h: - * runtime/JSValue.h: - -2010-04-26 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Factor some basic JS interface logic out of JIT and into a superclass - https://bugs.webkit.org/show_bug.cgi?id=38163 - - Create JSInterfaceJIT to hold some common low level functions for - interacting with the JS RegisterFile. Doing this separately from - https://bugs.webkit.org/show_bug.cgi?id=38155 to ease reviewing. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::emitJumpSlowCaseIfNotJSCell): - * jit/JSInterfaceJIT.h: Added. - (JSC::JSInterfaceJIT::emitLoadJSCell): - (JSC::JSInterfaceJIT::emitJumpIfNotJSCell): - (JSC::JSInterfaceJIT::emitLoadInt32): - (JSC::JSInterfaceJIT::tagFor): - (JSC::JSInterfaceJIT::payloadFor): - (JSC::JSInterfaceJIT::addressFor): - -2010-04-26 Sam Weinig - - Fix Tiger build. - - * wtf/mac/MainThreadMac.mm: - (WTF::isMainThread): - -2010-04-26 Geoffrey Garen - - Reviewed by Sam Weinig. - - - - Fixed a crash seen when using the JavaScriptCore API with WebKit. - - No layout test because DumpRenderTree doesn't use the JavaScriptCore API - in this way. - - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::setGlobalObject): - (JSC::RegisterFile::clearGlobalObject): - (JSC::RegisterFile::globalObject): - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): Use WeakGCPtr for managing m_globalObject, - since it's a weak pointer. (We never noticed this error before because, - in WebKit, global objects always have a self-reference in a global variable, - so marking the register file's global variables would keep m_globalObject - alive. In the JavaScriptCore API, you can allocate a global object with - no self-reference.) - - * runtime/JSActivation.h: Removed unneeded #include. - - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::~JSGlobalObject): Don't use ==, since a weak - pointer is 0 when the object it points to runs its destructor. - - * runtime/WeakGCPtr.h: - (JSC::WeakGCPtr::clear): Changed to return a bool indicating whether the - clear actually happened. - (JSC::WeakGCPtr::assign): Changed to forbid assignment of 0 as a shorthand - for calling clear(). A client should never clear by assigning 0, since - clear() should be conditional on whether the object doing the clearing - is still pointed to by the weak pointer. (Otherwise, a zombie object might - clear a pointer to a new, valid object.) - -2010-04-25 Sam Weinig - - Reviewed by Maciej Stachowiak. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=38097 - Disentangle initializing the main thread from initializing threading - - This is the first step in getting rid of the WEB_THREAD #define and - paving the way to allowing mac both WebKit and WebKit2 to use the same - WebCore. - - * JavaScriptCore.exp: Export initializeMainThread and initializeMainThreadToProcessMainThread. - * JavaScriptCore.xcodeproj/project.pbxproj: Sort files. - - * wtf/MainThread.cpp: - (WTF::mainThreadInitializationMutex): - (WTF::mainThreadFunctionQueueMutex): - (WTF::initializeMainThread): - (WTF::deprecatedInitializeMainThread): - * wtf/MainThread.h: - Added Mac only initializeMainThreadToProcessMainThread which sets up callOnMainThread - and isMainThead calls to assume that WebCore's main thread is also the - process's main thread. Since it is possible that both initializeMainThread - and initializeMainThreadToProcessMainThread could be called, the first one called - wins (either will work). - - * wtf/Threading.h: Moved to top of file. - - * wtf/ThreadingPthreads.cpp: - (WTF::initializeThreading): Remove call to initializeMainThread. - * wtf/ThreadingWin.cpp: - (WTF::initializeThreading): Ditto. - * wtf/gtk/ThreadingGtk.cpp: - (WTF::initializeThreading): Ditto. - - * wtf/mac/MainThreadMac.mm: - (WTF::initializeMainThreadPlatform): - (WTF::initializeMainThreadToProcessMainThread): - (WTF::scheduleDispatchFunctionsOnMainThread): - (WTF::isMainThread): - Add runtime switch between the old behavior of using the system's main - thread and a stored pointer to the main thread. Tiger always uses the - system's main thread. - - * wtf/qt/ThreadingQt.cpp: - (WTF::initializeThreading): Remove call to initializeMainThread. - * wtf/win/MainThreadWin.cpp: - (WTF::initializeMainThreadPlatform): Add call to initializeCurrentThreadInternal - removed from initializeThreading. - -2010-04-26 Jedrzej Nowacki - - Reviewed by Kenneth Rohde Christiansen. - - Fix a memory leak in the QScriptString. - - QScriptStringPrivate's constructor shouldn't call JSStringRetain as - QScriptConverter implicitly pass a JSStringRef ownership. - - [Qt] QScriptStringPrivate c'tor problem - https://bugs.webkit.org/show_bug.cgi?id=38110 - - * qt/api/qscriptstring_p.h: - (QScriptStringPrivate::QScriptStringPrivate): - -2010-04-24 Darin Adler - - Reviewed by Dan Bernstein. - - REGRESSION (r56560): Crash in parseFloat if passed invalid UTF-16 data - https://bugs.webkit.org/show_bug.cgi?id=38083 - rdar://problem/7901044 - - Tests: fast/js/ToNumber.html - fast/js/parseFloat.html - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::parseInt): Added a FIXME comment about a problem I noticed. - (JSC::parseFloat): Added a FIXME comment about a problem I noticed; - covered by test cases in the test I added. - * runtime/UString.cpp: - (JSC::UString::toDouble): Added FIXME comments about two problems I - noticed; covered by test cases in the tests I added. Added a return - statement so we don't crash when illegal UTF-16 sequences are present. - -2010-04-24 Anton Muhin - - Reviewed by Darin Adler. - - Allow to construct HashTraits::constructDeletedValue - - Former implementation attempted to use AtomicString(HashTableDeletedValue) - however those values cannot be used that way: one cannot construct - QualifiedNameImpl out of such AtomicString as we'll try to lookup this string - in the table, for example. - https://bugs.webkit.org/show_bug.cgi?id=37722 - - * wtf/RefPtr.h: expose hash table deleted value - -2010-04-23 Sam Weinig - - Reviewed by David Levin. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=38060 - Split up Threading.h - - Move bits for of Threading.h into 3 new files. - - Atomics.h for atomic operations. - - ThreadSafeShared.h for the ThreadSafeShared class. - - ThreadingPrimitives.h for the primitives and platform types. - - Basic threading operations (creation, etc.) remain in Threading.h. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/Atomics.h: Copied from wtf/Threading.h. - * wtf/ThreadSafeShared.h: Copied from wtf/Threading.h. - * wtf/Threading.h: - * wtf/ThreadingPrimitives.h: Copied from wtf/Threading.h. - -2010-04-23 Sam Weinig - - Fix Qt build. - - * wtf/qt/MainThreadQt.cpp: #include - -2010-04-22 Sam Weinig - - Reviewed by Anders Carlsson. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=38022 - Move isMainThread predicate function to MainThread.h - - * wtf/MainThread.cpp: - (WTF::initializeMainThread): - (WTF::isMainThread): - * wtf/MainThread.h: - * wtf/Threading.h: - * wtf/ThreadingPthreads.cpp: - (WTF::initializeThreading): - * wtf/ThreadingWin.cpp: - (WTF::initializeThreading): - * wtf/gtk/ThreadingGtk.cpp: - (WTF::initializeThreading): - * wtf/mac/MainThreadMac.mm: - (WTF::initializeMainThreadPlatform): - (WTF::isMainThread): - * wtf/qt/MainThreadQt.cpp: - (WTF::isMainThread): - * wtf/qt/ThreadingQt.cpp: - (WTF::initializeThreading): - * wtf/text/AtomicString.cpp: - -2010-04-23 Gabor Rapcsanyi - - Reviewed by Laszlo Gombos. - - Add RVCT support for Linux - - Developed in cooperation with Gabor Loki. - - * API/JSStringRef.h: - * jit/ExecutableAllocator.h: - * jit/ExecutableAllocatorPosix.cpp: - (JSC::ExecutableAllocator::cacheFlush): - * jit/JITStubs.cpp: - * wtf/MathExtras.h: - * wtf/unicode/qt4/UnicodeQt4.h: - -2010-04-23 Patrick Gansterer - - Reviewed by Laszlo Gombos. - - [WIN] Move OwnPtrWin.cpp into platform specific folder. - https://bugs.webkit.org/show_bug.cgi?id=38042 - - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * wtf/OwnPtrWin.cpp: Removed. - * wtf/win/OwnPtrWin.cpp: Copied from JavaScriptCore/wtf/OwnPtrWin.cpp. - -2010-04-23 Patrick Gansterer - - Reviewed by Laszlo Gombos. - - [BREWMP] Move OwnPtrBrew.cpp into platform specific folder. - https://bugs.webkit.org/show_bug.cgi?id=38042 - - * wtf/OwnPtrBrew.cpp: Removed. - * wtf/brew/OwnPtrBrew.cpp: Copied from JavaScriptCore/wtf/OwnPtrBrew.cpp. - -2010-04-22 Steve Block - - Reviewed by Adam Barth. - - Update Android to use isfinite, isinf, isnan and signbit from namespace std. - https://bugs.webkit.org/show_bug.cgi?id=37948 - - * wtf/MathExtras.h: - -2010-04-22 Fumitoshi Ukai - - Unreviewed build fix. - - * wtf/MD5.cpp: fix include path of CString.h - -2010-04-22 Fumitoshi Ukai - - Reviewed by Adam Barth. - - MD5 is required for WebSocket new protocol implementation - https://bugs.webkit.org/show_bug.cgi?id=37913 - - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/MD5.cpp: Added. - * wtf/MD5.h: Added. - -2010-04-22 Gavin Barraclough - - Reviewed by NOBODY (build fix). - Errk, accidentally committed commenting out two ASSERTs! reverting. - - * runtime/Collector.cpp: - (JSC::Heap::protect): - (JSC::Heap::unprotect): - -2010-04-22 Gavin Barraclough - - Reviewed by Geoff Garen. - - https://bugs.webkit.org/show_bug.cgi?id=38006 - Change lifetime of JSC::IdentifierTables used by WebCores to match AtomicStringTable - - Presently JSC's IdentifierTables are owned by the JSGlobalData. For - JSGlobalData objects created via the API this should continue to be the case, - but for the JSGlobalData objects used by WebCore (the main thread's common - global data, and those for workers) use a IdentifierTable provided (and owned) - by wtfThreadData. This allow the lifetime of these IdentifierTable to match - those of the corresponding AtomicStringTables. - - * API/APIShims.h: - (JSC::APIEntryShim::APIEntryShim): - * API/JSContextRef.cpp: - (JSContextGroupCreate): - * runtime/Collector.cpp: - (JSC::Heap::protect): - (JSC::Heap::unprotect): - (JSC::Heap::markRoots): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::~JSGlobalData): - (JSC::JSGlobalData::createContextGroup): - (JSC::JSGlobalData::create): - (JSC::JSGlobalData::sharedInstance): - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::): - (JSC::JSGlobalData::isSharedInstance): - * runtime/JSLock.cpp: - (JSC::JSLock::JSLock): - (JSC::JSLock::lock): - (JSC::JSLock::unlock): - (JSC::JSLock::DropAllLocks::DropAllLocks): - * wtf/WTFThreadData.cpp: - (WTF::WTFThreadData::WTFThreadData): - (WTF::WTFThreadData::~WTFThreadData): - -2010-04-22 Sheriff Bot - - Unreviewed, rolling out r58110. - http://trac.webkit.org/changeset/58110 - https://bugs.webkit.org/show_bug.cgi?id=38007 - - Caused an internal compiler error on Qt (Requested by abarth - on #webkit). - - * wtf/MathExtras.h: - -2010-04-22 Gavin Barraclough - - Reviewed by NOBODY (windows build fix). - - * API/JSWeakObjectMapRefPrivate.cpp: - -2010-04-22 Gavin Barraclough - - Reviewed by NOBODY (windows build fix). - - * API/JSBase.cpp: - * API/JSCallbackObject.cpp: - -2010-04-22 Gavin Barraclough - - Reviewed by Geoff Garen. - - https://bugs.webkit.org/show_bug.cgi?id=37978 - Unify JSC::IdentifierTable and WebCore::AtomicStringTable implementations. - - These two classes both implement a HashSet of uniqued StringImpls, with - translator classes to avoid unnecessary object creation. The only difference - between the classes is which flag (isIdentifier or inTable) is set. - Combine the two classes using a template predicated on which flag to use. - - New class AtomicStringTable created, containing all the goodness from - IdentifierTable & AtomicStringTable, expect for Identifier's literalTable, - which has been moved onto JSGlobalData. Removed duplicate string translator - classes. Renamed StringImpl's inTable flag to more explicit 'isAtomic', - and set this on the empty string (which matches Identifier behaviour, and - removes a redundant check for zero-length). - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/Identifier.cpp: - (JSC::createLiteralTable): - (JSC::deleteLiteralTable): - (JSC::Identifier::add): - (JSC::Identifier::addSlowCase): - * runtime/Identifier.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::~JSGlobalData): - * runtime/JSGlobalData.h: - * wtf/WTFThreadData.cpp: - (WTF::WTFThreadData::WTFThreadData): - (WTF::WTFThreadData::~WTFThreadData): - * wtf/WTFThreadData.h: - (WTF::WTFThreadData::atomicStringTable): - * wtf/text/AtomicString.cpp: - (WebCore::table): - (WebCore::operator==): - (WebCore::AtomicString::add): - (WebCore::AtomicString::find): - (WebCore::AtomicString::remove): - * wtf/text/AtomicStringTable.h: Added. - (WTF::CStringTranslator::hash): - (WTF::CStringTranslator::equal): - (WTF::CStringTranslator::translate): - (WTF::UCharBufferTranslator::hash): - (WTF::UCharBufferTranslator::equal): - (WTF::UCharBufferTranslator::translate): - (WTF::HashAndCharactersTranslator::hash): - (WTF::HashAndCharactersTranslator::equal): - (WTF::HashAndCharactersTranslator::translate): - (WTF::IdentifierOrAtomicStringTable::remove): - (WTF::::~IdentifierOrAtomicStringTable): - (WTF::::add): - (WTF::::find): - * wtf/text/StringImpl.cpp: - (WebCore::StringImpl::~StringImpl): - * wtf/text/StringImpl.h: - (WebCore::StringImpl::isAtomic): - (WebCore::StringImpl::setIsAtomic): - (WebCore::equal): - * wtf/text/StringImplBase.h: - (WTF::StringImplBase::StringImplBase): - -2010-04-22 Steve Block - - Reviewed by Adam Barth. - - Update Android to use isfinite, isinf, isnan and signbit from namespace std. - https://bugs.webkit.org/show_bug.cgi?id=37948 - - * wtf/MathExtras.h: - -2010-04-22 Jocelyn Turcotte - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Remove dependency of JSC to QtGui - https://bugs.webkit.org/show_bug.cgi?id=37867 - - The patch also make sure that hal.h is in the include path on Symbian. - The dependency to QtGui took care of that before. - - Patch by Thiago Macieira - and Rohan McGovern - - * JavaScriptCore.pri: - * JavaScriptCore.pro: - -2010-04-22 Jocelyn Turcotte - - Reviewed by Tor Arne Vestbø. - - [Qt] Corrects symbols visibility for JavaScriptCore. - - https://bugs.webkit.org/show_bug.cgi?id=37867 - - * JavaScriptCore.pro: - -2010-04-22 Gabor Loki - - Reviewed by Gavin Barraclough. - - Use BLX and BX to keep happy the return stack predictor above ARMv4 - https://bugs.webkit.org/show_bug.cgi?id=37862 - - Inspired by Jacob Bramley's patch from JaegerMonkey - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::executableCopy): - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::): - (JSC::ARMAssembler::bx): - (JSC::ARMAssembler::blx): - (JSC::ARMAssembler::loadBranchTarget): - (JSC::ARMAssembler::jmp): - (JSC::ARMAssembler::getLdrImmAddress): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::jump): - (JSC::MacroAssemblerARM::nearCall): - (JSC::MacroAssemblerARM::call): - (JSC::MacroAssemblerARM::ret): - (JSC::MacroAssemblerARM::prepareCall): - (JSC::MacroAssemblerARM::call32): - -2010-04-21 Andy Estes - - Rubber stamped by Mark Rowe. - - Export WTF::deleteOwnedPtr(HFONT). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-04-21 Gavin Barraclough - - Rubber Stamped by Oliver Hunt. - - Make SmallStrings store an array of RefPtr, - instead of a direct array of StringImpls. This allows - us to remove a friend (and a layering violation) from - WTF::StringImpl, and makes it so that all StringImpls - are individually heap allocated. - - * runtime/SmallStrings.cpp: - (JSC::SmallStringsStorage::rep): - (JSC::SmallStringsStorage::SmallStringsStorage): - * wtf/text/StringImpl.h: - -2010-04-21 Sam Weinig - - Reviewed by Geoffrey Garen. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=37937 - Wean JavaScriptCore off calls to isMainThread() - - - Replace use of isMainThread() for interpreter reentry checks - with a stored value on the JSGlobalData. - - Replace use of isMainThread() for useMainThread only check in the - collector with a stored exclusive thread. - - * API/JSContextRef.cpp: - (JSContextGroupCreate): - Always default to a small stack type for uses of the JSC API. It is - unlikely that the interpreter reentry required on the web will be as - important for other uses of JavaScriptCore. - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Update exports. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - (JSC::Interpreter::prepareForRepeatCall): - Use new stored JSGlobalData::maxReentryDepth instead of isMainThread(). - - * interpreter/Interpreter.h: - Rename MaxMainThreadReentryDepth to MaxLargeThreadReentryDepth and - MaxSecondaryThreadReentryDepth to MaxSmallThreadReentryDepth. - - * jsc.cpp: - (main): Use the a large stack for jsc since it is always using the - main thread. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - Use new stored JSGlobalData::maxReentryDepth instead of isMainThread(). - - * runtime/Collector.cpp: - (JSC::Heap::registerThread): - Use the concept of making JSC run on an exclusiveThread instead of - forcing a mainThreadOnly assertion. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::createNonDefault): - (JSC::JSGlobalData::create): - (JSC::JSGlobalData::createLeaked): - (JSC::JSGlobalData::sharedInstance): - * runtime/JSGlobalData.h: - Add ThreadStackType argument to JSGlobalData constructors and set - maxReentryDepth based on it. - -2010-04-21 Gavin Barraclough - - Reviewed by NOBODY (windows build fix pt. 3). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-04-21 Gavin Barraclough - - Reviewed by NOBODY (windows build fix pt. 2). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-04-21 Gavin Barraclough - - Reviewed by NOBODY (Qt build fix). - - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * wtf/qt/StringQt.cpp: Copied from WebCore/platform/text/qt/StringQt.cpp. - -2010-04-21 Gavin Barraclough - - Reviewed by NOBODY (windows build fix). - - * API/JSValueRef.cpp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * runtime/Identifier.cpp: - (JSC::IdentifierTable::~IdentifierTable): - (JSC::IdentifierTable::add): - * runtime/Identifier.h: - * wtf/WTFThreadData.h: - (JSC::IdentifierTable::remove): - (JSC::IdentifierTable::literalTable): - * wtf/text/StringImpl.cpp: - (WebCore::StringImpl::~StringImpl): - -2010-04-20 Gavin Barraclough - - Reviewed by Oliver Hunt, Darin Adler. - - Bug 37906 - Remove JSC::UStringImpl; unify with StringImpl. - - JSC::UStringImpl and WebCore::StringImpl (soon to be renamed to - WTF::StringImpl) are almost identical. Remove duplication of code by unifying - the two, move missing features from UStringImpl into StringImpl & delete the - class UStringImpl. - - * API/JSClassRef.cpp: - * API/JSContextRef.cpp: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pro: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/EvalCodeCache.h: - * bytecode/JumpTable.cpp: - * profiler/ProfileNode.cpp: - * runtime/Identifier.cpp: - (JSC::Identifier::add): - * runtime/Identifier.h: - (JSC::Identifier::equal): - * runtime/UString.cpp: - * runtime/UString.h: - (WTF::): - * runtime/UStringImpl.cpp: Removed. - * runtime/UStringImpl.h: - * wtf/text/StringHash.h: - (WebCore::StringHash::equal): - (WebCore::CaseFoldingHash::equal): - * wtf/text/StringImpl.cpp: - (WebCore::StringImpl::~StringImpl): - (WebCore::StringImpl::empty): - (WebCore::StringImpl::sharedBuffer): - (WebCore::equal): - * wtf/text/StringImpl.h: - (WebCore::StringImpl::StringImpl): - (WebCore::StringImpl::create): - (WebCore::StringImpl::tryCreateUninitialized): - (WebCore::StringImpl::cost): - (WebCore::StringImpl::isIdentifier): - (WebCore::StringImpl::setIsIdentifier): - (WebCore::StringImpl::computeHash): - (WebCore::StringImpl::copyChars): - (WebCore::StringImpl::): - -2010-04-21 Patrick Gansterer - - Reviewed by Darin Adler. - - Added missing #include "Lookup.h" in LUT source files. - https://bugs.webkit.org/show_bug.cgi?id=37903 - - * runtime/ArrayPrototype.cpp: - * runtime/DatePrototype.cpp: - * runtime/JSONObject.cpp: - * runtime/MathObject.cpp: - * runtime/NumberConstructor.cpp: - * runtime/RegExpConstructor.cpp: - * runtime/RegExpObject.cpp: - * runtime/StringPrototype.cpp: - -2010-04-21 Gustavo Sverzut Barbieri - - Reviewed by Nikolas Zimmermann. - - Add missing EFL JavaScriptCore file. - http://webkit.org/b/37854 - - * wtf/efl: Added. - * wtf/efl/MainThreadEfl.cpp: Added. - (WTF::initializeMainThreadPlatform): - (WTF::timeoutFired): - (WTF::scheduleDispatchFunctionsOnMainThread): - -2010-04-20 Xan Lopez - - Another attempt to fix the build. - - * GNUmakefile.am: - -2010-04-20 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - [ES5] RegExp literals are constants that should be persistent across multiple function calls. - https://bugs.webkit.org/show_bug.cgi?id=37908 - - Dump the separate RegExp constant pool, and just use the standard JS constant pool - in codeblock. This allows us to drop op_new_regexp and all associated code as well. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitLoad): - * bytecompiler/BytecodeGenerator.h: - * bytecompiler/NodesCodegen.cpp: - (JSC::RegExpNode::emitBytecode): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - * jit/JITStubs.cpp: - * jit/JITStubs.h: - (JSC::): - -2010-04-20 Oliver Hunt - - Fix license on create_regex_tables - - * create_regex_tables: - -2010-04-20 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Fix gtk - - * GNUmakefile.am: - * make-generated-sources.sh: - -2010-04-20 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Bug 37895 - Share common code from UStringImplBase with StringImpl - - The implementation of StringImpl & UStringImpl is very similar. Restructure - StringImpl to match UStringImpl, moving the flags and length into a base class, - so that this can be shared between both string types to increase code reuse. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/RopeImpl.h: - (JSC::RopeImpl::RopeImpl): - * runtime/UStringImpl.h: - (JSC::UStringImpl::UStringImpl): - * wtf/text/StringImpl.h: - (WebCore::StringImpl::StringImpl): - (WebCore::StringImpl::characters): - * wtf/text/StringImplBase.h: Copied from JavaScriptCore/runtime/UStringImpl.h. - (WTF::StringImplBase::length): - (WTF::StringImplBase::operator new): - (WTF::StringImplBase::StringImplBase): - -2010-04-20 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Autogenerate yarr character tables - https://bugs.webkit.org/show_bug.cgi?id=37877 - - Use a python script to automatically generate character tables - for the builtin YARR character classes. This allows us to generate - actual tables as well, by using these tables we can both increase - performance of the check (for complex builtins) and reduce the actual - code size. - - 4-8% win on string-unpack-code, but lots of noise on other tests so - i'm only confident saying its a 1% win overall. - - * DerivedSources.make: - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::ExtendedAddress::ExtendedAddress): - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::branchTest8): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::branchTest8): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::branchTest8): - * assembler/X86Assembler.h: - (JSC::X86Assembler::cmpb_im): - (JSC::X86Assembler::testb_im): - * bytecode/SamplingTool.cpp: - (JSC::SamplingTool::dump): - * create_regex_tables: Added. - * yarr/RegexCompiler.cpp: - (JSC::Yarr::CharacterClassConstructor::charClass): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::matchCharacterClass): - (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy): - (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy): - (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy): - * yarr/RegexPattern.h: - (JSC::Yarr::CharacterClassTable::create): - (JSC::Yarr::CharacterClassTable::CharacterClassTable): - (JSC::Yarr::CharacterClass::CharacterClass): - -2010-04-20 Gavin Barraclough - - Reviewed by NOBODY (speculative windows fix - missed a bit!). - - * wtf/text/AtomicString.h: - -2010-04-20 Gavin Barraclough - - Reviewed by NOBODY (speculative windows fix). - - * wtf/text/AtomicString.h: - -2010-04-20 Gavin Barraclough - - Reviewed by NOBODY (windows build fix). - - Add missing .def file entries. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-04-20 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 37869 - Move URopeImpl to its own .h/.cpp - - Currently Ropes are implemented by the class URopeImpl, which is defined in - UStringImpl.h, and then typedefed to the name JSString::Rope. Remove the - typedef, and rename all uses of URopeImpl and JSString::Rope to just RopeImpl. - - Move RopeImpl to its own header, and remove all remaining references to ropes - from UStringImpl (rename UStringOrRopeImpl to UStringImplBase, rename or move - the isRope & deref methods from UStringOrRopeImpl). - - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - * runtime/JSString.h: - (JSC::): - (JSC::RopeBuilder::JSString): - (JSC::RopeBuilder::~JSString): - (JSC::RopeBuilder::appendStringInConstruct): - (JSC::RopeBuilder::JSStringFinalizerStruct::): - * runtime/RopeImpl.cpp: Copied from JavaScriptCore/runtime/UStringImpl.cpp. - (JSC::RopeImpl::derefFibersNonRecursive): - (JSC::RopeImpl::destructNonRecursive): - * runtime/RopeImpl.h: Copied from JavaScriptCore/runtime/UStringImpl.h. - (JSC::RopeImpl::tryCreateUninitialized): - (JSC::RopeImpl::isRope): - (JSC::RopeImpl::deref): - (JSC::RopeImpl::RopeImpl): - * runtime/UStringImpl.cpp: - * runtime/UStringImpl.h: - (JSC::UStringImplBase::isInvalid): - (JSC::UStringImplBase::ref): - (JSC::UStringImplBase::UStringImplBase): - (JSC::UStringImplBase::): - (JSC::UStringImpl::UStringImpl): - -2010-04-20 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 37828 - Move WebCore's String classes to WTF - - Move these classes up to WTF so they are available to all clients of WTF (in - particular JSC). - - As a first patch, making the most minimal change possible, since this patch - could easily grow rather large since we'll have to change every class forward - declaration ( e.g. every "namespace WebCore { class String; }" much change to - "namespace WTF { class String; }"). - - Moving the files, but leaving the classes logically in the WebCore namespace - - which is technically a layering violation - I'll come back and fix this up in a - subsequent patch. - - * Android.mk: - * Android.v8.wtf.mk: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * config.h: - * wtf/StaticConstructors.h: Copied from WebCore/platform/StaticConstructors.h. - * wtf/text/AtomicString.cpp: Copied from WebCore/platform/text/AtomicString.cpp. - * wtf/text/AtomicString.h: Copied from WebCore/platform/text/AtomicString.h. - * wtf/text/AtomicStringImpl.h: Copied from WebCore/platform/text/AtomicStringImpl.h. - * wtf/text/StringBuffer.h: Copied from WebCore/platform/text/StringBuffer.h. - * wtf/text/StringHash.h: Copied from WebCore/platform/text/StringHash.h. - * wtf/text/StringImpl.cpp: Copied from WebCore/platform/text/StringImpl.cpp. - * wtf/text/StringImpl.h: Copied from WebCore/platform/text/StringImpl.h. - * wtf/text/WTFString.cpp: Copied from WebCore/platform/text/String.cpp. - (WebCore::charactersToFloat): - * wtf/text/WTFString.h: Copied from WebCore/platform/text/PlatformString.h. - -2010-04-20 Csaba Osztrogonác - - [Qt] Unreviewed speculative buildfix for WinCE after r57882 - https://bugs.webkit.org/show_bug.cgi?id=37701 - - * JavaScriptCore.pri: missing wince* case added. - -2010-04-20 Gavin Barraclough - - Reviewed by NOBODY (build fix). - Speculative Chromium/Win build fix, attempt #2. - - * config.h: - -2010-04-20 Gavin Barraclough - - Reviewed by NOBODY (build fix). - Speculative Chromium/Win build fix. - - * config.h: JS_EXPORTDATA should do nothing on !JSC builds. - -2010-04-20 Csaba Osztrogonác - - Reviewed by Simon Hausmann. - - [Qt] Target(WebCore,jsc,...) must depends on static library of JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=37701 - - * JavaScriptCore.pri: dependency added. - -2010-04-20 Gavin Barraclough - - Rubber stamped by Maciej Stachowiak (relanding r57829). - Added missing JS_EXPORTDATA - - * API/APIShims.h: - (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): - (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): - (JSC::APICallbackShim::APICallbackShim): - (JSC::APICallbackShim::~APICallbackShim): - * API/JSContextRef.cpp: - * Android.mk: - * Android.v8.wtf.mk: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - * runtime/Identifier.cpp: - (JSC::Identifier::remove): - (JSC::Identifier::checkCurrentIdentifierTable): - * runtime/Identifier.h: - * runtime/InitializeThreading.cpp: - (JSC::initializeThreadingOnce): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::create): - * wtf/WTFThreadData.cpp: Copied from JavaScriptCore/wtf/WTFThreadData.cpp. - * wtf/WTFThreadData.h: Copied from JavaScriptCore/wtf/WTFThreadData.h. - -2010-04-19 Gavin Barraclough - - Reviewed by NOBODY (rolling out r57829). - This broke windows. - - * API/APIShims.h: - (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): - (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): - (JSC::APICallbackShim::APICallbackShim): - (JSC::APICallbackShim::~APICallbackShim): - * API/JSContextRef.cpp: - * Android.mk: - * Android.v8.wtf.mk: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - * runtime/Identifier.cpp: - (JSC::Identifier::remove): - (JSC::Identifier::checkCurrentIdentifierTable): - (JSC::createIdentifierTableSpecificCallback): - (JSC::createIdentifierTableSpecific): - * runtime/Identifier.h: - (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData): - (JSC::defaultIdentifierTable): - (JSC::setDefaultIdentifierTable): - (JSC::currentIdentifierTable): - (JSC::setCurrentIdentifierTable): - (JSC::resetCurrentIdentifierTable): - * runtime/InitializeThreading.cpp: - (JSC::initializeThreadingOnce): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::create): - * wtf/WTFThreadData.cpp: Removed. - * wtf/WTFThreadData.h: Removed. - -2010-04-19 Douglas Gregor - - Reviewed and landed by Anders Carlsson. - - * runtime/UStringImpl.h: - Fix class/struct declaration mismatches. - -2010-04-19 Geoffrey Garen - - Reviewed by Beth Dakin. - - Checked in these tests I wrote becuase Balazs Kelemen wanted to use them. - - * tests/perf: Added. - * tests/perf/bench-allocate-nonretained.js: Added. - * tests/perf/bench-allocate-retained.js: Added. - -2010-04-19 Gavin Barraclough - - Reviewed by NOBODY (windows build fix). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-04-16 Gavin Barraclough - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=37745 - Move string uniquing tables to (new) WTFThreadData class. - - Remove AtomicString's dependency on ThreadGlobalData so that we can move - WebCore's string classes up to WTF. - - WTFThreadData.cpp/.h are based on ThreadGlobalData from WebCore. - Moved JSC & WebCore's string uniquing tables to this class. - - This patch introduces a temporary layering violation in providing forward - declarations of classes from JSC and WTF; this will be resolved as we move - more string code up to WTF. - - * API/APIShims.h: - (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): - (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): - (JSC::APICallbackShim::APICallbackShim): - (JSC::APICallbackShim::~APICallbackShim): - * API/JSContextRef.cpp: - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - * runtime/Identifier.cpp: - (JSC::Identifier::remove): - (JSC::Identifier::checkCurrentIdentifierTable): - * runtime/Identifier.h: - * runtime/InitializeThreading.cpp: - (JSC::initializeThreadingOnce): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::create): - * wtf/WTFThreadData.cpp: Copied from WebCore/platform/ThreadGlobalData.cpp. - (WTF::WTFThreadData::WTFThreadData): - (WTF::WTFThreadData::~WTFThreadData): - * wtf/WTFThreadData.h: Copied from WebCore/platform/ThreadGlobalData.h. - (WTF::WTFThreadData::atomicStringTable): - (WTF::WTFThreadData::initializeIdentifierTable): - (WTF::WTFThreadData::currentIdentifierTable): - (WTF::WTFThreadData::setCurrentIdentifierTable): - (WTF::WTFThreadData::resetCurrentIdentifierTable): - (WTF::wtfThreadData): - -2010-04-19 Jocelyn Turcotte - - Reviewed by Simon Hausmann. - - [Qt] Build fix for WinCE. - - Moved the include of the non-existing errno.h header file inside - platform guard macros. - - * jit/ExecutableAllocatorFixedVMPool.cpp: - -2010-04-18 Kwang Yul Seo - - Reviewed by Laszlo Gombos. - - [WINCE] Don't define WTF_CPU_MIDDLE_ENDIAN=1 - https://bugs.webkit.org/show_bug.cgi?id=37434 - - Windows CE supports little-endian format only, so don't define - WTF_CPU_MIDDLE_ENDIAN=1. - - * wtf/Platform.h: - -2010-04-18 Simon Hausmann - - Reviewed by Laszlo Gombos. - - [Qt] Fix JavaScriptCore's include path for WinCE builds - - https://bugs.webkit.org/show_bug.cgi?id=36751 - - * JavaScriptCore.pri: - -2010-04-16 Gavin Barraclough - - Reviewed by nobody, build fix. - -2010-04-16 Gavin Barraclough - - Reviewed by nobody, build fix. - -2010-04-16 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Bug 37730 - Remove JSC::UString dependencies from WebCore::StringImpl - (Following on from bug #37675). - - Make the argument ordering for UStringImpl's constructor & create - methods match, when passed a shared buffer. - - * JavaScriptCore.exp: - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::create): - * runtime/UStringImpl.h: - -2010-04-15 Jedrzej Nowacki - - Reviewed by Kenneth Rohde Christiansen. - - Fix memory leak in QScriptEngine::evaluate(). - - QScriptEnginePrivate::evaluate should release temporary variables. - - [Qt] QScriptEngine::evaluate has memory leak. - https://bugs.webkit.org/show_bug.cgi?id=37596 - - * qt/api/qscriptengine_p.cpp: - (QScriptEnginePrivate::evaluate): - * qt/api/qscriptengine_p.h: - -2010-04-14 Jedrzej Nowacki - - Reviewed by Kenneth Rohde Christiansen. - - Fix a memory leak in QScriptValue::inherits. - - [Qt] QScriptValue::inherits has a memory leak. - https://bugs.webkit.org/show_bug.cgi?id=37617 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::inherits): - -2010-04-14 Jedrzej Nowacki - - Reviewed by Kenneth Rohde Christiansen. - - Fix a few memory leaks in QScriptEngine. - - Syntax checking caused memory leak, not all temporary variables were released. - - [Qt] Syntax checking in the QtScript cause a memory leak. - https://bugs.webkit.org/show_bug.cgi?id=37610 - - * qt/api/qscriptengine_p.cpp: - (QScriptEnginePrivate::checkSyntax): - * qt/api/qscriptsyntaxcheckresult.cpp: - (QScriptSyntaxCheckResultPrivate::errorMessage): - (QScriptSyntaxCheckResultPrivate::errorLineNumber): - -2010-04-14 Jedrzej Nowacki - - Reviewed by Kenneth Rohde Christiansen. - - Fix memory leak inside QScriptEnginePrivate::makeJSValue. - - QScriptEnginePrivate::makeJSValue should release temporary JSStringRef variable. - - [Qt] tst_QScriptValue::toString has a memory leak. - https://bugs.webkit.org/show_bug.cgi?id=37598 - - * qt/api/qscriptengine_p.h: - (QScriptEnginePrivate::makeJSValue): - -2010-04-14 Peter Varga - - Reviewed by Geoffrey Garen. - - Move the YARR JIT fallback detection from RegexJIT.cpp to - RegexCompiler.cpp. - - https://bugs.webkit.org/show_bug.cgi?id=37571 - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::atomBackReference): - (JSC::Yarr::RegexPatternConstructor::quantifyAtom): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateTerm): - (JSC::Yarr::RegexGenerator::RegexGenerator): - (JSC::Yarr::jitCompileRegex): - * yarr/RegexJIT.h: - (JSC::Yarr::RegexCodeBlock::operator!): - * yarr/RegexPattern.h: - (JSC::Yarr::RegexPattern::RegexPattern): - (JSC::Yarr::RegexPattern::reset): - -2010-04-14 Kent Hansen - - Reviewed by Maciej Stachowiak. - - Mac OS X: Use deployment target to determine whether memory tagging should be enabled - https://bugs.webkit.org/show_bug.cgi?id=34888 - - When building on (Snow) Leopard but targeting Tiger - (TARGETING_TIGER defined, BUILDING_ON_TIGER not defined), - WebKit would crash on Tiger because the tags passed to mmap - caused those function calls to fail. - - Conversely, when building on Tiger but targeting Leopard - (BUILDING_ON_TIGER defined, TARGETING_LEOPARD defined), WebKit - would crash on Leopard because the tags passed to vm_map and - vm_allocate caused those function calls to fail. - - Solution: Use TARGETING_TIGER rather than BUILDING_ON_TIGER to - govern the tag definitions. Use the same tags for vm_map and - vm_allocate regardless of target, since they work on - both. Fall back to the mmap tags that work on Tiger (that is, - "no tags") if targeting Tiger, since those tags also work on - Leopard. - - * wtf/VMTags.h: - -2010-04-12 Jocelyn Turcotte - - Reviewed by nobody, build fix. - - [Qt] Build fix for Mac when building with build-webkit --qt - - Specifying no configuration on Mac builds WebCore both in debug - and release. JavaScriptCore has to follow this rule as well. - - * JavaScriptCore.pro: - -2010-04-11 Mark Rowe - - Reviewed by Sam Weinig. - - Fix the build. - - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::): Initialize extra members of malloc_introspection_t to zero. - -2010-04-09 Mikhail Naganov - - Reviewed by Pavel Feldman. - - Make CallIdentifier constructor to handle null urls. - - https://bugs.webkit.org/show_bug.cgi?id=37341 - - * profiler/CallIdentifier.h: - (JSC::CallIdentifier::CallIdentifier): - -2010-04-09 Jocelyn Turcotte - - Reviewed by Simon Hausmann. - - [Qt] Fix crashes with package builds in release - - Add NDEBUG to the defines for package build in JavaScriptCore.pri, - so that it's consistently used for JavaScriptCore, WebCore, jsc and all - other tools using wtf, etc. data structures directly. Mixing NDEBUG with - non-NDEBUG builds causes crashes due to differences in data structures when - assertions/checks are enabled. - - * JavaScriptCore.pri: - -2010-04-09 Patrick Gansterer - - Reviewed by Darin Adler. - - Implement NO_RETURN for COMPILER(MSVC). - https://bugs.webkit.org/show_bug.cgi?id=33056 - - Added NO_RETURN_WITH_VALUE for functions with non-void return type. - - * jsc.cpp: - * wtf/AlwaysInline.h: - * wtf/FastMalloc.cpp: - -2010-04-08 Kwang Yul Seo - - Reviewed by Simon Hausmann. - - [WINCE] Check if ARM or _ARM_ is defined - https://bugs.webkit.org/show_bug.cgi?id=37200 - - MSVC defines ARM and _ARM_ for Windows CE ARM. Define WTF_CPU_ARM=1 - when either ARM or _ARM_ is defined. - - * wtf/Platform.h: - -2010-04-08 Csaba Osztrogonác - - Reviewed Oliver Hunt. - - [Qt]r57240 broke Qt build (might be a gcc bug) - https://bugs.webkit.org/show_bug.cgi?id=37253 - - Workaround until fix. On PLATFORM(QT) use inline instead of ALWAYS_INLINE. - - * wtf/PassRefPtr.h: Qt guards added. - -2010-04-07 Oliver Hunt - - Reviewed by Anders Carlsson. - - Vector makes many needless calls to UString::UString and UString::~UString - - Add a VectorTrait specialisation to allow vector to simply memset/memcpy - data around. Only difference from the VectorTrait > traits is the inability - to use memset to initialize data. - - * runtime/UString.h: - (WTF::): - -2010-04-07 Oliver Hunt - - Reviewed by Geoff Garen. - - Beat gcc with a clue bat -- force inlining of refIfNotNull and derefIfNotNull - - * wtf/PassRefPtr.h: - -2010-04-07 Kwang Yul Seo - - Reviewed by Darin Adler. - - Replace isprint with isASCIIPrintable - https://bugs.webkit.org/show_bug.cgi?id=37223 - - WebKit does not use functions in as they are dependent on the current - locale. Use the equivalent functions in . isASCIIPrintable - replaces isprint. - - * pcre/pcre_exec.cpp: - (pchars): - -2010-04-07 Enrica Casucci - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=37219 - - This change disables text caret for the iPhone platflorm. - - * wtf/Platform.h: Disabled text caret for iPhone. - -2010-04-06 Adam Barth - - Reviewed by Eric Seidel. - - REGRESSION: Worker termination via JS timeout may cause worker tests like fast/workers/worker-terminate.html fail. - https://bugs.webkit.org/show_bug.cgi?id=36646 - - Add a new exception type for forcibly terminating a JavaScript stack. - The new exception functions similarly to the - InterruptedExecutionException but is conceptually different because - execution is terminated instead of just interrupted. - - * GNUmakefile.am: - - Added new Terminator.h file. - * JavaScriptCore.gypi: - - Added new Terminator.h file. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - - Added new Terminator.h file. - * JavaScriptCore.xcodeproj/project.pbxproj: - - Added new Terminator.h file. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): - - Fully unwind the stack for TerminatedExecutionException. - (JSC::Interpreter::privateExecute): - - Check if we've been terminated at the same time we check if we've - timed out. - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - - Check if we've been terminated at the same time we check if we've - timed out. - * runtime/Completion.cpp: - - Some exceptions define special completion types so that calls can - see why we terminated evaluation. - (JSC::evaluate): - * runtime/Completion.h: - - Define a new completion type for termination. - (JSC::): - * runtime/ExceptionHelpers.cpp: - - Define TerminatedExecutionException and refactor pseudo-RTTI - virtual function to be more semantic. - (JSC::InterruptedExecutionError::exceptionType): - (JSC::TerminatedExecutionError::TerminatedExecutionError): - (JSC::TerminatedExecutionError::exceptionType): - (JSC::TerminatedExecutionError::toString): - (JSC::createTerminatedExecutionException): - * runtime/ExceptionHelpers.h: - - Entry point for generating a TerminatedExecutionException. - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - - Add a Terminator object that can be used to asynchronously - terminate a JavaScript execution stack. - * runtime/JSGlobalData.h: - * runtime/JSObject.h: - (JSC::JSObject::exceptionType): - - Define that, by default, thrown objects have a normal exception - type. - * runtime/Terminator.h: Added. - - Added a new controller object that can be used to terminate - execution asynchronously. This object is more or less a - glorified bool. - (JSC::Terminator::Terminator): - (JSC::Terminator::termianteSoon): - (JSC::Terminator::shouldTerminate): - -2010-04-05 Oliver Hunt - - And another one. - - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - -2010-04-05 Oliver Hunt - - And another build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - -2010-04-05 Oliver Hunt - - Build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2010-04-05 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Support weak maps in JSC - https://bugs.webkit.org/show_bug.cgi?id=37132 - - Expose an API to allow creation of a map for storing - weak JS references. - - * API/JSWeakObjectMapRefInternal.h: Added. - (OpaqueJSWeakObjectMap::create): - (OpaqueJSWeakObjectMap::map): - (OpaqueJSWeakObjectMap::~OpaqueJSWeakObjectMap): - (OpaqueJSWeakObjectMap::OpaqueJSWeakObjectMap): - * API/JSWeakObjectMapRefPrivate.cpp: Added. - * API/JSWeakObjectMapRefPrivate.h: Added. - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::registerWeakMap): - (JSC::JSGlobalObject::deregisterWeakMap): - -2010-04-05 Laszlo Gombos - - Reviewed by Kenneth Rohde Christiansen. - - [Symbian] Consolidate Symbian WINSCW environment configuration - https://bugs.webkit.org/show_bug.cgi?id=37100 - - Move the "undefinition" of WIN32 and _WIN32 from WebCore/config.h - to JavaScriptCore/wtf/Platform.h as it is not specific to WebCore. - - PLATFORM(WIN) and OS(WIN) no longer needs to be undefined as - undefining WIN32 takes care of it. - - * wtf/Platform.h: - -2010-04-03 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=37068 - Change UString to use a 0 rep for null strings instead of a null object. - - No performance impact. - - * JavaScriptCore.exp: - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * runtime/JSString.h: - (JSC::RopeBuilder::JSString): - * runtime/UString.cpp: - (JSC::initializeUString): - * runtime/UString.h: - (JSC::UString::UString): - (JSC::UString::data): - (JSC::UString::size): - (JSC::UString::isNull): - (JSC::UString::isEmpty): - (JSC::UString::cost): - -2010-04-03 Balazs Kelemen - - Reviewed by Oliver Hunt. - - Fix uninitalised members in CallLinkInfo and BytecodeGenerator. - - https://bugs.webkit.org/show_bug.cgi?id=36816 - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - * bytecode/CodeBlock.h: - (JSC::CallLinkInfo::CallLinkInfo): - -2010-04-03 yael aharon - - Reviewed by Darin Adler. - - Enable HTMLProgressElement for Safari on OSX - https://bugs.webkit.org/show_bug.cgi?id=36961 - - * Configurations/FeatureDefines.xcconfig: - -2010-04-02 Ruben Van Boxem - - Reviewed by Eric Seidel. - - Mingw-w64 fixes for JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=35607 - - * runtime/Collector.cpp: use the msvc code for mingw-w64 (but not mingw-w32) - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlockPtr): - (JSC::currentThreadStackBase): - (JSC::currentThreadStackBase): - * wtf/Platform.h: added COMPILER(MINGW64) check to differentiate between mingw.org and mingw-w64 functions - -2010-04-02 Geoffrey Garen - - Build fix: updated the .def file. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-04-02 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Inlined toThisString and toThisJSString to avoid virtual function call overhead - https://bugs.webkit.org/show_bug.cgi?id=37039 - - Maybe a 1% speedup on iBench JS. - - * JavaScriptCore.exp: New exports. - - * runtime/JSCell.cpp: - * runtime/JSCell.h: - * runtime/JSNumberCell.cpp: - * runtime/JSNumberCell.h: - * runtime/JSString.cpp: - * runtime/JSString.h: - * runtime/JSValue.h: - * runtime/JSZombie.h: - (JSC::JSZombie::toThisObject): Nixed the old virtual-type implementation. - - * runtime/JSObject.h: - (JSC::JSValue::toThisString): - (JSC::JSValue::toThisJSString): Added the inlined implementation. - -2010-04-02 Jeremy Moskovich - - Reviewed by Geoffrey Garen. - - Beef up documentation for ASSERT* and CRASH macros a bit. - - https://bugs.webkit.org/show_bug.cgi?id=36527 - - * wtf/Assertions.h: - -2010-04-02 Laszlo Gombos - - Unreviewed, minor build fix. - - Change the order of the member initialisation list - in constructor to match declaration order - - * runtime/Collector.cpp: - (JSC::Heap::Heap): - -2010-04-01 Kinuko Yasuda - - Reviewed by Dmitry Titov. - - Add FileThread for async file operation support in FileReader and FileWriter - https://bugs.webkit.org/show_bug.cgi?id=36896 - - Add ENABLE_FILE_READER and ENABLE_FILE_WRITER flags. - - * Configurations/FeatureDefines.xcconfig: - -2010-03-31 Gavin Barraclough - - Reviewed by NOBODY (windows build fix pt II). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-31 Gavin Barraclough - - Reviewed by NOBODY (windows build fix). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-31 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 36871 - Remove JSC::CString - Use WTF::CString instead (which until recently was WebCore::CString). - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * runtime/UString.cpp: - * runtime/UString.h: - -2010-03-31 Laszlo Gombos - - Unreviewed, fix after r56842. - - Add UNUSED_PARAM a to silence warning. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - -2010-03-31 Laszlo Gombos - - Unreviewed, Symbian build fix. - - Refactor JITStubs.cpp so that the list of STUB_FUNCTIONs - are not dependent on the JSVALUE32_64 guard. - - * jit/JITStubs.cpp: Place the JSVALUE32_64 guard inside - the body of cti_op_eq_strings. - * jit/JITStubs.h: Remove JSVALUE32_64 guard from - cti_op_eq_strings stub. - -2010-03-30 Gavin Barraclough - - Reviewed by NOBODY (windows build fix). - - Fixing b0rked version of JavaScriptCore.vcproj - added lines were truncated. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2010-03-30 Gavin Barraclough - - Rubber stamped by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=36866 - Move CString to WTF - - * Android.mk: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/text: Added. - * wtf/text/CString.cpp: Copied from WebCore/platform/text/CString.cpp. - * wtf/text/CString.h: Copied from WebCore/platform/text/CString.h. - (WTF::CStringBuffer::data): - (WTF::CStringBuffer::length): - (WTF::CStringBuffer::create): - (WTF::CStringBuffer::CStringBuffer): - (WTF::CStringBuffer::mutableData): - (WTF::CString::CString): - (WTF::CString::isNull): - (WTF::CString::buffer): - (WTF::operator!=): - -2010-03-30 Jocelyn Turcotte - - Reviewed by nobody, build break. - - [Qt] Fix build break on Qt Mac. - - DESTDIR path on Mac do not include the configuration path by default - like on Windows. Have to force it. - - * JavaScriptCore.pro: - -2010-03-29 Alice Liu - - Reviewed by NOBODY (build fix). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - add JSObjectRefPrivate.h - -2010-03-29 Chao-ying Fu - - Reviewed by Oliver Hunt. - - MIPS JIT Supports - https://bugs.webkit.org/show_bug.cgi?id=30144 - - The following changes enable MIPS JIT. - - * assembler/MIPSAssembler.h: - (JSC::MIPSAssembler::lbu): - (JSC::MIPSAssembler::linkWithOffset): - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::load8): - (JSC::MacroAssemblerMIPS::branch8): - (JSC::MacroAssemblerMIPS::branchTest8): - (JSC::MacroAssemblerMIPS::setTest8): - (JSC::MacroAssemblerMIPS::setTest32): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::preserveReturnAddressAfterCall): - (JSC::JIT::restoreReturnAddressBeforeReturn): - * jit/JITOpcodes.cpp: - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - * jit/JITStubs.h: - (JSC::JITStackFrame::returnAddressSlot): - * wtf/Platform.h: - -2010-02-26 Kenneth Rohde Christiansen - - Reviewed by Simon Fraser. - - Add support for Widgets 1.0: View Mode Media Feature - https://bugs.webkit.org/show_bug.cgi?id=35446 - - Add an enable flag for the Widgets (http://www.w3.org/TR/widgets-reqs/) - and turn it on for Qt only. - - * wtf/Platform.h: - -2010-03-29 Patrick Gansterer - - Reviewed by Darin Adler. - - Corrected name of (u)int64_t compile time assert. - https://bugs.webkit.org/show_bug.cgi?id=36739 - - int64_t_is_four_bytes -> int64_t_is_eight_bytes - - * os-win32/stdint.h: - -2010-03-29 Jocelyn Turcotte - - Reviewed by Simon Hausmann. - - [Qt] Use the -l syntax for linking against JavaScriptCore on Windows. - This allow qmake to extract dependencies correctly when generating VS - solutions. - - * JavaScriptCore.pri: - -2010-03-29 Thomas Zander - - Reviewed by Simon Hausmann. - - https://bugs.webkit.org/show_bug.cgi?id=36742 - - gcc for Symbian doesn't support gcc extensions like atomicity.h - disable - - * wtf/Threading.h: also detect os symbian - -2010-03-28 Laszlo Gombos - - Reviewed by Simon Hausmann. - - [Qt] Remove the definition of WTF_CHANGES guards from the build system - https://bugs.webkit.org/show_bug.cgi?id=31670 - - * JavaScriptCore.pro: Remove the definition of WTF_CHANGES - as it is already defined in config.h - -2010-03-28 Kent Hansen - - Reviewed by Simon Hausmann. - - [Qt] Add API for reporting additional memory cost of JavaScript objects - https://bugs.webkit.org/show_bug.cgi?id=36650 - - * qt/api/qscriptengine.cpp: - (QScriptEngine::reportAdditionalMemoryCost): - * qt/api/qscriptengine.h: - * qt/api/qscriptengine_p.h: - (QScriptEnginePrivate::reportAdditionalMemoryCost): - * qt/tests/qscriptengine/tst_qscriptengine.cpp: - (tst_QScriptEngine::reportAdditionalMemoryCost): - -2010-03-28 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - QScriptEngine API was enriched by globalObject() method - which give an access to the global object. - - [Qt] QScriptEngine doesn't give an access to global object - https://bugs.webkit.org/show_bug.cgi?id=36603 - - * qt/api/qscriptengine.cpp: - (QScriptEngine::globalObject): - * qt/api/qscriptengine.h: - * qt/api/qscriptengine_p.cpp: - (QScriptEnginePrivate::globalObject): - * qt/api/qscriptengine_p.h: - * qt/tests/qscriptengine/tst_qscriptengine.cpp: - (tst_QScriptEngine::globalObject): - -2010-03-26 Jocelyn Turcotte - - Reviewed by Simon Hausmann. - - [Qt] Build JavaScriptCore as a static library. - https://bugs.webkit.org/show_bug.cgi?id=36590 - - This patch takes what was left of the unused JavaScriptCore.pro - and moved the compilation logic from JavaScriptCore.pri to - JavaScriptCore.pro. - - * JavaScriptCore.pri: - * JavaScriptCore.pro: - * jsc.pro: - * qt/api/QtScript.pro: - -2010-03-25 Gavin Barraclough - - Reviewed by NOBODY (build fix). - - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::willExecute): - (JSC::ProfileGenerator::didExecute): - -2010-03-25 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 36611 - Cleanup JSC::CString - Rename CString::c_str() -> CString::data(), CString::size() -> CString::length(), - remove UString::getCString() (all uses are wrong, should use UString::UTF8String()). - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::printUnaryOp): - (JSC::CodeBlock::printBinaryOp): - (JSC::CodeBlock::printConditionalJump): - (JSC::CodeBlock::printGetByIdOp): - (JSC::CodeBlock::printPutByIdOp): - (JSC::printGlobalResolveInfo): - (JSC::printStructureStubInfo): - (JSC::CodeBlock::printStructure): - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::dump): - * jsc.cpp: - (functionPrint): - (functionDebug): - (runInteractive): - (fillBufferWithContentsOfFile): - * profiler/CallIdentifier.h: - (JSC::CallIdentifier::c_str): - * profiler/Profile.cpp: - (JSC::Profile::debugPrintDataSampleStyle): - * profiler/ProfileNode.cpp: - (JSC::ProfileNode::debugPrintData): - (JSC::ProfileNode::debugPrintDataSampleStyle): - * runtime/DateConversion.cpp: - (JSC::parseDate): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::globalFuncJSCPrint): - * runtime/UString.cpp: - (JSC::operator==): - (JSC::UString::toDouble): - * runtime/UString.h: - (JSC::CString::length): - (JSC::CString::data): - -2010-03-25 Jocelyn Turcotte - - Reviewed by nobody, build fix. - - [Qt] Build fix on MSVC. Reverts r55633 for stdint.h - - This file gets included in generated moc files which don't - include the prefix header. - - * os-win32/stdint.h: - -2010-03-24 Gavin Barraclough - - Reviewed by NOBODY (windows build fix). - -2010-03-24 Gavin Barraclough - - Reviewed by Sam Weinig. - - Switch String::latin1, String::utf8, String::fromUTF8 to - use WTF's Unicode conversion methods rather than TextEncoder. - These methods only perform simple conversion, and don't need - really require TextEncoder's full capability (to look up arbitrary - encodings by name), switching to only be dependent on WTF will - make it easier if we chose to move WebCore::String to WTF. - - * JavaScriptCore.exp: - -2010-03-24 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - * wtf/FastMalloc.h: Added a using directive for fastMallocSize, like we do for all public - WTF symbols. Also sorted the list alphabetically. - -2010-03-23 Gavin Barraclough - - Reviewed by NOBODY (speculative windows build fix part II). - -2010-03-23 Gavin Barraclough - - Reviewed by NOBODY (speculative windows build fix). - -2010-03-23 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Bug 36519 - JSGlobalContextRelease is unnecessarily slow - - Since [ http://trac.webkit.org/changeset/35917 ], calling - JSGlobalContextRelease always triggers a GC heap collection - (if not a full destroy). As per 35917's changelog "This is - only really necessary when the (JSGlobalObject's) last - reference is released, but there is no way to determine that, - and no harm in collecting slightly more often." - - Well, we now know of cases of API clients who are harmed by - the performance penalty of collecting too often, so it's time - to add a way to determine whether a call to JSGlobalContextRelease - is removing the last protect from it's global object. If further - protects are retaining the global object (likely from other - JSGlobalContextRefs), then don't trigger a GC collection. - - * API/JSContextRef.cpp: - * runtime/Collector.cpp: - (JSC::Heap::unprotect): return a boolean indicating that the value is now unprotected. - * runtime/Collector.h: - * wtf/HashCountedSet.h: - (WTF::::remove): return a boolean indicating whether the value was removed from the set. - -2010-03-23 Mark Rowe - - Build fix. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncSplice): Some versions of GCC emit a warning about the implicit 64- to 32-bit truncation - that takes place here. An explicit cast is sufficient to silence it. - -2010-03-23 Alexey Proskuryakov - - Build fix. - - * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): Fixed a typo - length doesn't - need to be converted with toInteger(). - -2010-03-23 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - https://bugs.webkit.org/show_bug.cgi?id=36511 - Safari freezes when using SPUTNIK JavaScript conformance check - - Test: fast/js/sputnik-S15.4.4.12_A3_T3.html - - * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): We were incorrectly computing - the start offset, and iterated over (almost) all integers. Note that this can be fixed - without using doubles, but the code would be much more complicated, and there is no important - reason to stick to integers here. - -2010-03-23 Kent Hansen - - Reviewed by Darin Adler. - - Fix compilation on Itanium in 32-bit mode - https://bugs.webkit.org/show_bug.cgi?id=36494 - - * wtf/Platform.h: Introduce CPU(IA64_32). Don't define - WTF_USE_JSVALUE64 if the CPU is in 32-bit mode. - -2010-03-23 Geoffrey Garen - - Reviewed by Mark Rowe. - - Interpreter fix for REGRESSION (r46701): -(-2147483648) - evaluates to -2147483648 on 32 bit (35842) - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): Only take the fast negate path if - a bit other than bit 31 is set. If none of bits 0-30 are set, then the - value we're negating can only be 0 or -2147483648, and neither can be - negated in int space. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): - (JSC::JIT::emitSlow_op_negate): Updated the JIT implementation to match - the interpreter, since it's slightly simpler. - -2010-03-22 Siddharth Mathur - - Reviewed by Laszlo Gombos. - - [Symbian] More efficient aligned memory allocation for JSC Collector - https://bugs.webkit.org/show_bug.cgi?id=34350 - - * JavaScriptCore.pri: Added 2 new Symbian source files and HAL linkage - - * runtime/Collector.cpp: Reduced port-specific code and added private data member - (JSC::Heap::Heap): - (JSC::Heap::~Heap): - (JSC::Heap::destroy): - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlockPtr): - - * runtime/Collector.h: Added private data member - - * wtf/symbian: Added. - * wtf/symbian/BlockAllocatorSymbian.cpp: Added. - (WTF::AlignedBlockAllocator::AlignedBlockAllocator): Helper class to allocate - aligned blocks more efficiently as required by Collector - (WTF::AlignedBlockAllocator::alloc): - (WTF::AlignedBlockAllocator::free): - (WTF::AlignedBlockAllocator::destroy): - (WTF::AlignedBlockAllocator::~AlignedBlockAllocator): - * wtf/symbian/BlockAllocatorSymbian.h: Added. - -2010-03-22 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed REGRESSION (r46701): -(-2147483648) - evaluates to -2147483648 on 32 bit (35842) - - Two ways to fix the same bug: - - 1. Check for overflow when negating, since negating the largest negative - int causes overflow. - - 2. Constant-fold even when negating a negative, since, like they say in - high school, "math works." - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::branchNeg32): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::branchNeg32): Added a branching version - of the negate operator. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): Use the branching version of the negate - operator to check for overflow. - - (JSC::JIT::emitSlow_op_negate): Link the check for overflow to a slow case. - (We could emit inline code for this, since we know what the result would - be, but that's probably just a waste of generated code.) - - * parser/Grammar.y: Constant fold even when negating a negative. - -2010-03-22 David Kilzer - - Clean up 'int' use in UString.cpp after r54789 - - Reviewed by Darin Adler. - - * runtime/UString.cpp: - (JSC::UString::from): Changed argument type from 'unsigned int' - to 'unsigned' to match WebKit coding style. - (JSC::UString::find): Changed static_cast() to - static_cast() now that this method returns unsigned. - (JSC::UString::rfind): Ditto. - * runtime/UString.h: - (JSC::UString::from): Changed argument type from 'unsigned int' - to 'unsigned' to match WebKit coding style. - -2010-03-22 Jedrzej Nowacki - - Reviewed by Kenneth Rohde Christiansen. - - Add support for syntax checking in the QtScript API. - - New class was created; the QScriptSyntaxCheckResult which main - responsibility is to provide results of the ECMA Script code - syntax check. The class is not fully functional as the JSC C API - doesn't expose an error column number, but it is a good start point - for a future development. - - [Qt] QtScript functionality should be extended by syntax checking. - https://bugs.webkit.org/show_bug.cgi?id=36123 - - * qt/api/QtScript.pro: - * qt/api/qscriptengine.cpp: - (QScriptEngine::checkSyntax): - * qt/api/qscriptengine.h: - * qt/api/qscriptengine_p.cpp: - (QScriptEnginePrivate::checkSyntax): - * qt/api/qscriptengine_p.h: - * qt/api/qscriptsyntaxcheckresult.cpp: Added. - (QScriptSyntaxCheckResult::QScriptSyntaxCheckResult): - (QScriptSyntaxCheckResult::~QScriptSyntaxCheckResult): - (QScriptSyntaxCheckResult::operator=): - (QScriptSyntaxCheckResult::state): - (QScriptSyntaxCheckResult::errorLineNumber): - (QScriptSyntaxCheckResult::errorColumnNumber): - (QScriptSyntaxCheckResult::errorMessage): - * qt/api/qscriptsyntaxcheckresult.h: Added. - * qt/api/qscriptsyntaxcheckresult_p.cpp: Added. - (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate): - (QScriptSyntaxCheckResultPrivate::errorMessage): - (QScriptSyntaxCheckResultPrivate::errorLineNumber): - * qt/api/qscriptsyntaxcheckresult_p.h: Added. - (QScriptSyntaxCheckResultPrivate::get): - (QScriptSyntaxCheckResultPrivate::QScriptSyntaxCheckResultPrivate): - (QScriptSyntaxCheckResultPrivate::state): - (QScriptSyntaxCheckResultPrivate::errorColumnNumber): - * qt/tests/qscriptengine/tst_qscriptengine.cpp: - (tst_QScriptEngine::checkSyntax_data): - (tst_QScriptEngine::checkSyntax): - -2010-03-21 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - New class; QScriptProgram. - - The class should be used to evaluate the same script multiple times - more efficiently. - - [Qt] QtScript should have QScriptProgram class - https://bugs.webkit.org/show_bug.cgi?id=36008 - - * qt/api/QtScript.pro: - * qt/api/qscriptengine.cpp: - (QScriptEngine::evaluate): - * qt/api/qscriptengine.h: - * qt/api/qscriptengine_p.cpp: - (QScriptEnginePrivate::evaluate): - * qt/api/qscriptengine_p.h: - (QScriptEnginePrivate::evaluate): - * qt/api/qscriptprogram.cpp: Added. - (QScriptProgram::QScriptProgram): - (QScriptProgram::~QScriptProgram): - (QScriptProgram::operator=): - (QScriptProgram::isNull): - (QScriptProgram::sourceCode): - (QScriptProgram::fileName): - (QScriptProgram::firstLineNumber): - (QScriptProgram::operator==): - (QScriptProgram::operator!=): - * qt/api/qscriptprogram.h: Added. - * qt/api/qscriptprogram_p.h: Added. - (QScriptProgramPrivate::get): - (QScriptProgramPrivate::QScriptProgramPrivate): - (QScriptProgramPrivate::~QScriptProgramPrivate): - (QScriptProgramPrivate::isNull): - (QScriptProgramPrivate::sourceCode): - (QScriptProgramPrivate::fileName): - (QScriptProgramPrivate::firstLineNumber): - (QScriptProgramPrivate::operator==): - (QScriptProgramPrivate::operator!=): - (QScriptProgramPrivate::program): - (QScriptProgramPrivate::file): - (QScriptProgramPrivate::line): - * qt/tests/qscriptengine/tst_qscriptengine.cpp: - (tst_QScriptEngine::evaluateProgram): - -2010-03-21 David Kilzer - - Blind attempt #2 to fix the Windows build after r56314 - - * API/tests/testapi.c: Include JSObjectRefPrivate.h for the new - methods instead of declaring them locally (and non-extern). - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Backed out previous change. - -2010-03-21 David Kilzer - - Blind attempt to fix the Windows build after r56314 - - Try to fix the following errors on the Windows buildbot: - - Linking... - testapi.obj : error LNK2001: unresolved external symbol "bool __cdecl JSObjectSetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *,struct OpaqueJSValue const *)" (?JSObjectSetPrivateProperty@@YA_NPBUOpaqueJSContext@@PAUOpaqueJSValue@@PAUOpaqueJSString@@PBU2@@Z) - testapi.obj : error LNK2001: unresolved external symbol "struct OpaqueJSValue const * __cdecl JSObjectGetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *)" (?JSObjectGetPrivateProperty@@YAPBUOpaqueJSValue@@PBUOpaqueJSContext@@PAU1@PAUOpaqueJSString@@@Z) - C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\bin\testapi.exe : fatal error LNK1120: 2 unresolved externals - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added - missing symbols to be exported. - -2010-03-21 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Documentation fix for previous patch. - - * API/JSObjectRefPrivate.h: - -2010-03-20 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - JSC needs an API to allow custom objects to have aprivate GC-accessible properties - https://bugs.webkit.org/show_bug.cgi?id=36420 - - Add new API methods to support "private" properties on custom - objects. - - * API/JSCallbackObject.h: - (JSC::JSCallbackObjectData::JSCallbackObjectData): - (JSC::JSCallbackObjectData::~JSCallbackObjectData): - (JSC::JSCallbackObjectData::getPrivateProperty): - (JSC::JSCallbackObjectData::setPrivateProperty): - (JSC::JSCallbackObjectData::deletePrivateProperty): - (JSC::JSCallbackObjectData::markChildren): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): - (JSC::JSCallbackObject::getPrivateProperty): - (JSC::JSCallbackObject::setPrivateProperty): - (JSC::JSCallbackObject::deletePrivateProperty): - (JSC::JSCallbackObject::markChildren): - * API/JSObjectRef.cpp: - (JSObjectGetPrivateProperty): - (JSObjectSetPrivateProperty): - (JSObjectDeletePrivateProperty): - * API/JSObjectRefPrivate.h: Added. - * API/tests/testapi.c: - (main): - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-03-20 Kevin Ollivier - - [wx] Build fixes after introduction of Brew files. - - * wscript: - -2010-03-18 Tom Callaway - - Reviewed by Darin Adler. - - Bug 35429: Fix compile on SPARC64 - https://bugs.webkit.org/show_bug.cgi?id=35429 - - * wtf/Platform.h: Set WTF_USE_JSVALUE64 for SPARC64 - -2010-03-18 Oliver Hunt - - Reviewed by Sam Weinig. - - Add API to directly expose JSON parsing - https://bugs.webkit.org/show_bug.cgi?id=34887 - - Add API to expose JSON parsing directly, and add tests to testapi - - * API/JSValueRef.cpp: - (JSValueMakeFromJSONString): - (JSValueCreateJSONString): - * API/tests/testapi.c: - (main): - * JavaScriptCore.exp: - * runtime/JSONObject.cpp: - (JSC::JSONStringify): - * runtime/JSONObject.h: - -2010-03-16 Sam Weinig - - Reviewed by Darin Adler and Mark Rowe. - - Update WebKit availability macros for release after 4.0. - - * API/WebKitAvailability.h: - -2010-03-17 Oliver Hunt - - Reviewed by Gavin Barraclough. - - undefined, NaN, and Infinity should be ReadOnly - https://bugs.webkit.org/show_bug.cgi?id=36263 - - Simply add the ReadOnly flag to these properties. - - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - -2010-03-17 Darin Adler - - Reviewed by Oliver Hunt. - - Speed up Math.round a little by removing unneeded special case - https://bugs.webkit.org/show_bug.cgi?id=36107 - - Test: fast/js/math.html - - * runtime/MathObject.cpp: - (JSC::mathProtoFuncRound): This function had a special case for numbers - between -0.5 and -0.0 to return -0.0. But the algorithm in the function - already yields -0.0 for those cases, so the extra checking and branching - is unneeded. - -2010-03-17 Mike Homey - - Reviewed by Gustavo Noronha. - - Build fix for SPARC. Fix missing macro value. - - * wtf/Platform.h: - -2010-03-16 Gavin Barraclough - - Reviewed by Oliver Hunt, Darin Adler. - - Bug 36083 - REGRESSION (r55772-r55834): Crash in JavaScriptCore RegExp code on PowerPC - - The problem is a bug in our port of PCRE - that a read may take place from the first character in an - empty string. For the time being, revert to using a valid pointer in the data segment rather than - an invalid non-null pointer into the zero-page for the empty string's data pointer. A better fix for - this will be to remove PCRE. - - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::empty): - -2010-03-16 Darin Adler - - Rolled out r56081 since it broke the Windows build. - -2010-03-16 Zoltan Horvath - - Reviewed by Darin Adler. - - Remove extra include and add guards to operator new/delete definitions - https://bugs.webkit.org/show_bug.cgi?id=35967 - - Remove extra header include from FastAlloc.cpp since it is included in - FastAlloc.h. Add ENABLE(GLOBAL_FASTMALLOC_NEW) macro guard to operator - new/delete/new []/delete [] definitions. - - * wtf/FastMalloc.cpp: - -2010-03-15 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Add a function to create a BREW instance without local variable declarations. - https://bugs.webkit.org/show_bug.cgi?id=34705 - - Add a template function to create a BREW instance in one line. - - * wtf/brew/ShellBrew.h: Added. - (WTF::createInstance): - -2010-03-15 Geoffrey Garen - - Not reviewed. - - Removed a now-incorrect comment I forgot to remove in my last check-in. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::scavenge): - -2010-03-15 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed a portion of: - | https://bugs.webkit.org/show_bug.cgi?id=28676 - Safari 4 does not release memory back to the operating system fast enough (28676) - - Every few seconds, release a percentage of the minimum unused page count - during that time period. - - SunSpider reports no change, command-line or in-browser, Mac or Windows. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::init): - (WTF::TCMalloc_PageHeap::signalScavenger): - (WTF::TCMalloc_PageHeap::initializeScavenger): Renamed shouldContinueScavenging - to shouldScavenge, since scavenging is no longer something that we interrupt. - - (WTF::TCMalloc_PageHeap::scavenge): The new scavenging algorithm. Fixes - a bug where the old code would release only one item from each size class - per scavenge, potentially leaving large numbers of large-sized objects - unreleased for a long time. - - (WTF::TCMalloc_PageHeap::shouldScavenge): - (WTF::TCMalloc_PageHeap::New): - (WTF::TCMalloc_PageHeap::AllocLarge): - (WTF::TCMalloc_PageHeap::Delete): - (WTF::TCMalloc_PageHeap::GrowHeap): - (WTF::TCMalloc_PageHeap::scavengerThread): - (WTF::TCMalloc_PageHeap::periodicScavenge): Updated to track the minimum - value of free_committed_pages_ during a given scavenge period. - -2010-03-15 Gavin Barraclough - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=35843 - Re-land reverted fix to JSString::getIndex() - - Calling getIndex() on a JSString in rope form may result in a JSException being thrown - if there is insuficient memory so value(exec) returns UString() with length zero, - which will be passed to jsSingleCharacterSubstring. - Add a slow case function to trap the error & return a safe null value, until the - exception is handled. - - * runtime/JSString.cpp: - (JSC::JSString::getIndexSlowCase): - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::jsSingleCharacterSubstring): - (JSC::JSString::getIndex): - (JSC::jsSingleCharacterString): - (JSC::JSString::getStringPropertySlot): - -2010-03-04 Kenneth Rohde Christiansen - - Reviewed by Adam Roben. - - Add a long long version of abs() for MSVC. - - * wtf/MathExtras.h: - (abs): - -2010-03-15 Gabor Loki - - Reviewed by Gavin Barraclough. - - Combine ctiTrampolines on ARM and Thumb-2 - https://bugs.webkit.org/show_bug.cgi?id=36014 - - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - -2010-03-12 Gavin Barraclough - - Reviewed by NOBODY (build fix). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-12 Gavin Barraclough - - Reviewed by NOBODY (build fix). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-11 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Bug 36075 - Clean up screwyness re static string impls & Identifiers. - - * API/JSClassRef.cpp: - (OpaqueJSClass::~OpaqueJSClass): Classname may be null/empty, and these are an identifer. This is okay, since the null/empty strings are shared across all threads. - * JavaScriptCore.exp: - * runtime/Identifier.cpp: - (JSC::Identifier::add): No need to explicitly hash null reps, this is done in the ststic UStringImpl constructor. - (JSC::Identifier::addSlowCase): UStringImpl::empty() handled & checkCurrentIdentifierTable now called in the header. - (JSC::Identifier::checkCurrentIdentifierTable): Replaces checkSameIdentifierTable (this no longer checked the rep since the identifierTable pointer was removed from UString::Rep long ago). - * runtime/Identifier.h: - (JSC::Identifier::add): Replace call to checkSameIdentifierTable with call to checkCurrentIdentifierTable at head of function. - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::~UStringImpl): Remove call to checkConsistency - this function no longer checks anything interesting. - * runtime/UStringImpl.h: - (JSC::UStringOrRopeImpl::UStringOrRopeImpl): Set s_refCountFlagIsIdentifier in static constructor. - (JSC::UStringImpl::UStringImpl): remove calls to checkConsistency (see above), add new ASSERT to substring constructor. - (JSC::UStringImpl::setHash): ASSERT not static (static strings set the hash in their constructor, should not reach this code path). - (JSC::UStringImpl::create): Add missing ASSERT. - (JSC::UStringImpl::setIsIdentifier): ASSERT !isStatic() (static strings hash set in constructor). - -2010-03-12 Peter Varga - - Reviewed by David Levin. - - Two functions tryConsumeCharacter() and tryConsumeCharacterClass() are - removed from yarr/RegexInterpreter.cpp because they are never called. - - * yarr/RegexInterpreter.cpp: - -2010-03-11 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - The JSNative state was renamed to JSPrimitive. The new name better - coresponds to the ECMAScript standard. - - Enum QScriptValuePrivate::States was renamed to State to obey Qt - coding style rules ("States" name suggests that a state could - mixed together with an other state using bitwise logic operators. - - [Qt] QScriptValuePrivate::States has naming issues - https://bugs.webkit.org/show_bug.cgi?id=35968 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::): - (QScriptValuePrivate::QScriptValuePrivate): - (QScriptValuePrivate::isBool): - (QScriptValuePrivate::isNumber): - (QScriptValuePrivate::isNull): - (QScriptValuePrivate::isString): - (QScriptValuePrivate::isUndefined): - (QScriptValuePrivate::toString): - (QScriptValuePrivate::toNumber): - (QScriptValuePrivate::toBool): - (QScriptValuePrivate::assignEngine): - (QScriptValuePrivate::refinedJSValue): - -2010-03-11 Gavin Barraclough - - Reviewed by NOBODY (Windows build fix). - - Add export. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-11 Gavin Barraclough - - Reviewed by NOBODY (Windows build fix). - - Add export. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-11 Gavin Barraclough - - Rubber stamped by Oliver Hunt. - - Remove nonsense comments used in development & commited in error. - - * runtime/UStringImpl.h: - -2010-03-11 Gavin Barraclough - - Reviewed by NOBODY (Windows build fix). - - Remove export. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-11 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=36041 - Remove unnecessary differences in common code between WebCore::StringImpl & JSC::UStringImpl - - Much of the code in WebCore::StringImpl and JSC::UStringImpl is now very similar, - but has trivial and unnecessary formatting differences, such as the exact wording - of comments, missing ASSERTs, functions implemented in the .h vs .cpp etc. - - * runtime/Identifier.cpp: - (JSC::Identifier::add): UStringImpl::empty() now automatically hashes, uas per WebCore strings. - (JSC::Identifier::addSlowCase): UStringImpl::empty() now automatically hashes, uas per WebCore strings. - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::~UStringImpl): Only call bufferOwnership() once, add missing ASSERTs. - (JSC::UStringImpl::createUninitialized): Move from .h, not commonly called, no need to inline. - (JSC::UStringImpl::create): Move from .h, not commonly called, no need to inline. - (JSC::UStringImpl::sharedBuffer): Rewritten to more closely match WebCore implementation, remove need for separate baseSharedBuffer() method. - * runtime/UStringImpl.h: - (JSC::UStringImpl::UStringImpl): Automatically hash static strings, ASSERT m_data & m_length are non-null/non-zero in non-static strings. - (JSC::UStringImpl::setHash): Add missing ASSERT. - (JSC::UStringImpl::create): Moved to .cpp / added missing check for empty string creation. - (JSC::UStringImpl::adopt): Vector.size() returns size_t, not unsigned. - (JSC::UStringImpl::cost): Renamed m_bufferSubstring -> m_substringBuffer - (JSC::UStringImpl::hash): Reordered in file. - (JSC::UStringImpl::existingHash): Reordered in file. - (JSC::UStringImpl::computeHash): Reordered in file, renamed parameter. - (JSC::UStringImpl::checkConsistency): rewrote ASSERT. - (JSC::UStringImpl::bufferOwnership): Return type should be BufferOwnership. - (JSC::UStringImpl::): Moved friends to head of class. - -2010-03-11 Mark Rowe - - Reviewed by David Kilzer. - - Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version - - Default to using the appropriate SDK if the target Mac OS X version is not the current Mac OS X version. - - * Configurations/Base.xcconfig: - -2010-03-11 Mark Rowe - - Reviewed by Tim Hatcher. - - Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version - - Introduce TARGET_MAC_OS_X_VERSION_MAJOR to represent the Mac OS X version that is being targeted. It defaults to the - current Mac OS X version unless otherwise specified. - - Key off TARGET_MAC_OS_X_VERSION_MAJOR where we'd previously been keying off MAC_OS_X_VERSION_MAJOR. - - Explicitly map from the target Mac OS X version to the preferred compiler since Xcode's default compiler choice - may not be usable when targetting a different Mac OS X version. - - Key off TARGET_GCC_VERSION rather than MAC_OS_X_VERSION_MAJOR in locations where we'd previously been keying off - MAC_OS_X_VERSION_MAJOR but the decision is really related to the compiler version being used. - - * Configurations/Base.xcconfig: - * Configurations/DebugRelease.xcconfig: - * Configurations/FeatureDefines.xcconfig: - * Configurations/JavaScriptCore.xcconfig: - * Configurations/Version.xcconfig: - -2010-03-11 Simon Fraser - - Reviewed by Mark Rowe. - - Sort the project file. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-03-11 Simon Fraser - - Reviewed by Mark Rowe. - - Sort the project file . - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-03-11 Gabor Loki - - Reviewed by Gavin Barraclough. - - Buildfix for Thumb-2 after r55684. Add branch8 and branchTest8 functions. - https://bugs.webkit.org/show_bug.cgi?id=35892 - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::): - (JSC::ARMv7Assembler::ldrb): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::load8): - (JSC::MacroAssemblerARMv7::branch8): - (JSC::MacroAssemblerARMv7::branchTest8): - (JSC::MacroAssemblerARMv7::setTest8): - -2010-03-10 Gavin Barraclough - - Rubber stamped by Oliver Hunt. - - Rename JSC::UStringImpl::data() to characters(), to match WebCore::StringImpl. - - * API/JSClassRef.cpp: - (OpaqueJSClassContextData::OpaqueJSClassContextData): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::keyForCharacterSwitch): - * bytecompiler/NodesCodegen.cpp: - (JSC::processClauseList): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - * runtime/Identifier.cpp: - (JSC::Identifier::equal): - (JSC::Identifier::addSlowCase): - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - * runtime/UString.cpp: - (JSC::UString::toStrictUInt32): - (JSC::equal): - * runtime/UString.h: - (JSC::UString::data): - * runtime/UStringImpl.h: - (JSC::UStringImpl::characters): - (JSC::UStringImpl::hash): - (JSC::UStringImpl::setHash): - -2010-03-10 Gavin Barraclough - - Reviewed by Darin Adler, Geoffrey Garen, Maciej Stachowiak. - - https://bugs.webkit.org/show_bug.cgi?id=35991 - Would be faster to not use a thread specific to implement StringImpl::empty() - - Change JSC::UStringImpl's implementation of empty() match to match StringImpl's new implementation - (use a static defined within the empty() method), and change the interface to match too (return - a pointer not a reference). - - ~0% performance impact (possible minor progression from moving empty() from .h to .cpp). - - * JavaScriptCore.exp: - * runtime/Identifier.cpp: - (JSC::Identifier::add): - (JSC::Identifier::addSlowCase): - * runtime/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * runtime/UString.cpp: - (JSC::initializeUString): - (JSC::UString::UString): - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::empty): - (JSC::UStringImpl::create): - * runtime/UStringImpl.h: - (JSC::UStringImpl::adopt): - (JSC::UStringImpl::createUninitialized): - (JSC::UStringImpl::tryCreateUninitialized): - -2010-03-10 Dmitry Titov - - Not reviewed, fixing Snow Leopard build. - - * wtf/mac/MainThreadMac.mm: Forgot 'static' for a new local function. - (WTF::postTimer): - -2010-03-10 Dmitry Titov - - Reviewed by Darin Adler. - - Make Document::postTask to use a single queue of tasks, to fire them in order - https://bugs.webkit.org/show_bug.cgi?id=35943 - - The patch uses CFRunLoopTimer to schedule execution of tasks instead of performSelectorOnMainThread which apparently can starve other event sources. - The timer is used when the schedule request is coming on the main thread itself. This happens when the task is posted on the main thread or - when too many tasks are posted and the queue does 'stop and re-schedule' to make sure run loop has a chance to execute other events. - - * wtf/mac/MainThreadMac.mm: - (WTF::timerFired): - (WTF::postTimer): - (WTF::scheduleDispatchFunctionsOnMainThread): Use timer posted to the current RunLoop if scheduling the task execution while on the main thread. - -2010-03-10 Geoffrey Garen - - Windows build fix: added new symbol. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-10 Geoffrey Garen - - Windows build fix: removed old symbol. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-09 Geoffrey Garen - - Reviewed by Alexey Proskuryakov, Darin Adler, and Sam Weinig. - - Refactored fastCheckConsistency to match some review comments: - - renamed fastCheckConsistency to fastMallocSize, and changed ValueCheck - to ASSERT that a pointer's fastMallocSize is not 0. - - implemented a version of fastMallocSize for tcmalloc. - - Also moved some pre-existing code around to avoid a problem related to - mismatched #define/#undef of malloc/free in this source file. - - * JavaScriptCore.exp: - * wtf/FastMalloc.cpp: - (WTF::fastMallocSize): Renamed. Fixed indentation. - - (WTF::TCMalloc_PageHeap::scavenge): Removed an incorrect ASSERT that - got in the way of testing the tcmalloc implementation. (More information - on why this ASSERT is incorrect is in .) - - (WTF::TCMallocStats::fastMallocSize): Implemented for tcmalloc. - - * wtf/FastMalloc.h: Updated for rename. - - * wtf/ValueCheck.h: - (WTF::): Moved the ASSERT that used to be in fastCheckConsistency here. - -2010-03-10 Kevin Ollivier - - Reviewed by Eric Seidel. - - Make global new/delete operators configurable for all ports and disable it - for the wx port for now. - - * wtf/FastMalloc.h: - * wtf/Platform.h: - -2010-03-09 Gavin Barraclough - - Reviewed by NOBODY (reverting r54510). - - This caused a performance regression, by breaking the code - generator's logic to calculate the skip level for resolving - variables (traced by rdar:7683350) Reverting for now. - - * parser/Grammar.y: - * parser/NodeConstructors.h: - (JSC::ContinueNode::ContinueNode): - (JSC::BreakNode::BreakNode): - (JSC::ForInNode::ForInNode): - * runtime/CommonIdentifiers.cpp: - (JSC::CommonIdentifiers::CommonIdentifiers): - * runtime/CommonIdentifiers.h: - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - * runtime/Identifier.cpp: - (JSC::Identifier::add): - * runtime/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - -2010-03-09 Geoffrey Garen - - Reviewed by Darin Adler. - - Changed FastMalloc statistics reporting to be a bit clearer. We now - report: - - Reserved VM Bytes: the VM that has been mapped into the process. - - Committed VM Bytes: the subset of Reserved VM Bytes actually in use. - - Free List Bytes: the subset of Committed VM Bytes in a free list. - - * wtf/FastMalloc.cpp: - (WTF::fastMallocStatistics): - (WTF::TCMallocStats::fastMallocStatistics): Updated to report the statistics - above. Standardized use of "ifdef WTF_CHANGES". Added a SpinLockHolder - around all statistics gathering, since it reads from the page heap. - - * wtf/FastMalloc.h: Updated to report the statistics above. - -2010-03-09 Gabor Loki - - Rubber-stamped by Maciej Stachowiak. - - Buildfix for ARM after r55684. Add branch8 and branchTest8 functions. - https://bugs.webkit.org/show_bug.cgi?id=35892 - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::dataTransfer32): - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::load8): - (JSC::MacroAssemblerARM::branch8): - (JSC::MacroAssemblerARM::branchTest8): - -2010-03-08 Geoffrey Garen - - Windows build fix: 'P' is not a type. Luckily, 'void' is. - - * wtf/FastMalloc.cpp: - (WTF::fastCheckConsistency): - -2010-03-08 Geoffrey Garen - - Windows build fix: export a new symbol. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-08 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Switching malloc implementations requires a world rebuild - https://bugs.webkit.org/show_bug.cgi?id=35899 - - * wtf/FastMalloc.cpp: - (WTF::fastCheckConsistency): - (WTF::TCMallocStats::fastCheckConsistency): - * wtf/FastMalloc.h: - * wtf/ValueCheck.h: - (WTF::): Moved pointer checking into a helper function in FastMalloc.cpp, - so you can switch malloc implementations without rebuilding the world. - -2010-03-07 Oliver Hunt - - Reviewed by Darin Adler. - - TypeInfo is unnecessarily large - https://bugs.webkit.org/show_bug.cgi?id=35850 - - Reduce the size of the type and flags members to a single - byte each, reducing the size of Structure by 8 bytes. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::branch8): - (JSC::MacroAssemblerX86Common::branchTest8): - (JSC::MacroAssemblerX86Common::setTest8): - Add single byte branches, and correct setTest8 to do a - single byte read from memory, and actually store the result - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::cmpb_im): - (JSC::X86Assembler::testb_im): - * jit/JITCall.cpp: - (JSC::JIT::emit_op_construct_verify): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_get_pnames): - (JSC::JIT::emit_op_convert_this): - (JSC::JIT::emit_op_construct_verify): - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - * runtime/JSTypeInfo.h: - (JSC::TypeInfo::TypeInfo): - (JSC::TypeInfo::type): - -2010-03-08 Gavin Barraclough - - Reviewed by NOBODY (reverting regression). - - Reverting 55035, this caused a regression. - (https://bugs.webkit.org/show_bug.cgi?id=35843) - - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::jsSingleCharacterSubstring): - (JSC::JSString::getIndex): - (JSC::JSString::getStringPropertySlot): - * runtime/UStringImpl.cpp: - * runtime/UStringImpl.h: - -2010-03-08 Stuart Morgan - - Reviewed by Darin Adler. - - Added a new USE definition for secure text mode on the Mac. - https://bugs.webkit.org/show_bug.cgi?id=31265 - - * wtf/Platform.h: - -2010-03-08 Jian Li - - Reviewed by Dmitry Titov. - - Blob.slice support. - https://bugs.webkit.org/show_bug.cgi?id=32993 - - Add ENABLE_BLOB_SLICE feature define. - Also fix a problem that JSValue.toInteger is not exposed on Windows. - - * Configurations/FeatureDefines.xcconfig: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-07 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - Small performance fix in the QScriptConverter::toString(). - - The QByteArray was replaced by the QVarLengthArray which doesn't - have to allocate any memory on heap. - - [Qt] QScriptConverter::toString() should use QVarLengthArray instead of QByteArray - https://bugs.webkit.org/show_bug.cgi?id=35577 - - * qt/api/qscriptconverter_p.h: - (QScriptConverter::toString): - -2010-03-06 Mark Rowe - - Rubber-stamped by Sam Weinig. - - Remove unnecessary includes of wtf/Platform.h. This is already pulled in by config.h. - - * API/APICast.h: - * API/JSCallbackFunction.cpp: - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - * API/JSValueRef.cpp: - * assembler/ARMAssembler.h: - * assembler/ARMv7Assembler.h: - * assembler/AbstractMacroAssembler.h: - * assembler/AssemblerBuffer.h: - * assembler/AssemblerBufferWithConstantPool.h: - * assembler/CodeLocation.h: - * assembler/LinkBuffer.h: - * assembler/MIPSAssembler.h: - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerARM.h: - * assembler/MacroAssemblerARMv7.h: - * assembler/MacroAssemblerCodeRef.h: - * assembler/MacroAssemblerMIPS.h: - * assembler/MacroAssemblerX86.h: - * assembler/MacroAssemblerX86Common.h: - * assembler/MacroAssemblerX86_64.h: - * assembler/RepatchBuffer.h: - * assembler/X86Assembler.h: - * jit/JIT.h: - * jit/JITCode.h: - * jit/JITInlineMethods.h: - * jit/JITStubs.h: - * os-win32/stdint.h: - * runtime/JSAPIValueWrapper.h: - * runtime/JSImmediate.h: - * wtf/ASCIICType.h: - * wtf/StdLibExtras.h: - * wtf/VMTags.h: - * yarr/RegexCompiler.h: - * yarr/RegexInterpreter.h: - * yarr/RegexJIT.h: - * yarr/RegexParser.h: - * yarr/RegexPattern.h: - -2010-03-06 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Share OwnPtr. - https://bugs.webkit.org/show_bug.cgi?id=35776 - - Share OwnPtr implementation with BREW MP and remove OwnPtrBrew. - - * wtf/OwnPtrBrew.cpp: Added. - (WTF::deleteOwnedPtr): - * wtf/OwnPtrCommon.h: - * wtf/brew/OwnPtrBrew.cpp: Removed. - * wtf/brew/OwnPtrBrew.h: Removed. - -2010-03-06 Patrick Gansterer - - Reviewed by Eric Seidel. - - Implemented JIT_OPTIMIZE_NATIVE_CALL for WinCE - https://bugs.webkit.org/show_bug.cgi?id=33426 - - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - -2010-03-05 Oliver Hunt - - Reviewed by NOBODY (build fix). - - Add enw exports to windows - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-05 Oliver Hunt - - Reviewed by Gavin Barraclough. - - JSC should cache int to Identifier conversion as it does for ordinary strings - https://bugs.webkit.org/show_bug.cgi?id=35814 - - Make the NumericStrings cache cache unsigned ints in addition to signed. - We keep them separate from the int cache as it both simplifies code, and - also because the unsigned path is exclusive to property access and therefore - seems to have different usage patterns. - - The primary trigger for the unsigned to Identifier propertyName conversion - is the construction of array-like objects out of normal objects. Given these - tend to be relative small numbers, and the array-like behaviour lends itself - to sequential values this patch also adds a non-colliding cache for all small - numbers. - - * JavaScriptCore.exp: - * runtime/Identifier.cpp: - (JSC::Identifier::from): - * runtime/Identifier.h: - * runtime/NumericStrings.h: - (JSC::NumericStrings::add): - (JSC::NumericStrings::lookup): - (JSC::NumericStrings::lookupSmallString): - -2010-03-03 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Allow static property getters to interact with JSCs caching - https://bugs.webkit.org/show_bug.cgi?id=35716 - - Add new opcodes for handling cached lookup of static value getters. - More or less the same as with JS getters, all that changes is that - instead of calling through a JSFunction we always know that we have - a C function to call. - - For the patching routines in the JIT we now need to pass a few - new parameters to allow us to pass enough information to the stub - function to allow us to call the C function correctly. Logically - this shouldn't actually be necessary as all of these functions ignore - the identifier, but removing the ident parameter would require - somewhat involved changes to the way we implement getOwnPropertySlot, - etc. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::derefStructures): - (JSC::CodeBlock::refStructures): - * bytecode/Instruction.h: - (JSC::Instruction::Instruction): - (JSC::Instruction::): - * bytecode/Opcode.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - (JSC::JIT::compileGetByIdProto): - (JSC::JIT::compileGetByIdSelfList): - (JSC::JIT::compileGetByIdProtoList): - (JSC::JIT::compileGetByIdChainList): - (JSC::JIT::compileGetByIdChain): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): - * runtime/JSFunction.cpp: - (JSC::JSFunction::getOwnPropertySlot): - * runtime/Lookup.h: - (JSC::getStaticPropertySlot): - (JSC::getStaticValueSlot): - * runtime/PropertySlot.h: - (JSC::PropertySlot::): - (JSC::PropertySlot::PropertySlot): - (JSC::PropertySlot::cachedPropertyType): - (JSC::PropertySlot::isCacheable): - (JSC::PropertySlot::isCacheableValue): - (JSC::PropertySlot::setValueSlot): - (JSC::PropertySlot::setCacheableCustom): - (JSC::PropertySlot::setGetterSlot): - (JSC::PropertySlot::setCacheableGetterSlot): - (JSC::PropertySlot::clearOffset): - (JSC::PropertySlot::customGetter): - -2010-03-04 Shinichiro Hamaji - - Unreviewed. Remove a non-ASCII character introduced in the following bug. - - put_by_id does will incorrectly cache writes where a specific value exists, where at the point of caching the same value is being written. - https://bugs.webkit.org/show_bug.cgi?id=35537 - - * runtime/JSObject.h: - (JSC::JSObject::putDirectInternal): - -2010-03-04 Jocelyn Turcotte - - Reviewed by Tor Arne Vestbø. - - [Qt] Make the OUTPUT_DIR variable in qmake projects independent of build-webkit's logic. - - This also allows shadow builds relying only on qmake to work properly. - * jsc.pro: - * qt/api/QtScript.pro: - * qt/tests/qscriptengine/qscriptengine.pro: - * qt/tests/qscriptvalue/qscriptvalue.pro: - * qt/tests/tests.pri: - -2010-03-03 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - QScriptValue::isObject fix. - - Fix broken internal state evaluation from JSValue to JSNative / JSObject. - New function was introduced which should take care about promoting - JSValue state inside QScriptValuePrivate. It should be used instead of a - direct JSC C API call. - - The bug exposed a weakness in autotest suite, as the QScriptValuePrivate - is based on state machine with lazy state evaluation, there is a possibility - that serial sequencial calls to the same public const function could return - different results. The patch fix the issue. - - [Qt] Sometimes QScriptValue::isObject returns an incorrect value - https://bugs.webkit.org/show_bug.cgi?id=35387 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::isBool): - (QScriptValuePrivate::isNumber): - (QScriptValuePrivate::isNull): - (QScriptValuePrivate::isString): - (QScriptValuePrivate::isUndefined): - (QScriptValuePrivate::isError): - (QScriptValuePrivate::isObject): - (QScriptValuePrivate::isFunction): - (QScriptValuePrivate::call): - (QScriptValuePrivate::refineJSValue): - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: - (tst_QScriptValue::initScriptValues): - (tst_QScriptValue::isValid_makeData): - (tst_QScriptValue::isValid_test): - (tst_QScriptValue::isBool_makeData): - (tst_QScriptValue::isBool_test): - (tst_QScriptValue::isBoolean_makeData): - (tst_QScriptValue::isBoolean_test): - (tst_QScriptValue::isNumber_makeData): - (tst_QScriptValue::isNumber_test): - (tst_QScriptValue::isFunction_test): - (tst_QScriptValue::isNull_makeData): - (tst_QScriptValue::isNull_test): - (tst_QScriptValue::isString_makeData): - (tst_QScriptValue::isString_test): - (tst_QScriptValue::isUndefined_makeData): - (tst_QScriptValue::isUndefined_test): - (tst_QScriptValue::isObject_makeData): - (tst_QScriptValue::isObject_test): - (tst_QScriptValue::toString_makeData): - (tst_QScriptValue::toString_test): - (tst_QScriptValue::toNumber_makeData): - (tst_QScriptValue::toNumber_test): - (tst_QScriptValue::toBool_makeData): - (tst_QScriptValue::toBool_test): - (tst_QScriptValue::toBoolean_makeData): - (tst_QScriptValue::toBoolean_test): - (tst_QScriptValue::toInteger_makeData): - (tst_QScriptValue::toInteger_test): - (tst_QScriptValue::toInt32_makeData): - (tst_QScriptValue::toInt32_test): - (tst_QScriptValue::toUInt32_makeData): - (tst_QScriptValue::toUInt32_test): - (tst_QScriptValue::toUInt16_makeData): - (tst_QScriptValue::toUInt16_test): - -2010-03-03 Chao-ying Fu - - Reviewed by Gavin Barraclough. - - MIPS JIT Supports - https://bugs.webkit.org/show_bug.cgi?id=30144 - - The following changes enable MIPS YARR and YARR_JIT. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::Imm32::Imm32): - * assembler/MIPSAssembler.h: Added. - (JSC::MIPSRegisters::): - (JSC::MIPSAssembler::MIPSAssembler): - (JSC::MIPSAssembler::): - (JSC::MIPSAssembler::JmpSrc::JmpSrc): - (JSC::MIPSAssembler::JmpDst::JmpDst): - (JSC::MIPSAssembler::JmpDst::isUsed): - (JSC::MIPSAssembler::JmpDst::used): - (JSC::MIPSAssembler::emitInst): - (JSC::MIPSAssembler::nop): - (JSC::MIPSAssembler::loadDelayNop): - (JSC::MIPSAssembler::copDelayNop): - (JSC::MIPSAssembler::move): - (JSC::MIPSAssembler::li): - (JSC::MIPSAssembler::lui): - (JSC::MIPSAssembler::addiu): - (JSC::MIPSAssembler::addu): - (JSC::MIPSAssembler::subu): - (JSC::MIPSAssembler::mult): - (JSC::MIPSAssembler::mfhi): - (JSC::MIPSAssembler::mflo): - (JSC::MIPSAssembler::mul): - (JSC::MIPSAssembler::andInsn): - (JSC::MIPSAssembler::andi): - (JSC::MIPSAssembler::nor): - (JSC::MIPSAssembler::orInsn): - (JSC::MIPSAssembler::ori): - (JSC::MIPSAssembler::xorInsn): - (JSC::MIPSAssembler::xori): - (JSC::MIPSAssembler::slt): - (JSC::MIPSAssembler::sltu): - (JSC::MIPSAssembler::sltiu): - (JSC::MIPSAssembler::sll): - (JSC::MIPSAssembler::sllv): - (JSC::MIPSAssembler::sra): - (JSC::MIPSAssembler::srav): - (JSC::MIPSAssembler::lw): - (JSC::MIPSAssembler::lwl): - (JSC::MIPSAssembler::lwr): - (JSC::MIPSAssembler::lhu): - (JSC::MIPSAssembler::sw): - (JSC::MIPSAssembler::jr): - (JSC::MIPSAssembler::jalr): - (JSC::MIPSAssembler::jal): - (JSC::MIPSAssembler::bkpt): - (JSC::MIPSAssembler::bgez): - (JSC::MIPSAssembler::bltz): - (JSC::MIPSAssembler::beq): - (JSC::MIPSAssembler::bne): - (JSC::MIPSAssembler::bc1t): - (JSC::MIPSAssembler::bc1f): - (JSC::MIPSAssembler::newJmpSrc): - (JSC::MIPSAssembler::appendJump): - (JSC::MIPSAssembler::addd): - (JSC::MIPSAssembler::subd): - (JSC::MIPSAssembler::muld): - (JSC::MIPSAssembler::lwc1): - (JSC::MIPSAssembler::ldc1): - (JSC::MIPSAssembler::swc1): - (JSC::MIPSAssembler::sdc1): - (JSC::MIPSAssembler::mtc1): - (JSC::MIPSAssembler::mfc1): - (JSC::MIPSAssembler::truncwd): - (JSC::MIPSAssembler::cvtdw): - (JSC::MIPSAssembler::ceqd): - (JSC::MIPSAssembler::cngtd): - (JSC::MIPSAssembler::cnged): - (JSC::MIPSAssembler::cltd): - (JSC::MIPSAssembler::cled): - (JSC::MIPSAssembler::cueqd): - (JSC::MIPSAssembler::coled): - (JSC::MIPSAssembler::coltd): - (JSC::MIPSAssembler::culed): - (JSC::MIPSAssembler::cultd): - (JSC::MIPSAssembler::label): - (JSC::MIPSAssembler::align): - (JSC::MIPSAssembler::getRelocatedAddress): - (JSC::MIPSAssembler::getDifferenceBetweenLabels): - (JSC::MIPSAssembler::size): - (JSC::MIPSAssembler::executableCopy): - (JSC::MIPSAssembler::getCallReturnOffset): - (JSC::MIPSAssembler::linkJump): - (JSC::MIPSAssembler::linkCall): - (JSC::MIPSAssembler::linkPointer): - (JSC::MIPSAssembler::relinkJump): - (JSC::MIPSAssembler::relinkCall): - (JSC::MIPSAssembler::repatchInt32): - (JSC::MIPSAssembler::repatchPointer): - (JSC::MIPSAssembler::repatchLoadPtrToLEA): - (JSC::MIPSAssembler::relocateJumps): - (JSC::MIPSAssembler::linkWithOffset): - (JSC::MIPSAssembler::linkCallInternal): - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerMIPS.h: Added. - (JSC::MacroAssemblerMIPS::MacroAssemblerMIPS): - (JSC::MacroAssemblerMIPS::): - (JSC::MacroAssemblerMIPS::add32): - (JSC::MacroAssemblerMIPS::and32): - (JSC::MacroAssemblerMIPS::lshift32): - (JSC::MacroAssemblerMIPS::mul32): - (JSC::MacroAssemblerMIPS::not32): - (JSC::MacroAssemblerMIPS::or32): - (JSC::MacroAssemblerMIPS::rshift32): - (JSC::MacroAssemblerMIPS::sub32): - (JSC::MacroAssemblerMIPS::xor32): - (JSC::MacroAssemblerMIPS::load32): - (JSC::MacroAssemblerMIPS::load32WithUnalignedHalfWords): - (JSC::MacroAssemblerMIPS::load32WithAddressOffsetPatch): - (JSC::MacroAssemblerMIPS::loadPtrWithPatchToLEA): - (JSC::MacroAssemblerMIPS::loadPtrWithAddressOffsetPatch): - (JSC::MacroAssemblerMIPS::load16): - (JSC::MacroAssemblerMIPS::store32WithAddressOffsetPatch): - (JSC::MacroAssemblerMIPS::store32): - (JSC::MacroAssemblerMIPS::supportsFloatingPoint): - (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate): - (JSC::MacroAssemblerMIPS::pop): - (JSC::MacroAssemblerMIPS::push): - (JSC::MacroAssemblerMIPS::move): - (JSC::MacroAssemblerMIPS::swap): - (JSC::MacroAssemblerMIPS::signExtend32ToPtr): - (JSC::MacroAssemblerMIPS::zeroExtend32ToPtr): - (JSC::MacroAssemblerMIPS::branch32): - (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords): - (JSC::MacroAssemblerMIPS::branch16): - (JSC::MacroAssemblerMIPS::branchTest32): - (JSC::MacroAssemblerMIPS::jump): - (JSC::MacroAssemblerMIPS::branchAdd32): - (JSC::MacroAssemblerMIPS::branchMul32): - (JSC::MacroAssemblerMIPS::branchSub32): - (JSC::MacroAssemblerMIPS::breakpoint): - (JSC::MacroAssemblerMIPS::nearCall): - (JSC::MacroAssemblerMIPS::call): - (JSC::MacroAssemblerMIPS::ret): - (JSC::MacroAssemblerMIPS::set32): - (JSC::MacroAssemblerMIPS::setTest32): - (JSC::MacroAssemblerMIPS::moveWithPatch): - (JSC::MacroAssemblerMIPS::branchPtrWithPatch): - (JSC::MacroAssemblerMIPS::storePtrWithPatch): - (JSC::MacroAssemblerMIPS::tailRecursiveCall): - (JSC::MacroAssemblerMIPS::makeTailRecursiveCall): - (JSC::MacroAssemblerMIPS::loadDouble): - (JSC::MacroAssemblerMIPS::storeDouble): - (JSC::MacroAssemblerMIPS::addDouble): - (JSC::MacroAssemblerMIPS::subDouble): - (JSC::MacroAssemblerMIPS::mulDouble): - (JSC::MacroAssemblerMIPS::convertInt32ToDouble): - (JSC::MacroAssemblerMIPS::insertRelaxationWords): - (JSC::MacroAssemblerMIPS::branchTrue): - (JSC::MacroAssemblerMIPS::branchFalse): - (JSC::MacroAssemblerMIPS::branchEqual): - (JSC::MacroAssemblerMIPS::branchNotEqual): - (JSC::MacroAssemblerMIPS::branchDouble): - (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32): - (JSC::MacroAssemblerMIPS::linkCall): - (JSC::MacroAssemblerMIPS::repatchCall): - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - * wtf/Platform.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): - (JSC::Yarr::RegexGenerator::generateReturn): - -2010-03-03 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - -2010-03-03 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - -2010-03-03 Mark Rowe - - Reviewed by Geoff Garen. - - Add virtual memory tags for TCMalloc and WebCore's purgeable buffers. - - * wtf/TCSystemAlloc.cpp: - (TryMmap): Use the VM tag. - * wtf/VMTags.h: Make use of VM_MEMORY_TCMALLOC and VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS. - -2010-03-03 Steve Falkenburg - - Rubber stamped by Adam Roben. - - Fix bogus xcopy that was polluting source tree at build time. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - -2010-03-02 Fridrich Strba - - Reviewed by Oliver Hunt. - - Allow building smoothly on win32 and win64 using GCC - https://bugs.webkit.org/show_bug.cgi?id=35607 - - * jit/JITStubs.h: - * runtime/Collector.cpp: - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlockPtr): - (JSC::currentThreadStackBase): - -2010-03-02 Jeremy Orlow - - Reviewed by David Levin. - - Revert database thread changes that are no longer required - https://bugs.webkit.org/show_bug.cgi?id=35519 - - Jochen Eisinger created 55214 and 55247 to track which database - owns which thread. Dmitry suggested that this could also - be done via TLS, though. After exploring the options, Jochen - chose to go the TLS route, so these patches are no longer needed. - - * wtf/Threading.h: - * wtf/ThreadingNone.cpp: - (WTF::isMainThread): - * wtf/ThreadingPthreads.cpp: - (WTF::identifierByPthreadHandle): - (WTF::establishIdentifierForPthreadHandle): - (WTF::pthreadHandleForIdentifier): - (WTF::createThreadInternal): - (WTF::currentThread): - * wtf/ThreadingWin.cpp: - (WTF::threadMap): - (WTF::storeThreadHandleByIdentifier): - (WTF::threadHandleForIdentifier): - (WTF::createThreadInternal): - -2010-03-02 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - Fix QScriptValue::toString(). - - More ECMA Script compliance, especially for values as NaN, Inifinite - and really big/small numbers. - - [Qt] QScriptValue::toString() returns incorrect values - https://bugs.webkit.org/show_bug.cgi?id=34850 - - * qt/api/qscriptconverter_p.h: - (QScriptConverter::toString): - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::toString): - * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: - (tst_QScriptValue::toString_initData): - (tst_QScriptValue::toString_makeData): - (tst_QScriptValue::toString_test): - -2010-03-02 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - Introduce a new class; QScriptString. - - The QScriptString class should act as a handle to "interned" - strings in a QScriptEngine. - - [Qt] QtScript should provide QScriptString - https://bugs.webkit.org/show_bug.cgi?id=34843 - - * qt/api/QtScript.pro: - * qt/api/qscriptengine.cpp: - (QScriptEngine::toStringHandle): - * qt/api/qscriptengine.h: - * qt/api/qscriptengine_p.h: - (QScriptEnginePrivate::toStringHandle): - * qt/api/qscriptstring.cpp: Added. - (QScriptString::QScriptString): - (QScriptString::~QScriptString): - (QScriptString::operator=): - (QScriptString::isValid): - (QScriptString::operator==): - (QScriptString::operator!=): - (QScriptString::toArrayIndex): - (QScriptString::toString): - (QScriptString::operator QString): - (qHash): - * qt/api/qscriptstring.h: Added. - * qt/api/qscriptstring_p.h: Added. - (QScriptStringPrivate::QScriptStringPrivate): - (QScriptStringPrivate::~QScriptStringPrivate): - (QScriptStringPrivate::get): - (QScriptStringPrivate::isValid): - (QScriptStringPrivate::operator==): - (QScriptStringPrivate::operator!=): - (QScriptStringPrivate::toArrayIndex): - (QScriptStringPrivate::toString): - (QScriptStringPrivate::id): - * qt/tests/qscriptstring/qscriptstring.pro: Added. - * qt/tests/qscriptstring/tst_qscriptstring.cpp: Added. - (tst_QScriptString::tst_QScriptString): - (tst_QScriptString::~tst_QScriptString): - (tst_QScriptString::test): - (tst_QScriptString::hash): - (tst_QScriptString::toArrayIndex_data): - (tst_QScriptString::toArrayIndex): - * qt/tests/tests.pro: - -2010-03-02 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Export function on windows. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-03-01 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Refactor named getter function signature to be in line with indexing getter signature - https://bugs.webkit.org/show_bug.cgi?id=35563 - - This removes the PropertySlot argument from getter functions, and makes them directly - pass the slot base. This makes the semantics for the functions match that of the - indexing getters. - - On the down side, this means that we can no longer simply use a proxy function for - JS getters, so we now add another marker value to indicate that a getter is present - and branch accordingly. - - Against all rationality sunspider reports this as a perf win, but i suspect it's just noise. - - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::staticValueGetter): - (JSC::::staticFunctionGetter): - (JSC::::callbackGetter): - * JavaScriptCore.exp: - * runtime/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): - * runtime/JSActivation.h: - * runtime/JSFunction.cpp: - (JSC::JSFunction::argumentsGetter): - (JSC::JSFunction::callerGetter): - (JSC::JSFunction::lengthGetter): - * runtime/JSFunction.h: - * runtime/NumberConstructor.cpp: - (JSC::numberConstructorNaNValue): - (JSC::numberConstructorNegInfinity): - (JSC::numberConstructorPosInfinity): - (JSC::numberConstructorMaxValue): - (JSC::numberConstructorMinValue): - * runtime/PropertySlot.cpp: - (JSC::PropertySlot::functionGetter): - * runtime/PropertySlot.h: - (JSC::PropertySlot::getValue): - (JSC::PropertySlot::setGetterSlot): - (JSC::PropertySlot::setCacheableGetterSlot): - * runtime/RegExpConstructor.cpp: - (JSC::regExpConstructorDollar1): - (JSC::regExpConstructorDollar2): - (JSC::regExpConstructorDollar3): - (JSC::regExpConstructorDollar4): - (JSC::regExpConstructorDollar5): - (JSC::regExpConstructorDollar6): - (JSC::regExpConstructorDollar7): - (JSC::regExpConstructorDollar8): - (JSC::regExpConstructorDollar9): - (JSC::regExpConstructorInput): - (JSC::regExpConstructorMultiline): - (JSC::regExpConstructorLastMatch): - (JSC::regExpConstructorLastParen): - (JSC::regExpConstructorLeftContext): - (JSC::regExpConstructorRightContext): - * runtime/RegExpObject.cpp: - (JSC::regExpObjectGlobal): - (JSC::regExpObjectIgnoreCase): - (JSC::regExpObjectMultiline): - (JSC::regExpObjectSource): - (JSC::regExpObjectLastIndex): - -2010-03-01 Oliver Hunt - - Reviewed by Gavin Barraclough. - - PropertySlot::getValue(ExecState, unsigned) unnecessarily converts index to an Identifier - https://bugs.webkit.org/show_bug.cgi?id=35561 - - Fix this by defining a separate property getter function for index getters. This allows - us to pass an unsigned number without the conversion to an Identifier. We then update - setCustomIndex to take this new getter type. - - * runtime/PropertySlot.h: - (JSC::PropertySlot::getValue): - (JSC::PropertySlot::setCustom): - (JSC::PropertySlot::setCustomIndex): - -2010-03-01 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Bug 35537 - put_by_id does will incorrectly cache writes where a specific value exists, - where at the point of caching the same value is being written. - - When performing a put_by_id that is replacing a property already present on the object, - there are three interesting cases regarding the state of the specific value: - - (1) No specific value set - nothing to do, leave the structure in it's current state, - can cache. - (2) A specific value was set, the new put is not of a specified value (i.e. function), - or is of a different specific value - in these cases we need to perform a despecifying - transition to clear the specific value in the structure, but having done so this is a - normal property so as such we can again cache normally. - (3) A specific value was set, and we are overwriting with the same value - in these cases - leave the structure unchanged, but since a specific value is set we cannot cache this - put (we would need the JIT to dynamically check the value being written matched). - - Unfortunately, the current behaviour does not match this. the checks for a specific value - being present & the value matching are combined in such a way that in case (2), above we - will unnecessarily prevent the transition being cached, but in case (3) we will incorrectly - fail to prevent caching. - - The bug exposes itself if multiple puts of the same specific value are performed to a - property, and erroneously the put is allowed to be cached by the JIT. Method checks may be - generated caching calls of this structure. Subsequent puts performed from JIT code may - write different values without triggering a despecify transition, and as such cached method - checks will continue to pass, despite the value having changed. - - * runtime/JSObject.h: - (JSC::JSObject::putDirectInternal): - -2010-03-01 Tor Arne Vestbø - - Reviewed by Simon Hausmann. - - Fix the Qt build on Mac OS X/Cocoa 64-bit - - * JavaScriptCore.pri: Add missing implementation file to resolve JSC symbols - -2010-02-26 Gavin Barraclough - - Rubber Stamped by Geoff Garen. - - Remove wrec. All builds should have switched to yarr by now. - - * Android.mk: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/RegExp.cpp: - (JSC::RegExp::match): - * runtime/RegExp.h: - * wrec: Removed. - * wrec/CharacterClass.cpp: Removed. - * wrec/CharacterClass.h: Removed. - * wrec/CharacterClassConstructor.cpp: Removed. - * wrec/CharacterClassConstructor.h: Removed. - * wrec/Escapes.h: Removed. - * wrec/Quantifier.h: Removed. - * wrec/WREC.cpp: Removed. - * wrec/WREC.h: Removed. - * wrec/WRECFunctors.cpp: Removed. - * wrec/WRECFunctors.h: Removed. - * wrec/WRECGenerator.cpp: Removed. - * wrec/WRECGenerator.h: Removed. - * wrec/WRECParser.cpp: Removed. - * wrec/WRECParser.h: Removed. - * wscript: - -2010-02-26 Oliver Hunt - - Reviewed by Geoff Garen. - - Make the lookup table generator include an explicit cast to expected - type of the function. We do this because otherwise the blind intptr_t - cast that is subsequently applied allows incorrectly typed functions - to be inserted into the table, where they will only fail at runtime. - This change makes such errors produce a compile time failure. - - * create_hash_table: - -2010-02-26 Janne Koskinen - - Reviewed by Simon Hausmann. - - [Qt] Symbian specific getCPUTime implemetation - https://bugs.webkit.org/show_bug.cgi?id=34742 - - Default implementation doesn't work on Symbian devices. - This change adds a proper implementation by - asking thread execution time from the current thread. - - * runtime/TimeoutChecker.cpp: - (JSC::getCPUTime): - -2010-02-25 Alexey Proskuryakov - - Reviewed by Anders Carlsson. - - https://bugs.webkit.org/show_bug.cgi?id=35406 - Make generic array methods work with JavaArray - - Renamed lazyCreationData to subclassData. This is extra data that can be used by JSArray - subclasses (you can't add new data members, because it wouldn't fit in JSCell otherwise). - - * JavaScriptCore.exp: - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::subclassData): - (JSC::JSArray::setSubclassData): - * runtime/JSArray.h: - * runtime/RegExpConstructor.cpp: - (JSC::RegExpMatchesArray::RegExpMatchesArray): - (JSC::RegExpMatchesArray::~RegExpMatchesArray): - (JSC::RegExpMatchesArray::fillArrayInstance): - * runtime/RegExpMatchesArray.h: - (JSC::RegExpMatchesArray::getOwnPropertySlot): - (JSC::RegExpMatchesArray::getOwnPropertyDescriptor): - (JSC::RegExpMatchesArray::put): - (JSC::RegExpMatchesArray::deleteProperty): - (JSC::RegExpMatchesArray::getOwnPropertyNames): - -2010-02-25 Oliver Hunt - - Reviewed by Geoff Garen. - - JSC crashes like crazy in the JSPropertyNameIterator destructor - - Add back null check of m_cachedStructure. Curse last minute changes. - - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): - -2010-02-25 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Race condition in JSPropertyNameIterator and Structure destruction - https://bugs.webkit.org/show_bug.cgi?id=35398 - - JSPropertyNameIterator and Structure have a cyclic dependency that they - manage by clearing the appropriate reference in each other during their - destruction. However if the Structure is destroyed while the - JSPropertyNameIterator is dead but not yet finalized the Structures - WeakGCPtr will return null, and so prevent Structure from clearing - the m_cachedStructure pointer of the iterator. When the iterator is - then finalised the m_cachedStructure is invalid, and the attempt to - clear the structures back reference fails. - - To fix this we simply make JSPropertyNameIterator keep the Structure - alive, using the weak pointer to break the ref cycle. - - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): - The iterator now keeps m_cachedStructure alive itself, so no longer needs - to check for it being cleared - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::setCachedStructure): - Add an assertion to ensure correct usage - (JSC::JSPropertyNameIterator::cachedStructure): - Add .get() - * runtime/Structure.cpp: - (JSC::Structure::~Structure): - Add an assertion that our iterator isn't already dead, and remove - the now unnecessary attempt to clear the ref in the iterator - * runtime/WeakGCPtr.h: - (JSC::WeakGCPtr::hasDeadObject): - An assert-only function to allow us to assert correct behaviour - in the Structure destructor - -2010-02-25 Jochen Eisinger - - Reviewed by Jeremy Orlow. - - Make the context that was passed to the ThreadFunction accessible. - https://bugs.webkit.org/show_bug.cgi?id=35379 - - When a database is opened, right now you - don't have any context from where it is opened. The problem is that - the actual calls that open a database go through the sqlite3 vfs - layer, so there's no easy way to pass this function down to to - platform/sql/chromium/SQLFileSystemChromium*.cpp - - This patch will allow you to get from anywhere within webkit a pointer - to the Thread object that actually created the thread you're currently - on (in case of the database, this can be either a thread forked of - from the main thread or from a worker thread), and query the object - for context information. - - * wtf/Threading.h: - * wtf/ThreadingNone.cpp: - (WTF::threadContext): - * wtf/ThreadingPthreads.cpp: - (WTF::): - (WTF::identifierByPthreadHandle): - (WTF::establishIdentifierForPthreadHandle): - (WTF::pthreadHandleForIdentifier): - (WTF::contextForIdentifier): - (WTF::createThreadInternal): - (WTF::currentThread): - (WTF::threadContext): - * wtf/ThreadingWin.cpp: - (WTF::): - (WTF::threadMap): - (WTF::storeThreadHandleByIdentifier): - (WTF::threadHandleForIdentifier): - (WTF::contextForIdentifier): - (WTF::createThreadInternal): - (WTF::threadContext): - -2010-02-25 Jeremy Orlow - - Reverting to re-submit with better change log. - - * wtf/Threading.h: - * wtf/ThreadingNone.cpp: - (WTF::isMainThread): - * wtf/ThreadingPthreads.cpp: - (WTF::identifierByPthreadHandle): - (WTF::establishIdentifierForPthreadHandle): - (WTF::pthreadHandleForIdentifier): - (WTF::createThreadInternal): - (WTF::currentThread): - * wtf/ThreadingWin.cpp: - (WTF::threadMap): - (WTF::storeThreadHandleByIdentifier): - (WTF::threadHandleForIdentifier): - (WTF::createThreadInternal): - -2010-02-25 Jochen Eisinger - - Reviewed by Jeremy Orlow. - - Make the context that was passed to the ThreadFunction accessible. - https://bugs.webkit.org/show_bug.cgi?id=35379 - - * wtf/Threading.h: - * wtf/ThreadingNone.cpp: - (WTF::threadContext): - * wtf/ThreadingPthreads.cpp: - (WTF::): - (WTF::identifierByPthreadHandle): - (WTF::establishIdentifierForPthreadHandle): - (WTF::pthreadHandleForIdentifier): - (WTF::contextForIdentifier): - (WTF::createThreadInternal): - (WTF::currentThread): - (WTF::threadContext): - * wtf/ThreadingWin.cpp: - (WTF::): - (WTF::threadMap): - (WTF::storeThreadHandleByIdentifier): - (WTF::threadHandleForIdentifier): - (WTF::contextForIdentifier): - (WTF::createThreadInternal): - (WTF::threadContext): - -2010-02-24 Oliver Hunt - - Reviewed by Geoffrey Garen. - - [REGRESSION in r55185] EXC_BAD_ACCESS on opening inspector. - https://bugs.webkit.org/show_bug.cgi?id=35335 - - compileGetDirectOffset modifies the contents of the object register - when the object is not using the inline storage array. As the object - register contains our 'this' pointer we can't allow it to be clobbered. - The fix is simply to copy the register into a separate scratch register - when we're loading off an object that doesn't use inline storage. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompileGetByIdSelfList): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::privateCompileGetByIdSelfList): - -2010-02-24 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Speed up getter performance in the jit - https://bugs.webkit.org/show_bug.cgi?id=35332 - - Implement getter lookup caching in the interpreter. - The getter stubs are generated through basically the - same code paths as the normal get_by_id caching. - Instead of simply loading a property and returning, - we load the getter slot, and pass the getter, base value - and return address to a shared stub used for getter - dispatch. - - * jit/JIT.h: - (JSC::JIT::compileGetByIdProto): - (JSC::JIT::compileGetByIdSelfList): - (JSC::JIT::compileGetByIdProtoList): - (JSC::JIT::compileGetByIdChainList): - (JSC::JIT::compileGetByIdChain): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): - * runtime/GetterSetter.h: - -2010-02-23 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Web Inspector: Regression: r55027+: Inspector broken - https://bugs.webkit.org/show_bug.cgi?id=35253 - - op_get_by_id_getter_chain was not passing the correct this parameter. - The bug was caused by incorrect use of baseCell instead of baseValue, - baseValue contains the original object for the lookup (and hence the - correct this object), baseCell is clobbered as part of walking the - prototype chain. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-02-23 Gustavo Noronha Silva - - Rubber-stamped by Dimitri Glazkov. - - Chromium build fix. - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - -2010-02-23 Leandro Pereira - - Reviewed by Gustavo Noronha Silva. - - Changes references of GOwnPtr to reflect their new place. - http://webkit.org/b/35084 - - * JavaScriptCore/JavaScriptCore.gypi: - * JavaScriptCore/wtf/Threading.h: - * JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h: - -2010-02-23 Leandro Pereira - - Reviewed by Kenneth Rohde Christiansen. - - Adding the EFL implementation of JavaScriptCore. - See https://bugs.webkit.org/show_bug.cgi?id=35084 for details. - - * GNUmakefile.am: Updated to reflect the new location of GOwnPtr and - GRefPtr. - * wtf/efl/MainThreadEfl.cpp: Added. - * wtf/gobject/GOwnPtr.cpp: Moved from wtf/gtk. - * wtf/gobject/GOwnPtr.h: Moved from wtf/gtk. - * wtf/gobject/GRefPtr.cpp: Moved from wtf/gtk. - * wtf/gobject/GRefPtr.h: Moved from wtf/gtk. - -2010-02-22 Julien Chaffraix - - Reviewed by Darin Adler. - - Remove auto_ptr usage in JavaScriptCore. - https://bugs.webkit.org/show_bug.cgi?id=35221 - - * parser/Nodes.h: Removed now unneeded adopt method. - * parser/Parser.cpp: Removed include as it is not required anymore. - * wtf/OwnPtr.h: Removed the constructor from auto_ptr. - * wtf/VectorTraits.h: Removed a template specialization for auto_ptr. - * wtf/unicode/Collator.h: Made userDefault return a PassOwnPtr. - * wtf/unicode/CollatorDefault.cpp: - (WTF::Collator::userDefault): Changed the method to match the next signature. - * wtf/unicode/icu/CollatorICU.cpp: - (WTF::Collator::userDefault): Ditto. - -2010-02-22 Huahui Wu - - Reviewed by Eric Seidel. - - Add code that enables SquirrelFish Extreme (a.k.a JSCX, JSC JIT) - in Android. It's disabled by default, but is enabled when the - enveronment variable ENABLE_JSC_JIT is set to true. - https://bugs.webkit.org/show_bug.cgi?id=34855 - - * Android.mk: - * wtf/Platform.h: - -2010-02-22 Gavin Barraclough - - Reviewed by Oliver Hunt. - - JSStringBuilder should not CRASH if allocation fails, it should throw a JSException. - - * runtime/JSGlobalObjectFunctions.cpp: - * runtime/JSStringBuilder.h: - (JSC::JSStringBuilder::JSStringBuilder): - (JSC::JSStringBuilder::append): - (JSC::JSStringBuilder::build): - * runtime/StringBuilder.h: - (JSC::StringBuilder::build): - * wtf/Vector.h: - (WTF::VectorBufferBase::tryAllocateBuffer): - (WTF::): - (WTF::VectorBuffer::tryAllocateBuffer): - (WTF::::tryExpandCapacity): - (WTF::::tryReserveCapacity): - (WTF::::tryAppend): - -2010-02-22 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Map FastMalloc to BREW memory allocator - https://bugs.webkit.org/show_bug.cgi?id=33570 - - Use MALLOC macro instead of the standard malloc function. - Although RVCT provides malloc, we can't use it in BREW - because the loader does not initialize the base address properly. - - * wtf/FastMalloc.cpp: - * wtf/brew/SystemMallocBrew.h: Added. - (mallocBrew): - (callocBrew): - (freeBrew): - (reallocBrew): - -2010-02-22 Gustavo Noronha Silva - - Build fix for make distcheck. - - * GNUmakefile.am: - -2010-02-22 Laszlo Gombos - - Unreviewed build fix. - - [Qt] Build fix for RVCT. - - Fix after r55024. The "-i" option is for perl not for the - script. - - * DerivedSources.pro: - -2010-02-21 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Make UString::m_data be const, and make the UChar owned/ref-counted by CrossThreadRefCounted be const too. - - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::baseSharedBuffer): - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UStringImpl::create): - (JSC::UStringImpl::data): - (JSC::UStringImpl::UStringImpl): - * wtf/OwnFastMallocPtr.h: - (WTF::OwnFastMallocPtr::~OwnFastMallocPtr): - -2010-02-21 Yuta Kitamura - - Reviewed by Darin Adler. - - HashMapTranslatorAdapter::translate() needs to set the mapped value. - - HTTPHeaderMap::add(const char*, const String&) does not work - https://bugs.webkit.org/show_bug.cgi?id=35227 - - * wtf/HashMap.h: - (WTF::HashMapTranslatorAdapter::translate): - -2010-02-19 Maciej Stachowiak - - Reviewed by David Levin. - - Add an ENABLE flag for sandboxed iframes to make it possible to disable it in releases - https://bugs.webkit.org/show_bug.cgi?id=35147 - - * Configurations/FeatureDefines.xcconfig: - -2010-02-19 Gavin Barraclough - - Reviewed by Oliver Hunt. - - JSString::getIndex() calls value() to resolve the string value (is a rope) - to a UString, then passes the result to jsSingleCharacterSubstring without - checking for an exception. In case of out-of-memory the returned UString - is null(), which may result in an out-of-buounds substring being created. - This is bad. - - Simple fix is to be able to get an index from a rope without resolving to - UString. This may be a useful optimization in some test cases. - - The same bug exists in some other methods is JSString, these can be fixed - by changing them to call getIndex(). - - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::jsSingleCharacterSubstring): - (JSC::JSString::getIndex): - (JSC::jsSingleCharacterString): - (JSC::JSString::getStringPropertySlot): - * runtime/UStringImpl.cpp: - (JSC::singleCharacterSubstring): - * runtime/UStringImpl.h: - (JSC::UStringImpl::singleCharacterSubstring): - -2010-02-19 Oliver Hunt - - RS = Gavin Barraclough. - - Split the 32/64 version of JITPropertyAccess into a separate file. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/JITPropertyAccess.cpp: - * jit/JITPropertyAccess32_64.cpp: Added. - (JSC::JIT::emit_op_put_by_index): - (JSC::JIT::emit_op_put_getter): - (JSC::JIT::emit_op_put_setter): - (JSC::JIT::emit_op_del_by_id): - (JSC::JIT::emit_op_method_check): - (JSC::JIT::emitSlow_op_method_check): - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::emitSlow_op_put_by_id): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::compilePutDirectOffset): - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::testPrototype): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchMethodCallProto): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::emit_op_get_by_pname): - (JSC::JIT::emitSlow_op_get_by_pname): - -2010-02-19 Patrick Gansterer - - Reviewed by Laszlo Gombos. - - Added additional parameter to create_rvct_stubs - for setting the regularexpression prefix. - Renamed it because it now works for other platforms too. - https://bugs.webkit.org/show_bug.cgi?id=34951 - - * DerivedSources.pro: - * create_jit_stubs: Copied from JavaScriptCore/create_rvct_stubs. - * create_rvct_stubs: Removed. - -2010-02-18 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Improve interpreter getter performance - https://bugs.webkit.org/show_bug.cgi?id=35138 - - Improve the performance of getter dispatch by making it possible - for the interpreter to cache the GetterSetter object lookup. - - To do this we simply need to make PropertySlot aware of getters - as a potentially cacheable property, and record the base and this - objects for a getter access. This allows us to use more-or-less - identical code to that used by the normal get_by_id caching, with - the dispatch being the only actual difference. - - I'm holding off of implementing this in the JIT until I do some - cleanup to try and making coding in the JIT not be as horrible - as it is currently. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::derefStructures): - (JSC::CodeBlock::refStructures): - * bytecode/Opcode.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSObject.cpp: - (JSC::JSObject::fillGetterPropertySlot): - * runtime/PropertySlot.cpp: - (JSC::PropertySlot::functionGetter): - * runtime/PropertySlot.h: - (JSC::PropertySlot::isGetter): - (JSC::PropertySlot::isCacheable): - (JSC::PropertySlot::isCacheableValue): - (JSC::PropertySlot::setValueSlot): - (JSC::PropertySlot::setGetterSlot): - (JSC::PropertySlot::setCacheableGetterSlot): - (JSC::PropertySlot::clearOffset): - (JSC::PropertySlot::thisValue): - -2010-02-17 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed a portion of: - | https://bugs.webkit.org/show_bug.cgi?id=28676 - Safari 4 does not release memory back to the operating system fast enough (28676) - - This patch fixes a surprisingly common edge case in which the page heap - would have only one free span, but that span would be larger than the - minimum free size, so we would decide not to free it, even though it - could be as large as 100MB or more! - - SunSpider reports no change on Mac or Windows. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::scavenge): Call shouldContinueScavenging() instead - of doing the math ourselves. Don't keep a local value for pagesDecommitted - because that lets free_committed_pages_ be wrong temporarily. Instead, - update free_committed_pages_ as we go. ASSERT that we aren't releasing - a span that has already been released, because we think this is impossible. - Finally, don't be afraid to release all free memory in the page heap when - scavenging. We only scavenge after 5 seconds of the application's working - set not growing, and we keep both thread caches and a central cache on - top of the page heap, so the extra free pages in the page heap were just - overkill. - -2010-02-17 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=35070 - Addition of 2 strings of length 2^31 may result in a string of length 0. - - Check for overflow when creating a new JSString as a result of an addition - or concatenation, throw an out of memory exception. - - * runtime/JSString.h: - (JSC::): - * runtime/Operations.h: - (JSC::jsString): - -2010-02-17 Xan Lopez - - Reviewed by Gustavo Noronha. - - [Linux] Webkit incompatible with Java plugins - https://bugs.webkit.org/show_bug.cgi?id=24912 - - Add support for GFile to GOwnPtr. - - Based on original work by Gustavo Noronha. - - * wtf/gtk/GOwnPtr.cpp: - (WTF::GFile): - * wtf/gtk/GOwnPtr.h: - -2010-02-16 Gavin Barraclough - - Reviewed by Mark Rowe. - - Fix a handful of other leaks seen on the buildbot. - - * runtime/UStringImpl.h: - (JSC::UStringOrRopeImpl::deref): Delegate through to the subclass version of deref to ensure that - the correct cleanup takes place. This function previously featured some code that attempted to - skip deletion of static UStringImpl's. Closer inspection revealed that it was in fact equivalent - to "if (false)", meaning that UStringImpl's which had their final deref performed via this function - were leaked. - -2010-02-16 Mark Rowe - - Reviewed by Gavin Barraclough. - - Fix a handful of leaks seen on the buildbot. - - * runtime/UStringImpl.h: - (JSC::UStringOrRopeImpl::deref): Call URopeImpl::destructNonRecursive rather than delete - to ensure that the rope's fibers are also destroyed. - -2010-02-16 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=34964 - Leaks tool reports false memory leaks due to Rope implementation. - - A rope is a recursive data structure where each node in the rope holds a set of - pointers, each of which may reference either a string (in UStringImpl form) or - another rope node. A low bit in each pointer is used to distinguish between - rope & string elements, in a fashion similar to the recently-removed - PtrAndFlags class (see https://bugs.webkit.org/show_bug.cgi?id=33731 ). Again, - this causes a problem for Leaks - refactor to remove the magic pointer - mangling. - - Move Rope out from JSString.h and rename to URopeImpl, to match UStringImpl. - Give UStringImpl and URopeImpl a common parent class, UStringOrRopeImpl. - Repurpose an otherwise invalid permutation to flags (static & should report - memory cost) to identify ropes. - - This allows us to change the rope's fibers to interrogate the object rather - than storing a bool within the low bits of the pointer (or in some cases the - use of a common parent class removes the need to determine the type at all - - there is a common interface to ref or get the length of either ropes or strings). - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - (OpaqueJSClassContextData::OpaqueJSClassContextData): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::keyForCharacterSwitch): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - * runtime/Identifier.cpp: - (JSC::Identifier::equal): - (JSC::Identifier::addSlowCase): - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - * runtime/JSString.h: - (JSC::): - (JSC::RopeBuilder::JSString): - (JSC::RopeBuilder::~JSString): - (JSC::RopeBuilder::appendStringInConstruct): - (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): - (JSC::RopeBuilder::JSStringFinalizerStruct::JSStringFinalizerStruct): - (JSC::RopeBuilder::JSStringFinalizerStruct::): - * runtime/UString.cpp: - (JSC::UString::toStrictUInt32): - (JSC::equal): - * runtime/UString.h: - (JSC::UString::isEmpty): - (JSC::UString::size): - * runtime/UStringImpl.cpp: - (JSC::URopeImpl::derefFibersNonRecursive): - (JSC::URopeImpl::destructNonRecursive): - * runtime/UStringImpl.h: - (JSC::UStringOrRopeImpl::isRope): - (JSC::UStringOrRopeImpl::length): - (JSC::UStringOrRopeImpl::ref): - (JSC::UStringOrRopeImpl::): - (JSC::UStringOrRopeImpl::operator new): - (JSC::UStringOrRopeImpl::UStringOrRopeImpl): - (JSC::UStringImpl::adopt): - (JSC::UStringImpl::createUninitialized): - (JSC::UStringImpl::tryCreateUninitialized): - (JSC::UStringImpl::data): - (JSC::UStringImpl::cost): - (JSC::UStringImpl::deref): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::): - (JSC::URopeImpl::tryCreateUninitialized): - (JSC::URopeImpl::initializeFiber): - (JSC::URopeImpl::fiberCount): - (JSC::URopeImpl::fibers): - (JSC::URopeImpl::deref): - (JSC::URopeImpl::URopeImpl): - (JSC::URopeImpl::hasOneRef): - (JSC::UStringOrRopeImpl::deref): - -2010-02-15 Gabor Loki - - Reviewed by Gavin Barraclough. - - Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32) - https://bugs.webkit.org/show_bug.cgi?id=34939 - - * jit/JITStubs.cpp: - -2010-02-15 Gavin Barraclough - - Reviewed by NOBODY (Build Fix!). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-02-15 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Some general Rope related refactoring. - - Rename Rope::m_ropeLength to m_fiberCount, to be more descriptive. - Rename Rope::m_stringLength to simply m_length (since this is the - more conventional name for the length of a string). Move append - behaviour out into a new RopeBuilder class, so that Rope no longer - needs any knowledge of the JSString or UString implementation. - - Make Rope no longer be nested within JSString. - (Rope now no-longer need reside within JSString.h, but leaving - the change of moving this out to a different header as a separate - change from these renames). - - * JavaScriptCore.exp: - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * runtime/JSString.cpp: - (JSC::Rope::destructNonRecursive): - (JSC::Rope::~Rope): - (JSC::JSString::resolveRope): - (JSC::JSString::toBoolean): - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::Rope::Fiber::Fiber): - (JSC::Rope::Fiber::deref): - (JSC::Rope::Fiber::ref): - (JSC::Rope::Fiber::refAndGetLength): - (JSC::Rope::Fiber::isRope): - (JSC::Rope::Fiber::rope): - (JSC::Rope::Fiber::isString): - (JSC::Rope::Fiber::string): - (JSC::Rope::Fiber::nonFiber): - (JSC::Rope::tryCreateUninitialized): - (JSC::Rope::append): - (JSC::Rope::fiberCount): - (JSC::Rope::length): - (JSC::Rope::fibers): - (JSC::Rope::Rope): - (JSC::Rope::operator new): - (JSC::): - (JSC::RopeBuilder::JSString): - (JSC::RopeBuilder::~JSString): - (JSC::RopeBuilder::length): - (JSC::RopeBuilder::canGetIndex): - (JSC::RopeBuilder::appendStringInConstruct): - (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): - (JSC::RopeBuilder::isRope): - (JSC::RopeBuilder::fiberCount): - (JSC::JSString::getStringPropertySlot): - * runtime/Operations.h: - (JSC::jsString): - -2010-02-15 Gavin Barraclough - - Reviewed by NOBODY (Build fix). - - Add missing cast for !YARR (PPC) builds. - - * runtime/RegExp.cpp: - (JSC::RegExp::match): - -2010-02-14 Gavin Barraclough - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=33731 - Many false leaks in release builds due to PtrAndFlags - - StructureTransitionTable was effectively a smart pointer type, - one machine word in size and wholly contained as a member of - of Structure. It either pointed to an actual table, or could - be used to describe a single transtion entry without use of a - table. - - This, however, worked by using a PtrAndFlags, which is not - compatible with the leaks tool. Since there is no clear way to - obtain another bit for 'free' here, and since there are bits - available up in Structure, merge this functionality back up into - Structure. Having this in a separate class was quite clean - from an enacapsulation perspective, but this solution doesn't - seem to bad - all table access is now intermediated through the - Structure::structureTransitionTableFoo methods, keeping the - optimization fairly well contained. - - This was the last use of PtrAndFlags, so removing the file too. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.h: - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::~Structure): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::hasTransition): - * runtime/Structure.h: - (JSC::Structure::): - (JSC::Structure::structureTransitionTableContains): - (JSC::Structure::structureTransitionTableGet): - (JSC::Structure::structureTransitionTableHasTransition): - (JSC::Structure::structureTransitionTableRemove): - (JSC::Structure::structureTransitionTableAdd): - (JSC::Structure::structureTransitionTable): - (JSC::Structure::setStructureTransitionTable): - (JSC::Structure::singleTransition): - (JSC::Structure::setSingleTransition): - * runtime/StructureTransitionTable.h: - * wtf/PtrAndFlags.h: Removed. - -2010-02-15 Gavin Barraclough - - Rubber Stamped by Geoff Garen. - - Bug 34948 - tryMakeString should fail on error in length calculation - - Ooops! - "bool overflow" argument should have been "bool& overflow". - - * runtime/UString.h: - (JSC::sumWithOverflow): - (JSC::tryMakeString): - -2010-02-15 Gavin Barraclough - - Reviewed by NOBODY (Build Fix (pt 2!)). - - Some symbol names have changed, remove, will readd if required. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-02-15 Gavin Barraclough - - Reviewed by NOBODY (Build Fix (pt 1?)). - - Some symbol names have changed, remove, will readd if required. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-02-15 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Removed some mistaken code added in http://trac.webkit.org/changeset/53860. - - * API/APIShims.h: - (JSC::APICallbackShim::APICallbackShim): - (JSC::APICallbackShim::~APICallbackShim): No need to start/stop the - timeout checker when calling out from the API to the client; we want to - monitor the VM for timeouts, not the client. This mistake was harmless / - undetectable, since it's totally redundant with the APIEntryShim, which - also starts / stops the timeout checker. - -2010-02-15 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 34952 - String lengths in UString should be unsigned. - This matches WebCore::StringImpl, and better unifies behaviour throughout JSC. - - * JavaScriptCore.exp: - * bytecode/EvalCodeCache.h: - * runtime/Identifier.cpp: - (JSC::Identifier::equal): - * runtime/Identifier.h: - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEscape): - * runtime/JSONObject.cpp: - (JSC::gap): - (JSC::Stringifier::indent): - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToPrecision): - * runtime/RegExp.cpp: - (JSC::RegExp::match): - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferencesSlow): - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncSplit): - (JSC::trimString): - * runtime/UString.cpp: - (JSC::UString::UString): - (JSC::UString::from): - (JSC::UString::getCString): - (JSC::UString::ascii): - (JSC::UString::operator[]): - (JSC::UString::toStrictUInt32): - (JSC::UString::find): - (JSC::UString::rfind): - (JSC::UString::substr): - (JSC::operator<): - (JSC::operator>): - (JSC::compare): - (JSC::equal): - (JSC::UString::UTF8String): - * runtime/UString.h: - (JSC::UString::size): - (JSC::operator==): - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::create): - * runtime/UStringImpl.h: - (JSC::UStringImpl::create): - (JSC::UStringImpl::size): - (JSC::UStringImpl::computeHash): - (JSC::UStringImpl::UStringImpl): - -2010-02-15 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 34948 - tryMakeString should fail on error in length calculation - - The sum of the length of substrings could overflow. - - * runtime/UString.h: - (JSC::sumWithOverflow): - (JSC::tryMakeString): - -2010-02-15 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed Crash beneath JSGlobalContextRelease when - typing in Google search field with GuardMalloc/full page heap enabled - - * API/JSContextRef.cpp: Don't use APIEntryShim, since that requires - a JSGlobalData, which this function destroys. Do use setCurrentIdentifierTable - and JSLock instead, since those are the two features of APIEntryShim we - require. - -2010-02-15 Patrick Gansterer - - Reviewed by Laszlo Gombos. - - Added additional parameter to create_rvct_stubs - for setting the offset of thunkReturnAddress. - https://bugs.webkit.org/show_bug.cgi?id=34657 - - * create_rvct_stubs: - * jit/JITStubs.cpp: - -2010-02-15 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - Fix QScriptValue::toIntXX methods. - - More ECMA Script compliance. - - [Qt] QScriptValue::toIntXX returns incorrect values - https://bugs.webkit.org/show_bug.cgi?id=34847 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::toInteger): - (QScriptValuePrivate::toInt32): - (QScriptValuePrivate::toUInt32): - (QScriptValuePrivate::toUInt16): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: - (tst_QScriptValue::toInteger_initData): - (tst_QScriptValue::toInteger_makeData): - (tst_QScriptValue::toInteger_test): - (tst_QScriptValue::toInt32_initData): - (tst_QScriptValue::toInt32_makeData): - (tst_QScriptValue::toInt32_test): - (tst_QScriptValue::toUInt32_initData): - (tst_QScriptValue::toUInt32_makeData): - (tst_QScriptValue::toUInt32_test): - (tst_QScriptValue::toUInt16_initData): - (tst_QScriptValue::toUInt16_makeData): - (tst_QScriptValue::toUInt16_test): - -2010-02-14 Laszlo Gombos - - Reviewed by Adam Barth. - - Implement NEVER_INLINE and NO_RETURN for RVCT - https://bugs.webkit.org/show_bug.cgi?id=34740 - - * wtf/AlwaysInline.h: - -2010-02-12 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=33731 - Remove uses of PtrAndFlags from JIT data stuctures. - - These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid - permutation of pointer states in MethodCallLinkInfo to represent the removed bits. - - * bytecode/CodeBlock.h: - (JSC::CallLinkInfo::seenOnce): - (JSC::CallLinkInfo::setSeen): - (JSC::MethodCallLinkInfo::MethodCallLinkInfo): - (JSC::MethodCallLinkInfo::seenOnce): - (JSC::MethodCallLinkInfo::setSeen): - * jit/JIT.cpp: - (JSC::JIT::unlinkCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::patchMethodCallProto): - * runtime/UString.h: - -2010-02-12 Gavin Barraclough - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=33731 - Many false leaks in release builds due to PtrAndFlags - - Remove UntypedPtrAndBitfield (similar to PtrAndFlags) in UStringImpl, - and steal bits from the refCount instead. - - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::baseSharedBuffer): - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UStringImpl::cost): - (JSC::UStringImpl::isIdentifier): - (JSC::UStringImpl::setIsIdentifier): - (JSC::UStringImpl::ref): - (JSC::UStringImpl::deref): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::bufferOwnerString): - (JSC::UStringImpl::bufferOwnership): - (JSC::UStringImpl::isStatic): - (JSC::UStringImpl::): - -2010-02-12 Geoffrey Garen - - Reviewed by Darin Adler. - - Removed an unnecessary data dependency from my last patch. - - * runtime/SmallStrings.cpp: - (JSC::SmallStrings::markChildren): Since isAnyStringMarked being false - is a condition of entering the loop, we can just use '=' instead of '|='. - -2010-02-12 Janne Koskinen - - Reviewed by Tor Arne Vestbø. - - Additional refptr/passrefptr workarounds for WINSCW compiler - https://bugs.webkit.org/show_bug.cgi?id=28054 - - * wtf/PassRefPtr.h: - (WTF::refIfNotNull): - (WTF::PassRefPtr::PassRefPtr): - (WTF::PassRefPtr::~PassRefPtr): - (WTF::PassRefPtr::clear): - (WTF::::operator): - * wtf/RefPtr.h: - (WTF::RefPtr::RefPtr): - (WTF::::operator): - -2010-02-12 Janne Koskinen - - Reviewed by Tor Arne Vestbø. - - Additional refptr/passrefptr workarounds for WINSCW compiler - https://bugs.webkit.org/show_bug.cgi?id=28054 - - * wtf/PassRefPtr.h: - (WTF::refIfNotNull): - (WTF::PassRefPtr::PassRefPtr): - (WTF::PassRefPtr::~PassRefPtr): - (WTF::PassRefPtr::clear): - (WTF::::operator): - * wtf/RefPtr.h: - (WTF::RefPtr::RefPtr): - (WTF::::operator): - -2010-02-12 Janne Koskinen - - Reviewed by Tor Arne Vestbø. - - Additional refptr/passrefptr workarounds for WINSCW compiler - https://bugs.webkit.org/show_bug.cgi?id=28054 - - * wtf/PassRefPtr.h: - (WTF::refIfNotNull): - (WTF::PassRefPtr::PassRefPtr): - (WTF::PassRefPtr::~PassRefPtr): - (WTF::PassRefPtr::clear): - (WTF::::operator): - * wtf/RefPtr.h: - (WTF::RefPtr::RefPtr): - (WTF::::operator): - -2010-02-12 Janne Koskinen - - Reviewed by Simon Hausmann. - - Don't import the cmath functions from std:: for WINSCW. - - * wtf/MathExtras.h: - -2010-02-12 Kwang Yul Seo - - Reviewed by Adam Barth. - - Typedef both JSChar and UChar to wchar_t in RVCT. - https://bugs.webkit.org/show_bug.cgi?id=34560 - - Define both JSChar and UChar to wchar_t as the size - of wchar_t is 2 bytes in RVCT. - - * API/JSStringRef.h: - * wtf/unicode/qt4/UnicodeQt4.h: - -2010-02-11 Geoffrey Garen - - Reviewed by Oliver Hunt and Darin Adler. - - The rest of the fix for - https://bugs.webkit.org/show_bug.cgi?id=34864 | - Many objects left uncollected after visiting mail.google.com and closing - window - - Don't unconditionally hang onto small strings. Instead, hang onto all - small strings as long as any small string is still referenced. - - SunSpider reports no change. - - * runtime/Collector.cpp: - (JSC::Heap::markRoots): Mark the small strings cache last, so it can - check if anything else has kept any strings alive. - - * runtime/SmallStrings.cpp: - (JSC::isMarked): - (JSC::SmallStrings::markChildren): Only keep our strings alive if some - other reference to at least one of them exists, too. - -2010-02-11 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Some progress toward fixing - https://bugs.webkit.org/show_bug.cgi?id=34864 | - Many objects left uncollected after visiting mail.google.com and closing - window - - SunSpider reports no change. - - Keep weak references, rather than protected references, to cached for-in - property name enumerators. - - One problem with protected references is that a chain like - [ gc object 1 ] => [ non-gc object ] => [ gc object 2 ] - takes two GC passes to break, since the first pass collects [ gc object 1 ], - releasing [ non-gc object ] and unprotecting [ gc object 2 ], and only - then can a second pass collect [ gc object 2 ]. - - Another problem with protected references is that they can keep a bunch - of strings alive long after they're useful. In SunSpider and a few popular - websites, the size-speed tradeoff seems to favor weak references. - - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Moved this constructor - into the .cpp file, since it's not used elsewhere. - - (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): Added a destructor - to support our weak reference. - - * runtime/JSPropertyNameIterator.h: - (JSC::Structure::setEnumerationCache): - (JSC::Structure::clearEnumerationCache): - (JSC::Structure::enumerationCache): Added a function for clearing a - Structure's enumeration cache, used by our new destructor. Also fixed - indentation to match the rest of the file. - - * runtime/Structure.h: Changed from protected pointer to weak pointer. - -2010-02-11 Chris Rogers - - Reviewed by David Levin. - - audio engine: add Complex number class - https://bugs.webkit.org/show_bug.cgi?id=34538 - - * wtf/Complex.h: Added. - (WebCore::complexFromMagnitudePhase): - -2010-02-10 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Added an SPI for asking about all the different live objects on the heap. - Useful for memory debugging. - - * JavaScriptCore.exp: Export the new SPI. - - * runtime/Collector.cpp: - (JSC::typeName): Use a little capitalization. Don't crash in the case of - a non-object cell, since it might just be an uninitialized cell. - - (JSC::Heap::objectTypeCounts): The new SPI. - - * runtime/Collector.h: - * runtime/CollectorHeapIterator.h: - (JSC::CollectorHeapIterator::advance): - (JSC::LiveObjectIterator::operator++): - (JSC::DeadObjectIterator::operator++): - (JSC::ObjectIterator::operator++): Made 2 tweaks to these iterators: - (1) Skip the last cell in the block, since it's a dummy sentinel, and - we don't want it to confuse the object count; (2) Fixed a logic error - in LiveObjectIterator that could cause it to iterate dead objects if - m_block were equal to m_heap.nextBlock and m_cell were less than - m_heap.nextCell. No test for this since I can't think of a way that this - could make WebKit behave badly. - -2010-02-11 Steve Block - - Reviewed by Darin Adler. - - Guard cmath using declarations in MathExtras.h on Android - https://bugs.webkit.org/show_bug.cgi?id=34840 - - Android does not provide these functions. - - * wtf/MathExtras.h: - -2010-02-08 Maciej Stachowiak - - Reviewed by Cameron Zwarich. - - Restore ENABLE_RUBY flag so vendors can ship with Ruby disabled if they choose. - https://bugs.webkit.org/show_bug.cgi?id=34698 - - * Configurations/FeatureDefines.xcconfig: - -2010-02-10 Kevin Watters - - Reviewed by Kevin Ollivier. - - [wx] Add Windows complex text support and Mac support for containsCharacters. - - https://bugs.webkit.org/show_bug.cgi?id=34759 - - * wscript: - -2010-02-10 Alexey Proskuryakov - - Addressing issues found by style bot. - - * wtf/ValueCheck.h: Renamed header guard to match final file name. - - * wtf/Vector.h: (WTF::::checkConsistency): Remove braces around a one-line clause. - -2010-02-09 Alexey Proskuryakov - - Reviewed by Geoffrey Garen. - - https://bugs.webkit.org/show_bug.cgi?id=34490 - WebCore::ImageEventSender::dispatchPendingEvents() crashes in certain conditions - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - Added ValueCheck.h. - - * wtf/ValueCheck.h: Added. Moved code out of HashTraits, since it would be awkward to - include that from Vector.h. - (WTF::ValueCheck::checkConsistency): Allow null pointers, those are pretty consistent. - - * wtf/HashTraits.h: Moved value checking code out of here. - - * wtf/HashTable.h: (WTF::::checkTableConsistencyExceptSize): Updated for the above changes. - - * wtf/Vector.h: - (WTF::::checkConsistency): Check all vector elements. - (WTF::ValueCheck): Support checking a Vector as an element in other containers. Currently - unused. - -2010-02-10 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - Fix QScriptValue::toBool. - - Fix ECMA compliance in the QScriptValue for values like 0, NaN and - empty strings. - - [Qt] QScriptValue::toBool problem - https://bugs.webkit.org/show_bug.cgi?id=34793 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::toBool): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: - (tst_QScriptValue::toBool_initData): - (tst_QScriptValue::toBool_makeData): - (tst_QScriptValue::toBool_test): - (tst_QScriptValue::toBoolean_initData): - (tst_QScriptValue::toBoolean_makeData): - (tst_QScriptValue::toBoolean_test): - -2009-10-06 Yongjun Zhang - - Reviewed by Simon Hausmann. - - Use derefIfNotNull() to work around WINSCW compiler forward declaration bug - - The compiler bug is reported at - https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812. - - The change should be reverted when the above bug is fixed in WINSCW compiler. - - https://bugs.webkit.org/show_bug.cgi?id=28054 - -2009-10-06 Yongjun Zhang - - Reviewed by Simon Hausmann. - - Get rid of WINSCW hack for UnSpecifiedBoolType - - Add parenthesis around (RefPtr::*UnspecifiedBoolType) to make the WINSCW - compiler work with the default UnSpecifiedBoolType() operator. - - https://bugs.webkit.org/show_bug.cgi?id=28054 - - * wtf/RefPtr.h: - -2010-02-09 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - New functions nullValue() and undefinedValue(). - - [Qt] QScriptEngine should contain nullValue and undefinedValue methods - https://bugs.webkit.org/show_bug.cgi?id=34749 - - * qt/api/qscriptengine.cpp: - (QScriptEngine::nullValue): - (QScriptEngine::undefinedValue): - * qt/api/qscriptengine.h: - * qt/tests/qscriptengine/tst_qscriptengine.cpp: - (tst_QScriptEngine::nullValue): - (tst_QScriptEngine::undefinedValue): - -2010-02-09 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - Fixes for QScriptValue::toNumber(). - - Fix ECMA compliance in QScriptValue for values unbound - to a QScriptEngine. - - [Qt] QScriptValue::toNumber() is broken - https://bugs.webkit.org/show_bug.cgi?id=34592 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::toNumber): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: - (tst_QScriptValue::toNumber_initData): - (tst_QScriptValue::toNumber_makeData): - (tst_QScriptValue::toNumber_test): - -2010-02-09 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - Fix QScriptValue::isNumber(). - - The isNumber() should return 'true' if the value is in the CNumber - state. - - [Qt] QScriptValue::isNumber() returns an incorrect value - https://bugs.webkit.org/show_bug.cgi?id=34575 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::isNumber): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: - (tst_QScriptValue::isNumber_initData): - (tst_QScriptValue::isNumber_makeData): - (tst_QScriptValue::isNumber_test): - -2010-02-09 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Small refactoring to the small strings cache to allow it to be cleared - dynamically. - - * runtime/SmallStrings.cpp: - (JSC::SmallStrings::SmallStrings): - (JSC::SmallStrings::clear): - * runtime/SmallStrings.h: Moved initialization code into a shared function, - and changed the constructor to call it. - -2010-02-09 Gavin Barraclough - - Rubber Stamped by Geoff Garen. - - Rename StringBuilder::release && JSStringBuilder::releaseJSString - to 'build()'. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::paramString): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - * runtime/JSONObject.cpp: - (JSC::Stringifier::stringify): - * runtime/JSStringBuilder.h: - (JSC::JSStringBuilder::build): - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::Lexer::lexString): - * runtime/NumberPrototype.cpp: - (JSC::integerPartNoExp): - (JSC::numberProtoFuncToFixed): - * runtime/StringBuilder.h: - (JSC::StringBuilder::build): - -2010-02-09 John Sullivan - - https://bugs.webkit.org/show_bug.cgi?id=34772 - Overzealous new assertion in URStringImpl::adopt() - - Reviewed by Adam Barth. - - * runtime/UStringImpl.h: - (JSC::UStringImpl::adopt): - Only assert that vector.data() is non-zero if vector.size() is non-zero. - -2010-02-09 Nikolas Zimmermann - - Not reviewed. Try to fix build problem on SnowLeopard slaves to bring them back. - - * API/JSClassRef.cpp: - (tryCreateStringFromUTF8): Mark method as 'static inline' to suppress "warning: no previous prototype for ..." - -2010-02-09 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Three small string fixes: - (1) StringBuilder::release should CRASH if the buffer allocation failed. - (2) Remove weird, dead code from JSString::tryGetValue, replace with an ASSERT. - (3) Move UString::createFromUTF8 out to the API, as tryCreateStringFromUTF8. - This is only used from the API, and (now) unlike other UString::create - methods may return UString::null() to indicate failure cases. Better - handle these in the API. - - * API/JSClassRef.cpp: - (tryCreateStringFromUTF8): - (OpaqueJSClass::OpaqueJSClass): - (OpaqueJSClassContextData::OpaqueJSClassContextData): - * runtime/JSString.h: - (JSC::Fiber::tryGetValue): - * runtime/StringBuilder.h: - (JSC::StringBuilder::release): - * runtime/UString.cpp: - (JSC::UString::UString): - (JSC::UString::from): - (JSC::UString::find): - * runtime/UString.h: - -2010-02-09 Janne Koskinen - - Reviewed by Laszlo Gombos. - - [Qt] use nanval() for Symbian as nonInlineNaN - https://bugs.webkit.org/show_bug.cgi?id=34170 - - numeric_limits::quiet_NaN is broken in Symbian - causing NaN to be evaluated as a number. - - * runtime/JSValue.cpp: - (JSC::nonInlineNaN): - -2010-02-09 Tamas Szirbucz - - Reviewed by Gavin Barraclough. - - Add a soft modulo operation to ARM JIT using a trampoline function. - The performance progression is about ~1.8% on ARMv7 - https://bugs.webkit.org/show_bug.cgi?id=34424 - - Developed in cooperation with Gabor Loki. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - * jit/JITOpcodes.cpp: - (JSC::JIT::softModulo): - * jit/JITStubs.h: - (JSC::JITThunks::ctiSoftModulo): - * wtf/Platform.h: - -2010-02-08 Gavin Barraclough - - Reviewed by NOBODY (SL/win build fixes). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * runtime/StringPrototype.cpp: - -2010-02-08 Gavin Barraclough - - Reviewed by Oliver Hunt - - Make String.replace throw an exception on out-of-memory, rather than - returning a null (err, empty-ish) string. Move String::replaceRange - and String::spliceSubstringsWithSeparators out to StringPrototype - - these were fairly specific use anyway, and we can better integrate - throwing the JS expcetion this way. - - Also removes redundant assignment operator from UString. - - * JavaScriptCore.exp: - * runtime/StringPrototype.cpp: - (JSC::StringRange::StringRange): - (JSC::jsSpliceSubstringsWithSeparators): - (JSC::jsReplaceRange): - (JSC::stringProtoFuncReplace): - * runtime/UString.cpp: - * runtime/UString.h: - -2010-02-08 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Undefine WTF_OS_WINDOWS and WTF_PLATFORM_WIN - https://bugs.webkit.org/show_bug.cgi?id=34561 - - As the binary for simulator is built with MSVC 2005, - WTF_OS_WINDOWS and WTF_PLATFORM_WIN are defined. - Undefine them as we don't target Windows. - - * wtf/Platform.h: - -2010-02-08 Chris Rogers - - Reviewed by Darin Adler. - - audio engine: add Vector3 class - https://bugs.webkit.org/show_bug.cgi?id=34548 - - * wtf/Vector3.h: Added. - (WebCore::Vector3::Vector3): - (WebCore::Vector3::abs): - (WebCore::Vector3::isZero): - (WebCore::Vector3::normalize): - (WebCore::Vector3::x): - (WebCore::Vector3::y): - (WebCore::Vector3::z): - (WebCore::operator+): - (WebCore::operator-): - (WebCore::operator*): - (WebCore::dot): - (WebCore::cross): - (WebCore::distance): - -2010-02-08 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Fix warning in clang++ - - * runtime/Structure.h: - (JSC::Structure::propertyStorageSize): - -2010-02-08 Gavin Barraclough - - Reviewed by Geoff Garen. - - Make makeString CRASH if we fail to allocate a string. - - (tryMakeString or jsMakeNontrivialString can be used where we - expect allocation may fail and want to handle the error). - - * runtime/JSStringBuilder.h: - (JSC::jsMakeNontrivialString): - * runtime/UString.h: - (JSC::tryMakeString): - (JSC::makeString): - -2010-02-08 Gavin Barraclough - - Rubber Stamped by Oliver Hunt. - - Remove a couple of unnecesary C-style casts spotted by Darin. - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::globalFuncEscape): - -2010-02-08 Gavin Barraclough - - Reviewed by Geoff Garen. - - Switch some more StringBuilder/jsNontrivialString code to use - JSStringBuilder/jsMakeNontrivialString - these methods will - throw an exception if we hit out-of-memory, rather than just - CRASHing. - - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEscape): - -2010-02-08 Gavin Barraclough - - Reviewed by Sam Weinig. - - Use an empty identifier instead of a null identifier for parse - tokens without an identifier. - - This helps encapsulate the null UStringImpl within UString. - - * parser/Grammar.y: - * parser/NodeConstructors.h: - (JSC::ContinueNode::ContinueNode): - (JSC::BreakNode::BreakNode): - (JSC::ForInNode::ForInNode): - * runtime/CommonIdentifiers.cpp: - (JSC::CommonIdentifiers::CommonIdentifiers): - * runtime/CommonIdentifiers.h: - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - -2010-02-08 Gustavo Noronha Silva - - Build fix for make distcheck. - - * GNUmakefile.am: - -2010-02-08 Simon Hausmann - - Unreviewed RVCT build fix. - - Similar to r54391, don't import the cmath functions from std:: for RVCT. - - * wtf/MathExtras.h: - -2010-02-05 Gavin Barraclough - - Reviewed by Geoff Garen. - - Change UStringImpl::create to CRASH if the string cannot be allocated, - rather than returning a null string (which will behave like a zero-length - string if used). - - Also move createRep function from UString to become new overloaded - UStringImpl::create methods. In doing so, bring their behaviour closer to - being in line with WebCore::StringImpl, in removing the behaviour that they - can be used to produce null UStrings (ASSERT the char* provided is non-null). - This behaviour of converting null C-strings to null UStrings is inefficient - (cmompared to just using UString::null()), incompatible with WebCore::StringImpl's - behaviour, and may generate unexpected behaviour, since in many cases a null - UString can be used like an empty string. - - With these changes UStringImpl need not have a concept of null impls, we can - start transitioning this to become an implementation detail of UString, that - internally it chooses to use a null-object rather than an actually zero impl - pointer. - - * JavaScriptCore.exp: - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::calculatedFunctionName): - * parser/Parser.cpp: - (JSC::Parser::parse): - * profiler/Profile.cpp: - (JSC::Profile::Profile): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::stopProfiling): - * runtime/Error.cpp: - (JSC::Error::create): - (JSC::throwError): - * runtime/ExceptionHelpers.cpp: - (JSC::createError): - * runtime/Identifier.cpp: - (JSC::Identifier::add): - * runtime/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * runtime/UString.cpp: - (JSC::initializeUString): - (JSC::UString::UString): - (JSC::UString::operator=): - * runtime/UString.h: - (JSC::UString::isNull): - (JSC::UString::null): - (JSC::UString::rep): - (JSC::UString::UString): - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::create): - * runtime/UStringImpl.h: - -2010-02-05 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Define SYSTEM_MALLOC 1 - https://bugs.webkit.org/show_bug.cgi?id=34640 - - Make BREWMP use system malloc because FastMalloc is not ported. - - * wtf/Platform.h: - -2010-02-05 Kwang Yul Seo - - Reviewed by Alexey Proskuryakov. - - Don't call CRASH() in fastMalloc and fastCalloc when the requested memory size is 0 - https://bugs.webkit.org/show_bug.cgi?id=34569 - - With USE_SYSTEM_MALLOC=1, fastMalloc and fastCalloc call CRASH() - if the return value of malloc and calloc is 0. - - However, these functions can return 0 when the request size is 0. - Libc manual says, "If size is 0, then malloc() returns either NULL, - or a unique pointer value that can later be successfully passed to free()." - Though malloc returns a unique pointer in most systems, - 0 can be returned in some systems. For instance, BREW's MALLOC returns 0 - when size is 0. - - If malloc or calloc returns 0 due to allocation size, increase the size - to 1 and try again. - - * wtf/FastMalloc.cpp: - (WTF::fastMalloc): - (WTF::fastCalloc): - -2010-02-04 Mark Rowe - - Reviewed by Timothy Hatcher. - - Build fix. Remove a symbol corresponding to an inline function from the linker export - file to prevent a weak external failure. - - * JavaScriptCore.xcodeproj/project.pbxproj: Accommodate rename of script. - -2010-02-04 Daniel Bates - - [Qt] Unreviewed, build fix for Qt bot. - - * runtime/JSStringBuilder.h: Changed #include notation #include "X.h". - -2010-02-04 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Clearing a WeakGCPtr is weird - https://bugs.webkit.org/show_bug.cgi?id=34627 - - Added a WeakGCPtr::clear interface. - - As discussed in https://bugs.webkit.org/show_bug.cgi?id=33383, the old - interface made it pretty weird for a client to conditionally clear a - WeakGCPtr, which is exactly what clients want to do when objects are - finalized. - - * API/JSClassRef.cpp: - (clearReferenceToPrototype): Use the new WeakGCPtr::clear() interface. - - * runtime/WeakGCPtr.h: - (JSC::WeakGCPtr::clear): Added an interface for clearing a WeakGCPtr, - iff its current value is the value passed in. It's cumbersome for the - client to do this test, since WeakGCPtr sometimes pretends to be null. - -2010-02-04 Geoffrey Garen - - Build fix: export a header. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-02-04 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Add a JSStringBuilder class (similar-to, and derived-from StringBuilder) to - construct JSStrings, throwing a JS exception should we run out of memory whilst - allocating storage for the string. - - Similarly, add jsMakeNontrivialString methods to use in cases where previously - we were calling makeString & passing the result to jsNontrivialString. Again, - these new methods throw if we hit an out of memory condition. - - Move throwOutOfMemoryError into ExceptionHelpers, to make it more widely available. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - * runtime/DateConstructor.cpp: - (JSC::callDate): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToGMTString): - * runtime/ErrorPrototype.cpp: - (JSC::errorProtoFuncToString): - * runtime/ExceptionHelpers.cpp: - (JSC::throwOutOfMemoryError): - * runtime/ExceptionHelpers.h: - * runtime/JSStringBuilder.h: Added. - (JSC::JSStringBuilder::releaseJSString): - (JSC::jsMakeNontrivialString): - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToPrecision): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncToString): - * runtime/Operations.cpp: - * runtime/Operations.h: - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): - * runtime/StringBuilder.h: - (JSC::StringBuilder::append): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncBig): - (JSC::stringProtoFuncSmall): - (JSC::stringProtoFuncBlink): - (JSC::stringProtoFuncBold): - (JSC::stringProtoFuncFixed): - (JSC::stringProtoFuncItalics): - (JSC::stringProtoFuncStrike): - (JSC::stringProtoFuncSub): - (JSC::stringProtoFuncSup): - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): - -2010-02-04 Steve Falkenburg - - Windows build fix. - - * wtf/MathExtras.h: - -2010-02-04 Darin Adler - - Reviewed by David Levin. - - Make MathExtras.h compatible with - https://bugs.webkit.org/show_bug.cgi?id=34618 - - * wtf/MathExtras.h: Include instead of . - Use "using" as we do elsewhere in WTF for the four functions from - we want to use without the prefix. Later we could consider making the std - explicit at call sites instead. - -2010-02-04 Tamas Szirbucz - - Reviewed by Gavin Barraclough. - - Use an easily appendable structure for trampolines instead of pointer parameters. - https://bugs.webkit.org/show_bug.cgi?id=34424 - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::executableCopy): - * jit/JIT.h: - (JSC::JIT::compileCTIMachineTrampolines): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - * jit/JITStubs.h: - (JSC::JITThunks::ctiStringLengthTrampoline): - (JSC::JITThunks::ctiVirtualCallLink): - (JSC::JITThunks::ctiVirtualCall): - (JSC::JITThunks::ctiNativeCallThunk): - -2010-02-04 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - Increase test coverage for the QScriptValue. - - https://bugs.webkit.org/show_bug.cgi?id=34533 - - * qt/tests/qscriptvalue/qscriptvalue.pro: - * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: - (tst_QScriptValue::tst_QScriptValue): - (tst_QScriptValue::~tst_QScriptValue): - (tst_QScriptValue::dataHelper): - (tst_QScriptValue::newRow): - (tst_QScriptValue::testHelper): - (tst_QScriptValue::ctor): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: Added. - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: Added. - (tst_QScriptValue::initScriptValues): - (tst_QScriptValue::isValid_initData): - (tst_QScriptValue::isValid_makeData): - (tst_QScriptValue::isValid_test): - (tst_QScriptValue::isBool_initData): - (tst_QScriptValue::isBool_makeData): - (tst_QScriptValue::isBool_test): - (tst_QScriptValue::isBoolean_initData): - (tst_QScriptValue::isBoolean_makeData): - (tst_QScriptValue::isBoolean_test): - (tst_QScriptValue::isFunction_initData): - (tst_QScriptValue::isFunction_makeData): - (tst_QScriptValue::isFunction_test): - (tst_QScriptValue::isNull_initData): - (tst_QScriptValue::isNull_makeData): - (tst_QScriptValue::isNull_test): - (tst_QScriptValue::isString_initData): - (tst_QScriptValue::isString_makeData): - (tst_QScriptValue::isString_test): - (tst_QScriptValue::isUndefined_initData): - (tst_QScriptValue::isUndefined_makeData): - (tst_QScriptValue::isUndefined_test): - (tst_QScriptValue::isObject_initData): - (tst_QScriptValue::isObject_makeData): - (tst_QScriptValue::isObject_test): - -2010-02-03 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Define WTF_PLATFORM_BREWMP_SIMULATOR when AEE_SIMULATOR is defined - https://bugs.webkit.org/show_bug.cgi?id=34514 - - PLATFORM(BREWMP_SIMULATOR) guard is needed to make distinction between BREWMP - and BREWMP simulator. - - * wtf/Platform.h: - -2010-02-03 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Remove COMPILE_ASSERT conflict with the underlying PLATFORM - https://bugs.webkit.org/show_bug.cgi?id=34190 - - COMPILE_ASSERT conflicts with the underlying PLATFORM because it is defined - both in WTF's Assertions.h and BREWMP's AEEClassIDs.h. Include AEEClassIDs.h - in Assertions.h and undef COMPILE_ASSERT to avoid redefining COMPILE_ASSERT. - - * wtf/Assertions.h: - -2010-02-03 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Implement OwnPtrBrew to make sure BREW instances are freed. - https://bugs.webkit.org/show_bug.cgi?id=34518 - - Add OwnPtrBrew to release IFile, IFileMgr and IBitmap instances. - - * wtf/brew/OwnPtrBrew.cpp: Added. - (WTF::IFileMgr): - (WTF::IFile): - (WTF::IBitmap): - (WTF::freeOwnedPtrBrew): - * wtf/brew/OwnPtrBrew.h: Added. - (WTF::OwnPtrBrew::OwnPtrBrew): - (WTF::OwnPtrBrew::~OwnPtrBrew): - (WTF::OwnPtrBrew::get): - (WTF::OwnPtrBrew::release): - (WTF::OwnPtrBrew::outPtr): - (WTF::OwnPtrBrew::set): - (WTF::OwnPtrBrew::clear): - (WTF::OwnPtrBrew::operator*): - (WTF::OwnPtrBrew::operator->): - (WTF::OwnPtrBrew::operator!): - (WTF::OwnPtrBrew::operator UnspecifiedBoolType): - (WTF::OwnPtrBrew::swap): - (WTF::swap): - (WTF::operator==): - (WTF::operator!=): - (WTF::getPtr): - -2010-02-03 Kwang Yul Seo - - Reviewed by Darin Adler. - - Export WTF::fastStrDup symbol - https://bugs.webkit.org/show_bug.cgi?id=34526 - - * JavaScriptCore.exp: - -2010-02-03 Kevin Watters - - Reviewed by Kevin Ollivier. - - [wx] Enable JIT compilation for wx. - - https://bugs.webkit.org/show_bug.cgi?id=34536 - - * wtf/Platform.h: - -2010-02-02 Oliver Hunt - - Reviewed by Geoffrey Garen. - - Crash in CollectorBitmap::get at nbcolympics.com - https://bugs.webkit.org/show_bug.cgi?id=34504 - - This was caused by the use of m_offset to determine the offset of - a new property into the property storage. This patch corrects - the effected cases by incorporating the anonymous slot count. It - also removes the duplicate copy of anonymous slot count from the - property table as keeping this up to date merely increased the - chance of a mismatch. Finally I've added a large number of - assertions in an attempt to prevent such a bug from happening - again. - - With the new assertions in place the existing anonymous slot tests - all fail without the m_offset fixes. - - * runtime/PropertyMapHashTable.h: - * runtime/Structure.cpp: - (JSC::Structure::materializePropertyMap): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::removePropertyTransition): - (JSC::Structure::flattenDictionaryStructure): - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::removePropertyWithoutTransition): - (JSC::Structure::copyPropertyTable): - (JSC::Structure::get): - (JSC::Structure::put): - (JSC::Structure::remove): - (JSC::Structure::insertIntoPropertyMapHashTable): - (JSC::Structure::createPropertyMapHashTable): - (JSC::Structure::rehashPropertyMapHashTable): - (JSC::Structure::checkConsistency): - -2010-02-02 Steve Falkenburg - - Reviewed by Darin Adler. - - Copyright year updating for Windows version resources should be automatic - https://bugs.webkit.org/show_bug.cgi?id=34503 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: - -2010-02-02 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Add dummy main thread functions - https://bugs.webkit.org/show_bug.cgi?id=33569 - - Add dummy initializeMainThreadPlatform and - scheduleDispatchFunctionsOnMainThread. - - * wtf/brew/MainThreadBrew.cpp: Added. - (WTF::initializeMainThreadPlatform): - (WTF::scheduleDispatchFunctionsOnMainThread): - -2010-02-02 Kwang Yul Seo - - Reviewed by Darin Adler. - - Add using WTF::getLocalTime to CurrentTime.h - https://bugs.webkit.org/show_bug.cgi?id=34493 - - * wtf/CurrentTime.h: - -2010-02-02 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Add HAVE_XXX definitions - https://bugs.webkit.org/show_bug.cgi?id=34414 - - Add HAVE_ERRNO_H=1 - - * wtf/Platform.h: - -2010-02-02 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Don't define HAVE_TM_GMTOFF, HAVE_TM_ZONE and HAVE_TIMEGM - https://bugs.webkit.org/show_bug.cgi?id=34388 - - BREWMP does not have these features. - - * wtf/Platform.h: - -2010-02-02 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Define WTF_PLATFORM_BREWMP=1 when BUILDING_BREWMP is defined - https://bugs.webkit.org/show_bug.cgi?id=34386 - - Define WTF_PLATFORM_BREWMP=1 so that PLATFORM(BREWMP) guard can be used. - - * wtf/Platform.h: - -2010-02-01 Kent Tamura - - Reviewed by Darin Adler. - - Date.UTC() should apply TimeClip operation. - https://bugs.webkit.org/show_bug.cgi?id=34461 - - ECMAScript 5 15.9.4.3: - > 9 Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))). - - * runtime/DateConstructor.cpp: - (JSC::dateUTC): Calls WTF::timeClip(). - -2010-02-01 Kent Tamura - - Reviewed by Darin Adler. - - Fix a bug that Math.round() retunrs incorrect results for huge integers - https://bugs.webkit.org/show_bug.cgi?id=34462 - - * runtime/MathObject.cpp: - (JSC::mathProtoFuncRound): Avoid "arg + 0.5". - -2010-02-01 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Port WTF's currentTime - https://bugs.webkit.org/show_bug.cgi?id=33567 - - Combine GETUTCSECONDS and GETTIMEMS to calculate the number - of milliseconds since 1970/01/01 00:00:00 UTC. - - * wtf/CurrentTime.cpp: - (WTF::currentTime): - -2010-02-01 Patrick Gansterer - - Reviewed by Darin Adler. - - [Qt] WinCE buildfix after r52729 and fix for Q_BIG_ENDIAN typo. - https://bugs.webkit.org/show_bug.cgi?id=34378 - - * wtf/Platform.h: - -2010-02-01 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Structure not accounting for anonymous slots when computing property storage size - https://bugs.webkit.org/show_bug.cgi?id=34441 - - Previously any Structure with anonymous storage would have a property map, so we - were only including anonymous slot size if there was a property map. Given this - is no longer the case we should always include the anonymous slot count in the - property storage size. - - * runtime/Structure.h: - (JSC::Structure::propertyStorageSize): - -2010-02-01 Oliver Hunt - - Windows build fix, update exports file (again) - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-02-01 Oliver Hunt - - Windows build fix, update exports file - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-01-31 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - JSC is failing to propagate anonymous slot count on some transitions - https://bugs.webkit.org/show_bug.cgi?id=34321 - - Remove secondary Structure constructor, and make Structure store a copy - of the number of anonymous slots directly so saving an immediate allocation - of a property map for all structures with anonymous storage, which also - avoids the leaked property map on new property transition in the original - version of this patch. - - We need to propagate the the anonymous slot count otherwise we can end up - with a structure recording incorrect information about the available and - needed space for property storage, or alternatively incorrectly reusing - some slots. - - * JavaScriptCore.exp: - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::materializePropertyMap): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::changePrototypeTransition): - (JSC::Structure::despecifyFunctionTransition): - (JSC::Structure::getterSetterTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::flattenDictionaryStructure): - (JSC::Structure::copyPropertyTable): - (JSC::Structure::put): - (JSC::Structure::remove): - (JSC::Structure::insertIntoPropertyMapHashTable): - (JSC::Structure::createPropertyMapHashTable): - * runtime/Structure.h: - (JSC::Structure::create): - (JSC::Structure::hasAnonymousSlots): - (JSC::Structure::anonymousSlotCount): - -2010-01-31 Patrick Gansterer - - Reviewed by Darin Adler. - - Buildfix for WinCE + style fixes (TLS_OUT_OF_INDEXES is not defined). - https://bugs.webkit.org/show_bug.cgi?id=34380 - - * wtf/ThreadSpecific.h: - -2010-01-31 Kent Tamura - - Reviewed by Darin Adler. - - [Windows] Fix a bug of round() with huge integral numbers - https://bugs.webkit.org/show_bug.cgi?id=34297 - - Fix a bug that round() for huge integral numbers returns incorrect - results. For example, round(8639999913600001) returns - 8639999913600002 without this change though the double type can - represent 8639999913600001 precisely. - - Math.round() of JavaScript has a similar problem. But this change - doesn't fix it because Math.round() doesn't use round() of - MathExtra.h. - - * wtf/MathExtras.h: - (round): Avoid to do "num + 0.5" or "num - 0.5". - (roundf): Fixed similarly. - (llround): Calls round(). - (llroundf): Calls roundf(). - (lround): Calls round(). - (lroundf): Calls roundf(). - -2010-01-29 Mark Rowe - - Sort Xcode projects. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-01-29 Mark Rowe - - Fix the Mac build. - - Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional". - - As the comment in FeatureDefines.xcconfig notes, the list of feature defines - needs to be kept in sync across the various files. The default values also - need to be kept in sync between these files and build-webkit. - - * Configurations/FeatureDefines.xcconfig: - -2010-01-29 Simon Hausmann - - Rubber-stamped by Maciej Stachowiak. - - Fix the ARM build. - - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::createStructure): Call the right Structure::create overload. - -2010-01-28 Kevin Ollivier - - [wx] Build fix for MSW, use ThreadingWin.cpp as the Windows pthreads implementation - implements pthread_t in a way that makes it impossible to check its validity, - which is needed by ThreadingPthreads.cpp. - - * wscript: - -2010-01-28 Oliver Hunt - - Reviewed by Gavin Barraclough. - - DOM Objects shouldn't all require custom mark functions - https://bugs.webkit.org/show_bug.cgi?id=34291 - - Make getAnonymousValue const-friendly - - * runtime/JSObject.h: - (JSC::JSObject::getAnonymousValue): - -2010-01-28 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Simplify anonymous slot implementation - https://bugs.webkit.org/show_bug.cgi?id=34282 - - A class must now specify the number of slots it needs at construction time - rather than later on with a transition. This makes many things simpler, - we no longer need to need an additional transition on object creation to - add the anonymous slots, and we remove the need for a number of transition - type checks. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * JavaScriptCore.exp: - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DateInstance.h: - (JSC::DateInstance::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GetterSetter.h: - (JSC::GetterSetter::createStructure): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::createStructure): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - * runtime/JSArray.h: - (JSC::JSArray::createStructure): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - * runtime/JSCell.h: - (JSC::JSCell::createDummyStructure): - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.h: - (JSC::JSObject::createStructure): - (JSC::JSObject::putAnonymousValue): - (JSC::JSObject::getAnonymousValue): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::createStructure): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSString.h: - (JSC::Fiber::createStructure): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - (JSC::JSWrapperObject::JSWrapperObject): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - * runtime/Structure.cpp: - (JSC::Structure::~Structure): - (JSC::Structure::materializePropertyMap): - * runtime/Structure.h: - (JSC::Structure::create): - (JSC::Structure::anonymousSlotCount): - * runtime/StructureTransitionTable.h: - -2010-01-27 Oliver Hunt - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-01-27 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - MessageEvent.data should deserialize in the context of the MessageEvent's global object - https://bugs.webkit.org/show_bug.cgi?id=34227 - - Add logic to allow us to create an Object, Array, or Date instance - so we can create them in the context of a specific global object, - rather than just using the current lexical global object. - - * JavaScriptCore.exp: - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DateInstance.h: - * runtime/JSGlobalObject.h: - (JSC::constructEmptyObject): - (JSC::constructEmptyArray): - -2010-01-27 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=34150 - WebKit needs a mechanism to catch stale HashMap entries - - It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash - is just its value, it is very unlikely that any observable problem is reproducible. - - This extends hash table consistency checks to check that pointers are referencing allocated - memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible - to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much). - - * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can - add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems - with those yet. - - * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by - CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency(). - - * wtf/HashTable.h: - (WTF::HashTable::internalCheckTableConsistency): - (WTF::HashTable::internalCheckTableConsistencyExceptSize): - (WTF::HashTable::checkTableConsistencyExceptSize): - Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off. - (WTF::::add): Updated for checkTableConsistency renaming. - (WTF::::addPassingHashCode): Ditto. - (WTF::::removeAndInvalidate): Ditto. - (WTF::::remove): Ditto. - (WTF::::rehash): Ditto. - (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this - function returns true for tables with m_table == 0. - (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially, - we could do the same for values. - - * wtf/HashTraits.h: - (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden - to add checks. Currently, the only override is for pointer hashes. - - * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming. - -2010-01-27 Anton Muhin - - Reviewed by Darin Adler. - - Remove trailing \ from inline function code - https://bugs.webkit.org/show_bug.cgi?id=34223 - - * assembler/ARMv7Assembler.h: - (JSC::ARMThumbImmediate::countLeadingZerosPartial): - -2010-01-27 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Port WTF's randomNumber - https://bugs.webkit.org/show_bug.cgi?id=33566 - - Use GETRAND to generate 4 byte random byte sequence to implement - weakRandomNumber. Create a secure random number generator with - AEECLSID_RANDOM to implement randomNumber. - - * wtf/RandomNumber.cpp: - (WTF::weakRandomNumber): - (WTF::randomNumber): - -2010-01-27 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Port getCPUTime - https://bugs.webkit.org/show_bug.cgi?id=33572 - - Use GETUPTIMEMS which returns a continuously and - linearly increasing millisecond timer from the time the device - was powered on. This function is enough to implement getCPUTime. - - * runtime/TimeoutChecker.cpp: - (JSC::getCPUTime): - -2010-01-27 Kwang Yul Seo - - Reviewed by Oliver Hunt. - - [BREWMP] Add MarkStack fastMalloc implementation for platforms without VirtualAlloc or mmap. - https://bugs.webkit.org/show_bug.cgi?id=33582 - - Use fastMalloc and fastFree to implement MarkStack::allocateStack and - MarkStack::releaseStack for platforms without page level allocation. - - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - * runtime/MarkStackNone.cpp: Added. - (JSC::MarkStack::initializePagesize): - (JSC::MarkStack::allocateStack): - (JSC::MarkStack::releaseStack): - -2010-01-27 Kwang Yul Seo - - Reviewed by Eric Seidel. - - [BREWMP] Don't use time function - https://bugs.webkit.org/show_bug.cgi?id=33577 - - Calling time(0) in BREW devices causes a crash because time - is not properly ported in most devices. Cast currentTime() to - time_t to get the same result as time(0). - - * wtf/DateMath.cpp: - (WTF::calculateUTCOffset): - -2010-01-27 Alexey Proskuryakov - - Revert r53899 (HashMap key checks) and subsequent build fixes, - because they make SVG tests crash in release builds. - - * wtf/HashMap.h: - (WTF::::remove): - * wtf/HashSet.h: - (WTF::::remove): - * wtf/HashTable.h: - (WTF::::add): - (WTF::::addPassingHashCode): - (WTF::::removeAndInvalidate): - (WTF::::remove): - (WTF::::rehash): - (WTF::::checkTableConsistency): - (WTF::::checkTableConsistencyExceptSize): - * wtf/HashTraits.h: - (WTF::GenericHashTraits::emptyValue): - (WTF::): - * wtf/RefPtrHashMap.h: - (WTF::::remove): - -2010-01-26 Alexey Proskuryakov - - More Windows build fixing. - - * wtf/HashTraits.h: _msize takes void*, remove const qualifier from type. - -2010-01-26 Alexey Proskuryakov - - Windows build fix. - - * wtf/HashTraits.h: Include malloc.h for _msize(). - -2010-01-26 Alexey Proskuryakov - - Build fix. - - * wtf/HashTable.h: (WTF::HashTable::checkTableConsistencyExceptSize): Remove const from a - static (empty) version of this function. - -2010-01-26 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=34150 - WebKit needs a mechanism to catch stale HashMap entries - - It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash - is just its value, it is very unlikely that any observable problem is reproducible. - - This extends hash table consistency checks to check that pointers are referencing allocated - memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible - to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much). - - * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can - add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems - with those yet. - - * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by - CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency(). - - * wtf/HashTable.h: - (WTF::HashTable::internalCheckTableConsistency): - (WTF::HashTable::internalCheckTableConsistencyExceptSize): - (WTF::HashTable::checkTableConsistencyExceptSize): - Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off. - (WTF::::add): Updated for checkTableConsistency renaming. - (WTF::::addPassingHashCode): Ditto. - (WTF::::removeAndInvalidate): Ditto. - (WTF::::remove): Ditto. - (WTF::::rehash): Ditto. - (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this - function returns true for tables with m_table == 0. - (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially, - we could do the same for values. - - * wtf/HashTraits.h: - (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden - to add checks. Currently, the only override is for pointer hashes. - - * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming. - -2010-01-26 Lyon Chen - - Reviewed by Maciej Stachowiak. - - Opcode.h use const void* for Opcode cause error #1211 for RVCT compiler - https://bugs.webkit.org/show_bug.cgi?id=33902 - - * bytecode/Opcode.h: - -2010-01-26 Steve Falkenburg - - Reviewed by Oliver Hunt. - - Windows build references non-existent include paths - https://bugs.webkit.org/show_bug.cgi?id=34175 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: - -2010-01-26 Oliver Hunt - - Reviewed by Geoffrey Garen. - - Using JavaScriptCore API with a webkit vended context can result in slow script dialog - https://bugs.webkit.org/show_bug.cgi?id=34172 - - Make the APIShim correctly increment and decrement the timeout - entry counter. - - * API/APIShims.h: - (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): - (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): - (JSC::APICallbackShim::APICallbackShim): - (JSC::APICallbackShim::~APICallbackShim): - -2010-01-26 Simon Hausmann - - [Qt] Fix compilation of QtScript with non-gcc compilers - - Variable length stack arrays are a gcc extension. Use QVarLengthArray - as a more portable solution that still tries to allocate on the stack - first. - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::call): - -2010-01-26 Simon Hausmann - - Reviewed by Tor Arne Vestbø. - - [Qt] Fix the build on platforms without JIT support. - - The JIT support should be determined at compile-time via wtf/Platform.h - - * qt/api/QtScript.pro: - -2010-01-26 Jedrzej Nowacki - - Reviewed by Simon Hausmann. - - First steps of the QtScript API. - - Two new classes were created; QScriptEngine and QScriptValue. - The first should encapsulate a javascript context and the second a script - value. - - This API is still in development, so it isn't compiled by default. - To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to - build-webkit. - - https://bugs.webkit.org/show_bug.cgi?id=32565 - - * qt/api/QtScript.pro: Added. - * qt/api/qscriptconverter_p.h: Added. - (QScriptConverter::toString): - * qt/api/qscriptengine.cpp: Added. - (QScriptEngine::QScriptEngine): - (QScriptEngine::~QScriptEngine): - (QScriptEngine::evaluate): - (QScriptEngine::collectGarbage): - * qt/api/qscriptengine.h: Added. - * qt/api/qscriptengine_p.cpp: Added. - (QScriptEnginePrivate::QScriptEnginePrivate): - (QScriptEnginePrivate::~QScriptEnginePrivate): - (QScriptEnginePrivate::evaluate): - * qt/api/qscriptengine_p.h: Added. - (QScriptEnginePrivate::get): - (QScriptEnginePrivate::collectGarbage): - (QScriptEnginePrivate::makeJSValue): - (QScriptEnginePrivate::context): - * qt/api/qscriptvalue.cpp: Added. - (QScriptValue::QScriptValue): - (QScriptValue::~QScriptValue): - (QScriptValue::isValid): - (QScriptValue::isBool): - (QScriptValue::isBoolean): - (QScriptValue::isNumber): - (QScriptValue::isNull): - (QScriptValue::isString): - (QScriptValue::isUndefined): - (QScriptValue::isError): - (QScriptValue::isObject): - (QScriptValue::isFunction): - (QScriptValue::toString): - (QScriptValue::toNumber): - (QScriptValue::toBool): - (QScriptValue::toBoolean): - (QScriptValue::toInteger): - (QScriptValue::toInt32): - (QScriptValue::toUInt32): - (QScriptValue::toUInt16): - (QScriptValue::call): - (QScriptValue::engine): - (QScriptValue::operator=): - (QScriptValue::equals): - (QScriptValue::strictlyEquals): - * qt/api/qscriptvalue.h: Added. - (QScriptValue::): - * qt/api/qscriptvalue_p.h: Added. - (QScriptValuePrivate::): - (QScriptValuePrivate::get): - (QScriptValuePrivate::QScriptValuePrivate): - (QScriptValuePrivate::isValid): - (QScriptValuePrivate::isBool): - (QScriptValuePrivate::isNumber): - (QScriptValuePrivate::isNull): - (QScriptValuePrivate::isString): - (QScriptValuePrivate::isUndefined): - (QScriptValuePrivate::isError): - (QScriptValuePrivate::isObject): - (QScriptValuePrivate::isFunction): - (QScriptValuePrivate::toString): - (QScriptValuePrivate::toNumber): - (QScriptValuePrivate::toBool): - (QScriptValuePrivate::toInteger): - (QScriptValuePrivate::toInt32): - (QScriptValuePrivate::toUInt32): - (QScriptValuePrivate::toUInt16): - (QScriptValuePrivate::equals): - (QScriptValuePrivate::strictlyEquals): - (QScriptValuePrivate::assignEngine): - (QScriptValuePrivate::call): - (QScriptValuePrivate::engine): - (QScriptValuePrivate::context): - (QScriptValuePrivate::value): - (QScriptValuePrivate::object): - (QScriptValuePrivate::inherits): - (QScriptValuePrivate::isJSBased): - (QScriptValuePrivate::isNumberBased): - (QScriptValuePrivate::isStringBased): - * qt/api/qtscriptglobal.h: Added. - * qt/tests/qscriptengine/qscriptengine.pro: Added. - * qt/tests/qscriptengine/tst_qscriptengine.cpp: Added. - (tst_QScriptEngine::tst_QScriptEngine): - (tst_QScriptEngine::~tst_QScriptEngine): - (tst_QScriptEngine::init): - (tst_QScriptEngine::cleanup): - (tst_QScriptEngine::collectGarbage): - (tst_QScriptEngine::evaluate): - * qt/tests/qscriptvalue/qscriptvalue.pro: Added. - * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: Added. - (tst_QScriptValue::tst_QScriptValue): - (tst_QScriptValue::~tst_QScriptValue): - (tst_QScriptValue::init): - (tst_QScriptValue::cleanup): - (tst_QScriptValue::ctor): - (tst_QScriptValue::toString_data): - (tst_QScriptValue::toString): - (tst_QScriptValue::copyConstructor_data): - (tst_QScriptValue::copyConstructor): - (tst_QScriptValue::assignOperator_data): - (tst_QScriptValue::assignOperator): - (tst_QScriptValue::dataSharing): - (tst_QScriptValue::constructors_data): - (tst_QScriptValue::constructors): - (tst_QScriptValue::call): - * qt/tests/tests.pri: Added. - * qt/tests/tests.pro: Added. - -2010-01-25 Dmitry Titov - - Reviewed by David Levin. - - Fix Chromium Linux tests: the pthread functions on Linux produce segfault if they receive 0 thread handle. - After r53714, we can have 0 thread handles passed to pthread_join and pthread_detach if corresponding threads - were already terminated and their threadMap entries cleared. - Add a 0 check. - - * wtf/ThreadingPthreads.cpp: - (WTF::waitForThreadCompletion): - (WTF::detachThread): - -2010-01-24 Laszlo Gombos - - Reviewed by Maciej Stachowiak. - - Refactor JITStubs.cpp so that DEFINE_STUB_FUNCTION is only used once for each function - https://bugs.webkit.org/show_bug.cgi?id=33866 - - Place the guard USE(JSVALUE32_64) inside the body of the DEFINE_STUB_FUNCTION - macro for those functions that are always present. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - -2010-01-22 Kevin Watters - - Reviewed by Kevin Ollivier. - - [wx] Remove the Bakefile build system, which is no longer being used. - - https://bugs.webkit.org/show_bug.cgi?id=34022 - - * JavaScriptCoreSources.bkl: Removed. - * jscore.bkl: Removed. - -2010-01-22 Steve Falkenburg - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=34025 - Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets. - - * Configurations/FeatureDefines.xcconfig: - -2010-01-22 Dmitry Titov - - Not reviewed, attempted Snow Leopard build fix. - - * wtf/ThreadingPthreads.cpp: Add a forward declaration of a function which is not 'static'. - -2009-01-22 Dmitry Titov - - Reviewed by Maciej Stachowiak. - - Fix the leak of ThreadIdentifiers in threadMap across threads. - https://bugs.webkit.org/show_bug.cgi?id=32689 - - Test is added to DumpRenderTree.mm. - - * Android.mk: Added file ThreadIdentifierDataPthreads.(h|cpp) to build. - * Android.v8.wtf.mk: Ditto. - * GNUmakefile.am: Ditto. - * JavaScriptCore.gyp/JavaScriptCore.gyp: Ditto. - * JavaScriptCore.gypi: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - - * wtf/ThreadIdentifierDataPthreads.cpp: Added. Contains custom implementation of thread-specific data that uses custom destructor. - (WTF::ThreadIdentifierData::~ThreadIdentifierData): Removes the ThreadIdentifier from the threadMap. - (WTF::ThreadIdentifierData::identifier): - (WTF::ThreadIdentifierData::initialize): - (WTF::ThreadIdentifierData::destruct): Custom thread-specific destructor. Resets the value for the key again to cause second invoke. - (WTF::ThreadIdentifierData::initializeKeyOnceHelper): - (WTF::ThreadIdentifierData::initializeKeyOnce): Need to use pthread_once since initialization may come on any thread(s). - * wtf/ThreadIdentifierDataPthreads.h: Added. - (WTF::ThreadIdentifierData::ThreadIdentifierData): - - * wtf/Threading.cpp: - (WTF::threadEntryPoint): Move initializeCurrentThreadInternal to after the lock to make - sure it is invoked when ThreadIdentifier is already established. - - * wtf/Threading.h: Rename setThreadNameInternal -> initializeCurrentThreadInternal since it does more then only set the name now. - * wtf/ThreadingNone.cpp: - (WTF::initializeCurrentThreadInternal): Ditto. - * wtf/ThreadingWin.cpp: - (WTF::initializeCurrentThreadInternal): Ditto. - (WTF::initializeThreading): Ditto. - * wtf/gtk/ThreadingGtk.cpp: - (WTF::initializeCurrentThreadInternal): Ditto. - * wtf/qt/ThreadingQt.cpp: - (WTF::initializeCurrentThreadInternal): Ditto. - - * wtf/ThreadingPthreads.cpp: - (WTF::establishIdentifierForPthreadHandle): - (WTF::clearPthreadHandleForIdentifier): Make it not 'static' so the ~ThreadIdentifierData() in another file can call it. - (WTF::initializeCurrentThreadInternal): Set the thread-specific data. The ThreadIdentifier is already established by creating thread. - (WTF::waitForThreadCompletion): Remove call to clearPthreadHandleForIdentifier(threadID) since it is now done in ~ThreadIdentifierData(). - (WTF::detachThread): Ditto. - (WTF::currentThread): Use the thread-specific data to get the ThreadIdentifier. It's many times faster then Mutex-protected iteration through the map. - Also, set the thread-specific data if called first time on the thread. - -2010-01-21 Kwang Yul Seo - - Reviewed by Alexey Proskuryakov. - - Add ThreadSpecific for ENABLE(SINGLE_THREADED) - https://bugs.webkit.org/show_bug.cgi?id=33878 - - Implement ThreadSpecific with a simple getter/setter - when ENABLE(SINGLE_THREADED) is true. - - Due to the change in https://bugs.webkit.org/show_bug.cgi?id=33236, - an implementation of ThreadSpecific must be available to build WebKit. - This causes a build failure for platforms without a proper - ThreadSpecific implementation. - - * wtf/ThreadSpecific.h: - (WTF::::ThreadSpecific): - (WTF::::~ThreadSpecific): - (WTF::::get): - (WTF::::set): - (WTF::::destroy): - -2010-01-21 Kwang Yul Seo - - Reviewed by Maciej Stachowiak. - - Add fastStrDup to FastMalloc - https://bugs.webkit.org/show_bug.cgi?id=33937 - - The new string returned by fastStrDup is obtained with fastMalloc, - and can be freed with fastFree. This makes the memory management - more consistent because we don't need to keep strdup allocated pointers - and free them with free(). Instead we can use fastFree everywhere. - - * wtf/FastMalloc.cpp: - (WTF::fastStrDup): - * wtf/FastMalloc.h: - -2010-01-21 Brady Eidson - - Reviewed by Maciej Stachowiak. - - history.back() for same-document history traversals isn't synchronous as the specification states. - and https://bugs.webkit.org/show_bug.cgi?id=33538 - - * wtf/Platform.h: Add a "HISTORY_ALWAYS_ASYNC" enable and turn it on for Chromium. - -2010-01-21 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Always create a prototype for automatically managed classes. - - This fixes some errors where prototype chains were not correctly hooked - up, and also ensures that API classes work correctly with features like - instanceof. - - * API/JSClassRef.cpp: - (OpaqueJSClass::create): Cleaned up some of this code. Also changed it - to always create a prototype class. - - * API/tests/testapi.c: - (Derived2_class): - (main): Fixed a null value crash in the exception checking code. - * API/tests/testapi.js: Added some tests for the case where a prototype - chain would not be hooked up correctly. - -2010-01-21 Oliver Hunt - - Reviewed by Geoff Garen. - - Force JSC to create a prototype chain for API classes with a - parent class but no static functions. - - * API/JSClassRef.cpp: - (OpaqueJSClass::create): - -2010-01-21 Kent Hansen - - Reviewed by Geoffrey Garen. - - Object.getOwnPropertyDescriptor always returns undefined for JS API objects - https://bugs.webkit.org/show_bug.cgi?id=33946 - - Ideally the getOwnPropertyDescriptor() reimplementation should return an - access descriptor that wraps the property getter and setter callbacks, but - that approach is much more involved than returning a value descriptor. - Keep it simple for now. - - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertyDescriptor): - * API/tests/testapi.js: - -2010-01-20 Mark Rowe - - Build fix. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::initializeScavenger): Remove unnecessary function call. - -2010-01-20 Mark Rowe - - Reviewed by Oliver Hunt. - - Use the inline i386 assembly for x86_64 as well rather than falling back to using pthread mutexes. - - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SlowLock): - -2010-01-20 Mark Rowe - - Reviewed by Oliver Hunt. - - Use GCD instead of an extra thread for FastMalloc scavenging on platforms where it is supported - - Abstract the background scavenging slightly so that an alternate implementation that uses GCD can be used on platforms - where it is supported. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::init): - (WTF::TCMalloc_PageHeap::initializeScavenger): - (WTF::TCMalloc_PageHeap::signalScavenger): - (WTF::TCMalloc_PageHeap::shouldContinueScavenging): - (WTF::TCMalloc_PageHeap::Delete): - (WTF::TCMalloc_PageHeap::periodicScavenge): - * wtf/Platform.h: - -2010-01-20 Geoffrey Garen - - Reviewed by Oliver Hunt. - - REGRESSION(53460): Heap::destroy may not run - all destructors - - * runtime/Collector.cpp: - (JSC::Heap::freeBlocks): Instead of fully marking protected objects, - just set their mark bits. This prevents protected objects from keeping - unprotected objects alive. Destructor order is not guaranteed, so it's - OK to destroy objects pointed to by protected objects before destroying - protected objects. - -2010-01-19 David Levin - - Reviewed by Oliver Hunt. - - CrossThreadCopier needs to support ThreadSafeShared better. - https://bugs.webkit.org/show_bug.cgi?id=33698 - - * wtf/TypeTraits.cpp: Added tests for the new type traits. - * wtf/TypeTraits.h: - (WTF::IsSubclass): Determines if a class is a derived from another class. - (WTF::IsSubclassOfTemplate): Determines if a class is a derived from a - template class (with one parameter that is unknown). - (WTF::RemoveTemplate): Reveals the type for a template parameter. - -2010-01-20 Steve Falkenburg - - Reviewed by Darin Adler and Adam Roben. - - Feature defines are difficult to maintain on Windows builds - https://bugs.webkit.org/show_bug.cgi?id=33883 - - FeatureDefines.vsprops are now maintained in a way similar to - Configurations/FeatureDefines.xcconfig, with the added advantage - of having a single FeatureDefines file across all projects. - - * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add FeatureDefines.vsprops inherited property sheet. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add FeatureDefines.vsprops inherited property sheet. - -2010-01-20 Csaba Osztrogonác - - [Qt] Unreviewed buildfix for r53547. - - * DerivedSources.pro: - -2010-01-20 Tor Arne Vestbø - - Reviewed by Simon Hausmann. - - [Qt] Make extraCompilers for generated sources depend on their scripts - - * DerivedSources.pro: - -2010-01-19 Brian Weinstein - - Reviewed by Tim Hatcher. - - When JavaScriptCore calls Debugger::Exception, have it pass a - hasHandler variable that represents if exception is being handled - in the same function (not in a parent on the call stack). - - This just adds a new parameter, no behavior is changed. - - * debugger/Debugger.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): - -2010-01-18 Maciej Stachowiak - - Reviewed by Adam Barth. - - Inline functions that are hot in DOM manipulation - https://bugs.webkit.org/show_bug.cgi?id=33820 - - (3% speedup on Dromaeo DOM Core tests) - - * runtime/WeakGCMap.h: - (JSC::::get): inline - -2010-01-19 Laszlo Gombos - - Unreviewed build fix for JIT with RVCT. - - Remove IMPORT statement; cti_vm_throw is already defined in JITStubs.h. - Remove extra ')'. - - * jit/JITStubs.cpp: - (JSC::ctiVMThrowTrampoline): - -2010-01-19 Geoffrey Garen - - Reviewed by Oliver Hunt. - - REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/ - https://bugs.webkit.org/show_bug.cgi?id=33826 - - This bug was caused by a GC-protected object being destroyed early by - Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers - to GC-protected memory to be valid. - - The solution is to do two passes of tear-down in Heap::destroy. The first - pass tears down all unprotected objects. The second pass ASSERTs that all - previously protected objects are now unprotected, and then tears down - all perviously protected objects. These two passes simulate the two passes - that would have been required to free a protected object during normal GC. - - * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap. - - * runtime/Collector.cpp: - (JSC::Heap::destroy): Moved ASSERTs to here. - (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its - setter to the function that does the shrinking. - (JSC::Heap::freeBlocks): Implemented above algorithm. - (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink. - -2010-01-19 Gavin Barraclough - - Reviewed by NOBODY (build fix). - - Reverting r53455, breaks 2 javascriptcore tests. - - * API/JSContextRef.cpp: - * runtime/Collector.cpp: - (JSC::Heap::destroy): - (JSC::Heap::freeBlock): - (JSC::Heap::freeBlocks): - (JSC::Heap::shrinkBlocks): - -2010-01-18 Gavin Barraclough - - Reviewed by NOBODY (build fix). - - Revert r53454, since it causes much sadness in this world. - - * runtime/UString.cpp: - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::baseSharedBuffer): - (JSC::UStringImpl::sharedBuffer): - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): - (JSC::UntypedPtrAndBitfield::asPtr): - (JSC::UntypedPtrAndBitfield::operator&=): - (JSC::UntypedPtrAndBitfield::operator|=): - (JSC::UntypedPtrAndBitfield::operator&): - (JSC::UStringImpl::create): - (JSC::UStringImpl::cost): - (JSC::UStringImpl::isIdentifier): - (JSC::UStringImpl::setIsIdentifier): - (JSC::UStringImpl::ref): - (JSC::UStringImpl::deref): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::bufferOwnerString): - (JSC::UStringImpl::bufferOwnership): - (JSC::UStringImpl::isStatic): - * wtf/StringHashFunctions.h: - (WTF::stringHash): - -2010-01-18 Geoffrey Garen - - Reviewed by Oliver Hunt. - - REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/ - https://bugs.webkit.org/show_bug.cgi?id=33826 - - This bug was caused by a GC-protected object being destroyed early by - Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers - to GC-protected memory to be valid. - - The solution is to do two passes of tear-down in Heap::destroy. The first - pass tears down all unprotected objects. The second pass ASSERTs that all - previously protected objects are now unprotected, and then tears down - all perviously protected objects. These two passes simulate the two passes - that would have been required to free a protected object during normal GC. - - * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap. - - * runtime/Collector.cpp: - (JSC::Heap::destroy): Moved ASSERTs to here. - (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its - setter to the function that does the shrinking. - (JSC::Heap::freeBlocks): Implemented above algorithm. - (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink. - -2010-01-18 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=33731 - Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags). - - This break the OS X Leaks tool. Instead, free up some more bits from the refCount. - - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::sharedBuffer): - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UStringImpl::cost): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::bufferOwnerString): - (JSC::UStringImpl::): - * wtf/StringHashFunctions.h: - (WTF::stringHash): - -2010-01-18 Kent Tamura - - Reviewed by Darin Adler. - - HTMLInputElement::valueAsDate setter support for type=month. - https://bugs.webkit.org/show_bug.cgi?id=33021 - - Expose the following functions to be used by WebCore: - - WTF::msToyear() - - WTF::dayInYear() - - WTF::monthFromDayInYear() - - WTF::dayInMonthFromDayInYear() - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/DateMath.cpp: - (WTF::msToYear): Remove "static inline". - (WTF::dayInYear): Remove "static inline". - (WTF::monthFromDayInYear): Remove "static inline". - (WTF::dayInMonthFromDayInYear): Remove "static inline". - * wtf/DateMath.h: Declare the above functions. - -2010-01-18 Darin Adler - - Fix build by reverting the previous change. - - * runtime/UString.h: Rolled out the FastAllocBase base class. - It was making UString larger, and therefore JSString larger, - and too big for a garbage collection cell. - - This raises the unpleasant possibility that many classes became - larger because we added the FastAllocBase base class. I am - worried about this, and it needs to be investigated. - -2010-01-18 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for UString class - https://bugs.webkit.org/show_bug.cgi?id=27831 - - Inherits the following class from FastAllocBase because it is - instantiated by 'new' and no need to be copyable: - - class name - instantiated at: - classs UString - JavaScriptCore/runtime/UString.cpp:160 - - * runtime/UString.h: - -2010-01-18 Evan Cheng - - Reviewed by Darin Adler. - - Add some ALWAYS_INLINE for key functions not inlined by some versions of GCC. - rdar://problem/7553780 - - * runtime/JSObject.h: - (JSC::JSObject::getPropertySlot): ALWAYS_INLINE both overloads. - * runtime/JSString.h: - (JSC::JSString::JSString): ALWAYS_INLINE the version that takes a UString. - * runtime/UString.h: - (JSC::operator==): ALWAYS_INLINE the version that compares two UString objects. - -2010-01-18 Csaba Osztrogonác - - Reviewed by Darin Adler. - - Delete dftables-xxxxxxxx.in files automatically. - https://bugs.webkit.org/show_bug.cgi?id=33796 - - * pcre/dftables: unlink unnecessary temporary file. - -2010-01-18 Tor Arne Vestbø - - Reviewed by Simon Hausmann. - - [Qt] Force qmake to generate a single makefile for DerivedSources.pro - - * DerivedSources.pro: - -2010-01-18 Csaba Osztrogonác - - Rubber-stamped by Gustavo Noronha Silva. - - Rolling out r53391 and r53392 because of random crashes on buildbots. - https://bugs.webkit.org/show_bug.cgi?id=33731 - - * bytecode/CodeBlock.h: - (JSC::CallLinkInfo::seenOnce): - (JSC::CallLinkInfo::setSeen): - (JSC::MethodCallLinkInfo::MethodCallLinkInfo): - (JSC::MethodCallLinkInfo::seenOnce): - (JSC::MethodCallLinkInfo::setSeen): - * jit/JIT.cpp: - (JSC::JIT::unlinkCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::patchMethodCallProto): - * runtime/UString.cpp: - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - * runtime/UString.h: - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::baseSharedBuffer): - (JSC::UStringImpl::sharedBuffer): - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): - (JSC::UntypedPtrAndBitfield::asPtr): - (JSC::UntypedPtrAndBitfield::operator&=): - (JSC::UntypedPtrAndBitfield::operator|=): - (JSC::UntypedPtrAndBitfield::operator&): - (JSC::UStringImpl::create): - (JSC::UStringImpl::cost): - (JSC::UStringImpl::isIdentifier): - (JSC::UStringImpl::setIsIdentifier): - (JSC::UStringImpl::ref): - (JSC::UStringImpl::deref): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::bufferOwnerString): - (JSC::UStringImpl::bufferOwnership): - (JSC::UStringImpl::isStatic): - * wtf/StringHashFunctions.h: - (WTF::stringHash): - -2010-01-18 Simon Hausmann - - Reviewed by Kenneth Rohde Christiansen. - - Fix the build with strict gcc and RVCT versions: It's not legal to cast a - pointer to a function to a void* without an intermediate cast to a non-pointer - type. A cast to a ptrdiff_t inbetween fixes it. - - * runtime/JSString.h: - (JSC::Fiber::JSString): - -2010-01-15 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=33731 - Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags). - - This break the OS X Leaks tool. Instead, free up some more bits from the refCount. - - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::sharedBuffer): - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UStringImpl::cost): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::bufferOwnerString): - (JSC::UStringImpl::): - * wtf/StringHashFunctions.h: - (WTF::stringHash): - -2010-01-15 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=33731 - Remove uses of PtrAndFlags from JIT data stuctures. - - These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid - permutation of pointer states in MethodCallLinkInfo to represent the removed bits. - - * bytecode/CodeBlock.h: - (JSC::CallLinkInfo::seenOnce): - (JSC::CallLinkInfo::setSeen): - (JSC::MethodCallLinkInfo::MethodCallLinkInfo): - (JSC::MethodCallLinkInfo::seenOnce): - (JSC::MethodCallLinkInfo::setSeen): - * jit/JIT.cpp: - (JSC::JIT::unlinkCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::patchMethodCallProto): - * runtime/UString.h: - -2010-01-16 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - Cache JS string values made from DOM strings (Dromaeo speedup) - https://bugs.webkit.org/show_bug.cgi?id=33768 - - - * runtime/JSString.h: - (JSC::jsStringWithFinalizer): Added new mechanism for a string to have an optional - finalizer callback, for the benefit of weak-referencing caches. - (JSC::): - (JSC::Fiber::JSString): - (JSC::Fiber::~JSString): - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): Clear fibers so this doesn't look like a string with a finalizer. - * runtime/WeakGCMap.h: Include "Collector.h" to make this header includable by itself. - -2010-01-15 Sam Weinig - - Reviewed by Maciej Stachowiak. - - Fix for - Add ALWAYS_INLINE to jsLess for a 1% speedup on llvm-gcc. - - * runtime/Operations.h: - (JSC::jsLess): - -2010-01-14 Geoffrey Garen - - Reviewed by Oliver Hunt. - - REGRESISON: Google maps buttons not working properly - https://bugs.webkit.org/show_bug.cgi?id=31871 - - REGRESSION(r52948): JavaScript exceptions thrown on Google Maps when - getting directions for a second time - https://bugs.webkit.org/show_bug.cgi?id=33446 - - SunSpider and v8 report no change. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCacheGetByID): Update our cached offset in case - flattening the dictionary changed any of its offsets. - - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * runtime/Operations.h: - (JSC::normalizePrototypeChain): ditto - -2010-01-14 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=33705 - UStringImpl::create() should use internal storage - - When creating a UStringImpl copying of a UChar*, we can use an internal buffer, - by calling UStringImpl::tryCreateUninitialized(). - - Also, remove duplicate of copyChars from JSString, call UStringImpl's version. - - Small (max 0.5%) progression on Sunspidey. - - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - * runtime/UStringImpl.h: - (JSC::UStringImpl::create): - -2010-01-14 Gavin Barraclough - - Reviewed by Sam Weinig. - - Make naming & behaviour of UString[Impl] methods more consistent. - https://bugs.webkit.org/show_bug.cgi?id=33702 - - UString::create() creates a copy of the UChar* passed, but UStringImpl::create() assumes - that it should assume ownership of the provided buffer (with UString::createNonCopying() - and UStringImpl::createCopying() providing the alternate behaviours). Unify on create() - taking a copy of the provided buffer. For non-copying cases, use the name 'adopt', and - make this method take a Vector&. For cases where non-copying construction was being - used, other than from a Vector, change the code to allocate the storage along with - the UStringImpl using UStringImpl::createUninitialized(). (The adopt() method also more - closely matches that of WebCore::StringImpl). - - Also, UString::createUninitialized() and UStringImpl::createUninitialized() have incompatible - behaviours, in that the UString form sets the provided UChar* to a null or non-null value to - indicate success or failure, but UStringImpl uses the returned PassRefPtr to - indicate when allocation has failed (potentially leaving the output Char* uninitialized). - This is also incompatible with WebCore::StringImpl's behaviour, in that - StringImpl::createUninitialized() will CRASH() if unable to allocate. Some uses of - createUninitialized() in JSC are unsafe, since they do not test the result for null. - UStringImpl's indication is preferable, since we may want a successful call to set the result - buffer to 0 (specifically, StringImpl returns 0 for the buffer where createUninitialized() - returns the empty string, which seems reasonable to catch bugs early). UString's method - cannot support UStringImpl's behaviour directly, since it returns an object rather than a - pointer. - - remove UString::createUninitialized(), replace with calls to UStringImpl::createUninitialized() - - create a UStringImpl::tryCreateUninitialized() form UStringImpl::createUninitialized(), - with current behaviour, make createUninitialized() crash on failure to allocate. - - make cases in JSC that do not check the result call createUninitialized(), and cases that do - check call tryCreateUninitialized(). - - Rename computedHash() to existingHash(), to bring this in line wih WebCore::StringImpl. - - * API/JSClassRef.cpp: - (OpaqueJSClassContextData::OpaqueJSClassContextData): - * JavaScriptCore.exp: - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - * runtime/Identifier.cpp: - (JSC::CStringTranslator::translate): - (JSC::UCharBufferTranslator::translate): - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - * runtime/Lookup.cpp: - (JSC::HashTable::createTable): - * runtime/Lookup.h: - (JSC::HashTable::entry): - * runtime/StringBuilder.h: - (JSC::StringBuilder::release): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCodeSlowCase): - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferencesSlow): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncLink): - * runtime/Structure.cpp: - (JSC::Structure::despecifyDictionaryFunction): - (JSC::Structure::get): - (JSC::Structure::despecifyFunction): - (JSC::Structure::put): - (JSC::Structure::remove): - (JSC::Structure::insertIntoPropertyMapHashTable): - (JSC::Structure::checkConsistency): - * runtime/Structure.h: - (JSC::Structure::get): - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTableHash::hash): - * runtime/UString.cpp: - (JSC::createRep): - (JSC::UString::UString): - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - (JSC::UString::operator=): - * runtime/UString.h: - (JSC::UString::adopt): - (JSC::IdentifierRepHash::hash): - (JSC::makeString): - * runtime/UStringImpl.h: - (JSC::UStringImpl::adopt): - (JSC::UStringImpl::create): - (JSC::UStringImpl::createUninitialized): - (JSC::UStringImpl::tryCreateUninitialized): - (JSC::UStringImpl::existingHash): - -2010-01-13 Kent Hansen - - Reviewed by Oliver Hunt. - - JSON.stringify and JSON.parse needlessly process properties in the prototype chain - https://bugs.webkit.org/show_bug.cgi?id=33053 - - * runtime/JSONObject.cpp: - (JSC::Stringifier::Holder::appendNextProperty): - (JSC::Walker::walk): - -2010-01-13 Gavin Barraclough - - Reviewed by NOBODY (buildfix). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-01-13 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=33641 - Assertion failure in Lexer.cpp if input stream ends while in string escape - - Test: fast/js/end-in-string-escape.html - - * parser/Lexer.cpp: (JSC::Lexer::lex): Bail out quickly on end of stream, not giving the - assertion a chance to fire. - -2010-01-13 Gavin Barraclough - - Reviewed by NOBODY (buildfix). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-01-13 Gavin Barraclough - - Rubber stamped by Sam Weinig & Darin Adler. - - Three quick fixes to UStringImpl. - - The destroy() method can be switched back to a normal destructor; since we've switched - the way we protect static strings to be using an odd ref-count the destroy() won't abort. - - The cost() calculation logic was wrong. If you have multiple JSStrings wrapping substrings - of a base string, they would each report the full cost of the base string to the heap. - Instead we should only be reporting once for the base string. - - Remove the overloaded new operator calling fastMalloc, replace this with a 'using' to pick - up the implementation from the parent class. - - * JavaScriptCore.exp: - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UStringImpl::cost): - (JSC::UStringImpl::deref): - -2010-01-13 Jocelyn Turcotte - - Reviewed by Simon Hausmann. - - [Qt] Split the build process in two different .pro files. - This allows qmake to be run once all source files are available. - - * DerivedSources.pro: Added. - * JavaScriptCore.pri: Moved source generation to DerivedSources.pro - * pcre/pcre.pri: Moved source generation to DerivedSources.pro - -2010-01-12 Kent Hansen - - Reviewed by Geoffrey Garen. - - [ES5] Implement Object.getOwnPropertyNames - https://bugs.webkit.org/show_bug.cgi?id=32242 - - Add an extra argument to getPropertyNames() and getOwnPropertyNames() - (and all reimplementations thereof) that indicates whether non-enumerable - properties should be added. - - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertyNames): - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::getOwnPropertyNames): - * debugger/DebuggerActivation.h: - * runtime/Arguments.cpp: - (JSC::Arguments::getOwnPropertyNames): - * runtime/Arguments.h: - * runtime/CommonIdentifiers.h: - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertyNames): - * runtime/JSArray.h: - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::getOwnPropertyNames): - * runtime/JSByteArray.h: - * runtime/JSFunction.cpp: - (JSC::JSFunction::getOwnPropertyNames): - * runtime/JSFunction.h: - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::getOwnPropertyNames): - * runtime/JSNotAnObject.h: - * runtime/JSObject.cpp: - (JSC::getClassPropertyNames): - (JSC::JSObject::getPropertyNames): - (JSC::JSObject::getOwnPropertyNames): - * runtime/JSObject.h: - * runtime/JSVariableObject.cpp: - (JSC::JSVariableObject::getOwnPropertyNames): - * runtime/JSVariableObject.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorGetOwnPropertyNames): - * runtime/RegExpMatchesArray.h: - (JSC::RegExpMatchesArray::getOwnPropertyNames): - * runtime/StringObject.cpp: - (JSC::StringObject::getOwnPropertyNames): - * runtime/StringObject.h: - * runtime/Structure.cpp: Rename getEnumerablePropertyNames() to getPropertyNames(), which takes an extra argument. - (JSC::Structure::getPropertyNames): - * runtime/Structure.h: - (JSC::): - -2010-01-12 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=33540 - Make it possible to build in debug mode with assertions disabled - - * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): - * runtime/Identifier.cpp: (JSC::Identifier::checkSameIdentifierTable): - * wtf/FastMalloc.cpp: - * wtf/HashTable.h: (WTF::HashTableConstIterator::checkValidity): - * yarr/RegexCompiler.cpp: (JSC::Yarr::compileRegex): - -2009-11-23 Yong Li - - Reviewed by Adam Treat. - - Make GIF decoder support down-sampling - https://bugs.webkit.org/show_bug.cgi?id=31806 - - * platform/image-decoders/ImageDecoder.cpp: - (WebCore::ImageDecoder::upperBoundScaledY): - (WebCore::ImageDecoder::lowerBoundScaledY): - * platform/image-decoders/ImageDecoder.h: - (WebCore::RGBA32Buffer::scaledRect): - (WebCore::RGBA32Buffer::setScaledRect): - (WebCore::ImageDecoder::scaledSize): - * platform/image-decoders/gif/GIFImageDecoder.cpp: - (WebCore::GIFImageDecoder::sizeNowAvailable): - (WebCore::GIFImageDecoder::initFrameBuffer): - (WebCore::copyOnePixel): - (WebCore::GIFImageDecoder::haveDecodedRow): - (WebCore::GIFImageDecoder::frameComplete): - -2010-01-12 Adam Barth - - Reviewed by Eric Seidel. - - ecma/Date/15.9.5.12-1.js fails every night at midnight - https://bugs.webkit.org/show_bug.cgi?id=28041 - - Change the test to use a concrete time instead of "now". - - * tests/mozilla/ecma/Date/15.9.5.10-1.js: - * tests/mozilla/ecma/Date/15.9.5.12-1.js: - -2010-01-11 Csaba Osztrogonác - - Reviewed by Ariya Hidayat. - - [Qt] Enable JIT and YARR_JIT if (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100) - - * wtf/Platform.h: - -2010-01-11 Geoffrey Garen - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=33481 - Uninitialized data members in ArrayStorage - - SunSpider reports no change. - - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): Initialize missing data members in the two cases - where we don't use fastZeroedMalloc, so it doesn't happen automatically. - -2010-01-11 Steve Falkenburg - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=33480 - - Improve debugging reliability for WTF on Windows. - Store WTF static library's PDB file into a better location. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2010-01-11 Steve Falkenburg - - Windows build fix. - Remove extraneous entries from def file causing build warning. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-01-10 Kent Hansen - - Reviewed by Darin Adler. - - RegExp.prototype.toString returns "//" for empty regular expressions - https://bugs.webkit.org/show_bug.cgi?id=33319 - - "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA. - - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): - - * tests/mozilla/ecma_2/RegExp/properties-001.js: - (AddRegExpCases): - * tests/mozilla/js1_2/regexp/toString.js: - Update relevant Mozilla tests (Mozilla has had this behavior since November 2003). - -2010-01-10 Darin Adler - - * tests/mozilla/ecma/Array/15.4.1.1.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.1.2.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.2.1-1.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.2.2-1.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.2.2-2.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.2.3.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.3.2.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.3.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.4.1.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.4.js: Added property allow-tabs. - * tests/mozilla/ecma/LexicalConventions/7.7.4.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.13.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.16.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.18.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.2.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.4.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.5.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.7.js: Added property allow-tabs. - * tests/mozilla/ecma/String/15.5.1.js: Added property allow-tabs. - * tests/mozilla/ecma/String/15.5.2.js: Added property allow-tabs. - * tests/mozilla/ecma/String/15.5.3.1-3.js: Added property allow-tabs. - * tests/mozilla/ecma/String/15.5.3.1-4.js: Added property allow-tabs. - * tests/mozilla/ecma/String/15.5.3.js: Added property allow-tabs. - * tests/mozilla/ecma/TypeConversion/9.5-2.js: Added property allow-tabs. - * tests/mozilla/ecma/jsref.js: Modified property allow-tabs. - * tests/mozilla/ecma/shell.js: Modified property allow-tabs. - * tests/mozilla/ecma_2/LexicalConventions/keywords-001.js: Added property allow-tabs. - * tests/mozilla/ecma_2/RegExp/exec-001.js: Added property allow-tabs. - * tests/mozilla/ecma_2/String/match-004.js: Added property allow-tabs. - * tests/mozilla/ecma_2/String/replace-001.js: Added property allow-tabs. - * tests/mozilla/ecma_2/String/split-002.js: Added property allow-tabs. - * tests/mozilla/ecma_2/jsref.js: Modified property allow-tabs. - * tests/mozilla/ecma_2/shell.js: Added property allow-tabs. - * tests/mozilla/ecma_3/Date/shell.js: Modified property allow-tabs. - * tests/mozilla/ecma_3/Exceptions/regress-181654.js: Added property allow-tabs. - * tests/mozilla/ecma_3/RegExp/regress-209067.js: Added property allow-tabs. - * tests/mozilla/ecma_3/RegExp/regress-85721.js: Added property allow-tabs. - * tests/mozilla/importList.html: Added property allow-tabs. - * tests/mozilla/js1_1/shell.js: Added property allow-tabs. - * tests/mozilla/js1_2/Array/general1.js: Added property allow-tabs. - * tests/mozilla/js1_2/Array/general2.js: Added property allow-tabs. - * tests/mozilla/js1_2/Array/slice.js: Added property allow-tabs. - * tests/mozilla/js1_2/Array/splice1.js: Added property allow-tabs. - * tests/mozilla/js1_2/Array/splice2.js: Added property allow-tabs. - * tests/mozilla/js1_2/Objects/toString-001.js: Added property allow-tabs. - * tests/mozilla/js1_2/String/charCodeAt.js: Added property allow-tabs. - * tests/mozilla/js1_2/String/concat.js: Modified property allow-tabs. - * tests/mozilla/js1_2/String/match.js: Added property allow-tabs. - * tests/mozilla/js1_2/String/slice.js: Added property allow-tabs. - * tests/mozilla/js1_2/function/Function_object.js: Added property allow-tabs. - * tests/mozilla/js1_2/function/Number.js: Modified property allow-tabs. - * tests/mozilla/js1_2/function/String.js: Modified property allow-tabs. - * tests/mozilla/js1_2/function/nesting.js: Added property allow-tabs. - * tests/mozilla/js1_2/function/regexparg-1.js: Added property allow-tabs. - * tests/mozilla/js1_2/function/regexparg-2-n.js: Added property allow-tabs. - * tests/mozilla/js1_2/jsref.js: Added property allow-tabs. - * tests/mozilla/js1_2/operator/equality.js: Added property allow-tabs. - * tests/mozilla/js1_2/operator/strictEquality.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_dollar_number.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_input.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_lastIndex.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_lastMatch.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_lastMatch_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_lastParen.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_lastParen_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_leftContext.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_leftContext_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_multiline.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_object.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_rightContext.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_rightContext_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/alphanumeric.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/asterisk.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/backslash.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/backspace.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/beginLine.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/character_class.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/compile.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/control_characters.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/digit.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/dot.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/endLine.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/everything.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/exec.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/flags.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/global.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/hexadecimal.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/ignoreCase.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/interval.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/octal.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/parentheses.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/plus.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/question_mark.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/simple_form.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/source.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/special_characters.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/string_replace.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/string_search.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/string_split.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/test.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/toString.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/vertical_bar.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/whitespace.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/word_boundary.js: Added property allow-tabs. - * tests/mozilla/js1_2/shell.js: Added property allow-tabs. - * tests/mozilla/js1_2/statements/break.js: Added property allow-tabs. - * tests/mozilla/js1_2/statements/continue.js: Added property allow-tabs. - * tests/mozilla/js1_2/statements/do_while.js: Added property allow-tabs. - * tests/mozilla/js1_2/statements/switch.js: Added property allow-tabs. - * tests/mozilla/js1_2/statements/switch2.js: Added property allow-tabs. - * tests/mozilla/js1_3/shell.js: Added property allow-tabs. - * tests/mozilla/js1_4/shell.js: Added property allow-tabs. - * tests/mozilla/js1_5/Regress/regress-111557.js: Added property allow-tabs. - * tests/mozilla/js1_5/Regress/regress-216320.js: Added property allow-tabs. - * tests/mozilla/menuhead.html: Added property allow-tabs. - * tests/mozilla/mklistpage.pl: Added property allow-tabs. - * tests/mozilla/runtests.pl: Added property allow-tabs. - -2010-01-08 Daniel Bates - - Reviewed by Adam Barth. - - https://bugs.webkit.org/show_bug.cgi?id=33417 - - Cleans up style errors exposed by the patch for bug #33198. - Moreover, fixes all "Weird number of spaces at line-start. Are you using a 4-space indent?" - errors reported by check-webkit-style. - - No functionality was changed. So, no new tests. - - * wtf/Platform.h: - -2010-01-08 Kent Hansen - - Reviewed by Eric Seidel. - - Don't store RegExp flags string representation - https://bugs.webkit.org/show_bug.cgi?id=33321 - - It's unused; the string representation is reconstructed from flags. - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * runtime/RegExp.h: - -2010-01-08 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Memory use grows grows possibly unbounded in this JavaScript Array test case - https://bugs.webkit.org/show_bug.cgi?id=31675 - - This fixes one observed bug in this test case, which is that - arrays don't report extra cost for the sparse value maps. - - SunSpider reports a small speedup. - - * runtime/JSArray.cpp: - (JSC::JSArray::putSlowCase): Report extra memory cost for - the sparse value map. - * runtime/JSArray.h: - -2010-01-08 Yong Li - - Reviewed by Darin Adler. - - Remove unnecessary #include from FastMalloc.cpp - https://bugs.webkit.org/show_bug.cgi?id=33393 - - * wtf/FastMalloc.cpp: - -2010-01-08 Eric Seidel - - No review, rolling out r52983. - http://trac.webkit.org/changeset/52983 - https://bugs.webkit.org/show_bug.cgi?id=33321 - - Broke 59 JavaScriptCore tests. I don't think Kent knew about - run-javascriptcore-tests. Sadly neither does the commit-bot, - yet. - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * runtime/RegExp.h: - (JSC::RegExp::flags): - -2010-01-08 Eric Seidel - - No review, rolling out r52981. - http://trac.webkit.org/changeset/52981 - https://bugs.webkit.org/show_bug.cgi?id=33319 - - Caused two JS tests to start failing: - ecma_2/RegExp/properties-001.js and js1_2/regexp/toString.js - - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): - -2010-01-08 Kent Hansen - - Reviewed by Darin Adler. - - Don't store RegExp flags string representation - https://bugs.webkit.org/show_bug.cgi?id=33321 - - It's unused; the string representation is reconstructed from flags. - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * runtime/RegExp.h: - -2010-01-08 Kent Hansen - - Reviewed by Darin Adler. - - RegExp.prototype.toString returns "//" for empty regular expressions - https://bugs.webkit.org/show_bug.cgi?id=33319 - - "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA. - - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): - -2010-01-08 Norbert Leser - - Reviewed by Darin Adler. - - RVCT compiler with "-Otime -O3" optimization tries to optimize out - inline new'ed pointers that are passed as arguments. - Proposed patch assigns new'ed pointer explicitly outside function call. - - https://bugs.webkit.org/show_bug.cgi?id=33084 - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - (OpaqueJSClassContextData::OpaqueJSClassContextData): - -2010-01-08 Gabor Loki - - Reviewed by Gavin Barraclough. - - Remove an unnecessary cacheFlush from ARM_TRADITIONAL JIT - https://bugs.webkit.org/show_bug.cgi?id=33203 - - * assembler/ARMAssembler.cpp: Remove obsolete linkBranch function. - (JSC::ARMAssembler::executableCopy): Inline a clean linkBranch code. - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::getLdrImmAddress): Use inline function. - (JSC::ARMAssembler::getLdrImmAddressOnPool): Ditto. - (JSC::ARMAssembler::patchPointerInternal): Remove an unnecessary cacheFlush. - (JSC::ARMAssembler::linkJump): Use patchPointerInternal instead of linkBranch. - (JSC::ARMAssembler::linkCall): Ditto. - (JSC::ARMAssembler::relinkCall): Ditto. - -2010-01-07 Gabor Loki - - Reviewed by Gavin Barraclough. - - Build fix for JSVALUE32 when ENABLE_JIT_OPTIMIZE* are disabled - https://bugs.webkit.org/show_bug.cgi?id=33311 - - Move compileGetDirectOffset function to common part of JSVALUE32 - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetDirectOffset): - -2010-01-07 Laszlo Gombos - - Reviewed by Maciej Stachowiak. - - Allow call sites to determine if ASSERT_* and LOG_* macros are operational - https://bugs.webkit.org/show_bug.cgi?id=33020 - - * wtf/Assertions.h: Set ASSERT_MSG_DISABLED, FATAL_DISABLED, - ERROR_DISABLED, LOG_DISABLED to 1 if the compiler does not support - variadic macros. Refactor for better readibility. - -2010-01-07 Daniel Bates - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=32987 - - Added ENABLE_XHTMLMP flag. Disabled by default. - - * Configurations/FeatureDefines.xcconfig: - -2010-01-07 Laszlo Gombos - - Reviewed by Gavin Barraclough. - - [Symbian] Port ARM traditional JIT Trampolines to RVCT - https://bugs.webkit.org/show_bug.cgi?id=30552 - - Take the GCC implementation and mechanically convert - it to RVCT syntax. - - Use 'bx rX' instead of 'mov pc, rX' when it is available. - - Developed in cooperation with Iain Campbell and Gabor Loki. - - * JavaScriptCore.pri: Extra step to generate RVCT stubs. The - script generation intentionally executed all the time not just - for RVCT targets. - - * create_rvct_stubs: Added. Perl script to expand precompiler macros - for RVCT assembler - the template is defined in JITStubs.cpp. - - * jit/JITStubs.cpp: - (JSC::ctiTrampoline): - (JSC::ctiVMThrowTrampoline): - (JSC::ctiOpThrowNotCaught): - -2010-01-07 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fix a crash seen on the buildbots. - - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): Disable specific function tracking here, - instead of in WebCore, to ensure that the disabling happens before a - specific function can be registered. - -2010-01-07 Alexey Proskuryakov - - Mac build fix. - - * JavaScriptCore.exp: Export new JSGlobalData static data members. - -2010-01-07 Alexey Proskuryakov - - Reviewed by Geoffrey Garen. - - https://bugs.webkit.org/show_bug.cgi?id=33057 - REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows - - REGRESSION: WebKit fails to start PeaceKeeper benchmark - - Test: fast/js/webcore-string-comparison.html - - In r49365, some code was moved from JSString.cpp to JSString.h, and as a result, WebCore - got a way to directly instantiate JSStrings over DLL borders. Since vftable for JSString was - not exported, objects created from WebCore got a different vptr, and JavaScriptCore - optimizations that relied on vptr of all JSString objects being equal failed. - - * config.h: Added a JS_EXPORTCLASS macro for exporting classes. It's currently the same as - JS_EXPORTDATA, but it clearly needed a new name. - - * runtime/InitializeThreading.cpp: - (JSC::initializeThreadingOnce): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::storeVPtrs): - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::createNonDefault): - (JSC::JSGlobalData::create): - (JSC::JSGlobalData::sharedInstance): - * runtime/JSGlobalData.h: - Store vptrs just once, no need to repeatedly pick and copy them. This makes it possible to - assert vptr correctness in object destructors (which don't have access to JSGlobalData, - and even Heap::heap(this) will fail for fake objects created from storeVPtrs()). - - * runtime/JSArray.cpp: (JSC::JSArray::~JSArray): Assert that vptr is what we expect it to be. - It's important to assert in destructor, because MSVC changes the vptr after constructor - is invoked. - * runtime/JSByteArray.cpp: (JSC::JSByteArray::~JSByteArray): Ditto. - * runtime/JSByteArray.h: Ditto. - * runtime/JSFunction.h: Ditto. - * runtime/JSFunction.cpp: (JSC::JSFunction::~JSFunction): Ditto. - - * runtime/JSCell.h: (JSC::JSCell::setVPtr): Added a method to substitute vptr for another - one. - - * runtime/JSString.h: Export JSString class together with its vftable, and tell other - libraries tp import it. This is needed on platforms that have a separate JavaScriptCore - dynamic library - and on Mac, we already did the export via JavaScriptCore.exp. - (JSC::JSString::~JSString): Assert tha vptr is what we expect it to be. - (JSC::fixupVPtr): Store a previously saved primary vftable pointer (do nothing if building - JavaScriptCore itself). - (JSC::jsSingleCharacterString): Call fixupVPtr in case this is call across DLL boundary. - (JSC::jsSingleCharacterSubstring): Ditto. - (JSC::jsNontrivialString): Ditto. - (JSC::jsString): Ditto. - (JSC::jsSubstring): Ditto. - (JSC::jsOwnedString): Ditto. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new static - JSGlobalData members that are used in WebCore via inline functions. - -2010-01-07 Geoffrey Garen - - Reviewed by Sam Weinig. - - Safari memory usage skyrockets using new Google AdWords interface - https://bugs.webkit.org/show_bug.cgi?id=33343 - - The memory use was caused by the global object creating too many structures - as it thrashed between different specific functions. - - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::changePrototypeTransition): - (JSC::Structure::despecifyFunctionTransition): - (JSC::Structure::addAnonymousSlotsTransition): - (JSC::Structure::getterSetterTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::despecifyAllFunctions): - * runtime/Structure.h: - (JSC::Structure::disableSpecificFunctionTracking): Track a thrash count - for specific functions. Disable specific function tracking once the - thrash count has been hit. - -2010-01-07 Csaba Osztrogonác - - Reviewed by Simon Hausmann. - - [Qt] Enable JIT in debug mode on win32 after r51141 fixed the crashes. - - * JavaScriptCore.pri: - -2010-01-07 Zoltan Horvath - - Reviewed by Holger Freyther. - - [Mac] Build fix when FAST_MALLOC_MATCH_VALIDATION=1 - https://bugs.webkit.org/show_bug.cgi?id=33312 - - Using of operator += cause compile error on Mac, so it is changed to - "= static_cast(old_ptr) + 1". - - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::realloc): - -2010-01-07 Zoltan Horvath - - Reviewed by Holger Freyther. - - [Qt] Build fix when FAST_MALLOC_MATCH_VALIDATION=1 - https://bugs.webkit.org/show_bug.cgi?id=33312 - - Remove pByte (committed in r42344 from #20422), because pByte doesn't - exist and it is unnecessary. - - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::realloc): - -2010-01-06 Gavin Barraclough - - QT build fix. - - * runtime/Identifier.cpp: - (JSC::createIdentifierTableSpecific): - -2010-01-06 Gavin Barraclough - - Windows build fix part I. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-01-06 Dan Bernstein - - Build fix - - * runtime/Identifier.cpp: - (JSC::createIdentifierTableSpecificCallback): - -2010-01-05 Gavin Barraclough - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=33236 - Remove m_identifierTable pointer from UString - - Currently every string holds a pointer so that during destruction, - if a string has been used as an identifier, it can remove itself - from the table. By instead accessing the identifierTable via a - thread specific tracking the table associated with the current - globaldata, we can save the memory cost of this pointer. - - * API/APIShims.h: - (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): - (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): - (JSC::APICallbackShim::APICallbackShim): - (JSC::APICallbackShim::~APICallbackShim): - - - change the API shims to track the identifierTable of the current JSGlobalData. - - * API/JSContextRef.cpp: - (JSContextGroupCreate): - - - update creation of JSGlobalData for API usage to use new create method. - - fix shim instanciation bug in JSGlobalContextCreateInGroup. - - * JavaScriptCore.exp: - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - - - add asserts to check the identifierTable is being tracked correctly. - - * runtime/Identifier.cpp: - (JSC::IdentifierTable::~IdentifierTable): - (JSC::IdentifierTable::add): - (JSC::Identifier::remove): - (JSC::Identifier::checkSameIdentifierTable): - (JSC::createIdentifierTableSpecificCallback): - (JSC::createIdentifierTableSpecific): - (JSC::createDefaultDataSpecific): - - - Use currentIdentifierTable() instead of UStringImpl::m_identifierTable. - - Define methods to access the thread specific identifier tables. - - * runtime/Identifier.h: - (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData): - (JSC::defaultIdentifierTable): - (JSC::setDefaultIdentifierTable): - (JSC::currentIdentifierTable): - (JSC::setCurrentIdentifierTable): - (JSC::resetCurrentIdentifierTable): - - - Declare methods to access the thread specific identifier tables. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::createNonDefault): - (JSC::JSGlobalData::create): - (JSC::JSGlobalData::sharedInstance): - - - creation of JSGlobalData objects, other than for API usage, associate themselves with the current thread. - - * runtime/JSGlobalData.h: - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::destroy): - - - destroy() method should be using isIdentifier(). - - * runtime/UStringImpl.h: - (JSC::UStringImpl::isIdentifier): - (JSC::UStringImpl::setIsIdentifier): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::UStringImpl): - - - replace m_identifierTable with a single m_isIdentifier bit. - - * wtf/StringHashFunctions.h: - (WTF::stringHash): - - - change string hash result from 32-bit to 31-bit, to free a bit in UStringImpl for m_isIdentifier. - -2009-12-25 Patrick Gansterer - - Reviewed by Eric Seidel. - - Buildfix for WinCE + style fixes. - https://bugs.webkit.org/show_bug.cgi?id=32939 - - * jsc.cpp: - (functionPrint): - (functionQuit): - (parseArguments): - (fillBufferWithContentsOfFile): - -2010-01-05 Patrick Gansterer - - Reviewed by Eric Seidel. - - WinCE buildfix after r52791 (renamed PLATFORM(WINCE) to OS(WINCE)). - https://bugs.webkit.org/show_bug.cgi?id=33205 - - * jit/ExecutableAllocator.h: - -2010-01-05 Patrick Gansterer - - Reviewed by Darin Adler. - - Added compiler error for unsupported platforms. - https://bugs.webkit.org/show_bug.cgi?id=33112 - - * jit/JITStubs.cpp: - -2010-01-05 Gabor Loki - - Reviewed by Maciej Stachowiak. - - Follow r52729 in ARMAssembler. - https://bugs.webkit.org/show_bug.cgi?id=33208 - - Use WTF_ARM_ARCH_AT_LEAST instead of ARM_ARCH_VERSION - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::encodeComplexImm): Move tmp declaration to ARMv7 - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::): - (JSC::ARMAssembler::bkpt): - -2010-01-05 Maciej Stachowiak - - Unreviewed build fix for Gtk+ - - Don't use // comments in Platform.h, at least some of them seem to make the version of GCC - used on the Gtk buildbot unhappy. - - * wtf/Platform.h: - -2010-01-04 Maciej Stachowiak - - Reviewed by Darin Fisher. - - Reorganize, document and rename OS() platform macros. - https://bugs.webkit.org/show_bug.cgi?id=33198 - - * wtf/Platform.h: Rename, reorganize and document OS() macros. - - Adapt to name changes. Also fixed a few incorrect OS checks. - - * API/JSContextRef.cpp: - * assembler/MacroAssemblerARM.cpp: - (JSC::isVFPPresent): - * assembler/MacroAssemblerX86Common.h: - * bytecode/SamplingTool.cpp: - * config.h: - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::~RegisterFile): - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - (JSC::RegisterFile::grow): - * jit/ExecutableAllocator.h: - * jit/ExecutableAllocatorFixedVMPool.cpp: - * jit/ExecutableAllocatorPosix.cpp: - * jit/ExecutableAllocatorSymbian.cpp: - * jit/ExecutableAllocatorWin.cpp: - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITStubs.cpp: - * jsc.cpp: - (main): - * parser/Grammar.y: - * profiler/ProfileNode.cpp: - (JSC::getCount): - * runtime/Collector.cpp: - (JSC::Heap::Heap): - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlockPtr): - (JSC::currentThreadStackBase): - (JSC::getCurrentPlatformThread): - (JSC::suspendThread): - (JSC::resumeThread): - (JSC::getPlatformThreadRegisters): - (JSC::otherThreadStackPointer): - * runtime/Collector.h: - * runtime/DateConstructor.cpp: - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - * runtime/InitializeThreading.cpp: - (JSC::initializeThreading): - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - * runtime/MarkStackPosix.cpp: - * runtime/MarkStackSymbian.cpp: - * runtime/MarkStackWin.cpp: - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncLastIndexOf): - * runtime/TimeoutChecker.cpp: - (JSC::getCPUTime): - * runtime/UString.cpp: - (JSC::UString::from): - * wtf/Assertions.cpp: - * wtf/Assertions.h: - * wtf/CurrentTime.cpp: - (WTF::lowResUTCTime): - * wtf/CurrentTime.h: - (WTF::getLocalTime): - * wtf/DateMath.cpp: - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_ThreadCache::InitModule): - (WTF::TCMallocStats::): - * wtf/FastMalloc.h: - * wtf/MathExtras.h: - * wtf/RandomNumber.cpp: - (WTF::randomNumber): - * wtf/RandomNumberSeed.h: - (WTF::initializeRandomNumberGenerator): - * wtf/StringExtras.h: - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SlowLock): - * wtf/TCSystemAlloc.cpp: - * wtf/ThreadSpecific.h: - (WTF::::destroy): - * wtf/Threading.h: - * wtf/ThreadingPthreads.cpp: - (WTF::initializeThreading): - (WTF::isMainThread): - * wtf/ThreadingWin.cpp: - (WTF::wtfThreadEntryPoint): - (WTF::createThreadInternal): - * wtf/VMTags.h: - * wtf/unicode/icu/CollatorICU.cpp: - (WTF::Collator::userDefault): - * wtf/win/MainThreadWin.cpp: - (WTF::initializeMainThreadPlatform): - -2010-01-04 Gustavo Noronha Silva - - Add missing files to the build system - make distcheck build fix. - - * GNUmakefile.am: - -2010-01-04 Gavin Barraclough - - Reviewed by Sam Weinig, additional coding by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=33163 - Add string hashing functions to WTF. - Use WTF's string hashing functions from UStringImpl. - - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/UStringImpl.cpp: - * runtime/UStringImpl.h: - (JSC::UStringImpl::computeHash): - * wtf/HashFunctions.h: - * wtf/StringHashFunctions.h: Added. - (WTF::stringHash): - -2010-01-04 Dmitry Titov - - Not reviewed, attempt to fix ARM bulid. - - * wtf/Platform.h: - -2010-01-04 Gavin Barraclough - - Rubber stamped by Geoff Garen. - - Add an 'isIdentifier' to UStringImpl, use this where appropriate - (where previously 'identifierTable' was being tested). - - * API/JSClassRef.cpp: - (OpaqueJSClass::~OpaqueJSClass): - (OpaqueJSClassContextData::OpaqueJSClassContextData): - * runtime/Identifier.cpp: - (JSC::Identifier::addSlowCase): - * runtime/Identifier.h: - (JSC::Identifier::add): - * runtime/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * runtime/UStringImpl.h: - (JSC::UStringImpl::isIdentifier): - -2010-01-04 Gavin Barraclough - - Reviewed by Sam "Shimmey Shimmey" Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=33158 - Refactor JSC API entry/exit to use RAII instead of copy/pasting code. - Make it easier to change set of actions taken when passing across the API boundary. - - * API/APIShims.h: Added. - (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): - (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): - (JSC::APIEntryShim::APIEntryShim): - (JSC::APICallbackShim::APICallbackShim): - (JSC::APICallbackShim::~APICallbackShim): - * API/JSBase.cpp: - (JSEvaluateScript): - (JSCheckScriptSyntax): - (JSGarbageCollect): - (JSReportExtraMemoryCost): - * API/JSCallbackConstructor.cpp: - (JSC::constructJSCallback): - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::call): - * API/JSCallbackObjectFunctions.h: - (JSC::::init): - (JSC::::getOwnPropertySlot): - (JSC::::put): - (JSC::::deleteProperty): - (JSC::::construct): - (JSC::::hasInstance): - (JSC::::call): - (JSC::::getOwnPropertyNames): - (JSC::::toNumber): - (JSC::::toString): - (JSC::::staticValueGetter): - (JSC::::callbackGetter): - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeConstructor): - (JSObjectMakeFunction): - (JSObjectMakeArray): - (JSObjectMakeDate): - (JSObjectMakeError): - (JSObjectMakeRegExp): - (JSObjectGetPrototype): - (JSObjectSetPrototype): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - (JSObjectDeleteProperty): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - (JSObjectCopyPropertyNames): - (JSPropertyNameArrayRelease): - (JSPropertyNameAccumulatorAddName): - * API/JSValueRef.cpp: - (JSValueGetType): - (JSValueIsUndefined): - (JSValueIsNull): - (JSValueIsBoolean): - (JSValueIsNumber): - (JSValueIsString): - (JSValueIsObject): - (JSValueIsObjectOfClass): - (JSValueIsEqual): - (JSValueIsStrictEqual): - (JSValueIsInstanceOfConstructor): - (JSValueMakeUndefined): - (JSValueMakeNull): - (JSValueMakeBoolean): - (JSValueMakeNumber): - (JSValueMakeString): - (JSValueToBoolean): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - (JSValueUnprotect): - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-01-04 Dan Bernstein - - Reviewed by Ada Chan and Mark Rowe. - - Updated copyright string - - * Info.plist: - * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: - -2010-01-04 Adam Roben - - No review, rolling out r52741. - http://trac.webkit.org/changeset/52741 - https://bugs.webkit.org/show_bug.cgi?id=33056 - - * wtf/AlwaysInline.h: - -2010-01-04 Patrick Gansterer - - Reviewed by Darin Adler. - - Add cacheFlush support for WinCE - https://bugs.webkit.org/show_bug.cgi?id=33110 - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - -2010-01-04 Patrick Gansterer - - Reviewed by Adam Roben. - - Implement NO_RETURN for COMPILER(MSVC). - https://bugs.webkit.org/show_bug.cgi?id=33056 - - * wtf/AlwaysInline.h: - -2010-01-04 Maciej Stachowiak - - Reviewed by Simon Hausmann. - - Fix some PLATFORM(*_ENDIAN) uses to CPU() - https://bugs.webkit.org/show_bug.cgi?id=33148 - - * runtime/JSCell.cpp: - (JSC::): - * runtime/JSValue.h: - (JSC::JSValue::): - -2010-01-04 Maciej Stachowiak - - Reviewed by Adam Barth. - - Document CPU() macros in comments. - https://bugs.webkit.org/show_bug.cgi?id=33147 - - * wtf/Platform.h: - -2010-01-04 Maciej Stachowiak - - Reviewed by Adam Barth. - - Reorganize, document and rename CPU() platform macros. - https://bugs.webkit.org/show_bug.cgi?id=33145 - ExecutableAllocatorSymbian appears to have buggy ARM version check - https://bugs.webkit.org/show_bug.cgi?id=33138 - - * wtf/Platform.h: - Rename all macros related to detection of particular CPUs or - classes of CPUs to CPU(), reorganize and document them. - - All remaining changes are adapting to the renames, plus fixing the - second bug cited above. - - * assembler/ARMAssembler.cpp: - * assembler/ARMAssembler.h: - * assembler/ARMv7Assembler.h: - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::Imm32::Imm32): - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerARM.cpp: - * assembler/MacroAssemblerARM.h: - * assembler/MacroAssemblerCodeRef.h: - (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): - * assembler/MacroAssemblerX86.h: - * assembler/MacroAssemblerX86Common.h: - * assembler/MacroAssemblerX86_64.h: - * assembler/X86Assembler.h: - (JSC::X86Registers::): - (JSC::X86Assembler::): - (JSC::X86Assembler::movl_mEAX): - (JSC::X86Assembler::movl_EAXm): - (JSC::X86Assembler::repatchLoadPtrToLEA): - (JSC::X86Assembler::X86InstructionFormatter::memoryModRM): - * jit/ExecutableAllocator.h: - * jit/ExecutableAllocatorFixedVMPool.cpp: - * jit/ExecutableAllocatorPosix.cpp: - * jit/ExecutableAllocatorSymbian.cpp: - (JSC::ExecutableAllocator::intializePageSize): - * jit/JIT.cpp: - * jit/JIT.h: - * jit/JITArithmetic.cpp: - * jit/JITInlineMethods.h: - (JSC::JIT::beginUninterruptedSequence): - (JSC::JIT::restoreArgumentReferenceForTrampoline): - (JSC::JIT::emitCount): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - * jit/JITStubs.h: - * runtime/Collector.cpp: - (JSC::currentThreadStackBase): - (JSC::getPlatformThreadRegisters): - (JSC::otherThreadStackPointer): - * wrec/WREC.h: - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateEnter): - (JSC::WREC::Generator::generateReturnSuccess): - (JSC::WREC::Generator::generateReturnFailure): - * wrec/WRECGenerator.h: - * wtf/FastMalloc.cpp: - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SlowLock): - * wtf/Threading.h: - * wtf/dtoa.cpp: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): - (JSC::Yarr::RegexGenerator::generateReturn): - * yarr/RegexJIT.h: - -2010-01-04 Maciej Stachowiak - - Reviewed by Adam Barth. - - Clean up COMPILER macros and remove unused ones. - https://bugs.webkit.org/show_bug.cgi?id=33132 - - Removed values are COMPILER(BORLAND) and COMPILER(CYGWIN) - they were - not used anywhere. - - * wtf/Platform.h: - -2010-01-03 Maciej Stachowiak - - Reviewed by Eric Seidel. - - Update wtf/Platform.h to document the new system for porting macros. - https://bugs.webkit.org/show_bug.cgi?id=33130 - - * wtf/Platform.h: - -2009-12-29 Laszlo Gombos - - Reviewed by Maciej Stachowiak. - - PLATFORM(CAIRO) should be defined by WIN_CAIRO define - https://bugs.webkit.org/show_bug.cgi?id=22250 - - * wtf/Platform.h: Define WTF_PLATFORM_CAIRO for GTK port only - For the WinCairo port WTF_PLATFORM_CAIRO is already defined in config.h - -2009-12-28 Shu Chang - - Reviewed by Laszlo Gombos. - - [Qt] Delete ThreadPrivate instance after it is finished. - https://bugs.webkit.org/show_bug.cgi?id=32614 - - * wtf/qt/ThreadingQt.cpp: - (WTF::ThreadMonitor::instance): - (WTF::ThreadMonitor::threadFinished): - (WTF::createThreadInternal): - (WTF::detachThread): - -2009-12-28 Patrick Gansterer - - Reviewed by Maciej Stachowiak. - - Cleanup of #define JS_EXPORT. - - * API/JSBase.h: - -2009-12-27 Patrick Gansterer - - Reviewed by Adam Barth. - - WinCE buildfix (HWND_MESSAGE isn't supported there) - - * wtf/win/MainThreadWin.cpp: - (WTF::initializeMainThreadPlatform): - -2009-12-27 Patrick Gansterer - - Reviewed by Adam Barth. - - Added a file with WinMain function to link agains in WinCE. - - * os-win32/WinMain.cpp: Added. - (convertToUtf8): - (WinMain): - -2009-12-24 Laszlo Gombos - - Unreviewed; revert of r52550. - - The change regressed the following LayoutTests for QtWebKit. - - fast/workers/worker-call.html -> crashed - fast/workers/worker-close.html -> crashed - - * wtf/qt/ThreadingQt.cpp: - (WTF::waitForThreadCompletion): - (WTF::detachThread): - -2009-12-24 Shu Chang - - Reviewed by Laszlo Gombos. - - [Qt] Fix memory leak by deleting instance of ThreadPrivate - in function waitForThreadCompletion(), synchronously, or in - detachThread(), asynchronously. - https://bugs.webkit.org/show_bug.cgi?id=32614 - - * wtf/qt/ThreadingQt.cpp: - (WTF::waitForThreadCompletion): - (WTF::detachThread): - -2009-12-23 Kwang Yul Seo - - Reviewed by Laszlo Gombos. - - Include stddef.h for ptrdiff_t - https://bugs.webkit.org/show_bug.cgi?id=32891 - - ptrdiff_t is typedef-ed in stddef.h. - Include stddef.h in jit/ExecutableAllocator.h. - - * jit/ExecutableAllocator.h: - -2009-12-23 Patrick Gansterer - - Reviewed by Eric Seidel. - - Buildfix after r47092. - - * wtf/wince/MemoryManager.cpp: - (WTF::tryFastMalloc): - (WTF::tryFastZeroedMalloc): - (WTF::tryFastCalloc): - (WTF::tryFastRealloc): - -2009-12-23 Kent Tamura - - Reviewed by Darin Adler. - - HTMLInputElement::valueAsDate getter support. - https://bugs.webkit.org/show_bug.cgi?id=32876 - - Expose dateToDaysFrom1970(). - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/DateMath.cpp: - (WTF::dateToDaysFrom1970): - * wtf/DateMath.h: - -2009-12-22 Darin Adler - - Reviewed by Mark Rowe. - - Turn off datagrid by default, at least for all platforms Apple ships. - The datagrid implementation isn't ready for general web use yet. - - * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default. - -2009-12-22 Steve Block - - Reviewed by David Levin. - - Updates Android's scheduleDispatchFunctionsOnMainThread() to use new - AndroidThreading class, rather than using JavaSharedClient directly. - This fixes the current layering violation. - https://bugs.webkit.org/show_bug.cgi?id=32651 - - The pattern is copied from Chromium, which uses the ChromiumThreading - class. This patch also fixes the style in ChromiumThreading.h. - - * wtf/android/AndroidThreading.h: Added. Declares AndroidThreading. - * wtf/android/MainThreadAndroid.cpp: Modified - (WTF::scheduleDispatchFunctionsOnMainThread): Uses AndroidThreading. - * wtf/chromium/ChromiumThreading.h: Modified. Fixes style. - -2009-12-22 Gavin Barraclough - - Reviewed by Sam Weinig. - - Fix a couple of problems with UntypedPtrAndBitfield. - - Add a m_leaksPtr to reduce false positives from leaks in debug builds - (this isn't perfect because we'd like a solution for release builds, - but this is now at least as good as a PtrAndFlags would be). - - Switch SmallStringsto use a regular string for the base, rather than - a static one. UntypedPtrAndBitfield assumes all strings are at least - 8 byte aligned; this migt not be true of static strings. Shared buffers - are heap allocated, as are all UStringImpls other than static strings. - Static strings cannot end up being the owner string of substrings, - since the only static strings are length 0. - - * runtime/SmallStrings.cpp: - (JSC::SmallStringsStorage::SmallStringsStorage): - * runtime/UStringImpl.h: - (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): - (JSC::UStringImpl::UStringImpl): - -2009-12-22 Kwang Yul Seo - - Reviewed by Darin Adler. - - RVCT (__ARMCC_VERSION < 400000) does not provide strcasecmp and strncasecmp - https://bugs.webkit.org/show_bug.cgi?id=32857 - - Add implementation of strcasecmp and strncasecmp for RVCT < 4.0 - because earlier versions of RVCT 4.0 does not provide these functions. - - * wtf/StringExtras.cpp: Added. - (strcasecmp): - (strncasecmp): - * wtf/StringExtras.h: - -2009-12-22 Kwang Yul Seo - - Reviewed by Darin Adler. - - Define ALWAYS_INLINE and WTF_PRIVATE_INLINE to __forceinline for RVCT - https://bugs.webkit.org/show_bug.cgi?id=32853 - - Use __forceinline forces RVCT to compile a C or C++ function - inline. The compiler attempts to inline the function, regardless of - the characteristics of the function. - - * wtf/AlwaysInline.h: - * wtf/FastMalloc.h: - -2009-12-21 Simon Hausmann - - Prospective GTK build fix: Add UStringImpl.cpp/h to the build. - - * GNUmakefile.am: - -2009-12-21 Simon Hausmann - - Fix the Qt build, add UStringImpl.cpp to the build. - - * JavaScriptCore.pri: - -2009-12-21 Gavin Barraclough - - Windows Build fix part 5. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - -2009-12-21 Gavin Barraclough - - Reviewed by NOBODY (build fix). - Fix breakage of world introduced in build fix to r52463. - - * runtime/UStringImpl.h: - -2009-12-21 Gavin Barraclough - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=32831 - Replace UString::Rep implementation, following introduction of ropes to JSC. - - * Remove redundant overcapacity mechanisms. - * Reduce memory cost of Rep's. - * Add an inline storage mechanism akin to that in WebCore's StringImpl. - - ~1% Sunspider progression. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - * runtime/SmallStrings.cpp: - (JSC::SmallStringsStorage::SmallStringsStorage): - * runtime/UString.cpp: - (JSC::initializeUString): - (JSC::createRep): - (JSC::UString::createFromUTF8): - (JSC::UString::createUninitialized): - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - (JSC::UString::ascii): - (JSC::UString::operator=): - (JSC::UString::toStrictUInt32): - (JSC::equal): - * runtime/UString.h: - (JSC::UString::isEmpty): - (JSC::UString::cost): - (JSC::makeString): - * runtime/UStringImpl.cpp: Added. - (JSC::UStringImpl::baseSharedBuffer): - (JSC::UStringImpl::sharedBuffer): - (JSC::UStringImpl::destroy): - (JSC::UStringImpl::computeHash): - * runtime/UStringImpl.h: Added. - (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): - (JSC::UntypedPtrAndBitfield::asPtr): - (JSC::UntypedPtrAndBitfield::operator&=): - (JSC::UntypedPtrAndBitfield::operator|=): - (JSC::UntypedPtrAndBitfield::operator&): - (JSC::UStringImpl::create): - (JSC::UStringImpl::createCopying): - (JSC::UStringImpl::createUninitialized): - (JSC::UStringImpl::data): - (JSC::UStringImpl::size): - (JSC::UStringImpl::cost): - (JSC::UStringImpl::hash): - (JSC::UStringImpl::computedHash): - (JSC::UStringImpl::setHash): - (JSC::UStringImpl::identifierTable): - (JSC::UStringImpl::setIdentifierTable): - (JSC::UStringImpl::ref): - (JSC::UStringImpl::deref): - (JSC::UStringImpl::allocChars): - (JSC::UStringImpl::copyChars): - (JSC::UStringImpl::computeHash): - (JSC::UStringImpl::null): - (JSC::UStringImpl::empty): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::operator new): - (JSC::UStringImpl::bufferOwnerString): - (JSC::UStringImpl::bufferOwnership): - (JSC::UStringImpl::isStatic): - -2009-12-18 Laszlo Gombos - - Reviewed by Kenneth Rohde Christiansen. - - Move some build decisions from Qt build system into source files - https://bugs.webkit.org/show_bug.cgi?id=31956 - - * JavaScriptCore.pri: Compile files unconditionally - * jit/ExecutableAllocatorPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN) - * jit/ExecutableAllocatorWin.cpp: Guard with PLATFORM(WIN_OS) - * runtime/MarkStackPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN) - * runtime/MarkStackSymbian.cpp: Guard with PLATFORM(SYMBIAN) - * runtime/MarkStackWin.cpp: Guard with PLATFORM(WIN_OS) - * wtf/Platform.h: Guard ENABLE_JSC_MULTIPLE_THREADS with ENABLE_SINGLE_THREADED for the Qt port - * wtf/ThreadingNone.cpp: Guard with ENABLE(SINGLE_THREADED) - * wtf/qt/ThreadingQt.cpp: Guard with !ENABLE(SINGLE_THREADED) - -2009-12-18 Gavin Barraclough - - Reviewed by Sam Weinig. - - Add createNonCopying method to UString to make replace constructor passed bool, - to make behaviour more explicit. Add createFromUTF8 to UString (wrapping method - on UString::Rep), since other cases of transliteration (e.g. from ascii) are - performed in UString constructors. Add/use setHash & size() accessors on Rep, - rather than accessing _hash/len directly. - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - * API/OpaqueJSString.cpp: - (OpaqueJSString::ustring): - * JavaScriptCore.exp: - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - * runtime/Identifier.cpp: - (JSC::Identifier::equal): - (JSC::CStringTranslator::translate): - (JSC::UCharBufferTranslator::translate): - (JSC::Identifier::addSlowCase): - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - * runtime/JSString.h: - (JSC::JSString::Rope::Fiber::refAndGetLength): - (JSC::JSString::Rope::append): - * runtime/StringBuilder.h: - (JSC::StringBuilder::release): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCodeSlowCase): - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferencesSlow): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncLink): - * runtime/UString.cpp: - (JSC::UString::UString): - (JSC::UString::createNonCopying): - (JSC::UString::createFromUTF8): - * runtime/UString.h: - (JSC::UString::Rep::setHash): - (JSC::UString::~UString): - (JSC::makeString): - -2009-12-18 Geoffrey Garen - - Reviewed by Cameron Zwarich and Gavin Barraclough. - - Changed Register constructors to assignment operators, to streamline - moving values into registers. (In theory, there's no difference between - the two, since the constructor should just inline away, but there seems - to be a big difference in the addled mind of the GCC optimizer.) - - In the interpreter, this is a 3.5% SunSpider speedup and a 1K-2K - reduction in stack usage per privateExecute stack frame. - - * interpreter/CallFrame.h: - (JSC::ExecState::setCalleeArguments): - (JSC::ExecState::setCallerFrame): - (JSC::ExecState::setScopeChain): - (JSC::ExecState::init): - (JSC::ExecState::setArgumentCount): - (JSC::ExecState::setCallee): - (JSC::ExecState::setCodeBlock): Added a little bit of casting so these - functions could use the new Register assignment operators. - - * interpreter/Register.h: - (JSC::Register::withInt): - (JSC::Register::Register): - (JSC::Register::operator=): Swapped in assignment operators for constructors. - -2009-12-18 Yongjun Zhang - - Reviewed by Simon Hausmann. - - https://bugs.webkit.org/show_bug.cgi?id=32713 - [Qt] make wtf/Assertions.h compile in winscw compiler. - - Add string arg before ellipsis to help winscw compiler resolve variadic - macro definitions in wtf/Assertions.h. - - * wtf/Assertions.h: - -2009-12-18 Geoffrey Garen - - Reviewed by Adam Roben. - - Fixed intermittent failure seen on Windows buildbot, and in other JSC - API clients. - - Added a WeakGCPtr class and changed OpaqueJSClass::cachedPrototype to - use it, to avoid vending a stale object as a prototype. - - * API/JSClassRef.cpp: - (OpaqueJSClassContextData::OpaqueJSClassContextData): - (OpaqueJSClass::prototype): - * API/JSClassRef.h: Use WeakGCPtr. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/WeakGCPtr.h: Added. - (JSC::WeakGCPtr::WeakGCPtr): - (JSC::WeakGCPtr::get): - (JSC::WeakGCPtr::clear): - (JSC::WeakGCPtr::operator*): - (JSC::WeakGCPtr::operator->): - (JSC::WeakGCPtr::operator!): - (JSC::WeakGCPtr::operator bool): - (JSC::WeakGCPtr::operator UnspecifiedBoolType): - (JSC::WeakGCPtr::assign): - (JSC::::operator): - (JSC::operator==): - (JSC::operator!=): - (JSC::static_pointer_cast): - (JSC::const_pointer_cast): - (JSC::getPtr): Added WeakGCPtr to the project. - -2009-12-18 Gavin Barraclough - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=32720 - - * JavaScriptCore.exp: - - Remove exports for UString::append - * JavaScriptCore.xcodeproj/project.pbxproj: - - Make StringBuilder a private header (was project). - -2009-12-18 Martin Robinson - - Reviewed by Gustavo Noronha Silva. - - [GTK] GRefPtr does not take a reference when assigned a raw pointer - https://bugs.webkit.org/show_bug.cgi?id=32709 - - Ensure that when assigning a raw pointer to a GRefPtr, the reference - count is incremented. Also remove the GRefPtr conversion overload as - GRefPtr types have necessarily incompatible reference counting. - - * wtf/gtk/GRefPtr.h: - (WTF::GRefPtr::operator=): - -2009-12-18 Simon Hausmann - - Reviewed by Tor Arne Vestbø. - - [Qt] Clean up the qmake build system to distinguish between trunk builds and package builds - - https://bugs.webkit.org/show_bug.cgi?id=32716 - - * pcre/pcre.pri: Use standalone_package instead of QTDIR_build - -2009-12-18 Martin Robinson - - Reviewed by Gustavo Noronha Silva. - - [GTK] Compile warning from line 29 of GRefPtr.cpp - https://bugs.webkit.org/show_bug.cgi?id=32703 - - Fix memory leak and compiler warning in GRefPtr GHashTable template - specialization. - - * wtf/gtk/GRefPtr.cpp: - (WTF::refGPtr): - -2009-12-17 Sam Weinig - - Reviewed by Mark Rowe. - - Add BUILDING_ON_SNOW_LEOPARD and TARGETING_SNOW_LEOPARD #defines. - - * wtf/Platform.h: - -2009-12-17 Adam Roben - - Sync JavaScriptCore.vcproj with JavaScriptCore.xcodeproj and the - source tree - - Fixes . - - Reviewed by Ada Chan. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Moved - around files and filters so that the structure matches - JavaScriptCore.xcodeproj and the source tree. A few headers that were - previously omitted have been added, as well as JSZombie.{cpp,h}. - -2009-12-17 Adam Roben - - Remove HeavyProfile and TreeProfile completely - - These were mostly removed in r42808, but the empty files were left in - place. - - Fixes . - - Reviewed by John Sullivan. - - * Android.mk: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCoreSources.bkl: - Removed HeavyProfile/TreeProfile source files. - - * profiler/HeavyProfile.cpp: Removed. - * profiler/HeavyProfile.h: Removed. - * profiler/TreeProfile.cpp: Removed. - * profiler/TreeProfile.h: Removed. - -2009-12-17 Martin Robinson - - Reviewed by Gustavo Noronha Silva. - - [GTK] WebKit GTK needs a wrapper for ref counted glib/gobject structs - https://bugs.webkit.org/show_bug.cgi?id=21599 - - Implement GRefPtr, a smart pointer for reference counted GObject types. - - * GNUmakefile.am: - * wtf/gtk/GOwnPtr.cpp: - (WTF::GDir): - * wtf/gtk/GRefPtr.h: Added. - (WTF::): - (WTF::GRefPtr::GRefPtr): - (WTF::GRefPtr::~GRefPtr): - (WTF::GRefPtr::clear): - (WTF::GRefPtr::get): - (WTF::GRefPtr::operator*): - (WTF::GRefPtr::operator->): - (WTF::GRefPtr::operator!): - (WTF::GRefPtr::operator UnspecifiedBoolType): - (WTF::GRefPtr::hashTableDeletedValue): - (WTF::::operator): - (WTF::::swap): - (WTF::swap): - (WTF::operator==): - (WTF::operator!=): - (WTF::static_pointer_cast): - (WTF::const_pointer_cast): - (WTF::getPtr): - (WTF::adoptGRef): - (WTF::refGPtr): - (WTF::derefGPtr): - -2009-12-17 Gustavo Noronha Silva - - Unreviewed. Build fixes for make distcheck. - - * GNUmakefile.am: - -2009-12-16 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed Interpreter::privateExecute macro generates - bloated code - - This patch cuts Interpreter stack use by about a third. - - * bytecode/Opcode.h: Changed Opcode to const void* to work with the - const static initiliazation we want to do in Interpreter::privateExecute. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::Interpreter): Moved hashtable initialization here to - avoid polluting Interpreter::privateExecute's stack, and changed it from a - series of add() calls to one add() call in a loop, to cut down on code size. - - (JSC::Interpreter::privateExecute): Changed a series of label computations - to a copy of a compile-time constant array to cut down on code size. - -2009-12-16 Mark Rowe - - Build fix. Disable debug variants of WebKit frameworks. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-12-15 Geoffrey Garen - - Reviewed by Sam "r=me" Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=32498 - - REGRESSION(r51978-r52039): AJAX "Mark This Forum Read" function no longer - works - - Fixed a tyop. - - * runtime/Operations.h: - (JSC::jsAdd): Use the '&&' operator, not the ',' operator. - -2009-12-15 Geoffrey Garen - - Try to fix the windows build: don't export this inlined function. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-12-15 Geoffrey Garen - - Reviewed by Beth Dakin. - - Inlined JSCell's operator new. - - 3.7% speedup on bench-allocate-nonretained.js. - - * JavaScriptCore.exp: - * runtime/JSCell.cpp: - * runtime/JSCell.h: - (JSC::JSCell::operator new): - -2009-12-15 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Removed the number heap, replacing it with a one-item free list for - numbers, taking advantage of the fact that two number cells fit inside - the space for one regular cell, and number cells don't require destruction. - - SunSpider says 1.6% faster in JSVALUE32 mode (the only mode that - heap-allocates numbers). - - SunSpider says 1.1% faster in JSVALUE32_64 mode. v8 says 0.8% faster - in JSVALUE32_64 mode. 10% speedup on bench-alloc-nonretained.js. 6% - speedup on bench-alloc-retained.js. - - There's a lot of formulaic change in this patch, but not much substance. - - * JavaScriptCore.exp: - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - * runtime/Collector.cpp: - (JSC::Heap::Heap): - (JSC::Heap::destroy): - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlock): - (JSC::Heap::freeBlockPtr): - (JSC::Heap::freeBlocks): - (JSC::Heap::recordExtraCost): - (JSC::Heap::allocate): - (JSC::Heap::resizeBlocks): - (JSC::Heap::growBlocks): - (JSC::Heap::shrinkBlocks): - (JSC::Heap::markConservatively): - (JSC::Heap::clearMarkBits): - (JSC::Heap::markedCells): - (JSC::Heap::sweep): - (JSC::Heap::markRoots): - (JSC::Heap::objectCount): - (JSC::Heap::addToStatistics): - (JSC::Heap::statistics): - (JSC::Heap::isBusy): - (JSC::Heap::reset): - (JSC::Heap::collectAllGarbage): - (JSC::Heap::primaryHeapBegin): - (JSC::Heap::primaryHeapEnd): - * runtime/Collector.h: - (JSC::): Removed all code pertaining to the number heap, and changed all - heap template functions and classes to non-template functions and classes. - - (JSC::Heap::allocateNumber): A new optimization to replace the number - heap: allocate half-sized number cells in pairs, returning the first - cell and caching the second cell for the next allocation. - - * runtime/CollectorHeapIterator.h: - (JSC::LiveObjectIterator::LiveObjectIterator): - (JSC::LiveObjectIterator::operator++): - (JSC::DeadObjectIterator::DeadObjectIterator): - (JSC::DeadObjectIterator::operator++): - (JSC::ObjectIterator::ObjectIterator): - (JSC::ObjectIterator::operator++): - * runtime/JSCell.h: - (JSC::JSCell::isNumber): Removed all code pertaining to the number heap, - and changed all heap template functions and classes to non-template functions - and classes. - -2009-12-15 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for WeakGCMap class - https://bugs.webkit.org/show_bug.cgi?id=32547 - - Inherits WeakGCMap from FastAllocBase because it is instantiated by - 'new' at: WebCore/dom/Document.cpp:512. - - * runtime/WeakGCMap.h: - -2009-12-15 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for dtoa's P5Node struct - https://bugs.webkit.org/show_bug.cgi?id=32544 - - Inherits P5Node struct from Noncopyable because it is instantiated by - 'new' at wtf/dtoa.cpp:588 and don't need to be copyable. - - * wtf/dtoa.cpp: - -2009-12-14 Geoffrey Garen - - Reviewed by Simon Fraser. - - https://bugs.webkit.org/show_bug.cgi?id=32524 - REGRESSION(52084): fast/dom/prototypes.html failing two CSS tests - - * wtf/StdLibExtras.h: - (WTF::bitCount): The original patch put the parentheses in the wrong - place, completely changing the calculation and making it almost always - wrong. Moved the parentheses around the '+' operation, like the original - compiler warning suggested. - -2009-12-14 Gabor Loki - - Unreviewed trivial buildfix. - - Fix crosses initialization of usedPrimaryBlocks for JSValue32 - - * runtime/Collector.cpp: - (JSC::Heap::markConservatively): - -2009-12-14 Csaba Osztrogonác - - Reviewed by Simon Hausmann. - - GCC 4.3.x warning fixed. Suggested parantheses added. - warning: ../../../JavaScriptCore/wtf/StdLibExtras.h:77: warning: suggest parentheses around + or - in operand of & - - * wtf/StdLibExtras.h: - (WTF::bitCount): - -2009-12-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Changed GC from mark-sweep to mark-allocate. - - Added WeakGCMap to keep WebCore blissfully ignorant about objects that - have become garbage but haven't run their destructors yet. - - 1% SunSpider speedup. - 7.6% v8 speedup (37% splay speedup). - 17% speedup on bench-alloc-nonretained.js. - 18% speedup on bench-alloc-retained.js. - - * API/JSBase.cpp: - (JSGarbageCollect): - * API/JSContextRef.cpp: - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: Updated for renames and new - files. - - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): Updated to use the Collector - iterator abstraction. - - * jsc.cpp: - (functionGC): Updated for rename. - - * runtime/Collector.cpp: Slightly reduced the number of allocations per - collection, so that small workloads only allocate on collector block, - rather than two. - - (JSC::Heap::Heap): Updated to use the new allocateBlock function. - - (JSC::Heap::destroy): Updated to use the new freeBlocks function. - - (JSC::Heap::allocateBlock): New function to initialize a block when - allocating it. - - (JSC::Heap::freeBlock): Consolidated the responsibility for running - destructors into this function. - - (JSC::Heap::freeBlocks): Updated to use freeBlock. - - (JSC::Heap::recordExtraCost): Sweep the heap in this reporting function, - so that allocation, which is more common, doesn't have to check extraCost. - - (JSC::Heap::heapAllocate): Run destructors right before recycling a - garbage cell. This has better cache utilization than a separate sweep phase. - - (JSC::Heap::resizeBlocks): - (JSC::Heap::growBlocks): - (JSC::Heap::shrinkBlocks): New set of functions for managing the size of - the heap, now that the heap doesn't maintain any information about its - size. - - (JSC::isPointerAligned): - (JSC::isHalfCellAligned): - (JSC::isPossibleCell): - (JSC::isCellAligned): - (JSC::Heap::markConservatively): Cleaned up this code a bit. - - (JSC::Heap::clearMarkBits): - (JSC::Heap::markedCells): Some helper functions for examining the the mark - bitmap. - - (JSC::Heap::sweep): Simplified this function by using a DeadObjectIterator. - - (JSC::Heap::markRoots): Reordered some operations for clarity. - - (JSC::Heap::objectCount): - (JSC::Heap::addToStatistics): - (JSC::Heap::statistics): Rewrote these functions to calculate an object - count on demand, since the heap doesn't maintain this information by - itself. - - (JSC::Heap::reset): New function for resetting the heap once we've - exhausted heap space. - - (JSC::Heap::collectAllGarbage): This function matches the old collect() - behavior, but it's now an uncommon function used only by API. - - * runtime/Collector.h: - (JSC::CollectorBitmap::count): - (JSC::CollectorBitmap::isEmpty): Added some helper functions for managing - the collector mark bitmap. - - (JSC::Heap::reportExtraMemoryCost): Changed reporting from cell equivalents - to bytes, so it's easier to understand. - - * runtime/CollectorHeapIterator.h: - (JSC::CollectorHeapIterator::CollectorHeapIterator): - (JSC::CollectorHeapIterator::operator!=): - (JSC::CollectorHeapIterator::operator*): - (JSC::CollectorHeapIterator::advance): - (JSC::::LiveObjectIterator): - (JSC::::operator): - (JSC::::DeadObjectIterator): - (JSC::::ObjectIterator): New iterators for encapsulating details about - heap layout, and what's live and dead on the heap. - - * runtime/JSArray.cpp: - (JSC::JSArray::putSlowCase): - (JSC::JSArray::increaseVectorLength): Delay reporting extra cost until - we're fully constructed, so the heap mark phase won't visit us in an - invalid state. - - * runtime/JSCell.h: - (JSC::JSCell::): - (JSC::JSCell::createDummyStructure): - (JSC::JSCell::JSCell): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: Added a dummy cell to simplify allocation logic. - - * runtime/JSString.h: - (JSC::jsSubstring): Don't report extra cost for substrings, since they - share a buffer that's already reported extra cost. - - * runtime/Tracing.d: - * runtime/Tracing.h: Changed these dtrace hooks not to report object - counts, since they're no longer cheap to compute. - - * runtime/UString.h: Updated for renames. - - * runtime/WeakGCMap.h: Added. - (JSC::WeakGCMap::isEmpty): - (JSC::WeakGCMap::uncheckedGet): - (JSC::WeakGCMap::uncheckedBegin): - (JSC::WeakGCMap::uncheckedEnd): - (JSC::::get): - (JSC::::take): - (JSC::::set): - (JSC::::uncheckedRemove): Mentioned above. - - * wtf/StdLibExtras.h: - (WTF::bitCount): Added a bit population count function, so the heap can - count live objects to fulfill statistics questions. - -The very last cell in the block is not allocated -- should not be marked. - -2009-12-13 Geoffrey Garen - - Windows build fix: Export some new symbols. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-12-13 Geoffrey Garen - - Windows build fix: Removed some old exports. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-12-13 Geoffrey Garen - - Windows build fix: Use unsigned instead of uint32_t to avoid dependencies. - - * wtf/StdLibExtras.h: - (WTF::bitCount): - -2009-12-13 Gavin Barraclough - - Reviewed by NOBODY (speculative Windows build fix). - - * runtime/JSGlobalObjectFunctions.cpp: - -2009-12-13 Gavin Barraclough - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=32496 - Switch remaining cases of string construction to use StringBuilder. - Builds strings using a vector rather than using string append / addition. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/Executable.cpp: - (JSC::FunctionExecutable::paramString): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - * runtime/JSONObject.cpp: - (JSC::Stringifier::stringify): - (JSC::Stringifier::indent): - * runtime/JSString.h: - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::Lexer::lexString): - * runtime/NumberPrototype.cpp: - (JSC::integerPartNoExp): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToPrecision): - * runtime/Operations.h: - (JSC::jsString): - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferencesSlow): - (JSC::substituteBackreferences): - (JSC::stringProtoFuncConcat): - -2009-12-08 Jeremy Moskovich - - Reviewed by Eric Seidel. - - Add code to allow toggling ATSUI/Core Text rendering at runtime in ComplexTextController. - https://bugs.webkit.org/show_bug.cgi?id=31802 - - The goal here is to allow for a zero runtime hit for ports that decide to select - the API at compile time. - When both USE(ATSUI) and USE(CORE_TEXT) are true, the API is toggled - at runtime. Core Text is used for OS Versions >= 10.6. - - * wtf/Platform.h: #define USE_CORE_TEXT and USE_ATSUI on Chrome/Mac. - -2009-12-11 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - Unify codegen for forward and backward variants of branches - https://bugs.webkit.org/show_bug.cgi?id=32463 - - * jit/JIT.h: - (JSC::JIT::emit_op_loop): Implemented in terms of forward variant. - (JSC::JIT::emit_op_loop_if_true): ditto - (JSC::JIT::emitSlow_op_loop_if_true): ditto - (JSC::JIT::emit_op_loop_if_false): ditto - (JSC::JIT::emitSlow_op_loop_if_false): ditto - (JSC::JIT::emit_op_loop_if_less): ditto - (JSC::JIT::emitSlow_op_loop_if_less): ditto - * jit/JITOpcodes.cpp: - -2009-12-11 Sam Weinig - - Reviewed by Anders Carlsson. - - Allow WTFs concept of the main thread to differ from pthreads when necessary. - - * wtf/ThreadingPthreads.cpp: - (WTF::initializeThreading): - (WTF::isMainThread): - * wtf/mac/MainThreadMac.mm: - (WTF::initializeMainThreadPlatform): - (WTF::scheduleDispatchFunctionsOnMainThread): - -2009-12-11 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=32454 - Refactor construction of simple strings to avoid string concatenation. - - Building strings through concatenation has a memory and performance cost - - a memory cost since we must over-allocate the buffer to leave space to append - into, and performance in that the string may still require reallocation (and - thus copying during construction). Instead move the full construction to - within a single function call (makeString), so that the arguments' lengths - can be calculated and an appropriate sized buffer allocated before copying - any characters. - - ~No performance change (~2% progression on date tests). - - * bytecode/CodeBlock.cpp: - (JSC::escapeQuotes): - (JSC::valueToSourceString): - (JSC::constantName): - (JSC::idName): - (JSC::CodeBlock::registerName): - (JSC::regexpToSourceString): - (JSC::regexpName): - * bytecompiler/NodesCodegen.cpp: - (JSC::substitute): - * profiler/Profiler.cpp: - (JSC::Profiler::createCallIdentifier): - * runtime/DateConstructor.cpp: - (JSC::callDate): - * runtime/DateConversion.cpp: - (JSC::formatDate): - (JSC::formatDateUTCVariant): - (JSC::formatTime): - (JSC::formatTimeUTC): - * runtime/DateConversion.h: - (JSC::): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToGMTString): - * runtime/ErrorPrototype.cpp: - (JSC::errorProtoFuncToString): - * runtime/ExceptionHelpers.cpp: - (JSC::createUndefinedVariableError): - (JSC::createErrorMessage): - (JSC::createInvalidParamError): - * runtime/FunctionPrototype.cpp: - (JSC::insertSemicolonIfNeeded): - (JSC::functionProtoFuncToString): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncToString): - * runtime/RegExpConstructor.cpp: - (JSC::constructRegExp): - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::match): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncCompile): - (JSC::regExpProtoFuncToString): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncBig): - (JSC::stringProtoFuncSmall): - (JSC::stringProtoFuncBlink): - (JSC::stringProtoFuncBold): - (JSC::stringProtoFuncFixed): - (JSC::stringProtoFuncItalics): - (JSC::stringProtoFuncStrike): - (JSC::stringProtoFuncSub): - (JSC::stringProtoFuncSup): - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): - * runtime/UString.h: - (JSC::): - (JSC::makeString): - -2009-12-10 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=32400 - Switch remaining cases of string addition to use ropes. - - Re-landing r51975 - added toPrimitiveString method, - performs toPrimitive then subsequent toString operations. - - ~1% progression on Sunspidey. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSString.h: - (JSC::JSString::JSString): - (JSC::JSString::appendStringInConstruct): - * runtime/Operations.cpp: - (JSC::jsAddSlowCase): - * runtime/Operations.h: - (JSC::jsString): - (JSC::jsAdd): - -2009-12-11 Adam Roben - - Windows build fix - - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added - $(WebKitOutputDir)/include/private to the include path. - -2009-12-11 Adam Roben - - Move QuartzCorePresent.h to include/private - - This fixes other projects that use wtf/Platform.h - - Rubber-stamped by Steve Falkenburg. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Let VS do its thang. - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Write - QuartzCorePresent.h to $(WebKitOutputDir)/include/private. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - Added $(WebKitOutputDir)/include/private to the include path. - -2009-12-11 Adam Roben - - Fix clean builds and everything rebuilding on every build - - Reviewed by Sam Weinig. - - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Don't - write out QuartzCorePresent.h if it exists but is older than - QuartzCore.h. Also, create the directory we write QuartzCorePresent.h - into first. - -2009-12-11 Adam Roben - - Windows build fix for systems with spaces in their paths - - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Quote some paths. - -2009-12-11 Chris Marrin - - Reviewed by Adam Roben. - - Add check for presence of QuartzCore headers - https://bugs.webkit.org/show_bug.cgi?id=31856 - - The script now checks for the presence of QuartzCore.h. If present - it will turn on ACCELERATED_COMPOSITING and 3D_RENDERING to enable - HW compositing on Windows. The script writes QuartzCorePresent.h to - the build directory which has a define telling whether QuartzCore is - present. - - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: - * wtf/Platform.h: - -2009-12-11 Kent Tamura - - Reviewed by Darin Adler. - - Fix a problem that JSC::gregorianDateTimeToMS() returns a negative - value for a huge year value. - https://bugs.webkit.org/show_bug.cgi?id=32304 - - * wtf/DateMath.cpp: - (WTF::dateToDaysFrom1970): Renamed from dateToDayInYear, and changed the return type to double. - (WTF::calculateDSTOffset): Follow the dateToDaysFrom1970() change. - (WTF::timeClip): Use maxECMAScriptTime. - (JSC::gregorianDateTimeToMS): Follow the dateToDaysFrom1970() change. - -2009-12-10 Adam Barth - - No review, rolling out r51975. - http://trac.webkit.org/changeset/51975 - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSString.h: - (JSC::JSString::JSString): - (JSC::JSString::appendStringInConstruct): - * runtime/Operations.cpp: - (JSC::jsAddSlowCase): - * runtime/Operations.h: - (JSC::jsString): - (JSC::jsAdd): - -2009-12-10 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Incorrect caching of prototype lookup with dictionary base - https://bugs.webkit.org/show_bug.cgi?id=32402 - - Make sure we don't add cached prototype lookup to the proto_list - lookup chain if the top level object is a dictionary. - - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - -2009-12-10 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=32400 - Switch remaining cases of string addition to use ropes. - - ~1% progression on Sunspidey. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSString.h: - (JSC::JSString::JSString): - (JSC::JSString::appendStringInConstruct): - * runtime/Operations.cpp: - (JSC::jsAddSlowCase): - * runtime/Operations.h: - (JSC::jsString): - (JSC::jsAdd): - -2009-12-10 Kent Hansen - - Reviewed by Geoffrey Garen. - - Remove JSObject::getPropertyAttributes() and all usage of it. - https://bugs.webkit.org/show_bug.cgi?id=31933 - - getOwnPropertyDescriptor() should be used instead. - - * JavaScriptCore.exp: - * JavaScriptCore.order: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::getOwnPropertyDescriptor): - * debugger/DebuggerActivation.h: - * runtime/JSObject.cpp: - (JSC::JSObject::propertyIsEnumerable): - * runtime/JSObject.h: - * runtime/JSVariableObject.cpp: - * runtime/JSVariableObject.h: - -2009-12-10 Gavin Barraclough - - Reviewed by Oliver Hunt & Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=32367 - Add support for short Ropes (up to 3 entries) inline within JSString. - (rather than externally allocating an object to hold the rope). - Switch jsAdd of (JSString* + JSString*) to now make use of Ropes. - - ~1% progression on Sunspidey. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - (JSC::JSString::toBoolean): - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::JSString::Rope::Fiber::deref): - (JSC::JSString::Rope::Fiber::ref): - (JSC::JSString::Rope::Fiber::refAndGetLength): - (JSC::JSString::Rope::append): - (JSC::JSString::JSString): - (JSC::JSString::~JSString): - (JSC::JSString::value): - (JSC::JSString::tryGetValue): - (JSC::JSString::length): - (JSC::JSString::canGetIndex): - (JSC::JSString::appendStringInConstruct): - (JSC::JSString::appendValueInConstructAndIncrementLength): - (JSC::JSString::isRope): - (JSC::JSString::string): - (JSC::JSString::ropeLength): - (JSC::JSString::getStringPropertySlot): - * runtime/Operations.h: - (JSC::jsString): - (JSC::jsAdd): - (JSC::resolveBase): - -2009-12-09 Anders Carlsson - - Reviewed by Geoffrey Garen. - - Fix three more things found by compiling with clang++. - - * runtime/Structure.h: - (JSC::StructureTransitionTable::reifySingleTransition): - Add the 'std' qualifier to the call to make_pair. - - * wtf/DateMath.cpp: - (WTF::initializeDates): - Incrementing a bool is deprecated according to the C++ specification. - - * wtf/PtrAndFlags.h: - (WTF::PtrAndFlags::PtrAndFlags): - Name lookup should not be done in dependent bases, so explicitly qualify the call to set. - -2009-12-09 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - Google reader gets stuck in the "Loading..." state and does not complete - https://bugs.webkit.org/show_bug.cgi?id=32256 - - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_jless): Fix some backward branches. - -2009-12-09 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=32228 - Make destruction of ropes non-recursive to prevent stack exhaustion. - Also, pass a UString& into initializeFiber rather than a Ustring::Rep*, - since the Rep is not being ref counted this could result in usage of a - Rep with refcount zero (where the Rep comes from a temporary UString - returned from a function). - - * runtime/JSString.cpp: - (JSC::JSString::Rope::destructNonRecursive): - (JSC::JSString::Rope::~Rope): - * runtime/JSString.h: - (JSC::JSString::Rope::initializeFiber): - * runtime/Operations.h: - (JSC::concatenateStrings): - -2009-12-09 Zoltan Herczeg - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=31930 - - Update to r51457. ASSERTs changed to COMPILE_ASSERTs. - The speedup is 25%. - - * runtime/JSGlobalData.cpp: - (JSC::VPtrSet::VPtrSet): - -2009-12-09 Steve Block - - Reviewed by Adam Barth. - - Updates Android Makefiles with latest additions. - https://bugs.webkit.org/show_bug.cgi?id=32278 - - * Android.mk: Modified. - * Android.v8.wtf.mk: Modified. - -2009-12-09 Sam Weinig - - Reviewed by Gavin Barraclough. - - Fix a bug found while trying to compile JavaScriptCore with clang++. - - * yarr/RegexPattern.h: - (JSC::Yarr::PatternTerm::PatternTerm): Don't self assign here. Use false instead. - -2009-12-09 Anders Carlsson - - Reviewed by Sam Weinig. - - Attempt to fix the Windows build. - - * wtf/FastMalloc.h: - -2009-12-09 Anders Carlsson - - Reviewed by Sam Weinig. - - Fix some things found while trying to compile JavaScriptCore with clang++. - - * wtf/FastMalloc.h: - Add correct exception specifications for the allocation/deallocation operators. - - * wtf/Vector.h: - * wtf/VectorTraits.h: - Fix a bunch of struct/class mismatches. - -2009-12-08 Maciej Stachowiak - - Reviewed by Darin Adler. - - move code generation portions of Nodes.cpp to bytecompiler directory - https://bugs.webkit.org/show_bug.cgi?id=32284 - - * bytecompiler/NodesCodegen.cpp: Copied from parser/Nodes.cpp. Removed parts that - are not about codegen. - * parser/Nodes.cpp: Removed everything that is about codegen. - - Update build systems: - - * Android.mk: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - -2009-12-08 Kevin Watters - - Reviewed by Kevin Ollivier. - - [wx] Mac plugins support. - - https://bugs.webkit.org/show_bug.cgi?id=32236 - - * wtf/Platform.h: - -2009-12-08 Dmitry Titov - - Rubber-stamped by David Levin. - - Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread." - It may have caused massive increase of reported leaks on the bots. - https://bugs.webkit.org/show_bug.cgi?id=31639 - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/Structure.cpp: - (JSC::Structure::Structure): - * wtf/RefCounted.h: - (WTF::RefCountedBase::ref): - (WTF::RefCountedBase::hasOneRef): - (WTF::RefCountedBase::refCount): - (WTF::RefCountedBase::derefBase): - * wtf/ThreadVerifier.h: Removed. - -2009-12-08 Gustavo Noronha Silva - - Reviewed by Darin Adler. - - Make WebKit build correctly on FreeBSD, IA64, and Alpha. - Based on work by Petr Salinger , - and Colin Watson . - - * wtf/Platform.h: - -2009-12-08 Dmitry Titov - - Reviewed by Darin Adler. - - Add asserts to RefCounted to make sure ref/deref happens on the right thread. - https://bugs.webkit.org/show_bug.cgi?id=31639 - - * runtime/Structure.cpp: - (JSC::Structure::Structure): Disable thread verification on this class since it uses addressOfCount(). - * wtf/RefCounted.h: - (WTF::RefCountedBase::ref): Add ASSERT. - (WTF::RefCountedBase::hasOneRef): Ditto. - (WTF::RefCountedBase::refCount): Ditto. - (WTF::RefCountedBase::derefBase): Ditto. - (WTF::RefCountedBase::disableThreadVerification): delegate to ThreadVerifier method. - * wtf/ThreadVerifier.h: Added. - (WTF::ThreadVerifier::ThreadVerifier): New Debug-only class to verify that ref/deref of RefCounted is done on the same thread. - (WTF::ThreadVerifier::activate): Activates checks. Called when ref count becomes above 2. - (WTF::ThreadVerifier::deactivate): Deactivates checks. Called when ref count drops below 2. - (WTF::ThreadVerifier::disableThreadVerification): used on objects that should not be checked (StringImpl etc) - (WTF::ThreadVerifier::verifyThread): - * GNUmakefile.am: Add ThreadVerifier.h to the build file. - * JavaScriptCore.gypi: Ditto. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - -2009-12-08 Steve Block - - Reviewed by Adam Barth. - - [Android] Adds Makefiles for Android port. - https://bugs.webkit.org/show_bug.cgi?id=31325 - - * Android.mk: Added. - * Android.v8.wtf.mk: Added. - -2009-12-07 Dmitry Titov - - Rubber-stamped by Darin Adler. - - Remove ENABLE_SHARED_SCRIPT flags - https://bugs.webkit.org/show_bug.cgi?id=32245 - This patch was obtained by "git revert" command and then un-reverting of ChangeLog files. - - * Configurations/FeatureDefines.xcconfig: - * wtf/Platform.h: - -2009-12-07 Gavin Barraclough - - Reviewed by NOBODY (Windows build fixage part I). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-12-05 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=32184 - Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing. - Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on. - - * API/JSCallbackObjectFunctions.h: - (JSC::::toString): - * API/JSValueRef.cpp: - (JSValueIsStrictEqual): - * JavaScriptCore.exp: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitEqualityOp): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::functionName): - (JSC::DebuggerCallFrame::calculatedFunctionName): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::addParentForConsoleStart): - * profiler/Profiler.cpp: - (JSC::Profiler::willExecute): - (JSC::Profiler::didExecute): - (JSC::Profiler::createCallIdentifier): - (JSC::createCallIdentifierFromFunctionImp): - * profiler/Profiler.h: - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/DateConstructor.cpp: - (JSC::constructDate): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::name): - (JSC::InternalFunction::displayName): - (JSC::InternalFunction::calculatedDisplayName): - * runtime/InternalFunction.h: - * runtime/JSCell.cpp: - (JSC::JSCell::getString): - * runtime/JSCell.h: - (JSC::JSValue::getString): - * runtime/JSONObject.cpp: - (JSC::gap): - (JSC::Stringifier::Stringifier): - (JSC::Stringifier::appendStringifiedValue): - * runtime/JSObject.cpp: - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::JSObject::defineOwnProperty): - * runtime/JSObject.h: - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::get): - * runtime/JSString.cpp: - (JSC::JSString::Rope::~Rope): - (JSC::JSString::resolveRope): - (JSC::JSString::getPrimitiveNumber): - (JSC::JSString::toNumber): - (JSC::JSString::toString): - (JSC::JSString::toThisString): - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::JSString::Rope::createOrNull): - (JSC::JSString::Rope::operator new): - (JSC::JSString::value): - (JSC::JSString::tryGetValue): - (JSC::JSString::getIndex): - (JSC::JSString::getStringPropertySlot): - (JSC::JSValue::toString): - * runtime/JSValue.h: - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/Operations.cpp: - (JSC::JSValue::strictEqualSlowCase): - * runtime/Operations.h: - (JSC::JSValue::equalSlowCaseInline): - (JSC::JSValue::strictEqualSlowCaseInline): - (JSC::JSValue::strictEqual): - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::jsAdd): - (JSC::concatenateStrings): - * runtime/PropertyDescriptor.cpp: - (JSC::PropertyDescriptor::equalTo): - * runtime/PropertyDescriptor.h: - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - -2009-12-07 Nikolas Zimmermann - - Reviewed by Holger Freyther. - - Turn on (SVG) Filters support, by default. - https://bugs.webkit.org/show_bug.cgi?id=32224 - - * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag. - -2009-12-07 Steve Falkenburg - - Build fix. Be flexible about which version of ICU is used on Windows. - - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Add optional xcopy commands to copy ICU 4.2. - -2009-12-07 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - op_loop_if_less JIT codegen is broken for 64-bit - https://bugs.webkit.org/show_bug.cgi?id=32221 - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_false): Fix codegen in this version - test was backwards. - -2009-12-07 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Object.create fails if properties on the descriptor are getters - https://bugs.webkit.org/show_bug.cgi?id=32219 - - Correctly initialise the PropertySlots with the descriptor object. - - * runtime/ObjectConstructor.cpp: - (JSC::toPropertyDescriptor): - -2009-12-06 Maciej Stachowiak - - Not reviewed, build fix. - - Actually tested 64-bit *and* 32-bit build this time. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_false): - -2009-12-06 Maciej Stachowiak - - Not reviewed, build fix. - - Really really fix 64-bit build for prior patch (actually tested this time). - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_false): - (JSC::JIT::emitSlow_op_loop_if_false): - -2009-12-06 Maciej Stachowiak - - Not reviewed, build fix. - - Really fix 64-bit build for prior patch. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_jless): - -2009-12-06 Maciej Stachowiak - - Not reviewed, build fix. - - Fix 64-bit build for prior patch. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_loop_if_less): - -2009-12-05 Maciej Stachowiak - - Reviewed by Oliver Hunt. - - conway benchmark spends half it's time in op_less (jump fusion fails) - https://bugs.webkit.org/show_bug.cgi?id=32190 - - <1% speedup on SunSpider and V8 - 2x speedup on "conway" benchmark - - Two optimizations: - 1) Improve codegen for logical operators &&, || and ! in a condition context - - When generating code for combinations of &&, || and !, in a - condition context (i.e. in an if statement or loop condition), we - used to produce a value, and then separately jump based on its - truthiness. Now we pass the false and true targets in, and let the - logical operators generate jumps directly. This helps in four - ways: - - a) Individual clauses of a short-circuit logical operator can now - jump directly to the then or else clause of an if statement (or to - the top or exit of a loop) instead of jumping to a jump. - - b) It used to be that jump fusion with the condition of the first - clause of a logical operator was inhibited, because the register - was ref'd to be used later, in the actual condition jump; this no - longer happens since a jump straight to the final target is - generated directly. - - c) It used to be that jump fusion with the condition of the second - clause of a logical operator was inhibited, because there was a - jump target right after the second clause and before the actual - condition jump. But now it's no longer necessary for the first - clause to jump there so jump fusion is not blocked. - - d) We avoid generating excess mov statements in some cases. - - As a concrete example this source: - - if (!((x < q && y < q) || (t < q && z < q))) { - // ... - } - - Used to generate this bytecode: - - [ 34] less r1, r-15, r-19 - [ 38] jfalse r1, 7(->45) - [ 41] less r1, r-16, r-19 - [ 45] jtrue r1, 14(->59) - [ 48] less r1, r-17, r-19 - [ 52] jfalse r1, 7(->59) - [ 55] less r1, r-18, r-19 - [ 59] jtrue r1, 17(->76) - - And now generates this bytecode (also taking advantage of the second optimization below): - - [ 34] jnless r-15, r-19, 8(->42) - [ 38] jless r-16, r-19, 26(->64) - [ 42] jnless r-17, r-19, 8(->50) - [ 46] jless r-18, r-19, 18(->64) - - Note the jump fusion and the fact that there's less jump - indirection - three of the four jumps go straight to the target - clause instead of indirecting through another jump. - - 2) Implement jless opcode to take advantage of the above, since we'll now often generate - a less followed by a jtrue where fusion is not forbidden. - - * parser/Nodes.h: - (JSC::ExpressionNode::hasConditionContextCodegen): Helper function to determine - whether a node supports special conditional codegen. Return false as this is the default. - (JSC::ExpressionNode::emitBytecodeInConditionContext): Assert not reached - only really - defined for nodes that do have conditional codegen. - (JSC::UnaryOpNode::expr): Add const version. - (JSC::LogicalNotNode::hasConditionContextCodegen): Returne true only if subexpression - supports it. - (JSC::LogicalOpNode::hasConditionContextCodegen): Return true. - * parser/Nodes.cpp: - (JSC::LogicalNotNode::emitBytecodeInConditionContext): Implemented - just swap - the true and false targets for the child node. - (JSC::LogicalOpNode::emitBytecodeInConditionContext): Implemented - handle jumps - directly, improving codegen quality. Also handles further nested conditional codegen. - (JSC::ConditionalNode::emitBytecode): Use condition context codegen when available. - (JSC::IfNode::emitBytecode): ditto - (JSC::IfElseNode::emitBytecode): ditto - (JSC::DoWhileNode::emitBytecode): ditto - (JSC::WhileNode::emitBytecode): ditto - (JSC::ForNode::emitBytecode): ditto - - * bytecode/Opcode.h: - - Added loop_if_false opcode - needed now that falsey jumps can be backwards. - - Added jless opcode to take advantage of new fusion opportunities. - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): Handle above. - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitJumpIfTrue): Add peephole for less + jtrue ==> jless. - (JSC::BytecodeGenerator::emitJumpIfFalse): Add handling of backwrds falsey jumps. - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitNodeInConditionContext): Wrapper to handle tracking of - overly deep expressions etc. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): Implement the two new opcodes (loop_if_false, jless). - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): Implement JIT support for the two new opcodes. - (JSC::JIT::privateCompileSlowCases): ditto - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jless): - (JSC::JIT::emitSlow_op_jless): ditto - (JSC::JIT::emitBinaryDoubleOp): ditto - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_loop_if_less): ditto - (JSC::JIT::emit_op_loop_if_false): ditto - (JSC::JIT::emitSlow_op_loop_if_false): ditto - * jit/JITStubs.cpp: - * jit/JITStubs.h: - (JSC::): - -2009-12-04 Kent Hansen - - Reviewed by Darin Adler. - - JavaScript delete operator should return false for string properties - https://bugs.webkit.org/show_bug.cgi?id=32012 - - * runtime/StringObject.cpp: - (JSC::StringObject::deleteProperty): - -2009-12-03 Drew Wilson - - Rolled back r51633 because it causes a perf regression in Chromium. - - * wtf/Platform.h: - -2009-12-03 Gavin Barraclough - - Try and fix the Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a symbol that should be exported. - -2009-12-03 Mark Rowe - - Try and fix the Mac build. - - * JavaScriptCore.exp: Export a symbol that should be exported. - -2009-12-03 Oliver Hunt - - Reviewed by Gavin Barraclough. - - REGRESSION(4.0.3-48777): Crash in JSC::ExecState::propertyNames() (Debug-only?) - https://bugs.webkit.org/show_bug.cgi?id=32133 - - Work around odd GCC-ism and correct the scopechain for use by - calls made while a cachedcall is active on the callstack. - - * interpreter/CachedCall.h: - (JSC::CachedCall::newCallFrame): - * runtime/JSArray.cpp: - (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - -2009-12-03 Gavin Barraclough - - Reviewed by Oliver "Brraaaaiiiinnnnnzzzzzzzz" Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=32136 - Add a rope representation to JSString. Presently JSString always holds its data in UString form. - Instead, allow the result of a string concatenation to be represented in a tree form - with a - variable sized, reference-counted rope node retaining a set of UString::Reps (or other rope nopes). - - Strings must still currently be resolved down to a flat UString representation before being used, - but by holding the string in a rope representation during construction we can avoid copying data - until we know the final size of the string. - - ~2% progression on SunSpider (~25% on date-format-xparb, ~20% on string-validate-input). - - * JavaScriptCore.exp: - - - Update exports. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - - - Make use of new JSString::length() method to avoid prematurely resolving ropes. - - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - - - Switch the string length trampoline to read the length directly from JSString::m_length, - rather than from the JSString's UString::Rep's 'len' property. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - - - Modify op_add such that addition of two strings, where either or both strings are already - in rope representation, produces a rope as a result. - - * runtime/JSString.cpp: - (JSC::JSString::Rope::~Rope): - (JSC::copyChars): - (JSC::JSString::resolveRope): - (JSC::JSString::getPrimitiveNumber): - (JSC::JSString::toBoolean): - (JSC::JSString::toNumber): - (JSC::JSString::toString): - (JSC::JSString::toThisString): - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::JSString::Rope::Fiber::Fiber): - (JSC::JSString::Rope::Fiber::destroy): - (JSC::JSString::Rope::Fiber::isRope): - (JSC::JSString::Rope::Fiber::rope): - (JSC::JSString::Rope::Fiber::string): - (JSC::JSString::Rope::create): - (JSC::JSString::Rope::initializeFiber): - (JSC::JSString::Rope::ropeLength): - (JSC::JSString::Rope::stringLength): - (JSC::JSString::Rope::fibers): - (JSC::JSString::Rope::Rope): - (JSC::JSString::Rope::operator new): - (JSC::JSString::JSString): - (JSC::JSString::value): - (JSC::JSString::length): - (JSC::JSString::isRope): - (JSC::JSString::rope): - (JSC::JSString::string): - (JSC::JSString::canGetIndex): - (JSC::jsSingleCharacterSubstring): - (JSC::JSString::getIndex): - (JSC::jsSubstring): - (JSC::JSString::getStringPropertySlot): - - - Add rope form. - - * runtime/Operations.h: - (JSC::jsAdd): - (JSC::concatenateStrings): - - - Update string concatenation, and addition of ropes, to produce ropes. - - * runtime/StringObject.cpp: - (JSC::StringObject::getOwnPropertyNames): - - - Make use of new JSString::length() method to avoid prematurely resolving ropes. - -2009-11-23 Jeremy Moskovich - - Reviewed by Eric Seidel. - - Switch Chrome/Mac to use Core Text APIs rather than ATSUI APIs. - https://bugs.webkit.org/show_bug.cgi?id=31802 - - No test since this is already covered by existing pixel tests. - - * wtf/Platform.h: #define USE_CORE_TEXT for Chrome/Mac. - -2009-12-02 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Add files missed in prior patch. - - * runtime/JSZombie.cpp: - (JSC::): - (JSC::JSZombie::leakedZombieStructure): - * runtime/JSZombie.h: Added. - (JSC::JSZombie::JSZombie): - (JSC::JSZombie::isZombie): - (JSC::JSZombie::classInfo): - (JSC::JSZombie::isGetterSetter): - (JSC::JSZombie::isAPIValueWrapper): - (JSC::JSZombie::isPropertyNameIterator): - (JSC::JSZombie::getCallData): - (JSC::JSZombie::getConstructData): - (JSC::JSZombie::getUInt32): - (JSC::JSZombie::toPrimitive): - (JSC::JSZombie::getPrimitiveNumber): - (JSC::JSZombie::toBoolean): - (JSC::JSZombie::toNumber): - (JSC::JSZombie::toString): - (JSC::JSZombie::toObject): - (JSC::JSZombie::markChildren): - (JSC::JSZombie::put): - (JSC::JSZombie::deleteProperty): - (JSC::JSZombie::toThisObject): - (JSC::JSZombie::toThisString): - (JSC::JSZombie::toThisJSString): - (JSC::JSZombie::getJSNumber): - (JSC::JSZombie::getOwnPropertySlot): - -2009-12-02 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Add zombies to JSC - https://bugs.webkit.org/show_bug.cgi?id=32103 - - Add a compile time flag to make the JSC collector replace "unreachable" - objects with zombie objects. The zombie object is a JSCell subclass that - ASSERTs on any attempt to use the JSCell methods. In addition there are - a number of additional assertions in bottleneck code to catch zombie usage - as quickly as possible. - - Grrr. Argh. Brains. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/Register.h: - (JSC::Register::Register): - * runtime/ArgList.h: - (JSC::MarkedArgumentBuffer::append): - (JSC::ArgList::ArgList): - * runtime/Collector.cpp: - (JSC::Heap::destroy): - (JSC::Heap::sweep): - * runtime/Collector.h: - * runtime/JSCell.h: - (JSC::JSCell::isZombie): - (JSC::JSValue::isZombie): - * runtime/JSValue.h: - (JSC::JSValue::decode): - (JSC::JSValue::JSValue): - * wtf/Platform.h: - -2009-12-01 Jens Alfke - - Reviewed by Darin Adler. - - Added variants of find/contains/add that allow a foreign key type to be used. - This will allow AtomicString-keyed maps to be queried by C string without - having to create a temporary AtomicString (see HTTPHeaderMap.) - The code for this is adapted from the equivalent in HashSet.h. - - * wtf/HashMap.h: - (WTF::HashMap::find): - (WTF::HashMap::contains): - (WTF::HashMap::add): - * wtf/HashSet.h: Changed "method" to "function member" in a comment. - -2009-12-01 Gustavo Noronha Silva - - Revert 51551 because it broke GTK+. - - * wtf/Platform.h: - -2009-11-30 Gavin Barraclough - - Windows Build fix. Reviewed by NOBODY. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-11-24 Gavin Barraclough - - Reviewed by Geoff Garen. - - Bug 31859 - Make world selection for JSC IsolatedWorlds automagical. - - WebCore presently has to explicitly specify the world before entering into JSC, - which is a little fragile (particularly since property access via a - getter/setter might invoke execution). Instead derive the current world from - the lexical global object. - - Remove the temporary duct tape of willExecute/didExecute virtual hooks on the JSGlobalData::ClientData - these are no longer necessary. - - * API/JSBase.cpp: - (JSEvaluateScript): - * API/JSObjectRef.cpp: - (JSObjectCallAsFunction): - * JavaScriptCore.exp: - * runtime/JSGlobalData.cpp: - * runtime/JSGlobalData.h: - -2009-11-30 Laszlo Gombos - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Remove obsolete PLATFORM(KDE) code - https://bugs.webkit.org/show_bug.cgi?id=31958 - - KDE is now using unpatched QtWebKit. - - * parser/Lexer.cpp: Remove obsolete KDE_USE_FINAL guard - * wtf/Platform.h: Remove PLATFORM(KDE) definition and code - section that is guarded with it. - -2009-11-30 Jan-Arve Sæther - - Reviewed by Simon Hausmann. - - [Qt] Fix compilation with win32-icc - - The Intel compiler does not support the __has_trivial_constructor type - trait. The Intel Compiler can report itself as _MSC_VER >= 1400. The - reason for that is that the Intel Compiler depends on the Microsoft - Platform SDK, and in order to try to be "fully" MS compatible it will - "pretend" to be the same MS compiler as was shipped with the MS PSDK. - (Thus, compiling with win32-icc with VC8 SDK will make the source code - "think" the compiler at hand supports this type trait). - - * wtf/TypeTraits.h: - -2009-11-29 Laszlo Gombos - - Reviewed by Eric Seidel. - - [Qt] Mac build has JIT disabled - https://bugs.webkit.org/show_bug.cgi?id=31828 - - * wtf/Platform.h: Enable JIT for Qt Mac builds - -2009-11-28 Laszlo Gombos - - Reviewed by Eric Seidel. - - Apply workaround for the limitation of VirtualFree with MEM_RELEASE to all ports running on Windows - https://bugs.webkit.org/show_bug.cgi?id=31943 - - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - -2009-11-28 Zoltan Herczeg - - Reviewed by Gavin Barraclough. - - https://bugs.webkit.org/show_bug.cgi?id=31930 - - Seems a typo. We don't need ~270k memory to determine the vptrs. - - * runtime/JSGlobalData.cpp: - (JSC::VPtrSet::VPtrSet): - -2009-11-27 Shinichiro Hamaji - - Unreviewed. - - Move GOwnPtr* from wtf to wtf/gtk - https://bugs.webkit.org/show_bug.cgi?id=31793 - - Build fix for chromium after r51423. - Exclude gtk directory from chromium build. - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - -2009-11-25 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Incorrect behaviour of jneq_null in the interpreter - https://bugs.webkit.org/show_bug.cgi?id=31901 - - Correct the logic of jneq_null. This is already covered by existing tests. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2009-11-26 Laszlo Gombos - - Reviewed by Oliver Hunt. - - Move GOwnPtr* from wtf to wtf/gtk - https://bugs.webkit.org/show_bug.cgi?id=31793 - - * GNUmakefile.am: Change the path for GOwnPtr.*. - * JavaScriptCore.gyp/JavaScriptCore.gyp: Remove - GOwnPtr.cpp from the exclude list. - * JavaScriptCore.gypi: Change the path for GOwnPtr.*. - * wscript: Remove GOwnPtr.cpp from the exclude list. - * wtf/GOwnPtr.cpp: Removed. - * wtf/GOwnPtr.h: Removed. - * wtf/Threading.h: Change the path for GOwnPtr.h. - * wtf/gtk/GOwnPtr.cpp: Copied from JavaScriptCore/wtf/GOwnPtr.cpp. - * wtf/gtk/GOwnPtr.h: Copied from JavaScriptCore/wtf/GOwnPtr.h. - * wtf/unicode/glib/UnicodeGLib.h: Change the path for GOwnPtr.h. - -2009-11-24 Dmitry Titov - - Reviewed by Eric Seidel. - - Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit - https://bugs.webkit.org/show_bug.cgi?id=31444 - - * Configurations/FeatureDefines.xcconfig: - * wtf/Platform.h: - -2009-11-24 Chris Marrin - - Reviewed by Simon Fraser. - - Add ability to enable ACCELERATED_COMPOSITING on Windows (currently disabled) - https://bugs.webkit.org/show_bug.cgi?id=27314 - - * wtf/Platform.h: - -2009-11-24 Jason Smith - - Reviewed by Alexey Proskuryakov. - - RegExp#exec's returned Array-like object behaves differently from - regular Arrays - https://bugs.webkit.org/show_bug.cgi?id=31689 - - * JavaScriptCore/runtime/RegExpConstructor.cpp: ensure that undefined - values are added to the returned RegExpMatchesArray - -2009-11-24 Oliver Hunt - - Reviewed by Alexey Proskuryakov. - - JSON.stringify performance on undefined is very poor - https://bugs.webkit.org/show_bug.cgi?id=31839 - - Switch from a UString to a Vector when building - the JSON string, allowing us to safely remove the substr-copy - we otherwise did when unwinding an undefined property. - - Also turns out to be a ~5% speedup on stringification. - - * runtime/JSONObject.cpp: - (JSC::Stringifier::StringBuilder::append): - (JSC::Stringifier::stringify): - (JSC::Stringifier::Holder::appendNextProperty): - -2009-11-24 Mark Rowe - - Fix production builds where the source tree may be read-only. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-11-23 Laszlo Gombos - - Reviewed by Kenneth Rohde Christiansen. - - Include "config.h" to meet Coding Style Guidelines - https://bugs.webkit.org/show_bug.cgi?id=31792 - - * wtf/unicode/UTF8.cpp: - * wtf/unicode/glib/UnicodeGLib.cpp: - * wtf/unicode/wince/UnicodeWince.cpp: - -2009-11-23 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Streamlined some Math functions where we expect or know the result not - to be representable as an int. - - SunSpider says 0.6% faster. - - * runtime/JSNumberCell.h: - (JSC::JSValue::JSValue): - * runtime/JSValue.h: - (JSC::JSValue::): - (JSC::jsDoubleNumber): - (JSC::JSValue::JSValue): Added a function for making a numeric JSValue - and skipping the "can I encode this as an int?" check, avoiding the - overhead of int <-> double roundtripping and double <-> double comparison - and branching. - - * runtime/MathObject.cpp: - (JSC::mathProtoFuncACos): - (JSC::mathProtoFuncASin): - (JSC::mathProtoFuncATan): - (JSC::mathProtoFuncATan2): - (JSC::mathProtoFuncCos): - (JSC::mathProtoFuncExp): - (JSC::mathProtoFuncLog): - (JSC::mathProtoFuncRandom): - (JSC::mathProtoFuncSin): - (JSC::mathProtoFuncSqrt): - (JSC::mathProtoFuncTan): For these functions, which we expect or know - to produce results not representable as ints, call jsDoubleNumber instead - of jsNumber. - -2009-11-23 Mark Rowe - - Unreviewed. Unbreak the regression tests after r51329. - - * API/JSBase.cpp: - (JSEvaluateScript): Null-check clientData before dereferencing it. - * API/JSObjectRef.cpp: - (JSObjectCallAsFunction): Ditto. - -2009-11-23 Gavin Barraclough - - Reviewed by Geoff Garen. - - Part 1/3 of REGRESSION: Many web pages fail to render after interesting script runs in isolated world - - Some clients of the JavaScriptCore API expect to be able to make callbacks over the JSC API, - and for this to automagically cause execution to take place in the world associated with the - global object associated with the ExecState (JSContextRef) passed. However this is not how - things work - the world must be explicitly set within WebCore. - - Making this work just for API calls to evaluate & call will be a far from perfect solution, - since direct (non-API) use of JSC still relies on WebCore setting the current world correctly. - A better solution would be to make this all work automagically all throughout WebCore, but this - will require more refactoring. - - Since the API is in JSC but worlds only exist in WebCore, add callbacks on the JSGlobalData::ClientData - to allow it to update the current world on entry/exit via the JSC API. This is temporary duck - tape, and should be removed once the current world no longer needs to be explicitly tracked. - - * API/JSBase.cpp: - (JSEvaluateScript): - * API/JSObjectRef.cpp: - (JSObjectCallAsFunction): - * JavaScriptCore.exp: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::ClientData::beginningExecution): - (JSC::JSGlobalData::ClientData::completedExecution): - * runtime/JSGlobalData.h: - -2009-11-23 Steve Block - - Reviewed by Dmitry Titov. - - Adds MainThreadAndroid.cpp with Android-specific WTF threading functions. - https://bugs.webkit.org/show_bug.cgi?id=31807 - - * wtf/android: Added. - * wtf/android/MainThreadAndroid.cpp: Added. - (WTF::timeoutFired): - (WTF::initializeMainThreadPlatform): - (WTF::scheduleDispatchFunctionsOnMainThread): - -2009-11-23 Alexey Proskuryakov - - Reviewed by Brady Eidson. - - https://bugs.webkit.org/show_bug.cgi?id=31748 - Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport - - * JavaScriptCore.exp: Export callOnMainThreadAndWait. - -2009-11-23 Laszlo Gombos - - Reviewed by Kenneth Rohde Christiansen. - - [Symbian] Fix lastIndexOf() for Symbian - https://bugs.webkit.org/show_bug.cgi?id=31773 - - Symbian soft floating point library has problems with operators - comparing NaN to numbers. Without a workaround lastIndexOf() - function does not work. - - Patch developed by David Leong. - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncLastIndexOf):Add an extra test - to check for NaN for Symbian. - -2009-11-23 Steve Block - - Reviewed by Eric Seidel. - - Android port lacks implementation of atomicIncrement and atomicDecrement. - https://bugs.webkit.org/show_bug.cgi?id=31715 - - * wtf/Threading.h: Modified. - (WTF::atomicIncrement): Added Android implementation. - (WTF::atomicDecrement): Added Android implementation. - -2009-11-22 Laszlo Gombos - - Unreviewed. - - [Qt] Sort source lists and remove obsolete comments - from the build system. - - * JavaScriptCore.pri: - -2009-11-21 Laszlo Gombos - - Reviewed by Eric Seidel. - - [Qt][Mac] Turn on multiple JavaScript threads for QtWebkit on Mac - https://bugs.webkit.org/show_bug.cgi?id=31753 - - * wtf/Platform.h: - -2009-11-19 Steve Block - - Android port lacks configuration in Platform.h and config.h. - https://bugs.webkit.org/show_bug.cgi?id=31671 - - * wtf/Platform.h: Modified. Added Android-specific configuration. - -2009-11-19 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=31690 - Make SocketStreamHandleCFNet work on Windows - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/MainThread.cpp: - (WTF::FunctionWithContext::FunctionWithContext): - (WTF::dispatchFunctionsFromMainThread): - (WTF::callOnMainThreadAndWait): - * wtf/MainThread.h: - Re-add callOnMainThreadAndWait(), which was removed in bug 23926. - -2009-11-19 Dmitry Titov - - Reviewed by David Levin. - - isMainThread() on Chromium (Mac and Linux) is so slow it timeouts LayoutTests.. - https://bugs.webkit.org/show_bug.cgi?id=31693 - - * wtf/ThreadingPthreads.cpp: - (WTF::initializeThreading): grab and use the pthread_t of the main thread instead of ThreadIdentifier. - (WTF::isMainThread): Ditto. - -2009-11-19 Laszlo Gombos - - Reviewed by Darin Adler. - - Remove HAVE(STRING_H) guard from JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=31668 - - * config.h: - * runtime/UString.cpp: - -2009-11-19 Dumitru Daniliuc - - Reviewed by Dmitry Titov. - - Fixing a bug in MessageQueue::removeIf() that leads to an - assertion failure. - - https://bugs.webkit.org/show_bug.cgi?id=31657 - - * wtf/MessageQueue.h: - (WTF::MessageQueue::removeIf): - -2009-11-19 Laszlo Gombos - - Reviewed by Darin Adler. - - Remove HAVE(FLOAT_H) guard - https://bugs.webkit.org/show_bug.cgi?id=31661 - - JavaScriptCore has a dependency on float.h, there is - no need to guard float.h. - - * runtime/DatePrototype.cpp: Remove include directive - for float.h as it is included in MathExtras.h already. - * runtime/Operations.cpp: Ditto. - * runtime/UString.cpp: Ditto. - * wtf/dtoa.cpp: Ditto. - * wtf/MathExtras.h: Remove HAVE(FLOAT_H) guard. - * wtf/Platform.h: Ditto. - -2009-11-19 Thiago Macieira - - Reviewed by Simon Hausmann. - - Build fix for 32-bit Sparc machines: these machines are big-endian. - - * wtf/Platform.h: - -2009-11-18 Laszlo Gombos - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Remove support for Qt v4.3 or older versions - https://bugs.webkit.org/show_bug.cgi?id=29469 - - * JavaScriptCore.pro: - * jsc.pro: - * wtf/unicode/qt4/UnicodeQt4.h: - -2009-11-18 Kent Tamura - - Reviewed by Darin Adler. - - Move UString::from(double) implementation to new - WTF::doubleToStringInJavaScriptFormat(), and expose it because WebCore - code will use it. - https://bugs.webkit.org/show_bug.cgi?id=31330 - - - Introduce new function createRep(const char*, unsigned) and - UString::UString(const char*, unsigned) to reduce 2 calls to strlen(). - - Fix a bug that dtoa() doesn't update *rve if the input value is NaN - or Infinity. - - No new tests because this doesn't change the behavior. - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * runtime/UString.cpp: - (JSC::createRep): - (JSC::UString::UString): - (JSC::UString::from): Move the code to doubleToStringInJavaScriptFormat(). - * runtime/UString.h: - * wtf/dtoa.cpp: - (WTF::dtoa): Fix a bug about rve. - (WTF::append): A helper for doubleToStringInJavaScriptFormat(). - (WTF::doubleToStringInJavaScriptFormat): Move the code from UString::from(double). - * wtf/dtoa.h: - -2009-11-18 Laszlo Gombos - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used - https://bugs.webkit.org/show_bug.cgi?id=31643 - - * JavaScriptCore.pro: - -2009-11-18 Nate Chapin - - Reviewed by Darin Fisher. - - Remove Chromium's unnecessary dependency on wtf's tcmalloc files. - - https://bugs.webkit.org/show_bug.cgi?id=31648 - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - -2009-11-18 Thiago Macieira - - Reviewed by Gavin Barraclough. - - [Qt] Implement symbol hiding for JSC's JIT functions. - - These functions are implemented directly in assembly, so they need the - proper directives to enable/disable visibility. On ELF systems, it's - .hidden, whereas on Mach-O systems (Mac) it's .private_extern. On - Windows, it's not necessary since you have to explicitly export. I - also implemented the AIX idiom, though it's unlikely anyone will - implement AIX/POWER JIT. - https://bugs.webkit.org/show_bug.cgi?id=30864 - - * jit/JITStubs.cpp: - -2009-11-18 Oliver Hunt - - Reviewed by Alexey Proskuryakov. - - Interpreter may do an out of range access when throwing an exception in the profiler. - https://bugs.webkit.org/show_bug.cgi?id=31635 - - Add bounds check. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): - -2009-11-18 Gabor Loki - - Reviewed by Darin Adler. - - Fix the clobber list of cacheFlush for ARM and Thumb2 on Linux - https://bugs.webkit.org/show_bug.cgi?id=31631 - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - -2009-11-18 Harald Fernengel - - Reviewed by Simon Hausmann. - - [Qt] Fix detection of linux-g++ - - Never use "linux-g++*" to check for linux-g++, since this will break embedded - builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any - g++ on linux mkspec. - - * JavaScriptCore.pri: - -2009-11-17 Jon Honeycutt - - Add JSContextRefPrivate.h to list of copied files. - - Reviewed by Mark Rowe. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - -2009-11-17 Martin Robinson - - Reviewed by Adam Barth. - - [GTK] Style cleanup for GOwnPtr - https://bugs.webkit.org/show_bug.cgi?id=31506 - - Remove forward declaration in GOwnPtr and do some style cleanup. - - * wtf/GOwnPtr.cpp: - * wtf/GOwnPtr.h: - (WTF::GOwnPtr::GOwnPtr): - (WTF::GOwnPtr::~GOwnPtr): - (WTF::GOwnPtr::get): - (WTF::GOwnPtr::release): - (WTF::GOwnPtr::outPtr): - (WTF::GOwnPtr::set): - (WTF::GOwnPtr::clear): - (WTF::GOwnPtr::operator*): - (WTF::GOwnPtr::operator->): - (WTF::GOwnPtr::operator!): - (WTF::GOwnPtr::operator UnspecifiedBoolType): - (WTF::GOwnPtr::swap): - (WTF::swap): - (WTF::operator==): - (WTF::operator!=): - (WTF::getPtr): - (WTF::freeOwnedGPtr): - -2009-11-17 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Incorrect use of JavaScriptCore API in DumpRenderTree - https://bugs.webkit.org/show_bug.cgi?id=31577 - - Add assertions to the 'toJS' functions to catch mistakes like - this early. Restructure existing code which blindly passed potentially - null values to toJS when forwarding exceptions so that a null check is - performed first. - - * API/APICast.h: - (toJS): - (toJSForGC): - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertySlot): - (JSC::::put): - (JSC::::deleteProperty): - (JSC::::construct): - (JSC::::hasInstance): - (JSC::::call): - (JSC::::toNumber): - (JSC::::toString): - (JSC::::staticValueGetter): - (JSC::::callbackGetter): - * API/tests/testapi.c: Fix errors in the API tester. - (MyObject_getProperty): - (MyObject_convertToType): - (EvilExceptionObject_convertToType): - -2009-11-16 Zoltan Herczeg - - Reviewed by Gavin Barraclough. - - https://bugs.webkit.org/show_bug.cgi?id=31050 - - Minor fixes for JSVALUE32_64: branchConvertDoubleToInt32 - failed on a CortexA8 CPU, but not on a simulator; and - JITCall.cpp modifications was somehow not committed to mainline. - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::fmrs_r): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - -2009-11-16 Joerg Bornemann - - Reviewed by Simon Hausmann. - - Fix Qt build on Windows CE 6. - - * JavaScriptCore.pri: Add missing include path. - * wtf/Platform.h: Include ce_time.h for Windows CE 6. - -2009-11-13 Zoltan Herczeg - - Reviewed by Gavin Barraclough. - - https://bugs.webkit.org/show_bug.cgi?id=31050 - - Adding optimization support for mode JSVALUE32_64 - on ARM systems. - - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::emit_op_put_by_id): - -2009-11-14 Zoltan Herczeg - - Reviewed by Gavin Barraclough. - - https://bugs.webkit.org/show_bug.cgi?id=31050 - - Adding JSVALUE32_64 support for ARM (but not turning it - on by default). All optimizations must be disabled, since - this patch is only the first of a series of patches. - - During the work, a lot of x86 specific code revealed and - made platform independent. - See revisions: 50531 50541 50593 50594 50595 - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::): - (JSC::ARMAssembler::fdivd_r): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::lshift32): - (JSC::MacroAssemblerARM::neg32): - (JSC::MacroAssemblerARM::rshift32): - (JSC::MacroAssemblerARM::branchOr32): - (JSC::MacroAssemblerARM::set8): - (JSC::MacroAssemblerARM::setTest8): - (JSC::MacroAssemblerARM::loadDouble): - (JSC::MacroAssemblerARM::divDouble): - (JSC::MacroAssemblerARM::convertInt32ToDouble): - (JSC::MacroAssemblerARM::zeroDouble): - * jit/JIT.cpp: - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITStubs.cpp: - * wtf/StdLibExtras.h: - -2009-11-13 Dominik Röttsches - - Reviewed by Eric Seidel. - - Unify TextBoundaries implementations by only relying on WTF Unicode abstractions - https://bugs.webkit.org/show_bug.cgi?id=31468 - - Adding isAlphanumeric abstraction, required - by TextBoundaries.cpp. - - * wtf/unicode/glib/UnicodeGLib.h: - (WTF::Unicode::isAlphanumeric): - * wtf/unicode/icu/UnicodeIcu.h: - (WTF::Unicode::isAlphanumeric): - -2009-11-13 Norbert Leser - - Reviewed by Eric Seidel. - - Added macros for USERINCLUDE paths within symbian blocks - to guarantee inclusion of respective header files from local path - first (to avoid clashes with same names of header files in system include path). - - * JavaScriptCore.pri: - -2009-11-13 Oliver Hunt - - Reviewed by Geoff Garen. - - JSValueProtect and JSValueUnprotect don't protect API wrapper values - https://bugs.webkit.org/show_bug.cgi?id=31485 - - Make JSValueProtect/Unprotect use a new 'toJS' function, 'toJSForGC' that - does not attempt to to strip out API wrapper objects. - - * API/APICast.h: - (toJSForGC): - * API/JSValueRef.cpp: - (JSValueProtect): - (JSValueUnprotect): - * API/tests/testapi.c: - (makeGlobalNumberValue): - (main): - -2009-11-13 İsmail Dönmez - - Reviewed by Antti Koivisto. - - Fix typo, ce_time.cpp should be ce_time.c - - * JavaScriptCore.pri: - -2009-11-12 Steve VanDeBogart - - Reviewed by Adam Barth. - - Calculate the time offset only if we were able to parse - the date string. This saves an IPC in Chromium for - invalid date strings. - https://bugs.webkit.org/show_bug.cgi?id=31416 - - * wtf/DateMath.cpp: - (WTF::parseDateFromNullTerminatedCharacters): - (JSC::parseDateFromNullTerminatedCharacters): - -2009-11-12 Oliver Hunt - - Rollout r50896 until i can work out why it causes failures. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitReturn): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - * parser/Nodes.cpp: - (JSC::EvalNode::emitBytecode): - -2009-11-12 Steve Falkenburg - - Reviewed by Stephanie Lewis. - - Remove LIBRARY directive from def file to fix Debug_All target. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-11-12 Gustavo Noronha Silva - - Rubber-stamped by Holger Freyther. - - Revert r50204, since it makes DRT crash on 32 bits release builds - for GTK+. - - * wtf/FastMalloc.h: - -2009-11-12 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Start unifying entry logic for function and eval code. - - Eval now uses a ret instruction to end execution, and sets up - a callframe more in line with what we do for function entry. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitReturn): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - * parser/Nodes.cpp: - (JSC::EvalNode::emitBytecode): - -2009-11-12 Richard Moe Gustavsen - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Disable pthread_setname_np. - - This allows Qt builds on Mac from 10.6 to run on earlier version - where this symbol is not present. - https://bugs.webkit.org/show_bug.cgi?id=31403 - - * wtf/Platform.h: - -2009-11-12 Thiago Macieira - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Fix linking on Linux 32-bit. - - It was missing the ".text" directive at the top of the file, - indicating that code would follow. Without it, the assembler created - "NOTYPE" symbols, which would result in linker errors. - https://bugs.webkit.org/show_bug.cgi?id=30863 - - * jit/JITStubs.cpp: - -2009-11-11 Laszlo Gombos - - Reviewed by Alexey Proskuryakov. - - Refactor multiple JavaScriptCore threads - https://bugs.webkit.org/show_bug.cgi?id=31328 - - Remove the id field from the PlatformThread structure - as it is not used. - - * runtime/Collector.cpp: - (JSC::getCurrentPlatformThread): - (JSC::suspendThread): - (JSC::resumeThread): - (JSC::getPlatformThreadRegisters): - -2009-11-10 Geoffrey Garen - - Linux build fix: Added an #include for UINT_MAX. - - * runtime/WeakRandom.h: - -2009-11-10 Geoffrey Garen - - JavaScriptGlue build fix: Marked a file 'private' instead of 'project'. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-11-10 Geoffrey Garen - - Reviewed by Gavin "avGni arBalroguch" Barraclough. - - Faster Math.random, based on GameRand. - - SunSpider says 1.4% faster. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: Added the header to the project. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: Use an object to track random number generation - state, initialized to the current time. - - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - (JSC::mathProtoFuncRandom): Use the new hotness. - - * runtime/WeakRandom.h: Added. - (JSC::WeakRandom::WeakRandom): - (JSC::WeakRandom::get): - (JSC::WeakRandom::advance): The new hotness. - -2009-11-09 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Imported the v8 DST cache. - - SunSpider says 1.5% faster. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::resetDateCache): Reset the DST cache when resetting - other date data. - - * runtime/JSGlobalData.h: - (JSC::DSTOffsetCache::DSTOffsetCache): - (JSC::DSTOffsetCache::reset): Added a struct for the DST cache. - - * wtf/DateMath.cpp: - (WTF::calculateDSTOffsetSimple): - (WTF::calculateDSTOffset): - (WTF::parseDateFromNullTerminatedCharacters): - (JSC::getDSTOffset): - (JSC::gregorianDateTimeToMS): - (JSC::msToGregorianDateTime): - (JSC::parseDateFromNullTerminatedCharacters): - * wtf/DateMath.h: The imported code for probing and updating the cache. - -2009-11-09 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed an edge case that could cause the engine not to notice a timezone - change. - - No test because this case would require manual intervention to change - the timezone during the test. - - SunSpider reports no change. - - * runtime/DateInstanceCache.h: - (JSC::DateInstanceCache::DateInstanceCache): - (JSC::DateInstanceCache::reset): Added a helper function for resetting - this cache. Also, shrank the cache, since we'll be resetting it often. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache - in resetting Date data. (Otherwise, a cache hit could bypass a necessary - timezone update check.) - -2009-11-09 Geoffrey Garen - - Reviewed by Sam Weinig. - - Some manual inlining and constant propogation in Date code. - - SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark - says some previously evident stalls are now gone. - - * runtime/DateConstructor.cpp: - (JSC::callDate): - * runtime/DateConversion.cpp: - (JSC::formatTime): - (JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants. - - * runtime/DateConversion.h: - * runtime/DateInstance.cpp: - (JSC::DateInstance::calculateGregorianDateTime): - (JSC::DateInstance::calculateGregorianDateTimeUTC): - * runtime/DateInstance.h: - (JSC::DateInstance::gregorianDateTime): - (JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into - a UTC and non-UTC variant, and split each variant into a fast inline - case and a slow out-of-line case. - - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): Updated for the gregorianDateTime change above. - -2009-11-09 Geoffrey Garen - - Build fix: export a new symbol. - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-11-09 Geoffrey Garen - - Reviewed by Sam "Home Wrecker" Weinig. - - Added a tiny cache for Date parsing. - - SunSpider says 1.2% faster. - - * runtime/DateConversion.cpp: - (JSC::parseDate): Try to reuse the last parsed Date, if present. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::resetDateCache): - * runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored - this code to make resetting the date cache easier. - - * runtime/JSGlobalObject.h: - (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for - refactoring. - - * wtf/DateMath.cpp: - (JSC::parseDateFromNullTerminatedCharacters): - * wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom. - -2009-11-09 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Can cache prototype lookups on uncacheable dictionaries. - https://bugs.webkit.org/show_bug.cgi?id=31198 - - Replace fromDictionaryTransition with flattenDictionaryObject and - flattenDictionaryStructure. This change is necessary as we need to - guarantee that our attempt to convert away from a dictionary structure - will definitely succeed, and in some cases this requires mutating the - object storage itself. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCacheGetByID): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): - * runtime/JSObject.h: - (JSC::JSObject::flattenDictionaryObject): - * runtime/Operations.h: - (JSC::normalizePrototypeChain): - * runtime/Structure.cpp: - (JSC::Structure::flattenDictionaryStructure): - (JSC::comparePropertyMapEntryIndices): - * runtime/Structure.h: - -2009-11-09 Laszlo Gombos - - Not reviewed, build fix. - - Remove extra character from r50701. - - * JavaScriptCore.pri: - -2009-11-09 Laszlo Gombos - - Not reviewed, build fix. - - Revert r50695 because it broke QtWebKit (clean builds). - - * JavaScriptCore.pri: - -2009-11-09 Norbert Leser - - Reviewed by Kenneth Rohde Christiansen. - - Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro. - Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore), - and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/). - - * JavaScriptCore.pri: - -2009-11-09 Laszlo Gombos - - Reviewed by Kenneth Rohde Christiansen. - - Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings - https://bugs.webkit.org/show_bug.cgi?id=31040 - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2009-11-08 David Levin - - Reviewed by NOBODY (speculative snow leopard and windows build fixes). - - * wtf/DateMath.cpp: - (WTF::parseDateFromNullTerminatedCharacters): - (JSC::gregorianDateTimeToMS): - (JSC::msToGregorianDateTime): - (JSC::parseDateFromNullTerminatedCharacters): - * wtf/DateMath.h: - (JSC::GregorianDateTime::GregorianDateTime): - -2009-11-08 David Levin - - Reviewed by NOBODY (chromium build fix). - - Hopefully, the last build fix. - - Create better separation in DateMath about the JSC - and non-JSC portions. Also, only expose the non-JSC - version in the exports. - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/DateMath.cpp: - (WTF::parseDateFromNullTerminatedCharacters): - (JSC::getUTCOffset): - (JSC::gregorianDateTimeToMS): - (JSC::msToGregorianDateTime): - (JSC::parseDateFromNullTerminatedCharacters): - * wtf/DateMath.h: - (JSC::gmtoffset): - -2009-11-08 David Levin - - Reviewed by NOBODY (chromium build fix). - - For the change in DateMath. - - * config.h: - * wtf/DateMath.cpp: - -2009-11-06 Geoffrey Garen - - Windows build fix: export some symbols. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-11-06 Geoffrey Garen - - Build fix: updated export file. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-11-06 Geoffrey Garen - - Build fix: added some #includes. - - * wtf/CurrentTime.h: - * wtf/DateMath.h: - -2009-11-06 Geoffrey Garen - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=31197 - Implemented a timezone cache not based on Mac OS X's notify_check API. - - If the VM calculates the local timezone offset from UTC, it caches the - result until the end of the current VM invocation. (We don't want to cache - forever, because the user's timezone may change over time.) - - This removes notify_* overhead on Mac, and, more significantly, removes - OS time and date call overhead on non-Mac platforms. - - ~8% speedup on Date microbenchmark on Mac. SunSpider reports maybe a tiny - speedup on Mac. (Speedup on non-Mac platforms should be even more noticeable.) - - * JavaScriptCore.exp: - - * interpreter/CachedCall.h: - (JSC::CachedCall::CachedCall): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - * runtime/JSGlobalObject.h: - (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Made the - DynamicGlobalObjectScope constructor responsible for checking whether a - dynamicGlobalObject has already been set. This eliminated some duplicate - client code, and allowed me to avoid adding even more duplicate client - code. Made DynamicGlobalObjectScope responsible for resetting the - local timezone cache upon first entry to the VM. - - * runtime/DateConstructor.cpp: - (JSC::constructDate): - (JSC::callDate): - (JSC::dateParse): - (JSC::dateUTC): - * runtime/DateConversion.cpp: - (JSC::parseDate): - * runtime/DateConversion.h: - * runtime/DateInstance.cpp: - (JSC::DateInstance::gregorianDateTime): - * runtime/DateInstance.h: - * runtime/DateInstanceCache.h: - * runtime/DatePrototype.cpp: - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - * runtime/InitializeThreading.cpp: - (JSC::initializeThreadingOnce): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * wtf/DateMath.cpp: - (WTF::getCurrentUTCTime): - (WTF::getCurrentUTCTimeWithMicroseconds): - (WTF::getLocalTime): - (JSC::getUTCOffset): Use the new cache. Also, see below. - (JSC::gregorianDateTimeToMS): - (JSC::msToGregorianDateTime): - (JSC::initializeDates): - (JSC::parseDateFromNullTerminatedCharacters): Simplified the way this function - accounts for the local timezone offset, to accomodate our new caching API, - and a (possibly misguided) caller in WebCore. Also, see below. - * wtf/DateMath.h: - (JSC::GregorianDateTime::GregorianDateTime): Moved most of the code in - DateMath.* into the JSC namespace. The code needed to move so it could - naturally interact with ExecState and JSGlobalData to support caching. - Logically, it seemed right to move it, too, since this code is not really - as low-level as the WTF namespace might imply -- it implements a set of - date parsing and conversion quirks that are finely tuned to the JavaScript - language. Also removed the Mac OS X notify_* infrastructure. - - * wtf/CurrentTime.h: - (WTF::currentTimeMS): - (WTF::getLocalTime): Moved the rest of the DateMath code here, and renamed - it to make it consistent with WTF's currentTime function. - -2009-11-06 Gabor Loki - - Unreviewed trivial buildfix after r50595. - - Rename the remaining rshiftPtr calls to rshift32 - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_rshift): - * jit/JITInlineMethods.h: - (JSC::JIT::emitFastArithImmToInt): - -2009-11-06 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Tidy up the shift methods on the macro-assembler interface. - - Currently behaviour of shifts of a magnitude > 0x1f is undefined. - Instead defined that all shifts are masked to this range. This makes a lot of - practical sense, both since having undefined behaviour is not particularly - desirable, and because this behaviour is commonly required (particularly since - it is required bt ECMA-262 for shifts). - - Update the ARM assemblers to provide this behaviour. Remove (now) redundant - masks from JITArithmetic, and remove rshiftPtr (this was used in case that - could be rewritten in a simpler form using rshift32, only optimized JSVALUE32 - on x86-64, which uses JSVALUE64!) - - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::lshift32): - (JSC::MacroAssemblerARM::rshift32): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::lshift32): - (JSC::MacroAssemblerARMv7::rshift32): - * assembler/MacroAssemblerX86_64.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emit_op_rshift): - -2009-11-05 Gavin Barraclough - - Rubber Stamped by Oliver Hunt. - - Remove a magic number (1) from the JIT, instead compute the value with OBJECT_OFFSET. - - * jit/JITInlineMethods.h: - (JSC::JIT::emitPutJITStubArg): - (JSC::JIT::emitPutJITStubArgConstant): - (JSC::JIT::emitGetJITStubArg): - (JSC::JIT::emitPutJITStubArgFromVirtualRegister): - * jit/JITStubCall.h: - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::getArgument): - * jit/JITStubs.h: - -2009-11-05 Zoltan Herczeg - - Reviewed by Gavin Barraclough. - - https://bugs.webkit.org/show_bug.cgi?id=31159 - Fix branchDouble behaviour on ARM THUMB2 JIT. - - The x86 branchDouble behaviour is reworked, and all JIT - ports should follow the x86 port. See bug 31104 and 31151 - - This patch contains a fix for the traditional ARM port - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::): - (JSC::ARMAssembler::fmrs_r): - (JSC::ARMAssembler::ftosid_r): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::): - (JSC::MacroAssemblerARM::branchDouble): - (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): - -2009-11-05 Chris Jerdonek - - Reviewed by Eric Seidel. - - Removed the "this is part of the KDE project" comments from - all *.h, *.cpp, *.idl, and *.pm files. - - https://bugs.webkit.org/show_bug.cgi?id=31167 - - The maintenance and architecture page in the project wiki lists - this as a task. - - This change includes no changes or additions to test cases - since the change affects only comments. - - * wtf/wince/FastMallocWince.h: - -2009-11-05 Gabor Loki - - Reviewed by Gavin Barraclough. - - Use ARMv7 specific encoding for immediate constants on ARMv7 target - https://bugs.webkit.org/show_bug.cgi?id=31060 - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::getOp2): Use INVALID_IMM - (JSC::ARMAssembler::getImm): Use encodeComplexImm for complex immediate - (JSC::ARMAssembler::moveImm): Ditto. - (JSC::ARMAssembler::encodeComplexImm): Encode a constant by one or two - instructions or a PC relative load. - * assembler/ARMAssembler.h: Use INVALID_IMM if a constant cannot be - encoded as an immediate constant. - (JSC::ARMAssembler::): - (JSC::ARMAssembler::movw_r): 16-bit immediate load - (JSC::ARMAssembler::movt_r): High halfword 16-bit immediate load - (JSC::ARMAssembler::getImm16Op2): Encode immediate constant for - movw_r and mowt_r - -2009-11-04 Mark Mentovai - - Reviewed by Mark Rowe. - - Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to - BUILDING_ON_TIGER and BUILDING_ON_LEOPARD. The TARGETING_ macros - consider the deployment target; the BUILDING_ON_ macros consider the - headers being built against. - - * wtf/Platform.h: - -2009-11-04 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=31151 - Fix branchDouble behaviour on ARM THUMB2 JIT. - - The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch - for DoubleEqualOrUnordered, however this is incorrect - ConditionEQ won't - branch on unordered operands. Similarly, DoubleLessThanOrUnordered & - DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO & - ARMv7Assembler::ConditionLS, whereas they should be using - ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE. - - Fix these, and fill out the missing DoubleConditions. - - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::): - (JSC::MacroAssemblerARMv7::branchDouble): - -2009-11-04 Gavin Barraclough - - Rubber Stamped by Oliver Hunt. - - Enable native call optimizations on ARMv7. (Existing ARM_TRADITIONAL - implementation was generic, worked perfectly, just needed turning on). - - * jit/JITOpcodes.cpp: - * wtf/Platform.h: - -2009-11-04 Gavin Barraclough - - Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig. - - Add a missing assert to the ARMv7 JIT. - - * assembler/ARMv7Assembler.h: - (JSC::ARMThumbImmediate::ARMThumbImmediate): - -2009-11-04 Mark Rowe - - Rubber-stamped by Oliver Hunt. - - Remove bogus op_ prefix on dumped version of three opcodes. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - -2009-11-04 Mark Rowe - - Reviewed by Sam Weinig. - - Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers. - - We do this by having the registerName function return information about the constant if the register - number corresponds to a constant. This requires that registerName, and several functions that call it, - be converted to member functions of CodeBlock so that the constant value can be retrieved. The - ExecState also needs to be threaded down through these functions so that it can be passed on to - constantName when needed. - - * bytecode/CodeBlock.cpp: - (JSC::constantName): - (JSC::CodeBlock::registerName): - (JSC::CodeBlock::printUnaryOp): - (JSC::CodeBlock::printBinaryOp): - (JSC::CodeBlock::printConditionalJump): - (JSC::CodeBlock::printGetByIdOp): - (JSC::CodeBlock::printPutByIdOp): - (JSC::CodeBlock::dump): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::isConstantRegisterIndex): - -2009-11-04 Pavel Heimlich - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=30647 - Solaris build failure due to strnstr. - - * wtf/StringExtras.h: Enable strnstr on Solaris, too. - -2009-11-04 Gavin Barraclough - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=31104 - Refactor x86-specific behaviour out of the JIT. - - - Add explicit double branch conditions for ordered and unordered comparisons (presently the brehaviour is a mix). - - Refactor double to int conversion out into the MacroAssembler. - - Remove broken double to int conversion for !JSVALUE32_64 builds - this code was broken and slowing us down, fixing it showed it not to be an improvement. - - Remove exclusion of double to int conversion from (1 % X) cases in JSVALUE32_64 builds - if this was of benefit this is no longer the case; simplify. - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::): - (JSC::MacroAssemblerX86Common::convertInt32ToDouble): - (JSC::MacroAssemblerX86Common::branchDouble): - (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32): - * jit/JITArithmetic.cpp: - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_div): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emitSlow_op_jnlesseq): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jfalse): - -2009-11-04 Mark Mentovai - - Reviewed by Eric Seidel. - - Remove BUILDING_ON_LEOPARD from JavaScriptCore.gyp. This is supposed - to be set as needed only in wtf/Platform.h. - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - -2009-11-02 Oliver Hunt - - Reviewed by Gavin Barraclough. - - REGRESSION (r48573): JSC may incorrectly cache chain lookups with a dictionary at the head of the chain - https://bugs.webkit.org/show_bug.cgi?id=31045 - - Add guards to prevent caching of prototype chain lookups with dictionaries at the - head of the chain. Also add a few tighter assertions to cached prototype lookups - to catch this in future. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - -2009-11-02 Laszlo Gombos - - Reviewed by Darin Adler. - - PLATFORM(CF) should be set when building for Qt on Darwin - https://bugs.webkit.org/show_bug.cgi?id=23671 - - * wtf/Platform.h: Turn on CF support if both QT and DARWIN - platforms are defined. - -2009-11-02 Dmitry Titov - - Reviewed by David Levin. - - Remove threadsafe refcounting from tasks used with WTF::MessageQueue. - https://bugs.webkit.org/show_bug.cgi?id=30612 - - * wtf/MessageQueue.h: - (WTF::MessageQueue::alwaysTruePredicate): - (WTF::MessageQueue::~MessageQueue): - (WTF::MessageQueue::append): - (WTF::MessageQueue::appendAndCheckEmpty): - (WTF::MessageQueue::prepend): - (WTF::MessageQueue::waitForMessage): - (WTF::MessageQueue::waitForMessageFilteredWithTimeout): - (WTF::MessageQueue::tryGetMessage): - (WTF::MessageQueue::removeIf): - The MessageQueue is changed to act as a queue of OwnPtr. It takes ownership - of posted tasks and passes it to the new owner (in another thread) when the task is fetched. - All methods have arguments of type PassOwnPtr and return the same type. - - * wtf/Threading.cpp: - (WTF::createThread): - Superficial change to trigger rebuild of JSC project on Windows, - workaround for https://bugs.webkit.org/show_bug.cgi?id=30890 - -2009-10-30 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed failing layout test: restore a special case I accidentally deleted. - - * runtime/DatePrototype.cpp: - (JSC::setNewValueFromDateArgs): In the case of applying a change to a date - that is NaN, reset the date to 0 *and* then apply the change; don't just - reset the date to 0. - -2009-10-30 Geoffrey Garen - - Windows build fix: update for object-to-pointer change. - - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - -2009-10-29 Geoffrey Garen - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=30942 - Use pointers instead of copies to pass GregorianDateTime objects around. - - SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3% - speedup on date-format-tofte. - - * runtime/DateInstance.cpp: - (JSC::DateInstance::gregorianDateTime): - * runtime/DateInstance.h: - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime, - since it no longer has an out parameter. Uses 0 to indicate invalid dates. - -2009-10-30 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for JavaScriptCore's ListHashSet - https://bugs.webkit.org/show_bug.cgi?id=30853 - - Inherits ListHashSet class from FastAllocBase because it is - instantiated by 'new' in WebCore/rendering/RenderBlock.cpp:1813. - - * wtf/ListHashSet.h: - -2009-10-30 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Regression: crash enumerating properties of an object with getters or setters - https://bugs.webkit.org/show_bug.cgi?id=30948 - - Add a guard to prevent us trying to cache property enumeration on - objects with getters or setters. - - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::create): - -2009-10-30 Roland Steiner - - Reviewed by Eric Seidel. - - Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak. - - Bug 28420 - Implement HTML5 rendering - (https://bugs.webkit.org/show_bug.cgi?id=28420) - - No new tests (no functional change). - - * Configurations/FeatureDefines.xcconfig: - -2009-10-29 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - REGRESSION (r50218-r50262): E*TRADE accounts page is missing content - https://bugs.webkit.org/show_bug.cgi?id=30947 - - - The logic for flagging that a structure has non-enumerable properties - was in addPropertyWithoutTransition, rather than in the core Structure::put - method. Despite this I was unable to produce a testcase that caused - the failure that etrade was experiencing, but the new assertion in - getEnumerablePropertyNames triggers on numerous layout tests without - the fix, so in effecti all for..in enumeration in any test ends up - doing the required consistency check. - - * runtime/Structure.cpp: - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::put): - (JSC::Structure::getEnumerablePropertyNames): - (JSC::Structure::checkConsistency): - -2009-10-29 Gabor Loki - - Reviewed by Gavin Barraclough. - - Add cacheFlush support for Thumb-2 on Linux - https://bugs.webkit.org/show_bug.cgi?id=30865 - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - -2009-10-28 Gavin Barraclough - - Reviewed by Oliver Hunt. - - JSC JIT on ARMv7 cannot link jumps >16Mb range - https://bugs.webkit.org/show_bug.cgi?id=30891 - - Start planing all relative jumps as move-32-bit-immediate-to-register-BX. - In the cases where the jump would fall within a relative jump range, use a relative jump. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::~ARMv7Assembler): - (JSC::ARMv7Assembler::LinkRecord::LinkRecord): - (JSC::ARMv7Assembler::): - (JSC::ARMv7Assembler::executableCopy): - (JSC::ARMv7Assembler::linkJump): - (JSC::ARMv7Assembler::relinkJump): - (JSC::ARMv7Assembler::setInt32): - (JSC::ARMv7Assembler::isB): - (JSC::ARMv7Assembler::isBX): - (JSC::ARMv7Assembler::isMOV_imm_T3): - (JSC::ARMv7Assembler::isMOVT): - (JSC::ARMv7Assembler::isNOP_T1): - (JSC::ARMv7Assembler::isNOP_T2): - (JSC::ARMv7Assembler::linkJumpAbsolute): - (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst): - (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond): - (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::makeJump): - (JSC::MacroAssemblerARMv7::makeBranch): - * jit/JIT.h: - * wtf/Platform.h: - -2009-10-28 Oliver Hunt - - Reviewed by Geoff Garen. - - Improve for..in enumeration performance - https://bugs.webkit.org/show_bug.cgi?id=30887 - - Improve indexing of an object with a for..in iterator by - identifying cases where get_by_val is being used with a iterator - as the subscript and replace it with a new get_by_pname - bytecode. get_by_pname then optimizes lookups that directly access - the base object. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitGetByVal): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::pushOptimisedForIn): - (JSC::BytecodeGenerator::popOptimisedForIn): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::emit_op_get_by_pname): - (JSC::JIT::emitSlow_op_get_by_pname): - * parser/Nodes.cpp: - (JSC::ForInNode::emitBytecode): - * runtime/JSObject.h: - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::create): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::getOffset): - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - * runtime/JSValue.h: - (JSC::JSValue::): - * runtime/Structure.cpp: - (JSC::Structure::addPropertyTransition): - (JSC::Structure::changePrototypeTransition): - (JSC::Structure::despecifyFunctionTransition): - (JSC::Structure::addAnonymousSlotsTransition): - (JSC::Structure::getterSetterTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::addPropertyWithoutTransition): - Track the existence (or not) of non-enumerable properties. - * runtime/Structure.h: - (JSC::Structure::propertyStorageCapacity): - (JSC::Structure::propertyStorageSize): - (JSC::Structure::hasNonEnumerableProperties): - (JSC::Structure::hasAnonymousSlots): - -2009-10-28 Dmitry Titov - - Not reviewed, attemp to fix Windows build. - - Touch the cpp file to cause recompile. - - * wtf/Threading.cpp: - (WTF::threadEntryPoint): - -2009-10-28 Dmitry Titov - - Reviewed by David Levin. - - https://bugs.webkit.org/show_bug.cgi?id=30805 - Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue. - Existing Database tests cover this since Database removes tasks when it is stopped. - - * wtf/MessageQueue.h: - (WTF::::removeIf): - -2009-10-28 Afonso R. Costa Jr. - - Reviewed by Oliver Hunt. - - [Qt] Enable YARR when YARR_JIT is enabled - https://bugs.webkit.org/show_bug.cgi?id=30730 - - When enabling or disabling JIT using JAVASCRIPTCORE_JIT, the ENABLE_YARR should - be toggled also. - - * JavaScriptCore.pri: - -2009-10-24 Martin Robinson - - Reviewed by Oliver Hunt. - - Fix strict aliasing warning by switching reinterpret_cast to bitwise_cast. - - strict-aliasing warnings in JSFunction.h - https://bugs.webkit.org/show_bug.cgi?id=27869 - - * runtime/JSFunction.h: - (JSC::JSFunction::nativeFunction): - (JSC::JSFunction::scopeChain): - (JSC::JSFunction::setScopeChain): - (JSC::JSFunction::setNativeFunction): - -2009-10-28 Jan-Arve Sæther - - Reviewed by Tor Arne Vestbø. - - Build-fix for 64-bit Windows - - * wtf/Platform.h: Make sure to use WTF_USE_JSVALUE64 - -2009-10-28 Gavin Barraclough - - Reviewed by NOBODY (build fix!). - - * jit/JIT.h: - -2009-10-26 Holger Hans Peter Freyther - - Rubber-stamped by Darin Adler. - - Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix - https://bugs.webkit.org/show_bug.cgi?id=30769 - - When using -fvisibility=hidden to hide all internal symbols by default - the malloc symbols will be hidden as well. For memory instrumentation - it is needed to provide an instrumented version of these symbols and - override the normal routines and by changing the visibility back to - default this becomes possible. - - The only other solution would be to use system malloc instead of the - TCmalloc implementation but this will not allow to analyze memory - behavior with the default allocator. - - * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin - -2009-10-27 Gavin Barraclough - - Rubber Stamped by Samuel Q. Weinig. - - Make the asserts protecting the offsets in the JIT more descriptive. - - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::emit_op_put_by_id): - -2009-10-27 Geoffrey Garen - - Reviewed by Sam Weinig. - - A little bit of refactoring in the date code. - - * JavaScriptCore.exp: Don't export this unused symbol. - - * runtime/DateConstructor.cpp: - (JSC::constructDate): - - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DateInstance.h: Removed some unused functions. Changed the default - constructor to ensure that a DateInstance is always initialized. - - * runtime/DatePrototype.cpp: - (JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor, - since it now requires one. - - * wtf/DateMath.cpp: - (WTF::msToGregorianDateTime): Only compute our offset from UTC if our - output will require it. Otherwise, our offset is 0. - -2009-10-27 Geoffrey Garen - - Build fix: Mark DateInstaceCache.h private, so other frameworks can see it. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-10-27 Geoffrey Garen - - Build fix: re-readded this file. - - * runtime/DateInstanceCache.h: Added. - (JSC::DateInstanceData::create): - (JSC::DateInstanceData::DateInstanceData): - (JSC::DateInstanceCache::DateInstanceCache): - (JSC::DateInstanceCache::add): - (JSC::DateInstanceCache::lookup): - -2009-10-27 Geoffrey Garen - - Reviewed by Darin Adler and Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=30800 - Cache recently computed date data. - - SunSpider reports a ~0.5% speedup, mostly from date-format-tofte.js. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: Added new file. - - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - (JSC::DateInstance::getGregorianDateTime): Use the shared cache. - - * runtime/DateInstance.h: Renamed m_cache to m_data, to avoid the confusion - of a "cache cache". - - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): Pass an ExecState to these functions, so they - can access the DateInstanceCache. - - * runtime/JSGlobalData.h: Keep a DateInstanceCache. - -2009-10-27 James Robinson - - Reviewed by Darin Fisher. - - Ensures that JavaScriptCore/wtf/CurrentTime.cpp is not built in PLATFORM(CHROMIUM) builds. - - Chromium uses a different method to calculate the current time than is used in - JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time - function are mixed. In particular, timers can get scheduled in the past which leads to 100% CPU use. - See http://code.google.com/p/chromium/issues/detail?id=25892 for an example. - - https://bugs.webkit.org/show_bug.cgi?id=30833 - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - * wtf/CurrentTime.cpp: - -2009-10-27 Peter Varga - - Rubber-stamped by Tor Arne Vestbø. - - Fix typo in RegexInterpreter.cpp and RegexJIT.cpp alterantive to - alternative. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction): - (JSC::Yarr::ByteCompiler::alternativeDisjunction): - (JSC::Yarr::ByteCompiler::emitDisjunction): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateDisjunction): - -2009-10-26 Laszlo Gombos - - Reviewed by Darin Adler. - - Make .rc files compile on Windows without depending on MFC headers - https://bugs.webkit.org/show_bug.cgi?id=30750 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Use - winresrc.h because it exists even when MFC is not installed, and is - all that's needed here. - -2009-10-26 Gabor Loki - - Reviewed by Gavin Barraclough. - - The thunkReturnAddress is on JITStackFrame on ARM JIT as well - https://bugs.webkit.org/show_bug.cgi?id=30782 - - Move the thunkReturnAddress from top of the stack into the JITStackFrame - structure. This is a requirement for JSValue32_64 support on ARM. - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::ret): Return with link register - (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register - * jit/JIT.h: Remove unused ctiReturnRegister - * jit/JITInlineMethods.h: Same as ARMv7 - (JSC::JIT::restoreArgumentReference): Ditto. - (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto. - * jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction - * jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use - small trampoline functions which handle return addresses for each - CTI_STUB_FUNCTION. - * jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame - (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction - -2009-10-26 Steve Block - - Reviewed by Darin Adler. - - Adds ability to disable ReadWriteLock on platforms (eg Android) that use pthreads but do not support pthread_rwlock. - https://bugs.webkit.org/show_bug.cgi?id=30713 - - * wtf/Platform.h: Modified. Defines HAVE_PTHREAD_RWLOCK for all platforms currently using pthreads. - * wtf/Threading.h: Modified. Use pthread_rwlock_t only when HAVE_PTHREAD_RWLOCK is defined. - * wtf/ThreadingPthreads.cpp: Modified. Build ReadWriteLock methods only when HAVE_PTHREAD_RWLOCK is defined. - -2009-10-24 Laszlo Gombos - - Reviewed by Holger Freyther. - - [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian - https://bugs.webkit.org/show_bug.cgi?id=30476 - - Assign ReadUserData WriteUserData NetworkServices Symbian capabilities - to jsc.exe. - - * jsc.pro: - -2009-10-23 Steve Block - - Reviewed by Dmitry Titov. - - Fixes a leak in createThreadInternal on Android. - https://bugs.webkit.org/show_bug.cgi?id=30698 - - * wtf/ThreadingPthreads.cpp: Modified. - (WTF::createThreadInternal): Avoid leaking a ThreadData object on failure. - -2009-10-22 Geoffrey Garen - - Reviewed by Alexey Proskuryakov. - - Fixed ASSERT when opening Safari's Caches window while the Web Inspector - is open. - - * runtime/Collector.cpp: - (JSC::typeName): Added two new types to the type name list in the Collector. - These types have been around for a while, but nobody remembered to consider them here. - - * runtime/JSCell.h: - (JSC::JSCell::isPropertyNameIterator): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::isPropertyNameIterator): Give the Collector - a way to tell if a cell is a JSPropertyNameIterator. - -2009-10-22 Steve Falkenburg - - Reviewed by Jon Honeycutt. - - https://bugs.webkit.org/show_bug.cgi?id=30686 - Remove debug-specific def file. - Only Debug_All target uses JavaScriptCore_debug.dll naming, and since - that target is only used internally, maintaining two files just to - suppress a single link warning isn't worthwhile. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Removed. - -2009-10-21 Jon Honeycutt - - Screenshots of off-screen plug-ins are blank - After halting a transparent PluginView on - Windows, the transparency is applied twice - - Reviewed by Dan Bernstein. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Export WTF::deleteOwnedPtr(HDC). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - Ditto. - -2009-10-20 Geoffrey Garen - - Windows build fix: updated variable name. - - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - -2009-10-20 Geoffrey Garen - - Reviewed by Mark Rowe. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_next_pname): Slightly tweaked this #ifdef to match the - size of a JSValue because m_jsStrings is an array of JSValues. - -2009-10-20 Geoffrey Garen - - Reviewed by Mark Rowe. - - Fixed a 64-bit regression caused by the fix for - https://bugs.webkit.org/show_bug.cgi?id=30570. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_next_pname): Use TimesEight stepping on 64-bit, since - 64-bit pointers are eight bytes long. - -2009-10-20 Geoffrey Garen - - Reviewed by Sam Weinig. - - Refactored DateInstance::msToGregorianDateTime so that a DateInstance's - caller doesn't need to supply the DateInstance's own internal value to - the DateInstance. - - * runtime/DateInstance.cpp: - (JSC::DateInstance::getGregorianDateTime): Renamed from "msToGregorianDateTime". - - * runtime/DateInstance.h: - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToLocaleString): - (JSC::dateProtoFuncToLocaleDateString): - (JSC::dateProtoFuncToLocaleTimeString): - (JSC::dateProtoFuncGetTime): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): Also renamed "utc" to "outputIsUTC", for clarity. - -2009-10-20 Gabor Loki - - Reviewed by Geoffrey Garen. - - The op_next_pname should use 4 bytes addressing mode in case of JSValue32 - https://bugs.webkit.org/show_bug.cgi?id=30570 - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_next_pname): - -2009-10-20 Gabor Loki - - Reviewed by Oliver Hunt. - - Move OverridesMarkChildren flag from DatePrototype to its parent class - https://bugs.webkit.org/show_bug.cgi?id=30372 - - * runtime/DateInstance.h: - (JSC::DateInstance::createStructure): - * runtime/DatePrototype.h: - -2009-10-19 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Tightened up some put_by_id_transition code generation. - https://bugs.webkit.org/show_bug.cgi?id=30539 - - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::testPrototype): - (JSC::JIT::privateCompilePutByIdTransition): No need to do object type - checks or read Structures and prototypes from objects: they're all known - constants at compile time. - -2009-10-19 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added a private API for getting a global context from a context, for - clients who want to preserve a context for a later callback. - - * API/APICast.h: - (toGlobalRef): Added an ASSERT, since this function is used more often - than before. - - * API/JSContextRef.cpp: - * API/JSContextRefPrivate.h: Added. The new API. - - * API/tests/testapi.c: - (print_callAsFunction): - (main): Test the new API. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: Build and export the new API. - -2009-10-17 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Tightened up some instanceof code generation. - https://bugs.webkit.org/show_bug.cgi?id=30488 - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emitSlow_op_instanceof): No need to do object type checks - - cell type checks and ImplementsDefaultHasIntance checks implicitly - supersede object type checks. - -2009-10-18 Kwang Yul Seo - - Reviewed by Darin Adler. - - Use _stricmp and _strnicmp instead of deprecated stricmp and strnicmp. - https://bugs.webkit.org/show_bug.cgi?id=30474 - - stricmp and strnicmp are deprecated beginning in Visual - C++ 2005. Use _stricmp and _strnicmp instead in StringExtras.h. - - * wtf/StringExtras.h: - (strncasecmp): - (strcasecmp): - -2009-10-16 Geoffrey Garen - - Build fix: apparently we shouldn't export those symbols? - - * JavaScriptCore.exp: - -2009-10-16 Geoffrey Garen - - Build fix: export some symbols. - - * JavaScriptCore.exp: - -2009-10-16 Oliver Hunt - - Reviewed by Gavin Barraclough. - - structure typeinfo flags should be inherited. - https://bugs.webkit.org/show_bug.cgi?id=30468 - - Add StructureFlag constant to the various JSC classes and use - it for the TypeInfo construction. This allows us to simply - accumulate flags by basing each classes StructureInfo on its parents. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - * runtime/JSArray.h: - (JSC::JSArray::createStructure): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - * runtime/JSByteArray.h: - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.h: - (JSC::JSObject::createStructure): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - -2009-10-16 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fast for-in enumeration: Cache JSPropertyNameIterator; cache JSStrings - in JSPropertyNameIterator; inline more code. - - 1.024x as fast on SunSpider (fasta: 1.43x as fast). - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitGetPropertyNames): - (JSC::BytecodeGenerator::emitNextPropertyName): - * bytecompiler/BytecodeGenerator.h: Added a few extra operands to - op_get_pnames and op_next_pname so that we can track iteration state - in the register file instead of in the JSPropertyNameIterator. (To be - cacheable, the JSPropertyNameIterator must be stateless.) - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::tryCacheGetByID): Updated for rename to - "normalizePrototypeChain" and removal of "isCacheable". - - (JSC::Interpreter::privateExecute): Updated for in-RegisterFile - iteration state tracking. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_pnames): Updated for in-RegisterFile - iteration state tracking. - - (JSC::JIT::emit_op_next_pname): Inlined code generation for op_next_pname. - - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): Updated for rename to - "normalizePrototypeChain" and removal of "isCacheable". - - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): Added has_property and to_object stubs. Removed op_next_pname - stub, since has_property is all we need anymore. - - * parser/Nodes.cpp: - (JSC::ForInNode::emitBytecode): Updated for in-RegisterFile - iteration state tracking. - - * runtime/JSCell.h: - * runtime/JSObject.cpp: - (JSC::JSObject::getPropertyNames): Don't do caching at this layer - anymore, since we don't create a JSPropertyNameIterator at this layer. - - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::create): Do do caching at this layer. - (JSC::JSPropertyNameIterator::get): Updated for in-RegisterFile - iteration state tracking. - (JSC::JSPropertyNameIterator::markChildren): Mark our JSStrings. - - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::size): - (JSC::JSPropertyNameIterator::setCachedStructure): - (JSC::JSPropertyNameIterator::cachedStructure): - (JSC::JSPropertyNameIterator::setCachedPrototypeChain): - (JSC::JSPropertyNameIterator::cachedPrototypeChain): - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - (JSC::Structure::setEnumerationCache): Don't store iteration state in - a JSPropertyNameIterator. Do cache a JSPropertyNameIterator in a - Structure. - - * runtime/JSValue.h: - (JSC::asCell): - * runtime/MarkStack.h: Make those mischievous #include gods happy. - - * runtime/ObjectConstructor.cpp: - - * runtime/Operations.h: - (JSC::normalizePrototypeChain): Renamed countPrototypeChainEntriesAndCheckForProxies - to normalizePrototypeChain, since it changes dictionary prototypes to - non-dictionary objects. - - * runtime/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * runtime/PropertyNameArray.h: - (JSC::PropertyNameArrayData::PropertyNameArrayData): - (JSC::PropertyNameArray::data): - (JSC::PropertyNameArray::size): - (JSC::PropertyNameArray::begin): - (JSC::PropertyNameArray::end): Simplified some code here to help with - current and future refactoring. - - * runtime/Protect.h: - * runtime/Structure.cpp: - (JSC::Structure::~Structure): - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::removePropertyWithoutTransition): No need to clear - the enumeration cache with adding / removing properties without - transition. It is an error to add / remove properties without transition - once an object has been observed, and we can ASSERT to catch that. - - * runtime/Structure.h: - (JSC::Structure::enumerationCache): Changed the enumeration cache to - hold a JSPropertyNameIterator. - - * runtime/StructureChain.cpp: - * runtime/StructureChain.h: - (JSC::StructureChain::head): Removed StructureChain::isCacheable because - it was wrong-headed in two ways: (1) It gave up when a prototype was a - dictionary, but instead we want un-dictionary heavily accessed - prototypes; (2) It folded a test for hasDefaultGetPropertyNames() into - a generic test for "cacheable-ness", but hasDefaultGetPropertyNames() - is only releavant to for-in caching. - -2009-10-16 Steve Falkenburg - - Reviewed by Adam Roben. - - Add a Debug_All configuration to build entire stack as debug. - Change Debug_Internal to: - - stop using _debug suffix for all WebKit/Safari binaries - - not use _debug as a DLL naming suffix - - use non-debug C runtime lib. - - * JavaScriptCore.vcproj/JavaScriptCore.make: Debug build in makefile should build Debug_All. - * JavaScriptCore.vcproj/JavaScriptCore.sln: Add Debug_All configuration. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add Debug_All configuration. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Renamed single configuration from "Release" to "all". - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Add Debug_All configuration. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add Debug_All configuration. - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_All configuration. - * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_All configuration. - -2009-10-16 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Make typeinfo flags default to false - https://bugs.webkit.org/show_bug.cgi?id=30372 - - Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames - flag. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::createStructure): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - * runtime/JSArray.h: - (JSC::JSArray::createStructure): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.cpp: - (JSC::JSObject::getPropertyNames): - * runtime/JSObject.h: - (JSC::JSObject::createStructure): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSTypeInfo.h: - (JSC::TypeInfo::overridesGetPropertyNames): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - * runtime/StructureChain.cpp: - (JSC::StructureChain::isCacheable): - -2009-10-16 Kevin Ollivier - - wxMSW build fix, we can't use the simple hash there because the PlatformModuleVersion - structure differs. - - * wtf/Platform.h: - -2009-10-16 Laszlo Gombos - - Reviewed by Simon Hausmann. - - [Qt] Implement ExecutableAllocator for Symbian - https://bugs.webkit.org/show_bug.cgi?id=29946 - - Tested with YARR JIT enabled for Symbian; - This patch does not (yet) enable YARR JIT by default. - - * JavaScriptCore.pri: - * jit/ExecutableAllocator.h: - * jit/ExecutableAllocatorSymbian.cpp: Added. - (JSC::ExecutableAllocator::intializePageSize): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - -2009-10-15 Oliver Hunt - - Reviewed by Darin Adler. - - Make typeinfo flags default to false - https://bugs.webkit.org/show_bug.cgi?id=30372 - - Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GetterSetter.h: - (JSC::GetterSetter::createStructure): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::createStructure): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - * runtime/JSArray.h: - (JSC::JSArray::createStructure): - (JSC::MarkStack::markChildren): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::createStructure): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.h: - (JSC::JSObject::createStructure): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::createStructure): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSString.h: - (JSC::JSString::createStructure): - * runtime/JSTypeInfo.h: - (JSC::TypeInfo::overridesMarkChildren): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - -2009-10-14 Oliver Hunt - - Reviewed by Geoff Garen. - - Make typeinfo flags default to false - https://bugs.webkit.org/show_bug.cgi?id=30372 - - Part 1. Reverse the HasStandardGetOwnPropertySlot flag. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - * runtime/JSArray.h: - (JSC::JSArray::createStructure): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.h: - (JSC::JSObject::createStructure): - (JSC::JSCell::fastGetOwnPropertySlot): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSString.h: - (JSC::JSString::createStructure): - * runtime/JSTypeInfo.h: - (JSC::TypeInfo::overridesGetOwnPropertySlot): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - -2009-10-14 Kevin Ollivier -2009-10-14 Darin Adler - - Additions so fix for https://bugs.webkit.org/show_bug.cgi?id=18994 - can build on Windows. - - * wtf/MathExtras.h: Added llround and llroundf for Windows. - -2009-10-14 Kevin Ollivier - - wx build fix. Set ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for plugins while we're still building stubs. - - * wtf/Platform.h: - -2009-10-13 Laszlo Gombos - - Reviewed by Simon Hausmann. - - Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH - https://bugs.webkit.org/show_bug.cgi?id=30278 - - Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH - from the make system into common code. - - * wtf/Platform.h: - -2009-10-13 Laszlo Gombos - - Reviewed by Darin Adler. - - ARM compiler does not understand reinterpret_cast - https://bugs.webkit.org/show_bug.cgi?id=29034 - - Change reinterpret_cast to regular C style (void*) cast - for the ARM RVCT compiler. - - * assembler/MacroAssemblerCodeRef.h: - (JSC::FunctionPtr::FunctionPtr): - * jit/JITOpcodes.cpp: Cast to FunctionPtr first - instead of directly casting to reinterpret_cast - * jit/JITStubCall.h: Ditto + change the type of m_stub - from void* to FunctionPtr. - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::call): - * jit/JITStubs.cpp: Ditto. - (JSC::DEFINE_STUB_FUNCTION(EncodedJSValue, op_throw)): - -2009-10-11 Oliver Hunt - - Re-enable the JIT. - - * wtf/Platform.h: - -2009-10-10 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Support for String.trim(), String.trimLeft() and String.trimRight() methods - https://bugs.webkit.org/show_bug.cgi?id=26590 - - Implement trim, trimLeft, and trimRight - - * runtime/StringPrototype.cpp: - (JSC::isTrimWhitespace): - Our normal string whitespace function does not include U+200B which - is needed for compatibility with mozilla's implementation of trim. - U+200B does not appear to be expected according to spec, however I am - choosing to be lax, and match mozilla behavior so have added this - exception. - (JSC::trimString): - -2009-10-09 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Eliminated some legacy bytecode weirdness. - - Use vPC[x] subscripting instead of ++vPC to access instruction operands. - This is simpler, and often more efficient. - - To support this, and to remove use of hard-coded offsets in bytecode and - JIT code generation and dumping, calculate jump offsets from the beginning - of an instruction, rather than the middle or end. - - Also, use OPCODE_LENGTH instead of hard-coded constants for the sizes of - opcodes. - - SunSpider reports no change in JIT mode, and a 1.01x speedup in Interpreter - mode. - - * bytecode/CodeBlock.cpp: - (JSC::printConditionalJump): - (JSC::CodeBlock::dump): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitJump): - (JSC::BytecodeGenerator::emitJumpIfTrue): - (JSC::BytecodeGenerator::emitJumpIfFalse): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): - (JSC::BytecodeGenerator::emitComplexJumpScopes): - (JSC::BytecodeGenerator::emitJumpScopes): - (JSC::BytecodeGenerator::emitNextPropertyName): - (JSC::BytecodeGenerator::emitCatch): - (JSC::BytecodeGenerator::emitJumpSubroutine): - (JSC::prepareJumpTableForImmediateSwitch): - (JSC::prepareJumpTableForCharacterSwitch): - (JSC::prepareJumpTableForStringSwitch): - (JSC::BytecodeGenerator::endSwitch): - * bytecompiler/Label.h: - (JSC::Label::setLocation): - (JSC::Label::bind): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveBase): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::createExceptionScope): - (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emitBinaryDoubleOp): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jmp): - (JSC::JIT::emit_op_loop): - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emitSlow_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emitSlow_op_loop_if_lesseq): - (JSC::JIT::emit_op_loop_if_true): - (JSC::JIT::emitSlow_op_loop_if_true): - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emitSlow_op_jfalse): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emitSlow_op_jtrue): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_jneq_ptr): - (JSC::JIT::emit_op_jsr): - (JSC::JIT::emit_op_next_pname): - (JSC::JIT::emit_op_jmp_scopes): - -2009-10-09 Geoffrey Garen - - Reviewed by Sam Weinig. - - Migrated some code that didn't belong out of Structure. - - SunSpider says maybe 1.03x faster. - - * runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of - a Structure's prototype the direct responsility of the object using it. - (Giving Structure a mark function was misleading because it implied that - all live structures get marked during GC, when they don't.) - - * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored - on the global object. Maybe this wasn't necessary, but now we don't have - to wonder. - - * runtime/JSObject.cpp: - (JSC::JSObject::getPropertyNames): - (JSC::JSObject::getOwnPropertyNames): - (JSC::JSObject::getEnumerableNamesFromClassInfoTable): - * runtime/JSObject.h: - (JSC::JSObject::markChildrenDirect): - * runtime/PropertyNameArray.h: - * runtime/Structure.cpp: - * runtime/Structure.h: - (JSC::Structure::setEnumerationCache): - (JSC::Structure::enumerationCache): Moved property name gathering code - from Structure to JSObject because having a Structure iterate its JSObject - was a layering violation. A JSObject is implemented using a Structure; not - the other way around. - -2009-10-09 Mark Rowe - - Attempt to fix the GTK release build. - - * GNUmakefile.am: Include Grammar.cpp in release builds now that - AllInOneFile.cpp is gone. - -2009-10-09 Gabor Loki - - Rubber-stamped by Eric Seidel. - - Add ARM JIT support for Gtk port (disabled by default) - https://bugs.webkit.org/show_bug.cgi?id=30228 - - * GNUmakefile.am: - -2009-10-08 Geoffrey Garen - - Tiger build fix: added a few more variable initializations. - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncSearch): - -2009-10-08 Geoffrey Garen - - Qt build fix: added missing #include. - - * jsc.cpp: - -2009-10-08 Geoffrey Garen - - Tiger build fix: initialize variable whose initialization the compiler - can't otherwise figure out. - - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::match): - -2009-10-08 Geoffrey Garen - - Windows build fix: updated exports. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-10-08 Geoffrey Garen - - Tiger build fix: fixed file name case. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-10-08 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - At long last, I pronounce the death of AllInOneFile.cpp. - - SunSpider reports a 1.01x speedup. - - * AllInOneFile.cpp: Removed. - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.xcodeproj/project.pbxproj: Added missing project files - to compilation stages. - - * parser/Grammar.y: - * parser/Lexer.cpp: - * parser/Lexer.h: - (JSC::jscyylex): - * runtime/ArrayConstructor.cpp: - (JSC::constructArrayWithSizeQuirk): - * runtime/Collector.h: - * runtime/JSCell.cpp: - (JSC::JSCell::operator new): - * runtime/JSCell.h: - (JSC::JSCell::operator new): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::operator new): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::operator new): - * runtime/JSString.cpp: - * runtime/JSString.h: - (JSC::jsString): - (JSC::jsSubstring): - (JSC::jsOwnedString): - * runtime/RegExpConstructor.cpp: - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate): - (JSC::RegExpConstructorPrivate::lastOvector): - (JSC::RegExpConstructorPrivate::tempOvector): - (JSC::RegExpConstructorPrivate::changeLastOvector): - (JSC::RegExpConstructor::performMatch): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncMatch): - * yarr/RegexJIT.cpp: - * yarr/RegexJIT.h: - (JSC::Yarr::executeRegex): Inlined a few things that Shark said - were hot, on the presumption that AllInOneFile.cpp used to inline them - automatically. - -2009-10-08 Zoltan Herczeg - - Reviewed by Gavin Barraclough. - - Fix for JIT'ed op_call instructions (evals, constructs, etc.) - when !ENABLE(JIT_OPTIMIZE_CALL) && USE(JSVALUE32_64) - - https://bugs.webkit.org/show_bug.cgi?id=30201 - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - -2009-10-07 Geoffrey Garen - - Windows build fix: removed no longer exported symbol. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-10-07 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed Database code takes JSLock on secondary - thread, permanently slowing down JavaScript - - Removed the optional lock from Heap::protect, Heap::unprotect, and friends, - since WebCore no longer uses it. - - * JavaScriptCore.exp: - * runtime/Collector.cpp: - (JSC::Heap::protect): - (JSC::Heap::unprotect): - (JSC::Heap::markProtectedObjects): - (JSC::Heap::protectedGlobalObjectCount): - (JSC::Heap::protectedObjectCount): - (JSC::Heap::protectedObjectTypeCounts): - * runtime/Collector.h: - -2009-10-07 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for JavaScriptCore's IdentifierArena - https://bugs.webkit.org/show_bug.cgi?id=30158 - - Inherits IdentifierArena class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/parser/ParserArena.cpp:36. - - * parser/ParserArena.h: - -2009-10-07 Adam Roben - - Export DateInstance::info in a way that works on Windows - - Fixes - fast/dom/Window/window-postmessage-clone.html fails on Windows - - Reviewed by Anders Carlsson. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - Removed the export of DateInstance::info from here. - - * runtime/DateInstance.h: Use JS_EXPORTDATA to export - DateInstance::info, which is the required way of exporting data on - Windows. - -2009-10-07 Jørgen Lind - - Reviewed by Simon Hausmann. - - When enabling or disabling the JIT through .qmake.cache, make sure - to also toggle ENABLE_YARR_JIT. - - * JavaScriptCore.pri: - -2009-10-06 Priit Laes - - Reviewed by Gavin Barraclough. - - Linking fails with "relocation R_X86_64_PC32 against symbol - `cti_vm_throw'" - https://bugs.webkit.org/show_bug.cgi?id=28422 - - * jit/JITStubs.cpp: - Mark cti_vm_throw symbol as PLT-indirect symbol, so it doesn't end up - in text segment causing relocation errors on amd64 architecture. - Introduced new define SYMBOL_STRING_RELOCATION for such symbols. - -2009-10-06 Oliver Hunt - - Windows linking fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-10-06 Oliver Hunt - - Reviewed by NOBODY (build fix). - - Windows build fix. - - * runtime/DateInstance.cpp: - -2009-10-05 Oliver Hunt - - Reviewed by Gavin Barraclough. - - It should be possible to post (clone) built-in JS objects to Workers - https://bugs.webkit.org/show_bug.cgi?id=22878 - - Expose helpers to throw correct exceptions during object graph walk - used for cloning and add a helper function to create Date instances - without going through the JS Date constructor function. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DateInstance.h: - * runtime/ExceptionHelpers.cpp: - (JSC::createTypeError): - * runtime/ExceptionHelpers.h: - -2009-10-06 David Levin - - Reviewed by Oliver Hunt. - - StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer. - https://bugs.webkit.org/show_bug.cgi?id=30095 - - * wtf/CrossThreadRefCounted.h: - Removed an unused function and assert improvement. - (WTF::CrossThreadRefCounted::isOwnedByCurrentThread): Moved out common code from asserts. - (WTF::CrossThreadRefCounted::ref): Changed assert to use the common method. - (WTF::CrossThreadRefCounted::deref): Changed assert to use the common method. - (WTF::CrossThreadRefCounted::crossThreadCopy): Since this includes a potentially - non-threadsafe operation, add an assert that the class is owned by the current thread. - -2009-10-05 Kevin Ollivier - - wx build fix. Add Symbian files to the list of excludes. - - * wscript: - -2009-10-05 Jocelyn Turcotte - - Reviewed by Simon Hausmann. - - [Qt] Remove precompiled header from JavaScriptCore compilation to - prevent qmake warning during autonomous compilation. - https://bugs.webkit.org/show_bug.cgi?id=30069 - - * JavaScriptCore.pro: - -2009-10-02 Geoffrey Garen - - Reviewed by Sam Weinig. - - Removed the concept of a "fast access cutoff" in arrays, because it - punished some patterns of array access too much, and made things too - complex for inlining in some cases. - - 1.3% speedup on SunSpider. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - * jit/JITStubs.cpp: - * jit/JITStubs.h: - (JSC::): Check m_vectorLength instead of m_fastAccessCutoff when - getting / putting from / to an array. Inline putting past the end of - the array. - - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::getOwnPropertyNames): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::sort): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToRegisters): - (JSC::JSArray::compactForSorting): - (JSC::JSArray::checkConsistency): - * runtime/JSArray.h: - (JSC::JSArray::canGetIndex): - (JSC::JSArray::canSetIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::markChildrenDirect): Removed m_fastAccessCutoff, and - replaced with checks for JSValue() to detect reads and writes from / to - uninitialized parts of the array. - -2009-10-02 Jonni Rainisto - - Reviewed by Darin Adler. - - Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined - https://bugs.webkit.org/show_bug.cgi?id=29956 - - * wtf/RandomNumber.cpp: - (WTF::randomNumber): Added PLATFORM(WIN_OS) to handle 15bit rand() - -2009-10-02 Geoffrey Garen - - Reviewed by Sam Weinig. - - Take one branch instead of two to test for JSValue(). - - 1.1% SunSpider speedup. - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emit_op_create_arguments): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead - of testing for the cell tag with a 0 payload. - - * runtime/JSValue.cpp: - (JSC::JSValue::description): Added support for dumping the new empty value, - and deleted values, in debug builds. - - * runtime/JSValue.h: - (JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag. - - (JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value - tag, to avoid having two different c++ versions of null / empty. - - (JSC::JSValue::operator bool): Test for the empty value tag, instead - of testing for the cell tag with a 0 payload. - -2009-10-02 Steve Falkenburg - - Reviewed by Mark Rowe. - - - Safari version number shouldn't be exposed in WebKit code - - For a WebKit version of 532.3.4: - Product version is: 5.32.3.4 (was 4.0.3.0) - File version is: 5.32.3.4 (was 4.532.3.4) - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: - -2009-10-02 Tor Arne Vestbø - - Rubber-stamped by Simon Hausmann. - - Fix the Qt on Mac OS X build. - - * wtf/FastMalloc.cpp: - -2009-10-02 Jørgen Lind - - Reviewed by Simon Hausmann. - - Allow enabling and disabling of the JIT through a qmake variable. - - Qt's configure may set this variable through .qmake.cache if a - commandline option is given and/or the compile test for hwcap.h - failed/succeeded. - - * JavaScriptCore.pri: - -2009-10-01 Mark Rowe - - Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger. - - * Configurations/FeatureDefines.xcconfig: - -2009-10-01 Yongjun Zhang - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=29187 - - Don't inline ~ListRefPtr() to work around winscw compiler forward declaration - bug regarding templated classes. - - The compiler bug is reported at: - https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812 - - The change will be reverted when the above bug is fixed in winscw compiler. - - * wtf/ListRefPtr.h: - (WTF::::~ListRefPtr): - -2009-10-01 Zoltan Horvath - - Reviewed by Simon Hausmann. - - [Qt] Allow custom memory allocation control for the whole JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=27029 - - Since in JavaScriptCore almost every class which has been instantiated by operator new is - inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port - when USE_SYSTEM_MALLOC=0. - - Add #include to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread(). - (It's needed for the functionality of TCmalloc.) - - Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled. - - * JavaScriptCore.pri: - * wtf/FastMalloc.cpp: - (WTF::sleep): - * wtf/FastMalloc.h: - -2009-09-30 Gabor Loki - - Reviewed by George Staikos. - - Defines two pseudo-platforms for ARM and Thumb-2 instruction set. - https://bugs.webkit.org/show_bug.cgi?id=29122 - - Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2 - macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used - when Thumb-2 instruction set is the required target. The - PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In - case where the code is common the PLATFORM(ARM) have to be used. - - Modified by George Wright to correctly work - with the RVCT-defined __TARGET_ARCH_ARM and __TARGET_ARCH_THUMB - compiler macros, as well as adding readability changes. - - * wtf/Platform.h: - -2009-09-30 Oliver Hunt - - Reviewed by Geoff Garen. - - Devirtualise array toString conversion - - Tweak the implementation of Array.prototype.toString to have a fast path - when acting on a true JSArray. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - -2009-09-30 Csaba Osztrogonac - - Reviewed by Geoffrey Garen. - - Buildfix for platforms using JSVALUE32. - https://bugs.webkit.org/show_bug.cgi?id=29915 - - After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case. - Also removed unreachable code. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_add): - - Declaration of "OperandTypes types" moved before first use. - - Typos fixed: dst modified to result, regT2 added. - - Unreachable code removed. - (JSC::JIT::emitSlow_op_add): - - Missing declaration of "OperandTypes types" added. - -2009-09-30 Janne Koskinen - - Reviewed by Simon Hausmann. - - Reduce heap size on Symbian from 64MB to 8MB. - - This is not a perfect fix, it requires more fine tuning. - But this makes it possible again to debug in the emulator, - which is more important in order to be able to fix other - run-time issues. - - * runtime/Collector.h: - -2009-09-30 Janne Koskinen - - Reviewed by Simon Hausmann. - - Fix CRASH() macro for Symbian build. - - * wtf/Assertions.h: Added missing } - -2009-09-29 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Inlined a few math operations. - - ~1% SunSpider speedup. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on - a constant int and a double. - -2009-09-28 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Tidy up codeblock sampler - https://bugs.webkit.org/show_bug.cgi?id=29836 - - Some rather simple refactoring of codeblock sampler so that - it's easier for us to use it to find problems in non-jsc - environments - - * JavaScriptCore.exp: - * bytecode/SamplingTool.h: - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::Interpreter): - (JSC::Interpreter::execute): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::enableSampler): - (JSC::Interpreter::dumpSampleData): - (JSC::Interpreter::startSampling): - (JSC::Interpreter::stopSampling): - * interpreter/Interpreter.h: - (JSC::Interpreter::sampler): - * jit/JIT.h: - * jsc.cpp: - (runWithScripts): - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - * runtime/Executable.h: - (JSC::EvalExecutable::EvalExecutable): - (JSC::ProgramExecutable::create): - (JSC::ProgramExecutable::ProgramExecutable): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::startSampling): - (JSC::JSGlobalData::stopSampling): - (JSC::JSGlobalData::dumpSampleData): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - -2009-09-29 Jeremy Orlow - - Reviewed by Dimitri Glazkov. - - Add GYP generated files to svn:ignore - https://bugs.webkit.org/show_bug.cgi?id=29895 - - The following files are generated by JavaScriptCore's GYP file and should be ignored: - - pcre.mk - wtf.scons - wtf.mk - SConstruct - wtf_config.scons - wtf_config.mk - pcre.scons - - * JavaScriptCore.gyp: Changed property svn:ignore. - -2009-09-29 Geoffrey Garen - - Reviewed by Sam Weinig. - - Standardized an optimization for adding non-numbers. - - SunSpider says maybe a tiny speedup. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_add): - (JSC::JIT::emitSlow_op_add): - -2009-09-29 Geoffrey Garen - - Windows build fix: export a new symbol. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-28 Geoffrey Garen - - Reviewed by Sam Weinig. - - Removed virtual destructor from JSGlobalObjectData to eliminate pointer - fix-ups when accessing JSGlobalObject::d. - - Replaced with an explicit destructor function pointer. - - 6% speedup on bench-alloc-nonretained.js. - - * JavaScriptCore.exp: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::~JSGlobalObject): - (JSC::JSGlobalObject::destroyJSGlobalObjectData): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (JSC::JSGlobalObject::JSGlobalObject): - -2009-09-29 Janne Koskinen - - Reviewed by David Kilzer. - - [Qt] Assert messages prints visible in Symbian - https://bugs.webkit.org/show_bug.cgi?id=29808 - - Asserts use vprintf to print the messages to stderr. - In Symbian Open C it is not possible to see stderr so - I routed the messages to stdout instead. - - * wtf/Assertions.cpp: - -2009-09-29 Janne Koskinen - - Reviewed by Darin Adler. - - [Qt] Symbian CRASH macro implementation - - Added Symbian specific crash macro that - stops to crash line if JIT debugging is used. - Additional differentiation of access violation - (KERN-EXEC 3) and CRASH panic. - - * wtf/Assertions.h: - -2009-09-28 Mark Rowe - - Fix the PowerPC build. - - * JavaScriptCore.exp: - -2009-09-28 Mark Rowe - - Reviewed by Gavin Barraclough. - - JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC. - - * runtime/Collector.cpp: - (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer - to ensure that we correctly interpret the contents of registers during marking. - -2009-09-28 Geoffrey Garen - - Windows build fix: added new exports. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-28 Geoffrey Garen - - Windows build fix: removed exports that no longer exist. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-28 Geoffrey Garen - - Reviewed by Darin Adler. - - NotNullPassRefPtr: smart pointer optimized for passing references that are not null - https://bugs.webkit.org/show_bug.cgi?id=29822 - - Added NotNullPassRefPtr, and deployed it in all places that initialize - JavaScript objects. - - 2.2% speedup on bench-allocate-nonretained.js. - - * API/JSCallbackConstructor.cpp: - (JSC::JSCallbackConstructor::JSCallbackConstructor): - * API/JSCallbackConstructor.h: - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::JSCallbackObject::JSCallbackObject): - * JavaScriptCore.exp: - * bytecode/CodeBlock.h: - (JSC::CodeBlock::addFunctionDecl): - (JSC::CodeBlock::addFunctionExpr): - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - * runtime/ArrayConstructor.h: - * runtime/ArrayPrototype.cpp: - (JSC::ArrayPrototype::ArrayPrototype): - * runtime/ArrayPrototype.h: - * runtime/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - * runtime/BooleanConstructor.h: - * runtime/BooleanObject.cpp: - (JSC::BooleanObject::BooleanObject): - * runtime/BooleanObject.h: - * runtime/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * runtime/BooleanPrototype.h: - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * runtime/DateConstructor.h: - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DateInstance.h: - * runtime/DatePrototype.cpp: - (JSC::DatePrototype::DatePrototype): - * runtime/DatePrototype.h: - * runtime/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * runtime/ErrorConstructor.h: - * runtime/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - * runtime/ErrorInstance.h: - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/ErrorPrototype.h: - * runtime/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * runtime/FunctionConstructor.h: - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - * runtime/FunctionPrototype.h: - * runtime/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::GlobalEvalFunction): - * runtime/GlobalEvalFunction.h: - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * runtime/InternalFunction.h: - (JSC::InternalFunction::InternalFunction): - * runtime/JSActivation.cpp: - (JSC::JSActivation::JSActivation): - * runtime/JSActivation.h: - (JSC::JSActivation::JSActivationData::JSActivationData): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - * runtime/JSArray.h: - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::JSByteArray): - * runtime/JSByteArray.h: - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - * runtime/JSFunction.h: - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObject): - * runtime/JSONObject.h: - (JSC::JSONObject::JSONObject): - * runtime/JSObject.h: - (JSC::JSObject::JSObject): - (JSC::JSObject::setStructure): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::JSVariableObject): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::JSWrapperObject): - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - * runtime/MathObject.h: - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/NativeErrorConstructor.h: - * runtime/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * runtime/NativeErrorPrototype.h: - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - * runtime/NumberConstructor.h: - * runtime/NumberObject.cpp: - (JSC::NumberObject::NumberObject): - * runtime/NumberObject.h: - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * runtime/NumberPrototype.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - * runtime/ObjectConstructor.h: - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): - * runtime/ObjectPrototype.h: - * runtime/PropertyNameArray.h: - (JSC::PropertyNameArrayData::setCachedPrototypeChain): - * runtime/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * runtime/PrototypeFunction.h: - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - * runtime/RegExpConstructor.h: - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::RegExpObject): - * runtime/RegExpObject.h: - (JSC::RegExpObject::RegExpObjectData::RegExpObjectData): - * runtime/RegExpPrototype.cpp: - (JSC::RegExpPrototype::RegExpPrototype): - * runtime/RegExpPrototype.h: - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * runtime/StringConstructor.h: - * runtime/StringObject.cpp: - (JSC::StringObject::StringObject): - * runtime/StringObject.h: - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined): - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * runtime/StringPrototype.h: - * wtf/PassRefPtr.h: - (WTF::NotNullPassRefPtr::NotNullPassRefPtr): - (WTF::NotNullPassRefPtr::~NotNullPassRefPtr): - (WTF::NotNullPassRefPtr::get): - (WTF::NotNullPassRefPtr::clear): - (WTF::NotNullPassRefPtr::releaseRef): - (WTF::NotNullPassRefPtr::operator*): - (WTF::NotNullPassRefPtr::operator->): - (WTF::NotNullPassRefPtr::operator!): - (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType): - * wtf/RefPtr.h: - (WTF::RefPtr::RefPtr): - (WTF::operator==): - -2009-09-28 Oliver Hunt - - Reviewed by Geoff Garen. - - Hard dependency on SSE2 instruction set with JIT - https://bugs.webkit.org/show_bug.cgi?id=29779 - - Add floating point support checks to op_jfalse and op_jtrue, and - fix the logic for the slow case of op_add - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_add): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): - -2009-09-28 Yaar Schnitman - - Reviewed by Dimitri Glazkov. - - Chromium port - recognize we are being built independently - of chromium and look for dependencies under webkit/chromium rather - than chromium/src. - - https://bugs.webkit.org/show_bug.cgi?id=29722 - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - -2009-09-28 Jakub Wieczorek - - Reviewed by Simon Hausmann. - - [Qt] Implement XSLT support with QtXmlPatterns. - https://bugs.webkit.org/show_bug.cgi?id=28303 - - * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define. - -2009-09-28 Gabor Loki - - Reviewed by Simon Hausmann. - - Remove __clear_cache which is an internal function of GCC - https://bugs.webkit.org/show_bug.cgi?id=28886 - - Although __clear_cache is exported from GCC, this is an internal - function. GCC makes no promises about it. - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - -2009-09-28 Sam Weinig - - Reviewed by Oliver Hunt. - - Fix an absolute path to somewhere in Oliver's machine to a relative path - for derived JSONObject.lut.h. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-09-28 Joerg Bornemann - - Reviewed by Simon Hausmann. - - Add ARM version detection for Windows CE. - - * wtf/Platform.h: - -2009-09-26 Yongjun Zhang - - Reviewed by Simon Hausmann. - - Add MarkStackSymbian.cpp to build JavascriptCore for Symbian. - - Re-use Windows shrinkAllocation implementation because Symbian doesn't - support releasing part of memory region. - - Use fastMalloc and fastFree to implement allocateStack and releaseStack - for Symbian port. - - * JavaScriptCore.pri: - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - * runtime/MarkStackSymbian.cpp: Added. - (JSC::MarkStack::initializePagesize): - (JSC::MarkStack::allocateStack): - (JSC::MarkStack::releaseStack): - -2009-09-25 Gabor Loki - - Reviewed by Gavin Barraclough. - - Fix unaligned data access in YARR_JIT on ARMv5 and below. - https://bugs.webkit.org/show_bug.cgi?id=29695 - - On ARMv5 and below all data access should be naturally aligned. - In the YARR_JIT there is a case when character pairs are - loaded from the input string, but this data access is not - naturally aligned. This fix introduces load32WithUnalignedHalfWords - and branch32WithUnalignedHalfWords functions which contain - naturally aligned memory loads - half word loads - on ARMv5 and below. - - * assembler/MacroAssemblerARM.cpp: - (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords): - (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords): - (JSC::MacroAssemblerARMv7::branch32): - (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords): - (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords): - * wtf/Platform.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generatePatternCharacterPair): - -2009-09-25 Jeremy Orlow - - This is breaking Chromium try bots, so I'm counting this as a build fix. - - Add more svn:ignore exceptions. On different platforms, these files are - generated with different case for JavaScriptCore. Also there are some - wtf project files that get built apparently. - - * JavaScriptCore.gyp: Changed property svn:ignore. - -2009-09-25 Ada Chan - - Build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-25 Geoffrey Garen - - Reviewed by Darin Adler. - - Inlined some object creation code, including lexicalGlobalObject access - https://bugs.webkit.org/show_bug.cgi?id=29750 - - SunSpider says 0.5% faster. - - 0.8% speedup on bench-alloc-nonretained.js. - 2.5% speedup on v8-splay.js. - - * interpreter/CachedCall.h: - (JSC::CachedCall::CachedCall): - * interpreter/CallFrame.h: - (JSC::ExecState::lexicalGlobalObject): - (JSC::ExecState::globalThisValue): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): - (JSC::Interpreter::execute): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/ScopeChain.cpp: - (JSC::ScopeChainNode::print): - * runtime/ScopeChain.h: - (JSC::ScopeChainNode::ScopeChainNode): - (JSC::ScopeChainNode::~ScopeChainNode): - (JSC::ScopeChainNode::push): - (JSC::ScopeChain::ScopeChain): - (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode. - Replaced accessor function for globalObject() with data member. Replaced - globalThisObject() accessor with direct access to globalThis, to match. - - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): - * runtime/JSGlobalObject.h: Inlined array and object construction. - -2009-09-25 Laszlo Gombos - - Reviewed by Gavin Barraclough. - - Add ARM version detection rules for Symbian - https://bugs.webkit.org/show_bug.cgi?id=29715 - - * wtf/Platform.h: - -2009-09-24 Xan Lopez - - Reviewed by Mark "Do It!" Rowe. - - Some GCC versions don't like C++-style comments in preprocessor - directives, change to C-style to shut them up. - - * wtf/Platform.h: - -2009-09-24 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Division is needlessly slow in 64-bit - https://bugs.webkit.org/show_bug.cgi?id=29723 - - Add codegen for op_div on x86-64 - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::emit_op_div): - (JSC::JIT::emitSlow_op_div): - * jit/JITInlineMethods.h: - (JSC::JIT::isOperandConstantImmediateDouble): - (JSC::JIT::addressFor): - (JSC::JIT::emitLoadDouble): - (JSC::JIT::emitLoadInt32ToDouble): - (JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber): - -2009-09-24 Jeremy Orlow - - Reviewed by Dimitri Glazkov. - - Add GYP generated files to svn:ignore - https://bugs.webkit.org/show_bug.cgi?id=29724 - - Adding the following files to the svn:ignore list (all in the - JavaScriptCore/JavaScriptCore.gyp directory) - - JavaScriptCore.xcodeproj - JavaScriptCore.sln - JavaScriptCore.vcproj - JavaScriptCore_Debug.rules - JavaScriptCore_Release.rules - JavaScriptCore_Release - no tcmalloc.rules - JavaScriptCore_Purify.rules - JavaScriptCore.mk - JavaScriptCore_Debug_rules.mk - JavaScriptCore_Release_rules.mk - JavaScriptCore_Release - no tcmalloc_rules.mk - JavaScriptCore_Purify_rules.mk - JavaScriptCore.scons - JavaScriptCore_main.scons - - * JavaScriptCore.gyp: Changed property svn:ignore. - -2009-09-24 Yong Li - - Reviewed by Adam Barth. - - Replace platform-dependent code with WTF::currentTime() - https://bugs.webkit.org/show_bug.cgi?id=29148 - - * jsc.cpp: - (StopWatch::start): - (StopWatch::stop): - (StopWatch::getElapsedMS): - * runtime/TimeoutChecker.cpp: - (JSC::getCPUTime): - -2009-09-24 Mark Rowe - - Reviewed by Sam Weinig. - - FastMalloc scavenging thread should be named - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::scavengerThread): Set the thread name. - * wtf/Platform.h: Move the knowledge of whether pthread_setname_np exists to here as HAVE(PTHREAD_SETNAME_NP). - * wtf/ThreadingPthreads.cpp: - (WTF::setThreadNameInternal): Use HAVE(PTHREAD_SETNAME_NP). - -2009-09-24 Geoffrey Garen - - Reviewed by Sam Weinig. - - Renamed clear to removeAll, as suggested by Darin Adler. - - * wtf/HashCountedSet.h: - (WTF::::removeAll): - -2009-09-24 Mark Rowe - - Reviewed by Gavin Barraclough. - - Fix FastMalloc to build with assertions enabled. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_Central_FreeList::ReleaseToSpans): - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::IsHeld): - -2009-09-24 Geoffrey Garen - - Suggested by Darin Adler. - - Removed some unnecessary parameter names. - - * wtf/HashCountedSet.h: - -2009-09-24 Janne Koskinen - - Reviewed by Simon Hausmann. - - On Windows JSChar is typedef'ed to wchar_t. - - When building with WINSCW for Symbian we need to do the - same typedef. - - * API/JSStringRef.h: - -2009-09-23 Geoffrey Garen - - A piece of my last patch that I forgot. - - * wtf/HashCountedSet.h: - (WTF::::clear): Added HashCountedSet::clear. - -2009-09-24 Gabor Loki - - Reviewed by Gavin Barraclough. - - Avoid __clear_cache built-in function if DISABLE_BUILTIN_CLEAR_CACHE define is set - https://bugs.webkit.org/show_bug.cgi?id=28886 - - There are some GCC packages (for example GCC-2006q3 from CodeSourcery) - which contain __clear_cache built-in function only for C while the C++ - version of __clear_cache is missing on ARM architectures. - - Fixed a small bug in the inline assembly of cacheFlush function on - ARM_TRADITIONAL. - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - -2009-09-23 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added the ability to swap vectors with inline capacities, so you can - store a vector with inline capacity in a hash table. - - * wtf/Vector.h: - (WTF::swap): - (WTF::VectorBuffer::swap): - -2009-09-23 David Kilzer - - Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h - - Reviewed by Mark Rowe. - - * wtf/Platform.h: Define WTF_USE_PLUGIN_HOST_PROCESS to 1 when - building on 64-bit SnowLeopard. Define to 0 elsewhere. - -2009-09-22 Oliver Hunt - - Reviewed by Geoff Garen. - - Code sampling builds are broken. - https://bugs.webkit.org/show_bug.cgi?id=29662 - - Fix build. - - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * bytecode/SamplingTool.cpp: - (JSC::ScriptSampleRecord::sample): - (JSC::SamplingTool::doRun): - (JSC::SamplingTool::notifyOfScope): - (JSC::compareScriptSampleRecords): - (JSC::SamplingTool::dump): - * bytecode/SamplingTool.h: - (JSC::ScriptSampleRecord::ScriptSampleRecord): - (JSC::ScriptSampleRecord::~ScriptSampleRecord): - (JSC::SamplingTool::SamplingTool): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitNewFunctionExpression): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::makeFunction): - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * parser/Nodes.cpp: - (JSC::ScopeNode::ScopeNode): - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::fromGlobalCode): - * runtime/Executable.h: - (JSC::ScriptExecutable::ScriptExecutable): - (JSC::EvalExecutable::EvalExecutable): - (JSC::EvalExecutable::create): - (JSC::ProgramExecutable::ProgramExecutable): - (JSC::FunctionExecutable::create): - (JSC::FunctionExecutable::FunctionExecutable): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - -2009-09-22 Darin Adler - - Reviewed by Sam Weinig. - - * wtf/Forward.h: Added PassOwnPtr. - -2009-09-22 Yaar Schnitman - - Reviewed by David Levin. - - Ported chromium.org's javascriptcore.gyp for the webkit chromium port. - - https://bugs.webkit.org/show_bug.cgi?id=29617 - - * JavaScriptCore.gyp/JavaScriptCore.gyp: Added. - -2009-09-22 Thiago Macieira - - Reviewed by Simon Hausmann. - - Fix compilation with WINSCW: no varargs macros - - Disable variadic arguments for WINSCW just like we do - for MSVC7. - - * wtf/Assertions.h: - -2009-09-22 Kent Hansen - - Reviewed by Simon Hausmann. - - Disable variadic macros on MSVC7. - - This was originally added in r26589 but not extended - when LOG_DISABLED/ASSERT_DISABLED was introduced. - - * wtf/Assertions.h: - -2009-09-22 Simon Hausmann - - Unreviewed build fix for Windows CE < 5 - - Define WINCEBASIC to disable the IsDebuggerPresent() code in - wtf/Assertions.cpp. - - * JavaScriptCore.pri: - -2009-09-22 Joerg Bornemann - - Reviewed by Simon Hausmann. - - Fix major memory leak in JavaScriptCore RegisterFile on Windows CE - - https://bugs.webkit.org/show_bug.cgi?id=29367 - - On Widows CE we must decommit all committed pages before we release - them. See VirtualFree documentation. - Desktop Windows behaves much smoother in this situation. - - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::~RegisterFile): - -2009-09-21 Greg Bolsinga - - Reviewed by Simon Fraser & Sam Weinig. - - Add ENABLE(ORIENTATION_EVENTS) - https://bugs.webkit.org/show_bug.cgi?id=29508 - - * wtf/Platform.h: Also sort PLATFORM(IPHONE) #defines. - -2009-09-21 Jedrzej Nowacki - - Reviewed by Eric Seidel. - - [Fix] SourceCode's uninitialized member - - Potential source of crashes and bugs was fixed. Default constructor - didn't initialized m_provider member. - - https://bugs.webkit.org/show_bug.cgi?id=29364 - - * parser/SourceCode.h: - (JSC::SourceCode::SourceCode): - -2009-09-21 Oliver Hunt - - Reviewed by Geoff Garen. - - REGRESSION (r48582): Crash in StructureStubInfo::initPutByIdTransition when reloading trac.webkit.org - https://bugs.webkit.org/show_bug.cgi?id=29599 - - It is unsafe to attempt to cache new property transitions on - dictionaries of any type. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCachePutByID): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - -2009-09-21 Oliver Hunt - - RS=Maciej Stachowiak. - - Re-land SNES fix with corrected assertion. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::tryCacheGetByID): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): - * runtime/JSObject.cpp: - (JSC::JSObject::removeDirect): - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::getEnumerablePropertyNames): - (JSC::Structure::despecifyDictionaryFunction): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::removePropertyTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::toCacheableDictionaryTransition): - (JSC::Structure::toUncacheableDictionaryTransition): - (JSC::Structure::fromDictionaryTransition): - (JSC::Structure::removePropertyWithoutTransition): - * runtime/Structure.h: - (JSC::Structure::isDictionary): - (JSC::Structure::isUncacheableDictionary): - (JSC::Structure::): - * runtime/StructureChain.cpp: - (JSC::StructureChain::isCacheable): - -2009-09-21 Adam Roben - - Revert r48573, as it caused many assertion failures - - * interpreter/Interpreter.cpp: - * jit/JITStubs.cpp: - * runtime/BatchedTransitionOptimizer.h: - * runtime/JSObject.cpp: - * runtime/Structure.cpp: - * runtime/Structure.h: - * runtime/StructureChain.cpp: - -2009-09-21 Gustavo Noronha Silva - - Unreviewed make dist build fix. Missing files. - - * GNUmakefile.am: - -2009-09-19 Gavin Barraclough - - Reviewed by Sam 'Cabin Boy' Weinig. - - Fix stack alignment with ARM THUMB2 JIT. - https://bugs.webkit.org/show_bug.cgi?id=29526 - - Stack is currently being decremented by 0x3c, bump this to 0x40 to make this a - multiple of 16 bytes. - - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - * jit/JITStubs.h: - -2009-09-20 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - SNES is too slow - https://bugs.webkit.org/show_bug.cgi?id=29534 - - The problem was that the emulator used multiple classes with - more properties than our dictionary cutoff allowed, this resulted - in more or less all critical logic inside the emulator requiring - uncached property access. - - Rather than simply bumping the dictionary cutoff, this patch - recognises that there are two ways to create a "dictionary" - structure. Either by adding a large number of properties, or - by removing a property. In the case of adding properties we - know all the existing properties will maintain their existing - offsets, so we could cache access to those properties, if we - know they won't be removed. - - To make this possible, this patch adds the logic required to - distinguish a dictionary created by addition from one created - by removal. With this logic in place we can now cache access - to objects with large numbers of properties. - - SNES performance improved by more than 6x. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::tryCacheGetByID): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): - * runtime/JSObject.cpp: - (JSC::JSObject::removeDirect): - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::getEnumerablePropertyNames): - (JSC::Structure::despecifyDictionaryFunction): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::removePropertyTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::toCacheableDictionaryTransition): - (JSC::Structure::toUncacheableDictionaryTransition): - (JSC::Structure::fromDictionaryTransition): - (JSC::Structure::removePropertyWithoutTransition): - * runtime/Structure.h: - (JSC::Structure::isDictionary): - (JSC::Structure::isUncacheableDictionary): - (JSC::Structure::): - * runtime/StructureChain.cpp: - (JSC::StructureChain::isCacheable): - -2009-09-19 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Implement ES5 Object.create function - https://bugs.webkit.org/show_bug.cgi?id=29524 - - Implement Object.create. Very simple patch, effectively Object.defineProperties - only creating the target object itself. - - * runtime/CommonIdentifiers.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorCreate): - -2009-09-19 Dan Bernstein - - Fix clean debug builds. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-19 Joerg Bornemann - - Reviewed by George Staikos. - - QtWebKit Windows CE compile fix - - https://bugs.webkit.org/show_bug.cgi?id=29379 - - There is no _aligned_alloc or _aligned_free on Windows CE. - We just use the Windows code that was there before and use VirtualAlloc. - But that also means that the BLOCK_SIZE must be 64K as this function - allocates on 64K boundaries. - - * runtime/Collector.cpp: - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlock): - * runtime/Collector.h: - -2009-09-19 Oliver Hunt - - Reviewed by Sam Weinig. - - Implement ES5 Object.defineProperties function - https://bugs.webkit.org/show_bug.cgi?id=29522 - - Implement Object.defineProperties. Fairly simple patch, simply makes use of - existing functionality used for defineProperty. - - * runtime/CommonIdentifiers.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::defineProperties): - (JSC::objectConstructorDefineProperties): - -2009-09-19 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Windows build fix part2 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-19 Oliver Hunt - - Reviewed by NOBODY (Buildfix). - - Windows build fix part 1. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-18 Oliver Hunt - - Reviewed by Geoff Garen. - - Implement ES5 Object.defineProperty function - https://bugs.webkit.org/show_bug.cgi?id=29503 - - Implement Object.defineProperty. This requires adding the API to - ObjectConstructor, along with a helper function that implements the - ES5 internal [[ToPropertyDescriptor]] function. It then adds - JSObject::defineOwnProperty that implements the appropriate ES5 semantics. - Currently defineOwnProperty uses a delete followed by a put to redefine - attributes of a property, clearly this is less efficient than it could be - but we can improve this if it needs to be possible in future. - - * JavaScriptCore.exp: - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::defineGetter): - (JSC::DebuggerActivation::defineSetter): - * debugger/DebuggerActivation.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - Update defineGetter/Setter calls - * runtime/CommonIdentifiers.h: - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertySlot): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::defineGetter): - (JSC::JSGlobalObject::defineSetter): - * runtime/JSGlobalObject.h: - * runtime/JSObject.cpp: - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::putDescriptor): - (JSC::JSObject::defineOwnProperty): - * runtime/JSObject.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorGetOwnPropertyDescriptor): - (JSC::toPropertyDescriptor): - (JSC::objectConstructorDefineProperty): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncDefineGetter): - (JSC::objectProtoFuncDefineSetter): - * runtime/PropertyDescriptor.cpp: - (JSC::PropertyDescriptor::writable): - (JSC::PropertyDescriptor::enumerable): - (JSC::PropertyDescriptor::configurable): - (JSC::PropertyDescriptor::isDataDescriptor): - (JSC::PropertyDescriptor::isGenericDescriptor): - (JSC::PropertyDescriptor::isAccessorDescriptor): - (JSC::PropertyDescriptor::getter): - (JSC::PropertyDescriptor::setter): - (JSC::PropertyDescriptor::setDescriptor): - (JSC::PropertyDescriptor::setAccessorDescriptor): - (JSC::PropertyDescriptor::setWritable): - (JSC::PropertyDescriptor::setEnumerable): - (JSC::PropertyDescriptor::setConfigurable): - (JSC::PropertyDescriptor::setSetter): - (JSC::PropertyDescriptor::setGetter): - (JSC::PropertyDescriptor::equalTo): - (JSC::PropertyDescriptor::attributesEqual): - (JSC::PropertyDescriptor::attributesWithOverride): - * runtime/PropertyDescriptor.h: - (JSC::PropertyDescriptor::PropertyDescriptor): - (JSC::PropertyDescriptor::value): - (JSC::PropertyDescriptor::setValue): - (JSC::PropertyDescriptor::isEmpty): - (JSC::PropertyDescriptor::writablePresent): - (JSC::PropertyDescriptor::enumerablePresent): - (JSC::PropertyDescriptor::configurablePresent): - (JSC::PropertyDescriptor::setterPresent): - (JSC::PropertyDescriptor::getterPresent): - (JSC::PropertyDescriptor::operator==): - (JSC::PropertyDescriptor::): - -2009-09-18 Gabor Loki - - Reviewed by Gavin Barraclough. - - Build fix to enable ARM_THUMB2 on Linux - https://bugs.webkit.org/show_bug.cgi?id= - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - * jit/JITStubs.cpp: - * wtf/Platform.h: - -2009-09-18 Gabor Loki - - Reviewed by Gavin Barraclough. - - Defines two pseudo-platforms for ARM and Thumb-2 instruction set. - https://bugs.webkit.org/show_bug.cgi?id=29122 - - Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2 - macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used - when Thumb-2 instruction set is the required target. The - PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In - case where the code is common the PLATFORM(ARM) have to be used. - - * assembler/ARMAssembler.cpp: - * assembler/ARMAssembler.h: - * assembler/ARMv7Assembler.h: - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerARM.cpp: - * assembler/MacroAssemblerARM.h: - * assembler/MacroAssemblerCodeRef.h: - (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): - * jit/ExecutableAllocator.h: - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::beginUninterruptedSequence): - (JSC::JIT::preserveReturnAddressAfterCall): - (JSC::JIT::restoreReturnAddressBeforeReturn): - (JSC::JIT::restoreArgumentReference): - (JSC::JIT::restoreArgumentReferenceForTrampoline): - * jit/JITOpcodes.cpp: - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - * jit/JITStubs.h: - * wtf/Platform.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): - -2009-09-18 Joerg Bornemann - - Reviewed by Simon Hausmann. - - Fix the Qt/Windows CE build. - - * JavaScriptCore.pri: Build the ce_time.cpp functions from - within Qt externally. - * wtf/DateMath.cpp: Removed unnecessary Qt #ifdef, for the - Qt build these functions are no external, too. - -2009-09-17 Janne Koskinen - - Reviewed by Simon Hausmann. - - Symbian/WINSCW build fox. - - Repeat Q_OS_WIN wchar_t hack for WINSCW, similar to - revision 24774. - - WINSCW defines wchar_t, thus UChar has to be wchar_t - - * wtf/unicode/qt4/UnicodeQt4.h: - -2009-09-17 Janne Koskinen - - Reviewed by Simon Hausmann. - - Symbian/WINSCW build fix. - - https://bugs.webkit.org/show_bug.cgi?id=29186 - - WINSCW Template specialisation name in declaration must the be the same as in implementation. - - * runtime/LiteralParser.h: - -2009-09-15 Norbert Leser - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=27060 - - Symbian compiler for emulator target (WINSCW) fails with - "illegal operand" for m_attributesInPrevious in structure.ccp - (when calling make_pair functions). - This error is apparently due to the compiler not properly - resolving the unsigned type of the declared bitfield. - - Initial patch explicitly casted m_attributesInPrevious - to unsigned, but since bitfield optimization is not critical for - the emulator target, this conditional change in header file - appears to be least intrusive. - - * runtime/Structure.h: - -2009-09-16 Gabor Loki - - Reviewed by Darin Adler. - - Fix GCC warnings on ARM_THUMB2 platform - - * assembler/ARMv7Assembler.h: - (JSC::ARMThumbImmediate::countLeadingZerosPartial): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::branchTruncateDoubleToInt32): - (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding): - -2009-09-16 Greg Bolsinga - - Add ENABLE(INSPECTOR) - https://bugs.webkit.org/show_bug.cgi?id=29260 - - Reviewed by David Kilzer. - - * wtf/Platform.h: - -2009-09-16 Greg Bolsinga - - Add ENABLE(CONTEXT_MENUS) - https://bugs.webkit.org/show_bug.cgi?id=29225 - - Reviewed by David Kilzer. - - * wtf/Platform.h: - -2009-09-16 Benjamin C Meyer - - Reviewed by Eric Seidel. - - The webkit stdint and stdbool headers exists because - the compiler MSVC doesn't include them. The check - should not check for PLATFORM(WIN_OS) but for MSVC. - - * os-win32/stdbool.h: - * os-win32/stdint.h: - -2009-09-16 Greg Bolsinga - - Add ENABLE(DRAG_SUPPORT) - https://bugs.webkit.org/show_bug.cgi?id=29233 - - Reviewed by David Kilzer. - - * wtf/Platform.h: - -2009-09-16 Kevin Ollivier - - waf build fix after flag was moved to correct place. - - * wscript: - -2009-09-16 Tor Arne Vestbø - - Reviewed by Simon Hausmann. - - [Qt] Build fix for 64-bit Qt on Mac OS X - - * wtf/Platform.h: Use JSVALUE64 on DARWIN, not only on MAC - -2009-09-16 Zoltan Herczeg - - Reviewed by Simon Hausmann. - - [Qt] Fix wtf/ThreadSpecific.h under Qt to free thread local objects. - https://bugs.webkit.org/show_bug.cgi?id=29295 - - This is an important fix when JavaScript workers are in use, since - unfreed ThreadGlobalDatas leak a big amount of memory (50-100k each). - QThreadStorage calls the destructor of a given object, which is the - ThreadSpecific::Data. Unlike pthread, Qt is object oriented, and does - not support the calling of a static utility function when the thread - is about to close. In this patch we call the ThreadSpecific::destroy() - utility function from the destructor of ThreadSpecific::Data. Moreover, - since Qt resets all thread local values to 0 before the calling of the - appropriate destructors, we set back the pointer to its original value. - This is necessary because the get() method of the ThreadSpecific - object may be called during the exuction of the destructor. - - * wtf/ThreadSpecific.h: - (WTF::ThreadSpecific::Data::~Data): - (WTF::::~ThreadSpecific): - (WTF::::set): - (WTF::::destroy): - -2009-09-10 Oliver Hunt - - Reviewed by Geoff Garen. - - Allow anonymous storage inside JSObject - https://bugs.webkit.org/show_bug.cgi?id=29168 - - Add the concept of anonymous slots to Structures so that it is - possible to store references to values that need marking in the - standard JSObject storage buffer. This allows us to reduce the - malloc overhead of some objects (by allowing them to store JS - values in the inline storage of the object) and reduce the - dependence of custom mark functions (if all an objects children - are in the standard object property storage there's no need to - mark them manually). - - * JavaScriptCore.exp: - * runtime/JSObject.h: - (JSC::JSObject::putAnonymousValue): - (JSC::JSObject::getAnonymousValue): - (JSC::JSObject::addAnonymousSlots): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - (JSC::JSWrapperObject::JSWrapperObject): - (JSC::JSWrapperObject::setInternalValue): - * runtime/PropertyMapHashTable.h: - * runtime/Structure.cpp: - (JSC::Structure::~Structure): - (JSC::Structure::materializePropertyMap): - (JSC::Structure::addAnonymousSlotsTransition): - (JSC::Structure::copyPropertyTable): - (JSC::Structure::put): - (JSC::Structure::rehashPropertyMapHashTable): - * runtime/Structure.h: - (JSC::Structure::propertyStorageSize): - (JSC::StructureTransitionTable::reifySingleTransition): - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTable::TransitionTable::addSlotTransition): - (JSC::StructureTransitionTable::TransitionTable::removeSlotTransition): - (JSC::StructureTransitionTable::TransitionTable::getSlotTransition): - (JSC::StructureTransitionTable::getAnonymousSlotTransition): - (JSC::StructureTransitionTable::addAnonymousSlotTransition): - (JSC::StructureTransitionTable::removeAnonymousSlotTransition): - -2009-09-15 Alex Milowski - - Reviewed by Tor Arne Vestbø. - - Added the ENABLE_MATHML define to the features - - * Configurations/FeatureDefines.xcconfig: - -2009-09-15 Csaba Osztrogonac - - Reviewed by Tor Arne Vestbø. - - [Qt] Build fix for windows. - - After http://trac.webkit.org/changeset/47795 the MinGW build broke, - because MinGW has __mingw_aligned_malloc instead of _aligned_malloc. - - * runtime/Collector.cpp: - (JSC::Heap::allocateBlock): MinGW case added. - (JSC::Heap::freeBlock): MinGW case added. - -2009-09-15 Csaba Osztrogonac - - Reviewed by Tor Arne Vestbø. - - [Qt] Build fix for Windows/MinGW - - https://bugs.webkit.org/show_bug.cgi?id=29268 - - * wtf/Platform.h: JSVALUE32_64 temporarily disabled on PLATFORM(WIN_OS) with COMPILER(MINGW) - -2009-09-14 Gabor Loki - - Reviewed by Gavin Barraclough. - - Detect VFP at runtime in generic ARM port on Linux platform. - https://bugs.webkit.org/show_bug.cgi?id=29076 - - * JavaScriptCore.pri: - * assembler/MacroAssemblerARM.cpp: Added. - (JSC::isVFPPresent): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::supportsFloatingPoint): - -2009-09-14 Csaba Osztrogonac - - Reviewed by Tor Arne Vestbø. - - [Qt] Build fix for windows build. - - * JavaScriptCore.pri: Correct a logic error. - * pcre/dftables: Add missing paranthesis for tmpdir function. - -2009-09-12 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Build fix for windows exports (again). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-12 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Build fix for windows exports. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-12 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Correct fix for non-allinonefile builds - - * runtime/ObjectConstructor.cpp: - -2009-09-12 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Fix non-allinonefile builds - - * runtime/ObjectConstructor.cpp: - -2009-09-12 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - [ES5] Implement Object.keys - https://bugs.webkit.org/show_bug.cgi?id=29170 - - This patch basically requires two separate steps, the first is to split getPropertyNames - into two functions -- getOwnPropertyNames and getPropertyNames, basically making them behave - in the same way as getOwnPropertySlot and getPropertySlot. In essence getOwnPropertyNames - produces the list of properties on an object excluding its prototype chain and getPropertyNames - just iterates the the object and its prototype chain calling getOwnPropertyNames at each level. - - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertyNames): - * JavaScriptCore.exp: - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::getOwnPropertyNames): - * debugger/DebuggerActivation.h: - * runtime/CommonIdentifiers.h: - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertyNames): - * runtime/JSArray.h: - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::getOwnPropertyNames): - * runtime/JSByteArray.h: - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::getOwnPropertyNames): - * runtime/JSNotAnObject.h: - * runtime/JSObject.cpp: - (JSC::JSObject::getOwnPropertyNames): - * runtime/JSObject.h: - * runtime/JSVariableObject.cpp: - (JSC::JSVariableObject::getOwnPropertyNames): - * runtime/JSVariableObject.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorKeys): - * runtime/RegExpMatchesArray.h: - (JSC::RegExpMatchesArray::getOwnPropertyNames): - * runtime/StringObject.cpp: - (JSC::StringObject::getOwnPropertyNames): - * runtime/StringObject.h: - * runtime/Structure.cpp: - (JSC::Structure::getOwnEnumerablePropertyNames): - (JSC::Structure::getEnumerablePropertyNames): - * runtime/Structure.h: - -2009-09-11 Oliver Hunt - - Reviewed by Sam Weinig. - - getPropertyNames caching is invalid when the prototype chain contains objects with custom getPropertyNames - https://bugs.webkit.org/show_bug.cgi?id=29214 - - Add a flag to TypeInfo to indicate whether a type overrides getPropertyNames. - This flag is used to make sure that caching of the property name data is safe. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.h: - (JSC::JSObject::createStructure): - * runtime/JSTypeInfo.h: - (JSC::TypeInfo::hasDefaultGetPropertyNames): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StructureChain.cpp: - (JSC::StructureChain::isCacheable): - -2009-09-11 Alexey Proskuryakov - - Reviewed by Geoff Garen. - - https://bugs.webkit.org/show_bug.cgi?id=29207 - Add checks for using WebCore JS context on secondary threads - - * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - Added a new mainThreadOnly flag that WebCore would set. - - * runtime/Collector.cpp: (JSC::Heap::registerThread): JSC API methods always call this, - so this is a good place to check that the API isn't used form a wrong thread. - -2009-09-11 Jocelyn Turcotte - - Reviewed by Simon Hausmann. - - Compiling JavaScriptCore on sparc 64 with gcc fails. - - ThreadSafeShared uses the atomic __gnu_cxx::__exchange_and_add with an int, - however on sparc 64 the _Atomic_word argument is typedefed to long (8 bytes). - - The patch disables WTF_USE_LOCKFREE_THREADSAFESHARED in ThreadSafeShared to use - a mutex instead when compiling for sparc 64 with gcc. - - https://bugs.webkit.org/show_bug.cgi?id=29175 - - * wtf/Platform.h: - __sparc64__ is not defined on all OS. - Uses instead: __sparc__ && __arch64__ || __sparcv9 - * wtf/Threading.h: - -2009-09-11 Prasanth Ullattil - - Reviewed by Simon Hausmann. - - Fix compile error on Windows7(64Bit) with latest SDK. - - Added the missing include file. - - * runtime/UString.cpp: - -2009-09-11 Joerg Bornemann - - Reviewed by Simon Hausmann. - - Qt/Windows CE compile fix, include the executable allocator and - markstack implementation in the windows build. - - * JavaScriptCore.pri: - -2009-09-08 John Abd-El-Malek - - Reviewed by Dimitri Glazkov. - - Remove unneeded define for ActiveX. - https://bugs.webkit.org/show_bug.cgi?id=29054 - - * wtf/Platform.h: - -2009-09-10 Mark Rowe - - Rubber-stamped by Sam Weinig. - - Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be. - - * Configurations/FeatureDefines.xcconfig: - -2009-09-10 Fumitoshi Ukai - - Reviewed by Alexey Proskuryakov. - - Export WTF::tryFastMalloc used in WebSocketChannel. - https://bugs.webkit.org/show_bug.cgi?id=28038 - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-10 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Make StructureTransitionTable use an enum for the PtrAndFlags member - used for the single transition slot optimisation. - - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTable::StructureTransitionTable): - (JSC::StructureTransitionTable::usingSingleTransitionSlot): - (JSC::StructureTransitionTable::): - -2009-09-10 Oliver Hunt - - Reviewed by Geoff Garen. - - Refactor StructureTransitionTable and Structure to unify handling of the single slot optimization - https://bugs.webkit.org/show_bug.cgi?id=29141 - - Make StructureTransitionTable encapsulate the single transition slot optimization. - - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::~Structure): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::removePropertyWithoutTransition): - (JSC::Structure::hasTransition): - * runtime/Structure.h: - (JSC::StructureTransitionTable::contains): - (JSC::StructureTransitionTable::get): - (JSC::StructureTransitionTable::hasTransition): - (JSC::StructureTransitionTable::reifySingleTransition): - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTable::StructureTransitionTable): - (JSC::StructureTransitionTable::~StructureTransitionTable): - (JSC::StructureTransitionTable::remove): - (JSC::StructureTransitionTable::add): - (JSC::StructureTransitionTable::table): - (JSC::StructureTransitionTable::singleTransition): - (JSC::StructureTransitionTable::usingSingleTransitionSlot): - (JSC::StructureTransitionTable::setSingleTransition): - (JSC::StructureTransitionTable::setTransitionTable): - (JSC::StructureTransitionTable::): - * wtf/PtrAndFlags.h: - (WTF::PtrAndFlags::PtrAndFlags): - -2009-09-10 Zoltan Horvath - - Reviewed by Darin Adler. - - Implement fastDeleteSkippingDestructor for FastAllocBase and fastDeleteAllValues for HashSet - https://bugs.webkit.org/show_bug.cgi?id=25930 - - FastAllocBase has been extended with fastDeleteSkippingDestructor function which - releases memory without destructor call. fastDeleteAllValues has been implemented - similar as deleteAllValues but it uses fastDelete function to release memory. - - * wtf/FastAllocBase.h: - (WTF::fastDeleteSkippingDestructor): - * wtf/HashSet.h: - (WTF::fastDeleteAllValues): - -2009-09-10 Laszlo Gombos - - Reviewed by Darin Adler. - - ARM compiler does not understand GCC visibility attribute - https://bugs.webkit.org/show_bug.cgi?id=29079 - - * API/JSBase.h: Make the test more specific to hit only - the GCC compiler - -2009-09-10 Adam Barth - - Unreviewed revert of the previous change. It broke the tests. - - * wtf/dtoa.cpp: - (WTF::dtoa): - -2009-09-10 Ben Laurie - - Reviewed by Adam Barth. - - - - If dtoa was given a small buffer and the number was either infinite or - NaN, then the buffer would be overflowed. - - * wtf/dtoa.cpp: - -2009-09-09 Laszlo Gombos - - Reviewed by Darin Adler. - - Change reinterpret_cast to static_cast in r48212. - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - -2009-09-09 Laszlo Gombos - - Reviewed by Darin Adler. - - Remove WTF_PLATFORM_FORCE_PACK as it is no longer used - https://bugs.webkit.org/show_bug.cgi?id=29066 - - * wtf/Platform.h: - -2009-09-09 Laszlo Gombos - - Reviewed by Ariya Hidayat. - - Implement flushing the instruction cache for Symbian - https://bugs.webkit.org/show_bug.cgi?id=29075 - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): Call IMB_Range to flush - the instruction cache on Symbian - -2009-09-09 Kent Hansen - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=29024 - Make JavaScriptCore compile on platforms with case-insensitive file systems and typeinfo.h in STL - - These platforms include Microsoft Visual Studio 2003, and Symbian with Metrowerks compiler. - - * JavaScriptCore.gypi: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSTypeInfo.h: Copied from JavaScriptCore/runtime/TypeInfo.h. - * runtime/Structure.h: - * runtime/TypeInfo.h: Removed. - -2009-09-08 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - JSON.stringify(Date) loses the milliseconds information - https://bugs.webkit.org/show_bug.cgi?id=29063 - - Make sure we include milliseconds in the output of toISOString. - - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToISOString): - -2009-09-08 Kevin Ollivier - - wx build fix, generate derived sources earlier in order to make sure - they're found by the build system when generating the list of sources to build. - - * wscript: - -2009-09-08 Laszlo Gombos - - Reviewed by Simon Hausmann. - - Build fix when USE(LOCKFREE_THREADSAFESHARED) is not defined - https://bugs.webkit.org/show_bug.cgi?id=29011 - - * wtf/Threading.h: Use LOCKFREE_THREADSAFESHARED guard for - atomicIncrement and atomicDecrement - -2009-09-07 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control in Yarr's RegexInterpreter - https://bugs.webkit.org/show_bug.cgi?id=29025 - - Inherits RegexInterpreter classes from FastAllocBase (bug #20422), which has - been instantiated by 'new': - - class ByteDisjunction - -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1462 - - struct BytecodePattern - -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1279 - - * yarr/RegexInterpreter.h: - -2009-09-07 Drew Wilson - - Reverting r48121 to fix Windows build errors. - - * JavaScriptCore.exp: - -2009-09-07 Drew Wilson - - Reviewed by David Levin. - - Enable SHARED_WORKERS by default - https://bugs.webkit.org/show_bug.cgi?id=28959 - - * Configurations/FeatureDefines.xcconfig: - -2009-09-07 Fumitoshi Ukai - - Reviewed by Alexey Proskuryakov. - - Export WTF::tryFastMalloc used in WebSocketChannel. - https://bugs.webkit.org/show_bug.cgi?id=28038 - - * JavaScriptCore.exp: - -2009-09-04 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Fix windows export files - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-04 Oliver Hunt - - Reviewed by Gavin Barraclough. - - [[ToString]] conversion should use the actual toString function for String objects. - - Remove incorrect specialisations of toString conversions on StringObject. - - * JavaScriptCore.exp: - * runtime/StringObject.cpp: - * runtime/StringObject.h: - -2009-09-04 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Add new export. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Add new export. - -2009-09-04 Steve Falkenburg - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove unneeded export. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Remove unneeded export. - -2009-09-04 Darin Adler - - Reviewed by Geoff Garen. - - DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32) - https://bugs.webkit.org/show_bug.cgi?id=28909 - - Part two. - - Make some improvements to garbage collection code: - - 1) Create a runtime assertion that catches any classes that - override markChildren but have the HasDefaultMark bit set. - 2) Remove checks of the mark bit outside the MarkStack::append - function; they are redundant. - 3) Improve the efficiency of the asObject and asArray functions - when called on JSCell* to avoid a round trip to JSValue. - 4) Make more callers use the checked asCell and asObject - casting functions rather than unchecked casts. - 5) Removed the JSCell::marked function and other GC-related - functions because these operations are no longer things that - code other than the core GC code needs to do directly. Fixed - callers that were calling them. - - * runtime/Collector.cpp: - (JSC::Heap::markConservatively): Removed unneeded call to MarkStack::drain. - (JSC::Heap::markProtectedObjects): Removed unneeded check of the mark - bit and call to MarkStack::drain. - (JSC::Heap::collect): Removed unneeded checks of the mark bit and also - changed call to SmallStrings::mark to call markChildren instead to match - the rest of the objects. - (JSC::typeName): Removed unneeded cast to JSObject*. - - * runtime/JSArray.h: - (JSC::asArray): Added an overload for JSCell* and changed the JSValue - version to call it. Removed some unneeded casts. - (JSC::JSArray::markChildrenDirect): Marked this function inline. It's in - a header, and if not marked inline this could lead to linking problems. - (JSC::MarkStack::markChildren): Added. This helper function is used by - the drain function to avoid repating code. Also added the code here to - check fro default mark violations in debug code. If a markChildren - function adds something to the mark stack, but the type info claimed - hasDefaultMark was true, then we will get an assertion now. Also fixed - the assertion about the mark bit to use the Heap function directly - because we don't have a JSCell::marked function any more. - (JSC::MarkStack::drain): Changed a local variable from "v" to "value", - and from "currentCell" to "cell". Changed to call markChildren in two - places instead of repeating a chain of if statements twice. Changed - code that reads and writes the mark bit to use Heap::isCellMarked and - Heap::markCell so we can eliminate the JSCell::marked and - JSCell::markCellDirect functions. - - * runtime/JSCell.h: Removed JSCell's markCellDirect and marked member - functions. Added a comment explaining that asCell should be deprecated - in favor of the JSValue asCell member function. - (JSC::MarkStack::append): Added the assertion that catches callers - that have set the HasDefaultMark bit incorrectly. Changed - code that reads and writes the mark bit to use Heap::isCellMarked and - Heap::markCell so we can eliminate the JSCell::marked and - JSCell::markCellDirect functions. Moved the overload of - MarkStack::append for JSValue here so it can call through to the cell - version. The old version had a copy of all the code instead, but that - repeated the conversion from JSValue to JSCell* and the check for - whether a value is a cell multiple times. - (JSC::Structure::markAggregate): Moved this function here to avoid - dependencies for Structure.h, since this calls MarkStack::append. - - * runtime/JSObject.cpp: - (JSC::JSObject::markChildren): Added code to clear - m_isCheckingForDefaultMarkViolation so the marking done by JSObject - doesn't trigger the assertion. - - * runtime/JSValue.h: Moved some stray includes that were outside the - header guard inside it. Not sure how that happened! Removed the - GC-related member functions markChildren, hasChildren, marked, and - markDirect. - - * runtime/JSWrapperObject.h: Made markChildren private. - (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the - HasDefaultMark bit was set. - - * runtime/MarkStack.h: Added m_isCheckingForDefaultMarkViolation and - initialized it to false. Moved the append function body from here to - JSCell.h. Added a declaration of a private markChildren function used - inside the drain function. - - * runtime/SmallStrings.cpp: - (JSC::SmallStrings::markChildren): Changed the name and style of this - function to match other functions. This allows us to share the normal - mark stack code path. - - * runtime/SmallStrings.h: Changed the name and interface of mark to - the more-normal markChildren style. - - * runtime/Structure.h: Moved the body of markAggregate into the - JSCell.h to avoid a circular dependency with JSCell.h. - -2009-09-04 Darin Adler - - Reviewed by Geoff Garen. - - DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32) - https://bugs.webkit.org/show_bug.cgi?id=28909 - - Part one. - - Make some improvements to garbage collection code: - - 1) Fix the two classes that had the default mark bit set but - should not. - 2) Remove checks of the mark bit outside the MarkStack::append - function; they are redundant. - 3) Make more callers use the checked asCell and asObject - casting functions rather than unchecked casts. - 4) Removed some GC-related functions because these operations are - no longer things that code other than the core GC code needs - to do directly. Fixed callers that were calling them. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): Removed unneeded check of the mark - bit before calling MarkStack::append. - - * interpreter/Register.h: Removed unneeded marked and markChildren - functions. - - * jit/JITStubs.cpp: - (op_eq): Removed unneeded assertions, instead using checked casting - functions such as asObject. - - * runtime/ArgList.h: Added now-needed forward declaration of MarkStack. - - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::markChildren): Remmoved unneeded check of the mark bit. - - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): Added. Fixes a bug where the - HasDefaultMark bit was set. - - * runtime/JSCell.cpp: - (JSC::JSCell::getObject): Use asObject to avoid a direct static_cast. - - * runtime/JSObject.h: - (JSC::asObject): Added an overload for JSCell* and changed the JSValue - version to call it. - (JSC::JSValue::get): Use asObject to avoid a direct static_cast. - - * runtime/JSWrapperObject.h: Made markChildren private. - (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the - HasDefaultMark bit was set. Later we may want to optimize this for - wrapper types that never have cells in their internal values, but there - is no measured performance regression in SunSpider or V8 doing this - all the time. - - * runtime/MarkStack.cpp: Tweaked formatting. - -2009-09-04 Kevin Ollivier - - wx build fix. Switch USE_ defines over to the compiler so that they can be - checked by files not including config.h (like WebCorePrefix.h). - - * wtf/Platform.h: - -2009-09-03 Yong Li - - Reviewed by David Levin. - - Remove unnecessary dependency on unistd.h - https://bugs.webkit.org/show_bug.cgi?id=28962 - - * runtime/Completion.cpp: - -2009-09-03 Fumitoshi Ukai - - Reviewed by Eric Seidel. - - Add strnstr for Linux and Windows in StringExtras.h - https://bugs.webkit.org/show_bug.cgi?id=28901 - - * wtf/StringExtras.h: - (strnstr): - -2009-09-03 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for JavaScriptCore's HashEntry class - https://bugs.webkit.org/show_bug.cgi?id=27830 - - Inherits HashEntry class from FastAllocBase because it has been - instantiated by 'new' JavaScriptCore/runtime/Lookup.cpp:32. - - * runtime/Lookup.h: - -2009-09-02 Gavin Barraclough - - Should crash if JIT code buffer allocation fails. - - https://bugs.webkit.org/show_bug.cgi?id=28926 - - - * jit/ExecutableAllocatorPosix.cpp: - (JSC::ExecutablePool::systemAlloc): - * jit/ExecutableAllocatorWin.cpp: - (JSC::ExecutablePool::systemAlloc): - -2009-09-02 Kevin Ollivier - - waf build fixes for Windows/MSVC. - - * wscript: - -2009-09-02 Kevin Ollivier - - Build fix for building on Windows. - - * wtf/ThreadingPthreads.cpp: - -2009-09-02 Norbert Leser - - Reviewed by Eric Seidel. - - Use fastMalloc when neither MMAP nor VIRTUALALLOC are enabled - - RegisterFile constructor currently throws #error when both - MMAP and VIRTUALALLOC conditions fail. - On any platform that does not provide these features - (for instance, Symbian), - the fallback should be regular malloc (or fastMalloc). - It is functionally equivalent in this case, even though it may - have certain drawbacks such as lack of dynamic pre-allocation. - - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::~RegisterFile): - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - -2009-08-31 Robert Agoston - - Reviewed by Gavin Barraclough. - - Fixed typo. - https://bugs.webkit.org/show_bug.cgi?id=28691 - - * parser/Parser.h: - (JSC::Parser::parse): - -2009-08-27 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - JSON Stringifier does not follow ES5 spec for handling of Number, String and Boolean objects - https://bugs.webkit.org/show_bug.cgi?id=28797 - - Fixed unwrapBoxedPrimitive to do the right thing, which necessitated a couple of new exception - checks, and corrected the logic in gap to correctly convert Number and String objects. - - * runtime/JSONObject.cpp: - (JSC::unwrapBoxedPrimitive): - (JSC::gap): - (JSC::Stringifier::Stringifier): - (JSC::Stringifier::appendStringifiedValue): - -2009-08-27 Oliver Hunt - - Reviewed by Adam Roben. - - JSON.stringify replacer array does not accept values that are not string primitives. - https://bugs.webkit.org/show_bug.cgi?id=28788 - - Update the JSON stringifier to initialise its replacer array according to the most - recent version of the spec. - - * runtime/Identifier.h: - (JSC::Identifier::from): - * runtime/JSONObject.cpp: - (JSC::Stringifier::Stringifier): - -2009-08-27 Alexey Proskuryakov - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=28753 - Excessive number of threads (and a crash) - - * wtf/Threading.h: (WTF::atomicIncrement): Changed atomicIncrement to match decrement - and return the new value. Also added using directives for these functions, to match - te rest of WTF. - -2009-08-27 Brent Fulgham - - Reviewed by Adam Roben. - - Link the testapi against CFLite when building the WinCairo port. - - * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add new Release_CFLite - target. Update all targets to inherit from either the - JavaScriptCF.vsprops (Apple target) or the JavaScriptCFLite.vsprops - file (WinCairo target). - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Remove - input file CoreFoundation.lib. This is provided by either the - JavaScriptCF.vsprops or JavaScriptCFLite.vsprops file. - -2009-08-27 Steve Falkenburg - - Reviewed by Geoff Garen. - - Fix Windows-specific crash due to missing memory clearing call. - - * runtime/Collector.cpp: - (JSC::Heap::allocateBlock): - -2009-08-27 Brent Fulgham - - Build fix: JavaScriptCore_debug.def missing some exports. Apple - Windows build does not use this file, so it was not noticed previously. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-27 Gavin Barraclough - - Reviewed by Oliver Hunt. - - x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates. - https://bugs.webkit.org/show_bug.cgi?id=28317 - - Missed one, fix part II. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::move): - * assembler/X86Assembler.h: - (JSC::CAN_SIGN_EXTEND_8_32): - -2009-08-27 Oliver Hunt - - Reviewed by Adam Roben. - - JSON.stringify replacer array does not accept values that are not string primitives. - https://bugs.webkit.org/show_bug.cgi?id=28788 - - Update the JSON stringifier to initialise its replacer array according to the most - recent version of the spec. - - * runtime/Identifier.h: - (JSC::Identifier::from): - * runtime/JSONObject.cpp: - (JSC::Stringifier::Stringifier): - -2009-08-27 Oliver Hunt - - Reviewed by Alexey Proskuryakov. - - JSON parser accepts trailing comma in array literals - https://bugs.webkit.org/show_bug.cgi?id=28779 - - Update parser to correctly fail if there's a trailing comma. - - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::parse): - -2009-08-26 Oliver Hunt - - Reviewed by Gavin Barraclough. - - 'this' in JSON.parse reviver is the global object - https://bugs.webkit.org/show_bug.cgi?id=28752 - - This is a technically simple change, we merely update the code for calling - the reviver function to pass the correct this object. Doing so however - exposes the holder to arbitrary mutation by the reviver function so it is - necessary for us to now guard all property accesses against the possibility - of failure. - - * runtime/JSArray.h: - JSON needs to delete a property from the array, so we friend its - Walker class so that we can make a non-virtual call to the arrays - delete and getOwnPropertySlot methods. - * runtime/JSONObject.cpp: - (JSC::Walker::callReviver): - We need to pass the correct this object - (JSC::Walker::walk): - Update calls to callReviver, and update property logic logic - to correctly handle the holder being mutated by the reviver - function. - -2009-08-26 Alice Liu - - Windows build fix: added some exported symbols - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-26 Geoffrey Garen - - Windows build fix: Removed some exported symbols that no longer exist. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-26 Gavin Barraclough - - Reviewed by Olliejver Hunt. - - x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates. - https://bugs.webkit.org/show_bug.cgi?id=28317 - - We rely on a slightly OS X specific behaviour, that x86-64 applications have a 4Gb zero page, - so pointers are never representable as a 32-bit integer, and always have to be represented by - a separate immediate load instruction, rather than within the immediate field of an arithmetic - or memory operation. - - We explicitly check for a couple of cases where a value might be representable in 32-bit, but - these probably never kick in on Mac OS, and only kick in to hose GTK. Deleting these does not - show a performance degradation on SunSpider. Remove. - - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::storePtr): - (JSC::MacroAssemblerX86_64::branchPtr): - -2009-08-26 Geoffrey Garen - - Reviewed by Oliver Hunt. - - A bit of Collector refatoring. - - SunSpider says no change. v8 says 1.003x faster (1.02x faster on splay). - - * JavaScriptCore.exp: - - * runtime/JSCell.cpp: - (JSC::JSCell::toPrimitive): - (JSC::JSCell::getPrimitiveNumber): - (JSC::JSCell::toBoolean): - (JSC::JSCell::toNumber): - (JSC::JSCell::toString): - (JSC::JSCell::toObject): Removed pure virtual functions from - JSCell, so the collector can construct one. This allowed - me to remove a bunch of ASSERT_NOT_REACHED throughout the - code, too. - - * runtime/JSCell.h: - (JSC::JSCell::JSCell): ditto - (JSC::Heap::heap): Inlined this function because it's trivial. - - * JavaScriptCore.exp: - - * runtime/Collector.cpp: - (JSC::Heap::destroy): - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlock): - (JSC::Heap::freeBlocks): Renamed freeHeap to freeBlocks, since - it doesn't actually free the Heap object. - (JSC::Heap::heapAllocate): - (JSC::Heap::sweep): - * runtime/Collector.h: Refactored block allocation and destruction - into helper functions. - - * runtime/GetterSetter.cpp: - * runtime/JSAPIValueWrapper.cpp: - * runtime/JSPropertyNameIterator.cpp: Removed dummy implementations - of pure virtual functions. (See above.) - -=== End re-roll-in of r47738:47740 with Windows crash fixed === - -2009-08-26 Geoffrey Garen - - Build fix: start out with a 32-bit value to avoid a shortening warning. - - * runtime/Collector.cpp: - (JSC::Heap::sweep): - -2009-08-24 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Substantially reduced VM thrash in the GC heap. - - 1.08x faster on v8 (1.60x faster on v8-splay). - - 1.40x faster on bench-alloc-nonretained. - - 1.90x faster on bench-alloc-retained. - - SunSpider says no change. - - * runtime/Collector.cpp: - (JSC::Heap::heapAllocate): Fixed a long-standing bug: update a few local - variables unconditionally after calling collect(), since they may be used - even if we don't "goto scan". (In the bug I saw, usedBlocks got out of - sync with heap.usedBlocks). - (JSC::Heap::sweep): Keep enough free heap space to accomodate - the number of objects we'll allocate before the next GC, plus 25%, for - good measure. - * runtime/Collector.h: Bumped the block size to 256k. This seems to give - the best cache performance, and it prevents us from initiating lots of - VM traffic to recover very small chunks of memory. - -=== Begin re-roll-in of r47738:47740 with Windows crash fixed === - -2009-08-25 Drew Wilson - - Reviewed by David Levin. - - postMessage() spec now supports sending arrays of ports - https://bugs.webkit.org/show_bug.cgi?id=26902 - - Added OwnPtr to VectorTraits so we can store OwnPtrs in Vectors. - - * wtf/VectorTraits.h: - -2009-08-26 Xan Lopez - - Rubber-stamped by Gustavo Noronha. - - Remove duplicated files from file list. - - * GNUmakefile.am: - -2009-08-26 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - More export fixes. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-26 Oliver Hunt - - Reviewed by NOBODY (Build fix). - - Hopefully fix all the exports from JSC on windows - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-26 Oliver Hunt - - Reviewed by NOBODY (Build fixes). - - Forgot I added files to JavaScriptCore. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCoreSources.bkl: - -2009-08-25 Oliver Hunt - - Reviewed by Gavin Barraclough. - - [ES5] Implement getOwnPropertyDescriptor - https://bugs.webkit.org/show_bug.cgi?id=28724 - - Implement the core runtime support for getOwnPropertyDescriptor. - This adds a virtual getOwnPropertyDescriptor method to every class - that implements getOwnPropertySlot that shadows the behaviour of - getOwnPropertySlot. The alternative would be to make getOwnPropertySlot - (or PropertySlots in general) provide property attribute information, - but quick testing showed this to be a regression. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/Arguments.cpp: - (JSC::Arguments::getOwnPropertyDescriptor): - * runtime/Arguments.h: - * runtime/ArrayPrototype.cpp: - (JSC::ArrayPrototype::getOwnPropertyDescriptor): - * runtime/ArrayPrototype.h: - * runtime/CommonIdentifiers.h: - * runtime/DatePrototype.cpp: - (JSC::DatePrototype::getOwnPropertyDescriptor): - * runtime/DatePrototype.h: - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertyDescriptor): - * runtime/JSArray.h: - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::getOwnPropertyDescriptor): - * runtime/JSByteArray.h: - * runtime/JSFunction.cpp: - (JSC::JSFunction::getOwnPropertyDescriptor): - * runtime/JSFunction.h: - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::getOwnPropertyDescriptor): - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::getOwnPropertyDescriptor): - * runtime/JSNotAnObject.h: - * runtime/JSONObject.cpp: - (JSC::JSONObject::getOwnPropertySlot): - (JSC::JSONObject::getOwnPropertyDescriptor): - * runtime/JSONObject.h: - * runtime/JSObject.cpp: - (JSC::JSObject::getOwnPropertyDescriptor): - (JSC::JSObject::getPropertyDescriptor): - * runtime/JSObject.h: - * runtime/JSString.cpp: - (JSC::JSString::getStringPropertyDescriptor): - (JSC::JSString::getOwnPropertyDescriptor): - * runtime/JSString.h: - * runtime/JSVariableObject.cpp: - (JSC::JSVariableObject::symbolTableGet): - * runtime/JSVariableObject.h: - * runtime/Lookup.h: - (JSC::getStaticPropertyDescriptor): - (JSC::getStaticFunctionDescriptor): - (JSC::getStaticValueDescriptor): - Add property descriptor equivalents of the lookup - table access functions - - * runtime/MathObject.cpp: - (JSC::MathObject::getOwnPropertySlot): - (JSC::MathObject::getOwnPropertyDescriptor): - * runtime/MathObject.h: - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::getOwnPropertyDescriptor): - * runtime/NumberConstructor.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorGetOwnPropertyDescriptor): - * runtime/PropertyDescriptor.cpp: Added. - (JSC::PropertyDescriptor::writable): - (JSC::PropertyDescriptor::enumerable): - (JSC::PropertyDescriptor::configurable): - (JSC::PropertyDescriptor::hasAccessors): - (JSC::PropertyDescriptor::setUndefined): - (JSC::PropertyDescriptor::getter): - (JSC::PropertyDescriptor::setter): - (JSC::PropertyDescriptor::setDescriptor): - (JSC::PropertyDescriptor::setAccessorDescriptor): - * runtime/PropertyDescriptor.h: Added. - (JSC::PropertyDescriptor::PropertyDescriptor): - (JSC::PropertyDescriptor::attributes): - (JSC::PropertyDescriptor::isValid): - (JSC::PropertyDescriptor::value): - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::getOwnPropertyDescriptor): - * runtime/RegExpConstructor.h: - * runtime/RegExpMatchesArray.h: - (JSC::RegExpMatchesArray::getOwnPropertyDescriptor): - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::getOwnPropertyDescriptor): - * runtime/RegExpObject.h: - * runtime/StringObject.cpp: - (JSC::StringObject::getOwnPropertyDescriptor): - * runtime/StringObject.h: - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::getOwnPropertyDescriptor): - * runtime/StringPrototype.h: - -2009-08-24 Gavin Barraclough - - Reviewed by Darin Adler. - - How many copies of the parameters do you need? - https://bugs.webkit.org/show_bug.cgi?id=28701 - - The function parameters in JSC get copied a lot - and unnecessarily so. - - Originally this happened due to duplicating FunctionBodyNodes on recompilation, - though the problem has been exacerbated by copying the parameters from the - original function body onto the executable, then back onto the real body that - will be generated (this happens on every function). And this is all made worse - since the data structures in question are a little ugly - C style arrays of C++ - objects containing ref counts, so they need a full copy-construct (rather than - a simple memcpy). - - This can all be greatly simplified by just punting the parameters off into - their own ref-counted object, and forgoing all the copying. - - ~no performance change, possible slight progression. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::makeFunction): - * parser/Nodes.cpp: - (JSC::FunctionParameters::FunctionParameters): - (JSC::FunctionBodyNode::FunctionBodyNode): - (JSC::FunctionBodyNode::finishParsing): - * parser/Nodes.h: - (JSC::FunctionBodyNode::parameters): - (JSC::FunctionBodyNode::parameterCount): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::~FunctionExecutable): - (JSC::FunctionExecutable::compile): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::FunctionExecutable::fromGlobalCode): - (JSC::FunctionExecutable::paramString): - * runtime/Executable.h: - (JSC::FunctionExecutable::FunctionExecutable): - (JSC::FunctionExecutable::parameterCount): - -2009-08-25 Brent Fulgham - - Reviewed by NOBODY (Buildfix). - - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_CFLite target - that inherits from the debug_wincairo property sheet and therefore - links to the proper debug library. - * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_CFLite target - that inherits from the debug_wincairo property sheet and therefore - links to the proper debug library. - -2009-08-25 Chris Marrin - - Reviewed by Simon Fraser. - - Export tryFastMalloc for Canvas3D work - https://bugs.webkit.org/show_bug.cgi?id=28018 - - * JavaScriptCore.exp: - -2009-08-25 David Levin - - Reviewed by Adam Roben. - - PLATFORM(CFNETWORK) should be USE(CFNETWORK). - https://bugs.webkit.org/show_bug.cgi?id=28713 - - * wtf/Platform.h: Added a #define to catch this issue in the - future. The define would generate an error on gcc without the - space in the expansion, but Visual C++ needs the space to cause an error. - -2009-08-24 Brent Fulgham - - Reviewed by Steve Falkenburg. - - Revise CFLite Debug build to emit DLL's with _debug label. - https://bugs.webkit.org/show_bug.cgi?id=28695. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modify - Cairo debug build to inherit from new debug_cairo property sheet. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: - Modify to look for debug CFLite when in debug build. - -2009-08-24 Gavin Barraclough - - Reviewed by Oliver Adler & Darin Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=28691 - Do not retain ScopeNodes outside of parsing - - There is now no need for these to exist outside of parsing - their use in the runtime is replaced by Executable types. - - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitNewFunctionExpression): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::makeFunction): - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - (JSC::Interpreter::prepareForRepeatCall): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * parser/Nodes.cpp: - (JSC::ScopeNodeData::ScopeNodeData): - (JSC::ProgramNode::create): - (JSC::EvalNode::create): - (JSC::FunctionBodyNode::create): - * parser/Nodes.h: - (JSC::ScopeNode::adoptData): - (JSC::FunctionBodyNode::parameterCount): - * parser/Parser.cpp: - * parser/Parser.h: - (JSC::Parser::arena): - (JSC::Parser::Parser): - (JSC::Parser::parse): - * runtime/ArrayPrototype.cpp: - (JSC::isNumericCompareFunction): - (JSC::arrayProtoFuncSort): - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::~FunctionExecutable): - (JSC::EvalExecutable::compile): - (JSC::ProgramExecutable::checkSyntax): - (JSC::ProgramExecutable::compile): - (JSC::FunctionExecutable::compile): - (JSC::EvalExecutable::generateJITCode): - (JSC::ProgramExecutable::generateJITCode): - (JSC::FunctionExecutable::generateJITCode): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - (JSC::FunctionExecutable::recompile): - (JSC::FunctionExecutable::fromGlobalCode): - (JSC::FunctionExecutable::copyParameters): - (JSC::FunctionExecutable::paramString): - * runtime/Executable.h: - (JSC::ScriptExecutable::ScriptExecutable): - (JSC::ScriptExecutable::sourceID): - (JSC::ScriptExecutable::sourceURL): - (JSC::ScriptExecutable::lineNo): - (JSC::ScriptExecutable::lastLine): - (JSC::ScriptExecutable::usesEval): - (JSC::ScriptExecutable::usesArguments): - (JSC::ScriptExecutable::needsActivation): - (JSC::ScriptExecutable::recordParse): - (JSC::EvalExecutable::bytecode): - (JSC::EvalExecutable::jitCode): - (JSC::ProgramExecutable::bytecode): - (JSC::ProgramExecutable::reparseExceptionInfo): - (JSC::ProgramExecutable::jitCode): - (JSC::FunctionExecutable::FunctionExecutable): - (JSC::FunctionExecutable::make): - (JSC::FunctionExecutable::bytecode): - (JSC::FunctionExecutable::isGenerated): - (JSC::FunctionExecutable::name): - (JSC::FunctionExecutable::parameterCount): - (JSC::FunctionExecutable::jitCode): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::numericCompareFunction): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - -2009-08-24 Darin Adler - - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::put): Landed revised version I had tested but forgot - to land. Leave out the branch, since we don't need one. - -2009-08-24 Darin Adler - - Reviewed by Geoff Garen. - - Array index miss case creates a string every time - https://bugs.webkit.org/show_bug.cgi?id=28664 - - SunSpider test results I saw: - - 0.5% faster overall - 1% faster on crypto-aes - 20% faster on crypto-md5 - 13% faster on crypto-sha1 - - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): Initialize m_hasNoPropertiesWithUInt32Names - to true. - (JSC::ObjectPrototype::put): Clearly m_hasNoPropertiesWithUInt32Names if the new - property has a name that is the string form of a UInt32. - (JSC::ObjectPrototype::getOwnPropertySlot): Don't call JSObject::getOwnPropertySlot - if m_hasNoPropertiesWithUInt32Names is true, and it is highly likely to be true. - - * runtime/ObjectPrototype.h: Added declarations for the above. - -2009-08-24 Gustavo Noronha Silva - - Unreviewed. Fix a typo in my distcheck build fix. - - * GNUmakefile.am: - -2009-08-23 Gustavo Noronha Silva - - Unreviewed build fix for make distcheck. - - * GNUmakefile.am: Added files required for the build. - -2009-08-22 Maciej Stachowiak - - Reviewed by Mark Rowe. - - REGRESSION(r47639-r47660): Webkit crashes on launch on PowerPC - https://bugs.webkit.org/show_bug.cgi?id=28655 - - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): Initialize properly with a VPtrHackExecutable. - * wtf/Platform.h: - -2009-08-22 Darin Adler - - Fix storage leak from syntax tree arena allocation patch. - - * parser/Nodes.h: CommaNode needs to inherit from ParserArenaDeletable - because it has a vector. - -2009-08-21 Darin Adler - - Fix Qt build. - - * parser/Nodes.cpp: - (JSC::ScopeNodeData::ScopeNodeData): Made non-inline again. - This is used outside Nodes.cpp so can't be inline unless - it is in the header. - -2009-08-21 Darin Adler - - Two loose ends from the last commit. - - * JavaScriptCore.xcodeproj/project.pbxproj: Made ParserArena.h - and create_hash_table project-internal instead of "private". - * runtime/Executable.h: Removed accidentally-added constructor. - -2009-08-21 Darin Adler - - Reviewed by Gavin Barraclough. - - Syntax tree nodes should use arena allocation - https://bugs.webkit.org/show_bug.cgi?id=25674 - - Use an actual arena now. 0.6% speedup on SunSpider. - - New and improved with 100% less leaking of the universe. - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - Removed all exports involving the class FunctionBodyNode, which no - longer needs to be used outside JavaScriptCore. - - * JavaScriptCore.xcodeproj/project.pbxproj: Made Nodes.h and - Executable.h project-internal instead of "private". - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): Updated since VarStack - contains const Identifier* now. - - * parser/Grammar.y: Made identifiers from the lexer be const - Identifier* and updated since VarStack contains const Identifier* now. - - * parser/Lexer.cpp: - (JSC::Lexer::setCode): Pass in ParserArena, used for identifiers. - (JSC::Lexer::makeIdentifier): Changed return type to const Identifier* - and changed to call ParserArena. - (JSC::Lexer::clear): Removed the code to manage m_identifiers and - added code to set m_arena to 0. - * parser/Lexer.h: Updated for changes above. - - * parser/NodeConstructors.h: - (JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable - on the arena. - (JSC::ParserArenaDeletable::operator new): Changed to call the - allocateDeletable function on the arena instead of deleteWithArena. - (JSC::PropertyNode::PropertyNode): Added new constructor that makes - numeric identifiers. Some day we might want to optimize this for - integers so it doesn't create a string for each one. - (JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier - since it's now a const Identifier& so it can't be left uninitialized. - (JSC::BreakNode::BreakNode): Ditto. - (JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements* - to keep track of the statements rather than a separate statement vector. - (JSC::BlockNode::BlockNode): Ditto. - (JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier. - - * parser/Nodes.cpp: Moved the comment explaining emitBytecode in here. - It seemed strangely out of place in the header. - (JSC::ThrowableExpressionData::emitThrowError): Added an overload for - UString as well as Identifier. - (JSC::SourceElements::singleStatement): Added. - (JSC::SourceElements::lastStatement): Added. - (JSC::RegExpNode::emitBytecode): Changed the throwError code to use - the substitution mechanism instead of doing a string append. - (JSC::SourceElements::emitBytecode): Added. Replaces the old - statementListEmitCode function, since we now keep the SourceElements - objects around. - (JSC::BlockNode::lastStatement): Added. - (JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of - statementListEmitCode. - (JSC::CaseClauseNode::emitBytecode): Added. - (JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode - instead of statementListEmitCode. - (JSC::ScopeNodeData::ScopeNodeData): Changed to store the - SourceElements* instead of using releaseContentsIntoVector. - (JSC::ScopeNode::emitStatementsBytecode): Added. - (JSC::ScopeNode::singleStatement): Added. - (JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead - of statementListEmitCode. - (JSC::EvalNode::emitBytecode): Ditto. - (JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode - insetad of statementListEmitCode and check for the return node using - the new functions. - - * parser/Nodes.h: Changed VarStack to store const Identifier* instead - of Identifier and rely on the arena to control lifetime. Added a new - ParserArenaFreeable class. Made ParserArenaDeletable inherit from - FastAllocBase instead of having its own operator new. Base the Node - class on ParserArenaFreeable. Changed the various Node classes - to use const Identifier& instead of Identifier to avoid the need to - call their destructors and allow them to function as "freeable" in the - arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions. - Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode, - CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable - as a base class since they do not descend from Node. Eliminated the - StatementVector type and instead have various classes use SourceElements* - instead of StatementVector. This prevents those classes from having to - use ParserArenaDeletable to make sure the vector destructor is called. - - * parser/Parser.cpp: - (JSC::Parser::parse): Pass the arena to the lexer. - - * parser/Parser.h: Added an include of ParserArena.h, which is no longer - included by Nodes.h. - (JSC::Parser::parseFunctionFromGlobalCode): Changed to use the - singleStatement function, since there is no longer any children function. - Removed some unneeded use of RefPtr. - - * parser/ParserArena.cpp: - (JSC::ParserArena::ParserArena): Added. Initializes the new members, - m_freeableMemory, m_freeablePoolEnd, and m_identifiers. - (JSC::ParserArena::freeablePool): Added. Computes the pool pointer, - since we store only the current pointer and the end of pool pointer. - (JSC::ParserArena::deallocateObjects): Added. Contains the common - memory-deallocation logic used by both the destructor and the - reset function. - (JSC::ParserArena::~ParserArena): Changed to call deallocateObjects. - (JSC::ParserArena::reset): Ditto. Also added code to zero out the - new structures, and switched to use clear() instead of shrink(0) since - we don't really reuse arenas. - (JSC::ParserArena::makeNumericIdentifier): Added. - (JSC::ParserArena::allocateFreeablePool): Added. Used when the pool - is empty. - (JSC::ParserArena::isEmpty): Added. No longer inline, which is fine - since this is used only for assertions at the moment. - (JSC::ParserArena::derefWithArena): Make non-inline. - - * parser/ParserArena.h: Added an actual arena of "freeable" objects, - ones that don't need destructors to be called. Also added a separate - IdentifierArena object, a segmented vector of identifiers that used - to be in the Lexer. - - * runtime/Executable.h: Moved the definition of the - FunctionExecutable::make function here. It can't go in JSFunction.h - since that header has to be used outside JavaScriptCore and so can't - include this, which includes Nodes.h. The function could be moved - elswhere if we don't want to include JSFunction.h in this header, but - for now this seems to be the best place. - - * runtime/JSFunction.h: Removed the include of Executable.h and - definition of the FunctionExecutable::make function. - - * wtf/FastMalloc.cpp: Fixed an incorrect comment. - -2009-08-21 Mark Rowe - - Fix the non-JIT build. - - * runtime/Executable.cpp: - * runtime/Executable.h: - -2009-08-21 Gavin Barraclough - - Speculative QuickTime build fix. - - * runtime/JSArray.cpp: - -2009-08-21 Gavin Barraclough - - Speculative QT build fix. - - * runtime/StringPrototype.cpp: - -2009-08-21 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Restructure Executable types so that host functions do not hold a FunctionExecutable. - https://bugs.webkit.org/show_bug.cgi?id=28621 - - All JSFunction objects have a pointer to an Executable*. This is currently always a - FunctionExecutable, however this has a couple of drawbacks. Host functions do not - store a range of information that the FunctionExecutable provides (source, name, - CodeBlock & information presently held on the FunctionBodyNode). - - [ * nearly all... see below! ] - - Instead, make JSFunctions hold a pointer to an ExecutableBase, move fields specific - to JS sourced executable types (source, node) into a new subclass (ScriptExecutable), - and create a new NativeExecutable type. We now provide a new method in JSFunction - to access & downcast to FunctionExecutable, but in doing so we can make an early - check (with an ASSERT) to ensure that the Executable read from a function will only - be treated as a FunctionExecutable (and thus the JS sepcific fields will only be - accessed) if the JSFunction is not a host function. - - There is one JSFunction that currently does not have an Executable, which is the - object created to allow us to read out the vtable pointer. By making this change - we can also add a new Executable type fror this object (VPtrHackExecutable). - Since this means that really all JSFunctions have an Executable we no longer have - to null-check m_executable before us it - particularly in isHostFunction(). - - This patch removes CacheableEvalExecutable, since all subclasses of ExecutableBase - can now be ref-counted - since both JSFunction holds (and ref-counts) an ExecutableBase - that might be a FunctionExecutable or a NativeExecutable. This does now mean that all - ProgramExecutables and EvalExecutables (unnecessarily) provide an interface to be - ref-counted, however this seems less-bad than host functions unnecessarily providing - interface to access non-host specific information. - - The class hierarcy has changed from this: - - - ExecutableBase - - ProgramExecutable - - EvalExecutable - - CacheableEvalExecutable (also RefCounted by multiple-inheritance) - - FunctionExecutable (also RefCounted by multiple-inheritance, 'special' FunctionExecutable also used for host functions) - - To this: - - - RefCounted - - ExecutableBase - - NativeExecutable - - VPtrHackExecutable - - ScriptExecutable - - ProgramExecutable - - EvalExecutable - - FunctionExecutable - - This patch speeds up sunspidey by a couple of ms (presumably due to the changes to isHostFunction()). - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::ownerExecutable): - (JSC::GlobalCodeBlock::GlobalCodeBlock): - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - * interpreter/CachedCall.h: - (JSC::CachedCall::CachedCall): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * profiler/Profiler.cpp: - (JSC::createCallIdentifierFromFunctionImp): - * runtime/Arguments.h: - (JSC::Arguments::getArgumentsData): - (JSC::Arguments::Arguments): - * runtime/Executable.cpp: - (JSC::NativeExecutable::~NativeExecutable): - (JSC::VPtrHackExecutable::~VPtrHackExecutable): - * runtime/Executable.h: - (JSC::ExecutableBase::ExecutableBase): - (JSC::ExecutableBase::~ExecutableBase): - (JSC::ExecutableBase::isHostFunction): - (JSC::NativeExecutable::NativeExecutable): - (JSC::VPtrHackExecutable::VPtrHackExecutable): - (JSC::ScriptExecutable::ScriptExecutable): - (JSC::ScriptExecutable::source): - (JSC::ScriptExecutable::sourceID): - (JSC::ScriptExecutable::sourceURL): - (JSC::ScriptExecutable::lineNo): - (JSC::ScriptExecutable::lastLine): - (JSC::ScriptExecutable::usesEval): - (JSC::ScriptExecutable::usesArguments): - (JSC::ScriptExecutable::needsActivation): - (JSC::EvalExecutable::EvalExecutable): - (JSC::EvalExecutable::create): - (JSC::ProgramExecutable::ProgramExecutable): - (JSC::FunctionExecutable::FunctionExecutable): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::~JSFunction): - (JSC::JSFunction::markChildren): - (JSC::JSFunction::getCallData): - (JSC::JSFunction::call): - (JSC::JSFunction::lengthGetter): - (JSC::JSFunction::getConstructData): - (JSC::JSFunction::construct): - * runtime/JSFunction.h: - (JSC::JSFunction::executable): - (JSC::JSFunction::jsExecutable): - (JSC::JSFunction::isHostFunction): - -2009-08-20 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Browser hangs on opening Web Inspector. - https://bugs.webkit.org/show_bug.cgi?id=28438 - - Code generation needs to be able to walk the entire scopechain in some - cases, however the symbol table used by activations was a member of the - codeblock. Following recompilation this may no longer exist, leading - to a crash or hang on lookup. - - We fix this by introducing a refcounted SymbolTable subclass, SharedSymbolTable, - for the CodeBlocks used by function code. This allows activations to - maintain ownership of a copy of the symbol table even after recompilation so - they can continue to work. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::symbolTable): - (JSC::CodeBlock::sharedSymbolTable): - (JSC::GlobalCodeBlock::GlobalCodeBlock): - (JSC::FunctionCodeBlock::FunctionCodeBlock): - (JSC::FunctionCodeBlock::~FunctionCodeBlock): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::retrieveArguments): - * runtime/Executable.cpp: - (JSC::EvalExecutable::generateBytecode): - (JSC::FunctionExecutable::generateBytecode): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - * runtime/JSActivation.h: - (JSC::JSActivation::JSActivationData::JSActivationData): - (JSC::JSActivation::JSActivationData::~JSActivationData): - * runtime/SymbolTable.h: - -2009-08-20 Xan Lopez - - Add new file to GTK+ build. - - * GNUmakefile.am: - -2009-08-20 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Added a number => string cache. - - 1.07x faster on v8 (1.7x faster on v8-splay). - 1.004x faster on SunSpider. - - * runtime/JSCell.h: Moved JSValue::toString to JSString.h. - * runtime/JSGlobalData.h: Holds the cache. - * runtime/JSNumberCell.cpp: - (JSC::JSNumberCell::toString): - (JSC::JSNumberCell::toThisString): Removed -0 special case. - UString handles this now, since too many clients were - special-casing it. - - * runtime/JSString.h: - (JSC::JSValue::toString): Use the cache when converting - an int or double to string. - - * runtime/Operations.h: - (JSC::concatenateStrings): Call toString to take advantage - of the cache. - - * runtime/SmallStrings.h: - (JSC::NumericStrings::add): - (JSC::NumericStrings::lookup): The cache. - - * runtime/UString.cpp: - (JSC::UString::from): Added -0 special case mentioned above. - Removed appendNumeric because it's mutually exclusive with the - cache. - -2009-08-20 Oliver Hunt - - Reviewed by Gavin Barraclough. - - REGRESSION: fast/profiler/call.html is crashing occasionally - https://bugs.webkit.org/show_bug.cgi?id=28476 - - Using the codeblock for information about how many parameters and - locals a function has is unsafe in certain circumstances. The - basic scenario is all function code being cleared in response to - the debugger or profiler being enabled, and then an activation is - marked before its associated function is re-executed. - - To deal with this scenario we store the variable count of a function - directly in the FunctionExecutable, and then use that information. - - * runtime/Arguments.h: - (JSC::Arguments::getArgumentsData): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::generateBytecode): - * runtime/Executable.h: - (JSC::FunctionExecutable::FunctionExecutable): - (JSC::FunctionExecutable::variableCount): - * runtime/JSActivation.cpp: - (JSC::JSActivation::markChildren): - -2009-08-20 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Numbering of arguments to emitGetJITStubArg/emitPutJITStubArg incorrect - - - The argumentNumber argument to emitGetJITStubArg/emitPutJITStubArg should match - the argument number used within the stub functions in JITStubs.cpp, but it doesn't. - - Firstly, all the numbers changed when we added a void* 'reserved' as the first slot - (rather than leaving argument 0 unused), and secondly in 32_64 builds the index to - peek/poke needs to be multiplies by 2 (since the argument to peek/poke is a number - of machine words, and on 32_64 build the argument slots to stub functions are two - words wide). - - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpCall): - * jit/JITInlineMethods.h: - (JSC::JIT::emitPutJITStubArg): - (JSC::JIT::emitPutJITStubArgConstant): - (JSC::JIT::emitGetJITStubArg): - (JSC::JIT::emitPutJITStubArgFromVirtualRegister): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - -2009-08-20 Oliver Hunt - - Reviewed by Geoff Garen. - - REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest - https://bugs.webkit.org/show_bug.cgi?id=28332 - - Follow up style fixes that were missed in review. - - * runtime/Structure.cpp: - (JSC::Structure::hasTransition): - * runtime/Structure.h: - (JSC::Structure::get): - (JSC::StructureTransitionTable::contains): - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTable::add): - -2009-08-20 Oliver Hunt - - Add new exports to windows jsc build - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-20 Oliver Hunt - - Reviewed by Gavin Barraclough. - - REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest - https://bugs.webkit.org/show_bug.cgi?id=28332 - - The method check optimisation made transitions aware of the value being - assigned when a transition was assigning a function. This had the side - effect of making every assignment of a function expression result in a - new transition, and thus a new Structure. The net result of this is that - the common JS idiom of - - function MyObject() { - this.myFunction = function(...){...}; - } - new MyObject(); - - Will produce a unique structure on every iteration, meaning that all - caching is defeated and there is a significant amount of structure churn. - - The fix is to return the transition to its original form where it is - keyed off a property name + attributes tuple, but have each transition - support an optional transition on a specific value. - - * JavaScriptCore.exp: - * runtime/JSObject.h: - (JSC::JSObject::putDirectInternal): - * runtime/Structure.cpp: - (JSC::Structure::~Structure): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::hasTransition): - * runtime/Structure.h: - (JSC::Structure::transitionedFor): - (JSC::Structure::hasTransition): - (JSC::Structure::): - (JSC::StructureTransitionTable::contains): - (JSC::StructureTransitionTable::get): - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTableHashTraits::emptyValue): - (JSC::StructureTransitionTable::hasTransition): - (JSC::StructureTransitionTable::remove): - (JSC::StructureTransitionTable::add): - -2009-08-20 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Remove FunctionCodeBlock. - https://bugs.webkit.org/show_bug.cgi?id=28502 - - These only exist to allow JIT code to dereference properties off the - CodeBlock for any callee, regardless of whether it is a host function. - - Instead just use the FunctionExecutable. Copy the m_parameters field - from the CodeBlock into the Executable, and use this to distinguish - between host functions, functions that have been bytecompiled, and - functions that have not. - - m_parameters is moved to ExecutableBase rather than FunctionExecutable - so that (as a separate change) we can move make a separate class of - executable for host code, which is not devived from FunctionExecutable - (host code does not feature any of the properties that normal executable - do and will provide, such as source, attributes, and a parsed name). - - 1% win on v8 tests, 0.5% on sunspider. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::derefStructures): - (JSC::CodeBlock::refStructures): - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - (JSC::CodeBlock::handlerForBytecodeOffset): - (JSC::CodeBlock::lineNumberForBytecodeOffset): - (JSC::CodeBlock::expressionRangeForBytecodeOffset): - (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): - (JSC::CodeBlock::functionRegisterForBytecodeOffset): - (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset): - (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset): - * bytecode/CodeBlock.h: - (JSC::): - (JSC::CodeBlock::source): - (JSC::CodeBlock::sourceOffset): - (JSC::CodeBlock::evalCodeCache): - (JSC::CodeBlock::createRareDataIfNecessary): - - remove NativeCodeBlocks and the NativeCode code type. - - * jit/JIT.cpp: - (JSC::JIT::linkCall): - - Revert to previous behaviour (as currently still commented!) that Hhost functions have a null codeblock. - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - - Bring the 32_64 & non-32_64 JITs into line with each other, callee in regT0. - - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - - Rewrite call trampolines to not use the CodeBlock. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - - Make call_JSFunction & call_arityCheck return the callee, don't expect to be passed the CodeBlock. - - * runtime/Executable.cpp: - (JSC::FunctionExecutable::generateBytecode): - (JSC::FunctionExecutable::recompile): - (JSC::FunctionExecutable::FunctionExecutable): - * runtime/Executable.h: - (JSC::ExecutableBase::): - (JSC::ExecutableBase::ExecutableBase): - (JSC::FunctionExecutable::isHostFunction): - - Add m_numParameters. - - * runtime/JSFunction.cpp: - (JSC::JSFunction::~JSFunction): - - Only call generatedBytecode() on JSFunctions non-host FunctionExecutables. - -2009-08-20 Yongjun Zhang - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=28054 - - Use a helper function to work around winscw compiler forward declaration bug - regarding templated classes. - - Add parenthesis around (PassRefPtr::*UnspecifiedBoolType) to make winscw compiler - work with the default UnSpecifiedBoolType() operator, which removes the winscw - specific bool cast hack. - - * wtf/PassRefPtr.h: - (WTF::derefIfNotNull): - (WTF::PassRefPtr::~PassRefPtr): - -2009-08-19 Yong Li - - Reviewed by Gavin Barraclough. - - Change namespace ARM to ARMRegisters - X86 to X86Registers to avoid conflict with macros - https://bugs.webkit.org/show_bug.cgi?id=28428 - - * assembler/ARMAssembler.cpp: - * assembler/ARMAssembler.h: - * assembler/ARMv7Assembler.h: - * assembler/MacroAssemblerARM.h: - * assembler/MacroAssemblerARMv7.h: - * assembler/MacroAssemblerX86Common.h: - * assembler/MacroAssemblerX86_64.h: - * assembler/X86Assembler.h: - * jit/JIT.h: - * jit/JITArithmetic.cpp: - * jit/JITInlineMethods.h: - * jit/JITOpcodes.cpp: - * wrec/WRECGenerator.cpp: - * wrec/WRECGenerator.h: - * yarr/RegexJIT.cpp: - -2009-08-19 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Devirtualise marking - https://bugs.webkit.org/show_bug.cgi?id=28294 - - We actually need to mark the value in a number object if we're using the - 32bit number representation. - - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - -2009-08-19 Gavin Barraclough - - Reviewed by Darin Adler. - - We probably shouldn't be keeping the AST for eval nodes around forevar. - https://bugs.webkit.org/show_bug.cgi?id=28469 - - EvalNodes don't destroyData() (delete their parser data) since they need to hold onto - their varStack. Copy a list of variable onto EvalCodeBlock, and this can go away. - - * bytecode/CodeBlock.h: - (JSC::EvalCodeBlock::variable): - (JSC::EvalCodeBlock::numVariables): - (JSC::EvalCodeBlock::adoptVariables): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - * parser/Nodes.h: - * runtime/Executable.cpp: - (JSC::EvalExecutable::generateBytecode): - * runtime/Executable.h: - -2009-08-19 Jungshik Shin - - Reviewed by Darin Adler. - - http://bugs.webkit.org/show_bug.cgi?id=28441 - - Fix a build issue with ICU 4.2 or later on Windows with Visual C++. - Instead of defining all isXXX and toupper/tolower as - WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h, - #define them to be different by prepending 'WTF_...ASCIIType_h' with - the originial names like 'toupper_WTF_...ASCIIType_h'. - - * wtf/DisallowCType.h: - -2009-08-18 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Assigning a function to an object should always use the existing transition, even if the transition is not specialized - https://bugs.webkit.org/show_bug.cgi?id=28442 - - Check for an unspecialized transition as an alternative to always failing if specialisation does not match. - - * runtime/Structure.cpp: - (JSC::Structure::addPropertyTransitionToExistingStructure): - -2009-08-18 Dirk Schulze - - Reviewed by Oliver Hunt. - - Added additional getter to ByteArray with an unsigned char as return. - ByteArray can take unsigned char directly now. - - * wtf/ByteArray.h: - (WTF::ByteArray::set): - (WTF::ByteArray::get): - -2009-08-18 Peter Kasting - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=28415 - Set svn:eol-style CRLF on all .sln and .vcproj files that don't already - have it. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - -2009-08-18 Xan Lopez - - Try to fix the GTK+ build. - - * GNUmakefile.am: - -2009-08-17 Gavin Barraclough - - Reviewed by Sam Weinig. - - No, silly runtime, AST nodes are not for you. - - We still use AST nodes (ScopeNodes, particularly FunctionBodyNodes) within - the runtime, which means that these nodes must be persisted outside of the - arena, contain both parser & runtime data, etc. This is all a bit of a mess. - - Move functionality into a new FunctionExecutable class. - - * API/JSCallbackFunction.cpp: - * API/JSObjectRef.cpp: - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::markAggregate): - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - (JSC::CodeBlock::lineNumberForBytecodeOffset): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getBytecodeIndex): - (JSC::CodeBlock::discardBytecode): - (JSC::CodeBlock::instructionCount): - (JSC::CodeBlock::getJITCode): - (JSC::CodeBlock::executablePool): - (JSC::CodeBlock::ownerExecutable): - (JSC::CodeBlock::extractExceptionInfo): - (JSC::CodeBlock::addFunctionDecl): - (JSC::CodeBlock::functionDecl): - (JSC::CodeBlock::numberOfFunctionDecls): - (JSC::CodeBlock::addFunctionExpr): - (JSC::CodeBlock::functionExpr): - (JSC::GlobalCodeBlock::GlobalCodeBlock): - (JSC::ProgramCodeBlock::ProgramCodeBlock): - (JSC::EvalCodeBlock::EvalCodeBlock): - (JSC::FunctionCodeBlock::FunctionCodeBlock): - (JSC::NativeCodeBlock::NativeCodeBlock): - * bytecode/EvalCodeCache.h: - * bytecode/SamplingTool.cpp: - (JSC::SamplingTool::doRun): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitNewFunctionExpression): - * bytecompiler/BytecodeGenerator.h: - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - * interpreter/CachedCall.h: - (JSC::CachedCall::CachedCall): - * interpreter/CallFrameClosure.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::prepareForRepeatCall): - (JSC::Interpreter::debug): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveLastCaller): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::JIT::compile): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::emit_op_new_func): - (JSC::JIT::emit_op_new_func_exp): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): - * parser/Nodes.cpp: - (JSC::FunctionBodyNode::reparseDataIfNecessary): - * parser/Nodes.h: - (JSC::EvalNode::partialDestroyData): - * parser/Parser.h: - * profiler/ProfileGenerator.cpp: - * profiler/Profiler.cpp: - (JSC::Profiler::createCallIdentifier): - (JSC::createCallIdentifierFromFunctionImp): - * runtime/Arguments.h: - (JSC::Arguments::getArgumentsData): - (JSC::Arguments::Arguments): - (JSC::JSActivation::copyRegisters): - * runtime/ArrayPrototype.cpp: - (JSC::isNumericCompareFunction): - * runtime/CallData.h: - (JSC::): - * runtime/Collector.cpp: - (JSC::Heap::collect): - * runtime/ConstructData.h: - (JSC::): - * runtime/ExceptionHelpers.cpp: - (JSC::createUndefinedVariableError): - (JSC::createInvalidParamError): - (JSC::createNotAConstructorError): - (JSC::createNotAFunctionError): - (JSC::createNotAnObjectError): - * runtime/Executable.cpp: Added. - (JSC::EvalExecutable::generateBytecode): - (JSC::ProgramExecutable::generateBytecode): - (JSC::FunctionExecutable::generateBytecode): - (JSC::EvalExecutable::generateJITCode): - (JSC::ProgramExecutable::generateJITCode): - (JSC::FunctionExecutable::generateJITCode): - (JSC::FunctionExecutable::isHostFunction): - (JSC::FunctionExecutable::markAggregate): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - (JSC::FunctionExecutable::recompile): - (JSC::FunctionExecutable::FunctionExecutable): - * runtime/Executable.h: - (JSC::ExecutableBase::~ExecutableBase): - (JSC::ExecutableBase::ExecutableBase): - (JSC::ExecutableBase::source): - (JSC::ExecutableBase::sourceID): - (JSC::ExecutableBase::lastLine): - (JSC::ExecutableBase::usesEval): - (JSC::ExecutableBase::usesArguments): - (JSC::ExecutableBase::needsActivation): - (JSC::ExecutableBase::astNode): - (JSC::ExecutableBase::generatedJITCode): - (JSC::ExecutableBase::getExecutablePool): - (JSC::EvalExecutable::EvalExecutable): - (JSC::EvalExecutable::bytecode): - (JSC::EvalExecutable::varStack): - (JSC::EvalExecutable::evalNode): - (JSC::EvalExecutable::jitCode): - (JSC::ProgramExecutable::ProgramExecutable): - (JSC::ProgramExecutable::reparseExceptionInfo): - (JSC::ProgramExecutable::bytecode): - (JSC::ProgramExecutable::programNode): - (JSC::ProgramExecutable::jitCode): - (JSC::FunctionExecutable::FunctionExecutable): - (JSC::FunctionExecutable::name): - (JSC::FunctionExecutable::bytecode): - (JSC::FunctionExecutable::generatedBytecode): - (JSC::FunctionExecutable::usesEval): - (JSC::FunctionExecutable::usesArguments): - (JSC::FunctionExecutable::parameterCount): - (JSC::FunctionExecutable::paramString): - (JSC::FunctionExecutable::isGenerated): - (JSC::FunctionExecutable::body): - (JSC::FunctionExecutable::jitCode): - (JSC::FunctionExecutable::createNativeThunk): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSActivation.cpp: - (JSC::JSActivation::JSActivation): - (JSC::JSActivation::markChildren): - (JSC::JSActivation::isDynamicScope): - (JSC::JSActivation::argumentsGetter): - * runtime/JSActivation.h: - (JSC::JSActivation::JSActivationData::JSActivationData): - * runtime/JSFunction.cpp: - (JSC::JSFunction::isHostFunction): - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::~JSFunction): - (JSC::JSFunction::markChildren): - (JSC::JSFunction::getCallData): - (JSC::JSFunction::call): - (JSC::JSFunction::lengthGetter): - (JSC::JSFunction::getConstructData): - (JSC::JSFunction::construct): - * runtime/JSFunction.h: - (JSC::JSFunction::executable): - (JSC::FunctionExecutable::make): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::numericCompareFunction): - * runtime/JSGlobalData.h: - -2009-08-17 Mark Rowe - - Reviewed by Darin Adler. - - Fix 300,000+ leaks seen during the regression tests. - - EvalCodeCache::get was heap-allocating an EvalExecutable instance without adopting the initial reference. - While fixing this we noticed that EvalExecutable was a RefCounted type that was sometimes stack allocated. - To make this cleaner and to prevent clients from attempting to ref a stack-allocated instance, we move the - refcounting down to a new CacheableEvalExecutable class that derives from EvalExecutable. EvalCodeCache::get - now uses CacheableEvalExecutable::create and avoids the leak. - - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - * runtime/Executable.h: - (JSC::CacheableEvalExecutable::create): - (JSC::CacheableEvalExecutable::CacheableEvalExecutable): - -2009-08-17 Oliver Hunt - - RS=Mark Rowe. - - REGRESSION (r47292): Prototype.js is broken by ES5 Arguments changes - https://bugs.webkit.org/show_bug.cgi?id=28341 - - - Reverting r47292. Alas Prototype.js breaks with Arguments inheriting - from Array as ES5 attempted. Prototype.js defines $A in terms of a - function it places on (among other global objects) the Array prototype, - thus breaking $A for arrays. - - * runtime/Arguments.h: - (JSC::Arguments::Arguments): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): - * runtime/ObjectPrototype.h: - * tests/mozilla/ecma_3/Function/arguments-001.js: - -2009-08-17 Peter Kasting - - Reviewed by Steve Falkenburg. - - https://bugs.webkit.org/show_bug.cgi?id=27323 - Only add Cygwin to the path when it isn't already there. This avoids - causing problems for people who purposefully have non-Cygwin versions of - executables like svn in front of the Cygwin ones in their paths. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: - -2009-08-17 Xan Lopez - - Reviewed by Mark Rowe. - - Fix build with FAST_MALLOC_MATCH_VALIDATION enabled. - - * wtf/FastMalloc.cpp: - (WTF::fastMalloc): - (WTF::fastCalloc): - (WTF::fastRealloc): - -2009-08-16 Holger Hans Peter Freyther - - Reviewed by Mark Rowe. - - Fix crash on ./ecma_2/RegExp/exec-002.js. - https://bugs.webkit.org/show_bug.cgi?id=28353 - - Change the order of freeParenthesesDisjunctionContext and - popParenthesesDisjunctionContext on all call sites as the pop - method is accessing backTrack->lastContext which is the context - that is about to be freed. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::parenthesesDoBacktrack): - (JSC::Yarr::Interpreter::backtrackParentheses): - -2009-08-16 Holger Hans Peter Freyther - - Reviewed by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=28352 - - Fix coding style violations. Use m_ for C++ class members. Remove - trailing whitespace on empty lines. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::tryConsumeCharacter): - (JSC::Yarr::Interpreter::tryConsumeBackReference): - (JSC::Yarr::Interpreter::parenthesesDoBacktrack): - (JSC::Yarr::Interpreter::backtrackParentheses): - (JSC::Yarr::ByteCompiler::ByteCompiler): - (JSC::Yarr::ByteCompiler::compile): - (JSC::Yarr::ByteCompiler::checkInput): - (JSC::Yarr::ByteCompiler::assertionBOL): - (JSC::Yarr::ByteCompiler::assertionEOL): - (JSC::Yarr::ByteCompiler::assertionWordBoundary): - (JSC::Yarr::ByteCompiler::atomPatternCharacter): - (JSC::Yarr::ByteCompiler::atomCharacterClass): - (JSC::Yarr::ByteCompiler::atomBackReference): - (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): - (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): - (JSC::Yarr::ByteCompiler::popParenthesesStack): - (JSC::Yarr::ByteCompiler::closeAlternative): - (JSC::Yarr::ByteCompiler::closeBodyAlternative): - (JSC::Yarr::ByteCompiler::atomParenthesesEnd): - (JSC::Yarr::ByteCompiler::regexBegin): - (JSC::Yarr::ByteCompiler::alterantiveBodyDisjunction): - (JSC::Yarr::ByteCompiler::alterantiveDisjunction): - (JSC::Yarr::ByteCompiler::emitDisjunction): - -2009-08-15 Mark Rowe - - Fix the build with JIT disabled. - - * runtime/Arguments.h: Only compile the jitCode method when the JIT is enabled. - * runtime/Executable.h: Include PrototypeFunction.h so the compiler knows what - NativeFunctionWrapper is when the JIT is disabled. - -2009-08-15 Adam Bergkvist - - Reviewed by Sam Weinig. - - Added ENABLE_EVENTSOURCE flag. - https://bugs.webkit.org/show_bug.cgi?id=14997 - - * Configurations/FeatureDefines.xcconfig: - -2009-08-14 Gavin Barraclough - - * parser/Parser.h: - (JSC::EvalExecutable::parse): - (JSC::ProgramExecutable::parse): - * runtime/Executable.h: - -2009-08-14 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Remove AST nodes from use within the Runtime (outside of parsing), stage 1 - https://bugs.webkit.org/show_bug.cgi?id=28330 - - Remove the EvalNode and ProgramNode from use in the runtime. They still exist - after this patch, but are hidden behind EvalExecutable and FunctionExecutable, - and are also still reachable behind CodeBlock::m_ownerNode. - - The next step will be to beat back FunctionBodyNode in the same fashion. - Then remove the usage via CodeBlock, then only construct these nodes only on - demand during bytecode generation. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.h: - (JSC::GlobalCodeBlock::GlobalCodeBlock): - (JSC::GlobalCodeBlock::~GlobalCodeBlock): - (JSC::ProgramCodeBlock::ProgramCodeBlock): - (JSC::EvalCodeBlock::EvalCodeBlock): - (JSC::FunctionCodeBlock::FunctionCodeBlock): - (JSC::NativeCodeBlock::NativeCodeBlock): - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - (JSC::Interpreter::execute): - * interpreter/Interpreter.h: - * parser/Nodes.cpp: - (JSC::FunctionBodyNode::createNativeThunk): - (JSC::FunctionBodyNode::generateBytecode): - (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse): - * parser/Parser.h: - (JSC::Parser::parse): - (JSC::Parser::reparse): - (JSC::Parser::parseFunctionFromGlobalCode): - (JSC::::parse): - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - * runtime/Error.cpp: - (JSC::throwError): - * runtime/Error.h: - * runtime/Executable.h: Added. - (JSC::TemplateExecutable::TemplateExecutable): - (JSC::TemplateExecutable::markAggregate): - (JSC::TemplateExecutable::sourceURL): - (JSC::TemplateExecutable::lineNo): - (JSC::TemplateExecutable::bytecode): - (JSC::TemplateExecutable::jitCode): - (JSC::EvalExecutable::EvalExecutable): - (JSC::ProgramExecutable::ProgramExecutable): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/FunctionConstructor.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::numericCompareFunction): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::~JSGlobalObject): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::codeBlocks): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - -2009-08-14 Darin Adler - - Reviewed by Sam Weinig. - - Rename the confusing isObject() to inherits(). - It still works on non-objects, returning false. - - * runtime/ArrayConstructor.cpp: - (JSC::arrayConstructorIsArray): Removed unneeded isObject call - and updated remaining isObject call to new name, inherits. - - * runtime/JSCell.h: Renamed isObject() to inherits() - but more importantly, made it non-virtual (it was already inline) - so it is now as fast as JSObject::inherits was. - - * runtime/JSObject.h: Removed inherits function since the one - in the base class is fine as-is. Also made various JSCell functions - that should not be called on JSObject uncallable by making them - both private and not implemented. - (JSC::JSCell::inherits): Updated name. - (JSC::JSValue::inherits): Ditto. - - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncConcat): - * runtime/BooleanPrototype.cpp: - (JSC::booleanProtoFuncToString): - (JSC::booleanProtoFuncValueOf): - * runtime/DateConstructor.cpp: - (JSC::constructDate): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToLocaleString): - (JSC::dateProtoFuncToLocaleDateString): - (JSC::dateProtoFuncToLocaleTimeString): - (JSC::dateProtoFuncGetTime): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetMilliSeconds): - (JSC::dateProtoFuncGetUTCMilliseconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): - * runtime/JSValue.h: - * runtime/RegExpConstructor.cpp: - (JSC::constructRegExp): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncTest): - (JSC::regExpProtoFuncExec): - (JSC::regExpProtoFuncCompile): - (JSC::regExpProtoFuncToString): - * runtime/ScopeChain.cpp: - (JSC::ScopeChain::localDepth): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncToString): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - (JSC::stringProtoFuncSplit): - Updated to new name, inherits, from old name, isObject. - -2009-07-31 Harald Fernengel - - Reviewed by Simon Hausmann. - - Adding QNX as a platform. Currently only tested with Qt. - - https://bugs.webkit.org/show_bug.cgi?id=27885 - - * JavaScriptCore/runtime/Collector.cpp: Added retrieving of stack base - since QNX doesn't have the pthread _nt functions - * JavaScriptCore/wtf/Platform.h: Added WTF_PLATFORM_QNX and corresponding - defines - * WebCore/bridge/npapi.h: Build fix for missing typedefs on QNX - -2009-08-14 Gabor Loki - - Reviewed by Simon Hausmann. - - Currently generic ARM and ARMv7 platforms work only with JSVALUE32 - https://bugs.webkit.org/show_bug.cgi?id=28300 - - * wtf/Platform.h: - -2009-08-14 Gabor Loki - - Reviewed by Simon Hausmann. - - Enable JIT on ARM for QT by default - https://bugs.webkit.org/show_bug.cgi?id=28259 - - * wtf/Platform.h: - -2009-08-14 Gabor Loki - - Reviewed by Simon Hausmann. - - Enable YARR_JIT on ARM for QT by default - https://bugs.webkit.org/show_bug.cgi?id=28259 - - * wtf/Platform.h: - -2009-08-14 Oliver Hunt - - Reviewed by Gavin Barraclough. - - [ES5] Arguments object should inherit from Array - https://bugs.webkit.org/show_bug.cgi?id=28298 - - Make the Arguments object conform to the behaviour specified in ES5. - The simple portion of this is to make Arguments use Array.prototype - as its prototype rather than Object.prototype. - - The spec then requires us to set instance.constructor to the pristine - Object constructor, and instance.toString and instance.toLocaleString - to the pristine versions from Object.prototype. To do this we now - make the ObjectPrototype constructor return its toString and - toLocaleString functions (similar to the call and apply functions - from FunctionPrototype). - - Oddly enough this reports itself as a slight win, but given the code - isn't hit in the tests that claim to have improved I put this down to - code motion. - - * runtime/Arguments.h: - (JSC::Arguments::Arguments): - (JSC::Arguments::initializeStandardProperties): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (JSC::JSGlobalObject::objectConstructor): - (JSC::JSGlobalObject::objectToStringFunction): - (JSC::JSGlobalObject::objectToLocaleStringFunction): - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): - * runtime/ObjectPrototype.h: - * tests/mozilla/ecma_3/Function/arguments-001.js: - Update test to new es5 behaviour - -2009-08-14 Oliver Hunt - - Remove MarkStack::drain from the JSC exports file - - MarkStack::drain is now marked inline, the including it in the exports file - produces an ld warning - - * JavaScriptCore.exp: - -2009-08-13 Sam Weinig - - Reviewed by Oliver Hunt. - - Remove accidentally left in debugging statement. - - * runtime/JSArray.h: - (JSC::MarkStack::drain): - -2009-08-13 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - [ES5] Implement Array.isArray - https://bugs.webkit.org/show_bug.cgi?id=28296 - - Add support for Array.isArray to the Array constructor - - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - (JSC::arrayConstructorIsArray): - * runtime/ArrayConstructor.h: - * runtime/CommonIdentifiers.h: - * runtime/JSArray.h: - (JSC::MarkStack::drain): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - -2009-08-13 Oliver Hunt - - Reviewed by NOBODY (Buildfix). - - Attempt to fix windows build - - * runtime/Collector.cpp: - -2009-08-13 Oliver Hunt - - Reviewed by Maciej Stachowiak. - - Devirtualise marking - https://bugs.webkit.org/show_bug.cgi?id=28294 - - Add a bit to TypeInfo to indicate that an object uses the standard - JSObject::markChildren method. This allows us to devirtualise marking - of most objects (though a branch is still needed). We also add a branch - to identify arrays thus devirtualising marking in that case as well. - - In order to make the best use of this devirtualisation I've also reworked - the MarkStack::drain() logic to make the iteration more efficient. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * JavaScriptCore.exp: - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::JSAPIValueWrapper): - * runtime/JSArray.cpp: - (JSC::JSArray::markChildren): - * runtime/JSArray.h: - (JSC::JSArray::markChildrenDirect): - (JSC::MarkStack::drain): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - * runtime/JSCell.h: - (JSC::MarkStack::append): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.cpp: - (JSC::JSObject::markChildren): - * runtime/JSObject.h: - (JSC::JSObject::markChildrenDirect): - (JSC::JSObject::createStructure): - * runtime/JSString.h: - (JSC::JSString::createStructure): - * runtime/JSType.h: - (JSC::): - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStack): - (JSC::MarkStack::MarkSet::MarkSet): - (JSC::MarkStack::MarkStackArray::last): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - * runtime/TypeInfo.h: - (JSC::TypeInfo::hasDefaultMark): - -2009-08-13 Darin Adler - - Reviewed by Mark Rowe. - - Some small bits of housekeeping. - - * JavaScriptCore.xcodeproj/project.pbxproj: Make Parser.h - project instead of private. Remove JSONObject.lut.h. - - * assembler/ARMAssembler.h: Remove unneeded WTF prefix. - * assembler/AssemblerBufferWithConstantPool.h: Ditto. - * bytecompiler/BytecodeGenerator.h: Ditto. - - * wtf/SegmentedVector.h: Add a "using" statement as we do - with the other WTF headers. - -2009-08-13 Darin Adler - - Fix Tiger build. - - * parser/Grammar.y: Use a template function so we can compile - setStatementLocation even if it comes before YYLTYPE is defined. - -2009-08-13 Darin Adler - - Reviewed by George Staikos. - - Too much use of void* in Grammar.y - https://bugs.webkit.org/show_bug.cgi?id=28287 - - * parser/Grammar.y: Changed all the helper functions to - take a JSGlobalData* instead of a void*. A couple formatting - tweaks that I missed when breaking this into pieces. - -2009-08-13 Darin Adler - - Reviewed by George Staikos. - - Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 - - * parser/Grammar.y: Reduced and sorted includes. Tweaked comment - format. Marked a few more functions inline. - -2009-08-13 Darin Adler - - Reviewed by George Staikos. - - Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 - - * parser/Grammar.y: Pass the number to the PropertyNode instead of - first turning it into an Identifier. - - * parser/NodeConstructors.h: - (JSC::PropertyNode::PropertyNode): Add an overload that takes a double - so the code to convert to a string can be here instead of Grammar.y. - * parser/Nodes.h: Ditto. - -2009-08-13 Darin Adler - - Reviewed by George Staikos. - - Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 - - * parser/Grammar.y: Eliminate the DBG macro. - -2009-08-13 Darin Adler - - Reviewed by George Staikos. - - Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 - - * parser/Grammar.y: Eliminate the SET_EXCEPTION_LOCATION macro. - -2009-08-13 Darin Adler - - Reviewed by George Staikos. - - George asked me to break the patch from - https://bugs.webkit.org/show_bug.cgi?id=28287 - into smaller pieces and land it in stages. - - * parser/Grammar.y: Eliminate the LEXER macro. - -2009-08-13 Mark Rowe - - Try some more to fix the Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto. - -2009-08-13 Mark Rowe - - Try and fix the Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto. - -2009-08-13 Darin Adler - - Reviewed by David Levin. - - JavaScriptCore tweaks to get ready for the parser arena - https://bugs.webkit.org/show_bug.cgi?id=28243 - - Eliminate dependencies on Nodes.h outside JavaScriptCore, - and cut down on them inside JavaScriptCore. - - Change regular expression parsing to use identifiers as - with other strings we parse. - - Fix a couple things that are needed to use const Identifier - more, which will be part of the parser arena work. - - * JavaScriptCore.exp: Resorted and updated. - - * JavaScriptCore.xcodeproj/project.pbxproj: Changed - CollectorHeapIterator.h to be project-internal. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitPushNewScope): Added const. - * bytecompiler/BytecodeGenerator.h: Ditto. - - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): Moved this function - here from WebCore. Here is better since it uses so many internals. - Removed unimportant optimization for the no listener case. - * debugger/Debugger.h: Ditto. Also removed unneeded include - and tweaked formatting and comments. - - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::functionName): Call asFunction instead - of doing the unchecked static_cast. - (JSC::DebuggerCallFrame::calculatedFunctionName): Ditto. - - * jit/JITStubs.cpp: - (JSC::op_call_JSFunction): Call isHostFunction on the body rather - than on the JSFunction. - (JSC::vm_lazyLinkCall): Ditto. - (JSC::op_construct_JSConstruct): Ditto. - - * parser/Grammar.y: Changed callers to use new scanRegExp with - out arguments instead of relying on state in the Lexer. And - callers that just want to skip a regular expression to use - skipRegExp. - - * parser/Lexer.cpp: - (JSC::Lexer::scanRegExp): Changed to use out arguments, and to - add a prefix argument so we can add in the "=" character as needed. - Also rewrote to streamline the logic a bit inspired by suggestions - by David Levin. - (JSC::Lexer::skipRegExp): Added. Version of the function above that - does not actually put the regular expression into a string. - (JSC::Lexer::clear): Removed code to clear m_pattern and m_flags. - * parser/Lexer.h: Changed scanRegExp to have out arguments. Added - skipRegExp. Eliminated pattern, flags, m_pattern, and m_flags. - - * parser/NodeConstructors.h: - (JSC::RegExpNode::RegExpNode): Changed to take const Identifier&. - * parser/Nodes.cpp: - (JSC::RegExpNode::emitBytecode): Changed since m_pattern and - m_flags are now Identifier instead of UString. - (JSC::FunctionBodyNode::make): Moved this function here instead - of putting it in the JSFunction.h header. - * parser/Nodes.h: Changed RegExpNode to use Identifier. - - * profiler/Profiler.cpp: - (JSC::Profiler::createCallIdentifier): Changed to use isHostFunction - on the body instead of on the JSFunction object. - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): Ditto. - - * runtime/JSFunction.cpp: - (JSC::JSFunction::isHostFunction): Moved here from header. - (JSC::JSFunction::isHostFunctionNonInline): Added. - (JSC::JSFunction::JSFunction): Removed unneeded initialization of - m_body to 0. - (JSC::JSFunction::setBody): Moved here from header. - - * runtime/JSFunction.h: Removed unneeded includes. Moved private - constructor down to the private section. Made virtual functions - private. Removed unneeded overload of setBody and moved the body - of the function into the .cpp file. Changed assertions to use - the non-inline version of isHostFunction. - - * runtime/PropertySlot.cpp: - (JSC::PropertySlot::functionGetter): Use asFunction instead - of doing the unchecked static_cast. - - * wtf/SegmentedVector.h: - (WTF::SegmentedVector::isEmpty): Added. - -2009-08-13 Mark Rowe - - Rubber-stamped by Darin Adler. - - Use the version of operator new that takes a JSGlobalData when allocating FuncDeclNode and FuncExprNode - from within the grammar to prevent these nodes from being leaked. - - * parser/Grammar.y: - -2009-08-13 Simon Hausmann - - Reviewed by Ariya Hidayat. - - Remove the special-case for Qt wrt JSVALUE_32 introduced in - r46709. It must've been a dependency issue on the bot, as - after a manual build all the tests pass on amd64 and ia32. - - * wtf/Platform.h: - -2009-08-12 Gabor Loki - - Reviewed by Gavin Barraclough. - - Add optimize call and property access support for ARM JIT. - https://bugs.webkit.org/show_bug.cgi?id=24986 - - For tightly coupled sequences the BEGIN_UNINTERRUPTED_SEQUENCE and - END_UNINTERRUPTED_SEQUENCE macros have been introduced which ensure - space for instructions and constants of the named sequence. This - method is vital for those architecture which are using constant pool. - - The 'latePatch' method - which was linked to JmpSrc - is replaced with - a port specific solution (each calls are marked to place their address - on the constant pool). - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::linkBranch): - (JSC::ARMAssembler::executableCopy): Add extra align for constant pool. - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::JmpSrc::JmpSrc): - (JSC::ARMAssembler::sizeOfConstantPool): - (JSC::ARMAssembler::jmp): - (JSC::ARMAssembler::linkCall): - * assembler/ARMv7Assembler.h: - * assembler/AbstractMacroAssembler.h: - * assembler/AssemblerBufferWithConstantPool.h: - (JSC::AssemblerBufferWithConstantPool::flushIfNoSpaceFor): Fix the - computation of the remaining space. - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::branch32): - (JSC::MacroAssemblerARM::nearCall): - (JSC::MacroAssemblerARM::call): - (JSC::MacroAssemblerARM::branchPtrWithPatch): - (JSC::MacroAssemblerARM::ensureSpace): - (JSC::MacroAssemblerARM::sizeOfConstantPool): - (JSC::MacroAssemblerARM::prepareCall): - * assembler/X86Assembler.h: - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - * jit/JITInlineMethods.h: - (JSC::JIT::beginUninterruptedSequence): - (JSC::JIT::endUninterruptedSequence): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::emit_op_put_by_id): - -2009-08-12 Gavin Barraclough - - Rubber Stamped by Dave Kilzer. - - Disable WTF_USE_JSVALUE32_64 on iPhone for now (support not yet added for ARMv7). - - * wtf/Platform.h: - -2009-08-12 Gavin Barraclough - - Reviewed by Maciej Stachoviak. - - Ooops - moved code that had been accidentally added to op_new_func instead of - op_new_func_exp, to where it shoulds be. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * wtf/Platform.h: - -2009-08-12 Ada Chan - - Added workaround for the limitation that VirtualFree with MEM_RELEASE - can only accept the base address returned by VirtualAlloc when the region - was reserved and it can only free the entire region, and not a part of it. - - Reviewed by Oliver Hunt. - - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - * runtime/MarkStackWin.cpp: - (JSC::MarkStack::releaseStack): - -2009-08-12 Balazs Kelemen - - Reviewed by Ariya Hidayat. - - Build fix: use std::numeric_limits::min() instead of LLONG_MIN - since LLONG_MIN is not defined in standard c++. - - * runtime/UString.cpp: - (JSC::UString::from): - -2009-08-12 Benjamin Otte - - Reviewed by Jan Alonzo. - - Buildfix for Gtk platforms debug builds. - - * GNUmakefile.am: Choose MarkStackPosix.cpp or MarkStackWin.cpp - depending on platform. - -2009-08-12 Simon Hausmann - - Prospective build fix for Mac and 32-bit Windows. - - * runtime/UString.cpp: Include wtf/StringExtras.h for snprintf. - (JSC::UString::from): Use %lld instead of %I64d for snprintf - on non-windows platforms. - -2009-08-12 Prasanth Ullattil - - Reviewed by Simon Hausmann. - - Fix compile error on 64Bit Windows, when UString::from - is called with an intptr_t. - - Added new UString::From overload with long long parameter. - - Thanks to Holger for the long long idea. - - * runtime/UString.cpp: - (JSC::UString::from): - * runtime/UString.h: - -2009-08-11 Oliver Hunt - - Reviewed by Mark Rowe. - - Minor style fixes. - - * runtime/UString.h: - (JSC::UString::Rep::createEmptyBuffer): - * wtf/FastMalloc.h: - (WTF::TryMallocReturnValue::getValue): - -2009-08-11 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Make it harder to misuse try* allocation routines - https://bugs.webkit.org/show_bug.cgi?id=27469 - - Jump through a few hoops to make it much harder to accidentally - miss null-checking of values returned by the try-* allocation - routines. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSArray.cpp: - (JSC::JSArray::putSlowCase): - (JSC::JSArray::increaseVectorLength): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncLink): - * runtime/UString.cpp: - (JSC::allocChars): - (JSC::reallocChars): - (JSC::expandCapacity): - (JSC::UString::Rep::reserveCapacity): - (JSC::UString::expandPreCapacity): - (JSC::createRep): - (JSC::concatenate): - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - (JSC::UString::append): - (JSC::UString::operator=): - * runtime/UString.h: - (JSC::UString::Rep::createEmptyBuffer): - * wtf/FastMalloc.cpp: - (WTF::tryFastZeroedMalloc): - (WTF::tryFastMalloc): - (WTF::tryFastCalloc): - (WTF::tryFastRealloc): - (WTF::TCMallocStats::tryFastMalloc): - (WTF::TCMallocStats::tryFastCalloc): - (WTF::TCMallocStats::tryFastRealloc): - * wtf/FastMalloc.h: - (WTF::TryMallocReturnValue::TryMallocReturnValue): - (WTF::TryMallocReturnValue::~TryMallocReturnValue): - (WTF::TryMallocReturnValue::operator PossiblyNull): - (WTF::TryMallocReturnValue::getValue): - * wtf/Platform.h: - * wtf/PossiblyNull.h: Added. - (WTF::PossiblyNull::PossiblyNull): - (WTF::PossiblyNull::~PossiblyNull): - (WTF::::getValue): - -2009-08-11 Gavin Barraclough - - Reviewed by NOBODY (build fix part deux). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-11 Gavin Barraclough - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-11 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Restrict use of FuncDeclNode & FuncExprNode to the parser. - https://bugs.webkit.org/show_bug.cgi?id=28209 - - These objects were also being referenced from the CodeBlock. By changing this - to just retain pointers to FunctionBodyNodes these classes can be restricted to - use during parsing. - - No performance impact (or sub-percent progression). - - * JavaScriptCore.exp: - Update symbols. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::mark): - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::addFunction): - (JSC::CodeBlock::function): - Unify m_functions & m_functionExpressions into a single Vector >. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::addConstant): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitNewFunctionExpression): - * bytecompiler/BytecodeGenerator.h: - FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - (JSC::Interpreter::privateExecute): - Update to reflect chnages in CodeBlock. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_new_func_exp): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): - Update to reflect chnages in CodeBlock. - - * parser/Grammar.y: - FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes. - - * parser/NodeConstructors.h: - (JSC::FuncExprNode::FuncExprNode): - (JSC::FuncDeclNode::FuncDeclNode): - * parser/Nodes.cpp: - (JSC::ScopeNodeData::mark): - (JSC::FunctionBodyNode::finishParsing): - * parser/Nodes.h: - (JSC::FunctionBodyNode::ident): - Move m_ident & make methods from FuncDeclNode & FuncExprNode to FunctionBodyNode. - - * runtime/JSFunction.h: - (JSC::FunctionBodyNode::make): - Make this method inline (was FuncDeclNode::makeFunction). - -2009-08-11 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Native JSON.stringify does not omit functions - https://bugs.webkit.org/show_bug.cgi?id=28117 - - Objects that are callable should be treated as undefined when - serialising to JSON. - - * runtime/JSONObject.cpp: - (JSC::Stringifier::appendStringifiedValue): - -2009-08-11 Oliver Hunt - - Reviewed by Geoff Garen. - - REGRESSION: Hang/crash in BytecodeGenerator::constRegisterFor loading simple page - https://bugs.webkit.org/show_bug.cgi?id=28169 - - Handle the case where someone has attempted to shadow a property - on the global object with a constant. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::constRegisterFor): - * parser/Nodes.cpp: - (JSC::ConstDeclNode::emitCodeSingle): - -2009-08-11 John Gregg - - Reviewed by Maciej Stachowiak. - - Desktop Notifications API - https://bugs.webkit.org/show_bug.cgi?id=25463 - - Adds ENABLE_NOTIFICATION flag. - - * Configurations/FeatureDefines.xcconfig: - * wtf/Platform.h: - -2009-08-11 Maxime Simon - - Reviewed by Eric Seidel. - - Modifications on JavaScriptCore to allow Haiku port. - https://bugs.webkit.org/show_bug.cgi?id=28121 - - * runtime/Collector.cpp: Haiku doesn't have sys/mman.h, using OS.h instead. - (JSC::currentThreadStackBase): Haiku uses its own threading system. - * wtf/Platform.h: Defining all Haiku platform values. - * wtf/haiku/MainThreadHaiku.cpp: Adding a missing header (NotImplemented.h). - -2009-08-11 Jessie Berlin - - Reviewed by Adam Roben. - - Fix windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-11 Csaba Osztrogonac - - Reviewed by Tor Arne Vestbø. - - Buildfix for Qt-win platforms. - - * JavaScriptCore.pri: Choose MarkStackPosix.cpp or MarkStackWin.cpp depend on platform. - -2009-08-10 Oliver Hunt - - Reviewed by NOBODY (And another build fix). - - Add new exports for MSVC - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-08-10 Oliver Hunt - - Reviewed by NOBODY (yet another build fix). - - Remove obsolete entries from MSVC exports file - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-10 Oliver Hunt - - Add includes needed for non-allinonefile builds - - * runtime/GetterSetter.h: - * runtime/ScopeChain.h: - -2009-08-10 Oliver Hunt - - Fix export file for last build fix - - * JavaScriptCore.exp: - -2009-08-10 Oliver Hunt - - Hoist page size initialization into platform specific code. - - * jit/ExecutableAllocatorPosix.cpp: - * jit/ExecutableAllocatorWin.cpp: - * runtime/MarkStack.h: - (JSC::MarkStack::pageSize): - * runtime/MarkStackPosix.cpp: - (JSC::MarkStack::initializePagesize): - * runtime/MarkStackWin.cpp: - (JSC::MarkStack::initializePagesize): - -2009-08-07 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Stack overflow crash in JavaScript garbage collector mark pass - https://bugs.webkit.org/show_bug.cgi?id=12216 - - Make the GC mark phase iterative by using an explicit mark stack. - To do this marking any single object is performed in multiple stages - * The object is appended to the MarkStack, this sets the marked - bit for the object using the new markDirect() function, and then - returns - * When the MarkStack is drain()ed the object is popped off the stack - and markChildren(MarkStack&) is called on the object to collect - all of its children. drain() then repeats until the stack is empty. - - Additionally I renamed a number of methods from 'mark' to 'markAggregate' - in order to make it more clear that marking of those object was not - going to result in an actual recursive mark. - - * GNUmakefile.am - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): - * bytecode/CodeBlock.h: - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::markAggregate): - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::markChildren): - * debugger/DebuggerActivation.h: - * interpreter/Register.h: - * interpreter/RegisterFile.h: - (JSC::RegisterFile::markGlobals): - (JSC::RegisterFile::markCallFrames): - * parser/Nodes.cpp: - (JSC::ScopeNodeData::markAggregate): - (JSC::EvalNode::markAggregate): - (JSC::FunctionBodyNode::markAggregate): - * parser/Nodes.h: - (JSC::ScopeNode::markAggregate): - * runtime/ArgList.cpp: - (JSC::MarkedArgumentBuffer::markLists): - * runtime/ArgList.h: - * runtime/Arguments.cpp: - (JSC::Arguments::markChildren): - * runtime/Arguments.h: - * runtime/Collector.cpp: - (JSC::Heap::markConservatively): - (JSC::Heap::markCurrentThreadConservativelyInternal): - (JSC::Heap::markCurrentThreadConservatively): - (JSC::Heap::markOtherThreadConservatively): - (JSC::Heap::markStackObjectsConservatively): - (JSC::Heap::markProtectedObjects): - (JSC::Heap::collect): - * runtime/Collector.h: - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::markChildren): - * runtime/GetterSetter.h: - (JSC::GetterSetter::GetterSetter): - (JSC::GetterSetter::createStructure): - * runtime/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::markChildren): - * runtime/GlobalEvalFunction.h: - * runtime/JSActivation.cpp: - (JSC::JSActivation::markChildren): - * runtime/JSActivation.h: - * runtime/JSArray.cpp: - (JSC::JSArray::markChildren): - * runtime/JSArray.h: - * runtime/JSCell.h: - (JSC::JSCell::markCellDirect): - (JSC::JSCell::markChildren): - (JSC::JSValue::markDirect): - (JSC::JSValue::markChildren): - (JSC::JSValue::hasChildren): - (JSC::MarkStack::append): - (JSC::MarkStack::drain): - * runtime/JSFunction.cpp: - (JSC::JSFunction::markChildren): - * runtime/JSFunction.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::markChildren): - * runtime/JSNotAnObject.h: - * runtime/JSONObject.cpp: - (JSC::Stringifier::markAggregate): - (JSC::JSONObject::markStringifiers): - * runtime/JSONObject.h: - * runtime/JSObject.cpp: - (JSC::JSObject::markChildren): - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - * runtime/JSObject.h: - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::markChildren): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::createStructure): - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::create): - * runtime/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::markChildren): - * runtime/JSStaticScopeObject.h: - * runtime/JSType.h: - (JSC::): - * runtime/JSValue.h: - * runtime/JSWrapperObject.cpp: - (JSC::JSWrapperObject::markChildren): - * runtime/JSWrapperObject.h: - * runtime/MarkStack.cpp: Added. - (JSC::MarkStack::compact): - * runtime/MarkStack.h: Added. - (JSC::): - (JSC::MarkStack::MarkStack): - (JSC::MarkStack::append): - (JSC::MarkStack::appendValues): - (JSC::MarkStack::~MarkStack): - (JSC::MarkStack::MarkSet::MarkSet): - (JSC::MarkStack::pageSize): - - MarkStackArray is a non-shrinking, mmap-based vector type - used for storing objects to be marked. - (JSC::MarkStack::MarkStackArray::MarkStackArray): - (JSC::MarkStack::MarkStackArray::~MarkStackArray): - (JSC::MarkStack::MarkStackArray::expand): - (JSC::MarkStack::MarkStackArray::append): - (JSC::MarkStack::MarkStackArray::removeLast): - (JSC::MarkStack::MarkStackArray::isEmpty): - (JSC::MarkStack::MarkStackArray::size): - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - * runtime/MarkStackPosix.cpp: Added. - (JSC::MarkStack::allocateStack): - (JSC::MarkStack::releaseStack): - * runtime/MarkStackWin.cpp: Added. - (JSC::MarkStack::allocateStack): - (JSC::MarkStack::releaseStack): - - * runtime/ScopeChain.h: - * runtime/ScopeChainMark.h: - (JSC::ScopeChain::markAggregate): - * runtime/SmallStrings.cpp: - (JSC::SmallStrings::mark): - * runtime/Structure.h: - (JSC::Structure::markAggregate): - -2009-08-10 Mark Rowe - - Reviewed by Darin Adler. - - Fix hundreds of "pointer being freed was not allocated" errors seen on the build bot. - - * wtf/FastMalloc.h: Implement nothrow variants of the delete and delete[] operators since - we implement the nothrow variants of new and new[]. The nothrow variant of delete is called - explicitly in the implementation of std::sort which was resulting in FastMalloc-allocated - memory being passed to the system allocator to free. - -2009-08-10 Jan Michael Alonzo - - [Gtk] Unreviewed build fix. Move JSAPIValueWrapper.cpp/.h in the debug - section. This file is already part of AllInOneFile in Release builds. - - * GNUmakefile.am: - -2009-08-10 Darin Adler - - * wtf/FastMalloc.h: Fix build. - -2009-08-10 Darin Adler - - Reviewed by Mark Rowe. - - FastMalloc.h has cross-platform code but marked as WinCE-only - https://bugs.webkit.org/show_bug.cgi?id=28160 - - 1) The support for nothrow was inside #if PLATFORM(WINCE) even though it is - not platform-specific. - 2) The code tried to override operator delete nothrow, which does not exist. - 3) The code in the header checks the value of USE_SYSTEM_MALLOC, but the code - in FastMalloc.cpp checks only if the macro is defined. - - * wtf/FastMalloc.h: See above. - * wtf/FastMalloc.cpp: Ditto. - -2009-08-10 Sam Weinig - - Reviewed by Anders Carlsson. - - Fix an annoying indentation issue. - - * runtime/DateConstructor.cpp: - (JSC::constructDate): - -2009-08-10 Xan Lopez - - Unreviewed build fix. - - Add new files to makefile. - - * GNUmakefile.am: - -2009-08-10 Simon Hausmann - - Fix compilation with the interpreter instead of the JIT by including - PrototypeFunction.h as forward-declared through NativeFunctionWrapper.h. - - * runtime/ObjectConstructor.cpp: - -2009-08-09 Oliver Hunt - - Reviewed by George Staikos. - - JSON.stringify replacer returning undefined does not omit object properties - https://bugs.webkit.org/show_bug.cgi?id=28118 - - Correct behaviour of stringify when using a replacer function that returns - undefined. This is a simple change to move the undefined value check to - after the replacer function is called. This means that the replacer function - is now called for properties with the value undefined, however i've confirmed - that this behaviour is correct. - - In addition I've made the cyclic object exception have a more useful error - message. - - * runtime/JSONObject.cpp: - (JSC::Stringifier::appendStringifiedValue): - -2009-08-08 Oliver Hunt - - Reviewed by Eric Seidel and Sam Weinig. - - [ES5] Implement Object.getPrototypeOf - https://bugs.webkit.org/show_bug.cgi?id=28114 - - Implement getPrototypeOf - - * runtime/CommonIdentifiers.h: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConsGetPrototypeOf): - * runtime/ObjectConstructor.h: - -2009-08-07 Zoltan Horvath - - Reviewed by Eric Seidel. - - Allow custom memory allocation control for Noncopyable class - https://bugs.webkit.org/show_bug.cgi?id=27879 - - Several classes which are inherited from Noncopyable are instantiated by - operator new, so Noncopyable class has been inherited from FastAllocBase. - - * wtf/Noncopyable.h: - -2009-08-07 George Staikos - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=27305 - Implement WinCE-specific unicode layer. - Written by George Staikos - with bug fixes by Yong Li - refactored by Joe Mason - - * wtf/Platform.h: - * wtf/unicode/Unicode.h: - * wtf/unicode/wince/UnicodeWince.cpp: Added. - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::foldCase): - (WTF::Unicode::isPrintableChar): - (WTF::Unicode::isSpace): - (WTF::Unicode::isLetter): - (WTF::Unicode::isUpper): - (WTF::Unicode::isLower): - (WTF::Unicode::isDigit): - (WTF::Unicode::isPunct): - (WTF::Unicode::toTitleCase): - (WTF::Unicode::direction): - (WTF::Unicode::category): - (WTF::Unicode::decompositionType): - (WTF::Unicode::combiningClass): - (WTF::Unicode::mirroredChar): - (WTF::Unicode::digitValue): - * wtf/unicode/wince/UnicodeWince.h: Added. - (WTF::Unicode::): - (WTF::Unicode::isSeparatorSpace): - (WTF::Unicode::isHighSurrogate): - (WTF::Unicode::isLowSurrogate): - (WTF::Unicode::isArabicChar): - (WTF::Unicode::hasLineBreakingPropertyComplexContext): - (WTF::Unicode::umemcasecmp): - (WTF::Unicode::surrogateToUcs4): - -2009-08-07 Yongjun Zhang - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=28069 - - Add inline to help winscw compiler resolve specialized argument in - templated functions. - - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::Lexer::lexString): - -2009-08-07 Zoltan Horvath - - Reviewed by Eric Seidel. - - Allow custom memory allocation control for RegExpObjectData struct - http://bugs.webkit.org/show_bug.cgi?id=26750 - - Inherits RegExpObjectData struct from FastAllocBase because - it has been instantiated by 'new' in JavaScriptCore/runtime/RegExpObject.cpp:62 - - * runtime/RegExpObject.h: - -2009-08-06 Norbert Leser - - Reviewed by Darin Adler. - - Updated patch for bug #27059: - Symbian platform always uses little endian encoding, - regardless of compiler. - We need to make sure that we correctly detect EABI architecture - for armv5 targets on Symbian, - where __EABI__ is set but not __ARM_EABI__ - - * wtf/Platform.h: - -2009-08-06 Adam Barth - - Unreviewed revert. - - http://bugs.webkit.org/show_bug.cgi?id=27879 - - Revert 46877 because it broke GTK. - - * wtf/Noncopyable.h: - -2009-08-06 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification. - ( https://bugs.webkit.org/show_bug.cgi?id=27635 ) - - This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%. - (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled). - - * bytecode/CodeBlock.cpp: - (JSC::printStructureStubInfo): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. - - * bytecode/CodeBlock.h: - (JSC::): - (JSC::CallLinkInfo::seenOnce): - (JSC::CallLinkInfo::setSeen): - (JSC::MethodCallLinkInfo::seenOnce): - (JSC::MethodCallLinkInfo::setSeen): - - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once. - - * bytecode/StructureStubInfo.cpp: - (JSC::StructureStubInfo::deref): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. - - * bytecode/StructureStubInfo.h: - (JSC::StructureStubInfo::StructureStubInfo): - (JSC::StructureStubInfo::initGetByIdSelf): - (JSC::StructureStubInfo::initGetByIdProto): - (JSC::StructureStubInfo::initGetByIdChain): - (JSC::StructureStubInfo::initGetByIdSelfList): - (JSC::StructureStubInfo::initGetByIdProtoList): - (JSC::StructureStubInfo::initPutByIdTransition): - (JSC::StructureStubInfo::initPutByIdReplace): - (JSC::StructureStubInfo::seenOnce): - (JSC::StructureStubInfo::setSeen): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitGetById): - (JSC::BytecodeGenerator::emitPutById): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::unlinkCall): - - Remove the "don't lazy link" stage of calls. - - * jit/JIT.h: - (JSC::JIT::compileCTIMachineTrampolines): - - Remove the "don't lazy link" stage of calls. - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSlowCase): - - Remove the "don't lazy link" stage of calls. - - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - (JSC::JITStubs::getPolymorphicAccessStructureListSlot): - - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. - - * jit/JITStubs.h: - (JSC::JITThunks::ctiStringLengthTrampoline): - (JSC::JITStubs::): - - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. - - * wtf/PtrAndFlags.h: - (WTF::PtrAndFlags::PtrAndFlags): - (WTF::PtrAndFlags::operator!): - (WTF::PtrAndFlags::operator->): - - Add ! and -> operators, add constuctor with pointer argument. - -2009-08-06 Zoltan Horvath - - Reviewed by Adam Barth. - - Allow custom memory allocation control for Noncopyable class - https://bugs.webkit.org/show_bug.cgi?id=27879 - - Several classes which inherited from Noncopyable are instantiated by - operator new, so Noncopyable class has been inherited from FastAllocBase. - - * wtf/Noncopyable.h: - -2009-08-06 Mark Rowe - - Rubber-stamped by Sam Weinig. - - Add explicit dependencies for our build verification scripts to ensure that they always run after linking has completed. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-08-06 Mark Rowe - - Bring a little order to our otherwise out of control lives. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-08-06 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for JavaScriptCore's PolymorphicAccessStructureList struct - https://bugs.webkit.org/show_bug.cgi?id=27877 - - Inherits PolymorphicAccessStructureList struct from FastAllocBase because it has been instantiated by - 'new' in JavaScriptCore/jit/JITStubs.cpp:1229. - - * bytecode/Instruction.h: - -2009-08-05 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for JavaScriptCore's ScopeNodeData struct - https://bugs.webkit.org/show_bug.cgi?id=27875 - - Inherits ScopeNodeData struct from FastAllocBase because it has been instantiated by - 'new' in JavaScriptCore/parser/Nodes.cpp:1848. - - * parser/Nodes.h: - -2009-08-05 Zoltan Herczeg - - Reviewed by Gavin Barraclough. - - Add floating point support for generic ARM port. - https://bugs.webkit.org/show_bug.cgi?id=24986 - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::doubleTransfer): - * assembler/ARMAssembler.h: - (JSC::ARM::): - (JSC::ARMAssembler::): - (JSC::ARMAssembler::faddd_r): - (JSC::ARMAssembler::fsubd_r): - (JSC::ARMAssembler::fmuld_r): - (JSC::ARMAssembler::fcmpd_r): - (JSC::ARMAssembler::fdtr_u): - (JSC::ARMAssembler::fdtr_d): - (JSC::ARMAssembler::fmsr_r): - (JSC::ARMAssembler::fsitod_r): - (JSC::ARMAssembler::fmstat): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::): - (JSC::MacroAssemblerARM::supportsFloatingPoint): - (JSC::MacroAssemblerARM::loadDouble): - (JSC::MacroAssemblerARM::storeDouble): - (JSC::MacroAssemblerARM::addDouble): - (JSC::MacroAssemblerARM::subDouble): - (JSC::MacroAssemblerARM::mulDouble): - (JSC::MacroAssemblerARM::convertInt32ToDouble): - (JSC::MacroAssemblerARM::branchDouble): - * jit/JIT.h: - -2009-08-05 Zoltan Herczeg - - Reviewed by Gavin Barraclough. - - Add JIT support for generic ARM port without optimizations. - https://bugs.webkit.org/show_bug.cgi?id=24986 - - All JIT optimizations are disabled. - - Signed off by Zoltan Herczeg - Signed off by Gabor Loki - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::baseIndexTransfer32): - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::Imm32::Imm32): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::store32): - (JSC::MacroAssemblerARM::move): - (JSC::MacroAssemblerARM::branch32): - (JSC::MacroAssemblerARM::add32): - (JSC::MacroAssemblerARM::sub32): - (JSC::MacroAssemblerARM::load32): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getBytecodeIndex): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReference): - * jit/JITOpcodes.cpp: - * jit/JITStubs.cpp: - * jit/JITStubs.h: - (JSC::JITStackFrame::returnAddressSlot): - * wtf/Platform.h: - -2009-08-04 Gavin Barraclough - - Rubber Stamped by Oiver Hunt. - - Revert r46643 since this breaks the Yarr::Interpreter running the v8 tests. - https://bugs.webkit.org/show_bug.cgi?id=27874 - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::allocDisjunctionContext): - (JSC::Yarr::Interpreter::freeDisjunctionContext): - (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): - -2009-08-04 Oliver Hunt - - PPC64 Build fix - - * wtf/Platform.h: - -2009-08-04 Benjamin C Meyer - - Reviewed by Adam Treat - - Explicitly include limits.h header when using INT_MAX and INT_MIN - - * interpreter/Interpreter.cpp - -2009-08-03 Harald Fernengel - - Reviewed by Darin Adler. - - Fix compile error for ambigous call to abs() - https://bugs.webkit.org/show_bug.cgi?id=27873 - - Fix ambiguity in abs(long int) call by calling labs() instead - - * wtf/DateMath.cpp: replace call to abs() with labs() - -2009-08-03 Laszlo Gombos - - Reviewed by Eric Seidel. - - [Qt] Consolidate common gcc flags to WebKit.pri - https://bugs.webkit.org/show_bug.cgi?id=27934 - - * JavaScriptCore.pro: - -2009-08-03 Ada Chan - - Fixed the Tiger build. - - * wtf/FastMalloc.cpp: - -2009-08-03 Ada Chan - - Reviewed by Darin Adler. - - Don't use background thread to scavenge memory on Tiger until we figure out why it causes a crash. - https://bugs.webkit.org/show_bug.cgi?id=27900 - - * wtf/FastMalloc.cpp: - -2009-08-03 Fumitoshi Ukai - - Reviewed by Jan Alonzo. - - Fix build break on Gtk/x86_64. - https://bugs.webkit.org/show_bug.cgi?id=27936 - - Use JSVALUE64 for X86_64 LINUX, except Qt. - - * wtf/Platform.h: - -2009-08-02 Xan Lopez - - Fix the GTK+ build. - - * wtf/Platform.h: - -2009-08-02 Geoffrey Garen - - Reviewed by Sam Weinig. - - Disabled JSVALUE32_64 on Qt builds, since all layout tests mysteriously - crash with it enabled. - - * wtf/Platform.h: - -2009-08-02 Geoffrey Garen - - Qt build fix. - - Added JSAPIValueWrapper.cpp to the build. - - * JavaScriptCore.pri: - -2009-08-02 Geoffrey Garen - - Windows build fix. - - Exported symbols for JSAPIValueWrapper. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-02 Geoffrey Garen - - GTK build fix. - - * jit/JITStubs.cpp: #include , for a definition of va_start. - -2009-08-02 Geoffrey Garen - - Qt build fix. - - * runtime/Collector.cpp: #include , for a definition of ULONG_MAX. - -2009-08-02 Geoffrey Garen - - Windows build fix: Nixed JSImmediate::prototype, JSImmediate::toObject, - and JSImmediate::toThisObject, and removed their exported symbols. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * runtime/JSImmediate.cpp: - * runtime/JSImmediate.h: - -2009-08-02 Geoffrey Garen - - Reviewed by Mark Rowe. - - Enabled JSVALUE32_64 by default on all platforms other than x86_64 (which uses JSVALUE64). - - * wtf/Platform.h: - -2009-08-02 Kevin Ollivier - - Reviewed by Jan Alonzo. - - Script for building the JavaScriptCore library for wx. - https://bugs.webkit.org/show_bug.cgi?id=27619 - - * wscript: Added. - -2009-08-02 Yong Li - - Reviewed by George Staikos. - - DateMath depends on strftime and localtime, which need to be imported manually on WinCE - https://bugs.webkit.org/show_bug.cgi?id=26558 - - * wtf/DateMath.cpp: - -2009-08-01 David Kilzer - - wtf/Threading.h: added include of Platform.h - - Reviewed by Mark Rowe. - - * wtf/Threading.h: Added #include "Platform.h" since this header - uses PLATFORM() and other macros. - -2009-08-01 Mark Rowe - - Rubber-stamped by Oliver Hunt. - - Roll out r46668 as it was misinformed. ScopeChain is only used with placement new. - - * runtime/ScopeChain.h: - -2009-08-01 Zoltan Horvath - - Allow custom memory allocation control for JavaScriptCore's HashMap class - http://bugs.webkit.org/show_bug.cgi?id=27871 - - Inherits HashMap class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:148. - - * wtf/RefPtrHashMap.h: - (WTF::): - -2009-08-01 Zoltan Horvath - - Allow custom memory allocation control for JavaScriptCore's ScopeChain class - https://bugs.webkit.org/show_bug.cgi?id=27834 - - Inherits ScopeChain class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/JSFunction.h:109. - - * runtime/ScopeChain.h: - -2009-08-01 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for JavaScriptCore's RegExpConstructorPrivate struct - https://bugs.webkit.org/show_bug.cgi?id=27833 - - Inherits RegExpConstructorPrivate class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/RegExpConstructor.cpp:152. - - * runtime/RegExpConstructor.cpp: - -2009-07-31 Yong Li - - Reviewed by George Staikos. - - Resurrect the old GetTickCount implementation of currentTime, controlled by WTF_USE_QUERY_PERFORMANCE_COUNTER - currentSystemTime taken from older WebKit; currentTime written by Yong Li ; cleanup by Joe Mason - https://bugs.webkit.org/show_bug.cgi?id=27848 - - * wtf/CurrentTime.cpp: - (WTF::currentSystemTime): get current time with GetCurrentFT - (WTF::currentTime): track msec elapsed since first currentSystemTime call using GetTickCount - * wtf/Platform.h: - -2009-07-31 Ada Chan - - Fixes the Windows release-PGO build. - - Reviewed by Jon Honeycutt. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Suppresses the warning about unreachable code that we get by adding "return 0" to WTF::TCMalloc_PageHeap::runScavengerThread(). - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::runScavengerThread): Fixes the error about the method not returning a value in the release-PGO build. - -2009-07-31 Zoltan Horvath - - Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp - https://bugs.webkit.org/show_bug.cgi?id=27874 - - Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::allocDisjunctionContext): - (JSC::Yarr::Interpreter::freeDisjunctionContext): - (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): - -2009-07-30 Xan Lopez - - Reviewed by Jan Alonzo. - - Fix compiler warning. - - GCC does not like C++-style comments in preprocessor directives. - - * wtf/Platform.h: - -2009-07-30 John McCall - - Reviewed by Gavin Barraclough. - - Optimize the X86_64 trampolines: avoid the need for filler arguments - and move the stub-args area closer to the stack pointer. - - * jit/JIT.h: adjust patch offsets because of slight code-size change - * jit/JITCode.h: - (JSC::JITCode::execute): don't pass filler args - * jit/JITStubs.cpp: - (ctiTrampoline): (X86_64): push args onto stack, use args directly - (ctiVMThrowTrampoline): (X86_64): adjust %rsp by correct displacement - (ctiOpThrowNotCaught): (X86_64): adjust %rsp by correct displacement - * jit/JITStubs.h: - (JITStackFrame): (X86_64): move args area earlier - (ctiTrampoline): remove filler args from prototype - -2009-07-30 Gavin Barraclough - - Temporarily revert r46618 since this is b0rking on Linux. - -2009-07-23 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification. - ( https://bugs.webkit.org/show_bug.cgi?id=27635 ) - - This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%. - (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled). - - * bytecode/CodeBlock.cpp: - (JSC::printStructureStubInfo): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. - - * bytecode/CodeBlock.h: - (JSC::): - (JSC::CallLinkInfo::seenOnce): - (JSC::CallLinkInfo::setSeen): - (JSC::MethodCallLinkInfo::seenOnce): - (JSC::MethodCallLinkInfo::setSeen): - - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once. - - * bytecode/StructureStubInfo.cpp: - (JSC::StructureStubInfo::deref): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. - - * bytecode/StructureStubInfo.h: - (JSC::StructureStubInfo::StructureStubInfo): - (JSC::StructureStubInfo::initGetByIdSelf): - (JSC::StructureStubInfo::initGetByIdProto): - (JSC::StructureStubInfo::initGetByIdChain): - (JSC::StructureStubInfo::initGetByIdSelfList): - (JSC::StructureStubInfo::initGetByIdProtoList): - (JSC::StructureStubInfo::initPutByIdTransition): - (JSC::StructureStubInfo::initPutByIdReplace): - (JSC::StructureStubInfo::seenOnce): - (JSC::StructureStubInfo::setSeen): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitGetById): - (JSC::BytecodeGenerator::emitPutById): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::unlinkCall): - - Remove the "don't lazy link" stage of calls. - - * jit/JIT.h: - (JSC::JIT::compileCTIMachineTrampolines): - - Remove the "don't lazy link" stage of calls. - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSlowCase): - - Remove the "don't lazy link" stage of calls. - - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - (JSC::JITStubs::getPolymorphicAccessStructureListSlot): - - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. - - * jit/JITStubs.h: - (JSC::JITThunks::ctiStringLengthTrampoline): - (JSC::JITStubs::): - - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. - - * wtf/PtrAndFlags.h: - (WTF::PtrAndFlags::PtrAndFlags): - (WTF::PtrAndFlags::operator!): - (WTF::PtrAndFlags::operator->): - - Add ! and -> operators, add constuctor with pointer argument. - -2009-07-30 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Fixed failing tests seen on Windows buildbot. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): Use "int" instead of "bool" to guarantee a 32-bit result, - regardless of compiler. gcc on mac uses 32-bit values for bool, - but gcc on linux and MSVC on Windows use 8-bit values. - -2009-07-30 Geoffrey Garen - - Windows build fix: added missing symbols on Windows. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-07-30 Geoffrey Garen - - Windows build fix: removed stale symbols on Windows. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -=== End merge of nitro-extreme branch 2009-07-30 === - -2009-07-20 Geoffrey Garen - - Fixed a post-review typo in r46066 that caused tons of test failures. - - SunSpider reports no change. - - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): Initialize the full vector capacity, to avoid - uninitialized members at the end. - -2009-07-20 Geoffrey Garen - - Windows WebKit build fix: Added some missing exports. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-07-17 Geoffrey Garen - - Reviewed by Sam Weinig. - - Get the branch working on windows. - https://bugs.webkit.org/show_bug.cgi?id=27391 - - SunSpider says 0.3% faster. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Updated - MSVC export lists to fix linker errors. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added / removed - new / old project files. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): Used #pragma pack to tell - MSVC that these structures represent actual memory layout, and should not be - automatically aligned. Changed the return value load to load a 64bit quantity - into the canonical registers. - - * jit/JIT.h: Moved OBJECT_OFFSETOF definition to StdLibExtras.h because - it's needed by more than just the JIT, and it supplements a standard library - macro (offsetof). - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): Fixed an incorrectly signed - cast to resolve an MSVC warning. - - * jit/JITStubs.h: Used #pragma pack to tell MSVC that these structures - represent actual memory layout, and should not be automatically aligned. - - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): Replaced memset_pattern8 with a for loop, since - memset_pattern8 is not portable. (I verified that this version of the loop - gives the best performance / generated code in GCC.) - - * runtime/JSObject.h: - (JSC::JSObject::JSObject): Removed accidental usage of FIELD_OFFSET -- - OBJECT_OFFSETOF is our new macro name. (FIELD_OFFSET conflicts with a - definition in winnt.h.) - - * runtime/JSValue.cpp: Added some headers needed by non-all-in-one builds. - - * runtime/JSValue.h: - (JSC::JSValue::): Made the tag signed, to match MSVC's signed enum values. - (GCC doesn't seem to care one way or the other.) - - * wtf/MainThread.cpp: Moved the StdLibExtras.h #include -- I did this a - while ago to resolve a conflict with winnt.h. I can't remember if it's truly - still needed, but what the heck. - - * wtf/StdLibExtras.h: Moved OBJECT_OFFSETOF definition here. - -2009-07-06 Geoffrey Garen - - Reviewed by Sam Weinig (?). - - Fixed an assertion seen during the stress test. - - Don't assume that, if op1 is constant, op2 is not, and vice versa. Sadly, - not all constants get folded. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - -2009-07-06 Geoffrey Garen - - Reviewed by Sam Weinig. - - Include op_convert_this in result caching. - - No change on SunSpider or v8. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_convert_this): - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): Made the op_convert_this JIT stub return an EncodedJSValue, so - to maintain the result caching contract that { tag, payload } can be - found in { regT1, regT0 }. - -2009-07-06 Geoffrey Garen - - Reviewed by Sam Weinig. - - Implemented result chaining. - - 1% faster on SunSpider. 4%-5% faster on v8. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::move): - * assembler/X86Assembler.h: - (JSC::X86Assembler::movl_rr): Added an optimization to eliminate - no-op mov instructions, to simplify chaining. - - * jit/JIT.cpp: - (JSC::JIT::JIT): - * jit/JIT.h: Added data members and helper functions for recording - chained results. We record both a mapping from virtual to machine register - and the opcode for which the mapping is valid, to help ensure that the - mapping isn't used after the mapped register has been stomped by other - instructions. - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCallVarargsSlowCase): - (JSC::JIT::emit_op_ret): - (JSC::JIT::emit_op_construct_verify): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): Chain function call results. - - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoadTag): - (JSC::JIT::emitLoadPayload): - (JSC::JIT::emitLoad): - (JSC::JIT::emitLoad2): - (JSC::JIT::isLabeled): - (JSC::JIT::map): - (JSC::JIT::unmap): - (JSC::JIT::isMapped): - (JSC::JIT::getMappedPayload): - (JSC::JIT::getMappedTag): Use helper functions when loading virtual - registers into machine registers, in case the loads can be eliminated - by chaining. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_mov): - (JSC::JIT::emit_op_end): - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emit_op_jneq_ptr): - (JSC::JIT::emit_op_next_pname): - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emit_op_catch): Chain results from these opcodes. - - (JSC::JIT::emit_op_profile_will_call): - (JSC::JIT::emit_op_profile_did_call): Load the profiler into regT2 to - avoid stomping a chained result. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_get_by_id): Chain results from these opcodes. - - * jit/JITStubCall.h: - (JSC::JITStubCall::addArgument): Always use { regT1, regT0 }, to facilitate - chaining. - - (JSC::JITStubCall::call): Unmap all mapped registers, since our callee - stub might stomp them. - -2009-07-01 Sam Weinig - - Reviewed by Gavin Barraclough. - - Don't reload values in emitBinaryDoubleOp. - - SunSpider reports a 0.6% progression. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitBinaryDoubleOp): - -2009-07-01 Sam Weinig - - Reviewed by Geoffrey Garen. - - Convert op_div to load op1 and op2 up front. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_div): - -2009-07-01 Sam Weinig - - Reviewed by Geoffrey Garen. - - Don't emit code in emitBinaryDoubleOp if code is unreachable, observable - via an empty (unlinked) jumplist passed in. This only effects op_jnless - and op_jnlesseq at present. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emitBinaryDoubleOp): - -2009-07-01 Geoffrey Garen - - Reviewed by Sam Weinig. - - Converted op_mod to put { tag, payload } in { regT1, regT0 }, and - tidied up its constant case. - - SunSpider reports a 0.2% regression, but a micro-benchmark of op_mod - shows a 12% speedup, and the SunSpider test that uses op_mod most should - benefit a lot from result caching in the end, since it almost always - performs (expression) % constant. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - -2009-06-30 Sam Weinig - - Reviewed by Geoffrey Garen. - - Converted some more arithmetic ops to put { tag, payload } in - { regT1, regT0 }. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - -2009-06-30 Geoffrey Garen - - Reviewed by Sam Weinig. - - Converted some more arithmetic ops to put { tag, payload } in - { regT1, regT0 }, and added a case for subtract constant. - - SunSpider says no change. v8 says 0.3% slower. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_add): - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSub32Constant): - (JSC::JIT::emitSlow_op_sub): - -2009-06-30 Gavin Barraclough - - Reviewed by Sam Weinig. - - Remove more uses of addressFor(), load double constants directly from - the constantpool in the CodeBlock, rather than from the register file. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitBinaryDoubleOp): - -2009-06-30 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed a bug in postfix ops, where we would treat x = x++ and x = x-- - as a no-op, even if x were not an int, and the ++/-- could have side-effects. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emitSlow_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emitSlow_op_post_dec): - -2009-06-30 Geoffrey Garen - - Reviewed by Sam Weinig. - - Converted some arithmetic ops to put { tag, payload } in - { regT1, regT0 }. - - SunSpider says 0.7% faster. v8 says no change. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emit_op_bitxor): - * jit/JITInlineMethods.h: - (JSC::JIT::isOperandConstantImmediateInt): - (JSC::JIT::getOperandConstantImmediateInt): - -2009-06-30 Gavin Barraclough - - Reviewed by Sam Weinig. - - Start removing cases of addressFor(). - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_div): - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoadDouble): - (JSC::JIT::emitLoadInt32ToDouble): - (JSC::JIT::emitStoreDouble): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): - -2009-06-30 Geoffrey Garen - - Rolled back in my last patch with regression fixed. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emitSlow_op_resolve_global): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): - -2009-06-30 Geoffrey Garen - - Rolled out my last patch because it was a 2% SunSpider regression. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): - -2009-06-30 Geoffrey Garen - - Reviewed by Gavin "Sam Weinig" Barraclough. - - Standardized the rest of our opcodes to put { tag, payload } in - { regT1, regT0 } where possible. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emitSlow_op_resolve_global): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): - -2009-06-30 Gavin Barraclough - - Reviewed by Geoffrey Garen. - - Replace calls to store32(tagFor()) and store32(payloadFor()) - with emitStoreInt32(), emitStoreBool(), and emitStoreCell(). - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emitBitAnd32Constant): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emitBitOr32Constant): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emitBitXor32Constant): - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emit_op_add): - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSub32ConstantLeft): - (JSC::JIT::emitSub32ConstantRight): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emit_op_div): - (JSC::JIT::emit_op_mod): - * jit/JITCall.cpp: - (JSC::JIT::emit_op_load_varargs): - * jit/JITInlineMethods.h: - (JSC::JIT::emitStoreInt32): - (JSC::JIT::emitStoreCell): - (JSC::JIT::emitStoreBool): - (JSC::JIT::emitStore): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emit_op_not): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - * jit/JITStubCall.h: - (JSC::JITStubCall::call): - -2009-06-30 Geoffrey Garen - - Reviewed by Sam Weinig. - - Standardized the rest of the property access instructions to put { tag, - payload } in { regT1, regT0 }. - - Small v8 speedup, 0.2% SunSpider slowdown. - - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoad): - (JSC::JIT::emitLoad2): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::emitSlow_op_put_by_id): - (JSC::JIT::patchPutByIdReplace): - -2009-06-29 Sam Weinig - - Reviewed by Gavin Barraclough. - - Various cleanups. - - Use fpRegT* instead of X86::xmm*. - - Use a switch statement in emitBinaryDoubleOp instead of a bunch of - if/elses. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_div): - -2009-06-29 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add inline code dealing with doubles for op_jfalse and op_jtrue. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::): - (JSC::MacroAssemblerX86Common::zeroDouble): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): - -2009-06-28 Geoffrey Garen - - Reviewed by Sam Weinig. - - Standardized op_get_by_id to put { tag, payload } in { regT1, regT0 }. - - SunSpider and v8 report maybe 0.2%-0.4% regressions, but the optimization - this enables will win much more than that back. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - -2009-06-26 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Standardized op_call to put { tag, payload } in { regT1, regT0 }. - - SunSpider and v8 report no change. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - -2009-06-26 Sam Weinig - - Reviewed by Geoffrey Garen. - - Handle multiplying by zero a little better by - inlining the case that both operands are non-negative - into the slowpath. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::branchOr32): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - -2009-06-25 Geoffrey Garen - - Reviewed by Sam Weinig. - - Optimize x++ to ++x inside for loops. - - Sadly, no measurable speedup, but this should help with result chaining. - - * parser/Nodes.cpp: - (JSC::ForNode::emitBytecode): - -2009-06-25 Geoffrey Garen - - Reviewed by Sam Weinig. - - Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_bitnot): - (JSC::JIT::emit_op_post_inc): - -2009-06-25 Geoffrey Garen - - Reviewed by Sam Weinig. - - Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emitSlow_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emitSlow_op_pre_dec): - -2009-06-25 Geoffrey Garen - - Reviewed by Sam Weinig. - - Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): - (JSC::JIT::emitSlow_op_negate): - * jit/JITCall.cpp: - (JSC::JIT::emit_op_construct_verify): - (JSC::JIT::emitSlow_op_construct_verify): - -2009-06-25 Geoffrey Garen - - Reviewed by Sam Weinig. - - Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_true): - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - -2009-06-25 Geoffrey Garen - - Reviewed by Sam Weinig (sort of, maybe). - - Fixed some ASSERTs in http/tests/security. - - These ASSERTs were introduced by http://trac.webkit.org/changeset/45057, - but the underlying problem was actually older. http://trac.webkit.org/changeset/45057 - just exposed the problem by enabling optimization in more cases. - - The ASSERTs fired because we tested PropertySlot::slotBase() for validity, - but slotBase() ASSERTs if it's invalid, so we would ASSERT before - the test could happen. Solution: Remove the ASSERT. Maybe it was valid - once, but it clearly goes against a pattern we've deployed of late. - - The underlying problem was that WebCore would re-use a PropertySlot in - the case of a forwarding access, and the second use would not completely - overwrite the first use. Solution: Make sure to overwrite m_offset when - setting a value on a PropertySlot. (Other values already get implicitly - overwritten during reuse.) - - * runtime/PropertySlot.h: - (JSC::PropertySlot::PropertySlot): - (JSC::PropertySlot::setValueSlot): - (JSC::PropertySlot::setValue): - (JSC::PropertySlot::setRegisterSlot): - (JSC::PropertySlot::setUndefined): - (JSC::PropertySlot::slotBase): - (JSC::PropertySlot::clearOffset): - -2009-06-24 Gavin Barraclough - - Reviewed by Geoff Garen. - - Enable JIT_OPTIMIZE_METHOD_CALLS on the branch, implementation matches current implemenatation in ToT. - - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::emitSlow_op_method_check): - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::compileGetByIdSlowCase): - -2009-06-23 Geoffrey Garen - - Reviewed by Sam Weinig. - - Bit off a tiny bit more of standardizing opcode behavior to help with result - caching. - - SunSpider reports no change, v8 maybe a tiny speedup. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emitSlow_op_to_jsnumber): - (JSC::JIT::emit_op_convert_this): - (JSC::JIT::emitSlow_op_convert_this): - -2009-06-23 Geoffrey Garen - - Reviewed by Sam Weinig. - - Bit off a tiny bit more of standardizing opcode behavior to help with result - caching -- including removing my old enemy, op_resolve_function, because - it was non-standard, and removing it felt better than helping it limp along. - - SunSpider reports no change, v8 maybe a tiny speedup. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emitSlow_op_to_primitive): - * jit/JITStubs.cpp: - * jit/JITStubs.h: - * parser/Nodes.cpp: - (JSC::FunctionCallResolveNode::emitBytecode): - -2009-06-23 Geoffrey Garen - - Reviewed by Sam Weinig. - - Bit off a tiny bit of standardizing opcode behavior to help with result - caching. - - 0.6% SunSpider speedup. 0.3% v8 speedup. - - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoad): Accomodate a base register that overlaps with payload - by loading tag before payload, to avoid stomping base/payload. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_mov): Abide by the standard "tag in regT1, payload in - regT0" semantics. - - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): Ditto. Also, removed some irrelevent - loads while I was at it. The global object's "d" pointer never changes - after construction. - -2009-06-23 Gavin Barraclough - - Reviewed by Sam Weinig. - - Remove 'arguments' field from Register union (again). - This time do so without breaking tests (radical, I know). - - * interpreter/CallFrame.h: - (JSC::ExecState::optionalCalleeArguments): - (JSC::ExecState::setArgumentCount): - (JSC::ExecState::init): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): - * interpreter/Register.h: - (JSC::Register::withInt): - (JSC::Register::): - (JSC::Register::Register): - (JSC::Register::i): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_tear_off_arguments): - * runtime/Arguments.h: - (JSC::JSActivation::copyRegisters): - (JSC::Register::arguments): - * runtime/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): - * runtime/JSActivation.h: - -2009-06-23 Geoffrey Garen - - Reviewed by Sam Weinig. - - Removed some result register tracking cruft in preparation for a new - result tracking mechanism. - - SunSpider reports no change. - - * assembler/AbstractMacroAssembler.h: - * assembler/X86Assembler.h: - (JSC::X86Assembler::JmpDst::JmpDst): No need to track jump targets in - machine code; we already do this in bytecode. - - * jit/JIT.cpp: - (JSC::JIT::JIT): - (JSC::JIT::emitTimeoutCheck): Make sure to save and restore the result - registers, so an opcode with a timeout check can still benefit from result - register caching. - - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): Removed calls to killLastResultRegister() - in preparation for something new. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - * jit/JITInlineMethods.h: - (JSC::JIT::emitGetFromCallFrameHeaderPtr): - (JSC::JIT::emitGetFromCallFrameHeader32): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jmp): - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_jneq_ptr): - (JSC::JIT::emit_op_jsr): - (JSC::JIT::emit_op_sret): - (JSC::JIT::emit_op_jmp_scopes): ditto - - * jit/JITStubCall.h: - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::getArgument): added a mechanism for reloading an argument - you passed to a JIT stub, for use in emitTimeoutCheck. - -2009-06-23 Sam Weinig - - Reviewed by Geoffrey Garen. - - Remove now-useless inplace variants of binary ops. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emit_op_add): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emit_op_mul): - -2009-06-23 Sam Weinig - - Reviewed by Geoffrey Garen. - - Move off memory operands to aid in re-enabling result caching. - - - No regression measured. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emitBitAnd32Constant): - (JSC::JIT::emitBitAnd32InPlace): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emitBitOr32Constant): - (JSC::JIT::emitBitOr32InPlace): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emitBitXor32Constant): - (JSC::JIT::emitBitXor32InPlace): - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emitSlow_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emitSlow_op_pre_dec): - (JSC::JIT::emit_op_add): - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitAdd32InPlace): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlowAdd32Constant): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSlow_op_sub): - (JSC::JIT::emitSub32ConstantLeft): - (JSC::JIT::emitSub32ConstantRight): - (JSC::JIT::emitSub32InPlaceLeft): - (JSC::JIT::emitSub32InPlaceRight): - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitMul32InPlace): - (JSC::JIT::emit_op_div): - (JSC::JIT::emit_op_mod): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargs): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emit_op_not): - (JSC::JIT::emit_op_jneq_ptr): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emit_op_to_jsnumber): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - -2009-06-23 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed some missing and/or misplaced labels in bytecode generation, so - we don't have to work around them in JIT code generation. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitJumpSubroutine): - * parser/Nodes.cpp: - (JSC::TryNode::emitBytecode): - -2009-06-22 Geoffrey Garen - - Reviewed by Sam Weinig. - - For member function calls, emit "this" directly into the "this" slot - for the function call, instead of moving it there later. This reduces - time spent in op_mov during certain calls, like "a.b.c()". - - 1%-2% speedup on v8, mostly richards and delta-blue. - - * parser/Nodes.cpp: - (JSC::FunctionCallDotNode::emitBytecode): - -2009-06-22 Gavin Barraclough - - Reviewed by Sam Weinig. - - Remove 'arguments' field from Register union. Having JSCell derived types in the union is - dangerous since it opens the possibility for the field to be written as a raw pointer but - then read as a JSValue. This will lead to statle data being read for the tag, which may - be dangerous. Having removed Arguments* types form Register, all arguments objects must - always explicitly be stored in the register file as JSValues. - - * interpreter/CallFrame.h: - (JSC::ExecState::optionalCalleeArguments): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): - * interpreter/Register.h: - (JSC::Register::): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_tear_off_arguments): - * runtime/Arguments.h: - (JSC::JSActivation::copyRegisters): - * runtime/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): - * runtime/JSActivation.h: - -2009-06-03 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add back known this value optimization by abstracting - slow case if not JSCell jumps. - - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCallVarargsSlowCase): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::emitJumpSlowCaseIfNotJSCell): - (JSC::JIT::linkSlowCaseIfNotJSCell): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emitSlow_op_instanceof): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::emitSlow_op_put_by_id): - -2009-06-01 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed some of the regression in crypto-aes.js. (8.5% speedup in - crypto-aes.js.) - - SunSpider reports no change overall. - - Division was producing double results, which took the slow path through - array access code. - - Strangely, all my attempts at versions of this patch that modified array - access code to accept ints encoded as doubles along the fast or slow paths - were regressions. So I did this instead. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_div): When dividing an int by an int, go ahead and try - to turn the result into an int. Don't just do int division, though, because - testing shows it to be slower than SSE double division, and the corner - cases are pretty complicated / lengthy on top of that. Also, don't try - to canonicalize division of known tiny numerators into ints, since that's a - waste of time. - -2009-05-26 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Fixed a regression caused by my recent fix for NaN. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitBinaryDoubleOp): Actually do the comparison in reverse - order, like the ChangeLog said we would, bokay? - -2009-05-26 Geoffrey Garen - - Reviewed by Sam Weinig and Oliver Hunt. - - Fixed two edge cases in %: - - - Don't do -2147483648 % x as a fast case, since you might do -2147483648 % -1, - which will signal a hardware exception due to overflow. - - - In the case of a zero remainder, be sure to store negative zero if the - dividend was zero. - - SunSpider reports no change. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - -2009-05-25 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Fixed a regression when comparing to NaN. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitBinaryDoubleOp): For op_jnless and op_jnless_eq, do the - comparison in reverse order, and jump if the result is below or - below-or-equal. This ensures that we do jump in the case of NaN. - -2009-05-25 Geoffrey Garen - - Reviewed by Oliver Hunt. - - SunSpider says no change. - - Fixed regressions in fast/js/var-declarations-shadowing.html and - fast/js/equality.html, caused by recent == and != optimizations. - - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_eq): Don't treat "compare to string" as always - numeric or string comparison. If the second operand is an object, you - need to ToPrimitive it, and start all over again. Also, I wrote out each - of the possible cases explicitly, to cut down on redundant branching. - -2009-05-25 Sam Weinig - - Reviewed by Mark Rowe. - - Fix bug in fast/js/constant-folding.html where we were not negating - -0 properly. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): - -2009-05-23 Geoffrey Garen - - Reviewed by Oliver Hunt. - - Refactored new slow case codegen for == and !=. - - SunSpider reports no change, maybe a tiny speedup. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emitSlow_op_neq): Made a vptr comparison a *Ptr operation, - instead of *32, to make it portable to 64bit. Reorganized the string - and generic cases to make their control flow a little clearer. - -2009-05-23 Geoffrey Garen - - Reviewed by Maciej Stachowiak. - - Optimized == and != for our new value representation -- especially for strings. - - 14% speedup on date-format-tofte. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): - * jit/JITStubCall.h: - (JSC::JITStubCall::JITStubCall): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_eq): - (JSC::JITStubs::cti_op_eq_strings): - (JSC::JITStubs::cti_op_call_eval): - * jit/JITStubs.h: - (JSC::): - * runtime/JSValue.h: - -2009-05-22 Sam Weinig - - Reviewed by Gavin Barraclough. - - Fix non-SSE enabled builds. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_add): Don't early return here, we still need to call the JIT stub. - (JSC::JIT::emitSlow_op_sub): Ditto. - -2009-05-22 Geoffrey Garen - - Reviewed by Sam Weinig. - - Here's a thought: let's not take a jit stub call just to multiply by 1, - bokay? - - imul doesn't set the zero flag, so to test for a zero result, we need - an explicit instruction. (Luckily, it does set the overflow flag, so - we can still use that.) - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emitMul32InPlace): - -2009-05-22 Sam Weinig - - Reviewed by Geoffrey "Premature Commit" Garen. - - Add back constant integer cases for op_add. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_add): - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlowAdd32Constant): - * jit/JITInlineMethods.h: - (JSC::JIT::getConstantOperandImmediateDouble): - (JSC::JIT::isOperandConstantImmediateDouble): - -2009-05-22 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added fast double cases for op_jnless and op_jnlesseq. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::JumpList::jumps): New accesor, used by - addSlowCase. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::ucomisd_rm): New method for comparing register to - memory. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emit_op_add): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emit_op_div): Modified emitBinaryDoubleOp to accept comparison/jump - operations in addition to operations with explicit result registers. - - * jit/JITInlineMethods.h: - (JSC::JIT::addSlowCase): Added an "addSlowCase" for JumpLists, so clients - can track multiple jumps to the same slow case condition together. - -2009-05-21 Sam Weinig - - Reviewed by Gavin Barraclough. - - Implement op_negate inline fast cases. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::neg32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::negl_m): - (JSC::X86Assembler::xorpd_rr): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): - (JSC::JIT::emitSlow_op_negate): - -2009-05-20 Sam Weinig - - Reviewed by Gavin Barraclough. - - Update the patchOffsetGetByIdSlowCaseCall constant for the - case that OPCODE_SAMPLING is enabled. - - * jit/JIT.h: - -2009-05-20 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added support for inline subtraction of doubles. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSlow_op_sub): - (JSC::JIT::emitSlowSub32InPlaceLeft): - (JSC::JIT::emitBinaryDoubleOp): - -2009-05-20 Sam Weinig - - Reviewed by Geoffrey Garen. - - Added support for inline division. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::divsd_rr): - (JSC::X86Assembler::divsd_mr): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitBinaryOp): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_div): - (JSC::JIT::emitSlow_op_div): - -2009-05-20 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added support for inline addition of doubles. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_add): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlowAdd32InPlace): - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - -2009-05-20 Geoffrey Garen - - Reviewed by Sam Weinig. - - Factored inline double operations into a helper function, so that we - can reuse this code for other math operations. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_mul): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - -2009-05-20 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added support for inline multiplication of doubles. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::cvtsi2sd_mr): New function, useful for loading an - int32 into a double register. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): Filled out these cases for double arithmetic. - - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::addressFor): New function, useful for addressing a JSValue's - full 64bits as a double. - -2009-05-19 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implement and enable optimized calls. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): Add ENABLE(JIT_OPTIMIZE_CALL) guards - around the the optimize call only trampolines (virtualCallPreLink and virtualCallLink). - Update the trampolines to account for the new JSValue representation. - (JSC::JIT::unlinkCall): Use NULL instead of JSValue noValue. - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): Update to account for the new JSValue representation - (JSC::JIT::compileOpCallSlowCase): Ditto. - - * jit/JITStubs.h: Remove incorrect !ENABLE(JIT_OPTIMIZE_CALL) guard. - - * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_CALL. - -2009-05-19 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implement and enable optimized property access. - - * assembler/AbstractMacroAssembler.h: Fix comment. - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): Remove array length trampoline - and implement the string length trampoline. - * jit/JIT.h: Add new constants for patch offsets. - * jit/JITInlineMethods.h: Remove FIELD_OFFSET which is now in StdLibExtras.h. - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::emitSlow_op_put_by_id): - (JSC::JIT::compilePutDirectOffset): - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubCall.h: - (JSC::JITStubCall::addArgument): Add version of addArgument that takes - two registers for the tag and payload. - * jit/JITStubs.cpp: - (JSC::JITStubs::JITStubs): Remove array length trampoline pointer. - (JSC::JITStubs::cti_op_get_by_id_self_fail): - * jit/JITStubs.h: - * runtime/JSObject.h: - (JSC::JSObject::JSObject): Move m_inheritorID below the property storage - to align it to a 16 byte boundary. - * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS - * wtf/StdLibExtras.h: Move FIELD_OFFSET here. - -2009-05-17 Sam Weinig - - Reviewed by Geoffrey Garen. - - Remove unneeded ExecState parameter from the number JSValue constructors. - - * runtime/JSValue.h: - (JSC::jsNumber): - (JSC::jsNaN): - (JSC::JSValue::JSValue): - -2009-05-15 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implemented fast path for op_put_by_val when putting to arrays. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - -2009-05-15 Geoffrey Garen (Mostly by Sam) - - Reviewed by Sam Weinig. - - Implemented fast path for op_get_by_val when accessing array. - - * jit/JIT.cpp: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitSlow_op_get_by_val): - -2009-05-14 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed a failure in fast/js/math-transforms.html caused by failing to - preserve -0 in multiplication. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::jz): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emitMul32Constant): - (JSC::JIT::emitMul32InPlace): Check both for overflow and for zero when - doing multiplication. Use a slow case to get these right. - -2009-05-14 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed a bug in the varargs calling convention. - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargs): Move the argument count into regT1, - since that's where ctiVirtualCall expects it to be. - -2009-05-14 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed a small bug in instanceof's looping code. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): NULL means the object has no prototype, - so only loop when *not* equal to NULL. - -2009-05-14 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed a small bug in instanceof's result writing code. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): Make sure to fill out the payload bits - in all cases. - -2009-05-14 Sam Weinig - - Reviewed by Geoffrey Garen. - - Removed an invalid assertion in cti_op_urshift which - depended on a fast path for op_urshift which has - never existed. - - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_urshift): - -2009-05-14 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed loop_if_true, which had the same reversed test that jtrue had. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_true): - -2009-05-14 Sam Weinig - - Reviewed by Geoffrey Garen. - - In op_neq, we apparently want to check that one value - does *not* equal another. Go figure. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_neq): - -2009-05-14 Sam Weinig - - Reviewed by Geoffrey Garen. - - The slow case of op_mod should call op_mod's jit stub, - not op_mul. That would be dumb. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_mod): - -2009-05-14 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed problems when using 'arguments' due to a half-initialized register. - - * interpreter/CallFrame.h: - (JSC::ExecState::setCalleeArguments): - (JSC::ExecState::init): Require a full JSValue when setting up the - 'arguments' virtual register, since this register is accessible from JIT - code and bytecode, and needs to be a true JSValue. - - * interpreter/CallFrameClosure.h: - (JSC::CallFrameClosure::resetCallFrame): ditto - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): ditto - - * interpreter/Register.h: Removed the constructor that allowed assignment - of a JSArguments* to a register. That is not safe. See above. - - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_create_arguments): - (JSC::JITStubs::cti_op_create_arguments_no_params): ditto - -2009-05-14 Sam Weinig - - Reviewed by Geoffrey Garen. - - We really want to go to the slow case in op_jfalse and - op_jtrue if the value is *not* boolean. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): - -2009-05-14 Sam Weinig - - Reviewed by Geoffrey Garen. - - Flipped the condition when emitting a an op_loop_if_less or op_loop_if_lesseq - if the first operand is a constant. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - -2009-05-14 Sam Weinig - - Reviewed by Geoffrey Garen. - - Added missing return in op_jnless and op_jnlesseq. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - -2009-05-14 Sam Weinig - - Reviewed by Geoffrey Garen. - - Load constants into the the register file as a temporary measure to - aid bring up. This allows us to use to treat constants like any - other virtual register. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_enter): - (JSC::JIT::emit_op_enter_with_activation): - -2009-05-14 Geoffrey Garen - - Reviewed by Sam Weinig. - - Implemented op_strict_eq. Original patch by Snowy, by way of Sam and Gavin. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::set8): Added set8, since it's slightly - faster than set32, and the new value representation usually doesn't - need set32. - - * jit/JIT.cpp: - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoadTag): - (JSC::JIT::emitLoadPayload): Added helper functions for dealing with - constants. Eventually, we should write special cases for all constants, - but these are helpful in the short term. - - * jit/JITOpcodes.cpp: - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emitSlow_op_stricteq): - (JSC::JIT::emitSlow_op_nstricteq): teh opcodez. - - * runtime/JSValue.h: - (JSC::JSValue::): - (JSC::JSValue::isDouble): Added a LowestTag for clarity. - -2009-05-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Fixed some bugs in host function calls. - - testapi now passes! - - * jit/JIT.cpp: Changed some registers around to avoid overwriting edx:eax, - which is how JSValues are now returned. Also changed the code that - passes thisValue to pass the full 64bits of the value. Also added - an #error compiler directive to other platform builds, since the JSValue - return signature probably won't return in edx:eax on those platforms, - and we'll have to investigate a solution. - -2009-05-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Removed parameters from functions that are intended never to use their - parameters. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - -2009-05-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Ported op_instance_of from TOT. It's basically the same, but some register - stuff changed to memory stuff. - - * jit/JITInlineMethods.h: - (JSC::JIT::emitPutJITStubArgFromVirtualRegister): - (JSC::JIT::emitStore): Changed to use helper functions. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emitSlow_op_instanceof): Ported from TOT. - -2009-05-13 Geoffrey Garen - - Reviewed by Gavin Barraclough. - - Added a comment to explain an exception-handling subtelty that we found - hard to remember when reviewing my last patch. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_catch): - -2009-05-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Implemented try/catch. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_throw): Updated to use JITStackFrame abstraction. - (JSC::JIT::emit_op_catch): Filled out. - -2009-05-13 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implemented op_loop_if_true, op_jfalse, op_jtrue, op_jeq_null and op_jneq_null - - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_instanceof): Moved from below to be next to its - fast brother. - - (JSC::JIT::emit_op_loop_if_true): Similar to the old version - in that it tries to do the integer case first and reduce the - number of jumps you might need to take. - (JSC::JIT::emitSlow_op_loop_if_true): - - (JSC::JIT::emit_op_jfalse): Very similar to op_loop_if_true, only - the inverse and without a timeout check. - (JSC::JIT::emitSlow_op_jfalse): - - (JSC::JIT::emit_op_jtrue): Very similar to op_loop_if_true except - without the timeout check. - (JSC::JIT::emitSlow_op_jtrue): - - (JSC::JIT::emit_op_jeq_null): Very similar to the implementation - of op_eq, except it takes jumps instead of copying the condition - to a dst. - (JSC::JIT::emit_op_jneq_null): Ditto but for op_neq. - -2009-05-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Implemented op_call_varargs. - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::emit_op_call): - (JSC::JIT::emit_op_call_eval): - (JSC::JIT::emit_op_load_varargs): - (JSC::JIT::emit_op_call_varargs): - (JSC::JIT::emit_op_construct): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jneq_ptr): - -2009-05-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Implemented op_call_eval. - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpCall): - * jit/JITStubCall.h: - (JSC::CallEvalJITStub::CallEvalJITStub): - -2009-05-13 Sam Weinig - - Reviewed by Gavin Barraclough. - - Implemented op_not. (Gavin did most of the work!) - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_not): - (JSC::JIT::emitSlow_op_not): - -2009-05-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Implemented op_global_resolve. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): Added back accidentally removed - early returns. - - (JSC::JIT::emit_op_resolve_global): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_resolve_global): Pretty similar to the old code, - but we need two reads and a TimesEight step in order to account for the - 64bit value size. - - * jit/JITStubs.h: - (JSC::): Slightly tweaked this code to specialize for a JSGlobalObject*, - to avoid having to pass an irrelevant tag pointer to the stub. - -2009-05-13 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implemented op_to_jsnumber. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emitSlow_op_to_jsnumber): - -2009-05-13 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implemented op_convert_this. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_convert_this): - (JSC::JIT::emitSlow_op_convert_this): - -2009-05-13 Geoffrey Garen - - Reviewed by Sam Weinig. - - Got basic JS function and constructor calls working. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::emit_op_ret): - (JSC::JIT::emit_op_construct_verify): - (JSC::JIT::emitSlow_op_construct_verify): - (JSC::JIT::emitSlow_op_call): - (JSC::JIT::emitSlow_op_call_eval): - (JSC::JIT::emitSlow_op_call_varargs): - (JSC::JIT::emitSlow_op_construct): - (JSC::JIT::compileOpCall): Filled out these cases, with call_eval #if'd out. - - * jit/JITInlineMethods.h: - (JSC::JIT::emitPutJITStubArgFromVirtualRegister): - (JSC::JIT::emitLoad): Restored some legacy "*CTIArg*" functions, - since I wanted to avoid the complexity of revamping the API here while - trying to bring it up. Eventually, we should re-remove all of these functions. - - (JSC::JIT::recordJumpTarget): Removed unnecessary macro cruft. You will - not silence me, Sam Weinig! The world will know that you are a crufty, - crufty, crufty programmer!!! - - * jit/JITOpcodes.cpp: - * jit/JITStubs.cpp: - (JSC::): - * jit/JITStubs.h: Changed up some offsets in the JITStackFrame class, since - and off-by-one error was causing stack misalignment. - -2009-05-13 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implement op_eq_null and op_neq_null. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::set8): - (JSC::MacroAssemblerX86Common::setTest8): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_stricteq): - (JSC::JIT::emitSlow_op_stricteq): - (JSC::JIT::emit_op_nstricteq): - (JSC::JIT::emitSlow_op_nstricteq): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - * jsc.cpp: - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implement op_new_error. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_new_error): - * jit/JITStubCall.h: - (JSC::JITStubCall::addArgument): Add a version of addArgument - that takes a constant JSValue. - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Remove now unused emitGetVariableObjectRegister and emitPutVariableObjectRegister. - - * jit/JIT.cpp: - * jit/JIT.h: - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implement op_to_primitive and op_next_pname. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_construct_verify): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emitSlow_op_to_primitive): - (JSC::JIT::emitSlow_op_loop_if_true): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emit_op_next_pname): - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add op_get_global_var, op_put_global_var, emit_op_get_scoped_var, emit_op_put_scoped_var and - op_unexpected_load. - - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::tagFor): - (JSC::JIT::payloadFor): - (JSC::JIT::emitLoad): - (JSC::JIT::emitStore): - (JSC::JIT::emitLoadReturnValue): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_unexpected_load): - -2009-05-12 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added overflow handling to op_sub. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_sub): - (JSC::JIT::emitSlowSub32InPlaceLeft): - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Remove a function call by folding op_get_by_id and op_put_by_id into - their respective compile functions. - - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::emitSlow_op_put_by_id): - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Make JITStubCall work in 64bit by making the stack index - step dependent on the size of void*. - - * jit/JITStubCall.h: - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::addArgument): - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implement simple version of property access opcodes - which just call a stub functions. - - * jit/JITOpcodes.cpp: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emitSlow_op_put_by_id): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - (JSC::JIT::emit_op_put_by_index): - (JSC::JIT::emit_op_put_getter): - (JSC::JIT::emit_op_put_setter): - (JSC::JIT::emit_op_del_by_id): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - * jit/JITStubCall.h: - (JSC::JITStubCall::addArgument): - * jsc.cpp: - -2009-05-12 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added work-around for XCode debugging echo problem. - - * jsc.cpp: - (runInteractive): - -2009-05-12 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added overflow handling to op_add. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlowAdd32InPlace): - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add slow cases for op_jnless or emit_op_jnlesseq. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emitSlow_op_jnlesseq): - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add implementations for op_jnless, emit_op_jnlesseq, op_loop_if_less and op_loop_if_lesseq. - No slow cases for op_jnless or emit_op_jnlesseq yet. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emitSlow_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emitSlow_op_loop_if_lesseq): - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Turn the RECORD_JUMP_TARGET macro into an inline function. - - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::recordJumpTarget): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jmp): - (JSC::JIT::emit_op_jsr): - (JSC::JIT::emit_op_jmp_scopes): - -2009-05-12 Sam Weinig - - Add MacroAssemblerX86Common::set8 to fix the build. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::set8): - -2009-05-12 Geoffrey Garen - - Reviewed by Sam Weinig. - - Added overflow recovery for pre_inc and pre_dec. - - Turned some short-circuit code into early returns, as is the WebKit style. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emitSlow_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emitSlow_op_post_dec): - (JSC::JIT::emitSlow_op_pre_inc): - (JSC::JIT::emitSlow_op_pre_dec): - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implement op_jmp, op_loop, op_eq and op_neq. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jmp): - (JSC::JIT::emit_op_loop): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): - (JSC::JIT::emit_op_enter): - (JSC::JIT::emit_op_enter_with_activation): - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implement the slow cases for arithmetic opcodes. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_lshift): - (JSC::JIT::emitSlow_op_rshift): - (JSC::JIT::emitSlow_op_bitand): - (JSC::JIT::emitSlow_op_bitor): - (JSC::JIT::emitSlow_op_bitxor): - (JSC::JIT::emitSlow_op_bitnot): - (JSC::JIT::emitSlow_op_sub): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emitSlow_op_mod): - (JSC::JIT::emit_op_mod): - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Implement op_bitnot. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::not32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::notl_m): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_bitnot): - -2009-05-12 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add arithmetic opcode implementations from the old nitro-extreme branch. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emitSlow_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_rshift): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emitBitAnd32Constant): - (JSC::JIT::emitBitAnd32InPlace): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emitSlow_op_bitor): - (JSC::JIT::emitBitOr32Constant): - (JSC::JIT::emitBitOr32InPlace): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emitSlow_op_bitxor): - (JSC::JIT::emitBitXor32Constant): - (JSC::JIT::emitBitXor32InPlace): - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emitSlow_op_bitnot): - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emitSlow_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emitSlow_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emitSlow_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emitSlow_op_pre_dec): - (JSC::JIT::emit_op_add): - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitAdd32InPlace): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSlow_op_sub): - (JSC::JIT::emitSub32ConstantLeft): - (JSC::JIT::emitSub32ConstantRight): - (JSC::JIT::emitSub32InPlaceLeft): - (JSC::JIT::emitSub32InPlaceRight): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emitMul32Constant): - (JSC::JIT::emitMul32InPlace): - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - * jit/JITOpcodes.cpp: - -2009-05-12 Geoffrey Garen - - Removed JIT_OPTIMIZE_ARITHMETIC setting, since it was all about 32bit - value representations. - - Added JSAPIValueWrapper to the repository. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - * runtime/JSAPIValueWrapper.cpp: Added. - (JSC::JSAPIValueWrapper::toPrimitive): - (JSC::JSAPIValueWrapper::getPrimitiveNumber): - (JSC::JSAPIValueWrapper::toBoolean): - (JSC::JSAPIValueWrapper::toNumber): - (JSC::JSAPIValueWrapper::toString): - (JSC::JSAPIValueWrapper::toObject): - * runtime/JSAPIValueWrapper.h: Added. - (JSC::JSAPIValueWrapper::value): - (JSC::JSAPIValueWrapper::isAPIValueWrapper): - (JSC::JSAPIValueWrapper::JSAPIValueWrapper): - (JSC::jsAPIValueWrapper): - * wtf/Platform.h: - -2009-05-12 Geoffrey Garen - - Turned on the JIT and got it building and running the most trivial of - programs. - - All configurable optimizations are turned off, and a few opcodes are ad - hoc #if'd out. - - So far, I've only merged op_mov and op_end, but some stub-reliant - opcodes work as-is from TOT. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - * bytecode/CodeBlock.h: - * jit/JIT.cpp: - (JSC::JIT::compileOpStrictEq): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emitSlow_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_rshift): - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emitSlow_op_bitand): - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emitSlow_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emitSlow_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emitSlow_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emitSlow_op_pre_dec): - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - (JSC::JIT::emit_op_add): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emit_op_sub): - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlow_op_mul): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::getConstantOperandImmediateInt): - (JSC::JIT::isOperandConstantImmediateInt): - (JSC::JIT::emitInitRegister): - (JSC::JIT::addSlowCase): - (JSC::JIT::addJump): - (JSC::JIT::emitJumpSlowToHot): - (JSC::JIT::tagFor): - (JSC::JIT::payloadFor): - (JSC::JIT::emitLoad): - (JSC::JIT::emitLoadReturnValue): - (JSC::JIT::emitStore): - (JSC::JIT::emitStoreReturnValue): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_mov): - (JSC::JIT::emit_op_end): - (JSC::JIT::emit_op_jmp): - (JSC::JIT::emit_op_loop): - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_tear_off_activation): - (JSC::JIT::emit_op_ret): - (JSC::JIT::emit_op_construct_verify): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emit_op_loop_if_true): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emit_op_not): - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_jneq_ptr): - (JSC::JIT::emit_op_unexpected_load): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emit_op_throw): - (JSC::JIT::emit_op_next_pname): - (JSC::JIT::emit_op_push_scope): - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emit_op_push_new_scope): - (JSC::JIT::emit_op_catch): - (JSC::JIT::emit_op_switch_imm): - (JSC::JIT::emit_op_switch_char): - (JSC::JIT::emit_op_switch_string): - (JSC::JIT::emit_op_new_error): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - (JSC::JIT::emit_op_convert_this): - (JSC::JIT::emit_op_profile_will_call): - (JSC::JIT::emit_op_profile_did_call): - (JSC::JIT::emitSlow_op_construct_verify): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emitSlow_op_loop_if_less): - (JSC::JIT::emitSlow_op_loop_if_lesseq): - (JSC::JIT::emitSlow_op_put_by_val): - (JSC::JIT::emitSlow_op_not): - (JSC::JIT::emitSlow_op_instanceof): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emit_op_put_by_index): - (JSC::JIT::emit_op_put_getter): - (JSC::JIT::emit_op_put_setter): - (JSC::JIT::emit_op_del_by_id): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - * jit/JITStubCall.h: - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::addArgument): - (JSC::JITStubCall::call): - (JSC::JITStubCall::): - (JSC::CallEvalJITStub::CallEvalJITStub): - * jit/JITStubs.cpp: - (JSC::): - (JSC::JITStubs::cti_op_add): - (JSC::JITStubs::cti_op_pre_inc): - (JSC::JITStubs::cti_op_mul): - (JSC::JITStubs::cti_op_get_by_val): - (JSC::JITStubs::cti_op_get_by_val_string): - (JSC::JITStubs::cti_op_get_by_val_byte_array): - (JSC::JITStubs::cti_op_sub): - (JSC::JITStubs::cti_op_put_by_val): - (JSC::JITStubs::cti_op_put_by_val_array): - (JSC::JITStubs::cti_op_put_by_val_byte_array): - (JSC::JITStubs::cti_op_negate): - (JSC::JITStubs::cti_op_div): - (JSC::JITStubs::cti_op_pre_dec): - (JSC::JITStubs::cti_op_post_inc): - (JSC::JITStubs::cti_op_eq): - (JSC::JITStubs::cti_op_lshift): - (JSC::JITStubs::cti_op_bitand): - (JSC::JITStubs::cti_op_rshift): - (JSC::JITStubs::cti_op_bitnot): - (JSC::JITStubs::cti_op_mod): - (JSC::JITStubs::cti_op_neq): - (JSC::JITStubs::cti_op_post_dec): - (JSC::JITStubs::cti_op_urshift): - (JSC::JITStubs::cti_op_bitxor): - (JSC::JITStubs::cti_op_bitor): - (JSC::JITStubs::cti_op_switch_imm): - * jit/JITStubs.h: - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - * runtime/JSFunction.cpp: - (JSC::JSFunction::~JSFunction): - * runtime/JSValue.h: - (JSC::JSValue::payload): - * wtf/Platform.h: - -2009-05-07 Sam Weinig - - Reviewed by Geoffrey Garen. - - Add some new MacroAssembler and assembler functions that will be needed shortly. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::add32): - (JSC::MacroAssemblerX86Common::and32): - (JSC::MacroAssemblerX86Common::mul32): - (JSC::MacroAssemblerX86Common::neg32): - (JSC::MacroAssemblerX86Common::or32): - (JSC::MacroAssemblerX86Common::sub32): - (JSC::MacroAssemblerX86Common::xor32): - (JSC::MacroAssemblerX86Common::branchAdd32): - (JSC::MacroAssemblerX86Common::branchMul32): - (JSC::MacroAssemblerX86Common::branchSub32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::addl_rm): - (JSC::X86Assembler::andl_mr): - (JSC::X86Assembler::andl_rm): - (JSC::X86Assembler::andl_im): - (JSC::X86Assembler::negl_r): - (JSC::X86Assembler::notl_r): - (JSC::X86Assembler::orl_rm): - (JSC::X86Assembler::orl_im): - (JSC::X86Assembler::subl_rm): - (JSC::X86Assembler::xorl_mr): - (JSC::X86Assembler::xorl_rm): - (JSC::X86Assembler::xorl_im): - (JSC::X86Assembler::imull_mr): - -2009-05-11 Sam Weinig - - Reviewed by Cameron Zwarich. - - Remove the NumberHeap. - - * JavaScriptCore.exp: - * runtime/Collector.cpp: - (JSC::Heap::Heap): - (JSC::Heap::destroy): - (JSC::Heap::recordExtraCost): - (JSC::Heap::heapAllocate): - (JSC::Heap::markConservatively): - (JSC::Heap::sweep): - (JSC::Heap::collect): - (JSC::Heap::objectCount): - (JSC::Heap::statistics): - (JSC::typeName): - (JSC::Heap::isBusy): - * runtime/Collector.h: - (JSC::Heap::globalData): - * runtime/JSCell.h: - -2009-05-11 Geoffrey Garen - - Reviewed by Sam Weinig. - - Land initial commit of new number representation for 32 bit platforms, - with JIT disabled. - - * API/APICast.h: - (toJS): - (toRef): - * API/JSCallbackObjectFunctions.h: - (JSC::::hasInstance): - (JSC::::toNumber): - (JSC::::toString): - * API/tests/testapi.c: - (EvilExceptionObject_convertToType): - * AllInOneFile.cpp: - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::valueToSourceString): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitLoad): - (JSC::BytecodeGenerator::emitUnexpectedLoad): - (JSC::keyForImmediateSwitch): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): - (JSC::Interpreter::privateExecute): - * parser/Nodes.cpp: - (JSC::ArrayNode::emitBytecode): - (JSC::processClauseList): - * runtime/ArgList.h: - * runtime/Collector.h: - (JSC::sizeof): - * runtime/DateMath.cpp: - * runtime/ExceptionHelpers.h: - * runtime/InitializeThreading.cpp: - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - * runtime/JSCell.cpp: - * runtime/JSCell.h: - (JSC::JSCell::isAPIValueWrapper): - (JSC::JSValue::isString): - (JSC::JSValue::isGetterSetter): - (JSC::JSValue::isObject): - (JSC::JSValue::getString): - (JSC::JSValue::getObject): - (JSC::JSValue::getCallData): - (JSC::JSValue::getConstructData): - (JSC::JSValue::getUInt32): - (JSC::JSValue::marked): - (JSC::JSValue::toPrimitive): - (JSC::JSValue::getPrimitiveNumber): - (JSC::JSValue::toBoolean): - (JSC::JSValue::toNumber): - (JSC::JSValue::toString): - (JSC::JSValue::needsThisConversion): - (JSC::JSValue::toThisString): - (JSC::JSValue::getJSNumber): - (JSC::JSValue::toObject): - (JSC::JSValue::toThisObject): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.h: - (JSC::Structure::prototypeForLookup): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncParseInt): - * runtime/JSImmediate.h: - * runtime/JSNumberCell.cpp: Removed. - * runtime/JSNumberCell.h: Removed. - * runtime/JSObject.h: - (JSC::JSValue::get): - (JSC::JSValue::put): - * runtime/JSString.h: - (JSC::JSValue::toThisJSString): - * runtime/JSValue.cpp: - (JSC::JSValue::toInteger): - (JSC::JSValue::toIntegerPreserveNaN): - (JSC::JSValue::toObjectSlowCase): - (JSC::JSValue::toThisObjectSlowCase): - (JSC::JSValue::synthesizeObject): - (JSC::JSValue::synthesizePrototype): - (JSC::JSValue::description): - (JSC::nonInlineNaN): - * runtime/JSValue.h: - (JSC::JSValue::): - (JSC::EncodedJSValueHashTraits::emptyValue): - (JSC::jsNaN): - (JSC::operator==): - (JSC::operator!=): - (JSC::toInt32): - (JSC::toUInt32): - (JSC::JSValue::encode): - (JSC::JSValue::decode): - (JSC::JSValue::JSValue): - (JSC::JSValue::operator bool): - (JSC::JSValue::operator==): - (JSC::JSValue::operator!=): - (JSC::JSValue::isUndefined): - (JSC::JSValue::isNull): - (JSC::JSValue::isUndefinedOrNull): - (JSC::JSValue::isCell): - (JSC::JSValue::isInt32): - (JSC::JSValue::isUInt32): - (JSC::JSValue::isDouble): - (JSC::JSValue::isTrue): - (JSC::JSValue::isFalse): - (JSC::JSValue::tag): - (JSC::JSValue::asInt32): - (JSC::JSValue::asUInt32): - (JSC::JSValue::asDouble): - (JSC::JSValue::asCell): - (JSC::JSValue::isNumber): - (JSC::JSValue::isBoolean): - (JSC::JSValue::getBoolean): - (JSC::JSValue::uncheckedGetNumber): - (JSC::JSValue::toJSNumber): - (JSC::JSValue::getNumber): - (JSC::JSValue::toInt32): - (JSC::JSValue::toUInt32): - * runtime/Operations.h: - (JSC::JSValue::equal): - (JSC::JSValue::equalSlowCaseInline): - (JSC::JSValue::strictEqual): - (JSC::JSValue::strictEqualSlowCaseInline): - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::jsAdd): - * runtime/PropertySlot.h: - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncIndexOf): - * wtf/Platform.h: - -=== Start merge of nitro-extreme branch 2009-07-30 === - -2009-07-29 Laszlo Gombos - - Reviewed by George Staikos. - - Resolve class/struct mixup in forward declarations - https://bugs.webkit.org/show_bug.cgi?id=27708 - - * API/JSClassRef.h: - * bytecode/SamplingTool.h: - * interpreter/Interpreter.h: - * jit/JIT.h: - * profiler/ProfileGenerator.h: - * profiler/Profiler.h: - * runtime/ClassInfo.h: - * runtime/ExceptionHelpers.h: - * runtime/JSByteArray.h: - * runtime/JSCell.h: - * runtime/JSFunction.h: - * runtime/JSGlobalData.h: - * runtime/JSObject.h: - * runtime/JSString.h: - -2009-07-28 Ada Chan - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=27236 - - Implement TCMalloc_SystemRelease and TCMalloc_SystemCommit for Windows. - - Use a background thread to periodically scavenge memory to release back to the system. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::init): - (WTF::TCMalloc_PageHeap::runScavengerThread): - (WTF::TCMalloc_PageHeap::scavenge): - (WTF::TCMalloc_PageHeap::shouldContinueScavenging): - (WTF::TCMalloc_PageHeap::New): - (WTF::TCMalloc_PageHeap::AllocLarge): - (WTF::TCMalloc_PageHeap::Delete): - (WTF::TCMalloc_PageHeap::GrowHeap): - (WTF::sleep): - (WTF::TCMalloc_PageHeap::scavengerThread): - * wtf/TCSystemAlloc.cpp: - (TCMalloc_SystemRelease): - (TCMalloc_SystemCommit): - * wtf/TCSystemAlloc.h: - -2009-07-28 Xan Lopez - - Add new files, fixes distcheck. - - * GNUmakefile.am: - -2009-07-28 Csaba Osztrogonac - - Reviewed by Simon Hausmann. - - [Qt] Determining whether to use JIT or interpreter - moved from JavaScriptCore.pri to Platform.h - - * JavaScriptCore.pri: - * wtf/Platform.h: - -2009-07-27 Brian Weinstein - - Fix of misuse of sort command. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-07-27 Brian Weinstein - - Build fix for Windows. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-07-27 Gavin Barraclough - - Rubber stamped by Oliver Hunt. - - Fix tyop in JIT, renamed preverveReturnAddressAfterCall -> preserveReturnAddressAfterCall. - - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::preserveReturnAddressAfterCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - -2009-07-27 Alexey Proskuryakov - - Gtk build fix. - - * runtime/JSLock.cpp: (JSC::JSLock::JSLock): Fix "no threading" case. - -2009-07-27 Alexey Proskuryakov - - Release build fix. - - * runtime/JSLock.h: (JSC::JSLock::~JSLock): - -2009-07-27 Alexey Proskuryakov - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=27735 - Give a helpful name to JSLock constructor argument - - * API/JSBase.cpp: - (JSGarbageCollect): - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - (JSPropertyNameArrayRelease): - (JSPropertyNameAccumulatorAddName): - * JavaScriptCore.exp: - * jsc.cpp: - (functionGC): - (cleanupGlobalData): - (jscmain): - * runtime/Collector.cpp: - (JSC::Heap::destroy): - * runtime/JSLock.cpp: - (JSC::JSLock::JSLock): - (JSC::JSLock::lock): - (JSC::JSLock::unlock): - (JSC::JSLock::DropAllLocks::DropAllLocks): - (JSC::JSLock::DropAllLocks::~DropAllLocks): - * runtime/JSLock.h: - (JSC::): - (JSC::JSLock::JSLock): - (JSC::JSLock::~JSLock): - -2009-07-25 Zoltan Horvath - - Reviewed by Eric Seidel. - - Allow custom memory allocation control for OpaqueJSPropertyNameArray struct - https://bugs.webkit.org/show_bug.cgi?id=27342 - - Inherits OpaqueJSPropertyNameArray struct from FastAllocBase because it has been - instantiated by 'new' JavaScriptCore/API/JSObjectRef.cpp:473. - - * API/JSObjectRef.cpp: - -2009-07-24 Ada Chan - - In preparation for https://bugs.webkit.org/show_bug.cgi?id=27236: - Remove TCMALLOC_TRACK_DECOMMITED_SPANS. We'll always track decommitted spans. - We have tested this and show it has little impact on performance. - - Reviewed by Mark Rowe. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::New): - (WTF::TCMalloc_PageHeap::AllocLarge): - (WTF::propagateDecommittedState): - (WTF::mergeDecommittedStates): - (WTF::TCMalloc_PageHeap::Delete): - (WTF::TCMalloc_PageHeap::IncrementalScavenge): - -2009-07-24 Csaba Osztrogonac - - Reviewed by Darin Adler and Adam Barth. - - Build fix for x86 platforms. - https://bugs.webkit.org/show_bug.cgi?id=27602 - - * jit/JIT.cpp: - -2009-07-23 Kevin Ollivier - - wx build fix, adding missing header. - - * jit/JIT.cpp: - -2009-07-22 Yong Li - - Reviewed by George Staikos. - - Add wince specific memory files into wtf/wince - https://bugs.webkit.org/show_bug.cgi?id=27550 - - * wtf/wince/FastMallocWince.h: Added. - * wtf/wince/MemoryManager.cpp: Added. - * wtf/wince/MemoryManager.h: Added. - -2009-07-23 Norbert Leser - - Reviewed by Simon Hausmann. - - Fix for missing mmap features in Symbian - https://bugs.webkit.org/show_bug.cgi?id=24540 - - Fix, conditionally for PLATFORM(SYMBIAN), as an alternative - to missing support for the MAP_ANON property flag in mmap. - It utilizes Symbian specific memory allocation features. - - * runtime/Collector.cpp - -2009-07-22 Gavin Barraclough - - Reviewed by Sam Weinig. - - With ENABLE(ASSEMBLER_WX_EXCLUSIVE), only change permissions once per repatch event. - ( https://bugs.webkit.org/show_bug.cgi?id=27564 ) - - Currently we change permissions forwards and backwards for each instruction modified, - instead we should only change permissions once per complete repatching event. - - 2.5% progression running with ENABLE(ASSEMBLER_WX_EXCLUSIVE) enabled, - which recoups 1/3 of the penalty of running with this mode enabled. - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::linkBranch): - - Replace usage of MakeWritable with cacheFlush. - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::patchPointerInternal): - (JSC::ARMAssembler::repatchLoadPtrToLEA): - - Replace usage of MakeWritable with cacheFlush. - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::relinkJump): - (JSC::ARMv7Assembler::relinkCall): - (JSC::ARMv7Assembler::repatchInt32): - (JSC::ARMv7Assembler::repatchPointer): - (JSC::ARMv7Assembler::repatchLoadPtrToLEA): - (JSC::ARMv7Assembler::setInt32): - - Replace usage of MakeWritable with cacheFlush. - - * assembler/LinkBuffer.h: - (JSC::LinkBuffer::performFinalization): - - Make explicit call to cacheFlush. - - * assembler/MacroAssemblerCodeRef.h: - (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef): - - Make size always available. - - * assembler/RepatchBuffer.h: - (JSC::RepatchBuffer::RepatchBuffer): - (JSC::RepatchBuffer::~RepatchBuffer): - - Add calls to MakeWritable & makeExecutable. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::relinkJump): - (JSC::X86Assembler::relinkCall): - (JSC::X86Assembler::repatchInt32): - (JSC::X86Assembler::repatchPointer): - (JSC::X86Assembler::repatchLoadPtrToLEA): - - Remove usage of MakeWritable. - - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getJITCode): - - Provide access to CodeBlock's JITCode. - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::makeExecutable): - (JSC::ExecutableAllocator::cacheFlush): - - Remove MakeWritable, make cacheFlush public. - - * jit/JIT.cpp: - (JSC::ctiPatchNearCallByReturnAddress): - (JSC::ctiPatchCallByReturnAddress): - (JSC::JIT::privateCompile): - (JSC::JIT::unlinkCall): - (JSC::JIT::linkCall): - - Add CodeBlock argument to RepatchBuffer. - - * jit/JIT.h: - - Pass CodeBlock argument for use by RepatchBuffer. - - * jit/JITCode.h: - (JSC::JITCode::start): - (JSC::JITCode::size): - - Provide access to code start & size. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchMethodCallProto): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - - Add CodeBlock argument to RepatchBuffer. - - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - - Pass CodeBlock argument for use by RepatchBuffer. - -2009-07-21 Zoltan Herczeg - - Reviewed by Gavin Barraclough. - - Cache not only the structure of the method, but the - structure of its prototype as well. - https://bugs.webkit.org/show_bug.cgi?id=27077 - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - * bytecode/CodeBlock.h: - (JSC::MethodCallLinkInfo::MethodCallLinkInfo): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::patchMethodCallProto): - -2009-07-21 Gavin Barraclough - - Reviewed by Sam Weinig. - - Move call linking / repatching down from AbstractMacroAssembler into MacroAssemblerARCH classes. - ( https://bugs.webkit.org/show_bug.cgi?id=27527 ) - - This allows the implementation to be defined per architecture. Specifically this addresses the - fact that x86-64 MacroAssembler implements far calls as a load to register, followed by a call - to register. Patching the call actually requires the pointer load to be patched, rather than - the call to be patched. This is implementation detail specific to MacroAssemblerX86_64, and as - such is best handled there. - - * assembler/AbstractMacroAssembler.h: - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::linkCall): - (JSC::MacroAssemblerARM::repatchCall): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::linkCall): - (JSC::MacroAssemblerARMv7::repatchCall): - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::linkCall): - (JSC::MacroAssemblerX86::repatchCall): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::linkCall): - (JSC::MacroAssemblerX86_64::repatchCall): - -2009-07-21 Adam Treat - - Reviewed by George Staikos. - - Every wtf file includes other wtf files with <> style includes - except this one. Fix the exception. - - * wtf/ByteArray.h: - -2009-07-21 Gavin Barraclough - - Reviewed by Oliver Hunt. - - Move LinkBuffer/RepatchBuffer out of AbstractMacroAssembler. - ( https://bugs.webkit.org/show_bug.cgi?id=27485 ) - - This change is the first step in a process to move code that should be in - the architecture-specific MacroAssembler classes up out of Assmbler and - AbstractMacroAssembler. - - * JavaScriptCore.xcodeproj/project.pbxproj: - - added new files - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::linkPointer): - - rename patchPointer to bring it in line with the current link/repatch naming scheme - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::linkCall): - (JSC::ARMv7Assembler::linkPointer): - (JSC::ARMv7Assembler::relinkCall): - (JSC::ARMv7Assembler::repatchInt32): - (JSC::ARMv7Assembler::repatchPointer): - (JSC::ARMv7Assembler::setInt32): - (JSC::ARMv7Assembler::setPointer): - - rename patchPointer to bring it in line with the current link/repatch naming scheme - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::linkJump): - (JSC::AbstractMacroAssembler::linkCall): - (JSC::AbstractMacroAssembler::linkPointer): - (JSC::AbstractMacroAssembler::getLinkerAddress): - (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset): - (JSC::AbstractMacroAssembler::repatchJump): - (JSC::AbstractMacroAssembler::repatchCall): - (JSC::AbstractMacroAssembler::repatchNearCall): - (JSC::AbstractMacroAssembler::repatchInt32): - (JSC::AbstractMacroAssembler::repatchPointer): - (JSC::AbstractMacroAssembler::repatchLoadPtrToLEA): - - remove the LinkBuffer/RepatchBuffer classes, but leave a set of (private, friended) methods to interface to the Assembler - - * assembler/LinkBuffer.h: Added. - (JSC::LinkBuffer::LinkBuffer): - (JSC::LinkBuffer::~LinkBuffer): - (JSC::LinkBuffer::link): - (JSC::LinkBuffer::patch): - (JSC::LinkBuffer::locationOf): - (JSC::LinkBuffer::locationOfNearCall): - (JSC::LinkBuffer::returnAddressOffset): - (JSC::LinkBuffer::finalizeCode): - (JSC::LinkBuffer::finalizeCodeAddendum): - (JSC::LinkBuffer::code): - (JSC::LinkBuffer::performFinalization): - - new file containing the LinkBuffer class, previously a member of AbstractMacroAssembler - - * assembler/RepatchBuffer.h: Added. - (JSC::RepatchBuffer::RepatchBuffer): - (JSC::RepatchBuffer::relink): - (JSC::RepatchBuffer::repatch): - (JSC::RepatchBuffer::repatchLoadPtrToLEA): - (JSC::RepatchBuffer::relinkCallerToTrampoline): - (JSC::RepatchBuffer::relinkCallerToFunction): - (JSC::RepatchBuffer::relinkNearCallerToTrampoline): - - new file containing the RepatchBuffer class, previously a member of AbstractMacroAssembler - - * assembler/X86Assembler.h: - (JSC::X86Assembler::linkJump): - (JSC::X86Assembler::linkCall): - (JSC::X86Assembler::linkPointerForCall): - (JSC::X86Assembler::linkPointer): - (JSC::X86Assembler::relinkJump): - (JSC::X86Assembler::relinkCall): - (JSC::X86Assembler::repatchInt32): - (JSC::X86Assembler::repatchPointer): - (JSC::X86Assembler::setPointer): - (JSC::X86Assembler::setInt32): - (JSC::X86Assembler::setRel32): - - rename patchPointer to bring it in line with the current link/repatch naming scheme - - * jit/JIT.cpp: - (JSC::ctiPatchNearCallByReturnAddress): - (JSC::ctiPatchCallByReturnAddress): - - include new headers - - remove MacroAssembler:: specification from RepatchBuffer usage - - * jit/JITPropertyAccess.cpp: - * yarr/RegexJIT.cpp: - - include new headers - -2009-07-21 Robert Agoston - - Reviewed by David Levin. - - Fixed #undef typo. - https://bugs.webkit.org/show_bug.cgi?id=27506 - - * bytecode/Opcode.h: - -2009-07-21 Adam Roben - - Roll out r46153, r46154, and r46155 - - These changes were causing build failures and assertion failures on - Windows. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSArray.cpp: - * runtime/StringPrototype.cpp: - * runtime/UString.cpp: - * runtime/UString.h: - * wtf/FastMalloc.cpp: - * wtf/FastMalloc.h: - * wtf/Platform.h: - * wtf/PossiblyNull.h: Removed. - -2009-07-21 Roland Steiner - - Reviewed by David Levin. - - Add ENABLE_RUBY to list of build options - https://bugs.webkit.org/show_bug.cgi?id=27324 - - * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY. - -2009-07-20 Oliver Hunt - - Build fix attempt #2 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-07-20 Oliver Hunt - - Build fix attempt #1 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-07-20 Oliver Hunt - - Reviewed by Gavin Barraclough. - - Make it harder to misuse try* allocation routines - https://bugs.webkit.org/show_bug.cgi?id=27469 - - Jump through a few hoops to make it much harder to accidentally - miss null-checking of values returned by the try-* allocation - routines. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSArray.cpp: - (JSC::JSArray::putSlowCase): - (JSC::JSArray::increaseVectorLength): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncLink): - * runtime/UString.cpp: - (JSC::allocChars): - (JSC::reallocChars): - (JSC::expandCapacity): - (JSC::UString::Rep::reserveCapacity): - (JSC::UString::expandPreCapacity): - (JSC::createRep): - (JSC::concatenate): - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - (JSC::UString::append): - (JSC::UString::operator=): - * runtime/UString.h: - (JSC::UString::Rep::createEmptyBuffer): - * wtf/FastMalloc.cpp: - (WTF::tryFastZeroedMalloc): - (WTF::tryFastMalloc): - (WTF::tryFastCalloc): - (WTF::tryFastRealloc): - (WTF::TCMallocStats::tryFastMalloc): - (WTF::TCMallocStats::tryFastCalloc): - (WTF::TCMallocStats::tryFastRealloc): - * wtf/FastMalloc.h: - (WTF::TryMallocReturnValue::TryMallocReturnValue): - (WTF::TryMallocReturnValue::~TryMallocReturnValue): - (WTF::TryMallocReturnValue::operator Maybe): - (WTF::TryMallocReturnValue::getValue): - * wtf/PossiblyNull.h: - (WTF::PossiblyNull::PossiblyNull): - (WTF::PossiblyNull::~PossiblyNull): - (WTF::PossiblyNull::getValue): - * wtf/Platform.h: - -2009-07-20 Gavin Barraclough - - RS Oliver Hunt. - - Add ARM assembler files to xcodeproj, for convenience editing. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-07-20 Jessie Berlin - - Reviewed by David Levin. - - Fix an incorrect assertion in Vector::remove. - - https://bugs.webkit.org/show_bug.cgi?id=27477 - - * wtf/Vector.h: - (WTF::::remove): - Assert that the position at which to start removing elements + the - length (the number of elements to remove) is less than or equal to the - size of the entire Vector. - -2009-07-20 Peter Kasting - - Reviewed by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=27468 - Back out r46060, which caused problems for some Apple developers. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: - -2009-07-20 Zoltan Horvath - - Reviewed by Oliver Hunt. - - Allow custom memory allocation control in NewThreadContext - https://bugs.webkit.org/show_bug.cgi?id=27338 - - Inherits NewThreadContext struct from FastAllocBase because it - has been instantiated by 'new' JavaScriptCore/wtf/Threading.cpp:76. - - * wtf/Threading.cpp: - -2009-07-20 Zoltan Horvath - - Reviewed by Oliver Hunt. - - Allow custom memory allocation control in JavaScriptCore's JSClassRef.h - https://bugs.webkit.org/show_bug.cgi?id=27340 - - Inherit StaticValueEntry and StaticFunctionEntry struct from FastAllocBase because these - have been instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:153 - and in JavaScriptCore/API/JSClassRef.cpp:166. - - * API/JSClassRef.h: - -2009-07-20 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control in JavaScriptCore's RegexPattern.h - https://bugs.webkit.org/show_bug.cgi?id=27343 - - Inherits RegexPattern.h's structs (which have been instantiated by operator new) from FastAllocBase: - - CharacterClass (new call: JavaScriptCore/yarr/RegexCompiler.cpp:144) - PatternAlternative (new call: JavaScriptCore/yarr/RegexPattern.h:221) - PatternDisjunction (new call: JavaScriptCore/yarr/RegexCompiler.cpp:446) - - * yarr/RegexPattern.h: - -2009-07-20 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for JavaScriptCore's MatchFrame struct - https://bugs.webkit.org/show_bug.cgi?id=27344 - - Inherits MatchFrame struct from FastAllocBase because it has - been instantiated by 'new' JavaScriptCore/pcre/pcre_exec.cpp:359. - - * pcre/pcre_exec.cpp: - -2009-07-20 Laszlo Gombos - - Reviewed by Holger Freyther. - - Remove some outdated S60 platform specific code - https://bugs.webkit.org/show_bug.cgi?id=27423 - - * wtf/Platform.h: - -2009-07-20 Csaba Osztrogonac - - Reviewed by Simon Hausmann. - - Qt build fix with MSVC and MinGW. - - * jsc.pro: Make sure jsc is a console application, and turn off - exceptions and stl support to fix the build. - -2009-07-20 Xan Lopez - - Reviewed by Gustavo Noronha. - - Do not use C++-style comments in preprocessor directives. - - GCC does not like this in some configurations, using C-style - comments is safer. - - * wtf/Platform.h: - -2009-07-17 Peter Kasting - - Reviewed by Steve Falkenburg. - - https://bugs.webkit.org/show_bug.cgi?id=27323 - Only add Cygwin to the path when it isn't already there. This avoids - causing problems for people who purposefully have non-Cygwin versions of - executables like svn in front of the Cygwin ones in their paths. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: - -2009-07-17 Gabor Loki - - Reviewed by Gavin Barraclough. - - Add YARR support for generic ARM platforms (disabled by default). - https://bugs.webkit.org/show_bug.cgi?id=24986 - - Add generic ARM port for MacroAssembler. It supports the whole - MacroAssembler functionality except floating point. - - The class JmpSrc is extended with a flag which enables to patch - the jump destination offset during execution. This feature is - required for generic ARM port. - - Signed off by Zoltan Herczeg - Signed off by Gabor Loki - - * JavaScriptCore.pri: - * assembler/ARMAssembler.cpp: Added. - (JSC::ARMAssembler::getLdrImmAddress): - (JSC::ARMAssembler::linkBranch): - (JSC::ARMAssembler::patchConstantPoolLoad): - (JSC::ARMAssembler::getOp2): - (JSC::ARMAssembler::genInt): - (JSC::ARMAssembler::getImm): - (JSC::ARMAssembler::moveImm): - (JSC::ARMAssembler::dataTransfer32): - (JSC::ARMAssembler::baseIndexTransfer32): - (JSC::ARMAssembler::executableCopy): - * assembler/ARMAssembler.h: Added. - (JSC::ARM::): - (JSC::ARMAssembler::ARMAssembler): - (JSC::ARMAssembler::): - (JSC::ARMAssembler::JmpSrc::JmpSrc): - (JSC::ARMAssembler::JmpSrc::enableLatePatch): - (JSC::ARMAssembler::JmpDst::JmpDst): - (JSC::ARMAssembler::JmpDst::isUsed): - (JSC::ARMAssembler::JmpDst::used): - (JSC::ARMAssembler::emitInst): - (JSC::ARMAssembler::and_r): - (JSC::ARMAssembler::ands_r): - (JSC::ARMAssembler::eor_r): - (JSC::ARMAssembler::eors_r): - (JSC::ARMAssembler::sub_r): - (JSC::ARMAssembler::subs_r): - (JSC::ARMAssembler::rsb_r): - (JSC::ARMAssembler::rsbs_r): - (JSC::ARMAssembler::add_r): - (JSC::ARMAssembler::adds_r): - (JSC::ARMAssembler::adc_r): - (JSC::ARMAssembler::adcs_r): - (JSC::ARMAssembler::sbc_r): - (JSC::ARMAssembler::sbcs_r): - (JSC::ARMAssembler::rsc_r): - (JSC::ARMAssembler::rscs_r): - (JSC::ARMAssembler::tst_r): - (JSC::ARMAssembler::teq_r): - (JSC::ARMAssembler::cmp_r): - (JSC::ARMAssembler::orr_r): - (JSC::ARMAssembler::orrs_r): - (JSC::ARMAssembler::mov_r): - (JSC::ARMAssembler::movs_r): - (JSC::ARMAssembler::bic_r): - (JSC::ARMAssembler::bics_r): - (JSC::ARMAssembler::mvn_r): - (JSC::ARMAssembler::mvns_r): - (JSC::ARMAssembler::mul_r): - (JSC::ARMAssembler::muls_r): - (JSC::ARMAssembler::mull_r): - (JSC::ARMAssembler::ldr_imm): - (JSC::ARMAssembler::ldr_un_imm): - (JSC::ARMAssembler::dtr_u): - (JSC::ARMAssembler::dtr_ur): - (JSC::ARMAssembler::dtr_d): - (JSC::ARMAssembler::dtr_dr): - (JSC::ARMAssembler::ldrh_r): - (JSC::ARMAssembler::ldrh_d): - (JSC::ARMAssembler::ldrh_u): - (JSC::ARMAssembler::strh_r): - (JSC::ARMAssembler::push_r): - (JSC::ARMAssembler::pop_r): - (JSC::ARMAssembler::poke_r): - (JSC::ARMAssembler::peek_r): - (JSC::ARMAssembler::clz_r): - (JSC::ARMAssembler::bkpt): - (JSC::ARMAssembler::lsl): - (JSC::ARMAssembler::lsr): - (JSC::ARMAssembler::asr): - (JSC::ARMAssembler::lsl_r): - (JSC::ARMAssembler::lsr_r): - (JSC::ARMAssembler::asr_r): - (JSC::ARMAssembler::size): - (JSC::ARMAssembler::ensureSpace): - (JSC::ARMAssembler::label): - (JSC::ARMAssembler::align): - (JSC::ARMAssembler::jmp): - (JSC::ARMAssembler::patchPointerInternal): - (JSC::ARMAssembler::patchConstantPoolLoad): - (JSC::ARMAssembler::patchPointer): - (JSC::ARMAssembler::repatchInt32): - (JSC::ARMAssembler::repatchPointer): - (JSC::ARMAssembler::repatchLoadPtrToLEA): - (JSC::ARMAssembler::linkJump): - (JSC::ARMAssembler::relinkJump): - (JSC::ARMAssembler::linkCall): - (JSC::ARMAssembler::relinkCall): - (JSC::ARMAssembler::getRelocatedAddress): - (JSC::ARMAssembler::getDifferenceBetweenLabels): - (JSC::ARMAssembler::getCallReturnOffset): - (JSC::ARMAssembler::getOp2Byte): - (JSC::ARMAssembler::placeConstantPoolBarrier): - (JSC::ARMAssembler::RM): - (JSC::ARMAssembler::RS): - (JSC::ARMAssembler::RD): - (JSC::ARMAssembler::RN): - (JSC::ARMAssembler::getConditionalField): - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::JmpSrc::enableLatePatch): - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::Call::enableLatePatch): - (JSC::AbstractMacroAssembler::Jump::enableLatePatch): - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerARM.h: Added. - (JSC::MacroAssemblerARM::): - (JSC::MacroAssemblerARM::add32): - (JSC::MacroAssemblerARM::and32): - (JSC::MacroAssemblerARM::lshift32): - (JSC::MacroAssemblerARM::mul32): - (JSC::MacroAssemblerARM::not32): - (JSC::MacroAssemblerARM::or32): - (JSC::MacroAssemblerARM::rshift32): - (JSC::MacroAssemblerARM::sub32): - (JSC::MacroAssemblerARM::xor32): - (JSC::MacroAssemblerARM::load32): - (JSC::MacroAssemblerARM::load32WithAddressOffsetPatch): - (JSC::MacroAssemblerARM::loadPtrWithPatchToLEA): - (JSC::MacroAssemblerARM::load16): - (JSC::MacroAssemblerARM::store32WithAddressOffsetPatch): - (JSC::MacroAssemblerARM::store32): - (JSC::MacroAssemblerARM::pop): - (JSC::MacroAssemblerARM::push): - (JSC::MacroAssemblerARM::move): - (JSC::MacroAssemblerARM::swap): - (JSC::MacroAssemblerARM::signExtend32ToPtr): - (JSC::MacroAssemblerARM::zeroExtend32ToPtr): - (JSC::MacroAssemblerARM::branch32): - (JSC::MacroAssemblerARM::branch16): - (JSC::MacroAssemblerARM::branchTest32): - (JSC::MacroAssemblerARM::jump): - (JSC::MacroAssemblerARM::branchAdd32): - (JSC::MacroAssemblerARM::mull32): - (JSC::MacroAssemblerARM::branchMul32): - (JSC::MacroAssemblerARM::branchSub32): - (JSC::MacroAssemblerARM::breakpoint): - (JSC::MacroAssemblerARM::nearCall): - (JSC::MacroAssemblerARM::call): - (JSC::MacroAssemblerARM::ret): - (JSC::MacroAssemblerARM::set32): - (JSC::MacroAssemblerARM::setTest32): - (JSC::MacroAssemblerARM::tailRecursiveCall): - (JSC::MacroAssemblerARM::makeTailRecursiveCall): - (JSC::MacroAssemblerARM::moveWithPatch): - (JSC::MacroAssemblerARM::branchPtrWithPatch): - (JSC::MacroAssemblerARM::storePtrWithPatch): - (JSC::MacroAssemblerARM::supportsFloatingPoint): - (JSC::MacroAssemblerARM::supportsFloatingPointTruncate): - (JSC::MacroAssemblerARM::loadDouble): - (JSC::MacroAssemblerARM::storeDouble): - (JSC::MacroAssemblerARM::addDouble): - (JSC::MacroAssemblerARM::subDouble): - (JSC::MacroAssemblerARM::mulDouble): - (JSC::MacroAssemblerARM::convertInt32ToDouble): - (JSC::MacroAssemblerARM::branchDouble): - (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32): - (JSC::MacroAssemblerARM::ARMCondition): - (JSC::MacroAssemblerARM::prepareCall): - (JSC::MacroAssemblerARM::call32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::JmpSrc::enableLatePatch): - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - * wtf/Platform.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): - (JSC::Yarr::RegexGenerator::generateReturn): - -2009-07-17 Gabor Loki - - Reviewed by Gavin Barraclough. - - Extend AssemblerBuffer with constant pool handling mechanism. - https://bugs.webkit.org/show_bug.cgi?id=24986 - - Add a platform independed constant pool framework. - This pool can store 32 or 64 bits values which is enough to hold - any integer, pointer or double constant. - - * assembler/AssemblerBuffer.h: - (JSC::AssemblerBuffer::putIntUnchecked): - (JSC::AssemblerBuffer::putInt64Unchecked): - (JSC::AssemblerBuffer::append): - (JSC::AssemblerBuffer::grow): - * assembler/AssemblerBufferWithConstantPool.h: Added. - (JSC::): - -2009-07-17 Eric Roman - - Reviewed by Darin Adler. - - Build fix for non-Darwin. - Add a guard for inclusion of RetainPtr.h which includes CoreFoundation.h - - https://bugs.webkit.org/show_bug.cgi?id=27382 - - * wtf/unicode/icu/CollatorICU.cpp: - -2009-07-17 Alexey Proskuryakov - - Reviewed by John Sullivan. - - Get user default collation order via a CFLocale API when available. - - * wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault): - -2009-07-17 Laszlo Gombos - - Reviewed by Simon Hausmann. - - [Qt] Fix the include path for the Symbian port - https://bugs.webkit.org/show_bug.cgi?id=27358 - - * JavaScriptCore.pri: - -2009-07-17 Csaba Osztrogonac - - Reviewed by David Levin. - - Build fix on platforms don't have MMAP. - https://bugs.webkit.org/show_bug.cgi?id=27365 - - * interpreter/RegisterFile.h: Including stdio.h irrespectively of HAVE(MMAP) - -2009-07-16 Fumitoshi Ukai - - Reviewed by David Levin. - - Add --web-sockets flag and ENABLE_WEB_SOCKETS define. - https://bugs.webkit.org/show_bug.cgi?id=27206 - - Add ENABLE_WEB_SOCKETS - - * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS - -2009-07-16 Maxime Simon - - Reviewed by Eric Seidel. - - Added Haiku-specific files for JavaScriptCore. - https://bugs.webkit.org/show_bug.cgi?id=26620 - - * wtf/haiku/MainThreadHaiku.cpp: Added. - (WTF::initializeMainThreadPlatform): - (WTF::scheduleDispatchFunctionsOnMainThread): - -2009-07-16 Gavin Barraclough - - RS by Oliver Hunt. - - Revert r45969, this fix does not appear to be valid. - https://bugs.webkit.org/show_bug.cgi?id=27077 - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - (JSC::CodeBlock::unlinkCallers): - * jit/JIT.cpp: - * jit/JIT.h: - -2009-07-16 Zoltan Horvath - - Reviewed by Oliver Hunt. - - Allow custom memory allocation control in ExceptionInfo and RareData struct - https://bugs.webkit.org/show_bug.cgi?id=27336 - - Inherits ExceptionInfo and RareData struct from FastAllocBase because these - have been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.cpp:1289 and - in JavaScriptCore/bytecode/CodeBlock.h:453. - - Remove unnecessary WTF:: namespace from CodeBlock inheritance. - - * bytecode/CodeBlock.h: - -2009-07-16 Mark Rowe - - Rubber-stamped by Geoff Garen. - - Fix FeatureDefines.xcconfig to not be out of sync with the rest of the world. - - * Configurations/FeatureDefines.xcconfig: - -2009-07-16 Yong Li - - Reviewed by George Staikos. - - https://bugs.webkit.org/show_bug.cgi?id=27320 - _countof is only included in CE6; for CE5 we need to define it ourself - - * wtf/Platform.h: - -2009-07-16 Zoltan Herczeg - - Reviewed by Oliver Hunt. - - Workers + garbage collector: weird crashes - https://bugs.webkit.org/show_bug.cgi?id=27077 - - We need to unlink cached method call sites when a function is destroyed. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - (JSC::CodeBlock::unlinkCallers): - * jit/JIT.cpp: - (JSC::JIT::unlinkMethodCall): - * jit/JIT.h: - -2009-07-15 Steve Falkenburg - - Windows Build fix. - - Visual Studio reset our intermediate directory on us. - This sets it back. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - -2009-07-15 Kwang Yul Seo - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=26794 - Make Yacc-generated parsers to use fastMalloc/fastFree. - - Define YYMALLOC and YYFREE to fastMalloc and fastFree - respectively. - - * parser/Grammar.y: - -2009-07-15 Darin Adler - - Fix a build for a particular Apple configuration. - - * wtf/FastAllocBase.h: Change include to use "" style for - including another wtf header. This is the style we use for - including other public headers in the same directory. - -2009-07-15 George Staikos - - Reviewed by Adam Treat. - - https://bugs.webkit.org/show_bug.cgi?id=27303 - Implement createThreadInternal for WinCE. - Contains changes by George Staikos and Joe Mason - - * wtf/ThreadingWin.cpp: - (WTF::createThreadInternal): - -2009-07-15 Joe Mason - - Reviewed by George Staikos. - - https://bugs.webkit.org/show_bug.cgi?id=27298 - Platform defines for WINCE. - Contains changes by Yong Li , - George Staikos and Joe Mason - - * wtf/Platform.h: - -2009-07-15 Yong Li - - Reviewed by Adam Treat. - - https://bugs.webkit.org/show_bug.cgi?id=27306 - Use RegisterClass instead of RegisterClassEx on WinCE. - - * wtf/win/MainThreadWin.cpp: - (WTF::initializeMainThreadPlatform): - -2009-07-15 Yong Li - - Reviewed by George Staikos. - - https://bugs.webkit.org/show_bug.cgi?id=27301 - Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported - Originally written by Yong Li and refactored by - Joe Mason - - * wtf/Assertions.cpp: vprintf_stderr_common - -2009-07-15 Yong Li - - Reviewed by George Staikos. - - https://bugs.webkit.org/show_bug.cgi?id=27020 - msToGregorianDateTime should set utcOffset to 0 when outputIsUTC is false - - * wtf/DateMath.cpp: - (WTF::gregorianDateTimeToMS): - -2009-07-15 Laszlo Gombos - - Reviewed by Simon Hausmann. - - [Qt] Cleanup - Remove obsolete code from the make system - https://bugs.webkit.org/show_bug.cgi?id=27299 - - * JavaScriptCore.pro: - * jsc.pro: - -2009-07-07 Norbert Leser - - Reviewed by Simon Hausmann. - - https://bugs.webkit.org/show_bug.cgi?id=27056 - - Alternate bool operator for codewarrior compiler (WINSCW). - Compiler (latest b482) reports error for UnspecifiedBoolType construct: - "illegal explicit conversion from 'WTF::OwnArrayPtr' to 'bool'" - - Same fix as in r38391. - - * JavaScriptCore/wtf/OwnArrayPtr.h: - -2009-07-15 Norbert Leser - - Reviewed by Darin Adler. - - Qualify include path with wtf to fix compilation - on Symbian. - https://bugs.webkit.org/show_bug.cgi?id=27055 - - * interpreter/Interpreter.h: - -2009-07-15 Laszlo Gombos - - Reviewed by Dave Kilzer. - - Turn off non-portable date manipulations for SYMBIAN - https://bugs.webkit.org/show_bug.cgi?id=27064 - - Introduce HAVE(TM_GMTOFF), HAVE(TM_ZONE) and HAVE(TIMEGM) guards - and place the rules for controlling the guards in Platform.h. - Turn off these newly introduced guards for SYMBIAN. - - * wtf/DateMath.cpp: - (WTF::calculateUTCOffset): - * wtf/DateMath.h: - (WTF::GregorianDateTime::GregorianDateTime): - (WTF::GregorianDateTime::operator tm): - * wtf/Platform.h: - -2009-07-15 Norbert Leser - - Reviewed by Simon Hausmann. - - Undef ASSERT on Symbian, to avoid excessive warnings - https://bugs.webkit.org/show_bug.cgi?id=27052 - - * wtf/Assertions.h: - -2009-07-15 Oliver Hunt - - Reviewed by Simon Hausmann. - - REGRESSION: fast/js/postfix-syntax.html fails with interpreter - https://bugs.webkit.org/show_bug.cgi?id=27294 - - When postfix operators operating on locals assign to the same local - the order of operations has to be to store the incremented value, then - store the unmodified number. Rather than implementing this subtle - semantic in the interpreter I've just made the logic explicit in the - bytecode generator, so x=x++ effectively becomes x=ToNumber(x) (for a - local var x). - - * parser/Nodes.cpp: - (JSC::emitPostIncOrDec): - -2009-07-15 Oliver Hunt - - Reviewed by Simon Hausmann. - - REGRESSION(43559): fast/js/kde/arguments-scope.html fails with interpreter - https://bugs.webkit.org/show_bug.cgi?id=27259 - - The interpreter was incorrectly basing its need to create the arguments object - based on the presence of the callframe's argument reference rather than the local - arguments reference. Based on this it then overrode the local variable reference. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2009-07-14 Steve Falkenburg - - Reorganize JavaScriptCore headers into: - API: include/JavaScriptCore/ - Private: include/private/JavaScriptCore/ - - Reviewed by Darin Adler. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: - -2009-07-14 Zoltan Horvath - - Reviewed by Darin Adler. - - Change JSCell's superclass to NoncopyableCustomAllocated - https://bugs.webkit.org/show_bug.cgi?id=27248 - - JSCell class customizes operator new, since Noncopyable will be - inherited from FastAllocBase, NoncopyableCustomAllocated has - to be used. - - * runtime/JSCell.h: - -2009-07-14 Zoltan Horvath - - Reviewed by Darin Adler. - - Change all Noncopyable inheriting visibility to public. - https://bugs.webkit.org/show_bug.cgi?id=27225 - - Change all Noncopyable inheriting visibility to public because - it is needed to the custom allocation framework (bug #20422). - - * bytecode/SamplingTool.h: - * bytecompiler/RegisterID.h: - * interpreter/CachedCall.h: - * interpreter/RegisterFile.h: - * parser/Lexer.h: - * parser/Parser.h: - * runtime/ArgList.h: - * runtime/BatchedTransitionOptimizer.h: - * runtime/Collector.h: - * runtime/CommonIdentifiers.h: - * runtime/JSCell.h: - * runtime/JSGlobalObject.h: - * runtime/JSLock.h: - * runtime/JSONObject.cpp: - * runtime/SmallStrings.cpp: - * runtime/SmallStrings.h: - * wtf/CrossThreadRefCounted.h: - * wtf/GOwnPtr.h: - * wtf/Locker.h: - * wtf/MessageQueue.h: - * wtf/OwnArrayPtr.h: - * wtf/OwnFastMallocPtr.h: - * wtf/OwnPtr.h: - * wtf/RefCounted.h: - * wtf/ThreadSpecific.h: - * wtf/Threading.h: - * wtf/Vector.h: - * wtf/unicode/Collator.h: - -2009-07-14 Zoltan Horvath - - Reviewed by Darin Adler. - - Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated - https://bugs.webkit.org/show_bug.cgi?id=27249 - - ParserArenaDeletable customizes operator new, to avoid double inheritance - ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated. - - * parser/Nodes.h: - -2009-07-14 Zoltan Horvath - - Reviewed by Darin Adler. - - Add RefCountedCustomAllocated to RefCounted.h - https://bugs.webkit.org/show_bug.cgi?id=27232 - - Some class which are inherited from RefCounted customize - operator new, but RefCounted is inherited from Noncopyable - which will be inherited from FastAllocBase. To avoid - conflicts Noncopyable inheriting was moved down to RefCounted - and to avoid double inheritance this class has been added. - - * wtf/RefCounted.h: - (WTF::RefCountedCustomAllocated::deref): - (WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated): - -2009-07-14 Zoltan Horvath - - Reviewed by Darin Adler. - - Add NoncopyableCustomAllocated to Noncopyable.h. - https://bugs.webkit.org/show_bug.cgi?id=27228 - - Some classes which inherited from Noncopyable overrides operator new - since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h - needs to be extended with this new class to support the overriding. - - * wtf/Noncopyable.h: - (WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated): - (WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated): - -2009-07-14 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for JavaScriptCore's IdentifierTable class - https://bugs.webkit.org/show_bug.cgi?id=27260 - - Inherits IdentifierTable class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70. - - * runtime/Identifier.cpp: - -2009-07-14 Zoltan Horvath - - Reviewed by Darin Adler. - - Allow custom memory allocation control for JavaScriptCore's Profiler class - https://bugs.webkit.org/show_bug.cgi?id=27253 - - Inherits Profiler class from FastAllocBase because it has been instantiated by - 'new' in JavaScriptCore/profiler/Profiler.cpp:56. - - * profiler/Profiler.h: - -2009-07-06 George Staikos - - Reviewed by Adam Treat. - - Authors: George Staikos , Joe Mason , Makoto Matsumoto , Takuji Nishimura - - https://bugs.webkit.org/show_bug.cgi?id=27030 - Implement custom RNG for WinCE using Mersenne Twister - - * wtf/RandomNumber.cpp: - (WTF::randomNumber): - * wtf/RandomNumberSeed.h: - (WTF::initializeRandomNumberGenerator): - * wtf/wince/mt19937ar.c: Added. - (init_genrand): - (init_by_array): - (genrand_int32): - (genrand_int31): - (genrand_real1): - (genrand_real2): - (genrand_real3): - (genrand_res53): - -2009-07-13 Gustavo Noronha Silva - - Unreviewed make dist build fix. - - * GNUmakefile.am: - -2009-07-13 Drew Wilson - - Reviewed by David Levin. - - Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs - https://bugs.webkit.org/show_bug.cgi?id=26932 - - Added ENABLE(SHARED_WORKERS) flag (off by default). - - * Configurations/FeatureDefines.xcconfig: - -2009-07-07 Norbert Leser - - Reviewed by Maciej Stachoviak. - - https://bugs.webkit.org/show_bug.cgi?id=27058 - - Removed superfluous parenthesis around single expression. - Compilers on Symbian platform fail to properly parse and compile. - - * JavaScriptCore/wtf/Platform.h: - -2009-07-13 Norbert Leser - - Reviewed by Maciej Stachoviak. - - https://bugs.webkit.org/show_bug.cgi?id=27054 - - Renamed Translator to HashTranslator - - Codewarrior compiler (WINSCW) latest b482 cannot resolve typename - mismatch between template declaration and definition - (HashTranslator / Translator) - - * wtf/HashSet.h: - -2009-07-13 Norbert Leser - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=27053 - - Ambiguity in LabelScope initialization - - Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve - type of "0" unambiguously. Set expression explicitly to - PassRefPtr