<rdar://problem/12255720> Fix the build with newer Clang

Reviewed by Sam Weinig.

Clang generates a warning about the inclusion of trailing commas on the final enum item as it's apparently
a C++11 extension. Remove them.

* src/compiler/BaseTypes.h:
* src/compiler/ExtensionBehavior.h:
* src/compiler/ParseHelper.cpp:
(TParseContext::parseVectorFields):
* src/compiler/intermediate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Test rebaselines after http://trac.webkit.org/changeset/128517.

* fast/table/height-percent-test-expected.txt:
* platform/chromium-mac-snowleopard/fast/table/height-percent-test-expected.png:
* platform/chromium-mac-snowleopard/tables/mozilla/core/cell_heights-expected.png:
* platform/chromium-mac-snowleopard/tables/mozilla_expected_failures/bugs/bug19526-expected.png:
* platform/chromium-mac-snowleopard/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
* platform/chromium-mac/fast/table/height-percent-test-expected.png:
* platform/chromium-mac/tables/mozilla/core/cell_heights-expected.png:
* platform/chromium-mac/tables/mozilla_expected_failures/bugs/bug19526-expected.png:
* platform/chromium-mac/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
* platform/chromium-mac/tables/mozilla_expected_failures/bugs/bug85016-expected.txt:
* platform/chromium-win/fast/table/height-percent-test-expected.png:
* platform/chromium-win/tables/mozilla/core/cell_heights-expected.png:
* platform/chromium-win/tables/mozilla_expected_failures/bugs/bug19526-expected.png:
* platform/chromium-win/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/efl/fast/table/height-percent-test-expected.txt: Removed.
* platform/gtk/TestExpectations:
* platform/gtk/fast/table/height-percent-test-expected.txt: Removed.
* platform/gtk/tables/mozilla/core/cell_heights-expected.txt:
* platform/gtk/tables/mozilla_expected_failures/bugs/bug19526-expected.txt: Removed.
* platform/gtk/tables/mozilla_expected_failures/bugs/bug85016-expected.txt:
* platform/mac/TestExpectations:
* platform/mac/tables/mozilla/core/cell_heights-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug19526-expected.txt:
* platform/qt/TestExpectations:
* platform/qt/fast/table/height-percent-test-expected.txt: Renamed from LayoutTests/platform/mac/fast/table/height-percent-test-expected.txt.
* platform/qt/tables/mozilla/core/cell_heights-expected.txt:
* platform/qt/tables/mozilla_expected_failures/bugs/bug19526-expected.txt:
* platform/qt/tables/mozilla_expected_failures/bugs/bug85016-expected.txt:
* platform/win-future/fast/table/height-percent-test-expected.txt: Copied from LayoutTests/fast/table/height-percent-test-expected.txt.
* tables/mozilla_expected_failures/bugs/bug19526-expected.txt: Renamed from LayoutTests/platform/efl/tables/mozilla_expected_failures/bugs/bug19526-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG: Dead GetButterfly's shouldn't be subject to CSE
https://bugs.webkit.org/show_bug.cgi?id=96707
<rdar://problem/12296311>

Source/JavaScriptCore: 

Reviewed by Oliver Hunt.
        
There were a number of cases of this that creeped into the CSE: it would
match something even though it was dead.

* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::getPropertyStorageLoadElimination):
(JSC::DFG::CSEPhase::checkArrayElimination):
(JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination):
(JSC::DFG::CSEPhase::getScopeChainLoadElimination):
(JSC::DFG::CSEPhase::getLocalLoadElimination):

LayoutTests: 

Reviewed by Oliver Hunt.

* fast/js/dfg-dead-redundant-get-array-length-expected.txt: Added.
* fast/js/dfg-dead-redundant-get-array-length.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-dead-redundant-get-array-length.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Improve the SourceProvider hierarchy
https://bugs.webkit.org/show_bug.cgi?id=95635

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-09-13
Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

SourceProvider was designed to have subclasses magically handling the data without
decoding all of it. The virtual methods length() and getRange() were based
on these assumptions.

In practice, the magic was in our head, there is no implementation that takes
advantage of that.

SourceProvider is modified to adopt WebCore's ScriptSourceProvider::source() and base
everything on it.
The code using SourceProvider is also simplified.

* interpreter/Interpreter.cpp:
(JSC::appendSourceToError): Keep a reference to the string instead of querying it for
each time it is used.
* parser/Lexer.cpp:
(JSC::::setCode):
(JSC::::sourceCode):
* parser/Parser.h:
(JSC::parse):
* parser/SourceCode.h:
(JSC::SourceCode::SourceCode):
(JSC::SourceCode::subExpression):
* parser/SourceProvider.h:
(SourceProvider):
(JSC::SourceProvider::getRange):

Source/WebCore: 

Get rid of ScriptSourceProvider and StringSourceProvider, they have been made
useless by JavaScript updates.

On x86_64, this reduces the binary size by 6kb.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/CachedScriptSourceProvider.h:
(WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::updateCurrentStatementPosition):
(WebCore::ScriptDebugServer::dispatchDidParseSource):
(WebCore::ScriptDebugServer::dispatchFailedToParseSource):
* bindings/js/ScriptSourceCode.h:
(WebCore::ScriptSourceCode::ScriptSourceCode):
(ScriptSourceCode):
* bindings/js/ScriptSourceProvider.h: Removed.
* bindings/js/StringSourceProvider.h: Removed.
* bindings/js/WorkerScriptController.cpp:
* bindings/objc/WebScriptObject.mm:
* bridge/NP_jsobject.cpp:
* bridge/jni/jni_jsobject.mm:

Source/WebKit/mac: 

* Plugins/Hosted/NetscapePluginInstanceProxy.mm: Fix a #include abuse.
* WebView/WebScriptDebugger.mm:
(toNSString): We can now use the (faster) implicit conversion
from String to NSString.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Create Localizer factory method for LocaleWin
https://bugs.webkit.org/show_bug.cgi?id=96667

Reviewed by Kent Tamura.

Source/WebCore:

Preparing to use Localizer instead of LocaleMac/Win/ICU.

No new tests. Covered in LocaleWinTest.cpp.

* platform/text/LocaleWin.cpp:
(WebCore):
(WebCore::extractLanguageCode): Extract the language code from a locale.
(WebCore::LCIDFromLocaleInternal): Returns LCID for a given locale. Returns 0 when locale is invalid.
(WebCore::LCIDFromLocale): Returns LCID for a given locale. Returns default language LCID when locale is invalid.
(WebCore::Localizer::create):
(WebCore::LocaleWin::currentLocale):

Source/WebKit/chromium:

* tests/LocaleWinTest.cpp:
(testNumberIsReversible):
(testNumbers):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactored the DFG to make fewer assumptions about variable capture
https://bugs.webkit.org/show_bug.cgi?id=96680

Reviewed by Gavin Barraclough.

A variable capture optimization patch I'm working on broke DFG
correctness and the arguments simplification optimization phase, so I've
refactored both to make fewer assumptions about variable capture.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::isCaptured): This is the new One True Way to find out
if a variable was captured. This gives us a single point of maintenance
as we chagne capture behavior.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::clobberCapturedVars): Don't assume that captured
variables have any particular location. Instead, ask the One True Function.

* dfg/DFGArgumentsSimplificationPhase.cpp:
(JSC::DFG::ArgumentsSimplificationPhase::run):
(JSC::DFG::ArgumentsSimplificationPhase::observeProperArgumentsUse):
(JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize): Mechanical
changes to separate being captured from being 'arguments'. What used
to be
        if (captured)
                if (arguments)
                        x
                y
is now
        if (arguments)
                x
                y
        else if (captured)
                y

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getLocal):
(JSC::DFG::ByteCodeParser::setLocal):
(JSC::DFG::ByteCodeParser::getArgument):
(JSC::DFG::ByteCodeParser::setArgument):
(JSC::DFG::ByteCodeParser::flushDirect):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compile): Use the One True Function.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make the style checker report usage of "unsigned int"
https://bugs.webkit.org/show_bug.cgi?id=96693

Patch by Adenilson Cavalcanti <cavalcantii@gmail.com> on 2012-09-13
Reviewed by Dirk Pranke.

Add a rule to check for uses of unsigned int, as the updated coding style recomends.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_language):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r128531.
http://trac.webkit.org/changeset/128531
https://bugs.webkit.org/show_bug.cgi?id=96719

plugins/document-open.html crash on Chromium-Linux (Requested
by tkent1 on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-13

Source/WebCore:

* WebCore.exp.in:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::removeChildren):
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::detach):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passMouseDownEventToWidget):
* rendering/RenderWidget.cpp:
(WebCore):
(WebCore::widgetNewParentMap):
(WebCore::RenderWidget::suspendWidgetHierarchyUpdates):
(WebCore::RenderWidget::resumeWidgetHierarchyUpdates):
(WebCore::moveWidgetToParentSoon):
* rendering/RenderWidget.h:
(RenderWidget):

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView _invalidateGStatesForTree]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128546 268f45cc-cd09-0410-ab3c-d52691b4dbfc