Bug 144286 - RegExp matches arrays should use contiguous indexing.
Summary: RegExp matches arrays should use contiguous indexing.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2015-04-27 15:56 PDT by Andreas Kling
Modified: 2015-04-27 22:55 PDT (History)
4 users (show)

See Also:


Attachments
Patch (7.51 KB, patch)
2015-04-27 15:57 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2015-04-27 15:56:13 PDT
They currently use slow-put array storage, which prevents the FTL JIT from compiling the inner loop on the Octane/regexp benchmark.
Comment 1 Andreas Kling 2015-04-27 15:57:44 PDT
Created attachment 251780 [details]
Patch
Comment 2 Geoffrey Garen 2015-04-27 16:21:22 PDT
Comment on attachment 251780 [details]
Patch

r=me
Comment 3 WebKit Commit Bot 2015-04-27 17:16:01 PDT
Comment on attachment 251780 [details]
Patch

Clearing flags on attachment: 251780

Committed r183438: <http://trac.webkit.org/changeset/183438>
Comment 4 WebKit Commit Bot 2015-04-27 17:16:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Filip Pizlo 2015-04-27 19:14:19 PDT
This is causing a bunch of asserts in lots of tests when running run-javascriptcore-tests --debug.
Comment 6 Filip Pizlo 2015-04-27 19:14:40 PDT
Example:

jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: ASSERTION FAILED: indexingType & IsArray
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: /Volumes/Data/pizlo/quartary/OpenSource/Source/JavaScriptCore/runtime/JSGlobalObject.h(443) : JSC::Structure *JSC::JSGlobalObject::arrayStructureForIndexingTypeDuringAllocation(IndexingType) const
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 1   0x10f618220 WTFCrash
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 2   0x10ec23254 JSC::JSGlobalObject::arrayStructureForIndexingTypeDuringAllocation(unsigned char) const
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 3   0x10f509aad JSC::createRegExpMatchesArray(JSC::ExecState*, JSC::JSString*, JSC::RegExp*, MatchResult)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 4   0x10f50aed9 JSC::RegExpObject::exec(JSC::ExecState*, JSC::JSString*)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 5   0x10f50c6a8 JSC::regExpProtoFuncExec(JSC::ExecState*)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 6   0x594e41a01028
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 7   0x10f3b26c3 llint_entry
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 8   0x10f3abf49 vmEntryToJavaScript
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 9   0x10f20605a JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 10  0x10f1ea08e JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 11  0x10eca1e8e JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 12  0x10f2fd854 JSC::Walker::callReviver(JSC::JSObject*, JSC::JSValue, JSC::JSValue)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 13  0x10f2fb06a JSC::Walker::walk(JSC::JSValue)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 14  0x10f2fc098 JSC::JSONProtoFuncParse(JSC::ExecState*)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 15  0x594e41a01028
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 16  0x10f3b26c3 llint_entry
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 17  0x10f3abf49 vmEntryToJavaScript
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 18  0x10f20605a JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 19  0x10f1e6a71 JSC::Interpreter::execute(JSC::EvalExecutable*, JSC::ExecState*, JSC::JSValue, JSC::JSScope*)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 20  0x10f1e602f JSC::eval(JSC::ExecState*)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 21  0x10f21702d operationCallEval
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 22  0x594e41a0501f
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 23  0x10f3b26c3 llint_entry
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 24  0x10f3abf49 vmEntryToJavaScript
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 25  0x10f20605a JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 26  0x10f1e98e1 JSC::Interpreter::execute(JSC::ProgramExecutable*, JSC::ExecState*, JSC::JSObject*)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 27  0x10ed28dd0 JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&, JSC::JSValue, JSC::JSValue*)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 28  0x10eb9deb4 runWithScripts(GlobalObject*, WTF::Vector<Script, 0ul, WTF::CrashOnOverflow> const&, bool)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 29  0x10eb9d476 jscmain(int, char**)
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 30  0x10eb9cf91 main
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: 31  0x7fff9713d5c9 start
jsc-layout-tests.yaml/js/script-tests/JSON-parse-reviver.js.layout-ftl-eager-no-cjit: test_script_18228: line 2: 77426 Segmentation fault: 11  "$@" ../../../../.vm/JavaScriptCore.framework/Resources/jsc --useFTLJIT\=false --enableFunctionDotArguments\=true --testTheFTL\=true --useFTLJIT\=true --ftlCrashesIfCantInitializeLLVM\=true --enableConcurrentJIT\=false --thresholdForJITAfterWarmUp\=100 --thresholdForJITAfterWarmUp\=10 --thresholdForJITSoon\=10 --thresholdForOptimizeAfterWarmUp\=20 --thresholdForOptimizeAfterLongWarmUp\=20 --thresholdForOptimizeSoon\=20 --thresholdForFTLOptimizeAfterWarmUp\=20 --thresholdForFTLOptimizeSoon\=20 --maximumEvalCacheableSourceLength\=150000 resources/standalone-pre.js JSON-parse-reviver.js resources/standalone-post.js
Comment 7 Filip Pizlo 2015-04-27 19:15:56 PDT
Rolled out in http://trac.webkit.org/changeset/183446
Comment 8 Andreas Kling 2015-04-27 22:55:16 PDT
Committed r183458: <http://trac.webkit.org/changeset/183458>