Timeline


and

09/06/08:

23:08 Changeset [36247] by mrowe@apple.com

Qt build fix.

22:50 Changeset [36246] by sfalken@apple.com

Fix Windows nightlies.


Copy WebKit.dll alongside application so registry-free COM can find it.
Update embedded manifest to force use registry-free COM.

Reviewed by Dave Hyatt.

  • FindSafari/FindSafari.cpp: (copyManifest): (replaceManifest): (_tmain):
  • FindSafari/FindSafari.rc: Added.
  • FindSafari/FindSafari.vcproj:
  • FindSafari/Safari.exe.manifest: Added.
  • FindSafari/resource.h: Added.
22:48 Changeset [36245] by sfalken@apple.com

Fix Windows nightlies.


Include both nightly and production CLSIDs in our interfaces, type library.
Remove COM registration code.

Reviewed by Dave Hyatt.

  • ForEachCoClass.cpp: (setUseOpenSourceWebKit):
  • Interfaces/WebKit.idl:
22:44 Changeset [36244] by mrowe@apple.com

Merge squirrelfish-extreme to trunk.

22:20 Changeset [36243] by mrowe@apple.com

Build fix.

21:44 Changeset [36242] by mrowe@apple.com

Windows build fix.

21:37 Changeset [36241] by mrowe@apple.com

2008-09-06 Gavin Barraclough <barraclough@apple.com>

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):
21:37 Changeset [36240] by mrowe@apple.com

Merge up to r36133.

21:37 Changeset [36239] by mrowe@apple.com

Re-review a patch only reviewed by Gavin before.

21:37 Changeset [36238] by mrowe@apple.com

Fix the sampler build.

Reviewed by NOBODY(build fix)

21:37 Changeset [36237] by mrowe@apple.com

Jump through the necessary hoops required to make MSVC cooperate with SFX

Reviewed by Maciej Stachowiak

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.

21:37 Changeset [36236] by mrowe@apple.com

2008-09-05 Geoffrey Garen <ggaren@apple.com>

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):
21:37 Changeset [36235] by mrowe@apple.com

Disable WREC and CTI on platforms that we have not yet had a chance to test with.

Reviewed by Sam Weinig.

21:37 Changeset [36234] by mrowe@apple.com

2008-09-05 Geoffrey Garen <ggaren@apple.com>

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):
21:36 Changeset [36233] by mrowe@apple.com

2008-09-05 Geoffrey Garen <ggaren@apple.com>

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.
21:36 Changeset [36232] by mrowe@apple.com

Re-review changes only reviewed by Gavin.

21:36 Changeset [36231] by mrowe@apple.com

Move the JITCodeBuffer onto Machine and remove the static variables.

Reviewed by Oliver Hunt and Gavin Barraclough.

  • 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:
21:36 Changeset [36230] by mrowe@apple.com

Fix the build when CTI is disabled.

Reviewed by Oliver Hunt and Gavin Barraclough.

21:36 Changeset [36229] by mrowe@apple.com

2008-09-05 Gavin Barraclough <barraclough@apple.com>

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:
21:36 Changeset [36228] by mrowe@apple.com

Fix ecma/FunctionObjects/15.3.5.3.js after I broke it in r93.

Reviewed by Sam Weinig.

  • 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.

21:36 Changeset [36227] by mrowe@apple.com

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.

Reviewed by Sam Weinig.

  • 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.

21:36 Changeset [36226] by mrowe@apple.com

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.

21:36 Changeset [36225] by mrowe@apple.com

2008-09-04 Gavin Barraclough <barraclough@apple.com>

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):
21:36 Changeset [36224] by mrowe@apple.com

2008-09-04 Sam Weinig <sam@webkit.org>

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:
21:36 Changeset [36223] by mrowe@apple.com

2008-09-04 Sam Weinig <sam@webkit.org>

Reviewed by Jon Honeycutt.

Second round of style cleanup.

  • VM/CTI.cpp:
  • VM/CTI.h:
  • wrec/WREC.h:
21:36 Changeset [36222] by mrowe@apple.com

2008-09-04 Sam Weinig <sam@webkit.org>

Reviewed by Mark Rowe.

First round of style cleanup.

  • VM/CTI.cpp:
  • VM/CTI.h:
  • masm/IA32MacroAsm.h:
  • wrec/WREC.cpp:
  • wrec/WREC.h:
21:36 Changeset [36221] by mrowe@apple.com

2008-09-04 Geoffrey Garen <ggaren@apple.com>

Reviewed by Mark Rowe.


Merged http://trac.webkit.org/changeset/36081 to work with CTI.

  • VM/Machine.cpp: (KJS::Machine::tryCtiCacheGetByID):
21:36 Changeset [36220] by mrowe@apple.com

2008-09-04 Geoffrey Garen <ggaren@apple.com>

Checking in some tests that got forgotten in a previous merge.

  • fast/js/pic/cached-deleted-properties-expected.txt: Added.
  • fast/js/pic/cached-deleted-properties.html: Added.
  • fast/js/pic/cached-getter-dictionary-and-proto-expected.txt: Added.
  • fast/js/pic/cached-getter-dictionary-and-proto.html: Added.
  • fast/js/pic/cached-getter-setter-expected.txt: Added.
  • fast/js/pic/cached-getter-setter.html: Added.
  • fast/js/pic/cached-prototype-setter-expected.txt: Added.
  • fast/js/pic/cached-prototype-setter.html: Added.
  • fast/js/pic/cached-single-entry-transition-expected.txt: Added.
  • fast/js/pic/cached-single-entry-transition.html: Added.
  • fast/js/pic/get-empty-string-expected.txt: Added.
  • fast/js/pic/get-empty-string.html: Added.
  • fast/js/pic/get-set-proxy-object-expected.txt: Added.
  • fast/js/pic/get-set-proxy-object.html: Added.
  • fast/js/pic/rehash-poisons-structure-expected.txt: Added.
  • fast/js/pic/rehash-poisons-structure.html: Added.
21:36 Changeset [36219] by mrowe@apple.com

2008-09-04 Gavin Barraclough <barraclough@apple.com>

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):
21:36 Changeset [36218] by mrowe@apple.com

Merge up to r36102.

21:35 Changeset [36217] by mrowe@apple.com

2008-09-04 Victor Hernandez <vhernandez@apple.com>

Reviewed by Geoffrey Garen.


Fixed an #if to support using WREC without CTI.

  • kjs/regexp.cpp: (KJS::RegExp::match):
21:35 Changeset [36216] by mrowe@apple.com

2008-09-04 Gavin Barraclough <barraclough@apple.com>

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:
21:35 Changeset [36215] by mrowe@apple.com

Fix a crash on launch of jsc when GuardMalloc is enabled.

Reviewed by Gavin Barraclough.

  • 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.

21:35 Changeset [36214] by mrowe@apple.com

Fix inspector and fast array access so that it bounds
checks correctly.

Reviewed by Gavin Barraclough

21:35 Changeset [36213] by mrowe@apple.com

Move the assertion after the InitializeAndReturn block, as
that is used even when CTI is enabled.

  • VM/Machine.cpp:

(KJS::Machine::privateExecute):

21:35 Changeset [36212] by mrowe@apple.com

Replace calls to exit with ASSERT_WITH_MESSAGE or ASSERT_NOT_REACHED.

Reviewed by Sam Weinig.

  • 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):

21:35 Changeset [36211] by mrowe@apple.com

Tweak JavaScriptCore to compile on non-x86 platforms. This is achieved
by wrapping more code with ENABLE(CTI), ENABLE(WREC), and PLATFORM(X86)

Reviewed by Sam Weinig.

  • 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.

21:35 Changeset [36210] by mrowe@apple.com

2008-09-03 Gavin Barraclough <barraclough@apple.com>

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:
21:35 Changeset [36209] by mrowe@apple.com

debug build fix from merge up to 36021

21:35 Changeset [36208] by mrowe@apple.com

2008-09-03 Gavin Barraclough <barraclough@apple.com>

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:
21:35 Changeset [36207] by mrowe@apple.com

2008-09-02 Gavin Barraclough <barraclough@apple.com>

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):
21:35 Changeset [36206] by mrowe@apple.com

JavaScriptCore:

2008-09-02 Gavin Barraclough <barraclough@apple.com>

Merge up to trunk - r36009:36021.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h: (KJS::::JSCallbackObject): (KJS::::put):
  • API/JSContextRef.cpp: (JSGlobalContextCreateInGroup):
  • API/JSObjectRef.cpp: (JSObjectMake): (JSObjectSetPrototype): (JSObjectSetProperty):
  • ChangeLog:
  • GNUmakefile.am:
  • JavaScriptCore.exp:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • VM/CTI.cpp: (KJS::CTI::privateCompile_pass1_Scan): (KJS::CTI::privateCompile_pass2_Main):
  • VM/CodeBlock.cpp: (KJS::registerName): (KJS::pointerToSourceString): (KJS::printGetByIdOp): (KJS::printPutByIdOp): (KJS::CodeBlock::printStructureID): (KJS::CodeBlock::printStructureIDs): (KJS::CodeBlock::dump): (KJS::CodeBlock::~CodeBlock): (KJS::CodeBlock::derefStructureIDs): (KJS::CodeBlock::refStructureIDs):
  • VM/CodeBlock.h: (KJS::CodeBlock::CodeBlock):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::CodeGenerator): (KJS::CodeGenerator::emitGetById): (KJS::CodeGenerator::emitPutById): (KJS::CodeGenerator::emitNewObject):
  • VM/CodeGenerator.h:
  • VM/ExceptionHelpers.cpp: (KJS::InterruptedExecutionError::InterruptedExecutionError): (KJS::createInterruptedExecutionException): (KJS::createNotAnObjectErrorStub):
  • VM/Instruction.h: (KJS::Instruction::Instruction): (KJS::Instruction::):
  • VM/Machine.cpp: (KJS::scopeChainForCall): (KJS::Machine::Machine): (KJS::Machine::execute): (KJS::createExceptionScope): (KJS::cachePrototypeChain): (KJS::Machine::tryCachePutByID): (KJS::Machine::uncachePutByID): (KJS::Machine::tryCacheGetByID): (KJS::Machine::uncacheGetByID): (KJS::Machine::privateExecute): (KJS::Machine::retrieveArguments): (KJS::Machine::cti_op_put_by_id): (KJS::Machine::cti_op_get_by_id): (KJS::Machine::cti_op_put_by_val): (KJS::Machine::cti_op_push_new_scope):
  • VM/Machine.h:
  • VM/Opcode.h:
  • VM/SamplingTool.cpp: (KJS::SamplingTool::dump):
  • kjs/Arguments.cpp: (KJS::Arguments::Arguments): (KJS::Arguments::put):
  • kjs/Arguments.h:
  • kjs/ArrayPrototype.cpp: (KJS::putProperty): (KJS::arrayProtoFuncPop): (KJS::arrayProtoFuncPush): (KJS::arrayProtoFuncShift): (KJS::arrayProtoFuncSplice): (KJS::arrayProtoFuncUnShift):
  • kjs/DateConstructor.cpp: (KJS::DateConstructor::DateConstructor):
  • kjs/InternalFunction.cpp: (KJS::InternalFunction::InternalFunction):
  • kjs/InternalFunction.h: (KJS::InternalFunction::InternalFunction):
  • kjs/JSActivation.cpp: (KJS::JSActivation::JSActivation): (KJS::JSActivation::getOwnPropertySlot): (KJS::JSActivation::put): (KJS::JSActivation::putWithAttributes):
  • kjs/JSActivation.h:
  • kjs/JSArray.cpp: (KJS::JSArray::JSArray): (KJS::JSArray::put): (KJS::JSArray::putSlowCase):
  • kjs/JSArray.h: (KJS::JSArray::):
  • kjs/JSCell.cpp: (KJS::JSCell::put):
  • kjs/JSCell.h: (KJS::JSCell::JSCell): (KJS::JSCell::structureID):
  • kjs/JSFunction.cpp: (KJS::JSFunction::put):
  • kjs/JSFunction.h: (KJS::JSFunction::JSFunction):
  • kjs/JSGlobalData.cpp: (KJS::JSGlobalData::JSGlobalData):
  • kjs/JSGlobalData.h:
  • kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::put): (KJS::JSGlobalObject::putWithAttributes): (KJS::JSGlobalObject::reset): (KJS::JSGlobalObject::resetPrototype):
  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::JSGlobalObject): (KJS::JSGlobalObject::globalData):
  • kjs/JSImmediate.cpp: (KJS::JSImmediate::toObject): (KJS::JSImmediate::prototype):
  • kjs/JSNotAnObject.cpp: (KJS::JSNotAnObject::put):
  • kjs/JSNotAnObject.h: (KJS::JSNotAnObjectErrorStub::JSNotAnObjectErrorStub): (KJS::JSNotAnObject::JSNotAnObject):
  • kjs/JSObject.cpp: (KJS::JSObject::mark): (KJS::JSObject::put): (KJS::JSObject::deleteProperty): (KJS::JSObject::defaultValue): (KJS::JSObject::defineGetter): (KJS::JSObject::defineSetter): (KJS::JSObject::getPropertyNames): (KJS::JSObject::removeDirect): (KJS::JSObject::createInheritorID):
  • kjs/JSObject.h: (KJS::): (KJS::JSObject::offsetForLocation): (KJS::JSObject::hasGetterSetterProperties): (KJS::JSObject::getDirectOffset): (KJS::JSObject::putDirectOffset): (KJS::JSObject::isVariableObject): (KJS::JSObject::isWatchdogException): (KJS::JSObject::JSObject): (KJS::JSObject::~JSObject): (KJS::JSObject::prototype): (KJS::JSObject::setPrototype): (KJS::JSObject::setStructureID): (KJS::JSObject::inheritorID): (KJS::JSObject::getPropertySlot): (KJS::JSObject::getOwnPropertySlotForWrite): (KJS::JSObject::getOwnPropertySlot): (KJS::JSObject::putDirect): (KJS::JSValue::get): (KJS::JSValue::put):
  • kjs/JSStaticScopeObject.cpp: (KJS::JSStaticScopeObject::put):
  • kjs/JSStaticScopeObject.h: (KJS::JSStaticScopeObject::JSStaticScopeObject):
  • kjs/JSValue.h:
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::JSVariableObject):
  • kjs/JSWrapperObject.h: (KJS::JSWrapperObject::JSWrapperObject):
  • kjs/MathObject.cpp: (KJS::MathObject::MathObject): (KJS::MathObject::getOwnPropertySlot):
  • kjs/MathObject.h:
  • kjs/ObjectPrototype.cpp: (KJS::ObjectPrototype::ObjectPrototype):
  • kjs/PropertyMap.cpp: (KJS::PropertyMap::put):
  • kjs/PropertyMap.h: (KJS::PropertyMapEntry::PropertyMapEntry): (KJS::PropertyMapHashTable::entries): (KJS::PropertyMapHashTable::allocationSize): (KJS::PropertyMap::getOffset): (KJS::PropertyMap::putOffset): (KJS::PropertyMap::offsetForLocation): (KJS::PropertyMap::offsetForTableLocation):
  • kjs/PropertySlot.h: (KJS::PropertySlot::PropertySlot): (KJS::PropertySlot::isCacheable): (KJS::PropertySlot::cachedOffset): (KJS::PropertySlot::setValueSlot): (KJS::PutPropertySlot::): (KJS::PutPropertySlot::PutPropertySlot): (KJS::PutPropertySlot::setExistingProperty): (KJS::PutPropertySlot::setNewProperty): (KJS::PutPropertySlot::type): (KJS::PutPropertySlot::slotBase): (KJS::PutPropertySlot::isCacheable): (KJS::PutPropertySlot::cachedOffset):
  • kjs/RegExpConstructor.cpp: (KJS::RegExpMatchesArray::put): (KJS::RegExpMatchesArray::fillArrayInstance): (KJS::RegExpConstructor::put):
  • kjs/RegExpConstructor.h:
  • kjs/RegExpObject.cpp: (KJS::RegExpObject::put):
  • kjs/RegExpObject.h:
  • kjs/Shell.cpp: (GlobalObject::GlobalObject): (runWithScripts): (jscmain):
  • kjs/StringObject.cpp: (KJS::StringObject::put):
  • kjs/StringObject.h:
  • kjs/StructureID.cpp: Added. (KJS::StructureID::StructureID): (KJS::StructureID::addPropertyTransition): (KJS::StructureID::dictionaryTransition): (KJS::StructureID::changePrototypeTransition): (KJS::StructureID::getterSetterTransition): (KJS::StructureID::~StructureID): (KJS::StructureIDChain::StructureIDChain):
  • kjs/StructureID.h: Added. (KJS::StructureID::create): (KJS::StructureID::mark): (KJS::StructureID::isDictionary): (KJS::StructureID::prototype): (KJS::StructureID::setCachedPrototypeChain): (KJS::StructureID::cachedPrototypeChain): (KJS::StructureIDChain::create): (KJS::StructureIDChain::head):
  • kjs/SymbolTable.h:
  • kjs/lookup.cpp: (KJS::setUpStaticFunctionSlot):
  • kjs/lookup.h: (KJS::lookupPut):
  • kjs/nodes.cpp: (KJS::FuncExprNode::makeFunction):
  • kjs/ustring.h: (WTF::): (WTF::IdentifierRepHash::hash):

JavaScriptGlue:

2008-09-02 Geoffrey Garen <ggaren@apple.com>

Reviewed by Darin Adler.

First cut at inline caching for access to vanilla JavaScript properties.


Updated for JavaScriptCore changes. Mostly mechanical addition of StructureIDs
to JavaScriptGlue classes, and PutPropertySlot& arguments to put functions.

WebCore:

2008-09-02 Dean Jackson <dino@apple.com>

Reviewed by Sam Weinig.

https://bugs.webkit.org/show_bug.cgi?id=20571
Make sure Window object can assign Animation/Transition event
listeners via attributes.

Also added a bunch of transition event tests, although
only transition-end-event-window is directly relevant to this patch.

(WebCore::JSDOMWindowBase::put):

Tests: transitions/transition-end-event-all-properties.html

transitions/transition-end-event-attributes.html
transitions/transition-end-event-container.html
transitions/transition-end-event-left.html
transitions/transition-end-event-multiple-01.html
transitions/transition-end-event-multiple-02.html
transitions/transition-end-event-multiple-03.html
transitions/transition-end-event-multiple-04.html
transitions/transition-end-event-nested.html
transitions/transition-end-event-transform.html
transitions/transition-end-event-window.html

WebKit/gtk:

2008-09-02 Alp Toker <alp@nuanti.com>

Reviewed by Eric Seidel.

https://bugs.webkit.org/show_bug.cgi?id=19939
[GTK] webkit_web_history_item_get_title() fails with assertion

Make sure newly constructed WebHistoryItem objects wrap a WebCore
history item when necessary. Avoid G_PARAM_CONSTRUCT since it destroys
history data -- use WEBKIT_PARAM flags instead as they do the right
thing. This restores history functionality.

Also use CString to simplify UTF-8 string management.

  • webkit/webkitwebbackforwardlist.cpp: (_WebKitWebBackForwardListPrivate::webkit_web_back_forward_list_get_forward_list_with_limit): (_WebKitWebBackForwardListPrivate::webkit_web_back_forward_list_get_back_list_with_limit): No need to initialize the vector with a size since it's cleared by the callee.
  • webkit/webkitwebhistoryitem.cpp: (_WebKitWebHistoryItemPrivate::webkit_web_history_item_finalize): (_WebKitWebHistoryItemPrivate::webkit_web_history_item_class_init): (_WebKitWebHistoryItemPrivate::webkit_web_history_item_new_with_core_item): (_WebKitWebHistoryItemPrivate::webkit_web_history_item_new): (_WebKitWebHistoryItemPrivate::webkit_web_history_item_new_with_data): (_WebKitWebHistoryItemPrivate::webkit_web_history_item_get_title): (_WebKitWebHistoryItemPrivate::webkit_web_history_item_get_alternate_title): (_WebKitWebHistoryItemPrivate::webkit_web_history_item_set_alternate_title): (_WebKitWebHistoryItemPrivate::webkit_web_history_item_get_uri): (_WebKitWebHistoryItemPrivate::webkit_web_history_item_get_original_uri):

LayoutTests:

2008-09-02 Dean Jackson <dino@apple.com>

Reviewed by Sam Weinig.

https://bugs.webkit.org/show_bug.cgi?id=20571
Add a bunch of tests for WebKitTransitionEndEvents.

  • transitions/end-event-helpers.js: Added.
  • transitions/interrupted-all-transition-expected.txt:
  • transitions/interrupted-all-transition.html:
  • transitions/opacity-transition-zindex-expected.txt:
  • transitions/transition-end-event-all-properties-expected.txt: Added.
  • transitions/transition-end-event-all-properties.html: Added.
  • transitions/transition-end-event-attributes-expected.txt: Added.
  • transitions/transition-end-event-attributes.html: Added.
  • transitions/transition-end-event-container-expected.txt: Added.
  • transitions/transition-end-event-container.html: Added.
  • transitions/transition-end-event-left-expected.txt: Added.
  • transitions/transition-end-event-left.html: Added.
  • transitions/transition-end-event-multiple-01-expected.txt: Added.
  • transitions/transition-end-event-multiple-01.html: Added.
  • transitions/transition-end-event-multiple-02-expected.txt: Added.
  • transitions/transition-end-event-multiple-02.html: Added.
  • transitions/transition-end-event-multiple-03-expected.txt: Added.
  • transitions/transition-end-event-multiple-03.html: Added.
  • transitions/transition-end-event-multiple-04-expected.txt: Added.
  • transitions/transition-end-event-multiple-04.html: Added.
  • transitions/transition-end-event-nested-expected.txt: Added.
  • transitions/transition-end-event-nested.html: Added.
  • transitions/transition-end-event-transform-expected.txt: Added.
  • transitions/transition-end-event-transform.html: Added.
  • transitions/transition-end-event-window-expected.txt: Added.
  • transitions/transition-end-event-window.html: Added.
21:35 Changeset [36205] by mrowe@apple.com

2008-09-02 Sam Weinig <sam@webkit.org>

Rubber-stamped by Geoff Garen.

Change recursion limit to account for a fatter stack frame.

  • fast/js/deep-recursion-test.html:
21:35 Changeset [36204] by mrowe@apple.com

2008-09-02 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

A backslash (\) at the of a RegEx should produce an error.
Fixes fast/regex/test1.html.

  • wrec/WREC.cpp: (KJS::WRECompiler::parseEscape):
21:34 Changeset [36203] by mrowe@apple.com

2008-09-02 Sam Weinig <sam@webkit.org>

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):
21:34 Changeset [36202] by mrowe@apple.com

2008-09-01 Sam Weinig <sam@webkit.org>

Rubber-stamped by Maciej Stachowiak.

Switch WREC on by default.

  • wtf/Platform.h:
21:34 Changeset [36201] by mrowe@apple.com

2008-09-01 Sam Weinig <sam@webkit.org>

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):
21:34 Changeset [36200] by mrowe@apple.com

2008-09-01 Sam Weinig <sam@webkit.org>

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.
21:34 Changeset [36199] by mrowe@apple.com

2008-09-01 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

Add pattern length limit fixing one test in fast/js.

  • wrec/WREC.cpp: (KJS::WRECompiler::compile):
  • wrec/WREC.h: (KJS::WRECompiler::):
21:34 Changeset [36198] by mrowe@apple.com

2008-09-01 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

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):
21:34 Changeset [36197] by mrowe@apple.com

2008-09-01 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

Fix one mozilla test.

  • wrec/WREC.cpp: (KJS::WRECompiler::generateCharacterClassInverted): Fix incorrect not ascii upper check.
21:34 Changeset [36196] by mrowe@apple.com

2008-09-01 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

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):
21:34 Changeset [36195] by mrowe@apple.com

2008-09-01 Sam Weinig <sam@webkit.org>

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.
21:34 Changeset [36194] by mrowe@apple.com

2008-09-01 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

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.
21:34 Changeset [36193] by mrowe@apple.com

2008-09-01 Gavin Barraclough <barraclough@apple.com>

Reviewed by Oliver Hunt.

Move cross-compilation unit call into NEVER_INLINE function.

  • VM/Machine.cpp: (KJS::doSetReturnAddressVmThrowTrampoline):
21:34 Changeset [36192] by mrowe@apple.com

2008-09-01 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

Fix one test in fast/js.

  • VM/Machine.cpp: (KJS::Machine::cti_op_construct_NotJSConstruct): Throw a createNotAConstructorError, instead of a createNotAFunctionError.
21:34 Changeset [36191] by mrowe@apple.com

2008-08-31 Gavin Barraclough <barraclough@apple.com>

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):
21:34 Changeset [36190] by mrowe@apple.com

Fall back to PCRE for any regexp containing parentheses until we correctly backtrack within them.

Reviewed by Oliver Hunt.

  • wrec/WREC.cpp:

(KJS::WRECompiler::parseParentheses):

  • wrec/WREC.h:

(KJS::WRECompiler::):

21:34 Changeset [36189] by mrowe@apple.com

Fix several issues within ecma_3/RegExp/perlstress-001.js with WREC enabled.

Reviewed by Oliver Hunt.

  • 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.

21:34 Changeset [36188] by mrowe@apple.com

Merge up to r36009.

21:29 Changeset [36187] by mrowe@apple.com

Add a --profile flag to run-sunspider.

Reviewed by Maciej Stachowiak.

  • Scripts/webkitdirs.pm: Detect --profile or --profiling passed as a command-line argument

to build scripts as indicating that we should use the "Profiling" configuration. At present
this is only supported by JavaScriptCore, so using this argument to build any other project
will likely result in unexpected behaviour.

21:29 Changeset [36186] by mrowe@apple.com

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.

Reviewed by Oliver Hunt.

  • 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):

21:29 Changeset [36185] by mrowe@apple.com

Revert "Have JITCodeBuffer manage a Vector containing the generated code so that it can grow"

RS=Maciej

21:29 Changeset [36184] by mrowe@apple.com

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.

Reviewed by Oliver Hunt.

  • 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:
21:29 Changeset [36183] by mrowe@apple.com

Implement parsing of octal escapes in regular expressions. This fixes three Mozilla tests.

Reviewed by Oliver Hunt.

  • 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):

21:29 Changeset [36182] by mrowe@apple.com

2008-08-29 Sam Weinig <sam@webkit.org>

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):
21:29 Changeset [36181] by mrowe@apple.com

2008-08-29 Sam Weinig <sam@webkit.org>

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):
21:29 Changeset [36180] by mrowe@apple.com

2008-08-29 Gavin Barraclough <barraclough@apple.com>

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):
21:29 Changeset [36179] by mrowe@apple.com

2008-08-29 Gavin Barraclough <barraclough@apple.com>

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):
21:28 Changeset [36178] by mrowe@apple.com

Fix js1_2/regexp/word_boundary.js and four other Mozilla tests with WREC enabled.

Reviewed by Oliver Hunt.

  • 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.

21:28 Changeset [36177] by mrowe@apple.com

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.

Reviewed by Oliver Hunt.

  • 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::):

21:28 Changeset [36176] by mrowe@apple.com

2008-08-28 Sam Weinig <sam@webkit.org>

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:
21:28 Changeset [36175] by mrowe@apple.com

2008-08-28 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

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:
21:28 Changeset [36174] by mrowe@apple.com

2008-08-28 Gavin Barraclough <barraclough@apple.com>

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):
21:28 Changeset [36173] by mrowe@apple.com

2008-08-28 Sam Weinig <sam@webkit.org>

Reviewed by Mark Rowe.

Exit instead of crashing in ctiUnsupported and ctiTimedOut.

  • VM/Machine.cpp: (KJS::ctiUnsupported): (KJS::ctiTimedOut):
21:28 Changeset [36172] by mrowe@apple.com

Implement codegen for op_jsr and op_sret.

Reviewed by Maciej Stachowiak.

21:28 Changeset [36171] by mrowe@apple.com

2008-08-28 Gavin Barraclough <barraclough@apple.com>

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):
21:28 Changeset [36170] by mrowe@apple.com

Merge up to r35963.

21:28 Changeset [36169] by mrowe@apple.com

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.

Rubber-stamped by Oliver Hunt.

21:28 Changeset [36168] by mrowe@apple.com

Fix fast/js/bitwise-and-on-undefined.html.

Reviewed by Gavin Barraclough.

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.

21:28 Changeset [36167] by mrowe@apple.com

Fix run-webkit-tests to handle DRT exiting early.

Reviewed by Oliver Hunt.

  • Scripts/run-webkit-tests: Initialize $expectedResultPaths{$base} before it will be used.
21:28 Changeset [36166] by mrowe@apple.com

Switch CTI on by default.

Rubber-stamped by Oliver Hunt.

21:28 Changeset [36165] by mrowe@apple.com

Fix the build of the full WebKit stack.

Reviewed by Oliver Hunt.

21:28 Changeset [36164] by mrowe@apple.com

Implement op_new_error. Does not fix any tests as it is always followed by the unimplemented op_throw.

Reviewed by Sam Weinig.

  • 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:
21:27 Changeset [36163] by mrowe@apple.com

2008-08-27 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

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:
21:27 Changeset [36162] by mrowe@apple.com

2008-08-27 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

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:
21:27 Changeset [36161] by mrowe@apple.com

2008-08-27 Gavin Barraclough <barraclough@apple.com>

Reviewed by Oliver Hunt.

Quick & dirty fix to get SamplingTool sampling op_call.

  • VM/SamplingTool.h: (KJS::SamplingTool::callingHostFunction):
21:27 Changeset [36160] by mrowe@apple.com

2008-08-27 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

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.
21:27 Changeset [36159] by mrowe@apple.com

2008-08-27 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

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:
21:27 Changeset [36158] by mrowe@apple.com

Fixing mistake in commit

21:27 Changeset [36157] by mrowe@apple.com

2008-08-27 Gavin Barraclough <barraclough@apple.com>

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:
21:27 Changeset [36156] by mrowe@apple.com

2008-08-26 Sam Weinig <sam@webkit.org>

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:
21:27 Changeset [36155] by mrowe@apple.com

2008-08-26 Gavin Barraclough <barraclough@apple.com>

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:
21:27 Changeset [36154] by mrowe@apple.com

Implement op_jmp_scopes to fix 2 Mozilla tests.

Reviewed by Gavin Barraclough.

  • 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:
21:27 Changeset [36153] by mrowe@apple.com

2008-08-26 Gavin Barraclough <barraclough@apple.com>

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:
21:27 Changeset [36152] by mrowe@apple.com

2008-08-26 Sam Weinig <sam@webkit.org>

Rubber-stamped by Oliver Hunt.

Remove bogus assertion.

  • VM/Machine.cpp: (KJS::Machine::cti_op_del_by_id):
21:27 Changeset [36151] by mrowe@apple.com

Implement op_push_new_scope and stub out op_catch.

Reviewed by Sam Weinig.

  • 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:
21:27 Changeset [36150] by mrowe@apple.com

Clean up op_resolve_base so that it shares its implementation with the bytecode interpreter.

Reviewed by Sam Weinig.

  • VM/Machine.cpp:

(KJS::inlineResolveBase):
(KJS::resolveBase):

21:27 Changeset [36149] by mrowe@apple.com

Add codegen support for op_instanceof, fixing 15 mozilla tests.

Reviewed by Sam Weinig

21:27 Changeset [36148] by mrowe@apple.com

2008-08-26 Gavin Barraclough <barraclough@apple.com>

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:
21:27 Changeset [36147] by mrowe@apple.com

2008-08-26 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

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):
21:27 Changeset [36146] by mrowe@apple.com

2008-08-26 Sam Weinig <sam@webkit.org>

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):
21:27 Changeset [36145] by mrowe@apple.com

Implement op_in, fixing 8 mozilla tests.

Reviewed by Sam Weinig.

  • VM/CTI.cpp:

(KJS::CTI::privateCompile_pass1_Scan):
(KJS::CTI::privateCompile_pass2_Main):

  • VM/Machine.cpp:

(KJS::Machine::cti_op_in):

  • VM/Machine.h:
21:27 Changeset [36144] by mrowe@apple.com

Don't hardcode the size of a Register for op_new_array. Fixes a crash
seen during the Mozilla tests.

Rubber-stamped by Oliver Hunt.

  • VM/CTI.cpp:

(KJS::CTI::privateCompile_pass2_Main):

21:27 Changeset [36143] by mrowe@apple.com

2008-08-26 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

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:
21:26 Changeset [36142] by mrowe@apple.com
21:26 Changeset [36141] by mrowe@apple.com

Support op_del_by_id

Reviewed by Maciej Stachowiak

Add codegen support for op_del_by_id, fixing 49 mozilla tests.

21:26 Changeset [36140] by mrowe@apple.com

2008-08-26 Sam Weinig <sam@webkit.org>

Reviewed by Gavin Barraclough.

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):
21:26 Changeset [36139] by mrowe@apple.com

Add support for op_loop

Reviewed by Maciej Stachowiak

Added code generator support for op_loop, fixing around 60 mozilla tests.

21:26 Changeset [36138] by mrowe@apple.com

Set -fomit-frame-pointer in the correct location.

Reviewed by Sam Weinig.

  • Configurations/JavaScriptCore.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
21:26 Changeset [36137] by mrowe@apple.com

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:
21:26 Changeset [36136] by mrowe@apple.com

Enabled -fomit-frame-pointer on Release and Production builds, add additional Profiling build config for shark, etc.

RS=Maciej

20:54 Changeset [36135] by antti@apple.com

2008-09-06 Antti Koivisto <antti@apple.com>

Reviewed by Dave Hyatt.

<rdar://problem/6187043>
Don't parse full HTML user agent style sheet unless it is actually needed
<rdar://problem/6131889>
WebView is significantly more expensive to create recently


Parsing the html4.css takes significant amount of time and memory (~50kb) on application
startup. Some clients may never use most of the rules.


With this patch we use simplified UA stylesheet until we hit something it can't handle.
This avoids full stylesheet parsing on application startup (due to empty document construction)
and also makes it possible for clients with very simple demands (divs and spans only) never to load
the full style.


It also delays view source style parsing until it is used.

  • css/CSSStyleSelector.cpp: (WebCore::elementCanUseSimpleDefaultStyle): (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::loadFullDefaultStyle): (WebCore::loadSimpleDefaultStyle): (WebCore::loadViewSourceStyle): (WebCore::CSSStyleSelector::matchUARules): (WebCore::CSSStyleSelector::styleForElement):
20:46 Changeset [36134] by kevino@webkit.org

wx build fix.

20:02 WebKit Team edited by antti@apple.com
(diff)
19:57 Applications using WebKit edited by kevino@theolliviers.com
(diff)
19:56 Applications using WebKit edited by kevino@theolliviers.com
(diff)
19:51 WebKit Team edited by kevino@theolliviers.com
(diff)
16:32 Changeset [36133] by antti@apple.com

2008-09-06 Antti Koivisto <antti@apple.com>

Reverting r35953 which was causing problems on Windows which relies on
WebCore timers in nested event loops. r36132 did alternative fix.

  • page/Chrome.cpp: (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
16:27 Changeset [36132] by antti@apple.com

2008-09-06 Antti Koivisto <antti@apple.com>

Reviewed by Dan Bernstein.

Fix <rdar://problem/6201644>
https://bugs.webkit.org/show_bug.cgi?id=20493
Crash after OK in dialog box and reloading page in secure mode


Limited loader only fix since the general timer fix is causing problems on Windows.

  • loader/loader.cpp: (WebCore::Loader::servePendingRequests): (WebCore::Loader::Host::Host): (WebCore::Loader::Host::didFinishLoading): (WebCore::Loader::Host::didFail): (WebCore::Loader::Host::didReceiveData):
  • loader/loader.h: (WebCore::Loader::Host::processingResource):
15:39 Changeset [36131] by mitz@apple.com

Reviewed by Dave Hyatt.

The initial Core Text adoption prototype was made by Daniel Fenwick.

  • <rdar://problem/5158514> Add a Core Text-based complex text code path

Currently the Core Text code path is not used in any configuration.

  • WebCore.xcodeproj/project.pbxproj: Added files.
  • config.h: Defined WTF_USE_ATSUI and WTF_USE_CORE_TEXT.
  • platform/graphics/Font.cpp: (WebCore::WidthIterator::advance): Moved the spacingDisabled() test out of the loop.
  • platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::add): Added this version that takes an advance.
  • platform/graphics/SimpleFontData.h: Added ATSUI and CORE_TEXT #ifdefs. Added getCTFont() and getCFStringAttributes() and corresponding data members for Core Text.
  • platform/graphics/mac/CoreTextController.cpp: Added. (WebCore::roundCGFloat): Helper function. (WebCore::ceilCGFloat): Helper function. (WebCore::CoreTextController::CoreTextRun::CoreTextRun): (WebCore::CoreTextController::CoreTextController): (WebCore::CoreTextController::offsetForPosition): (WebCore::CoreTextController::collectCoreTextRuns): Added. Segments the run into subruns as necessary such that each subrun can be rendered with a single font. Also separates out soft hyphens and replaces them with real hyphens, because Core Text does not emit a glyph for soft hyphens. Then calls collectCoreTextRunsForCharacters() on each subrun. (WebCore::CoreTextController::advance): (WebCore::CoreTextController::collectCoreTextRunsForCharacters): Creates a CTLine from the given subrun and collects its CoreTextRuns. (WebCore::CoreTextController::adjustGlyphsAndAdvances): Applies the rounding hacks, letter- and word-spacing and glyph substitutions and stores the resulting adjusted glyphs and advances.
  • platform/graphics/mac/CoreTextController.h: Copied from WebCore/platform/graphics/win/UniscribeController.h. (WebCore::CoreTextController::totalWidth): (WebCore::CoreTextController::finalRoundingWidth): (WebCore::CoreTextController::CoreTextRun::ctRun): (WebCore::CoreTextController::CoreTextRun::glyphCount): (WebCore::CoreTextController::CoreTextRun::fontData): (WebCore::CoreTextController::CoreTextRun::characters): (WebCore::CoreTextController::CoreTextRun::stringLocation): (WebCore::CoreTextController::CoreTextRun::stringLength): (WebCore::CoreTextController::CoreTextRun::indexAt):
  • platform/graphics/mac/FontMac.mm: Moved the ATSUI-specific parts to FontMacATSUI.mm.
  • platform/graphics/mac/FontMacATSUI.mm: Copied from WebCore/platform/graphics/mac/FontMac.mm. (WebCore::disableLigatures): Changed to call FontPlatformData::allowsLigatures(). (WebCore::overrideLayoutOperation): Changed to call FontPlatformData::roundsGlyphAdvances().
  • platform/graphics/mac/FontMacCoreText.cpp: Copied from WebCore/platform/graphics/win/FontWin.cpp. (WebCore::Font::selectionRectForComplexText): Changed to use totalWidth() instead of advancing to the end and using runWidthSoFar(). (WebCore::Font::drawComplexText): (WebCore::Font::floatWidthForComplexText): Ditto. (WebCore::Font::offsetForPositionForComplexText):
  • platform/graphics/mac/FontPlatformData.h:
  • platform/graphics/mac/FontPlatformDataMac.mm: (WebCore::FontPlatformData::setFont): (WebCore::FontPlatformData::roundsGlyphAdvances): Added. Checks the AppKit rendering mode. (WebCore::FontPlatformData::allowsLigatures): Added. Implements the heuristic that allows ligatures in fonts that do not have a glyph for 'a', based on the assumption that such fonts are only used in complex text.
  • platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformDestroy): (WebCore::SimpleFontData::getCTFont): Added. (WebCore::SimpleFontData::getCFStringAttributes): Added. Caches and returns an attributes dictionary.
  • platform/text/mac/ShapeArabic.c: Added ATSUI #ifdefs.
  • platform/text/mac/ShapeArabic.h: Ditto.
04:48 Changeset [36130] by cwzwarich@webkit.org

2008-09-06 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej Stachowiak.

Fix the Mac Debug build by adding symbols that are exported only in a
Debug configuration.

01:31 Changeset [36129] by mitz@apple.com

Reviewed by Dave Hyatt.

  • make combining mark offsets work in CG text on Windows
  • platform/graphics/win/FontCGWin.cpp: (WebCore::Font::drawGlyphs): The old code tried to translate the text matrix, but failed for two reasons: it did not actually change the matrix, and even if it did, CGContextSetTextPosition overwrites the translation values in the text matrix. Instead, just added the translation to the anchor point.

09/05/08:

22:37 Changeset [36128] by timothy@apple.com

Build fix.

22:19 Changeset [36127] by timothy@apple.com

Build fix.

22:19 Changeset [36126] by timothy@apple.com

Correct a typo in the setApplicationChromeModeEnabledEnabled:
method name, remove the extra "Enabled".

  • WebView/WebPreferences.mm:
  • WebView/WebPreferencesPrivate.h:
22:07 WebKit Team edited by timothy@apple.com
Remove Drosera. (diff)
22:06 WebKit Team edited by timothy@apple.com
Minor tweaks. (diff)
22:05 Web Inspector edited by timothy@apple.com
Fix a link to my name. (diff)
22:04 WebKit Team edited by oliver@apple.com
Minor updates i noticed (diff)
21:59 Changeset [36125] by darin@apple.com

2008-09-05 Darin Adler <darin@apple.com>

Reviewed by Cameron Zwarich.

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.
21:58 Changeset [36124] by darin@apple.com

2008-09-05 Darin Adler <darin@apple.com>

Reviewed by Geoff Garen.

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.
21:08 Changeset [36123] by alp@webkit.org

2008-09-05 Gustavo Noronha Silva <gns@gnome.org>

Reviewed by Alp Toker.

https://bugs.webkit.org/show_bug.cgi?id=18346
[GTK] Remove build warnings

Applied some casts, and removed an unused typedef to make the
compiler happy, printing less warnings when building.

17:56 Changeset [36122] by mrowe@apple.com

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.

17:21 Changeset [36121] by eric@webkit.org

Reviewed by Adam Roben.

Build fix for WebKitWin and Chromium

  • platform/FileSystem.h:
15:27 WebKit Team edited by alice.liu@apple.com
Added accessibility to Beth's and my sections (diff)
15:17 Changeset [36120] by eric@webkit.org

Reviewed by Darin Adler.

Try to make Chromium compile with ToT:

  • Wrap a few places which depend on KJS:: in #if USE(JSC)
  • Include some windows forward declarations
  • dom/Node.h:
  • page/Console.h:
  • page/animation/CompositeAnimation.h:
  • platform/FileSystem.h:
  • platform/graphics/Image.h:
  • platform/text/AtomicString.h:
  • platform/text/String.cpp:
  • rendering/style/RenderStyle.h:
15:08 Changeset [36119] by dino@apple.com

2008-09-04 Dean Jackson <dino@apple.com>

Updates to draft specifications.

Animations

  • Keyframes must provide 0% and 100% to be valid <rdar://problem/6165732> [animations] Spec should say what happens if you omit the 0% or 100% keyframe
  • Mention that keyframes can be specified in any order <rdar://problem/6165728> [animations] Spec should say that keyframes can be in any order (It actually already said this, but I made it more clear)
  • Keyframe names must be IDENT not STRING <rdar://problem/6164640> [animations] should we allow quoted animation names

Transforms

  • Change transform operation values in CSSTransformValue - splitting 2d and 3d.
  • Removed definition of <angle> - now reference CSS Values and Units consequence is that rotations now support "turn" units (feel free to turn it up to 11) <rdar://problem/6177272> [transforms] Should support "turns" as a rotation unit
  • Added exception to CSSMatrix setMatrixValue() and inverse() methods <rdar://problem/6160283> [transforms] Specify error reporting for WebKitCSSMatrix
  • Added getCSSMatrix() method to CSSTransformValue
  • Added Table of Contents to Transforms
  • skewZ() transform function removed. It makes no sense.
  • Definition for skew() transform function was missing
  • Also added a new CSSTransformValue CSS_SKEW <rdar://problem/6137414> [transforms] skew() function definition is missing
  • Removed mention of transitions when discussion keyframes rule <rdar://problem/6103072> [animations] CSS Animation spec mentions transition keyframes
14:52 Changeset [36118] by hyatt@apple.com

Add support for runtime switchability of the RenderTheme.

14:51 Changeset [36117] by darin@apple.com

2008-09-05 Darin Adler <darin@apple.com>

Reviewed by Sam Weinig.

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.
14:09 Changeset [36116] by mrowe@apple.com

New branch.

11:52 Changeset [36115] by antti@apple.com

2008-09-05 Antti Koivisto <antti@apple.com>

Qt build fix.

  • svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::build):
11:15 Changeset [36114] by darin@apple.com

Updated some of the ChangeLog files to use the full 64-bit universal version of my name.

10:52 Changeset [36113] by kmccullough@apple.com

2008-09-05 Kevin McCullough <kmccullough@apple.com>

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):
08:33 Changeset [36112] by aroben@apple.com

2008-09-05 Dirk Schulze <vbs85@gmx.de>

Gtk build fix

  • GNUmakefile.am:
03:36 Changeset [36111] by antti@apple.com

2008-09-05 Antti Koivisto <antti@apple.com>

Another build fix.

  • svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::notifyFinished):
03:03 Changeset [36110] by antti@apple.com

2008-09-05 Antti Koivisto <antti@apple.com>

Build fixes.


  • WebCore.xcodeproj/project.pbxproj:
  • svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::cachedImage):
02:28 Changeset [36109] by antti@apple.com

2008-09-05 Antti Koivisto <antti@apple.com>

Reviewed by Darin.

Most of the implementation for https://bugs.webkit.org/show_bug.cgi?id=17998
When a resource is cached locally, WebKit should follow RFC 2616 "Specific end-to-end revalidation" instead of "Unspecified end-to-end revalidation"

Implement HTTP 1.1 "Specific end-to-end revalidation" for WebCore memory cache. This patch does
not yet enable it for the biggest use case, reloading. However it is good for general browsing as
well. Doing this in WebCore level as opposed to relying on disk cache has big benefit that
we avoid re-decoding resources, especially images.


To be exact the enabled case is not actually the "Specific end-to-end revalidation" since it does not include
CacheControl: max-age=0 header. That would be added in reload case.


The approach for revalidation is to kick the original resource out from the memory cache
and create a new CachedResource that represents the revalidation request. In case
we get 304 back for the request we put the original resource back to the cache, update
its expiration date and switch the clients registered to revalidation resource to be
clients of the original resource.


All heap allocated CachedImage pointers now use CachedResourceHandle<CachedImage> (and so on) instead.
This allows updating the handles to point to the original resource when the revalidation succeeds. It
also acts as refcounting smart pointer.

  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSFontFaceSource.h:
  • css/CSSImportRule.h:
  • dom/Clipboard.h: (WebCore::Clipboard::dragImage):
  • dom/ProcessingInstruction.h:
  • dom/ScriptElement.h:
  • dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::isWaitingForScripts):
  • dom/XMLTokenizer.h:
  • html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::setImage): (WebCore::HTMLImageLoader::updateFromElement): (WebCore::HTMLImageLoader::notifyFinished):
  • html/HTMLImageLoader.h: (WebCore::HTMLImageLoader::image):
  • html/HTMLLinkElement.h:
  • html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::reset): (WebCore::HTMLTokenizer::scriptHandler): (WebCore::HTMLTokenizer::notifyFinished):
  • html/HTMLTokenizer.h:
  • loader/Cache.cpp: (WebCore::Cache::revalidateResource): (WebCore::Cache::revalidationSucceeded): (WebCore::Cache::revalidationFailed):
  • loader/Cache.h:
  • loader/CachedResource.cpp: (WebCore::CachedResource::CachedResource): (WebCore::CachedResource::~CachedResource): (WebCore::CachedResource::isExpired): (WebCore::CachedResource::setResponse): (WebCore::CachedResource::deleteIfPossible): (WebCore::CachedResource::setResourceToRevalidate): (WebCore::CachedResource::clearResourceToRevalidate): (WebCore::CachedResource::switchClientsToRevalidatedResource): (WebCore::CachedResource::canUseCacheValidator): (WebCore::CachedResource::mustRevalidate):
  • loader/CachedResource.h: (WebCore::CachedResource::canDelete): (WebCore::CachedResource::registerHandle): (WebCore::CachedResource::unregisterHandle): (WebCore::CachedResource::isCacheValidator): (WebCore::CachedResource::resourceToRevalidate): (WebCore::CachedResource::setExpirationDate):
  • loader/CachedResourceHandle.cpp: Added. (WebCore::CachedResourceHandleBase::setResource):
  • loader/CachedResourceHandle.h: Added. (WebCore::CachedResourceHandleBase::~CachedResourceHandleBase): (WebCore::CachedResourceHandleBase::get): (WebCore::CachedResourceHandleBase::operator!): (WebCore::CachedResourceHandleBase::operator UnspecifiedBoolType): (WebCore::CachedResourceHandleBase::CachedResourceHandleBase): (WebCore::CachedResourceHandleBase::operator=): (WebCore::CachedResourceHandle::CachedResourceHandle): (WebCore::CachedResourceHandle::get): (WebCore::CachedResourceHandle::operator->): (WebCore::CachedResourceHandle::operator=): (WebCore::CachedResourceHandle::operator==): (WebCore::CachedResourceHandle::operator!=): (WebCore::operator==): (WebCore::operator!=):
  • loader/DocLoader.cpp: (WebCore::DocLoader::checkForReload):
  • loader/UserStyleSheetLoader.h:
  • loader/loader.cpp: (WebCore::Loader::Host::servePendingRequests): (WebCore::Loader::Host::didFinishLoading): (WebCore::Loader::Host::didFail): (WebCore::Loader::Host::didReceiveResponse): (WebCore::Loader::Host::didReceiveData):
  • page/EventHandler.cpp: (WebCore::EventHandler::selectCursor):
  • rendering/RenderImage.cpp: (WebCore::RenderImage::setCachedImage): (WebCore::RenderImage::imageChanged):
  • rendering/RenderImage.h: (WebCore::RenderImage::cachedImage): (WebCore::RenderImage::imagePtr):
  • rendering/style/RenderStyle.h:
  • rendering/style/StyleCachedImage.h: (WebCore::StyleCachedImage::data): (WebCore::StyleCachedImage::cachedImage):
  • svg/SVGFEImageElement.h:
  • svg/graphics/filters/SVGFEImage.h:
  • xml/XSLImportRule.h:

09/04/08:

21:58 Changeset [36108] by beidson@apple.com

2008-09-04 Brady Eidson <beidson@apple.com>

Reviewed by Mitz

<rdar://problem/6180236> - Safari times out connections after 1 or 2 minutes

A 60-second default timeout was added in http://trac.webkit.org/changeset/17144 in an attempt
to model default NSURLRequest behavior in a cross-platform manner.

Sadly by always enforcing this 60 second timeout, WebCore was stomping over the wishes of any Webkit
client that wished to enforce a much larger default timeout using NSURLRequest API.

Additionally, upon reviewing what all other browsers do, it seems apparent that "no limit" is desirable
behavior on the web and this restores previous Safari/WebKit behavior.

It would be easy to write a layout test for this, but to be effective it would have
to run for at least 61 seconds, which seems insane until will can parallelize run-webkit-tests

  • manual-tests/timeout-test.html: Added.
  • manual-tests/timeout-test.php: Added.
  • platform/network/ResourceRequestBase.h: (WebCore::ResourceRequestBase::ResourceRequestBase): Rename the constant to "unspecifiedTimeoutInterval" and make it UINT_MAX so platforms that do set it have an effective "no timeout." (Windows, for example)
  • platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdatePlatformRequest): If the timeout for this request is "unspecifiedTimeoutInterval", then don't bother setting the timeout using NSURLRequest API, allowing WebKit applications to enforce their own default timeout.
21:26 Changeset [36107] by mitz@apple.com

WebCore:

Reviewed by Beth Dakin.

  • fix <rdar://problem/6198514> Changing a button's opacity triggers relayout

Test: fast/repaint/button-spurious-layout-hint.html

  • rendering/RenderButton.cpp: (WebCore::RenderButton::setStyle): Reset the inner block's style box flex to 0 to avoid getting a spurious layout hint.

LayoutTests:

Reviewed by Beth Dakin.

  • pixel test for <rdar://problem/6198514> Changing a button's opacity triggers relayout
  • fast/repaint/button-spurious-layout-hint.html: Added.
  • platform/mac/fast/repaint/button-spurious-layout-hint-expected.checksum: Added.
  • platform/mac/fast/repaint/button-spurious-layout-hint-expected.png: Added.
  • platform/mac/fast/repaint/button-spurious-layout-hint-expected.txt: Added.
20:11 Changeset [36106] by ggaren@apple.com

2008-09-04 Gavin Barraclough <barraclough@apple.com>

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):
18:26 Changeset [36105] by cwzwarich@webkit.org

2008-09-04 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej Stachowiak.

Add a '--args' option to SunSpider, so that we can pass '-j' to TraceMonkey
and '--expose-gc' to V8. Also, rename the '--v8' option to '--v8-suite' and
correct the punctuation in its documentation.

  • sunspider:
16:53 Changeset [36104] by kevino@webkit.org

wx build fixes.

16:27 Changeset [36103] by mitz@apple.com

WebCore:

Reviewed by Mark Rowe.

  • css/CSSGrammar.y:

LayoutTests:

  • css1/color_and_background/invalid_color-expected.txt: Removed.
  • css1/color_and_background/invalid_color.html: Removed.
14:44 Changeset [36102] by mrowe@apple.com

Fix https://bugs.webkit.org/show_bug.cgi?id=20639.
Bug 20639: ENABLE_DASHBOARD_SUPPORT does not need to be a FEATURE_DEFINE

Reviewed by Eric Seidel.

14:25 Changeset [36101] by adele@apple.com

2008-09-04 Adele Peterson <adele@apple.com>

Build fix.

14:00 Changeset [36100] by mrowe@apple.com

Mac build fix.

13:44 Changeset [36099] by eric@webkit.org

Build fix only, no review.

  • dom/XMLTokenizer.cpp: Fix the Chromium merge build by adding a missing header (the Mac files must include it somewhere).
13:26 Changeset [36098] by jmalonzo@webkit.org

2008-09-04 Marco Barisione <marco.barisione@collabora.co.uk>

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 Marco Barisione <marco.barisione@collabora.co.uk>

Reviewed by Eric Seidel.

http://bugs.webkit.org/show_bug.cgi?id=20380
[GTK][AUTOTOOLS] Include autotoolsconfig.h from config.h

  • configure.ac: Rename the configuration header from aconfig.h to autotoolsconfig.h.

2008-09-04 Marco Barisione <marco.barisione@collabora.co.uk>

Reviewed by Eric Seidel.

http://bugs.webkit.org/show_bug.cgi?id=20380
[GTK][AUTOTOOLS] Include autotoolsconfig.h from config.h

  • config.h: Include the configuration header generated by autotools if available.
13:16 Changeset [36097] by mrowe@apple.com

Presto change-o!

11:15 Changeset [36096] by mitz@apple.com

Rubber-stamped by Dave Hyatt.

  • rename CachedResource::allReferencesRemoved() to allClientsRemoved()
  • loader/CachedFont.cpp: (WebCore::CachedFont::allClientsRemoved):
  • loader/CachedFont.h:
  • loader/CachedImage.cpp: (WebCore::CachedImage::allClientsRemoved):
  • loader/CachedImage.h:
  • loader/CachedResource.cpp: (WebCore::CachedResource::removeClient):
  • loader/CachedResource.h: (WebCore::CachedResource::allClientsRemoved):
11:08 Changeset [36095] by cwzwarich@webkit.org

2008-09-04 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver Hunt.

Bug 20616: Incorporate V8 benchmarks in testing
<https://bugs.webkit.org/show_bug.cgi?id=20616>

This is a first attempt at running the V8 benchmarks within SunSpider,
with the --v8 option. The number of iterations is fixed for each
benchmark, and was chosen to make each of the benchmarks run between
500 ms and 600 ms in V8 on my machine, a 2.16 GHz MacBook Pro.

SunSpider:

  • sunspider:
  • tests/LIST-V8: Added.
  • tests/v8-crypto.js: Added.
  • tests/v8-deltablue.js: Added.
  • tests/v8-earley-boyer.js: Added.
  • tests/v8-raytrace.js: Added.
  • tests/v8-richards.js: Added.

WebKitTools:

  • Scripts/run-sunspider:
10:51 Changeset [36094] by kevino@webkit.org

wx buildbot fix. More robust handling of clean when makefiles are not built or are not completely made.

09:10 Changeset [36093] by aroben@apple.com

Make JavaScriptCoreGenerated build first instead of WTF

JavaScriptCoreGenerated does some setup work that we want to happen
before WTF builds.

  • WebKit.vcproj/WebKit.sln: Reversed the dependencies of WTF and JavaScriptCoreGenerated.
09:10 Changeset [36092] by aroben@apple.com

Ignore warning LNK4221 on Windows

This warning is emitted when an object file with no public symbols is
passed to the linker/librarian. This often occurs in WebCore for files
that have been disabled via ENABLE()/USE() macros.

Rubberstamped by Anders Carlsson.

  • win/tools/vsprops/common.vsprops: Ignore warning LNK4221.
09:09 Changeset [36091] by aroben@apple.com

Windows build fix after r36071

We were getting these errors:

error C2356: initialization segment must not change during translation
unit

This was happening because multiple files #included by
DerivedSources.cpp were themselves #including StaticConstructors.h. I
fixed the error by adding header guards to StaticConstructors.h so its
contents will only be included once.

But it's also not a good idea for StaticConstructors.h to end up in
DerivedSources.cpp, since it ends up "polluting" all the source files
we have in there. So I removed all the files that include
StaticConstructors.h and added some preprocessor directives to
DerivedSources.cpp to catch this error in the future.

  • DerivedSources.cpp: Removed the *Names.cpp files, which include StaticConstructors.h, and added some preprocessor directives to make sure we don't end up accidentally including StaticConstructors.h in the future.
  • WebCore.vcproj/WebCore.vcproj: Added the *Names.cpp files.
  • platform/StaticConstructors.h: Added header guards.
09:09 Changeset [36090] by aroben@apple.com

Windows build fix

  • platform/graphics/win/FontPlatformData.h: Added a missing #include of PassRefPtr.h, and corrected the capitalization of RefCounted.h.
  • platform/text/PlatformString.h: Added a missing #include of PassRefPtr.h.
07:24 Changeset [36089] by vestbo@webkit.org

2008-09-04 Tor Arne Vestbø <tavestbo@trolltech.com>

Reviewed by Simon

Fix the QtWebKit build to match changes in r36016

04:44 Changeset [36088] by vestbo@webkit.org

2008-09-04 Tor Arne Vestbø <tavestbo@trolltech.com>

Reviewed by Simon.

Re-enable support for user stylesheets in QtWebKit

QtWebKit now follows the FRAME_LOADS_USER_STYLESHEET
code path, which allows us to keep API support for
loading user style sheets from remote URLs.

As part of the change UserStyleSheetLoader.cpp/h was
moved from WebCore/loader/mac to WebCore/loader.

02:29 Changeset [36087] by mrowe@apple.com

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.

02:14 Changeset [36086] by alp@webkit.org

2008-09-04 Alp Toker <alp@nuanti.com>

Reviewed by Eric.

Remove left-over QT and CAIRO platform checks.

  • html/CanvasRenderingContext2D.cpp:
01:58 Changeset [36085] by mitz@apple.com

Fix typo

01:39 Changeset [36084] by eric@webkit.org

Reviewed by Mark Rowe.

Fix leak of TextMetrix due to over-ref as see on buildbot.

  • html/TextMetrics.h: use adoptRef since RefCounted starts @ refcount 1 instead of 0 now.
01:00 Changeset [36083] by cwzwarich@webkit.org

2008-09-04 Cameron Zwarich <cwzwarich@uwaterloo.ca>

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):
00:26 Changeset [36082] by mitz@apple.com

WebCore:

Reviewed by Dave Hyatt.

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutOnlyPositionedObjects): In the positioned movement only case, call tryLayoutDoingPositionedMovementOnly() and fall back on doing a full layout if that fails. (WebCore::RenderBlock::layoutPositionedObjects): Ditto.
  • rendering/RenderBox.h: (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly): Renamed layoutDoingPositionedMovementOnly to this, and made this function check if the width changed. If it did, return, leaving the object dirty. The caller can then call layout(). The width can change even in the "positioned movement only" case if the object is shrink-to-fit and the available width constraint is met. (This was the case in the bug).
  • rendering/RenderObject.h: (WebCore::RenderObject::tryLayoutDoingPositionedMovementOnly): Renamed layoutDoingPositionedMovementOnly() to this.

LayoutTests:

Reviewed by Dave Hyatt.

  • fast/block/positioning/move-with-auto-width.html: Added.
  • platform/mac/fast/block/positioning/move-with-auto-width-expected.checksum: Added.
  • platform/mac/fast/block/positioning/move-with-auto-width-expected.png: Added.
  • platform/mac/fast/block/positioning/move-with-auto-width-expected.txt: Added.
00:21 Changeset [36081] by ggaren@apple.com

JavaScriptCore:

2008-09-03 Geoffrey Garen <ggaren@apple.com>

Reviewed by Cameron Zwarich.


Fixed <rdar://problem/6193925> 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:

LayoutTests:

2008-09-04 Geoffrey Garen <ggaren@apple.com>

Reviewed by Cameron Zwarich.


Test for <rdar://problem/6193925> 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

  • fast/js/pic/dictionary-prototype-expected.txt: Added.
  • fast/js/pic/dictionary-prototype.html: Added.

09/03/08:

23:31 Changeset [36080] by eric@webkit.org

No review, build fix only.

Attempt to fix the Qt build.

  • WebCore.pro: add page/animation to include path
23:11 Changeset [36079] by alp@webkit.org

2008-09-03 Alp Toker <alp@nuanti.com>

Build fix following r36073. Include config.h where necessary.

  • WebCoreSupport/PasteboardHelperGtk.cpp:
  • webkit/webkitversion.cpp:
20:46 Changeset [36078] by mrowe@apple.com

More Mac build fixes.

Set ENABLE_DASHBOARD_SUPPORT when building for Mac via build-webkit.
Also set ENABLE_CROSS_DOCUMENT_MESSAGING in order to match the
default configuration specified in the .xcconfig files.

20:29 Changeset [36077] by mrowe@apple.com

Touch an input file to force a derived file to be rebuilt.

20:20 Changeset [36076] by mrowe@apple.com

Fix the Mac build.

18:59 Changeset [36075] by mrowe@apple.com

Update layout test results after recent canvas changes.

  • fast/canvas/canvas-invalid-fillstyle-expected.txt:
  • fast/canvas/canvas-invalid-strokestyle-expected.txt:
  • fast/canvas/drawImage-with-negative-source-destination-expected.txt:
  • fast/dom/Window/window-properties-expected.txt:
18:32 Changeset [36074] by eric@webkit.org

Reviewed by Sam.

Clean up Platform.h and add PLATFORM(CHROMIUM), PLATFORM(SKIA) and USE(V8_BINDINGS)

  • Configurations/WebCore.xcconfig: add missing ENABLE_*
  • config.h: add rules for V8_BINDINGS
18:32 Changeset [36073] by eric@webkit.org

Reviewed by Sam.

https://bugs.webkit.org/show_bug.cgi?id=20620

Add #if USE(JSC) around KJS dependencies
Remove !USE(JAVASCRIPTCORE_BINDINGS) support for 3 reasons:

  1. Most platforms have it on anyway
  2. V8 is going to want to share some of that code
  3. Those platforms which want it off, should have a separate file instead of an #ifdef in our .cpp
  • bindings/js/JSPluginElementFunctions.cpp: remove !USE(JAVASCRIPTCORE_BINDINGS) support
  • config.h: change JAVASCRIPTCORE_BINDINGS to JSC and add USE(V8)
  • html/HTMLAppletElement.cpp: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
  • html/HTMLAppletElement.h: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
  • html/HTMLEmbedElement.cpp: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
  • html/HTMLEmbedElement.h: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
  • html/HTMLObjectElement.cpp: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
  • html/HTMLObjectElement.h: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
  • html/HTMLPlugInElement.cpp: replace USE(JAVASCRIPTCORE_BINDINGS) with USE(JSC) where needed
  • html/HTMLPlugInElement.h: replace USE(JAVASCRIPTCORE_BINDINGS) with USE(JSC) where needed
  • platform/text/AtomicString.cpp: add USE(JSC)
  • platform/text/AtomicString.h: add USE(JSC)
  • platform/text/PlatformString.h: add USE(JSC)
  • platform/text/String.cpp: add USE(JSC)
  • platform/text/StringImpl.cpp: add USE(JSC)
  • platform/text/StringImpl.h: add USE(JSC)
17:10 Changeset [36072] by mrowe@apple.com

Tidy up some ChangeLog entries.

16:46 Changeset [36071] by mrowe@apple.com

2008-09-03 Dean McNamee <deanm@chromium.org>

Reviewed by Darin Adler.

Fix https://bugs.webkit.org/show_bug.cgi?id=20511
Bug 20511: Remove static initializers on Windows

Avoid static initializers on Windows by forcing Visual C++ to put
all static initializers in a code segment that is never executed.

  • config.h:
  • css/MediaFeatureNames.cpp:
  • dom/EventNames.cpp:
  • dom/QualifiedName.cpp:
  • dom/make_names.pl:
  • platform/StaticConstructors.h:
  • platform/text/AtomicString.cpp:
16:40 Changeset [36070] by mrowe@apple.com

2008-09-03 Dirk Schulze <vbs85@gmx.de>

Reviewed by Dave Hyatt.

Make FontCairo draw TextStroke and TextFill separately.

[CAIRO] draw TextFill and TextStroke separately.
https://bugs.webkit.org/show_bug.cgi?id=20631

  • platform/graphics/cairo/FontCairo.cpp: (WebCore::Font::drawGlyphs):
16:34 Changeset [36069] by mrowe@apple.com

2008-09-03 Peter Kasting <zerodpx@gmail.com>

Reviewed by Dave Hyatt.

https://bugs.webkit.org/show_bug.cgi?id=19663
Account for paint and timer lag when animating images. Also pretend
that images whose animations were paused (by becoming invisible)
continued to animate, by "catching up" to the correct frame when they're
shown again.

  • platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::BitmapImage): (WebCore::BitmapImage::startAnimation): (WebCore::BitmapImage::advanceAnimation): (WebCore::BitmapImage::internalAdvanceAnimation): (WebCore::BitmapImage::notifyObserverAndTrimDecodedData):
  • platform/graphics/BitmapImage.h:
  • platform/graphics/cairo/ImageCairo.cpp: (WebCore::BitmapImage::draw):
  • platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::draw):
  • platform/graphics/qt/ImageQt.cpp: (WebCore::BitmapImage::draw):
  • platform/graphics/wx/ImageWx.cpp: (WebCore::BitmapImage::draw):
14:53 Changeset [36068] by kmccullough@apple.com

JavaScriptCore:

2008-09-03 Kevin McCullough <kmccullough@apple.com>

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:

WebCore:

2008-09-03 Kevin McCullough <kmccullough@apple.com>

Reviewed by Tim.

Remove the rest of the "zombie" code from the profiler.

  • There is no longer a need for the ProfilerClient callback mechanism.
  • page/Console.cpp: (WebCore::Console::Console): (WebCore::Console::profile): (WebCore::Console::profileEnd): Move the variables from the header to here since we don't have to wait for a callback to use them.
  • page/Console.h:
  • page/InspectorController.cpp: (WebCore::InspectorController::startUserInitiatedProfiling): (WebCore::InspectorController::stopUserInitiatedProfiling):
  • page/InspectorController.h:
14:43 Changeset [36067] by adachan@apple.com

Windows build fix.

  • WebCore.vcproj/WebCore.vcproj: Added JSWebKitCSSKeyframeRule.cpp and JSWebKitCSSKeyframesRule.cpp to the project.
14:15 Changeset [36066] by dino@apple.com

2008-09-01 Dean Jackson <dino@apple.com>

Reviewed by Dave Hyatt.

https://bugs.webkit.org/show_bug.cgi?id=20594
Add DOM interfaces for WebKitCSSKeyframeRule
and WebKitCSSKeyframesRule.

TEST: LayoutTests/css3/keyframes-rule.html

  • css/WebKitCSSKeyframeRule.idl: Added
  • css/WebKitCSSKeyframesRule.idl: Added
  • bindings/js/JSCSSRuleCustom.cpp: (WebCore::toJS):

Add return of new JS Keyframe rules

  • bindings/objc/DOMInternal.h:

Include new internal header

  • DerivedSources.make:
  • GNUmakefile.am:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreSources.bkl:

Build configs for new files

13:30 Changeset [36065] by aroben@apple.com

Windows build fix

  • DerivedSources.cpp: Add JSTextMetrics.cpp to fix the build.
  • WebCore.vcproj/WebCore.vcproj: Add JSTextMetrics.h for convenience/consistency.
13:13 Changeset [36064] by adele@apple.com

2008-09-03 Adele Peterson <adele@apple.com>

Build fix.

  • WebCore.vcproj/WebCore.vcproj:
12:06 Changeset [36063] by hyatt@apple.com
12:02 Changeset [36062] by adele@apple.com

2008-09-03 Adele Peterson <adele@apple.com>

Build fix.

  • wtf/win/MainThreadWin.cpp:
11:32 Changeset [36061] by hyatt@apple.com

WebCore:

2008-09-03 David Hyatt <hyatt@apple.com>

Fix for bug 18203, right floats should be allowed to overflow past the left border edge.

Reviewed by Darin (ages ago)

Added fast/block/float/clamped-right-float.html

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionNewFloats):

LayoutTests:

2008-09-03 David Hyatt <hyatt@apple.com>

Fix for bug 18203.

Reviewed by Darin (ages ago).

  • fast/block/float/clamped-right-float.html: Added.
  • platform/mac/fast/block/float/clamped-right-float-expected.checksum: Added.
  • platform/mac/fast/block/float/clamped-right-float-expected.png: Added.
  • platform/mac/fast/block/float/clamped-right-float-expected.txt: Added.
11:13 Changeset [36060] by hyatt@apple.com

WebCore:

2008-09-02 David Hyatt <hyatt@apple.com>

Add support for canvas text drawing APIs.

Reviewed by olliej

Tests added as fast/canvas/canvas-text-*.html

  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::JSCanvasRenderingContext2D::fillText): (WebCore::JSCanvasRenderingContext2D::strokeText):
  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::initForStyleResolve): (WebCore::CSSStyleSelector::applyPropertyToStyle):
  • css/CSSStyleSelector.h:
  • html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::State::State): (WebCore::CanvasRenderingContext2D::font): (WebCore::CanvasRenderingContext2D::setFont): (WebCore::CanvasRenderingContext2D::textAlign): (WebCore::CanvasRenderingContext2D::setTextAlign): (WebCore::CanvasRenderingContext2D::textBaseline): (WebCore::CanvasRenderingContext2D::setTextBaseline): (WebCore::CanvasRenderingContext2D::fillText): (WebCore::CanvasRenderingContext2D::strokeText): (WebCore::CanvasRenderingContext2D::measureText): (WebCore::CanvasRenderingContext2D::drawTextInternal): (WebCore::CanvasRenderingContext2D::accessFont):
  • html/CanvasRenderingContext2D.h:
  • html/CanvasRenderingContext2D.idl:
  • html/TextMetrics.h: Added. (WebCore::TextMetrics::create): (WebCore::TextMetrics::width): (WebCore::TextMetrics::setWidth): (WebCore::TextMetrics::TextMetrics):
  • html/TextMetrics.idl: Added.
  • platform/graphics/Font.cpp: (WebCore::Font::lineGap):
  • platform/graphics/Font.h:
  • platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawBidiText):
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/GraphicsTypes.cpp: (WebCore::textAlignName): (WebCore::parseTextAlign): (WebCore::textBaselineName): (WebCore::parseTextBaseline):
  • platform/graphics/GraphicsTypes.h: (WebCore::):

LayoutTests:

2008-09-02 David Hyatt <hyatt@apple.com>

Add support for the canvas text APIs.

Reviewed by olliej

  • fast/canvas/canvas-text-alignment.html: Added.
  • fast/canvas/canvas-text-baseline.html: Added.
  • platform/mac/fast/canvas/canvas-text-alignment-expected.checksum: Added.
  • platform/mac/fast/canvas/canvas-text-alignment-expected.png: Added.
  • platform/mac/fast/canvas/canvas-text-alignment-expected.txt: Added.
  • platform/mac/fast/canvas/canvas-text-baseline-expected.checksum: Added.
  • platform/mac/fast/canvas/canvas-text-baseline-expected.png: Added.
  • platform/mac/fast/canvas/canvas-text-baseline-expected.txt: Added.
10:37 Changeset [36059] by sullivan@apple.com

2008-09-03 John Sullivan <sullivan@apple.com>

Fixed <rdar://problem/6193022> <rdar://problem/6193022> Crash occurs at WebCore::AnimationBase::propertiesEqual () after certain steps

Fixed by Darin, reviewed by me

  • page/animation/AnimationBase.cpp: (WebCore::AnimationBase::propertiesEqual): added ensurePropertyMap() to this static function (WebCore::AnimationBase::getPropertyAtIndex): ditto (WebCore::AnimationBase::getNumProperties): ditto
10:35 Changeset [36058] by kmccullough@apple.com

JavaScriptCore:

2008-09-02 Kevin McCullough <kmccullough@apple.com>

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:

WebCore:

2008-09-03 Kevin McCullough <kmccullough@apple.com>

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.

  • These changes are a result of changes to JSCore.
  • manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html:
  • page/Console.cpp: (WebCore::retrieveLastCaller): (WebCore::Console::profileEnd):
  • page/InspectorController.cpp: (WebCore::InspectorController::stopUserInitiatedProfiling):
09:57 Changeset [36057] by adele@apple.com

WebCore:

2008-09-03 Adele Peterson <adele@apple.com>

Reviewed by Darin Adler.

Test: fast/forms/search-display-none-cancel-button.html

Allow display:none to work on a search field's cancel button. Prepare for adding more style-ability for the results button too.

  • css/html4.css: Set display:inline-block for these buttons. Now they can be overridden by a web author.
  • rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setStyle): Add nil checks for the button renderers. (WebCore::RenderTextControl::createResultsButtonStyle): Don't set the display explicitly. This is now done in html4.css. (WebCore::RenderTextControl::createCancelButtonStyle): ditto. (WebCore::RenderTextControl::createSubtreeIfNeeded): Reorganize this code so our complicated way of adding shadow nodes is abstracted out into the TextControlInnerElement class. (WebCore::RenderTextControl::updateFromElement): Added nil checks for the button renderers. (WebCore::RenderTextControl::subtreeHasChanged): ditto. (WebCore::RenderTextControl::calcHeight): ditto. (WebCore::RenderTextControl::nodeAtPoint): ditto. (WebCore::RenderTextControl::layout): ditto. (WebCore::RenderTextControl::calcPrefWidths): ditto. (WebCore::RenderTextControl::clientPaddingLeft): ditto. (WebCore::RenderTextControl::clientPaddingRight): ditto.
  • rendering/TextControlInnerElements.cpp: (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock): Moved from RenderTextControl.cpp. (WebCore::RenderTextControlInnerBlock::nodeAtPoint): ditto. (WebCore::TextControlInnerElement::attachInnerElement): Added. This does all the separate steps of attaching a shadow node that used to be repeated in RenderTextControl::createSubtreeIfNeeded for each element. (WebCore::TextControlInnerTextElement::createRenderer): Added. Creates a RenderTextControlInnerBlock.
  • rendering/TextControlInnerElements.h:

LayoutTests:

2008-09-03 Adele Peterson <adele@apple.com>

Reviewed by Darin Adler.

Test that display:none works on a search field's cancel button.

  • fast/forms/search-display-none-cancel-button.html: Added.
  • platform/mac/fast/forms/search-display-none-cancel-button-expected.checksum: Added.
  • platform/mac/fast/forms/search-display-none-cancel-button-expected.png: Added.
  • platform/mac/fast/forms/search-display-none-cancel-button-expected.txt: Added.
09:37 Changeset [36056] by ap@webkit.org

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.
09:20 Changeset [36055] by ggaren@apple.com

2008-09-03 Geoffrey Garen <ggaren@apple.com>

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):
01:08 Changeset [36054] by ap@webkit.org

Reviewed by Maciej.

Elminate SQLiteAuthorizer class.

  • WebCore.xcodeproj/project.pbxproj:
  • WebCore.vcproj/WebCore.vcproj:
  • GNUmakefile.am Removed SQLiteAuthorizer.h.
  • platform/sql/SQLiteAuthorizer.cpp:
  • platform/sql/SQLiteAuthorizer.h: Removed.
  • platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::authorizerFunction): (WebCore::SQLiteDatabase::setAuthorizer):
  • platform/sql/SQLiteDatabase.h:
  • storage/DatabaseAuthorizer.h: (WebCore::DatabaseAuthorizer::create): (WebCore::DatabaseAuthorizer::createView): (WebCore::DatabaseAuthorizer::createTempView): (WebCore::DatabaseAuthorizer::dropView): (WebCore::DatabaseAuthorizer::dropTempView): (WebCore::DatabaseAuthorizer::allowSelect): (WebCore::DatabaseAuthorizer::allowReindex): Merge SQLiteAuthorizer and DatabaseAuthorizer, as keeping them separate serves no purpose.
00:09 Changeset [36053] by mrowe@apple.com

Move the backslash to the right place.

00:05 Changeset [36052] by mrowe@apple.com

2008-09-03 Dirk Schulze <vbs85@gmx.de>

Reviewed and tweaked by Mark Rowe.

WebKitGtk build fix.

  • GNUmakefile.am:
  • page/animation/AnimationController.h:

09/02/08:

23:59 Changeset [36051] by mrowe@apple.com

2008-09-02 Robert Blaut <webkit@blaut.biz>

Reviewed by Geoff Garen.

Fix for <https://bugs.webkit.org/show_bug.cgi?id=16913>
Misplaced elements should not close DL lists.

Test: fast/invalid/test-case-tr-th-td-should-not-close-dl-list.html

  • html/HTMLParser.cpp: (WebCore::HTMLParser::handleError):

2008-09-02 Robert Blaut <webkit@blaut.biz>

Reviewed by Geoff Garen.

Test for <https://bugs.webkit.org/show_bug.cgi?id=16913>
Misplaced elements should not close DL lists.

  • fast/invalid/test-case-tr-th-td-should-not-close-dl-list-expected.txt: Added.
  • fast/invalid/test-case-tr-th-td-should-not-close-dl-list.html: Added.
  • platform/mac/fast/invalid/missing-dl-end-tag-expected.checksum:
  • platform/mac/fast/invalid/missing-dl-end-tag-expected.png:
  • platform/mac/fast/invalid/missing-dl-end-tag-expected.txt:
  • platform/mac/fast/invalid/missing-dt-end-tag-expected.checksum:
  • platform/mac/fast/invalid/missing-dt-end-tag-expected.png:
  • platform/mac/fast/invalid/missing-dt-end-tag-expected.txt:
23:51 Changeset [36050] by mrowe@apple.com

2008-09-02 Glenn Wilson <wilsong@gmail.com>

Reviewed by Darin Adler.

Fix for <https://bugs.webkit.org/show_bug.cgi?id=15360>
Bug 15360: color:#{predefined colorName} is treated as colorName in Safari

We would inappropriately interpret and apply an invalid CSS "color" property
when the value is a predefined color preceded by a '#' symbol. For example,
style="color:#gray;" would apply the color gray when it should not.

In the bison template, "hexcolor" was defined as both "HEX maybe_space" OR "IDENT maybe_space".
This caused identifiers not fitting the appropriate hex format but preceded by a '#' to be
interpreted as a valid color (CSSPrimitiveValue::CSS_PARSER_HEXCOLOR), when it was really just
an ignorable token.

To correct this, "IDENT maybe_space" was removed from "hexcolor" and added under "term" as
'#' IDENT maybe_space, which is then processed as a CSSPrimitiveValue::CSS_STRING instead of
CSSPrimitiveValue::CSS_PARSER_HEXCOLOR.

Test: css1/color_and_background/invalid_color.html

  • css/CSSGrammar.y:

2008-09-02 Glenn Wilson <wilsong@gmail.com>

Reviewed by Darin Adler.

Test for <https://bugs.webkit.org/show_bug.cgi?id=15360>
Bug 15360: color:#{predefined colorName} is treated as colorName in Safari

Added new test to verify that CSS "color" attributes with '#'-preceeded predefined color names
are not rendered in those colors.

  • css1/color_and_background/invalid_color.html: Added.
  • css1/color_and_background/invalid_color-expected.txt: Added.
23:38 Changeset [36049] by mrowe@apple.com

Build fix. Remove the now unnecessary check for "4" in the user agent string.

Reviewed by Tim Hatcher.

  • WebKit.xcodeproj/project.pbxproj:
23:28 Changeset [36048] by mrowe@apple.com

2008-09-02 Csaba Osztrogonac <oszi@inf.u-szeged.hu>

Reviewed by Darin Adler.

Bug 20296: OpcodeStats doesn't build on platforms which don't have mergesort().
<https://bugs.webkit.org/show_bug.cgi?id=20296>

  • VM/Opcode.cpp: (KJS::OpcodeStats::~OpcodeStats): mergesort() replaced with qsort()
23:22 Changeset [36047] by mrowe@apple.com

2008-09-02 Mihnea Ovidenie <mihnea@adobe.com>

Reviewed by Darin Adler.

Fix for https://bugs.webkit.org/show_bug.cgi?id=19964
Bug 19964: Divide by zero crash in RenderBox::calculateBackgroundSize with 0,0 bmp background image

Add a check to RenderBox::repaintLayerRectsForImage to make sure the current layer image can be rendered.

Test: css3/khtml-background-size-0x0-bmp.html

  • rendering/RenderBox.cpp: (WebCore::RenderBox::repaintLayerRectsForImage):

2008-09-02 Mihnea Ovidenie <mihnea@adobe.com>

Reviewed by Darin Adler.

Test for https://bugs.webkit.org/show_bug.cgi?id=19964
Bug 19964: Divide by zero crash in RenderBox::calculateBackgroundSize with 0,0 bmp background image

  • css3/khtml-background-size-0x0-bmp-expected.txt: Added.
  • css3/khtml-background-size-0x0-bmp.html: Added.
  • css3/support/0x0.bmp: Added.
23:12 Changeset [36046] by mrowe@apple.com

2008-09-02 Glenn Wilson <wilsong@gmail.com>

Reviewed by Eric Seidel.

Fix https://bugs.webkit.org/show_bug.cgi?id=20397
Bug 20397: Invalid webkit-border-bottom-left-radius property causes crash

The function checkForOrphanedUnits() would change the length of a list whose size was
was already determined before the call to checkForOrphanedUnits was made. Later in
the caller, the old size was being used for boundary management.

This has been fixed by moving the call to checkForOrphanedUnits() earlier in the
calling function, before the size of the list is determined.

Test: fast/css/orphaned_units_crash.html

  • css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Moved call to checkForOrphanedUnits() earlier in the function.

2008-09-02 Glenn Wilson <wilsong@gmail.com>

Reviewed by Eric Seidel.

Tests for https://bugs.webkit.org/show_bug.cgi?id=20397
Bug 20397: Invalid webkit-border-bottom-left-radius property causes crash

Added new tests to check whether an orphaned unit identifier in particular
CSS attributes will crash the browser.

  • fast/css/orphaned_units_crash-expected.txt: Added.
  • fast/css/orphaned_units_crash.html: Added.
23:10 Changeset [36045] by cwzwarich@webkit.org

2008-09-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Not reviewed.

Move the ChangeLog of r35906 to its rightful place.

23:01 Changeset [36044] by mrowe@apple.com

2008-09-02 Dirk Schulze <vbs85@gmx.de>

Reviewed by Darin Adler.

Fallback on invalid fill or stroke styles in Canvas was
transparent black. Changed it to last valid style.

Canvas fillStyle() and strokeStyle() needs fallback
https://bugs.webkit.org/show_bug.cgi?id=20474

Tests: fast/canvas/canvas-invalid-fillstyle.html

fast/canvas/canvas-invalid-strokestyle.html

  • html/CanvasStyle.cpp: (WebCore::CanvasStyle::applyStrokeColor): (WebCore::CanvasStyle::applyFillColor):

2008-09-02 Dirk Schulze <vbs85@gmx.de>

Reviewed by Darin Adler.

Tests for https://bugs.webkit.org/show_bug.cgi?id=20474
Tests behaviour on invalid fillStyle() or strokeStyle() in canvas.

  • fast/canvas/canvas-invalid-fillstyle-expected.txt: Added.
  • fast/canvas/canvas-invalid-fillstyle.html: Added.
  • fast/canvas/canvas-invalid-fillstyle.js: Added.
  • fast/canvas/canvas-invalid-strokestyle-expected.txt: Added.
  • fast/canvas/canvas-invalid-strokestyle.html: Added.
  • fast/canvas/canvas-invalid-strokestyle.js: Added.
22:49 Changeset [36043] by mrowe@apple.com

2008-09-02 Dirk Schulze <vbs85@gmx.de>

Reviewed by Darin Adler.

Fix https://bugs.webkit.org/show_bug.cgi?id=20468
Updated drawImage() in canvas to match the current specification.

Test: fast/canvas/drawImage-with-negative-source-destination.html

  • html/CanvasRenderingContext2D.cpp: (WebCore::normalizeRect): (WebCore::CanvasRenderingContext2D::drawImage):

2008-09-02 Dirk Schulze <vbs85@gmx.de>

Reviewed by Darin Adler.

Tests for https://bugs.webkit.org/show_bug.cgi?id=20468
Test negative source and destination rect in drawImage()

  • fast/canvas/drawImage-with-invalid-args-expected.txt:
  • fast/canvas/drawImage-with-invalid-args.html:
  • fast/canvas/drawImage-with-negative-source-destination-expected.txt: Added.
  • fast/canvas/drawImage-with-negative-source-destination.html: Added.
  • fast/canvas/drawImage-with-negative-source-destination.js: Added.
22:41 Changeset [36042] by mrowe@apple.com

<rdar://problem/5768210> Switch back to the system version of SQLite

Reviewed by Darin Adler.

Use the system version of SQLite when it is new enough to provide the functionality
that WebCore requires.

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/WebCore.xcconfig:
22:23 Changeset [36041] by mrowe@apple.com

Versioning.

22:13 Changeset [36040] by mrowe@apple.com

Versioning.

22:04 Changeset [36039] by ggaren@apple.com

2008-09-02 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


Fast path for array.length and string.length.


SunSpider says 0.5% faster.

20:19 Changeset [36038] by mitz@apple.com
  • update expected results now that log() et al. report line numbers
  • fast/dom/Window/console-functions-expected.txt:
19:59 Changeset [36037] by mitz@apple.com
  • build fix
  • page/animation/AnimationBase.h:
19:58 Changeset [36036] by ggaren@apple.com

2008-09-02 Geoffrey Garen <ggaren@apple.com>

Reviewed by Anders Carlsson.


Added optimized paths for comparing to null.


SunSpider says 0.5% faster.

19:46 Changeset [36035] by cwzwarich@webkit.org

2008-09-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Not reviewed.

Remove a local change that was accidentally committed in r36034.

  • resources/sunspider-standalone-driver.js:
19:42 Changeset [36034] by cwzwarich@webkit.org

2008-09-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver Hunt.

Tests for bug 17936: "ASSERTION FAILED: false" (GetterSetterImp::toObject is called)
<https://bugs.webkit.org/show_bug.cgi?id=17936>

This bug was fixed by the rewrite of much of the code handling getters
and setters in r36016, the revision that introduced the polymorphic
inline cache.

  • fast/js/delete-getters-setters-expected.txt: Added.
  • fast/js/delete-getters-setters.html: Added.
  • fast/js/resources/delete-getters-setters.js: Added.
19:39 Changeset [36033] by ggaren@apple.com

2008-09-02 Geoffrey Garen <ggaren@apple.com>

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:
19:31 Changeset [36032] by ggaren@apple.com

JavaScriptCore:

2008-09-02 Geoffrey Garen <ggaren@apple.com>

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:

JavaScriptGlue:

2008-09-02 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.


Implemented the rest of Darin's review comments for the 09-01 inline
caching patch.


  • ForwardingHeaders/kjs/PutPropertySlot.h: Added.
18:32 Changeset [36031] by dino@apple.com

2008-09-02 Chris Marrin <cmarrin@apple.com>

Reviewed by Dave Hyatt.

AnimationController.cpp should be split into separate files
https://bugs.webkit.org/show_bug.cgi?id=20604

Note: All makefiles, except WebCore.xcodeproj have been changed without testing, upon
recommendation of Dave Hyatt.

  • GNUmakefile.am:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreSources.bkl:

Build files.

  • page/AnimationController.cpp: Removed.
  • page/AnimationController.h: Removed.
  • page/animation: Added.
  • page/animation/AnimationBase.cpp: Added.
  • page/animation/AnimationBase.h: Added.
  • page/animation/AnimationController.cpp: Copied from WebCore/page/AnimationController.cpp.
  • page/animation/AnimationController.h: Copied from WebCore/page/AnimationController.h.
  • page/animation/CompositeAnimation.cpp: Added.
  • page/animation/CompositeAnimation.h: Added.
  • page/animation/ImplicitAnimation.cpp: Added.
  • page/animation/ImplicitAnimation.h: Added.
  • page/animation/KeyframeAnimation.cpp: Added.
  • page/animation/KeyframeAnimation.h: Added.
17:57 Changeset [36030] by mitz@apple.com
  • release build fix
  • platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::calculateDrawingMode):
14:35 Changeset [36029] by timothy@apple.com

Make console functions log the correct resource URL and
line number for where the call originated.

https://bugs.webkit.org/show_bug.cgi?id=17234
<rdar://problem/5732837>

Reviewed by Kevin McCullough.

Test: manual-tests/inspector/console-call-line-numbers.html

  • bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::count): Call the impl. (WebCore::JSConsole::timeEnd): Ditto.
  • manual-tests/inspector/console-call-line-numbers.html: Added.
  • manual-tests/inspector/resources/script-console-calls.js: Added.
  • page/Console.cpp: (WebCore::retrieveLastCaller): Helper to get the URL and line. (WebCore::Console::error): Call retrieveLastCaller to get the URL and line number to pass to addMessageToConsole. (WebCore::Console::info): Ditto. (WebCore::Console::log): Ditto. (WebCore::Console::assertCondition): Ditto. (WebCore::Console::count): Ditto. (WebCore::Console::timeEnd): Ditto. (WebCore::Console::warn): Ditto.
  • page/Console.h:
  • page/Console.idl: Make count and timeEnd custom.
14:30 Changeset [36028] by timothy@apple.com

Removed IDL files from WebCore's framework resources.

  • WebCore.xcodeproj/project.pbxproj:
14:11 Changeset [36027] by cwzwarich@webkit.org

2008-09-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Rubber-stamped by Oliver Hunt.

Make SunSpider work with JavaScript shells that don't take filenames
after a '-f' argument.

  • sunspider:
13:39 Changeset [36026] by mitz@apple.com

Reviewed by Dave Hyatt.

  • html/HTMLParser.cpp: (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Added a cap on the number of consecutive identical residual style tags to reopen. (WebCore::HTMLParser::popBlock): Ditto.
09:16 Changeset [36025] by ap@webkit.org

Reviewed by Adam Roben.

A little database quota management cleanup.

  • storage/OriginQuotaManager.cpp: (WebCore::OriginQuotaManager::OriginQuotaManager): (WebCore::OriginQuotaManager::lock): (WebCore::OriginQuotaManager::unlock): (WebCore::OriginQuotaManager::trackOrigin): (WebCore::OriginQuotaManager::tracksOrigin): (WebCore::OriginQuotaManager::addDatabase): (WebCore::OriginQuotaManager::removeDatabase): (WebCore::OriginQuotaManager::removeOrigin): (WebCore::OriginQuotaManager::markDatabase): (WebCore::OriginQuotaManager::diskUsage):
  • storage/OriginQuotaManager.h: Changed to assert that a lock is taken more directly and reliably. Removed comments about main/background threads, as this is likely to stop being true with synchronous Database calls being made on worker threads.
  • storage/OriginUsageRecord.cpp: (WebCore::OriginUsageRecord::OriginUsageRecord): (WebCore::OriginUsageRecord::addDatabase): (WebCore::OriginUsageRecord::removeDatabase): (WebCore::OriginUsageRecord::markDatabase): (WebCore::OriginUsageRecord::diskUsage):
  • storage/OriginUsageRecord.h: (WebCore::OriginUsageRecord::DatabaseEntry::DatabaseEntry): Don't use a magic value for unknown. It is totally unnecessary for DatabaseEntry, and can be replaced with a single boolean for OriginUsageRecord. Added assertions for string parameters being unshared.
08:15 Changeset [36024] by aroben@apple.com

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.
Note: See TracTimeline for information about the timeline view.