More Info

Revision 823168

(Back to digest)
 

Optimization in KDE Base

Maks Orlovich committed changes in /trunk/KDE/kdelibs/kjs:

Since they're all pretty simple (except the spill code..) merge in a bunch of performance improvements from the FrostByte branch,
for an about 15% speedup w/g++-4.3, and abour 10% or so with g++-4.2. The more aggressive
stuff on my TODO list will probably have to wait till FrostByte -42, though.

- Tweak inlining setup to work better with g++-4.3
- Tweak the generated VP dispatch/decode loop to have smaller & faster code, and to have
less unneeded specializations
- Avoid some can-fit checks when boxing things we know can't be smallint'd
- Streamline/simplify the function call code somewhat.
- Specialized < op for comparisons with numberic upper bound
- Do the string value -> string object conversion directly when legal
- Make the string [] accessor share substring data, avoding some allocations
- Remove a double-lookup in hashtable due to ReadOnly check in JSObject::put
- Do tearoffs deferred only

File Changes

Modified 31 files
/trunk/KDE/kdelibs/kjs
 
/CompileState.h
 
/ExecState.cpp
 
/ExecState.h
 
/function.cpp
 
/function.h
 
/interpreter.cpp
 
/JSVariableObject.h
 
/JSWrapperObject.cpp
 
/JSWrapperObject.h
 
/nodes.cpp
 
/nodes.h
 
/nodes2bytecode.cpp
 
/object.cpp
 
/object.h
 
/operations.cpp
 
/operations.h
 
/scriptfunction.h
 
/string_object.cpp
 
/string_object.h
 
/value.cpp
 
/bytecode/codes.def
 
/bytecode/machine.cpp.in
 
/bytecode/machine.h
 
/bytecode/opcodes.cpp.in
 
/wtf/AlwaysInline.h
 
/bytecode/generator/lexer.cpp
 
/bytecode/generator/lexer.h
 
/bytecode/generator/parser.cpp
 
/bytecode/generator/parser.h
 
/bytecode/generator/tablebuilder.cpp
 
/bytecode/generator/tablebuilder.h
31 files changed in total