Changeset 29818 in webkit for trunk/JavaScriptCore/ChangeLog
- Timestamp:
- Jan 27, 2008, 1:38:01 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r29817 r29818 1 2008-01-27 Darin Adler <[email protected]> 2 3 Reviewed by Oliver. 4 5 - fix <rdar://problem/5657450> REGRESSION: const is broken 6 7 Test: fast/js/const.html 8 9 SunSpider said this was 0.3% slower. And I saw some Shark samples in 10 JSGlobalObject::put -- not a lot but a few. We may be able to regain the 11 speed, but for now we will take that small hit for correctness sake. 12 13 * kjs/JSGlobalObject.cpp: 14 (KJS::JSGlobalObject::put): Pass the checkReadOnly flag in to symbolTablePut 15 instead of passing attributes. 16 17 * kjs/JSVariableObject.h: 18 (KJS::JSVariableObject::symbolTablePut): Removed the code to set attributes 19 here, since we only set attributes when creating a property. Added the code 20 to check read-only here, since we need that to implement const! 21 22 * kjs/function.cpp: 23 (KJS::ActivationImp::put): Pass the checkReadOnly flag in to symbolTablePut 24 instead of passing attributes. 25 26 * kjs/nodes.cpp: 27 (KJS::isConstant): Added. 28 (KJS::PostIncResolveNode::optimizeVariableAccess): Create a PostIncConstNode 29 if optimizing for a local variable and the variable is constant. 30 (KJS::PostDecResolveNode::optimizeVariableAccess): Ditto. But PostDecConstNode. 31 (KJS::PreIncResolveNode::optimizeVariableAccess): Ditto. But PreIncConstNode. 32 (KJS::PreDecResolveNode::optimizeVariableAccess): Ditto. But PreDecConstNode. 33 (KJS::PreIncConstNode::evaluate): Return the value + 1. 34 (KJS::PreDecConstNode::evaluate): Return the value - 1. 35 (KJS::PostIncConstNode::evaluate): Return the value converted to a number. 36 (KJS::PostDecConstNode::evaluate): Ditto. 37 (KJS::ReadModifyResolveNode::optimizeVariableAccess): Create a ReadModifyConstNode 38 if optimizing for a local variable and the variable is constant. 39 (KJS::AssignResolveNode::optimizeVariableAccess): Ditto. But AssignConstNode. 40 (KJS::ScopeNode::optimizeVariableAccess): Pass the local storage to the 41 node optimizeVariableAccess functions, since that's where we need to look to 42 figure out if a variable is constant. 43 (KJS::FunctionBodyNode::processDeclarations): Moved the call to 44 optimizeVariableAccess until after localStorage is set up. 45 (KJS::ProgramNode::processDeclarations): Ditto. 46 47 * kjs/nodes.h: Fixed the IsConstant and HasInitializer values. They are used 48 as flag masks, so a value of 0 will not work for IsConstant. Changed the 49 first parameter to optimizeVariableAccess to be a const reference to a symbol 50 table and added a const reference to local storage. Added classes for const 51 versions of local variable access: PostIncConstNode, PostDecConstNode, 52 PreIncConstNode, PreDecConstNode, ReadModifyConstNode, and AssignConstNode. 53 54 * kjs/object.cpp: 55 (KJS::JSObject::put): Tweaked comments a bit, and changed the checkReadOnly 56 expression to match the form used at the two other call sites. 57 1 58 2008-01-27 Darin Adler <[email protected]> 2 59 … … 274 331 an int). 275 332 276 277 333 * bindings/qt/qt_runtime.cpp: 278 334 (KJS::Bindings::convertValueToQVariant): … … 310 366 Code style cleanups. 311 367 Add spaces before/after braces in inline function. 312 313 368 314 369 * bindings/qt/qt_instance.h: … … 320 375 Code style cleanups. 321 376 Remove spaces and unneeded declared parameter names. 322 323 377 324 378 * bindings/qt/qt_instance.cpp: … … 335 389 could result in a stale JSObject being returned for 336 390 a valid Instance. 337 338 391 339 392 * bindings/qt/qt_instance.cpp: … … 416 469 Better support for converting lists, read/write only 417 470 QMetaProperty support, modified slot search order...) 418 419 471 420 472 * bindings/qt/qt_class.cpp:
Note:
See TracChangeset
for help on using the changeset viewer.