Summary: | SQUIRRELFISH: support the "slow script" dialog | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Maciej Stachowiak <mjs> | ||||||||
Component: | JavaScriptCore | Assignee: | Oliver Hunt <oliver> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | andersca | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Mac | ||||||||||
OS: | OS X 10.5 | ||||||||||
Attachments: |
|
Description
Maciej Stachowiak
2008-04-19 14:37:09 PDT
Added for for, while, and do..while loops with M JavaScriptCore/ChangeLog M JavaScriptCore/VM/CodeBlock.cpp M JavaScriptCore/VM/CodeGenerator.cpp M JavaScriptCore/VM/CodeGenerator.h M JavaScriptCore/VM/ExceptionHelpers.cpp M JavaScriptCore/VM/ExceptionHelpers.h M JavaScriptCore/VM/Machine.cpp M JavaScriptCore/VM/Opcode.h M JavaScriptCore/kjs/interpreter.cpp M JavaScriptCore/kjs/nodes.cpp M JavaScriptCore/kjs/object.h Committed r33483 That patch caused an epic regression on cameron's system so i rolled it out in r33484 Created attachment 21200 [details]
Patch, regresses perf on some systems
Olliej also mentioned that the existing patch doesn't fix for...in. I'm working on this now. Oliver's patch measured as a 1.0% regression on my system. I changed it to use a local variable, like so: ++count; if (UNLIKELY(count == THRESHOLD)) { exceptionValue = createInterruptedExecutionException(exec); goto vm_throw; } (This isn't completely correct -- it's just a prototype.) That got the regression down to 0.2%. So, I think we could improve things by using a local variable in the common case, and only consulting the global object when the local variable reached some threshold. Back to Oliver. Created attachment 21250 [details]
More complete version patch
This still regresses perf on some systems, but it doesn't on my system, so i can't do an further work on this :-(
Created attachment 21979 [details]
Final (hopefully) patch
Comment on attachment 21979 [details]
Final (hopefully) patch
Reviewed by Sam
Committing to http://svn.webkit.org/repository/webkit/trunk ... M JavaScriptCore/ChangeLog M JavaScriptCore/JavaScriptCore.exp M JavaScriptCore/VM/CodeBlock.cpp M JavaScriptCore/VM/CodeGenerator.cpp M JavaScriptCore/VM/ExceptionHelpers.cpp M JavaScriptCore/VM/ExceptionHelpers.h M JavaScriptCore/VM/LabelID.h M JavaScriptCore/VM/Machine.cpp M JavaScriptCore/VM/Machine.h M JavaScriptCore/VM/Opcode.cpp M JavaScriptCore/VM/Opcode.h M JavaScriptCore/kjs/JSGlobalObject.cpp M JavaScriptCore/kjs/JSGlobalObject.h M JavaScriptCore/kjs/JSObject.h M JavaScriptCore/kjs/interpreter.cpp Committed r34842 Woohoo! |