Timeline



May 19, 2008:

11:58 PM Changeset in webkit [33920] by mrowe@apple.com
  • 3 edits
    3 adds in branches/squirrelfish

Bug 18752: SQUIRRELFISH: exceptions are not always handled by the vm
<https://bugs.webkit.org/show_bug.cgi?id=18752>

Reviewed by Maciej

Handle exceptions thrown by toString conversion in subscript operators,
this should basically complete exception handling in SquirrelFish.

Sunspider reports no regression.

11:58 PM Changeset in webkit [33919] by mrowe@apple.com
  • 6 edits in branches/squirrelfish

2008-05-17 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver.

Bug 18991: SquirrelFish: Major codegen issue in a.b=expr, a[b]=expr
<https://bugs.webkit.org/show_bug.cgi?id=18991>

Fix the last remaining blocking cases of this bug.

JavaScriptCore:

  • kjs/grammar.y:
  • kjs/nodes.cpp: (KJS::ReadModifyResolveNode::emitCode):

LayoutTests:

  • fast/js/codegen-temporaries-expected.txt:
  • fast/js/resources/codegen-temporaries.js:
11:58 PM Changeset in webkit [33918] by mrowe@apple.com
  • 21 edits
    1 copy
    3 adds in branches/squirrelfish

JavaScriptCore:

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

Reviewed by Oliver Hunt.

Behold: debugging.

SunSpider reports no change.

  • JavaScriptCore.xcodeproj/project.pbxproj: Added DebuggerCallFrame.h/.cpp, and created a debugger folder.
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::generate): If the debugger is attached, always generate full scope chains for its sake.
  • VM/Machine.cpp: (KJS::Machine::unwindCallFrame): Notify the debugger when unwinding due to an exception, so it doesn't keep stale call frames around.

(KJS::Machine::execute): Set Callee to 0 in eval frames, so the
debugger can distinguish them from function call frames.

(KJS::Machine::debug): Simplified this function, since the debugger
doesn't actually need all the information we used to provide.

(KJS::Machine::privateExecute): Treat debugging hooks like other function
calls, so the code we hook into (the debugger UI) can be optimized.

  • kjs/debugger.cpp: Nixed these default callback implementations and made the callbacks pure virtual instead, so the compiler could tell me if I made a mistake in one of the subclasses.
  • kjs/debugger.h: Removed a bunch of irrelevent data from the debugger callbacks. Changed from passing an ExecState* to passing a DebuggerCallFrame*, since an ExecState* doesn't contain sufficient information anymore.
  • kjs/function.cpp: (KJS::globalFuncEval): Easiest bug fix evar!

WebCore:

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

Reviewed by Oliver Hunt.

Updated for API changes in KJS::Debugger.

WebKit/mac:

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

Reviewed by Oliver Hunt.

Re-enabled previously disabled debugging functionality.

There are two major changes from how the WebKit debugger used to work:

(1) All the interesting bits are implemented down in JavaScriptCore. The
debugger just calls through to KJS::DebuggerCallFrame for everything.

(2) Instead of copyihng a pointer to an ExecState once, the debugger
copies the DebuggerCallFrame passed to it in each callback. This is
because the VM no longer maintains a fully transparent execution state
to which you can hold a pointer, and the DebuggerCallFrames it vends
are temporaries.

Also, we NULL out a WebScriptCallFrame's DebuggerCallFrame upon return
from its function. This is safer than the old method, which was to
hold a stale ExecState* and hope for the best.

11:58 PM Changeset in webkit [33917] by mrowe@apple.com
  • 10 edits in branches/squirrelfish

2008-05-17 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver.

Bug 18991: SquirrelFish: Major codegen issue in a.b=expr, a[b]=expr
<https://bugs.webkit.org/show_bug.cgi?id=18991>

Ensure that the code generated for assignments uses temporaries whenever
necessary. This patch covers the vast majority of situations, but there
are still a few left.

This patch also adds some missing cases to CodeBlock::dump().

JavaScriptCore:

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.h: (KJS::CodeGenerator::destinationForAssignResult): (KJS::CodeGenerator::leftHandSideNeedsCopy): (KJS::CodeGenerator::emitNodeForLeftHandSide):
  • kjs/NodeInfo.h:
  • kjs/grammar.y:
  • kjs/nodes.cpp: (KJS::AssignDotNode::emitCode): (KJS::ReadModifyDotNode::emitCode): (KJS::AssignBracketNode::emitCode): (KJS::ReadModifyBracketNode::emitCode): (KJS::ForInNode::ForInNode):
  • kjs/nodes.h: (KJS::ReadModifyResolveNode::): (KJS::AssignResolveNode::): (KJS::ReadModifyBracketNode::): (KJS::AssignBracketNode::): (KJS::AssignDotNode::): (KJS::ReadModifyDotNode::):

LayoutTests:

  • fast/js/codegen-temporaries-expected.txt:
  • fast/js/resources/codegen-temporaries.js:
11:58 PM Changeset in webkit [33916] by mrowe@apple.com
  • 1 edit
    2 adds in branches/squirrelfish/LayoutTests

Forgot to check in the results to the activation gc tests

11:58 PM Changeset in webkit [33915] by mrowe@apple.com
  • 3 edits
    4 adds in branches/squirrelfish

Bug 19106: SquirrelFish: Activation is not marked correctly
<https://bugs.webkit.org/show_bug.cgi?id=19106>

Reviewed by Maciej

We can't rely on the symbol table for a count of the number of globals
we need to mark as that misses duplicate parameters and 'this'. Now we
use the actual local register count from the codeBlock.

11:57 PM Changeset in webkit [33914] by mrowe@apple.com
  • 9 edits
    2 adds in branches/squirrelfish

Bug 19076: SquirrelFish: RegisterFile can be corrupted if implictly reenter global scope with no declared vars
<https://bugs.webkit.org/show_bug.cgi?id=19076>

Reviewed by Geoff

Don't delay allocation of initial global RegisterFile, as we can't guarantee we will be able
to allocate the global 'this' register safely at any point after initialisation of the Global
Object.

Unfortunately this initial allocation caused a regression of 0.2-0.3%, however this patch adds
support for the static slot optimisation for the global Math object which brings it to a 0.3%
progression.

11:57 PM Changeset in webkit [33913] by mrowe@apple.com
  • 3 edits
    3 adds in branches/squirrelfish

Bug 19098: SquirrelFish: Ref'd temporaries can be clobbered
<https://bugs.webkit.org/show_bug.cgi?id=19098>

Patch from Cameron Zwarich
Reviewed by Oliver

When doing code generation for a statement list, increase the reference
count on a register that might eventually be returned, so that it doesn't
get clobbered by a request for a new temporary.

11:57 PM Changeset in webkit [33912] by mrowe@apple.com
  • 3 edits
    6 adds in branches/squirrelfish

JavaScriptCore:

2008-05-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • kjs/JSActivation.cpp: (KJS::JSActivation::copyRegisters): Use numLocals from the code block rather than the size of the symbol table for the number of registers to copy, to account for duplicate parameters and vars with the same name as parameters (we still have potentially suboptimal codegen in that we allocate a local register for the var in the latter case but it is never used).

LayoutTests:

2008-05-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fast/js/duplicate-param-crash-expected.txt: Added.
  • fast/js/duplicate-param-crash.html: Added.
  • fast/js/resources/duplicate-param-crash.js: Added.
  • fast/js/resources/var-shadows-arg-crash.js: Added.
  • fast/js/var-shadows-arg-crash-expected.txt: Added.
  • fast/js/var-shadows-arg-crash.html: Added.
11:57 PM Changeset in webkit [33911] by mrowe@apple.com
  • 11 edits in branches/squirrelfish/JavaScriptCore

Revert "Bug 18626: SQUIRRELFISH: support the "slow script" dialog"

This seems to cause a significant perf regression on some systems

11:57 PM Changeset in webkit [33910] by mrowe@apple.com
  • 11 edits in branches/squirrelfish/JavaScriptCore

Bug 18626: SQUIRRELFISH: support the "slow script" dialog
<https://bugs.webkit.org/show_bug.cgi?id=18626>

Reviewed by Maciej

Support the slow script dialog for for(;;), while, and do..while
loops.

11:57 PM Changeset in webkit [33909] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Not reviewed.

We regret to inform you that your program is crashing because you were
stupid.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Math is hard.
11:57 PM Changeset in webkit [33908] by mrowe@apple.com
  • 10 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

A little more debugger action: filled in op_debug. All debugger control
flow works now, but variable inspection and backtraces still don't.

SunSpider reports no change.

  • VM/CodeGenerator.cpp: Changed op_debug to accept line number parameters.
  • VM/Machine.cpp: (KJS::Machine::getFunctionAndArguments): Moved op_debug into a NEVER_INLINE function to avoid a stunning 10% performance regression. Also factored out a common function for retrieving the function and arguments from a call frame.
  • kjs/JSActivation.cpp: (KJS::JSActivation::createArgumentsObject): Use the new factored out function mentioned above.
  • kjs/Parser.cpp: (KJS::Parser::parse): Increment m_sourceId before assigning it, so the sourceId we send to the debugger matches the sourceId recorded in the node.
  • kjs/nodes.cpp: Emit debugging hooks.
11:57 PM Changeset in webkit [33907] by mrowe@apple.com
  • 6 edits
    2 adds in branches/squirrelfish

Bug 19024: SQUIRRELFISH: ASSERTION FAILED: activation->isActivationObject() in Machine::unwindCallFrame
<https://bugs.webkit.org/show_bug.cgi?id=19024>

Reviewed by Maciej

This fixes a number of issues. The most important is that we now check every register
file for tainting rather than just looking for function register files as that was
insufficient. Additionally guarded against implicit re-entry into Eval code.

Also added a few additional assertions to reduce the amout of time between something
going wrong and us seeing the error.

11:57 PM Changeset in webkit [33906] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

A little more debugger action: emit opcodes for debugger hooks. Right
now, the opcode implementation is just a stub.

SunSpider reports no change.

Some example codegen for "function f() { 1; }":

[ 0] dbg DidEnterCallFrame
[ 2] dbg WillExecuteStatement
[ 4] load tr0, 1(@k0)
[ 7] load tr0, undefined(@k1)
[ 10] dbg WillLeaveCallFrame
[ 12] ret tr0

11:57 PM Changeset in webkit [33905] by mrowe@apple.com
  • 3 edits
    2 adds in branches/squirrelfish

Bug 19025: SQUIRRELFISH: malformed syntax in onload handler causes crash
<https://bugs.webkit.org/show_bug.cgi?id=19025>

Reviewed by Geoff

Simple fix -- move the use of functionBodyNode to after the null check.

11:57 PM Changeset in webkit [33904] by mrowe@apple.com
  • 3 edits
    1 copy
    2 adds in branches/squirrelfish/LayoutTests

Split the binops tests up a bit more

RS=Geoff

11:57 PM Changeset in webkit [33903] by mrowe@apple.com
  • 4 edits
    2 adds in branches/squirrelfish

JavaScriptCore:

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

Reviewed by Oliver Hunt.

Fixed a codegen crash with run-time parse errors.

SunSpider reports no change.

emitThrowError needs to return the temporary holding the error, not dst,
since dst may be NULL. In fact, emitThrowError shouldn't take a dst
parameter at all, since exceptions should not modify the destination
register.

LayoutTests:

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

Reviewed by Oliver Hunt.

Added layout test for a codegen crash with run-time parse errors.

  • fast/js/exception-codegen-crash-expected.txt: Added.
  • fast/js/exception-codegen-crash.html: Added.
11:57 PM Changeset in webkit [33902] by mrowe@apple.com
  • 3 edits
    1 copy
    1 add in branches/squirrelfish/LayoutTests

Splitting exception sequencing test as it was too long and made DRT unhappy
on non-MacPros.

RS=Geoff

11:57 PM Changeset in webkit [33901] by mrowe@apple.com
  • 10 edits in branches/squirrelfish

Bug 19027: SquirrelFish: Incorrect codegen for pre-increment
<https://bugs.webkit.org/show_bug.cgi?id=19027>

Reviewed by Geoff

This fixes the codegen issues for the pre-inc/decrement operators
to prevent incorrectly clobbering the destination in the event of
an exception.

11:57 PM Changeset in webkit [33900] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

A little more debugger action: supply a real line number, sourceId,
and sourceURL in op_new_error.

SunSpider reports a .2% speedup. Not sure what that's about.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Use the new good stuff in op_new_error.
  • kjs/nodes.cpp: (KJS::RegExpNode::emitCode): Use the shared emitThrowError instead of rolling our own.
11:57 PM Changeset in webkit [33899] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

A little more debugger action: implemented the exception callback.

SunSpider reports a .2% speedup. Not sure what that's about.

  • VM/CodeBlock.h: A little refactoring here. Store a pointer to our owner ScopeNode so we can retrieve data from it. This allows us to stop storing copies of the data ourselves. Also, store a "this" register instead of a code type, since we were only using the code type to calculate the "this" register.
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::generate): Calculate the "this" register mentioned above. Also, take care of removing "this" from the symbol table after codegen is done, since relying on the timing of a destructor for correct behavior is not so good.
  • VM/Machine.cpp: (KJS::Machine::throwException): Invoke the debugger's exception callback. (KJS::Machine::privateExecute): Use the "this" register mentioned above.
11:57 PM Changeset in webkit [33898] by mrowe@apple.com
  • 16 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Removed some unused exception machinery.

SunSpider reports a .3% speedup.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:
  • JavaScriptCore.exp:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/internal.cpp:
  • kjs/object.cpp:
  • kjs/object.h:
  • kjs/value.h:
11:57 PM Changeset in webkit [33897] by mrowe@apple.com
  • 12 edits in branches/squirrelfish

JavaScriptCore:

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

Reviewed by Oliver Hunt.

A little more debugger action.

  • kjs/debugger.cpp:
  • kjs/debugger.h: Removed debuggersPresent because it was unused. Replaced AttachedGlobalObject linked list with a HashSet because HashSet is faster and simpler. Changed all functions to return void instead of bool, because no clients ever return false, and we don't want to support it.
  • kjs/nodes.cpp: Did some up-keep to avoid build bustage. (KJS::Node::handleException): (KJS::BreakpointCheckStatement::execute): (KJS::FunctionBodyNodeWithDebuggerHooks::execute):

WebCore:

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

Reviewed by Oliver Hunt.

Updated for API changes in KJS::Debugger.

  • page/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::callEvent): (WebCore::JavaScriptDebugServer::atStatement): (WebCore::JavaScriptDebugServer::returnEvent): (WebCore::JavaScriptDebugServer::exception):
  • page/JavaScriptDebugServer.h:

WebKit/mac:

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

Reviewed by Oliver Hunt.

Updated for API changes in KJS::Debugger.

  • WebView/WebFrame.mm: (-[WebFrame _attachScriptDebugger]): Changed the order of operations to fix an ASSERT that can happen when re-entering _attachScriptDebugger.
11:57 PM Changeset in webkit [33896] by mrowe@apple.com
  • 5 edits
    2 adds in branches/squirrelfish

Bug 18752: SQUIRRELFISH: exceptions are not always handled by the vm
<https://bugs.webkit.org/show_bug.cgi?id=18752>

Reviewed by Darin

Replace old attempt at "branchless" exceptions as the extra information
being passed made gcc an unhappy compiler, replacing these custom toNumber
calls with ordinary toNumber logic (by relying on toNumber now preventing
side effects after an exception has been thrown) provided sufficient leeway
to add the additional checks for the remaining unchecked cases.

This leaves only toString conversions in certain contexts as possibly
misbehaving.

11:57 PM Changeset in webkit [33895] by mrowe@apple.com
  • 27 edits in branches/squirrelfish

JavaScriptCore:

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

Reviewed by Oliver Hunt.

First steps toward supporting the debugger API: support the sourceParsed
callback; plus some minor fixups.

SunSpider reports no regression.

  • VM/CodeGenerator.h: Removed a misleading comment.
  • kjs/Parser.h: Changed the parser to take an ExecState*, so it can implement the sourceParsed callback -- that way, we only have to implement the callback in one place.
  • kjs/debugger.cpp: Nixed DebuggerImp, because its sole purpose in life was to demonstrate the misapplication of design patterns.
  • kjs/debugger.h: Changed sourceParsed to take a SourceProvider, to reduce copying, and not to return a value, because pausing execution after parsing is complicated, and no clients needed that ability, anyway.
  • kjs/grammar.y: Make sure never to pass a NULL SourceElements* to didFinishParsing -- that simplifies some code down the road.
  • kjs/nodes.cpp: Don't generate special AST nodes just because the debugger is attached -- that's a relic of the old AST execution model, and those nodes haven't been maintained.

WebCore:

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

Reviewed by Oliver Hunt.

Updated JavaScriptDebugServer API to accept a SourceProvider instead
of a UString, to avoid copying.

  • page/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::sourceParsed): Updated this function not to return a value.

WebKit/mac:

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

Reviewed by Oliver Hunt.

Updated WebScriptDebugger API to accept a SourceProvider instead
of a WebCore::String, to avoid copying.

(WebScriptDebugger::sourceParsed): Updated this function not to return
a value.

WebKit/win:

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

Reviewed by Oliver Hunt.

Updated for new JS debugging APIs.

  • WebScriptDebugServer.cpp: (WebScriptDebugServer::didParseSource): (WebScriptDebugServer::failedToParseSource):
  • WebScriptDebugServer.h:
11:56 PM Changeset in webkit [33894] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/LayoutTests

2008-05-13 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

Update results for remainder of split-window merge. The new results are correct.

  • http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-JSTargetNode-onclick-shortcut-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-addEventListener-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-shortcut-expected.txt:
  • http/tests/security/listener/xss-window-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-window-onclick-shortcut-expected.txt:
11:56 PM Changeset in webkit [33893] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

Bug 18752: SQUIRRELFISH: exceptions are not always handled by the vm
<https://bugs.webkit.org/show_bug.cgi?id=18752>

Reviewed by Geoff

First step: prevent incorrect evaluation of valueOf/toString conversion
in right hand side of expression after earlier conversion throws.

11:56 PM Changeset in webkit [33892] by mrowe@apple.com
  • 5 edits
    3 adds in branches/squirrelfish

Bug 18934: SQUIRRELFISH: ASSERT @ nytimes.com due to RegisterFile being clobbered
<https://bugs.webkit.org/show_bug.cgi?id=18934>

Reviewed by Geoff

Unfortunately we cannot create new statically optimised globals if there are any
tainted RegisterFiles on the RegisterFileStack. To handle this we re-introduce
(in a slightly cleaner form) the inImplicitCall concept to the RegisterFileStack.

11:56 PM Changeset in webkit [33891] by mrowe@apple.com
  • 5 edits
    2 adds in branches/squirrelfish

JavaScriptCore:

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

Reviewed by Maciej Stachowiak.

Introduced support for function.caller.

Improved support for walking interesting scopes for function introspection.

This fixes all remaining layout tests not blocked by rebasing to trunk.

SunSpider reports no change.

  • VM/Machine.cpp: (KJS::Machine::dumpRegisters): Fixed a spacing issue.

LayoutTests:

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

Reviewed by Maciej Stachowiak.

Layout test for function.arguments and function.caller in interesting
scopes.

  • fast/js/function-dot-arguments-and-caller-expected.txt: Added.
  • fast/js/function-dot-arguments-and-caller.html: Added.
11:56 PM Changeset in webkit [33890] by mrowe@apple.com
  • 3 edits
    3 adds in branches/squirrelfish

2008-05-11 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver.

Bug 18961: SQUIRRELFISH: Gmail doesn't load
<https://bugs.webkit.org/show_bug.cgi?id=18961>

Fix codegen for logical nodes so that they don't use their destination
as a temporary.

  • kjs/nodes.cpp: (KJS::LogicalAndNode::emitCode): (KJS::LogicalOrNode::emitCode):
  • fast/js/codegen-temporaries-expected.txt: Added.
  • fast/js/codegen-temporaries.html: Added.
  • fast/js/resources/codegen-temporaries.js: Added.
11:56 PM Changeset in webkit [33889] by mrowe@apple.com
  • 1 edit
    1 add in branches/squirrelfish/WebCore

2008-05-10 Maciej Stachowiak <mjs@apple.com>

Build fix.

  • add missing forwarding header
  • ForwardingHeaders/kjs/SourceProvider.h: Added.
11:56 PM Changeset in webkit [33888] by mrowe@apple.com
  • 38 edits
    3 copies in branches/squirrelfish

JavaScriptCore:

2008-05-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

Three layout tests are fixed:

fast/js/toString-elision-trailing-comma.html
fast/js/toString-prefix-postfix-preserve-parens.html
fast/js/kde/lval-exceptions.html

Functions now save a shared subrange of the original source used
to make them (so in the common case this adds no storage above the
memory cache).

  • kjs/SourceProvider.h: Added. (KJS::SourceProvider): New abstract base class for classes that provide on-demand access to the source for a JavaScript program. This allows function objects to have access to their original source without copying. (KJS::UStringSourceProvider): SourceProvider subclass backed by a KJS::UString. (KJS::UStringSourceProvider::create): (KJS::UStringSourceProvider::getRange): (KJS::UStringSourceProvider::data): (KJS::UStringSourceProvider::length): (KJS::UStringSourceProvider::UStringSourceProvider):
  • kjs/SourceRange.h: Added. (KJS::SourceRange::SourceRange): Class that holds a SourceProvider and a character range into the source, to encapsulate on-demand access to the source of a function. (KJS::SourceRange::toString):
  • VM/Machine.cpp: (KJS::eval): Pass a UStringSourceProvider to the parser.
  • kjs/Parser.cpp: (KJS::Parser::parse): Take a SourceProvider and pass it on to the lexer.
  • kjs/Parser.h: (KJS::Parser::parse): Take a SourceProvider.
  • kjs/lexer.cpp: (KJS::Lexer::setCode): Take a SourceProvider; keep it around, and use it to get the raw buffer and length.
  • kjs/lexer.h: (KJS::Lexer::sourceRange): Convenience function to get a source range based on the lexer's source provieder, and char offsets right before and after the desired range.
  • kjs/function.cpp: (KJS::globalFuncEval): Pass a UStringSourceProvider to the parser.
  • kjs/function_object.cpp: (KJS::functionProtoFuncToString): Use toSourceString to get the source. (KJS::FunctionObjectImp::construct): Give the parser a UStringSourceProvider.
  • kjs/grammar.y: When parsing a function declaration, function expression, or getter or setter, tell the function body about its SourceRange.
  • kjs/interpreter.cpp: (KJS::Interpreter::checkSyntax): Pass a SourceProvider to the parser. (KJS::Interpreter::evaluate): Pass a SourceProvider to the parser.
  • kjs/interpreter.h:
  • kjs/nodes.h: (KJS::FunctionBodyNode::setSource): Establish a SourceRange for this function. (KJS::FunctionBodyNode::toSourceString): Get the source string out of the SourceRange. (KJS::FuncExprNode::): Take a SourceRange and set it on the body. (KJS::FuncDeclNode::): ditto
  • kjs/testkjs.cpp: (prettyPrintScript): Use a SourceProvider appropriately.
  • JavaScriptCore.exp: Export new symbols.
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add new files.
  • JavaScriptCore.xcodeproj/project.pbxproj: Add new files.

JavaScriptGlue:

2008-05-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • JSRun.cpp: (JSRun::Evaluate): Use UString version of eveluate() instead of the now departed UChar*/length variant; use of the lower-level version was gratuitous in any case. (JSRun::CheckSyntax): Ditto for checkSyntax().

WebCore:

2008-05-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • bindings/js/StringSourceProvider.h: Added. SourceProvider subclass backed by a WebCore::String. (WebCore::StringSourceProvider::create): (WebCore::StringSourceProvider::getRange): (WebCore::StringSourceProvider::data): (WebCore::StringSourceProvider::length): (WebCore::StringSourceProvider::StringSourceProvider):
  • bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate): Pass a StringSourceProvider to evaluate() instead of UChar* / length.
  • html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::text): Modified to return the original string as-is when the script element contains only a single text node, to avoid excess memory use.
  • WebCore.vcproj/WebCore.vcproj: Add new file to build.
  • WebCore.xcodeproj/project.pbxproj: ditto

LayoutTests:

2008-05-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

All of these tests expected function.toString to somewhat change
things from the raw original source. They are now prepared for the
fact that this does not happen.

  • fast/js/function-decompilation-operators.html:
  • fast/js/function-names-expected.txt:
  • fast/js/function-prototype-expected.txt:
  • fast/js/function-prototype.html:
  • fast/js/function-toString-object-literals-expected.txt:
  • fast/js/function-toString-parentheses-expected.txt:
  • fast/js/kde/lval-exceptions-expected.txt:
  • fast/js/modify-non-references-expected.txt:
  • fast/js/resources/function-names.js:
  • fast/js/resources/function-toString-object-literals.js:
  • fast/js/resources/function-toString-parentheses.js:
  • fast/js/resources/modify-non-references.js:
  • fast/js/resources/toString-prefix-postfix-preserve-parens.js:
  • fast/js/toString-prefix-postfix-preserve-parens-expected.txt:
11:56 PM Changeset in webkit [33887] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

Bring back RegisterFile tainting in order to correctly handle
natively implemented getters and setters that re-enter JavaScript

Reviewed by Maciej

11:56 PM Changeset in webkit [33886] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-05-09 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • track character offsets of open and close braces, in preparation for saving function source

I verified that there is no performance regression from this change.

  • kjs/grammar.y:
  • kjs/lexer.cpp: (KJS::Lexer::lex): (KJS::Lexer::matchPunctuator):
  • kjs/lexer.h:
11:56 PM Changeset in webkit [33885] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Debug build fix

No reviewer

11:56 PM Changeset in webkit [33884] by mrowe@apple.com
  • 11 edits in branches/squirrelfish

Build fixes for SquirrelFish on windows.

Reviewed by Geoff

11:56 PM Changeset in webkit [33883] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/LayoutTests

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

Reviewed by Sam Weinig.

Restored the expected results for viewsource-empty-attribute-value.html
to what they were prior to r31100. These results expect that the
top-level name in the frame path is "" instead of "1".

It's not clear how r31100 changed the top-level frame in the frame path
to be named "1". The change definitely wasn't related to any expected
behavior in r31100, which was about default margin-bottom for form
elements in quirks mode.

It's also not clear how squirrelfish changes things back.

Sam mentioned that the test result changes intermittently on trunk.

For now, I don't think we need to think deeply about this issue,
since the "" result seems more correct than the "1" result.

  • fast/frames/viewsource-empty-attribute-value-expected.txt:
11:56 PM Changeset in webkit [33882] by mrowe@apple.com
  • 1 edit
    1 add in branches/squirrelfish/LayoutTests

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

Added expected results for this test.

  • fast/js/closure-inside-extra-arg-call-expected.txt: Added.
11:56 PM Changeset in webkit [33881] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/WebCore

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

Reviewed by Oliver Hunt.

Fixed platform/mac/plugins/bindings-test-objc.html.

I've restored -[WebScriptObject setException] and
+[WebScriptObject throwException].

Instead of mucking around in the JavaScript engine's execution state,
throwing an exception sets a global exception string, along with the
environment in which to throw it. An ObjC callback checks the global
exception string and, if it's non-nil and the environment matches the
current exceution environment, throws the global exception string as a
JS exception.

I also removed the old currentGlobalObject infrastructure: it's no longer
used.

11:56 PM Changeset in webkit [33880] by mrowe@apple.com
  • 3 edits
    2 adds in branches/squirrelfish

JavaScriptCore:

2008-05-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • fix activation tearoff in the case where functions are called with too many arguments

Fixes:
fast/canvas/patternfill-repeat.html
fast/dom/SelectorAPI/bug-17313.html

  • VM/Machine.cpp: (KJS::slideRegisterWindowForCall): (KJS::scopeChainForCall): (KJS::Machine::execute): (KJS::Machine::privateExecute):

LayoutTests:

2008-05-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

Add test cases for failures similar to the SquirrelFish failure on
fast/dom/SelectorAPI/bug-17313.html

  • fast/js/closure-inside-extra-arg-call.html: Added.
  • fast/js/resources/closure-inside-extra-arg-call.js: Added.
11:56 PM Changeset in webkit [33879] by mrowe@apple.com
  • 4 edits
    4 adds in branches/squirrelfish

JavaScriptCore:

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

Reviewed by Oliver Hunt.

Fixed failure in fast/canvas/canvas-pattern-behaviour.html.

SunSpider reports a small speedup. Not sure what that's about.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump): Fixed op_call_eval to dump as "op_call_eval". This helped me while debugging.
  • VM/Machine.cpp: (KJS::Machine::unwindCallFrame): When looking for an activation to tear off, don't use the scope chain. Inside eval, the scope chain doesn't belong to us; it belongs to our calling function.

Also, don't use the needsFullScopeChain flag to decide whether to tear
off the activation. "function.arguments" can create an activation
for a function whose needsFullScopeChain flag is set to false.

LayoutTests:

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

Reviewed by Oliver Hunt.

Added specific test cases for the root cause of squirrelfish's failure
in fast/canvas/canvas-pattern-behaviour.html.

  • fast/js/exception-thrown-from-eval-inside-closure-expected.txt: Added.
  • fast/js/exception-thrown-from-eval-inside-closure.html: Added.
  • fast/js/exception-thrown-from-function-with-lazy-activation-expected.txt: Added.
  • fast/js/exception-thrown-from-function-with-lazy-activation.html: Added.
11:56 PM Changeset in webkit [33878] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/LayoutTests

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

Reviewed by Sam Weinig.

Updated test results to reflect correct behavior: The line number in
the old results was off by 2.

  • fast/js/recursion-limit-equal-expected.txt:
11:56 PM Changeset in webkit [33877] by mrowe@apple.com
  • 2 edits
    2 moves
    6 deletes in branches/squirrelfish/LayoutTests

2008-05-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • move frame.xhtml and iframe.xhtml into a resources dir, as they were never meant to be tests
  • dom/xhtml/level2/html/HTMLFrameElement09.xhtml-disabled:
  • dom/xhtml/level2/html/frame.xhtml: Removed.
  • dom/xhtml/level2/html/iframe.xhtml: Removed.
  • dom/xhtml/level2/html/resources/frame.xhtml: Copied from dom/xhtml/level2/html/frame.xhtml.
  • dom/xhtml/level2/html/resources/iframe.xhtml: Copied from dom/xhtml/level2/html/iframe.xhtml.
  • platform/mac/dom/xhtml/level2/html/frame-expected.checksum: Removed.
  • platform/mac/dom/xhtml/level2/html/frame-expected.png: Removed.
  • platform/mac/dom/xhtml/level2/html/frame-expected.txt: Removed.
  • platform/mac/dom/xhtml/level2/html/iframe-expected.checksum: Removed.
  • platform/mac/dom/xhtml/level2/html/iframe-expected.png: Removed.
  • platform/mac/dom/xhtml/level2/html/iframe-expected.txt: Removed.
11:56 PM Changeset in webkit [33876] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix function.call for calls of more than 8 arguments

Fixes svg/carto.net/button.svg

  • kjs/list.cpp: (KJS::List::getSlice): properly set up the m_buffer of the target list.
11:55 PM Changeset in webkit [33875] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • don't return a null RegisterID from RegExpNode in the exception case, since the caller may need a real register

Fixes:

  • fast/regex/early-acid3-86.html
  • http/tests/misc/acid3.html
  • kjs/nodes.cpp: (KJS::RegExpNode::emitCode):
11:55 PM Changeset in webkit [33874] by mrowe@apple.com
  • 13 edits
    2 adds in branches/squirrelfish/LayoutTests

o2008-05-07 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Added this test to demonstrate that, for "f(x)", it is correct to evaluate
"x" even if "f" is not a function, and therefore "f(x)" will throw an exception.

  • fast/js/function-argument-evaluation-before-exception-expected.txt: Added.
  • fast/js/function-argument-evaluation-before-exception.html: Added.

These tests now have an extra "access denied" message in them, because
of the behavior change mentioned above.

I also added try/catch clauses to eliminate the "is not object"
exception messages from the test output.

  • http/tests/security/listener/resources/targetChild-JSTargetNode-onclick-addEventListener.html:
  • http/tests/security/listener/resources/targetChild-JSTargetNode-onclick-shortcut.html:
  • http/tests/security/listener/resources/targetChild-XMLHttpRequest-addEventListener.html:
  • http/tests/security/listener/resources/targetChild-XMLHttpRequest-shortcut.html:
  • http/tests/security/listener/resources/targetChild-window-onclick-addEventListener.html:
  • http/tests/security/listener/resources/targetChild-window-onclick-shortcut.html:
  • http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-JSTargetNode-onclick-shortcut-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-addEventListener-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-shortcut-expected.txt:
  • http/tests/security/listener/xss-window-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-window-onclick-shortcut-expected.txt:
11:55 PM Changeset in webkit [33873] by mrowe@apple.com
  • 11 edits in branches/squirrelfish/LayoutTests

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

Reviewed by Oliver Hunt.

Fixed up a few more tests that depended on the exact text of exception
messages.

  • In these tests, I fixed a bug in frame.html and iframe.html that caused a function to execute too many times.
  • dom/html/level2/html/HTMLFrameElement09-expected.txt:
  • dom/html/level2/html/HTMLIFrameElement11-expected.txt:
  • dom/html/level2/html/resources/frame.html:
  • dom/html/level2/html/resources/iframe.html:
  • I changed these tests to explicitly report exceptions, so their results don't depend on how the engine constructs messages for implicit exceptions:
  • dom/xhtml/level2/html/HTMLDocument17-expected.txt:
  • dom/xhtml/level2/html/HTMLDocument18-expected.txt:
  • dom/xhtml/level2/html/HTMLDocument19-expected.txt:
  • dom/xhtml/level2/html/HTMLDocument20-expected.txt:
  • dom/xhtml/level2/html/HTMLDocument21-expected.txt:
  • dom/xhtml/level2/html/selfxhtml.js:
11:55 PM Changeset in webkit [33872] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

Partial fix for current performance regressions.

Patch from Cameron Zwarich
Reviewed by Oliver

Fix a performance regression caused by the introduction of property
attributes to SymbolTable in r32859 by encoding the attributes and the
register index into a single field of SymbolTableEntry.

This leaves Node::optimizeVariableAccess() definitely broken, although
it was probably not entirely correct in SquirrelFish before this change.

11:55 PM Changeset in webkit [33871] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-06 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Oliver.

  • add missing ! in an assert that I failed to reverse
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::CodeGenerator):
11:55 PM Changeset in webkit [33870] by mrowe@apple.com
  • 282 edits in branches/squirrelfish/LayoutTests

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

Reviewed by Oliver Hunt.

To facilitate merging between the squirrelfish branch and trunk, I
edited a bunch of layout tests to make sure their results don't depend
on the exact text of an exception message generated by the JavaScript engine.

(We do want to test JavaScript exception messages -- we just don't want
to test them 300 times over, in tests that aren't supposed to be about
JavaScript at all.)

  • I fixed bugs that were causing these tests to throw exceptions by accident, and updated results to reflect correct behavior:
  • editing/selection/contenteditable-click-inside.html:
  • platform/mac/editing/selection/contenteditable-click-inside-expected.checksum:
  • platform/mac/editing/selection/contenteditable-click-inside-expected.png:
  • platform/mac/editing/selection/contenteditable-click-inside-expected.txt:
  • editing/selection/contenteditable-click-outside.html:
  • platform/mac/editing/selection/contenteditable-click-outside-expected.checksum:
  • platform/mac/editing/selection/contenteditable-click-outside-expected.png:
  • platform/mac/editing/selection/contenteditable-click-outside-expected.txt:
  • fast/forms/selected-index-assert.html:
  • fast/forms/selected-index-assert-expected.txt:
  • tables/mozilla_expected_failures/core/captions1.html:
  • platform/mac/tables/mozilla_expected_failures/core/captions1-expected.txt:
  • I changed these tests to explicitly throw/report exceptions, so their results don't depend on how the engine constructs messages for implicit exceptions:
  • fast/xpath/nsresolver-exception.xhtml:
  • fast/xpath/nsresolver-exception-expected.txt:
  • platform/mac/fast/AppleScript/001.html:
  • platform/mac/fast/AppleScript/001-expected.txt:
  • dom/xhtml/level3/core/selfxhtml.js
  • dom/xhtml/level3/core/*expected.txt (about 280 of these changed)
11:54 PM Changeset in webkit [33869] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-05-06 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

The basic approach is to have "this" only be present in the symbol
table at compile time, not runtime.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::~CodeGenerator): Remove "this" from symbol table. (KJS::CodeGenerator::CodeGenerator): Add "this" back when re-using a symbol table.
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::execute): Don't assert that "this" is in the symbol table.
11:54 PM Changeset in webkit [33868] by mrowe@apple.com
  • 12 edits in branches/squirrelfish/WebCore

Bug 18866: SQUIRRELFISH: JS/ObjC bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18866>
Bug 18867: SQUIRRELFISH: JS/NPRuntime bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18867>

Reviewed by Maciej

This fixes function binding logic for the ObjC and NPRuntime by
replacing incorrect implementations of implementsCall (which is
no longer virtual) with implementations of getCallData.

11:54 PM Changeset in webkit [33867] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Trivial support for function.arguments: Currently, we only support
function.arguments from within the scope of function.

This fixes the remaining Mozilla JS test failures.

SunSpider reports no change.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Separated scope chain deref from activation register copying: since it is now possible for client code to create an activation on behalf of a function that otherwise wouldn't need one, having an activation no longer necessarily means that you need to deref the scope chain.

(KJS::Machine::getCallFrame): For now, this function only examines the
current scope. Walking parent scopes requires some refactoring in the
way we track execution stacks.

  • kjs/ExecState.cpp: (KJS::ExecState::ExecState): We use a negative call frame offset to indicate that a given scope is not a function call scope.
11:54 PM Changeset in webkit [33866] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Fix call frame set up for native -> JS function calls.

Review by Geoff

11:54 PM Changeset in webkit [33865] by mrowe@apple.com
  • 8 edits
    2 adds in branches/squirrelfish

JavaScriptCore:

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

Reviewed by Maciej Stachowiak.

Fixed ecma_3/Object/8.6.2.6-001.js, and similar bugs.

SunSpider reports a .4% speedup. Not sure what that's about.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Check for exception return from equal, since toPrimitive can throw.
  • kjs/operations.cpp: (KJS::strictEqual): In response to an error I made in an earlier version of this patch, I changed strictEqual to make clear the fact that it performs no conversions and can't throw, making it slightly more efficient in the process.

LayoutTests:

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

Reviewed by Maciej Stachowiak.

Layout test for exceptions thrown from equality comparisons.

  • fast/js/exception-thrown-from-equal-expected.txt: Added.
  • fast/js/exception-thrown-from-equal.html: Added.
11:54 PM Changeset in webkit [33864] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-05-05 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix some dumb mistakes in my last patch
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitPushScope): (KJS::CodeGenerator::emitGetPropertyNames):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:54 PM Changeset in webkit [33863] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-05-05 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • document opcodes relating to jumps, scopes, and property name iteration

Documented jmp, jtrue, false, push_scope, pop_scope, get_pnames,
next_pname and jmp_scopes.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitJump): (KJS::CodeGenerator::emitJumpIfTrue): (KJS::CodeGenerator::emitJumpIfFalse): (KJS::CodeGenerator::emitPushScope): (KJS::CodeGenerator::emitNextPropertyName): (KJS::CodeGenerator::emitGetPropertyNames):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/nodes.cpp: (KJS::LogicalAndNode::emitCode): (KJS::LogicalOrNode::emitCode): (KJS::ConditionalNode::emitCode): (KJS::IfNode::emitCode): (KJS::IfElseNode::emitCode): (KJS::DoWhileNode::emitCode): (KJS::WhileNode::emitCode): (KJS::ForNode::emitCode): (KJS::ForInNode::emitCode): (KJS::WithNode::emitCode):
11:54 PM Changeset in webkit [33862] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

Bug 18749: SQUIRRELFISH: const support is broken
<https://bugs.webkit.org/show_bug.cgi?id=18749>

Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver.

Adds support for const during code generation.

Fixes 2 layout tests.

11:54 PM Changeset in webkit [33861] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-05-04 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • document some more opcodes (and fix argument names)

Added docs for eq, neq, stricteq, nstriceq, less and lesseq.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitEqual): (KJS::CodeGenerator::emitNotEqual): (KJS::CodeGenerator::emitStrictEqual): (KJS::CodeGenerator::emitNotStrictEqual): (KJS::CodeGenerator::emitLess): (KJS::CodeGenerator::emitLessEq):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/nodes.cpp: (KJS::LessNode::emitCode): (KJS::GreaterNode::emitCode): (KJS::LessEqNode::emitCode): (KJS::GreaterEqNode::emitCode): (KJS::EqualNode::emitCode): (KJS::NotEqualNode::emitCode): (KJS::StrictEqualNode::emitCode): (KJS::NotStrictEqualNode::emitCode): (KJS::CaseBlockNode::emitCodeForBlock):
11:54 PM Changeset in webkit [33860] by mrowe@apple.com
  • 10 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

More scaffolding for f.arguments.

Track the offset of the last call frame in the ExecState, so we can
produce a backtrace at any time.

Also, record numLocals, the sum of numVars + numParameters, in each code
block, to make updates to the ExecState a little cheaper than they
would be otherwise.

We now use numLocals in a bunch of places where we used to calculate
numVars + numParameters or -numVars - numParameters.

Reports are mixed, but all in all, this seems to be a wash on SunSpider.

11:54 PM Changeset in webkit [33859] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Whoops, correctly handle properties that don't exist in the
symbol table.

Reviewed by Geoff

11:54 PM Changeset in webkit [33858] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Add attribute information to SymbolTable as ground work for
various DontEnum and ReadOnly issues.

Reviewed by Geoff

11:54 PM Changeset in webkit [33857] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

More scaffolding for f.arguments.

Store the register file associated with an ExecState in the ExecState.

SunSpider reports no change.

  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): Moved registerFileStack above globalExec, so it gets initialized first. Removed remnants of old activation scheme.
11:54 PM Changeset in webkit [33856] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-05-04 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Oliver.

  • renamed a few opcodes and fixed assembly formatting to accomodate the longest opcode

equal --> eq
nequal --> neq
resolve_base_and_property --> resolve_with_base
resolve_base_and_func --> resolve_func
get_prop_id --> get_by_id
put_prop_id --> put_by_id
delete_prop_id --> del_by_id
get_prop_val --> get_by_val
put_prop_val --> put_by_val
delete_prop_val --> del_by_val
put_prop_index --> put_by_index

  • VM/CodeBlock.cpp: (KJS::printUnaryOp): (KJS::printBinaryOp): (KJS::printConditionalJump): (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitEqual): (KJS::CodeGenerator::emitNotEqual): (KJS::CodeGenerator::emitResolveWithBase): (KJS::CodeGenerator::emitResolveFunction): (KJS::CodeGenerator::emitGetById): (KJS::CodeGenerator::emitPutById): (KJS::CodeGenerator::emitDeleteById): (KJS::CodeGenerator::emitGetByVal): (KJS::CodeGenerator::emitPutByVal): (KJS::CodeGenerator::emitDeleteByVal): (KJS::CodeGenerator::emitPutByIndex):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::ArrayNode::emitCode): (KJS::PropertyListNode::emitCode): (KJS::BracketAccessorNode::emitCode): (KJS::DotAccessorNode::emitCode): (KJS::EvalFunctionCallNode::emitCode): (KJS::FunctionCallResolveNode::emitCode): (KJS::FunctionCallBracketNode::emitCode): (KJS::FunctionCallDotNode::emitCode): (KJS::PostIncResolveNode::emitCode): (KJS::PostDecResolveNode::emitCode): (KJS::PostIncBracketNode::emitCode): (KJS::PostDecBracketNode::emitCode): (KJS::PostIncDotNode::emitCode): (KJS::PostDecDotNode::emitCode): (KJS::DeleteResolveNode::emitCode): (KJS::DeleteBracketNode::emitCode): (KJS::DeleteDotNode::emitCode): (KJS::TypeOfResolveNode::emitCode): (KJS::PreIncResolveNode::emitCode): (KJS::PreDecResolveNode::emitCode): (KJS::PreIncBracketNode::emitCode): (KJS::PreDecBracketNode::emitCode): (KJS::PreIncDotNode::emitCode): (KJS::PreDecDotNode::emitCode): (KJS::ReadModifyResolveNode::emitCode): (KJS::AssignResolveNode::emitCode): (KJS::AssignDotNode::emitCode): (KJS::ReadModifyDotNode::emitCode): (KJS::AssignBracketNode::emitCode): (KJS::ReadModifyBracketNode::emitCode): (KJS::ConstDeclNode::emitCodeSingle): (KJS::ForInNode::emitCode): (KJS::TryNode::emitCode):
11:54 PM Changeset in webkit [33855] by mrowe@apple.com
  • 3 edits
    3 adds in branches/squirrelfish

Fix assertion when accessing arguments object with too many arguments provided

Reviewed by Maciej

The arguments constructor was assuming that the register offset given for argv
was an absolute offset into the registerfile, rather than the offset from the
frame. This patches corrects that issue.

11:54 PM Changeset in webkit [33854] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Rubber stamped by Sam Weinig.

Cleaned up Machine.cpp according to our style guidelines: moved static
data to the top of the file; moved stand-alone functions below that;
moved the Machine constructor above other Machine member functions.

11:54 PM Changeset in webkit [33853] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-03 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • fix accidental breakage from last patch
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:54 PM Changeset in webkit [33852] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-05-03 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • a bunch more opcode documentation and corresponding parameter name fixes

I renamed a few opcodes:

type_of --> typeof (that's what the JS operator is named)
instance_of --> instanceof (ditto)
create_error --> new_error (for consistency with other new_* opcodes)

I documented the following opcodes:

  • load
  • new_object
  • new_array
  • new_regexp
  • mov
  • pre_inc
  • pre_dec
  • post_inc
  • post_dec
  • to_jsnumber
  • negate
  • bitnot
  • not
  • instanceof
  • typeof
  • in
  • new_func
  • new_funcexp
  • new_error

I also fixed formatting on some existing opcode docs.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitMove): (KJS::CodeGenerator::emitNot): (KJS::CodeGenerator::emitPreInc): (KJS::CodeGenerator::emitPreDec): (KJS::CodeGenerator::emitPostInc): (KJS::CodeGenerator::emitPostDec): (KJS::CodeGenerator::emitToJSNumber): (KJS::CodeGenerator::emitNegate): (KJS::CodeGenerator::emitBitNot): (KJS::CodeGenerator::emitInstanceOf): (KJS::CodeGenerator::emitTypeOf): (KJS::CodeGenerator::emitIn): (KJS::CodeGenerator::emitLoad): (KJS::CodeGenerator::emitNewObject): (KJS::CodeGenerator::emitNewArray): (KJS::CodeGenerator::emitNewRegExp): (KJS::CodeGenerator::emitNewError):
  • VM/CodeGenerator.h: (KJS::CodeGenerator::scopeDepth): (KJS::CodeGenerator::addVar):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::Node::emitThrowError): (KJS::RegExpNode::emitCode): (KJS::TypeOfValueNode::emitCode): (KJS::UnaryPlusNode::emitCode): (KJS::NegateNode::emitCode): (KJS::BitwiseNotNode::emitCode): (KJS::LogicalNotNode::emitCode): (KJS::InstanceOfNode::emitCode): (KJS::InNode::emitCode):
11:54 PM Changeset in webkit [33851] by mrowe@apple.com
  • 2 edits
    2 adds in branches/squirrelfish/JavaScriptCore

2008-05-03 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff and Sam.

  • generate HTML bytecode docs at build time
  • DerivedSources.make:
  • docs: Added.
  • docs/make-bytecode-docs.pl: Added.
11:54 PM Changeset in webkit [33850] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Update ExecState::m_scopeChain when switching scope chains inside the
machine.

This fixes uses of lexicalGlobalObject, such as, in a subframe

alert(top.makeArray() instanceof Array ? "FAIL" : "PASS");

and a bunch of the security failures listed in
https://bugs.webkit.org/show_bug.cgi?id=18870. (Those tests still fail,
seemingly because of regressions in exception messages).

SunSpider reports no change.

  • VM/Machine.cpp: Factored out scope chain updating into a common function that takes care to update ExecState::m_scopeChain, too.
  • kjs/ExecState.h: I made Machine a friend of ExecState so that Machine could update ExecState::m_scopeChain, even though that value is read-only for everyone else.
  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): Changed this client to be a little friendlier to ExecState's internal storage type for scope chain data.
11:54 PM Changeset in webkit [33849] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Fixed https://bugs.webkit.org/show_bug.cgi?id=18876
Squirrelfish: ScopeChainNode leak in op_jmp_scopes.

SunSpider reports no change.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Don't construct a ScopeChain object, since the direct threaded interpreter will goto across its destructor.
11:53 PM Changeset in webkit [33848] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

A bit more efficient fix than r32832: Don't copy globals into function
register files; instead, have the RegisterFileStack track only the base
of the last *global* register file, so the global object's register
references stay good.

SunSpider reports a .3% speedup. Not sure what that's about.

11:53 PM Changeset in webkit [33847] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

Bug 18864: SquirrelFish: Support getter and setter definition in object literals
<https://bugs.webkit.org/show_bug.cgi?id=18864>

Reviewed by Maciej

Add new opcodes to allow us to add getters and setters to an object. These are
only used by the codegen for object literals.

11:53 PM Changeset in webkit [33846] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-02 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • properly copy globals into and out of implicit call register files, otherwise they will fail at global lookup

Fixes fast/js/array-tostring-and-join.html layout test.

  • VM/RegisterFileStack.cpp: (KJS::RegisterFileStack::pushGlobalRegisterFile): (KJS::RegisterFileStack::popGlobalRegisterFile): (KJS::RegisterFileStack::pushFunctionRegisterFile): (KJS::RegisterFileStack::popFunctionRegisterFile):
11:53 PM Changeset in webkit [33845] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Fixed https://bugs.webkit.org/show_bug.cgi?id=18822
SQUIRRELFISH: incorrect eval used in some cases

Changed all code inside the machine to fetch the lexical global object
directly from the scope chain, instead of from the ExecState.

Clients who fetch the lexical global object through the ExecState
still don't work.

SunSpider reports no change.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Fetch the lexical global object from the scope chain.
  • kjs/ExecState.h: (KJS::ExecState::ExecState::lexicalGlobalObject): Moved the logic for this function into ScopeChainNode, but kept this function around to support existing clients.
11:53 PM Changeset in webkit [33844] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Rubber stamped by Oliver Hunt.

Removed ExecState.cpp from AllInOneFile.cpp, for a .2% speedup.

11:53 PM Changeset in webkit [33843] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/LayoutTests

2008-05-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • bump up the numbers in this test to account for our now much higher recursion capability.
  • fast/js/deep-recursion-test.html:
11:53 PM Changeset in webkit [33842] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

Bug 18827: SquirrelFish: Prevent getters and setters from destroying the current RegisterFile
<https://bugs.webkit.org/show_bug.cgi?id=18827>

Reviewed by Maciej and Geoff

Remove safe/unsafe RegisterFile concept, and instead just add additional
logic to ensure we always push/pop RegisterFiles when executing getters
and setters, similar to the logic for valueOf and toString.

11:53 PM Changeset in webkit [33841] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

Rename unsafeForReentry to safeForReentry to avoid double negatives.

RS=Geoff

11:53 PM Changeset in webkit [33840] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

Bug 18827: SquirrelFish: Prevent getters and setters from destroying the current RegisterFile
<https://bugs.webkit.org/show_bug.cgi?id=18827>

Reviewed by Maciej

This patch makes getters and setters work. It does this by
tracking whether the RegisterFile is "safe", that is whether
the interpreter is in a state that in which it can handle
the RegisterFile being reallocated.

11:53 PM Changeset in webkit [33839] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Release build fix: Always compile in "isGlobalObject", since it's
listed in our .exp file.

  • kjs/ExecState.cpp: (KJS::ExecState::isGlobalObject):
  • kjs/ExecState.h:
11:53 PM Changeset in webkit [33838] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Minor code restructuring to prepare for getters and setters,
also helps exception semantics a bit.

Reviewed by Maciej

11:53 PM Changeset in webkit [33837] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Fixed tyop.

  • kjs/ExecState.h:
11:53 PM Changeset in webkit [33836] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Debug build fix: export a missing symbol.

11:53 PM Changeset in webkit [33835] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

A little more ExecState refactoring: Now, only the global object creates
an ExecState.

Also inlined ExecState::lexicalGlobalObject().

SunSpider reports no change.

11:53 PM Changeset in webkit [33834] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/WebKit/mac

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

Build fix: #ifdef'd out some code that doesn't work anymore.

11:53 PM Changeset in webkit [33833] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/WebCore

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

Build fix: supply a parameter that used to be implicit to
Interpreter::evaluate.

11:53 PM Changeset in webkit [33832] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

WebCore build fix: forward-declare ScopeChain.

  • kjs/interpreter.h:
11:53 PM Changeset in webkit [33831] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/WebCore

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

Build fix: #ifdef'd out some code that doesn't work anymore.

  • bindings/objc/WebScriptObject.mm: (+[WebScriptObject throwException:]): (-[WebScriptObject setException:]):
11:53 PM Changeset in webkit [33830] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptGlue

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

Build fix: supply missing parameter that used to be implicit.

  • JSRun.cpp: (JSRun::Evaluate):
11:53 PM Changeset in webkit [33829] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Build fix for JavaScriptGlue: export a missing symbol.

11:53 PM Changeset in webkit [33828] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/WebKit/mac

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

Reviewed by Oliver Hunt.

#ifdef'd out some debugger code that doesn't work anymore.

  • WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame scopeChain]):
11:53 PM Changeset in webkit [33827] by mrowe@apple.com
  • 24 edits
    2 deletes in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Removed a lot of unused bits from ExecState, moving them into
OldInterpreterExecState, the fake scaffolding class.

The clutter was making it hard to see the forest from the trees.

.4% SunSpider speedup, probably because ExecState::lexicalGlobalObject()
is faster now.

11:53 PM Changeset in webkit [33826] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

Bug 18643: SQUIRRELFISH: need to support implicit function calls (valueOf, toString, getters/setters)
<https://bugs.webkit.org/show_bug.cgi?id=18643>

Reviewed by Maciej

Prevent static slot optimisation for new variables and functions in
globally re-entrant code called from an an implicit function call.

This is necessary to prevent us from needing to resize the global
slot portion of the root RegisterFile during an implicit (and hence
unguarded) function call.

11:52 PM Changeset in webkit [33825] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

In nested program code, don't propogate "this" back to the parent
register file. ("this" should remain constant in the parent register
file, regardless of the scripts it invokes.)

  • VM/RegisterFile.cpp: (KJS::RegisterFile::copyGlobals):
11:52 PM Changeset in webkit [33824] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Restore base pointer when popping a global RegisterFile

Reviewed by Geoff

11:52 PM Changeset in webkit [33823] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

Bug 18643: SQUIRRELFISH: need to support implicit function calls (valueOf, toString, getters/setters)
<https://bugs.webkit.org/show_bug.cgi?id=18643>

Reviewed by Geoff

Partial fix. This results in all implicit calls to toString or valueOf
executing in a separate RegisterFile, so ensuring that the the pointers
in the triggering interpreter don't get trashed. This still leaves the
task of preventing new global re-entry from toString and valueOf from
clobbering the RegisterFile.

11:52 PM Changeset in webkit [33822] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Simplified activation object a bit: No need to store the callee
in the activation object -- we can pull it out of the call frame
when needed, instead.

SunSpider reports no change.

11:52 PM Changeset in webkit [33821] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

RS by Oliver Hunt on moving JSArguments.cpp out of AllInOneFile.cpp.

Substantially more handling of "arguments": "arguments" works fully
now, but "f.arguments" still doesn't work.

Fixes 10 regression tests.

SunSpider reports no regression.

  • kjs/JSActivation.cpp: (KJS::JSActivation::createArgumentsObject): Reconstruct an arguments List to pass to the arguments object constructor.
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • kjs/AllInOneFile.cpp: Removed JSActivation.cpp from AllInOneFile.cpp because that seems to make GCC happy. (Previously, I had added JSActivation.cpp to AllInOneFile.cpp because *that* seemed to make GCC happy. So it goes.)
11:52 PM Changeset in webkit [33820] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Groundwork for more handling of "arguments". I'm not checking in the
actual handling of "arguments" yet, because it still needs a little
fiddling to avoid a performance regression.

SunSpider reports no change.

  • VM/Machine.cpp: (KJS::initializeCallFrame): Put argc in the register file, so the arguments object can find it later, to determine arguments.length.
  • kjs/nodes.h: (KJS::FunctionBodyNode::): Added a special code accessor for when you know the code has already been generated, and you don't have a scopeChain to supply for potential code generation. (This is the case when the activation object creates the arguments object.)
11:52 PM Changeset in webkit [33819] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

Replace unsafe use of auto_ptr in Vector with manual memory
management.

Reviewed by Geoff

11:52 PM Changeset in webkit [33818] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej.

Bug 18746: SQUIRRELFISH: indirect eval used when direct eval should be used
<https://bugs.webkit.org/show_bug.cgi?id=18746>

Change the base to the correct value of the 'this' object after the direct
eval test instead of before.

Fixes 5 layout tests.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/nodes.cpp: (KJS::EvalFunctionCallNode::emitCode):
11:52 PM Changeset in webkit [33817] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-04-26 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • document all property getting, setting and deleting opcodes

(And fix function parameter names to match corresponding opcode parameter names.)

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitResolve): (KJS::CodeGenerator::emitResolveBase): (KJS::CodeGenerator::emitResolveBaseAndProperty): (KJS::CodeGenerator::emitResolveBaseAndFunc): (KJS::CodeGenerator::emitGetPropId): (KJS::CodeGenerator::emitPutPropId): (KJS::CodeGenerator::emitDeletePropId): (KJS::CodeGenerator::emitPutPropVal):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::resolve): (KJS::resolveBase): (KJS::resolveBaseAndProperty): (KJS::resolveBaseAndFunc): (KJS::Machine::privateExecute):
  • kjs/nodes.cpp: (KJS::ResolveNode::emitCode): (KJS::ArrayNode::emitCode): (KJS::PropertyListNode::emitCode): (KJS::BracketAccessorNode::emitCode): (KJS::EvalFunctionCallNode::emitCode): (KJS::FunctionCallResolveNode::emitCode): (KJS::FunctionCallBracketNode::emitCode): (KJS::PostIncResolveNode::emitCode): (KJS::PostDecResolveNode::emitCode): (KJS::PostIncBracketNode::emitCode): (KJS::PostDecBracketNode::emitCode): (KJS::PostIncDotNode::emitCode): (KJS::PostDecDotNode::emitCode): (KJS::DeleteResolveNode::emitCode): (KJS::TypeOfResolveNode::emitCode): (KJS::PreIncResolveNode::emitCode): (KJS::PreDecResolveNode::emitCode): (KJS::PreIncBracketNode::emitCode): (KJS::PreDecBracketNode::emitCode): (KJS::AssignResolveNode::emitCode): (KJS::AssignDotNode::emitCode): (KJS::ReadModifyDotNode::emitCode): (KJS::AssignBracketNode::emitCode): (KJS::ReadModifyBracketNode::emitCode): (KJS::ConstDeclNode::emitCodeSingle):
11:52 PM Changeset in webkit [33816] by mrowe@apple.com
  • 9 edits
    2 adds in branches/squirrelfish

Bug 18628: SQUIRRELFISH: need to support recursion limit
<https://bugs.webkit.org/show_bug.cgi?id=18628>

Reviewed by Maciej.

Basically completes recursion limiting. There is still some
tuning we may want to do to make things better in the face of
very bad code, but certainly nothing worse than anything already
possible in trunk.

Also fixes a WebKit test by fixing the exception text :D

11:52 PM Changeset in webkit [33815] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fix the changelog

11:52 PM Changeset in webkit [33814] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

Bug 18736: SQUIRRELFISH: switch statements with no default have incorrect codegen
<https://bugs.webkit.org/show_bug.cgi?id=18736>

Reviewed by Geoff

Put a limit on the level of reentry recursion. 128 levels of re-entrant recursion
seems reasonable as it is greater than the old eval limit, and a long way short of
the reentry depth needed to overflow the stack.

11:52 PM Changeset in webkit [33813] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

A tiny bit of cleanup to the regexp code.

Removed some static_cast.

Removed createRegExpImp because it's no longer used.

11:52 PM Changeset in webkit [33812] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Bug 18736: SQUIRRELFISH: switch statements with no default have incorrect codegen
<https://bugs.webkit.org/show_bug.cgi?id=18736>

Reviewed by Maciej

Ensure the "default" target is correct in the absence of an explicit default handler.

11:52 PM Changeset in webkit [33811] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fixing the ChangeLog

11:52 PM Changeset in webkit [33810] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

Bug 18732: SQUIRRELFISH: exceptions thrown by native constructors are ignored
<https://bugs.webkit.org/show_bug.cgi?id=18732>

Reviewed by Maciej

More bounds checking.

11:52 PM Changeset in webkit [33809] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-25 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix signal catching magic

The signal handlers are restored to _exit but are only set when
running under run-javascriptcore-tests. fprintf from a signal
handler is not safe.

  • kjs/testkjs.cpp: (main): (parseArguments):
  • tests/mozilla/jsDriver.pl:
11:52 PM Changeset in webkit [33808] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej.

Bug 18732: SQUIRRELFISH: exceptions thrown by native constructors are ignored
<https://bugs.webkit.org/show_bug.cgi?id=18732>

Fixes another regression test.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:52 PM Changeset in webkit [33807] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej.

Bug 18728: SQUIRRELFISH: invalid regular expression constants should throw exceptions
<https://bugs.webkit.org/show_bug.cgi?id=18728>

Fixes another regression test.

  • kjs/nodes.cpp: (KJS::RegExpNode::emitCode):
11:52 PM Changeset in webkit [33806] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Geoffrey Garen.

Bug 18735: SQUIRRELFISH: closures are sometimes given an incorrect 'this' value when called
<https://bugs.webkit.org/show_bug.cgi?id=18735>

The overloaded toThisObject method was not copied over to JSActivation.

Fixes two regression tests.

  • kjs/JSActivation.cpp: (KJS::JSActivation::toThisObject):
  • kjs/JSActivation.h:
11:52 PM Changeset in webkit [33805] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Added support for arguments.callee.

11:52 PM Changeset in webkit [33804] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

Bug 18628: SQUIRRELFISH: need to support recursion limit
<https://bugs.webkit.org/show_bug.cgi?id=18628>

Reviewed by Maciej

Partial fix -- this gets us some of the required bounds checking, but not
complete coverage. But it does manage to do them without regressing :D

11:52 PM Changeset in webkit [33803] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fixed up ChangeLog

11:52 PM Changeset in webkit [33802] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver.

Bug 18717: SQUIRRELFISH: eval returns the wrong value for a variable declaration statement
<https://bugs.webkit.org/show_bug.cgi?id=18717>

Fixes a regression test, but exposes the failure of another due to the
lack of getters and setters.

  • kjs/nodes.cpp: (KJS::ConstDeclNode::emitCodeSingle): (KJS::ConstDeclNode::emitCode): (KJS::ConstStatementNode::emitCode): (KJS::VarStatementNode::emitCode):
  • kjs/nodes.h:
11:51 PM Changeset in webkit [33801] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver.

Bug 18717: SQUIRRELFISH: eval returns the wrong value for a variable declaration statement
<https://bugs.webkit.org/show_bug.cgi?id=18717>

Fixes a regression test, but exposes the failure of another due to the
lack of getters and setters.

11:51 PM Changeset in webkit [33800] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Print a CRASH statement when crashing, so test failures are not a
mystery.

  • kjs/testkjs.cpp: (handleCrash): (main):
11:51 PM Changeset in webkit [33799] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Geoffrey Garen.

Bug 18716: SQUIRRELFISH: typeof should return undefined for an undefined variable reference
<https://bugs.webkit.org/show_bug.cgi?id=18716>

This fixes 2 more regression tests.

  • kjs/nodes.cpp: (KJS::TypeOfResolveNode::emitCode):
11:51 PM Changeset in webkit [33798] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Put the callee in the call frame.

Necessary in order to support "arguments" and "arguments.callee".

Also fixes a latent GC bug, where an executing function could be
subject to GC if the register holding it were overwritten. Here's
an example that would have caused problems:

function f()
{

Flood the machine stack to eliminate any old pointers to f.
g.call({});

Overwrite f in the register file.
f = 1;

Force a GC.
for (var i = 0; i < 5000; ++i) {

({});

}

Welcome to crash-ville.

}

function g()
{
}

f();

  • VM/Machine.h: Changed the order of arguments to execute(FunctionBodyNode*...) to match the other execute functions.
  • kjs/function.cpp: Updated to match new argument requirements from execute(FunctionBodyNode*...). Renamed newObj to thisObj to match the rest of JavaScriptCore.

SunSpider reports no change.

11:51 PM Changeset in webkit [33797] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej.

Bug 18707: SQUIRRELFISH: eval always performs toString() on its argument
<https://bugs.webkit.org/show_bug.cgi?id=18707>

This fixes 4 more regression tests.

  • VM/Machine.cpp: (KJS::eval):
11:51 PM Changeset in webkit [33796] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-23 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix logic bug in SegmentedVector::grow which would sometimes fail to resize a segment when needed

Fixes 3 JSC tests.

  • VM/SegmentedVector.h: (KJS::SegmentedVector::grow):
11:51 PM Changeset in webkit [33795] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Degenerate handling of "arguments" as a property of the activation
object. Currently, we just return a vanilla object.

SunSpider reports no change.

Fixes:

ecma_3/Function/regress-94506.js.

Reveals to have been secretly broken:

ecma_3/Function/15.3.4.3-1.js
ecma_3/Function/15.3.4.4-1.js

These tests were passing incorrectly. testkjs creates a global array
named "arguments" to hold command-line arguments. That array was
tricking these tests into thinking that an arguments object with length
0 had been created. Since our new vanilla object shadows the global
property named arguments, that object no longer fools these tests into
passing.

Net change: +1 failing test.

  • kjs/AllInOneFile.cpp: Had to put JSActivation.cpp into AllInOneFile.cpp to solve a surprising 8.6% regression in bitops-3bit-bits-in-byte.
11:51 PM Changeset in webkit [33794] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-23 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • save and restore callFrame
  • VM/Machine.cpp: (KJS::slideRegisterWindowForCall): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • kjs/testkjs.cpp: (main):
11:51 PM Changeset in webkit [33793] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Fixed scopes for named function expressions.

Fixes one regression test.

Two changes here:

(1) The function's name is supposed to have attributes DontDelete,
ReadOnly, regardless of the type of code executing.

(2) Push the name object on the function's scope chain, rather than
the ExecState's scope chain because, well, that's where it belongs.

11:51 PM Changeset in webkit [33792] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Inlined JSObject::putDirect, for a .4% SunSpider speedup.

I did this as a first step toward removing nodes.cpp from
AllInOneFile.cpp, but I'm putting that larger project aside for now.

11:51 PM Changeset in webkit [33791] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-23 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Geoff.

  • add OldInterpreterExecState class and use it in dead code

This will allow removing things from the real ExecState class
without having to figure out how to remove all this code without
getting a perf regression.

  • kjs/nodes.cpp: (KJS::ExpressionNode::evaluateToNumber): (KJS::ExpressionNode::evaluateToBoolean): (KJS::ExpressionNode::evaluateToInt32): (KJS::ExpressionNode::evaluateToUInt32): (KJS::Node::setErrorCompletion): (KJS::Node::throwError): (KJS::Node::throwUndefinedVariableError): (KJS::Node::handleException): (KJS::Node::rethrowException): (KJS::BreakpointCheckStatement::execute): (KJS::BreakpointCheckStatement::optimizeVariableAccess): (KJS::NullNode::evaluate): (KJS::FalseNode::evaluate): (KJS::TrueNode::evaluate): (KJS::NumberNode::evaluate): (KJS::NumberNode::evaluateToNumber): (KJS::NumberNode::evaluateToBoolean): (KJS::NumberNode::evaluateToInt32): (KJS::NumberNode::evaluateToUInt32): (KJS::ImmediateNumberNode::evaluate): (KJS::ImmediateNumberNode::evaluateToInt32): (KJS::ImmediateNumberNode::evaluateToUInt32): (KJS::StringNode::evaluate): (KJS::StringNode::evaluateToNumber): (KJS::StringNode::evaluateToBoolean): (KJS::RegExpNode::evaluate): (KJS::ThisNode::evaluate): (KJS::ResolveNode::inlineEvaluate): (KJS::ResolveNode::evaluate): (KJS::ResolveNode::evaluateToNumber): (KJS::ResolveNode::evaluateToBoolean): (KJS::ResolveNode::evaluateToInt32): (KJS::ResolveNode::evaluateToUInt32): (KJS::getSymbolTableEntry): (KJS::ResolveNode::optimizeVariableAccess): (KJS::LocalVarAccessNode::inlineEvaluate): (KJS::LocalVarAccessNode::evaluate): (KJS::LocalVarAccessNode::evaluateToNumber): (KJS::LocalVarAccessNode::evaluateToBoolean): (KJS::LocalVarAccessNode::evaluateToInt32): (KJS::LocalVarAccessNode::evaluateToUInt32): (KJS::getNonLocalSymbol): (KJS::ScopedVarAccessNode::inlineEvaluate): (KJS::ScopedVarAccessNode::evaluate): (KJS::ScopedVarAccessNode::evaluateToNumber): (KJS::ScopedVarAccessNode::evaluateToBoolean): (KJS::ScopedVarAccessNode::evaluateToInt32): (KJS::ScopedVarAccessNode::evaluateToUInt32): (KJS::NonLocalVarAccessNode::inlineEvaluate): (KJS::NonLocalVarAccessNode::evaluate): (KJS::NonLocalVarAccessNode::evaluateToNumber): (KJS::NonLocalVarAccessNode::evaluateToBoolean): (KJS::NonLocalVarAccessNode::evaluateToInt32): (KJS::NonLocalVarAccessNode::evaluateToUInt32): (KJS::ElementNode::optimizeVariableAccess): (KJS::ElementNode::evaluate): (KJS::ArrayNode::optimizeVariableAccess): (KJS::ArrayNode::evaluate): (KJS::ObjectLiteralNode::optimizeVariableAccess): (KJS::ObjectLiteralNode::evaluate): (KJS::PropertyListNode::optimizeVariableAccess): (KJS::PropertyListNode::evaluate): (KJS::PropertyNode::optimizeVariableAccess): (KJS::PropertyNode::evaluate): (KJS::BracketAccessorNode::optimizeVariableAccess): (KJS::BracketAccessorNode::inlineEvaluate): (KJS::BracketAccessorNode::evaluate): (KJS::BracketAccessorNode::evaluateToNumber): (KJS::BracketAccessorNode::evaluateToBoolean): (KJS::BracketAccessorNode::evaluateToInt32): (KJS::BracketAccessorNode::evaluateToUInt32): (KJS::DotAccessorNode::optimizeVariableAccess): (KJS::DotAccessorNode::inlineEvaluate): (KJS::DotAccessorNode::evaluate): (KJS::DotAccessorNode::evaluateToNumber): (KJS::DotAccessorNode::evaluateToBoolean): (KJS::DotAccessorNode::evaluateToInt32): (KJS::DotAccessorNode::evaluateToUInt32): (KJS::ArgumentListNode::optimizeVariableAccess): (KJS::ArgumentListNode::evaluateList): (KJS::ArgumentsNode::optimizeVariableAccess): (KJS::NewExprNode::optimizeVariableAccess): (KJS::NewExprNode::inlineEvaluate): (KJS::NewExprNode::evaluate): (KJS::NewExprNode::evaluateToNumber): (KJS::NewExprNode::evaluateToBoolean): (KJS::NewExprNode::evaluateToInt32): (KJS::NewExprNode::evaluateToUInt32): (KJS::ExpressionNode::resolveAndCall): (KJS::EvalFunctionCallNode::optimizeVariableAccess): (KJS::EvalFunctionCallNode::evaluate): (KJS::FunctionCallValueNode::optimizeVariableAccess): (KJS::FunctionCallValueNode::evaluate): (KJS::FunctionCallResolveNode::optimizeVariableAccess): (KJS::FunctionCallResolveNode::inlineEvaluate): (KJS::FunctionCallResolveNode::evaluate): (KJS::FunctionCallResolveNode::evaluateToNumber): (KJS::FunctionCallResolveNode::evaluateToBoolean): (KJS::FunctionCallResolveNode::evaluateToInt32): (KJS::FunctionCallResolveNode::evaluateToUInt32): (KJS::LocalVarFunctionCallNode::inlineEvaluate): (KJS::LocalVarFunctionCallNode::evaluate): (KJS::LocalVarFunctionCallNode::evaluateToNumber): (KJS::LocalVarFunctionCallNode::evaluateToBoolean): (KJS::LocalVarFunctionCallNode::evaluateToInt32): (KJS::LocalVarFunctionCallNode::evaluateToUInt32): (KJS::ScopedVarFunctionCallNode::inlineEvaluate): (KJS::ScopedVarFunctionCallNode::evaluate): (KJS::ScopedVarFunctionCallNode::evaluateToNumber): (KJS::ScopedVarFunctionCallNode::evaluateToBoolean): (KJS::ScopedVarFunctionCallNode::evaluateToInt32): (KJS::ScopedVarFunctionCallNode::evaluateToUInt32): (KJS::NonLocalVarFunctionCallNode::inlineEvaluate): (KJS::NonLocalVarFunctionCallNode::evaluate): (KJS::NonLocalVarFunctionCallNode::evaluateToNumber): (KJS::NonLocalVarFunctionCallNode::evaluateToBoolean): (KJS::NonLocalVarFunctionCallNode::evaluateToInt32): (KJS::NonLocalVarFunctionCallNode::evaluateToUInt32): (KJS::FunctionCallBracketNode::optimizeVariableAccess): (KJS::FunctionCallBracketNode::evaluate): (KJS::FunctionCallDotNode::optimizeVariableAccess): (KJS::FunctionCallDotNode::inlineEvaluate): (KJS::FunctionCallDotNode::evaluate): (KJS::FunctionCallDotNode::evaluateToNumber): (KJS::FunctionCallDotNode::evaluateToBoolean): (KJS::FunctionCallDotNode::evaluateToInt32): (KJS::FunctionCallDotNode::evaluateToUInt32): (KJS::PostIncResolveNode::optimizeVariableAccess): (KJS::PostIncResolveNode::evaluate): (KJS::PostIncLocalVarNode::evaluate): (KJS::PostDecResolveNode::optimizeVariableAccess): (KJS::PostDecResolveNode::evaluate): (KJS::PostDecLocalVarNode::evaluate): (KJS::PostDecLocalVarNode::inlineEvaluateToNumber): (KJS::PostDecLocalVarNode::evaluateToNumber): (KJS::PostDecLocalVarNode::evaluateToBoolean): (KJS::PostDecLocalVarNode::evaluateToInt32): (KJS::PostDecLocalVarNode::evaluateToUInt32): (KJS::PostfixBracketNode::optimizeVariableAccess): (KJS::PostIncBracketNode::evaluate): (KJS::PostDecBracketNode::evaluate): (KJS::PostfixDotNode::optimizeVariableAccess): (KJS::PostIncDotNode::evaluate): (KJS::PostDecDotNode::evaluate): (KJS::PostfixErrorNode::evaluate): (KJS::DeleteResolveNode::optimizeVariableAccess): (KJS::DeleteResolveNode::evaluate): (KJS::LocalVarDeleteNode::evaluate): (KJS::DeleteBracketNode::optimizeVariableAccess): (KJS::DeleteBracketNode::evaluate): (KJS::DeleteDotNode::optimizeVariableAccess): (KJS::DeleteDotNode::evaluate): (KJS::DeleteValueNode::optimizeVariableAccess): (KJS::DeleteValueNode::evaluate): (KJS::VoidNode::optimizeVariableAccess): (KJS::VoidNode::evaluate): (KJS::TypeOfValueNode::optimizeVariableAccess): (KJS::TypeOfResolveNode::optimizeVariableAccess): (KJS::LocalVarTypeOfNode::evaluate): (KJS::TypeOfResolveNode::evaluate): (KJS::TypeOfValueNode::evaluate): (KJS::PreIncResolveNode::optimizeVariableAccess): (KJS::PreIncLocalVarNode::evaluate): (KJS::PreIncResolveNode::evaluate): (KJS::PreDecResolveNode::optimizeVariableAccess): (KJS::PreDecLocalVarNode::evaluate): (KJS::PreDecResolveNode::evaluate): (KJS::PreIncConstNode::evaluate): (KJS::PreDecConstNode::evaluate): (KJS::PostIncConstNode::evaluate): (KJS::PostDecConstNode::evaluate): (KJS::PrefixBracketNode::optimizeVariableAccess): (KJS::PreIncBracketNode::evaluate): (KJS::PreDecBracketNode::evaluate): (KJS::PrefixDotNode::optimizeVariableAccess): (KJS::PreIncDotNode::evaluate): (KJS::PreDecDotNode::evaluate): (KJS::PrefixErrorNode::evaluate): (KJS::UnaryPlusNode::optimizeVariableAccess): (KJS::UnaryPlusNode::evaluate): (KJS::UnaryPlusNode::evaluateToBoolean): (KJS::UnaryPlusNode::evaluateToNumber): (KJS::UnaryPlusNode::evaluateToInt32): (KJS::UnaryPlusNode::evaluateToUInt32): (KJS::NegateNode::optimizeVariableAccess): (KJS::NegateNode::evaluate): (KJS::NegateNode::evaluateToNumber): (KJS::BitwiseNotNode::optimizeVariableAccess): (KJS::BitwiseNotNode::inlineEvaluateToInt32): (KJS::BitwiseNotNode::evaluate): (KJS::BitwiseNotNode::evaluateToNumber): (KJS::BitwiseNotNode::evaluateToBoolean): (KJS::BitwiseNotNode::evaluateToInt32): (KJS::BitwiseNotNode::evaluateToUInt32): (KJS::LogicalNotNode::optimizeVariableAccess): (KJS::LogicalNotNode::evaluate): (KJS::LogicalNotNode::evaluateToBoolean): (KJS::MultNode::optimizeVariableAccess): (KJS::MultNode::inlineEvaluateToNumber): (KJS::MultNode::evaluate): (KJS::MultNode::evaluateToNumber): (KJS::MultNode::evaluateToBoolean): (KJS::MultNode::evaluateToInt32): (KJS::MultNode::evaluateToUInt32): (KJS::DivNode::optimizeVariableAccess): (KJS::DivNode::inlineEvaluateToNumber): (KJS::DivNode::evaluate): (KJS::DivNode::evaluateToNumber): (KJS::DivNode::evaluateToInt32): (KJS::DivNode::evaluateToUInt32): (KJS::ModNode::optimizeVariableAccess): (KJS::ModNode::inlineEvaluateToNumber): (KJS::ModNode::evaluate): (KJS::ModNode::evaluateToNumber): (KJS::ModNode::evaluateToBoolean): (KJS::ModNode::evaluateToInt32): (KJS::ModNode::evaluateToUInt32): (KJS::throwOutOfMemoryErrorToNumber): (KJS::addSlowCase): (KJS::addSlowCaseToNumber): (KJS::add): (KJS::addToNumber): (KJS::AddNode::optimizeVariableAccess): (KJS::AddNode::evaluate): (KJS::AddNode::inlineEvaluateToNumber): (KJS::AddNode::evaluateToNumber): (KJS::AddNode::evaluateToInt32): (KJS::AddNode::evaluateToUInt32): (KJS::AddNumbersNode::inlineEvaluateToNumber): (KJS::AddNumbersNode::evaluate): (KJS::AddNumbersNode::evaluateToNumber): (KJS::AddNumbersNode::evaluateToInt32): (KJS::AddNumbersNode::evaluateToUInt32): (KJS::AddStringsNode::evaluate): (KJS::AddStringLeftNode::evaluate): (KJS::AddStringRightNode::evaluate): (KJS::SubNode::optimizeVariableAccess): (KJS::SubNode::inlineEvaluateToNumber): (KJS::SubNode::evaluate): (KJS::SubNode::evaluateToNumber): (KJS::SubNode::evaluateToInt32): (KJS::SubNode::evaluateToUInt32): (KJS::LeftShiftNode::optimizeVariableAccess): (KJS::LeftShiftNode::inlineEvaluateToInt32): (KJS::LeftShiftNode::evaluate): (KJS::LeftShiftNode::evaluateToNumber): (KJS::LeftShiftNode::evaluateToInt32): (KJS::LeftShiftNode::evaluateToUInt32): (KJS::RightShiftNode::optimizeVariableAccess): (KJS::RightShiftNode::inlineEvaluateToInt32): (KJS::RightShiftNode::evaluate): (KJS::RightShiftNode::evaluateToNumber): (KJS::RightShiftNode::evaluateToInt32): (KJS::RightShiftNode::evaluateToUInt32): (KJS::UnsignedRightShiftNode::optimizeVariableAccess): (KJS::UnsignedRightShiftNode::inlineEvaluateToUInt32): (KJS::UnsignedRightShiftNode::evaluate): (KJS::UnsignedRightShiftNode::evaluateToNumber): (KJS::UnsignedRightShiftNode::evaluateToInt32): (KJS::UnsignedRightShiftNode::evaluateToUInt32): (KJS::lessThan): (KJS::lessThanEq): (KJS::LessNode::optimizeVariableAccess): (KJS::LessNode::inlineEvaluateToBoolean): (KJS::LessNode::evaluate): (KJS::LessNode::evaluateToBoolean): (KJS::LessNumbersNode::inlineEvaluateToBoolean): (KJS::LessNumbersNode::evaluate): (KJS::LessNumbersNode::evaluateToBoolean): (KJS::LessStringsNode::inlineEvaluateToBoolean): (KJS::LessStringsNode::evaluate): (KJS::LessStringsNode::evaluateToBoolean): (KJS::GreaterNode::optimizeVariableAccess): (KJS::GreaterNode::inlineEvaluateToBoolean): (KJS::GreaterNode::evaluate): (KJS::GreaterNode::evaluateToBoolean): (KJS::LessEqNode::optimizeVariableAccess): (KJS::LessEqNode::inlineEvaluateToBoolean): (KJS::LessEqNode::evaluate): (KJS::LessEqNode::evaluateToBoolean): (KJS::GreaterEqNode::optimizeVariableAccess): (KJS::GreaterEqNode::inlineEvaluateToBoolean): (KJS::GreaterEqNode::evaluate): (KJS::GreaterEqNode::evaluateToBoolean): (KJS::InstanceOfNode::optimizeVariableAccess): (KJS::InstanceOfNode::evaluate): (KJS::InstanceOfNode::evaluateToBoolean): (KJS::InNode::optimizeVariableAccess): (KJS::InNode::evaluate): (KJS::InNode::evaluateToBoolean): (KJS::EqualNode::optimizeVariableAccess): (KJS::EqualNode::inlineEvaluateToBoolean): (KJS::EqualNode::evaluate): (KJS::EqualNode::evaluateToBoolean): (KJS::NotEqualNode::optimizeVariableAccess): (KJS::NotEqualNode::inlineEvaluateToBoolean): (KJS::NotEqualNode::evaluate): (KJS::NotEqualNode::evaluateToBoolean): (KJS::StrictEqualNode::optimizeVariableAccess): (KJS::StrictEqualNode::inlineEvaluateToBoolean): (KJS::StrictEqualNode::evaluate): (KJS::StrictEqualNode::evaluateToBoolean): (KJS::NotStrictEqualNode::optimizeVariableAccess): (KJS::NotStrictEqualNode::inlineEvaluateToBoolean): (KJS::NotStrictEqualNode::evaluate): (KJS::NotStrictEqualNode::evaluateToBoolean): (KJS::BitAndNode::optimizeVariableAccess): (KJS::BitAndNode::evaluate): (KJS::BitAndNode::inlineEvaluateToInt32): (KJS::BitAndNode::evaluateToNumber): (KJS::BitAndNode::evaluateToBoolean): (KJS::BitAndNode::evaluateToInt32): (KJS::BitAndNode::evaluateToUInt32): (KJS::BitXOrNode::optimizeVariableAccess): (KJS::BitXOrNode::inlineEvaluateToInt32): (KJS::BitXOrNode::evaluate): (KJS::BitXOrNode::evaluateToNumber): (KJS::BitXOrNode::evaluateToBoolean): (KJS::BitXOrNode::evaluateToInt32): (KJS::BitXOrNode::evaluateToUInt32): (KJS::BitOrNode::optimizeVariableAccess): (KJS::BitOrNode::inlineEvaluateToInt32): (KJS::BitOrNode::evaluate): (KJS::BitOrNode::evaluateToNumber): (KJS::BitOrNode::evaluateToBoolean): (KJS::BitOrNode::evaluateToInt32): (KJS::BitOrNode::evaluateToUInt32): (KJS::LogicalAndNode::optimizeVariableAccess): (KJS::LogicalAndNode::evaluate): (KJS::LogicalAndNode::evaluateToBoolean): (KJS::LogicalOrNode::optimizeVariableAccess): (KJS::LogicalOrNode::evaluate): (KJS::LogicalOrNode::evaluateToBoolean): (KJS::ConditionalNode::optimizeVariableAccess): (KJS::ConditionalNode::evaluate): (KJS::ConditionalNode::evaluateToBoolean): (KJS::ConditionalNode::evaluateToNumber): (KJS::ConditionalNode::evaluateToInt32): (KJS::ConditionalNode::evaluateToUInt32): (KJS::valueForReadModifyAssignment): (KJS::ReadModifyResolveNode::optimizeVariableAccess): (KJS::AssignResolveNode::optimizeVariableAccess): (KJS::ReadModifyLocalVarNode::evaluate): (KJS::AssignLocalVarNode::evaluate): (KJS::ReadModifyConstNode::evaluate): (KJS::AssignConstNode::evaluate): (KJS::ReadModifyResolveNode::evaluate): (KJS::AssignResolveNode::evaluate): (KJS::AssignDotNode::optimizeVariableAccess): (KJS::AssignDotNode::evaluate): (KJS::ReadModifyDotNode::optimizeVariableAccess): (KJS::ReadModifyDotNode::evaluate): (KJS::AssignErrorNode::evaluate): (KJS::AssignBracketNode::optimizeVariableAccess): (KJS::AssignBracketNode::evaluate): (KJS::ReadModifyBracketNode::optimizeVariableAccess): (KJS::ReadModifyBracketNode::evaluate): (KJS::CommaNode::optimizeVariableAccess): (KJS::CommaNode::evaluate): (KJS::ConstDeclNode::optimizeVariableAccess): (KJS::ConstDeclNode::handleSlowCase): (KJS::ConstDeclNode::evaluateSingle): (KJS::ConstDeclNode::evaluate): (KJS::ConstStatementNode::optimizeVariableAccess): (KJS::ConstStatementNode::execute): (KJS::statementListExecute): (KJS::BlockNode::optimizeVariableAccess): (KJS::BlockNode::execute): (KJS::EmptyStatementNode::execute): (KJS::ExprStatementNode::optimizeVariableAccess): (KJS::ExprStatementNode::execute): (KJS::VarStatementNode::optimizeVariableAccess): (KJS::VarStatementNode::execute): (KJS::IfNode::optimizeVariableAccess): (KJS::IfNode::execute): (KJS::IfElseNode::optimizeVariableAccess): (KJS::IfElseNode::execute): (KJS::DoWhileNode::optimizeVariableAccess): (KJS::DoWhileNode::execute): (KJS::WhileNode::optimizeVariableAccess): (KJS::WhileNode::execute): (KJS::ForNode::optimizeVariableAccess): (KJS::ForNode::execute): (KJS::ForInNode::optimizeVariableAccess): (KJS::ForInNode::execute): (KJS::ContinueNode::execute): (KJS::BreakNode::execute): (KJS::ReturnNode::optimizeVariableAccess): (KJS::ReturnNode::execute): (KJS::WithNode::optimizeVariableAccess): (KJS::WithNode::execute): (KJS::CaseClauseNode::optimizeVariableAccess): (KJS::CaseClauseNode::evaluate): (KJS::CaseClauseNode::executeStatements): (KJS::ClauseListNode::optimizeVariableAccess): (KJS::CaseBlockNode::optimizeVariableAccess): (KJS::CaseBlockNode::executeBlock): (KJS::SwitchNode::optimizeVariableAccess): (KJS::SwitchNode::execute): (KJS::LabelNode::optimizeVariableAccess): (KJS::LabelNode::execute): (KJS::ThrowNode::optimizeVariableAccess): (KJS::ThrowNode::execute): (KJS::TryNode::optimizeVariableAccess): (KJS::TryNode::execute): (KJS::ProgramNode::initializeSymbolTable): (KJS::ScopeNode::optimizeVariableAccess): (KJS::ProgramNode::processDeclarations): (KJS::EvalNode::processDeclarations): (KJS::ProgramNode::execute): (KJS::EvalNode::execute): (KJS::FunctionBodyNodeWithDebuggerHooks::execute): (KJS::FuncDeclNode::execute): (KJS::FuncExprNode::evaluate):
  • kjs/nodes.h: (KJS::Node::): (KJS::FalseNode::): (KJS::TrueNode::): (KJS::ArgumentsNode::):
11:51 PM Changeset in webkit [33790] by mrowe@apple.com
  • 4 edits
    1 add in branches/squirrelfish/JavaScriptCore

Bug 18672: SQUIRRELFISH: codegen fails with a large number of temporaries
<https://bugs.webkit.org/show_bug.cgi?id=18672>

Reviewed by Geoff

Add a SegmentedVector type, which provides a Vector<T> which maintains
existing memory locations during resize. This allows dynamically sizing
local, temporary and label "vectors" in CodeGenerator.

11:51 PM Changeset in webkit [33789] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

A little refactoring in preparation for supporting 'arguments'.

Fixes 2 regression tests.

SunSpider reports no change.

We now check the activation register, instead of the codeBlock, to
determine whether we need to tear off the activation. This is to support
"f.arguments", which will create an activation/arguments pair for f,
even though the needsFullScopeChain flag is false for f's codeBlock.

The test fixes resulted from calling initializeCallFrame for re-entrant
function code, instead of initializing (not enough) parts of the call
frame by hand.

11:51 PM Changeset in webkit [33788] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • propagate the "this" value properly to local eval

(fixes a measly one regression test)

  • VM/CodeBlock.h: (KJS::CodeBlock::CodeBlock): (KJS::ProgramCodeBlock::ProgramCodeBlock): (KJS::EvalCodeBlock::EvalCodeBlock):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:51 PM Changeset in webkit [33787] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej.

Add support for function declarations in eval code.

(this fixes 12 more regression tests)

  • VM/CodeBlock.h:
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::CodeGenerator):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::execute):
  • kjs/nodes.cpp: (KJS::EvalNode::generateCode):
11:51 PM Changeset in webkit [33786] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver.

Implement LabelNode.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::pushJumpContext): (KJS::CodeGenerator::jumpContextForContinue): (KJS::CodeGenerator::jumpContextForBreak):
  • VM/CodeGenerator.h:
  • kjs/nodes.cpp: (KJS::DoWhileNode::emitCode): (KJS::WhileNode::emitCode): (KJS::ForNode::emitCode): (KJS::ForInNode::emitCode): (KJS::ContinueNode::emitCode): (KJS::BreakNode::emitCode): (KJS::SwitchNode::emitCode): (KJS::LabelNode::emitCode):
11:51 PM Changeset in webkit [33785] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Fixed crash when unwinding from exceptions inside eval.

  • VM/Machine.cpp: (KJS::Machine::unwindCallFrame): Don't assume that the top of the current call frame's scope chain is an activation: it can be the global object, instead.
11:51 PM Changeset in webkit [33784] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • kjs/testkjs.cpp: (main): Convert signals to exit codes, so that crashing tests are detected as regression test failures.
11:51 PM Changeset in webkit [33783] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt and Maciej Stachowiak.

Renamed "needsActivation" to "needsFullScopeChain" because lying will
make hair grow on the backs of your hands.

11:51 PM Changeset in webkit [33782] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fixed ChangeLog

11:51 PM Changeset in webkit [33781] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Fixed ScopeChainNode lifetime problems:

(1) In "with" and "catch" scopes, we would construct a ScopeChain
object and then jump across its destructor, leaking the ScopeChainNode
we had pushed.

(2) In global and eval scopes, we would fail to initially ref
"scopeChain", causing us to overrelease it later. Now that we ref
"scopeChain" properly, we also need to deref it when the script
terminates.

SunSpider reports no change.

11:51 PM Changeset in webkit [33780] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Maciej Stachowiak <mjs@apple.com>

Reviewed by Alexey.

  • use global object instead of null for "this" on unqualified calls

This fixes 10 more JSC test regressions.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:51 PM Changeset in webkit [33779] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • throw proper exceptions for objects that don't implement call or construct

This fixes 21 more JSC test regressions. It is also seemingly an
0.5% progression.

  • VM/ExceptionHelpers.cpp: (KJS::createNotAnObjectError): (KJS::createNotAConstructorError): (KJS::createNotAFunctionError):
  • VM/ExceptionHelpers.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:50 PM Changeset in webkit [33778] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

Implement emitCode for ConstDeclNode.

Reviewed by Geoff

This fixes the crash (assertion) in js1_5/Scope/scope-001.js

11:50 PM Changeset in webkit [33777] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • add some support for the split window object

This fixes many layout tests.

  • VM/Machine.cpp: (KJS::resolveBaseAndFunc): Use toThisObject() to ensure we get the wrapper global, if one exists, as the "this" object.
  • kjs/function.cpp: (KJS::globalFuncEval): Use toGlobalObject() to handle the wrapper case properly.
11:50 PM Changeset in webkit [33776] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • restore ScopeChain::operator= to avoid crash on many layout tests

Otherwise, FunctionImp::setScope would cause a reference
underflow. I implemented using the copy construct and swap idiom.

  • kjs/scope_chain.h: (KJS::ScopeChain::swap): (KJS::ScopeChain::operator=):
11:50 PM Changeset in webkit [33775] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Bug 18649: SQUIRRELFISH: correctly handle exceptions in eval code
<https://bugs.webkit.org/show_bug.cgi?id=18649>

Reviewed by Geoff

Allocate a callframe for eval() and initialise with a null codeBlock to
indicate native code. This prevents the unwinder from clobbering the
register stack.

11:50 PM Changeset in webkit [33774] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/WebKit/mac

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

Build fix.

  • ChangeLog:
  • WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame scopeChain]):
11:50 PM Changeset in webkit [33773] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Removed ScopeChain::push(ScopeChain&) because it was unused. Moved
ScopeChain::print to ScopeChainNode.

ScopeChain is now nothing more than a resource-handling wrapper around
ScopeChainNode.

11:50 PM Changeset in webkit [33772] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej.

Bug 18671: SquirrelFish: continue inside switch fails
<https://bugs.webkit.org/show_bug.cgi?id=18671>

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::jumpContextForLabel):
  • VM/CodeGenerator.h:
  • kjs/nodes.cpp: (KJS::ContinueNode::emitCode):
11:50 PM Changeset in webkit [33771] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Moved push(JSObject*) and pop() from ScopeChain to ScopeChainNode,
rearranging scope_chain.h a bit.

SunSpider reports no change.

11:50 PM Changeset in webkit [33770] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Moved bottom() from ScopeChain to ScopeChainNode, simplifying it based
on the knowledge that the ScopeChain is never empty.

SunSpider reports no change.

11:50 PM Changeset in webkit [33769] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Moved begin() and end() from ScopeChain to ScopeChainNode.

Also marked a few methods "const".

SunSpider reports no change.

11:50 PM Changeset in webkit [33768] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Turned ScopeChain::depth into a stand-alone function, and simplified it
a bit.

I also moved ScopeChain::depth to Machine.cpp because it doesn't report
the true depth of the ScopeChain -- just the Machine's perspective of
its depth within a given call frame.

SunSpider reports no change.

11:50 PM Changeset in webkit [33767] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Removed indirection in ScopeChain::ref / ScopeChain::deref.

SunSpider reports no change.

  • kjs/scope_chain.h: (KJS::ScopeChain::ScopeChain): (KJS::ScopeChain::~ScopeChain): (KJS::ScopeChain::clear):
11:50 PM Changeset in webkit [33766] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Fix debug build

11:50 PM Changeset in webkit [33765] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Bug 18664: SQUIRRELFISH: correctly throw a SyntaxError when parsing of eval code fails
<https://bugs.webkit.org/show_bug.cgi?id=18664>

Patch from Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver

Correctly throw a SyntaxError when parsing of eval code fails.

11:50 PM Changeset in webkit [33764] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Partial fix for Bug 18649: SQUIRRELFISH: correctly handle exceptions in eval code

Reviewed by Geoff

Make sure we correct the register state before jumping to vm_throw.

11:50 PM Changeset in webkit [33763] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fixed reviewer named in old commit message

11:50 PM Changeset in webkit [33762] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Simplified ScopeChain ref/deref.

SunSpider reports a .4% speedup.

  • kjs/scope_chain.h: (KJS::ScopeChainNode::ref): Removed this function because it was nonsense. ScopeChainNodes are initialized with a refCount of 1, so the loop was guaranteed to iterate exactly once.
11:50 PM Changeset in webkit [33761] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Removed support for empty ScopeChains.

SunSpider reports no change.

11:50 PM Changeset in webkit [33760] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Removed some completely unused ScopeChain member functions.

SunSpider reports no change.

11:50 PM Changeset in webkit [33759] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Avoid creating unnecessary ScopeChain objects, to reduce refcount churn.

SunSpider reports no change.

11:50 PM Changeset in webkit [33758] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Alexey.

Add some braces.x

  • kjs/testkjs.cpp: (runWithScripts):
11:50 PM Changeset in webkit [33757] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • only print "End:" output when -d flag is passed.

This fixes half of our failing JSC regression tests.

  • kjs/testkjs.cpp: (runWithScripts):
11:50 PM Changeset in webkit [33756] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej.

Add support for variable declarations in eval code.

  • VM/CodeBlock.h: (KJS::EvalCodeBlock::EvalCodeBlock):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::CodeGenerator):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::execute):
  • VM/Machine.h:
  • kjs/function.cpp: (KJS::globalFuncEval):
  • kjs/nodes.cpp: (KJS::EvalNode::generateCode):
  • kjs/nodes.h: (KJS::EvalNode::):
11:49 PM Changeset in webkit [33755] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Throw exceptions for invalid continue, break, and return statements.

Reviewed by Maciej

Simple refactoring and extension of Cameron's AssignErrorNode, etc patch

11:49 PM Changeset in webkit [33754] by mrowe@apple.com
  • 15 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Removed Machine.cpp from AllInOneFile.cpp, and manually inlined a few
things that used to be inlined automatically.

1.9% speedup on SunSpider.

My hope is that we'll face fewer surprises in Machine.cpp codegen, now
that GCC is making fewer decisions. The speedup seems to confirm that.

11:49 PM Changeset in webkit [33753] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Bug 18642: Iterator context may get placed into the return register, leading to much badness
<https://bugs.webkit.org/show_bug.cgi?id=18642>

Reviewed by Maciej

To prevent incorrectly reusing what will become the result register for
eval and global code execution, we need to request and ref the destination
in advance of codegen. Unfortunately this may lead to unnecessary copying,
although in future we can probably limit this. Curiously SunSpider shows
a progression in a number of tests, although it comes out as a wash overall.

This also fixes one of the regressions in run-javascriptcore-tests.

11:49 PM Changeset in webkit [33752] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej.

Add support for AssignErrorNode, PrefixErrorNode, and PostfixErrorNode.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitCreateError):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::PostfixErrorNode::emitCode): (KJS::PrefixErrorNode::emitCode): (KJS::AssignErrorNode::emitCode):
  • kjs/nodes.h:
11:49 PM Changeset in webkit [33751] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

Provide line number information in exceptions

Reviewed by Geoff and Mark

Simple patch, adds line number information metadata to CodeBlock
and a simple method to get the line number responsible for a given
Instruction*.

11:49 PM Changeset in webkit [33750] by Stephanie Lewis
  • 5 edits in trunk/WebKitTools

2008-05-19 Stephanie Lewis <Stephanie Lewis>

Explicitly set run mode to 32bit unless overridden to avoid
confusion when running tests

  • Scripts/build-dumprendertree:
  • Scripts/gdb-safari:
  • Scripts/run-webkit-tests:
  • Scripts/webkitdirs.pm:
11:49 PM Changeset in webkit [33749] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

Provide "sourceURL" in exceptions

Reviewed by Maciej

11:49 PM Changeset in webkit [33748] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Don't call emitCode directly on subnodes, instead use CodeGenerator::emitNode

Reviewed by Maciej

This patch just a preparation for tracking line numbers.

11:49 PM Changeset in webkit [33747] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Bug 18619: Support continue, break, and return in try .. finally blocks
<https://bugs.webkit.org/show_bug.cgi?id=18619>

Reviewed by Maciej

This patch replaces the current partial finally support (which uses code
duplication to achieve what it does) with a subroutine based approach.
This has a number of advantages over code duplication:

  • Reduced code size
  • Simplified exception handling as the finaliser code only exists in one place, so no "magic" is needed to get the correct handler for a finaliser.
  • When we support instruction to line number mapping we won't need to worry about the dramatic code movement caused by duplication

On the downside it is necessary to add two new opcodes, op_jsr and op_sret
to enter and exit the finaliser subroutines, happily SunSpider reports
a performance progression (gcc amazes me) and ubench reports a wash.

While jsr and sret provide a mechanism that allows us to enter and exit
any arbitrary finaliser we need to, it was still necessary to increase
the amount of information tracked when entering and exiting both finaliser
scopes and dynamic scopes ("with"). This means "scopeDepth" is now
the combination of "finaliserDepth" and "dynamicScopeDepth". We also
now use a scopeContextStack to ensure that we pop scopes and execute
finalisers in the correct order. This increases the cost of "with" nodes
during codegen, but it should not be significant enough to effect real
world performance and greatly simplifies codegen for return, break and
continue when interacting with finalisers.

11:49 PM Changeset in webkit [33746] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Remove unnecessary files from testkjs, testapi and minidom targets.

Rubber-stamped by Oliver Hunt.

11:49 PM Changeset in webkit [33745] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Fixed ASSERT seen during run-sunspider of a debug build.

  • VM/CodeGenerator.h: Made the default codegen buffers bigger. SunSpider runs all tests in one global environment, so you end up with more than 128 locals. This is just a stop-gap until we code up a real solution to arbitrary symbol and label limits.
11:49 PM Changeset in webkit [33744] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Fixed a bug in exception unwinding, where we wouldn't deref the scope
chain in global scope, so we would leak ScopeChainNodes when exceptions
were thrown inside "with" and "catch" scopes.

Also did some cleanup of the unwinding code along the way.

Scope chain reference counting is still wrong in a few ways. I thought
I would fix this portion of it first.

run-sunspider shows no change.

  • VM/Machine.cpp: (KJS::Machine::unwindCallFrame): (KJS::Machine::throwException): (KJS::Machine::privateExecute):
  • VM/Machine.h:
11:49 PM Changeset in webkit [33743] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Add more exception checking to toNumber conversions

Reviewed by Maciej

This corrects op_pre_dec, op_negate, op_mod and op_sub.

11:49 PM Changeset in webkit [33742] by mrowe@apple.com
  • 11 edits in branches/squirrelfish/JavaScriptCore

2008-04-17 Geoffrey Garen <ggaren@apple.com> and Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver Hunt.

Behold: eval.

Introduced a new opcode: op_call_eval. In the normal case, it performs
an eval. In the case where eval has been overridden in some way, it
performs a function call.

  • VM/CodeGenerator.h: Added a feature so the code generator knows not to optimized locals in eval code.
11:49 PM Changeset in webkit [33741] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Added some ASSERTs to document codegen failures in
run-javascriptcore-tests.

For all tests, program-level codegen now either succeeds, or fails with
an ASSERT.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::addVar): (KJS::CodeGenerator::CodeGenerator): (KJS::CodeGenerator::newTemporary): (KJS::CodeGenerator::newLabel):
11:49 PM Changeset in webkit [33740] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Fixed another case of a dst register being an unreferenced temporary
(caused an ASSERT when running the full sunspider suite).

  • kjs/nodes.cpp: (KJS::CaseBlockNode::emitCodeForBlock):
11:49 PM Changeset in webkit [33739] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-04-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • add documentation (and meaningful parameter names) for arithmetic and bitwise binary ops
  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitMul): (KJS::CodeGenerator::emitDiv): (KJS::CodeGenerator::emitMod): (KJS::CodeGenerator::emitSub): (KJS::CodeGenerator::emitLeftShift): (KJS::CodeGenerator::emitRightShift): (KJS::CodeGenerator::emitUnsignedRightShift): (KJS::CodeGenerator::emitBitAnd): (KJS::CodeGenerator::emitBitXOr): (KJS::CodeGenerator::emitBitOr):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::MultNode::emitCode): (KJS::DivNode::emitCode): (KJS::ModNode::emitCode): (KJS::SubNode::emitCode): (KJS::LeftShiftNode::emitCode): (KJS::RightShiftNode::emitCode): (KJS::UnsignedRightShiftNode::emitCode): (KJS::BitAndNode::emitCode): (KJS::BitXOrNode::emitCode): (KJS::BitOrNode::emitCode): (KJS::emitReadModifyAssignment): (KJS::ReadModifyResolveNode::emitCode):
11:49 PM Changeset in webkit [33738] by mrowe@apple.com
  • 18 edits in branches/squirrelfish/JavaScriptCore

Exception checks for toNumber in op_pre_inc

Reviewed by Geoff

This is somewhat more convoluted than the simple hadException checks
we currently use. Instead we use special toNumber conversions that
select between the exception and ordinary vPC. This allows us to
remove any branches in the common case (incrementing a number).

11:49 PM Changeset in webkit [33737] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • ensure that activations are kept in a register to protect them from GC

Also renamed OptionalCalleeScopeChain constant to OptionalCalleeActivation, since
that is what is now kept there, and there is no more need to keep the scope chain in
the register file.

  • VM/Machine.cpp: (KJS::initializeCallFrame): (KJS::scopeChainForCall):
  • VM/Machine.h: (KJS::Machine::):
11:49 PM Changeset in webkit [33736] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Made "this" work in program code / global scope.

The machine can initialize "this" prior to execution because it knows
that, for program code, "this" is always stored in lr1.

  • VM/Machine.cpp: (KJS::Machine::execute):
  • VM/Machine.h: (KJS::Machine::):
  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
11:49 PM Changeset in webkit [33735] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Fixed a codegen bug when returning from inside a dynamic scope (a with
or catch block): we need to pop any dynamic scope(s) that have been
added so op_ret can find the activation object at the top of the scope
chain.

  • kjs/nodes.cpp: (KJS::ReturnNode::emitCode): If we're returning from inside a dynamic scope, emit a jmp_scopes to take care of popping any dynamic scope(s) and then branching to the return instruction.
11:49 PM Changeset in webkit [33734] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-04-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • document the add and get_prop_id opcodes

In addition to adding documentation in comments, I changed
references to register IDs or indices relating to these opcodes to
have meaningful names instead of r0 r1 r2.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitAdd):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/nodes.cpp: (KJS::DotAccessorNode::emitCode): (KJS::FunctionCallDotNode::emitCode): (KJS::PostIncDotNode::emitCode): (KJS::PostDecDotNode::emitCode): (KJS::PreIncDotNode::emitCode): (KJS::PreDecDotNode::emitCode): (KJS::AddNode::emitCode): (KJS::ReadModifyDotNode::emitCode):
11:49 PM Changeset in webkit [33733] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt and Maciej Stachowiak.

Fixed a codegen bug in with and switch, and added an ASSERT to
make sure it doesn't happen again.

emitCode() assumes that dst, if non-zero, is either referenced or
non-temporary (i.e., it assumes that newTemporary() will return a
register not equal to dst). Certain callers to emitCode() weren't
guaranteeing that to be so, so temporary register values were being
overwritten.

  • VM/CodeGenerator.h: (KJS::CodeGenerator::emitNode): ASSERT that dst is referenced or non-temporary.
  • kjs/nodes.cpp: (KJS::CommaNode::emitCode): Reference the dst we pass.

(KJS::WithNode::emitCode): No need to pass an explicit dst register.

(KJS::CaseBlockNode::emitCodeForBlock): No need to pass an explicit dst register.
(KJS::SwitchNode::emitCode): No need to pass an explicit dst register.

  • kjs/nodes.h: Made dst the last parameter to emitCodeForBlock, to match emitCode.
11:48 PM Changeset in webkit [33732] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Bug 18526: Throw exceptions when resolve fails for op_resolve_base_and_func.
<https://bugs.webkit.org/show_bug.cgi?id=18526>

Reviewed by Maciej

Very simple fix, sunspider shows a 0.7% progression, ubench shows a 0.4% regression.

11:48 PM Changeset in webkit [33731] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/SunSpider

2008-04-15 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Oliver.

  • add newly working tests to squirrelfish list
  • tests/LIST-SQUIRRELFISH: Add 3d-raytrace and string-unpack-code
11:48 PM Changeset in webkit [33730] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-15 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix incorrect result on 3d-raytrace test

Oliver found and tracked down this bug, I just typed in the fix.

  • VM/Machine.cpp: (KJS::slideRegisterWindowForCall): When setting omitted parameters to undefined, account for the space for local variables.
11:48 PM Changeset in webkit [33729] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-15 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix codegen handling of dst registers

1.006x speedup (not sure why).

Most emitCode functions take an optional "dst" parameter that says
where the output of the instruction should be written. I made some
functions for convenient handling of the dst register:

  • VM/CodeGenerator.h: (KJS::CodeGenerator::tempDestination): Takes the dst register. Returns it if it is not null and is a temporary, otherwise allocates a new temporary. This is intended for cases where an intermediate value might be written into the dst

(KJS::CodeGenerator::finalDestination): Takes the dst register and an optional
register that was used as a temp destination. Picks the right thing for the final
output. Intended to be used as the output register for the instruction that generates
the final value of a particular node.

(KJS::CodeGenerator::moveToDestinationIfNeeded): Takes dst and a
RegisterID; moves from the register to dst if dst is defined and
different from the register. This is intended for cases where the
result of a node is already in a specific register (likely a
local), and so no code needs to be generated unless a specific
destination has been requested, in which case a move is needed.

I also applied these methods throughout emitCode functions. In
some cases this was just cleanup, in other cases I fixed actual
codegen bugs. Below I have given specific comments for the cases
where I believe I fixed a codegen bug, or improved quality of codegen.

  • kjs/nodes.cpp: (KJS::NullNode::emitCode): (KJS::FalseNode::emitCode): (KJS::TrueNode::emitCode): (KJS::NumberNode::emitCode): (KJS::StringNode::emitCode): (KJS::RegExpNode::emitCode): (KJS::ThisNode::emitCode): Now avoids emitting a mov when dst is the same as the this register (the unlikely case of "this = this"); (KJS::ResolveNode::emitCode): Now avoids emitting a mov when dst is the same as the local regiester, in the local var case (the unlikely case of "x = x"); (KJS::ArrayNode::emitCode): Fixed a codegen bug where array literal element expressions may have observed an intermediate value of constructing the array. (KJS::ObjectLiteralNode::emitCode): (KJS::PropertyListNode::emitCode): Fixed a codegen bug where object literal property definition expressions may have obesrved an intermediate value of constructing the object. (KJS::BracketAccessorNode::emitCode): (KJS::DotAccessorNode::emitCode): (KJS::NewExprNode::emitCode): (KJS::FunctionCallValueNode::emitCode): (KJS::FunctionCallBracketNode::emitCode): (KJS::FunctionCallDotNode::emitCode): (KJS::PostIncResolveNode::emitCode): (KJS::PostDecResolveNode::emitCode): (KJS::PostIncBracketNode::emitCode): (KJS::PostDecBracketNode::emitCode): (KJS::PostIncDotNode::emitCode): (KJS::PostDecDotNode::emitCode): (KJS::DeleteResolveNode::emitCode): (KJS::DeleteBracketNode::emitCode): (KJS::DeleteDotNode::emitCode): (KJS::DeleteValueNode::emitCode): (KJS::VoidNode::emitCode): (KJS::TypeOfResolveNode::emitCode): (KJS::TypeOfValueNode::emitCode): (KJS::PreIncResolveNode::emitCode): Fixed a codegen bug where the final value would not be output to the dst register in the local var case. (KJS::PreDecResolveNode::emitCode): Fixed a codegen bug where the final value would not be output to the dst register in the local var case. (KJS::PreIncBracketNode::emitCode): (KJS::PreDecBracketNode::emitCode): (KJS::PreIncDotNode::emitCode): (KJS::PreDecDotNode::emitCode): (KJS::UnaryPlusNode::emitCode): (KJS::NegateNode::emitCode): (KJS::BitwiseNotNode::emitCode): (KJS::LogicalNotNode::emitCode): (KJS::MultNode::emitCode): (KJS::DivNode::emitCode): (KJS::ModNode::emitCode): (KJS::AddNode::emitCode): (KJS::SubNode::emitCode): (KJS::LeftShiftNode::emitCode): (KJS::RightShiftNode::emitCode): (KJS::UnsignedRightShiftNode::emitCode): (KJS::LessNode::emitCode): (KJS::GreaterNode::emitCode): (KJS::LessEqNode::emitCode): (KJS::GreaterEqNode::emitCode): (KJS::InstanceOfNode::emitCode): (KJS::InNode::emitCode): (KJS::EqualNode::emitCode): (KJS::NotEqualNode::emitCode): (KJS::StrictEqualNode::emitCode): (KJS::NotStrictEqualNode::emitCode): (KJS::BitAndNode::emitCode): (KJS::BitXOrNode::emitCode): (KJS::BitOrNode::emitCode): (KJS::LogicalAndNode::emitCode): (KJS::LogicalOrNode::emitCode): (KJS::ConditionalNode::emitCode): (KJS::emitReadModifyAssignment): Allow an out argument separate from the operands, needed for fixes below. (KJS::ReadModifyResolveNode::emitCode): Fixed a codegen bug where the right side of the expression may observe an intermediate value. (KJS::AssignResolveNode::emitCode): Fixed a codegen bug where the right side of the expression may observe an intermediate value. (KJS::ReadModifyDotNode::emitCode): Fixed a codegen bug where the right side of the expression may observe an intermediate value. (KJS::ReadModifyBracketNode::emitCode): Fixed a codegen bug where the right side of the expression may observe an intermediate value. (KJS::CommaNode::emitCode): Avoid writing temporary value to dst register. (KJS::ReturnNode::emitCode): Void return should return undefined, not null. (KJS::FuncExprNode::emitCode):
11:48 PM Changeset in webkit [33728] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-15 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • fix huge performance regression (from trunk) in string-unpack-code

This restores string-unpack-code performance to parity with
trunk (2.27x speedup relative to previous SquirrelFish)

  • VM/Machine.cpp: (KJS::Machine::execute): Shrink register file after call to avoid growing repeatedly.
11:48 PM Changeset in webkit [33727] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Fixed dumpCallFrame to match our new convention of passing around a
ScopeChainNode* instead of a ScopeChain*.

  • JavaScriptCore.exp:
  • VM/Machine.cpp: (KJS::Machine::dumpCallFrame):
  • VM/Machine.h:
11:48 PM Changeset in webkit [33726] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Bug 18436: Need to throw exception on read/modify/write or similar resolve for nonexistent property
<https://bugs.webkit.org/show_bug.cgi?id=18436>

Reviewed by Maciej.

Add op_resolve_base_and_property for read/modify/write operations,
this adds a "superinstruction" to resolve the base and value of a
property simultaneously. Just using resolveBase and resolve results
in an 5% regression in ubench, 30% in loop-empty-resolve (which is
expected). 1.3% progression in sunspider, 2.1% in ubench, with a
21% gain in loop-empty-resolve. The only outlier is function-missing-args
which gets a 3% regression that I could never resolve.

11:48 PM Changeset in webkit [33725] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-04-15 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

3d-raytrace and string-unpack-code now run.

The basic approach is to pass around ScopeChainNode* instead of
ScopeChain*, which in addition to not becoming suddenly an invalid
pointer also saves an indirection.

This is an 0.4% speedup on SunSpider --squirrelfish (1.8% on --ubench)

  • VM/Machine.cpp: (KJS::resolve): (KJS::resolveBase): (KJS::resolveBaseAndFunc): (KJS::initializeCallFrame): (KJS::scopeChainForCall): (KJS::Machine::unwindCallFrame): (KJS::Machine::throwException): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/Machine.h:
  • VM/Register.h: (KJS::Register::):
  • kjs/nodes.cpp: (KJS::EvalNode::generateCode): (KJS::FunctionBodyNode::generateCode): (KJS::ProgramNode::generateCode): (KJS::ProgramNode::processDeclarations): (KJS::EvalNode::processDeclarations): (KJS::FuncDeclNode::makeFunction): (KJS::FuncExprNode::makeFunction):
  • kjs/nodes.h: (KJS::ProgramNode::): (KJS::EvalNode::): (KJS::FunctionBodyNode::):
  • kjs/object.h:
  • kjs/scope_chain.h: (KJS::ScopeChainNode::ScopeChainNode): (KJS::ScopeChainNode::deref): (KJS::ScopeChainIterator::ScopeChainIterator): (KJS::ScopeChainIterator::operator*): (KJS::ScopeChainIterator::operator->): (KJS::ScopeChain::ScopeChain): (KJS::ScopeChain::node): (KJS::ScopeChain::deref): (KJS::ScopeChain::ref): (KJS::ScopeChainNode::ref): (KJS::ScopeChainNode::release): (KJS::ScopeChainNode::begin): (KJS::ScopeChainNode::end):
11:48 PM Changeset in webkit [33724] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Fixed crash when accessing registers in a torn-off activation object.

  • kjs/JSActivation.cpp: (KJS::JSActivation::copyRegisters): Update our registerOffset after copying our registers, since our offset should now be relative to our private register array, not the shared register file.
11:48 PM Changeset in webkit [33723] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix a codegen flaw that makes some tests run way too fast or way too slow

The basic problem was that FunctionCallResolveNode results in
codegen which can incorrectly write an intermediate value into the
dst register even when that is a local. I added convenience
functions to CodeGenerator for getting this right, but for now I
only fixed FunctionCallResolve.

  • VM/CodeGenerator.h: (KJS::CodeGenerator::tempDestination): (KJS::CodeGenerator::):
  • kjs/nodes.cpp: (KJS::FunctionCallResolveNode::emitCode):
11:48 PM Changeset in webkit [33722] by mrowe@apple.com
  • 1 edit
    8 adds in branches/squirrelfish/SunSpider

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Oliver.

  • move ubench tests properly.
  • tests/ubench: Added.
  • tests/ubench/function-closure.js: Added.
  • tests/ubench/function-empty.js: Added.
  • tests/ubench/function-missing-args.js: Added.
  • tests/ubench/function-sum.js: Added.
  • tests/ubench/loop-empty-resolve.js: Added.
  • tests/ubench/loop-empty.js: Added.
  • tests/ubench/loop-sum.js: Added.
11:48 PM Changeset in webkit [33721] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/WebKitTools

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • added support for --ubench mode
  • Scripts/run-sunspider:
11:48 PM Changeset in webkit [33720] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/SunSpider

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Oliver.

  • sunspider: Don't force --runs=1 in squirrelfish mode any more.
11:48 PM Changeset in webkit [33719] by mrowe@apple.com
  • 12 edits in branches/squirrelfish

JavaScriptCore:

2008-04-14 Gabor Loki <loki@inf.u-szeged.hu>

Reviewed and slightly tweaked by Geoffrey Garen.

Bug 18489: Squirrelfish doesn't build on linux
<https://bugs.webkit.org/show_bug.cgi?id=18489>

  • JavaScriptCore.pri: Add VM into include path and its files into source set
  • VM/JSPropertyNameIterator.cpp: Fix include name
  • VM/Machine.cpp: Add UNLIKELY macro for GCC
  • VM/Machine.h: Add missing includes
  • VM/RegisterFile.cpp: Add missing include
  • kjs/testkjs.pro: Add VM into include path

WebCore:

2008-04-14 Gabor Loki <loki@inf.u-szeged.hu>

Reviewed by Geoffrey Garen.

Bug 18489: Squirrelfish doesn't build on linux
<https://bugs.webkit.org/show_bug.cgi?id=18489>

11:48 PM Changeset in webkit [33718] by mrowe@apple.com
  • 3 edits
    1 add
    7 deletes in branches/squirrelfish/SunSpider

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • make --squirrelfish mode use the real harness, but a reduced set of tests

Also add a new ubench mode which runs the older squirrelfish microbenchmarks.

  • sunspider:
  • tests/LIST-SQUIRRELFISH:
  • tests/LIST-UBENCH: Added.
  • tests/squirrelfish: Moved to tests/ubench
11:48 PM Changeset in webkit [33717] by mrowe@apple.com
  • 1 edit
    1 delete in branches/squirrelfish/SunSpider

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

Reviewed by Maciej Stachowiak.

Removed an unused test.

  • tests/squirrelfish/loop-resolve.js: Removed.
11:48 PM Changeset in webkit [33716] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Restored OwnPtr in some places where I had removed it previously. We
can have an OwnPtr to an undefined class in a header as long as the
class's destructor isn't in the header.

11:48 PM Changeset in webkit [33715] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Fixed access to "this" inside dynamic scopes.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::registerForLocal): Always return a register for "this", even if we're not optimizing access to other locals. Because "this" is a keyword, it's always in a register and always accessible.
  • VM/CodeGenerator.h: (KJS::CodeGenerator::shouldOptimizeLocals): Factored out a function for determining whether we should optimize access to locals, since eval will need to make this test a little more complicated.
11:48 PM Changeset in webkit [33714] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Reviewed by Adam.

  • fix crash when running SunSpider full harness

When growing the register file's buffer to make space for new globals,
make sure to copy accounting for the fact that the new space is logically
at the beginning of the buffer in this case, instead of at the end as when
growing for a new call frame.

  • VM/RegisterFile.cpp: (KJS::RegisterFile::newBuffer): (KJS::RegisterFile::growBuffer): (KJS::RegisterFile::addGlobalSlots):
  • VM/RegisterFile.h:
11:48 PM Changeset in webkit [33713] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Mark constant pools for global and eval code (collectively known as
"program code"). (Constant pools for function code are already marked by
their functions.)

The global object is responsible for marking program code constant
pools. Code blocks add themselves to the mark set at creation time, and
remove themselves from the mark set at destruction time.

sunspider --squirrelfish reports a 1% speedup, perhaps because
generateCode() is now non-virtual.

  • kjs/nodes.cpp: I had to use manual init and delete in this file because putting an OwnPtr into the header would have created a circular header dependency.
11:48 PM Changeset in webkit [33712] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Bug 18231: Improve support for function call nodes in SquirrelFish
<https://bugs.webkit.org/show_bug.cgi?id=18231>

Reviewed by Maciej

Use correct value of 'this' for function calls.

11:48 PM Changeset in webkit [33711] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

This time for sure.

  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
11:48 PM Changeset in webkit [33710] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Fixed Interpreter::execute to honor the new model for returning non-NULL
values when an exception is thrown.

  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
11:48 PM Changeset in webkit [33709] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Fix SquirrelFish interpreter to pass internal exceptions back to
native code correctly.

Reviewed by Geoff

11:47 PM Changeset in webkit [33708] by mrowe@apple.com
  • 49 edits
    1 copy
    1 add in branches/squirrelfish

JavaScriptCore:

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

Reviewed by Geoffrey Garen.

Replace the use of getCallData in op_construct with the new
getConstructData function that replaces implementsConstruct.

  • API/JSCallbackConstructor.cpp: (KJS::JSCallbackConstructor::getConstructData):
  • API/JSCallbackConstructor.h:
  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h: (KJS::::getConstructData): (KJS::::construct):
  • API/JSObjectRef.cpp: (JSObjectIsConstructor):
  • JavaScriptCore.exp:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/CallData.h:
  • kjs/ConstructData.h: Copied from JavaScriptCore/kjs/CallData.h. (KJS::):
  • kjs/array_object.cpp: (KJS::ArrayObjectImp::getConstructData):
  • kjs/array_object.h:
  • kjs/bool_object.cpp: (KJS::BooleanObjectImp::getConstructData):
  • kjs/bool_object.h:
  • kjs/date_object.cpp: (KJS::DateObjectImp::getConstructData):
  • kjs/date_object.h:
  • kjs/error_object.cpp: (KJS::ErrorObjectImp::getConstructData): (KJS::NativeErrorImp::getConstructData):
  • kjs/error_object.h:
  • kjs/function.cpp: (KJS::FunctionImp::getCallData): (KJS::FunctionImp::getConstructData): (KJS::FunctionImp::construct):
  • kjs/function.h:
  • kjs/function_object.cpp: (KJS::FunctionObjectImp::getConstructData):
  • kjs/function_object.h:
  • kjs/nodes.cpp: (KJS::NewExprNode::inlineEvaluate):
  • kjs/number_object.cpp: (KJS::NumberObjectImp::getConstructData):
  • kjs/number_object.h:
  • kjs/object.cpp:
  • kjs/object.h:
  • kjs/object_object.cpp: (KJS::ObjectObjectImp::getConstructData):
  • kjs/object_object.h:
  • kjs/regexp_object.cpp: (KJS::RegExpObjectImp::getConstructData):
  • kjs/regexp_object.h:
  • kjs/string_object.cpp: (KJS::StringObjectImp::getConstructData):
  • kjs/string_object.h:
  • kjs/value.cpp: (KJS::JSCell::getConstructData):
  • kjs/value.h: (KJS::JSValue::getConstructData):

WebCore:

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

Reviewed by Geoffrey Garen.

Adjusted WebCore JS functions to the new "getConstructData" calling convention.

11:47 PM Changeset in webkit [33707] by mrowe@apple.com
  • 4 edits
    4 adds in branches/squirrelfish/JavaScriptCore

Bug 18420: SquirrelFish: need to throw Reference and Type errors
when attempting invalid operations on JSValues

Reviewed by Geoff

Add validation and exception checks to SquirrelFish so that the
correct exceptions are thrown for undefined variables, type errors
and toObject failure. Also handle exceptions thrown by native
function calls.

11:47 PM Changeset in webkit [33706] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Pass a function body node its function's scope chain, rather than the
current execution context's scope chain, when compiling it.

This doesn't matter yet, but it will once we start using the scope
chain during compilation.

sunspider --squirrelfish notes a tiny speedup.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:47 PM Changeset in webkit [33705] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Fix two bugs when throwing exceptions from re-entrant JS calls:

(1) Don't shrink the register file to 0, since our caller may still
be using it.

(2) In case of exception, return jsNull() instead of 0 because,
surprisingly, some JavaScriptCore clients rely on a function's return
value being safe to operate on even if the function threw an exception.

Also:

  • Changed FunctionImp::callAsFunction to honor the new semantics of exceptions not returning 0.
  • Renamed "handlerPC" to "handlerVPC" to match other uses of "VPC".
  • Renamed "exceptionData" to "exceptionValue", because "data" seemed to imply something more than just a JSValue.
  • Merged prepareException into throwException, since throwException was its only caller, and it seemed weird that throwException didn't take an exception as an argument.

sunspider --squirrelfish does not seem to complain on my machine, but it
complains a little (.6%) on Oliver's.

11:47 PM Changeset in webkit [33704] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Fixed op_construct for CallTypeNative to reacquire "r" before setting
its return value, since registerBase can theoretically change during the
execution of arbitrary code. (Not sure if any native constructors
actually make this possible.)

sunspider --squirrelfish does not seem to complain.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:47 PM Changeset in webkit [33703] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt and Sam Weinig.

Re-entrant execution of function code (global code -> built-in function
-> JS function):

Miraculously, sunspider --squirrelfish does not seem to complain.

A re-entrant function call is the same as a normal function call with
one exception: the re-entrant call leaves everything except for
CallerCodeBlock in the call frame header uninitialized, since the call
doesn't need to return to JS code. (It sets CallerCodeBlock to 0, to
indicate that the call shouldn't return to JS code.)

Also fixed a few issues along the way:

  • Fixed two bugs in the read-write List implementation that caused m_size and m_buffer to go stale.
  • Changed native call code to update "r" *before* setting the return value, since the call may in turn call JS code, which changes the value of "r".
  • Migrated initialization of "r" outside of Machine::privateExecute, because global code and function code initialize "r" differently.
  • Migrated a codegen warning from Machine::privateExecute to the wiki.
  • Removed unnecessary "r" parameter from slideRegisterWindowForCall
  • VM/Machine.cpp: (KJS::slideRegisterWindowForCall): (KJS::scopeChainForCall): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/Machine.h:
  • kjs/function.cpp: (KJS::FunctionImp::callAsFunction):
  • kjs/list.cpp: (KJS::List::getSlice):
  • kjs/list.h: (KJS::List::clear):
11:47 PM Changeset in webkit [33702] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/SunSpider

2008-04-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

Add newly runnable tests to --squirrelfish mode.

  • tests/LIST-SQUIRRELFISH:
11:47 PM Changeset in webkit [33701] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix problem with code generation for return with no argument

3d-cube now runs

  • kjs/nodes.cpp: (KJS::ReturnNode::emitCode):
11:47 PM Changeset in webkit [33700] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • Implement support for JS constructors

access-binary-trees and access-nbody now run.

Inexplicably a 1% speedup.

  • VM/Machine.cpp: (KJS::initializeCallFrame): (KJS::Machine::privateExecute):
  • VM/Machine.h: (KJS::Machine::):
11:47 PM Changeset in webkit [33699] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • More code cleanup in preparation for JS constructors

Factor the remaining interesting parts of JS function calls into
slideRegisterWindowForCall and scopeChainForCall.

  • VM/Machine.cpp: (KJS::slideRegisterWindowForCall): (KJS::scopeChainForCall): (KJS::Machine::privateExecute):
11:47 PM Changeset in webkit [33698] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • Code cleanup in preparation for JS constructors
  • Renamed returnInfo to callFrame.
  • Made an enum which defines what goes where in the call frame.
  • Factored out initializeCallFrame function from op_call
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitCall): (KJS::CodeGenerator::emitConstruct):
  • VM/Machine.cpp: (KJS::Machine::dumpRegisters): (KJS::initializeCallFrame): (KJS::Machine::unwindCallFrame): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/Machine.h: (KJS::Machine::):
11:47 PM Changeset in webkit [33697] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Fixed two bugs in register allocation for function calls:

(1) op_call used to allocate codeBlock->numVars too many registers for
each call frame, due to duplicated math. Fixing this revealed...

(2) By unconditionally calling resize(), op_call used to truncate the
register file when calling a function whose registers fit wholly within
the register file already allocated by its caller.

sunspider --squirrelfish reports no regression.

I also threw in a little extra formatting to dumpCallFrame, because it
helped me debug these issues.

  • VM/Machine.cpp: (KJS::Machine::dumpRegisters): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/RegisterFile.h: (KJS::RegisterFile::shrink): (KJS::RegisterFile::grow):
  • VM/RegisterFileStack.cpp: (KJS::RegisterFileStack::popRegisterFile):
11:47 PM Changeset in webkit [33696] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Next step toward re-entrant execution of function code (global code ->
built-in function -> JS function):

Made op_ret return from Machine::privateExecute if its calling codeBlock
is NULL.

I'm checking this in by itself to demonstrate that a more clever
mechanism is not necessary for performance.

sunspider --squirrelfish reports no regression.

  • ChangeLog:
  • VM/Machine.cpp: (KJS::Machine::execute): (KJS::Machine::privateExecute):
11:47 PM Changeset in webkit [33695] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Next step toward re-entrant execution of function code (global code ->
built-in function -> JS function):

Made Machine::execute return a value.

Sketched out some code for Machine::execute for functions -- still
doesn't work yet, though.

sunspider --squirrelfish reports no regression.

  • VM/Machine.cpp: (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/Machine.h:
  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
  • kjs/testkjs.cpp: (runWithScripts):
11:47 PM Changeset in webkit [33694] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

First step toward re-entrant execution of function code (global code ->
built-in function -> JS function):

Tiny bit of refactoring in the Machine class.

sunspider --squirrelfish reports no regression.

  • VM/Machine.cpp: (KJS::Machine::dumpRegisters): (KJS::Machine::unwindCallFrame): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/Machine.h: (KJS::Machine::isGlobalCallFrame):
  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
11:47 PM Changeset in webkit [33693] by mrowe@apple.com
  • 11 edits
    2 copies in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Support for re-entrant execution of global code (global code -> built-in
function -> global code).

Keep a stack of register files instead of just one. Globals propogate
between register files as the register files enter and exit the stack.

An activation still uses its own register file's base as its
registerBase, but the global object uses the register file *stack*'s
registerBase, which updates dynamically to match the register file at
the top of the stack.

sunspider --squirrelfish reports no regression.

11:47 PM Changeset in webkit [33692] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • initial preparatory work for JS constructors

1) Allocate registers for the returnInfo block and "this" value when generating code for
op_construct. These are not used yet, but the JS branch of op_construct will use them.

2) Adjust argc and argv appropriately for native constructor calls.

3) Assign return value in a more straightforward way in op_ret since this is actually
a bit faster (and makes up for the allocation of extra registers above).

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitConstruct):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:47 PM Changeset in webkit [33691] by mrowe@apple.com
  • 3 edits
    1 add in branches/squirrelfish/SunSpider

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

Reviewed by Maciej Stachowiak.

A little more love for --squirrelfish mode:

Fixed a misplaced sort. Results properly sort now.

Added a test list just for squirrelfish, and updated it to include
all currently passing SunSpider tests.

Fixed the pruning regexp to match 3d-morph.js.

  • sunspider:
11:47 PM Changeset in webkit [33690] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

fix changelog, bokay?

11:47 PM Changeset in webkit [33689] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Fixed crasing SunSpider tests.

Let's just pretend this never happened, bokay?

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::CodeGenerator):
  • VM/CodeGenerator.h:
  • VM/RegisterFile.cpp: (KJS::RegisterFile::addGlobals):
11:47 PM Changeset in webkit [33688] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Restored dumping of generated code as a command-line switch:
run-testkjs -d will do it.

11:47 PM Changeset in webkit [33687] by mrowe@apple.com
  • 12 edits
    2 adds in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Next step toward supporting re-entrant evaluation: Moved register file
maintenance code into a proper "RegisterFile" class.

There's a subtle change to the register file's internal layout: for
global code / the global object, registerOffset is always 0 now. In
other words, all register counting starts at 0, not 0 + (number of
global variables). The helps simplify accounting when the number of
global variables changes.

11:47 PM Changeset in webkit [33686] by mrowe@apple.com
  • 13 edits in branches/squirrelfish/JavaScriptCore

Bug 18338: Support exceptions in SquirrelFish <http://bugs.webkit.org/show_bug.cgi?id=18338>

Reviewed by Geoff

Initial support for exceptions in SquirrelFish, only supports finalisers in the
simple cases (eg. exceptions and non-goto/return across finaliser boundaries).
This doesn't add the required exception checks to existing code, it merely adds
support for throw, catch, and the required stack unwinding.

11:46 PM Changeset in webkit [33685] by mrowe@apple.com
  • 12 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

First step toward supporting re-entrant evaluation: Switch register
clients from using "registers", a pointer to a register vector, to
"registerBase", an indirect pointer to the logical first entry in the
register file. (The logical first entry is the first entry that is not
a global variable).

With a vector, offsets into the register file remain good when the
underlying buffer reallocates, but they go bad when the logical
first entry moves. (The logical first entry moves when new global
variables get added to the beginning of the register file.) With an
indirect pointer to the logical first entry, offsets will remain good
regardless.

1.4% speedup on sunspider --squirrelfish. I suspect this is due to
reduced allocation when creating closures, and reduced indirection
through the register vector.

  • wtf/Vector.h: Added an accessor for an indirect pointer to the vector's buffer, which we currently use (incorrectly) for registerBase. This is temporary scaffolding to allow us to change client code without changing behavior.
11:46 PM Changeset in webkit [33684] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Implement codegen for ReadModifyDotNode.

  • kjs/nodes.cpp: (KJS::ReadModifyDotNode::emitCode):
  • kjs/nodes.h:
11:46 PM Changeset in webkit [33683] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Fix codegen for PostIncDotNode and implement codegen for PostIncBracketNode,
PostDecBracketNode and PostDecDotNode.

  • kjs/nodes.cpp: (KJS::PostIncBracketNode::emitCode): (KJS::PostDecBracketNode::emitCode): (KJS::PostIncDotNode::emitCode): (KJS::PostDecDotNode::emitCode):
  • kjs/nodes.h:
11:46 PM Changeset in webkit [33682] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Geoffrey Garen.

Implement codegen for PreDecResolveNode, PreIncBracketNode, PreDecBracketNode,
PreIncDotNode and PreDecDotNode. This required adding one new op code, op_pre_dec.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitPreDec):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::PreDecResolveNode::emitCode): (KJS::PreIncBracketNode::emitCode): (KJS::PreDecBracketNode::emitCode): (KJS::PreIncDotNode::emitCode): (KJS::PreDecDotNode::emitCode):
  • kjs/nodes.h:
11:46 PM Changeset in webkit [33681] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Improved register dumping, plus a liberal smattering of "const". Here's
what the new format looks like:

(gdb) call (void)dumpCallFrame(codeBlock, scopeChain, registers->begin(), r)
4 instructions; 48 bytes at 0x509210; 3 locals (2 parameters); 1 temporaries

[ 0] load lr1, undefined(@k0)
[ 3] load lr1, 2(@k1)
[ 6] add tr0, lr2, lr1
[ 10] ret tr0

Constants:

k0 = undefined
k1 = 2

Register frame:

----------------------------------------

use | address | value

----------------------------------------
[return info] | 0x80ac08 | 0x5081c0
[return info] | 0x80ac0c | 0x508e90
[return info] | 0x80ac10 | 0x504acc
[return info] | 0x80ac14 | 0x2
[return info] | 0x80ac18 | 0x0
[return info] | 0x80ac1c | 0x7
[return info] | 0x80ac20 | 0x0
----------------------------------------
[param] | 0x80ac24 | 0x1
[param] | 0x80ac28 | 0x7
[var] | 0x80ac2c | 0xb
[temp] | 0x80ac30 | 0xf

11:46 PM Changeset in webkit [33680] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Support for evaluating multiple scripts in the same global environment.
(Still don't support re-entrant evaluation yet.)

The main changes here are:

(1) Obey the ECMA 10.1.3 rules regarding how to resolve collisions when
a given symbol is declared more than once. (This patch fixes the same
issue for function code, too.)

(2) In the case of var and/or function collisions, reuse the existing
storage slot. For global code, this is required for previously
generated instructions to continue to work. For function code, it's
more of a "nice to have": it makes register layout in the case of
collisions easier to understand, and has the added benefit of saving
memory.

(3) Allocate slots in the CodeGenerator's m_locals vector in parallel
to register indexes in the symbol table. This ensures that, given an
index in the symbol table, we can find the corresponding RegisterID
without hashing, which speeds up codegen.

I moved responsibility for emitting var and function initialization
instructions into the CodeGenerator, because bookkeeping in cases where
var, function, and/or parameter names collide requires a lot of
internal knowledge about the CodeGenerator.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::addVar): Removed responsibility for checking whether a var declaration overwrites "arguments", because the check is inappropriate for global code, which may not have a pre-existing "arguments" symbol in scope. Also changed this function to return a boolean indicating whether addVar actually created a new RegisterID, or just reused an old one.

(KJS::CodeGenerator::CodeGenerator): Split out the constructors for
function code and global code, since they're quite different now.

(KJS::CodeGenerator::registerForLocal): This function does its job
without any hashing now.

  • VM/Machine.cpp: Move old globals and update "r" before executing a new script. That way, old globals stay at a constant offset from "r", and previously optimized code still works.
  • VM/RegisterID.h: Added the ability to allocate a RegisterID before initializing its index field. We use this for parameters now.
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::symbolTableGet): Changed the ungettable getter ASSERT to account for the fact that symbol indexes are all negative.
11:46 PM Changeset in webkit [33679] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fix ChangeLog

11:46 PM Changeset in webkit [33678] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Geoffrey Garen.

Implement codegen for ForInNode.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitIn):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::InNode::emitCode):
  • kjs/nodes.h:
11:46 PM Changeset in webkit [33677] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

  • Implement codegen for DeleteResolveNode, DeleteBracketNode, DeleteDotNode and DeleteValueNode.
  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitGetPropId): (KJS::CodeGenerator::emitPutPropId): (KJS::CodeGenerator::emitDeletePropId): (KJS::CodeGenerator::emitDeletePropVal): (KJS::CodeGenerator::emitPutPropIndex):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::DeleteResolveNode::emitCode): (KJS::DeleteBracketNode::emitCode): (KJS::DeleteDotNode::emitCode): (KJS::DeleteValueNode::emitCode):
  • kjs/nodes.h:
11:46 PM Changeset in webkit [33676] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

  • Implement codegen for Switch statements.
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::pushJumpContext): (KJS::CodeGenerator::popJumpContext): (KJS::CodeGenerator::jumpContextForLabel):
  • VM/CodeGenerator.h: Rename LoopContext to JumpContext now that it used of Switch statements in addition to loops.
  • kjs/nodes.cpp: (KJS::DoWhileNode::emitCode): (KJS::WhileNode::emitCode): (KJS::ForNode::emitCode): (KJS::ForInNode::emitCode): (KJS::ContinueNode::emitCode): (KJS::BreakNode::emitCode): (KJS::CaseBlockNode::emitCodeForBlock): (KJS::SwitchNode::emitCode):
  • kjs/nodes.h: (KJS::CaseClauseNode::expr): (KJS::CaseClauseNode::children): (KJS::CaseBlockNode::):
11:46 PM Changeset in webkit [33675] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-03 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • fix crash in codegen from new nodes
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitConstruct):
  • kjs/nodes.h:
11:46 PM Changeset in webkit [33674] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/kjs/nodes.h

File I forgot in my last commit.

11:46 PM Changeset in webkit [33673] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-03 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • kjs/nodes.cpp: (KJS::ReadModifyResolveNode::emitCode): (KJS::ReadModifyBracketNode::emitCode):
  • kjs/nodes.h:
11:46 PM Changeset in webkit [33672] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-02 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • take a shot at marking constant pools for global and eval code

Geoff says this won't really work in all cases but is an ok stopgap.

  • kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::mark):
11:46 PM Changeset in webkit [33671] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-02 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • fix 2x perf regression in 3d-morph
  • VM/Machine.cpp: (KJS::Machine::privateExecute): If we subbed in null for the global object, don't toObject it, since that will throw an exception (very slowly).
11:46 PM Changeset in webkit [33670] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-02 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Geoff

  • fix Release build
  • kjs/nodes.cpp: (KJS::getNonLocalSymbol):
11:46 PM Changeset in webkit [33669] by mrowe@apple.com
  • 10 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Removed the last vestiges of LocalStorage from JSVariableObject and
JSGlobalObject.

  • kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::saveLocalStorage): Save and restore from/to registers. Use stub isReadOnly and isDontEnum methods for now, until we really implement attributes in the symbol table. (KJS::JSGlobalObject::restoreLocalStorage): (KJS::JSGlobalObject::reset):
  • kjs/JSVariableObject.cpp: (KJS::JSVariableObject::getPropertyNames): Use stub isDontEnum method for now, as above. (KJS::JSVariableObject::getPropertyAttributes): ditto
  • kjs/JSVariableObject.h: Removed LocalStorage from JSVariableObjectData. Removed mark method, because subclasses implement different strategies for marking registers. (KJS::JSVariableObject::isReadOnly): Stub method (KJS::JSVariableObject::isDontEnum): ditto

Changed the code below to ASSERT_NOT_REACHED() and return 0, since it
can no longer retrieve LocalStorage from the ExecState. (Eventually,
we'll just remove this code and all its friends, but that's a task for
later.)

  • kjs/ExecState.cpp: (KJS::ExecState::ExecState):
  • kjs/function.cpp: (KJS::ActivationImp::markChildren):
  • kjs/function.h:
  • kjs/nodes.cpp: (KJS::getNonLocalSymbol): (KJS::ScopeNode::optimizeVariableAccess): (KJS::ProgramNode::processDeclarations):
11:46 PM Changeset in webkit [33668] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

reverse order of last two ChangeLog entries (oops)

11:46 PM Changeset in webkit [33667] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • mark the constant pool (at least for function code blocks)
  • VM/CodeBlock.cpp: (KJS::CodeBlock::mark):
  • VM/CodeBlock.h:
  • kjs/function.cpp: (KJS::FunctionImp::mark):
  • kjs/nodes.cpp: (KJS::ScopeNode::mark):
  • kjs/nodes.h: (KJS::FuncExprNode::body): (KJS::FuncDeclNode::body):
11:46 PM Changeset in webkit [33666] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • mark the constant pool (at least for function code blocks)
  • VM/CodeBlock.cpp: (KJS::CodeBlock::mark):
  • VM/CodeBlock.h:
  • kjs/function.cpp: (KJS::FunctionImp::mark):
  • kjs/nodes.cpp: (KJS::ScopeNode::mark):
  • kjs/nodes.h: (KJS::FuncExprNode::body): (KJS::FuncDeclNode::body):
11:46 PM Changeset in webkit [33665] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Beth Dakin.

Cleaned up a few loose ends.

  • JavaScriptCore.exp: Export dumpRegisters, so it's visible to gdb even if we don't explicitly call it in the source text.
  • VM/Machine.cpp: (KJS::Machine::privateExecute): No need to call dumpRegisters anymore, since that was just a hack for gdb's sake.
  • kjs/JSActivation.h: Removed obsolete comment.
  • VM/CodeGenerator.cpp: Added ASSERTs to verify that the localCount we're given matches the number of locals actually allocated.
  • VM/CodeGenerator.h: (KJS::CodeGenerator::CodeGenerator): Changed "localCount" to include the parameter count, since we're using the word "local" to mean parameter, var, function, or "this". Renamed "m_nextLocal" to "m_nextVar", since "m_nextLocal" doesn't contrast well with "m_nextParameter".

Also moved tracking of implicit "this" parameter from here...

  • kjs/nodes.cpp: (KJS::FunctionBodyNode::generateCode): ... to here (KJS::ProgramNode::generateCode): ... and here
  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump): Added missing "\n".
11:46 PM Changeset in webkit [33664] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver.

Bug 18274: ResolveNode::emitCode() doesn't make a new temporary when dst

is 0, leading to incorrect codegen

<http://bugs.webkit.org/show_bug.cgi?id=18274>

11:46 PM Changeset in webkit [33663] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix bug in for..in codegen (gotta use ident, not m_ident)
  • kjs/nodes.cpp: (KJS::ForInNode::emitCode):
11:46 PM Changeset in webkit [33662] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • Add suport for regexp literals
  • VM/CodeBlock.cpp: (KJS::regexpToSourceString): (KJS::regexpName): (KJS::CodeBlock::dump):
  • VM/CodeBlock.h:
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::addRegExp): (KJS::CodeGenerator::emitNewRegExp):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::RegExpNode::emitCode):
  • kjs/nodes.h:
11:45 PM Changeset in webkit [33661] by mrowe@apple.com
  • 12 edits
    1 copy
    1 add in branches/squirrelfish/JavaScriptCore

Add support for for..in nodes

Reviewed by Geoff

Added two new opcodes to get_pnames and next_pname to handle iterating
over the set of properties on an object. This iterator is explicitly
invalidated and the property name array is released on standard exit
from the loop, otherwise we rely on GC to do the clean up for us.

11:45 PM Changeset in webkit [33660] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej.

Change CodeGenerator::emitCall() so it increments the reference count of
registers passed to it, and change its callers so they don't needlessly
increment the reference count of the registers they are passing.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitCall):
  • kjs/nodes.cpp: (KJS::FunctionCallResolveNode::emitCode): (KJS::FunctionCallDotNode::emitCode):
11:45 PM Changeset in webkit [33659] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • generate call for PostIncDotNode
  • kjs/nodes.cpp: (KJS::PostIncDotNode::emitCode):
  • kjs/nodes.h:
11:45 PM Changeset in webkit [33658] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Build fix.

  • fix build (not sure how this ever worked?)
  • kjs/nodes.cpp: (KJS::FunctionCallBracketNode::emitCode):
11:45 PM Changeset in webkit [33657] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • generate code for FunctionCallBracketNode
  • kjs/nodes.cpp: (KJS::FunctionCallBracketNode::emitCode):
  • kjs/nodes.h:
11:45 PM Changeset in webkit [33656] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • Fix two crashing SunSpider tests
  • VM/Machine.cpp: (KJS::Machine::privateExecute): set up 'this' properly for native calls.
  • kjs/list.h: (KJS::List::List): Fix intialization of buffer and size from vector, the initialization order was wrong.
11:45 PM Changeset in webkit [33655] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Build fix: marked ASSERT-only variables as UNUSED_PARAMs.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::symbolTableInitializeVariable):
11:45 PM Changeset in webkit [33654] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Next step toward global code: Moved get, put, and initializeVariable
functionality up into JSVariableObject, and changed JSActivation to
rely on it.

  • kjs/JSActivation.cpp: (KJS::JSActivation::JSActivation): (KJS::JSActivation::getOwnPropertySlot): (KJS::JSActivation::put): (KJS::JSActivation::initializeVariable):
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::valueAt): (KJS::JSVariableObject::isReadOnly): (KJS::JSVariableObject::symbolTableGet): (KJS::JSVariableObject::symbolTablePut): (KJS::JSVariableObject::symbolTableInitializeVariable):
11:45 PM Changeset in webkit [33653] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • fix HashTable assertion on some SunSpider tests

Don't use -1 as the deleted value for JSValue*-keyed hashtables,
since it is a valid value (it's the immediate for -1).

  • VM/CodeGenerator.h: (KJS::CodeGenerator::JSValueHashTraits::emptyValue): (KJS::CodeGenerator::JSValueHashTraits::deletedValue):
  • kjs/JSImmediate.h: (KJS::JSImmediate::impossibleValue):
11:45 PM Changeset in webkit [33652] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Add support for calling Native constructors like new Array().

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitConstruct):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::NewExprNode::emitCode):
  • kjs/nodes.h:
11:45 PM Changeset in webkit [33651] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • add some missing toOpbject calls to avoid crashing when calling methods on primitives
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:45 PM Changeset in webkit [33650] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Changed Machine::dumpRegisters to take a pointer instead of a reference,
so gdb understands how to call it.

  • VM/Machine.cpp: (KJS::Machine::dumpRegisters): (KJS::Machine::privateExecute):
  • VM/Machine.h:
11:45 PM Changeset in webkit [33649] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Fix CodeGenerator::addConstant() so it uses the functionExpressions
counter for function expressions, not the functions counter.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::addConstant):
11:45 PM Changeset in webkit [33648] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Sam Weinig <sam@webkit.org>

Reviewed by Geoffrey Garen.

Add emitCode support for TypeOfResolveNode and TypeOfValueNode.
Added new opcode op_type_of to handle them.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitNot): (KJS::CodeGenerator::emitInstanceOf): (KJS::CodeGenerator::emitTypeOf):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::jsTypeStringForValue): (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::TypeOfResolveNode::emitCode): (KJS::TypeOfValueNode::emitCode):
  • kjs/nodes.h:
11:45 PM Changeset in webkit [33647] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Sam Weinig <sam@webkit.org>

Reviewed by Oliver Hunt.

Fix non-computed goto version of isOpcode. op_end is a valid opcode.

  • VM/Machine.cpp: (KJS::Machine::isOpcode):
11:45 PM Changeset in webkit [33646] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Added op_post_dec.

11:45 PM Changeset in webkit [33645] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Geoffrey Garen.

Add support for FunctionCallDotNode.

  • kjs/nodes.cpp: (KJS::FunctionCallDotNode::emitCode):
  • kjs/nodes.h:
11:45 PM Changeset in webkit [33644] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Beth Dakin.

Next step toward global code: Removed more obsolete API, moved
saveLocalStorage and restoreLocalStorage to JSGlobalObject subclass,
since it's only intended for use there.

  • ChangeLog:
  • JavaScriptCore.exp:
  • kjs/Activation.h:
  • kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::saveLocalStorage): (KJS::JSGlobalObject::restoreLocalStorage):
  • kjs/JSGlobalObject.h:
  • kjs/JSVariableObject.cpp:
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::JSVariableObjectData::JSVariableObjectData):
  • kjs/function.cpp: (KJS::ActivationImp::ActivationImp):
11:45 PM Changeset in webkit [33643] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Beth Dakin.

Next step toward global code: subclass JSActivation + JSActivationData
from JSVariableObject + JSVariableObjectData.

JSActivation now relies on JSVariableObject for access to registers and
symbol table, and for some delete functionality, but not for anything
else yet.

(KJS::JSActivation::mark): Cleaned up the style here a little bit.

11:45 PM Changeset in webkit [33642] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Beth Dakin.

Next step toward global code: store "rOffset" in JSVariableObjectData.

  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::JSVariableObjectData::JSVariableObjectData):
11:45 PM Changeset in webkit [33641] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Next steps toward global code:

  • Moved access to the register file into JSVariableObject.
  • Added more ASSERTs to indicate obsolete APIs there are just hanging around to stave off build failures.
  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::registers): (KJS::JSVariableObject::JSVariableObjectData::JSVariableObjectData): (KJS::JSVariableObject::JSVariableObject):
11:45 PM Changeset in webkit [33640] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Sam Weinig <sam@webkit.org>

Reviewed by Oliver. Tweaked somewhat by Maciej.

  • implement codegen for ReadModifyResolveNode
  • kjs/nodes.cpp: (KJS::emitReadModifyAssignment): (KJS::ReadModifyResolveNode::emitCode):
  • kjs/nodes.h:
11:45 PM Changeset in webkit [33639] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Geoff.

Fix the build -- r31492 removed activation tear-off, but r31493 used it.

  • kjs/nodes.cpp: (KJS::FuncExprNode::makeFunction):
11:45 PM Changeset in webkit [33638] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Add support for FuncExprNode to SquirrelFish.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeBlock.h:
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::addConstant): (KJS::CodeGenerator::emitNewFunctionExpression):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::FuncExprNode::emitCode): (KJS::FuncExprNode::makeFunction):
  • kjs/nodes.h:
11:45 PM Changeset in webkit [33637] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

First step toward global code: removed some obsolete JSGlobalObject
APIs, changing clients to ASSERT_NOT_REACHED.

Activation tear-off and scope chain pushing is obsolete because we
statically detect whether an activation + scope node is required.

The variableObject() and activationObject() accessors are obsolete
because they haven't been maintained, and they're mostly used by
node evaluation code, anyway.

The localStorage() accessor is obsolete because everything is in
registers now, and it's mostly used by node evaluation code, anyway.

11:44 PM Changeset in webkit [33636] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Maciej Stachowiak <mjs@apple.com>

Reviewed by Darin.

  • implement codegen for bracket accessor and bracket assign
  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitGetPropVal): (KJS::CodeGenerator::emitPutPropVal):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::BracketAccessorNode::emitCode): (KJS::AssignBracketNode::emitCode):
  • kjs/nodes.h:
11:44 PM Changeset in webkit [33635] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Not reviewed.

Removed FIXME that I just fixed.

Added ASSERT to cover an error previously only covered by a FIXME.

  • kjs/JSActivation.cpp: (KJS::JSActivation::getOwnPropertySlot):
11:44 PM Changeset in webkit [33634] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Not reviewed.

Fixed indentation inside op_call. (I had left this code badly indented
to make the behavior-changing diff clearer.)

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:44 PM Changeset in webkit [33633] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Fixed up logging of jump instructions to follow the following style:

jump offset(->absoluteTarget)

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
11:44 PM Changeset in webkit [33632] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Sam Weinig.

Changed the SymbolTable API to use int instead of size_t. It has been
using int internally for a while now (since squirrelfish symbols can
have negative indices).

11:44 PM Changeset in webkit [33631] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Add support for FunctionCallValueNode.

  • kjs/nodes.cpp: (KJS::FunctionCallValueNode::emitCode):
  • kjs/nodes.h:
11:44 PM Changeset in webkit [33630] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

1) Implemented array literals

2) Renamed op_object_get and op_object_put to op_get_prop_id and
op_put_prop_id in preparation for new variants.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitNewArray): (KJS::CodeGenerator::emitGetPropId): (KJS::CodeGenerator::emitPutPropId): (KJS::CodeGenerator::emitPutPropIndex):
  • VM/CodeGenerator.h: (KJS::CodeGenerator::CodeGenerator): (KJS::CodeGenerator::propertyNames):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::ArrayNode::emitCode): (KJS::PropertyListNode::emitCode): (KJS::DotAccessorNode::emitCode): (KJS::PostIncResolveNode::emitCode): (KJS::PreIncResolveNode::emitCode): (KJS::AssignResolveNode::emitCode): (KJS::AssignDotNode::emitCode):
  • kjs/nodes.h:
11:44 PM Changeset in webkit [33629] by mrowe@apple.com
  • 27 edits
    6 adds in branches/squirrelfish

JavaScriptCore:

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

Reviewed by Oliver Hunt.

Implemented native function calls. (Re-entering from native code back
to JS doesn't work yet, though.)

0.2% speedup overall, due to some inlining tweaks. 3.6% regression on
function-empty.js, since we're making a new virtual call and taking a
new branch inside every op_call.

I adjusted the JavaScriptCore calling convention to minimize overhead,
like so:

The machine calls a single virtual function, "getCallData", to get all
the data it needs for a function call. Native code still uses the old
"isObject()" check followed by an "implementsCall()" check, which
aliases to "getCallData". (We can optimize native code to use getCallData
at our leisure.)

To supply a list of arguments, the machine calls a new List constructor
that just takes a pointer and a length, without copying. Native code
still appends to the list one argument at a time. (We can optimize
native code to use the new List constructor at our leisure.)

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Changed resize() call to grow() call, to encourage the compiler to inline the Vector code.
  • kjs/CallData.h: Added. (KJS::): CallData is a union because eventually native calls will stuff a function pointer into it, to eliminate the callAsFunction virtual call.
  • kjs/function.cpp: (KJS::FunctionImp::callAsFunction): Changed this to an ASSERT since it's not implemented yet.
  • kjs/list.h: Made the List class two-faced, to support the old way and the new way during this transition phase: lists can be made read-only with just a pointer and a legnth, or you can append to them one item at a time.
  • kjs/value.h: (KJS::jsUndefined): Marked this function ALWAYS_INLINE for the benefit of a certain compiler that doesn't know what's best for it.

JavaScriptGlue:

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

Reviewed by Oliver Hunt.

Build fix.

  • ForwardingHeaders/wtf/UnusedParam.h: Copied from ForwardingHeaders/wtf/OwnPtr.h.

WebCore:

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

Reviewed by Oliver Hunt.

Adjusted WebCore JS functions to the new "getCallData" calling convention.

WebKit/mac:

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

Reviewed by Oliver Hunt.

Build fix.

11:44 PM Changeset in webkit [33628] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-30 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

Dump code that codegen can't handle yet, so it's easier to prioritize missing nodes.

  • kjs/nodes.h: (KJS::Node::emitCode):
11:44 PM Changeset in webkit [33627] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-30 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

Improve dumping of bytecode and fix coding style accordingly.

Registers are printed as lr1 for locals, tr1 for temp registers. Identifiers print as
foobar(@id0) and constants print as "foo"(@k1) or 312.4(@k2) or the like. Constant and
identifier tables are dumped for reference.

  • VM/CodeBlock.cpp: (KJS::escapeQuotes): (KJS::valueToSourceString): (KJS::registerName): (KJS::constantName): (KJS::idName): (KJS::printUnaryOp): (KJS::printBinaryOp): (KJS::CodeBlock::dump):
  • VM/Machine.cpp: (KJS::resolve): (KJS::resolveBase): (KJS::Machine::privateExecute):
11:44 PM Changeset in webkit [33626] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-30 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

Implement StringNode and VoidNode (both pretty trivial).

  • kjs/nodes.cpp: (KJS::StringNode::emitCode): (KJS::VoidNode::emitCode):
  • kjs/nodes.h:
11:44 PM Changeset in webkit [33625] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-30 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

Implement CommaNode.

  • kjs/nodes.cpp: (KJS::CommaNode::emitCode):
  • kjs/nodes.h:
11:44 PM Changeset in webkit [33624] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-30 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Adds support for dot notation and object literals.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitNewObject):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::ObjectLiteralNode::emitCode): (KJS::PropertyListNode::emitCode): (KJS::DotAccessorNode::emitCode): (KJS::AssignDotNode::emitCode):
  • kjs/nodes.h:
11:44 PM Changeset in webkit [33623] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Maciej Stachowiak.

Mark the register file.

It's a conservative mark for now, but once registers are typed, we can
do an exact mark.

1.4% regression regardless of whether we actually do the marking.
GCC is is worth every penny.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Most of the changes here are just for the fact that "registers" is a pointer now.
  • kjs/JSGlobalObject.cpp: The global object owns the register file now.
11:44 PM Changeset in webkit [33622] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Bug 18204: SquirrelFish: continue/break do not correctly handle scope popping
<http://bugs.webkit.org/show_bug.cgi?id=18204>

Reviewed by Maciej.

We now track the scope depth as part of a loop context, and add an
extra instruction op_jump_scopes that is used to perform a jump across
dynamic scope boundaries.

11:44 PM Changeset in webkit [33621] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Geoffrey Garen.

Add emitCode support for ConditionalNode.

  • kjs/nodes.cpp: (KJS::ConditionalNode::emitCode):
  • kjs/nodes.h:
11:44 PM Changeset in webkit [33620] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Responding to feedback, added some comments, fixed up a few names, and
clarified that "locals" always means all local variables, functions,
and parameters.

11:44 PM Changeset in webkit [33619] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Added support for "this".

Supply an implicit "this" value as the first argument to every function.
Alias the "this" keyword to that argument.

1% regression overall, 2.5% regression on empty function calls. Seems
like a reasonable cost for now, since we're doing more work.
(Eventually, we might decide to create a version of op_call specialized
for a known null "this" value.)

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitCall):
  • VM/CodeGenerator.h: (KJS::CodeGenerator::CodeGenerator):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/CommonIdentifiers.cpp: (KJS::CommonIdentifiers::CommonIdentifiers):
  • kjs/CommonIdentifiers.h:
  • kjs/nodes.cpp: (KJS::ThisNode::emitCode): (KJS::FunctionCallResolveNode::emitCode):
  • kjs/nodes.h:
11:44 PM Changeset in webkit [33618] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

Bug 18192: Squirrelfish needs support for break and continue
<http://bugs.webkit.org/show_bug.cgi?id=18192>

Reviewed by Geoff

Added a loop context stack to the code generator to provide the
correct jump labels for continue and goto. Added logic to the
currently implemented loop constructs to manage entry and exit
from the loop contexts. Finally, implemented codegen for break
and continue (and a pass through for LabelNode)

11:44 PM Changeset in webkit [33617] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Geoffrey Garen.

Add emitCode support for UnaryPlusNode, NegateNode, BitwiseNotNode and LogicalNotNode.

  • VM/CodeBlock.cpp: (KJS::printUnaryOp): (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitToJSNumber): (KJS::CodeGenerator::emitNegate): (KJS::CodeGenerator::emitBitNot): (KJS::CodeGenerator::emitNot):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::UnaryPlusNode::emitCode): (KJS::NegateNode::emitCode): (KJS::BitwiseNotNode::emitCode): (KJS::LogicalNotNode::emitCode):
  • kjs/nodes.h:
11:44 PM Changeset in webkit [33616] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-27 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej Stachowiak.

Add support for LogicalAndNode and LogicalOrNode.

  • kjs/nodes.cpp: (KJS::LogicalAndNode::emitCode): (KJS::LogicalOrNode::emitCode):
  • kjs/nodes.h:
11:43 PM Changeset in webkit [33615] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Clean up code and debug output.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:43 PM Changeset in webkit [33614] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Moved an ASSERT to a more logical place.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:43 PM Changeset in webkit [33613] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Add emitCode support for InstanceOfNode.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitInstanceOf):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::InstanceOfNode::emitCode):
  • kjs/nodes.h:
11:43 PM Changeset in webkit [33612] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

Bug 18142: squirrelfish needs to support dynamic scoping/with
<http://bugs.webkit.org/show_bug.cgi?id=18142>

Reviewed by Maciej

Add support for dynamic scoping and add code to handle 'with'
statements.

11:43 PM Changeset in webkit [33611] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Geoffrey Garen.

Add emitCode support for NullNode, FalseNode, TrueNode, IfNode, IfElseNode, DoWhileNode and WhileNode

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump): Dump op_jfalse opcode.
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitJumpIfFalse): Identical to emitJumpIfTrue except it emits the op_jfalse opcode. (KJS::CodeGenerator::emitLoad): Add and emitLoad override for booleans.
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute): Adds execution of op_jfalse. It is identical to op_jtrue, except the the condition is reversed.
  • VM/Opcode.h: Add op_jfalse.
  • kjs/nodes.cpp: (KJS::NullNode::emitCode): Added. (KJS::FalseNode::emitCode): Added. (KJS::TrueNode::emitCode): Added. (KJS::IfNode::emitCode): Added. (KJS::IfElseNode::emitCode): Added. (KJS::DoWhileNode::emitCode): Added. (KJS::WhileNode::emitCode): Added.
  • kjs/nodes.h:
11:43 PM Changeset in webkit [33610] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Nixed an unused List.

The calm before my stormy war against the List class.

  • kjs/function_object.cpp: (KJS::FunctionObjectImp::construct):
11:43 PM Changeset in webkit [33609] by mrowe@apple.com
  • 5 edits
    9 adds in branches/squirrelfish

SunSpider:

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

Reviewed by Oliver Hunt.

--squirrelfish mode: pared down tests for squirrelfish to chew on.

  • sunspider:
  • tests/LIST:
  • tests/squirrelfish: Added.
  • tests/squirrelfish/function-closure.js: Added.
  • tests/squirrelfish/function-empty.js: Added.
  • tests/squirrelfish/function-missing-args.js: Added.
  • tests/squirrelfish/function-sum.js: Added.
  • tests/squirrelfish/loop-empty-resolve.js: Added.
  • tests/squirrelfish/loop-empty.js: Added.
  • tests/squirrelfish/loop-resolve.js: Added.
  • tests/squirrelfish/loop-sum.js: Added.

WebKitTools:

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

Reviewed by Oliver Hunt.

--squirrelfish mode: pared down tests for squirrelfish to chew on.

  • Scripts/run-sunspider:
11:43 PM Changeset in webkit [33608] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

2008-03-26 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Geoffrey Garen.

Adds support for EqualNode, NotEqualNode, StrictEqualNode, NotStrictEqualNode,
LessEqNode, GreaterNode, GreaterEqNode, MultNode, DivNode, ModNode, SubNode,
LeftShiftNode, RightShiftNode, UnsignedRightShiftNode, BitAndNode, BitXOrNode,
and BitOrNode.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitEqual): (KJS::CodeGenerator::emitNotEqual): (KJS::CodeGenerator::emitStrictEqual): (KJS::CodeGenerator::emitNotStrictEqual): (KJS::CodeGenerator::emitLessEq): (KJS::CodeGenerator::emitMult): (KJS::CodeGenerator::emitDiv): (KJS::CodeGenerator::emitMod): (KJS::CodeGenerator::emitSub): (KJS::CodeGenerator::emitLeftShift): (KJS::CodeGenerator::emitRightShift): (KJS::CodeGenerator::emitUnsignedRightShift): (KJS::CodeGenerator::emitBitAnd): (KJS::CodeGenerator::emitBitXOr): (KJS::CodeGenerator::emitBitOr):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::jsLessEq): (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::MultNode::emitCode): (KJS::DivNode::emitCode): (KJS::ModNode::emitCode): (KJS::SubNode::emitCode): (KJS::LeftShiftNode::emitCode): (KJS::RightShiftNode::emitCode): (KJS::UnsignedRightShiftNode::emitCode): (KJS::GreaterNode::emitCode): (KJS::LessEqNode::emitCode): (KJS::GreaterEqNode::emitCode): (KJS::EqualNode::emitCode): (KJS::NotEqualNode::emitCode): (KJS::StrictEqualNode::emitCode): (KJS::NotStrictEqualNode::emitCode): (KJS::BitAndNode::emitCode): (KJS::BitXOrNode::emitCode): (KJS::BitOrNode::emitCode):
  • kjs/nodes.h:
11:43 PM Changeset in webkit [33607] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Only print debug dumps in debug builds.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::generate):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:43 PM Changeset in webkit [33606] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Moved a few files around in the XCode project.

11:43 PM Changeset in webkit [33605] by mrowe@apple.com
  • 11 edits
    2 adds in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Made closures work.

An activation object aliases to the register file until its associated
function returns, at which point it copies the registers for locals and
parameters into an independent storage buffer.

11:43 PM Changeset in webkit [33604] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

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

Reviewed by Oliver Hunt.

Fixed recent 25% regression on simple for loop test. GCC seems to be
very finicky about the code that gets inlined into
Machine::privateExecute.

Everything in this patch is simply the result of experiment.

The resolve and resolve_base opcodes do not seem to have gotten slower
from this change.

  • VM/Machine.cpp: (KJS::resolve): (KJS::resolveBase): (KJS::Machine::privateExecute):
  • kjs/nodes.h:
11:43 PM Changeset in webkit [33603] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

Bug 18059: squirrelfish needs to compile on platforms without computed goto
<http://bugs.webkit.org/show_bug.cgi?id=18059>

Reviewed by Geoff Garen

"Standard" macro style support for conditionalising the use of computed goto.

11:43 PM Changeset in webkit [33602] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Moved my notes from nodes.h to the wiki.

  • kjs/nodes.h:
11:43 PM Changeset in webkit [33601] by mrowe@apple.com
  • 9 edits
    10 copies
    7 adds in branches/squirrelfish/JavaScriptCore

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

Reviewed by NOBODY.

SquirrelFish lives.

Initial check-in of the code I've been carrying around. Lots of stuff
doesn't work. Plus a bunch of empty files.

11:31 PM Changeset in webkit [33600] by mrowe@apple.com
  • 1 copy in branches/squirrelfish

Re-create squirrelfish branch.

11:28 PM Changeset in webkit [33599] by mrowe@apple.com
  • 1 move in branches/old/squirrelfish-2008-05-19

Move aside squirrelfish branch in prepration for rebasing it on trunk.

9:00 PM Changeset in webkit [33598] by Adam Roben
  • 2 edits in trunk/WebKit/win

Make WebKit.idl rebuild whenever any of its included interfaces are changed

Reviewed by Tim Hatcher.

  • WebKit.vcproj/DerivedSources.make: Touch WebKit.idl whenever any other IDL file is changed. This will force VS to rebuild WebKit.idl.
8:42 PM Changeset in webkit [33597] by mitz@apple.com
  • 4 edits in trunk/LayoutTests

Reviewed by Adam Roben.

  • platform/mac/fast/frames/viewsource-attribute-expected.checksum:
  • platform/mac/fast/frames/viewsource-attribute-expected.png:
  • platform/mac/fast/frames/viewsource-attribute-expected.txt:
8:31 PM Changeset in webkit [33596] by kmccullough@apple.com
  • 5 edits in trunk/JavaScriptCore

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

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Implement sorting by function name.
  • JavaScriptCore.exp:
  • profiler/Profile.h: (KJS::Profile::sortFileNameDescending): (KJS::Profile::sortFileNameAscending):
  • profiler/ProfileNode.cpp: (KJS::fileNameDescendingComparator): (KJS::ProfileNode::sortFileNameDescending): (KJS::fileNameAscendingComparator): (KJS::ProfileNode::sortFileNameAscending):
  • profiler/ProfileNode.h:
8:23 PM Changeset in webkit [33595] by kmccullough@apple.com
  • 5 edits in trunk/WebCore

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

Reviewed by Adam.

-build fix.

  • bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::profile):
  • page/Console.cpp: (WebCore::Console::profile):
  • page/Console.h:
  • page/Console.idl:
8:19 PM Changeset in webkit [33594] by alp@webkit.org
  • 2 edits in trunk/WebCore

2008-05-19 Alp Toker <alp@nuanti.com>

Reviewed by Maciej.

GTK+/soup fixes:

Remove the fragment part of the URL since the file backend doesn't
deal with it.

Fix a typo in the cleanup function.

  • platform/network/soup/ResourceHandleSoup.cpp: (WebCore::cleanupGioOperation): (WebCore::ResourceHandle::startGio):
7:03 PM Changeset in webkit [33593] by kmccullough@apple.com
  • 8 edits in trunk

JavaScriptCore:

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

Reviewed by Adam.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Pass the exec state to profiler when calling startProfiling so that if profiling is started within an execution context that location is recorded correctly.
  • JavaScriptCore.exp:
  • profiler/ProfileNode.cpp: (KJS::ProfileNode::printDataInspectorStyle): Dump more info for debugging purposes.
  • profiler/Profiler.cpp: (KJS::Profiler::startProfiling):
  • profiler/Profiler.h:

WebCore:

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

Reviewed by Adam.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Send the executing context to the profiler so it can attribute time correctly to parent functions when calling profile() and profileEnd() while nested.
  • page/Console.cpp: (WebCore::Console::profile): (WebCore::Console::profileEnd):
  • page/Console.h:
6:14 PM Changeset in webkit [33592] by kmccullough@apple.com
  • 2 edits in trunk/JavaScriptCore

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

Rubberstamped by Geoff.

Turn off the profiler because it is a performance regression.

  • kjs/config.h:
6:12 PM Changeset in webkit [33591] by alp@webkit.org
  • 8 edits
    3 adds in trunk

2008-05-19 Alp Toker <alp@nuanti.com>

Reviewed by Anders and Beth.

http://bugs.webkit.org/show_bug.cgi?id=16495
[GTK] Accessibility support with ATK/AT-SPI

Initial ATK/AT-SPI accessibility support for the GTK+ port.

5:46 PM Changeset in webkit [33590] by andersca@apple.com
  • 5 edits
    1 add in trunk

WebCore:

2008-05-19 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

<rdar://problem/5946454>
Support navigator.onLine from HTML5.

Add Windows NetworkStateNotifier implementation using the IP Helper API.

  • WebCore.vcproj/WebCore.vcproj:
  • platform/network/NetworkStateNotifier.h: (WebCore::updateState):
  • platform/network/win/NetworkStateNotifierWin.cpp: Added. (WebCore::NetworkStateNotifier::updateState): (WebCore::NetworkStateNotifier::addressChanged): (WebCore::NetworkStateNotifier::callAddressChanged): (WebCore::NetworkStateNotifier::addrChangeCallback): (WebCore::NetworkStateNotifier::registerForAddressChange): (WebCore::NetworkStateNotifier::NetworkStateNotifier):

WebKit/win:

2008-05-19 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

<rdar://problem/5946454>
Support navigator.onLine from HTML5.


Link with iphlpapi.lib, and make iphlpapi.dll a delay loaded library.


  • WebKit.vcproj/WebKit.vcproj:
5:07 PM Changeset in webkit [33589] by sfalken@apple.com
  • 2 edits in tags/Safari-6526.6.2/WebCore

Merged fix from r33587.

5:02 PM Changeset in webkit [33588] by sfalken@apple.com
  • 1 copy in tags/Safari-6526.6.2

New tag.

5:00 PM Changeset in webkit [33587] by sfalken@apple.com
  • 2 edits in trunk/WebCore

Disable C4273, C4565 for CSSGrammar.cpp, XPathGrammar.cpp to fix build.


Reviewed by Adam Roben.

  • WebCore.vcproj/WebCore.vcproj:
4:52 PM Changeset in webkit [33586] by Adam Roben
  • 2 edits
    1 add in trunk/WebCore

Fix Bug 19065: Resources with a space in their URL don't get error/warning bubbles

<https://bugs.webkit.org/show_bug.cgi?id=19065>

Reviewed by Dan Bernstein.

Test: manual-tests/inspector/errors-with-space in-url.html

  • manual-tests/inspector/errors-with-space in-url.html: Added.
  • page/Console.cpp: (WebCore::Console::error): (WebCore::Console::info): (WebCore::Console::log): (WebCore::Console::warn): Pass the raw URL to the Inspector, not the pretty URL, to match the URL that was used when initially telling the Inspector about this resource. We continue to pass the pretty URL to the ChromeClient for backwards compatibility.
4:22 PM Changeset in webkit [33585] by Stephanie Lewis
  • 9 edits in trunk

2008-05-19 Stephanie Lewis <Stephanie Lewis>

Reviewed by Darin.


more fast teardown performance work

  • Misc/WebDownload.m: (-[WebDownloadInternal downloadDidBegin:]): (-[WebDownloadInternal downloadDidFinish:]): (-[WebDownloadInternal download:didFailWithError:]):
  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm: (WebChromeClient::disableSuddenTermination): (WebChromeClient::enableSuddenTermination):

more fast teardown performance work, WebCore plumbing

  • page/Chrome.cpp: (WebCore::Chrome::disableSuddenTermination): (WebCore::Chrome::enableSuddenTermination): (WebCore::ChromeClient::disableSuddenTermination): (WebCore::ChromeClient::enableSuddenTermination):
  • page/Chrome.h:
  • page/ChromeClient.h:
  • page/Page.cpp: (WebCore::Page::changePendingUnloadEventCount): (WebCore::Page::changePendingBeforeUnloadEventCount):
4:06 PM Changeset in webkit [33584] by alp@webkit.org
  • 3 edits in trunk

2008-05-19 Alp Toker <alp@nuanti.com>

GTK+ build fix for Mac/Win. Don't check for FreeType/FontConfig when
the Pango font backend is selected.

  • GNUmakefile.am:
  • configure.ac:
3:44 PM Changeset in webkit [33583] by justin.garcia@apple.com
  • 2 edits in trunk/WebCore

2008-05-19 Kuchhal <kuchal@yahoo.com>

Reviewed by Justin.

<rdar://problem/5863412> Crash when Ctrl C is pressed after a series of specific mouse events (18506)

  • editing/markup.cpp: (WebCore::createMarkup): Null check.
3:17 PM Changeset in webkit [33582] by Chris Fleizach
  • 2 edits in trunk/WebCore

<rdar://problem/5912195> CrashTracer: [USER] 1 crash in Mail at -[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]

3:15 PM Changeset in webkit [33581] by kmccullough@apple.com
  • 5 edits in trunk/JavaScriptCore

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

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)
-In an effort to make the profiler as efficient as possible instead of
prepending to a vector we keep the vector in reverse order and operate
over it backwards.

  • profiler/Profile.cpp: (KJS::Profile::willExecute): (KJS::Profile::didExecute):
  • profiler/ProfileNode.cpp: (KJS::ProfileNode::didExecute): (KJS::ProfileNode::endAndRecordCall):
  • profiler/ProfileNode.h:
  • profiler/Profiler.cpp: (KJS::getStackNames):
1:44 PM Changeset in webkit [33580] by andersca@apple.com
  • 2 edits in trunk/WebKit/win

2008-05-19 Anders Carlsson <andersca@apple.com>

Reviewed by Darin, Alexey, Jess and Brady.

Set the application cache path.


  • WebView.cpp: (WebKitSetApplicationCachePathIfNecessary): New function that sets the cache path.


(WebView::initWithFrame):
Set the application cache path.

12:55 PM Changeset in webkit [33579] by adachan@apple.com
  • 11 edits
    5 adds in trunk

Added methods to get/set current cookie storage.

WebCore:

Added CookieStorageWin.h/cpp, introducing methods to get/set the current CFHTTPCookieStorageRef.
When setting cookies-related attributes in CFURLRequest, make sure we get them from the
current CFHTTPCookieStorageRef. Also, set the cookie storage in CFURLRequest.

Reviewed by Steve Falkenburg.

  • WebCore.vcproj/WebCore.vcproj:
  • platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::makeFinalRequest):
  • platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest):
  • platform/network/win/CookieJarCFNetWin.cpp: (WebCore::setCookies): (WebCore::cookies): (WebCore::cookiesEnabled):
  • platform/network/win/CookieStorageWin.cpp: Added. (WebCore::currentCookieStorage): (WebCore::setCurrentCookieStorage):
  • platform/network/win/CookieStorageWin.h: Added.

WebKit/win:

Added IWebCookieManager interface which allows client to set the
CFHTTPCookieStorageRef that WebCore should use.


Implement IWebCookieManager interface in WebCookieManager.


Update the cookie accept policy in the current cookie storage.

Reviewed by Steve Falkenburg.

  • ForEachCoClass.h:
  • Interfaces/IWebCookieManager.idl: Added.
  • Interfaces/WebKit.idl:
  • WebCookieManager.cpp: Added. (WebCookieManager::createInstance): (WebCookieManager::WebCookieManager): (WebCookieManager::~WebCookieManager): (WebCookieManager::QueryInterface): (WebCookieManager::AddRef): (WebCookieManager::Release): (WebCookieManager::cookieStorage): (WebCookieManager::setCookieStorage):
  • WebCookieManager.h: Added.
  • WebKit.vcproj/WebKit.vcproj:
  • WebKitClassFactory.cpp:
  • WebView.cpp: (updateSharedSettingsFromPreferencesIfNeeded):
12:21 PM Changeset in webkit [33578] by ap@webkit.org
  • 3 edits
    6 adds in trunk

Reviewed by Darin.

http://bugs.webkit.org/show_bug.cgi?id=18308
SVG Encoding error with fill attribute

This is caused by problems with data: URL loading. Besides what is fixed by this patch,
I filed <rdar://problem/5845875> for CFNetwork.

While at it, fixed a related javascript: URL issue.

Tests: fast/loader/data-url-encoding-html.html

fast/loader/data-url-encoding-svg.html
fast/loader/javascript-url-encoding.html

  • platform/KURL.cpp: (WebCore::KURL::parse): Fix a FIXME, use UTF-8 instead of dropping high bytes. This fixes javascript: URL handling. (WebCore::encodeRelativeString): Like mailto: URLs, data: ones are all UTF-8. Restructured the code to not search for "#" if both parts are to be encoded as UTF-8 anyway.
12:12 PM Changeset in webkit [33577] by ap@webkit.org
  • 20 edits
    2 adds in trunk

Reviewed by Darin.

https://bugs.webkit.org/show_bug.cgi?id=18421
<rdar://problem/5857369> XMLHttpRequest does not properly encode & and < in outgoing messages

Test: http/tests/xmlhttprequest/serialize-document.html

  • bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::send): Use createMarkup() instead of Document::toString().
  • dom/Attr.cpp:
  • dom/Attr.h:
  • dom/Document.cpp:
  • dom/Document.h:
  • dom/DocumentFragment.cpp:
  • dom/DocumentFragment.h:
  • dom/Element.cpp:
  • dom/Element.h:
  • dom/Entity.cpp:
  • dom/Entity.h:
  • dom/EntityReference.cpp:
  • dom/EntityReference.h:
  • dom/Node.h:
  • dom/Text.cpp:
  • dom/Text.h:
  • html/HTMLElement.cpp:
  • html/HTMLElement.h: Removed most Node::toString() methods, which were massively wrong, and only used for XMLHttpRequest::send(). The remanining ones are still used in markup.cpp, but should probably be folded into it for consistency.
11:33 AM Changeset in webkit [33576] by andersca@apple.com
  • 2 edits in trunk/WebCore

2008-05-19 Anders Carlsson <andersca@apple.com>

Fix Windows build.


  • plugins/win/PluginViewWin.cpp: (WebCore::PluginView::userAgentStatic): (WebCore::PluginView::getValueStatic): (WebCore::PluginView::getValue):
11:22 AM Changeset in webkit [33575] by Chris Fleizach
  • 2 edits in trunk/WebCore

<rdar://problem/5935694> AX: crash in text marker range

10:43 AM Changeset in webkit [33574] by Darin Adler
  • 2 edits in trunk/WebCore

2008-05-19 Darin Adler <Darin Adler>

  • fix WebKit build
  • WebCore.xcodeproj/project.pbxproj: Make CSSReflectionDirection.h "private" instead of "project".
9:56 AM Changeset in webkit [33573] by Chris Fleizach
  • 2 edits in trunk/WebCore

<rdar://problem/5700830> VO: VoiceOver should fall back to title attr if form element is not labeled

9:42 AM Changeset in webkit [33572] by Darin Adler
  • 7 edits
    1 add in trunk/WebCore

2008-05-19 Darin Adler <Darin Adler>

Reviewed by Mitz.

  • tweak CSSReflectValue, possibly fixing the leaks seen on the buildbot
  • WebCore.vcproj/WebCore.vcproj: Added CSSReflectionDirection.h.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • css/CSSReflectionDirection.h: Added.
  • css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForReflection): Changed to use CSSReflectValue::create.
  • css/CSSParser.cpp: (WebCore::CSSParser::parseReflect): Ditto.
  • css/CSSReflectValue.h: Added a create function. Got rid of the setter functions, which had const PassRefPtr& arguments -- those probably caused the leaks although I'm not exactly sure why. Made the contructor and all the data members private.
  • rendering/style/RenderStyle.h: Changed to include CSSReflectionDirection.h instead of CSSReflectValue.h so we can tweak CSSReflectValue without recompiling the world.
3:17 AM Changeset in webkit [33571] by zecke@webkit.org
  • 4 edits in trunk/WebCore

2008-05-19 Holger Hans Peter Freyther <zecke@selfish.org>

Rubber Stamped by Simon.

Enforce the WebKit Coding Style.

  • plugins/PluginView.cpp: (WebCore::PluginView::load): (WebCore::PluginView::setValue):
  • plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::setFocus): (WebCore::PluginView::show): (WebCore::PluginView::hide): (WebCore::PluginView::attachToWindow): (WebCore::PluginView::detachFromWindow): (WebCore::PluginView::getValueStatic): (WebCore::PluginView::getValue):
  • plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::updateWindow): (WebCore::PluginView::detachFromWindow): (WebCore::PluginView::handlePostReadFile): (WebCore::PluginView::getValueStatic): (WebCore::PluginView::getValue):
3:09 AM Changeset in webkit [33570] by zecke@webkit.org
  • 7 edits in trunk/WebCore

2008-05-14 Marc Ordinas i Llopis <marc.ordinasillopis@collabora.co.uk>

Reviewed by Holger.

https://bugs.webkit.org/show_bug.cgi?id=18882
https://bugs.webkit.org/show_bug.cgi?id=18892
Based also on work by Chris Lord.

Provides support for NPAPI plugins that pass NULL as their instance
info. There are two kinds:

  • Some call NPN_UserAgent and NPN_GetValue before a PluginView has been created. For those we provide static versions of those functions.
  • Others call NPN_* functions with a NULL instance inside NPP_* calls, for those we've added extra currentPluginView guards.
  • plugins/PluginView.cpp: Add additional currentPluginView guards and some small style changes. (WebCore::PluginView::start): (WebCore::PluginView::performRequest): (WebCore::PluginView::bindingInstance): (WebCore::PluginView::handlePost):
  • plugins/PluginView.h: Added static versions of NPN_UserAgent and NPN_GetValue.
  • plugins/gtk/PluginViewGtk.cpp: Add additional currentPluginView guards and some small style changes. (WebCore::PluginView::setNPWindowRect): (WebCore::PluginView::stop): (WebCore::PluginView::userAgentStatic): Added to deal with plugins that query this before having a PluginView. (WebCore::PluginView::getValueStatic): Added to deal with plugins that call this before we have created a PluginView. (WebCore::PluginView::getValue): Moved some code to getValueStatic. (WebCore::PluginView::init):
  • plugins/npapi.cpp: Call PluginView::userAgentStatic and PluginView::getValueStatic if no PluginView is present. (NPN_UserAgent): (NPN_GetValue):
  • plugins/qt/PluginPackageQt.cpp: (WebCore::PluginPackage::fetchInfo): Corrected split args because ignoring empty entries crashed. (WebCore::PluginPackage::load): Resolve all symbols when loading plugins to protect against XPCOM dependencies.
  • plugins/qt/PluginViewQt.cpp: Add additional currentPluginView guards and some small style changes. (WebCore::PluginView::updateWindow): (WebCore::PluginView::setNPWindowRect): (WebCore::PluginView::stop): (WebCore::PluginView::userAgentStatic): Added to deal with plugins that query this before having a PluginView. (WebCore::PluginView::handlePostReadFile): (WebCore::PluginView::getValueStatic): Added to deal with plugins that call this before we have created a PluginView. (WebCore::PluginView::getValue): Moved some code to getValueStatic. (WebCore::PluginView::init): m_needsXEmbed init was moved to constructor.
1:59 AM Changeset in webkit [33569] by alp@webkit.org
  • 3 edits in trunk/WebCore

2008-05-19 Alp Toker <alp@nuanti.com>

GTK+ build fix on Mac. Conditionalize XP_UNIX use.

  • plugins/gtk/PluginPackageGtk.cpp: (WebCore::PluginPackage::fetchInfo): (WebCore::PluginPackage::load):
  • plugins/gtk/PluginViewGtk.cpp:

May 18, 2008:

8:58 PM Changeset in webkit [33568] by Chris Fleizach
  • 2 edits in trunk/WebCore

<rdar://problem/5942076> WebKit can no longer find URL links with VoiceOVer-U command (19100)

5:42 PM Changeset in webkit [33567] by Darin Adler
  • 4 edits
    3 adds in trunk

WebCore:

2008-05-18 Darin Adler <Darin Adler>

Reviewed by Sam.

  • fix <rdar://problem/5943569> crash due to stale ownerNode pointer

Test: fast/dom/StyleSheet/ownerNode-lifetime.html

  • bindings/js/JSStyleSheetCustom.cpp: (WebCore::JSStyleSheet::mark): Added code to mark ownerNode. Includes a comment about how it would be even better to solve this in the DOM rather than just in the JavaScript binding.
  • css/StyleSheet.idl: Added CustomMarkFunction attribute.

LayoutTests:

2008-05-18 Darin Adler <Darin Adler>

Reviewed by Sam.

  • test for <rdar://problem/5943569> crash due to stale ownerNode pointer
  • fast/dom/StyleSheet: Added.
  • fast/dom/StyleSheet/ownerNode-lifetime-expected.txt: Added.
  • fast/dom/StyleSheet/ownerNode-lifetime.html: Added.
5:36 PM Changeset in webkit [33566] by oliver@apple.com
  • 3 edits
    3 adds in branches/squirrelfish

Bug 18752: SQUIRRELFISH: exceptions are not always handled by the vm
<https://bugs.webkit.org/show_bug.cgi?id=18752>

Reviewed by Maciej

Handle exceptions thrown by toString conversion in subscript operators,
this should basically complete exception handling in SquirrelFish.

Sunspider reports no regression.

4:51 PM Changeset in webkit [33565] by beidson@apple.com
  • 4 edits
    4 adds in trunk

WebCore:

2008-05-18 Brady Eidson <beidson@apple.com>

Reviewed by Sam Weinig

Fix for https://bugs.webkit.org/show_bug.cgi?id=19111
Allow delete storage.itemName syntax as an alias for storage.removeItem("itemName")

Tests: storage/domstorage/localstorage/delete-removal.html

storage/domstorage/sessionstorage/delete-removal.html

  • bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::deleteProperty): Only do the delete for non-built in properties
  • storage/Storage.idl:

LayoutTests:

2008-05-18 Brady Eidson <beidson@apple.com>

Reviewed by Sam Weinig

Fix for https://bugs.webkit.org/show_bug.cgi?id=19111
Allow delete storage.itemName syntax as an alias for storage.removeItem("itemName")

  • storage/domstorage/localstorage/delete-removal-expected.txt: Added.
  • storage/domstorage/localstorage/delete-removal.html: Added.
  • storage/domstorage/sessionstorage/delete-removal-expected.txt: Added.
  • storage/domstorage/sessionstorage/delete-removal.html: Added.
12:08 PM Changeset in webkit [33564] by mitz@apple.com
  • 2 edits in trunk/WebKit/mac

Reviewed by Sam Weinig.

  • fix <rdar://problem/5944596> IDNs are displayed as punycode in the authentication panel
  • Panels/WebAuthenticationPanel.m: (-[WebAuthenticationPanel setUpForChallenge:]):
1:49 AM Changeset in webkit [33563] by oliver@apple.com
  • 22 edits
    1 copy
    3 adds in branches/squirrelfish

Reapplying debugging support from r33553, this time with all the files.

JavaScriptCore:

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

Reviewed by Oliver Hunt.

Behold: debugging.

SunSpider reports no change.

  • JavaScriptCore.xcodeproj/project.pbxproj: Added DebuggerCallFrame.h/.cpp, and created a debugger folder.
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::generate): If the debugger is attached, always generate full scope chains for its sake.
  • VM/Machine.cpp: (KJS::Machine::unwindCallFrame): Notify the debugger when unwinding due to an exception, so it doesn't keep stale call frames around.

(KJS::Machine::execute): Set Callee to 0 in eval frames, so the
debugger can distinguish them from function call frames.

(KJS::Machine::debug): Simplified this function, since the debugger
doesn't actually need all the information we used to provide.

(KJS::Machine::privateExecute): Treat debugging hooks like other function
calls, so the code we hook into (the debugger UI) can be optimized.

  • kjs/debugger.cpp: Nixed these default callback implementations and made the callbacks pure virtual instead, so the compiler could tell me if I made a mistake in one of the subclasses.
  • kjs/debugger.h: Removed a bunch of irrelevent data from the debugger callbacks. Changed from passing an ExecState* to passing a DebuggerCallFrame*, since an ExecState* doesn't contain sufficient information anymore.
  • kjs/function.cpp: (KJS::globalFuncEval): Easiest bug fix evar!

[Previously missing files from r33553]

  • kjs/DebuggerCallFrame.cpp: Copied from JavaScriptCore/profiler/FunctionCallProfile.h. (KJS::DebuggerCallFrame::functionName): (KJS::DebuggerCallFrame::thisObject): (KJS::DebuggerCallFrame::evaluateScript):
  • kjs/DebuggerCallFrame.h: Copied from JavaScriptCore/VM/Register.h. (KJS::DebuggerCallFrame::DebuggerCallFrame): (KJS::DebuggerCallFrame::scopeChain): (KJS::DebuggerCallFrame::exception):

WebCore:

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

Reviewed by Oliver Hunt.

Updated for API changes in KJS::Debugger.

WebKit/mac:

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

Reviewed by Oliver Hunt.

Re-enabled previously disabled debugging functionality.

There are two major changes from how the WebKit debugger used to work:

(1) All the interesting bits are implemented down in JavaScriptCore. The
debugger just calls through to KJS::DebuggerCallFrame for everything.

(2) Instead of copyihng a pointer to an ExecState once, the debugger
copies the DebuggerCallFrame passed to it in each callback. This is
because the VM no longer maintains a fully transparent execution state
to which you can hold a pointer, and the DebuggerCallFrames it vends
are temporaries.

Also, we NULL out a WebScriptCallFrame's DebuggerCallFrame upon return
from its function. This is safer than the old method, which was to
hold a stale ExecState* and hope for the best.

May 17, 2008:

9:53 PM Changeset in webkit [33562] by cwzwarich@webkit.org
  • 6 edits in branches/squirrelfish

2008-05-17 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver.

Bug 18991: SquirrelFish: Major codegen issue in a.b=expr, a[b]=expr
<https://bugs.webkit.org/show_bug.cgi?id=18991>

Fix the last remaining blocking cases of this bug.

JavaScriptCore:

  • kjs/grammar.y:
  • kjs/nodes.cpp: (KJS::ReadModifyResolveNode::emitCode):

LayoutTests:

  • fast/js/codegen-temporaries-expected.txt:
  • fast/js/resources/codegen-temporaries.js:
8:41 PM Changeset in webkit [33561] by weinig@apple.com
  • 3 edits in trunk/WebCore

2008-05-17 Sam Weinig <sam@webkit.org>

Reviewed by Mark Rowe.

Re-factor core setRequestHeader logic into setRequestHeaderInternal.

  • xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::sameOriginRequest): (WebCore::XMLHttpRequest::setRequestHeader): (WebCore::XMLHttpRequest::setRequestHeaderInternal):
  • xml/XMLHttpRequest.h:
8:00 PM Changeset in webkit [33560] by oliver@apple.com
  • 22 edits
    2 deletes in branches/squirrelfish

Reverting r33553 as the patch is incomplete so breaks the build

6:21 PM Changeset in webkit [33559] by weinig@apple.com
  • 10 edits in trunk

WebCore:

2008-05-17 Sam Weinig <sam@webkit.org>

Reviewed by Mark Rowe.

Differentiate between cancelation errors and generic network error in XHR.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::requestFromDelegate): (WebCore::FrameLoader::cancelledError):
  • platform/network/ResourceErrorBase.h: (WebCore::ResourceErrorBase::setIsCancelation): (WebCore::ResourceErrorBase::isCancelation): (WebCore::ResourceErrorBase::ResourceErrorBase): Add state that differentiates between errors created by cancelation and those made by all other generic network errors as this differentiation is needed by some specs.
  • xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::open): (WebCore::XMLHttpRequest::loadRequestSynchronously): (WebCore::XMLHttpRequest::clearResponseEntityBody): (WebCore::XMLHttpRequest::genericError): (WebCore::XMLHttpRequest::networkError): (WebCore::XMLHttpRequest::abortError): (WebCore::XMLHttpRequest::didFail):
  • xml/XMLHttpRequest.h:
  • xml/XMLHttpRequestException.h: (WebCore::XMLHttpRequestException::):
  • xml/XMLHttpRequestException.idl: Add ABORT_ERR. This error cannot be raised with the current WebKit architecture as it requires the ability to cancel a synchronous XHR, which we cannot currently do. It may be possible in the future though.

LayoutTests:

2008-05-17 Sam Weinig <sam@webkit.org>

Reviewed by Mark Rowe.

Update expected results for new ABORT_ERR.

  • fast/dom/Window/window-properties-expected.txt:
5:47 PM Changeset in webkit [33558] by mrowe@apple.com
  • 4 edits in tags/Safari-6526.6.1

Versioning.

5:46 PM Changeset in webkit [33557] by mrowe@apple.com
  • 2 edits in tags/Safari-6526.6.1/WebCore

Merge r33555.

5:12 PM Changeset in webkit [33556] by mrowe@apple.com
  • 1 copy in tags/Safari-6526.6.1

New tag.

5:08 PM Changeset in webkit [33555] by mrowe@apple.com
  • 2 edits in trunk/WebCore

2008-05-17 Mark Rowe <mrowe@apple.com>

Reviewed by Sam Weinig.

Including wtf/Platform.h or using any of the macros it defines in headers that may be
included from outside of the WebKit project causes any project using those headers to
fail to build.

  • page/mac/WebDashboardRegion.h:
3:45 PM Changeset in webkit [33554] by weinig@apple.com
  • 3 edits in trunk/WebCore

2008-05-17 Sam Weinig <sam@webkit.org>

Reviewed by Brady Eidson.

Re-factor send() logic a little to make adding cross-site requests easier.

  • xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): (WebCore::XMLHttpRequest::sameOriginRequest): (WebCore::XMLHttpRequest::loadRequestSynchronously): (WebCore::XMLHttpRequest::loadRequestAsynchronously):
  • xml/XMLHttpRequest.h:
11:58 AM Changeset in webkit [33553] by ggaren@apple.com
  • 22 edits
    2 copies in branches/squirrelfish

JavaScriptCore:

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

Reviewed by Oliver Hunt.

Behold: debugging.


SunSpider reports no change.

  • JavaScriptCore.xcodeproj/project.pbxproj: Added DebuggerCallFrame.h/.cpp, and created a debugger folder.
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::generate): If the debugger is attached, always generate full scope chains for its sake.
  • VM/Machine.cpp: (KJS::Machine::unwindCallFrame): Notify the debugger when unwinding due to an exception, so it doesn't keep stale call frames around.

(KJS::Machine::execute): Set Callee to 0 in eval frames, so the
debugger can distinguish them from function call frames.

(KJS::Machine::debug): Simplified this function, since the debugger
doesn't actually need all the information we used to provide.

(KJS::Machine::privateExecute): Treat debugging hooks like other function
calls, so the code we hook into (the debugger UI) can be optimized.

  • kjs/debugger.cpp: Nixed these default callback implementations and made the callbacks pure virtual instead, so the compiler could tell me if I made a mistake in one of the subclasses.
  • kjs/debugger.h: Removed a bunch of irrelevent data from the debugger callbacks. Changed from passing an ExecState* to passing a DebuggerCallFrame*, since an ExecState* doesn't contain sufficient information anymore.
  • kjs/function.cpp: (KJS::globalFuncEval): Easiest bug fix evar!

WebCore:

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

Reviewed by Oliver Hunt.

Updated for API changes in KJS::Debugger.

WebKit/mac:

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

Reviewed by Oliver Hunt.


Re-enabled previously disabled debugging functionality.


There are two major changes from how the WebKit debugger used to work:


(1) All the interesting bits are implemented down in JavaScriptCore. The
debugger just calls through to KJS::DebuggerCallFrame for everything.


(2) Instead of copyihng a pointer to an ExecState once, the debugger
copies the DebuggerCallFrame passed to it in each callback. This is
because the VM no longer maintains a fully transparent execution state
to which you can hold a pointer, and the DebuggerCallFrames it vends
are temporaries.


Also, we NULL out a WebScriptCallFrame's DebuggerCallFrame upon return
from its function. This is safer than the old method, which was to
hold a stale ExecState* and hope for the best.

4:00 AM Changeset in webkit [33552] by cwzwarich@webkit.org
  • 10 edits in branches/squirrelfish

2008-05-17 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver.

Bug 18991: SquirrelFish: Major codegen issue in a.b=expr, a[b]=expr
<https://bugs.webkit.org/show_bug.cgi?id=18991>

Ensure that the code generated for assignments uses temporaries whenever
necessary. This patch covers the vast majority of situations, but there
are still a few left.

This patch also adds some missing cases to CodeBlock::dump().

JavaScriptCore:

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.h: (KJS::CodeGenerator::destinationForAssignResult): (KJS::CodeGenerator::leftHandSideNeedsCopy): (KJS::CodeGenerator::emitNodeForLeftHandSide):
  • kjs/NodeInfo.h:
  • kjs/grammar.y:
  • kjs/nodes.cpp: (KJS::AssignDotNode::emitCode): (KJS::ReadModifyDotNode::emitCode): (KJS::AssignBracketNode::emitCode): (KJS::ReadModifyBracketNode::emitCode): (KJS::ForInNode::ForInNode):
  • kjs/nodes.h: (KJS::ReadModifyResolveNode::): (KJS::AssignResolveNode::): (KJS::ReadModifyBracketNode::): (KJS::AssignBracketNode::): (KJS::AssignDotNode::): (KJS::ReadModifyDotNode::):

LayoutTests:

  • fast/js/codegen-temporaries-expected.txt:
  • fast/js/resources/codegen-temporaries.js:
1:37 AM Changeset in webkit [33551] by oliver@apple.com
  • 1 edit
    2 adds in branches/squirrelfish/LayoutTests

Forgot to check in the results to the activation gc tests

12:22 AM Changeset in webkit [33550] by oliver@apple.com
  • 3 edits
    4 adds in branches/squirrelfish

Bug 19106: SquirrelFish: Activation is not marked correctly
<https://bugs.webkit.org/show_bug.cgi?id=19106>

Reviewed by Maciej

We can't rely on the symbol table for a count of the number of globals
we need to mark as that misses duplicate parameters and 'this'. Now we
use the actual local register count from the codeBlock.

May 16, 2008:

11:43 PM Changeset in webkit [33549] by Stephanie Lewis
  • 6 edits in trunk

2008-05-16 Stephanie Lewis <Stephanie Lewis>

Reviewed by Steve.

Get pending unload event count from WebCore.

  • Interfaces/IWebFramePrivate.idl:
  • WebFrame.cpp: (WebFrame::pendingFrameUnloadEventCount):
  • WebFrame.h:

Print out pending unload event count. Also print out main framename to match Mac. +

  • DumpRenderTree/win/FrameLoadDelegate.cpp:

(descriptionSuitableForTestResult):
(FrameLoadDelegate::didFinishDocumentLoadForFrame):

10:34 PM Changeset in webkit [33548] by pewtermoose@webkit.org
  • 2 edits in trunk/WebKit/win

2008-05-16 Matt Lilek <webkit@mattlilek.com>

Rubber stamped by Oliver.

Remove the Drosera sub-project.

  • WebKit.vcproj/WebKit.sln:
9:21 PM Changeset in webkit [33547] by timothy@apple.com
  • 4 edits
    104 deletes in trunk/WebKitTools

Remove the Drosera project, code and resources since it has been
replaced with the Web Inspector's debugger. Removes references to
Drosera in various scripts and makefiles.

Rubber-stamped by Mark Rowe.

  • BuildSlaveSupport/build-launcher-app:
  • Drosera/DebuggerDocument.cpp: Removed.
  • Drosera/DebuggerDocument.h: Removed.
  • Drosera/Drosera.icns: Removed.
  • Drosera/DroseraWin.make: Removed.
  • Drosera/English.lproj/Debugger.nib/classes.nib: Removed.
  • Drosera/English.lproj/Debugger.nib/info.nib: Removed.
  • Drosera/English.lproj/Debugger.nib/keyedobjects.nib: Removed.
  • Drosera/English.lproj/MainMenu.nib/classes.nib: Removed.
  • Drosera/English.lproj/MainMenu.nib/info.nib: Removed.
  • Drosera/English.lproj/MainMenu.nib/keyedobjects.nib: Removed.
  • Drosera/ForwardingHeaders/wtf/Assertions.h: Removed.
  • Drosera/ForwardingHeaders/wtf/HashTraits.h: Removed.
  • Drosera/ForwardingHeaders/wtf/Noncopyable.h: Removed.
  • Drosera/ForwardingHeaders/wtf/OwnPtr.h: Removed.
  • Drosera/ForwardingHeaders/wtf/Platform.h: Removed.
  • Drosera/ForwardingHeaders/wtf/RetainPtr.h: Removed.
  • Drosera/Images/Drosera.ico: Removed.
  • Drosera/Images/SourceArrow.png: Removed.
  • Drosera/Images/SourceArrowBlank.png: Removed.
  • Drosera/Images/SourceArrowOpen.png: Removed.
  • Drosera/Images/background_stripe.png: Removed.
  • Drosera/Images/breakPoint.tif: Removed.
  • Drosera/Images/breakPointDisabled.tif: Removed.
  • Drosera/Images/breakpointeditor.png: Removed.
  • Drosera/Images/close.tif: Removed.
  • Drosera/Images/close_active.tif: Removed.
  • Drosera/Images/close_hover.tif: Removed.
  • Drosera/Images/console.png: Removed.
  • Drosera/Images/continue.tif: Removed.
  • Drosera/Images/fileIcon.jpg: Removed.
  • Drosera/Images/finishFunction.tif: Removed.
  • Drosera/Images/glossyFooterFill.tif: Removed.
  • Drosera/Images/glossyHeader.png: Removed.
  • Drosera/Images/glossyHeaderPressed.png: Removed.
  • Drosera/Images/gradientBackground.png: Removed.
  • Drosera/Images/gutter.png: Removed.
  • Drosera/Images/navLeftDisabled.png: Removed.
  • Drosera/Images/navLeftNormal.png: Removed.
  • Drosera/Images/navLeftPressed.png: Removed.
  • Drosera/Images/navRightDisabled.png: Removed.
  • Drosera/Images/navRightNormal.png: Removed.
  • Drosera/Images/navRightPressed.png: Removed.
  • Drosera/Images/pause.tif: Removed.
  • Drosera/Images/popUpArrows.png: Removed.
  • Drosera/Images/programCounter.tif: Removed.
  • Drosera/Images/programCounterBreakPoint.tif: Removed.
  • Drosera/Images/programCounterBreakPointDisabled.tif: Removed.
  • Drosera/Images/run.tif: Removed.
  • Drosera/Images/siteCollapsed.tif: Removed.
  • Drosera/Images/siteExpanded.tif: Removed.
  • Drosera/Images/siteIcon.tif: Removed.
  • Drosera/Images/small.ico: Removed.
  • Drosera/Images/splitterBar.tif: Removed.
  • Drosera/Images/splitterDimple.tif: Removed.
  • Drosera/Images/step.tif: Removed.
  • Drosera/Images/stepOut.tif: Removed.
  • Drosera/Images/stepOver.tif: Removed.
  • Drosera/Images/stop.tif: Removed.
  • Drosera/Images/toolbarBackground.png: Removed.
  • Drosera/Images/verticalSplitterBar.tiff: Removed.
  • Drosera/Images/verticalSplitterDimple.tiff: Removed.
  • Drosera/Makefile: Removed.
  • Drosera/breakpointEditor.html: Removed.
  • Drosera/config.h: Removed.
  • Drosera/console.css: Removed.
  • Drosera/console.html: Removed.
  • Drosera/console.js: Removed.
  • Drosera/debugger.css: Removed.
  • Drosera/debugger.html: Removed.
  • Drosera/debugger.js: Removed.
  • Drosera/mac/DebuggerApplication.h: Removed.
  • Drosera/mac/DebuggerApplication.mm: Removed.
  • Drosera/mac/DebuggerClient.h: Removed.
  • Drosera/mac/DebuggerClient.mm: Removed.
  • Drosera/mac/DebuggerDocumentPlatform.mm: Removed.
  • Drosera/mac/Drosera.xcodeproj/project.pbxproj: Removed.
  • Drosera/mac/Info.plist: Removed.
  • Drosera/mac/LauncherInfo.plist: Removed.
  • Drosera/mac/Makefile: Removed.
  • Drosera/mac/ServerConnection.h: Removed.
  • Drosera/mac/ServerConnection.mm: Removed.
  • Drosera/mac/launcher.m: Removed.
  • Drosera/mac/main.m: Removed.
  • Drosera/viewer.css: Removed.
  • Drosera/viewer.html: Removed.
  • Drosera/win/BaseDelegate.h: Removed.
  • Drosera/win/DebuggerClient.cpp: Removed.
  • Drosera/win/DebuggerClient.h: Removed.
  • Drosera/win/DebuggerDocumentPlatform.cpp: Removed.
  • Drosera/win/Drosera.cpp: Removed.
  • Drosera/win/Drosera.h: Removed.
  • Drosera/win/Drosera.vcproj/Drosera.rc: Removed.
  • Drosera/win/Drosera.vcproj/Drosera.vcproj: Removed.
  • Drosera/win/DroseraPrefix.cpp: Removed.
  • Drosera/win/DroseraPrefix.h: Removed.
  • Drosera/win/Info.plist: Removed.
  • Drosera/win/ServerConnection.cpp: Removed.
  • Drosera/win/ServerConnection.h: Removed.
  • Drosera/win/resource.h: Removed.
  • Makefile:
  • Scripts/build-drosera: Removed.
  • Scripts/gdb-drosera: Removed.
  • Scripts/run-drosera: Removed.
  • Scripts/run-drosera-nightly.cmd: Removed.
  • Scripts/run-drosera.cmd: Removed.
  • Scripts/webkitdirs.pm:
6:46 PM SquirrelFish edited by ggaren@apple.com
(diff)
6:46 PM Changeset in webkit [33546] by beidson@apple.com
  • 6 edits in trunk/WebKit/win

2008-05-16 Brady Eidson <beidson@apple.com>

Reviewed by Steve Falkenburg


<rdar://problem/5942624> - Get LocalStorage persistence working on Windows


  • WebPreferenceKeysPrivate.h: Add the LocalStorageDirectory defaults key


  • WebPreferences.cpp: (WebPreferences::initializeDefaultSettings): (WebPreferences::localStorageDatabasePath): (WebPreferences::setLocalStorageDatabasePath):
  • WebPreferences.h:
  • Interfaces/IWebPreferencesPrivate.idl:
  • WebView.cpp: (WebView::initWithFrame): Set the path in the WebCore::Settings after new Page creation
6:16 PM Changeset in webkit [33545] by andersca@apple.com
  • 2 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Mitz.

Copy appcache headers.


  • WebCore.vcproj/WebCore.vcproj:
5:50 PM Changeset in webkit [33544] by Antti Koivisto
  • 3 edits
    2 adds in trunk

WebCore:

2008-05-16 Antti Koivisto <Antti Koivisto>

Reviewed by Anders.


Fix <rdar://problem/5934400>
Movie controller does not update on first load of http://www.apple.com/getamac/ads/


The issue is that we execute scripts while there are still pending stylesheet loads.
If the script depends on a stylesheet having been applied it may fail.


This will make external script execution block on external stylesheet loads. A full
fix (as discussed with Hyatt) will also need to block inline script execution.

Test: http/tests/local/stylesheet-and-script-load-order-http.html

  • html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::notifyFinished):

LayoutTests:

2008-05-16 Antti Koivisto <Antti Koivisto>

Reviewed by Anders.


Test for <rdar://problem/5934400>
Movie controller does not update on first load of http://www.apple.com/getamac/ads/

  • http/tests/local/stylesheet-and-script-load-order-http-expected.txt: Added.
  • http/tests/local/stylesheet-and-script-load-order-http.html: Added.
5:36 PM Changeset in webkit [33543] by mrowe@apple.com
  • 2 edits in tags/Safari-6526.6/WebCore

Merge r33497.

5:28 PM Changeset in webkit [33542] by Chris Fleizach
  • 2 edits in trunk/WebCore

<rdar://problem/5582483> Mail compose area needs to allow AXValue to be settable

5:27 PM Changeset in webkit [33541] by oliver@apple.com
  • 9 edits
    2 adds in branches/squirrelfish

Bug 19076: SquirrelFish: RegisterFile can be corrupted if implictly reenter global scope with no declared vars
<https://bugs.webkit.org/show_bug.cgi?id=19076>

Reviewed by Geoff

Don't delay allocation of initial global RegisterFile, as we can't guarantee we will be able
to allocate the global 'this' register safely at any point after initialisation of the Global
Object.

Unfortunately this initial allocation caused a regression of 0.2-0.3%, however this patch adds
support for the static slot optimisation for the global Math object which brings it to a 0.3%
progression.

5:23 PM Changeset in webkit [33540] by mrowe@apple.com
  • 4 edits in trunk

Versioning.

5:21 PM Changeset in webkit [33539] by mrowe@apple.com
  • 1 copy in tags/Safari-6526.6

New tag.

5:18 PM Changeset in webkit [33538] by Stephanie Lewis
  • 9 edits in trunk/WebCore

2008-05-16 Stephanie Lewis <Stephanie Lewis>

Reviewed by Maciej.

track onbeforeunlaod event counts. Pretty much identical to unload event tracking.
Also rename methods from onunload tracking to be more clear.

increment/decrement event counts when onunload and onbeforeunload events are added/removed

  • dom/Document.cpp: (WebCore::Document::removeHTMLWindowEventListener): (WebCore::Document::addWindowEventListener): (WebCore::Document::removeWindowEventListener): (WebCore::Document::addPendingFrameUnloadEventCount): (WebCore::Document::removePendingFrameUnloadEventCount): (WebCore::Document::addPendingFrameBeforeUnloadEventCount): (WebCore::Document::removePendingFrameBeforeUnloadEventCount):
  • dom/Document.h:


clear onunload count after unload events are dispatched

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading):

track onunload and onbeforeunload event counts for each frame

  • page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::addPendingFrameUnloadEventCount): (WebCore::EventHandler::removePendingFrameUnloadEventCount): (WebCore::EventHandler::clearPendingFrameUnloadEventCount): (WebCore::EventHandler::pendingFrameBeforeUnloadEventCount): (WebCore::EventHandler::addPendingFrameBeforeUnloadEventCount): (WebCore::EventHandler::removePendingFrameBeforeUnloadEventCount): (WebCore::EventHandler::clearPendingFrameBeforeUnloadEventCount):
  • page/EventHandler.h:


clear unbeforeunload count after unbeforeunload events are detached

  • page/Frame.cpp: (WebCore::Frame::shouldClose):

track total event count at page level

  • page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::changePendingUnloadEventCount): (WebCore::Page::pendingBeforeUnloadEventCount): (WebCore::Page::changePendingBeforeUnloadEventCount):
  • page/Page.h:
5:07 PM Changeset in webkit [33537] by andersca@apple.com
  • 4 edits in trunk

WebCore:

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Mitz.

<rdar://problem/5787788>
REGRESSION: fast/loader/xmlhttprequest-missing-file-exception.html fails on Windows.


Replicate the Mac behavior when a sync load fails.


  • platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::loadResourceSynchronously):

LayoutTests:

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Mitz.

<rdar://problem/5787788>
REGRESSION: fast/loader/xmlhttprequest-missing-file-exception.html fails on Windows.

Remove test from skipped list.


  • platform/win/Skipped:
5:02 PM SquirrelFish edited by ggaren@apple.com
(diff)
4:26 PM Changeset in webkit [33536] by andersca@apple.com
  • 2 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Brady.

Parse and set the headers on the response.

  • loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::store): (WebCore::parseHeader): (WebCore::parseHeaders): (WebCore::ApplicationCacheStorage::loadCache):
3:53 PM Changeset in webkit [33535] by timothy@apple.com
  • 10 edits
    3 deletes in trunk/WebKit

Removes WebScriptDebugServer files and related calls. This removes
the hooks that Drosera uses for debugging. Now that the Web Inspector
has a better debugger, we don't need these anymore.

Reviewed by Sam Weinig.

  • DefaultDelegates/WebScriptDebugServer.h: Removed.
  • DefaultDelegates/WebScriptDebugServer.m: Removed.
  • DefaultDelegates/WebScriptDebugServerPrivate.h: Removed.
  • WebCoreSupport/WebFrameLoaderClient.mm:
  • WebKit.exp:
  • WebView/WebScriptDebugDelegate.mm:
  • WebView/WebScriptDebugger.mm:

(WebScriptDebugger::sourceParsed):
(WebScriptDebugger::callEvent):
(WebScriptDebugger::atStatement):
(WebScriptDebugger::returnEvent):
(WebScriptDebugger::exception):

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

  • WebView/WebViewPrivate.h:
3:30 PM Changeset in webkit [33534] by timothy@apple.com
  • 7 edits in trunk/WebCore

Adds the "this" object to the Local scope section of the
Scope Variables pane.

<rdar://problem/5774773> Web Inspector doesn't show the "this"
object in its variables list (10438)

Reviewed by Oliver Hunt.

  • bindings/js/JSJavaScriptCallFrameCustom.cpp:

(WebCore::JSJavaScriptCallFrame::thisObject): Returns the thisObject
of the JavaScriptCallFrame impl. Returns jsNull if the impl is invalid.

  • page/JavaScriptCallFrame.cpp:

(WebCore::JavaScriptCallFrame::thisObject): Return the thisValue from
the ExecState. Return 0 if m_exec is null.

  • page/JavaScriptCallFrame.h:
  • page/JavaScriptCallFrame.idl: Add thisObject.
  • page/inspector/ObjectPropertiesSection.js:

(WebInspector.ObjectPropertiesSection): Adds two new arguments.
The ignoreHasOwnProperty tells the section to show all properties,
including inherited ones. And extraProperties is an object of
additional properties to show.
(WebInspector.ObjectPropertiesSection.prototype): Honor the
extraProperties and ignoreHasOwnProperty properties.

  • page/inspector/ScopeChainSidebarPane.js:

(WebInspector.ScopeChainSidebarPane.prototype.update): Add a this
property to an extra object that is passed to the ObjectPropertiesSection.
Also pass true for ignoreHasOwnProperty since we want to show all properties.

3:26 PM Changeset in webkit [33533] by andersca@apple.com
  • 2 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Brady.

Add mimeType and textEncodingName to the resource table.


  • loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::openDatabase): (WebCore::ApplicationCacheStorage::store): (WebCore::ApplicationCacheStorage::loadCache):
3:23 PM Changeset in webkit [33532] by kmccullough@apple.com
  • 9 edits in trunk

JavaScriptCore:

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

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)
Implement sorting for the profiler.
I chose to sort the profileNodes in place since there is no reason they
need to retain their original order.

  • JavaScriptCore.exp: Export the symbols.
  • profiler/Profile.h: Add the different ways a profile can be sorted. (KJS::Profile::sortTotalTimeDescending): (KJS::Profile::sortTotalTimeAscending): (KJS::Profile::sortSelfTimeDescending): (KJS::Profile::sortSelfTimeAscending): (KJS::Profile::sortCallsDescending): (KJS::Profile::sortCallsAscending):
  • profiler/ProfileNode.cpp: Implement those ways. (KJS::totalTimeDescendingComparator): (KJS::ProfileNode::sortTotalTimeDescending): (KJS::totalTimeAscendingComparator): (KJS::ProfileNode::sortTotalTimeAscending): (KJS::selfTimeDescendingComparator): (KJS::ProfileNode::sortSelfTimeDescending): (KJS::selfTimeAscendingComparator): (KJS::ProfileNode::sortSelfTimeAscending): (KJS::callsDescendingComparator): (KJS::ProfileNode::sortCallsDescending): (KJS::callsAscendingComparator): (KJS::ProfileNode::sortCallsAscending):
  • profiler/ProfileNode.h: No longer use a Deque since it cannot be sorted by std::sort and there was no reason not to use a Vector. I previously had though I would do prepending but am not. (KJS::ProfileNode::selfTime): (KJS::ProfileNode::totalPercent): (KJS::ProfileNode::selfPercent): (KJS::ProfileNode::children):
  • profiler/Profiler.cpp: Removed these functions as they can be called directoy on the Profile object after getting the Vector of them. (KJS::getStackNames):
  • profiler/Profiler.h:

WebCore:

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

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)
Use a Vector instead of a Deque since we don't use the extra capabilities
of the Deque.

  • page/JavaScriptProfileNode.cpp: (WebCore::getChildren): (WebCore::toJS):
3:19 PM Changeset in webkit [33531] by beidson@apple.com
  • 2 edits in trunk/WebKit/mac

2008-05-16 Brady Eidson <beidson@apple.com>

Reviewed by Anders

<rdar://problem/5942616> - Need to standardize LocalStorage persistence path

Took the opportunity to touch up another pref that needs the same standardization.
That pref is currently not in use on Mac.

  • WebView/WebPreferences.m: (-[WebPreferences _setFTPDirectoryTemplatePath:]): (-[WebPreferences _localStorageDatabasePath]): (-[WebPreferences _setLocalStorageDatabasePath:]): (-[WebPreferences _ftpDirectoryTemplatePath]):
2:30 PM Changeset in webkit [33530] by timothy@apple.com
  • 2 edits in trunk/WebCore

Fix the build.

2:24 PM Changeset in webkit [33529] by andersca@apple.com
  • 3 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Brady.

Add a version table to the database.

  • loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::verifySchemaVersion): (WebCore::ApplicationCacheStorage::openDatabase):
  • loader/appcache/ApplicationCacheStorage.h:
2:10 PM Changeset in webkit [33528] by timothy@apple.com
  • 1 edit in trunk/WebCore/ChangeLog

Restore some ChangeLog entries I nuked in the previous commits.

1:47 PM Changeset in webkit [33527] by timothy@apple.com
  • 7 edits in trunk

Adds the ability to evaluate expressions in the local scope
of the selected call frame.

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

Reviewed by Geoff Garen.

  • bindings/js/JSJavaScriptCallFrameCustom.cpp:

(WebCore::JSJavaScriptCallFrame::evaluate): Pass the exception
from evaluate to the calling ExecState.

  • page/JavaScriptCallFrame.cpp:

(WebCore::JavaScriptCallFrame::evaluate): Added an exception out
argument. Simplified the code by calling KJS:eval directly.

  • page/JavaScriptCallFrame.h: Change evalutate to take an exception

out argument.

  • page/inspector/Console.js: Check if the debugger is paused and

call evaluateInSelectedCallFrame on the Scripts panel.

  • page/inspector/ScriptsPanel.js: Added a paused getter and

evaluateInSelectedCallFrame which does the evaluation and updates
the scope variables pane afterwards.

1:47 PM Changeset in webkit [33526] by timothy@apple.com
  • 2 edits in trunk/WebCore

Fixed the bug where the Inspector node highlight would not show
in the correct place for nodes in frames.

<rdar://problem/5712834> Elements in iframes are highlighted incorrectly (14408)

Reviewed by John Sullivan.

  • page/InspectorController.cpp:

(WebCore::convertFromFrameToMainFrame): Helper function to convert
IntRect coordinates from one frame to the main frame.
(WebCore::InspectorController::drawNodeHighlight): Call the
convertFromFrameToMainFrame helper for all the rects we get from
the node since they are in the owner frame's coordinate space.

1:46 PM Changeset in webkit [33525] by timothy@apple.com
  • 8 edits
    1 add in trunk/WebCore

Adds an error and warning count indicator at the bottom right in the
Inspector's status bar.

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

Initial implementation by Adam Roben.
Reviewed by Sam Weinig.

Test: manual-tests/inspector/error-warning-count.html

  • English.lproj/localizedStrings.js: Added new strings.
  • manual-tests/inspector/error-warning-count.html: Added.
  • page/inspector/Console.js:

(WebInspector.Console.prototype.show): Don't do anything if visible.
(WebInspector.Console.prototype.hide): Don't do anything if hidden.
Temporally set properties and classes to mimic the post-animation
values so panels like Elements in their updateStatusBarItems call will
size things to fit the final location.

  • page/inspector/ElementsPanel.js:

(WebInspector.ElementsPanel.prototype.updateBreadcrumbSizes):
Account for the #error-warning-count width when sizing breadcrumbs.

  • page/inspector/Resource.js:

(WebInspector.Resource.prototype.set errors): Update the global error count.
(WebInspector.Resource.prototype.set warnings): Update the global warning count.

  • page/inspector/inspector.css: Make .hidden's display property

!important to ensure things really hide, and added styling for the new

  • page/inspector/inspector.html: Added an #error-warning-count div

in the #anchored-status-bar-items div.

  • page/inspector/inspector.js:

(WebInspector.get errors): Added.
(WebInspector.set errors): Added. Calls _updateErrorAndWarningCounts.
(WebInspector.get warnings): Added.
(WebInspector.set warnings): Added. Calls _updateErrorAndWarningCounts.
(WebInspector._updateErrorAndWarningCounts): Added. Update the
(WebInspector.loaded): Add a click event listener to the
_updateErrorAndWarningCounts to display the initial error/warning counts.

1:38 PM Changeset in webkit [33524] by jchaffraix@webkit.org
  • 9 edits in trunk

WebCore:

2008-05-16 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Eric.

Preparatory work for bug 9191: JS*ElementWrapperFactory should be autogenerated

Make video tags use a header guard so that make_names.pl for factory generation.

  • Add video tag guard in HTMLTagNames.in & give an extraDefines parameter to make_names.pl when generating HTMLNames.
  • Modify the different build systems to accomodate the new parameter.
  • Small make_names.pl clean up (mainly code generated coding style issue).
  • DerivedSources.make: Add HTML_FLAGS and pass it to make_names.pl if it is defined (similar to SVG)
  • GNUmakefile.am: Add HTML_FEATURES & HTML_FLAGS and pass it to make_names.pl if HTML_FLAGS is defined.
  • WebCore.pro: Pass $${DEFINES} to make_names.pl.
  • dom/make_names.pl:
  • html/HTMLElement.cpp: (WebCore::inlineTagList): Add ENABLE(VIDEO) guard.
  • html/HTMLTagNames.in: Ditto.

2008-05-16 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Eric.

Preparatory work for bug 9191: JS*ElementWrapperFactory should be autogenerated

  • configure.ac: Add HTML_FLAGS and set it when video is enabled.
12:17 PM UsingGitWithWebKit edited by ddkilzer@apple.com
(diff)
11:47 AM Changeset in webkit [33523] by andersca@apple.com
  • 2 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Mitz.

Fire progress events.


  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::startLoadingEntry):
10:28 AM Changeset in webkit [33522] by andersca@apple.com
  • 2 edits in trunk/WebKitSite

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Jess.

Add manifest MIME type.


  • .htaccess:
10:27 AM Changeset in webkit [33521] by andersca@apple.com
  • 4 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by John.

Handle the case where the main resource load is cancelled while the cache attempt is in progress.


  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::mainReceivedError): Tell the group that the main resource failed to load.


  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::failedLoadingMainResource): Call cacheUpdateFailed.


(WebCore::ApplicationCacheGroup::cacheUpdateFailed):
Stop loading if the update failed.


  • loader/appcache/ApplicationCacheGroup.h:
10:26 AM Changeset in webkit [33520] by Chris Fleizach
  • 10 edits in trunk

<rdar://problem/5710317> REGRESSION:Selecting ranges of text should be possible using the keyboard (15310)

Adds support to select text ranges when enhanced accessibility is turned on

10:25 AM Changeset in webkit [33519] by andersca@apple.com
  • 2 edits in trunk/LayoutTests

2008-05-15 Anders Carlsson <andersca@apple.com>

Update test results now that navigator.onLine exists.


  • fast/dom/Window/window-properties-expected.txt:
7:25 AM Changeset in webkit [33518] by Simon Hausmann
  • 8 edits in trunk

2008-05-15 Ariya Hidayat <ariya.hidayat@trolltech.com>

Reviewed by Simon.

Since WebKitGtk is fully using autotools now, clean-up the .pro/.pri files
from gtk-port.

5:06 AM Changeset in webkit [33517] by oliver@apple.com
  • 3 edits
    3 adds in branches/squirrelfish

Bug 19098: SquirrelFish: Ref'd temporaries can be clobbered
<https://bugs.webkit.org/show_bug.cgi?id=19098>

Patch from Cameron Zwarich
Reviewed by Oliver

When doing code generation for a statement list, increase the reference
count on a register that might eventually be returned, so that it doesn't
get clobbered by a request for a new temporary.

2:51 AM Changeset in webkit [33516] by mjs@apple.com
  • 3 edits
    6 adds in branches/squirrelfish

JavaScriptCore:

2008-05-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.


  • kjs/JSActivation.cpp: (KJS::JSActivation::copyRegisters): Use numLocals from the code block rather than the size of the symbol table for the number of registers to copy, to account for duplicate parameters and vars with the same name as parameters (we still have potentially suboptimal codegen in that we allocate a local register for the var in the latter case but it is never used).

LayoutTests:

2008-05-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fast/js/duplicate-param-crash-expected.txt: Added.
  • fast/js/duplicate-param-crash.html: Added.
  • fast/js/resources/duplicate-param-crash.js: Added.
  • fast/js/resources/var-shadows-arg-crash.js: Added.
  • fast/js/var-shadows-arg-crash-expected.txt: Added.
  • fast/js/var-shadows-arg-crash.html: Added.
12:22 AM Changeset in webkit [33515] by Simon Hausmann
  • 2 edits in trunk/WebCore

Fix the Gtk build.

12:12 AM Changeset in webkit [33514] by Simon Hausmann
  • 3 edits in trunk/WebCore

Fix the Qt build.

12:10 AM Changeset in webkit [33513] by rwlbuis@webkit.org
  • 3 edits
    2 adds in trunk

Reviewed by Dave Hyatt.

https://bugs.webkit.org/show_bug.cgi?id=17433
getComputedStyle() -> clip returns empty string

Make getComputedStyle return a shape value for clip
if it is set.

Tests: fast/css/getPropertyValue-clip.html

May 15, 2008:

10:53 PM Changeset in webkit [33512] by kevino@webkit.org
  • 4 edits in trunk

wx build fix. Add rendering/style to includes dir.

10:10 PM Changeset in webkit [33511] by kmccullough@apple.com
  • 2 edits in trunk/JavaScriptCore

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

  • Build fix.
8:27 PM Changeset in webkit [33510] by alice.liu@apple.com
  • 15 edits in trunk/WebCore

2008-05-15 Alice Liu <alice.liu@apple.com>

Reviewed by Beth Dakin.

Fixed <rdar://problem/5882283> Implement ARIA aria-activedescendant
Also added support for aria roles listbox and option, and aria-selected,
and aria-multiselectable for listboxes

  • dom/Element.cpp: (WebCore::Element::attributeChanged):
  • dom/Element.h:
  • dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged):
  • html/HTMLAttributeNames.in:
  • page/AXObjectCache.cpp: (WebCore::AXObjectCache::handleActiveDescendantChanged):
  • page/AXObjectCache.h: (WebCore::AXObjectCache::accessibilityEnabled): (WebCore::AXObjectCache::handleActiveDescendantChanged):
  • page/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::selectedChildren): (WebCore::AccessibilityListBox::visibleChildren):
  • page/AccessibilityListBox.h:
  • page/AccessibilityListBoxOption.h: (WebCore::AccessibilityListBoxOption::selectedChildren): (WebCore::AccessibilityListBoxOption::visibleChildren):
  • page/AccessibilityObject.cpp:
  • page/AccessibilityObject.h: (WebCore::AccessibilityObject::isListBox): (WebCore::AccessibilityObject::shouldFocusActiveDescendant): (WebCore::AccessibilityObject::activeDescendant): (WebCore::AccessibilityObject::handleActiveDescendantChanged):
  • page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::title): (WebCore::AccessibilityRenderObject::accessibilityShouldUseUniqueId): (WebCore::AccessibilityRenderObject::focusedUIElement): (WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged): (WebCore::RoleEntry::): (WebCore::AccessibilityRenderObject::ariaRoleAttribute): (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren): (WebCore::AccessibilityRenderObject::selectedChildren): (WebCore::AccessibilityRenderObject::ariaListboxVisibleChildren): (WebCore::AccessibilityRenderObject::visibleChildren):
  • page/AccessibilityRenderObject.h: (WebCore::AccessibilityRenderObject::isDetached):
  • page/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
8:20 PM Changeset in webkit [33509] by timothy@apple.com
  • 3 edits
    3 adds in trunk

Fixes a bug in the view source parsing of text within <script>,
<style>, <xmp>, <textarea> and other special tags. The text was
being parsed as HTML and would be syntax highlighted if a "<"
was encountered.

<rdar://problem/5790805> Inspector's source view missing some words,
doubles others in JS source in <script> tag (17752)

Reviewed by Dave Hyatt.

Added test: fast/frames/viewsource-plain-text-tags.html

  • html/HTMLTokenizer.cpp:

(WebCore::HTMLTokenizer::scriptHandler): Set scriptCodeSize and
scriptCodeResync to zero before an early return in view source mode.
This was causing text from a previous script tag to show up in
then next style tag.
(WebCore::HTMLTokenizer::parseTag): Enter an if block in view source
mode even if n is null. The n is property guarded in other places
and not used by view source mode. Removes a redundant null check on n.
Add a new null check of n before setting scriptSrcCharset. Other code
in HTMLTokenizer is already guarded for this code path.

8:20 PM Changeset in webkit [33508] by timothy@apple.com
  • 3 edits in trunk/WebCore

Changes the Web Inspector node highlight to be less aggressive
and only highlight when hovering over the selected node in the DOM
tree or breadcrumbs. You can highlight on hover for any node if
you hold down the Alt/Option key while hovering.

Reviewed by Kevin McCullough.

  • page/inspector/ElementsPanel.js:
  • page/inspector/inspector.js:
7:51 PM Changeset in webkit [33507] by kmccullough@apple.com
  • 5 edits in trunk/JavaScriptCore

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

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Cache some values to save on computing them repetitively. This will be a big savings when we sort since we won't have to walk the tree for every comparison!
  • We cache these values when we end profiling because otherwise we won't know which profile to get the totalTime for the whole profile from without retaining a reference to the head profile or looking up the profile from the list of all profiles.
  • Also it's safe to assume we won't be asked for these values while we are still profiling since the WebInspector only get's profileNodes from profiles that are in the allProfiles() list and a profile is only added to that list after it has finished and these values will no longer change.
  • JavaScriptCore.exp:
  • profiler/ProfileNode.cpp: (KJS::ProfileNode::ProfileNode): (KJS::ProfileNode::stopProfiling): (KJS::ProfileNode::printDataInspectorStyle): (KJS::ProfileNode::printDataSampleStyle): (KJS::ProfileNode::endAndRecordCall):
  • profiler/ProfileNode.h: (KJS::ProfileNode::totalTime): (KJS::ProfileNode::selfTime): (KJS::ProfileNode::totalPercent): (KJS::ProfileNode::selfPercent):
  • profiler/Profiler.cpp: (KJS::Profiler::stopProfiling):
7:37 PM Changeset in webkit [33506] by Stephanie Lewis
  • 2 edits in trunk/WebKit/mac

2008-05-15 Stephanie Lewis <Stephanie Lewis>

fix mac build

  • WebView/WebView.mm: (-[WebView closeWithFastTeardown]):
7:31 PM Changeset in webkit [33505] by Stephanie Lewis
  • 2 edits in trunk/WebCore

2008-05-15 Stephanie Lewis <Stephanie Lewis>

Fix windows build

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading):
6:07 PM Changeset in webkit [33504] by Stephanie Lewis
  • 8 edits in trunk

2008-05-15 Stephanie Lewis <Stephanie Lewis>

Reviewed by Anders.

Turn on fast teardown. I added a preference for using full teardown because
the LEAKS output will be useless without a full teardown.

preference for fullteardown

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.m: (-[WebPreferences setFullDocumentTeardownEnabled:]): (-[WebPreferences fullDocumentTeardownEnabled]):
  • WebView/WebPreferencesPrivate.h:


on application quit dispatch unload events and destroy plugins then exit

  • WebView/WebView.mm: (-[WebView closeWithFastTeardown]): (-[WebView _close]):
  • WebView/WebViewPrivate.h:

export a symbol needed for fast teardown

  • WebCore.base.exp:
5:51 PM Changeset in webkit [33503] by Stephanie Lewis
  • 25 edits in trunk

2008-05-15 Stephanie Lewis <Stephanie Lewis>

Reviewed by Anders.

Keep track on pending unload event counts

No change in behavior so no new tests, but I am dumping the
unload event count to track the new variable.

  • WebCore.base.exp:

increment/decrement the count when an event is added/removed

  • dom/Document.cpp: (WebCore::Document::removeHTMLWindowEventListener): (WebCore::Document::addWindowEventListener): (WebCore::Document::removeWindowEventListener): (WebCore::Document::setPendingFrameUnloadEventCount):
  • dom/Document.h:

set the count to 0 for each frame after the unload event has been dispatched

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading):

keep track of the number of pending unload events for the eventHandler's frame

  • page/EventHandler.cpp: (WebCore::EventHandler::EventHandler):

(WebCore::EventHandler::pendingFrameUnloadEventCount):

(WebCore::EventHandler::setPendingFrameUnloadEventCount):

  • page/EventHandler.h:

keep track of the total number of pending unload events for all of the frames

  • page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::pendingUnloadEventCount): (WebCore::Page::setPendingUnloadEventCount):

age/Page.h:

get the pending frame unload count from WebCore

  • WebView/WebFrame.mm: (-[WebFrame _pendingFrameUnloadEventCount]):
  • WebView/WebFramePrivate.h:

Dump the unload count for a frame after parsing is finished.

  • DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate webView:didFinishDocumentLoadForFrame:]):

Dump unload event counts for frames.

  • fast/dom/Window/get-set-properties-expected.txt:
  • fast/events/onunload-expected.txt:
  • fast/events/onunload-not-on-body-expected.txt:
  • fast/events/onunload-window-property-expected.txt:
  • fast/forms/button-state-restore-expected.txt:
  • fast/history/history_reload-expected.txt:
  • fast/loader/onunload-form-submit-crash-2-expected.txt:
  • fast/loader/onunload-form-submit-crash-expected.txt:
  • http/tests/xmlhttprequest/xhr-onunload-expected.txt:
  • platform/mac/fast/loader/start-load-in-unload-expected.txt:
4:40 PM Changeset in webkit [33502] by sfalken@apple.com
  • 2 edits in trunk/WebCore

2008-05-15 Steve Falkenburg <sfalken@apple.com>

Fix build.

  • WebCore.vcproj/WebCore.vcproj:
4:39 PM Changeset in webkit [33501] by sullivan@apple.com
  • 2 edits in trunk/WebKit/mac

2008-05-15 John Sullivan <sullivan@apple.com>

Reviewed by Kevin Decker


  • fixed <rdar://problem/5940275> Inspector highlighting moves to bottom-left corner of screen when new tab appears


The highlight should go away entirely, but this simple patch just makes it not jump away.
The issue with it not going away entirely is harder to fix and covered by <rdar://problem/5322306>

  • WebInspector/WebNodeHighlight.m: (-[WebNodeHighlight _repositionHighlightWindow]): Bail out if target view isn't in a window
4:37 PM Changeset in webkit [33500] by Stephanie Lewis
  • 10 edits in trunk/WebKit/mac

2008-05-15 Stephanie Lewis <Stephanie Lewis>

Reviewed by Anders.

Track views that contain plugin instances so that they can be destroyed at application
quit without walking the entire document tree.

Add/Remove Netscape plugin views from instance list. Start/stop are when netscape
plugins are created and destroyed

  • Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView start]): (-[WebBaseNetscapePluginView stop]):


Add/remove WebKit plugin views from instance list

  • Plugins/WebPluginController.mm: (-[WebPluginController addPlugin:]): (-[WebPluginController destroyPlugin:]): (-[WebPluginController destroyAllPlugins]):

Add a set of views with plugin instances to the WebPluginDatabase

  • Plugins/WebPluginDatabase.h:
  • Plugins/WebPluginDatabase.mm: (-[WebPluginDatabase init]): (-[WebPluginDatabase dealloc]): (-[WebPluginDatabase addPluginInstanceView:]): (-[WebPluginDatabase removePluginInstanceView:]): (-[WebPluginDatabase removePluginInstanceViewsFor:]): (-[WebPluginDatabase destroyAllPluginInstanceViews]):


Handle cases where plugin views are detached before the plugin is destroyed.

  • WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::detachedFromParent2): (WebFrameLoaderClient::transitionToCommittedFromCachedPage): (WebFrameLoaderClient::transitionToCommittedForNewPage):

Add plugin instances to the set in the WebPluginDatabase by way of the WebView

  • WebView/WebHTMLView.mm:


  • WebView/WebHTMLViewInternal.h:
  • WebView/WebView.mm: (-[WebView addPluginInstanceView:]): (-[WebView removePluginInstanceView:]): (-[WebView removePluginInstanceViewsFor:]):
  • WebView/WebViewInternal.h:
4:10 PM Changeset in webkit [33499] by beidson@apple.com
  • 4 edits in trunk/WebKit

WebKit/mac:

2008-05-15 Brady Eidson <beidson@apple.com>

Reviewed by Tim Hatcher

Until the settings/preferences equation can be reworked, we'll need to manually set the local storage path
before setting the page group of the new page.


  • WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): Set the LocalStorage path immediately after creating the page so it is in place for initializing the LocalStorageThread

WebKit/win:

2008-05-06 Brady Eidson <beidson@apple.com>

Reviewed by Tim Hatcher

Until the settings/preferences equation can be reworked, we'll need to manually set the local storage path
before setting the page group of the new page.

Since I still need to add the local storage path to WebPreferences on Windows, mark this with a FIXME for now.

  • WebView.cpp: (WebView::initWithFrame): Mark an important FIXME for setting the LocalStorage path as appropriate. Until this FIXME is handled, Windows will have no persistent LocalStorage
4:03 PM Changeset in webkit [33498] by sfalken@apple.com
  • 2 edits in trunk/WebCore

2008-05-15 Steve Falkenburg <sfalken@apple.com>

Fix build.

  • WebCore.vcproj/WebCore.vcproj:
3:25 PM Changeset in webkit [33497] by sfalken@apple.com
  • 2 edits in trunk/WebCore

2008-05-15 Steve Falkenburg <sfalken@apple.com>

Fix build.

  • WebCore.vcproj/WebCore.vcproj:
2:08 PM Changeset in webkit [33496] by ddkilzer@apple.com
  • 3 edits
    2 adds in trunk

WebCore:

Bug 19085: font-family: initial sets font-family differently than font: initial

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

Reviewed by David Hyatt.

Test: fast/css/font-family-initial.html

  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Don't set family if first family of initial font description is empty.

LayoutTests:

Bug 19085: font-family: initial sets font-family differently than font: initial

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

Reviewed by David Hyatt.

  • fast/css/font-family-initial-expected.txt: Added.
  • fast/css/font-family-initial.html: Added.
2:00 PM Changeset in webkit [33495] by hyatt@apple.com
  • 6 edits
    2 moves
    1 add in trunk/WebCore

2008-05-15 David Hyatt <hyatt@apple.com>

Move RenderStyle into a new subdirectory, rendering/style/, in preparation for breaking it up into
a bunch of smaller files.

Reviewed by Dan Bernstein

  • GNUmakefile.am:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreSources.bkl:
  • rendering/RenderStyle.cpp: Removed.
  • rendering/RenderStyle.h: Removed.
  • rendering/style: Added.
  • rendering/style/RenderStyle.cpp: Copied from rendering/RenderStyle.cpp.
  • rendering/style/RenderStyle.h: Copied from rendering/RenderStyle.h.
1:42 PM Changeset in webkit [33494] by ddkilzer@apple.com
  • 2 edits in trunk/WebCore

Fix leaks when stopping a page from loading

Patch suggested by Antti. Reviewed by Antti.

  • loader/DocLoader.cpp: (WebCore::DocLoader::clearPreloads): If a resource is in m_preloads but never made it to the cache, delete it to prevent it from leaking.
12:58 PM Changeset in webkit [33493] by timothy@apple.com
  • 2 edits in trunk/WebKit/mac

Fixes the bug where the Web Inspector would flash white while resizing.
This was cause by deferring the window creation.

<rdar://problem/5873549> REGRESSION: Inspector flickers horribly while resizing (17979)

Reviewed by Darin Adler.

  • WebCoreSupport/WebInspectorClient.mm:

(-[WebInspectorWindowController window]): Don't defer the window creation.

12:49 PM Changeset in webkit [33492] by jchaffraix@webkit.org
  • 3 edits
    2 adds in trunk

WebCore:

2008-05-15 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Darin.

https://bugs.webkit.org/show_bug.cgi?id=13942
ASSERTION FAILED: !attrName.contains('/') in HTMLTokenizer.cpp:132 when loading http://bamanzi.blogeden.cn/

In HTML, when an attribute was null (for example when we parse '="somevalue"'
(attribute forgotten or there is a space between the attribute and the '=')),
the fallback was to assign the value to the attribute. However if the value was
a url or did contain a '/', we would trigger the assertion.

To avoid that, we check the value before assigning it now and do not assign it
if it means adding a '/'.

Test: fast/parser/assertion-empty-attribute.html

  • html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): Add check for '/' in value before assigning it to an attribute when the attribute is null.

LayoutTests:

2008-05-15 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Darin.

Test case for https://bugs.webkit.org/show_bug.cgi?id=13942
ASSERTION FAILED: !attrName.contains('/') in HTMLTokenizer.cpp:132 when loading http://bamanzi.blogeden.cn/

  • fast/parser/assertion-empty-attribute-expected.txt: Added.
  • fast/parser/assertion-empty-attribute.html: Added.
10:22 AM Changeset in webkit [33491] by ap@webkit.org
  • 9 edits in trunk

Reviewed by Dan Bernstein.

https://bugs.webkit.org/show_bug.cgi?id=10707
DumpRenderTree should not be able to access non-local resources

  • DumpRenderTree/mac/ResourceLoadDelegate.mm: (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]): Block them, and complain.
10:02 AM Changeset in webkit [33490] by ap@webkit.org
  • 2 edits in trunk/WebKit/mac

Tiger build fix.

  • Misc/WebNSAttributedStringExtras.mm: Import WebTypesInternal.h for NSUInteger.
9:18 AM Changeset in webkit [33489] by kevino@webkit.org
  • 2 edits in trunk/WebKitTools

wx build fix. Update the version of libpng to download and instsall.

8:52 AM Changeset in webkit [33488] by kevino@webkit.org
  • 4 edits
    6 adds in trunk/WebCore

wx build fix for recent breakages. Add EventLoopWx.cpp, update the Bakefiles, and add stubs for new Plugins functions. Also move plugin functions outside of TemporaryLinkStubs.cpp so that they are more noticeable.

7:51 AM Changeset in webkit [33487] by Simon Hausmann
  • 2 edits in trunk/WebCore

2008-05-15 Adam Treat <treat@kde.org>

Reviewed by Simon.

Don't try to setCompositionMode for devices that do not support PorterDuff

6:45 AM Changeset in webkit [33486] by ap@webkit.org
  • 7 edits in trunk

2008-05-15 Adele Peterson <adele@apple.com>

Reviewed and landed by Alexey.

Use TextIterator in +[NSAttributedString _web_attributedStringFromRange:].

6:25 AM Changeset in webkit [33485] by Simon Hausmann
  • 2 edits in trunk/JavaScriptCore

Simon Hausmann <shausman@trolltech.com>

Fix compilation when compiling with MSVC and wchar_t support.

5:45 AM Changeset in webkit [33484] by oliver@apple.com
  • 11 edits in branches/squirrelfish/JavaScriptCore

Revert "Bug 18626: SQUIRRELFISH: support the "slow script" dialog"

This seems to cause a significant perf regression on some systems

2:31 AM Changeset in webkit [33483] by oliver@apple.com
  • 11 edits in branches/squirrelfish/JavaScriptCore

Bug 18626: SQUIRRELFISH: support the "slow script" dialog
<https://bugs.webkit.org/show_bug.cgi?id=18626>

Reviewed by Maciej

Support the slow script dialog for for(;;), while, and do..while
loops.

12:26 AM Changeset in webkit [33482] by Simon Hausmann
  • 2 edits in trunk/WebCore

2008-05-15 Simon Hausmann <Simon Hausmann>

Fix the Qt build by adding NetworkStateNotifier.cpp to the build.

12:14 AM Changeset in webkit [33481] by ggaren@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

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

Not reviewed.


We regret to inform you that your program is crashing because you were
stupid.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Math is hard.
Note: See TracTimeline for information about the timeline view.