- 28 Nov, 2007 1 commit
-
-
mjs@apple.com authored
Reviewed by Darin and Geoff. - Fixed "Stack overflow crash in JavaScript garbage collector mark pass" http://bugs.webkit.org/show_bug.cgi?id=12216 Implement mark stack. This version is not suitable for prime time because it makes a huge allocation on every collect, and potentially makes marking of detached subtrees slow. But it is an 0.4% SunSpider speedup even without much tweaking. The basic approach is to replace mark() methods with markChildren(MarkStack&) methods. Reachable references are pushed onto a mark stack (which encapsulates ignoring already-marked references). Objects are no longer responsible for actually setting their own mark bits, the collector does that. This means that for objects on the number heap we don't have to call markChildren() at all since we know there aren't any. The mark phase of collect pushes roots onto the mark stack and drains it as often as possible. To make this approach viable requires a constant-size mark stack and a slow fallback approach for when the stack size is exceeded, plus optimizations to make the required stack small in common cases. This should be doable. * JavaScriptCore.exp: Export new symbols. * JavaScriptCore.xcodeproj/project.pbxproj: Add new file. * kjs/collector.cpp: (KJS::Collector::heapAllocate): (KJS::drainMarkStack): Helper for all of the below. (KJS::Collector::markStackObjectsConservatively): Use mark stack. (KJS::Collector::markCurrentThreadConservatively): ditto (KJS::Collector::markOtherThreadConservatively): ditto (KJS::Collector::markProtectedObjects): ditto (KJS::Collector::markMainThreadOnlyObjects): ditto (KJS::Collector::collect): ditto * kjs/collector.h: (KJS::Collector::cellMayHaveRefs): Helper for MarkStack. * kjs/MarkStack.h: Added. The actual mark stack implementation. (KJS::MarkStack::push): (KJS::MarkStack::pushAtom): (KJS::MarkStack::pop): (KJS::MarkStack::isEmpty): (KJS::MarkStack::reserveCapacity): Changed mark() methods to markChildren() methods: * kjs/ExecState.cpp: (KJS::ExecState::markChildren): * kjs/ExecState.h: * kjs/JSWrapperObject.cpp: (KJS::JSWrapperObject::markChildren): * kjs/JSWrapperObject.h: * kjs/array_instance.cpp: (KJS::ArrayInstance::markChildren): * kjs/array_instance.h: * kjs/bool_object.cpp: (BooleanInstance::markChildren): * kjs/bool_object.h: * kjs/error_object.cpp: * kjs/error_object.h: * kjs/function.cpp: (KJS::FunctionImp::markChildren): (KJS::Arguments::Arguments): (KJS::Arguments::markChildren): (KJS::ActivationImp::markChildren): * kjs/function.h: * kjs/internal.cpp: (KJS::GetterSetterImp::markChildren): * kjs/interpreter.cpp: (KJS::Interpreter::markRoots): * kjs/interpreter.h: * kjs/list.cpp: (KJS::List::markProtectedListsSlowCase): * kjs/list.h: (KJS::List::markProtectedLists): * kjs/object.cpp: (KJS::JSObject::markChildren): * kjs/object.h: (KJS::ScopeChain::markChildren): * kjs/property_map.cpp: (KJS::PropertyMap::markChildren): * kjs/property_map.h: * kjs/scope_chain.h: * kjs/string_object.cpp: (KJS::StringInstance::markChildren): * kjs/string_object.h: JavaScriptGlue: Reviewed by Darin and Geoff. Fixups for JavaScriptCore mark stack. * JSObject.cpp: (JSUserObject::Mark): * JSObject.h: * JSValueWrapper.cpp: (JSValueWrapper::JSObjectMark): * JSValueWrapper.h: * UserObjectImp.cpp: * UserObjectImp.h: WebCore: Reviewed by Darin and Geoff. Implement mark stack. This version is not suitable for prime time because it makes a huge allocation on every collect, and potentially makes marking of detached subtrees slow. But it is a .2% - .4% speedup even without much tweaking. I replaced mark() methods with markChildren() as usual. One optimization that is lost is avoiding walking detached DOM subtrees more than once to mark them; since marking is not recursive there's no obvious way to bracket operation on the tree any more. * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::markChildren): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::markChildren): * bindings/js/JSNodeFilterCondition.cpp: * bindings/js/JSNodeFilterCondition.h: * bindings/js/JSNodeFilterCustom.cpp: (WebCore::JSNodeFilter::markChildren): * bindings/js/JSNodeIteratorCustom.cpp: (WebCore::JSNodeIterator::markChildren): * bindings/js/JSTreeWalkerCustom.cpp: (WebCore::JSTreeWalker::markChildren): * bindings/js/JSXMLHttpRequest.cpp: (KJS::JSXMLHttpRequest::markChildren): * bindings/js/JSXMLHttpRequest.h: * bindings/js/kjs_binding.cpp: (KJS::ScriptInterpreter::markDOMNodesForDocument): * bindings/js/kjs_binding.h: * bindings/js/kjs_events.cpp: (WebCore::JSUnprotectedEventListener::markChildren): * bindings/js/kjs_events.h: * bindings/js/kjs_window.cpp: (KJS::Window::markChildren): * bindings/js/kjs_window.h: * bindings/scripts/CodeGeneratorJS.pm: * dom/Node.cpp: (WebCore::Node::Node): * dom/Node.h: * dom/NodeFilter.h: * dom/NodeFilterCondition.h: LayoutTests: Not reviewed. - Test cases for "Stack overflow crash in JavaScript garbage collector mark pass" http://bugs.webkit.org/show_bug.cgi?id=12216 I have fixed this with the mark stack work. * fast/js/gc-breadth-2-expected.txt: Added. * fast/js/gc-breadth-2.html: Added. * fast/js/gc-breadth-expected.txt: Added. * fast/js/gc-breadth.html: Added. * fast/js/gc-depth-expected.txt: Added. * fast/js/gc-depth.html: Added. * fast/js/resources/gc-breadth-2.js: Added. * fast/js/resources/gc-breadth.js: Added. * fast/js/resources/gc-depth.js: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 27 Nov, 2007 1 commit
-
-
andersca@apple.com authored
Make PropertyNameArray and ScopeChain COMEnumVariant friendly. * kjs/PropertyNameArray.cpp: (KJS::PropertyNameArray::swap): Implement PropertyNameArray::swap. * kjs/PropertyNameArray.h: Add ValueType typedef. Replace PropertyNameArrayIterator with PropertyNameArray::const_iterator. * kjs/nodes.cpp: (KJS::ForInNode::execute): * kjs/scope_chain.cpp: (KJS::ScopeChain::print): Update for changes to PropertyNameArray. * kjs/scope_chain.h: Add const_iterator and ValueType typedef. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 26 Nov, 2007 1 commit
-
-
ggaren@apple.com authored
Fixed <rdar://problem/5597937> REGRESSION (r27126): Drosera does not show variables (can't enumerate ActivationImp properties) Implemented a custome ActivationImp::getPropertyNames, since ActivationImp now uses a custom property storage mechanism for local variables. * kjs/function.cpp: (KJS::ActivationImp::getPropertyNames): * kjs/function.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 23 Nov, 2007 1 commit
-
-
kevino@webkit.org authored
Reviewed by Adam Roben. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 21 Nov, 2007 1 commit
-
-
rdar://problem/5602936mrowe@apple.com authored
Reviewed by Tim Hatcher. Fix all warnings emitted by GCC 4.2 when building JavaScriptCore. This allows builds with -Werror to succeed. At present they will crash when executed due to code that is not safe under strict aliasing (<rdar://problem/5536806>). This required some format strings to be modified in WebCore and WebKit as their format specifiers did not match the argument type. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 19 Nov, 2007 1 commit
-
-
kevino@webkit.org authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 18 Nov, 2007 1 commit
-
-
rdar://problem/5607032mrowe@apple.com authored
Fix: <rdar://problem/5607032> (REGRESSION: testapi exits with assertion failure in debug build) and <rdar://problem/5440659> (JSGlobalContextCreate throws away globalObjectClass's prototype) Split Interpreter's initialization into two distinct steps: the creation of the global prototypes and constructors, and storing them on the global object. This allows JSClassRef's passed to JSGlobalContextCreate to be instantiated with the correct prototype. Reviewed by Darin Adler. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 16 Nov, 2007 4 commits
-
-
mrowe@apple.com authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
mrowe@apple.com authored
Reviewed by Eric. Replace strings, identifier, buffer8 and buffer16 members of Lexer with vectors. SunSpider claims this is a 0.7% speedup. * kjs/lexer.cpp: (KJS::Lexer::Lexer): (KJS::Lexer::lex): (KJS::Lexer::record8): (KJS::Lexer::record16): (KJS::Lexer::scanRegExp): (KJS::Lexer::clear): (KJS::Lexer::makeIdentifier): (KJS::Lexer::makeUString): * kjs/lexer.h: * kjs/ustring.cpp: (KJS::UString::UString): Add a convenience constructor that takes a const Vector<UChar>&. * kjs/ustring.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
mrowe@apple.com authored
Gtk build fix. * kjs/Parser.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
mrowe@apple.com authored
Qt build fix. * kjs/Parser.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 15 Nov, 2007 2 commits
-
-
ggaren@apple.com authored
Another round of grammar / parsing cleanup. 1. Created distinct parser calls for parsing function bodies vs programs. This will help later with optimizing global variable access. 2. Turned Parser into a singleton. Cleaned up Lexer's singleton interface. 3. Modified Lexer to free a little more memory when done lexing. (Added FIXMEs for similar issues that I didn't fix.) 4. Changed Lexer::makeIdentifier and Lexer::makeUString to start respecting the arguments passed to them. (No behavior change, but this problem could have caused serious problems for an unsuspecting user of these functions.) 5. Removed KJS_DEBUG_MEM because it was bit-rotted. 6. Removed Parser::prettyPrint because the same work was simpler to do at the call site. 7. Some renames: "Parser::accept" => "Parser::didFinishParsing" "Parser::sid" => "Parser::m_sourceID" "Lexer::doneParsing" => "Lexer::clear" "sid" => "sourceId" "lineno" => "lineNo" * JavaScriptCore.exp: * kjs/Parser.cpp: (KJS::Parser::Parser): (KJS::Parser::parseProgram): (KJS::Parser::parseFunctionBody): (KJS::Parser::parse): (KJS::Parser::didFinishParsing): (KJS::parser): * kjs/Parser.h: (KJS::Parser::sourceId): * kjs/function.cpp: (KJS::GlobalFuncImp::callAsFunction): * kjs/function_object.cpp: (FunctionObjectImp::construct): * kjs/grammar.y: * kjs/interpreter.cpp: (KJS::Interpreter::checkSyntax): (KJS::Interpreter::evaluate): * kjs/interpreter.h: * kjs/lexer.cpp: (kjsyylex): (KJS::lexer): (KJS::Lexer::Lexer): (KJS::Lexer::~Lexer): (KJS::Lexer::scanRegExp): (KJS::Lexer::doneParsing): (KJS::Lexer::makeIdentifier): (KJS::Lexer::makeUString): * kjs/lexer.h: (KJS::Lexer::pattern): (KJS::Lexer::flags): (KJS::Lexer::sawError): * kjs/nodes.cpp: (KJS::Node::Node): (KJS::FunctionBodyNode::FunctionBodyNode): * kjs/nodes.h: * kjs/testkjs.cpp: (prettyPrintScript): (kjsmain): * kjs/ustring.cpp: * kjs/ustring.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
rdar://problem/5601548oliver@apple.com authored
<rdar://problem/5601548> REGRESSION: All SourceElements and their children leak after a syntax error Reviewed by Darin. Add a stub node to maintain the Vector of SourceElements until assignment. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 14 Nov, 2007 2 commits
-
-
ap@webkit.org authored
http://bugs.webkit.org/show_bug.cgi?id=15982 Improve JSString UTF-8 decoding * API/JSStringRef.cpp: (JSStringCreateWithUTF8CString): Use strict decoding, return 0 on error. * wtf/unicode/UTF8.cpp: (WTF::Unicode::convertUTF16ToUTF8): (WTF::Unicode::convertUTF8ToUTF16): * wtf/unicode/UTF8.h: Made these function names start with a lower case letter. * kjs/ustring.cpp: (KJS::UString::UTF8String): Updated for the above renaming. * bindings/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback): Renamed to highlight the difference from convertUTF8ToUTF16 in wtf/unicode. (KJS::Bindings::convertNPStringToUTF16): Updated for the above renaming. (KJS::Bindings::identifierFromNPIdentifier): Ditto. * bindings/c/c_utility.h: Made convertUTF8ToUTF16WithLatin1Fallback() a file static. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren@apple.com authored
Cleaned up the JavaScript grammar a bit. 1. Changed BlockNode to always hold a child vector (which may be empty), eliminating a few NULL-check branches in the common execution case. 2. Changed the Block production to correctly report its starting and ending line numbers to the debugger. (It used to report its ending line as its starting line.) Also, removed duplicate line-reporting code inside the BlockNode constructor. 3. Moved curly braces up from FunctionBody production into parent productions. (I had to move the line number reporting code, too, since it depends on the location of the curly braces.) This matches the ECMA spec more closely, and makes some future changes I plan easier. 4. Fixed statementList* convenience functions to deal appropriately with empty Vectors. SunSpider reports a small and statistically insignificant speedup. * kjs/grammar.y: * kjs/nodes.cpp: (KJS::statementListPushFIFO): (KJS::statementListGetDeclarations): (KJS::statementListInitializeDeclarationStack): (KJS::statementListInitializeVariableAccessStack): (KJS::BlockNode::BlockNode): (KJS::BlockNode::optimizeVariableAccess): (KJS::BlockNode::getDeclarations): (KJS::BlockNode::execute): (KJS::FunctionBodyNode::initializeDeclarationStacks): (KJS::FunctionBodyNode::optimizeVariableAccess): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 13 Nov, 2007 12 commits
-
-
ggaren@apple.com authored
* kjs/regexp.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren@apple.com authored
Reviewed by Anders Carlsson. Renamed Shared to RefCounted. * API/JSClassRef.h: * JavaScriptCore.xcodeproj/project.pbxproj: * kjs/interpreter.h: * kjs/regexp.h: * wtf/RefCounted.h: Copied from JavaScriptCore/wtf/Shared.h. (WTF::RefCounted::RefCounted): * wtf/Shared.h: Removed. JavaScriptGlue: Reviewed by Anders Carlsson. Renamed Shared to RefCounted. * ForwardingHeaders/wtf/RefCounted.h: Copied from JavaScriptGlue/ForwardingHeaders/wtf/Shared.h. * ForwardingHeaders/wtf/Shared.h: Removed. WebCore: Reviewed by Anders Carlsson. Renamed Shared to RefCounted. * ForwardingHeaders/wtf/RefCounted.h: Copied from WebCore/ForwardingHeaders/wtf/Shared.h. * ForwardingHeaders/wtf/Shared.h: Removed. * bindings/js/JSSVGPODTypeWrapper.h: * css/CSSFontFace.h: * css/CSSRuleList.h: * css/Counter.h: * css/Pair.h: * css/Rect.h: * css/StyleBase.h: * css/StyleSheetList.h: * dom/Attribute.h: * dom/Clipboard.h: * dom/DOMImplementation.h: * dom/Event.h: * dom/EventListener.h: * dom/NamedNodeMap.h: * dom/NodeFilter.h: * dom/NodeFilterCondition.h: * dom/NodeList.h: * dom/QualifiedName.h: * dom/Range.h: * dom/RangeException.h: * dom/RegisteredEventListener.h: * dom/Traversal.h: * editing/EditCommand.h: * history/BackForwardList.h: * history/CachedPage.h: * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): * history/HistoryItem.h: * html/CanvasGradient.h: * html/CanvasPattern.h: * html/CanvasRenderingContext2D.h: * html/CanvasStyle.h: * html/HTMLCollection.h: * html/MediaError.h: * html/TimeRanges.h: * html/VoidCallback.h: * ksvg2/css/SVGRenderStyle.cpp: (WebCore::SVGRenderStyle::SVGRenderStyle): * ksvg2/css/SVGRenderStyle.h: * ksvg2/css/SVGRenderStyleDefs.cpp: (StyleFillData::StyleFillData): (StyleStrokeData::StyleStrokeData): (StyleStopData::StyleStopData): (StyleTextData::StyleTextData): (StyleClipData::StyleClipData): (StyleMaskData::StyleMaskData): (StyleMarkerData::StyleMarkerData): (StyleMiscData::StyleMiscData): * ksvg2/css/SVGRenderStyleDefs.h: * ksvg2/svg/SVGAngle.cpp: (WebCore::SVGAngle::SVGAngle): * ksvg2/svg/SVGAngle.h: * ksvg2/svg/SVGAnimatedTemplate.h: * ksvg2/svg/SVGElementInstanceList.h: * ksvg2/svg/SVGException.h: * ksvg2/svg/SVGList.h: * ksvg2/svg/SVGPathSeg.h: * ksvg2/svg/SVGPreserveAspectRatio.cpp: (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio): * ksvg2/svg/SVGPreserveAspectRatio.h: * ksvg2/svg/SVGRenderingIntent.h: * ksvg2/svg/SVGTransform.h: * ksvg2/svg/SVGUnitTypes.h: * loader/DocumentLoader.h: * loader/FormState.h: * loader/ResourceLoader.h: * loader/TextResourceDecoder.h: * loader/icon/IconRecord.h: * page/BarInfo.h: * page/Console.h: * page/DOMSelection.h: * page/DOMWindow.h: * page/Frame.h: * page/History.h: * page/InspectorController.cpp: * page/Plugin.h: * page/Screen.h: * platform/ArrayImpl.h: * platform/CString.h: * platform/Cursor.h: * platform/DeprecatedValueListImpl.cpp: (WebCore::DeprecatedValueListImpl::Private::Private): * platform/FileChooser.h: * platform/FontFallbackList.h: * platform/FontFamily.cpp: (WebCore::FontFamily::FontFamily): * platform/FontFamily.h: * platform/FontSelector.h: * platform/GlyphPageTreeNode.h: * platform/PopupMenu.h: * platform/RegularExpression.cpp: * platform/ScrollBar.h: * platform/SharedBuffer.h: * platform/StringImpl.h: * platform/graphics/Icon.h: * platform/graphics/svg/SVGResource.h: * platform/network/FormData.cpp: (WebCore::FormData::FormData): * platform/network/FormData.h: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleClient.h: * rendering/RenderStyle.cpp: (WebCore::StyleSurroundData::StyleSurroundData): (WebCore::StyleBoxData::StyleBoxData): (WebCore::StyleVisualData::StyleVisualData): (WebCore::StyleBackgroundData::StyleBackgroundData): (WebCore::StyleMarqueeData::StyleMarqueeData): (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleMultiColData::StyleMultiColData): (WebCore::StyleTransformData::StyleTransformData): (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleInheritedData::StyleInheritedData): * rendering/RenderStyle.h: * rendering/SVGCharacterLayoutInfo.h: (WebCore::SVGCharOnPath::SVGCharOnPath): * storage/SQLResultSetRowList.h: * xml/DOMParser.h: * xml/XMLHttpRequest.h: * xml/XMLSerializer.h: * xml/XPathEvaluator.h: * xml/XPathExpression.h: * xml/XPathNSResolver.h: * xml/XPathResult.h: * xml/XPathValue.h: * xml/XSLTProcessor.h: WebKit/mac: Reviewed by Anders Carlsson. Renamed Shared to RefCounted. * ForwardingHeaders/wtf/RefCounted.h: Copied from WebKit/mac/ForwardingHeaders/wtf/Shared.h. * ForwardingHeaders/wtf/Shared.h: Removed. * WebCoreSupport/WebContextMenuClient.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
aroben@apple.com authored
Reviewed by Geoff. * kjs/regexp.h: Added a missing #include. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren@apple.com authored
Reviewed by Sam Weinig. Moved Shared.h into wtf so it could be used in more places. Deployed Shared in places where JSCore previously had hand-rolled ref-counting classes. * API/JSClassRef.cpp: (OpaqueJSClass::OpaqueJSClass): * API/JSClassRef.h: * API/JSObjectRef.cpp: (JSClassRetain): (JSClassRelease): * JavaScriptCore.vcproj/WTF/WTF.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * kjs/interpreter.cpp: (KJS::Interpreter::init): * kjs/interpreter.h: * kjs/regexp.cpp: (KJS::RegExp::RegExp): * kjs/regexp.h: * wtf/Shared.h: Copied from WebCore/platform/Shared.h. JavaScriptGlue: Reviewed by Sam Weinig. Moved Shared.h into wtf so it could be used in more places. * ForwardingHeaders/wtf/Shared.h: Added. WebCore: Reviewed by Sam Weinig. Moved Shared.h into wtf so it could be used in more places. Retained TreeShared, but moved it to its own file, TreeShared.h. * ForwardingHeaders/wtf/Shared.h: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSSVGPODTypeWrapper.h: * css/CSSFontFace.h: * css/CSSRuleList.h: * css/Counter.h: * css/Pair.h: * css/Rect.h: * css/StyleBase.h: * css/StyleSheetList.h: * dom/Clipboard.h: * dom/DOMImplementation.h: * dom/Event.h: * dom/EventListener.h: * dom/NamedNodeMap.h: * dom/NodeFilterCondition.h: * dom/NodeList.h: * dom/Range.h: * dom/RangeException.h: * dom/RegisteredEventListener.h: * dom/Traversal.h: * history/BackForwardList.h: * history/CachedPage.h: * history/HistoryItem.h: * html/CanvasGradient.h: * html/CanvasPattern.h: * html/HTMLCollection.h: * html/MediaError.h: * html/TimeRanges.h: * html/VoidCallback.h: * ksvg2/css/SVGRenderStyleDefs.h: * ksvg2/svg/SVGAnimatedTemplate.h: * ksvg2/svg/SVGElementInstanceList.h: * ksvg2/svg/SVGList.h: * ksvg2/svg/SVGPathSeg.h: * ksvg2/svg/SVGPreserveAspectRatio.h: * ksvg2/svg/SVGRenderingIntent.h: * ksvg2/svg/SVGTransform.h: * ksvg2/svg/SVGUnitTypes.h: * loader/DocumentLoader.h: * loader/FormState.h: * loader/ResourceLoader.h: * loader/TextResourceDecoder.h: * loader/icon/IconRecord.h: * page/BarInfo.h: * page/Console.h: * page/DOMSelection.h: * page/DOMWindow.h: * page/History.h: * page/InspectorController.cpp: * page/Plugin.h: * page/Screen.h: * platform/ArrayImpl.h: * platform/CString.h: * platform/DeprecatedValueListImpl.cpp: * platform/FontFallbackList.h: * platform/FontFamily.h: * platform/FontSelector.h: * platform/GlyphPageTreeNode.h: * platform/PopupMenu.h: * platform/RegularExpression.cpp: * platform/ScrollBar.h: * platform/Shared.h: Removed. * platform/SharedBuffer.h: * platform/StringImpl.h: * platform/graphics/Icon.h: * platform/graphics/svg/SVGResource.h: * platform/network/FormData.h: * platform/network/ResourceHandleClient.h: * rendering/RenderStyle.h: * rendering/SVGCharacterLayoutInfo.h: * storage/SQLResultSetRowList.h: * xml/DOMParser.h: * xml/XMLSerializer.h: * xml/XPathEvaluator.h: * xml/XPathExpression.h: * xml/XPathNSResolver.h: * xml/XPathResult.h: WebKit/mac: Reviewed by Sam Weinig. Moved Shared.h into wtf so it could be used in more places. * ChangeLog: * WebCoreSupport/WebContextMenuClient.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eric@webkit.org authored
Reviewed by Maciej. Add an ASSERT to getTruncatedInt32 to enforce proper usage. Best part about this patch? It doesn't break the web! * kjs/JSImmediate.h: (KJS::JSImmediate::getTruncatedInt32): (KJS::JSImmediate::toDouble): (KJS::JSImmediate::getUInt32): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ap@webkit.org authored
* bindings/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16): * kjs/ustring.cpp: (KJS::UString::UTF8String): * wtf/unicode/UTF8.cpp: (WTF::Unicode::ConvertUTF8ToUTF16): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
Remove too-strong assert that was firing constantly and preventing even basic web browsing from working in a debug build. This function is used in many cases where the immediate value is not a number; the assertion could perhaps be added back later with a bit of reorganization. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
alp@webkit.org authored
Build fix for breakage to non-Mac builds introduced in r27746. * kjs/ustring.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eric@webkit.org authored
Reviewed by Maciej. Clean up evaluateToBoolean functions to use inlines instead of copy/paste code * kjs/JSImmediate.h: * kjs/nodes.cpp: (KJS::GreaterNode::inlineEvaluateToBoolean): (KJS::GreaterNode::evaluate): (KJS::LessEqNode::inlineEvaluateToBoolean): (KJS::LessEqNode::evaluate): (KJS::GreaterEqNode::inlineEvaluateToBoolean): (KJS::GreaterEqNode::evaluate): (KJS::InNode::evaluateToBoolean): (KJS::EqualNode::inlineEvaluateToBoolean): (KJS::EqualNode::evaluate): (KJS::NotEqualNode::inlineEvaluateToBoolean): (KJS::NotEqualNode::evaluate): (KJS::StrictEqualNode::inlineEvaluateToBoolean): (KJS::StrictEqualNode::evaluate): (KJS::NotStrictEqualNode::inlineEvaluateToBoolean): (KJS::NotStrictEqualNode::evaluate): * kjs/nodes.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren@apple.com authored
Fixed http://bugs.webkit.org/show_bug.cgi?id=15958 base64 spends 1.1% of total time checking for special Infinity case Use a fast character test instead of calling strncmp. 1.1% speedup on string-base64. SunSpider reports a .4% speedup overall; Sharks reports only .1%. Who are you going to believe? Huh? * kjs/ustring.cpp: (KJS::UString::toDouble): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eric@webkit.org authored
Reviewed by Oliver. Add evaluateToInt32 and evaluateUInt32 methods and deploy them. Fix a few missing evaluateToBoolean methods Deploy all evaluateTo* functions to more nodes to avoid slowdowns http://bugs.webkit.org/show_bug.cgi?id=15950 SunSpider claims this is at least a 1.4% speedup. * kjs/JSImmediate.h: (KJS::JSImmediate::getTruncatedInt32): (KJS::JSImmediate::toDouble): (KJS::JSImmediate::getUInt32): * kjs/nodes.cpp: (KJS::ExpressionNode::evaluateToNumber): (KJS::ExpressionNode::evaluateToInt32): (KJS::ExpressionNode::evaluateToUInt32): (KJS::NumberNode::evaluateToInt32): (KJS::NumberNode::evaluateToUInt32): (KJS::ImmediateNumberNode::evaluateToInt32): (KJS::ImmediateNumberNode::evaluateToUInt32): (KJS::ResolveNode::evaluate): (KJS::ResolveNode::evaluateToNumber): (KJS::ResolveNode::evaluateToBoolean): (KJS::ResolveNode::evaluateToInt32): (KJS::ResolveNode::evaluateToUInt32): (KJS::LocalVarAccessNode::evaluateToInt32): (KJS::LocalVarAccessNode::evaluateToUInt32): (KJS::BracketAccessorNode::evaluateToNumber): (KJS::BracketAccessorNode::evaluateToBoolean): (KJS::BracketAccessorNode::evaluateToInt32): (KJS::BracketAccessorNode::evaluateToUInt32): (KJS::DotAccessorNode::inlineEvaluate): (KJS::DotAccessorNode::evaluate): (KJS::DotAccessorNode::evaluateToNumber): (KJS::DotAccessorNode::evaluateToBoolean): (KJS::DotAccessorNode::evaluateToInt32): (KJS::DotAccessorNode::evaluateToUInt32): (KJS::NewExprNode::inlineEvaluate): (KJS::NewExprNode::evaluate): (KJS::NewExprNode::evaluateToNumber): (KJS::NewExprNode::evaluateToBoolean): (KJS::NewExprNode::evaluateToInt32): (KJS::NewExprNode::evaluateToUInt32): (KJS::FunctionCallResolveNode::inlineEvaluate): (KJS::FunctionCallResolveNode::evaluate): (KJS::FunctionCallResolveNode::evaluateToNumber): (KJS::FunctionCallResolveNode::evaluateToBoolean): (KJS::FunctionCallResolveNode::evaluateToInt32): (KJS::FunctionCallResolveNode::evaluateToUInt32): (KJS::LocalVarFunctionCallNode::evaluate): (KJS::LocalVarFunctionCallNode::evaluateToNumber): (KJS::LocalVarFunctionCallNode::evaluateToBoolean): (KJS::LocalVarFunctionCallNode::evaluateToInt32): (KJS::LocalVarFunctionCallNode::evaluateToUInt32): (KJS::FunctionCallDotNode::evaluate): (KJS::FunctionCallDotNode::evaluateToNumber): (KJS::FunctionCallDotNode::evaluateToBoolean): (KJS::FunctionCallDotNode::evaluateToInt32): (KJS::FunctionCallDotNode::evaluateToUInt32): (KJS::PostDecLocalVarNode::inlineEvaluateToNumber): (KJS::PostDecLocalVarNode::evaluateToNumber): (KJS::PostDecLocalVarNode::evaluateToBoolean): (KJS::PostDecLocalVarNode::evaluateToInt32): (KJS::PostDecLocalVarNode::evaluateToUInt32): (KJS::typeStringForValue): (KJS::UnaryPlusNode::evaluate): (KJS::UnaryPlusNode::evaluateToBoolean): (KJS::UnaryPlusNode::evaluateToNumber): (KJS::UnaryPlusNode::evaluateToInt32): (KJS::BitwiseNotNode::inlineEvaluateToInt32): (KJS::BitwiseNotNode::evaluate): (KJS::BitwiseNotNode::evaluateToNumber): (KJS::BitwiseNotNode::evaluateToBoolean): (KJS::BitwiseNotNode::evaluateToInt32): (KJS::MultNode::evaluateToBoolean): (KJS::MultNode::evaluateToInt32): (KJS::MultNode::evaluateToUInt32): (KJS::DivNode::evaluateToInt32): (KJS::DivNode::evaluateToUInt32): (KJS::ModNode::evaluateToBoolean): (KJS::ModNode::evaluateToInt32): (KJS::ModNode::evaluateToUInt32): (KJS::AddNode::evaluateToNumber): (KJS::AddNode::evaluateToInt32): (KJS::AddNode::evaluateToUInt32): (KJS::AddNumbersNode::evaluateToInt32): (KJS::AddNumbersNode::evaluateToUInt32): (KJS::SubNode::evaluateToInt32): (KJS::SubNode::evaluateToUInt32): (KJS::LeftShiftNode::inlineEvaluateToInt32): (KJS::LeftShiftNode::evaluate): (KJS::LeftShiftNode::evaluateToNumber): (KJS::LeftShiftNode::evaluateToInt32): (KJS::RightShiftNode::inlineEvaluateToInt32): (KJS::RightShiftNode::evaluate): (KJS::RightShiftNode::evaluateToNumber): (KJS::RightShiftNode::evaluateToInt32): (KJS::UnsignedRightShiftNode::inlineEvaluateToUInt32): (KJS::UnsignedRightShiftNode::evaluate): (KJS::UnsignedRightShiftNode::evaluateToNumber): (KJS::UnsignedRightShiftNode::evaluateToInt32): (KJS::LessNode::inlineEvaluateToBoolean): (KJS::LessNode::evaluate): (KJS::LessNode::evaluateToBoolean): (KJS::LessNumbersNode::inlineEvaluateToBoolean): (KJS::LessNumbersNode::evaluate): (KJS::LessNumbersNode::evaluateToBoolean): (KJS::LessStringsNode::inlineEvaluateToBoolean): (KJS::LessStringsNode::evaluate): (KJS::BitAndNode::evaluate): (KJS::BitAndNode::inlineEvaluateToInt32): (KJS::BitAndNode::evaluateToNumber): (KJS::BitAndNode::evaluateToBoolean): (KJS::BitAndNode::evaluateToInt32): (KJS::BitXOrNode::inlineEvaluateToInt32): (KJS::BitXOrNode::evaluate): (KJS::BitXOrNode::evaluateToNumber): (KJS::BitXOrNode::evaluateToBoolean): (KJS::BitXOrNode::evaluateToInt32): (KJS::BitOrNode::inlineEvaluateToInt32): (KJS::BitOrNode::evaluate): (KJS::BitOrNode::evaluateToNumber): (KJS::BitOrNode::evaluateToBoolean): (KJS::BitOrNode::evaluateToInt32): (KJS::ConditionalNode::evaluateToNumber): (KJS::ConditionalNode::evaluateToInt32): (KJS::ConditionalNode::evaluateToUInt32): (KJS::valueForReadModifyAssignment): (KJS::AssignExprNode::evaluate): (KJS::AssignExprNode::evaluateToBoolean): (KJS::AssignExprNode::evaluateToNumber): (KJS::AssignExprNode::evaluateToInt32): (KJS::VarDeclNode::handleSlowCase): * kjs/nodes.h: (KJS::FunctionCallResolveNode::precedence): (KJS::AddNode::precedence): (KJS::AddNode::): (KJS::LessNumbersNode::): (KJS::LessStringsNode::): * kjs/value.cpp: (KJS::JSValue::toInt32SlowCase): (KJS::JSValue::toUInt32SlowCase): * kjs/value.h: (KJS::JSValue::asCell): (KJS::JSValue::toInt32): (KJS::JSValue::toUInt32): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ap@webkit.org authored
http://bugs.webkit.org/show_bug.cgi?id=15953 Add UTF-8 encoding/decoding to WTF * kjs/ustring.h: Moved UTF8SequenceLength() and decodeUTF8Sequence() to wtf/unicode. * kjs/ustring.cpp: (KJS::UString::UTF8String): Changed this function to take a strict/lenient parameter. Callers are not interested in getting decoding results in strict mode, so this allows for bailing out as soon as an error is seen. * kjs/function.cpp: (KJS::encode): Updated for new UString::UTF8String() signature. * API/JSStringRef.cpp: (JSStringCreateWithCharacters): Disambiguate UChar. (JSStringCreateWithUTF8CString): Actually use UTF-8 when creating the string! * bindings/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16): Use ConvertUTF8ToUTF16(). * wtf/unicode/UTF8.cpp: Added. (WTF::Unicode::inlineUTF8SequenceLengthNonASCII): (WTF::Unicode::inlineUTF8SequenceLength): (WTF::Unicode::UTF8SequenceLength): (WTF::Unicode::decodeUTF8Sequence): (WTF::Unicode::): (WTF::Unicode::ConvertUTF16ToUTF8): (WTF::Unicode::isLegalUTF8): (WTF::Unicode::ConvertUTF8ToUTF16): * wtf/unicode/UTF8.h: Added. (WTF::Unicode::): Some code moved from ustring.h, some adapted from unicode.org sources. * JavaScriptCore.exp: * JavaScriptCore.pri: * JavaScriptCore.vcproj/WTF/WTF.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * JavaScriptCoreSources.bkl: Added UTF8.{h,cpp} git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 12 Nov, 2007 1 commit
-
-
oliver authored
number of fastCalloc calls where one argument was 1. Reviewed by Darin. This results in a 0.4% progression in SunSpider, more than making up for the earlier regression caused by additional overflow checks. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 11 Nov, 2007 5 commits
-
-
mrowe@apple.com authored
Build fix. Use the correct filename case. * kjs/nodes.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren@apple.com authored
Fixed http://bugs.webkit.org/show_bug.cgi?id=15902 15% of string-validate-input.js is spent compiling the same regular expression Store a compiled representation of the regular expression in the AST. Only a .2% SunSpider speedup overall, but a 10.6% speedup on string-validate-input.js. * kjs/nodes.cpp: (KJS::RegExpNode::evaluate): * kjs/nodes.h: (KJS::RegExpNode::): * kjs/nodes2string.cpp: (KJS::RegExpNode::streamTo): * kjs/regexp.cpp: (KJS::RegExp::flags): * kjs/regexp.h: (KJS::RegExp::pattern): * kjs/regexp_object.cpp: (KJS::RegExpObjectImp::construct): (KJS::RegExpObjectImp::createRegExpImp): * kjs/regexp_object.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eseidel authored
Reviewed by darin. Add simple type inferencing to the parser, and create custom AddNode and LessNode subclasses based on inferred types. http://bugs.webkit.org/show_bug.cgi?id=15884 SunSpider claims this is at least a 0.5% speedup. * JavaScriptCore.exp: * kjs/grammar.y: * kjs/internal.cpp: (KJS::NumberImp::getPrimitiveNumber): (KJS::GetterSetterImp::getPrimitiveNumber): * kjs/internal.h: * kjs/lexer.cpp: (KJS::Lexer::lex): * kjs/nodes.cpp: (KJS::Node::Node): (KJS::StringNode::evaluate): (KJS::StringNode::evaluateToNumber): (KJS::StringNode::evaluateToBoolean): (KJS::RegExpNode::evaluate): (KJS::UnaryPlusNode::optimizeVariableAccess): (KJS::AddNode::evaluate): (KJS::AddNode::evaluateToNumber): (KJS::AddNumbersNode::inlineEvaluateToNumber): (KJS::AddNumbersNode::evaluate): (KJS::AddNumbersNode::evaluateToNumber): (KJS::AddStringsNode::evaluate): (KJS::AddStringLeftNode::evaluate): (KJS::AddStringRightNode::evaluate): (KJS::lessThan): (KJS::lessThanEq): (KJS::LessNumbersNode::evaluate): (KJS::LessStringsNode::evaluate): * kjs/nodes.h: (KJS::ExpressionNode::): (KJS::RegExpNode::): (KJS::RegExpNode::precedence): (KJS::TypeOfResolveNode::): (KJS::LocalVarTypeOfNode::): (KJS::UnaryPlusNode::): (KJS::UnaryPlusNode::precedence): (KJS::AddNode::): (KJS::AddNode::precedence): (KJS::AddNumbersNode::): (KJS::AddStringLeftNode::): (KJS::AddStringRightNode::): (KJS::AddStringsNode::): (KJS::LessNode::): (KJS::LessNode::precedence): (KJS::LessNumbersNode::): (KJS::LessStringsNode::): * kjs/nodes2string.cpp: (KJS::StringNode::streamTo): * kjs/object.cpp: * kjs/object.h: * kjs/value.h: (KJS::JSValue::getPrimitiveNumber): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
Reviewed by Sam. - http://bugs.webkit.org/show_bug.cgi?id=15924 next round of changes to JSRegExp (formerly PCRE) This is a combination of converting to C++, tweaking the API, and adding some additional optimizations. Future steps will involve getting rid of the use of UTF-8 completely (we'll use UTF-16 exclusively instead), eliminating more source files, and some more speed-ups. SunSpider says the current round is an 0.9% speed-up overall, and a 5.3% speed-up for regexp. * JavaScriptCore.exp: Updated for new entry points. * JavaScriptCore.pri: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.vcproj/dftables/dftables.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * JavaScriptCoreSources.bkl: * jscore.bkl: Updated for new source file names and ForwardingHeaders. * kjs/regexp.cpp: (KJS::RegExp::RegExp): Changed to use the error message without calling strdup on it and to pass the new types and options. (KJS::RegExp::~RegExp): Removed the now-unneeded free of the error message. (KJS::RegExp::match): Pass the new types and options. * kjs/regexp.h: Update type of m_constructionError. * pcre/AUTHORS: Update to reflect the status of the project -- we don't include the Google parts, and this isn't the PCRE library, per se. * pcre/COPYING: Ditto. * pcre/dftables.cpp: Copied from JavaScriptCore/pcre/dftables.c. (main): Removed unneeded ctype_digit. * pcre/pcre.h: Convert to C++, tweak API a bit. Use UChar instead of JSRegExpChar. * pcre/pcre_compile.cpp: Copied from JavaScriptCore/pcre/pcre_compile.c. Moved a lot of private stuff used only within this file here from pcre_internal.h. Renumbered the error codes. (error_text): Use a single string with embedded nulls for the error text (I got this idea from newer versions of PCRE). (check_escape): Changed return type to be enum instead of int. Replaced ctype_digit uses with isASCIIDigit. (is_counted_repeat): Ditto. (read_repeat_counts): Ditto. (first_significant_code): Ditto. (find_fixedlength): Ditto. (could_be_empty_branch): Ditto. (compile_branch): Ditto. Also removed some code that handles changing options. JavaScript doesn't have any of the features that allow options to change. (compile_regex): Updated for change to options parameter. (is_anchored): Ditto. (find_firstassertedchar): Ditto. (jsRegExpCompile): Changed to take separate flags instead of an options int. Also changed to call new/delete instead of pcre_malloc/free. (jsRegExpFree): Ditto. * pcre/pcre_exec.cpp: Copied from JavaScriptCore/pcre/pcre_exec.c. Added a case that uses computed goto for the opcode loop, but did not turn it on. Changed the RMATCH macro to handle returns more efficiently by putting the where pointer in the new frame instead of the old one, allowing us to branch to the return with a single statement. Switched to new/delete from pcre_malloc/free. Changed many RRETURN callers to not set the return value since it's already set correctly. Replaced the rrc variable with an is_match variable. Values other than "match" and "no match" are now handled differently. This allows us to remove the code to check for those cases in various rules. (match): All the case statements use a macro BEGIN_OPCODE instead. And all the continue statements, or break statements that break out of the outer case use a macro NEXT_OPCODE instead. Replaced a few if statements with assertions. (jsRegExpExecute): Use new/delete instead of pcre_malloc/free. Removed unused start_match field from the match block. * pcre/pcre_internal.h: Moved the last few configuration macros from pcre-config.h in here. Removed various unused types. Converted from JSRegExpChar to UChar. Eliminated pcre_malloc/free. Replaced the opcode enum with a macro that can be used in multiple places. Unfortunately we lose the comments for each opcode; we should find a place to put those back. Removed ctype_digit. * pcre/pcre_maketables.cpp: Copied from JavaScriptCore/pcre/pcre_maketables.c. (pcre_maketables): Got rid of the conditional code that allows this to be compiled in -- it's only used for dftables now (and soon may be obsolete entirely). Changed code for cbit_digit to not use isdigit, and took the "_" case out of the loop. Removed ctype_digit. * pcre/pcre_ord2utf8.cpp: Copied from JavaScriptCore/pcre/pcre_ord2utf8.c. * pcre/pcre_tables.cpp: Copied from JavaScriptCore/pcre/pcre_tables.c. Moved _pcre_OP_lengths out of here into pcre_exec.cpp. * pcre/pcre_ucp_searchfuncs.cpp: Copied from JavaScriptCore/pcre/pcre_ucp_searchfuncs.c. Updated for other file name changes. * pcre/pcre_xclass.cpp: Copied from JavaScriptCore/pcre/pcre_xclass.c. * pcre/ucpinternal.h: Updated header. * pcre/ucptable.cpp: Copied from JavaScriptCore/pcre/ucptable.c. * wtf/ASCIICType.h: (WTF::isASCIIDigit): Removed a branch by changing from && to & for this operation. Also added an overload that takes an int because that's useful for PCRE. Later we could optimize for int and overload other functions in this file; stuck to this simple one for now. * wtf/unicode/icu/UnicodeIcu.h: Removed unused isUpper. * wtf/unicode/qt4/UnicodeQt4.h: Ditto. * pcre/LICENCE: Removed. * pcre/pcre-config.h: Removed. * wtf/FastMallocPCRE.cpp: Removed. * pcre/dftables.c: Renamed to cpp. * pcre/pcre_compile.c: Ditto. * pcre/pcre_exec.c: Ditto. * pcre/pcre_maketables.c: Ditto. * pcre/pcre_ord2utf8.c: Ditto. * pcre/pcre_tables.c: Ditto. * pcre/pcre_ucp_searchfuncs.c: Ditto. * pcre/pcre_xclass.c: Ditto. * pcre/ucptable.c: Ditto. WebCore: Reviewed by Sam. - updated for JSRegExp function changes * platform/RegularExpression.cpp: (WebCore::RegularExpression::Private::compile): (WebCore::RegularExpression::match): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eseidel authored
Reviewed by Oliver. Add KJS_CHECKEXCEPTIONBOOLEAN to match rest of nodes.cpp * kjs/nodes.cpp: (KJS::ExpressionNode::evaluateToBoolean): (KJS::LessNode::evaluateToBoolean): (KJS::GreaterNode::evaluateToBoolean): (KJS::LessEqNode::evaluateToBoolean): (KJS::GreaterEqNode::evaluateToBoolean): (KJS::InstanceOfNode::evaluateToBoolean): (KJS::InNode::evaluateToBoolean): (KJS::EqualNode::evaluateToBoolean): (KJS::NotEqualNode::evaluateToBoolean): (KJS::StrictEqualNode::evaluateToBoolean): (KJS::NotStrictEqualNode::evaluateToBoolean): (KJS::LogicalAndNode::evaluateToBoolean): (KJS::LogicalOrNode::evaluateToBoolean): (KJS::ConditionalNode::evaluateToBoolean): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 10 Nov, 2007 2 commits
-
-
darin@apple.com authored
Reviewed by Sam. - fix http://bugs.webkit.org/show_bug.cgi?id=15927 REGRESSION(r27487): delete a.c followed by __defineGetter__("c", ...) incorrectly deletes another property and <rdar://problem/5586384> REGRESSION (r27487): Can't switch out of Edit HTML Source mode on Leopard Wiki Test: fast/js/delete-then-put.html * kjs/property_map.cpp: (KJS::PropertyMap::put): Added a missing "- 1"; code to find an empty slot was not working. (KJS::PropertyMap::checkConsistency): Added a missing range check that would have caught this problem before. - roll out a last-minute change to my evaluateToBoolean patch that was incorrect. * kjs/nodes.h: (KJS::ExprStatementNode::ExprStatementNode): Take out call to optimizeForUnnecessaryResult, since the result is used in some cases. LayoutTests: Reviewed by Sam. - test for http://bugs.webkit.org/show_bug.cgi?id=15927 delete a.c followed by __defineGetter__("c", ...) incorrectly deletes another property * fast/js/delete-then-put-expected.txt: Added. * fast/js/delete-then-put.html: Added. * fast/js/resources/delete-then-put.js: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
- http://bugs.webkit.org/show_bug.cgi?id=15915 add an evaluation path for booleans like the one we have for numbers Gives 1.1% on SunSpider. * kjs/grammar.y: Create TrueNode and FalseNode instead of BooleanNode. * kjs/nodes.h: Changed to use Noncopyable. Moved optimizeForUnnecessaryResult down from Node to ExpressionNode. Changed some classes to not inherit from ExpressionNode where not necessary, and removed unnneeded evaluate functions as well as evaluate functions that need not be virtual. Call the optimizeForUnnecessaryResult function on the start of a for loop too. * kjs/nodes.cpp: (KJS::ExpressionNode::evaluateToBoolean): Added. (KJS::FalseNode::evaluate): Added. (KJS::TrueNode::evaluate): Added. (KJS::NumberNode::evaluateToBoolean): Added. (KJS::StringNode::evaluateToBoolean): Added. (KJS::LocalVarAccessNode::evaluateToBoolean): Added. (KJS::BracketAccessorNode::evaluateToBoolean): Added. (KJS::LogicalNotNode::evaluate): Changed to call evaluateToBoolean. (KJS::LogicalNotNode::evaluateToBoolean): Added. (KJS::lessThan): Changed to return bool. (KJS::lessThanEq): Ditto. (KJS::LessNode::evaluate): Changed since lessThan returns bool. (KJS::LessNode::evaluateToBoolean): Added. (KJS::GreaterNode::evaluate): Changed since lessThanEq returns bool. (KJS::GreaterNode::evaluateToBoolean): Added. (KJS::LessEqNode::evaluate): Changed since lessThanEq returns bool. (KJS::LessEqNode::evaluateToBoolean): Added. (KJS::GreaterEqNode::evaluate): Changed since lessThan returns bool. (KJS::GreaterEqNode::evaluateToBoolean): Added. (KJS::InstanceOfNode::evaluateToBoolean): Added. (KJS::InNode::evaluateToBoolean): Added. (KJS::EqualNode::evaluateToBoolean): Added. (KJS::NotEqualNode::evaluateToBoolean): Added. (KJS::StrictEqualNode::evaluateToBoolean): Added. (KJS::NotStrictEqualNode::evaluateToBoolean): Added. (KJS::ConditionalNode::evaluate): Changed to call evaluateToBoolean. (KJS::IfNode::execute): Ditto. (KJS::DoWhileNode::execute): Ditto. (KJS::WhileNode::execute): Ditto. (KJS::ForNode::execute): Ditto. * kjs/nodes2string.cpp: (KJS::FalseNode::streamTo): Added. (KJS::TrueNode::streamTo): Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 09 Nov, 2007 1 commit
-
-
aroben@apple.com authored
Reviewed by Darin. * kjs/value.h: (KJS::jsNumber): Add some explicit casts. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 08 Nov, 2007 4 commits
-
-
darin@apple.com authored
* kjs/grammar.y: * kjs/nodes.h: * kjs/property_map.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
* kjs/nodes.cpp: Back to previous version. * kjs/nodes.h: Ditto. * kjs/grammar.y: Ditto. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
* kjs/nodes.cpp: Back to previous version. * kjs/nodes.h: Ditto. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
- http://bugs.webkit.org/show_bug.cgi?id=15912 fasta spends a lot of time in qsort * kjs/property_map.cpp: (KJS::PropertyMap::getEnumerablePropertyNames): Use insertion sort instead of qsort for small sets of property names. We can probably do some even-better speedups of for/in, but this nets 0.6% overall and 6.7% on fasta. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-